@aws-amplify/analytics 7.0.1-console-preview.8f82e46.0 → 7.0.1-console-preview.b278dcb.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/errors/validation.d.ts +2 -0
- package/lib/errors/validation.js +8 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- 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/configureAutoTrack.d.ts +15 -0
- package/lib/providers/pinpoint/apis/configureAutoTrack.js +35 -0
- package/lib/providers/pinpoint/apis/flushEvents.js +2 -1
- package/lib/providers/pinpoint/apis/identifyUser.js +4 -5
- package/lib/providers/pinpoint/apis/index.d.ts +1 -0
- package/lib/providers/pinpoint/apis/index.js +3 -1
- package/lib/providers/pinpoint/apis/record.js +1 -1
- package/lib/providers/pinpoint/index.d.ts +2 -2
- package/lib/providers/pinpoint/index.js +2 -1
- package/lib/providers/pinpoint/types/index.d.ts +1 -2
- package/lib/providers/pinpoint/types/index.js +0 -3
- package/lib/providers/pinpoint/types/inputs.d.ts +5 -1
- package/lib/trackers/EventTracker.d.ts +10 -0
- package/lib/trackers/EventTracker.js +104 -0
- package/lib/trackers/PageViewTracker.d.ts +18 -0
- package/lib/trackers/PageViewTracker.js +116 -0
- package/lib/trackers/SessionTracker.d.ts +13 -0
- package/lib/trackers/SessionTracker.js +73 -0
- package/lib/trackers/SessionTracker.native.d.ts +13 -0
- package/lib/trackers/SessionTracker.native.js +73 -0
- package/lib/trackers/index.d.ts +3 -0
- package/lib/trackers/index.js +11 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/index.d.ts +1 -2
- package/lib/types/inputs.d.ts +17 -3
- package/lib/types/options.d.ts +1 -1
- package/lib/types/trackers.d.ts +22 -0
- package/lib/utils/eventBuffer/EventBuffer.js +2 -2
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +5 -1
- package/lib/utils/trackerConfigHelpers.d.ts +5 -0
- package/lib/utils/trackerConfigHelpers.js +15 -0
- package/lib/utils/trackerConfigHelpers.native.d.ts +5 -0
- package/lib/utils/trackerConfigHelpers.native.js +14 -0
- package/lib/utils/trackerHelpers.d.ts +9 -0
- package/lib/utils/trackerHelpers.js +44 -0
- package/lib-esm/errors/validation.d.ts +2 -0
- package/lib-esm/errors/validation.js +8 -0
- package/lib-esm/index.d.ts +1 -1
- package/lib-esm/index.js +1 -1
- 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/configureAutoTrack.d.ts +15 -0
- package/lib-esm/providers/pinpoint/apis/configureAutoTrack.js +31 -0
- 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/index.d.ts +1 -0
- package/lib-esm/providers/pinpoint/apis/index.js +1 -0
- package/lib-esm/providers/pinpoint/apis/record.js +3 -3
- package/lib-esm/providers/pinpoint/index.d.ts +2 -2
- package/lib-esm/providers/pinpoint/index.js +1 -1
- package/lib-esm/providers/pinpoint/types/index.d.ts +1 -2
- package/lib-esm/providers/pinpoint/types/index.js +1 -1
- package/lib-esm/providers/pinpoint/types/inputs.d.ts +5 -1
- package/lib-esm/trackers/EventTracker.d.ts +10 -0
- package/lib-esm/trackers/EventTracker.js +101 -0
- package/lib-esm/trackers/PageViewTracker.d.ts +18 -0
- package/lib-esm/trackers/PageViewTracker.js +113 -0
- package/lib-esm/trackers/SessionTracker.d.ts +13 -0
- package/lib-esm/trackers/SessionTracker.js +70 -0
- package/lib-esm/trackers/SessionTracker.native.d.ts +13 -0
- package/lib-esm/trackers/SessionTracker.native.js +70 -0
- package/lib-esm/trackers/index.d.ts +3 -0
- package/lib-esm/trackers/index.js +5 -0
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/index.d.ts +1 -2
- package/lib-esm/types/inputs.d.ts +17 -3
- package/lib-esm/types/options.d.ts +1 -1
- package/lib-esm/types/trackers.d.ts +22 -0
- package/lib-esm/utils/eventBuffer/EventBuffer.js +1 -1
- package/lib-esm/utils/index.d.ts +2 -0
- package/lib-esm/utils/index.js +2 -0
- package/lib-esm/utils/trackerConfigHelpers.d.ts +5 -0
- package/lib-esm/utils/trackerConfigHelpers.js +11 -0
- package/lib-esm/utils/trackerConfigHelpers.native.d.ts +5 -0
- package/lib-esm/utils/trackerConfigHelpers.native.js +10 -0
- package/lib-esm/utils/trackerHelpers.d.ts +9 -0
- package/lib-esm/utils/trackerHelpers.js +40 -0
- package/package.json +5 -4
- package/src/errors/validation.ts +8 -0
- package/src/index.ts +3 -1
- 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/configureAutoTrack.ts +49 -0
- package/src/providers/pinpoint/apis/flushEvents.ts +2 -4
- package/src/providers/pinpoint/apis/identifyUser.ts +6 -3
- package/src/providers/pinpoint/apis/index.ts +1 -0
- package/src/providers/pinpoint/apis/record.ts +2 -3
- package/src/providers/pinpoint/index.ts +6 -2
- package/src/providers/pinpoint/types/index.ts +5 -2
- package/src/providers/pinpoint/types/inputs.ts +9 -1
- package/src/trackers/EventTracker.ts +135 -0
- package/src/trackers/PageViewTracker.ts +160 -0
- package/src/trackers/SessionTracker.native.ts +106 -0
- package/src/trackers/SessionTracker.ts +106 -0
- package/src/trackers/index.ts +6 -0
- package/src/types/index.ts +4 -13
- package/src/types/inputs.ts +26 -3
- package/src/types/options.ts +1 -1
- package/src/types/trackers.ts +35 -0
- package/src/utils/eventBuffer/EventBuffer.ts +1 -1
- package/src/utils/index.ts +2 -0
- package/src/utils/trackerConfigHelpers.native.ts +18 -0
- package/src/utils/trackerConfigHelpers.ts +19 -0
- package/src/utils/trackerHelpers.ts +57 -0
- package/lib/providers/pinpoint/types/errors.d.ts +0 -9
- package/lib/providers/pinpoint/types/errors.js +0 -15
- package/lib/types/analytics.d.ts +0 -50
- package/lib-esm/providers/pinpoint/types/errors.d.ts +0 -9
- package/lib-esm/providers/pinpoint/types/errors.js +0 -12
- package/lib-esm/types/analytics.d.ts +0 -50
- package/src/providers/pinpoint/types/errors.ts +0 -12
- package/src/types/analytics.ts +0 -70
- /package/lib/types/{analytics.js → trackers.js} +0 -0
- /package/lib-esm/types/{analytics.js → trackers.js} +0 -0
|
@@ -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,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Analytics instance options
|
|
3
|
-
*/
|
|
4
|
-
export interface EventAttributes {
|
|
5
|
-
[key: string]: string;
|
|
6
|
-
}
|
|
7
|
-
export interface EventMetrics {
|
|
8
|
-
[key: string]: number;
|
|
9
|
-
}
|
|
10
|
-
export interface PageViewTrackOpts {
|
|
11
|
-
enable: boolean;
|
|
12
|
-
type?: string;
|
|
13
|
-
eventName?: string;
|
|
14
|
-
provider?: string;
|
|
15
|
-
attributes?: EventAttributes | (() => EventAttributes | Promise<EventAttributes>);
|
|
16
|
-
getUrl?: () => string;
|
|
17
|
-
}
|
|
18
|
-
export interface EventTrackOpts {
|
|
19
|
-
enable: boolean;
|
|
20
|
-
events?: Array<string>;
|
|
21
|
-
selectorPrefix?: string;
|
|
22
|
-
provider?: string;
|
|
23
|
-
attributes?: EventAttributes | (() => EventAttributes | Promise<EventAttributes>);
|
|
24
|
-
}
|
|
25
|
-
export interface SessionTrackOpts {
|
|
26
|
-
enable: boolean;
|
|
27
|
-
attributes?: EventAttributes | (() => EventAttributes | Promise<EventAttributes>);
|
|
28
|
-
provider?: string;
|
|
29
|
-
}
|
|
30
|
-
export type AutoTrackAttributes = (() => EventAttributes | Promise<EventAttributes>) | EventAttributes;
|
|
31
|
-
export interface AutoTrackSessionOpts {
|
|
32
|
-
enable: boolean;
|
|
33
|
-
attributes?: AutoTrackAttributes;
|
|
34
|
-
provider?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface AutoTrackPageViewOpts {
|
|
37
|
-
enable: boolean;
|
|
38
|
-
eventName?: string;
|
|
39
|
-
attributes?: AutoTrackAttributes;
|
|
40
|
-
type?: 'SPA' | 'multiPageApp';
|
|
41
|
-
provider?: string;
|
|
42
|
-
getUrl?: () => string;
|
|
43
|
-
}
|
|
44
|
-
export interface AutoTrackEventOpts {
|
|
45
|
-
enable: boolean;
|
|
46
|
-
events?: string[];
|
|
47
|
-
selectorPrefix?: string;
|
|
48
|
-
provider?: string;
|
|
49
|
-
attributes?: AutoTrackAttributes;
|
|
50
|
-
}
|
|
@@ -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
|
-
}
|
package/src/types/analytics.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Analytics instance options
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export interface EventAttributes {
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface EventMetrics {
|
|
13
|
-
[key: string]: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface PageViewTrackOpts {
|
|
17
|
-
enable: boolean;
|
|
18
|
-
type?: string;
|
|
19
|
-
eventName?: string;
|
|
20
|
-
provider?: string;
|
|
21
|
-
attributes?:
|
|
22
|
-
| EventAttributes
|
|
23
|
-
| (() => EventAttributes | Promise<EventAttributes>);
|
|
24
|
-
getUrl?: () => string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface EventTrackOpts {
|
|
28
|
-
enable: boolean;
|
|
29
|
-
events?: Array<string>;
|
|
30
|
-
selectorPrefix?: string;
|
|
31
|
-
provider?: string;
|
|
32
|
-
attributes?:
|
|
33
|
-
| EventAttributes
|
|
34
|
-
| (() => EventAttributes | Promise<EventAttributes>);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface SessionTrackOpts {
|
|
38
|
-
enable: boolean;
|
|
39
|
-
attributes?:
|
|
40
|
-
| EventAttributes
|
|
41
|
-
| (() => EventAttributes | Promise<EventAttributes>);
|
|
42
|
-
provider?: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export type AutoTrackAttributes =
|
|
46
|
-
| (() => EventAttributes | Promise<EventAttributes>)
|
|
47
|
-
| EventAttributes;
|
|
48
|
-
|
|
49
|
-
export interface AutoTrackSessionOpts {
|
|
50
|
-
enable: boolean;
|
|
51
|
-
attributes?: AutoTrackAttributes;
|
|
52
|
-
provider?: string;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface AutoTrackPageViewOpts {
|
|
56
|
-
enable: boolean;
|
|
57
|
-
eventName?: string;
|
|
58
|
-
attributes?: AutoTrackAttributes;
|
|
59
|
-
type?: 'SPA' | 'multiPageApp';
|
|
60
|
-
provider?: string;
|
|
61
|
-
getUrl?: () => string;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface AutoTrackEventOpts {
|
|
65
|
-
enable: boolean;
|
|
66
|
-
events?: string[];
|
|
67
|
-
selectorPrefix?: string;
|
|
68
|
-
provider?: string;
|
|
69
|
-
attributes?: AutoTrackAttributes;
|
|
70
|
-
}
|
|
File without changes
|
|
File without changes
|