@aws-amplify/notifications 2.0.30-unstable.7ddca1b.0 → 2.0.30-unstable.82e1bd3.0
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/inAppMessaging/providers/pinpoint/apis/identifyUser.js +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/identifyUser.native.js.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/identifyUser.mjs +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/identifyUser.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.mjs +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.mjs.map +1 -1
- package/package.json +5 -5
- package/src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts +1 -1
- package/src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts +1 -1
|
@@ -63,7 +63,7 @@ const identifyUser = async (input) => {
|
|
|
63
63
|
const { credentials, identityId } = await (0, utils_2.resolveCredentials)();
|
|
64
64
|
const { appId, region } = (0, utils_2.resolveConfig)();
|
|
65
65
|
const { address, optOut, userAttributes } = options ?? {};
|
|
66
|
-
(0, pinpoint_1.updateEndpoint)({
|
|
66
|
+
await (0, pinpoint_1.updateEndpoint)({
|
|
67
67
|
address,
|
|
68
68
|
channelType: utils_2.CHANNEL_TYPE,
|
|
69
69
|
optOut,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifyUser.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.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 utils_2 = require(\"../utils\");\nconst utils_3 = require(\"../../../utils\");\n/**\n * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user\n * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using\n * the same `userId`.\n *\n * @param input The input object that conforms to {@link IdentifyUserInput} used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n * @throws service: {@link UpdateEndpointException} - 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 * // Identify a user with Pinpoint\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * // Identify a user with Pinpoint specific options\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * demographic: {\n * platform: 'ios',\n * timezone: 'America/Los_Angeles'\n * }\n * },\n * options: {\n * address: 'device-address',\n * optOut: 'NONE',\n * userAttributes: {\n * interests: ['food']\n * },\n * },\n * });\n */\nconst identifyUser = async (input) => {\n const { userId, userProfile, options } = input;\n (0, utils_3.assertIsInitialized)();\n const { credentials, identityId } = await (0, utils_2.resolveCredentials)();\n const { appId, region } = (0, utils_2.resolveConfig)();\n const { address, optOut, userAttributes } = options ?? {};\n (0, pinpoint_1.updateEndpoint)({\n address,\n channelType: utils_2.CHANNEL_TYPE,\n optOut,\n appId,\n category: utils_2.CATEGORY,\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.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,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC,CAAC;AAC7E,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC1C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,OAAO,KAAK,KAAK;AACtC,IAAI,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AACnD,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG,CAAC;AACvC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,OAAO,CAAC,kBAAkB,GAAG,CAAC;AAChF,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,aAAa,GAAG,CAAC;AAC3D,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC9D,IAAI,IAAI,UAAU,CAAC,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"identifyUser.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.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 utils_2 = require(\"../utils\");\nconst utils_3 = require(\"../../../utils\");\n/**\n * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user\n * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using\n * the same `userId`.\n *\n * @param input The input object that conforms to {@link IdentifyUserInput} used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n * @throws service: {@link UpdateEndpointException} - 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 * // Identify a user with Pinpoint\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * // Identify a user with Pinpoint specific options\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * demographic: {\n * platform: 'ios',\n * timezone: 'America/Los_Angeles'\n * }\n * },\n * options: {\n * address: 'device-address',\n * optOut: 'NONE',\n * userAttributes: {\n * interests: ['food']\n * },\n * },\n * });\n */\nconst identifyUser = async (input) => {\n const { userId, userProfile, options } = input;\n (0, utils_3.assertIsInitialized)();\n const { credentials, identityId } = await (0, utils_2.resolveCredentials)();\n const { appId, region } = (0, utils_2.resolveConfig)();\n const { address, optOut, userAttributes } = options ?? {};\n await (0, pinpoint_1.updateEndpoint)({\n address,\n channelType: utils_2.CHANNEL_TYPE,\n optOut,\n appId,\n category: utils_2.CATEGORY,\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.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,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC,CAAC;AAC7E,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC1C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,OAAO,KAAK,KAAK;AACtC,IAAI,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AACnD,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG,CAAC;AACvC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,OAAO,CAAC,kBAAkB,GAAG,CAAC;AAChF,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,aAAa,GAAG,CAAC;AAC3D,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC9D,IAAI,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE;AACzC,QAAQ,OAAO;AACf,QAAQ,WAAW,EAAE,OAAO,CAAC,YAAY;AACzC,QAAQ,MAAM;AACd,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAClC,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,MAAM;AACd,QAAQ,WAAW;AACnB,QAAQ,cAAc,EAAE,IAAI,OAAO,CAAC,gCAAgC,EAAE,OAAO,CAAC,oBAAoB,CAAC,YAAY,CAAC;AAChH,KAAK,CAAC,CAAC;AACP,CAAC,CAAC;AACF,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
|
|
@@ -14,7 +14,7 @@ const identifyUser = async ({ userId, userProfile, options, }) => {
|
|
|
14
14
|
const { credentials, identityId } = await (0, utils_2.resolveCredentials)();
|
|
15
15
|
const { appId, region } = (0, utils_3.resolveConfig)();
|
|
16
16
|
const { address, optOut, userAttributes } = options ?? {};
|
|
17
|
-
(0, pinpoint_1.updateEndpoint)({
|
|
17
|
+
await (0, pinpoint_1.updateEndpoint)({
|
|
18
18
|
address,
|
|
19
19
|
channelType: (0, utils_3.getChannelType)(),
|
|
20
20
|
optOut,
|
|
@@ -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 (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,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC,CAAC;AAC7E,MAAM,cAAc,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;AAC/D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC1C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,YAAY,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,KAAK;AAClE,IAAI,IAAI,cAAc,CAAC,mBAAmB,GAAG,CAAC;AAC9C,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,OAAO,CAAC,kBAAkB,GAAG,CAAC;AAChF,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,aAAa,GAAG,CAAC;AAC3D,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC9D,IAAI,IAAI,UAAU,CAAC,cAAc,EAAE;
|
|
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 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,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC,CAAC;AAC7E,MAAM,cAAc,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;AAC/D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC1C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,YAAY,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,KAAK;AAClE,IAAI,IAAI,cAAc,CAAC,mBAAmB,GAAG,CAAC;AAC9C,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,OAAO,CAAC,kBAAkB,GAAG,CAAC;AAChF,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,aAAa,GAAG,CAAC;AAC3D,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC9D,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,CAAC;AACP,CAAC,CAAC;AACF,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
|
|
@@ -64,7 +64,7 @@ const identifyUser = async (input) => {
|
|
|
64
64
|
const { credentials, identityId } = await resolveCredentials();
|
|
65
65
|
const { appId, region } = resolveConfig();
|
|
66
66
|
const { address, optOut, userAttributes } = options ?? {};
|
|
67
|
-
updateEndpoint({
|
|
67
|
+
await updateEndpoint({
|
|
68
68
|
address,
|
|
69
69
|
channelType: CHANNEL_TYPE,
|
|
70
70
|
optOut,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifyUser.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { InAppMessagingAction } from '@aws-amplify/core/internals/utils';\nimport { updateEndpoint, } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { CATEGORY, CHANNEL_TYPE, getInAppMessagingUserAgentString, resolveConfig, resolveCredentials, } from '../utils';\nimport { assertIsInitialized } from '../../../utils';\n/**\n * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user\n * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using\n * the same `userId`.\n *\n * @param input The input object that conforms to {@link IdentifyUserInput} used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n * @throws service: {@link UpdateEndpointException} - 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 * // Identify a user with Pinpoint\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * // Identify a user with Pinpoint specific options\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * demographic: {\n * platform: 'ios',\n * timezone: 'America/Los_Angeles'\n * }\n * },\n * options: {\n * address: 'device-address',\n * optOut: 'NONE',\n * userAttributes: {\n * interests: ['food']\n * },\n * },\n * });\n */\nexport const identifyUser = async (input) => {\n const { userId, userProfile, options } = input;\n assertIsInitialized();\n const { credentials, identityId } = await resolveCredentials();\n const { appId, region } = resolveConfig();\n const { address, optOut, userAttributes } = options ?? {};\n updateEndpoint({\n address,\n channelType: CHANNEL_TYPE,\n optOut,\n appId,\n category: CATEGORY,\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: getInAppMessagingUserAgentString(InAppMessagingAction.IdentifyUser),\n });\n};\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAKA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,OAAO,KAAK,KAAK;AAC7C,IAAI,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AACnD,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,kBAAkB,EAAE,CAAC;AACnE,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;AAC9C,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC9D,IAAI,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"identifyUser.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { InAppMessagingAction } from '@aws-amplify/core/internals/utils';\nimport { updateEndpoint, } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { CATEGORY, CHANNEL_TYPE, getInAppMessagingUserAgentString, resolveConfig, resolveCredentials, } from '../utils';\nimport { assertIsInitialized } from '../../../utils';\n/**\n * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user\n * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using\n * the same `userId`.\n *\n * @param input The input object that conforms to {@link IdentifyUserInput} used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n * @throws service: {@link UpdateEndpointException} - 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 * // Identify a user with Pinpoint\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * // Identify a user with Pinpoint specific options\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * demographic: {\n * platform: 'ios',\n * timezone: 'America/Los_Angeles'\n * }\n * },\n * options: {\n * address: 'device-address',\n * optOut: 'NONE',\n * userAttributes: {\n * interests: ['food']\n * },\n * },\n * });\n */\nexport const identifyUser = async (input) => {\n const { userId, userProfile, options } = input;\n assertIsInitialized();\n const { credentials, identityId } = await resolveCredentials();\n const { appId, region } = resolveConfig();\n const { address, optOut, userAttributes } = options ?? {};\n await updateEndpoint({\n address,\n channelType: CHANNEL_TYPE,\n optOut,\n appId,\n category: CATEGORY,\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: getInAppMessagingUserAgentString(InAppMessagingAction.IdentifyUser),\n });\n};\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAKA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,OAAO,KAAK,KAAK;AAC7C,IAAI,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AACnD,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,kBAAkB,EAAE,CAAC;AACnE,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;AAC9C,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC9D,IAAI,MAAM,cAAc,CAAC;AACzB,QAAQ,OAAO;AACf,QAAQ,WAAW,EAAE,YAAY;AACjC,QAAQ,MAAM;AACd,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,QAAQ;AAC1B,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,MAAM;AACd,QAAQ,WAAW;AACnB,QAAQ,cAAc,EAAE,gCAAgC,CAAC,oBAAoB,CAAC,YAAY,CAAC;AAC3F,KAAK,CAAC,CAAC;AACP;;;;"}
|
|
@@ -14,7 +14,7 @@ const identifyUser = async ({ userId, userProfile, options, }) => {
|
|
|
14
14
|
const { credentials, identityId } = await resolveCredentials();
|
|
15
15
|
const { appId, region } = resolveConfig();
|
|
16
16
|
const { address, optOut, userAttributes } = options ?? {};
|
|
17
|
-
updateEndpoint({
|
|
17
|
+
await updateEndpoint({
|
|
18
18
|
address,
|
|
19
19
|
channelType: getChannelType(),
|
|
20
20
|
optOut,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifyUser.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PushNotificationAction } from '@aws-amplify/core/internals/utils';\nimport { updateEndpoint } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nimport { getPushNotificationUserAgentString, resolveCredentials, } from '../../../utils';\nimport { getChannelType, resolveConfig } from '../utils';\nexport const identifyUser = async ({ userId, userProfile, options, }) => {\n assertIsInitialized();\n const { credentials, identityId } = await resolveCredentials();\n const { appId, region } = resolveConfig();\n const { address, optOut, userAttributes } = options ?? {};\n updateEndpoint({\n address,\n channelType: getChannelType(),\n optOut,\n appId,\n category: 'PushNotification',\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: getPushNotificationUserAgentString(PushNotificationAction.IdentifyUser),\n });\n};\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAMY,MAAC,YAAY,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,KAAK;AACzE,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,kBAAkB,EAAE,CAAC;AACnE,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;AAC9C,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC9D,IAAI,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"identifyUser.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PushNotificationAction } from '@aws-amplify/core/internals/utils';\nimport { updateEndpoint } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nimport { getPushNotificationUserAgentString, resolveCredentials, } from '../../../utils';\nimport { getChannelType, resolveConfig } from '../utils';\nexport const identifyUser = async ({ userId, userProfile, options, }) => {\n assertIsInitialized();\n const { credentials, identityId } = await resolveCredentials();\n const { appId, region } = resolveConfig();\n const { address, optOut, userAttributes } = options ?? {};\n await updateEndpoint({\n address,\n channelType: getChannelType(),\n optOut,\n appId,\n category: 'PushNotification',\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: getPushNotificationUserAgentString(PushNotificationAction.IdentifyUser),\n });\n};\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAMY,MAAC,YAAY,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,KAAK;AACzE,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,kBAAkB,EAAE,CAAC;AACnE,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;AAC9C,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC9D,IAAI,MAAM,cAAc,CAAC;AACzB,QAAQ,OAAO;AACf,QAAQ,WAAW,EAAE,cAAc,EAAE;AACrC,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,kCAAkC,CAAC,sBAAsB,CAAC,YAAY,CAAC;AAC/F,KAAK,CAAC,CAAC;AACP;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/notifications",
|
|
3
|
-
"version": "2.0.30-unstable.
|
|
3
|
+
"version": "2.0.30-unstable.82e1bd3.0+82e1bd3",
|
|
4
4
|
"description": "Notifications category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -95,12 +95,12 @@
|
|
|
95
95
|
"tslib": "^2.5.0"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
|
-
"@aws-amplify/core": "6.1.1-unstable.
|
|
98
|
+
"@aws-amplify/core": "6.1.1-unstable.82e1bd3.0+82e1bd3"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"@aws-amplify/core": "6.1.1-unstable.
|
|
102
|
-
"@aws-amplify/react-native": "1.0.29-unstable.
|
|
101
|
+
"@aws-amplify/core": "6.1.1-unstable.82e1bd3.0+82e1bd3",
|
|
102
|
+
"@aws-amplify/react-native": "1.0.29-unstable.82e1bd3.0+82e1bd3",
|
|
103
103
|
"typescript": "5.0.2"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "82e1bd3878757db605d68b0c1ca4d564281acce7"
|
|
106
106
|
}
|
|
@@ -73,7 +73,7 @@ export const identifyUser = async (input: IdentifyUserInput): Promise<void> => {
|
|
|
73
73
|
const { credentials, identityId } = await resolveCredentials();
|
|
74
74
|
const { appId, region } = resolveConfig();
|
|
75
75
|
const { address, optOut, userAttributes } = options ?? {};
|
|
76
|
-
updateEndpoint({
|
|
76
|
+
await updateEndpoint({
|
|
77
77
|
address,
|
|
78
78
|
channelType: CHANNEL_TYPE,
|
|
79
79
|
optOut,
|
|
@@ -21,7 +21,7 @@ export const identifyUser: IdentifyUser = async ({
|
|
|
21
21
|
const { credentials, identityId } = await resolveCredentials();
|
|
22
22
|
const { appId, region } = resolveConfig();
|
|
23
23
|
const { address, optOut, userAttributes } = options ?? {};
|
|
24
|
-
updateEndpoint({
|
|
24
|
+
await updateEndpoint({
|
|
25
25
|
address,
|
|
26
26
|
channelType: getChannelType(),
|
|
27
27
|
optOut,
|