UNPKG

@ua/react-native-airship

Version:
378 lines (338 loc) 9.36 kB
"use strict"; /** * Event fired when a push is received. */ /** * Event fired whenever any of the Live Activities update, create, or end. */ /** * The push payload. */ /** * Event fired when the user initiates a notification response. */ /** * Push notification status. */ /** * Enum of permission status. */ export let PermissionStatus = /*#__PURE__*/function (PermissionStatus) { /** * Permission is granted. */ PermissionStatus["Granted"] = "granted"; /** * Permission is denied. */ PermissionStatus["Denied"] = "denied"; /** * Permission has not yet been requested. */ PermissionStatus["NotDetermined"] = "not_determined"; return PermissionStatus; }({}); /** * Fallback when prompting for permission and the permission is * already denied on iOS or is denied silently on Android. */ export let PromptPermissionFallback = /*#__PURE__*/function (PromptPermissionFallback) { /** * Take the user to the system settings to enable the permission. */ PromptPermissionFallback["SystemSettings"] = "systemSettings"; return PromptPermissionFallback; }({}); /** * Event fired when the notification status changes. */ /** * Event fired when the Message Center is updated. */ /** * Event fired when the Message Center is requested to be displayed. */ /** * Event fired when a deep link is opened. */ /** * Event fired when a preference center is requested to be displayed. */ export let EventType = /*#__PURE__*/function (EventType) { EventType["ChannelCreated"] = "com.airship.channel_created"; EventType["NotificationResponse"] = "com.airship.notification_response"; EventType["PushReceived"] = "com.airship.push_received"; EventType["DeepLink"] = "com.airship.deep_link"; EventType["MessageCenterUpdated"] = "com.airship.message_center_updated"; EventType["PushNotificationStatusChangedStatus"] = "com.airship.notification_status_changed"; EventType["DisplayMessageCenter"] = "com.airship.display_message_center"; EventType["DisplayPreferenceCenter"] = "com.airship.display_preference_center"; EventType["PushTokenReceived"] = "com.airship.push_token_received"; EventType["IOSAuthorizedNotificationSettingsChanged"] = "com.airship.authorized_notification_settings_changed"; EventType["IOSLiveActivitiesUpdated"] = "com.airship.live_activities_updated"; return EventType; }({}); /** * iOS options */ export let iOS; (function (_iOS) { let NotificationOption = /*#__PURE__*/function (NotificationOption) { /** * Alerts. */ NotificationOption["Alert"] = "alert"; /** * Sounds. */ NotificationOption["Sound"] = "sound"; /** * Badges. */ NotificationOption["Badge"] = "badge"; /** * Car play. */ NotificationOption["CarPlay"] = "car_play"; /** * Critical Alert. */ NotificationOption["CriticalAlert"] = "critical_alert"; /** * Provides app notification settings. */ NotificationOption["ProvidesAppNotificationSettings"] = "provides_app_notification_settings"; /** * Provisional. */ NotificationOption["Provisional"] = "provisional"; return NotificationOption; }({}); _iOS.NotificationOption = NotificationOption; let ForegroundPresentationOption = /*#__PURE__*/function (ForegroundPresentationOption) { /** * Play the sound associated with the notification. */ ForegroundPresentationOption["Sound"] = "sound"; /** * Apply the notification's badge value to the app’s icon. */ ForegroundPresentationOption["Badge"] = "badge"; /** * Show the notification in Notification Center. On iOS 13 an older, * this will also show the notification as a banner. */ ForegroundPresentationOption["List"] = "list"; /** * Present the notification as a banner. On iOS 13 an older, * this will also show the notification in the Notification Center. */ ForegroundPresentationOption["Banner"] = "banner"; return ForegroundPresentationOption; }({}); _iOS.ForegroundPresentationOption = ForegroundPresentationOption; let AuthorizedNotificationSetting = /*#__PURE__*/function (AuthorizedNotificationSetting) { /** * Alerts. */ AuthorizedNotificationSetting["Alert"] = "alert"; /** * Sounds. */ AuthorizedNotificationSetting["Sound"] = "sound"; /** * Badges. */ AuthorizedNotificationSetting["Badge"] = "badge"; /** * CarPlay. */ AuthorizedNotificationSetting["CarPlay"] = "car_play"; /** * Lock screen. */ AuthorizedNotificationSetting["LockScreen"] = "lock_screen"; /** * Notification center. */ AuthorizedNotificationSetting["NotificationCenter"] = "notification_center"; /** * Critical alert. */ AuthorizedNotificationSetting["CriticalAlert"] = "critical_alert"; /** * Announcement. */ AuthorizedNotificationSetting["Announcement"] = "announcement"; /** * Scheduled delivery. */ AuthorizedNotificationSetting["ScheduledDelivery"] = "scheduled_delivery"; /** * Time sensitive. */ AuthorizedNotificationSetting["TimeSensitive"] = "time_sensitive"; return AuthorizedNotificationSetting; }({}); _iOS.AuthorizedNotificationSetting = AuthorizedNotificationSetting; let AuthorizedNotificationStatus = /*#__PURE__*/function (AuthorizedNotificationStatus) { /** * Not determined. */ AuthorizedNotificationStatus["NotDetermined"] = "not_determined"; /** * Denied. */ AuthorizedNotificationStatus["Denied"] = "denied"; /** * Authorized. */ AuthorizedNotificationStatus["Authorized"] = "authorized"; /** * Provisional. */ AuthorizedNotificationStatus["Provisional"] = "provisional"; /** * Ephemeral. */ AuthorizedNotificationStatus["Ephemeral"] = "ephemeral"; return AuthorizedNotificationStatus; }({}); _iOS.AuthorizedNotificationStatus = AuthorizedNotificationStatus; })(iOS || (iOS = {})); /** * Airship config environment */ /** * Possible sites. */ /** * Log levels. */ /** * Airship config */ export let Android; /** * Enum of authorized Features. */ export let Feature = /*#__PURE__*/function (Feature) { Feature["InAppAutomation"] = "in_app_automation"; Feature["MessageCenter"] = "message_center"; Feature["Push"] = "push"; Feature["Analytics"] = "analytics"; Feature["TagsAndAttributes"] = "tags_and_attributes"; Feature["Contacts"] = "contacts"; Feature["FeatureFlags"] = "feature_flags"; Feature["Location"] = "location"; // No longer used. To be removed in version 20.0.0. Feature["Chat"] = "chat"; // No longer used. To be removed in version 20.0.0. return Feature; }({}); /** * All available features. */ export const FEATURES_ALL = Object.values(Feature).filter(feature => feature !== Feature.Location && feature !== Feature.Chat); /** * Subscription Scope types. */ export let SubscriptionScope = /*#__PURE__*/function (SubscriptionScope) { SubscriptionScope["App"] = "app"; SubscriptionScope["Web"] = "web"; SubscriptionScope["Sms"] = "sms"; SubscriptionScope["Email"] = "email"; return SubscriptionScope; }({}); /** * Custom event */ // --- // See: https://github.com/urbanairship/web-push-sdk/blob/master/src/remote-data/preference-center.ts // --- /** * A preference center definition. * * @typedef {object} PreferenceCenter * @property {string} id the ID of the preference center * @property {Array<PreferenceCenter.CommonSection>} sections a list of sections * @property {?CommonDisplay} display display information */ /** * Preference center display information. * @typedef {object} CommonDisplay * @property {string} name * @property {?string} description */ /** * A channel subscription item. * @typedef {object} ChannelSubscriptionItem * @property {"channel_subscription"} type * @property {string} id the item identifier * @property {?CommonDisplay} display display information * @property {string} subscription_id the subscription list id */ // Changed from `unknown` in spec /** * @typedef {object} CommonSection * @property {"section"} type * @property {string} id the section identifier * @property {?CommonDisplay} display display information * @property {Array<PreferenceCenter.ChannelSubscriptionItem>} items list of * section items */ /** * An interface representing the eligibility status of a flag, and optional * variables associated with the flag. */ /** * Live Activity info. */ /** * Live Activity content. */ /** * Base Live Activity request. */ /** * Live Activity list request. */ /** * Live Activity start request. */ /** * Live Activity update request. */ /** * Live Activity end request. */ /** * Dismissal policy to immediately dismiss the Live Activity on end. */ /** * Dismissal policy to dismiss the Live Activity after the expiration. */ /** * Dismissal policy to dismiss the Live Activity after a given date. */ /** * Live Update info. */ /** * Live Update list request. */ /** * Live Update update request. */ /** * Live Update end request. */ /** * Live Update start request. */ /** * SMS Registration Options */ /** * Email Registration Options */ //# sourceMappingURL=types.js.map