@aws-sdk/client-personalize-events 3.306.0 → 3.310.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.
@@ -37,10 +37,10 @@ class PutEventsCommand extends smithy_client_1.Command {
37
37
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
38
  }
39
39
  serialize(input, context) {
40
- return (0, Aws_restJson1_1.serializeAws_restJson1PutEventsCommand)(input, context);
40
+ return (0, Aws_restJson1_1.se_PutEventsCommand)(input, context);
41
41
  }
42
42
  deserialize(output, context) {
43
- return (0, Aws_restJson1_1.deserializeAws_restJson1PutEventsCommand)(output, context);
43
+ return (0, Aws_restJson1_1.de_PutEventsCommand)(output, context);
44
44
  }
45
45
  }
46
46
  exports.PutEventsCommand = PutEventsCommand;
@@ -37,10 +37,10 @@ class PutItemsCommand extends smithy_client_1.Command {
37
37
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
38
  }
39
39
  serialize(input, context) {
40
- return (0, Aws_restJson1_1.serializeAws_restJson1PutItemsCommand)(input, context);
40
+ return (0, Aws_restJson1_1.se_PutItemsCommand)(input, context);
41
41
  }
42
42
  deserialize(output, context) {
43
- return (0, Aws_restJson1_1.deserializeAws_restJson1PutItemsCommand)(output, context);
43
+ return (0, Aws_restJson1_1.de_PutItemsCommand)(output, context);
44
44
  }
45
45
  }
46
46
  exports.PutItemsCommand = PutItemsCommand;
@@ -37,10 +37,10 @@ class PutUsersCommand extends smithy_client_1.Command {
37
37
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
38
  }
39
39
  serialize(input, context) {
40
- return (0, Aws_restJson1_1.serializeAws_restJson1PutUsersCommand)(input, context);
40
+ return (0, Aws_restJson1_1.se_PutUsersCommand)(input, context);
41
41
  }
42
42
  deserialize(output, context) {
43
- return (0, Aws_restJson1_1.deserializeAws_restJson1PutUsersCommand)(output, context);
43
+ return (0, Aws_restJson1_1.de_PutUsersCommand)(output, context);
44
44
  }
45
45
  }
46
46
  exports.PutUsersCommand = PutUsersCommand;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1PutUsersCommand = exports.deserializeAws_restJson1PutItemsCommand = exports.deserializeAws_restJson1PutEventsCommand = exports.serializeAws_restJson1PutUsersCommand = exports.serializeAws_restJson1PutItemsCommand = exports.serializeAws_restJson1PutEventsCommand = void 0;
3
+ exports.de_PutUsersCommand = exports.de_PutItemsCommand = exports.de_PutEventsCommand = exports.se_PutUsersCommand = exports.se_PutItemsCommand = exports.se_PutEventsCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const PersonalizeEventsServiceException_1 = require("../models/PersonalizeEventsServiceException");
8
- const serializeAws_restJson1PutEventsCommand = async (input, context) => {
8
+ const se_PutEventsCommand = async (input, context) => {
9
9
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
10
  const headers = {
11
11
  "content-type": "application/json",
@@ -13,7 +13,7 @@ const serializeAws_restJson1PutEventsCommand = async (input, context) => {
13
13
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/events";
14
14
  let body;
15
15
  body = JSON.stringify({
16
- ...(input.eventList != null && { eventList: serializeAws_restJson1EventList(input.eventList, context) }),
16
+ ...(input.eventList != null && { eventList: se_EventList(input.eventList, context) }),
17
17
  ...(input.sessionId != null && { sessionId: input.sessionId }),
18
18
  ...(input.trackingId != null && { trackingId: input.trackingId }),
19
19
  ...(input.userId != null && { userId: input.userId }),
@@ -28,8 +28,8 @@ const serializeAws_restJson1PutEventsCommand = async (input, context) => {
28
28
  body,
29
29
  });
30
30
  };
31
- exports.serializeAws_restJson1PutEventsCommand = serializeAws_restJson1PutEventsCommand;
32
- const serializeAws_restJson1PutItemsCommand = async (input, context) => {
31
+ exports.se_PutEventsCommand = se_PutEventsCommand;
32
+ const se_PutItemsCommand = async (input, context) => {
33
33
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
34
34
  const headers = {
35
35
  "content-type": "application/json",
@@ -38,7 +38,7 @@ const serializeAws_restJson1PutItemsCommand = async (input, context) => {
38
38
  let body;
39
39
  body = JSON.stringify({
40
40
  ...(input.datasetArn != null && { datasetArn: input.datasetArn }),
41
- ...(input.items != null && { items: serializeAws_restJson1ItemList(input.items, context) }),
41
+ ...(input.items != null && { items: se_ItemList(input.items, context) }),
42
42
  });
43
43
  return new protocol_http_1.HttpRequest({
44
44
  protocol,
@@ -50,8 +50,8 @@ const serializeAws_restJson1PutItemsCommand = async (input, context) => {
50
50
  body,
51
51
  });
52
52
  };
53
- exports.serializeAws_restJson1PutItemsCommand = serializeAws_restJson1PutItemsCommand;
54
- const serializeAws_restJson1PutUsersCommand = async (input, context) => {
53
+ exports.se_PutItemsCommand = se_PutItemsCommand;
54
+ const se_PutUsersCommand = async (input, context) => {
55
55
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
56
  const headers = {
57
57
  "content-type": "application/json",
@@ -60,7 +60,7 @@ const serializeAws_restJson1PutUsersCommand = async (input, context) => {
60
60
  let body;
61
61
  body = JSON.stringify({
62
62
  ...(input.datasetArn != null && { datasetArn: input.datasetArn }),
63
- ...(input.users != null && { users: serializeAws_restJson1UserList(input.users, context) }),
63
+ ...(input.users != null && { users: se_UserList(input.users, context) }),
64
64
  });
65
65
  return new protocol_http_1.HttpRequest({
66
66
  protocol,
@@ -72,10 +72,10 @@ const serializeAws_restJson1PutUsersCommand = async (input, context) => {
72
72
  body,
73
73
  });
74
74
  };
75
- exports.serializeAws_restJson1PutUsersCommand = serializeAws_restJson1PutUsersCommand;
76
- const deserializeAws_restJson1PutEventsCommand = async (output, context) => {
75
+ exports.se_PutUsersCommand = se_PutUsersCommand;
76
+ const de_PutEventsCommand = async (output, context) => {
77
77
  if (output.statusCode !== 200 && output.statusCode >= 300) {
78
- return deserializeAws_restJson1PutEventsCommandError(output, context);
78
+ return de_PutEventsCommandError(output, context);
79
79
  }
80
80
  const contents = map({
81
81
  $metadata: deserializeMetadata(output),
@@ -83,8 +83,8 @@ const deserializeAws_restJson1PutEventsCommand = async (output, context) => {
83
83
  await collectBody(output.body, context);
84
84
  return contents;
85
85
  };
86
- exports.deserializeAws_restJson1PutEventsCommand = deserializeAws_restJson1PutEventsCommand;
87
- const deserializeAws_restJson1PutEventsCommandError = async (output, context) => {
86
+ exports.de_PutEventsCommand = de_PutEventsCommand;
87
+ const de_PutEventsCommandError = async (output, context) => {
88
88
  const parsedOutput = {
89
89
  ...output,
90
90
  body: await parseErrorBody(output.body, context),
@@ -93,7 +93,7 @@ const deserializeAws_restJson1PutEventsCommandError = async (output, context) =>
93
93
  switch (errorCode) {
94
94
  case "InvalidInputException":
95
95
  case "com.amazonaws.personalizeevents#InvalidInputException":
96
- throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
96
+ throw await de_InvalidInputExceptionRes(parsedOutput, context);
97
97
  default:
98
98
  const parsedBody = parsedOutput.body;
99
99
  (0, smithy_client_1.throwDefaultError)({
@@ -104,9 +104,9 @@ const deserializeAws_restJson1PutEventsCommandError = async (output, context) =>
104
104
  });
105
105
  }
106
106
  };
107
- const deserializeAws_restJson1PutItemsCommand = async (output, context) => {
107
+ const de_PutItemsCommand = async (output, context) => {
108
108
  if (output.statusCode !== 200 && output.statusCode >= 300) {
109
- return deserializeAws_restJson1PutItemsCommandError(output, context);
109
+ return de_PutItemsCommandError(output, context);
110
110
  }
111
111
  const contents = map({
112
112
  $metadata: deserializeMetadata(output),
@@ -114,8 +114,8 @@ const deserializeAws_restJson1PutItemsCommand = async (output, context) => {
114
114
  await collectBody(output.body, context);
115
115
  return contents;
116
116
  };
117
- exports.deserializeAws_restJson1PutItemsCommand = deserializeAws_restJson1PutItemsCommand;
118
- const deserializeAws_restJson1PutItemsCommandError = async (output, context) => {
117
+ exports.de_PutItemsCommand = de_PutItemsCommand;
118
+ const de_PutItemsCommandError = async (output, context) => {
119
119
  const parsedOutput = {
120
120
  ...output,
121
121
  body: await parseErrorBody(output.body, context),
@@ -124,13 +124,13 @@ const deserializeAws_restJson1PutItemsCommandError = async (output, context) =>
124
124
  switch (errorCode) {
125
125
  case "InvalidInputException":
126
126
  case "com.amazonaws.personalizeevents#InvalidInputException":
127
- throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
127
+ throw await de_InvalidInputExceptionRes(parsedOutput, context);
128
128
  case "ResourceInUseException":
129
129
  case "com.amazonaws.personalizeevents#ResourceInUseException":
130
- throw await deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context);
130
+ throw await de_ResourceInUseExceptionRes(parsedOutput, context);
131
131
  case "ResourceNotFoundException":
132
132
  case "com.amazonaws.personalizeevents#ResourceNotFoundException":
133
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
133
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
134
134
  default:
135
135
  const parsedBody = parsedOutput.body;
136
136
  (0, smithy_client_1.throwDefaultError)({
@@ -141,9 +141,9 @@ const deserializeAws_restJson1PutItemsCommandError = async (output, context) =>
141
141
  });
142
142
  }
143
143
  };
144
- const deserializeAws_restJson1PutUsersCommand = async (output, context) => {
144
+ const de_PutUsersCommand = async (output, context) => {
145
145
  if (output.statusCode !== 200 && output.statusCode >= 300) {
146
- return deserializeAws_restJson1PutUsersCommandError(output, context);
146
+ return de_PutUsersCommandError(output, context);
147
147
  }
148
148
  const contents = map({
149
149
  $metadata: deserializeMetadata(output),
@@ -151,8 +151,8 @@ const deserializeAws_restJson1PutUsersCommand = async (output, context) => {
151
151
  await collectBody(output.body, context);
152
152
  return contents;
153
153
  };
154
- exports.deserializeAws_restJson1PutUsersCommand = deserializeAws_restJson1PutUsersCommand;
155
- const deserializeAws_restJson1PutUsersCommandError = async (output, context) => {
154
+ exports.de_PutUsersCommand = de_PutUsersCommand;
155
+ const de_PutUsersCommandError = async (output, context) => {
156
156
  const parsedOutput = {
157
157
  ...output,
158
158
  body: await parseErrorBody(output.body, context),
@@ -161,13 +161,13 @@ const deserializeAws_restJson1PutUsersCommandError = async (output, context) =>
161
161
  switch (errorCode) {
162
162
  case "InvalidInputException":
163
163
  case "com.amazonaws.personalizeevents#InvalidInputException":
164
- throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
164
+ throw await de_InvalidInputExceptionRes(parsedOutput, context);
165
165
  case "ResourceInUseException":
166
166
  case "com.amazonaws.personalizeevents#ResourceInUseException":
167
- throw await deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context);
167
+ throw await de_ResourceInUseExceptionRes(parsedOutput, context);
168
168
  case "ResourceNotFoundException":
169
169
  case "com.amazonaws.personalizeevents#ResourceNotFoundException":
170
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
170
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
171
171
  default:
172
172
  const parsedBody = parsedOutput.body;
173
173
  (0, smithy_client_1.throwDefaultError)({
@@ -179,7 +179,7 @@ const deserializeAws_restJson1PutUsersCommandError = async (output, context) =>
179
179
  }
180
180
  };
181
181
  const map = smithy_client_1.map;
182
- const deserializeAws_restJson1InvalidInputExceptionResponse = async (parsedOutput, context) => {
182
+ const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
183
183
  const contents = map({});
184
184
  const data = parsedOutput.body;
185
185
  if (data.message != null) {
@@ -191,7 +191,7 @@ const deserializeAws_restJson1InvalidInputExceptionResponse = async (parsedOutpu
191
191
  });
192
192
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
193
193
  };
194
- const deserializeAws_restJson1ResourceInUseExceptionResponse = async (parsedOutput, context) => {
194
+ const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
195
195
  const contents = map({});
196
196
  const data = parsedOutput.body;
197
197
  if (data.message != null) {
@@ -203,7 +203,7 @@ const deserializeAws_restJson1ResourceInUseExceptionResponse = async (parsedOutp
203
203
  });
204
204
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
205
205
  };
206
- const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
206
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
207
207
  const contents = map({});
208
208
  const data = parsedOutput.body;
209
209
  if (data.message != null) {
@@ -215,64 +215,64 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
215
215
  });
216
216
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
217
217
  };
218
- const serializeAws_restJson1Event = (input, context) => {
218
+ const se_Event = (input, context) => {
219
219
  return {
220
220
  ...(input.eventId != null && { eventId: input.eventId }),
221
221
  ...(input.eventType != null && { eventType: input.eventType }),
222
222
  ...(input.eventValue != null && { eventValue: (0, smithy_client_1.serializeFloat)(input.eventValue) }),
223
- ...(input.impression != null && { impression: serializeAws_restJson1Impression(input.impression, context) }),
223
+ ...(input.impression != null && { impression: se_Impression(input.impression, context) }),
224
224
  ...(input.itemId != null && { itemId: input.itemId }),
225
225
  ...(input.metricAttribution != null && {
226
- metricAttribution: serializeAws_restJson1MetricAttribution(input.metricAttribution, context),
226
+ metricAttribution: se_MetricAttribution(input.metricAttribution, context),
227
227
  }),
228
228
  ...(input.properties != null && { properties: smithy_client_1.LazyJsonString.fromObject(input.properties) }),
229
229
  ...(input.recommendationId != null && { recommendationId: input.recommendationId }),
230
230
  ...(input.sentAt != null && { sentAt: Math.round(input.sentAt.getTime() / 1000) }),
231
231
  };
232
232
  };
233
- const serializeAws_restJson1EventList = (input, context) => {
233
+ const se_EventList = (input, context) => {
234
234
  return input
235
235
  .filter((e) => e != null)
236
236
  .map((entry) => {
237
- return serializeAws_restJson1Event(entry, context);
237
+ return se_Event(entry, context);
238
238
  });
239
239
  };
240
- const serializeAws_restJson1Impression = (input, context) => {
240
+ const se_Impression = (input, context) => {
241
241
  return input
242
242
  .filter((e) => e != null)
243
243
  .map((entry) => {
244
244
  return entry;
245
245
  });
246
246
  };
247
- const serializeAws_restJson1Item = (input, context) => {
247
+ const se_Item = (input, context) => {
248
248
  return {
249
249
  ...(input.itemId != null && { itemId: input.itemId }),
250
250
  ...(input.properties != null && { properties: smithy_client_1.LazyJsonString.fromObject(input.properties) }),
251
251
  };
252
252
  };
253
- const serializeAws_restJson1ItemList = (input, context) => {
253
+ const se_ItemList = (input, context) => {
254
254
  return input
255
255
  .filter((e) => e != null)
256
256
  .map((entry) => {
257
- return serializeAws_restJson1Item(entry, context);
257
+ return se_Item(entry, context);
258
258
  });
259
259
  };
260
- const serializeAws_restJson1MetricAttribution = (input, context) => {
260
+ const se_MetricAttribution = (input, context) => {
261
261
  return {
262
262
  ...(input.eventAttributionSource != null && { eventAttributionSource: input.eventAttributionSource }),
263
263
  };
264
264
  };
265
- const serializeAws_restJson1User = (input, context) => {
265
+ const se_User = (input, context) => {
266
266
  return {
267
267
  ...(input.properties != null && { properties: smithy_client_1.LazyJsonString.fromObject(input.properties) }),
268
268
  ...(input.userId != null && { userId: input.userId }),
269
269
  };
270
270
  };
271
- const serializeAws_restJson1UserList = (input, context) => {
271
+ const se_UserList = (input, context) => {
272
272
  return input
273
273
  .filter((e) => e != null)
274
274
  .map((entry) => {
275
- return serializeAws_restJson1User(entry, context);
275
+ return se_User(entry, context);
276
276
  });
277
277
  };
278
278
  const deserializeMetadata = (output) => ({
@@ -2,7 +2,7 @@ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { PutEventsRequestFilterSensitiveLog } from "../models/models_0";
5
- import { deserializeAws_restJson1PutEventsCommand, serializeAws_restJson1PutEventsCommand, } from "../protocols/Aws_restJson1";
5
+ import { de_PutEventsCommand, se_PutEventsCommand } from "../protocols/Aws_restJson1";
6
6
  export class PutEventsCommand extends $Command {
7
7
  static getEndpointParameterInstructions() {
8
8
  return {
@@ -34,9 +34,9 @@ export class PutEventsCommand extends $Command {
34
34
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
35
  }
36
36
  serialize(input, context) {
37
- return serializeAws_restJson1PutEventsCommand(input, context);
37
+ return se_PutEventsCommand(input, context);
38
38
  }
39
39
  deserialize(output, context) {
40
- return deserializeAws_restJson1PutEventsCommand(output, context);
40
+ return de_PutEventsCommand(output, context);
41
41
  }
42
42
  }
@@ -2,7 +2,7 @@ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { PutItemsRequestFilterSensitiveLog } from "../models/models_0";
5
- import { deserializeAws_restJson1PutItemsCommand, serializeAws_restJson1PutItemsCommand, } from "../protocols/Aws_restJson1";
5
+ import { de_PutItemsCommand, se_PutItemsCommand } from "../protocols/Aws_restJson1";
6
6
  export class PutItemsCommand extends $Command {
7
7
  static getEndpointParameterInstructions() {
8
8
  return {
@@ -34,9 +34,9 @@ export class PutItemsCommand extends $Command {
34
34
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
35
  }
36
36
  serialize(input, context) {
37
- return serializeAws_restJson1PutItemsCommand(input, context);
37
+ return se_PutItemsCommand(input, context);
38
38
  }
39
39
  deserialize(output, context) {
40
- return deserializeAws_restJson1PutItemsCommand(output, context);
40
+ return de_PutItemsCommand(output, context);
41
41
  }
42
42
  }
@@ -2,7 +2,7 @@ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
4
  import { PutUsersRequestFilterSensitiveLog } from "../models/models_0";
5
- import { deserializeAws_restJson1PutUsersCommand, serializeAws_restJson1PutUsersCommand, } from "../protocols/Aws_restJson1";
5
+ import { de_PutUsersCommand, se_PutUsersCommand } from "../protocols/Aws_restJson1";
6
6
  export class PutUsersCommand extends $Command {
7
7
  static getEndpointParameterInstructions() {
8
8
  return {
@@ -34,9 +34,9 @@ export class PutUsersCommand extends $Command {
34
34
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
35
  }
36
36
  serialize(input, context) {
37
- return serializeAws_restJson1PutUsersCommand(input, context);
37
+ return se_PutUsersCommand(input, context);
38
38
  }
39
39
  deserialize(output, context) {
40
- return deserializeAws_restJson1PutUsersCommand(output, context);
40
+ return de_PutUsersCommand(output, context);
41
41
  }
42
42
  }
@@ -2,7 +2,7 @@ import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
2
  import { decorateServiceException as __decorateServiceException, expectString as __expectString, LazyJsonString as __LazyJsonString, map as __map, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
3
3
  import { InvalidInputException, ResourceInUseException, ResourceNotFoundException, } from "../models/models_0";
4
4
  import { PersonalizeEventsServiceException as __BaseException } from "../models/PersonalizeEventsServiceException";
5
- export const serializeAws_restJson1PutEventsCommand = async (input, context) => {
5
+ export const se_PutEventsCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
7
  const headers = {
8
8
  "content-type": "application/json",
@@ -10,7 +10,7 @@ export const serializeAws_restJson1PutEventsCommand = async (input, context) =>
10
10
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/events";
11
11
  let body;
12
12
  body = JSON.stringify({
13
- ...(input.eventList != null && { eventList: serializeAws_restJson1EventList(input.eventList, context) }),
13
+ ...(input.eventList != null && { eventList: se_EventList(input.eventList, context) }),
14
14
  ...(input.sessionId != null && { sessionId: input.sessionId }),
15
15
  ...(input.trackingId != null && { trackingId: input.trackingId }),
16
16
  ...(input.userId != null && { userId: input.userId }),
@@ -25,7 +25,7 @@ export const serializeAws_restJson1PutEventsCommand = async (input, context) =>
25
25
  body,
26
26
  });
27
27
  };
28
- export const serializeAws_restJson1PutItemsCommand = async (input, context) => {
28
+ export const se_PutItemsCommand = async (input, context) => {
29
29
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
30
30
  const headers = {
31
31
  "content-type": "application/json",
@@ -34,7 +34,7 @@ export const serializeAws_restJson1PutItemsCommand = async (input, context) => {
34
34
  let body;
35
35
  body = JSON.stringify({
36
36
  ...(input.datasetArn != null && { datasetArn: input.datasetArn }),
37
- ...(input.items != null && { items: serializeAws_restJson1ItemList(input.items, context) }),
37
+ ...(input.items != null && { items: se_ItemList(input.items, context) }),
38
38
  });
39
39
  return new __HttpRequest({
40
40
  protocol,
@@ -46,7 +46,7 @@ export const serializeAws_restJson1PutItemsCommand = async (input, context) => {
46
46
  body,
47
47
  });
48
48
  };
49
- export const serializeAws_restJson1PutUsersCommand = async (input, context) => {
49
+ export const se_PutUsersCommand = async (input, context) => {
50
50
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
51
51
  const headers = {
52
52
  "content-type": "application/json",
@@ -55,7 +55,7 @@ export const serializeAws_restJson1PutUsersCommand = async (input, context) => {
55
55
  let body;
56
56
  body = JSON.stringify({
57
57
  ...(input.datasetArn != null && { datasetArn: input.datasetArn }),
58
- ...(input.users != null && { users: serializeAws_restJson1UserList(input.users, context) }),
58
+ ...(input.users != null && { users: se_UserList(input.users, context) }),
59
59
  });
60
60
  return new __HttpRequest({
61
61
  protocol,
@@ -67,9 +67,9 @@ export const serializeAws_restJson1PutUsersCommand = async (input, context) => {
67
67
  body,
68
68
  });
69
69
  };
70
- export const deserializeAws_restJson1PutEventsCommand = async (output, context) => {
70
+ export const de_PutEventsCommand = async (output, context) => {
71
71
  if (output.statusCode !== 200 && output.statusCode >= 300) {
72
- return deserializeAws_restJson1PutEventsCommandError(output, context);
72
+ return de_PutEventsCommandError(output, context);
73
73
  }
74
74
  const contents = map({
75
75
  $metadata: deserializeMetadata(output),
@@ -77,7 +77,7 @@ export const deserializeAws_restJson1PutEventsCommand = async (output, context)
77
77
  await collectBody(output.body, context);
78
78
  return contents;
79
79
  };
80
- const deserializeAws_restJson1PutEventsCommandError = async (output, context) => {
80
+ const de_PutEventsCommandError = async (output, context) => {
81
81
  const parsedOutput = {
82
82
  ...output,
83
83
  body: await parseErrorBody(output.body, context),
@@ -86,7 +86,7 @@ const deserializeAws_restJson1PutEventsCommandError = async (output, context) =>
86
86
  switch (errorCode) {
87
87
  case "InvalidInputException":
88
88
  case "com.amazonaws.personalizeevents#InvalidInputException":
89
- throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
89
+ throw await de_InvalidInputExceptionRes(parsedOutput, context);
90
90
  default:
91
91
  const parsedBody = parsedOutput.body;
92
92
  throwDefaultError({
@@ -97,9 +97,9 @@ const deserializeAws_restJson1PutEventsCommandError = async (output, context) =>
97
97
  });
98
98
  }
99
99
  };
100
- export const deserializeAws_restJson1PutItemsCommand = async (output, context) => {
100
+ export const de_PutItemsCommand = async (output, context) => {
101
101
  if (output.statusCode !== 200 && output.statusCode >= 300) {
102
- return deserializeAws_restJson1PutItemsCommandError(output, context);
102
+ return de_PutItemsCommandError(output, context);
103
103
  }
104
104
  const contents = map({
105
105
  $metadata: deserializeMetadata(output),
@@ -107,7 +107,7 @@ export const deserializeAws_restJson1PutItemsCommand = async (output, context) =
107
107
  await collectBody(output.body, context);
108
108
  return contents;
109
109
  };
110
- const deserializeAws_restJson1PutItemsCommandError = async (output, context) => {
110
+ const de_PutItemsCommandError = async (output, context) => {
111
111
  const parsedOutput = {
112
112
  ...output,
113
113
  body: await parseErrorBody(output.body, context),
@@ -116,13 +116,13 @@ const deserializeAws_restJson1PutItemsCommandError = async (output, context) =>
116
116
  switch (errorCode) {
117
117
  case "InvalidInputException":
118
118
  case "com.amazonaws.personalizeevents#InvalidInputException":
119
- throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
119
+ throw await de_InvalidInputExceptionRes(parsedOutput, context);
120
120
  case "ResourceInUseException":
121
121
  case "com.amazonaws.personalizeevents#ResourceInUseException":
122
- throw await deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context);
122
+ throw await de_ResourceInUseExceptionRes(parsedOutput, context);
123
123
  case "ResourceNotFoundException":
124
124
  case "com.amazonaws.personalizeevents#ResourceNotFoundException":
125
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
125
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
126
126
  default:
127
127
  const parsedBody = parsedOutput.body;
128
128
  throwDefaultError({
@@ -133,9 +133,9 @@ const deserializeAws_restJson1PutItemsCommandError = async (output, context) =>
133
133
  });
134
134
  }
135
135
  };
136
- export const deserializeAws_restJson1PutUsersCommand = async (output, context) => {
136
+ export const de_PutUsersCommand = async (output, context) => {
137
137
  if (output.statusCode !== 200 && output.statusCode >= 300) {
138
- return deserializeAws_restJson1PutUsersCommandError(output, context);
138
+ return de_PutUsersCommandError(output, context);
139
139
  }
140
140
  const contents = map({
141
141
  $metadata: deserializeMetadata(output),
@@ -143,7 +143,7 @@ export const deserializeAws_restJson1PutUsersCommand = async (output, context) =
143
143
  await collectBody(output.body, context);
144
144
  return contents;
145
145
  };
146
- const deserializeAws_restJson1PutUsersCommandError = async (output, context) => {
146
+ const de_PutUsersCommandError = async (output, context) => {
147
147
  const parsedOutput = {
148
148
  ...output,
149
149
  body: await parseErrorBody(output.body, context),
@@ -152,13 +152,13 @@ const deserializeAws_restJson1PutUsersCommandError = async (output, context) =>
152
152
  switch (errorCode) {
153
153
  case "InvalidInputException":
154
154
  case "com.amazonaws.personalizeevents#InvalidInputException":
155
- throw await deserializeAws_restJson1InvalidInputExceptionResponse(parsedOutput, context);
155
+ throw await de_InvalidInputExceptionRes(parsedOutput, context);
156
156
  case "ResourceInUseException":
157
157
  case "com.amazonaws.personalizeevents#ResourceInUseException":
158
- throw await deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context);
158
+ throw await de_ResourceInUseExceptionRes(parsedOutput, context);
159
159
  case "ResourceNotFoundException":
160
160
  case "com.amazonaws.personalizeevents#ResourceNotFoundException":
161
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
161
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
162
162
  default:
163
163
  const parsedBody = parsedOutput.body;
164
164
  throwDefaultError({
@@ -170,7 +170,7 @@ const deserializeAws_restJson1PutUsersCommandError = async (output, context) =>
170
170
  }
171
171
  };
172
172
  const map = __map;
173
- const deserializeAws_restJson1InvalidInputExceptionResponse = async (parsedOutput, context) => {
173
+ const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
174
174
  const contents = map({});
175
175
  const data = parsedOutput.body;
176
176
  if (data.message != null) {
@@ -182,7 +182,7 @@ const deserializeAws_restJson1InvalidInputExceptionResponse = async (parsedOutpu
182
182
  });
183
183
  return __decorateServiceException(exception, parsedOutput.body);
184
184
  };
185
- const deserializeAws_restJson1ResourceInUseExceptionResponse = async (parsedOutput, context) => {
185
+ const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
186
186
  const contents = map({});
187
187
  const data = parsedOutput.body;
188
188
  if (data.message != null) {
@@ -194,7 +194,7 @@ const deserializeAws_restJson1ResourceInUseExceptionResponse = async (parsedOutp
194
194
  });
195
195
  return __decorateServiceException(exception, parsedOutput.body);
196
196
  };
197
- const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
197
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
198
198
  const contents = map({});
199
199
  const data = parsedOutput.body;
200
200
  if (data.message != null) {
@@ -206,64 +206,64 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
206
206
  });
207
207
  return __decorateServiceException(exception, parsedOutput.body);
208
208
  };
209
- const serializeAws_restJson1Event = (input, context) => {
209
+ const se_Event = (input, context) => {
210
210
  return {
211
211
  ...(input.eventId != null && { eventId: input.eventId }),
212
212
  ...(input.eventType != null && { eventType: input.eventType }),
213
213
  ...(input.eventValue != null && { eventValue: __serializeFloat(input.eventValue) }),
214
- ...(input.impression != null && { impression: serializeAws_restJson1Impression(input.impression, context) }),
214
+ ...(input.impression != null && { impression: se_Impression(input.impression, context) }),
215
215
  ...(input.itemId != null && { itemId: input.itemId }),
216
216
  ...(input.metricAttribution != null && {
217
- metricAttribution: serializeAws_restJson1MetricAttribution(input.metricAttribution, context),
217
+ metricAttribution: se_MetricAttribution(input.metricAttribution, context),
218
218
  }),
219
219
  ...(input.properties != null && { properties: __LazyJsonString.fromObject(input.properties) }),
220
220
  ...(input.recommendationId != null && { recommendationId: input.recommendationId }),
221
221
  ...(input.sentAt != null && { sentAt: Math.round(input.sentAt.getTime() / 1000) }),
222
222
  };
223
223
  };
224
- const serializeAws_restJson1EventList = (input, context) => {
224
+ const se_EventList = (input, context) => {
225
225
  return input
226
226
  .filter((e) => e != null)
227
227
  .map((entry) => {
228
- return serializeAws_restJson1Event(entry, context);
228
+ return se_Event(entry, context);
229
229
  });
230
230
  };
231
- const serializeAws_restJson1Impression = (input, context) => {
231
+ const se_Impression = (input, context) => {
232
232
  return input
233
233
  .filter((e) => e != null)
234
234
  .map((entry) => {
235
235
  return entry;
236
236
  });
237
237
  };
238
- const serializeAws_restJson1Item = (input, context) => {
238
+ const se_Item = (input, context) => {
239
239
  return {
240
240
  ...(input.itemId != null && { itemId: input.itemId }),
241
241
  ...(input.properties != null && { properties: __LazyJsonString.fromObject(input.properties) }),
242
242
  };
243
243
  };
244
- const serializeAws_restJson1ItemList = (input, context) => {
244
+ const se_ItemList = (input, context) => {
245
245
  return input
246
246
  .filter((e) => e != null)
247
247
  .map((entry) => {
248
- return serializeAws_restJson1Item(entry, context);
248
+ return se_Item(entry, context);
249
249
  });
250
250
  };
251
- const serializeAws_restJson1MetricAttribution = (input, context) => {
251
+ const se_MetricAttribution = (input, context) => {
252
252
  return {
253
253
  ...(input.eventAttributionSource != null && { eventAttributionSource: input.eventAttributionSource }),
254
254
  };
255
255
  };
256
- const serializeAws_restJson1User = (input, context) => {
256
+ const se_User = (input, context) => {
257
257
  return {
258
258
  ...(input.properties != null && { properties: __LazyJsonString.fromObject(input.properties) }),
259
259
  ...(input.userId != null && { userId: input.userId }),
260
260
  };
261
261
  };
262
- const serializeAws_restJson1UserList = (input, context) => {
262
+ const se_UserList = (input, context) => {
263
263
  return input
264
264
  .filter((e) => e != null)
265
265
  .map((entry) => {
266
- return serializeAws_restJson1User(entry, context);
266
+ return se_User(entry, context);
267
267
  });
268
268
  };
269
269
  const deserializeMetadata = (output) => ({
@@ -3,9 +3,27 @@ import { SerdeContext as __SerdeContext } from "@aws-sdk/types";
3
3
  import { PutEventsCommandInput, PutEventsCommandOutput } from "../commands/PutEventsCommand";
4
4
  import { PutItemsCommandInput, PutItemsCommandOutput } from "../commands/PutItemsCommand";
5
5
  import { PutUsersCommandInput, PutUsersCommandOutput } from "../commands/PutUsersCommand";
6
- export declare const serializeAws_restJson1PutEventsCommand: (input: PutEventsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
7
- export declare const serializeAws_restJson1PutItemsCommand: (input: PutItemsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
8
- export declare const serializeAws_restJson1PutUsersCommand: (input: PutUsersCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
9
- export declare const deserializeAws_restJson1PutEventsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PutEventsCommandOutput>;
10
- export declare const deserializeAws_restJson1PutItemsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PutItemsCommandOutput>;
11
- export declare const deserializeAws_restJson1PutUsersCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PutUsersCommandOutput>;
6
+ /**
7
+ * serializeAws_restJson1PutEventsCommand
8
+ */
9
+ export declare const se_PutEventsCommand: (input: PutEventsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
10
+ /**
11
+ * serializeAws_restJson1PutItemsCommand
12
+ */
13
+ export declare const se_PutItemsCommand: (input: PutItemsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
14
+ /**
15
+ * serializeAws_restJson1PutUsersCommand
16
+ */
17
+ export declare const se_PutUsersCommand: (input: PutUsersCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
18
+ /**
19
+ * deserializeAws_restJson1PutEventsCommand
20
+ */
21
+ export declare const de_PutEventsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PutEventsCommandOutput>;
22
+ /**
23
+ * deserializeAws_restJson1PutItemsCommand
24
+ */
25
+ export declare const de_PutItemsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PutItemsCommandOutput>;
26
+ /**
27
+ * deserializeAws_restJson1PutUsersCommand
28
+ */
29
+ export declare const de_PutUsersCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PutUsersCommandOutput>;
@@ -15,27 +15,27 @@ import {
15
15
  PutUsersCommandInput,
16
16
  PutUsersCommandOutput,
17
17
  } from "../commands/PutUsersCommand";
18
- export declare const serializeAws_restJson1PutEventsCommand: (
18
+ export declare const se_PutEventsCommand: (
19
19
  input: PutEventsCommandInput,
20
20
  context: __SerdeContext
21
21
  ) => Promise<__HttpRequest>;
22
- export declare const serializeAws_restJson1PutItemsCommand: (
22
+ export declare const se_PutItemsCommand: (
23
23
  input: PutItemsCommandInput,
24
24
  context: __SerdeContext
25
25
  ) => Promise<__HttpRequest>;
26
- export declare const serializeAws_restJson1PutUsersCommand: (
26
+ export declare const se_PutUsersCommand: (
27
27
  input: PutUsersCommandInput,
28
28
  context: __SerdeContext
29
29
  ) => Promise<__HttpRequest>;
30
- export declare const deserializeAws_restJson1PutEventsCommand: (
30
+ export declare const de_PutEventsCommand: (
31
31
  output: __HttpResponse,
32
32
  context: __SerdeContext
33
33
  ) => Promise<PutEventsCommandOutput>;
34
- export declare const deserializeAws_restJson1PutItemsCommand: (
34
+ export declare const de_PutItemsCommand: (
35
35
  output: __HttpResponse,
36
36
  context: __SerdeContext
37
37
  ) => Promise<PutItemsCommandOutput>;
38
- export declare const deserializeAws_restJson1PutUsersCommand: (
38
+ export declare const de_PutUsersCommand: (
39
39
  output: __HttpResponse,
40
40
  context: __SerdeContext
41
41
  ) => Promise<PutUsersCommandOutput>;
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.306.0",
4
+ "version": "3.310.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",
@@ -21,42 +21,42 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.306.0",
25
- "@aws-sdk/config-resolver": "3.306.0",
26
- "@aws-sdk/credential-provider-node": "3.306.0",
27
- "@aws-sdk/fetch-http-handler": "3.306.0",
28
- "@aws-sdk/hash-node": "3.306.0",
29
- "@aws-sdk/invalid-dependency": "3.306.0",
30
- "@aws-sdk/middleware-content-length": "3.306.0",
31
- "@aws-sdk/middleware-endpoint": "3.306.0",
32
- "@aws-sdk/middleware-host-header": "3.306.0",
33
- "@aws-sdk/middleware-logger": "3.306.0",
34
- "@aws-sdk/middleware-recursion-detection": "3.306.0",
35
- "@aws-sdk/middleware-retry": "3.306.0",
36
- "@aws-sdk/middleware-serde": "3.306.0",
37
- "@aws-sdk/middleware-signing": "3.306.0",
38
- "@aws-sdk/middleware-stack": "3.306.0",
39
- "@aws-sdk/middleware-user-agent": "3.306.0",
40
- "@aws-sdk/node-config-provider": "3.306.0",
41
- "@aws-sdk/node-http-handler": "3.306.0",
42
- "@aws-sdk/protocol-http": "3.306.0",
43
- "@aws-sdk/smithy-client": "3.306.0",
44
- "@aws-sdk/types": "3.306.0",
45
- "@aws-sdk/url-parser": "3.306.0",
46
- "@aws-sdk/util-base64": "3.303.0",
47
- "@aws-sdk/util-body-length-browser": "3.303.0",
48
- "@aws-sdk/util-body-length-node": "3.303.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.306.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.306.0",
51
- "@aws-sdk/util-endpoints": "3.306.0",
52
- "@aws-sdk/util-retry": "3.306.0",
53
- "@aws-sdk/util-user-agent-browser": "3.306.0",
54
- "@aws-sdk/util-user-agent-node": "3.306.0",
55
- "@aws-sdk/util-utf8": "3.303.0",
24
+ "@aws-sdk/client-sts": "3.310.0",
25
+ "@aws-sdk/config-resolver": "3.310.0",
26
+ "@aws-sdk/credential-provider-node": "3.310.0",
27
+ "@aws-sdk/fetch-http-handler": "3.310.0",
28
+ "@aws-sdk/hash-node": "3.310.0",
29
+ "@aws-sdk/invalid-dependency": "3.310.0",
30
+ "@aws-sdk/middleware-content-length": "3.310.0",
31
+ "@aws-sdk/middleware-endpoint": "3.310.0",
32
+ "@aws-sdk/middleware-host-header": "3.310.0",
33
+ "@aws-sdk/middleware-logger": "3.310.0",
34
+ "@aws-sdk/middleware-recursion-detection": "3.310.0",
35
+ "@aws-sdk/middleware-retry": "3.310.0",
36
+ "@aws-sdk/middleware-serde": "3.310.0",
37
+ "@aws-sdk/middleware-signing": "3.310.0",
38
+ "@aws-sdk/middleware-stack": "3.310.0",
39
+ "@aws-sdk/middleware-user-agent": "3.310.0",
40
+ "@aws-sdk/node-config-provider": "3.310.0",
41
+ "@aws-sdk/node-http-handler": "3.310.0",
42
+ "@aws-sdk/protocol-http": "3.310.0",
43
+ "@aws-sdk/smithy-client": "3.310.0",
44
+ "@aws-sdk/types": "3.310.0",
45
+ "@aws-sdk/url-parser": "3.310.0",
46
+ "@aws-sdk/util-base64": "3.310.0",
47
+ "@aws-sdk/util-body-length-browser": "3.310.0",
48
+ "@aws-sdk/util-body-length-node": "3.310.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.310.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.310.0",
51
+ "@aws-sdk/util-endpoints": "3.310.0",
52
+ "@aws-sdk/util-retry": "3.310.0",
53
+ "@aws-sdk/util-user-agent-browser": "3.310.0",
54
+ "@aws-sdk/util-user-agent-node": "3.310.0",
55
+ "@aws-sdk/util-utf8": "3.310.0",
56
56
  "tslib": "^2.5.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@aws-sdk/service-client-documentation-generator": "3.303.0",
59
+ "@aws-sdk/service-client-documentation-generator": "3.310.0",
60
60
  "@tsconfig/node14": "1.0.3",
61
61
  "@types/node": "^14.14.31",
62
62
  "concurrently": "7.0.0",
@@ -76,7 +76,7 @@
76
76
  }
77
77
  },
78
78
  "files": [
79
- "dist-*"
79
+ "dist-*/**"
80
80
  ],
81
81
  "author": {
82
82
  "name": "AWS SDK for JavaScript Team",