@talkjs/react-native
Version:
Official TalkJS SDK for React Native
54 lines • 2.26 kB
TypeScript
export interface User {
/**
* The unqiue ID which is used to identify the user in TalkJS
*/
readonly id: string;
/**
* The User's name which will be displayed on the TalkJS UI
*/
readonly name?: string;
/**
* One or more email address belonging to the User. The email addresses will be used for {@link https://talkjs.com/docs/Features/Notifications/Email_Notifications/index.html | Email Notifications}
* if they are enabled.
*/
readonly email?: string | Array<string> | null;
/**
* One or more phone numbers belonging to the User. The phone number will be used for {@link https://talkjs.com/docs/Features/Notifications/SMS_Notifications.html | SMS Notifications }
* (this feature requires standard plan and up).
*/
readonly phone?: string | Array<string> | null;
/**
* The default message a user sees when starting a chat with that person
*/
readonly welcomeMessage?: string | null;
/**
* An optional URL to a photo which will be displayed as the user's avatar
*/
readonly photoUrl?: string | null;
/**
* TalkJS supports multiple sets of settings, called "roles". These allow you to change the behavior of TalkJS for different users.
* You have full control over which user gets which configuration.
*/
readonly role?: string | null;
/**
* @deprecated Please use {@link User.role} instead.
*/
readonly configuration?: string | null;
/**
* Allows you to set custom metadata for the User
*/
readonly custom?: {
[name: string]: string | null;
} | null;
/**
* Availability acts similarly to {@link User.welcomeMessage} but appears as a {@link https://talkjs.com/docs/Reference/Concepts/System_Messages.html | system message}.
*/
readonly availabilityText?: string | null;
/**
* The locale field expects an {@link https://www.w3.org/International/articles/language-tags/ | IETF language tag}.
* See the {@link https://talkjs.com/docs/Features/Multiple_Languages.html | localization documentation}.
*/
readonly locale?: string | null;
}
export declare function hasIdOnly(user: User): string | false;
//# sourceMappingURL=User.d.ts.map