@aws-sdk/client-support 3.312.0 → 3.316.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.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectString as __expectString, limitedParseDouble as __limitedParseDouble, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectString as __expectString, limitedParseDouble as __limitedParseDouble, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { AttachmentIdNotFound, AttachmentLimitExceeded, AttachmentSetExpired, AttachmentSetIdNotFound, AttachmentSetSizeLimitExceeded, CaseCreationLimitExceeded, CaseIdNotFound, DescribeAttachmentLimitExceeded, InternalServerError, } from "../models/models_0";
4
4
  import { SupportServiceException as __BaseException } from "../models/SupportServiceException";
5
5
  export const se_AddAttachmentsToSetCommand = async (input, context) => {
@@ -11,43 +11,43 @@ export const se_AddAttachmentsToSetCommand = async (input, context) => {
11
11
  export const se_AddCommunicationToCaseCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("AddCommunicationToCase");
13
13
  let body;
14
- body = JSON.stringify(se_AddCommunicationToCaseRequest(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const se_CreateCaseCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("CreateCase");
19
19
  let body;
20
- body = JSON.stringify(se_CreateCaseRequest(input, context));
20
+ body = JSON.stringify(_json(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  export const se_DescribeAttachmentCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("DescribeAttachment");
25
25
  let body;
26
- body = JSON.stringify(se_DescribeAttachmentRequest(input, context));
26
+ body = JSON.stringify(_json(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  export const se_DescribeCasesCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("DescribeCases");
31
31
  let body;
32
- body = JSON.stringify(se_DescribeCasesRequest(input, context));
32
+ body = JSON.stringify(_json(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  export const se_DescribeCommunicationsCommand = async (input, context) => {
36
36
  const headers = sharedHeaders("DescribeCommunications");
37
37
  let body;
38
- body = JSON.stringify(se_DescribeCommunicationsRequest(input, context));
38
+ body = JSON.stringify(_json(input));
39
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
40
  };
41
41
  export const se_DescribeServicesCommand = async (input, context) => {
42
42
  const headers = sharedHeaders("DescribeServices");
43
43
  let body;
44
- body = JSON.stringify(se_DescribeServicesRequest(input, context));
44
+ body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
47
  export const se_DescribeSeverityLevelsCommand = async (input, context) => {
48
48
  const headers = sharedHeaders("DescribeSeverityLevels");
49
49
  let body;
50
- body = JSON.stringify(se_DescribeSeverityLevelsRequest(input, context));
50
+ body = JSON.stringify(_json(input));
51
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
52
  };
53
53
  export const se_DescribeTrustedAdvisorCheckRefreshStatusesCommand = async (input, context) => {
@@ -59,13 +59,13 @@ export const se_DescribeTrustedAdvisorCheckRefreshStatusesCommand = async (input
59
59
  export const se_DescribeTrustedAdvisorCheckResultCommand = async (input, context) => {
60
60
  const headers = sharedHeaders("DescribeTrustedAdvisorCheckResult");
61
61
  let body;
62
- body = JSON.stringify(se_DescribeTrustedAdvisorCheckResultRequest(input, context));
62
+ body = JSON.stringify(_json(input));
63
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
64
  };
65
65
  export const se_DescribeTrustedAdvisorChecksCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("DescribeTrustedAdvisorChecks");
67
67
  let body;
68
- body = JSON.stringify(se_DescribeTrustedAdvisorChecksRequest(input, context));
68
+ body = JSON.stringify(_json(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  export const se_DescribeTrustedAdvisorCheckSummariesCommand = async (input, context) => {
@@ -77,13 +77,13 @@ export const se_DescribeTrustedAdvisorCheckSummariesCommand = async (input, cont
77
77
  export const se_RefreshTrustedAdvisorCheckCommand = async (input, context) => {
78
78
  const headers = sharedHeaders("RefreshTrustedAdvisorCheck");
79
79
  let body;
80
- body = JSON.stringify(se_RefreshTrustedAdvisorCheckRequest(input, context));
80
+ body = JSON.stringify(_json(input));
81
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
82
82
  };
83
83
  export const se_ResolveCaseCommand = async (input, context) => {
84
84
  const headers = sharedHeaders("ResolveCase");
85
85
  let body;
86
- body = JSON.stringify(se_ResolveCaseRequest(input, context));
86
+ body = JSON.stringify(_json(input));
87
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
88
88
  };
89
89
  export const de_AddAttachmentsToSetCommand = async (output, context) => {
@@ -92,12 +92,12 @@ export const de_AddAttachmentsToSetCommand = async (output, context) => {
92
92
  }
93
93
  const data = await parseBody(output.body, context);
94
94
  let contents = {};
95
- contents = de_AddAttachmentsToSetResponse(data, context);
95
+ contents = _json(data);
96
96
  const response = {
97
97
  $metadata: deserializeMetadata(output),
98
98
  ...contents,
99
99
  };
100
- return Promise.resolve(response);
100
+ return response;
101
101
  };
102
102
  const de_AddAttachmentsToSetCommandError = async (output, context) => {
103
103
  const parsedOutput = {
@@ -123,10 +123,9 @@ const de_AddAttachmentsToSetCommandError = async (output, context) => {
123
123
  throw await de_InternalServerErrorRes(parsedOutput, context);
124
124
  default:
125
125
  const parsedBody = parsedOutput.body;
126
- throwDefaultError({
126
+ return throwDefaultError({
127
127
  output,
128
128
  parsedBody,
129
- exceptionCtor: __BaseException,
130
129
  errorCode,
131
130
  });
132
131
  }
@@ -137,12 +136,12 @@ export const de_AddCommunicationToCaseCommand = async (output, context) => {
137
136
  }
138
137
  const data = await parseBody(output.body, context);
139
138
  let contents = {};
140
- contents = de_AddCommunicationToCaseResponse(data, context);
139
+ contents = _json(data);
141
140
  const response = {
142
141
  $metadata: deserializeMetadata(output),
143
142
  ...contents,
144
143
  };
145
- return Promise.resolve(response);
144
+ return response;
146
145
  };
147
146
  const de_AddCommunicationToCaseCommandError = async (output, context) => {
148
147
  const parsedOutput = {
@@ -165,10 +164,9 @@ const de_AddCommunicationToCaseCommandError = async (output, context) => {
165
164
  throw await de_InternalServerErrorRes(parsedOutput, context);
166
165
  default:
167
166
  const parsedBody = parsedOutput.body;
168
- throwDefaultError({
167
+ return throwDefaultError({
169
168
  output,
170
169
  parsedBody,
171
- exceptionCtor: __BaseException,
172
170
  errorCode,
173
171
  });
174
172
  }
@@ -179,12 +177,12 @@ export const de_CreateCaseCommand = async (output, context) => {
179
177
  }
180
178
  const data = await parseBody(output.body, context);
181
179
  let contents = {};
182
- contents = de_CreateCaseResponse(data, context);
180
+ contents = _json(data);
183
181
  const response = {
184
182
  $metadata: deserializeMetadata(output),
185
183
  ...contents,
186
184
  };
187
- return Promise.resolve(response);
185
+ return response;
188
186
  };
189
187
  const de_CreateCaseCommandError = async (output, context) => {
190
188
  const parsedOutput = {
@@ -207,10 +205,9 @@ const de_CreateCaseCommandError = async (output, context) => {
207
205
  throw await de_InternalServerErrorRes(parsedOutput, context);
208
206
  default:
209
207
  const parsedBody = parsedOutput.body;
210
- throwDefaultError({
208
+ return throwDefaultError({
211
209
  output,
212
210
  parsedBody,
213
- exceptionCtor: __BaseException,
214
211
  errorCode,
215
212
  });
216
213
  }
@@ -226,7 +223,7 @@ export const de_DescribeAttachmentCommand = async (output, context) => {
226
223
  $metadata: deserializeMetadata(output),
227
224
  ...contents,
228
225
  };
229
- return Promise.resolve(response);
226
+ return response;
230
227
  };
231
228
  const de_DescribeAttachmentCommandError = async (output, context) => {
232
229
  const parsedOutput = {
@@ -246,10 +243,9 @@ const de_DescribeAttachmentCommandError = async (output, context) => {
246
243
  throw await de_InternalServerErrorRes(parsedOutput, context);
247
244
  default:
248
245
  const parsedBody = parsedOutput.body;
249
- throwDefaultError({
246
+ return throwDefaultError({
250
247
  output,
251
248
  parsedBody,
252
- exceptionCtor: __BaseException,
253
249
  errorCode,
254
250
  });
255
251
  }
@@ -260,12 +256,12 @@ export const de_DescribeCasesCommand = async (output, context) => {
260
256
  }
261
257
  const data = await parseBody(output.body, context);
262
258
  let contents = {};
263
- contents = de_DescribeCasesResponse(data, context);
259
+ contents = _json(data);
264
260
  const response = {
265
261
  $metadata: deserializeMetadata(output),
266
262
  ...contents,
267
263
  };
268
- return Promise.resolve(response);
264
+ return response;
269
265
  };
270
266
  const de_DescribeCasesCommandError = async (output, context) => {
271
267
  const parsedOutput = {
@@ -282,10 +278,9 @@ const de_DescribeCasesCommandError = async (output, context) => {
282
278
  throw await de_InternalServerErrorRes(parsedOutput, context);
283
279
  default:
284
280
  const parsedBody = parsedOutput.body;
285
- throwDefaultError({
281
+ return throwDefaultError({
286
282
  output,
287
283
  parsedBody,
288
- exceptionCtor: __BaseException,
289
284
  errorCode,
290
285
  });
291
286
  }
@@ -296,12 +291,12 @@ export const de_DescribeCommunicationsCommand = async (output, context) => {
296
291
  }
297
292
  const data = await parseBody(output.body, context);
298
293
  let contents = {};
299
- contents = de_DescribeCommunicationsResponse(data, context);
294
+ contents = _json(data);
300
295
  const response = {
301
296
  $metadata: deserializeMetadata(output),
302
297
  ...contents,
303
298
  };
304
- return Promise.resolve(response);
299
+ return response;
305
300
  };
306
301
  const de_DescribeCommunicationsCommandError = async (output, context) => {
307
302
  const parsedOutput = {
@@ -318,10 +313,9 @@ const de_DescribeCommunicationsCommandError = async (output, context) => {
318
313
  throw await de_InternalServerErrorRes(parsedOutput, context);
319
314
  default:
320
315
  const parsedBody = parsedOutput.body;
321
- throwDefaultError({
316
+ return throwDefaultError({
322
317
  output,
323
318
  parsedBody,
324
- exceptionCtor: __BaseException,
325
319
  errorCode,
326
320
  });
327
321
  }
@@ -332,12 +326,12 @@ export const de_DescribeServicesCommand = async (output, context) => {
332
326
  }
333
327
  const data = await parseBody(output.body, context);
334
328
  let contents = {};
335
- contents = de_DescribeServicesResponse(data, context);
329
+ contents = _json(data);
336
330
  const response = {
337
331
  $metadata: deserializeMetadata(output),
338
332
  ...contents,
339
333
  };
340
- return Promise.resolve(response);
334
+ return response;
341
335
  };
342
336
  const de_DescribeServicesCommandError = async (output, context) => {
343
337
  const parsedOutput = {
@@ -351,10 +345,9 @@ const de_DescribeServicesCommandError = async (output, context) => {
351
345
  throw await de_InternalServerErrorRes(parsedOutput, context);
352
346
  default:
353
347
  const parsedBody = parsedOutput.body;
354
- throwDefaultError({
348
+ return throwDefaultError({
355
349
  output,
356
350
  parsedBody,
357
- exceptionCtor: __BaseException,
358
351
  errorCode,
359
352
  });
360
353
  }
@@ -365,12 +358,12 @@ export const de_DescribeSeverityLevelsCommand = async (output, context) => {
365
358
  }
366
359
  const data = await parseBody(output.body, context);
367
360
  let contents = {};
368
- contents = de_DescribeSeverityLevelsResponse(data, context);
361
+ contents = _json(data);
369
362
  const response = {
370
363
  $metadata: deserializeMetadata(output),
371
364
  ...contents,
372
365
  };
373
- return Promise.resolve(response);
366
+ return response;
374
367
  };
375
368
  const de_DescribeSeverityLevelsCommandError = async (output, context) => {
376
369
  const parsedOutput = {
@@ -384,10 +377,9 @@ const de_DescribeSeverityLevelsCommandError = async (output, context) => {
384
377
  throw await de_InternalServerErrorRes(parsedOutput, context);
385
378
  default:
386
379
  const parsedBody = parsedOutput.body;
387
- throwDefaultError({
380
+ return throwDefaultError({
388
381
  output,
389
382
  parsedBody,
390
- exceptionCtor: __BaseException,
391
383
  errorCode,
392
384
  });
393
385
  }
@@ -398,12 +390,12 @@ export const de_DescribeTrustedAdvisorCheckRefreshStatusesCommand = async (outpu
398
390
  }
399
391
  const data = await parseBody(output.body, context);
400
392
  let contents = {};
401
- contents = de_DescribeTrustedAdvisorCheckRefreshStatusesResponse(data, context);
393
+ contents = _json(data);
402
394
  const response = {
403
395
  $metadata: deserializeMetadata(output),
404
396
  ...contents,
405
397
  };
406
- return Promise.resolve(response);
398
+ return response;
407
399
  };
408
400
  const de_DescribeTrustedAdvisorCheckRefreshStatusesCommandError = async (output, context) => {
409
401
  const parsedOutput = {
@@ -417,10 +409,9 @@ const de_DescribeTrustedAdvisorCheckRefreshStatusesCommandError = async (output,
417
409
  throw await de_InternalServerErrorRes(parsedOutput, context);
418
410
  default:
419
411
  const parsedBody = parsedOutput.body;
420
- throwDefaultError({
412
+ return throwDefaultError({
421
413
  output,
422
414
  parsedBody,
423
- exceptionCtor: __BaseException,
424
415
  errorCode,
425
416
  });
426
417
  }
@@ -436,7 +427,7 @@ export const de_DescribeTrustedAdvisorCheckResultCommand = async (output, contex
436
427
  $metadata: deserializeMetadata(output),
437
428
  ...contents,
438
429
  };
439
- return Promise.resolve(response);
430
+ return response;
440
431
  };
441
432
  const de_DescribeTrustedAdvisorCheckResultCommandError = async (output, context) => {
442
433
  const parsedOutput = {
@@ -450,10 +441,9 @@ const de_DescribeTrustedAdvisorCheckResultCommandError = async (output, context)
450
441
  throw await de_InternalServerErrorRes(parsedOutput, context);
451
442
  default:
452
443
  const parsedBody = parsedOutput.body;
453
- throwDefaultError({
444
+ return throwDefaultError({
454
445
  output,
455
446
  parsedBody,
456
- exceptionCtor: __BaseException,
457
447
  errorCode,
458
448
  });
459
449
  }
@@ -469,7 +459,7 @@ export const de_DescribeTrustedAdvisorChecksCommand = async (output, context) =>
469
459
  $metadata: deserializeMetadata(output),
470
460
  ...contents,
471
461
  };
472
- return Promise.resolve(response);
462
+ return response;
473
463
  };
474
464
  const de_DescribeTrustedAdvisorChecksCommandError = async (output, context) => {
475
465
  const parsedOutput = {
@@ -483,10 +473,9 @@ const de_DescribeTrustedAdvisorChecksCommandError = async (output, context) => {
483
473
  throw await de_InternalServerErrorRes(parsedOutput, context);
484
474
  default:
485
475
  const parsedBody = parsedOutput.body;
486
- throwDefaultError({
476
+ return throwDefaultError({
487
477
  output,
488
478
  parsedBody,
489
- exceptionCtor: __BaseException,
490
479
  errorCode,
491
480
  });
492
481
  }
@@ -502,7 +491,7 @@ export const de_DescribeTrustedAdvisorCheckSummariesCommand = async (output, con
502
491
  $metadata: deserializeMetadata(output),
503
492
  ...contents,
504
493
  };
505
- return Promise.resolve(response);
494
+ return response;
506
495
  };
507
496
  const de_DescribeTrustedAdvisorCheckSummariesCommandError = async (output, context) => {
508
497
  const parsedOutput = {
@@ -516,10 +505,9 @@ const de_DescribeTrustedAdvisorCheckSummariesCommandError = async (output, conte
516
505
  throw await de_InternalServerErrorRes(parsedOutput, context);
517
506
  default:
518
507
  const parsedBody = parsedOutput.body;
519
- throwDefaultError({
508
+ return throwDefaultError({
520
509
  output,
521
510
  parsedBody,
522
- exceptionCtor: __BaseException,
523
511
  errorCode,
524
512
  });
525
513
  }
@@ -530,12 +518,12 @@ export const de_RefreshTrustedAdvisorCheckCommand = async (output, context) => {
530
518
  }
531
519
  const data = await parseBody(output.body, context);
532
520
  let contents = {};
533
- contents = de_RefreshTrustedAdvisorCheckResponse(data, context);
521
+ contents = _json(data);
534
522
  const response = {
535
523
  $metadata: deserializeMetadata(output),
536
524
  ...contents,
537
525
  };
538
- return Promise.resolve(response);
526
+ return response;
539
527
  };
540
528
  const de_RefreshTrustedAdvisorCheckCommandError = async (output, context) => {
541
529
  const parsedOutput = {
@@ -549,10 +537,9 @@ const de_RefreshTrustedAdvisorCheckCommandError = async (output, context) => {
549
537
  throw await de_InternalServerErrorRes(parsedOutput, context);
550
538
  default:
551
539
  const parsedBody = parsedOutput.body;
552
- throwDefaultError({
540
+ return throwDefaultError({
553
541
  output,
554
542
  parsedBody,
555
- exceptionCtor: __BaseException,
556
543
  errorCode,
557
544
  });
558
545
  }
@@ -563,12 +550,12 @@ export const de_ResolveCaseCommand = async (output, context) => {
563
550
  }
564
551
  const data = await parseBody(output.body, context);
565
552
  let contents = {};
566
- contents = de_ResolveCaseResponse(data, context);
553
+ contents = _json(data);
567
554
  const response = {
568
555
  $metadata: deserializeMetadata(output),
569
556
  ...contents,
570
557
  };
571
- return Promise.resolve(response);
558
+ return response;
572
559
  };
573
560
  const de_ResolveCaseCommandError = async (output, context) => {
574
561
  const parsedOutput = {
@@ -585,17 +572,16 @@ const de_ResolveCaseCommandError = async (output, context) => {
585
572
  throw await de_InternalServerErrorRes(parsedOutput, context);
586
573
  default:
587
574
  const parsedBody = parsedOutput.body;
588
- throwDefaultError({
575
+ return throwDefaultError({
589
576
  output,
590
577
  parsedBody,
591
- exceptionCtor: __BaseException,
592
578
  errorCode,
593
579
  });
594
580
  }
595
581
  };
596
582
  const de_AttachmentIdNotFoundRes = async (parsedOutput, context) => {
597
583
  const body = parsedOutput.body;
598
- const deserialized = de_AttachmentIdNotFound(body, context);
584
+ const deserialized = _json(body);
599
585
  const exception = new AttachmentIdNotFound({
600
586
  $metadata: deserializeMetadata(parsedOutput),
601
587
  ...deserialized,
@@ -604,7 +590,7 @@ const de_AttachmentIdNotFoundRes = async (parsedOutput, context) => {
604
590
  };
605
591
  const de_AttachmentLimitExceededRes = async (parsedOutput, context) => {
606
592
  const body = parsedOutput.body;
607
- const deserialized = de_AttachmentLimitExceeded(body, context);
593
+ const deserialized = _json(body);
608
594
  const exception = new AttachmentLimitExceeded({
609
595
  $metadata: deserializeMetadata(parsedOutput),
610
596
  ...deserialized,
@@ -613,7 +599,7 @@ const de_AttachmentLimitExceededRes = async (parsedOutput, context) => {
613
599
  };
614
600
  const de_AttachmentSetExpiredRes = async (parsedOutput, context) => {
615
601
  const body = parsedOutput.body;
616
- const deserialized = de_AttachmentSetExpired(body, context);
602
+ const deserialized = _json(body);
617
603
  const exception = new AttachmentSetExpired({
618
604
  $metadata: deserializeMetadata(parsedOutput),
619
605
  ...deserialized,
@@ -622,7 +608,7 @@ const de_AttachmentSetExpiredRes = async (parsedOutput, context) => {
622
608
  };
623
609
  const de_AttachmentSetIdNotFoundRes = async (parsedOutput, context) => {
624
610
  const body = parsedOutput.body;
625
- const deserialized = de_AttachmentSetIdNotFound(body, context);
611
+ const deserialized = _json(body);
626
612
  const exception = new AttachmentSetIdNotFound({
627
613
  $metadata: deserializeMetadata(parsedOutput),
628
614
  ...deserialized,
@@ -631,7 +617,7 @@ const de_AttachmentSetIdNotFoundRes = async (parsedOutput, context) => {
631
617
  };
632
618
  const de_AttachmentSetSizeLimitExceededRes = async (parsedOutput, context) => {
633
619
  const body = parsedOutput.body;
634
- const deserialized = de_AttachmentSetSizeLimitExceeded(body, context);
620
+ const deserialized = _json(body);
635
621
  const exception = new AttachmentSetSizeLimitExceeded({
636
622
  $metadata: deserializeMetadata(parsedOutput),
637
623
  ...deserialized,
@@ -640,7 +626,7 @@ const de_AttachmentSetSizeLimitExceededRes = async (parsedOutput, context) => {
640
626
  };
641
627
  const de_CaseCreationLimitExceededRes = async (parsedOutput, context) => {
642
628
  const body = parsedOutput.body;
643
- const deserialized = de_CaseCreationLimitExceeded(body, context);
629
+ const deserialized = _json(body);
644
630
  const exception = new CaseCreationLimitExceeded({
645
631
  $metadata: deserializeMetadata(parsedOutput),
646
632
  ...deserialized,
@@ -649,7 +635,7 @@ const de_CaseCreationLimitExceededRes = async (parsedOutput, context) => {
649
635
  };
650
636
  const de_CaseIdNotFoundRes = async (parsedOutput, context) => {
651
637
  const body = parsedOutput.body;
652
- const deserialized = de_CaseIdNotFound(body, context);
638
+ const deserialized = _json(body);
653
639
  const exception = new CaseIdNotFound({
654
640
  $metadata: deserializeMetadata(parsedOutput),
655
641
  ...deserialized,
@@ -658,7 +644,7 @@ const de_CaseIdNotFoundRes = async (parsedOutput, context) => {
658
644
  };
659
645
  const de_DescribeAttachmentLimitExceededRes = async (parsedOutput, context) => {
660
646
  const body = parsedOutput.body;
661
- const deserialized = de_DescribeAttachmentLimitExceeded(body, context);
647
+ const deserialized = _json(body);
662
648
  const exception = new DescribeAttachmentLimitExceeded({
663
649
  $metadata: deserializeMetadata(parsedOutput),
664
650
  ...deserialized,
@@ -667,7 +653,7 @@ const de_DescribeAttachmentLimitExceededRes = async (parsedOutput, context) => {
667
653
  };
668
654
  const de_InternalServerErrorRes = async (parsedOutput, context) => {
669
655
  const body = parsedOutput.body;
670
- const deserialized = de_InternalServerError(body, context);
656
+ const deserialized = _json(body);
671
657
  const exception = new InternalServerError({
672
658
  $metadata: deserializeMetadata(parsedOutput),
673
659
  ...deserialized,
@@ -675,24 +661,16 @@ const de_InternalServerErrorRes = async (parsedOutput, context) => {
675
661
  return __decorateServiceException(exception, body);
676
662
  };
677
663
  const se_AddAttachmentsToSetRequest = (input, context) => {
678
- return {
679
- ...(input.attachmentSetId != null && { attachmentSetId: input.attachmentSetId }),
680
- ...(input.attachments != null && { attachments: se_Attachments(input.attachments, context) }),
681
- };
682
- };
683
- const se_AddCommunicationToCaseRequest = (input, context) => {
684
- return {
685
- ...(input.attachmentSetId != null && { attachmentSetId: input.attachmentSetId }),
686
- ...(input.caseId != null && { caseId: input.caseId }),
687
- ...(input.ccEmailAddresses != null && { ccEmailAddresses: se_CcEmailAddressList(input.ccEmailAddresses, context) }),
688
- ...(input.communicationBody != null && { communicationBody: input.communicationBody }),
689
- };
664
+ return take(input, {
665
+ attachmentSetId: [],
666
+ attachments: (_) => se_Attachments(_, context),
667
+ });
690
668
  };
691
669
  const se_Attachment = (input, context) => {
692
- return {
693
- ...(input.data != null && { data: context.base64Encoder(input.data) }),
694
- ...(input.fileName != null && { fileName: input.fileName }),
695
- };
670
+ return take(input, {
671
+ data: context.base64Encoder,
672
+ fileName: [],
673
+ });
696
674
  };
697
675
  const se_Attachments = (input, context) => {
698
676
  return input
@@ -701,376 +679,44 @@ const se_Attachments = (input, context) => {
701
679
  return se_Attachment(entry, context);
702
680
  });
703
681
  };
704
- const se_CaseIdList = (input, context) => {
705
- return input
706
- .filter((e) => e != null)
707
- .map((entry) => {
708
- return entry;
709
- });
710
- };
711
- const se_CcEmailAddressList = (input, context) => {
712
- return input
713
- .filter((e) => e != null)
714
- .map((entry) => {
715
- return entry;
716
- });
717
- };
718
- const se_CreateCaseRequest = (input, context) => {
719
- return {
720
- ...(input.attachmentSetId != null && { attachmentSetId: input.attachmentSetId }),
721
- ...(input.categoryCode != null && { categoryCode: input.categoryCode }),
722
- ...(input.ccEmailAddresses != null && { ccEmailAddresses: se_CcEmailAddressList(input.ccEmailAddresses, context) }),
723
- ...(input.communicationBody != null && { communicationBody: input.communicationBody }),
724
- ...(input.issueType != null && { issueType: input.issueType }),
725
- ...(input.language != null && { language: input.language }),
726
- ...(input.serviceCode != null && { serviceCode: input.serviceCode }),
727
- ...(input.severityCode != null && { severityCode: input.severityCode }),
728
- ...(input.subject != null && { subject: input.subject }),
729
- };
730
- };
731
- const se_DescribeAttachmentRequest = (input, context) => {
732
- return {
733
- ...(input.attachmentId != null && { attachmentId: input.attachmentId }),
734
- };
735
- };
736
- const se_DescribeCasesRequest = (input, context) => {
737
- return {
738
- ...(input.afterTime != null && { afterTime: input.afterTime }),
739
- ...(input.beforeTime != null && { beforeTime: input.beforeTime }),
740
- ...(input.caseIdList != null && { caseIdList: se_CaseIdList(input.caseIdList, context) }),
741
- ...(input.displayId != null && { displayId: input.displayId }),
742
- ...(input.includeCommunications != null && { includeCommunications: input.includeCommunications }),
743
- ...(input.includeResolvedCases != null && { includeResolvedCases: input.includeResolvedCases }),
744
- ...(input.language != null && { language: input.language }),
745
- ...(input.maxResults != null && { maxResults: input.maxResults }),
746
- ...(input.nextToken != null && { nextToken: input.nextToken }),
747
- };
748
- };
749
- const se_DescribeCommunicationsRequest = (input, context) => {
750
- return {
751
- ...(input.afterTime != null && { afterTime: input.afterTime }),
752
- ...(input.beforeTime != null && { beforeTime: input.beforeTime }),
753
- ...(input.caseId != null && { caseId: input.caseId }),
754
- ...(input.maxResults != null && { maxResults: input.maxResults }),
755
- ...(input.nextToken != null && { nextToken: input.nextToken }),
756
- };
757
- };
758
- const se_DescribeServicesRequest = (input, context) => {
759
- return {
760
- ...(input.language != null && { language: input.language }),
761
- ...(input.serviceCodeList != null && { serviceCodeList: se_ServiceCodeList(input.serviceCodeList, context) }),
762
- };
763
- };
764
- const se_DescribeSeverityLevelsRequest = (input, context) => {
765
- return {
766
- ...(input.language != null && { language: input.language }),
767
- };
768
- };
769
682
  const se_DescribeTrustedAdvisorCheckRefreshStatusesRequest = (input, context) => {
770
- return {
771
- ...(input.checkIds != null && { checkIds: se_StringList(input.checkIds, context) }),
772
- };
773
- };
774
- const se_DescribeTrustedAdvisorCheckResultRequest = (input, context) => {
775
- return {
776
- ...(input.checkId != null && { checkId: input.checkId }),
777
- ...(input.language != null && { language: input.language }),
778
- };
779
- };
780
- const se_DescribeTrustedAdvisorChecksRequest = (input, context) => {
781
- return {
782
- ...(input.language != null && { language: input.language }),
783
- };
683
+ return take(input, {
684
+ checkIds: (_) => se_StringList(_, context),
685
+ });
784
686
  };
785
687
  const se_DescribeTrustedAdvisorCheckSummariesRequest = (input, context) => {
786
- return {
787
- ...(input.checkIds != null && { checkIds: se_StringList(input.checkIds, context) }),
788
- };
789
- };
790
- const se_RefreshTrustedAdvisorCheckRequest = (input, context) => {
791
- return {
792
- ...(input.checkId != null && { checkId: input.checkId }),
793
- };
794
- };
795
- const se_ResolveCaseRequest = (input, context) => {
796
- return {
797
- ...(input.caseId != null && { caseId: input.caseId }),
798
- };
799
- };
800
- const se_ServiceCodeList = (input, context) => {
801
- return input
802
- .filter((e) => e != null)
803
- .map((entry) => {
804
- return entry;
688
+ return take(input, {
689
+ checkIds: (_) => se_StringList(_, context),
805
690
  });
806
691
  };
807
692
  const se_StringList = (input, context) => {
808
- return input.map((entry) => {
809
- if (entry === null) {
810
- return null;
811
- }
812
- return entry;
813
- });
814
- };
815
- const de_AddAttachmentsToSetResponse = (output, context) => {
816
- return {
817
- attachmentSetId: __expectString(output.attachmentSetId),
818
- expiryTime: __expectString(output.expiryTime),
819
- };
820
- };
821
- const de_AddCommunicationToCaseResponse = (output, context) => {
822
- return {
823
- result: __expectBoolean(output.result),
824
- };
693
+ return input;
825
694
  };
826
695
  const de_Attachment = (output, context) => {
827
- return {
828
- data: output.data != null ? context.base64Decoder(output.data) : undefined,
829
- fileName: __expectString(output.fileName),
830
- };
831
- };
832
- const de_AttachmentDetails = (output, context) => {
833
- return {
834
- attachmentId: __expectString(output.attachmentId),
835
- fileName: __expectString(output.fileName),
836
- };
837
- };
838
- const de_AttachmentIdNotFound = (output, context) => {
839
- return {
840
- message: __expectString(output.message),
841
- };
842
- };
843
- const de_AttachmentLimitExceeded = (output, context) => {
844
- return {
845
- message: __expectString(output.message),
846
- };
847
- };
848
- const de_AttachmentSet = (output, context) => {
849
- const retVal = (output || [])
850
- .filter((e) => e != null)
851
- .map((entry) => {
852
- if (entry === null) {
853
- return null;
854
- }
855
- return de_AttachmentDetails(entry, context);
856
- });
857
- return retVal;
858
- };
859
- const de_AttachmentSetExpired = (output, context) => {
860
- return {
861
- message: __expectString(output.message),
862
- };
863
- };
864
- const de_AttachmentSetIdNotFound = (output, context) => {
865
- return {
866
- message: __expectString(output.message),
867
- };
868
- };
869
- const de_AttachmentSetSizeLimitExceeded = (output, context) => {
870
- return {
871
- message: __expectString(output.message),
872
- };
873
- };
874
- const de_CaseCreationLimitExceeded = (output, context) => {
875
- return {
876
- message: __expectString(output.message),
877
- };
878
- };
879
- const de_CaseDetails = (output, context) => {
880
- return {
881
- caseId: __expectString(output.caseId),
882
- categoryCode: __expectString(output.categoryCode),
883
- ccEmailAddresses: output.ccEmailAddresses != null ? de_CcEmailAddressList(output.ccEmailAddresses, context) : undefined,
884
- displayId: __expectString(output.displayId),
885
- language: __expectString(output.language),
886
- recentCommunications: output.recentCommunications != null
887
- ? de_RecentCaseCommunications(output.recentCommunications, context)
888
- : undefined,
889
- serviceCode: __expectString(output.serviceCode),
890
- severityCode: __expectString(output.severityCode),
891
- status: __expectString(output.status),
892
- subject: __expectString(output.subject),
893
- submittedBy: __expectString(output.submittedBy),
894
- timeCreated: __expectString(output.timeCreated),
895
- };
896
- };
897
- const de_CaseIdNotFound = (output, context) => {
898
- return {
899
- message: __expectString(output.message),
900
- };
901
- };
902
- const de_CaseList = (output, context) => {
903
- const retVal = (output || [])
904
- .filter((e) => e != null)
905
- .map((entry) => {
906
- if (entry === null) {
907
- return null;
908
- }
909
- return de_CaseDetails(entry, context);
696
+ return take(output, {
697
+ data: context.base64Decoder,
698
+ fileName: __expectString,
910
699
  });
911
- return retVal;
912
- };
913
- const de_Category = (output, context) => {
914
- return {
915
- code: __expectString(output.code),
916
- name: __expectString(output.name),
917
- };
918
- };
919
- const de_CategoryList = (output, context) => {
920
- const retVal = (output || [])
921
- .filter((e) => e != null)
922
- .map((entry) => {
923
- if (entry === null) {
924
- return null;
925
- }
926
- return de_Category(entry, context);
927
- });
928
- return retVal;
929
- };
930
- const de_CcEmailAddressList = (output, context) => {
931
- const retVal = (output || [])
932
- .filter((e) => e != null)
933
- .map((entry) => {
934
- if (entry === null) {
935
- return null;
936
- }
937
- return __expectString(entry);
938
- });
939
- return retVal;
940
- };
941
- const de_Communication = (output, context) => {
942
- return {
943
- attachmentSet: output.attachmentSet != null ? de_AttachmentSet(output.attachmentSet, context) : undefined,
944
- body: __expectString(output.body),
945
- caseId: __expectString(output.caseId),
946
- submittedBy: __expectString(output.submittedBy),
947
- timeCreated: __expectString(output.timeCreated),
948
- };
949
- };
950
- const de_CommunicationList = (output, context) => {
951
- const retVal = (output || [])
952
- .filter((e) => e != null)
953
- .map((entry) => {
954
- if (entry === null) {
955
- return null;
956
- }
957
- return de_Communication(entry, context);
958
- });
959
- return retVal;
960
- };
961
- const de_CreateCaseResponse = (output, context) => {
962
- return {
963
- caseId: __expectString(output.caseId),
964
- };
965
- };
966
- const de_DescribeAttachmentLimitExceeded = (output, context) => {
967
- return {
968
- message: __expectString(output.message),
969
- };
970
700
  };
971
701
  const de_DescribeAttachmentResponse = (output, context) => {
972
- return {
973
- attachment: output.attachment != null ? de_Attachment(output.attachment, context) : undefined,
974
- };
975
- };
976
- const de_DescribeCasesResponse = (output, context) => {
977
- return {
978
- cases: output.cases != null ? de_CaseList(output.cases, context) : undefined,
979
- nextToken: __expectString(output.nextToken),
980
- };
981
- };
982
- const de_DescribeCommunicationsResponse = (output, context) => {
983
- return {
984
- communications: output.communications != null ? de_CommunicationList(output.communications, context) : undefined,
985
- nextToken: __expectString(output.nextToken),
986
- };
987
- };
988
- const de_DescribeServicesResponse = (output, context) => {
989
- return {
990
- services: output.services != null ? de_ServiceList(output.services, context) : undefined,
991
- };
992
- };
993
- const de_DescribeSeverityLevelsResponse = (output, context) => {
994
- return {
995
- severityLevels: output.severityLevels != null ? de_SeverityLevelsList(output.severityLevels, context) : undefined,
996
- };
997
- };
998
- const de_DescribeTrustedAdvisorCheckRefreshStatusesResponse = (output, context) => {
999
- return {
1000
- statuses: output.statuses != null ? de_TrustedAdvisorCheckRefreshStatusList(output.statuses, context) : undefined,
1001
- };
702
+ return take(output, {
703
+ attachment: (_) => de_Attachment(_, context),
704
+ });
1002
705
  };
1003
706
  const de_DescribeTrustedAdvisorCheckResultResponse = (output, context) => {
1004
- return {
1005
- result: output.result != null ? de_TrustedAdvisorCheckResult(output.result, context) : undefined,
1006
- };
707
+ return take(output, {
708
+ result: (_) => de_TrustedAdvisorCheckResult(_, context),
709
+ });
1007
710
  };
1008
711
  const de_DescribeTrustedAdvisorChecksResponse = (output, context) => {
1009
- return {
1010
- checks: output.checks != null ? de_TrustedAdvisorCheckList(output.checks, context) : undefined,
1011
- };
1012
- };
1013
- const de_DescribeTrustedAdvisorCheckSummariesResponse = (output, context) => {
1014
- return {
1015
- summaries: output.summaries != null ? de_TrustedAdvisorCheckSummaryList(output.summaries, context) : undefined,
1016
- };
1017
- };
1018
- const de_InternalServerError = (output, context) => {
1019
- return {
1020
- message: __expectString(output.message),
1021
- };
1022
- };
1023
- const de_RecentCaseCommunications = (output, context) => {
1024
- return {
1025
- communications: output.communications != null ? de_CommunicationList(output.communications, context) : undefined,
1026
- nextToken: __expectString(output.nextToken),
1027
- };
1028
- };
1029
- const de_RefreshTrustedAdvisorCheckResponse = (output, context) => {
1030
- return {
1031
- status: output.status != null ? de_TrustedAdvisorCheckRefreshStatus(output.status, context) : undefined,
1032
- };
1033
- };
1034
- const de_ResolveCaseResponse = (output, context) => {
1035
- return {
1036
- finalCaseStatus: __expectString(output.finalCaseStatus),
1037
- initialCaseStatus: __expectString(output.initialCaseStatus),
1038
- };
1039
- };
1040
- const de_Service = (output, context) => {
1041
- return {
1042
- categories: output.categories != null ? de_CategoryList(output.categories, context) : undefined,
1043
- code: __expectString(output.code),
1044
- name: __expectString(output.name),
1045
- };
1046
- };
1047
- const de_ServiceList = (output, context) => {
1048
- const retVal = (output || [])
1049
- .filter((e) => e != null)
1050
- .map((entry) => {
1051
- if (entry === null) {
1052
- return null;
1053
- }
1054
- return de_Service(entry, context);
712
+ return take(output, {
713
+ checks: (_) => de_TrustedAdvisorCheckList(_, context),
1055
714
  });
1056
- return retVal;
1057
- };
1058
- const de_SeverityLevel = (output, context) => {
1059
- return {
1060
- code: __expectString(output.code),
1061
- name: __expectString(output.name),
1062
- };
1063
715
  };
1064
- const de_SeverityLevelsList = (output, context) => {
1065
- const retVal = (output || [])
1066
- .filter((e) => e != null)
1067
- .map((entry) => {
1068
- if (entry === null) {
1069
- return null;
1070
- }
1071
- return de_SeverityLevel(entry, context);
716
+ const de_DescribeTrustedAdvisorCheckSummariesResponse = (output, context) => {
717
+ return take(output, {
718
+ summaries: (_) => de_TrustedAdvisorCheckSummaryList(_, context),
1072
719
  });
1073
- return retVal;
1074
720
  };
1075
721
  const de_StringList = (output, context) => {
1076
722
  const retVal = (output || []).map((entry) => {
@@ -1082,121 +728,78 @@ const de_StringList = (output, context) => {
1082
728
  return retVal;
1083
729
  };
1084
730
  const de_TrustedAdvisorCategorySpecificSummary = (output, context) => {
1085
- return {
1086
- costOptimizing: output.costOptimizing != null
1087
- ? de_TrustedAdvisorCostOptimizingSummary(output.costOptimizing, context)
1088
- : undefined,
1089
- };
731
+ return take(output, {
732
+ costOptimizing: (_) => de_TrustedAdvisorCostOptimizingSummary(_, context),
733
+ });
1090
734
  };
1091
735
  const de_TrustedAdvisorCheckDescription = (output, context) => {
1092
- return {
1093
- category: __expectString(output.category),
1094
- description: __expectString(output.description),
1095
- id: __expectString(output.id),
1096
- metadata: output.metadata != null ? de_StringList(output.metadata, context) : undefined,
1097
- name: __expectString(output.name),
1098
- };
736
+ return take(output, {
737
+ category: __expectString,
738
+ description: __expectString,
739
+ id: __expectString,
740
+ metadata: (_) => de_StringList(_, context),
741
+ name: __expectString,
742
+ });
1099
743
  };
1100
744
  const de_TrustedAdvisorCheckList = (output, context) => {
1101
745
  const retVal = (output || [])
1102
746
  .filter((e) => e != null)
1103
747
  .map((entry) => {
1104
- if (entry === null) {
1105
- return null;
1106
- }
1107
748
  return de_TrustedAdvisorCheckDescription(entry, context);
1108
749
  });
1109
750
  return retVal;
1110
751
  };
1111
- const de_TrustedAdvisorCheckRefreshStatus = (output, context) => {
1112
- return {
1113
- checkId: __expectString(output.checkId),
1114
- millisUntilNextRefreshable: __expectLong(output.millisUntilNextRefreshable),
1115
- status: __expectString(output.status),
1116
- };
1117
- };
1118
- const de_TrustedAdvisorCheckRefreshStatusList = (output, context) => {
1119
- const retVal = (output || [])
1120
- .filter((e) => e != null)
1121
- .map((entry) => {
1122
- if (entry === null) {
1123
- return null;
1124
- }
1125
- return de_TrustedAdvisorCheckRefreshStatus(entry, context);
1126
- });
1127
- return retVal;
1128
- };
1129
752
  const de_TrustedAdvisorCheckResult = (output, context) => {
1130
- return {
1131
- categorySpecificSummary: output.categorySpecificSummary != null
1132
- ? de_TrustedAdvisorCategorySpecificSummary(output.categorySpecificSummary, context)
1133
- : undefined,
1134
- checkId: __expectString(output.checkId),
1135
- flaggedResources: output.flaggedResources != null
1136
- ? de_TrustedAdvisorResourceDetailList(output.flaggedResources, context)
1137
- : undefined,
1138
- resourcesSummary: output.resourcesSummary != null ? de_TrustedAdvisorResourcesSummary(output.resourcesSummary, context) : undefined,
1139
- status: __expectString(output.status),
1140
- timestamp: __expectString(output.timestamp),
1141
- };
753
+ return take(output, {
754
+ categorySpecificSummary: (_) => de_TrustedAdvisorCategorySpecificSummary(_, context),
755
+ checkId: __expectString,
756
+ flaggedResources: (_) => de_TrustedAdvisorResourceDetailList(_, context),
757
+ resourcesSummary: _json,
758
+ status: __expectString,
759
+ timestamp: __expectString,
760
+ });
1142
761
  };
1143
762
  const de_TrustedAdvisorCheckSummary = (output, context) => {
1144
- return {
1145
- categorySpecificSummary: output.categorySpecificSummary != null
1146
- ? de_TrustedAdvisorCategorySpecificSummary(output.categorySpecificSummary, context)
1147
- : undefined,
1148
- checkId: __expectString(output.checkId),
1149
- hasFlaggedResources: __expectBoolean(output.hasFlaggedResources),
1150
- resourcesSummary: output.resourcesSummary != null ? de_TrustedAdvisorResourcesSummary(output.resourcesSummary, context) : undefined,
1151
- status: __expectString(output.status),
1152
- timestamp: __expectString(output.timestamp),
1153
- };
763
+ return take(output, {
764
+ categorySpecificSummary: (_) => de_TrustedAdvisorCategorySpecificSummary(_, context),
765
+ checkId: __expectString,
766
+ hasFlaggedResources: __expectBoolean,
767
+ resourcesSummary: _json,
768
+ status: __expectString,
769
+ timestamp: __expectString,
770
+ });
1154
771
  };
1155
772
  const de_TrustedAdvisorCheckSummaryList = (output, context) => {
1156
773
  const retVal = (output || [])
1157
774
  .filter((e) => e != null)
1158
775
  .map((entry) => {
1159
- if (entry === null) {
1160
- return null;
1161
- }
1162
776
  return de_TrustedAdvisorCheckSummary(entry, context);
1163
777
  });
1164
778
  return retVal;
1165
779
  };
1166
780
  const de_TrustedAdvisorCostOptimizingSummary = (output, context) => {
1167
- return {
1168
- estimatedMonthlySavings: __limitedParseDouble(output.estimatedMonthlySavings),
1169
- estimatedPercentMonthlySavings: __limitedParseDouble(output.estimatedPercentMonthlySavings),
1170
- };
781
+ return take(output, {
782
+ estimatedMonthlySavings: __limitedParseDouble,
783
+ estimatedPercentMonthlySavings: __limitedParseDouble,
784
+ });
1171
785
  };
1172
786
  const de_TrustedAdvisorResourceDetail = (output, context) => {
1173
- return {
1174
- isSuppressed: __expectBoolean(output.isSuppressed),
1175
- metadata: output.metadata != null ? de_StringList(output.metadata, context) : undefined,
1176
- region: __expectString(output.region),
1177
- resourceId: __expectString(output.resourceId),
1178
- status: __expectString(output.status),
1179
- };
787
+ return take(output, {
788
+ isSuppressed: __expectBoolean,
789
+ metadata: (_) => de_StringList(_, context),
790
+ region: __expectString,
791
+ resourceId: __expectString,
792
+ status: __expectString,
793
+ });
1180
794
  };
1181
795
  const de_TrustedAdvisorResourceDetailList = (output, context) => {
1182
796
  const retVal = (output || [])
1183
797
  .filter((e) => e != null)
1184
798
  .map((entry) => {
1185
- if (entry === null) {
1186
- return null;
1187
- }
1188
799
  return de_TrustedAdvisorResourceDetail(entry, context);
1189
800
  });
1190
801
  return retVal;
1191
802
  };
1192
- const de_TrustedAdvisorResourcesSummary = (output, context) => {
1193
- return {
1194
- resourcesFlagged: __expectLong(output.resourcesFlagged),
1195
- resourcesIgnored: __expectLong(output.resourcesIgnored),
1196
- resourcesProcessed: __expectLong(output.resourcesProcessed),
1197
- resourcesSuppressed: __expectLong(output.resourcesSuppressed),
1198
- };
1199
- };
1200
803
  const deserializeMetadata = (output) => ({
1201
804
  httpStatusCode: output.statusCode,
1202
805
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1210,6 +813,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1210
813
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1211
814
  };
1212
815
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
816
+ const throwDefaultError = withBaseException(__BaseException);
1213
817
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1214
818
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1215
819
  const contents = {