API Reference
clearMessages
Throws
validation:
InAppMessagingValidationErrorCode - Thrown if In App messaging hasn't been initialized.
Returns
Promise<void>
dispatchEvent
Parameters
Option | Required | Type | Description |
---|---|---|---|
input | true | The input object that holds the event to be dispatched. |
Throws
validation:
InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.service
exceptions - Thrown when the underlying Pinpoint service returns an error.
Returns
Promise<void>
identifyUser
userId
.Parameters
Option | Required | Type | Description |
---|---|---|---|
input | true | The input object that conforms to IdentifyUserInput used to construct requests sent to Pinpoint's UpdateEndpoint
API. |
Throws
service:
UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.validation:
InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.
Returns
Promise<void>
initializeInAppMessaging
Returns
void
notifyMessageInteraction
Parameters
Option | Required | Type | Description |
---|---|---|---|
input | true | The input object that holds the type and message. |
Throws
validation:
InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.
Returns
void
onMessageActionTaken
messageActionTaken
events.Parameters
Option | Required | Type | Description |
---|---|---|---|
input | true | The input object that holds the callback handler. |
Throws
validation:
InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.
onMessageDismissed
messageDismissed
events.Parameters
Option | Required | Type | Description |
---|---|---|---|
input | true | The input object that holds the callback handler. |
Throws
validation:
InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.
onMessageDisplayed
messageDisplayed
events.Parameters
Option | Required | Type | Description |
---|---|---|---|
input | true | The input object that holds the callback handler. |
Throws
validation:
InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.
onMessageReceived
messageReceived
events.Parameters
Option | Required | Type | Description |
---|---|---|---|
input | true | The input object that holds the callback handler. |
Throws
validation:
InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.
setConflictHandler
Parameters
Option | Required | Type | Description |
---|---|---|---|
input | true | The input object that holds the conflict handler to be used. |
Throws
validation:
InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.
Returns
void
syncMessages
Throws
service
exceptions - Thrown when the underlying Pinpoint service returns an error.validation:
InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.
Returns
Promise<void>