import { Amount } from '../../commonStateTypes/amount'; import { FetchStateAndError, FetchedState, ID } from '../../commonStateTypes/common'; import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes'; import { ZeniDate } from '../../zeniDayJS'; import ZeniUrl from '../../zeniUrl'; export interface ReferralInvitation { amount: Amount; companyName: string; inviteesId: ID; isActive: boolean; refereeEmailId: string; resendInviteStatus: FetchStateAndError; rewardPlan: string; statusCode: string; userId: ID; voucherId: ID; lastInviteTimestamp?: ZeniDate; } export interface ReferralViewState extends FetchedState { earnedBonus: Amount; invitations: ReferralInvitation[]; pendingBonus: Amount; pendingReferrals: number; referralFormLocalData: InviteCompanyLocalData[]; rewardsPlan: RewardsPlanData; rewardsPlanFetchState: FetchStateAndError; sendInviteState: FetchStateAndError; uiState: ReferralViewUIState; updateRewardsViewedFetchState: FetchStateAndError; } export interface ReferralViewUIState { sortKey: ReferralListViewSortKey; sortOrder: SortOrder; scrollYOffset?: number; } export interface RewardsPlanData { planId: ID; planName: SupportedRewardPlans; refereeAmount: Amount; referralLink: ZeniUrl; referrerAmount: Amount; } export interface InviteCompanyLocalData { companyName: string; emailIds: string[]; } export declare const SUPPORTED_REWARD_PLANS: readonly ["PLAN_1000", "PLAN_4000"]; export declare const toSupportedRewardPlansType: (v: string) => "PLAN_1000" | "PLAN_4000"; export declare type SupportedRewardPlans = ReturnType; export declare const REFERRAL_LIST_VIEW_SORT_KEYS: readonly ["invitee_email", "amount", "status", "referral_date"]; export declare const toReferralListViewSortKeyType: (v: string) => "status" | "amount" | "invitee_email" | "referral_date"; export declare type ReferralListViewSortKey = ReturnType; declare const toReferralStatusType: (v: string) => "onboarding" | "active" | "declined" | "invite_processing" | "invite_sent" | "resend_invite" | "reward_sent"; export declare type ReferralStatus = ReturnType; export declare const StatusTypes: Record; declare const toReferralAmountStatusType: (v: string) => "received" | "to_be_received"; export declare type ReferralAmountStatus = ReturnType; export declare const AmountStatusTypes: Record; export {};