@aws-amplify/analytics 7.0.1-console-preview.8f82e46.0 → 7.0.1-console-preview.8d88eef.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/lib/providers/kinesis/apis/flushEvents.js +2 -1
- package/lib/providers/kinesis/apis/record.js +2 -1
- package/lib/providers/kinesis-firehose/apis/flushEvents.js +2 -1
- package/lib/providers/kinesis-firehose/apis/record.js +2 -1
- package/lib/providers/personalize/apis/flushEvents.js +2 -1
- package/lib/providers/personalize/apis/record.js +2 -1
- package/lib/providers/personalize/utils/autoTrackMedia.js +2 -1
- package/lib/providers/pinpoint/apis/flushEvents.js +2 -1
- package/lib/providers/pinpoint/apis/identifyUser.js +4 -5
- package/lib/providers/pinpoint/apis/record.js +1 -1
- package/lib/providers/pinpoint/types/index.d.ts +0 -1
- package/lib/providers/pinpoint/types/index.js +0 -3
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/inputs.d.ts +1 -3
- package/lib/types/options.d.ts +1 -1
- package/lib/utils/eventBuffer/EventBuffer.js +2 -2
- package/lib-esm/providers/kinesis/apis/flushEvents.js +2 -1
- package/lib-esm/providers/kinesis/apis/record.js +2 -1
- package/lib-esm/providers/kinesis-firehose/apis/flushEvents.js +2 -1
- package/lib-esm/providers/kinesis-firehose/apis/record.js +3 -2
- package/lib-esm/providers/personalize/apis/flushEvents.js +2 -1
- package/lib-esm/providers/personalize/apis/record.js +2 -1
- package/lib-esm/providers/personalize/utils/autoTrackMedia.js +2 -1
- package/lib-esm/providers/pinpoint/apis/flushEvents.js +2 -1
- package/lib-esm/providers/pinpoint/apis/identifyUser.js +5 -6
- package/lib-esm/providers/pinpoint/apis/record.js +3 -3
- package/lib-esm/providers/pinpoint/types/index.d.ts +0 -1
- package/lib-esm/providers/pinpoint/types/index.js +1 -1
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/inputs.d.ts +1 -3
- package/lib-esm/types/options.d.ts +1 -1
- package/lib-esm/utils/eventBuffer/EventBuffer.js +1 -1
- package/package.json +4 -4
- package/src/providers/kinesis/apis/flushEvents.ts +2 -4
- package/src/providers/kinesis/apis/record.ts +2 -4
- package/src/providers/kinesis-firehose/apis/flushEvents.ts +2 -4
- package/src/providers/kinesis-firehose/apis/record.ts +3 -5
- package/src/providers/personalize/apis/flushEvents.ts +2 -4
- package/src/providers/personalize/apis/record.ts +2 -4
- package/src/providers/personalize/utils/autoTrackMedia.ts +2 -1
- package/src/providers/pinpoint/apis/flushEvents.ts +2 -4
- package/src/providers/pinpoint/apis/identifyUser.ts +6 -3
- package/src/providers/pinpoint/apis/record.ts +3 -4
- package/src/providers/pinpoint/types/index.ts +0 -1
- package/src/types/inputs.ts +1 -3
- package/src/types/options.ts +1 -1
- package/src/utils/eventBuffer/EventBuffer.ts +1 -1
- package/lib/providers/pinpoint/types/errors.d.ts +0 -9
- package/lib/providers/pinpoint/types/errors.js +0 -15
- package/lib-esm/providers/pinpoint/types/errors.d.ts +0 -9
- package/lib-esm/providers/pinpoint/types/errors.js +0 -12
- package/src/providers/pinpoint/types/errors.ts +0 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { __read, __spreadArray, __values } from "tslib";
|
|
4
|
-
import { ConsoleLogger } from '@aws-amplify/core
|
|
4
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
5
5
|
var logger = new ConsoleLogger('EventBuffer');
|
|
6
6
|
var EventBuffer = /** @class */ (function () {
|
|
7
7
|
function EventBuffer(config, getAnalyticsClient) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/analytics",
|
|
3
|
-
"version": "7.0.1-console-preview.
|
|
3
|
+
"version": "7.0.1-console-preview.8d88eef.0+8d88eef",
|
|
4
4
|
"description": "Analytics category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -99,10 +99,10 @@
|
|
|
99
99
|
"tslib": "^2.5.0"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
|
-
"@aws-amplify/core": "6.0.1-console-preview.
|
|
102
|
+
"@aws-amplify/core": "6.0.1-console-preview.8d88eef.0+8d88eef"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@aws-amplify/core": "6.0.1-console-preview.
|
|
105
|
+
"@aws-amplify/core": "6.0.1-console-preview.8d88eef.0+8d88eef",
|
|
106
106
|
"@aws-sdk/types": "3.398.0",
|
|
107
107
|
"typescript": "5.0.2"
|
|
108
108
|
},
|
|
@@ -150,5 +150,5 @@
|
|
|
150
150
|
"<rootDir>/src/setupTests.ts"
|
|
151
151
|
]
|
|
152
152
|
},
|
|
153
|
-
"gitHead": "
|
|
153
|
+
"gitHead": "8d88eef4137cef4fbe03d7d3683b5bec59feb7b8"
|
|
154
154
|
}
|
|
@@ -7,10 +7,8 @@ import {
|
|
|
7
7
|
resolveCredentials,
|
|
8
8
|
} from '../../../utils';
|
|
9
9
|
import { getEventBuffer } from '../utils/getEventBuffer';
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
ConsoleLogger,
|
|
13
|
-
} from '@aws-amplify/core/internals/utils';
|
|
10
|
+
import { AnalyticsAction } from '@aws-amplify/core/internals/utils';
|
|
11
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
14
12
|
|
|
15
13
|
const logger = new ConsoleLogger('Kinesis');
|
|
16
14
|
|
|
@@ -10,10 +10,8 @@ import {
|
|
|
10
10
|
resolveCredentials,
|
|
11
11
|
} from '../../../utils';
|
|
12
12
|
import { fromUtf8 } from '@smithy/util-utf8';
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
ConsoleLogger,
|
|
16
|
-
} from '@aws-amplify/core/internals/utils';
|
|
13
|
+
import { AnalyticsAction } from '@aws-amplify/core/internals/utils';
|
|
14
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
17
15
|
|
|
18
16
|
const logger = new ConsoleLogger('Kinesis');
|
|
19
17
|
|
|
@@ -6,10 +6,8 @@ import {
|
|
|
6
6
|
getAnalyticsUserAgentString,
|
|
7
7
|
resolveCredentials,
|
|
8
8
|
} from '../../../utils';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
ConsoleLogger,
|
|
12
|
-
} from '@aws-amplify/core/internals/utils';
|
|
9
|
+
import { AnalyticsAction } from '@aws-amplify/core/internals/utils';
|
|
10
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
13
11
|
|
|
14
12
|
const logger = new ConsoleLogger('KinesisFirehose');
|
|
15
13
|
|
|
@@ -9,12 +9,10 @@ import {
|
|
|
9
9
|
resolveCredentials,
|
|
10
10
|
} from '../../../utils';
|
|
11
11
|
import { fromUtf8 } from '@smithy/util-utf8';
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
ConsoleLogger as Logger,
|
|
15
|
-
} from '@aws-amplify/core/internals/utils';
|
|
12
|
+
import { AnalyticsAction } from '@aws-amplify/core/internals/utils';
|
|
13
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
16
14
|
|
|
17
|
-
const logger = new
|
|
15
|
+
const logger = new ConsoleLogger('KinesisFirehose');
|
|
18
16
|
|
|
19
17
|
export const record = ({ streamName, data }: RecordInput): void => {
|
|
20
18
|
if (!isAnalyticsEnabled()) {
|
|
@@ -6,10 +6,8 @@ import {
|
|
|
6
6
|
getAnalyticsUserAgentString,
|
|
7
7
|
resolveCredentials,
|
|
8
8
|
} from '../../../utils';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
ConsoleLogger,
|
|
12
|
-
} from '@aws-amplify/core/internals/utils';
|
|
9
|
+
import { AnalyticsAction } from '@aws-amplify/core/internals/utils';
|
|
10
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
13
11
|
|
|
14
12
|
const logger = new ConsoleLogger('Personalize');
|
|
15
13
|
|
|
@@ -14,10 +14,8 @@ import {
|
|
|
14
14
|
isAnalyticsEnabled,
|
|
15
15
|
resolveCredentials,
|
|
16
16
|
} from '../../../utils';
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
ConsoleLogger,
|
|
20
|
-
} from '@aws-amplify/core/internals/utils';
|
|
17
|
+
import { AnalyticsAction } from '@aws-amplify/core/internals/utils';
|
|
18
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
21
19
|
import {
|
|
22
20
|
IDENTIFY_EVENT_TYPE,
|
|
23
21
|
MEDIA_AUTO_TRACK_EVENT_TYPE,
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
import { EventBuffer } from '../../../utils';
|
|
5
5
|
import { PersonalizeBufferEvent, PersonalizeEvent } from '../types';
|
|
6
|
-
import {
|
|
6
|
+
import { isBrowser } from '@aws-amplify/core/internals/utils';
|
|
7
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
7
8
|
|
|
8
9
|
enum HTML5_MEDIA_EVENT {
|
|
9
10
|
'PLAY' = 'play',
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
import { resolveConfig, resolveCredentials } from '../utils';
|
|
5
5
|
import { flushEvents as flushEventsCore } from '@aws-amplify/core/internals/providers/pinpoint';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
ConsoleLogger,
|
|
9
|
-
} from '@aws-amplify/core/internals/utils';
|
|
6
|
+
import { AnalyticsAction } from '@aws-amplify/core/internals/utils';
|
|
7
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
10
8
|
import { getAnalyticsUserAgentString } from '../../../utils';
|
|
11
9
|
|
|
12
10
|
const logger = new ConsoleLogger('Analytics');
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import { AnalyticsAction } from '@aws-amplify/core/internals/utils';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
updateEndpoint,
|
|
7
|
+
UpdateEndpointException,
|
|
8
|
+
} from '@aws-amplify/core/internals/providers/pinpoint';
|
|
6
9
|
import { AnalyticsValidationErrorCode } from '../../../errors';
|
|
7
10
|
import { getAnalyticsUserAgentString } from '../../../utils';
|
|
8
|
-
import { IdentifyUserInput
|
|
11
|
+
import { IdentifyUserInput } from '../types';
|
|
9
12
|
import { resolveConfig, resolveCredentials } from '../utils';
|
|
10
13
|
|
|
11
14
|
/**
|
|
@@ -60,7 +63,7 @@ export const identifyUser = async ({
|
|
|
60
63
|
}: IdentifyUserInput): Promise<void> => {
|
|
61
64
|
const { credentials, identityId } = await resolveCredentials();
|
|
62
65
|
const { appId, region } = resolveConfig();
|
|
63
|
-
const { userAttributes } = options
|
|
66
|
+
const { userAttributes } = options ?? {};
|
|
64
67
|
updateEndpoint({
|
|
65
68
|
appId,
|
|
66
69
|
category: 'Analytics',
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { Hub } from '@aws-amplify/core';
|
|
4
|
+
import { Hub, ConsoleLogger } from '@aws-amplify/core';
|
|
5
5
|
import {
|
|
6
6
|
AMPLIFY_SYMBOL,
|
|
7
|
-
AnalyticsAction
|
|
8
|
-
ConsoleLogger as Logger,
|
|
7
|
+
AnalyticsAction
|
|
9
8
|
} from '@aws-amplify/core/internals/utils';
|
|
10
9
|
import { record as recordCore } from '@aws-amplify/core/internals/providers/pinpoint';
|
|
11
10
|
import {
|
|
@@ -19,7 +18,7 @@ import {
|
|
|
19
18
|
import { RecordInput } from '../types';
|
|
20
19
|
import { resolveConfig, resolveCredentials } from '../utils';
|
|
21
20
|
|
|
22
|
-
const logger = new
|
|
21
|
+
const logger = new ConsoleLogger('Analytics');
|
|
23
22
|
|
|
24
23
|
/**
|
|
25
24
|
* Records an Analytic event to Pinpoint. Events will be buffered and periodically sent to Pinpoint.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
export { UpdateEndpointException } from './errors';
|
|
5
4
|
export { RecordInput, IdentifyUserInput } from './inputs';
|
|
6
5
|
export { IdentifyUserOptions } from './options';
|
package/src/types/inputs.ts
CHANGED
package/src/types/options.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { ConsoleLogger } from '@aws-amplify/core
|
|
4
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
5
5
|
import { EventBufferConfig, IAnalyticsClient } from './';
|
|
6
6
|
|
|
7
7
|
const logger = new ConsoleLogger('EventBuffer');
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare enum UpdateEndpointException {
|
|
2
|
-
BadRequestException = "BadRequestException",
|
|
3
|
-
ForbiddenException = "ForbiddenException",
|
|
4
|
-
InternalServerErrorException = "InternalServerErrorException",
|
|
5
|
-
MethodNotAllowedException = "MethodNotAllowedException",
|
|
6
|
-
NotFoundException = "NotFoundException",
|
|
7
|
-
PayloadTooLargeException = "PayloadTooLargeException",
|
|
8
|
-
TooManyRequestsException = "TooManyRequestsException"
|
|
9
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.UpdateEndpointException = void 0;
|
|
6
|
-
var UpdateEndpointException;
|
|
7
|
-
(function (UpdateEndpointException) {
|
|
8
|
-
UpdateEndpointException["BadRequestException"] = "BadRequestException";
|
|
9
|
-
UpdateEndpointException["ForbiddenException"] = "ForbiddenException";
|
|
10
|
-
UpdateEndpointException["InternalServerErrorException"] = "InternalServerErrorException";
|
|
11
|
-
UpdateEndpointException["MethodNotAllowedException"] = "MethodNotAllowedException";
|
|
12
|
-
UpdateEndpointException["NotFoundException"] = "NotFoundException";
|
|
13
|
-
UpdateEndpointException["PayloadTooLargeException"] = "PayloadTooLargeException";
|
|
14
|
-
UpdateEndpointException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
15
|
-
})(UpdateEndpointException = exports.UpdateEndpointException || (exports.UpdateEndpointException = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare enum UpdateEndpointException {
|
|
2
|
-
BadRequestException = "BadRequestException",
|
|
3
|
-
ForbiddenException = "ForbiddenException",
|
|
4
|
-
InternalServerErrorException = "InternalServerErrorException",
|
|
5
|
-
MethodNotAllowedException = "MethodNotAllowedException",
|
|
6
|
-
NotFoundException = "NotFoundException",
|
|
7
|
-
PayloadTooLargeException = "PayloadTooLargeException",
|
|
8
|
-
TooManyRequestsException = "TooManyRequestsException"
|
|
9
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
export var UpdateEndpointException;
|
|
4
|
-
(function (UpdateEndpointException) {
|
|
5
|
-
UpdateEndpointException["BadRequestException"] = "BadRequestException";
|
|
6
|
-
UpdateEndpointException["ForbiddenException"] = "ForbiddenException";
|
|
7
|
-
UpdateEndpointException["InternalServerErrorException"] = "InternalServerErrorException";
|
|
8
|
-
UpdateEndpointException["MethodNotAllowedException"] = "MethodNotAllowedException";
|
|
9
|
-
UpdateEndpointException["NotFoundException"] = "NotFoundException";
|
|
10
|
-
UpdateEndpointException["PayloadTooLargeException"] = "PayloadTooLargeException";
|
|
11
|
-
UpdateEndpointException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
12
|
-
})(UpdateEndpointException || (UpdateEndpointException = {}));
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
export enum UpdateEndpointException {
|
|
5
|
-
BadRequestException = 'BadRequestException',
|
|
6
|
-
ForbiddenException = 'ForbiddenException',
|
|
7
|
-
InternalServerErrorException = 'InternalServerErrorException',
|
|
8
|
-
MethodNotAllowedException = 'MethodNotAllowedException',
|
|
9
|
-
NotFoundException = 'NotFoundException',
|
|
10
|
-
PayloadTooLargeException = 'PayloadTooLargeException',
|
|
11
|
-
TooManyRequestsException = 'TooManyRequestsException',
|
|
12
|
-
}
|