import { SuprSend } from './index'; import { Dictionary } from './interface'; import { default as Preferences } from './preferences'; export default class User { private config; preferences: Preferences; constructor(config: SuprSend); private isReservedKey; private formatParamsToObj; private formatParamsToArray; private validateObjData; private validateArrayData; private triggerUserEvent; /** * Used to set user properties. Keys with $ and ss_ will be removed. */ set(arg1: string | Dictionary, arg2?: unknown): Promise; /** * Used to set user properties only once. Properties once set cannot be changed later. * Keys with $ and ss_ will be removed. */ setOnce(arg1: string | Dictionary, arg2?: unknown): Promise; /** * Used to increment/decrement user properties whose values are numbers. To decrement use -ve values. * Keys with $ and ss_ will be removed. */ increment(arg1: string | Dictionary, arg2?: number): Promise; /** * Used to add items to list if user property is list (example: wishlist: [iphone, macbook]). * Keys with $ and ss_ will be removed. */ append(arg1: string | Dictionary, arg2?: unknown): Promise; /** * Used to remove items from list if user property is list. * Keys with $ and ss_ will be removed. */ remove(arg1: string | Dictionary, arg2?: unknown): Promise; /** * Used to remove user property. Keys with $ and ss_ will be removed. */ unset(arg: string | string[]): Promise; private appendInternal; private removeInternal; private setInternal; private validateEmail; private validateMobile; addEmail(email: string): Promise; removeEmail(email: string): Promise; /** * Mobile number must be as per {@link https://www.twilio.com/docs/glossary/what-e164 E.164 standard}. */ addSms(mobile: string): Promise; /** * Mobile number must be as per {@link https://www.twilio.com/docs/glossary/what-e164 E.164 standard}. */ removeSms(mobile: string): Promise; /** * Mobile number must be as per {@link https://www.twilio.com/docs/glossary/what-e164 E.164 standard}. */ addWhatsapp(mobile: string): Promise; /** * Mobile number must be as per {@link https://www.twilio.com/docs/glossary/what-e164 E.164 standard}. */ removeWhatsapp(mobile: string): Promise; private getDeviceId; addWebPush(push: PushSubscription): Promise; removeWebPush(push: PushSubscription): Promise; addSlack(data: Dictionary): Promise; removeSlack(data: Dictionary): Promise; addMSTeams(data: Dictionary): Promise; removeMSTeams(data: Dictionary): Promise; /** * language passed should be 2-letter language code in {@link https://gist.github.com/jrnk/8eb57b065ea0b098d571 ISO 639-1 Alpha-2 format}. * e.g. en (for English), es (for Spanish), fr (for French) etc. */ setPreferredLanguage(language: string): Promise; /** * Timezone passed should be in {@link https://timeapi.io/documentation/iana-timezones IANA timezone format}. */ setTimezone(timezone: string): Promise; }