@aws-amplify/notifications 2.0.85-unstable.e5a8569.0 → 2.0.85
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/dist/cjs/eventListeners/eventListeners.js.map +1 -1
- package/dist/cjs/eventListeners/index.js.map +1 -1
- package/dist/cjs/inAppMessaging/errors/InAppMessagingError.js.map +1 -1
- package/dist/cjs/inAppMessaging/errors/assertServiceError.js.map +1 -1
- package/dist/cjs/inAppMessaging/errors/assertValidationError.js.map +1 -1
- package/dist/cjs/inAppMessaging/errors/index.js.map +1 -1
- package/dist/cjs/inAppMessaging/index.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/index.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/index.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/types/index.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/utils/conflictHandlerManager.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/utils/helpers.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/utils/index.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js.map +1 -1
- package/dist/cjs/inAppMessaging/utils/index.js.map +1 -1
- package/dist/cjs/pushNotifications/errors/PushNotificationError.js.map +1 -1
- package/dist/cjs/pushNotifications/errors/index.js.map +1 -1
- package/dist/cjs/pushNotifications/index.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/identifyUser.native.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/index.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/index.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/utils/getChannelType.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/utils/index.js.map +1 -1
- package/dist/cjs/pushNotifications/utils/index.js.map +1 -1
- package/dist/esm/eventListeners/eventListeners.mjs.map +1 -1
- package/dist/esm/inAppMessaging/errors/InAppMessagingError.mjs.map +1 -1
- package/dist/esm/inAppMessaging/errors/assertServiceError.mjs.map +1 -1
- package/dist/esm/inAppMessaging/errors/assertValidationError.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/syncMessages.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/utils/conflictHandlerManager.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/utils/helpers.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.mjs.map +1 -1
- package/dist/esm/pushNotifications/errors/PushNotificationError.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/utils/getChannelType.mjs.map +1 -1
- package/package.json +104 -104
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventListeners.js","sources":["../../../src/eventListeners/eventListeners.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.addEventListener = exports.notifyEventListenersAndAwaitHandlers = exports.notifyEventListeners = void 0;\nconst eventListeners = {};\nconst notifyEventListeners = (type, ...args) => {\n eventListeners[type]?.forEach(listener => {\n listener.handleEvent(...args);\n });\n};\nexports.notifyEventListeners = notifyEventListeners;\nconst notifyEventListenersAndAwaitHandlers = (type, ...args) => Promise.all(Array.from(eventListeners[type] ?? []).map(async (listener) => {\n await listener.handleEvent(...args);\n}));\nexports.notifyEventListenersAndAwaitHandlers = notifyEventListenersAndAwaitHandlers;\nconst addEventListener = (type, handler) => {\n // If there is no listener set for the event type, just create it\n if (!eventListeners[type]) {\n eventListeners[type] = new Set();\n }\n const listener = {\n handleEvent: handler,\n remove: () => {\n eventListeners[type].delete(listener);\n },\n };\n eventListeners[type].add(listener);\n return {\n remove: () => {\n listener.remove();\n },\n };\n};\nexports.addEventListener = addEventListener;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,oCAAoC,GAAG,OAAO,CAAC,oBAAoB,GAAG,MAAM;AAC/G,MAAM,cAAc,GAAG,EAAE;AACzB,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,GAAG,IAAI,KAAK;AAChD,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,IAAI;AAC9C,QAAQ,QAAQ,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;AACrC,
|
|
1
|
+
{"version":3,"file":"eventListeners.js","sources":["../../../src/eventListeners/eventListeners.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.addEventListener = exports.notifyEventListenersAndAwaitHandlers = exports.notifyEventListeners = void 0;\nconst eventListeners = {};\nconst notifyEventListeners = (type, ...args) => {\n eventListeners[type]?.forEach(listener => {\n listener.handleEvent(...args);\n });\n};\nexports.notifyEventListeners = notifyEventListeners;\nconst notifyEventListenersAndAwaitHandlers = (type, ...args) => Promise.all(Array.from(eventListeners[type] ?? []).map(async (listener) => {\n await listener.handleEvent(...args);\n}));\nexports.notifyEventListenersAndAwaitHandlers = notifyEventListenersAndAwaitHandlers;\nconst addEventListener = (type, handler) => {\n // If there is no listener set for the event type, just create it\n if (!eventListeners[type]) {\n eventListeners[type] = new Set();\n }\n const listener = {\n handleEvent: handler,\n remove: () => {\n eventListeners[type].delete(listener);\n },\n };\n eventListeners[type].add(listener);\n return {\n remove: () => {\n listener.remove();\n },\n };\n};\nexports.addEventListener = addEventListener;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,oCAAoC,GAAG,OAAO,CAAC,oBAAoB,GAAG,MAAM;AAC/G,MAAM,cAAc,GAAG,EAAE;AACzB,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,GAAG,IAAI,KAAK;AAChD,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,IAAI;AAC9C,QAAQ,QAAQ,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;AACrC,IAAI,CAAC,CAAC;AACN,CAAC;AACD,OAAO,CAAC,oBAAoB,GAAG,oBAAoB;AACnD,MAAM,oCAAoC,GAAG,CAAC,IAAI,EAAE,GAAG,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,QAAQ,KAAK;AAC3I,IAAI,MAAM,QAAQ,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;AACvC,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,oCAAoC,GAAG,oCAAoC;AACnF,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK;AAC5C;AACA,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;AAC/B,QAAQ,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,EAAE;AACxC,IAAI;AACJ,IAAI,MAAM,QAAQ,GAAG;AACrB,QAAQ,WAAW,EAAE,OAAO;AAC5B,QAAQ,MAAM,EAAE,MAAM;AACtB,YAAY,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;AACjD,QAAQ,CAAC;AACT,KAAK;AACL,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;AACtC,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,MAAM;AACtB,YAAY,QAAQ,CAAC,MAAM,EAAE;AAC7B,QAAQ,CAAC;AACT,KAAK;AACL,CAAC;AACD,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/eventListeners/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.notifyEventListenersAndAwaitHandlers = exports.notifyEventListeners = void 0;\nvar eventListeners_1 = require(\"./eventListeners\");\nObject.defineProperty(exports, \"addEventListener\", { enumerable: true, get: function () { return eventListeners_1.addEventListener; } });\nObject.defineProperty(exports, \"notifyEventListeners\", { enumerable: true, get: function () { return eventListeners_1.notifyEventListeners; } });\nObject.defineProperty(exports, \"notifyEventListenersAndAwaitHandlers\", { enumerable: true, get: function () { return eventListeners_1.notifyEventListenersAndAwaitHandlers; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oCAAoC,GAAG,OAAO,CAAC,oBAAoB,GAAG,MAAM;AACpF,IAAI,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAClD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,gBAAgB,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/eventListeners/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.notifyEventListenersAndAwaitHandlers = exports.notifyEventListeners = void 0;\nvar eventListeners_1 = require(\"./eventListeners\");\nObject.defineProperty(exports, \"addEventListener\", { enumerable: true, get: function () { return eventListeners_1.addEventListener; } });\nObject.defineProperty(exports, \"notifyEventListeners\", { enumerable: true, get: function () { return eventListeners_1.notifyEventListeners; } });\nObject.defineProperty(exports, \"notifyEventListenersAndAwaitHandlers\", { enumerable: true, get: function () { return eventListeners_1.notifyEventListenersAndAwaitHandlers; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oCAAoC,GAAG,OAAO,CAAC,oBAAoB,GAAG,MAAM;AACpF,IAAI,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAClD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;AACxI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;AAChJ,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sCAAsC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,gBAAgB,CAAC,oCAAoC,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InAppMessagingError.js","sources":["../../../../src/inAppMessaging/errors/InAppMessagingError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InAppMessagingError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * @internal\n */\nclass InAppMessagingError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = InAppMessagingError;\n Object.setPrototypeOf(this, InAppMessagingError.prototype);\n }\n}\nexports.InAppMessagingError = InAppMessagingError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,mBAAmB,GAAG,MAAM;AACpC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;AACA;AACA;AACA,MAAM,mBAAmB,SAAS,OAAO,CAAC,YAAY,CAAC;AACvD,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC;AACrB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,mBAAmB;AAC9C,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC;AAClE;
|
|
1
|
+
{"version":3,"file":"InAppMessagingError.js","sources":["../../../../src/inAppMessaging/errors/InAppMessagingError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InAppMessagingError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * @internal\n */\nclass InAppMessagingError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = InAppMessagingError;\n Object.setPrototypeOf(this, InAppMessagingError.prototype);\n }\n}\nexports.InAppMessagingError = InAppMessagingError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,mBAAmB,GAAG,MAAM;AACpC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;AACA;AACA;AACA,MAAM,mBAAmB,SAAS,OAAO,CAAC,YAAY,CAAC;AACvD,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC;AACrB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,mBAAmB;AAC9C,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC;AAClE,IAAI;AACJ;AACA,OAAO,CAAC,mBAAmB,GAAG,mBAAmB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertServiceError.js","sources":["../../../../src/inAppMessaging/errors/assertServiceError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertServiceError = assertServiceError;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst InAppMessagingError_1 = require(\"./InAppMessagingError\");\nfunction assertServiceError(error) {\n if (!error ||\n error.name === 'Error' ||\n error instanceof TypeError) {\n throw new InAppMessagingError_1.InAppMessagingError({\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: error,\n });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC;AAC9D,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,IAAI,CAAC,KAAK;AACd,QAAQ,KAAK,CAAC,IAAI,KAAK,OAAO;AAC9B,QAAQ,KAAK,YAAY,SAAS,EAAE;AACpC,QAAQ,MAAM,IAAI,qBAAqB,CAAC,mBAAmB,CAAC;AAC5D,YAAY,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAClD,YAAY,OAAO,EAAE,gCAAgC;AACrD,YAAY,eAAe,EAAE,KAAK;AAClC,SAAS,CAAC;AACV;
|
|
1
|
+
{"version":3,"file":"assertServiceError.js","sources":["../../../../src/inAppMessaging/errors/assertServiceError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertServiceError = assertServiceError;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst InAppMessagingError_1 = require(\"./InAppMessagingError\");\nfunction assertServiceError(error) {\n if (!error ||\n error.name === 'Error' ||\n error instanceof TypeError) {\n throw new InAppMessagingError_1.InAppMessagingError({\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: error,\n });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC;AAC9D,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,IAAI,CAAC,KAAK;AACd,QAAQ,KAAK,CAAC,IAAI,KAAK,OAAO;AAC9B,QAAQ,KAAK,YAAY,SAAS,EAAE;AACpC,QAAQ,MAAM,IAAI,qBAAqB,CAAC,mBAAmB,CAAC;AAC5D,YAAY,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAClD,YAAY,OAAO,EAAE,gCAAgC;AACrD,YAAY,eAAe,EAAE,KAAK;AAClC,SAAS,CAAC;AACV,IAAI;AACJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertValidationError.js","sources":["../../../../src/inAppMessaging/errors/assertValidationError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertValidationError = assertValidationError;\nconst InAppMessagingError_1 = require(\"./InAppMessagingError\");\nconst validation_1 = require(\"./validation\");\n/**\n * @internal\n */\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validation_1.validationErrorMap[name];\n if (!assertion) {\n throw new InAppMessagingError_1.InAppMessagingError({ name, message, recoverySuggestion });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;AACrD,MAAM,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC;AAC9D,MAAM,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;AAC5C;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AAChD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC;AACjF,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,qBAAqB,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAClG;
|
|
1
|
+
{"version":3,"file":"assertValidationError.js","sources":["../../../../src/inAppMessaging/errors/assertValidationError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertValidationError = assertValidationError;\nconst InAppMessagingError_1 = require(\"./InAppMessagingError\");\nconst validation_1 = require(\"./validation\");\n/**\n * @internal\n */\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validation_1.validationErrorMap[name];\n if (!assertion) {\n throw new InAppMessagingError_1.InAppMessagingError({ name, message, recoverySuggestion });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;AACrD,MAAM,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC;AAC9D,MAAM,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;AAC5C;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AAChD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC;AACjF,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,qBAAqB,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAClG,IAAI;AACJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/inAppMessaging/errors/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validationErrorMap = exports.InAppMessagingValidationErrorCode = exports.assertServiceError = exports.assertValidationError = exports.InAppMessagingError = void 0;\nvar InAppMessagingError_1 = require(\"./InAppMessagingError\");\nObject.defineProperty(exports, \"InAppMessagingError\", { enumerable: true, get: function () { return InAppMessagingError_1.InAppMessagingError; } });\nvar assertValidationError_1 = require(\"./assertValidationError\");\nObject.defineProperty(exports, \"assertValidationError\", { enumerable: true, get: function () { return assertValidationError_1.assertValidationError; } });\nvar assertServiceError_1 = require(\"./assertServiceError\");\nObject.defineProperty(exports, \"assertServiceError\", { enumerable: true, get: function () { return assertServiceError_1.assertServiceError; } });\nvar validation_1 = require(\"./validation\");\nObject.defineProperty(exports, \"InAppMessagingValidationErrorCode\", { enumerable: true, get: function () { return validation_1.InAppMessagingValidationErrorCode; } });\nObject.defineProperty(exports, \"validationErrorMap\", { enumerable: true, get: function () { return validation_1.validationErrorMap; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,iCAAiC,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,mBAAmB,GAAG,MAAM;AAC1K,IAAI,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC;AAC5D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,qBAAqB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,qBAAqB,CAAC,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/inAppMessaging/errors/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validationErrorMap = exports.InAppMessagingValidationErrorCode = exports.assertServiceError = exports.assertValidationError = exports.InAppMessagingError = void 0;\nvar InAppMessagingError_1 = require(\"./InAppMessagingError\");\nObject.defineProperty(exports, \"InAppMessagingError\", { enumerable: true, get: function () { return InAppMessagingError_1.InAppMessagingError; } });\nvar assertValidationError_1 = require(\"./assertValidationError\");\nObject.defineProperty(exports, \"assertValidationError\", { enumerable: true, get: function () { return assertValidationError_1.assertValidationError; } });\nvar assertServiceError_1 = require(\"./assertServiceError\");\nObject.defineProperty(exports, \"assertServiceError\", { enumerable: true, get: function () { return assertServiceError_1.assertServiceError; } });\nvar validation_1 = require(\"./validation\");\nObject.defineProperty(exports, \"InAppMessagingValidationErrorCode\", { enumerable: true, get: function () { return validation_1.InAppMessagingValidationErrorCode; } });\nObject.defineProperty(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AAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/inAppMessaging/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDismissed = exports.onMessageDisplayed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.syncMessages = exports.identifyUser = void 0;\nvar pinpoint_1 = require(\"./providers/pinpoint\");\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return pinpoint_1.identifyUser; } });\nObject.defineProperty(exports, \"syncMessages\", { enumerable: true, get: function () { return pinpoint_1.syncMessages; } });\nObject.defineProperty(exports, \"dispatchEvent\", { enumerable: true, get: function () { return pinpoint_1.dispatchEvent; } });\nObject.defineProperty(exports, \"setConflictHandler\", { enumerable: true, get: function () { return pinpoint_1.setConflictHandler; } });\nObject.defineProperty(exports, \"initializeInAppMessaging\", { enumerable: true, get: function () { return pinpoint_1.initializeInAppMessaging; } });\nObject.defineProperty(exports, \"onMessageReceived\", { enumerable: true, get: function () { return pinpoint_1.onMessageReceived; } });\nObject.defineProperty(exports, \"onMessageDisplayed\", { enumerable: true, get: function () { return pinpoint_1.onMessageDisplayed; } });\nObject.defineProperty(exports, \"onMessageDismissed\", { enumerable: true, get: function () { return pinpoint_1.onMessageDismissed; } });\nObject.defineProperty(exports, \"onMessageActionTaken\", { enumerable: true, get: function () { return pinpoint_1.onMessageActionTaken; } });\nObject.defineProperty(exports, \"notifyMessageInteraction\", { enumerable: true, get: function () { return pinpoint_1.notifyMessageInteraction; } });\nObject.defineProperty(exports, \"clearMessages\", { enumerable: true, get: function () { return pinpoint_1.clearMessages; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;AACpS,IAAI,UAAU,GAAG,OAAO,CAAC,sBAAsB,CAAC;AAChD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/inAppMessaging/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDismissed = exports.onMessageDisplayed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.syncMessages = exports.identifyUser = void 0;\nvar pinpoint_1 = require(\"./providers/pinpoint\");\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return pinpoint_1.identifyUser; } });\nObject.defineProperty(exports, \"syncMessages\", { enumerable: true, get: function () { return pinpoint_1.syncMessages; } });\nObject.defineProperty(exports, \"dispatchEvent\", { enumerable: true, get: function () { return pinpoint_1.dispatchEvent; } });\nObject.defineProperty(exports, \"setConflictHandler\", { enumerable: true, get: function () { return pinpoint_1.setConflictHandler; } });\nObject.defineProperty(exports, \"initializeInAppMessaging\", { enumerable: true, get: function () { return pinpoint_1.initializeInAppMessaging; } });\nObject.defineProperty(exports, \"onMessageReceived\", { enumerable: true, get: function () { return pinpoint_1.onMessageReceived; } });\nObject.defineProperty(exports, \"onMessageDisplayed\", { enumerable: true, get: function () { return pinpoint_1.onMessageDisplayed; } });\nObject.defineProperty(exports, \"onMessageDismissed\", { enumerable: true, get: function () { return pinpoint_1.onMessageDismissed; } });\nObject.defineProperty(exports, \"onMessageActionTaken\", { enumerable: true, get: function () { return pinpoint_1.onMessageActionTaken; } });\nObject.defineProperty(exports, \"notifyMessageInteraction\", { enumerable: true, get: function () { return pinpoint_1.notifyMessageInteraction; } });\nObject.defineProperty(exports, \"clearMessages\", { enumerable: true, get: function () { return pinpoint_1.clearMessages; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;AACpS,IAAI,UAAU,GAAG,OAAO,CAAC,sBAAsB,CAAC;AAChD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1H,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,E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1I,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC;AAClJ,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatchEvent.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dispatchEvent = dispatchEvent;\nconst tslib_1 = require(\"tslib\");\nconst flatten_js_1 = tslib_1.__importDefault(require(\"lodash/flatten.js\"));\nconst core_1 = require(\"@aws-amplify/core\");\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst errors_1 = require(\"../../../errors\");\nconst utils_1 = require(\"../../../utils\");\nconst utils_2 = require(\"../utils\");\n/**\n * Triggers an In-App message to be displayed. Use this after your campaigns have been synced to the device using\n * {@link syncMessages}. Based on the messages synced and the event passed to this API, it triggers the display\n * of the In-App message that meets the criteria.\n *\n * @remark\n * If an event would trigger multiple messages, the message closest to expiry will be chosen by default.\n * To change this behavior, you can use the {@link setConflictHandler} API to provide\n * your own logic for resolving message conflicts.\n *\n * @param input The input object that holds the event to be dispatched.\n *\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.\n *\n * @returns A promise that will resolve when the operation is complete.\n *\n * @example\n * ```ts\n * // Sync message before disptaching an event\n * await syncMessages();\n *\n * // Dispatch an event\n * await dispatchEvent({ name: 'test_event' });\n * ```\n */\nasync function dispatchEvent(input) {\n (0, utils_1.assertIsInitialized)();\n try {\n const key = `${utils_2.PINPOINT_KEY_PREFIX}${utils_2.STORAGE_KEY_SUFFIX}`;\n const cachedMessages = await core_1.defaultStorage.getItem(key);\n const messages = await (0, utils_2.processInAppMessages)(cachedMessages ? JSON.parse(cachedMessages) : [], input);\n const flattenedMessages = (0, flatten_js_1.default)(messages);\n if (flattenedMessages.length > 0) {\n const conflictHandler = (0, utils_2.getConflictHandler)();\n (0, eventListeners_1.notifyEventListeners)('messageReceived', conflictHandler(flattenedMessages));\n }\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAChC,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC1E,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa,CAAC,KAAK,EAAE;AACpC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,IAAI;AACR,QAAQ,MAAM,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACjF,QAAQ,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC;AACvE,QAAQ,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,oBAAoB,EAAE,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC;AACzH,QAAQ,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC;AACrE,QAAQ,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;AAC1C,YAAY,MAAM,eAAe,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,kBAAkB,GAAG;AACrE,YAAY,CAAC,CAAC,EAAE,gBAAgB,CAAC,oBAAoB,EAAE,iBAAiB,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAC7G;
|
|
1
|
+
{"version":3,"file":"dispatchEvent.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dispatchEvent = dispatchEvent;\nconst tslib_1 = require(\"tslib\");\nconst flatten_js_1 = tslib_1.__importDefault(require(\"lodash/flatten.js\"));\nconst core_1 = require(\"@aws-amplify/core\");\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst errors_1 = require(\"../../../errors\");\nconst utils_1 = require(\"../../../utils\");\nconst utils_2 = require(\"../utils\");\n/**\n * Triggers an In-App message to be displayed. Use this after your campaigns have been synced to the device using\n * {@link syncMessages}. Based on the messages synced and the event passed to this API, it triggers the display\n * of the In-App message that meets the criteria.\n *\n * @remark\n * If an event would trigger multiple messages, the message closest to expiry will be chosen by default.\n * To change this behavior, you can use the {@link setConflictHandler} API to provide\n * your own logic for resolving message conflicts.\n *\n * @param input The input object that holds the event to be dispatched.\n *\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.\n *\n * @returns A promise that will resolve when the operation is complete.\n *\n * @example\n * ```ts\n * // Sync message before disptaching an event\n * await syncMessages();\n *\n * // Dispatch an event\n * await dispatchEvent({ name: 'test_event' });\n * ```\n */\nasync function dispatchEvent(input) {\n (0, utils_1.assertIsInitialized)();\n try {\n const key = `${utils_2.PINPOINT_KEY_PREFIX}${utils_2.STORAGE_KEY_SUFFIX}`;\n const cachedMessages = await core_1.defaultStorage.getItem(key);\n const messages = await (0, utils_2.processInAppMessages)(cachedMessages ? JSON.parse(cachedMessages) : [], input);\n const flattenedMessages = (0, flatten_js_1.default)(messages);\n if (flattenedMessages.length > 0) {\n const conflictHandler = (0, utils_2.getConflictHandler)();\n (0, eventListeners_1.notifyEventListeners)('messageReceived', conflictHandler(flattenedMessages));\n }\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAChC,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC1E,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,QAAQ,G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1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDisplayed = exports.onMessageDismissed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.syncMessages = exports.identifyUser = void 0;\nvar identifyUser_1 = require(\"./identifyUser\");\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return identifyUser_1.identifyUser; } });\nvar syncMessages_1 = require(\"./syncMessages\");\nObject.defineProperty(exports, \"syncMessages\", { enumerable: true, get: function () { return syncMessages_1.syncMessages; } });\nvar dispatchEvent_1 = require(\"./dispatchEvent\");\nObject.defineProperty(exports, \"dispatchEvent\", { enumerable: true, get: function () { return dispatchEvent_1.dispatchEvent; } });\nvar setConflictHandler_1 = require(\"./setConflictHandler\");\nObject.defineProperty(exports, \"setConflictHandler\", { enumerable: true, get: function () { return setConflictHandler_1.setConflictHandler; } });\nvar initializeInAppMessaging_1 = require(\"./initializeInAppMessaging\");\nObject.defineProperty(exports, \"initializeInAppMessaging\", { enumerable: true, get: function () { return initializeInAppMessaging_1.initializeInAppMessaging; } });\nvar onMessageReceived_1 = require(\"./onMessageReceived\");\nObject.defineProperty(exports, \"onMessageReceived\", { enumerable: true, get: function () { return onMessageReceived_1.onMessageReceived; } });\nvar onMessageDismissed_1 = require(\"./onMessageDismissed\");\nObject.defineProperty(exports, \"onMessageDismissed\", { enumerable: true, get: function () { return onMessageDismissed_1.onMessageDismissed; } });\nvar onMessageDisplayed_1 = require(\"./onMessageDisplayed\");\nObject.defineProperty(exports, \"onMessageDisplayed\", { enumerable: true, get: function () { return onMessageDisplayed_1.onMessageDisplayed; } });\nvar onMessageActionTaken_1 = require(\"./onMessageActionTaken\");\nObject.defineProperty(exports, \"onMessageActionTaken\", { enumerable: true, get: function () { return onMessageActionTaken_1.onMessageActionTaken; } });\nvar notifyMessageInteraction_1 = require(\"./notifyMessageInteraction\");\nObject.defineProperty(exports, \"notifyMessageInteraction\", { enumerable: true, get: function () { return notifyMessageInteraction_1.notifyMessageInteraction; } });\nvar clearMessages_1 = require(\"./clearMessages\");\nObject.defineProperty(exports, \"clearMessages\", { enumerable: true, get: function () { return clearMessages_1.clearMessages; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;AACpS,IAAI,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;AAC9C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDisplayed = exports.onMessageDismissed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.syncMessages = exports.identifyUser = void 0;\nvar identifyUser_1 = require(\"./identifyUser\");\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return identifyUser_1.identifyUser; } });\nvar syncMessages_1 = require(\"./syncMessages\");\nObject.defineProperty(exports, \"syncMessages\", { enumerable: true, get: function () { return syncMessages_1.syncMessages; } });\nvar dispatchEvent_1 = require(\"./dispatchEvent\");\nObject.defineProperty(exports, \"dispatchEvent\", { enumerable: true, get: function () { return dispatchEvent_1.dispatchEvent; } });\nvar setConflictHandler_1 = require(\"./setConflictHandler\");\nObject.defineProperty(exports, \"setConflictHandler\", { enumerable: true, get: function () { return setConflictHandler_1.setConflictHandler; } });\nvar initializeInAppMessaging_1 = require(\"./initializeInAppMessaging\");\nObject.defineProperty(exports, \"initializeInAppMessaging\", { enumerable: true, get: function () { return initializeInAppMessaging_1.initializeInAppMessaging; } });\nvar onMessageReceived_1 = require(\"./onMessageReceived\");\nObject.defineProperty(exports, \"onMessageReceived\", { enumerable: true, get: function () { return onMessageReceived_1.onMessageReceived; } });\nvar onMessageDismissed_1 = require(\"./onMessageDismissed\");\nObject.defineProperty(exports, \"onMessageDismissed\", { enumerable: true, get: function () { return onMessageDismissed_1.onMessageDismissed; } });\nvar onMessageDisplayed_1 = require(\"./onMessageDisplayed\");\nObject.defineProperty(exports, \"onMessageDisplayed\", { enumerable: true, get: function () { return onMessageDisplayed_1.onMessageDisplayed; } });\nvar onMessageActionTaken_1 = require(\"./onMessageActionTaken\");\nObject.defineProperty(exports, \"onMessageActionTaken\", { enumerable: true, get: function () { return onMessageActionTaken_1.onMessageActionTaken; } });\nvar notifyMessageInteraction_1 = require(\"./notifyMessageInteraction\");\nObject.defineProperty(exports, \"notifyMessageInteraction\", { enumerable: true, get: function () { return notifyMessageInteraction_1.notifyMessageInteraction; } });\nvar clearMessages_1 = require(\"./clearMessages\");\nObject.defineProperty(exports, \"clearMessages\", { enumerable: true, get: function () { return clearMessages_1.clearMessages; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,C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,GAAG,EAAE,YAAY,EAAE,OAAO,0BAA0B,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC;AAClK,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAChD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializeInAppMessaging.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initializeInAppMessaging = initializeInAppMessaging;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst helpers_1 = require(\"../utils/helpers\");\nconst types_1 = require(\"../types\");\nconst utils_2 = require(\"../utils\");\nconst utils_3 = require(\"../../../utils\");\nconst dispatchEvent_1 = require(\"./dispatchEvent\");\n/**\n * Initialize and set up in-app messaging category. This API needs to be called to enable other InAppMessaging APIs.\n *\n * @remarks\n * Make sure to call this early in your app at the root entry point after configuring Amplify.\n * @example\n * ```ts\n * Amplify.configure(config);\n * initializeInAppMessaging();\n * ```\n */\nfunction initializeInAppMessaging() {\n if ((0, utils_3.isInitialized)()) {\n return;\n }\n // register with the session listener\n utils_1.sessionListener.addStateChangeListener(utils_2.sessionStateChangeHandler, true);\n // wire up default Pinpoint message event handling\n (0, eventListeners_1.addEventListener)('messageDisplayed', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISPLAYED, message);\n (0, utils_2.incrementMessageCounts)(message.id);\n });\n (0, eventListeners_1.addEventListener)('messageDismissed', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISMISSED, message);\n });\n (0, eventListeners_1.addEventListener)('messageActionTaken', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_ACTION_TAKEN, message);\n });\n // listen to analytics hub events\n core_1.Hub.listen('analytics', analyticsListener);\n (0, utils_3.initialize)();\n}\nfunction analyticsListener({ payload, }) {\n const { event, data } = payload;\n switch (event) {\n case 'record': {\n (0, dispatchEvent_1.dispatchEvent)(data);\n break;\n }\n default:\n break;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,wBAAwB;AAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wBAAwB,GAAG;AACpC,IAAI,IAAI,IAAI,OAAO,CAAC,aAAa,GAAG,EAAE;AACtC,QAAQ;AACR;
|
|
1
|
+
{"version":3,"file":"initializeInAppMessaging.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initializeInAppMessaging = initializeInAppMessaging;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst helpers_1 = require(\"../utils/helpers\");\nconst types_1 = require(\"../types\");\nconst utils_2 = require(\"../utils\");\nconst utils_3 = require(\"../../../utils\");\nconst dispatchEvent_1 = require(\"./dispatchEvent\");\n/**\n * Initialize and set up in-app messaging category. This API needs to be called to enable other InAppMessaging APIs.\n *\n * @remarks\n * Make sure to call this early in your app at the root entry point after configuring Amplify.\n * @example\n * ```ts\n * Amplify.configure(config);\n * initializeInAppMessaging();\n * ```\n */\nfunction initializeInAppMessaging() {\n if ((0, utils_3.isInitialized)()) {\n return;\n }\n // register with the session listener\n utils_1.sessionListener.addStateChangeListener(utils_2.sessionStateChangeHandler, true);\n // wire up default Pinpoint message event handling\n (0, eventListeners_1.addEventListener)('messageDisplayed', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISPLAYED, message);\n (0, utils_2.incrementMessageCounts)(message.id);\n });\n (0, eventListeners_1.addEventListener)('messageDismissed', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISMISSED, message);\n });\n (0, eventListeners_1.addEventListener)('messageActionTaken', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_ACTION_TAKEN, message);\n });\n // listen to analytics hub events\n core_1.Hub.listen('analytics', analyticsListener);\n (0, utils_3.initialize)();\n}\nfunction analyticsListener({ payload, }) {\n const { event, data } = payload;\n switch (event) {\n case 'record': {\n (0, dispatchEvent_1.dispatchEvent)(data);\n break;\n }\n default:\n break;\n }\n}\n"],"names":[],"mappings":";;AACA;AAC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EAAE,OAAO,CAAC;AACpG,IAAI,CAAC,CAAC;AACN,IAAI,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,CAAC,OAAO,KAAK;AAC9E,QAAQ,IAAI,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,OAAO,CAAC;AACvG,IAAI,CAAC,CAAC;AACN;AACA,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC;AACrD,IAAI,IAAI,OAAO,CAAC,UAAU,GAAG;AAC7B;AACA,SAAS,iBAAiB,CAAC,EAAE,OAAO,GAAG,EAAE;AACzC,IAAI,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO;AACnC,IAAI,QAAQ,KAAK;AACjB,QAAQ,KAAK,QAAQ,EAAE;AACvB,YAAY,IAAI,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC;AACpD,YAAY;AACZ,QAAQ;AAGR;AACA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncMessages.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.syncMessages = syncMessages;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst pinpoint_2 = require(\"@aws-amplify/core/internals/aws-clients/pinpoint\");\nconst utils_2 = require(\"../utils\");\nconst errors_1 = require(\"../../../errors\");\nconst utils_3 = require(\"../../../utils\");\n/**\n * Fetch and persist messages from Pinpoint campaigns.\n * Calling this API is necessary to trigger InApp messages on the device.\n *\n * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Sync InApp messages with Pinpoint and device.\n * await syncMessages();\n *\n * ```\n */\nasync function syncMessages() {\n (0, utils_3.assertIsInitialized)();\n const messages = await fetchInAppMessages();\n if (!messages || messages.length === 0) {\n return;\n }\n try {\n const key = `${utils_2.PINPOINT_KEY_PREFIX}${utils_2.STORAGE_KEY_SUFFIX}`;\n await core_1.defaultStorage.setItem(key, JSON.stringify(messages));\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\nasync function fetchInAppMessages() {\n try {\n const { credentials, identityId } = await (0, utils_2.resolveCredentials)();\n const { appId, region } = (0, utils_2.resolveConfig)();\n const endpointId = await (0, pinpoint_1.resolveEndpointId)({\n appId,\n category: utils_2.CATEGORY,\n channelType: utils_2.CHANNEL_TYPE,\n credentials,\n identityId,\n region,\n userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.SyncMessages),\n });\n const input = {\n ApplicationId: appId,\n EndpointId: endpointId,\n };\n const response = await (0, pinpoint_2.getInAppMessages)({ credentials, region }, input);\n const { InAppMessageCampaigns: messages } = response.InAppMessagesResponse ?? {};\n return messages;\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,YAAY;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC;AAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,kDAAkD,CAAC;AAC9E,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY,GAAG;AAC9B,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,MAAM,QAAQ,GAAG,MAAM,kBAAkB,EAAE;AAC/C,IAAI,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5C,QAAQ;AACR;
|
|
1
|
+
{"version":3,"file":"syncMessages.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.syncMessages = syncMessages;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst pinpoint_2 = require(\"@aws-amplify/core/internals/aws-clients/pinpoint\");\nconst utils_2 = require(\"../utils\");\nconst errors_1 = require(\"../../../errors\");\nconst utils_3 = require(\"../../../utils\");\n/**\n * Fetch and persist messages from Pinpoint campaigns.\n * Calling this API is necessary to trigger InApp messages on the device.\n *\n * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Sync InApp messages with Pinpoint and device.\n * await syncMessages();\n *\n * ```\n */\nasync function syncMessages() {\n (0, utils_3.assertIsInitialized)();\n const messages = await fetchInAppMessages();\n if (!messages || messages.length === 0) {\n return;\n }\n try {\n const key = `${utils_2.PINPOINT_KEY_PREFIX}${utils_2.STORAGE_KEY_SUFFIX}`;\n await core_1.defaultStorage.setItem(key, JSON.stringify(messages));\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\nasync function fetchInAppMessages() {\n try {\n const { credentials, identityId } = await (0, utils_2.resolveCredentials)();\n const { appId, region } = (0, utils_2.resolveConfig)();\n const endpointId = await (0, pinpoint_1.resolveEndpointId)({\n appId,\n category: utils_2.CATEGORY,\n channelType: utils_2.CHANNEL_TYPE,\n credentials,\n identityId,\n region,\n userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.SyncMessages),\n });\n const input = {\n ApplicationId: appId,\n EndpointId: endpointId,\n };\n const response = await (0, pinpoint_2.getInAppMessages)({ credentials, region }, input);\n const { InAppMessageCampaigns: messages } = response.InAppMessagesResponse ?? {};\n return messages;\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,YAAY;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC;AAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,kDAAkD,CAAC;AAC9E,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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S,CAAC;AACV,QAAQ,MAAM,KAAK,GAAG;AACtB,YAAY,aAAa,EAAE,KAAK;AAChC,YAAY,UAAU,EAAE,UAAU;AAClC,SAAS;AACT,QAAQ,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC;AAC/F,QAAQ,MAAM,EAAE,qBAAqB,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,qBAAqB,IAAI,EAAE;AACxF,QAAQ,OAAO,QAAQ;AACvB,IAAI;AACJ,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC/C,QAAQ,MAAM,KAAK;AACnB,IAAI;AACJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/inAppMessaging/providers/pinpoint/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDismissed = exports.onMessageDisplayed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.syncMessages = exports.identifyUser = void 0;\nvar apis_1 = require(\"./apis\");\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return apis_1.identifyUser; } });\nObject.defineProperty(exports, \"syncMessages\", { enumerable: true, get: function () { return apis_1.syncMessages; } });\nObject.defineProperty(exports, \"dispatchEvent\", { enumerable: true, get: function () { return apis_1.dispatchEvent; } });\nObject.defineProperty(exports, \"setConflictHandler\", { enumerable: true, get: function () { return apis_1.setConflictHandler; } });\nObject.defineProperty(exports, \"initializeInAppMessaging\", { enumerable: true, get: function () { return apis_1.initializeInAppMessaging; } });\nObject.defineProperty(exports, \"onMessageReceived\", { enumerable: true, get: function () { return apis_1.onMessageReceived; } });\nObject.defineProperty(exports, \"onMessageDisplayed\", { enumerable: true, get: function () { return apis_1.onMessageDisplayed; } });\nObject.defineProperty(exports, \"onMessageDismissed\", { enumerable: true, get: function () { return apis_1.onMessageDismissed; } });\nObject.defineProperty(exports, \"onMessageActionTaken\", { enumerable: true, get: function () { return apis_1.onMessageActionTaken; } });\nObject.defineProperty(exports, \"notifyMessageInteraction\", { enumerable: true, get: function () { return apis_1.notifyMessageInteraction; } });\nObject.defineProperty(exports, \"clearMessages\", { enumerable: true, get: function () { return apis_1.clearMessages; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;AACpS,IAAI,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;AAC9B,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/inAppMessaging/providers/pinpoint/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDismissed = exports.onMessageDisplayed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.syncMessages = exports.identifyUser = void 0;\nvar apis_1 = require(\"./apis\");\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return apis_1.identifyUser; } });\nObject.defineProperty(exports, \"syncMessages\", { enumerable: true, get: function () { return apis_1.syncMessages; } });\nObject.defineProperty(exports, \"dispatchEvent\", { enumerable: true, get: function () { return apis_1.dispatchEvent; } });\nObject.defineProperty(exports, \"setConflictHandler\", { enumerable: true, get: function () { return apis_1.setConflictHandler; } });\nObject.defineProperty(exports, \"initializeInAppMessaging\", { enumerable: true, get: function () { return apis_1.initializeInAppMessaging; } });\nObject.defineProperty(exports, \"onMessageReceived\", { enumerable: true, get: function () { return apis_1.onMessageReceived; } });\nObject.defineProperty(exports, \"onMessageDisplayed\", { enumerable: true, get: function () { return apis_1.onMessageDisplayed; } });\nObject.defineProperty(exports, \"onMessageDismissed\", { enumerable: true, get: function () { return apis_1.onMessageDismissed; } });\nObject.defineProperty(exports, \"onMessageActionTaken\", { enumerable: true, get: function () { return apis_1.onMessageActionTaken; } });\nObject.defineProperty(exports, \"notifyMessageInteraction\", { enumerable: true, get: function () { return apis_1.notifyMessageInteraction; } });\nObject.defineProperty(exports, \"clearMessages\", { enumerable: true, get: function () { return apis_1.clearMessages; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;AACpS,IAAI,MAAM,GAAG,OAA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AAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;AAClI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;AACtI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9I,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PinpointMessageEvent = void 0;\nvar types_1 = require(\"./types\");\nObject.defineProperty(exports, \"PinpointMessageEvent\", { enumerable: true, get: function () { return types_1.PinpointMessageEvent; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oBAAoB,GAAG,MAAM;AACrC,IAAI,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAChC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,OAAO,CAAC,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PinpointMessageEvent = void 0;\nvar types_1 = require(\"./types\");\nObject.defineProperty(exports, \"PinpointMessageEvent\", { enumerable: true, get: function () { return types_1.PinpointMessageEvent; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oBAAoB,GAAG,MAAM;AACrC,IAAI,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAChC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conflictHandlerManager.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/conflictHandlerManager.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConflictHandler = exports.setConflictHandler = void 0;\n/**\n * The default conflict handler. Can be overridden by `setConflictHandler`.\n */\nlet conflictHandler = (messages) => {\n // default behavior is to return the message closest to expiry\n // this function assumes that messages processed by providers already filters out expired messages\n const sorted = messages.sort((a, b) => {\n const endDateA = a.metadata?.endDate;\n const endDateB = b.metadata?.endDate;\n // if both message end dates are falsy or have the same date string, treat them as equal\n if (endDateA === endDateB) {\n return 0;\n }\n // if only message A has an end date, treat it as closer to expiry\n if (endDateA && !endDateB) {\n return -1;\n }\n // if only message B has an end date, treat it as closer to expiry\n if (!endDateA && endDateB) {\n return 1;\n }\n // otherwise, compare them\n return new Date(endDateA) < new Date(endDateB) ? -1 : 1;\n });\n // always return the top sorted\n return sorted[0];\n};\n/**\n * Sets conflict handler.\n *\n * @internal\n */\nconst setConflictHandler = (input) => {\n conflictHandler = input;\n};\nexports.setConflictHandler = setConflictHandler;\n/**\n * Returns the current conflict handler.\n *\n * @internal\n */\nconst getConflictHandler = () => conflictHandler;\nexports.getConflictHandler = getConflictHandler;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,MAAM;AAChE;AACA;AACA;AACA,IAAI,eAAe,GAAG,CAAC,QAAQ,KAAK;AACpC;AACA;AACA,IAAI,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;AAC3C,QAAQ,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO;AAC5C,QAAQ,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO;AAC5C;AACA,QAAQ,IAAI,QAAQ,KAAK,QAAQ,EAAE;AACnC,YAAY,OAAO,CAAC;AACpB;
|
|
1
|
+
{"version":3,"file":"conflictHandlerManager.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/conflictHandlerManager.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConflictHandler = exports.setConflictHandler = void 0;\n/**\n * The default conflict handler. Can be overridden by `setConflictHandler`.\n */\nlet conflictHandler = (messages) => {\n // default behavior is to return the message closest to expiry\n // this function assumes that messages processed by providers already filters out expired messages\n const sorted = messages.sort((a, b) => {\n const endDateA = a.metadata?.endDate;\n const endDateB = b.metadata?.endDate;\n // if both message end dates are falsy or have the same date string, treat them as equal\n if (endDateA === endDateB) {\n return 0;\n }\n // if only message A has an end date, treat it as closer to expiry\n if (endDateA && !endDateB) {\n return -1;\n }\n // if only message B has an end date, treat it as closer to expiry\n if (!endDateA && endDateB) {\n return 1;\n }\n // otherwise, compare them\n return new Date(endDateA) < new Date(endDateB) ? -1 : 1;\n });\n // always return the top sorted\n return sorted[0];\n};\n/**\n * Sets conflict handler.\n *\n * @internal\n */\nconst setConflictHandler = (input) => {\n conflictHandler = input;\n};\nexports.setConflictHandler = setConflictHandler;\n/**\n * Returns the current conflict handler.\n *\n * @internal\n */\nconst getConflictHandler = () => conflictHandler;\nexports.getConflictHandler = getConflictHandler;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,MAAM;AAChE;AACA;AACA;AACA,IAAI,eAAe,GAAG,CAAC,QAAQ,KAAK;AACpC;AACA;AACA,IAAI,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;AAC3C,QAAQ,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO;AAC5C,QAAQ,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO;AAC5C;AACA,QAAQ,IAAI,QAAQ,KAAK,QAAQ,EAAE;AACnC,YAAY,OAAO,CAAC;AACpB,QAAQ;AACR;AACA,QAAQ,IAAI,QAAQ,IAAI,CAAC,QAAQ,EAAE;AACnC,YAAY,OAAO,EAAE;AACrB,QAAQ;AACR;AACA,QAAQ,IAAI,CAAC,QAAQ,IAAI,QAAQ,EAAE;AACnC,YAAY,OAAO,CAAC;AACpB,QAAQ;AACR;AACA,QAAQ,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;AAC/D,IAAI,CAAC,CAAC;AACN;AACA,IAAI,OAAO,MAAM,CAAC,CAAC,CAAC;AACpB,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,CAAC,KAAK,KAAK;AACtC,IAAI,eAAe,GAAG,KAAK;AAC3B,CAAC;AACD,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,MAAM,eAAe;AAChD,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/helpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mapOSPlatform = exports.extractMetadata = exports.extractContent = exports.interpretLayout = exports.clearMemo = exports.isQuietTime = exports.isBeforeEndDate = exports.getComparator = exports.matchesMetrics = exports.matchesAttributes = exports.matchesEventType = exports.getStartOfDay = exports.recordAnalyticsEvent = exports.logger = void 0;\nconst tslib_1 = require(\"tslib\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst isEmpty_js_1 = tslib_1.__importDefault(require(\"lodash/isEmpty.js\"));\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst resolveConfig_1 = require(\"./resolveConfig\");\nconst resolveCredentials_1 = require(\"./resolveCredentials\");\nconst constants_1 = require(\"./constants\");\nconst userAgent_1 = require(\"./userAgent\");\nconst DELIVERY_TYPE = 'IN_APP_MESSAGE';\nlet eventNameMemo = {};\nlet eventAttributesMemo = {};\nlet eventMetricsMemo = {};\nexports.logger = new core_1.ConsoleLogger('InAppMessaging.Pinpoint.Utils');\nconst recordAnalyticsEvent = (event, message) => {\n const { appId, region } = (0, resolveConfig_1.resolveConfig)();\n const { id, metadata } = message;\n (0, resolveCredentials_1.resolveCredentials)()\n .then(({ credentials, identityId }) => {\n (0, pinpoint_1.record)({\n appId,\n category: constants_1.CATEGORY,\n credentials,\n event: {\n name: event,\n attributes: {\n // only include campaign_id field if we have one\n ...(id && { campaign_id: id }),\n delivery_type: DELIVERY_TYPE,\n treatment_id: metadata?.treatmentId,\n },\n },\n identityId,\n region,\n userAgentValue: (0, userAgent_1.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.NotifyMessageInteraction),\n });\n })\n .catch(e => {\n // An error occured while fetching credentials or persisting the event to the buffer\n exports.logger.warn('Failed to record event.', e);\n });\n};\nexports.recordAnalyticsEvent = recordAnalyticsEvent;\nconst getStartOfDay = () => {\n const now = new Date();\n now.setHours(0, 0, 0, 0);\n return now.toISOString();\n};\nexports.getStartOfDay = getStartOfDay;\nconst matchesEventType = ({ CampaignId, Schedule }, { name: eventType }) => {\n const { EventType } = Schedule?.EventFilter?.Dimensions ?? {};\n const memoKey = `${CampaignId}:${eventType}`;\n if (!Object.prototype.hasOwnProperty.call(eventNameMemo, memoKey)) {\n eventNameMemo[memoKey] = !!EventType?.Values?.includes(eventType);\n }\n return eventNameMemo[memoKey];\n};\nexports.matchesEventType = matchesEventType;\nconst matchesAttributes = ({ CampaignId, Schedule }, { attributes = {} }) => {\n const { Attributes } = Schedule?.EventFilter?.Dimensions ?? {};\n if ((0, isEmpty_js_1.default)(Attributes)) {\n // if message does not have attributes defined it does not matter what attributes are on the event\n return true;\n }\n if ((0, isEmpty_js_1.default)(attributes)) {\n // if message does have attributes but the event does not then it always fails the check\n return false;\n }\n const memoKey = `${CampaignId}:${JSON.stringify(attributes)}`;\n if (!Object.prototype.hasOwnProperty.call(eventAttributesMemo, memoKey)) {\n eventAttributesMemo[memoKey] =\n !Attributes ||\n Object.entries(Attributes).every(([key, { Values }]) => Values?.includes(attributes[key]));\n }\n return eventAttributesMemo[memoKey];\n};\nexports.matchesAttributes = matchesAttributes;\nconst matchesMetrics = ({ CampaignId, Schedule }, { metrics = {} }) => {\n const { Metrics } = Schedule?.EventFilter?.Dimensions ?? {};\n if ((0, isEmpty_js_1.default)(Metrics)) {\n // if message does not have metrics defined it does not matter what metrics are on the event\n return true;\n }\n if ((0, isEmpty_js_1.default)(metrics)) {\n // if message does have metrics but the event does not then it always fails the check\n return false;\n }\n const memoKey = `${CampaignId}:${JSON.stringify(metrics)}`;\n if (!Object.prototype.hasOwnProperty.call(eventMetricsMemo, memoKey)) {\n eventMetricsMemo[memoKey] =\n !Metrics ||\n Object.entries(Metrics).every(([key, { ComparisonOperator, Value }]) => {\n const compare = (0, exports.getComparator)(ComparisonOperator);\n // if there is some unknown comparison operator, treat as a comparison failure\n return compare && !!Value ? compare(Value, metrics[key]) : false;\n });\n }\n return eventMetricsMemo[memoKey];\n};\nexports.matchesMetrics = matchesMetrics;\nconst getComparator = (operator) => {\n switch (operator) {\n case 'EQUAL':\n return (metricsVal, eventVal) => metricsVal === eventVal;\n case 'GREATER_THAN':\n return (metricsVal, eventVal) => metricsVal < eventVal;\n case 'GREATER_THAN_OR_EQUAL':\n return (metricsVal, eventVal) => metricsVal <= eventVal;\n case 'LESS_THAN':\n return (metricsVal, eventVal) => metricsVal > eventVal;\n case 'LESS_THAN_OR_EQUAL':\n return (metricsVal, eventVal) => metricsVal >= eventVal;\n default:\n return undefined;\n }\n};\nexports.getComparator = getComparator;\nconst isBeforeEndDate = ({ Schedule, }) => {\n if (!Schedule?.EndDate) {\n return true;\n }\n return new Date() < new Date(Schedule.EndDate);\n};\nexports.isBeforeEndDate = isBeforeEndDate;\nconst isQuietTime = (message) => {\n const { Schedule } = message;\n if (!Schedule?.QuietTime) {\n return false;\n }\n const pattern = /^[0-2]\\d:[0-5]\\d$/; // basic sanity check, not a fully featured HH:MM validation\n const { Start, End } = Schedule.QuietTime;\n if (!Start ||\n !End ||\n Start === End ||\n !pattern.test(Start) ||\n !pattern.test(End)) {\n return false;\n }\n const now = new Date();\n const start = new Date(now);\n const end = new Date(now);\n const [startHours, startMinutes] = Start.split(':');\n const [endHours, endMinutes] = End.split(':');\n start.setHours(Number.parseInt(startHours, 10), Number.parseInt(startMinutes, 10), 0, 0);\n end.setHours(Number.parseInt(endHours, 10), Number.parseInt(endMinutes, 10), 0, 0);\n // if quiet time includes midnight, bump the end time to the next day\n if (start > end) {\n end.setDate(end.getDate() + 1);\n }\n const isDuringQuietTime = now >= start && now <= end;\n if (isDuringQuietTime) {\n exports.logger.debug('message filtered due to quiet time', message);\n }\n return isDuringQuietTime;\n};\nexports.isQuietTime = isQuietTime;\nconst clearMemo = () => {\n eventNameMemo = {};\n eventAttributesMemo = {};\n eventMetricsMemo = {};\n};\nexports.clearMemo = clearMemo;\n// in the pinpoint console when a message is created with a Modal or Full Screen layout,\n// it is assigned a layout value of MOBILE_FEED or OVERLAYS respectively in the message payload.\n// In the future, Pinpoint will be updating the layout values in the aforementioned scenario\n// to MODAL and FULL_SCREEN.\n//\n// This utility acts as a safeguard to ensure that:\n// - 1. the usage of MOBILE_FEED and OVERLAYS as values for message layouts are not leaked\n// outside the Pinpoint provider\n// - 2. Amplify correctly handles the legacy layout values from Pinpoint after they are updated\nconst interpretLayout = (layout) => {\n if (layout === 'MOBILE_FEED') {\n return 'MODAL';\n }\n if (layout === 'OVERLAYS') {\n return 'FULL_SCREEN';\n }\n // cast as PinpointInAppMessage['InAppMessage']['Layout'] allows `string` as a value\n return layout;\n};\nexports.interpretLayout = interpretLayout;\nconst extractContent = ({ InAppMessage: message, }) => {\n const clientInfo = (0, utils_1.getClientInfo)();\n const configPlatform = (0, exports.mapOSPlatform)(clientInfo?.platform);\n return (message?.Content?.map(content => {\n const { BackgroundColor, BodyConfig, HeaderConfig, ImageUrl, PrimaryBtn, SecondaryBtn, } = content;\n const defaultPrimaryButton = getButtonConfig(configPlatform, PrimaryBtn);\n const defaultSecondaryButton = getButtonConfig(configPlatform, SecondaryBtn);\n const extractedContent = {};\n if (BackgroundColor) {\n extractedContent.container = {\n style: {\n backgroundColor: BackgroundColor,\n },\n };\n }\n if (HeaderConfig) {\n extractedContent.header = {\n // Default to empty string in rare cases we don't have a Header value\n content: HeaderConfig.Header ?? '',\n style: {\n color: HeaderConfig.TextColor,\n textAlign: HeaderConfig.Alignment?.toLowerCase(),\n },\n };\n }\n if (BodyConfig) {\n extractedContent.body = {\n // Default to empty string in rare cases we don't have a Body value\n content: BodyConfig.Body ?? '',\n style: {\n color: BodyConfig.TextColor,\n textAlign: BodyConfig.Alignment?.toLowerCase(),\n },\n };\n }\n if (ImageUrl) {\n extractedContent.image = {\n src: ImageUrl,\n };\n }\n if (defaultPrimaryButton) {\n extractedContent.primaryButton = {\n // Default to empty string in rare cases we don't have a Text value\n title: defaultPrimaryButton.Text ?? '',\n action: defaultPrimaryButton.ButtonAction,\n url: defaultPrimaryButton.Link,\n style: {\n backgroundColor: defaultPrimaryButton.BackgroundColor,\n borderRadius: defaultPrimaryButton.BorderRadius,\n color: defaultPrimaryButton.TextColor,\n },\n };\n }\n if (defaultSecondaryButton) {\n extractedContent.secondaryButton = {\n // Default to empty string in rare cases we don't have a Text value\n title: defaultSecondaryButton.Text ?? '',\n action: defaultSecondaryButton.ButtonAction,\n url: defaultSecondaryButton.Link,\n style: {\n backgroundColor: defaultSecondaryButton.BackgroundColor,\n borderRadius: defaultSecondaryButton.BorderRadius,\n color: defaultSecondaryButton.TextColor,\n },\n };\n }\n return extractedContent;\n }) ?? []);\n};\nexports.extractContent = extractContent;\nconst extractMetadata = ({ InAppMessage: inAppMessage, Priority, Schedule, TreatmentId, }) => ({\n customData: inAppMessage?.CustomConfig,\n endDate: Schedule?.EndDate,\n priority: Priority,\n treatmentId: TreatmentId,\n});\nexports.extractMetadata = extractMetadata;\nconst mapOSPlatform = (os) => {\n if (!os)\n return 'DefaultConfig';\n // Check if running in a web browser\n if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {\n return 'Web';\n }\n // Native environment checks\n switch (os) {\n case 'android':\n return 'Android';\n case 'ios':\n return 'IOS';\n default:\n return 'DefaultConfig';\n }\n};\nexports.mapOSPlatform = mapOSPlatform;\nconst getButtonConfig = (configPlatform, button) => {\n if (!button?.DefaultConfig) {\n return;\n }\n if (!configPlatform || !button?.[configPlatform]) {\n return button?.DefaultConfig;\n }\n return {\n ...button.DefaultConfig,\n ...button[configPlatform],\n };\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM;AAC/V,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAChC,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC1E,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC;AAC5E,MAAM,eAAe,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AAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,GAAG,MAAM;AAC/F,IAAI,UAAU,EAAE,YAAY,EAAE,YAAY;AAC1C,IAAI,OAAO,EAAE,QAAQ,EAAE,OAAO;AAC9B,IAAI,QAAQ,EAAE,QAAQ;AACtB,IAAI,WAAW,EAAE,WAAW;AAC5B,CAAC,CAAC;AACF,OAAO,CAAC,eAAe,GAAG,eAAe;AACzC,MAAM,aAAa,GAAG,CAAC,EAAE,KAAK;AAC9B,IAAI,IAAI,CAAC,EAAE;AACX,QAAQ,OAAO,eAAe;AAC9B;AACA,IAAI,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,EAAE;AACjF,QAAQ,OAAO,KAAK;AACpB;AACA;AACA,IAAI,QAAQ,EAAE;AACd,QAAQ,KAAK,SAAS;AACtB,YAAY,OAAO,SAAS;AAC5B,QAAQ,KAAK,KAAK;AAClB,YAAY,OAAO,KAAK;AACxB,QAAQ;AACR,YAAY,OAAO,eAAe;AAClC;AACA,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,eAAe,GAAG,CAAC,cAAc,EAAE,MAAM,KAAK;AACpD,IAAI,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE;AAChC,QAAQ;AACR;AACA,IAAI,IAAI,CAAC,cAAc,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC,EAAE;AACtD,QAAQ,OAAO,MAAM,EAAE,aAAa;AACpC;AACA,IAAI,OAAO;AACX,QAAQ,GAAG,MAAM,CAAC,aAAa;AAC/B,QAAQ,GAAG,MAAM,CAAC,cAAc,CAAC;AACjC,KAAK;AACL,CAAC;;"}
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/helpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mapOSPlatform = exports.extractMetadata = exports.extractContent = exports.interpretLayout = exports.clearMemo = exports.isQuietTime = exports.isBeforeEndDate = exports.getComparator = exports.matchesMetrics = exports.matchesAttributes = exports.matchesEventType = exports.getStartOfDay = exports.recordAnalyticsEvent = exports.logger = void 0;\nconst tslib_1 = require(\"tslib\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst isEmpty_js_1 = tslib_1.__importDefault(require(\"lodash/isEmpty.js\"));\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst resolveConfig_1 = require(\"./resolveConfig\");\nconst resolveCredentials_1 = require(\"./resolveCredentials\");\nconst constants_1 = require(\"./constants\");\nconst userAgent_1 = require(\"./userAgent\");\nconst DELIVERY_TYPE = 'IN_APP_MESSAGE';\nlet eventNameMemo = {};\nlet eventAttributesMemo = {};\nlet eventMetricsMemo = {};\nexports.logger = new core_1.ConsoleLogger('InAppMessaging.Pinpoint.Utils');\nconst recordAnalyticsEvent = (event, message) => {\n const { appId, region } = (0, resolveConfig_1.resolveConfig)();\n const { id, metadata } = message;\n (0, resolveCredentials_1.resolveCredentials)()\n .then(({ credentials, identityId }) => {\n (0, pinpoint_1.record)({\n appId,\n category: constants_1.CATEGORY,\n credentials,\n event: {\n name: event,\n attributes: {\n // only include campaign_id field if we have one\n ...(id && { campaign_id: id }),\n delivery_type: DELIVERY_TYPE,\n treatment_id: metadata?.treatmentId,\n },\n },\n identityId,\n region,\n userAgentValue: (0, userAgent_1.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.NotifyMessageInteraction),\n });\n })\n .catch(e => {\n // An error occured while fetching credentials or persisting the event to the buffer\n exports.logger.warn('Failed to record event.', e);\n });\n};\nexports.recordAnalyticsEvent = recordAnalyticsEvent;\nconst getStartOfDay = () => {\n const now = new Date();\n now.setHours(0, 0, 0, 0);\n return now.toISOString();\n};\nexports.getStartOfDay = getStartOfDay;\nconst matchesEventType = ({ CampaignId, Schedule }, { name: eventType }) => {\n const { EventType } = Schedule?.EventFilter?.Dimensions ?? {};\n const memoKey = `${CampaignId}:${eventType}`;\n if (!Object.prototype.hasOwnProperty.call(eventNameMemo, memoKey)) {\n eventNameMemo[memoKey] = !!EventType?.Values?.includes(eventType);\n }\n return eventNameMemo[memoKey];\n};\nexports.matchesEventType = matchesEventType;\nconst matchesAttributes = ({ CampaignId, Schedule }, { attributes = {} }) => {\n const { Attributes } = Schedule?.EventFilter?.Dimensions ?? {};\n if ((0, isEmpty_js_1.default)(Attributes)) {\n // if message does not have attributes defined it does not matter what attributes are on the event\n return true;\n }\n if ((0, isEmpty_js_1.default)(attributes)) {\n // if message does have attributes but the event does not then it always fails the check\n return false;\n }\n const memoKey = `${CampaignId}:${JSON.stringify(attributes)}`;\n if (!Object.prototype.hasOwnProperty.call(eventAttributesMemo, memoKey)) {\n eventAttributesMemo[memoKey] =\n !Attributes ||\n Object.entries(Attributes).every(([key, { Values }]) => Values?.includes(attributes[key]));\n }\n return eventAttributesMemo[memoKey];\n};\nexports.matchesAttributes = matchesAttributes;\nconst matchesMetrics = ({ CampaignId, Schedule }, { metrics = {} }) => {\n const { Metrics } = Schedule?.EventFilter?.Dimensions ?? {};\n if ((0, isEmpty_js_1.default)(Metrics)) {\n // if message does not have metrics defined it does not matter what metrics are on the event\n return true;\n }\n if ((0, isEmpty_js_1.default)(metrics)) {\n // if message does have metrics but the event does not then it always fails the check\n return false;\n }\n const memoKey = `${CampaignId}:${JSON.stringify(metrics)}`;\n if (!Object.prototype.hasOwnProperty.call(eventMetricsMemo, memoKey)) {\n eventMetricsMemo[memoKey] =\n !Metrics ||\n Object.entries(Metrics).every(([key, { ComparisonOperator, Value }]) => {\n const compare = (0, exports.getComparator)(ComparisonOperator);\n // if there is some unknown comparison operator, treat as a comparison failure\n return compare && !!Value ? compare(Value, metrics[key]) : false;\n });\n }\n return eventMetricsMemo[memoKey];\n};\nexports.matchesMetrics = matchesMetrics;\nconst getComparator = (operator) => {\n switch (operator) {\n case 'EQUAL':\n return (metricsVal, eventVal) => metricsVal === eventVal;\n case 'GREATER_THAN':\n return (metricsVal, eventVal) => metricsVal < eventVal;\n case 'GREATER_THAN_OR_EQUAL':\n return (metricsVal, eventVal) => metricsVal <= eventVal;\n case 'LESS_THAN':\n return (metricsVal, eventVal) => metricsVal > eventVal;\n case 'LESS_THAN_OR_EQUAL':\n return (metricsVal, eventVal) => metricsVal >= eventVal;\n default:\n return undefined;\n }\n};\nexports.getComparator = getComparator;\nconst isBeforeEndDate = ({ Schedule, }) => {\n if (!Schedule?.EndDate) {\n return true;\n }\n return new Date() < new Date(Schedule.EndDate);\n};\nexports.isBeforeEndDate = isBeforeEndDate;\nconst isQuietTime = (message) => {\n const { Schedule } = message;\n if (!Schedule?.QuietTime) {\n return false;\n }\n const pattern = /^[0-2]\\d:[0-5]\\d$/; // basic sanity check, not a fully featured HH:MM validation\n const { Start, End } = Schedule.QuietTime;\n if (!Start ||\n !End ||\n Start === End ||\n !pattern.test(Start) ||\n !pattern.test(End)) {\n return false;\n }\n const now = new Date();\n const start = new Date(now);\n const end = new Date(now);\n const [startHours, startMinutes] = Start.split(':');\n const [endHours, endMinutes] = End.split(':');\n start.setHours(Number.parseInt(startHours, 10), Number.parseInt(startMinutes, 10), 0, 0);\n end.setHours(Number.parseInt(endHours, 10), Number.parseInt(endMinutes, 10), 0, 0);\n // if quiet time includes midnight, bump the end time to the next day\n if (start > end) {\n end.setDate(end.getDate() + 1);\n }\n const isDuringQuietTime = now >= start && now <= end;\n if (isDuringQuietTime) {\n exports.logger.debug('message filtered due to quiet time', message);\n }\n return isDuringQuietTime;\n};\nexports.isQuietTime = isQuietTime;\nconst clearMemo = () => {\n eventNameMemo = {};\n eventAttributesMemo = {};\n eventMetricsMemo = {};\n};\nexports.clearMemo = clearMemo;\n// in the pinpoint console when a message is created with a Modal or Full Screen layout,\n// it is assigned a layout value of MOBILE_FEED or OVERLAYS respectively in the message payload.\n// In the future, Pinpoint will be updating the layout values in the aforementioned scenario\n// to MODAL and FULL_SCREEN.\n//\n// This utility acts as a safeguard to ensure that:\n// - 1. the usage of MOBILE_FEED and OVERLAYS as values for message layouts are not leaked\n// outside the Pinpoint provider\n// - 2. Amplify correctly handles the legacy layout values from Pinpoint after they are updated\nconst interpretLayout = (layout) => {\n if (layout === 'MOBILE_FEED') {\n return 'MODAL';\n }\n if (layout === 'OVERLAYS') {\n return 'FULL_SCREEN';\n }\n // cast as PinpointInAppMessage['InAppMessage']['Layout'] allows `string` as a value\n return layout;\n};\nexports.interpretLayout = interpretLayout;\nconst extractContent = ({ InAppMessage: message, }) => {\n const clientInfo = (0, utils_1.getClientInfo)();\n const configPlatform = (0, exports.mapOSPlatform)(clientInfo?.platform);\n return (message?.Content?.map(content => {\n const { BackgroundColor, BodyConfig, HeaderConfig, ImageUrl, PrimaryBtn, SecondaryBtn, } = content;\n const defaultPrimaryButton = getButtonConfig(configPlatform, PrimaryBtn);\n const defaultSecondaryButton = getButtonConfig(configPlatform, SecondaryBtn);\n const extractedContent = {};\n if (BackgroundColor) {\n extractedContent.container = {\n style: {\n backgroundColor: BackgroundColor,\n },\n };\n }\n if (HeaderConfig) {\n extractedContent.header = {\n // Default to empty string in rare cases we don't have a Header value\n content: HeaderConfig.Header ?? '',\n style: {\n color: HeaderConfig.TextColor,\n textAlign: HeaderConfig.Alignment?.toLowerCase(),\n },\n };\n }\n if (BodyConfig) {\n extractedContent.body = {\n // Default to empty string in rare cases we don't have a Body value\n content: BodyConfig.Body ?? '',\n style: {\n color: BodyConfig.TextColor,\n textAlign: BodyConfig.Alignment?.toLowerCase(),\n },\n };\n }\n if (ImageUrl) {\n extractedContent.image = {\n src: ImageUrl,\n };\n }\n if (defaultPrimaryButton) {\n extractedContent.primaryButton = {\n // Default to empty string in rare cases we don't have a Text value\n title: defaultPrimaryButton.Text ?? '',\n action: defaultPrimaryButton.ButtonAction,\n url: defaultPrimaryButton.Link,\n style: {\n backgroundColor: defaultPrimaryButton.BackgroundColor,\n borderRadius: defaultPrimaryButton.BorderRadius,\n color: defaultPrimaryButton.TextColor,\n },\n };\n }\n if (defaultSecondaryButton) {\n extractedContent.secondaryButton = {\n // Default to empty string in rare cases we don't have a Text value\n title: defaultSecondaryButton.Text ?? '',\n action: defaultSecondaryButton.ButtonAction,\n url: defaultSecondaryButton.Link,\n style: {\n backgroundColor: defaultSecondaryButton.BackgroundColor,\n borderRadius: defaultSecondaryButton.BorderRadius,\n color: defaultSecondaryButton.TextColor,\n },\n };\n }\n return extractedContent;\n }) ?? []);\n};\nexports.extractContent = extractContent;\nconst extractMetadata = ({ InAppMessage: inAppMessage, Priority, Schedule, TreatmentId, }) => ({\n customData: inAppMessage?.CustomConfig,\n endDate: Schedule?.EndDate,\n priority: Priority,\n treatmentId: TreatmentId,\n});\nexports.extractMetadata = extractMetadata;\nconst mapOSPlatform = (os) => {\n if (!os)\n return 'DefaultConfig';\n // Check if running in a web browser\n if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {\n return 'Web';\n }\n // Native environment checks\n switch (os) {\n case 'android':\n return 'Android';\n case 'ios':\n return 'IOS';\n default:\n return 'DefaultConfig';\n }\n};\nexports.mapOSPlatform = mapOSPlatform;\nconst getButtonConfig = (configPlatform, button) => {\n if (!button?.DefaultConfig) {\n return;\n }\n if (!configPlatform || !button?.[configPlatform]) {\n return button?.DefaultConfig;\n }\n return {\n ...button.DefaultConfig,\n ...button[configPlatform],\n };\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,eAAe,GAAG,OA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AAQ,KAAK,KAAK;AAClB,YAAY,OAAO,KAAK;AACxB,QAAQ;AACR,YAAY,OAAO,eAAe;AAClC;AACA,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,eAAe,GAAG,CAAC,cAAc,EAAE,MAAM,KAAK;AACpD,IAAI,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE;AAChC,QAAQ;AACR,IAAI;AACJ,IAAI,IAAI,CAAC,cAAc,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC,EAAE;AACtD,QAAQ,OAAO,MAAM,EAAE,aAAa;AACpC,IAAI;AACJ,IAAI,OAAO;AACX,QAAQ,GAAG,MAAM,CAAC,aAAa;AAC/B,QAAQ,GAAG,MAAM,CAAC,cAAc,CAAC;AACjC,KAAK;AACL,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.incrementMessageCounts = exports.sessionStateChangeHandler = exports.processInAppMessages = exports.STORAGE_KEY_SUFFIX = exports.CHANNEL_TYPE = exports.CATEGORY = exports.PINPOINT_KEY_PREFIX = exports.getInAppMessagingUserAgentString = exports.resolveCredentials = exports.resolveConfig = exports.setConflictHandler = exports.getConflictHandler = void 0;\nvar conflictHandlerManager_1 = require(\"./conflictHandlerManager\");\nObject.defineProperty(exports, \"getConflictHandler\", { enumerable: true, get: function () { return conflictHandlerManager_1.getConflictHandler; } });\nObject.defineProperty(exports, \"setConflictHandler\", { enumerable: true, get: function () { return conflictHandlerManager_1.setConflictHandler; } });\nvar resolveConfig_1 = require(\"./resolveConfig\");\nObject.defineProperty(exports, \"resolveConfig\", { enumerable: true, get: function () { return resolveConfig_1.resolveConfig; } });\nvar resolveCredentials_1 = require(\"./resolveCredentials\");\nObject.defineProperty(exports, \"resolveCredentials\", { enumerable: true, get: function () { return resolveCredentials_1.resolveCredentials; } });\nvar userAgent_1 = require(\"./userAgent\");\nObject.defineProperty(exports, \"getInAppMessagingUserAgentString\", { enumerable: true, get: function () { return userAgent_1.getInAppMessagingUserAgentString; } });\nvar constants_1 = require(\"./constants\");\nObject.defineProperty(exports, \"PINPOINT_KEY_PREFIX\", { enumerable: true, get: function () { return constants_1.PINPOINT_KEY_PREFIX; } });\nObject.defineProperty(exports, \"CATEGORY\", { enumerable: true, get: function () { return constants_1.CATEGORY; } });\nObject.defineProperty(exports, \"CHANNEL_TYPE\", { enumerable: true, get: function () { return constants_1.CHANNEL_TYPE; } });\nObject.defineProperty(exports, \"STORAGE_KEY_SUFFIX\", { enumerable: true, get: function () { return constants_1.STORAGE_KEY_SUFFIX; } });\nvar messageProcessingHelpers_1 = require(\"./messageProcessingHelpers\");\nObject.defineProperty(exports, \"processInAppMessages\", { enumerable: true, get: function () { return messageProcessingHelpers_1.processInAppMessages; } });\nObject.defineProperty(exports, \"sessionStateChangeHandler\", { enumerable: true, get: function () { return messageProcessingHelpers_1.sessionStateChangeHandler; } });\nObject.defineProperty(exports, \"incrementMessageCounts\", { enumerable: true, get: function () { return messageProcessingHelpers_1.incrementMessageCounts; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,gCAAgC,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,MAAM;AACzW,IAAI,wBAAwB,GAAG,OAAO,CAAC,0BAA0B,CAAC;AAClE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,wBAAwB,CAAC,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.incrementMessageCounts = exports.sessionStateChangeHandler = exports.processInAppMessages = exports.STORAGE_KEY_SUFFIX = exports.CHANNEL_TYPE = exports.CATEGORY = exports.PINPOINT_KEY_PREFIX = exports.getInAppMessagingUserAgentString = exports.resolveCredentials = exports.resolveConfig = exports.setConflictHandler = exports.getConflictHandler = void 0;\nvar conflictHandlerManager_1 = require(\"./conflictHandlerManager\");\nObject.defineProperty(exports, \"getConflictHandler\", { enumerable: true, get: function () { return conflictHandlerManager_1.getConflictHandler; } });\nObject.defineProperty(exports, \"setConflictHandler\", { enumerable: true, get: function () { return conflictHandlerManager_1.setConflictHandler; } });\nvar resolveConfig_1 = require(\"./resolveConfig\");\nObject.defineProperty(exports, \"resolveConfig\", { enumerable: true, get: function () { return resolveConfig_1.resolveConfig; } });\nvar resolveCredentials_1 = require(\"./resolveCredentials\");\nObject.defineProperty(exports, \"resolveCredentials\", { enumerable: true, get: function () { return resolveCredentials_1.resolveCredentials; } });\nvar userAgent_1 = require(\"./userAgent\");\nObject.defineProperty(exports, \"getInAppMessagingUserAgentString\", { enumerable: true, get: function () { return userAgent_1.getInAppMessagingUserAgentString; } });\nvar constants_1 = require(\"./constants\");\nObject.defineProperty(exports, \"PINPOINT_KEY_PREFIX\", { enumerable: true, get: function () { return constants_1.PINPOINT_KEY_PREFIX; } });\nObject.defineProperty(exports, \"CATEGORY\", { enumerable: true, get: function () { return constants_1.CATEGORY; } });\nObject.defineProperty(exports, \"CHANNEL_TYPE\", { enumerable: true, get: function () { return constants_1.CHANNEL_TYPE; } });\nObject.defineProperty(exports, \"STORAGE_KEY_SUFFIX\", { enumerable: true, get: function () { return constants_1.STORAGE_KEY_SUFFIX; } });\nvar messageProcessingHelpers_1 = require(\"./messageProcessingHelpers\");\nObject.defineProperty(exports, \"processInAppMessages\", { enumerable: true, get: function () { return messageProcessingHelpers_1.processInAppMessages; } });\nObject.defineProperty(exports, \"sessionStateChangeHandler\", { enumerable: true, get: function () { return messageProcessingHelpers_1.sessionStateChangeHandler; } });\nObject.defineProperty(exports, \"incrementMessageCounts\", { enumerable: true, get: function () { return messageProcessingHelpers_1.incrementMessageCounts; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,gCAAgC,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,MAAM;AACzW,IAAI,wBAAwB,GAAG,OAAO,CAAC,0BAA0B,CAAC;AAClE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,wBAAwB,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;AACpJ,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EA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G,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3H,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;AACvI,IAAI,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC;AACtE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,0BAA0B,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1J,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,2BAA2B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,0BAA0B,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,CAAC;AACpK,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,wBAAwB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,0BAA0B,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageProcessingHelpers.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.processInAppMessages = processInAppMessages;\nexports.sessionStateChangeHandler = sessionStateChangeHandler;\nexports.incrementMessageCounts = incrementMessageCounts;\nconst core_1 = require(\"@aws-amplify/core\");\nconst helpers_1 = require(\"./helpers\");\nconst MESSAGE_DAILY_COUNT_KEY = 'pinpointProvider_inAppMessages_dailyCount';\nconst MESSAGE_TOTAL_COUNT_KEY = 'pinpointProvider_inAppMessages_totalCount';\nconst logger = new core_1.ConsoleLogger('InAppMessaging.processInAppMessages');\nlet sessionMessageCountMap = {};\nasync function processInAppMessages(messages, event) {\n let highestPrioritySeen;\n let acc = [];\n for (const message of messages) {\n const messageQualifies = (0, helpers_1.matchesEventType)(message, event) &&\n (0, helpers_1.matchesAttributes)(message, event) &&\n (0, helpers_1.matchesMetrics)(message, event) &&\n (0, helpers_1.isBeforeEndDate)(message) &&\n (await isBelowCap(message));\n // filter all qualifying messages returning only those that are of (relative) highest priority\n if (messageQualifies) {\n // have not yet encountered message with priority\n if (!highestPrioritySeen) {\n // this message has priority, so reset the accumulator with this message only\n if (message.Priority) {\n highestPrioritySeen = message.Priority;\n acc = [message];\n }\n else {\n // this message also has no priority, so just add this message to accumulator\n acc.push(message);\n }\n // have previously encountered message with priority, so only messages with priority matter now\n }\n else if (message.Priority) {\n // this message has higher priority (lower number), so reset the accumulator with this message only\n if (message.Priority < highestPrioritySeen) {\n highestPrioritySeen = message.Priority;\n acc = [message];\n // this message has the same priority, so just add this message to accumulator\n }\n else if (message.Priority === highestPrioritySeen) {\n acc.push(message);\n }\n }\n }\n }\n return normalizeMessages(acc);\n}\nfunction sessionStateChangeHandler(state) {\n if (state === 'started') {\n // reset all session counts\n sessionMessageCountMap = {};\n }\n}\nasync function incrementMessageCounts(messageId) {\n const { sessionCount, dailyCount, totalCount } = await getMessageCounts(messageId);\n setSessionCount(messageId, sessionCount + 1);\n setDailyCount(dailyCount + 1);\n await setTotalCount(messageId, totalCount + 1);\n}\nfunction normalizeMessages(messages) {\n return messages.map(message => {\n const { CampaignId, InAppMessage: pinpointInAppMessage } = message;\n return {\n // Default to empty string in rare cases we don't have a campaignId\n id: CampaignId ?? '',\n content: (0, helpers_1.extractContent)(message),\n // Default to TOP_BANNER layout in rare cases we don't have a Layout\n layout: pinpointInAppMessage?.Layout\n ? (0, helpers_1.interpretLayout)(pinpointInAppMessage.Layout)\n : 'TOP_BANNER',\n metadata: (0, helpers_1.extractMetadata)(message),\n };\n });\n}\nasync function isBelowCap({ CampaignId, SessionCap, DailyCap, TotalCap, }) {\n const { sessionCount, dailyCount, totalCount } = await getMessageCounts(CampaignId);\n return ((!SessionCap || sessionCount < SessionCap) &&\n (!DailyCap || dailyCount < DailyCap) &&\n (!TotalCap || totalCount < TotalCap));\n}\nasync function getMessageCounts(messageId) {\n let messageCounts = {\n sessionCount: 0,\n dailyCount: 0,\n totalCount: 0,\n };\n try {\n // only return true counts if there is a messageId else default to 0\n if (messageId)\n messageCounts = {\n sessionCount: getSessionCount(messageId),\n dailyCount: await getDailyCount(),\n totalCount: await getTotalCount(messageId),\n };\n return messageCounts;\n }\n catch (err) {\n logger.error('Failed to get message counts from storage', err);\n // If there are no cached counts or there is an error,\n // we default to 0 allowing all the messages to be eligible\n return messageCounts;\n }\n}\nfunction getSessionCount(messageId) {\n return sessionMessageCountMap[messageId] ?? 0;\n}\nfunction setSessionCount(messageId, count) {\n sessionMessageCountMap[messageId] = count;\n}\nfunction setDailyCount(count) {\n const dailyCount = {\n count,\n lastCountTimestamp: getStartOfDay(),\n };\n try {\n core_1.defaultStorage.setItem(MESSAGE_DAILY_COUNT_KEY, JSON.stringify(dailyCount));\n }\n catch (err) {\n logger.error('Failed to save daily message count to storage', err);\n }\n}\nfunction setTotalCountMap(countMap) {\n try {\n core_1.defaultStorage.setItem(MESSAGE_TOTAL_COUNT_KEY, JSON.stringify(countMap));\n }\n catch (err) {\n logger.error('Failed to save total count to storage', err);\n }\n}\nasync function setTotalCount(messageId, count) {\n const totalCountMap = await getTotalCountMap();\n const updatedMap = {\n ...totalCountMap,\n [messageId]: count,\n };\n setTotalCountMap(updatedMap);\n}\nasync function getDailyCount() {\n const today = getStartOfDay();\n const item = await core_1.defaultStorage.getItem(MESSAGE_DAILY_COUNT_KEY);\n // Parse stored count or initialize as empty count\n const counter = item\n ? JSON.parse(item)\n : { count: 0, lastCountTimestamp: today };\n // If the stored counter timestamp is today, use it as the count, otherwise reset to 0\n return counter.lastCountTimestamp === today ? counter.count : 0;\n}\nasync function getTotalCountMap() {\n const item = await core_1.defaultStorage.getItem(MESSAGE_TOTAL_COUNT_KEY);\n // Parse stored count map or initialize as empty\n return item ? JSON.parse(item) : {};\n}\nasync function getTotalCount(messageId) {\n const countMap = await getTotalCountMap();\n // Return stored count or initialize as empty count\n return countMap[messageId] || 0;\n}\nconst getStartOfDay = () => {\n const now = new Date();\n now.setHours(0, 0, 0, 0);\n return now.toISOString();\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oBAAoB,GAAG,oBAAoB;AACnD,OAAO,CAAC,yBAAyB,GAAG,yBAAyB;AAC7D,OAAO,CAAC,sBAAsB,GAAG,sBAAsB;AACvD,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC,MAAM,uBAAuB,GAAG,2CAA2C;AAC3E,MAAM,uBAAuB,GAAG,2CAA2C;AAC3E,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,aAAa,CAAC,qCAAqC,CAAC;AAC9E,IAAI,sBAAsB,GAAG,EAAE;AAC/B,eAAe,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE;AACrD,IAAI,IAAI,mBAAmB;AAC3B,IAAI,IAAI,GAAG,GAAG,EAAE;AAChB,IAAI,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;AACpC,QAAQ,MAAM,gBAAgB,GAAG,IAAI,SAAS,CAAC,gBAAgB,EAAE,OAAO,EAAE,KAAK,CAAC;AAChF,YAAY,IAAI,SAAS,CAAC,iBAAiB,EAAE,OAAO,EAAE,KAAK,CAAC;AAC5D,YAAY,IAAI,SAAS,CAAC,cAA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/utils/messageProcessingHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.processInAppMessages = processInAppMessages;\nexports.sessionStateChangeHandler = sessionStateChangeHandler;\nexports.incrementMessageCounts = incrementMessageCounts;\nconst core_1 = require(\"@aws-amplify/core\");\nconst helpers_1 = require(\"./helpers\");\nconst MESSAGE_DAILY_COUNT_KEY = 'pinpointProvider_inAppMessages_dailyCount';\nconst MESSAGE_TOTAL_COUNT_KEY = 'pinpointProvider_inAppMessages_totalCount';\nconst logger = new core_1.ConsoleLogger('InAppMessaging.processInAppMessages');\nlet sessionMessageCountMap = {};\nasync function processInAppMessages(messages, event) {\n let highestPrioritySeen;\n let acc = [];\n for (const message of messages) {\n const messageQualifies = (0, helpers_1.matchesEventType)(message, event) &&\n (0, helpers_1.matchesAttributes)(message, event) &&\n (0, helpers_1.matchesMetrics)(message, event) &&\n (0, helpers_1.isBeforeEndDate)(message) &&\n (await isBelowCap(message));\n // filter all qualifying messages returning only those that are of (relative) highest priority\n if (messageQualifies) {\n // have not yet encountered message with priority\n if (!highestPrioritySeen) {\n // this message has priority, so reset the accumulator with this message only\n if (message.Priority) {\n highestPrioritySeen = message.Priority;\n acc = [message];\n }\n else {\n // this message also has no priority, so just add this message to accumulator\n acc.push(message);\n }\n // have previously encountered message with priority, so only messages with priority matter now\n }\n else if (message.Priority) {\n // this message has higher priority (lower number), so reset the accumulator with this message only\n if (message.Priority < highestPrioritySeen) {\n highestPrioritySeen = message.Priority;\n acc = [message];\n // this message has the same priority, so just add this message to accumulator\n }\n else if (message.Priority === highestPrioritySeen) {\n acc.push(message);\n }\n }\n }\n }\n return normalizeMessages(acc);\n}\nfunction sessionStateChangeHandler(state) {\n if (state === 'started') {\n // reset all session counts\n sessionMessageCountMap = {};\n }\n}\nasync function incrementMessageCounts(messageId) {\n const { sessionCount, dailyCount, totalCount } = await getMessageCounts(messageId);\n setSessionCount(messageId, sessionCount + 1);\n setDailyCount(dailyCount + 1);\n await setTotalCount(messageId, totalCount + 1);\n}\nfunction normalizeMessages(messages) {\n return messages.map(message => {\n const { CampaignId, InAppMessage: pinpointInAppMessage } = message;\n return {\n // Default to empty string in rare cases we don't have a campaignId\n id: CampaignId ?? '',\n content: (0, helpers_1.extractContent)(message),\n // Default to TOP_BANNER layout in rare cases we don't have a Layout\n layout: pinpointInAppMessage?.Layout\n ? (0, helpers_1.interpretLayout)(pinpointInAppMessage.Layout)\n : 'TOP_BANNER',\n metadata: (0, helpers_1.extractMetadata)(message),\n };\n });\n}\nasync function isBelowCap({ CampaignId, SessionCap, DailyCap, TotalCap, }) {\n const { sessionCount, dailyCount, totalCount } = await getMessageCounts(CampaignId);\n return ((!SessionCap || sessionCount < SessionCap) &&\n (!DailyCap || dailyCount < DailyCap) &&\n (!TotalCap || totalCount < TotalCap));\n}\nasync function getMessageCounts(messageId) {\n let messageCounts = {\n sessionCount: 0,\n dailyCount: 0,\n totalCount: 0,\n };\n try {\n // only return true counts if there is a messageId else default to 0\n if (messageId)\n messageCounts = {\n sessionCount: getSessionCount(messageId),\n dailyCount: await getDailyCount(),\n totalCount: await getTotalCount(messageId),\n };\n return messageCounts;\n }\n catch (err) {\n logger.error('Failed to get message counts from storage', err);\n // If there are no cached counts or there is an error,\n // we default to 0 allowing all the messages to be eligible\n return messageCounts;\n }\n}\nfunction getSessionCount(messageId) {\n return sessionMessageCountMap[messageId] ?? 0;\n}\nfunction setSessionCount(messageId, count) {\n sessionMessageCountMap[messageId] = count;\n}\nfunction setDailyCount(count) {\n const dailyCount = {\n count,\n lastCountTimestamp: getStartOfDay(),\n };\n try {\n core_1.defaultStorage.setItem(MESSAGE_DAILY_COUNT_KEY, JSON.stringify(dailyCount));\n }\n catch (err) {\n logger.error('Failed to save daily message count to storage', err);\n }\n}\nfunction setTotalCountMap(countMap) {\n try {\n core_1.defaultStorage.setItem(MESSAGE_TOTAL_COUNT_KEY, JSON.stringify(countMap));\n }\n catch (err) {\n logger.error('Failed to save total count to storage', err);\n }\n}\nasync function setTotalCount(messageId, count) {\n const totalCountMap = await getTotalCountMap();\n const updatedMap = {\n ...totalCountMap,\n [messageId]: count,\n };\n setTotalCountMap(updatedMap);\n}\nasync function getDailyCount() {\n const today = getStartOfDay();\n const item = await core_1.defaultStorage.getItem(MESSAGE_DAILY_COUNT_KEY);\n // Parse stored count or initialize as empty count\n const counter = item\n ? JSON.parse(item)\n : { count: 0, lastCountTimestamp: today };\n // If the stored counter timestamp is today, use it as the count, otherwise reset to 0\n return counter.lastCountTimestamp === today ? counter.count : 0;\n}\nasync function getTotalCountMap() {\n const item = await core_1.defaultStorage.getItem(MESSAGE_TOTAL_COUNT_KEY);\n // Parse stored count map or initialize as empty\n return item ? JSON.parse(item) : {};\n}\nasync function getTotalCount(messageId) {\n const countMap = await getTotalCountMap();\n // Return stored count or initialize as empty count\n return countMap[messageId] || 0;\n}\nconst getStartOfDay = () => {\n const now = new Date();\n now.setHours(0, 0, 0, 0);\n return now.toISOString();\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oBAAoB,GAAG,oBAAoB;AACnD,OAAO,CAAC,yBAAyB,GAAG,yBAAyB;AAC7D,OAAO,CAAC,sBAAsB,GAAG,sBAAsB;AACvD,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC,MAAM,uBAAuB,GAAG,2CAA2C;AAC3E,MAAM,uBAAuB,GAAG,2CAA2C;AAC3E,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,aAAa,CAAC,qCAAqC,CAAC;AAC9E,IAAI,sBAAsB,GAAG,EAAE;AAC/B,eAAe,oBAAoB,CAAC,QAAQ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,eAAe,aAAa,CAAC,SAAS,EAAE;AACxC,IAAI,MAAM,QAAQ,GAAG,MAAM,gBAAgB,EAAE;AAC7C;AACA,IAAI,OAAO,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;AACnC;AACA,MAAM,aAAa,GAAG,MAAM;AAC5B,IAAI,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE;AAC1B,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5B,IAAI,OAAO,GAAG,CAAC,WAAW,EAAE;AAC5B,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/inAppMessaging/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initialize = exports.assertIsInitialized = exports.isInitialized = void 0;\nvar statusHelpers_1 = require(\"./statusHelpers\");\nObject.defineProperty(exports, \"isInitialized\", { enumerable: true, get: function () { return statusHelpers_1.isInitialized; } });\nObject.defineProperty(exports, \"assertIsInitialized\", { enumerable: true, get: function () { return statusHelpers_1.assertIsInitialized; } });\nObject.defineProperty(exports, \"initialize\", { enumerable: true, get: function () { return statusHelpers_1.initialize; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,aAAa,GAAG,MAAM;AACjF,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAChD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/inAppMessaging/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initialize = exports.assertIsInitialized = exports.isInitialized = void 0;\nvar statusHelpers_1 = require(\"./statusHelpers\");\nObject.defineProperty(exports, \"isInitialized\", { enumerable: true, get: function () { return statusHelpers_1.isInitialized; } });\nObject.defineProperty(exports, \"assertIsInitialized\", { enumerable: true, get: function () { return statusHelpers_1.assertIsInitialized; } });\nObject.defineProperty(exports, \"initialize\", { enumerable: true, get: function () { return statusHelpers_1.initialize; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,aAAa,GAAG,MAAM;AACjF,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAChD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;AACjI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,qBAAqB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7I,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushNotificationError.js","sources":["../../../../src/pushNotifications/errors/PushNotificationError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PushNotificationError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nclass PushNotificationError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = PushNotificationError;\n Object.setPrototypeOf(this, PushNotificationError.prototype);\n }\n}\nexports.PushNotificationError = PushNotificationError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,MAAM;AACtC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,qBAAqB,SAAS,OAAO,CAAC,YAAY,CAAC;AACzD,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC;AACrB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,qBAAqB;AAChD,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC;AACpE;
|
|
1
|
+
{"version":3,"file":"PushNotificationError.js","sources":["../../../../src/pushNotifications/errors/PushNotificationError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PushNotificationError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nclass PushNotificationError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = PushNotificationError;\n Object.setPrototypeOf(this, PushNotificationError.prototype);\n }\n}\nexports.PushNotificationError = PushNotificationError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,MAAM;AACtC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,qBAAqB,SAAS,OAAO,CAAC,YAAY,CAAC;AACzD,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC;AACrB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,qBAAqB;AAChD,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC;AACpE,IAAI;AACJ;AACA,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/pushNotifications/errors/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PushNotificationValidationErrorCode = exports.assert = exports.PushNotificationError = void 0;\nvar PushNotificationError_1 = require(\"./PushNotificationError\");\nObject.defineProperty(exports, \"PushNotificationError\", { enumerable: true, get: function () { return PushNotificationError_1.PushNotificationError; } });\nvar errorHelpers_1 = require(\"./errorHelpers\");\nObject.defineProperty(exports, \"assert\", { enumerable: true, get: function () { return errorHelpers_1.assert; } });\nObject.defineProperty(exports, \"PushNotificationValidationErrorCode\", { enumerable: true, get: function () { return errorHelpers_1.PushNotificationValidationErrorCode; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,mCAAmC,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,MAAM;AACrG,IAAI,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;AAChE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,uBAAuB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,uBAAuB,CAAC,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/pushNotifications/errors/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PushNotificationValidationErrorCode = exports.assert = exports.PushNotificationError = void 0;\nvar PushNotificationError_1 = require(\"./PushNotificationError\");\nObject.defineProperty(exports, \"PushNotificationError\", { enumerable: true, get: function () { return PushNotificationError_1.PushNotificationError; } });\nvar errorHelpers_1 = require(\"./errorHelpers\");\nObject.defineProperty(exports, \"assert\", { enumerable: true, get: function () { return errorHelpers_1.assert; } });\nObject.defineProperty(exports, \"PushNotificationValidationErrorCode\", { enumerable: true, get: function () { return errorHelpers_1.PushNotificationValidationErrorCode; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,mCAAmC,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,MAAM;AACrG,IAAI,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;AAChE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,uBAAuB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,uBAAuB,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC;AACzJ,IAAI,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;AAC9C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AAClH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,qCAAqC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,mCAAmC,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/pushNotifications/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PushNotificationError = exports.setBadgeCount = exports.requestPermissions = exports.onTokenReceived = exports.onNotificationReceivedInForeground = exports.onNotificationReceivedInBackground = exports.onNotificationOpened = exports.initializePushNotifications = exports.identifyUser = exports.getPermissionStatus = exports.getLaunchNotification = exports.getBadgeCount = void 0;\nvar pinpoint_1 = require(\"./providers/pinpoint\");\nObject.defineProperty(exports, \"getBadgeCount\", { enumerable: true, get: function () { return pinpoint_1.getBadgeCount; } });\nObject.defineProperty(exports, \"getLaunchNotification\", { enumerable: true, get: function () { return pinpoint_1.getLaunchNotification; } });\nObject.defineProperty(exports, \"getPermissionStatus\", { enumerable: true, get: function () { return pinpoint_1.getPermissionStatus; } });\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return pinpoint_1.identifyUser; } });\nObject.defineProperty(exports, \"initializePushNotifications\", { enumerable: true, get: function () { return pinpoint_1.initializePushNotifications; } });\nObject.defineProperty(exports, \"onNotificationOpened\", { enumerable: true, get: function () { return pinpoint_1.onNotificationOpened; } });\nObject.defineProperty(exports, \"onNotificationReceivedInBackground\", { enumerable: true, get: function () { return pinpoint_1.onNotificationReceivedInBackground; } });\nObject.defineProperty(exports, \"onNotificationReceivedInForeground\", { enumerable: true, get: function () { return pinpoint_1.onNotificationReceivedInForeground; } });\nObject.defineProperty(exports, \"onTokenReceived\", { enumerable: true, get: function () { return pinpoint_1.onTokenReceived; } });\nObject.defineProperty(exports, \"requestPermissions\", { enumerable: true, get: function () { return pinpoint_1.requestPermissions; } });\nObject.defineProperty(exports, \"setBadgeCount\", { enumerable: true, get: function () { return pinpoint_1.setBadgeCount; } });\nvar errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"PushNotificationError\", { enumerable: true, get: function () { return errors_1.PushNotificationError; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,kCAAkC,GAAG,OAAO,CAAC,kCAAkC,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,2BAA2B,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,aAAa,GAAG,MAAM;AACjY,IAAI,UAAU,GAAG,OAAO,CAAC,sBAAsB,CAAC;AAChD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/pushNotifications/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PushNotificationError = exports.setBadgeCount = exports.requestPermissions = exports.onTokenReceived = exports.onNotificationReceivedInForeground = exports.onNotificationReceivedInBackground = exports.onNotificationOpened = exports.initializePushNotifications = exports.identifyUser = exports.getPermissionStatus = exports.getLaunchNotification = exports.getBadgeCount = void 0;\nvar pinpoint_1 = require(\"./providers/pinpoint\");\nObject.defineProperty(exports, \"getBadgeCount\", { enumerable: true, get: function () { return pinpoint_1.getBadgeCount; } });\nObject.defineProperty(exports, \"getLaunchNotification\", { enumerable: true, get: function () { return pinpoint_1.getLaunchNotification; } });\nObject.defineProperty(exports, \"getPermissionStatus\", { enumerable: true, get: function () { return pinpoint_1.getPermissionStatus; } });\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return pinpoint_1.identifyUser; } });\nObject.defineProperty(exports, \"initializePushNotifications\", { enumerable: true, get: function () { return pinpoint_1.initializePushNotifications; } });\nObject.defineProperty(exports, \"onNotificationOpened\", { enumerable: true, get: function () { return pinpoint_1.onNotificationOpened; } });\nObject.defineProperty(exports, \"onNotificationReceivedInBackground\", { enumerable: true, get: function () { return pinpoint_1.onNotificationReceivedInBackground; } });\nObject.defineProperty(exports, \"onNotificationReceivedInForeground\", { enumerable: true, get: function () { return pinpoint_1.onNotificationReceivedInForeground; } });\nObject.defineProperty(exports, \"onTokenReceived\", { enumerable: true, get: function () { return pinpoint_1.onTokenReceived; } });\nObject.defineProperty(exports, \"requestPermissions\", { enumerable: true, get: function () { return pinpoint_1.requestPermissions; } });\nObject.defineProperty(exports, \"setBadgeCount\", { enumerable: true, get: function () { return pinpoint_1.setBadgeCount; } });\nvar errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"PushNotificationError\", { enumerable: true, get: function () { return errors_1.PushNotificationError; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAA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CAAC,CAAC,CAAC,EAAE,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifyUser.native.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.identifyUser = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst errorHelpers_1 = require(\"../../../errors/errorHelpers\");\nconst utils_2 = require(\"../../../utils\");\nconst utils_3 = require(\"../utils\");\nconst identifyUser = async ({ userId, userProfile, options, }) => {\n (0, errorHelpers_1.assertIsInitialized)();\n const { credentials, identityId } = await (0, utils_2.resolveCredentials)();\n const { appId, region } = (0, utils_3.resolveConfig)();\n const { address, optOut, userAttributes } = options ?? {};\n if (!(await (0, pinpoint_1.getEndpointId)(appId, 'PushNotification'))) {\n // if there is no cached endpoint id, wait for successful endpoint creation before continuing\n await (0, utils_3.getInflightDeviceRegistration)();\n }\n await (0, pinpoint_1.updateEndpoint)({\n address,\n channelType: (0, utils_3.getChannelType)(),\n optOut,\n appId,\n category: 'PushNotification',\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: (0, utils_2.getPushNotificationUserAgentString)(utils_1.PushNotificationAction.IdentifyUser),\n });\n};\nexports.identifyUser = identifyUser;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,MAAM;AAC7B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC;AAC5E,MAAM,cAAc,GAAG,OAAO,CAAC,8BAA8B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,YAAY,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,KAAK;AAClE,IAAI,IAAI,cAAc,CAAC,mBAAmB,GAAG;AAC7C,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,OAAO,CAAC,kBAAkB,GAAG;AAC/E,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,aAAa,GAAG;AAC1D,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE;AAC7D,IAAI,IAAI,EAAE,MAAM,IAAI,UAAU,CAAC,aAAa,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE;AAC3E;AACA,QAAQ,MAAM,IAAI,OAAO,CAAC,6BAA6B,GAAG;AAC1D;
|
|
1
|
+
{"version":3,"file":"identifyUser.native.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.identifyUser = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst errorHelpers_1 = require(\"../../../errors/errorHelpers\");\nconst utils_2 = require(\"../../../utils\");\nconst utils_3 = require(\"../utils\");\nconst identifyUser = async ({ userId, userProfile, options, }) => {\n (0, errorHelpers_1.assertIsInitialized)();\n const { credentials, identityId } = await (0, utils_2.resolveCredentials)();\n const { appId, region } = (0, utils_3.resolveConfig)();\n const { address, optOut, userAttributes } = options ?? {};\n if (!(await (0, pinpoint_1.getEndpointId)(appId, 'PushNotification'))) {\n // if there is no cached endpoint id, wait for successful endpoint creation before continuing\n await (0, utils_3.getInflightDeviceRegistration)();\n }\n await (0, pinpoint_1.updateEndpoint)({\n address,\n channelType: (0, utils_3.getChannelType)(),\n optOut,\n appId,\n category: 'PushNotification',\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: (0, utils_2.getPushNotificationUserAgentString)(utils_1.PushNotificationAction.IdentifyUser),\n });\n};\nexports.identifyUser = identifyUser;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,MAAM;AAC7B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC;AAC5E,MAAM,cAAc,GAAG,OAAO,CAAC,8BAA8B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,YAAY,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,KAAK;AAClE,IAAI,IAAI,cAAc,CAAC,mBAAmB,GAAG;AAC7C,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,OAAO,CAAC,kBAAkB,GAAG;AAC/E,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,aAAa,GAAG;AAC1D,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE;AAC7D,IAAI,IAAI,EAAE,MAAM,IAAI,UAAU,CAAC,aAAa,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE;AAC3E;AACA,QAAQ,MAAM,IAAI,OAAO,CAAC,6BAA6B,GAAG;AAC1D,IAAI;AACJ,IAAI,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE;AACzC,QAAQ,OAAO;AACf,QAAQ,WAAW,EAAE,IAAI,OAAO,CAAC,cAAc,GAAG;AAClD,QAAQ,MAAM;AACd,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,kBAAkB;AACpC,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,MAAM;AACd,QAAQ,WAAW;AACnB,QAAQ,cAAc,EAAE,IAAI,OAAO,CAAC,kCAAkC,EAAE,OAAO,CAAC,sBAAsB,CAAC,YAAY,CAAC;AACpH,KAAK,CAAC;AACN,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setBadgeCount = exports.requestPermissions = exports.onTokenReceived = exports.onNotificationReceivedInForeground = exports.onNotificationReceivedInBackground = exports.onNotificationOpened = exports.initializePushNotifications = exports.identifyUser = exports.getPermissionStatus = exports.getLaunchNotification = exports.getBadgeCount = void 0;\nvar getBadgeCount_1 = require(\"./getBadgeCount\");\nObject.defineProperty(exports, \"getBadgeCount\", { enumerable: true, get: function () { return getBadgeCount_1.getBadgeCount; } });\nvar getLaunchNotification_1 = require(\"./getLaunchNotification\");\nObject.defineProperty(exports, \"getLaunchNotification\", { enumerable: true, get: function () { return getLaunchNotification_1.getLaunchNotification; } });\nvar getPermissionStatus_1 = require(\"./getPermissionStatus\");\nObject.defineProperty(exports, \"getPermissionStatus\", { enumerable: true, get: function () { return getPermissionStatus_1.getPermissionStatus; } });\nvar identifyUser_1 = require(\"./identifyUser\");\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return identifyUser_1.identifyUser; } });\nvar initializePushNotifications_1 = require(\"./initializePushNotifications\");\nObject.defineProperty(exports, \"initializePushNotifications\", { enumerable: true, get: function () { return initializePushNotifications_1.initializePushNotifications; } });\nvar onNotificationOpened_1 = require(\"./onNotificationOpened\");\nObject.defineProperty(exports, \"onNotificationOpened\", { enumerable: true, get: function () { return onNotificationOpened_1.onNotificationOpened; } });\nvar onNotificationReceivedInBackground_1 = require(\"./onNotificationReceivedInBackground\");\nObject.defineProperty(exports, \"onNotificationReceivedInBackground\", { enumerable: true, get: function () { return onNotificationReceivedInBackground_1.onNotificationReceivedInBackground; } });\nvar onNotificationReceivedInForeground_1 = require(\"./onNotificationReceivedInForeground\");\nObject.defineProperty(exports, \"onNotificationReceivedInForeground\", { enumerable: true, get: function () { return onNotificationReceivedInForeground_1.onNotificationReceivedInForeground; } });\nvar onTokenReceived_1 = require(\"./onTokenReceived\");\nObject.defineProperty(exports, \"onTokenReceived\", { enumerable: true, get: function () { return onTokenReceived_1.onTokenReceived; } });\nvar requestPermissions_1 = require(\"./requestPermissions\");\nObject.defineProperty(exports, \"requestPermissions\", { enumerable: true, get: function () { return requestPermissions_1.requestPermissions; } });\nvar setBadgeCount_1 = require(\"./setBadgeCount\");\nObject.defineProperty(exports, \"setBadgeCount\", { enumerable: true, get: function () { return setBadgeCount_1.setBadgeCount; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,kCAAkC,GAAG,OAAO,CAAC,kCAAkC,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,2BAA2B,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,aAAa,GAAG,MAAM;AACjW,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAChD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setBadgeCount = exports.requestPermissions = exports.onTokenReceived = exports.onNotificationReceivedInForeground = exports.onNotificationReceivedInBackground = exports.onNotificationOpened = exports.initializePushNotifications = exports.identifyUser = exports.getPermissionStatus = exports.getLaunchNotification = exports.getBadgeCount = void 0;\nvar getBadgeCount_1 = require(\"./getBadgeCount\");\nObject.defineProperty(exports, \"getBadgeCount\", { enumerable: true, get: function () { return getBadgeCount_1.getBadgeCount; } });\nvar getLaunchNotification_1 = require(\"./getLaunchNotification\");\nObject.defineProperty(exports, \"getLaunchNotification\", { enumerable: true, get: function () { return getLaunchNotification_1.getLaunchNotification; } });\nvar getPermissionStatus_1 = require(\"./getPermissionStatus\");\nObject.defineProperty(exports, \"getPermissionStatus\", { enumerable: true, get: function () { return getPermissionStatus_1.getPermissionStatus; } });\nvar identifyUser_1 = require(\"./identifyUser\");\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return identifyUser_1.identifyUser; } });\nvar initializePushNotifications_1 = require(\"./initializePushNotifications\");\nObject.defineProperty(exports, \"initializePushNotifications\", { enumerable: true, get: function () { return initializePushNotifications_1.initializePushNotifications; } });\nvar onNotificationOpened_1 = require(\"./onNotificationOpened\");\nObject.defineProperty(exports, \"onNotificationOpened\", { enumerable: true, get: function () { return onNotificationOpened_1.onNotificationOpened; } });\nvar onNotificationReceivedInBackground_1 = require(\"./onNotificationReceivedInBackground\");\nObject.defineProperty(exports, \"onNotificationReceivedInBackground\", { enumerable: true, get: function () { return onNotificationReceivedInBackground_1.onNotificationReceivedInBackground; } });\nvar onNotificationReceivedInForeground_1 = require(\"./onNotificationReceivedInForeground\");\nObject.defineProperty(exports, \"onNotificationReceivedInForeground\", { enumerable: true, get: function () { return onNotificationReceivedInForeground_1.onNotificationReceivedInForeground; } });\nvar onTokenReceived_1 = require(\"./onTokenReceived\");\nObject.defineProperty(exports, \"onTokenReceived\", { enumerable: true, get: function () { return onTokenReceived_1.onTokenReceived; } });\nvar requestPermissions_1 = require(\"./requestPermissions\");\nObject.defineProperty(exports, \"requestPermissions\", { enumerable: true, get: function () { return requestPermissions_1.requestPermissions; } });\nvar setBadgeCount_1 = require(\"./setBadgeCount\");\nObject.defineProperty(exports, \"setBadgeCount\", { enumerable: true, get: function () { return setBadgeCount_1.setBadgeCount; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,kCAAkC,GAAG,OAAO,CAAC,kCAAkC,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,2BAA2B,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,aAAa,GAAG,MAAM;AACjW,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAChD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI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