Members
(constant) normalizeCss
normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
This has been prefixed with the class _ua-reset before all rules, and will
reset any contents of a container with that class. Used in IAX as well as in
plugins to normalize the CSS environment.
Methods
_emitEffectiveFeatureChange()
Emits a local change as the effective sets it produces, so a feature that is remotely disabled doesn't read as newly enabled or disabled when its local state changes.
_sameFeatures()
Order-insensitive set comparison. Compares as sets rather than by length so a duplicate on one side can't read as a match.
_transformNestedForm()
A nested form reports as the same shape a top-level form does -- type,
response_type, score_id for nps, and its own children -- keyed by its
own identifier among its parent's children, rather than having its fields
merged into the parent's. Mirrors iOS's
ThomasFormPayloadGenerator.makeValuePayload, which recurses the same way.
Note Thomas names the view-state type nps_form while the reported type is
nps, matching a top-level nps form result.
(async) applyRemoteConfig()
What the tab that stores a new config does: AppConfigManager persists it,
then config_update hands the new set to the controller.
createMockFeatureDb()
A key-aware, stateful KeyValueDb for the feature paths: reads are routed by
key and mutate writes through, so a test can assert what was persisted.
ConflictError from a mutator reports no change, matching the real db.
remotelyDisabled is the set in the stored app config, which is the
overlay; announcedRemotelyDisabled is the set last announced, which only
gates features_updated.
createNotificationPermissionDelegate(canRegister)
Only prompts. Registering for push once the permission is granted is left
to the display_notifications Airship enabler, so it also runs for a
customer's delegate.
Parameters:
| Name | Type | Description |
|---|---|---|
canRegister |
whether push registration can follow a grant |
(async) isEnabled() → {Promise.<boolean>}
Fetches the current analytics enablement value for this browser.
- Deprecated:
- features moved to the PrivacyManager
Returns:
- Type:
-
Promise.<boolean>
resolves to true if analytics are enabled,
else false
queryPermission(name)
Resolves not_supported when the Permissions API is unavailable or does
not recognize name.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
a permission name |
Returns:
a promise that resolves to the UaPermissionState for the requested permission
setEnabled()
Sets if analytics is should be enabled or disabled for the current browser.
Analytics are by default enabled, and may be disabled either by calling
this method or passing disableAnalytics: true in the SDK configuration.
- Deprecated:
- prefer using the PrivacyManager interface, which this method delegates to.
Example
await sdk.analytics.setEnabled(false) // disable analytics
await sdk.analytics.setEnabled(true) // enable analytics
Type Definitions
ChannelRegistrationResult
Result of a channel registration.
Properties:
| Name | Type | Description |
|---|---|---|
channelId |
string
|
The channel id |
Type:
-
object
ConflictEvent
An event representing known data about a contact, emit in the event of a conflict which the implementer must handle in their business logic.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
namedUserId |
string
|
<optional> |
The named user id, if one was set. |
attributes |
Array
|
Known attribute mutations. |
|
tags |
TagMutationsPayload
|
Known tag mutations. |
|
associatedChannels |
Array
|
Known associated channels. |
|
subscriptions |
Array
|
Known subscription list mutations. |
Type:
-
object
DisplayOptions
Common Display options for subscription forms
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
size |
FormSize
|
<optional> |
Form size; one of "small", "large" |
i18n |
Translations
|
<optional> |
Internationalization strings |
defaultTranslation |
string
|
<optional> |
Default translation which will be loaded if one is not available for the, customer's browser. |
Type:
-
object
EmailRegistrationReport
An email input's email_registration as the address was registered with it,
after the form's registration_overrides, in the scene's own field names.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
type |
'double_opt_in'
|
'commercial'
|
'transactional'
|
||
commercial_opted_in |
boolean
|
<optional> |
|
open_tracking_opted_in |
boolean
|
<optional> |
|
click_tracking_opted_in |
boolean
|
<optional> |
|
properties |
Record.<string, unknown>
|
<optional> |
Type:
-
object
FormOptionsBase
Common form options which are shared by all form types.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
platform |
Platform
|
The platform; one of "sms" or "email" |
|
onRegister |
RegistrationEventHandler
|
<optional> |
Event handler called when registration occurs. |
Type:
-
object
IaxInteractionSubject
Everything the interaction/display bridge needs to render a Scene and
report on it, without requiring a live IaxPreparedSchedule.
messageId also doubles as the MessageDisplayHistoryStorage key, and is
reported verbatim as message_id on every event this subject produces;
it must stay stable for a given message so display-history capping and
analytics/RTDS both stay correct.
Properties:
| Name | Type | Description |
|---|---|---|
definition |
BaseDefinition
|
|
triggerSessionId |
string
|
Type:
-
object
IaxReportingSubject
The reporting-relevant fields the bridge needs from an in-app message payload, independent of whether a schedule produced it.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
messageId |
string
|
||
reportingContext |
unknown
|
||
campaigns |
InAppCampaigns
|
<optional> |
|
productId |
string
|
<optional> |
Type:
-
object
IconDisplay
Preference center display information.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
name |
string
|
||
description |
string
|
<optional> |
|
icon |
string
|
<optional> |
the url of the icon |
Type:
-
object
InAppAutomationDetails
Details of an in-app automation message.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
id |
string
|
The schedule id |
|
name |
string
|
The name of the schedule |
|
messageType |
MessageType
|
<optional> |
The message type, when present. |
campaigns |
InAppCampaigns
|
<optional> |
The campaigns for the message, when present. |
extras |
Record.<string, unknown>
|
<optional> |
The extra keys for the message, when present. |
Type:
-
object
InAppCampaigns
Campaign category labels.
Properties:
| Name | Type | Description |
|---|---|---|
categories |
Array
|
The list of campaign categories. |
Type:
-
object
ModalEvents
Fired when the modal is opened
Properties:
| Name | Type | Description |
|---|---|---|
open |
CustomEvent
|
|
close |
CustomEvent
|
|
_interaction |
CustomEvent
|
Type:
-
object
PreferenceCenter
A preference center definition.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
id |
string
|
the ID of the preference center |
|
sections |
Array.<(PreferenceCenter.CommonSection|PreferenceCenter.LabeledSectionBreak)>
|
a list of sections |
|
display |
PreferenceCenter.CommonDisplay
|
<optional> |
display information |
options |
PreferenceCenter.Options
|
<optional> |
preference center options |
id |
string
|
||
sections |
Array
|
||
display |
CommonDisplay
|
<optional> |
|
options |
Options
|
<optional> |
Type:
-
object
PrivacyManagerFeature
Privacy Manager Features
Type:
-
'push'|'in_app_automation'|'tags_and_attributes'|'contacts'|'feature_flags'|'analytics'
RouterNavigationHandlerOptions
Options for createRouterNavigationHandler
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
navigate |
function
|
Navigates your client-side router to a path, e.g. React Router's,
|
|
basePath |
string
|
<optional> |
The path your router is mounted under, e.g. React Router's |
Type:
-
object
ScopedSubscriptionListIdentifier
Subscription list identifiers and the scopes for which they are subscribed.
Properties:
| Name | Type | Description |
|---|---|---|
{...} |
Array
|
Type:
-
object
SmsRegistrationReport
An SMS locale's registration as the number was registered with it.
Properties:
| Name | Type | Description |
|---|---|---|
type |
'opt_in'
|
|
sender_id |
string
|
Type:
-
object
SubscriptionPluginModalOptions
Options for instantiating a modal subscription form.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
automatic |
SubscriptionPluginModalTiming
|
<optional> |
|
dismissAfterSubmitDelay |
number
|
<optional> |
Type:
-
object
Translation
Form translation.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
terms |
string
|
Terms that the customer will agree to in registering for a particular, channel. May be HTML, and should include a link to terms and conditions. |
|
heading |
string
|
<optional> |
An optional heading that will be displayed at the top of the form. |
footer |
string
|
<optional> |
An optional footer that will be displayed at the bottom of the form. |
bannerUrl |
string
|
<optional> |
An optional URL to a banner image which will be displayed on the form. |
submitButton |
string
|
Text displayed on the submit button. If not provided a default is used. |
|
successHeading |
string
|
Text displayed after a successful registration; if not provided a default, is used. |
|
successMessage |
string
|
Additional instructional text, displayed as a paragraph after the success, heading. If not provided it will be omitted from the display rather than, replaced by a default. |
|
placeholderEmail |
string
|
Placeholder email address that will be displayed in the email form; if not, provided a default is used. |
|
placeholderMsisdn |
string
|
Placeholder MSISDN that will be displayed in the SMS form; if not provided, a default is used. |
|
invalidEmail |
string
|
An error message displayed when an invalid email is provided in the email, form; if not provided a default is used. |
|
invalidMsisdn |
string
|
An error message displayed when an invalid MSISDN is provided in the SMS, form; if not provided a default is used. |
|
genericError |
string
|
A generic error message displayed when registration fails for an unknown, reason; if not provided a default is used. |
Type:
-
object
Translations
Form translations, a key/value object of locale identifier (e.g. "en") to a {Translation}.
Properties:
| Name | Type | Description |
|---|---|---|
locale: |
Translation
|
string |
Type:
-
object