@ua/capacitor-airship 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Package.swift CHANGED
@@ -11,7 +11,7 @@ let package = Package(
11
11
  ],
12
12
  dependencies: [
13
13
  .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"),
14
- .package(url: "https://github.com/urbanairship/airship-mobile-framework-proxy.git", from: "15.8.0")
14
+ .package(url: "https://github.com/urbanairship/airship-mobile-framework-proxy.git", from: "15.9.1")
15
15
  ],
16
16
  targets: [
17
17
  .target(
package/README.md CHANGED
@@ -1,12 +1,58 @@
1
1
  # Capacitor Airship Plugin
2
2
 
3
- A Capacitor plugin for Airship's iOS and Android SDK.
3
+ [![npm version](https://badge.fury.io/js/%40ua%2Fcapacitor-airship.svg)](https://badge.fury.io/js/%40ua%2Fcapacitor-airship)
4
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4
5
 
5
- ### Resources
6
+ The official Airship Capacitor plugin for iOS and Android.
6
7
 
7
- * [Getting started guide](https://docs.airship.com/platform/mobile/setup/sdk/capacitor/)
8
- * [API docs](https://docs.airship.com/reference/libraries/capacitor-airship/latest/)
8
+ ## Features
9
9
 
10
- ### Issues
10
+ - **Push Notifications** - Rich, interactive push notifications with deep linking
11
+ - **Live Activities & Live Updates** - Real-time content updates on iOS Lock Screen and Android Live Content
12
+ - **In-App Experiences** - Contextual messaging, automation, and Scenes
13
+ - **Message Center** - Persistent inbox for rich messages with HTML, video, and interactive content
14
+ - **Preference Center** - User preference management
15
+ - **Feature Flags** - Dynamic feature toggles and experimentation
16
+ - **Analytics** - Comprehensive user behavior tracking
17
+ - **Contacts** - User identification and contact management
18
+ - **Tags, Attributes & Subscription Lists** - User segmentation, personalization, and subscription management
19
+ - **Privacy Controls** - Granular data collection and feature management
11
20
 
12
- Please visit https://support.airship.com/ for any issues integrating or using this plugin.
21
+ ## Quick Start
22
+
23
+ Install the package:
24
+ ```bash
25
+ npm install @ua/capacitor-airship
26
+ npx cap sync
27
+ ```
28
+
29
+ ### Initialization
30
+
31
+ Call `takeOff` once during app startup, before any other Airship API:
32
+ ```typescript
33
+ import { Airship } from '@ua/capacitor-airship';
34
+
35
+ await Airship.takeOff({
36
+ default: {
37
+ appKey: 'YOUR_APP_KEY',
38
+ appSecret: 'YOUR_APP_SECRET',
39
+ },
40
+ });
41
+
42
+ await Airship.push.enableUserNotifications();
43
+ ```
44
+
45
+ For a more detailed setup guide, please see the full [Getting Started Documentation](https://docs.airship.com/platform/mobile/setup/sdk/capacitor/).
46
+
47
+ ## Versions and Support
48
+
49
+ For the current Support Status of each plugin major, EOL dates, and the full lifecycle policy, see the [Airship SDK Support Policy](https://www.airship.com/docs/reference/sdk-support-policy/).
50
+
51
+ ## Resources
52
+
53
+ - **[Documentation](https://docs.airship.com/platform/mobile/setup/sdk/capacitor/)** - Complete SDK integration guides and feature documentation
54
+ - **[API Reference](https://docs.airship.com/reference/libraries/capacitor-airship/latest/)** - Detailed TypeScript API documentation
55
+ - **[SDK Support Policy](https://www.airship.com/docs/reference/sdk-support-policy/)** - Version lifecycle, support windows, and EOL dates across all Airship SDKs
56
+ - **[GitHub Issues](https://github.com/urbanairship/capacitor-airship/issues)** - Report bugs and request features
57
+ - **[Changelog](CHANGELOG.md)** - Release notes and version history
58
+ - **[Support](https://support.airship.com/)** - Contact Airship support
@@ -13,6 +13,6 @@ Pod::Spec.new do |s|
13
13
  s.ios.deployment_target = '16.0'
14
14
  s.dependency 'Capacitor'
15
15
  s.swift_version = '6'
16
- s.dependency "AirshipFrameworkProxy", "15.8.0"
16
+ s.dependency "AirshipFrameworkProxy", "15.9.1"
17
17
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
18
18
  end
@@ -1,5 +1,5 @@
1
1
  ext {
2
- airshipProxyVersion = project.hasProperty('airshipProxyVersion') ? rootProject.ext.airshipProxyVersion : '15.8.0'
2
+ airshipProxyVersion = project.hasProperty('airshipProxyVersion') ? rootProject.ext.airshipProxyVersion : '15.9.1'
3
3
  }
4
4
 
5
5
 
@@ -3,5 +3,5 @@
3
3
  package com.airship.capacitor
4
4
 
5
5
  object AirshipCapacitorVersion {
6
- var version = "6.0.0"
6
+ var version = "6.1.0"
7
7
  }
@@ -121,6 +121,18 @@ class AirshipPlugin : Plugin() {
121
121
  "contact#reset" -> call.resolve(scope, method) { proxy.contact.reset() }
122
122
  "contact#notifyRemoteLogin" -> call.resolve(scope, method) { proxy.contact.notifyRemoteLogin() }
123
123
  "contact#identify" -> call.resolve(scope, method) { proxy.contact.identify(arg.requireString()) }
124
+ "contact#registerSms" -> call.resolve(scope, method) {
125
+ val args = arg.requireList()
126
+ val msisdn = args.get(0).requireString()
127
+ val options = args.get(1)
128
+ proxy.contact.registerSms(msisdn, options)
129
+ }
130
+ "contact#registerEmail" -> call.resolve(scope, method) {
131
+ val args = arg.requireList()
132
+ val address = args.get(0).requireString()
133
+ val options = args.get(1)
134
+ proxy.contact.registerEmail(address, options)
135
+ }
124
136
  "contact#getNamedUserId" -> call.resolve(scope, method) { proxy.contact.getNamedUserId() }
125
137
  "contact#editTagGroups" -> call.resolve(scope, method) { proxy.contact.editTagGroups(arg) }
126
138
  "contact#editSubscriptionLists" -> call.resolve(scope, method) {
@@ -2,7 +2,7 @@ import { AttributeEditor } from './AttributeEditor';
2
2
  import { ScopedSubscriptionListEditor } from './ScopedSubscriptionListEditor';
3
3
  import { TagGroupEditor } from './TagGroupEditor';
4
4
  import type { AirshipPluginWrapper } from './AirshipPlugin';
5
- import type { SubscriptionScope } from './types';
5
+ import type { SmsRegistrationOptions, EmailRegistrationOptions, SubscriptionScope } from './types';
6
6
  /**
7
7
  * Airship contact.
8
8
  */
@@ -20,6 +20,20 @@ export declare class AirshipContact {
20
20
  * @returns A promise.
21
21
  */
22
22
  reset(): Promise<void>;
23
+ /**
24
+ * Registers an SMS channel with the contact.
25
+ * @param msisdn The phone number in E.164 format.
26
+ * @param options The SMS registration options.
27
+ * @returns A promise.
28
+ */
29
+ registerSms(msisdn: string, options: SmsRegistrationOptions): Promise<void>;
30
+ /**
31
+ * Registers an email channel with the contact.
32
+ * @param address The email address.
33
+ * @param options The email registration options.
34
+ * @returns A promise.
35
+ */
36
+ registerEmail(address: string, options: EmailRegistrationOptions): Promise<void>;
23
37
  /**
24
38
  * Gets the named user Id.
25
39
  * @returns A promise with the result.
@@ -23,6 +23,24 @@ export class AirshipContact {
23
23
  reset() {
24
24
  return this.plugin.perform('contact#reset');
25
25
  }
26
+ /**
27
+ * Registers an SMS channel with the contact.
28
+ * @param msisdn The phone number in E.164 format.
29
+ * @param options The SMS registration options.
30
+ * @returns A promise.
31
+ */
32
+ registerSms(msisdn, options) {
33
+ return this.plugin.perform('contact#registerSms', [msisdn, options]);
34
+ }
35
+ /**
36
+ * Registers an email channel with the contact.
37
+ * @param address The email address.
38
+ * @param options The email registration options.
39
+ * @returns A promise.
40
+ */
41
+ registerEmail(address, options) {
42
+ return this.plugin.perform('contact#registerEmail', [address, options]);
43
+ }
26
44
  /**
27
45
  * Gets the named user Id.
28
46
  * @returns A promise with the result.
@@ -1 +1 @@
1
- {"version":3,"file":"AirshipContact.js","sourceRoot":"","sources":["../../src/AirshipContact.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EACL,4BAA4B,EAC7B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,YAA6B,MAA4B;QAA5B,WAAM,GAAN,MAAM,CAAsB;IAAG,CAAC;IAE7D;;;;OAIG;IACI,QAAQ,CAAC,SAAiB;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACI,KAAK;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAC9C,CAAC;IAED;;;OAGG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACI,oBAAoB;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC7D,CAAC;IAED;;;OAGG;IACI,aAAa;QAClB,OAAO,IAAI,cAAc,CAAC,CAAC,UAA+B,EAAE,EAAE;YAC5D,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACI,cAAc;QACnB,OAAO,IAAI,eAAe,CAAC,CAAC,UAAgC,EAAE,EAAE;YAC9D,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,wBAAwB,EAAE,UAAU,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACI,qBAAqB;QAC1B,OAAO,IAAI,4BAA4B,CACrC,CAAC,UAA6C,EAAE,EAAE;YAChD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,+BAA+B,EAAE,UAAU,CAAC,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { AttributeOperation } from './AttributeEditor';\nimport { AttributeEditor } from './AttributeEditor';\nimport type {\n ScopedSubscriptionListOperation} from './ScopedSubscriptionListEditor';\nimport {\n ScopedSubscriptionListEditor\n} from './ScopedSubscriptionListEditor';\nimport type { TagGroupOperation } from './TagGroupEditor';\nimport { TagGroupEditor } from './TagGroupEditor';\nimport type { AirshipPluginWrapper } from './AirshipPlugin';\nimport type { SubscriptionScope } from './types';\n\n/**\n * Airship contact.\n */\nexport class AirshipContact {\n constructor(private readonly plugin: AirshipPluginWrapper) {}\n\n /**\n * Identifies the contact with a named user Id.\n * @param namedUser The named user Id.\n * @returns A promise.\n */\n public identify(namedUser: string): Promise<void> {\n return this.plugin.perform('contact#identify', namedUser);\n }\n\n /**\n * Resets the contact.\n * @returns A promise.\n */\n public reset(): Promise<void> {\n return this.plugin.perform('contact#reset');\n }\n\n /**\n * Gets the named user Id.\n * @returns A promise with the result.\n */\n public getNamedUserId(): Promise<string | null | undefined> {\n return this.plugin.perform('contact#getNamedUserId');\n }\n\n /**\n * Gets the contacts subscription lists.\n * @returns A promise with the result.\n */\n public getSubscriptionLists(): Promise<Record<string, SubscriptionScope[]>> {\n return this.plugin.perform('contact#getSubscriptionLists');\n }\n\n /**\n * Edits tag groups.\n * @returns A tag group editor.\n */\n public editTagGroups(): TagGroupEditor {\n return new TagGroupEditor((operations: TagGroupOperation[]) => {\n return this.plugin.perform('contact#editTagGroups', operations);\n });\n }\n\n /**\n * Edits attributes.\n * @returns An attribute editor.\n */\n public editAttributes(): AttributeEditor {\n return new AttributeEditor((operations: AttributeOperation[]) => {\n return this.plugin.perform('contact#editAttributes', operations);\n });\n }\n\n /**\n * Edits subscription lists.\n * @returns A subscription list editor.\n */\n public editSubscriptionLists(): ScopedSubscriptionListEditor {\n return new ScopedSubscriptionListEditor(\n (operations: ScopedSubscriptionListOperation[]) => {\n return this.plugin.perform('contact#editSubscriptionLists', operations);\n },\n );\n }\n}\n"]}
1
+ {"version":3,"file":"AirshipContact.js","sourceRoot":"","sources":["../../src/AirshipContact.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EACL,4BAA4B,EAC7B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,YAA6B,MAA4B;QAA5B,WAAM,GAAN,MAAM,CAAsB;IAAG,CAAC;IAE7D;;;;OAIG;IACI,QAAQ,CAAC,SAAiB;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACI,KAAK;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;OAKG;IACI,WAAW,CAAC,MAAc,EAAE,OAA+B;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACvE,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAC,OAAe,EAAE,OAAiC;QACrE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAuB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED;;;OAGG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACI,oBAAoB;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC7D,CAAC;IAED;;;OAGG;IACI,aAAa;QAClB,OAAO,IAAI,cAAc,CAAC,CAAC,UAA+B,EAAE,EAAE;YAC5D,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACI,cAAc;QACnB,OAAO,IAAI,eAAe,CAAC,CAAC,UAAgC,EAAE,EAAE;YAC9D,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,wBAAwB,EAAE,UAAU,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACI,qBAAqB;QAC1B,OAAO,IAAI,4BAA4B,CACrC,CAAC,UAA6C,EAAE,EAAE;YAChD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,+BAA+B,EAAE,UAAU,CAAC,CAAC;QAC1E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { AttributeOperation } from './AttributeEditor';\nimport { AttributeEditor } from './AttributeEditor';\nimport type {\n ScopedSubscriptionListOperation} from './ScopedSubscriptionListEditor';\nimport {\n ScopedSubscriptionListEditor\n} from './ScopedSubscriptionListEditor';\nimport type { TagGroupOperation } from './TagGroupEditor';\nimport { TagGroupEditor } from './TagGroupEditor';\nimport type { AirshipPluginWrapper } from './AirshipPlugin';\nimport type { SmsRegistrationOptions, EmailRegistrationOptions, SubscriptionScope } from './types';\n\n/**\n * Airship contact.\n */\nexport class AirshipContact {\n constructor(private readonly plugin: AirshipPluginWrapper) {}\n\n /**\n * Identifies the contact with a named user Id.\n * @param namedUser The named user Id.\n * @returns A promise.\n */\n public identify(namedUser: string): Promise<void> {\n return this.plugin.perform('contact#identify', namedUser);\n }\n\n /**\n * Resets the contact.\n * @returns A promise.\n */\n public reset(): Promise<void> {\n return this.plugin.perform('contact#reset');\n }\n\n /**\n * Registers an SMS channel with the contact.\n * @param msisdn The phone number in E.164 format.\n * @param options The SMS registration options.\n * @returns A promise.\n */\n public registerSms(msisdn: string, options: SmsRegistrationOptions): Promise<void> {\n return this.plugin.perform('contact#registerSms', [msisdn, options]);\n }\n\n /**\n * Registers an email channel with the contact.\n * @param address The email address.\n * @param options The email registration options.\n * @returns A promise.\n */\n public registerEmail(address: string, options: EmailRegistrationOptions): Promise<void> {\n return this.plugin.perform('contact#registerEmail', [address, options]);\n }\n\n /**\n * Gets the named user Id.\n * @returns A promise with the result.\n */\n public getNamedUserId(): Promise<string | null | undefined> {\n return this.plugin.perform('contact#getNamedUserId');\n }\n\n /**\n * Gets the contacts subscription lists.\n * @returns A promise with the result.\n */\n public getSubscriptionLists(): Promise<Record<string, SubscriptionScope[]>> {\n return this.plugin.perform('contact#getSubscriptionLists');\n }\n\n /**\n * Edits tag groups.\n * @returns A tag group editor.\n */\n public editTagGroups(): TagGroupEditor {\n return new TagGroupEditor((operations: TagGroupOperation[]) => {\n return this.plugin.perform('contact#editTagGroups', operations);\n });\n }\n\n /**\n * Edits attributes.\n * @returns An attribute editor.\n */\n public editAttributes(): AttributeEditor {\n return new AttributeEditor((operations: AttributeOperation[]) => {\n return this.plugin.perform('contact#editAttributes', operations);\n });\n }\n\n /**\n * Edits subscription lists.\n * @returns A subscription list editor.\n */\n public editSubscriptionLists(): ScopedSubscriptionListEditor {\n return new ScopedSubscriptionListEditor(\n (operations: ScopedSubscriptionListOperation[]) => {\n return this.plugin.perform('contact#editSubscriptionLists', operations);\n },\n );\n }\n}\n"]}
@@ -935,3 +935,23 @@ export interface LiveUpdateStartRequest {
935
935
  */
936
936
  dismissTimestamp?: string;
937
937
  }
938
+ /**
939
+ * SMS Registration Options
940
+ */
941
+ export interface SmsRegistrationOptions {
942
+ /** The sender ID */
943
+ senderId: string;
944
+ }
945
+ /**
946
+ * Email Registration Options
947
+ */
948
+ export interface EmailRegistrationOptions {
949
+ /** Milliseconds since epoch when the user opted into transactional emails. */
950
+ transactionalOptedIn?: number;
951
+ /** Milliseconds since epoch when the user opted into commercial emails. */
952
+ commercialOptedIn?: number;
953
+ /** Optional custom properties. */
954
+ properties?: Record<string, string>;
955
+ /** If true, a double opt-in confirmation email is sent. Defaults to false. */
956
+ doubleOptIn?: boolean;
957
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"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","sourcesContent":["export type JsonValue =\n | string\n | number\n | boolean\n | null\n | JsonObject\n | JsonArray;\n\nexport type JsonObject = {\n [key: string]: JsonValue;\n};\n\nexport type JsonArray = JsonValue[];\n\nexport interface ChannelCreatedEvent {\n /**\n * The channel ID.\n */\n channelId: string;\n}\n\nexport interface PushTokenReceivedEvent {\n /**\n * The push token.\n */\n pushToken: string;\n}\n\n/**\n * Event fired when a push is received.\n */\nexport interface PushReceivedEvent {\n /**\n * The push payload.\n */\n pushPayload: PushPayload;\n\n /**\n * Indicates whether the push was received when the application was in the background or foreground.\n */\n isForeground: boolean;\n}\n\n/**\n * The push payload.\n */\nexport interface PushPayload {\n /**\n * The alert.\n */\n alert?: string;\n /**\n * The title.\n */\n title?: string;\n /**\n * The subtitle.\n */\n subtitle?: string;\n /**\n * The notification ID.\n */\n notificationId?: string;\n /**\n * The notification extras.\n */\n extras: JsonObject;\n}\n\n/**\n * Event fired when the user initiates a notification response.\n */\nexport interface NotificationResponseEvent {\n /**\n * The push notification.\n */\n pushPayload: PushPayload;\n\n /**\n * The action button ID, if available.\n */\n actionId?: string;\n\n /**\n * Indicates whether the response was a foreground action.\n * This value is always if the user taps the main notification,\n * otherwise it is defined by the notification action button.\n */\n isForeground: boolean;\n}\n\n/**\n * Push notification status.\n */\nexport interface PushNotificationStatus {\n /**\n * If user notifications are enabled on [Airship.push].\n */\n isUserNotificationsEnabled: boolean;\n\n /**\n * If notifications are allowed at the system level for the application.\n */\n areNotificationsAllowed: boolean;\n\n /**\n * If the push feature is enabled on [Airship.privacyManager].\n */\n isPushPrivacyFeatureEnabled: boolean;\n\n /*\n * If push registration was able to generate a token.\n */\n isPushTokenRegistered: boolean;\n\n /*\n * If Airship is able to send and display a push notification.\n */\n isOptedIn: boolean;\n\n /*\n * Checks for isUserNotificationsEnabled, areNotificationsAllowed, and isPushPrivacyFeatureEnabled. If this flag\n * is true but `isOptedIn` is false, that means push token was not able to be registered.\n */\n isUserOptedIn: boolean;\n\n /**\n * The notification permission status.\n */\n notificationPermissionStatus: PermissionStatus;\n}\n\n/**\n * Enum of permission status.\n */\nexport enum PermissionStatus {\n /**\n * Permission is granted.\n */\n Granted = 'granted',\n\n /**\n * Permission is denied.\n */\n Denied = 'denied',\n\n /**\n * Permission has not yet been requested.\n */\n NotDetermined = 'not_determined',\n}\n\n/**\n * Fallback when prompting for permission and the permission is\n * already denied on iOS or is denied silently on Android.\n */\nexport enum PromptPermissionFallback {\n /**\n * Take the user to the system settings to enable the permission.\n */\n SystemSettings = \"systemSettings\"\n}\n\n/**\n * Event fired when the notification status changes.\n */\nexport interface PushNotificationStatusChangedEvent {\n /**\n * The push notification status.\n */\n status: PushNotificationStatus;\n}\n\n/**\n * Event fired when the Message Center is updated.\n */\nexport interface MessageCenterUpdatedEvent {\n /**\n * The unread message count.\n */\n messageUnreadCount: number;\n /**\n * The total message count.\n */\n messageCount: number;\n}\n\n/**\n * Event fired when the Message Center is requested to be displayed.\n */\nexport interface DisplayMessageCenterEvent {\n /**\n * The message ID, if available.\n */\n messageId?: string;\n}\n\n/**\n * Event fired when a deep link is opened.\n */\nexport interface DeepLinkEvent {\n /**\n * The deep link string.\n */\n deepLink: string;\n}\n\n/**\n * Event fired when a preference center is requested to be displayed.\n */\nexport interface DisplayPreferenceCenterEvent {\n /**\n * The preference center Id.\n */\n preferenceCenterId: string;\n}\n\n/**\n * Event fired whenever any of the Live Activities update, create, or end.\n */\nexport interface LiveActivitiesUpdatedEvent {\n /**\n * The Live Activities.\n */\n activities: LiveActivity[];\n}\n\n\n/**\n * Custom event\n */\nexport interface CustomEvent {\n /**\n * Event name\n */\n eventName: string;\n /**\n * Event value\n */\n eventValue?: number;\n /**\n * Event properties\n */\n properties: JsonObject;\n /**\n * Transaction ID\n */\n transactionId?: string;\n /**\n * Interaction ID\n */\n interactionId?: string;\n /**\n * Interaction type\n */\n interactionType?: string;\n}\n\n/**\n * iOS options\n */\nexport namespace iOS {\n /**\n * Quiet time\n */\n export interface QuietTime {\n /**\n * Start hour. Must be 0-23.\n */\n startHour: number;\n\n /**\n * Start minute. Must be 0-59.\n */\n startMinute: number;\n\n /**\n * End hour. Must be 0-23.\n */\n endHour: number;\n\n /**\n * End minute. Must be 0-59.\n */\n endMinute: number;\n }\n\n /**\n * Enum of notification options. iOS only.\n */\n export enum NotificationOption {\n /**\n * Alerts.\n */\n Alert = 'alert',\n /**\n * Sounds.\n */\n Sound = 'sound',\n /**\n * Badges.\n */\n Badge = 'badge',\n /**\n * Car play.\n */\n CarPlay = 'car_play',\n /**\n * Critical Alert.\n */\n CriticalAlert = 'critical_alert',\n /**\n * Provides app notification settings.\n */\n ProvidesAppNotificationSettings = 'provides_app_notification_settings',\n /**\n * Provisional.\n */\n Provisional = 'provisional',\n }\n\n /**\n * Enum of foreground notification options.\n */\n export enum ForegroundPresentationOption {\n /**\n * Play the sound associated with the notification.\n */\n Sound = 'sound',\n /**\n * Apply the notification's badge value to the app’s icon.\n */\n Badge = 'badge',\n\n /**\n * Show the notification in Notification Center. On iOS 13 an older,\n * this will also show the notification as a banner.\n */\n List = 'list',\n\n /**\n * Present the notification as a banner. On iOS 13 an older,\n * this will also show the notification in the Notification Center.\n */\n Banner = 'banner',\n }\n\n /**\n * Enum of authorized notification options.\n */\n export enum AuthorizedNotificationSetting {\n /**\n * Alerts.\n */\n Alert = 'alert',\n /**\n * Sounds.\n */\n Sound = 'sound',\n /**\n * Badges.\n */\n Badge = 'badge',\n /**\n * CarPlay.\n */\n CarPlay = 'car_play',\n /**\n * Lock screen.\n */\n LockScreen = 'lock_screen',\n /**\n * Notification center.\n */\n NotificationCenter = 'notification_center',\n /**\n * Critical alert.\n */\n CriticalAlert = 'critical_alert',\n /**\n * Announcement.\n */\n Announcement = 'announcement',\n /**\n * Scheduled delivery.\n */\n ScheduledDelivery = 'scheduled_delivery',\n /**\n * Time sensitive.\n */\n TimeSensitive = 'time_sensitive',\n }\n\n /**\n * Enum of authorized status.\n */\n export enum AuthorizedNotificationStatus {\n /**\n * Not determined.\n */\n NotDetermined = 'not_determined',\n\n /**\n * Denied.\n */\n Denied = 'denied',\n\n /**\n * Authorized.\n */\n Authorized = 'authorized',\n\n /**\n * Provisional.\n */\n Provisional = 'provisional',\n\n /**\n * Ephemeral.\n */\n Ephemeral = 'ephemeral',\n }\n\n export interface AuthorizedNotificationSettingsChangedEvent {\n /**\n * Authorized settings.\n */\n authorizedSettings: AuthorizedNotificationSetting[];\n }\n}\n\nexport namespace Android {\n /**\n * Android notification config.\n */\n export interface NotificationConfig {\n /**\n * The icon resource name.\n */\n icon?: string;\n /**\n * The large icon resource name.\n */\n largeIcon?: string;\n /**\n * The default android notification channel ID.\n */\n defaultChannelId?: string;\n /**\n * The accent color. Must be a hex value #AARRGGBB.\n */\n accentColor?: string;\n }\n}\n\n/**\n * Airship config environment\n */\nexport interface ConfigEnvironment {\n /**\n * App key.\n */\n appKey: string;\n\n /**\n * App secret.\n */\n appSecret: string;\n\n /**\n * Optional log level.\n */\n logLevel?: LogLevel;\n\n /**\n * Optional iOS config\n */\n ios?: {\n /**\n * Log privacy level. By default it logs at `private`, not logging anything lower than info to the console\n * and redacting logs with string interpolation. `public` will log all configured log levels to the console\n * without redacting any of the log lines.\n */\n logPrivacyLevel?: 'private' | 'public';\n };\n}\n\n/**\n * Possible sites.\n */\nexport type Site = 'us' | 'eu';\n\n/**\n * Log levels.\n */\nexport type LogLevel =\n | 'verbose'\n | 'debug'\n | 'info'\n | 'warning'\n | 'error'\n | 'none';\n\n/**\n * Airship config\n */\nexport interface AirshipConfig {\n /**\n * Default environment.\n */\n default?: ConfigEnvironment;\n\n /**\n * Development environment. Overrides default environment if inProduction is false.\n */\n development?: ConfigEnvironment;\n\n /**\n * Production environment. Overrides default environment if inProduction is true.\n */\n production?: ConfigEnvironment;\n\n /**\n * Cloud site.\n */\n site?: Site;\n\n /**\n * Switches the environment from development or production. If the value is not\n * set, Airship will determine the value at runtime.\n */\n inProduction?: boolean;\n\n /**\n * URL allow list.\n */\n urlAllowList?: string[];\n\n /**\n * URL allow list for open URL scope.\n */\n urlAllowListScopeOpenUrl?: string[];\n\n /**\n * URL allow list for JS bridge injection.\n */\n urlAllowListScopeJavaScriptInterface?: string[];\n\n /**\n * Enables delayed channel creation.\n * Deprecated. Use the Private Manager to disable all features instead.\n */\n isChannelCreationDelayEnabled?: boolean;\n\n /**\n * Initial config URL for custom Airship domains. The URL\n * should also be added to the urlAllowList.\n */\n initialConfigUrl?: string;\n\n /**\n * Enabled features. Defaults to all.\n */\n enabledFeatures?: Feature[];\n\n /**\n * Enables channel capture feature.\n * This config is enabled by default.\n */\n isChannelCaptureEnabled?: boolean;\n\n /**\n * Whether to suppress console error messages about missing allow list entries during takeOff.\n * This config is disabled by default.\n */\n suppressAllowListError?: boolean;\n\n /**\n * Pauses In-App Automation on launch.\n */\n autoPauseInAppAutomationOnLaunch?: boolean;\n\n /**\n * iOS config.\n */\n ios?: {\n /**\n * itunesId for rate app and app store deep links.\n */\n itunesId?: string;\n };\n\n /**\n * Android config.\n */\n android?: {\n /**\n * App store URI\n */\n appStoreUri?: string;\n\n /**\n * Fcm app name if using multiple FCM projects.\n */\n fcmFirebaseAppName?: string;\n\n /**\n * Notification config.\n */\n notificationConfig?: Android.NotificationConfig;\n\n /**\n * Log privacy level. By default it logs at `private`, not logging anything lower than info to the console\n * and redacting logs with string interpolation. `public` will log all configured log levels to the console\n * without redacting any of the log lines.\n */\n logPrivacyLevel?: 'private' | 'public';\n };\n}\n\n/**\n * Enum of authorized Features.\n */\nexport enum Feature {\n InAppAutomation = 'in_app_automation',\n MessageCenter = 'message_center',\n Push = 'push',\n // No longer used\n Chat = 'chat',\n Analytics = 'analytics',\n TagsAndAttributes = 'tags_and_attributes',\n FeatureFlags = 'feature_flags',\n Contacts = 'contacts',\n // No longer used\n Location = 'location',\n}\n\n/**\n * All available features.\n */\nexport const FEATURES_ALL = Object.values(Feature);\n\n/**\n * Subscription Scope types.\n */\nexport enum SubscriptionScope {\n App = 'app',\n Web = 'web',\n Sms = 'sms',\n Email = 'email',\n}\n\nexport interface InboxMessage {\n /**\n * The message ID. Needed to display, mark as read, or delete the message.\n */\n id: string;\n /**\n * The message title.\n */\n title: string;\n /**\n * The message sent date in milliseconds.\n */\n sentDate: number;\n /**\n * Optional - The message expiration date in milliseconds.\n */\n expirationDate?: number;\n /**\n * Optional - The icon url for the message.\n */\n listIconUrl: string;\n /**\n * The unread / read status of the message.\n */\n isRead: boolean;\n /**\n * String to String map of any message extras.\n */\n extras: Record<string, string>;\n}\n\n// ---\n// See: https://github.com/urbanairship/web-push-sdk/blob/master/src/remote-data/preference-center.ts\n// ---\n\n/**\n * A preference center definition.\n *\n * @typedef {object} PreferenceCenter\n * @property {string} id the ID of the preference center\n * @property {Array<PreferenceCenter.CommonSection>} sections a list of sections\n * @property {?CommonDisplay} display display information\n */\nexport type PreferenceCenter = {\n id: string;\n sections: Section[];\n display?: CommonDisplay;\n};\n\n/**\n * Preference center display information.\n * @typedef {object} CommonDisplay\n * @property {string} name\n * @property {?string} description\n */\nexport type CommonDisplay = {\n name: string;\n description?: string;\n};\n\nexport type Icon = {\n icon: string;\n};\n\nexport type IconDisplay = CommonDisplay & Partial<Icon>;\n\nexport interface ItemBase {\n type: unknown;\n id: string;\n display: CommonDisplay;\n conditions?: Condition[];\n}\n\n/**\n * A channel subscription item.\n * @typedef {object} ChannelSubscriptionItem\n * @memberof PreferenceCenter\n * @property {\"channel_subscription\"} type\n * @property {string} id the item identifier\n * @property {?CommonDisplay} display display information\n * @property {string} subscription_id the subscription list id\n */\nexport interface ChannelSubscriptionItem extends ItemBase {\n type: 'channel_subscription';\n subscription_id: string;\n}\n\nexport interface ContactSubscriptionGroupItem extends ItemBase {\n type: 'contact_subscription_group';\n id: string;\n subscription_id: string;\n components: ContactSubscriptionGroupItemComponent[];\n}\n\nexport interface ContactSubscriptionGroupItemComponent {\n scopes: SubscriptionScope[];\n display: Omit<CommonDisplay, 'description'>;\n}\n\nexport interface ContactSubscriptionItem extends ItemBase {\n type: 'contact_subscription';\n scopes: SubscriptionScope[];\n subscription_id: string;\n}\n\nexport interface AlertItem extends ItemBase {\n type: 'alert';\n display: IconDisplay;\n button?: Button;\n}\n\nexport interface ConditionBase {\n type: unknown;\n}\n\nexport interface NotificationOptInCondition extends ConditionBase {\n type: 'notification_opt_in';\n when_status: 'opt_in' | 'opt_out';\n}\n\nexport type Condition = NotificationOptInCondition;\n\n// Changed from `unknown` in spec\nexport type Actions = {\n [key: string]: JsonValue;\n};\n\nexport interface Button {\n text: string;\n content_description?: string;\n actions: Actions;\n}\n\nexport interface SectionBase {\n type: unknown;\n id: string;\n display?: CommonDisplay;\n items: Item[];\n}\n\n/**\n * @typedef {object} CommonSection\n * @memberof PreferenceCenter\n * @property {\"section\"} type\n * @property {string} id the section identifier\n * @property {?CommonDisplay} display display information\n * @property {Array<PreferenceCenter.ChannelSubscriptionItem>} items list of\n * section items\n */\nexport interface CommonSection extends SectionBase {\n type: 'section';\n}\n\nexport interface LabeledSectionBreak extends SectionBase {\n type: 'labeled_section_break';\n items: never;\n}\n\nexport type Item =\n | ChannelSubscriptionItem\n | ContactSubscriptionGroupItem\n | ContactSubscriptionItem\n | AlertItem;\n\nexport type Section = CommonSection | LabeledSectionBreak;\n\n/**\n * An interface representing the eligibility status of a flag, and optional\n * variables associated with the flag.\n */\nexport interface FeatureFlag {\n /**\n * A boolean representing flag eligibility; will be `true` if the current\n * contact is eligible for the flag.\n */\n readonly isEligible: boolean;\n /**\n * A variables associated with the flag, if any. Will be `null` if no data\n * is associated with the flag, or if the flag does not exist.\n */\n readonly variables: unknown | null;\n /**\n * A boolean representing if the flag exists or not. For ease of use and\n * deployment, asking for a flag by any name will return a `FeatureFlag`\n * interface, even if the flag was not found to exist. However this property\n * may be checked to determine if the flag was actually resolved to a known\n * flag name.\n */\n readonly exists: boolean;\n\n /**\n * Reporting Metadata, the shape of which is private and not to be relied\n * upon. When not provided, an interaction cannot be tracked on the flag.\n * @ignore\n */\n readonly _internal: unknown;\n}\n\n\n/**\n * Live Activity info.\n */\nexport interface LiveActivity {\n /**\n * The activity ID.\n */\n id: string;\n /**\n * The attribute types.\n */\n attributeTypes: string;\n /**\n * The content.\n */\n content: LiveActivityContent;\n /**\n * The attributes.\n */\n attributes: JsonObject;\n}\n\n/**\n * Live Activity content.\n */\nexport interface LiveActivityContent {\n /**\n * The content state.\n */\n state: JsonObject;\n /**\n * Optional ISO 8601 date string that defines when the Live Activity will be stale.\n */\n staleDate?: string;\n /**\n * The relevance score.\n */\n relevanceScore: number;\n}\n\n/**\n * Base Live Activity request.\n */\nexport interface LiveActivityRequest {\n /**\n * Attributes types. This should match the Activity type of your Live Activity.\n */\n attributesType: string;\n}\n\n/**\n * Live Activity list request.\n */\nexport interface LiveActivityListRequest extends LiveActivityRequest {}\n\n/**\n * Live Activity start request.\n */\nexport interface LiveActivityStartRequest extends LiveActivityRequest {\n /**\n * Dynamic content.\n */\n content: LiveActivityContent;\n /**\n * Fixed attributes.\n */\n attributes: JsonObject;\n}\n\n/**\n * Live Activity update request.\n */\nexport interface LiveActivityUpdateRequest extends LiveActivityRequest {\n /**\n * The Live Activity ID to update.\n */\n activityId: string;\n /**\n * Dynamic content.\n */\n content: LiveActivityContent;\n}\n\n/**\n * Live Activity end request.\n */\nexport interface LiveActivityEndRequest extends LiveActivityRequest {\n /**\n * The Live Activity ID to update.\n */\n activityId: string;\n /**\n * Dynamic content.\n */\n content?: LiveActivityContent;\n\n /**\n * Dismissal policy. Defaults to `LiveActivityDismissalPolicyDefault`.\n */\n dismissalPolicy?: LiveActivityDismissalPolicy;\n}\n\nexport type LiveActivityDismissalPolicy =\n | LiveActivityDismissalPolicyImmediate\n | LiveActivityDismissalPolicyDefault\n | LiveActivityDismissalPolicyAfterDate;\n\n/**\n * Dismissal policy to immediately dismiss the Live Activity on end.\n */\nexport interface LiveActivityDismissalPolicyImmediate {\n type: 'immediate';\n}\n\n/**\n * Dismissal policy to dismiss the Live Activity after the expiration.\n */\nexport interface LiveActivityDismissalPolicyDefault {\n type: 'default';\n}\n\n/**\n * Dismissal policy to dismiss the Live Activity after a given date.\n */\nexport interface LiveActivityDismissalPolicyAfterDate {\n type: 'after';\n // ISO 8601 date string.\n date: string;\n}\n\n/**\n * Live Update info.\n */\nexport interface LiveUpdate {\n /**\n * The Live Update name.\n */\n name: string;\n\n /**\n * The Live Update type.\n */\n type: string;\n\n /**\n * Dynamic content.\n */\n content: JsonObject;\n\n /**\n * ISO 8601 date string of the last content update.\n */\n lastContentUpdateTimestamp: string;\n\n /**\n * ISO 8601 date string of the last state update.\n */\n lastStateChangeTimestamp: string;\n\n /**\n * Optional ISO 8601 date string that defines when to end this Live Update.\n */\n dismissTimestamp?: string;\n}\n\n\n/**\n * Live Update list request.\n */\nexport interface LiveUpdateListRequest {\n type: string;\n}\n\n/**\n * Live Update update request.\n */\nexport interface LiveUpdateUpdateRequest {\n /**\n * The Live Update name.\n */\n name: string;\n /**\n * Dynamic content.\n */\n content: JsonObject;\n\n /**\n * Optional ISO 8601 date string, used to filter out of order updates/\n */\n timestamp?: string;\n\n /**\n * Optional ISO 8601 date string that defines when to end this Live Update.\n */\n dismissTimestamp?: string;\n}\n\n/**\n * Live Update end request.\n */\nexport interface LiveUpdateEndRequest {\n /**\n * The Live Update name.\n */\n name: string;\n\n /**\n * Dynamic content.\n */\n content?: JsonObject;\n\n /**\n * Optional ISO 8601 date string, used to filter out of order updates/\n */\n timestamp?: string;\n\n /**\n * Optional ISO 8601 date string that defines when to end this Live Update.\n */\n dismissTimestamp?: string;\n}\n\n/**\n * Live Update start request.\n */\nexport interface LiveUpdateStartRequest {\n /**\n * The Live Update name.\n */\n name: string;\n\n /**\n * The Live Update type.\n */\n type: string;\n\n /**\n * Dynamic content.\n */\n content: JsonObject;\n\n /**\n * Optional ISO 8601 date string, used to filter out of order updates/\n */\n timestamp?: string;\n\n /**\n * Optional ISO 8601 date string that defines when to end this Live Update.\n */\n dismissTimestamp?: string;\n}"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"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","sourcesContent":["export type JsonValue =\n | string\n | number\n | boolean\n | null\n | JsonObject\n | JsonArray;\n\nexport type JsonObject = {\n [key: string]: JsonValue;\n};\n\nexport type JsonArray = JsonValue[];\n\nexport interface ChannelCreatedEvent {\n /**\n * The channel ID.\n */\n channelId: string;\n}\n\nexport interface PushTokenReceivedEvent {\n /**\n * The push token.\n */\n pushToken: string;\n}\n\n/**\n * Event fired when a push is received.\n */\nexport interface PushReceivedEvent {\n /**\n * The push payload.\n */\n pushPayload: PushPayload;\n\n /**\n * Indicates whether the push was received when the application was in the background or foreground.\n */\n isForeground: boolean;\n}\n\n/**\n * The push payload.\n */\nexport interface PushPayload {\n /**\n * The alert.\n */\n alert?: string;\n /**\n * The title.\n */\n title?: string;\n /**\n * The subtitle.\n */\n subtitle?: string;\n /**\n * The notification ID.\n */\n notificationId?: string;\n /**\n * The notification extras.\n */\n extras: JsonObject;\n}\n\n/**\n * Event fired when the user initiates a notification response.\n */\nexport interface NotificationResponseEvent {\n /**\n * The push notification.\n */\n pushPayload: PushPayload;\n\n /**\n * The action button ID, if available.\n */\n actionId?: string;\n\n /**\n * Indicates whether the response was a foreground action.\n * This value is always if the user taps the main notification,\n * otherwise it is defined by the notification action button.\n */\n isForeground: boolean;\n}\n\n/**\n * Push notification status.\n */\nexport interface PushNotificationStatus {\n /**\n * If user notifications are enabled on [Airship.push].\n */\n isUserNotificationsEnabled: boolean;\n\n /**\n * If notifications are allowed at the system level for the application.\n */\n areNotificationsAllowed: boolean;\n\n /**\n * If the push feature is enabled on [Airship.privacyManager].\n */\n isPushPrivacyFeatureEnabled: boolean;\n\n /*\n * If push registration was able to generate a token.\n */\n isPushTokenRegistered: boolean;\n\n /*\n * If Airship is able to send and display a push notification.\n */\n isOptedIn: boolean;\n\n /*\n * Checks for isUserNotificationsEnabled, areNotificationsAllowed, and isPushPrivacyFeatureEnabled. If this flag\n * is true but `isOptedIn` is false, that means push token was not able to be registered.\n */\n isUserOptedIn: boolean;\n\n /**\n * The notification permission status.\n */\n notificationPermissionStatus: PermissionStatus;\n}\n\n/**\n * Enum of permission status.\n */\nexport enum PermissionStatus {\n /**\n * Permission is granted.\n */\n Granted = 'granted',\n\n /**\n * Permission is denied.\n */\n Denied = 'denied',\n\n /**\n * Permission has not yet been requested.\n */\n NotDetermined = 'not_determined',\n}\n\n/**\n * Fallback when prompting for permission and the permission is\n * already denied on iOS or is denied silently on Android.\n */\nexport enum PromptPermissionFallback {\n /**\n * Take the user to the system settings to enable the permission.\n */\n SystemSettings = \"systemSettings\"\n}\n\n/**\n * Event fired when the notification status changes.\n */\nexport interface PushNotificationStatusChangedEvent {\n /**\n * The push notification status.\n */\n status: PushNotificationStatus;\n}\n\n/**\n * Event fired when the Message Center is updated.\n */\nexport interface MessageCenterUpdatedEvent {\n /**\n * The unread message count.\n */\n messageUnreadCount: number;\n /**\n * The total message count.\n */\n messageCount: number;\n}\n\n/**\n * Event fired when the Message Center is requested to be displayed.\n */\nexport interface DisplayMessageCenterEvent {\n /**\n * The message ID, if available.\n */\n messageId?: string;\n}\n\n/**\n * Event fired when a deep link is opened.\n */\nexport interface DeepLinkEvent {\n /**\n * The deep link string.\n */\n deepLink: string;\n}\n\n/**\n * Event fired when a preference center is requested to be displayed.\n */\nexport interface DisplayPreferenceCenterEvent {\n /**\n * The preference center Id.\n */\n preferenceCenterId: string;\n}\n\n/**\n * Event fired whenever any of the Live Activities update, create, or end.\n */\nexport interface LiveActivitiesUpdatedEvent {\n /**\n * The Live Activities.\n */\n activities: LiveActivity[];\n}\n\n\n/**\n * Custom event\n */\nexport interface CustomEvent {\n /**\n * Event name\n */\n eventName: string;\n /**\n * Event value\n */\n eventValue?: number;\n /**\n * Event properties\n */\n properties: JsonObject;\n /**\n * Transaction ID\n */\n transactionId?: string;\n /**\n * Interaction ID\n */\n interactionId?: string;\n /**\n * Interaction type\n */\n interactionType?: string;\n}\n\n/**\n * iOS options\n */\nexport namespace iOS {\n /**\n * Quiet time\n */\n export interface QuietTime {\n /**\n * Start hour. Must be 0-23.\n */\n startHour: number;\n\n /**\n * Start minute. Must be 0-59.\n */\n startMinute: number;\n\n /**\n * End hour. Must be 0-23.\n */\n endHour: number;\n\n /**\n * End minute. Must be 0-59.\n */\n endMinute: number;\n }\n\n /**\n * Enum of notification options. iOS only.\n */\n export enum NotificationOption {\n /**\n * Alerts.\n */\n Alert = 'alert',\n /**\n * Sounds.\n */\n Sound = 'sound',\n /**\n * Badges.\n */\n Badge = 'badge',\n /**\n * Car play.\n */\n CarPlay = 'car_play',\n /**\n * Critical Alert.\n */\n CriticalAlert = 'critical_alert',\n /**\n * Provides app notification settings.\n */\n ProvidesAppNotificationSettings = 'provides_app_notification_settings',\n /**\n * Provisional.\n */\n Provisional = 'provisional',\n }\n\n /**\n * Enum of foreground notification options.\n */\n export enum ForegroundPresentationOption {\n /**\n * Play the sound associated with the notification.\n */\n Sound = 'sound',\n /**\n * Apply the notification's badge value to the app’s icon.\n */\n Badge = 'badge',\n\n /**\n * Show the notification in Notification Center. On iOS 13 an older,\n * this will also show the notification as a banner.\n */\n List = 'list',\n\n /**\n * Present the notification as a banner. On iOS 13 an older,\n * this will also show the notification in the Notification Center.\n */\n Banner = 'banner',\n }\n\n /**\n * Enum of authorized notification options.\n */\n export enum AuthorizedNotificationSetting {\n /**\n * Alerts.\n */\n Alert = 'alert',\n /**\n * Sounds.\n */\n Sound = 'sound',\n /**\n * Badges.\n */\n Badge = 'badge',\n /**\n * CarPlay.\n */\n CarPlay = 'car_play',\n /**\n * Lock screen.\n */\n LockScreen = 'lock_screen',\n /**\n * Notification center.\n */\n NotificationCenter = 'notification_center',\n /**\n * Critical alert.\n */\n CriticalAlert = 'critical_alert',\n /**\n * Announcement.\n */\n Announcement = 'announcement',\n /**\n * Scheduled delivery.\n */\n ScheduledDelivery = 'scheduled_delivery',\n /**\n * Time sensitive.\n */\n TimeSensitive = 'time_sensitive',\n }\n\n /**\n * Enum of authorized status.\n */\n export enum AuthorizedNotificationStatus {\n /**\n * Not determined.\n */\n NotDetermined = 'not_determined',\n\n /**\n * Denied.\n */\n Denied = 'denied',\n\n /**\n * Authorized.\n */\n Authorized = 'authorized',\n\n /**\n * Provisional.\n */\n Provisional = 'provisional',\n\n /**\n * Ephemeral.\n */\n Ephemeral = 'ephemeral',\n }\n\n export interface AuthorizedNotificationSettingsChangedEvent {\n /**\n * Authorized settings.\n */\n authorizedSettings: AuthorizedNotificationSetting[];\n }\n}\n\nexport namespace Android {\n /**\n * Android notification config.\n */\n export interface NotificationConfig {\n /**\n * The icon resource name.\n */\n icon?: string;\n /**\n * The large icon resource name.\n */\n largeIcon?: string;\n /**\n * The default android notification channel ID.\n */\n defaultChannelId?: string;\n /**\n * The accent color. Must be a hex value #AARRGGBB.\n */\n accentColor?: string;\n }\n}\n\n/**\n * Airship config environment\n */\nexport interface ConfigEnvironment {\n /**\n * App key.\n */\n appKey: string;\n\n /**\n * App secret.\n */\n appSecret: string;\n\n /**\n * Optional log level.\n */\n logLevel?: LogLevel;\n\n /**\n * Optional iOS config\n */\n ios?: {\n /**\n * Log privacy level. By default it logs at `private`, not logging anything lower than info to the console\n * and redacting logs with string interpolation. `public` will log all configured log levels to the console\n * without redacting any of the log lines.\n */\n logPrivacyLevel?: 'private' | 'public';\n };\n}\n\n/**\n * Possible sites.\n */\nexport type Site = 'us' | 'eu';\n\n/**\n * Log levels.\n */\nexport type LogLevel =\n | 'verbose'\n | 'debug'\n | 'info'\n | 'warning'\n | 'error'\n | 'none';\n\n/**\n * Airship config\n */\nexport interface AirshipConfig {\n /**\n * Default environment.\n */\n default?: ConfigEnvironment;\n\n /**\n * Development environment. Overrides default environment if inProduction is false.\n */\n development?: ConfigEnvironment;\n\n /**\n * Production environment. Overrides default environment if inProduction is true.\n */\n production?: ConfigEnvironment;\n\n /**\n * Cloud site.\n */\n site?: Site;\n\n /**\n * Switches the environment from development or production. If the value is not\n * set, Airship will determine the value at runtime.\n */\n inProduction?: boolean;\n\n /**\n * URL allow list.\n */\n urlAllowList?: string[];\n\n /**\n * URL allow list for open URL scope.\n */\n urlAllowListScopeOpenUrl?: string[];\n\n /**\n * URL allow list for JS bridge injection.\n */\n urlAllowListScopeJavaScriptInterface?: string[];\n\n /**\n * Enables delayed channel creation.\n * Deprecated. Use the Private Manager to disable all features instead.\n */\n isChannelCreationDelayEnabled?: boolean;\n\n /**\n * Initial config URL for custom Airship domains. The URL\n * should also be added to the urlAllowList.\n */\n initialConfigUrl?: string;\n\n /**\n * Enabled features. Defaults to all.\n */\n enabledFeatures?: Feature[];\n\n /**\n * Enables channel capture feature.\n * This config is enabled by default.\n */\n isChannelCaptureEnabled?: boolean;\n\n /**\n * Whether to suppress console error messages about missing allow list entries during takeOff.\n * This config is disabled by default.\n */\n suppressAllowListError?: boolean;\n\n /**\n * Pauses In-App Automation on launch.\n */\n autoPauseInAppAutomationOnLaunch?: boolean;\n\n /**\n * iOS config.\n */\n ios?: {\n /**\n * itunesId for rate app and app store deep links.\n */\n itunesId?: string;\n };\n\n /**\n * Android config.\n */\n android?: {\n /**\n * App store URI\n */\n appStoreUri?: string;\n\n /**\n * Fcm app name if using multiple FCM projects.\n */\n fcmFirebaseAppName?: string;\n\n /**\n * Notification config.\n */\n notificationConfig?: Android.NotificationConfig;\n\n /**\n * Log privacy level. By default it logs at `private`, not logging anything lower than info to the console\n * and redacting logs with string interpolation. `public` will log all configured log levels to the console\n * without redacting any of the log lines.\n */\n logPrivacyLevel?: 'private' | 'public';\n };\n}\n\n/**\n * Enum of authorized Features.\n */\nexport enum Feature {\n InAppAutomation = 'in_app_automation',\n MessageCenter = 'message_center',\n Push = 'push',\n // No longer used\n Chat = 'chat',\n Analytics = 'analytics',\n TagsAndAttributes = 'tags_and_attributes',\n FeatureFlags = 'feature_flags',\n Contacts = 'contacts',\n // No longer used\n Location = 'location',\n}\n\n/**\n * All available features.\n */\nexport const FEATURES_ALL = Object.values(Feature);\n\n/**\n * Subscription Scope types.\n */\nexport enum SubscriptionScope {\n App = 'app',\n Web = 'web',\n Sms = 'sms',\n Email = 'email',\n}\n\nexport interface InboxMessage {\n /**\n * The message ID. Needed to display, mark as read, or delete the message.\n */\n id: string;\n /**\n * The message title.\n */\n title: string;\n /**\n * The message sent date in milliseconds.\n */\n sentDate: number;\n /**\n * Optional - The message expiration date in milliseconds.\n */\n expirationDate?: number;\n /**\n * Optional - The icon url for the message.\n */\n listIconUrl: string;\n /**\n * The unread / read status of the message.\n */\n isRead: boolean;\n /**\n * String to String map of any message extras.\n */\n extras: Record<string, string>;\n}\n\n// ---\n// See: https://github.com/urbanairship/web-push-sdk/blob/master/src/remote-data/preference-center.ts\n// ---\n\n/**\n * A preference center definition.\n *\n * @typedef {object} PreferenceCenter\n * @property {string} id the ID of the preference center\n * @property {Array<PreferenceCenter.CommonSection>} sections a list of sections\n * @property {?CommonDisplay} display display information\n */\nexport type PreferenceCenter = {\n id: string;\n sections: Section[];\n display?: CommonDisplay;\n};\n\n/**\n * Preference center display information.\n * @typedef {object} CommonDisplay\n * @property {string} name\n * @property {?string} description\n */\nexport type CommonDisplay = {\n name: string;\n description?: string;\n};\n\nexport type Icon = {\n icon: string;\n};\n\nexport type IconDisplay = CommonDisplay & Partial<Icon>;\n\nexport interface ItemBase {\n type: unknown;\n id: string;\n display: CommonDisplay;\n conditions?: Condition[];\n}\n\n/**\n * A channel subscription item.\n * @typedef {object} ChannelSubscriptionItem\n * @memberof PreferenceCenter\n * @property {\"channel_subscription\"} type\n * @property {string} id the item identifier\n * @property {?CommonDisplay} display display information\n * @property {string} subscription_id the subscription list id\n */\nexport interface ChannelSubscriptionItem extends ItemBase {\n type: 'channel_subscription';\n subscription_id: string;\n}\n\nexport interface ContactSubscriptionGroupItem extends ItemBase {\n type: 'contact_subscription_group';\n id: string;\n subscription_id: string;\n components: ContactSubscriptionGroupItemComponent[];\n}\n\nexport interface ContactSubscriptionGroupItemComponent {\n scopes: SubscriptionScope[];\n display: Omit<CommonDisplay, 'description'>;\n}\n\nexport interface ContactSubscriptionItem extends ItemBase {\n type: 'contact_subscription';\n scopes: SubscriptionScope[];\n subscription_id: string;\n}\n\nexport interface AlertItem extends ItemBase {\n type: 'alert';\n display: IconDisplay;\n button?: Button;\n}\n\nexport interface ConditionBase {\n type: unknown;\n}\n\nexport interface NotificationOptInCondition extends ConditionBase {\n type: 'notification_opt_in';\n when_status: 'opt_in' | 'opt_out';\n}\n\nexport type Condition = NotificationOptInCondition;\n\n// Changed from `unknown` in spec\nexport type Actions = {\n [key: string]: JsonValue;\n};\n\nexport interface Button {\n text: string;\n content_description?: string;\n actions: Actions;\n}\n\nexport interface SectionBase {\n type: unknown;\n id: string;\n display?: CommonDisplay;\n items: Item[];\n}\n\n/**\n * @typedef {object} CommonSection\n * @memberof PreferenceCenter\n * @property {\"section\"} type\n * @property {string} id the section identifier\n * @property {?CommonDisplay} display display information\n * @property {Array<PreferenceCenter.ChannelSubscriptionItem>} items list of\n * section items\n */\nexport interface CommonSection extends SectionBase {\n type: 'section';\n}\n\nexport interface LabeledSectionBreak extends SectionBase {\n type: 'labeled_section_break';\n items: never;\n}\n\nexport type Item =\n | ChannelSubscriptionItem\n | ContactSubscriptionGroupItem\n | ContactSubscriptionItem\n | AlertItem;\n\nexport type Section = CommonSection | LabeledSectionBreak;\n\n/**\n * An interface representing the eligibility status of a flag, and optional\n * variables associated with the flag.\n */\nexport interface FeatureFlag {\n /**\n * A boolean representing flag eligibility; will be `true` if the current\n * contact is eligible for the flag.\n */\n readonly isEligible: boolean;\n /**\n * A variables associated with the flag, if any. Will be `null` if no data\n * is associated with the flag, or if the flag does not exist.\n */\n readonly variables: unknown | null;\n /**\n * A boolean representing if the flag exists or not. For ease of use and\n * deployment, asking for a flag by any name will return a `FeatureFlag`\n * interface, even if the flag was not found to exist. However this property\n * may be checked to determine if the flag was actually resolved to a known\n * flag name.\n */\n readonly exists: boolean;\n\n /**\n * Reporting Metadata, the shape of which is private and not to be relied\n * upon. When not provided, an interaction cannot be tracked on the flag.\n * @ignore\n */\n readonly _internal: unknown;\n}\n\n\n/**\n * Live Activity info.\n */\nexport interface LiveActivity {\n /**\n * The activity ID.\n */\n id: string;\n /**\n * The attribute types.\n */\n attributeTypes: string;\n /**\n * The content.\n */\n content: LiveActivityContent;\n /**\n * The attributes.\n */\n attributes: JsonObject;\n}\n\n/**\n * Live Activity content.\n */\nexport interface LiveActivityContent {\n /**\n * The content state.\n */\n state: JsonObject;\n /**\n * Optional ISO 8601 date string that defines when the Live Activity will be stale.\n */\n staleDate?: string;\n /**\n * The relevance score.\n */\n relevanceScore: number;\n}\n\n/**\n * Base Live Activity request.\n */\nexport interface LiveActivityRequest {\n /**\n * Attributes types. This should match the Activity type of your Live Activity.\n */\n attributesType: string;\n}\n\n/**\n * Live Activity list request.\n */\nexport interface LiveActivityListRequest extends LiveActivityRequest {}\n\n/**\n * Live Activity start request.\n */\nexport interface LiveActivityStartRequest extends LiveActivityRequest {\n /**\n * Dynamic content.\n */\n content: LiveActivityContent;\n /**\n * Fixed attributes.\n */\n attributes: JsonObject;\n}\n\n/**\n * Live Activity update request.\n */\nexport interface LiveActivityUpdateRequest extends LiveActivityRequest {\n /**\n * The Live Activity ID to update.\n */\n activityId: string;\n /**\n * Dynamic content.\n */\n content: LiveActivityContent;\n}\n\n/**\n * Live Activity end request.\n */\nexport interface LiveActivityEndRequest extends LiveActivityRequest {\n /**\n * The Live Activity ID to update.\n */\n activityId: string;\n /**\n * Dynamic content.\n */\n content?: LiveActivityContent;\n\n /**\n * Dismissal policy. Defaults to `LiveActivityDismissalPolicyDefault`.\n */\n dismissalPolicy?: LiveActivityDismissalPolicy;\n}\n\nexport type LiveActivityDismissalPolicy =\n | LiveActivityDismissalPolicyImmediate\n | LiveActivityDismissalPolicyDefault\n | LiveActivityDismissalPolicyAfterDate;\n\n/**\n * Dismissal policy to immediately dismiss the Live Activity on end.\n */\nexport interface LiveActivityDismissalPolicyImmediate {\n type: 'immediate';\n}\n\n/**\n * Dismissal policy to dismiss the Live Activity after the expiration.\n */\nexport interface LiveActivityDismissalPolicyDefault {\n type: 'default';\n}\n\n/**\n * Dismissal policy to dismiss the Live Activity after a given date.\n */\nexport interface LiveActivityDismissalPolicyAfterDate {\n type: 'after';\n // ISO 8601 date string.\n date: string;\n}\n\n/**\n * Live Update info.\n */\nexport interface LiveUpdate {\n /**\n * The Live Update name.\n */\n name: string;\n\n /**\n * The Live Update type.\n */\n type: string;\n\n /**\n * Dynamic content.\n */\n content: JsonObject;\n\n /**\n * ISO 8601 date string of the last content update.\n */\n lastContentUpdateTimestamp: string;\n\n /**\n * ISO 8601 date string of the last state update.\n */\n lastStateChangeTimestamp: string;\n\n /**\n * Optional ISO 8601 date string that defines when to end this Live Update.\n */\n dismissTimestamp?: string;\n}\n\n\n/**\n * Live Update list request.\n */\nexport interface LiveUpdateListRequest {\n type: string;\n}\n\n/**\n * Live Update update request.\n */\nexport interface LiveUpdateUpdateRequest {\n /**\n * The Live Update name.\n */\n name: string;\n /**\n * Dynamic content.\n */\n content: JsonObject;\n\n /**\n * Optional ISO 8601 date string, used to filter out of order updates/\n */\n timestamp?: string;\n\n /**\n * Optional ISO 8601 date string that defines when to end this Live Update.\n */\n dismissTimestamp?: string;\n}\n\n/**\n * Live Update end request.\n */\nexport interface LiveUpdateEndRequest {\n /**\n * The Live Update name.\n */\n name: string;\n\n /**\n * Dynamic content.\n */\n content?: JsonObject;\n\n /**\n * Optional ISO 8601 date string, used to filter out of order updates/\n */\n timestamp?: string;\n\n /**\n * Optional ISO 8601 date string that defines when to end this Live Update.\n */\n dismissTimestamp?: string;\n}\n\n/**\n * Live Update start request.\n */\nexport interface LiveUpdateStartRequest {\n /**\n * The Live Update name.\n */\n name: string;\n\n /**\n * The Live Update type.\n */\n type: string;\n\n /**\n * Dynamic content.\n */\n content: JsonObject;\n\n /**\n * Optional ISO 8601 date string, used to filter out of order updates/\n */\n timestamp?: string;\n\n /**\n * Optional ISO 8601 date string that defines when to end this Live Update.\n */\n dismissTimestamp?: string;\n}\n\n/**\n * SMS Registration Options\n */\nexport interface SmsRegistrationOptions {\n /** The sender ID */\n senderId: string;\n}\n\n/**\n * Email Registration Options\n */\nexport interface EmailRegistrationOptions {\n /** Milliseconds since epoch when the user opted into transactional emails. */\n transactionalOptedIn?: number;\n /** Milliseconds since epoch when the user opted into commercial emails. */\n commercialOptedIn?: number;\n /** Optional custom properties. */\n properties?: Record<string, string>;\n /** If true, a double opt-in confirmation email is sent. Defaults to false. */\n doubleOptIn?: boolean;\n}"]}
@@ -526,6 +526,24 @@ class AirshipContact {
526
526
  reset() {
527
527
  return this.plugin.perform('contact#reset');
528
528
  }
529
+ /**
530
+ * Registers an SMS channel with the contact.
531
+ * @param msisdn The phone number in E.164 format.
532
+ * @param options The SMS registration options.
533
+ * @returns A promise.
534
+ */
535
+ registerSms(msisdn, options) {
536
+ return this.plugin.perform('contact#registerSms', [msisdn, options]);
537
+ }
538
+ /**
539
+ * Registers an email channel with the contact.
540
+ * @param address The email address.
541
+ * @param options The email registration options.
542
+ * @returns A promise.
543
+ */
544
+ registerEmail(address, options) {
545
+ return this.plugin.perform('contact#registerEmail', [address, options]);
546
+ }
529
547
  /**
530
548
  * Gets the named user Id.
531
549
  * @returns A promise with the result.