@aws-sdk/client-personalize-events 3.211.0 → 3.212.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/models/models_0.js +15 -1
- package/dist-cjs/protocols/Aws_restJson1.js +8 -0
- package/dist-es/models/models_0.js +13 -0
- package/dist-es/protocols/Aws_restJson1.js +8 -0
- package/dist-types/models/models_0.d.ts +27 -2
- package/dist-types/ts3.4/models/models_0.d.ts +7 -0
- package/package.json +28 -28
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PutUsersRequestFilterSensitiveLog = exports.UserFilterSensitiveLog = exports.PutItemsRequestFilterSensitiveLog = exports.ItemFilterSensitiveLog = exports.PutEventsRequestFilterSensitiveLog = exports.EventFilterSensitiveLog = exports.ResourceNotFoundException = exports.ResourceInUseException = exports.InvalidInputException = void 0;
|
|
3
|
+
exports.PutUsersRequestFilterSensitiveLog = exports.UserFilterSensitiveLog = exports.PutItemsRequestFilterSensitiveLog = exports.ItemFilterSensitiveLog = exports.PutEventsRequestFilterSensitiveLog = exports.EventFilterSensitiveLog = exports.MetricAttributionFilterSensitiveLog = exports.ResourceNotFoundException = exports.ResourceInUseException = exports.InvalidInputException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
4
5
|
const PersonalizeEventsServiceException_1 = require("./PersonalizeEventsServiceException");
|
|
5
6
|
class InvalidInputException extends PersonalizeEventsServiceException_1.PersonalizeEventsServiceException {
|
|
6
7
|
constructor(opts) {
|
|
@@ -41,27 +42,40 @@ class ResourceNotFoundException extends PersonalizeEventsServiceException_1.Pers
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
45
|
+
const MetricAttributionFilterSensitiveLog = (obj) => ({
|
|
46
|
+
...obj,
|
|
47
|
+
});
|
|
48
|
+
exports.MetricAttributionFilterSensitiveLog = MetricAttributionFilterSensitiveLog;
|
|
44
49
|
const EventFilterSensitiveLog = (obj) => ({
|
|
45
50
|
...obj,
|
|
51
|
+
...(obj.itemId && { itemId: smithy_client_1.SENSITIVE_STRING }),
|
|
52
|
+
...(obj.properties && { properties: smithy_client_1.SENSITIVE_STRING }),
|
|
53
|
+
...(obj.impression && { impression: smithy_client_1.SENSITIVE_STRING }),
|
|
46
54
|
});
|
|
47
55
|
exports.EventFilterSensitiveLog = EventFilterSensitiveLog;
|
|
48
56
|
const PutEventsRequestFilterSensitiveLog = (obj) => ({
|
|
49
57
|
...obj,
|
|
58
|
+
...(obj.userId && { userId: smithy_client_1.SENSITIVE_STRING }),
|
|
59
|
+
...(obj.eventList && { eventList: smithy_client_1.SENSITIVE_STRING }),
|
|
50
60
|
});
|
|
51
61
|
exports.PutEventsRequestFilterSensitiveLog = PutEventsRequestFilterSensitiveLog;
|
|
52
62
|
const ItemFilterSensitiveLog = (obj) => ({
|
|
53
63
|
...obj,
|
|
64
|
+
...(obj.properties && { properties: smithy_client_1.SENSITIVE_STRING }),
|
|
54
65
|
});
|
|
55
66
|
exports.ItemFilterSensitiveLog = ItemFilterSensitiveLog;
|
|
56
67
|
const PutItemsRequestFilterSensitiveLog = (obj) => ({
|
|
57
68
|
...obj,
|
|
69
|
+
...(obj.items && { items: obj.items.map((item) => (0, exports.ItemFilterSensitiveLog)(item)) }),
|
|
58
70
|
});
|
|
59
71
|
exports.PutItemsRequestFilterSensitiveLog = PutItemsRequestFilterSensitiveLog;
|
|
60
72
|
const UserFilterSensitiveLog = (obj) => ({
|
|
61
73
|
...obj,
|
|
74
|
+
...(obj.properties && { properties: smithy_client_1.SENSITIVE_STRING }),
|
|
62
75
|
});
|
|
63
76
|
exports.UserFilterSensitiveLog = UserFilterSensitiveLog;
|
|
64
77
|
const PutUsersRequestFilterSensitiveLog = (obj) => ({
|
|
65
78
|
...obj,
|
|
79
|
+
...(obj.users && { users: obj.users.map((item) => (0, exports.UserFilterSensitiveLog)(item)) }),
|
|
66
80
|
});
|
|
67
81
|
exports.PutUsersRequestFilterSensitiveLog = PutUsersRequestFilterSensitiveLog;
|
|
@@ -222,6 +222,9 @@ const serializeAws_restJson1Event = (input, context) => {
|
|
|
222
222
|
...(input.eventValue != null && { eventValue: (0, smithy_client_1.serializeFloat)(input.eventValue) }),
|
|
223
223
|
...(input.impression != null && { impression: serializeAws_restJson1Impression(input.impression, context) }),
|
|
224
224
|
...(input.itemId != null && { itemId: input.itemId }),
|
|
225
|
+
...(input.metricAttribution != null && {
|
|
226
|
+
metricAttribution: serializeAws_restJson1MetricAttribution(input.metricAttribution, context),
|
|
227
|
+
}),
|
|
225
228
|
...(input.properties != null && { properties: smithy_client_1.LazyJsonString.fromObject(input.properties) }),
|
|
226
229
|
...(input.recommendationId != null && { recommendationId: input.recommendationId }),
|
|
227
230
|
...(input.sentAt != null && { sentAt: Math.round(input.sentAt.getTime() / 1000) }),
|
|
@@ -254,6 +257,11 @@ const serializeAws_restJson1ItemList = (input, context) => {
|
|
|
254
257
|
return serializeAws_restJson1Item(entry, context);
|
|
255
258
|
});
|
|
256
259
|
};
|
|
260
|
+
const serializeAws_restJson1MetricAttribution = (input, context) => {
|
|
261
|
+
return {
|
|
262
|
+
...(input.eventAttributionSource != null && { eventAttributionSource: input.eventAttributionSource }),
|
|
263
|
+
};
|
|
264
|
+
};
|
|
257
265
|
const serializeAws_restJson1User = (input, context) => {
|
|
258
266
|
return {
|
|
259
267
|
...(input.properties != null && { properties: smithy_client_1.LazyJsonString.fromObject(input.properties) }),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SENSITIVE_STRING, } from "@aws-sdk/smithy-client";
|
|
1
2
|
import { PersonalizeEventsServiceException as __BaseException } from "./PersonalizeEventsServiceException";
|
|
2
3
|
export class InvalidInputException extends __BaseException {
|
|
3
4
|
constructor(opts) {
|
|
@@ -35,21 +36,33 @@ export class ResourceNotFoundException extends __BaseException {
|
|
|
35
36
|
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
36
37
|
}
|
|
37
38
|
}
|
|
39
|
+
export const MetricAttributionFilterSensitiveLog = (obj) => ({
|
|
40
|
+
...obj,
|
|
41
|
+
});
|
|
38
42
|
export const EventFilterSensitiveLog = (obj) => ({
|
|
39
43
|
...obj,
|
|
44
|
+
...(obj.itemId && { itemId: SENSITIVE_STRING }),
|
|
45
|
+
...(obj.properties && { properties: SENSITIVE_STRING }),
|
|
46
|
+
...(obj.impression && { impression: SENSITIVE_STRING }),
|
|
40
47
|
});
|
|
41
48
|
export const PutEventsRequestFilterSensitiveLog = (obj) => ({
|
|
42
49
|
...obj,
|
|
50
|
+
...(obj.userId && { userId: SENSITIVE_STRING }),
|
|
51
|
+
...(obj.eventList && { eventList: SENSITIVE_STRING }),
|
|
43
52
|
});
|
|
44
53
|
export const ItemFilterSensitiveLog = (obj) => ({
|
|
45
54
|
...obj,
|
|
55
|
+
...(obj.properties && { properties: SENSITIVE_STRING }),
|
|
46
56
|
});
|
|
47
57
|
export const PutItemsRequestFilterSensitiveLog = (obj) => ({
|
|
48
58
|
...obj,
|
|
59
|
+
...(obj.items && { items: obj.items.map((item) => ItemFilterSensitiveLog(item)) }),
|
|
49
60
|
});
|
|
50
61
|
export const UserFilterSensitiveLog = (obj) => ({
|
|
51
62
|
...obj,
|
|
63
|
+
...(obj.properties && { properties: SENSITIVE_STRING }),
|
|
52
64
|
});
|
|
53
65
|
export const PutUsersRequestFilterSensitiveLog = (obj) => ({
|
|
54
66
|
...obj,
|
|
67
|
+
...(obj.users && { users: obj.users.map((item) => UserFilterSensitiveLog(item)) }),
|
|
55
68
|
});
|
|
@@ -213,6 +213,9 @@ const serializeAws_restJson1Event = (input, context) => {
|
|
|
213
213
|
...(input.eventValue != null && { eventValue: __serializeFloat(input.eventValue) }),
|
|
214
214
|
...(input.impression != null && { impression: serializeAws_restJson1Impression(input.impression, context) }),
|
|
215
215
|
...(input.itemId != null && { itemId: input.itemId }),
|
|
216
|
+
...(input.metricAttribution != null && {
|
|
217
|
+
metricAttribution: serializeAws_restJson1MetricAttribution(input.metricAttribution, context),
|
|
218
|
+
}),
|
|
216
219
|
...(input.properties != null && { properties: __LazyJsonString.fromObject(input.properties) }),
|
|
217
220
|
...(input.recommendationId != null && { recommendationId: input.recommendationId }),
|
|
218
221
|
...(input.sentAt != null && { sentAt: Math.round(input.sentAt.getTime() / 1000) }),
|
|
@@ -245,6 +248,11 @@ const serializeAws_restJson1ItemList = (input, context) => {
|
|
|
245
248
|
return serializeAws_restJson1Item(entry, context);
|
|
246
249
|
});
|
|
247
250
|
};
|
|
251
|
+
const serializeAws_restJson1MetricAttribution = (input, context) => {
|
|
252
|
+
return {
|
|
253
|
+
...(input.eventAttributionSource != null && { eventAttributionSource: input.eventAttributionSource }),
|
|
254
|
+
};
|
|
255
|
+
};
|
|
248
256
|
const serializeAws_restJson1User = (input, context) => {
|
|
249
257
|
return {
|
|
250
258
|
...(input.properties != null && { properties: __LazyJsonString.fromObject(input.properties) }),
|
|
@@ -11,6 +11,15 @@ export declare class InvalidInputException extends __BaseException {
|
|
|
11
11
|
*/
|
|
12
12
|
constructor(opts: __ExceptionOptionType<InvalidInputException, __BaseException>);
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* <p>Contains information about a metric attribution associated with an event. For more information about metric attributions, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html">Measuring impact of recommendations</a>.</p>
|
|
16
|
+
*/
|
|
17
|
+
export interface MetricAttribution {
|
|
18
|
+
/**
|
|
19
|
+
* <p>The source of the event, such as a third party.</p>
|
|
20
|
+
*/
|
|
21
|
+
eventAttributionSource: string | undefined;
|
|
22
|
+
}
|
|
14
23
|
/**
|
|
15
24
|
* <p>Represents user interaction event information sent using the
|
|
16
25
|
* <code>PutEvents</code> API.</p>
|
|
@@ -55,13 +64,25 @@ export interface Event {
|
|
|
55
64
|
*/
|
|
56
65
|
sentAt: Date | undefined;
|
|
57
66
|
/**
|
|
58
|
-
* <p>The ID of the
|
|
67
|
+
* <p>The ID of the list of recommendations that contains the item the user interacted with. Provide a <code>recommendationId</code> to have Amazon Personalize implicitly record the
|
|
68
|
+
* recommendations you show your user as impressions data. Or provide a <code>recommendationId</code> if you use a metric attribution to measure the impact of recommendations.
|
|
69
|
+
* </p>
|
|
70
|
+
* <p>
|
|
71
|
+
* For more information on recording impressions data, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/recording-events.html#putevents-including-impressions-data">Recording impressions data</a>.
|
|
72
|
+
* For more information on creating a metric attribution see <a href="https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html">Measuring impact of recommendations</a>.
|
|
73
|
+
* </p>
|
|
59
74
|
*/
|
|
60
75
|
recommendationId?: string;
|
|
61
76
|
/**
|
|
62
|
-
* <p>A list of item IDs that represents the sequence of items you have shown the user. For example, <code>["itemId1", "itemId2", "itemId3"]</code
|
|
77
|
+
* <p>A list of item IDs that represents the sequence of items you have shown the user. For example, <code>["itemId1", "itemId2", "itemId3"]</code>. Provide a list of
|
|
78
|
+
* items to manually record impressions data for an event. For more information on recording impressions data,
|
|
79
|
+
* see <a href="https://docs.aws.amazon.com/personalize/latest/dg/recording-events.html#putevents-including-impressions-data">Recording impressions data</a>. </p>
|
|
63
80
|
*/
|
|
64
81
|
impression?: string[];
|
|
82
|
+
/**
|
|
83
|
+
* <p>Contains information about the metric attribution associated with an event. For more information about metric attributions, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html">Measuring impact of recommendations</a>.</p>
|
|
84
|
+
*/
|
|
85
|
+
metricAttribution?: MetricAttribution;
|
|
65
86
|
}
|
|
66
87
|
export interface PutEventsRequest {
|
|
67
88
|
/**
|
|
@@ -169,6 +190,10 @@ export interface PutUsersRequest {
|
|
|
169
190
|
*/
|
|
170
191
|
users: User[] | undefined;
|
|
171
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* @internal
|
|
195
|
+
*/
|
|
196
|
+
export declare const MetricAttributionFilterSensitiveLog: (obj: MetricAttribution) => any;
|
|
172
197
|
/**
|
|
173
198
|
* @internal
|
|
174
199
|
*/
|
|
@@ -10,6 +10,9 @@ export declare class InvalidInputException extends __BaseException {
|
|
|
10
10
|
opts: __ExceptionOptionType<InvalidInputException, __BaseException>
|
|
11
11
|
);
|
|
12
12
|
}
|
|
13
|
+
export interface MetricAttribution {
|
|
14
|
+
eventAttributionSource: string | undefined;
|
|
15
|
+
}
|
|
13
16
|
export interface Event {
|
|
14
17
|
eventId?: string;
|
|
15
18
|
eventType: string | undefined;
|
|
@@ -19,6 +22,7 @@ export interface Event {
|
|
|
19
22
|
sentAt: Date | undefined;
|
|
20
23
|
recommendationId?: string;
|
|
21
24
|
impression?: string[];
|
|
25
|
+
metricAttribution?: MetricAttribution;
|
|
22
26
|
}
|
|
23
27
|
export interface PutEventsRequest {
|
|
24
28
|
trackingId: string | undefined;
|
|
@@ -56,6 +60,9 @@ export interface PutUsersRequest {
|
|
|
56
60
|
datasetArn: string | undefined;
|
|
57
61
|
users: User[] | undefined;
|
|
58
62
|
}
|
|
63
|
+
export declare const MetricAttributionFilterSensitiveLog: (
|
|
64
|
+
obj: MetricAttribution
|
|
65
|
+
) => any;
|
|
59
66
|
export declare const EventFilterSensitiveLog: (obj: Event) => any;
|
|
60
67
|
export declare const PutEventsRequestFilterSensitiveLog: (
|
|
61
68
|
obj: PutEventsRequest
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-personalize-events",
|
|
3
3
|
"description": "AWS SDK for JavaScript Personalize Events Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.212.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -19,36 +19,36 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
21
21
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
22
|
-
"@aws-sdk/client-sts": "3.
|
|
23
|
-
"@aws-sdk/config-resolver": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
26
|
-
"@aws-sdk/hash-node": "3.
|
|
27
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
28
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
29
|
-
"@aws-sdk/middleware-endpoint": "3.
|
|
30
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
31
|
-
"@aws-sdk/middleware-logger": "3.
|
|
32
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
33
|
-
"@aws-sdk/middleware-retry": "3.
|
|
34
|
-
"@aws-sdk/middleware-serde": "3.
|
|
35
|
-
"@aws-sdk/middleware-signing": "3.
|
|
36
|
-
"@aws-sdk/middleware-stack": "3.
|
|
37
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
38
|
-
"@aws-sdk/node-config-provider": "3.
|
|
39
|
-
"@aws-sdk/node-http-handler": "3.
|
|
40
|
-
"@aws-sdk/protocol-http": "3.
|
|
41
|
-
"@aws-sdk/smithy-client": "3.
|
|
42
|
-
"@aws-sdk/types": "3.
|
|
43
|
-
"@aws-sdk/url-parser": "3.
|
|
22
|
+
"@aws-sdk/client-sts": "3.212.0",
|
|
23
|
+
"@aws-sdk/config-resolver": "3.212.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.212.0",
|
|
25
|
+
"@aws-sdk/fetch-http-handler": "3.212.0",
|
|
26
|
+
"@aws-sdk/hash-node": "3.212.0",
|
|
27
|
+
"@aws-sdk/invalid-dependency": "3.212.0",
|
|
28
|
+
"@aws-sdk/middleware-content-length": "3.212.0",
|
|
29
|
+
"@aws-sdk/middleware-endpoint": "3.212.0",
|
|
30
|
+
"@aws-sdk/middleware-host-header": "3.212.0",
|
|
31
|
+
"@aws-sdk/middleware-logger": "3.212.0",
|
|
32
|
+
"@aws-sdk/middleware-recursion-detection": "3.212.0",
|
|
33
|
+
"@aws-sdk/middleware-retry": "3.212.0",
|
|
34
|
+
"@aws-sdk/middleware-serde": "3.212.0",
|
|
35
|
+
"@aws-sdk/middleware-signing": "3.212.0",
|
|
36
|
+
"@aws-sdk/middleware-stack": "3.212.0",
|
|
37
|
+
"@aws-sdk/middleware-user-agent": "3.212.0",
|
|
38
|
+
"@aws-sdk/node-config-provider": "3.212.0",
|
|
39
|
+
"@aws-sdk/node-http-handler": "3.212.0",
|
|
40
|
+
"@aws-sdk/protocol-http": "3.212.0",
|
|
41
|
+
"@aws-sdk/smithy-client": "3.212.0",
|
|
42
|
+
"@aws-sdk/types": "3.212.0",
|
|
43
|
+
"@aws-sdk/url-parser": "3.212.0",
|
|
44
44
|
"@aws-sdk/util-base64": "3.208.0",
|
|
45
45
|
"@aws-sdk/util-body-length-browser": "3.188.0",
|
|
46
46
|
"@aws-sdk/util-body-length-node": "3.208.0",
|
|
47
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
48
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
-
"@aws-sdk/util-endpoints": "3.
|
|
50
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
51
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
47
|
+
"@aws-sdk/util-defaults-mode-browser": "3.212.0",
|
|
48
|
+
"@aws-sdk/util-defaults-mode-node": "3.212.0",
|
|
49
|
+
"@aws-sdk/util-endpoints": "3.212.0",
|
|
50
|
+
"@aws-sdk/util-user-agent-browser": "3.212.0",
|
|
51
|
+
"@aws-sdk/util-user-agent-node": "3.212.0",
|
|
52
52
|
"@aws-sdk/util-utf8-browser": "3.188.0",
|
|
53
53
|
"@aws-sdk/util-utf8-node": "3.208.0",
|
|
54
54
|
"tslib": "^2.3.1"
|