@aws-amplify/notifications 1.0.12 → 1.0.13-push-notification-dryrun.43
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/lib/InAppMessaging/InAppMessaging.d.ts +10 -8
- package/lib/InAppMessaging/InAppMessaging.js +9 -11
- package/lib/InAppMessaging/InAppMessaging.js.map +1 -1
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/index.d.ts +5 -25
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/index.js +37 -252
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/index.js.map +1 -1
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/types.d.ts +0 -9
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/types.js.map +1 -1
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/utils.js +3 -9
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/utils.js.map +1 -1
- package/lib/InAppMessaging/index.d.ts +1 -3
- package/lib/InAppMessaging/index.js +0 -2
- package/lib/InAppMessaging/index.js.map +1 -1
- package/lib/InAppMessaging/types.d.ts +30 -42
- package/lib/InAppMessaging/types.js +2 -0
- package/lib/InAppMessaging/types.js.map +1 -1
- package/lib/Notifications.d.ts +6 -2
- package/lib/Notifications.js +44 -0
- package/lib/Notifications.js.map +1 -1
- package/lib/PushNotification/NotEnabledError.d.ts +3 -0
- package/lib/PushNotification/NotEnabledError.js +16 -0
- package/lib/PushNotification/NotEnabledError.js.map +1 -0
- package/lib/PushNotification/Platform/index.d.ts +2 -0
- package/lib/PushNotification/Platform/index.js +26 -0
- package/lib/PushNotification/Platform/index.js.map +1 -0
- package/lib/PushNotification/Platform/index.native.d.ts +2 -0
- package/lib/PushNotification/Platform/index.native.js +8 -0
- package/lib/PushNotification/Platform/index.native.js.map +1 -0
- package/lib/PushNotification/Platform/types.d.ts +5 -0
- package/lib/PushNotification/Platform/types.js +5 -0
- package/lib/PushNotification/Platform/types.js.map +1 -0
- package/lib/PushNotification/PlatformNotSupportedError.d.ts +3 -0
- package/lib/PushNotification/PlatformNotSupportedError.js +16 -0
- package/lib/PushNotification/PlatformNotSupportedError.js.map +1 -0
- package/lib/PushNotification/Providers/AWSPinpointProvider/index.d.ts +15 -0
- package/lib/PushNotification/Providers/AWSPinpointProvider/index.js +115 -0
- package/lib/PushNotification/Providers/AWSPinpointProvider/index.js.map +1 -0
- package/lib/PushNotification/Providers/AWSPinpointProvider/types.d.ts +9 -0
- package/lib/PushNotification/Providers/AWSPinpointProvider/types.js +16 -0
- package/lib/PushNotification/Providers/AWSPinpointProvider/types.js.map +1 -0
- package/lib/PushNotification/Providers/AWSPinpointProvider/utils.d.ts +7 -0
- package/lib/PushNotification/Providers/AWSPinpointProvider/utils.js +58 -0
- package/lib/PushNotification/Providers/AWSPinpointProvider/utils.js.map +1 -0
- package/lib/PushNotification/Providers/index.d.ts +1 -0
- package/lib/PushNotification/Providers/index.js +7 -0
- package/lib/PushNotification/Providers/index.js.map +1 -0
- package/lib/PushNotification/PushNotification.d.ts +39 -0
- package/lib/PushNotification/PushNotification.js +91 -0
- package/lib/PushNotification/PushNotification.js.map +1 -0
- package/lib/PushNotification/PushNotification.native.d.ts +63 -0
- package/lib/PushNotification/PushNotification.native.js +327 -0
- package/lib/PushNotification/PushNotification.native.js.map +1 -0
- package/lib/PushNotification/index.d.ts +2 -0
- package/lib/PushNotification/index.js +9 -0
- package/lib/PushNotification/index.js.map +1 -0
- package/lib/PushNotification/types.d.ts +77 -0
- package/lib/PushNotification/types.js +12 -0
- package/lib/PushNotification/types.js.map +1 -0
- package/lib/PushNotification/utils.d.ts +3 -0
- package/lib/PushNotification/utils.js +81 -0
- package/lib/PushNotification/utils.js.map +1 -0
- package/lib/common/AWSPinpointProviderCommon/index.d.ts +34 -0
- package/lib/common/AWSPinpointProviderCommon/index.js +281 -0
- package/lib/common/AWSPinpointProviderCommon/index.js.map +1 -0
- package/lib/common/AWSPinpointProviderCommon/types.d.ts +9 -0
- package/lib/common/AWSPinpointProviderCommon/types.js +5 -0
- package/lib/common/AWSPinpointProviderCommon/types.js.map +1 -0
- package/lib/common/constants.d.ts +1 -0
- package/lib/common/constants.js +6 -0
- package/lib/common/constants.js.map +1 -0
- package/lib/common/eventListeners/index.d.ts +4 -0
- package/lib/common/eventListeners/index.js +55 -0
- package/lib/common/eventListeners/index.js.map +1 -0
- package/lib/common/eventListeners/types.d.ts +7 -0
- package/lib/common/eventListeners/types.js +5 -0
- package/lib/common/eventListeners/types.js.map +1 -0
- package/lib/common/index.d.ts +4 -0
- package/lib/common/index.js +13 -0
- package/lib/common/index.js.map +1 -0
- package/lib/index.d.ts +5 -2
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/lib/types.d.ts +34 -2
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -1
- package/lib-esm/InAppMessaging/InAppMessaging.d.ts +10 -8
- package/lib-esm/InAppMessaging/InAppMessaging.js +9 -11
- package/lib-esm/InAppMessaging/InAppMessaging.js.map +1 -1
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/index.d.ts +5 -25
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/index.js +39 -254
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/index.js.map +1 -1
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/types.d.ts +0 -9
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/types.js.map +1 -1
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/utils.js +2 -8
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/utils.js.map +1 -1
- package/lib-esm/InAppMessaging/index.d.ts +1 -3
- package/lib-esm/InAppMessaging/index.js +0 -1
- package/lib-esm/InAppMessaging/index.js.map +1 -1
- package/lib-esm/InAppMessaging/types.d.ts +30 -42
- package/lib-esm/InAppMessaging/types.js +2 -0
- package/lib-esm/InAppMessaging/types.js.map +1 -1
- package/lib-esm/Notifications.d.ts +6 -2
- package/lib-esm/Notifications.js +47 -3
- package/lib-esm/Notifications.js.map +1 -1
- package/lib-esm/PushNotification/NotEnabledError.d.ts +3 -0
- package/lib-esm/PushNotification/NotEnabledError.js +14 -0
- package/lib-esm/PushNotification/NotEnabledError.js.map +1 -0
- package/lib-esm/PushNotification/Platform/index.d.ts +2 -0
- package/lib-esm/PushNotification/Platform/index.js +24 -0
- package/lib-esm/PushNotification/Platform/index.js.map +1 -0
- package/lib-esm/PushNotification/Platform/index.native.d.ts +2 -0
- package/lib-esm/PushNotification/Platform/index.native.js +6 -0
- package/lib-esm/PushNotification/Platform/index.native.js.map +1 -0
- package/lib-esm/PushNotification/Platform/types.d.ts +5 -0
- package/lib-esm/PushNotification/Platform/types.js +3 -0
- package/lib-esm/PushNotification/Platform/types.js.map +1 -0
- package/lib-esm/PushNotification/PlatformNotSupportedError.d.ts +3 -0
- package/lib-esm/PushNotification/PlatformNotSupportedError.js +14 -0
- package/lib-esm/PushNotification/PlatformNotSupportedError.js.map +1 -0
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/index.d.ts +15 -0
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/index.js +113 -0
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/index.js.map +1 -0
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/types.d.ts +9 -0
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/types.js +14 -0
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/types.js.map +1 -0
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/utils.d.ts +7 -0
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/utils.js +56 -0
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/utils.js.map +1 -0
- package/lib-esm/PushNotification/Providers/index.d.ts +1 -0
- package/lib-esm/PushNotification/Providers/index.js +4 -0
- package/lib-esm/PushNotification/Providers/index.js.map +1 -0
- package/lib-esm/PushNotification/PushNotification.d.ts +39 -0
- package/lib-esm/PushNotification/PushNotification.js +89 -0
- package/lib-esm/PushNotification/PushNotification.js.map +1 -0
- package/lib-esm/PushNotification/PushNotification.native.d.ts +63 -0
- package/lib-esm/PushNotification/PushNotification.native.js +325 -0
- package/lib-esm/PushNotification/PushNotification.native.js.map +1 -0
- package/lib-esm/PushNotification/index.d.ts +2 -0
- package/lib-esm/PushNotification/index.js +5 -0
- package/lib-esm/PushNotification/index.js.map +1 -0
- package/lib-esm/PushNotification/types.d.ts +77 -0
- package/lib-esm/PushNotification/types.js +10 -0
- package/lib-esm/PushNotification/types.js.map +1 -0
- package/lib-esm/PushNotification/utils.d.ts +3 -0
- package/lib-esm/PushNotification/utils.js +79 -0
- package/lib-esm/PushNotification/utils.js.map +1 -0
- package/lib-esm/common/AWSPinpointProviderCommon/index.d.ts +34 -0
- package/lib-esm/common/AWSPinpointProviderCommon/index.js +279 -0
- package/lib-esm/common/AWSPinpointProviderCommon/index.js.map +1 -0
- package/lib-esm/common/AWSPinpointProviderCommon/types.d.ts +9 -0
- package/lib-esm/common/AWSPinpointProviderCommon/types.js +3 -0
- package/lib-esm/common/AWSPinpointProviderCommon/types.js.map +1 -0
- package/lib-esm/common/constants.d.ts +1 -0
- package/lib-esm/common/constants.js +4 -0
- package/lib-esm/common/constants.js.map +1 -0
- package/lib-esm/common/eventListeners/index.d.ts +4 -0
- package/lib-esm/common/eventListeners/index.js +53 -0
- package/lib-esm/common/eventListeners/index.js.map +1 -0
- package/lib-esm/common/eventListeners/types.d.ts +7 -0
- package/lib-esm/common/eventListeners/types.js +3 -0
- package/lib-esm/common/eventListeners/types.js.map +1 -0
- package/lib-esm/common/index.d.ts +4 -0
- package/lib-esm/common/index.js +6 -0
- package/lib-esm/common/index.js.map +1 -0
- package/lib-esm/index.d.ts +5 -2
- package/lib-esm/index.js +2 -0
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/types.d.ts +34 -2
- package/lib-esm/types.js +2 -0
- package/lib-esm/types.js.map +1 -1
- package/package.json +14 -52
- package/src/InAppMessaging/InAppMessaging.ts +27 -36
- package/src/InAppMessaging/Providers/AWSPinpointProvider/index.ts +45 -245
- package/src/InAppMessaging/Providers/AWSPinpointProvider/types.ts +0 -12
- package/src/InAppMessaging/Providers/AWSPinpointProvider/utils.ts +3 -12
- package/src/InAppMessaging/index.ts +0 -3
- package/src/InAppMessaging/types.ts +52 -56
- package/src/Notifications.ts +41 -3
- package/src/PushNotification/NotEnabledError.ts +11 -0
- package/src/PushNotification/Platform/index.native.ts +9 -0
- package/src/PushNotification/Platform/index.ts +22 -0
- package/src/PushNotification/Platform/types.ts +15 -0
- package/src/PushNotification/PlatformNotSupportedError.ts +9 -0
- package/src/PushNotification/Providers/AWSPinpointProvider/index.ts +137 -0
- package/src/PushNotification/Providers/AWSPinpointProvider/types.ts +13 -0
- package/src/PushNotification/Providers/AWSPinpointProvider/utils.ts +79 -0
- package/src/PushNotification/Providers/index.ts +4 -0
- package/src/PushNotification/PushNotification.native.ts +381 -0
- package/src/PushNotification/PushNotification.ts +107 -0
- package/src/PushNotification/index.ts +9 -0
- package/src/PushNotification/types.ts +114 -0
- package/src/PushNotification/utils.ts +112 -0
- package/src/common/AWSPinpointProviderCommon/index.ts +295 -0
- package/src/common/AWSPinpointProviderCommon/types.ts +14 -0
- package/src/common/constants.ts +5 -0
- package/src/common/eventListeners/index.ts +44 -0
- package/src/common/eventListeners/types.ts +12 -0
- package/src/common/index.ts +11 -0
- package/src/index.ts +9 -3
- package/src/types.ts +47 -2
- package/CHANGELOG.md +0 -105
- package/lib/InAppMessaging/eventListeners.d.ts +0 -3
- package/lib/InAppMessaging/eventListeners.js +0 -28
- package/lib/InAppMessaging/eventListeners.js.map +0 -1
- package/lib-esm/InAppMessaging/eventListeners.d.ts +0 -3
- package/lib-esm/InAppMessaging/eventListeners.js +0 -26
- package/lib-esm/InAppMessaging/eventListeners.js.map +0 -1
- package/src/InAppMessaging/eventListeners.ts +0 -42
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
var _a;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var types_1 = require("./types");
|
|
7
|
-
var onMessageActionListeners = (_a = {},
|
|
8
|
-
_a[types_1.InAppMessageInteractionEvent.MESSAGE_RECEIVED] = new Set(),
|
|
9
|
-
_a[types_1.InAppMessageInteractionEvent.MESSAGE_DISPLAYED] = new Set(),
|
|
10
|
-
_a[types_1.InAppMessageInteractionEvent.MESSAGE_DISMISSED] = new Set(),
|
|
11
|
-
_a[types_1.InAppMessageInteractionEvent.MESSAGE_ACTION_TAKEN] = new Set(),
|
|
12
|
-
_a);
|
|
13
|
-
exports.notifyMessageInteractionEventListeners = function (message, event) {
|
|
14
|
-
onMessageActionListeners[event].forEach(function (listener) {
|
|
15
|
-
listener.handleEvent(message);
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
exports.addMessageInteractionEventListener = function (handler, event) {
|
|
19
|
-
var listener = {
|
|
20
|
-
handleEvent: handler,
|
|
21
|
-
remove: function () {
|
|
22
|
-
onMessageActionListeners[event].delete(listener);
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
onMessageActionListeners[event].add(listener);
|
|
26
|
-
return listener;
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=eventListeners.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventListeners.js","sourceRoot":"","sources":["../../src/InAppMessaging/eventListeners.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,iCAKiB;AAEjB,IAAM,wBAAwB;IAI7B,GAAC,oCAA4B,CAAC,gBAAgB,IAAG,IAAI,GAAG,EAAE;IAC1D,GAAC,oCAA4B,CAAC,iBAAiB,IAAG,IAAI,GAAG,EAAE;IAC3D,GAAC,oCAA4B,CAAC,iBAAiB,IAAG,IAAI,GAAG,EAAE;IAC3D,GAAC,oCAA4B,CAAC,oBAAoB,IAAG,IAAI,GAAG,EAAE;OAC9D,CAAC;AAEW,QAAA,sCAAsC,GAAG,UACrD,OAAqB,EACrB,KAAmC;IAEnC,wBAAwB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAA,QAAQ;QAC/C,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,kCAAkC,GAAG,UACjD,OAAyC,EACzC,KAAmC;IAEnC,IAAM,QAAQ,GAAG;QAChB,WAAW,EAAE,OAAO;QACpB,MAAM,EAAE;YACP,wBAAwB,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAClD,CAAC;KACD,CAAC;IACF,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9C,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { InAppMessage, InAppMessageInteractionEvent, OnMessageInteractionEventHandler, OnMessageInteractionEventListener } from './types';
|
|
2
|
-
export declare const notifyMessageInteractionEventListeners: (message: InAppMessage, event: InAppMessageInteractionEvent) => void;
|
|
3
|
-
export declare const addMessageInteractionEventListener: (handler: OnMessageInteractionEventHandler, event: InAppMessageInteractionEvent) => OnMessageInteractionEventListener;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
var _a;
|
|
4
|
-
import { InAppMessageInteractionEvent, } from './types';
|
|
5
|
-
var onMessageActionListeners = (_a = {},
|
|
6
|
-
_a[InAppMessageInteractionEvent.MESSAGE_RECEIVED] = new Set(),
|
|
7
|
-
_a[InAppMessageInteractionEvent.MESSAGE_DISPLAYED] = new Set(),
|
|
8
|
-
_a[InAppMessageInteractionEvent.MESSAGE_DISMISSED] = new Set(),
|
|
9
|
-
_a[InAppMessageInteractionEvent.MESSAGE_ACTION_TAKEN] = new Set(),
|
|
10
|
-
_a);
|
|
11
|
-
export var notifyMessageInteractionEventListeners = function (message, event) {
|
|
12
|
-
onMessageActionListeners[event].forEach(function (listener) {
|
|
13
|
-
listener.handleEvent(message);
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
export var addMessageInteractionEventListener = function (handler, event) {
|
|
17
|
-
var listener = {
|
|
18
|
-
handleEvent: handler,
|
|
19
|
-
remove: function () {
|
|
20
|
-
onMessageActionListeners[event].delete(listener);
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
onMessageActionListeners[event].add(listener);
|
|
24
|
-
return listener;
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=eventListeners.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventListeners.js","sourceRoot":"","sources":["../../src/InAppMessaging/eventListeners.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,EAEN,4BAA4B,GAG5B,MAAM,SAAS,CAAC;AAEjB,IAAM,wBAAwB;IAI7B,GAAC,4BAA4B,CAAC,gBAAgB,IAAG,IAAI,GAAG,EAAE;IAC1D,GAAC,4BAA4B,CAAC,iBAAiB,IAAG,IAAI,GAAG,EAAE;IAC3D,GAAC,4BAA4B,CAAC,iBAAiB,IAAG,IAAI,GAAG,EAAE;IAC3D,GAAC,4BAA4B,CAAC,oBAAoB,IAAG,IAAI,GAAG,EAAE;OAC9D,CAAC;AAEF,MAAM,CAAC,IAAM,sCAAsC,GAAG,UACrD,OAAqB,EACrB,KAAmC;IAEnC,wBAAwB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAA,QAAQ;QAC/C,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,kCAAkC,GAAG,UACjD,OAAyC,EACzC,KAAmC;IAEnC,IAAM,QAAQ,GAAG;QAChB,WAAW,EAAE,OAAO;QACpB,MAAM,EAAE;YACP,wBAAwB,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAClD,CAAC;KACD,CAAC;IACF,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9C,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
InAppMessage,
|
|
6
|
-
InAppMessageInteractionEvent,
|
|
7
|
-
OnMessageInteractionEventHandler,
|
|
8
|
-
OnMessageInteractionEventListener,
|
|
9
|
-
} from './types';
|
|
10
|
-
|
|
11
|
-
const onMessageActionListeners: Record<
|
|
12
|
-
InAppMessageInteractionEvent,
|
|
13
|
-
Set<OnMessageInteractionEventListener>
|
|
14
|
-
> = {
|
|
15
|
-
[InAppMessageInteractionEvent.MESSAGE_RECEIVED]: new Set(),
|
|
16
|
-
[InAppMessageInteractionEvent.MESSAGE_DISPLAYED]: new Set(),
|
|
17
|
-
[InAppMessageInteractionEvent.MESSAGE_DISMISSED]: new Set(),
|
|
18
|
-
[InAppMessageInteractionEvent.MESSAGE_ACTION_TAKEN]: new Set(),
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const notifyMessageInteractionEventListeners = (
|
|
22
|
-
message: InAppMessage,
|
|
23
|
-
event: InAppMessageInteractionEvent
|
|
24
|
-
): void => {
|
|
25
|
-
onMessageActionListeners[event].forEach(listener => {
|
|
26
|
-
listener.handleEvent(message);
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const addMessageInteractionEventListener = (
|
|
31
|
-
handler: OnMessageInteractionEventHandler,
|
|
32
|
-
event: InAppMessageInteractionEvent
|
|
33
|
-
): OnMessageInteractionEventListener => {
|
|
34
|
-
const listener = {
|
|
35
|
-
handleEvent: handler,
|
|
36
|
-
remove: () => {
|
|
37
|
-
onMessageActionListeners[event].delete(listener);
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
onMessageActionListeners[event].add(listener);
|
|
41
|
-
return listener;
|
|
42
|
-
};
|