@aws-amplify/analytics 7.0.30-unstable.7ddca1b.0 → 7.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.
@@ -57,7 +57,7 @@ const identifyUser = async ({ userId, userProfile, options, }) => {
57
57
  const { credentials, identityId } = await (0, utils_3.resolveCredentials)();
58
58
  const { appId, region } = (0, utils_3.resolveConfig)();
59
59
  const { userAttributes } = options ?? {};
60
- (0, pinpoint_1.updateEndpoint)({
60
+ await (0, pinpoint_1.updateEndpoint)({
61
61
  appId,
62
62
  category: 'Analytics',
63
63
  credentials,
@@ -1 +1 @@
1
- {"version":3,"file":"identifyUser.js","sources":["../../../../../src/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 {IdentifyUserInput} params The input object used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n *\n * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link AnalyticsValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect.\n *\n * @returns A promise that will resolve when the operation is complete.\n *\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 with some additional demographics\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 * });\n */\nconst identifyUser = async ({ userId, userProfile, options, }) => {\n const { credentials, identityId } = await (0, utils_3.resolveCredentials)();\n const { appId, region } = (0, utils_3.resolveConfig)();\n const { userAttributes } = options ?? {};\n (0, pinpoint_1.updateEndpoint)({\n appId,\n category: 'Analytics',\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: (0, utils_2.getAnalyticsUserAgentString)(utils_1.AnalyticsAction.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,gBAAgB,CAAC,CAAC;AAC1C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC;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,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,KAAK;AAClE,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,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC7C,IAAI,IAAI,UAAU,CAAC,cAAc,EAAE;AACnC,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,WAAW;AAC7B,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,MAAM;AACd,QAAQ,WAAW;AACnB,QAAQ,cAAc,EAAE,IAAI,OAAO,CAAC,2BAA2B,EAAE,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC;AACtG,KAAK,CAAC,CAAC;AACP,CAAC,CAAC;AACF,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
1
+ {"version":3,"file":"identifyUser.js","sources":["../../../../../src/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 {IdentifyUserInput} params The input object used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n *\n * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link AnalyticsValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect.\n *\n * @returns A promise that will resolve when the operation is complete.\n *\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 with some additional demographics\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 * });\n */\nconst identifyUser = async ({ userId, userProfile, options, }) => {\n const { credentials, identityId } = await (0, utils_3.resolveCredentials)();\n const { appId, region } = (0, utils_3.resolveConfig)();\n const { userAttributes } = options ?? {};\n await (0, pinpoint_1.updateEndpoint)({\n appId,\n category: 'Analytics',\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: (0, utils_2.getAnalyticsUserAgentString)(utils_1.AnalyticsAction.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,gBAAgB,CAAC,CAAC;AAC1C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC;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,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,KAAK;AAClE,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,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC7C,IAAI,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE;AACzC,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,WAAW;AAC7B,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,MAAM;AACd,QAAQ,WAAW;AACnB,QAAQ,cAAc,EAAE,IAAI,OAAO,CAAC,2BAA2B,EAAE,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC;AACtG,KAAK,CAAC,CAAC;AACP,CAAC,CAAC;AACF,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
@@ -61,7 +61,7 @@ const identifyUser = async ({ userId, userProfile, options, }) => {
61
61
  const { credentials, identityId } = await resolveCredentials();
62
62
  const { appId, region } = resolveConfig();
63
63
  const { userAttributes } = options ?? {};
64
- updateEndpoint({
64
+ await updateEndpoint({
65
65
  appId,
66
66
  category: 'Analytics',
67
67
  credentials,
@@ -1 +1 @@
1
- {"version":3,"file":"identifyUser.mjs","sources":["../../../../../src/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AnalyticsAction } from '@aws-amplify/core/internals/utils';\nimport { updateEndpoint, } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { getAnalyticsUserAgentString } from '../../../utils';\nimport { resolveConfig, resolveCredentials } 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 {IdentifyUserInput} params The input object used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n *\n * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link AnalyticsValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect.\n *\n * @returns A promise that will resolve when the operation is complete.\n *\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 with some additional demographics\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 * });\n */\nexport const identifyUser = async ({ userId, userProfile, options, }) => {\n const { credentials, identityId } = await resolveCredentials();\n const { appId, region } = resolveConfig();\n const { userAttributes } = options ?? {};\n updateEndpoint({\n appId,\n category: 'Analytics',\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: getAnalyticsUserAgentString(AnalyticsAction.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;AACY,MAAC,YAAY,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,KAAK;AACzE,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,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC7C,IAAI,cAAc,CAAC;AACnB,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,WAAW;AAC7B,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,MAAM;AACd,QAAQ,WAAW;AACnB,QAAQ,cAAc,EAAE,2BAA2B,CAAC,eAAe,CAAC,YAAY,CAAC;AACjF,KAAK,CAAC,CAAC;AACP;;;;"}
1
+ {"version":3,"file":"identifyUser.mjs","sources":["../../../../../src/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AnalyticsAction } from '@aws-amplify/core/internals/utils';\nimport { updateEndpoint, } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { getAnalyticsUserAgentString } from '../../../utils';\nimport { resolveConfig, resolveCredentials } 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 {IdentifyUserInput} params The input object used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n *\n * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link AnalyticsValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect.\n *\n * @returns A promise that will resolve when the operation is complete.\n *\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 with some additional demographics\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 * });\n */\nexport const identifyUser = async ({ userId, userProfile, options, }) => {\n const { credentials, identityId } = await resolveCredentials();\n const { appId, region } = resolveConfig();\n const { userAttributes } = options ?? {};\n await updateEndpoint({\n appId,\n category: 'Analytics',\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: getAnalyticsUserAgentString(AnalyticsAction.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;AACY,MAAC,YAAY,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,KAAK;AACzE,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,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC7C,IAAI,MAAM,cAAc,CAAC;AACzB,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,WAAW;AAC7B,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,MAAM;AACd,QAAQ,WAAW;AACnB,QAAQ,cAAc,EAAE,2BAA2B,CAAC,eAAe,CAAC,YAAY,CAAC;AACjF,KAAK,CAAC,CAAC;AACP;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/analytics",
3
- "version": "7.0.30-unstable.7ddca1b.0+7ddca1b",
3
+ "version": "7.0.30-unstable.82e1bd3.0+82e1bd3",
4
4
  "description": "Analytics category of aws-amplify",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -100,13 +100,13 @@
100
100
  "tslib": "^2.5.0"
101
101
  },
102
102
  "peerDependencies": {
103
- "@aws-amplify/core": "6.1.1-unstable.7ddca1b.0+7ddca1b"
103
+ "@aws-amplify/core": "6.1.1-unstable.82e1bd3.0+82e1bd3"
104
104
  },
105
105
  "devDependencies": {
106
- "@aws-amplify/core": "6.1.1-unstable.7ddca1b.0+7ddca1b",
107
- "@aws-amplify/react-native": "1.0.29-unstable.7ddca1b.0+7ddca1b",
106
+ "@aws-amplify/core": "6.1.1-unstable.82e1bd3.0+82e1bd3",
107
+ "@aws-amplify/react-native": "1.0.29-unstable.82e1bd3.0+82e1bd3",
108
108
  "@aws-sdk/types": "3.398.0",
109
109
  "typescript": "5.0.2"
110
110
  },
111
- "gitHead": "7ddca1bc9fa9d991259466b2d1e391cede1c206d"
111
+ "gitHead": "82e1bd3878757db605d68b0c1ca4d564281acce7"
112
112
  }
@@ -65,7 +65,7 @@ export const identifyUser = async ({
65
65
  const { credentials, identityId } = await resolveCredentials();
66
66
  const { appId, region } = resolveConfig();
67
67
  const { userAttributes } = options ?? {};
68
- updateEndpoint({
68
+ await updateEndpoint({
69
69
  appId,
70
70
  category: 'Analytics',
71
71
  credentials,