@aws-sdk/client-personalize-events 3.504.0 → 3.507.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/index.js CHANGED
@@ -345,7 +345,7 @@ var se_PutUsersCommand = /* @__PURE__ */ __name(async (input, context) => {
345
345
  }, "se_PutUsersCommand");
346
346
  var de_PutActionInteractionsCommand = /* @__PURE__ */ __name(async (output, context) => {
347
347
  if (output.statusCode !== 200 && output.statusCode >= 300) {
348
- return de_PutActionInteractionsCommandError(output, context);
348
+ return de_CommandError(output, context);
349
349
  }
350
350
  const contents = (0, import_smithy_client.map)({
351
351
  $metadata: deserializeMetadata(output)
@@ -353,34 +353,9 @@ var de_PutActionInteractionsCommand = /* @__PURE__ */ __name(async (output, cont
353
353
  await (0, import_smithy_client.collectBody)(output.body, context);
354
354
  return contents;
355
355
  }, "de_PutActionInteractionsCommand");
356
- var de_PutActionInteractionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
357
- const parsedOutput = {
358
- ...output,
359
- body: await parseErrorBody(output.body, context)
360
- };
361
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
362
- switch (errorCode) {
363
- case "InvalidInputException":
364
- case "com.amazonaws.personalizeevents#InvalidInputException":
365
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
366
- case "ResourceInUseException":
367
- case "com.amazonaws.personalizeevents#ResourceInUseException":
368
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
369
- case "ResourceNotFoundException":
370
- case "com.amazonaws.personalizeevents#ResourceNotFoundException":
371
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
372
- default:
373
- const parsedBody = parsedOutput.body;
374
- return throwDefaultError({
375
- output,
376
- parsedBody,
377
- errorCode
378
- });
379
- }
380
- }, "de_PutActionInteractionsCommandError");
381
356
  var de_PutActionsCommand = /* @__PURE__ */ __name(async (output, context) => {
382
357
  if (output.statusCode !== 200 && output.statusCode >= 300) {
383
- return de_PutActionsCommandError(output, context);
358
+ return de_CommandError(output, context);
384
359
  }
385
360
  const contents = (0, import_smithy_client.map)({
386
361
  $metadata: deserializeMetadata(output)
@@ -388,34 +363,9 @@ var de_PutActionsCommand = /* @__PURE__ */ __name(async (output, context) => {
388
363
  await (0, import_smithy_client.collectBody)(output.body, context);
389
364
  return contents;
390
365
  }, "de_PutActionsCommand");
391
- var de_PutActionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
392
- const parsedOutput = {
393
- ...output,
394
- body: await parseErrorBody(output.body, context)
395
- };
396
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
397
- switch (errorCode) {
398
- case "InvalidInputException":
399
- case "com.amazonaws.personalizeevents#InvalidInputException":
400
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
401
- case "ResourceInUseException":
402
- case "com.amazonaws.personalizeevents#ResourceInUseException":
403
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
404
- case "ResourceNotFoundException":
405
- case "com.amazonaws.personalizeevents#ResourceNotFoundException":
406
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
407
- default:
408
- const parsedBody = parsedOutput.body;
409
- return throwDefaultError({
410
- output,
411
- parsedBody,
412
- errorCode
413
- });
414
- }
415
- }, "de_PutActionsCommandError");
416
366
  var de_PutEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
417
367
  if (output.statusCode !== 200 && output.statusCode >= 300) {
418
- return de_PutEventsCommandError(output, context);
368
+ return de_CommandError(output, context);
419
369
  }
420
370
  const contents = (0, import_smithy_client.map)({
421
371
  $metadata: deserializeMetadata(output)
@@ -423,28 +373,9 @@ var de_PutEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
423
373
  await (0, import_smithy_client.collectBody)(output.body, context);
424
374
  return contents;
425
375
  }, "de_PutEventsCommand");
426
- var de_PutEventsCommandError = /* @__PURE__ */ __name(async (output, context) => {
427
- const parsedOutput = {
428
- ...output,
429
- body: await parseErrorBody(output.body, context)
430
- };
431
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
432
- switch (errorCode) {
433
- case "InvalidInputException":
434
- case "com.amazonaws.personalizeevents#InvalidInputException":
435
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
436
- default:
437
- const parsedBody = parsedOutput.body;
438
- return throwDefaultError({
439
- output,
440
- parsedBody,
441
- errorCode
442
- });
443
- }
444
- }, "de_PutEventsCommandError");
445
376
  var de_PutItemsCommand = /* @__PURE__ */ __name(async (output, context) => {
446
377
  if (output.statusCode !== 200 && output.statusCode >= 300) {
447
- return de_PutItemsCommandError(output, context);
378
+ return de_CommandError(output, context);
448
379
  }
449
380
  const contents = (0, import_smithy_client.map)({
450
381
  $metadata: deserializeMetadata(output)
@@ -452,34 +383,9 @@ var de_PutItemsCommand = /* @__PURE__ */ __name(async (output, context) => {
452
383
  await (0, import_smithy_client.collectBody)(output.body, context);
453
384
  return contents;
454
385
  }, "de_PutItemsCommand");
455
- var de_PutItemsCommandError = /* @__PURE__ */ __name(async (output, context) => {
456
- const parsedOutput = {
457
- ...output,
458
- body: await parseErrorBody(output.body, context)
459
- };
460
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
461
- switch (errorCode) {
462
- case "InvalidInputException":
463
- case "com.amazonaws.personalizeevents#InvalidInputException":
464
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
465
- case "ResourceInUseException":
466
- case "com.amazonaws.personalizeevents#ResourceInUseException":
467
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
468
- case "ResourceNotFoundException":
469
- case "com.amazonaws.personalizeevents#ResourceNotFoundException":
470
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
471
- default:
472
- const parsedBody = parsedOutput.body;
473
- return throwDefaultError({
474
- output,
475
- parsedBody,
476
- errorCode
477
- });
478
- }
479
- }, "de_PutItemsCommandError");
480
386
  var de_PutUsersCommand = /* @__PURE__ */ __name(async (output, context) => {
481
387
  if (output.statusCode !== 200 && output.statusCode >= 300) {
482
- return de_PutUsersCommandError(output, context);
388
+ return de_CommandError(output, context);
483
389
  }
484
390
  const contents = (0, import_smithy_client.map)({
485
391
  $metadata: deserializeMetadata(output)
@@ -487,7 +393,7 @@ var de_PutUsersCommand = /* @__PURE__ */ __name(async (output, context) => {
487
393
  await (0, import_smithy_client.collectBody)(output.body, context);
488
394
  return contents;
489
395
  }, "de_PutUsersCommand");
490
- var de_PutUsersCommandError = /* @__PURE__ */ __name(async (output, context) => {
396
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
491
397
  const parsedOutput = {
492
398
  ...output,
493
399
  body: await parseErrorBody(output.body, context)
@@ -511,7 +417,7 @@ var de_PutUsersCommandError = /* @__PURE__ */ __name(async (output, context) =>
511
417
  errorCode
512
418
  });
513
419
  }
514
- }, "de_PutUsersCommandError");
420
+ }, "de_CommandError");
515
421
  var throwDefaultError = (0, import_smithy_client.withBaseException)(PersonalizeEventsServiceException);
516
422
  var de_InvalidInputExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
517
423
  const contents = (0, import_smithy_client.map)({});
@@ -76,7 +76,7 @@ export const se_PutUsersCommand = async (input, context) => {
76
76
  };
77
77
  export const de_PutActionInteractionsCommand = async (output, context) => {
78
78
  if (output.statusCode !== 200 && output.statusCode >= 300) {
79
- return de_PutActionInteractionsCommandError(output, context);
79
+ return de_CommandError(output, context);
80
80
  }
81
81
  const contents = map({
82
82
  $metadata: deserializeMetadata(output),
@@ -84,34 +84,9 @@ export const de_PutActionInteractionsCommand = async (output, context) => {
84
84
  await collectBody(output.body, context);
85
85
  return contents;
86
86
  };
87
- const de_PutActionInteractionsCommandError = async (output, context) => {
88
- const parsedOutput = {
89
- ...output,
90
- body: await parseErrorBody(output.body, context),
91
- };
92
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
93
- switch (errorCode) {
94
- case "InvalidInputException":
95
- case "com.amazonaws.personalizeevents#InvalidInputException":
96
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
97
- case "ResourceInUseException":
98
- case "com.amazonaws.personalizeevents#ResourceInUseException":
99
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
100
- case "ResourceNotFoundException":
101
- case "com.amazonaws.personalizeevents#ResourceNotFoundException":
102
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
103
- default:
104
- const parsedBody = parsedOutput.body;
105
- return throwDefaultError({
106
- output,
107
- parsedBody,
108
- errorCode,
109
- });
110
- }
111
- };
112
87
  export const de_PutActionsCommand = async (output, context) => {
113
88
  if (output.statusCode !== 200 && output.statusCode >= 300) {
114
- return de_PutActionsCommandError(output, context);
89
+ return de_CommandError(output, context);
115
90
  }
116
91
  const contents = map({
117
92
  $metadata: deserializeMetadata(output),
@@ -119,34 +94,9 @@ export const de_PutActionsCommand = async (output, context) => {
119
94
  await collectBody(output.body, context);
120
95
  return contents;
121
96
  };
122
- const de_PutActionsCommandError = async (output, context) => {
123
- const parsedOutput = {
124
- ...output,
125
- body: await parseErrorBody(output.body, context),
126
- };
127
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
128
- switch (errorCode) {
129
- case "InvalidInputException":
130
- case "com.amazonaws.personalizeevents#InvalidInputException":
131
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
132
- case "ResourceInUseException":
133
- case "com.amazonaws.personalizeevents#ResourceInUseException":
134
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
135
- case "ResourceNotFoundException":
136
- case "com.amazonaws.personalizeevents#ResourceNotFoundException":
137
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
138
- default:
139
- const parsedBody = parsedOutput.body;
140
- return throwDefaultError({
141
- output,
142
- parsedBody,
143
- errorCode,
144
- });
145
- }
146
- };
147
97
  export const de_PutEventsCommand = async (output, context) => {
148
98
  if (output.statusCode !== 200 && output.statusCode >= 300) {
149
- return de_PutEventsCommandError(output, context);
99
+ return de_CommandError(output, context);
150
100
  }
151
101
  const contents = map({
152
102
  $metadata: deserializeMetadata(output),
@@ -154,28 +104,9 @@ export const de_PutEventsCommand = async (output, context) => {
154
104
  await collectBody(output.body, context);
155
105
  return contents;
156
106
  };
157
- const de_PutEventsCommandError = async (output, context) => {
158
- const parsedOutput = {
159
- ...output,
160
- body: await parseErrorBody(output.body, context),
161
- };
162
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
163
- switch (errorCode) {
164
- case "InvalidInputException":
165
- case "com.amazonaws.personalizeevents#InvalidInputException":
166
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
167
- default:
168
- const parsedBody = parsedOutput.body;
169
- return throwDefaultError({
170
- output,
171
- parsedBody,
172
- errorCode,
173
- });
174
- }
175
- };
176
107
  export const de_PutItemsCommand = async (output, context) => {
177
108
  if (output.statusCode !== 200 && output.statusCode >= 300) {
178
- return de_PutItemsCommandError(output, context);
109
+ return de_CommandError(output, context);
179
110
  }
180
111
  const contents = map({
181
112
  $metadata: deserializeMetadata(output),
@@ -183,34 +114,9 @@ export const de_PutItemsCommand = async (output, context) => {
183
114
  await collectBody(output.body, context);
184
115
  return contents;
185
116
  };
186
- const de_PutItemsCommandError = async (output, context) => {
187
- const parsedOutput = {
188
- ...output,
189
- body: await parseErrorBody(output.body, context),
190
- };
191
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
192
- switch (errorCode) {
193
- case "InvalidInputException":
194
- case "com.amazonaws.personalizeevents#InvalidInputException":
195
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
196
- case "ResourceInUseException":
197
- case "com.amazonaws.personalizeevents#ResourceInUseException":
198
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
199
- case "ResourceNotFoundException":
200
- case "com.amazonaws.personalizeevents#ResourceNotFoundException":
201
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
202
- default:
203
- const parsedBody = parsedOutput.body;
204
- return throwDefaultError({
205
- output,
206
- parsedBody,
207
- errorCode,
208
- });
209
- }
210
- };
211
117
  export const de_PutUsersCommand = async (output, context) => {
212
118
  if (output.statusCode !== 200 && output.statusCode >= 300) {
213
- return de_PutUsersCommandError(output, context);
119
+ return de_CommandError(output, context);
214
120
  }
215
121
  const contents = map({
216
122
  $metadata: deserializeMetadata(output),
@@ -218,7 +124,7 @@ export const de_PutUsersCommand = async (output, context) => {
218
124
  await collectBody(output.body, context);
219
125
  return contents;
220
126
  };
221
- const de_PutUsersCommandError = async (output, context) => {
127
+ const de_CommandError = async (output, context) => {
222
128
  const parsedOutput = {
223
129
  ...output,
224
130
  body: await parseErrorBody(output.body, context),
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.504.0",
4
+ "version": "3.507.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-personalize-events",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.504.0",
23
+ "@aws-sdk/client-sts": "3.507.0",
24
24
  "@aws-sdk/core": "3.496.0",
25
- "@aws-sdk/credential-provider-node": "3.504.0",
25
+ "@aws-sdk/credential-provider-node": "3.507.0",
26
26
  "@aws-sdk/middleware-host-header": "3.502.0",
27
27
  "@aws-sdk/middleware-logger": "3.502.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.502.0",