@aws-amplify/analytics 7.0.1-console-preview.431c340.0 → 7.0.1-console-preview.4b7d177.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/kinesis-firehose/package.json +7 -0
- package/lib/errors/validation.d.ts +0 -1
- package/lib/errors/validation.js +0 -4
- package/lib/providers/kinesis/index.d.ts +1 -1
- package/lib/providers/kinesis/index.js +3 -2
- package/lib/providers/kinesis/types/index.d.ts +1 -1
- package/lib/providers/kinesis/types/index.js +0 -2
- package/lib/providers/kinesis-firehose/apis/index.d.ts +1 -0
- package/lib/providers/kinesis-firehose/apis/index.js +7 -0
- package/lib/providers/kinesis-firehose/apis/record.d.ts +2 -0
- package/lib/providers/kinesis-firehose/apis/record.js +9 -0
- package/lib/providers/kinesis-firehose/index.d.ts +1 -0
- package/lib/providers/kinesis-firehose/index.js +7 -0
- package/lib/providers/kinesis-firehose/types/index.d.ts +1 -0
- package/lib/providers/kinesis-firehose/types/index.js +4 -0
- package/lib/providers/kinesis-firehose/types/inputs.d.ts +1 -0
- package/lib/providers/kinesis-firehose/types/inputs.js +4 -0
- package/lib/providers/personalize/apis/index.d.ts +1 -0
- package/lib/providers/personalize/apis/index.js +7 -0
- package/lib/providers/personalize/apis/record.d.ts +2 -0
- package/lib/providers/personalize/apis/record.js +9 -0
- package/lib/providers/personalize/index.d.ts +1 -0
- package/lib/providers/personalize/index.js +7 -0
- package/lib/providers/personalize/types/index.d.ts +1 -0
- package/lib/providers/personalize/types/index.js +4 -0
- package/lib/providers/personalize/types/inputs.d.ts +1 -0
- package/lib/providers/personalize/types/inputs.js +4 -0
- package/lib/providers/pinpoint/apis/record.d.ts +8 -14
- package/lib/providers/pinpoint/apis/record.js +11 -19
- package/lib/providers/pinpoint/types/inputs.d.ts +4 -6
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/inputs.d.ts +1 -1
- package/lib-esm/errors/validation.d.ts +0 -1
- package/lib-esm/errors/validation.js +0 -4
- package/lib-esm/providers/kinesis/index.d.ts +1 -1
- package/lib-esm/providers/kinesis/index.js +1 -1
- package/lib-esm/providers/kinesis/types/index.d.ts +1 -1
- package/lib-esm/providers/kinesis/types/index.js +1 -1
- package/lib-esm/providers/kinesis-firehose/apis/index.d.ts +1 -0
- package/lib-esm/providers/kinesis-firehose/apis/index.js +3 -0
- package/lib-esm/providers/kinesis-firehose/apis/record.d.ts +2 -0
- package/lib-esm/providers/kinesis-firehose/apis/record.js +5 -0
- package/lib-esm/providers/kinesis-firehose/index.d.ts +1 -0
- package/lib-esm/providers/kinesis-firehose/index.js +3 -0
- package/lib-esm/providers/kinesis-firehose/types/index.d.ts +1 -0
- package/lib-esm/providers/kinesis-firehose/types/index.js +3 -0
- package/lib-esm/providers/kinesis-firehose/types/inputs.d.ts +1 -0
- package/lib-esm/providers/kinesis-firehose/types/inputs.js +3 -0
- package/lib-esm/providers/personalize/apis/index.d.ts +1 -0
- package/lib-esm/providers/personalize/apis/index.js +3 -0
- package/lib-esm/providers/personalize/apis/record.d.ts +2 -0
- package/lib-esm/providers/personalize/apis/record.js +5 -0
- package/lib-esm/providers/personalize/index.d.ts +1 -0
- package/lib-esm/providers/personalize/index.js +3 -0
- package/lib-esm/providers/personalize/types/index.d.ts +1 -0
- package/lib-esm/providers/personalize/types/index.js +3 -0
- package/lib-esm/providers/personalize/types/inputs.d.ts +1 -0
- package/lib-esm/providers/personalize/types/inputs.js +3 -0
- package/lib-esm/providers/pinpoint/apis/record.d.ts +8 -14
- package/lib-esm/providers/pinpoint/apis/record.js +11 -19
- package/lib-esm/providers/pinpoint/types/inputs.d.ts +4 -6
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/inputs.d.ts +1 -1
- package/package.json +25 -5
- package/personalize/package.json +7 -0
- package/src/errors/validation.ts +0 -4
- package/src/providers/kinesis/index.ts +1 -1
- package/src/providers/kinesis/types/index.ts +1 -1
- package/src/providers/kinesis-firehose/apis/index.ts +4 -0
- package/src/providers/kinesis-firehose/apis/record.ts +8 -0
- package/src/providers/kinesis-firehose/index.ts +4 -0
- package/src/providers/kinesis-firehose/types/index.ts +4 -0
- package/src/providers/kinesis-firehose/types/inputs.ts +4 -0
- package/src/providers/personalize/apis/index.ts +4 -0
- package/src/providers/personalize/apis/record.ts +8 -0
- package/src/providers/personalize/index.ts +4 -0
- package/src/providers/personalize/types/index.ts +4 -0
- package/src/providers/personalize/types/inputs.ts +4 -0
- package/src/providers/pinpoint/apis/record.ts +13 -20
- package/src/providers/pinpoint/types/inputs.ts +4 -6
- package/src/types/inputs.ts +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aws-amplify/analytics/kinesis-firehose",
|
|
3
|
+
"main": "../lib/providers/kinesis-firehose/index.js",
|
|
4
|
+
"browser": "../lib-esm/providers/kinesis-firehose/index.js",
|
|
5
|
+
"module": "../lib-esm/providers/kinesis-firehose/index.js",
|
|
6
|
+
"typings": "../lib-esm/providers/kinesis-firehose/index.d.ts"
|
|
7
|
+
}
|
package/lib/errors/validation.js
CHANGED
|
@@ -8,7 +8,6 @@ var AnalyticsValidationErrorCode;
|
|
|
8
8
|
(function (AnalyticsValidationErrorCode) {
|
|
9
9
|
AnalyticsValidationErrorCode["NoAppId"] = "NoAppId";
|
|
10
10
|
AnalyticsValidationErrorCode["NoCredentials"] = "NoCredentials";
|
|
11
|
-
AnalyticsValidationErrorCode["NoEvent"] = "NoEvent";
|
|
12
11
|
AnalyticsValidationErrorCode["NoEventName"] = "NoEventName";
|
|
13
12
|
AnalyticsValidationErrorCode["NoRegion"] = "NoRegion";
|
|
14
13
|
})(AnalyticsValidationErrorCode = exports.AnalyticsValidationErrorCode || (exports.AnalyticsValidationErrorCode = {}));
|
|
@@ -19,9 +18,6 @@ exports.validationErrorMap = (_a = {},
|
|
|
19
18
|
_a[AnalyticsValidationErrorCode.NoCredentials] = {
|
|
20
19
|
message: 'Credentials should not be empty.',
|
|
21
20
|
},
|
|
22
|
-
_a[AnalyticsValidationErrorCode.NoEvent] = {
|
|
23
|
-
message: 'An event is required to record.',
|
|
24
|
-
},
|
|
25
21
|
_a[AnalyticsValidationErrorCode.NoEventName] = {
|
|
26
22
|
message: 'Events must specify a name.',
|
|
27
23
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { record } from './apis';
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
exports.record = void 0;
|
|
6
|
+
var apis_1 = require("./apis");
|
|
7
|
+
Object.defineProperty(exports, "record", { enumerable: true, get: function () { return apis_1.record; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { RecordInput } from './inputs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { record } from './record';
|
|
@@ -0,0 +1,7 @@
|
|
|
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.record = void 0;
|
|
6
|
+
var record_1 = require("./record");
|
|
7
|
+
Object.defineProperty(exports, "record", { enumerable: true, get: function () { return record_1.record; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
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.record = void 0;
|
|
6
|
+
var record = function (input) {
|
|
7
|
+
throw new Error('Not Yet Implemented');
|
|
8
|
+
};
|
|
9
|
+
exports.record = record;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { record } from './apis';
|
|
@@ -0,0 +1,7 @@
|
|
|
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.record = void 0;
|
|
6
|
+
var apis_1 = require("./apis");
|
|
7
|
+
Object.defineProperty(exports, "record", { enumerable: true, get: function () { return apis_1.record; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RecordInput } from './inputs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type RecordInput = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { record } from './record';
|
|
@@ -0,0 +1,7 @@
|
|
|
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.record = void 0;
|
|
6
|
+
var record_1 = require("./record");
|
|
7
|
+
Object.defineProperty(exports, "record", { enumerable: true, get: function () { return record_1.record; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
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.record = void 0;
|
|
6
|
+
var record = function (input) {
|
|
7
|
+
throw new Error('Not Yet Implemented');
|
|
8
|
+
};
|
|
9
|
+
exports.record = record;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { record } from './apis';
|
|
@@ -0,0 +1,7 @@
|
|
|
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.record = void 0;
|
|
6
|
+
var apis_1 = require("./apis");
|
|
7
|
+
Object.defineProperty(exports, "record", { enumerable: true, get: function () { return apis_1.record; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RecordInput } from './inputs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type RecordInput = {};
|
|
@@ -10,27 +10,21 @@ import { RecordInput } from '../types';
|
|
|
10
10
|
* @example
|
|
11
11
|
* ```ts
|
|
12
12
|
* // Send an event to Pinpoint
|
|
13
|
-
* record({
|
|
14
|
-
* event: {
|
|
15
|
-
* name: eventName,
|
|
16
|
-
* }
|
|
17
|
-
* })
|
|
13
|
+
* record({ name: eventName })
|
|
18
14
|
* ```
|
|
19
15
|
*
|
|
20
16
|
* @example
|
|
21
17
|
* ```ts
|
|
22
18
|
* // Send an event to Pinpoint with metrics & custom attributes
|
|
23
19
|
* record({
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* 'my-metric': metricValue
|
|
31
|
-
* }
|
|
20
|
+
* name: eventName,
|
|
21
|
+
* attributes: {
|
|
22
|
+
* 'my-attribute': attributeValue
|
|
23
|
+
* },
|
|
24
|
+
* metrics: {
|
|
25
|
+
* 'my-metric': metricValue
|
|
32
26
|
* }
|
|
33
27
|
* })
|
|
34
28
|
* ```
|
|
35
29
|
*/
|
|
36
|
-
export declare const record: (
|
|
30
|
+
export declare const record: (input: RecordInput) => void;
|
|
@@ -20,34 +20,26 @@ var logger = new utils_1.ConsoleLogger('Analytics');
|
|
|
20
20
|
* @example
|
|
21
21
|
* ```ts
|
|
22
22
|
* // Send an event to Pinpoint
|
|
23
|
-
* record({
|
|
24
|
-
* event: {
|
|
25
|
-
* name: eventName,
|
|
26
|
-
* }
|
|
27
|
-
* })
|
|
23
|
+
* record({ name: eventName })
|
|
28
24
|
* ```
|
|
29
25
|
*
|
|
30
26
|
* @example
|
|
31
27
|
* ```ts
|
|
32
28
|
* // Send an event to Pinpoint with metrics & custom attributes
|
|
33
29
|
* record({
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* 'my-metric': metricValue
|
|
41
|
-
* }
|
|
30
|
+
* name: eventName,
|
|
31
|
+
* attributes: {
|
|
32
|
+
* 'my-attribute': attributeValue
|
|
33
|
+
* },
|
|
34
|
+
* metrics: {
|
|
35
|
+
* 'my-metric': metricValue
|
|
42
36
|
* }
|
|
43
37
|
* })
|
|
44
38
|
* ```
|
|
45
39
|
*/
|
|
46
|
-
var record = function (
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
(0, errors_1.assertValidationError)(!!event, errors_1.AnalyticsValidationErrorCode.NoEvent);
|
|
50
|
-
(0, errors_1.assertValidationError)(!!event.name, errors_1.AnalyticsValidationErrorCode.NoEventName);
|
|
40
|
+
var record = function (input) {
|
|
41
|
+
var _a = (0, utils_2.resolveConfig)(), appId = _a.appId, region = _a.region;
|
|
42
|
+
(0, errors_1.assertValidationError)(!!input.name, errors_1.AnalyticsValidationErrorCode.NoEventName);
|
|
51
43
|
(0, utils_2.resolveCredentials)()
|
|
52
44
|
.then(function (_a) {
|
|
53
45
|
var credentials = _a.credentials, identityId = _a.identityId;
|
|
@@ -55,7 +47,7 @@ var record = function (_a) {
|
|
|
55
47
|
appId: appId,
|
|
56
48
|
category: 'Analytics',
|
|
57
49
|
credentials: credentials,
|
|
58
|
-
event:
|
|
50
|
+
event: input,
|
|
59
51
|
identityId: identityId,
|
|
60
52
|
region: region,
|
|
61
53
|
userAgentValue: (0, userAgent_1.getAnalyticsUserAgentString)(utils_1.AnalyticsAction.Record),
|
|
@@ -4,10 +4,8 @@ import { AnalyticsIdentifyUserInput } from '../../../types';
|
|
|
4
4
|
/**
|
|
5
5
|
* Input type for Pinpoint record API.
|
|
6
6
|
*/
|
|
7
|
-
export type RecordInput =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
event: PinpointAnalyticsEvent;
|
|
12
|
-
};
|
|
7
|
+
export type RecordInput = PinpointAnalyticsEvent;
|
|
8
|
+
/**
|
|
9
|
+
* Input type for Pinpoint identifyUser API.
|
|
10
|
+
*/
|
|
13
11
|
export type IdentifyUserInput = AnalyticsIdentifyUserInput<IdentifyUserOptions>;
|