@aws-sdk/client-personalize-events 3.121.0 → 3.127.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/CHANGELOG.md +8 -0
- package/dist-cjs/protocols/Aws_restJson1.js +20 -29
- package/dist-es/protocols/Aws_restJson1.js +6 -15
- package/package.json +26 -26
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-personalize-events
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -13,11 +13,10 @@ const serializeAws_restJson1PutEventsCommand = async (input, context) => {
|
|
|
13
13
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/events";
|
|
14
14
|
let body;
|
|
15
15
|
body = JSON.stringify({
|
|
16
|
-
...(input.eventList
|
|
17
|
-
|
|
18
|
-
...(input.
|
|
19
|
-
...(input.
|
|
20
|
-
...(input.userId !== undefined && input.userId !== null && { userId: input.userId }),
|
|
16
|
+
...(input.eventList != null && { eventList: serializeAws_restJson1EventList(input.eventList, context) }),
|
|
17
|
+
...(input.sessionId != null && { sessionId: input.sessionId }),
|
|
18
|
+
...(input.trackingId != null && { trackingId: input.trackingId }),
|
|
19
|
+
...(input.userId != null && { userId: input.userId }),
|
|
21
20
|
});
|
|
22
21
|
return new protocol_http_1.HttpRequest({
|
|
23
22
|
protocol,
|
|
@@ -38,9 +37,8 @@ const serializeAws_restJson1PutItemsCommand = async (input, context) => {
|
|
|
38
37
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/items";
|
|
39
38
|
let body;
|
|
40
39
|
body = JSON.stringify({
|
|
41
|
-
...(input.datasetArn
|
|
42
|
-
...(input.items
|
|
43
|
-
input.items !== null && { items: serializeAws_restJson1ItemList(input.items, context) }),
|
|
40
|
+
...(input.datasetArn != null && { datasetArn: input.datasetArn }),
|
|
41
|
+
...(input.items != null && { items: serializeAws_restJson1ItemList(input.items, context) }),
|
|
44
42
|
});
|
|
45
43
|
return new protocol_http_1.HttpRequest({
|
|
46
44
|
protocol,
|
|
@@ -61,9 +59,8 @@ const serializeAws_restJson1PutUsersCommand = async (input, context) => {
|
|
|
61
59
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/users";
|
|
62
60
|
let body;
|
|
63
61
|
body = JSON.stringify({
|
|
64
|
-
...(input.datasetArn
|
|
65
|
-
...(input.users
|
|
66
|
-
input.users !== null && { users: serializeAws_restJson1UserList(input.users, context) }),
|
|
62
|
+
...(input.datasetArn != null && { datasetArn: input.datasetArn }),
|
|
63
|
+
...(input.users != null && { users: serializeAws_restJson1UserList(input.users, context) }),
|
|
67
64
|
});
|
|
68
65
|
return new protocol_http_1.HttpRequest({
|
|
69
66
|
protocol,
|
|
@@ -228,18 +225,14 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
228
225
|
};
|
|
229
226
|
const serializeAws_restJson1Event = (input, context) => {
|
|
230
227
|
return {
|
|
231
|
-
...(input.eventId
|
|
232
|
-
...(input.eventType
|
|
233
|
-
...(input.eventValue
|
|
234
|
-
|
|
235
|
-
...(input.
|
|
236
|
-
|
|
237
|
-
...(input.
|
|
238
|
-
...(input.
|
|
239
|
-
input.properties !== null && { properties: smithy_client_1.LazyJsonString.fromObject(input.properties) }),
|
|
240
|
-
...(input.recommendationId !== undefined &&
|
|
241
|
-
input.recommendationId !== null && { recommendationId: input.recommendationId }),
|
|
242
|
-
...(input.sentAt !== undefined && input.sentAt !== null && { sentAt: Math.round(input.sentAt.getTime() / 1000) }),
|
|
228
|
+
...(input.eventId != null && { eventId: input.eventId }),
|
|
229
|
+
...(input.eventType != null && { eventType: input.eventType }),
|
|
230
|
+
...(input.eventValue != null && { eventValue: (0, smithy_client_1.serializeFloat)(input.eventValue) }),
|
|
231
|
+
...(input.impression != null && { impression: serializeAws_restJson1Impression(input.impression, context) }),
|
|
232
|
+
...(input.itemId != null && { itemId: input.itemId }),
|
|
233
|
+
...(input.properties != null && { properties: smithy_client_1.LazyJsonString.fromObject(input.properties) }),
|
|
234
|
+
...(input.recommendationId != null && { recommendationId: input.recommendationId }),
|
|
235
|
+
...(input.sentAt != null && { sentAt: Math.round(input.sentAt.getTime() / 1000) }),
|
|
243
236
|
};
|
|
244
237
|
};
|
|
245
238
|
const serializeAws_restJson1EventList = (input, context) => {
|
|
@@ -264,9 +257,8 @@ const serializeAws_restJson1Impression = (input, context) => {
|
|
|
264
257
|
};
|
|
265
258
|
const serializeAws_restJson1Item = (input, context) => {
|
|
266
259
|
return {
|
|
267
|
-
...(input.itemId
|
|
268
|
-
...(input.properties
|
|
269
|
-
input.properties !== null && { properties: smithy_client_1.LazyJsonString.fromObject(input.properties) }),
|
|
260
|
+
...(input.itemId != null && { itemId: input.itemId }),
|
|
261
|
+
...(input.properties != null && { properties: smithy_client_1.LazyJsonString.fromObject(input.properties) }),
|
|
270
262
|
};
|
|
271
263
|
};
|
|
272
264
|
const serializeAws_restJson1ItemList = (input, context) => {
|
|
@@ -281,9 +273,8 @@ const serializeAws_restJson1ItemList = (input, context) => {
|
|
|
281
273
|
};
|
|
282
274
|
const serializeAws_restJson1User = (input, context) => {
|
|
283
275
|
return {
|
|
284
|
-
...(input.properties
|
|
285
|
-
|
|
286
|
-
...(input.userId !== undefined && input.userId !== null && { userId: input.userId }),
|
|
276
|
+
...(input.properties != null && { properties: smithy_client_1.LazyJsonString.fromObject(input.properties) }),
|
|
277
|
+
...(input.userId != null && { userId: input.userId }),
|
|
287
278
|
};
|
|
288
279
|
};
|
|
289
280
|
const serializeAws_restJson1UserList = (input, context) => {
|
|
@@ -14,8 +14,7 @@ export var serializeAws_restJson1PutEventsCommand = function (input, context) {
|
|
|
14
14
|
"content-type": "application/json",
|
|
15
15
|
};
|
|
16
16
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/events";
|
|
17
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.eventList
|
|
18
|
-
input.eventList !== null && { eventList: serializeAws_restJson1EventList(input.eventList, context) })), (input.sessionId !== undefined && input.sessionId !== null && { sessionId: input.sessionId })), (input.trackingId !== undefined && input.trackingId !== null && { trackingId: input.trackingId })), (input.userId !== undefined && input.userId !== null && { userId: input.userId })));
|
|
17
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.eventList != null && { eventList: serializeAws_restJson1EventList(input.eventList, context) })), (input.sessionId != null && { sessionId: input.sessionId })), (input.trackingId != null && { trackingId: input.trackingId })), (input.userId != null && { userId: input.userId })));
|
|
19
18
|
return [2, new __HttpRequest({
|
|
20
19
|
protocol: protocol,
|
|
21
20
|
hostname: hostname,
|
|
@@ -39,8 +38,7 @@ export var serializeAws_restJson1PutItemsCommand = function (input, context) { r
|
|
|
39
38
|
"content-type": "application/json",
|
|
40
39
|
};
|
|
41
40
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/items";
|
|
42
|
-
body = JSON.stringify(__assign(__assign({}, (input.datasetArn
|
|
43
|
-
input.items !== null && { items: serializeAws_restJson1ItemList(input.items, context) })));
|
|
41
|
+
body = JSON.stringify(__assign(__assign({}, (input.datasetArn != null && { datasetArn: input.datasetArn })), (input.items != null && { items: serializeAws_restJson1ItemList(input.items, context) })));
|
|
44
42
|
return [2, new __HttpRequest({
|
|
45
43
|
protocol: protocol,
|
|
46
44
|
hostname: hostname,
|
|
@@ -64,8 +62,7 @@ export var serializeAws_restJson1PutUsersCommand = function (input, context) { r
|
|
|
64
62
|
"content-type": "application/json",
|
|
65
63
|
};
|
|
66
64
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/users";
|
|
67
|
-
body = JSON.stringify(__assign(__assign({}, (input.datasetArn
|
|
68
|
-
input.users !== null && { users: serializeAws_restJson1UserList(input.users, context) })));
|
|
65
|
+
body = JSON.stringify(__assign(__assign({}, (input.datasetArn != null && { datasetArn: input.datasetArn })), (input.users != null && { users: serializeAws_restJson1UserList(input.users, context) })));
|
|
69
66
|
return [2, new __HttpRequest({
|
|
70
67
|
protocol: protocol,
|
|
71
68
|
hostname: hostname,
|
|
@@ -284,11 +281,7 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
|
|
|
284
281
|
});
|
|
285
282
|
}); };
|
|
286
283
|
var serializeAws_restJson1Event = function (input, context) {
|
|
287
|
-
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.eventId
|
|
288
|
-
input.eventValue !== null && { eventValue: __serializeFloat(input.eventValue) })), (input.impression !== undefined &&
|
|
289
|
-
input.impression !== null && { impression: serializeAws_restJson1Impression(input.impression, context) })), (input.itemId !== undefined && input.itemId !== null && { itemId: input.itemId })), (input.properties !== undefined &&
|
|
290
|
-
input.properties !== null && { properties: __LazyJsonString.fromObject(input.properties) })), (input.recommendationId !== undefined &&
|
|
291
|
-
input.recommendationId !== null && { recommendationId: input.recommendationId })), (input.sentAt !== undefined && input.sentAt !== null && { sentAt: Math.round(input.sentAt.getTime() / 1000) }));
|
|
284
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.eventId != null && { eventId: input.eventId })), (input.eventType != null && { eventType: input.eventType })), (input.eventValue != null && { eventValue: __serializeFloat(input.eventValue) })), (input.impression != null && { impression: serializeAws_restJson1Impression(input.impression, context) })), (input.itemId != null && { itemId: input.itemId })), (input.properties != null && { properties: __LazyJsonString.fromObject(input.properties) })), (input.recommendationId != null && { recommendationId: input.recommendationId })), (input.sentAt != null && { sentAt: Math.round(input.sentAt.getTime() / 1000) }));
|
|
292
285
|
};
|
|
293
286
|
var serializeAws_restJson1EventList = function (input, context) {
|
|
294
287
|
return input
|
|
@@ -311,8 +304,7 @@ var serializeAws_restJson1Impression = function (input, context) {
|
|
|
311
304
|
});
|
|
312
305
|
};
|
|
313
306
|
var serializeAws_restJson1Item = function (input, context) {
|
|
314
|
-
return __assign(__assign({}, (input.itemId
|
|
315
|
-
input.properties !== null && { properties: __LazyJsonString.fromObject(input.properties) }));
|
|
307
|
+
return __assign(__assign({}, (input.itemId != null && { itemId: input.itemId })), (input.properties != null && { properties: __LazyJsonString.fromObject(input.properties) }));
|
|
316
308
|
};
|
|
317
309
|
var serializeAws_restJson1ItemList = function (input, context) {
|
|
318
310
|
return input
|
|
@@ -325,8 +317,7 @@ var serializeAws_restJson1ItemList = function (input, context) {
|
|
|
325
317
|
});
|
|
326
318
|
};
|
|
327
319
|
var serializeAws_restJson1User = function (input, context) {
|
|
328
|
-
return __assign(__assign({}, (input.properties
|
|
329
|
-
input.properties !== null && { properties: __LazyJsonString.fromObject(input.properties) })), (input.userId !== undefined && input.userId !== null && { userId: input.userId }));
|
|
320
|
+
return __assign(__assign({}, (input.properties != null && { properties: __LazyJsonString.fromObject(input.properties) })), (input.userId != null && { userId: input.userId }));
|
|
330
321
|
};
|
|
331
322
|
var serializeAws_restJson1UserList = function (input, context) {
|
|
332
323
|
return input
|
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.127.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",
|
|
@@ -18,35 +18,35 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
20
20
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
21
|
-
"@aws-sdk/client-sts": "3.
|
|
22
|
-
"@aws-sdk/config-resolver": "3.
|
|
23
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
25
|
-
"@aws-sdk/hash-node": "3.
|
|
26
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
27
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
28
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
29
|
-
"@aws-sdk/middleware-logger": "3.
|
|
30
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
31
|
-
"@aws-sdk/middleware-retry": "3.
|
|
32
|
-
"@aws-sdk/middleware-serde": "3.
|
|
33
|
-
"@aws-sdk/middleware-signing": "3.
|
|
34
|
-
"@aws-sdk/middleware-stack": "3.
|
|
35
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
36
|
-
"@aws-sdk/node-config-provider": "3.
|
|
37
|
-
"@aws-sdk/node-http-handler": "3.
|
|
38
|
-
"@aws-sdk/protocol-http": "3.
|
|
39
|
-
"@aws-sdk/smithy-client": "3.
|
|
40
|
-
"@aws-sdk/types": "3.
|
|
41
|
-
"@aws-sdk/url-parser": "3.
|
|
21
|
+
"@aws-sdk/client-sts": "3.127.0",
|
|
22
|
+
"@aws-sdk/config-resolver": "3.127.0",
|
|
23
|
+
"@aws-sdk/credential-provider-node": "3.127.0",
|
|
24
|
+
"@aws-sdk/fetch-http-handler": "3.127.0",
|
|
25
|
+
"@aws-sdk/hash-node": "3.127.0",
|
|
26
|
+
"@aws-sdk/invalid-dependency": "3.127.0",
|
|
27
|
+
"@aws-sdk/middleware-content-length": "3.127.0",
|
|
28
|
+
"@aws-sdk/middleware-host-header": "3.127.0",
|
|
29
|
+
"@aws-sdk/middleware-logger": "3.127.0",
|
|
30
|
+
"@aws-sdk/middleware-recursion-detection": "3.127.0",
|
|
31
|
+
"@aws-sdk/middleware-retry": "3.127.0",
|
|
32
|
+
"@aws-sdk/middleware-serde": "3.127.0",
|
|
33
|
+
"@aws-sdk/middleware-signing": "3.127.0",
|
|
34
|
+
"@aws-sdk/middleware-stack": "3.127.0",
|
|
35
|
+
"@aws-sdk/middleware-user-agent": "3.127.0",
|
|
36
|
+
"@aws-sdk/node-config-provider": "3.127.0",
|
|
37
|
+
"@aws-sdk/node-http-handler": "3.127.0",
|
|
38
|
+
"@aws-sdk/protocol-http": "3.127.0",
|
|
39
|
+
"@aws-sdk/smithy-client": "3.127.0",
|
|
40
|
+
"@aws-sdk/types": "3.127.0",
|
|
41
|
+
"@aws-sdk/url-parser": "3.127.0",
|
|
42
42
|
"@aws-sdk/util-base64-browser": "3.109.0",
|
|
43
43
|
"@aws-sdk/util-base64-node": "3.55.0",
|
|
44
44
|
"@aws-sdk/util-body-length-browser": "3.55.0",
|
|
45
45
|
"@aws-sdk/util-body-length-node": "3.55.0",
|
|
46
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
48
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
49
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
46
|
+
"@aws-sdk/util-defaults-mode-browser": "3.127.0",
|
|
47
|
+
"@aws-sdk/util-defaults-mode-node": "3.127.0",
|
|
48
|
+
"@aws-sdk/util-user-agent-browser": "3.127.0",
|
|
49
|
+
"@aws-sdk/util-user-agent-node": "3.127.0",
|
|
50
50
|
"@aws-sdk/util-utf8-browser": "3.109.0",
|
|
51
51
|
"@aws-sdk/util-utf8-node": "3.109.0",
|
|
52
52
|
"tslib": "^2.3.1"
|