2 * State of referred user
3 * - `0` => `invited` : The user has been invited (email invite only)
4 * - `1` => `signedup` : User signed up with the link
5 * - `2` => `trial` : User accepted the free trial
6 * - `3` => `completed` : User paid a plus subscription
7 * - `4` => `rewarded` : After some processing reward is given to referrer
9 export enum ReferralState {
17 export interface Referral {
18 /** Unique id of referred registration/invitation */
21 * Encrypted id of the Referrer user id
25 * Encrypted id of the Referred User id :
26 * - `null` if it's an email invitations where the referred user has not yet registered
28 ReferredUserID: string | null;
29 /** Referral creation time (can be registration time or invitation time for email invitations) */
31 /** not null only for email invitations */
33 /** referred user registration time */
34 SignupTime: number | null;
35 /** when the referred user started its free trial */
36 TrialTime: number | null;
37 /** when the referral was validated but the referred was already at the maximum allowed reward (or not yet given) */
38 CompleteTime: number | null;
39 /** when we gave the reward to the referrer */
40 RewardTime: number | null;
41 /** The amount of reward amount given to the referrer */
42 RewardMonths: number | null;
44 InvoiceID: number | null;
45 /** The number of months user subscribed. If monthly will be 1. If yearly will be 12 */
46 ReferredUserSubscriptionCycle: number | null;
49 export interface ReferralStatus {
50 /** Number of free monthes of mail plus */
52 /** Max number of free monthes user can have */
53 RewardMonthsLimit: number;
54 /** Number of emails user can send */
55 EmailsAvailable: number;