UNPKG

@ua/react-native-airship

Version:
85 lines (76 loc) 1.86 kB
"use strict"; import { AttributeEditor } from "./AttributeEditor.js"; import { ScopedSubscriptionListEditor } from "./ScopedSubscriptionListEditor.js"; import { TagGroupEditor } from "./TagGroupEditor.js"; /** * Airship contact. */ export class AirshipContact { constructor(module) { this.module = module; } /** * Identifies the contact with a named user Id. * @param namedUser The named user Id. * @returns A promise. */ identify(namedUser) { return this.module.contactIdentify(namedUser); } /** * Resets the contact. * @returns A promise. */ reset() { return this.module.contactReset(); } /** * Notifies the contact of a remote login. * @returns A promise. */ notifyRemoteLogin() { return this.module.contactNotifyRemoteLogin(); } /** * Gets the named user Id. * @returns A promise with the result. */ getNamedUserId() { return this.module.contactGetNamedUserId(); } /** * Gets the contacts subscription lists. * @returns A promise with the result. */ getSubscriptionLists() { return this.module.contactGetSubscriptionLists(); } /** * Edits tag groups. * @returns A tag group editor. */ editTagGroups() { return new TagGroupEditor(operations => { return this.module.contactEditTagGroups(operations); }); } /** * Edits attributes. * @returns An attribute editor. */ editAttributes() { return new AttributeEditor(operations => { return this.module.contactEditAttributes(operations); }); } /** * Edits subscription lists. * @returns A subscription list editor. */ editSubscriptionLists() { return new ScopedSubscriptionListEditor(operations => { return this.module.contactEditSubscriptionLists(operations); }); } } //# sourceMappingURL=AirshipContact.js.map