2020-06-30 08:04:07 +02:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
type DeviceType = 'mobile' | 'web' | 'desktop';
|
|
|
|
|
|
|
|
declare type User = {
|
|
|
|
country: ?string,
|
|
|
|
created_at: string,
|
|
|
|
family_name: ?string,
|
|
|
|
given_name: ?string,
|
|
|
|
groups: Array<string>,
|
|
|
|
has_verified_email: boolean,
|
|
|
|
id: number,
|
|
|
|
invite_reward_claimed: boolean,
|
|
|
|
invited_at: ?number,
|
|
|
|
invited_by_id: number,
|
|
|
|
invites_remaining: number,
|
|
|
|
is_email_enabled: boolean,
|
|
|
|
is_identity_verified: boolean,
|
|
|
|
is_reward_approved: boolean,
|
|
|
|
password_set: boolean,
|
|
|
|
language: string,
|
|
|
|
manual_approval_user_id: ?number,
|
|
|
|
primary_email: ?string,
|
|
|
|
latest_claimed_email: ?string,
|
|
|
|
reward_status_change_trigger: string,
|
|
|
|
updated_at: string,
|
|
|
|
youtube_channels: ?Array<string>,
|
|
|
|
device_types: Array<DeviceType>,
|
2020-07-03 00:42:04 +02:00
|
|
|
lbry_first_approved: boolean,
|
2020-07-23 16:22:57 +02:00
|
|
|
experimental_ui: boolean,
|
2021-07-05 06:04:05 +02:00
|
|
|
fiat_enabled: boolean,
|
2021-04-08 21:19:14 +02:00
|
|
|
odysee_live_enabled: boolean,
|
|
|
|
odysee_live_disabled: boolean,
|
2021-04-23 21:59:48 +02:00
|
|
|
global_mod: boolean,
|
2022-03-17 05:55:40 +01:00
|
|
|
publish_id: ?number,
|
|
|
|
is_odysee_user: boolean,
|
|
|
|
location: ?string,
|
|
|
|
};
|
|
|
|
|
|
|
|
declare type UserState ={
|
|
|
|
authenticationIsPending: boolean,
|
|
|
|
userIsPending: boolean,
|
|
|
|
emailNewIsPending: boolean,
|
|
|
|
emailNewErrorMessage: string,
|
|
|
|
emailToVerify: string,
|
|
|
|
emailAlreadyExists: boolean,
|
|
|
|
emailDoesNotExist: boolean,
|
|
|
|
resendingVerificationEmail: boolean,
|
|
|
|
passwordResetPending: boolean,
|
|
|
|
passwordResetSuccess: boolean,
|
|
|
|
passwordResetError: ?string,
|
|
|
|
passwordSetPending: boolean,
|
|
|
|
passwordSetSuccess: boolean,
|
|
|
|
passwordSetError: ?string,
|
|
|
|
inviteNewErrorMessage: string,
|
|
|
|
inviteNewIsPending: boolean,
|
|
|
|
inviteStatusIsPending: boolean,
|
|
|
|
invitesRemaining: ?number,
|
|
|
|
invitees: ?Array<string>,
|
|
|
|
referralLink: ?string,
|
|
|
|
referralCode: ?string,
|
|
|
|
user: ?User,
|
|
|
|
youtubeChannelImportPending: boolean,
|
|
|
|
youtubeChannelImportErrorMessage: string,
|
|
|
|
referrerSetIsPending: boolean,
|
|
|
|
referrerSetError: string,
|
2022-05-04 04:17:59 +02:00
|
|
|
odyseeMembershipName: ?string, // undefined: not fetched, '': no membership
|
2022-03-17 05:55:40 +01:00
|
|
|
odyseeMembershipsPerClaimIds: ?{ [string]: string },
|
2022-03-17 07:12:16 +01:00
|
|
|
locale: ?LocaleInfo,
|
2020-06-30 08:04:07 +02:00
|
|
|
};
|
2022-03-10 20:28:54 +01:00
|
|
|
|
|
|
|
declare type LocaleInfo = {
|
|
|
|
continent: string,
|
|
|
|
country: string,
|
|
|
|
gdpr_required: boolean,
|
|
|
|
is_eu_member: boolean,
|
|
|
|
};
|