UNPKG

@trophyso/node

Version:
26 lines (25 loc) 970 B
/** * A user of your application. */ export interface User { /** The ID of the user in your database. Must be a string. */ id: string; /** The user's email address. */ email?: string; /** The name of the user. */ name?: string; /** The user's timezone. */ tz?: string; /** The user's device tokens. */ deviceTokens?: string[]; /** Whether the user is opted into receiving Trophy-powered emails. */ subscribeToEmails: boolean; /** User attributes as key-value pairs. Keys must match existing user attributes set up in the Trophy dashboard. */ attributes: Record<string, string>; /** Whether the user is in the control group, meaning they do not receive emails or other communications from Trophy. */ control: boolean; /** The date and time the user was created, in ISO 8601 format. */ created: Date; /** The date and time the user was last updated, in ISO 8601 format. */ updated: Date; }