@aws-sdk/client-connectcampaigns 3.312.0 → 3.315.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/protocols/Aws_restJson1.js +197 -409
- package/dist-es/protocols/Aws_restJson1.js +166 -378
- package/package.json +6 -6
|
@@ -12,15 +12,13 @@ const se_CreateCampaignCommand = async (input, context) => {
|
|
|
12
12
|
};
|
|
13
13
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns";
|
|
14
14
|
let body;
|
|
15
|
-
body = JSON.stringify({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
|
|
23
|
-
});
|
|
15
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
+
connectInstanceId: [],
|
|
17
|
+
dialerConfig: (_) => se_DialerConfig(_, context),
|
|
18
|
+
name: [],
|
|
19
|
+
outboundCallConfig: (_) => (0, smithy_client_1._json)(_),
|
|
20
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
21
|
+
}));
|
|
24
22
|
return new protocol_http_1.HttpRequest({
|
|
25
23
|
protocol,
|
|
26
24
|
hostname,
|
|
@@ -126,9 +124,9 @@ const se_GetCampaignStateBatchCommand = async (input, context) => {
|
|
|
126
124
|
};
|
|
127
125
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-state";
|
|
128
126
|
let body;
|
|
129
|
-
body = JSON.stringify({
|
|
130
|
-
|
|
131
|
-
});
|
|
127
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
128
|
+
campaignIds: (_) => (0, smithy_client_1._json)(_),
|
|
129
|
+
}));
|
|
132
130
|
return new protocol_http_1.HttpRequest({
|
|
133
131
|
protocol,
|
|
134
132
|
hostname,
|
|
@@ -183,11 +181,11 @@ const se_ListCampaignsCommand = async (input, context) => {
|
|
|
183
181
|
};
|
|
184
182
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-summary";
|
|
185
183
|
let body;
|
|
186
|
-
body = JSON.stringify({
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
});
|
|
184
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
185
|
+
filters: (_) => (0, smithy_client_1._json)(_),
|
|
186
|
+
maxResults: [],
|
|
187
|
+
nextToken: [],
|
|
188
|
+
}));
|
|
191
189
|
return new protocol_http_1.HttpRequest({
|
|
192
190
|
protocol,
|
|
193
191
|
hostname,
|
|
@@ -241,9 +239,9 @@ const se_PutDialRequestBatchCommand = async (input, context) => {
|
|
|
241
239
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/dial-requests";
|
|
242
240
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
243
241
|
let body;
|
|
244
|
-
body = JSON.stringify({
|
|
245
|
-
|
|
246
|
-
});
|
|
242
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
243
|
+
dialRequests: (_) => se_DialRequestList(_, context),
|
|
244
|
+
}));
|
|
247
245
|
return new protocol_http_1.HttpRequest({
|
|
248
246
|
protocol,
|
|
249
247
|
hostname,
|
|
@@ -298,9 +296,9 @@ const se_StartInstanceOnboardingJobCommand = async (input, context) => {
|
|
|
298
296
|
"/connect-instance/{connectInstanceId}/onboarding";
|
|
299
297
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
|
|
300
298
|
let body;
|
|
301
|
-
body = JSON.stringify({
|
|
302
|
-
|
|
303
|
-
});
|
|
299
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
300
|
+
encryptionConfig: (_) => (0, smithy_client_1._json)(_),
|
|
301
|
+
}));
|
|
304
302
|
return new protocol_http_1.HttpRequest({
|
|
305
303
|
protocol,
|
|
306
304
|
hostname,
|
|
@@ -337,9 +335,9 @@ const se_TagResourceCommand = async (input, context) => {
|
|
|
337
335
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
|
|
338
336
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
|
|
339
337
|
let body;
|
|
340
|
-
body = JSON.stringify({
|
|
341
|
-
|
|
342
|
-
});
|
|
338
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
339
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
340
|
+
}));
|
|
343
341
|
return new protocol_http_1.HttpRequest({
|
|
344
342
|
protocol,
|
|
345
343
|
hostname,
|
|
@@ -356,7 +354,7 @@ const se_UntagResourceCommand = async (input, context) => {
|
|
|
356
354
|
const headers = {};
|
|
357
355
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
|
|
358
356
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
|
|
359
|
-
const query = map({
|
|
357
|
+
const query = (0, smithy_client_1.map)({
|
|
360
358
|
tagKeys: [
|
|
361
359
|
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
362
360
|
() => (input.tagKeys || []).map((_entry) => _entry),
|
|
@@ -383,9 +381,9 @@ const se_UpdateCampaignDialerConfigCommand = async (input, context) => {
|
|
|
383
381
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/dialer-config";
|
|
384
382
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
385
383
|
let body;
|
|
386
|
-
body = JSON.stringify({
|
|
387
|
-
|
|
388
|
-
});
|
|
384
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
385
|
+
dialerConfig: (_) => se_DialerConfig(_, context),
|
|
386
|
+
}));
|
|
389
387
|
return new protocol_http_1.HttpRequest({
|
|
390
388
|
protocol,
|
|
391
389
|
hostname,
|
|
@@ -405,9 +403,9 @@ const se_UpdateCampaignNameCommand = async (input, context) => {
|
|
|
405
403
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/name";
|
|
406
404
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
407
405
|
let body;
|
|
408
|
-
body = JSON.stringify({
|
|
409
|
-
|
|
410
|
-
});
|
|
406
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
407
|
+
name: [],
|
|
408
|
+
}));
|
|
411
409
|
return new protocol_http_1.HttpRequest({
|
|
412
410
|
protocol,
|
|
413
411
|
hostname,
|
|
@@ -427,13 +425,11 @@ const se_UpdateCampaignOutboundCallConfigCommand = async (input, context) => {
|
|
|
427
425
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/outbound-call-config";
|
|
428
426
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
429
427
|
let body;
|
|
430
|
-
body = JSON.stringify({
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
...(input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }),
|
|
436
|
-
});
|
|
428
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
429
|
+
answerMachineDetectionConfig: (_) => (0, smithy_client_1._json)(_),
|
|
430
|
+
connectContactFlowId: [],
|
|
431
|
+
connectSourcePhoneNumber: [],
|
|
432
|
+
}));
|
|
437
433
|
return new protocol_http_1.HttpRequest({
|
|
438
434
|
protocol,
|
|
439
435
|
hostname,
|
|
@@ -449,19 +445,16 @@ const de_CreateCampaignCommand = async (output, context) => {
|
|
|
449
445
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
450
446
|
return de_CreateCampaignCommandError(output, context);
|
|
451
447
|
}
|
|
452
|
-
const contents = map({
|
|
448
|
+
const contents = (0, smithy_client_1.map)({
|
|
453
449
|
$metadata: deserializeMetadata(output),
|
|
454
450
|
});
|
|
455
451
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
if (data.tags != null) {
|
|
463
|
-
contents.tags = de_TagMap(data.tags, context);
|
|
464
|
-
}
|
|
452
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
453
|
+
arn: smithy_client_1.expectString,
|
|
454
|
+
id: smithy_client_1.expectString,
|
|
455
|
+
tags: smithy_client_1._json,
|
|
456
|
+
});
|
|
457
|
+
Object.assign(contents, doc);
|
|
465
458
|
return contents;
|
|
466
459
|
};
|
|
467
460
|
exports.de_CreateCampaignCommand = de_CreateCampaignCommand;
|
|
@@ -495,10 +488,9 @@ const de_CreateCampaignCommandError = async (output, context) => {
|
|
|
495
488
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
496
489
|
default:
|
|
497
490
|
const parsedBody = parsedOutput.body;
|
|
498
|
-
|
|
491
|
+
return throwDefaultError({
|
|
499
492
|
output,
|
|
500
493
|
parsedBody,
|
|
501
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
502
494
|
errorCode,
|
|
503
495
|
});
|
|
504
496
|
}
|
|
@@ -507,7 +499,7 @@ const de_DeleteCampaignCommand = async (output, context) => {
|
|
|
507
499
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
508
500
|
return de_DeleteCampaignCommandError(output, context);
|
|
509
501
|
}
|
|
510
|
-
const contents = map({
|
|
502
|
+
const contents = (0, smithy_client_1.map)({
|
|
511
503
|
$metadata: deserializeMetadata(output),
|
|
512
504
|
});
|
|
513
505
|
await collectBody(output.body, context);
|
|
@@ -535,10 +527,9 @@ const de_DeleteCampaignCommandError = async (output, context) => {
|
|
|
535
527
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
536
528
|
default:
|
|
537
529
|
const parsedBody = parsedOutput.body;
|
|
538
|
-
|
|
530
|
+
return throwDefaultError({
|
|
539
531
|
output,
|
|
540
532
|
parsedBody,
|
|
541
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
542
533
|
errorCode,
|
|
543
534
|
});
|
|
544
535
|
}
|
|
@@ -547,7 +538,7 @@ const de_DeleteConnectInstanceConfigCommand = async (output, context) => {
|
|
|
547
538
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
548
539
|
return de_DeleteConnectInstanceConfigCommandError(output, context);
|
|
549
540
|
}
|
|
550
|
-
const contents = map({
|
|
541
|
+
const contents = (0, smithy_client_1.map)({
|
|
551
542
|
$metadata: deserializeMetadata(output),
|
|
552
543
|
});
|
|
553
544
|
await collectBody(output.body, context);
|
|
@@ -581,10 +572,9 @@ const de_DeleteConnectInstanceConfigCommandError = async (output, context) => {
|
|
|
581
572
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
582
573
|
default:
|
|
583
574
|
const parsedBody = parsedOutput.body;
|
|
584
|
-
|
|
575
|
+
return throwDefaultError({
|
|
585
576
|
output,
|
|
586
577
|
parsedBody,
|
|
587
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
588
578
|
errorCode,
|
|
589
579
|
});
|
|
590
580
|
}
|
|
@@ -593,7 +583,7 @@ const de_DeleteInstanceOnboardingJobCommand = async (output, context) => {
|
|
|
593
583
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
594
584
|
return de_DeleteInstanceOnboardingJobCommandError(output, context);
|
|
595
585
|
}
|
|
596
|
-
const contents = map({
|
|
586
|
+
const contents = (0, smithy_client_1.map)({
|
|
597
587
|
$metadata: deserializeMetadata(output),
|
|
598
588
|
});
|
|
599
589
|
await collectBody(output.body, context);
|
|
@@ -624,10 +614,9 @@ const de_DeleteInstanceOnboardingJobCommandError = async (output, context) => {
|
|
|
624
614
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
625
615
|
default:
|
|
626
616
|
const parsedBody = parsedOutput.body;
|
|
627
|
-
|
|
617
|
+
return throwDefaultError({
|
|
628
618
|
output,
|
|
629
619
|
parsedBody,
|
|
630
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
631
620
|
errorCode,
|
|
632
621
|
});
|
|
633
622
|
}
|
|
@@ -636,13 +625,14 @@ const de_DescribeCampaignCommand = async (output, context) => {
|
|
|
636
625
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
637
626
|
return de_DescribeCampaignCommandError(output, context);
|
|
638
627
|
}
|
|
639
|
-
const contents = map({
|
|
628
|
+
const contents = (0, smithy_client_1.map)({
|
|
640
629
|
$metadata: deserializeMetadata(output),
|
|
641
630
|
});
|
|
642
631
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
}
|
|
632
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
633
|
+
campaign: (_) => de_Campaign(_, context),
|
|
634
|
+
});
|
|
635
|
+
Object.assign(contents, doc);
|
|
646
636
|
return contents;
|
|
647
637
|
};
|
|
648
638
|
exports.de_DescribeCampaignCommand = de_DescribeCampaignCommand;
|
|
@@ -667,10 +657,9 @@ const de_DescribeCampaignCommandError = async (output, context) => {
|
|
|
667
657
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
668
658
|
default:
|
|
669
659
|
const parsedBody = parsedOutput.body;
|
|
670
|
-
|
|
660
|
+
return throwDefaultError({
|
|
671
661
|
output,
|
|
672
662
|
parsedBody,
|
|
673
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
674
663
|
errorCode,
|
|
675
664
|
});
|
|
676
665
|
}
|
|
@@ -679,13 +668,14 @@ const de_GetCampaignStateCommand = async (output, context) => {
|
|
|
679
668
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
680
669
|
return de_GetCampaignStateCommandError(output, context);
|
|
681
670
|
}
|
|
682
|
-
const contents = map({
|
|
671
|
+
const contents = (0, smithy_client_1.map)({
|
|
683
672
|
$metadata: deserializeMetadata(output),
|
|
684
673
|
});
|
|
685
674
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
}
|
|
675
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
676
|
+
state: smithy_client_1.expectString,
|
|
677
|
+
});
|
|
678
|
+
Object.assign(contents, doc);
|
|
689
679
|
return contents;
|
|
690
680
|
};
|
|
691
681
|
exports.de_GetCampaignStateCommand = de_GetCampaignStateCommand;
|
|
@@ -713,10 +703,9 @@ const de_GetCampaignStateCommandError = async (output, context) => {
|
|
|
713
703
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
714
704
|
default:
|
|
715
705
|
const parsedBody = parsedOutput.body;
|
|
716
|
-
|
|
706
|
+
return throwDefaultError({
|
|
717
707
|
output,
|
|
718
708
|
parsedBody,
|
|
719
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
720
709
|
errorCode,
|
|
721
710
|
});
|
|
722
711
|
}
|
|
@@ -725,16 +714,15 @@ const de_GetCampaignStateBatchCommand = async (output, context) => {
|
|
|
725
714
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
726
715
|
return de_GetCampaignStateBatchCommandError(output, context);
|
|
727
716
|
}
|
|
728
|
-
const contents = map({
|
|
717
|
+
const contents = (0, smithy_client_1.map)({
|
|
729
718
|
$metadata: deserializeMetadata(output),
|
|
730
719
|
});
|
|
731
720
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
}
|
|
721
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
722
|
+
failedRequests: smithy_client_1._json,
|
|
723
|
+
successfulRequests: smithy_client_1._json,
|
|
724
|
+
});
|
|
725
|
+
Object.assign(contents, doc);
|
|
738
726
|
return contents;
|
|
739
727
|
};
|
|
740
728
|
exports.de_GetCampaignStateBatchCommand = de_GetCampaignStateBatchCommand;
|
|
@@ -759,10 +747,9 @@ const de_GetCampaignStateBatchCommandError = async (output, context) => {
|
|
|
759
747
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
760
748
|
default:
|
|
761
749
|
const parsedBody = parsedOutput.body;
|
|
762
|
-
|
|
750
|
+
return throwDefaultError({
|
|
763
751
|
output,
|
|
764
752
|
parsedBody,
|
|
765
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
766
753
|
errorCode,
|
|
767
754
|
});
|
|
768
755
|
}
|
|
@@ -771,13 +758,14 @@ const de_GetConnectInstanceConfigCommand = async (output, context) => {
|
|
|
771
758
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
772
759
|
return de_GetConnectInstanceConfigCommandError(output, context);
|
|
773
760
|
}
|
|
774
|
-
const contents = map({
|
|
761
|
+
const contents = (0, smithy_client_1.map)({
|
|
775
762
|
$metadata: deserializeMetadata(output),
|
|
776
763
|
});
|
|
777
764
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
}
|
|
765
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
766
|
+
connectInstanceConfig: smithy_client_1._json,
|
|
767
|
+
});
|
|
768
|
+
Object.assign(contents, doc);
|
|
781
769
|
return contents;
|
|
782
770
|
};
|
|
783
771
|
exports.de_GetConnectInstanceConfigCommand = de_GetConnectInstanceConfigCommand;
|
|
@@ -802,10 +790,9 @@ const de_GetConnectInstanceConfigCommandError = async (output, context) => {
|
|
|
802
790
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
803
791
|
default:
|
|
804
792
|
const parsedBody = parsedOutput.body;
|
|
805
|
-
|
|
793
|
+
return throwDefaultError({
|
|
806
794
|
output,
|
|
807
795
|
parsedBody,
|
|
808
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
809
796
|
errorCode,
|
|
810
797
|
});
|
|
811
798
|
}
|
|
@@ -814,13 +801,14 @@ const de_GetInstanceOnboardingJobStatusCommand = async (output, context) => {
|
|
|
814
801
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
815
802
|
return de_GetInstanceOnboardingJobStatusCommandError(output, context);
|
|
816
803
|
}
|
|
817
|
-
const contents = map({
|
|
804
|
+
const contents = (0, smithy_client_1.map)({
|
|
818
805
|
$metadata: deserializeMetadata(output),
|
|
819
806
|
});
|
|
820
807
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
}
|
|
808
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
809
|
+
connectInstanceOnboardingJobStatus: smithy_client_1._json,
|
|
810
|
+
});
|
|
811
|
+
Object.assign(contents, doc);
|
|
824
812
|
return contents;
|
|
825
813
|
};
|
|
826
814
|
exports.de_GetInstanceOnboardingJobStatusCommand = de_GetInstanceOnboardingJobStatusCommand;
|
|
@@ -845,10 +833,9 @@ const de_GetInstanceOnboardingJobStatusCommandError = async (output, context) =>
|
|
|
845
833
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
846
834
|
default:
|
|
847
835
|
const parsedBody = parsedOutput.body;
|
|
848
|
-
|
|
836
|
+
return throwDefaultError({
|
|
849
837
|
output,
|
|
850
838
|
parsedBody,
|
|
851
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
852
839
|
errorCode,
|
|
853
840
|
});
|
|
854
841
|
}
|
|
@@ -857,16 +844,15 @@ const de_ListCampaignsCommand = async (output, context) => {
|
|
|
857
844
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
858
845
|
return de_ListCampaignsCommandError(output, context);
|
|
859
846
|
}
|
|
860
|
-
const contents = map({
|
|
847
|
+
const contents = (0, smithy_client_1.map)({
|
|
861
848
|
$metadata: deserializeMetadata(output),
|
|
862
849
|
});
|
|
863
850
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
}
|
|
851
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
852
|
+
campaignSummaryList: smithy_client_1._json,
|
|
853
|
+
nextToken: smithy_client_1.expectString,
|
|
854
|
+
});
|
|
855
|
+
Object.assign(contents, doc);
|
|
870
856
|
return contents;
|
|
871
857
|
};
|
|
872
858
|
exports.de_ListCampaignsCommand = de_ListCampaignsCommand;
|
|
@@ -888,10 +874,9 @@ const de_ListCampaignsCommandError = async (output, context) => {
|
|
|
888
874
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
889
875
|
default:
|
|
890
876
|
const parsedBody = parsedOutput.body;
|
|
891
|
-
|
|
877
|
+
return throwDefaultError({
|
|
892
878
|
output,
|
|
893
879
|
parsedBody,
|
|
894
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
895
880
|
errorCode,
|
|
896
881
|
});
|
|
897
882
|
}
|
|
@@ -900,13 +885,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
900
885
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
901
886
|
return de_ListTagsForResourceCommandError(output, context);
|
|
902
887
|
}
|
|
903
|
-
const contents = map({
|
|
888
|
+
const contents = (0, smithy_client_1.map)({
|
|
904
889
|
$metadata: deserializeMetadata(output),
|
|
905
890
|
});
|
|
906
891
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
}
|
|
892
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
893
|
+
tags: smithy_client_1._json,
|
|
894
|
+
});
|
|
895
|
+
Object.assign(contents, doc);
|
|
910
896
|
return contents;
|
|
911
897
|
};
|
|
912
898
|
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
@@ -934,10 +920,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
|
934
920
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
935
921
|
default:
|
|
936
922
|
const parsedBody = parsedOutput.body;
|
|
937
|
-
|
|
923
|
+
return throwDefaultError({
|
|
938
924
|
output,
|
|
939
925
|
parsedBody,
|
|
940
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
941
926
|
errorCode,
|
|
942
927
|
});
|
|
943
928
|
}
|
|
@@ -946,7 +931,7 @@ const de_PauseCampaignCommand = async (output, context) => {
|
|
|
946
931
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
947
932
|
return de_PauseCampaignCommandError(output, context);
|
|
948
933
|
}
|
|
949
|
-
const contents = map({
|
|
934
|
+
const contents = (0, smithy_client_1.map)({
|
|
950
935
|
$metadata: deserializeMetadata(output),
|
|
951
936
|
});
|
|
952
937
|
await collectBody(output.body, context);
|
|
@@ -983,10 +968,9 @@ const de_PauseCampaignCommandError = async (output, context) => {
|
|
|
983
968
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
984
969
|
default:
|
|
985
970
|
const parsedBody = parsedOutput.body;
|
|
986
|
-
|
|
971
|
+
return throwDefaultError({
|
|
987
972
|
output,
|
|
988
973
|
parsedBody,
|
|
989
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
990
974
|
errorCode,
|
|
991
975
|
});
|
|
992
976
|
}
|
|
@@ -995,16 +979,15 @@ const de_PutDialRequestBatchCommand = async (output, context) => {
|
|
|
995
979
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
996
980
|
return de_PutDialRequestBatchCommandError(output, context);
|
|
997
981
|
}
|
|
998
|
-
const contents = map({
|
|
982
|
+
const contents = (0, smithy_client_1.map)({
|
|
999
983
|
$metadata: deserializeMetadata(output),
|
|
1000
984
|
});
|
|
1001
985
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
}
|
|
986
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
987
|
+
failedRequests: smithy_client_1._json,
|
|
988
|
+
successfulRequests: smithy_client_1._json,
|
|
989
|
+
});
|
|
990
|
+
Object.assign(contents, doc);
|
|
1008
991
|
return contents;
|
|
1009
992
|
};
|
|
1010
993
|
exports.de_PutDialRequestBatchCommand = de_PutDialRequestBatchCommand;
|
|
@@ -1038,10 +1021,9 @@ const de_PutDialRequestBatchCommandError = async (output, context) => {
|
|
|
1038
1021
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1039
1022
|
default:
|
|
1040
1023
|
const parsedBody = parsedOutput.body;
|
|
1041
|
-
|
|
1024
|
+
return throwDefaultError({
|
|
1042
1025
|
output,
|
|
1043
1026
|
parsedBody,
|
|
1044
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
1045
1027
|
errorCode,
|
|
1046
1028
|
});
|
|
1047
1029
|
}
|
|
@@ -1050,7 +1032,7 @@ const de_ResumeCampaignCommand = async (output, context) => {
|
|
|
1050
1032
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1051
1033
|
return de_ResumeCampaignCommandError(output, context);
|
|
1052
1034
|
}
|
|
1053
|
-
const contents = map({
|
|
1035
|
+
const contents = (0, smithy_client_1.map)({
|
|
1054
1036
|
$metadata: deserializeMetadata(output),
|
|
1055
1037
|
});
|
|
1056
1038
|
await collectBody(output.body, context);
|
|
@@ -1087,10 +1069,9 @@ const de_ResumeCampaignCommandError = async (output, context) => {
|
|
|
1087
1069
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1088
1070
|
default:
|
|
1089
1071
|
const parsedBody = parsedOutput.body;
|
|
1090
|
-
|
|
1072
|
+
return throwDefaultError({
|
|
1091
1073
|
output,
|
|
1092
1074
|
parsedBody,
|
|
1093
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
1094
1075
|
errorCode,
|
|
1095
1076
|
});
|
|
1096
1077
|
}
|
|
@@ -1099,7 +1080,7 @@ const de_StartCampaignCommand = async (output, context) => {
|
|
|
1099
1080
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1100
1081
|
return de_StartCampaignCommandError(output, context);
|
|
1101
1082
|
}
|
|
1102
|
-
const contents = map({
|
|
1083
|
+
const contents = (0, smithy_client_1.map)({
|
|
1103
1084
|
$metadata: deserializeMetadata(output),
|
|
1104
1085
|
});
|
|
1105
1086
|
await collectBody(output.body, context);
|
|
@@ -1136,10 +1117,9 @@ const de_StartCampaignCommandError = async (output, context) => {
|
|
|
1136
1117
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1137
1118
|
default:
|
|
1138
1119
|
const parsedBody = parsedOutput.body;
|
|
1139
|
-
|
|
1120
|
+
return throwDefaultError({
|
|
1140
1121
|
output,
|
|
1141
1122
|
parsedBody,
|
|
1142
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
1143
1123
|
errorCode,
|
|
1144
1124
|
});
|
|
1145
1125
|
}
|
|
@@ -1148,13 +1128,14 @@ const de_StartInstanceOnboardingJobCommand = async (output, context) => {
|
|
|
1148
1128
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1149
1129
|
return de_StartInstanceOnboardingJobCommandError(output, context);
|
|
1150
1130
|
}
|
|
1151
|
-
const contents = map({
|
|
1131
|
+
const contents = (0, smithy_client_1.map)({
|
|
1152
1132
|
$metadata: deserializeMetadata(output),
|
|
1153
1133
|
});
|
|
1154
1134
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
}
|
|
1135
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1136
|
+
connectInstanceOnboardingJobStatus: smithy_client_1._json,
|
|
1137
|
+
});
|
|
1138
|
+
Object.assign(contents, doc);
|
|
1158
1139
|
return contents;
|
|
1159
1140
|
};
|
|
1160
1141
|
exports.de_StartInstanceOnboardingJobCommand = de_StartInstanceOnboardingJobCommand;
|
|
@@ -1185,10 +1166,9 @@ const de_StartInstanceOnboardingJobCommandError = async (output, context) => {
|
|
|
1185
1166
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1186
1167
|
default:
|
|
1187
1168
|
const parsedBody = parsedOutput.body;
|
|
1188
|
-
|
|
1169
|
+
return throwDefaultError({
|
|
1189
1170
|
output,
|
|
1190
1171
|
parsedBody,
|
|
1191
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
1192
1172
|
errorCode,
|
|
1193
1173
|
});
|
|
1194
1174
|
}
|
|
@@ -1197,7 +1177,7 @@ const de_StopCampaignCommand = async (output, context) => {
|
|
|
1197
1177
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1198
1178
|
return de_StopCampaignCommandError(output, context);
|
|
1199
1179
|
}
|
|
1200
|
-
const contents = map({
|
|
1180
|
+
const contents = (0, smithy_client_1.map)({
|
|
1201
1181
|
$metadata: deserializeMetadata(output),
|
|
1202
1182
|
});
|
|
1203
1183
|
await collectBody(output.body, context);
|
|
@@ -1234,10 +1214,9 @@ const de_StopCampaignCommandError = async (output, context) => {
|
|
|
1234
1214
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1235
1215
|
default:
|
|
1236
1216
|
const parsedBody = parsedOutput.body;
|
|
1237
|
-
|
|
1217
|
+
return throwDefaultError({
|
|
1238
1218
|
output,
|
|
1239
1219
|
parsedBody,
|
|
1240
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
1241
1220
|
errorCode,
|
|
1242
1221
|
});
|
|
1243
1222
|
}
|
|
@@ -1246,7 +1225,7 @@ const de_TagResourceCommand = async (output, context) => {
|
|
|
1246
1225
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1247
1226
|
return de_TagResourceCommandError(output, context);
|
|
1248
1227
|
}
|
|
1249
|
-
const contents = map({
|
|
1228
|
+
const contents = (0, smithy_client_1.map)({
|
|
1250
1229
|
$metadata: deserializeMetadata(output),
|
|
1251
1230
|
});
|
|
1252
1231
|
await collectBody(output.body, context);
|
|
@@ -1277,10 +1256,9 @@ const de_TagResourceCommandError = async (output, context) => {
|
|
|
1277
1256
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1278
1257
|
default:
|
|
1279
1258
|
const parsedBody = parsedOutput.body;
|
|
1280
|
-
|
|
1259
|
+
return throwDefaultError({
|
|
1281
1260
|
output,
|
|
1282
1261
|
parsedBody,
|
|
1283
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
1284
1262
|
errorCode,
|
|
1285
1263
|
});
|
|
1286
1264
|
}
|
|
@@ -1289,7 +1267,7 @@ const de_UntagResourceCommand = async (output, context) => {
|
|
|
1289
1267
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1290
1268
|
return de_UntagResourceCommandError(output, context);
|
|
1291
1269
|
}
|
|
1292
|
-
const contents = map({
|
|
1270
|
+
const contents = (0, smithy_client_1.map)({
|
|
1293
1271
|
$metadata: deserializeMetadata(output),
|
|
1294
1272
|
});
|
|
1295
1273
|
await collectBody(output.body, context);
|
|
@@ -1320,10 +1298,9 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
1320
1298
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1321
1299
|
default:
|
|
1322
1300
|
const parsedBody = parsedOutput.body;
|
|
1323
|
-
|
|
1301
|
+
return throwDefaultError({
|
|
1324
1302
|
output,
|
|
1325
1303
|
parsedBody,
|
|
1326
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
1327
1304
|
errorCode,
|
|
1328
1305
|
});
|
|
1329
1306
|
}
|
|
@@ -1332,7 +1309,7 @@ const de_UpdateCampaignDialerConfigCommand = async (output, context) => {
|
|
|
1332
1309
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1333
1310
|
return de_UpdateCampaignDialerConfigCommandError(output, context);
|
|
1334
1311
|
}
|
|
1335
|
-
const contents = map({
|
|
1312
|
+
const contents = (0, smithy_client_1.map)({
|
|
1336
1313
|
$metadata: deserializeMetadata(output),
|
|
1337
1314
|
});
|
|
1338
1315
|
await collectBody(output.body, context);
|
|
@@ -1363,10 +1340,9 @@ const de_UpdateCampaignDialerConfigCommandError = async (output, context) => {
|
|
|
1363
1340
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1364
1341
|
default:
|
|
1365
1342
|
const parsedBody = parsedOutput.body;
|
|
1366
|
-
|
|
1343
|
+
return throwDefaultError({
|
|
1367
1344
|
output,
|
|
1368
1345
|
parsedBody,
|
|
1369
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
1370
1346
|
errorCode,
|
|
1371
1347
|
});
|
|
1372
1348
|
}
|
|
@@ -1375,7 +1351,7 @@ const de_UpdateCampaignNameCommand = async (output, context) => {
|
|
|
1375
1351
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1376
1352
|
return de_UpdateCampaignNameCommandError(output, context);
|
|
1377
1353
|
}
|
|
1378
|
-
const contents = map({
|
|
1354
|
+
const contents = (0, smithy_client_1.map)({
|
|
1379
1355
|
$metadata: deserializeMetadata(output),
|
|
1380
1356
|
});
|
|
1381
1357
|
await collectBody(output.body, context);
|
|
@@ -1406,10 +1382,9 @@ const de_UpdateCampaignNameCommandError = async (output, context) => {
|
|
|
1406
1382
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1407
1383
|
default:
|
|
1408
1384
|
const parsedBody = parsedOutput.body;
|
|
1409
|
-
|
|
1385
|
+
return throwDefaultError({
|
|
1410
1386
|
output,
|
|
1411
1387
|
parsedBody,
|
|
1412
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
1413
1388
|
errorCode,
|
|
1414
1389
|
});
|
|
1415
1390
|
}
|
|
@@ -1418,7 +1393,7 @@ const de_UpdateCampaignOutboundCallConfigCommand = async (output, context) => {
|
|
|
1418
1393
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1419
1394
|
return de_UpdateCampaignOutboundCallConfigCommandError(output, context);
|
|
1420
1395
|
}
|
|
1421
|
-
const contents = map({
|
|
1396
|
+
const contents = (0, smithy_client_1.map)({
|
|
1422
1397
|
$metadata: deserializeMetadata(output),
|
|
1423
1398
|
});
|
|
1424
1399
|
await collectBody(output.body, context);
|
|
@@ -1452,23 +1427,23 @@ const de_UpdateCampaignOutboundCallConfigCommandError = async (output, context)
|
|
|
1452
1427
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1453
1428
|
default:
|
|
1454
1429
|
const parsedBody = parsedOutput.body;
|
|
1455
|
-
|
|
1430
|
+
return throwDefaultError({
|
|
1456
1431
|
output,
|
|
1457
1432
|
parsedBody,
|
|
1458
|
-
exceptionCtor: ConnectCampaignsServiceException_1.ConnectCampaignsServiceException,
|
|
1459
1433
|
errorCode,
|
|
1460
1434
|
});
|
|
1461
1435
|
}
|
|
1462
1436
|
};
|
|
1463
|
-
const
|
|
1437
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(ConnectCampaignsServiceException_1.ConnectCampaignsServiceException);
|
|
1464
1438
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1465
|
-
const contents = map({
|
|
1439
|
+
const contents = (0, smithy_client_1.map)({
|
|
1466
1440
|
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1467
1441
|
});
|
|
1468
1442
|
const data = parsedOutput.body;
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
}
|
|
1443
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1444
|
+
message: smithy_client_1.expectString,
|
|
1445
|
+
});
|
|
1446
|
+
Object.assign(contents, doc);
|
|
1472
1447
|
const exception = new models_0_1.AccessDeniedException({
|
|
1473
1448
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1474
1449
|
...contents,
|
|
@@ -1476,13 +1451,14 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
1476
1451
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1477
1452
|
};
|
|
1478
1453
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1479
|
-
const contents = map({
|
|
1454
|
+
const contents = (0, smithy_client_1.map)({
|
|
1480
1455
|
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1481
1456
|
});
|
|
1482
1457
|
const data = parsedOutput.body;
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
}
|
|
1458
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1459
|
+
message: smithy_client_1.expectString,
|
|
1460
|
+
});
|
|
1461
|
+
Object.assign(contents, doc);
|
|
1486
1462
|
const exception = new models_0_1.ConflictException({
|
|
1487
1463
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1488
1464
|
...contents,
|
|
@@ -1490,13 +1466,14 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
1490
1466
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1491
1467
|
};
|
|
1492
1468
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1493
|
-
const contents = map({
|
|
1469
|
+
const contents = (0, smithy_client_1.map)({
|
|
1494
1470
|
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1495
1471
|
});
|
|
1496
1472
|
const data = parsedOutput.body;
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
}
|
|
1473
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1474
|
+
message: smithy_client_1.expectString,
|
|
1475
|
+
});
|
|
1476
|
+
Object.assign(contents, doc);
|
|
1500
1477
|
const exception = new models_0_1.InternalServerException({
|
|
1501
1478
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1502
1479
|
...contents,
|
|
@@ -1504,16 +1481,15 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
1504
1481
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1505
1482
|
};
|
|
1506
1483
|
const de_InvalidCampaignStateExceptionRes = async (parsedOutput, context) => {
|
|
1507
|
-
const contents = map({
|
|
1484
|
+
const contents = (0, smithy_client_1.map)({
|
|
1508
1485
|
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1509
1486
|
});
|
|
1510
1487
|
const data = parsedOutput.body;
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
}
|
|
1488
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1489
|
+
message: smithy_client_1.expectString,
|
|
1490
|
+
state: smithy_client_1.expectString,
|
|
1491
|
+
});
|
|
1492
|
+
Object.assign(contents, doc);
|
|
1517
1493
|
const exception = new models_0_1.InvalidCampaignStateException({
|
|
1518
1494
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1519
1495
|
...contents,
|
|
@@ -1521,13 +1497,14 @@ const de_InvalidCampaignStateExceptionRes = async (parsedOutput, context) => {
|
|
|
1521
1497
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1522
1498
|
};
|
|
1523
1499
|
const de_InvalidStateExceptionRes = async (parsedOutput, context) => {
|
|
1524
|
-
const contents = map({
|
|
1500
|
+
const contents = (0, smithy_client_1.map)({
|
|
1525
1501
|
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1526
1502
|
});
|
|
1527
1503
|
const data = parsedOutput.body;
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
}
|
|
1504
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1505
|
+
message: smithy_client_1.expectString,
|
|
1506
|
+
});
|
|
1507
|
+
Object.assign(contents, doc);
|
|
1531
1508
|
const exception = new models_0_1.InvalidStateException({
|
|
1532
1509
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1533
1510
|
...contents,
|
|
@@ -1535,13 +1512,14 @@ const de_InvalidStateExceptionRes = async (parsedOutput, context) => {
|
|
|
1535
1512
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1536
1513
|
};
|
|
1537
1514
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1538
|
-
const contents = map({
|
|
1515
|
+
const contents = (0, smithy_client_1.map)({
|
|
1539
1516
|
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1540
1517
|
});
|
|
1541
1518
|
const data = parsedOutput.body;
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
}
|
|
1519
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1520
|
+
message: smithy_client_1.expectString,
|
|
1521
|
+
});
|
|
1522
|
+
Object.assign(contents, doc);
|
|
1545
1523
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
1546
1524
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1547
1525
|
...contents,
|
|
@@ -1549,13 +1527,14 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
1549
1527
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1550
1528
|
};
|
|
1551
1529
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1552
|
-
const contents = map({
|
|
1530
|
+
const contents = (0, smithy_client_1.map)({
|
|
1553
1531
|
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1554
1532
|
});
|
|
1555
1533
|
const data = parsedOutput.body;
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
}
|
|
1534
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1535
|
+
message: smithy_client_1.expectString,
|
|
1536
|
+
});
|
|
1537
|
+
Object.assign(contents, doc);
|
|
1559
1538
|
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1560
1539
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1561
1540
|
...contents,
|
|
@@ -1563,13 +1542,14 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
1563
1542
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1564
1543
|
};
|
|
1565
1544
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1566
|
-
const contents = map({
|
|
1545
|
+
const contents = (0, smithy_client_1.map)({
|
|
1567
1546
|
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1568
1547
|
});
|
|
1569
1548
|
const data = parsedOutput.body;
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
}
|
|
1549
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1550
|
+
message: smithy_client_1.expectString,
|
|
1551
|
+
});
|
|
1552
|
+
Object.assign(contents, doc);
|
|
1573
1553
|
const exception = new models_0_1.ThrottlingException({
|
|
1574
1554
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1575
1555
|
...contents,
|
|
@@ -1577,47 +1557,20 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
1577
1557
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1578
1558
|
};
|
|
1579
1559
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1580
|
-
const contents = map({
|
|
1560
|
+
const contents = (0, smithy_client_1.map)({
|
|
1581
1561
|
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1582
1562
|
});
|
|
1583
1563
|
const data = parsedOutput.body;
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
}
|
|
1564
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1565
|
+
message: smithy_client_1.expectString,
|
|
1566
|
+
});
|
|
1567
|
+
Object.assign(contents, doc);
|
|
1587
1568
|
const exception = new models_0_1.ValidationException({
|
|
1588
1569
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1589
1570
|
...contents,
|
|
1590
1571
|
});
|
|
1591
1572
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1592
1573
|
};
|
|
1593
|
-
const se_AnswerMachineDetectionConfig = (input, context) => {
|
|
1594
|
-
return {
|
|
1595
|
-
...(input.enableAnswerMachineDetection != null && {
|
|
1596
|
-
enableAnswerMachineDetection: input.enableAnswerMachineDetection,
|
|
1597
|
-
}),
|
|
1598
|
-
};
|
|
1599
|
-
};
|
|
1600
|
-
const se_Attributes = (input, context) => {
|
|
1601
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1602
|
-
if (value === null) {
|
|
1603
|
-
return acc;
|
|
1604
|
-
}
|
|
1605
|
-
acc[key] = value;
|
|
1606
|
-
return acc;
|
|
1607
|
-
}, {});
|
|
1608
|
-
};
|
|
1609
|
-
const se_CampaignFilters = (input, context) => {
|
|
1610
|
-
return {
|
|
1611
|
-
...(input.instanceIdFilter != null && { instanceIdFilter: se_InstanceIdFilter(input.instanceIdFilter, context) }),
|
|
1612
|
-
};
|
|
1613
|
-
};
|
|
1614
|
-
const se_CampaignIdList = (input, context) => {
|
|
1615
|
-
return input
|
|
1616
|
-
.filter((e) => e != null)
|
|
1617
|
-
.map((entry) => {
|
|
1618
|
-
return entry;
|
|
1619
|
-
});
|
|
1620
|
-
};
|
|
1621
1574
|
const se_DialerConfig = (input, context) => {
|
|
1622
1575
|
return models_0_1.DialerConfig.visit(input, {
|
|
1623
1576
|
predictiveDialerConfig: (value) => ({ predictiveDialerConfig: se_PredictiveDialerConfig(value, context) }),
|
|
@@ -1626,12 +1579,12 @@ const se_DialerConfig = (input, context) => {
|
|
|
1626
1579
|
});
|
|
1627
1580
|
};
|
|
1628
1581
|
const se_DialRequest = (input, context) => {
|
|
1629
|
-
return {
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
};
|
|
1582
|
+
return (0, smithy_client_1.take)(input, {
|
|
1583
|
+
attributes: smithy_client_1._json,
|
|
1584
|
+
clientToken: [],
|
|
1585
|
+
expirationTime: (_) => _.toISOString().split(".")[0] + "Z",
|
|
1586
|
+
phoneNumber: [],
|
|
1587
|
+
});
|
|
1635
1588
|
};
|
|
1636
1589
|
const se_DialRequestList = (input, context) => {
|
|
1637
1590
|
return input
|
|
@@ -1640,82 +1593,26 @@ const se_DialRequestList = (input, context) => {
|
|
|
1640
1593
|
return se_DialRequest(entry, context);
|
|
1641
1594
|
});
|
|
1642
1595
|
};
|
|
1643
|
-
const se_EncryptionConfig = (input, context) => {
|
|
1644
|
-
return {
|
|
1645
|
-
...(input.enabled != null && { enabled: input.enabled }),
|
|
1646
|
-
...(input.encryptionType != null && { encryptionType: input.encryptionType }),
|
|
1647
|
-
...(input.keyArn != null && { keyArn: input.keyArn }),
|
|
1648
|
-
};
|
|
1649
|
-
};
|
|
1650
|
-
const se_InstanceIdFilter = (input, context) => {
|
|
1651
|
-
return {
|
|
1652
|
-
...(input.operator != null && { operator: input.operator }),
|
|
1653
|
-
...(input.value != null && { value: input.value }),
|
|
1654
|
-
};
|
|
1655
|
-
};
|
|
1656
|
-
const se_OutboundCallConfig = (input, context) => {
|
|
1657
|
-
return {
|
|
1658
|
-
...(input.answerMachineDetectionConfig != null && {
|
|
1659
|
-
answerMachineDetectionConfig: se_AnswerMachineDetectionConfig(input.answerMachineDetectionConfig, context),
|
|
1660
|
-
}),
|
|
1661
|
-
...(input.connectContactFlowId != null && { connectContactFlowId: input.connectContactFlowId }),
|
|
1662
|
-
...(input.connectQueueId != null && { connectQueueId: input.connectQueueId }),
|
|
1663
|
-
...(input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }),
|
|
1664
|
-
};
|
|
1665
|
-
};
|
|
1666
1596
|
const se_PredictiveDialerConfig = (input, context) => {
|
|
1667
|
-
return {
|
|
1668
|
-
|
|
1669
|
-
};
|
|
1597
|
+
return (0, smithy_client_1.take)(input, {
|
|
1598
|
+
bandwidthAllocation: smithy_client_1.serializeFloat,
|
|
1599
|
+
});
|
|
1670
1600
|
};
|
|
1671
1601
|
const se_ProgressiveDialerConfig = (input, context) => {
|
|
1672
|
-
return {
|
|
1673
|
-
|
|
1674
|
-
};
|
|
1675
|
-
};
|
|
1676
|
-
const se_TagMap = (input, context) => {
|
|
1677
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1678
|
-
if (value === null) {
|
|
1679
|
-
return acc;
|
|
1680
|
-
}
|
|
1681
|
-
acc[key] = value;
|
|
1682
|
-
return acc;
|
|
1683
|
-
}, {});
|
|
1684
|
-
};
|
|
1685
|
-
const de_AnswerMachineDetectionConfig = (output, context) => {
|
|
1686
|
-
return {
|
|
1687
|
-
enableAnswerMachineDetection: (0, smithy_client_1.expectBoolean)(output.enableAnswerMachineDetection),
|
|
1688
|
-
};
|
|
1602
|
+
return (0, smithy_client_1.take)(input, {
|
|
1603
|
+
bandwidthAllocation: smithy_client_1.serializeFloat,
|
|
1604
|
+
});
|
|
1689
1605
|
};
|
|
1690
1606
|
const de_Campaign = (output, context) => {
|
|
1691
|
-
return {
|
|
1692
|
-
arn:
|
|
1693
|
-
connectInstanceId:
|
|
1694
|
-
dialerConfig:
|
|
1695
|
-
id:
|
|
1696
|
-
name:
|
|
1697
|
-
outboundCallConfig:
|
|
1698
|
-
tags:
|
|
1699
|
-
};
|
|
1700
|
-
};
|
|
1701
|
-
const de_CampaignSummary = (output, context) => {
|
|
1702
|
-
return {
|
|
1703
|
-
arn: (0, smithy_client_1.expectString)(output.arn),
|
|
1704
|
-
connectInstanceId: (0, smithy_client_1.expectString)(output.connectInstanceId),
|
|
1705
|
-
id: (0, smithy_client_1.expectString)(output.id),
|
|
1706
|
-
name: (0, smithy_client_1.expectString)(output.name),
|
|
1707
|
-
};
|
|
1708
|
-
};
|
|
1709
|
-
const de_CampaignSummaryList = (output, context) => {
|
|
1710
|
-
const retVal = (output || [])
|
|
1711
|
-
.filter((e) => e != null)
|
|
1712
|
-
.map((entry) => {
|
|
1713
|
-
if (entry === null) {
|
|
1714
|
-
return null;
|
|
1715
|
-
}
|
|
1716
|
-
return de_CampaignSummary(entry, context);
|
|
1607
|
+
return (0, smithy_client_1.take)(output, {
|
|
1608
|
+
arn: smithy_client_1.expectString,
|
|
1609
|
+
connectInstanceId: smithy_client_1.expectString,
|
|
1610
|
+
dialerConfig: (_) => de_DialerConfig((0, smithy_client_1.expectUnion)(_), context),
|
|
1611
|
+
id: smithy_client_1.expectString,
|
|
1612
|
+
name: smithy_client_1.expectString,
|
|
1613
|
+
outboundCallConfig: smithy_client_1._json,
|
|
1614
|
+
tags: smithy_client_1._json,
|
|
1717
1615
|
});
|
|
1718
|
-
return retVal;
|
|
1719
1616
|
};
|
|
1720
1617
|
const de_DialerConfig = (output, context) => {
|
|
1721
1618
|
if (output.predictiveDialerConfig != null) {
|
|
@@ -1730,124 +1627,15 @@ const de_DialerConfig = (output, context) => {
|
|
|
1730
1627
|
}
|
|
1731
1628
|
return { $unknown: Object.entries(output)[0] };
|
|
1732
1629
|
};
|
|
1733
|
-
const de_EncryptionConfig = (output, context) => {
|
|
1734
|
-
return {
|
|
1735
|
-
enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
|
|
1736
|
-
encryptionType: (0, smithy_client_1.expectString)(output.encryptionType),
|
|
1737
|
-
keyArn: (0, smithy_client_1.expectString)(output.keyArn),
|
|
1738
|
-
};
|
|
1739
|
-
};
|
|
1740
|
-
const de_FailedCampaignStateResponse = (output, context) => {
|
|
1741
|
-
return {
|
|
1742
|
-
campaignId: (0, smithy_client_1.expectString)(output.campaignId),
|
|
1743
|
-
failureCode: (0, smithy_client_1.expectString)(output.failureCode),
|
|
1744
|
-
};
|
|
1745
|
-
};
|
|
1746
|
-
const de_FailedCampaignStateResponseList = (output, context) => {
|
|
1747
|
-
const retVal = (output || [])
|
|
1748
|
-
.filter((e) => e != null)
|
|
1749
|
-
.map((entry) => {
|
|
1750
|
-
if (entry === null) {
|
|
1751
|
-
return null;
|
|
1752
|
-
}
|
|
1753
|
-
return de_FailedCampaignStateResponse(entry, context);
|
|
1754
|
-
});
|
|
1755
|
-
return retVal;
|
|
1756
|
-
};
|
|
1757
|
-
const de_FailedRequest = (output, context) => {
|
|
1758
|
-
return {
|
|
1759
|
-
clientToken: (0, smithy_client_1.expectString)(output.clientToken),
|
|
1760
|
-
failureCode: (0, smithy_client_1.expectString)(output.failureCode),
|
|
1761
|
-
id: (0, smithy_client_1.expectString)(output.id),
|
|
1762
|
-
};
|
|
1763
|
-
};
|
|
1764
|
-
const de_FailedRequestList = (output, context) => {
|
|
1765
|
-
const retVal = (output || [])
|
|
1766
|
-
.filter((e) => e != null)
|
|
1767
|
-
.map((entry) => {
|
|
1768
|
-
if (entry === null) {
|
|
1769
|
-
return null;
|
|
1770
|
-
}
|
|
1771
|
-
return de_FailedRequest(entry, context);
|
|
1772
|
-
});
|
|
1773
|
-
return retVal;
|
|
1774
|
-
};
|
|
1775
|
-
const de_InstanceConfig = (output, context) => {
|
|
1776
|
-
return {
|
|
1777
|
-
connectInstanceId: (0, smithy_client_1.expectString)(output.connectInstanceId),
|
|
1778
|
-
encryptionConfig: output.encryptionConfig != null ? de_EncryptionConfig(output.encryptionConfig, context) : undefined,
|
|
1779
|
-
serviceLinkedRoleArn: (0, smithy_client_1.expectString)(output.serviceLinkedRoleArn),
|
|
1780
|
-
};
|
|
1781
|
-
};
|
|
1782
|
-
const de_InstanceOnboardingJobStatus = (output, context) => {
|
|
1783
|
-
return {
|
|
1784
|
-
connectInstanceId: (0, smithy_client_1.expectString)(output.connectInstanceId),
|
|
1785
|
-
failureCode: (0, smithy_client_1.expectString)(output.failureCode),
|
|
1786
|
-
status: (0, smithy_client_1.expectString)(output.status),
|
|
1787
|
-
};
|
|
1788
|
-
};
|
|
1789
|
-
const de_OutboundCallConfig = (output, context) => {
|
|
1790
|
-
return {
|
|
1791
|
-
answerMachineDetectionConfig: output.answerMachineDetectionConfig != null
|
|
1792
|
-
? de_AnswerMachineDetectionConfig(output.answerMachineDetectionConfig, context)
|
|
1793
|
-
: undefined,
|
|
1794
|
-
connectContactFlowId: (0, smithy_client_1.expectString)(output.connectContactFlowId),
|
|
1795
|
-
connectQueueId: (0, smithy_client_1.expectString)(output.connectQueueId),
|
|
1796
|
-
connectSourcePhoneNumber: (0, smithy_client_1.expectString)(output.connectSourcePhoneNumber),
|
|
1797
|
-
};
|
|
1798
|
-
};
|
|
1799
1630
|
const de_PredictiveDialerConfig = (output, context) => {
|
|
1800
|
-
return {
|
|
1801
|
-
bandwidthAllocation:
|
|
1802
|
-
};
|
|
1803
|
-
};
|
|
1804
|
-
const de_ProgressiveDialerConfig = (output, context) => {
|
|
1805
|
-
return {
|
|
1806
|
-
bandwidthAllocation: (0, smithy_client_1.limitedParseDouble)(output.bandwidthAllocation),
|
|
1807
|
-
};
|
|
1808
|
-
};
|
|
1809
|
-
const de_SuccessfulCampaignStateResponse = (output, context) => {
|
|
1810
|
-
return {
|
|
1811
|
-
campaignId: (0, smithy_client_1.expectString)(output.campaignId),
|
|
1812
|
-
state: (0, smithy_client_1.expectString)(output.state),
|
|
1813
|
-
};
|
|
1814
|
-
};
|
|
1815
|
-
const de_SuccessfulCampaignStateResponseList = (output, context) => {
|
|
1816
|
-
const retVal = (output || [])
|
|
1817
|
-
.filter((e) => e != null)
|
|
1818
|
-
.map((entry) => {
|
|
1819
|
-
if (entry === null) {
|
|
1820
|
-
return null;
|
|
1821
|
-
}
|
|
1822
|
-
return de_SuccessfulCampaignStateResponse(entry, context);
|
|
1631
|
+
return (0, smithy_client_1.take)(output, {
|
|
1632
|
+
bandwidthAllocation: smithy_client_1.limitedParseDouble,
|
|
1823
1633
|
});
|
|
1824
|
-
return retVal;
|
|
1825
1634
|
};
|
|
1826
|
-
const
|
|
1827
|
-
return {
|
|
1828
|
-
|
|
1829
|
-
id: (0, smithy_client_1.expectString)(output.id),
|
|
1830
|
-
};
|
|
1831
|
-
};
|
|
1832
|
-
const de_SuccessfulRequestList = (output, context) => {
|
|
1833
|
-
const retVal = (output || [])
|
|
1834
|
-
.filter((e) => e != null)
|
|
1835
|
-
.map((entry) => {
|
|
1836
|
-
if (entry === null) {
|
|
1837
|
-
return null;
|
|
1838
|
-
}
|
|
1839
|
-
return de_SuccessfulRequest(entry, context);
|
|
1635
|
+
const de_ProgressiveDialerConfig = (output, context) => {
|
|
1636
|
+
return (0, smithy_client_1.take)(output, {
|
|
1637
|
+
bandwidthAllocation: smithy_client_1.limitedParseDouble,
|
|
1840
1638
|
});
|
|
1841
|
-
return retVal;
|
|
1842
|
-
};
|
|
1843
|
-
const de_TagMap = (output, context) => {
|
|
1844
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1845
|
-
if (value === null) {
|
|
1846
|
-
return acc;
|
|
1847
|
-
}
|
|
1848
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
1849
|
-
return acc;
|
|
1850
|
-
}, {});
|
|
1851
1639
|
};
|
|
1852
1640
|
const deserializeMetadata = (output) => ({
|
|
1853
1641
|
httpStatusCode: output.statusCode,
|