@aws-sdk/client-wisdom 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 +323 -790
- package/dist-es/protocols/Aws_restJson1.js +279 -746
- package/package.json +6 -6
|
@@ -14,16 +14,14 @@ const se_CreateAssistantCommand = async (input, context) => {
|
|
|
14
14
|
};
|
|
15
15
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants";
|
|
16
16
|
let body;
|
|
17
|
-
body = JSON.stringify({
|
|
18
|
-
clientToken:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
...(input.type != null && { type: input.type }),
|
|
26
|
-
});
|
|
17
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
18
|
+
clientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
19
|
+
description: [],
|
|
20
|
+
name: [],
|
|
21
|
+
serverSideEncryptionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
22
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
23
|
+
type: [],
|
|
24
|
+
}));
|
|
27
25
|
return new protocol_http_1.HttpRequest({
|
|
28
26
|
protocol,
|
|
29
27
|
hostname,
|
|
@@ -43,12 +41,12 @@ const se_CreateAssistantAssociationCommand = async (input, context) => {
|
|
|
43
41
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/associations";
|
|
44
42
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
|
|
45
43
|
let body;
|
|
46
|
-
body = JSON.stringify({
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
clientToken:
|
|
50
|
-
|
|
51
|
-
});
|
|
44
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
45
|
+
association: (_) => (0, smithy_client_1._json)(_),
|
|
46
|
+
associationType: [],
|
|
47
|
+
clientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
48
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
49
|
+
}));
|
|
52
50
|
return new protocol_http_1.HttpRequest({
|
|
53
51
|
protocol,
|
|
54
52
|
hostname,
|
|
@@ -69,15 +67,15 @@ const se_CreateContentCommand = async (input, context) => {
|
|
|
69
67
|
"/knowledgeBases/{knowledgeBaseId}/contents";
|
|
70
68
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
71
69
|
let body;
|
|
72
|
-
body = JSON.stringify({
|
|
73
|
-
clientToken:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
});
|
|
70
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
71
|
+
clientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
72
|
+
metadata: (_) => (0, smithy_client_1._json)(_),
|
|
73
|
+
name: [],
|
|
74
|
+
overrideLinkOutUri: [],
|
|
75
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
76
|
+
title: [],
|
|
77
|
+
uploadId: [],
|
|
78
|
+
}));
|
|
81
79
|
return new protocol_http_1.HttpRequest({
|
|
82
80
|
protocol,
|
|
83
81
|
hostname,
|
|
@@ -96,22 +94,16 @@ const se_CreateKnowledgeBaseCommand = async (input, context) => {
|
|
|
96
94
|
};
|
|
97
95
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases";
|
|
98
96
|
let body;
|
|
99
|
-
body = JSON.stringify({
|
|
100
|
-
clientToken:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}),
|
|
110
|
-
...(input.sourceConfiguration != null && {
|
|
111
|
-
sourceConfiguration: se_SourceConfiguration(input.sourceConfiguration, context),
|
|
112
|
-
}),
|
|
113
|
-
...(input.tags != null && { tags: se_Tags(input.tags, context) }),
|
|
114
|
-
});
|
|
97
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
98
|
+
clientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
99
|
+
description: [],
|
|
100
|
+
knowledgeBaseType: [],
|
|
101
|
+
name: [],
|
|
102
|
+
renderingConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
103
|
+
serverSideEncryptionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
104
|
+
sourceConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
105
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
106
|
+
}));
|
|
115
107
|
return new protocol_http_1.HttpRequest({
|
|
116
108
|
protocol,
|
|
117
109
|
hostname,
|
|
@@ -131,12 +123,12 @@ const se_CreateSessionCommand = async (input, context) => {
|
|
|
131
123
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/sessions";
|
|
132
124
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
|
|
133
125
|
let body;
|
|
134
|
-
body = JSON.stringify({
|
|
135
|
-
clientToken:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
});
|
|
126
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
127
|
+
clientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
128
|
+
description: [],
|
|
129
|
+
name: [],
|
|
130
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
131
|
+
}));
|
|
140
132
|
return new protocol_http_1.HttpRequest({
|
|
141
133
|
protocol,
|
|
142
134
|
hostname,
|
|
@@ -318,7 +310,7 @@ const se_GetRecommendationsCommand = async (input, context) => {
|
|
|
318
310
|
"/assistants/{assistantId}/sessions/{sessionId}/recommendations";
|
|
319
311
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
|
|
320
312
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
|
|
321
|
-
const query = map({
|
|
313
|
+
const query = (0, smithy_client_1.map)({
|
|
322
314
|
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
323
315
|
waitTimeSeconds: [() => input.waitTimeSeconds !== void 0, () => input.waitTimeSeconds.toString()],
|
|
324
316
|
});
|
|
@@ -359,7 +351,7 @@ const se_ListAssistantAssociationsCommand = async (input, context) => {
|
|
|
359
351
|
const headers = {};
|
|
360
352
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/associations";
|
|
361
353
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
|
|
362
|
-
const query = map({
|
|
354
|
+
const query = (0, smithy_client_1.map)({
|
|
363
355
|
nextToken: [, input.nextToken],
|
|
364
356
|
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
365
357
|
});
|
|
@@ -380,7 +372,7 @@ const se_ListAssistantsCommand = async (input, context) => {
|
|
|
380
372
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
381
373
|
const headers = {};
|
|
382
374
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants";
|
|
383
|
-
const query = map({
|
|
375
|
+
const query = (0, smithy_client_1.map)({
|
|
384
376
|
nextToken: [, input.nextToken],
|
|
385
377
|
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
386
378
|
});
|
|
@@ -403,7 +395,7 @@ const se_ListContentsCommand = async (input, context) => {
|
|
|
403
395
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
404
396
|
"/knowledgeBases/{knowledgeBaseId}/contents";
|
|
405
397
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
406
|
-
const query = map({
|
|
398
|
+
const query = (0, smithy_client_1.map)({
|
|
407
399
|
nextToken: [, input.nextToken],
|
|
408
400
|
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
409
401
|
});
|
|
@@ -424,7 +416,7 @@ const se_ListKnowledgeBasesCommand = async (input, context) => {
|
|
|
424
416
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
425
417
|
const headers = {};
|
|
426
418
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases";
|
|
427
|
-
const query = map({
|
|
419
|
+
const query = (0, smithy_client_1.map)({
|
|
428
420
|
nextToken: [, input.nextToken],
|
|
429
421
|
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
430
422
|
});
|
|
@@ -468,11 +460,9 @@ const se_NotifyRecommendationsReceivedCommand = async (input, context) => {
|
|
|
468
460
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
|
|
469
461
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
|
|
470
462
|
let body;
|
|
471
|
-
body = JSON.stringify({
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
}),
|
|
475
|
-
});
|
|
463
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
464
|
+
recommendationIds: (_) => (0, smithy_client_1._json)(_),
|
|
465
|
+
}));
|
|
476
466
|
return new protocol_http_1.HttpRequest({
|
|
477
467
|
protocol,
|
|
478
468
|
hostname,
|
|
@@ -492,11 +482,11 @@ const se_QueryAssistantCommand = async (input, context) => {
|
|
|
492
482
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/query";
|
|
493
483
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
|
|
494
484
|
let body;
|
|
495
|
-
body = JSON.stringify({
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
});
|
|
485
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
486
|
+
maxResults: [],
|
|
487
|
+
nextToken: [],
|
|
488
|
+
queryText: [],
|
|
489
|
+
}));
|
|
500
490
|
return new protocol_http_1.HttpRequest({
|
|
501
491
|
protocol,
|
|
502
492
|
hostname,
|
|
@@ -533,14 +523,14 @@ const se_SearchContentCommand = async (input, context) => {
|
|
|
533
523
|
};
|
|
534
524
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}/search";
|
|
535
525
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
536
|
-
const query = map({
|
|
526
|
+
const query = (0, smithy_client_1.map)({
|
|
537
527
|
nextToken: [, input.nextToken],
|
|
538
528
|
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
539
529
|
});
|
|
540
530
|
let body;
|
|
541
|
-
body = JSON.stringify({
|
|
542
|
-
|
|
543
|
-
});
|
|
531
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
532
|
+
searchExpression: (_) => (0, smithy_client_1._json)(_),
|
|
533
|
+
}));
|
|
544
534
|
return new protocol_http_1.HttpRequest({
|
|
545
535
|
protocol,
|
|
546
536
|
hostname,
|
|
@@ -560,14 +550,14 @@ const se_SearchSessionsCommand = async (input, context) => {
|
|
|
560
550
|
};
|
|
561
551
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/searchSessions";
|
|
562
552
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
|
|
563
|
-
const query = map({
|
|
553
|
+
const query = (0, smithy_client_1.map)({
|
|
564
554
|
nextToken: [, input.nextToken],
|
|
565
555
|
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
566
556
|
});
|
|
567
557
|
let body;
|
|
568
|
-
body = JSON.stringify({
|
|
569
|
-
|
|
570
|
-
});
|
|
558
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
559
|
+
searchExpression: (_) => (0, smithy_client_1._json)(_),
|
|
560
|
+
}));
|
|
571
561
|
return new protocol_http_1.HttpRequest({
|
|
572
562
|
protocol,
|
|
573
563
|
hostname,
|
|
@@ -588,9 +578,9 @@ const se_StartContentUploadCommand = async (input, context) => {
|
|
|
588
578
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}/upload";
|
|
589
579
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
590
580
|
let body;
|
|
591
|
-
body = JSON.stringify({
|
|
592
|
-
|
|
593
|
-
});
|
|
581
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
582
|
+
contentType: [],
|
|
583
|
+
}));
|
|
594
584
|
return new protocol_http_1.HttpRequest({
|
|
595
585
|
protocol,
|
|
596
586
|
hostname,
|
|
@@ -610,9 +600,9 @@ const se_TagResourceCommand = async (input, context) => {
|
|
|
610
600
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
611
601
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
612
602
|
let body;
|
|
613
|
-
body = JSON.stringify({
|
|
614
|
-
|
|
615
|
-
});
|
|
603
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
604
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
605
|
+
}));
|
|
616
606
|
return new protocol_http_1.HttpRequest({
|
|
617
607
|
protocol,
|
|
618
608
|
hostname,
|
|
@@ -629,7 +619,7 @@ const se_UntagResourceCommand = async (input, context) => {
|
|
|
629
619
|
const headers = {};
|
|
630
620
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
631
621
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
632
|
-
const query = map({
|
|
622
|
+
const query = (0, smithy_client_1.map)({
|
|
633
623
|
tagKeys: [
|
|
634
624
|
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
635
625
|
() => (input.tagKeys || []).map((_entry) => _entry),
|
|
@@ -658,14 +648,14 @@ const se_UpdateContentCommand = async (input, context) => {
|
|
|
658
648
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
659
649
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "contentId", () => input.contentId, "{contentId}", false);
|
|
660
650
|
let body;
|
|
661
|
-
body = JSON.stringify({
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
});
|
|
651
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
652
|
+
metadata: (_) => (0, smithy_client_1._json)(_),
|
|
653
|
+
overrideLinkOutUri: [],
|
|
654
|
+
removeOverrideLinkOutUri: [],
|
|
655
|
+
revisionId: [],
|
|
656
|
+
title: [],
|
|
657
|
+
uploadId: [],
|
|
658
|
+
}));
|
|
669
659
|
return new protocol_http_1.HttpRequest({
|
|
670
660
|
protocol,
|
|
671
661
|
hostname,
|
|
@@ -686,9 +676,9 @@ const se_UpdateKnowledgeBaseTemplateUriCommand = async (input, context) => {
|
|
|
686
676
|
"/knowledgeBases/{knowledgeBaseId}/templateUri";
|
|
687
677
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
688
678
|
let body;
|
|
689
|
-
body = JSON.stringify({
|
|
690
|
-
|
|
691
|
-
});
|
|
679
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
680
|
+
templateUri: [],
|
|
681
|
+
}));
|
|
692
682
|
return new protocol_http_1.HttpRequest({
|
|
693
683
|
protocol,
|
|
694
684
|
hostname,
|
|
@@ -704,13 +694,14 @@ const de_CreateAssistantCommand = async (output, context) => {
|
|
|
704
694
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
705
695
|
return de_CreateAssistantCommandError(output, context);
|
|
706
696
|
}
|
|
707
|
-
const contents = map({
|
|
697
|
+
const contents = (0, smithy_client_1.map)({
|
|
708
698
|
$metadata: deserializeMetadata(output),
|
|
709
699
|
});
|
|
710
700
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
}
|
|
701
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
702
|
+
assistant: smithy_client_1._json,
|
|
703
|
+
});
|
|
704
|
+
Object.assign(contents, doc);
|
|
714
705
|
return contents;
|
|
715
706
|
};
|
|
716
707
|
exports.de_CreateAssistantCommand = de_CreateAssistantCommand;
|
|
@@ -735,10 +726,9 @@ const de_CreateAssistantCommandError = async (output, context) => {
|
|
|
735
726
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
736
727
|
default:
|
|
737
728
|
const parsedBody = parsedOutput.body;
|
|
738
|
-
|
|
729
|
+
return throwDefaultError({
|
|
739
730
|
output,
|
|
740
731
|
parsedBody,
|
|
741
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
742
732
|
errorCode,
|
|
743
733
|
});
|
|
744
734
|
}
|
|
@@ -747,13 +737,14 @@ const de_CreateAssistantAssociationCommand = async (output, context) => {
|
|
|
747
737
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
748
738
|
return de_CreateAssistantAssociationCommandError(output, context);
|
|
749
739
|
}
|
|
750
|
-
const contents = map({
|
|
740
|
+
const contents = (0, smithy_client_1.map)({
|
|
751
741
|
$metadata: deserializeMetadata(output),
|
|
752
742
|
});
|
|
753
743
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
}
|
|
744
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
745
|
+
assistantAssociation: smithy_client_1._json,
|
|
746
|
+
});
|
|
747
|
+
Object.assign(contents, doc);
|
|
757
748
|
return contents;
|
|
758
749
|
};
|
|
759
750
|
exports.de_CreateAssistantAssociationCommand = de_CreateAssistantAssociationCommand;
|
|
@@ -781,10 +772,9 @@ const de_CreateAssistantAssociationCommandError = async (output, context) => {
|
|
|
781
772
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
782
773
|
default:
|
|
783
774
|
const parsedBody = parsedOutput.body;
|
|
784
|
-
|
|
775
|
+
return throwDefaultError({
|
|
785
776
|
output,
|
|
786
777
|
parsedBody,
|
|
787
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
788
778
|
errorCode,
|
|
789
779
|
});
|
|
790
780
|
}
|
|
@@ -793,13 +783,14 @@ const de_CreateContentCommand = async (output, context) => {
|
|
|
793
783
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
794
784
|
return de_CreateContentCommandError(output, context);
|
|
795
785
|
}
|
|
796
|
-
const contents = map({
|
|
786
|
+
const contents = (0, smithy_client_1.map)({
|
|
797
787
|
$metadata: deserializeMetadata(output),
|
|
798
788
|
});
|
|
799
789
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
}
|
|
790
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
791
|
+
content: (_) => de_ContentData(_, context),
|
|
792
|
+
});
|
|
793
|
+
Object.assign(contents, doc);
|
|
803
794
|
return contents;
|
|
804
795
|
};
|
|
805
796
|
exports.de_CreateContentCommand = de_CreateContentCommand;
|
|
@@ -827,10 +818,9 @@ const de_CreateContentCommandError = async (output, context) => {
|
|
|
827
818
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
828
819
|
default:
|
|
829
820
|
const parsedBody = parsedOutput.body;
|
|
830
|
-
|
|
821
|
+
return throwDefaultError({
|
|
831
822
|
output,
|
|
832
823
|
parsedBody,
|
|
833
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
834
824
|
errorCode,
|
|
835
825
|
});
|
|
836
826
|
}
|
|
@@ -839,13 +829,14 @@ const de_CreateKnowledgeBaseCommand = async (output, context) => {
|
|
|
839
829
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
840
830
|
return de_CreateKnowledgeBaseCommandError(output, context);
|
|
841
831
|
}
|
|
842
|
-
const contents = map({
|
|
832
|
+
const contents = (0, smithy_client_1.map)({
|
|
843
833
|
$metadata: deserializeMetadata(output),
|
|
844
834
|
});
|
|
845
835
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
}
|
|
836
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
837
|
+
knowledgeBase: (_) => de_KnowledgeBaseData(_, context),
|
|
838
|
+
});
|
|
839
|
+
Object.assign(contents, doc);
|
|
849
840
|
return contents;
|
|
850
841
|
};
|
|
851
842
|
exports.de_CreateKnowledgeBaseCommand = de_CreateKnowledgeBaseCommand;
|
|
@@ -870,10 +861,9 @@ const de_CreateKnowledgeBaseCommandError = async (output, context) => {
|
|
|
870
861
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
871
862
|
default:
|
|
872
863
|
const parsedBody = parsedOutput.body;
|
|
873
|
-
|
|
864
|
+
return throwDefaultError({
|
|
874
865
|
output,
|
|
875
866
|
parsedBody,
|
|
876
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
877
867
|
errorCode,
|
|
878
868
|
});
|
|
879
869
|
}
|
|
@@ -882,13 +872,14 @@ const de_CreateSessionCommand = async (output, context) => {
|
|
|
882
872
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
883
873
|
return de_CreateSessionCommandError(output, context);
|
|
884
874
|
}
|
|
885
|
-
const contents = map({
|
|
875
|
+
const contents = (0, smithy_client_1.map)({
|
|
886
876
|
$metadata: deserializeMetadata(output),
|
|
887
877
|
});
|
|
888
878
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
}
|
|
879
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
880
|
+
session: smithy_client_1._json,
|
|
881
|
+
});
|
|
882
|
+
Object.assign(contents, doc);
|
|
892
883
|
return contents;
|
|
893
884
|
};
|
|
894
885
|
exports.de_CreateSessionCommand = de_CreateSessionCommand;
|
|
@@ -910,10 +901,9 @@ const de_CreateSessionCommandError = async (output, context) => {
|
|
|
910
901
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
911
902
|
default:
|
|
912
903
|
const parsedBody = parsedOutput.body;
|
|
913
|
-
|
|
904
|
+
return throwDefaultError({
|
|
914
905
|
output,
|
|
915
906
|
parsedBody,
|
|
916
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
917
907
|
errorCode,
|
|
918
908
|
});
|
|
919
909
|
}
|
|
@@ -922,7 +912,7 @@ const de_DeleteAssistantCommand = async (output, context) => {
|
|
|
922
912
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
923
913
|
return de_DeleteAssistantCommandError(output, context);
|
|
924
914
|
}
|
|
925
|
-
const contents = map({
|
|
915
|
+
const contents = (0, smithy_client_1.map)({
|
|
926
916
|
$metadata: deserializeMetadata(output),
|
|
927
917
|
});
|
|
928
918
|
await collectBody(output.body, context);
|
|
@@ -947,10 +937,9 @@ const de_DeleteAssistantCommandError = async (output, context) => {
|
|
|
947
937
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
948
938
|
default:
|
|
949
939
|
const parsedBody = parsedOutput.body;
|
|
950
|
-
|
|
940
|
+
return throwDefaultError({
|
|
951
941
|
output,
|
|
952
942
|
parsedBody,
|
|
953
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
954
943
|
errorCode,
|
|
955
944
|
});
|
|
956
945
|
}
|
|
@@ -959,7 +948,7 @@ const de_DeleteAssistantAssociationCommand = async (output, context) => {
|
|
|
959
948
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
960
949
|
return de_DeleteAssistantAssociationCommandError(output, context);
|
|
961
950
|
}
|
|
962
|
-
const contents = map({
|
|
951
|
+
const contents = (0, smithy_client_1.map)({
|
|
963
952
|
$metadata: deserializeMetadata(output),
|
|
964
953
|
});
|
|
965
954
|
await collectBody(output.body, context);
|
|
@@ -984,10 +973,9 @@ const de_DeleteAssistantAssociationCommandError = async (output, context) => {
|
|
|
984
973
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
985
974
|
default:
|
|
986
975
|
const parsedBody = parsedOutput.body;
|
|
987
|
-
|
|
976
|
+
return throwDefaultError({
|
|
988
977
|
output,
|
|
989
978
|
parsedBody,
|
|
990
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
991
979
|
errorCode,
|
|
992
980
|
});
|
|
993
981
|
}
|
|
@@ -996,7 +984,7 @@ const de_DeleteContentCommand = async (output, context) => {
|
|
|
996
984
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
997
985
|
return de_DeleteContentCommandError(output, context);
|
|
998
986
|
}
|
|
999
|
-
const contents = map({
|
|
987
|
+
const contents = (0, smithy_client_1.map)({
|
|
1000
988
|
$metadata: deserializeMetadata(output),
|
|
1001
989
|
});
|
|
1002
990
|
await collectBody(output.body, context);
|
|
@@ -1021,10 +1009,9 @@ const de_DeleteContentCommandError = async (output, context) => {
|
|
|
1021
1009
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1022
1010
|
default:
|
|
1023
1011
|
const parsedBody = parsedOutput.body;
|
|
1024
|
-
|
|
1012
|
+
return throwDefaultError({
|
|
1025
1013
|
output,
|
|
1026
1014
|
parsedBody,
|
|
1027
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1028
1015
|
errorCode,
|
|
1029
1016
|
});
|
|
1030
1017
|
}
|
|
@@ -1033,7 +1020,7 @@ const de_DeleteKnowledgeBaseCommand = async (output, context) => {
|
|
|
1033
1020
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1034
1021
|
return de_DeleteKnowledgeBaseCommandError(output, context);
|
|
1035
1022
|
}
|
|
1036
|
-
const contents = map({
|
|
1023
|
+
const contents = (0, smithy_client_1.map)({
|
|
1037
1024
|
$metadata: deserializeMetadata(output),
|
|
1038
1025
|
});
|
|
1039
1026
|
await collectBody(output.body, context);
|
|
@@ -1061,10 +1048,9 @@ const de_DeleteKnowledgeBaseCommandError = async (output, context) => {
|
|
|
1061
1048
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1062
1049
|
default:
|
|
1063
1050
|
const parsedBody = parsedOutput.body;
|
|
1064
|
-
|
|
1051
|
+
return throwDefaultError({
|
|
1065
1052
|
output,
|
|
1066
1053
|
parsedBody,
|
|
1067
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1068
1054
|
errorCode,
|
|
1069
1055
|
});
|
|
1070
1056
|
}
|
|
@@ -1073,13 +1059,14 @@ const de_GetAssistantCommand = async (output, context) => {
|
|
|
1073
1059
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1074
1060
|
return de_GetAssistantCommandError(output, context);
|
|
1075
1061
|
}
|
|
1076
|
-
const contents = map({
|
|
1062
|
+
const contents = (0, smithy_client_1.map)({
|
|
1077
1063
|
$metadata: deserializeMetadata(output),
|
|
1078
1064
|
});
|
|
1079
1065
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
}
|
|
1066
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1067
|
+
assistant: smithy_client_1._json,
|
|
1068
|
+
});
|
|
1069
|
+
Object.assign(contents, doc);
|
|
1083
1070
|
return contents;
|
|
1084
1071
|
};
|
|
1085
1072
|
exports.de_GetAssistantCommand = de_GetAssistantCommand;
|
|
@@ -1101,10 +1088,9 @@ const de_GetAssistantCommandError = async (output, context) => {
|
|
|
1101
1088
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1102
1089
|
default:
|
|
1103
1090
|
const parsedBody = parsedOutput.body;
|
|
1104
|
-
|
|
1091
|
+
return throwDefaultError({
|
|
1105
1092
|
output,
|
|
1106
1093
|
parsedBody,
|
|
1107
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1108
1094
|
errorCode,
|
|
1109
1095
|
});
|
|
1110
1096
|
}
|
|
@@ -1113,13 +1099,14 @@ const de_GetAssistantAssociationCommand = async (output, context) => {
|
|
|
1113
1099
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1114
1100
|
return de_GetAssistantAssociationCommandError(output, context);
|
|
1115
1101
|
}
|
|
1116
|
-
const contents = map({
|
|
1102
|
+
const contents = (0, smithy_client_1.map)({
|
|
1117
1103
|
$metadata: deserializeMetadata(output),
|
|
1118
1104
|
});
|
|
1119
1105
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
}
|
|
1106
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1107
|
+
assistantAssociation: smithy_client_1._json,
|
|
1108
|
+
});
|
|
1109
|
+
Object.assign(contents, doc);
|
|
1123
1110
|
return contents;
|
|
1124
1111
|
};
|
|
1125
1112
|
exports.de_GetAssistantAssociationCommand = de_GetAssistantAssociationCommand;
|
|
@@ -1141,10 +1128,9 @@ const de_GetAssistantAssociationCommandError = async (output, context) => {
|
|
|
1141
1128
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1142
1129
|
default:
|
|
1143
1130
|
const parsedBody = parsedOutput.body;
|
|
1144
|
-
|
|
1131
|
+
return throwDefaultError({
|
|
1145
1132
|
output,
|
|
1146
1133
|
parsedBody,
|
|
1147
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1148
1134
|
errorCode,
|
|
1149
1135
|
});
|
|
1150
1136
|
}
|
|
@@ -1153,13 +1139,14 @@ const de_GetContentCommand = async (output, context) => {
|
|
|
1153
1139
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1154
1140
|
return de_GetContentCommandError(output, context);
|
|
1155
1141
|
}
|
|
1156
|
-
const contents = map({
|
|
1142
|
+
const contents = (0, smithy_client_1.map)({
|
|
1157
1143
|
$metadata: deserializeMetadata(output),
|
|
1158
1144
|
});
|
|
1159
1145
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
}
|
|
1146
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1147
|
+
content: (_) => de_ContentData(_, context),
|
|
1148
|
+
});
|
|
1149
|
+
Object.assign(contents, doc);
|
|
1163
1150
|
return contents;
|
|
1164
1151
|
};
|
|
1165
1152
|
exports.de_GetContentCommand = de_GetContentCommand;
|
|
@@ -1181,10 +1168,9 @@ const de_GetContentCommandError = async (output, context) => {
|
|
|
1181
1168
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1182
1169
|
default:
|
|
1183
1170
|
const parsedBody = parsedOutput.body;
|
|
1184
|
-
|
|
1171
|
+
return throwDefaultError({
|
|
1185
1172
|
output,
|
|
1186
1173
|
parsedBody,
|
|
1187
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1188
1174
|
errorCode,
|
|
1189
1175
|
});
|
|
1190
1176
|
}
|
|
@@ -1193,13 +1179,14 @@ const de_GetContentSummaryCommand = async (output, context) => {
|
|
|
1193
1179
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1194
1180
|
return de_GetContentSummaryCommandError(output, context);
|
|
1195
1181
|
}
|
|
1196
|
-
const contents = map({
|
|
1182
|
+
const contents = (0, smithy_client_1.map)({
|
|
1197
1183
|
$metadata: deserializeMetadata(output),
|
|
1198
1184
|
});
|
|
1199
1185
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
}
|
|
1186
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1187
|
+
contentSummary: smithy_client_1._json,
|
|
1188
|
+
});
|
|
1189
|
+
Object.assign(contents, doc);
|
|
1203
1190
|
return contents;
|
|
1204
1191
|
};
|
|
1205
1192
|
exports.de_GetContentSummaryCommand = de_GetContentSummaryCommand;
|
|
@@ -1221,10 +1208,9 @@ const de_GetContentSummaryCommandError = async (output, context) => {
|
|
|
1221
1208
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1222
1209
|
default:
|
|
1223
1210
|
const parsedBody = parsedOutput.body;
|
|
1224
|
-
|
|
1211
|
+
return throwDefaultError({
|
|
1225
1212
|
output,
|
|
1226
1213
|
parsedBody,
|
|
1227
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1228
1214
|
errorCode,
|
|
1229
1215
|
});
|
|
1230
1216
|
}
|
|
@@ -1233,13 +1219,14 @@ const de_GetKnowledgeBaseCommand = async (output, context) => {
|
|
|
1233
1219
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1234
1220
|
return de_GetKnowledgeBaseCommandError(output, context);
|
|
1235
1221
|
}
|
|
1236
|
-
const contents = map({
|
|
1222
|
+
const contents = (0, smithy_client_1.map)({
|
|
1237
1223
|
$metadata: deserializeMetadata(output),
|
|
1238
1224
|
});
|
|
1239
1225
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
}
|
|
1226
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1227
|
+
knowledgeBase: (_) => de_KnowledgeBaseData(_, context),
|
|
1228
|
+
});
|
|
1229
|
+
Object.assign(contents, doc);
|
|
1243
1230
|
return contents;
|
|
1244
1231
|
};
|
|
1245
1232
|
exports.de_GetKnowledgeBaseCommand = de_GetKnowledgeBaseCommand;
|
|
@@ -1261,10 +1248,9 @@ const de_GetKnowledgeBaseCommandError = async (output, context) => {
|
|
|
1261
1248
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1262
1249
|
default:
|
|
1263
1250
|
const parsedBody = parsedOutput.body;
|
|
1264
|
-
|
|
1251
|
+
return throwDefaultError({
|
|
1265
1252
|
output,
|
|
1266
1253
|
parsedBody,
|
|
1267
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1268
1254
|
errorCode,
|
|
1269
1255
|
});
|
|
1270
1256
|
}
|
|
@@ -1273,16 +1259,15 @@ const de_GetRecommendationsCommand = async (output, context) => {
|
|
|
1273
1259
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1274
1260
|
return de_GetRecommendationsCommandError(output, context);
|
|
1275
1261
|
}
|
|
1276
|
-
const contents = map({
|
|
1262
|
+
const contents = (0, smithy_client_1.map)({
|
|
1277
1263
|
$metadata: deserializeMetadata(output),
|
|
1278
1264
|
});
|
|
1279
1265
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
}
|
|
1266
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1267
|
+
recommendations: (_) => de_RecommendationList(_, context),
|
|
1268
|
+
triggers: smithy_client_1._json,
|
|
1269
|
+
});
|
|
1270
|
+
Object.assign(contents, doc);
|
|
1286
1271
|
return contents;
|
|
1287
1272
|
};
|
|
1288
1273
|
exports.de_GetRecommendationsCommand = de_GetRecommendationsCommand;
|
|
@@ -1304,10 +1289,9 @@ const de_GetRecommendationsCommandError = async (output, context) => {
|
|
|
1304
1289
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1305
1290
|
default:
|
|
1306
1291
|
const parsedBody = parsedOutput.body;
|
|
1307
|
-
|
|
1292
|
+
return throwDefaultError({
|
|
1308
1293
|
output,
|
|
1309
1294
|
parsedBody,
|
|
1310
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1311
1295
|
errorCode,
|
|
1312
1296
|
});
|
|
1313
1297
|
}
|
|
@@ -1316,13 +1300,14 @@ const de_GetSessionCommand = async (output, context) => {
|
|
|
1316
1300
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1317
1301
|
return de_GetSessionCommandError(output, context);
|
|
1318
1302
|
}
|
|
1319
|
-
const contents = map({
|
|
1303
|
+
const contents = (0, smithy_client_1.map)({
|
|
1320
1304
|
$metadata: deserializeMetadata(output),
|
|
1321
1305
|
});
|
|
1322
1306
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
}
|
|
1307
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1308
|
+
session: smithy_client_1._json,
|
|
1309
|
+
});
|
|
1310
|
+
Object.assign(contents, doc);
|
|
1326
1311
|
return contents;
|
|
1327
1312
|
};
|
|
1328
1313
|
exports.de_GetSessionCommand = de_GetSessionCommand;
|
|
@@ -1344,10 +1329,9 @@ const de_GetSessionCommandError = async (output, context) => {
|
|
|
1344
1329
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1345
1330
|
default:
|
|
1346
1331
|
const parsedBody = parsedOutput.body;
|
|
1347
|
-
|
|
1332
|
+
return throwDefaultError({
|
|
1348
1333
|
output,
|
|
1349
1334
|
parsedBody,
|
|
1350
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1351
1335
|
errorCode,
|
|
1352
1336
|
});
|
|
1353
1337
|
}
|
|
@@ -1356,16 +1340,15 @@ const de_ListAssistantAssociationsCommand = async (output, context) => {
|
|
|
1356
1340
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1357
1341
|
return de_ListAssistantAssociationsCommandError(output, context);
|
|
1358
1342
|
}
|
|
1359
|
-
const contents = map({
|
|
1343
|
+
const contents = (0, smithy_client_1.map)({
|
|
1360
1344
|
$metadata: deserializeMetadata(output),
|
|
1361
1345
|
});
|
|
1362
1346
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
}
|
|
1347
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1348
|
+
assistantAssociationSummaries: smithy_client_1._json,
|
|
1349
|
+
nextToken: smithy_client_1.expectString,
|
|
1350
|
+
});
|
|
1351
|
+
Object.assign(contents, doc);
|
|
1369
1352
|
return contents;
|
|
1370
1353
|
};
|
|
1371
1354
|
exports.de_ListAssistantAssociationsCommand = de_ListAssistantAssociationsCommand;
|
|
@@ -1387,10 +1370,9 @@ const de_ListAssistantAssociationsCommandError = async (output, context) => {
|
|
|
1387
1370
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1388
1371
|
default:
|
|
1389
1372
|
const parsedBody = parsedOutput.body;
|
|
1390
|
-
|
|
1373
|
+
return throwDefaultError({
|
|
1391
1374
|
output,
|
|
1392
1375
|
parsedBody,
|
|
1393
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1394
1376
|
errorCode,
|
|
1395
1377
|
});
|
|
1396
1378
|
}
|
|
@@ -1399,16 +1381,15 @@ const de_ListAssistantsCommand = async (output, context) => {
|
|
|
1399
1381
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1400
1382
|
return de_ListAssistantsCommandError(output, context);
|
|
1401
1383
|
}
|
|
1402
|
-
const contents = map({
|
|
1384
|
+
const contents = (0, smithy_client_1.map)({
|
|
1403
1385
|
$metadata: deserializeMetadata(output),
|
|
1404
1386
|
});
|
|
1405
1387
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
}
|
|
1388
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1389
|
+
assistantSummaries: smithy_client_1._json,
|
|
1390
|
+
nextToken: smithy_client_1.expectString,
|
|
1391
|
+
});
|
|
1392
|
+
Object.assign(contents, doc);
|
|
1412
1393
|
return contents;
|
|
1413
1394
|
};
|
|
1414
1395
|
exports.de_ListAssistantsCommand = de_ListAssistantsCommand;
|
|
@@ -1427,10 +1408,9 @@ const de_ListAssistantsCommandError = async (output, context) => {
|
|
|
1427
1408
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1428
1409
|
default:
|
|
1429
1410
|
const parsedBody = parsedOutput.body;
|
|
1430
|
-
|
|
1411
|
+
return throwDefaultError({
|
|
1431
1412
|
output,
|
|
1432
1413
|
parsedBody,
|
|
1433
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1434
1414
|
errorCode,
|
|
1435
1415
|
});
|
|
1436
1416
|
}
|
|
@@ -1439,16 +1419,15 @@ const de_ListContentsCommand = async (output, context) => {
|
|
|
1439
1419
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1440
1420
|
return de_ListContentsCommandError(output, context);
|
|
1441
1421
|
}
|
|
1442
|
-
const contents = map({
|
|
1422
|
+
const contents = (0, smithy_client_1.map)({
|
|
1443
1423
|
$metadata: deserializeMetadata(output),
|
|
1444
1424
|
});
|
|
1445
1425
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
}
|
|
1426
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1427
|
+
contentSummaries: smithy_client_1._json,
|
|
1428
|
+
nextToken: smithy_client_1.expectString,
|
|
1429
|
+
});
|
|
1430
|
+
Object.assign(contents, doc);
|
|
1452
1431
|
return contents;
|
|
1453
1432
|
};
|
|
1454
1433
|
exports.de_ListContentsCommand = de_ListContentsCommand;
|
|
@@ -1470,10 +1449,9 @@ const de_ListContentsCommandError = async (output, context) => {
|
|
|
1470
1449
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1471
1450
|
default:
|
|
1472
1451
|
const parsedBody = parsedOutput.body;
|
|
1473
|
-
|
|
1452
|
+
return throwDefaultError({
|
|
1474
1453
|
output,
|
|
1475
1454
|
parsedBody,
|
|
1476
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1477
1455
|
errorCode,
|
|
1478
1456
|
});
|
|
1479
1457
|
}
|
|
@@ -1482,16 +1460,15 @@ const de_ListKnowledgeBasesCommand = async (output, context) => {
|
|
|
1482
1460
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1483
1461
|
return de_ListKnowledgeBasesCommandError(output, context);
|
|
1484
1462
|
}
|
|
1485
|
-
const contents = map({
|
|
1463
|
+
const contents = (0, smithy_client_1.map)({
|
|
1486
1464
|
$metadata: deserializeMetadata(output),
|
|
1487
1465
|
});
|
|
1488
1466
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
}
|
|
1467
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1468
|
+
knowledgeBaseSummaries: smithy_client_1._json,
|
|
1469
|
+
nextToken: smithy_client_1.expectString,
|
|
1470
|
+
});
|
|
1471
|
+
Object.assign(contents, doc);
|
|
1495
1472
|
return contents;
|
|
1496
1473
|
};
|
|
1497
1474
|
exports.de_ListKnowledgeBasesCommand = de_ListKnowledgeBasesCommand;
|
|
@@ -1510,10 +1487,9 @@ const de_ListKnowledgeBasesCommandError = async (output, context) => {
|
|
|
1510
1487
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1511
1488
|
default:
|
|
1512
1489
|
const parsedBody = parsedOutput.body;
|
|
1513
|
-
|
|
1490
|
+
return throwDefaultError({
|
|
1514
1491
|
output,
|
|
1515
1492
|
parsedBody,
|
|
1516
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1517
1493
|
errorCode,
|
|
1518
1494
|
});
|
|
1519
1495
|
}
|
|
@@ -1522,13 +1498,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
1522
1498
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1523
1499
|
return de_ListTagsForResourceCommandError(output, context);
|
|
1524
1500
|
}
|
|
1525
|
-
const contents = map({
|
|
1501
|
+
const contents = (0, smithy_client_1.map)({
|
|
1526
1502
|
$metadata: deserializeMetadata(output),
|
|
1527
1503
|
});
|
|
1528
1504
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
}
|
|
1505
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1506
|
+
tags: smithy_client_1._json,
|
|
1507
|
+
});
|
|
1508
|
+
Object.assign(contents, doc);
|
|
1532
1509
|
return contents;
|
|
1533
1510
|
};
|
|
1534
1511
|
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
@@ -1544,10 +1521,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
|
1544
1521
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1545
1522
|
default:
|
|
1546
1523
|
const parsedBody = parsedOutput.body;
|
|
1547
|
-
|
|
1524
|
+
return throwDefaultError({
|
|
1548
1525
|
output,
|
|
1549
1526
|
parsedBody,
|
|
1550
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1551
1527
|
errorCode,
|
|
1552
1528
|
});
|
|
1553
1529
|
}
|
|
@@ -1556,16 +1532,15 @@ const de_NotifyRecommendationsReceivedCommand = async (output, context) => {
|
|
|
1556
1532
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1557
1533
|
return de_NotifyRecommendationsReceivedCommandError(output, context);
|
|
1558
1534
|
}
|
|
1559
|
-
const contents = map({
|
|
1535
|
+
const contents = (0, smithy_client_1.map)({
|
|
1560
1536
|
$metadata: deserializeMetadata(output),
|
|
1561
1537
|
});
|
|
1562
1538
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
}
|
|
1539
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1540
|
+
errors: smithy_client_1._json,
|
|
1541
|
+
recommendationIds: smithy_client_1._json,
|
|
1542
|
+
});
|
|
1543
|
+
Object.assign(contents, doc);
|
|
1569
1544
|
return contents;
|
|
1570
1545
|
};
|
|
1571
1546
|
exports.de_NotifyRecommendationsReceivedCommand = de_NotifyRecommendationsReceivedCommand;
|
|
@@ -1587,10 +1562,9 @@ const de_NotifyRecommendationsReceivedCommandError = async (output, context) =>
|
|
|
1587
1562
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1588
1563
|
default:
|
|
1589
1564
|
const parsedBody = parsedOutput.body;
|
|
1590
|
-
|
|
1565
|
+
return throwDefaultError({
|
|
1591
1566
|
output,
|
|
1592
1567
|
parsedBody,
|
|
1593
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1594
1568
|
errorCode,
|
|
1595
1569
|
});
|
|
1596
1570
|
}
|
|
@@ -1599,16 +1573,15 @@ const de_QueryAssistantCommand = async (output, context) => {
|
|
|
1599
1573
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1600
1574
|
return de_QueryAssistantCommandError(output, context);
|
|
1601
1575
|
}
|
|
1602
|
-
const contents = map({
|
|
1576
|
+
const contents = (0, smithy_client_1.map)({
|
|
1603
1577
|
$metadata: deserializeMetadata(output),
|
|
1604
1578
|
});
|
|
1605
1579
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
}
|
|
1580
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1581
|
+
nextToken: smithy_client_1.expectString,
|
|
1582
|
+
results: (_) => de_QueryResultsList(_, context),
|
|
1583
|
+
});
|
|
1584
|
+
Object.assign(contents, doc);
|
|
1612
1585
|
return contents;
|
|
1613
1586
|
};
|
|
1614
1587
|
exports.de_QueryAssistantCommand = de_QueryAssistantCommand;
|
|
@@ -1630,10 +1603,9 @@ const de_QueryAssistantCommandError = async (output, context) => {
|
|
|
1630
1603
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1631
1604
|
default:
|
|
1632
1605
|
const parsedBody = parsedOutput.body;
|
|
1633
|
-
|
|
1606
|
+
return throwDefaultError({
|
|
1634
1607
|
output,
|
|
1635
1608
|
parsedBody,
|
|
1636
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1637
1609
|
errorCode,
|
|
1638
1610
|
});
|
|
1639
1611
|
}
|
|
@@ -1642,7 +1614,7 @@ const de_RemoveKnowledgeBaseTemplateUriCommand = async (output, context) => {
|
|
|
1642
1614
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1643
1615
|
return de_RemoveKnowledgeBaseTemplateUriCommandError(output, context);
|
|
1644
1616
|
}
|
|
1645
|
-
const contents = map({
|
|
1617
|
+
const contents = (0, smithy_client_1.map)({
|
|
1646
1618
|
$metadata: deserializeMetadata(output),
|
|
1647
1619
|
});
|
|
1648
1620
|
await collectBody(output.body, context);
|
|
@@ -1667,10 +1639,9 @@ const de_RemoveKnowledgeBaseTemplateUriCommandError = async (output, context) =>
|
|
|
1667
1639
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1668
1640
|
default:
|
|
1669
1641
|
const parsedBody = parsedOutput.body;
|
|
1670
|
-
|
|
1642
|
+
return throwDefaultError({
|
|
1671
1643
|
output,
|
|
1672
1644
|
parsedBody,
|
|
1673
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1674
1645
|
errorCode,
|
|
1675
1646
|
});
|
|
1676
1647
|
}
|
|
@@ -1679,16 +1650,15 @@ const de_SearchContentCommand = async (output, context) => {
|
|
|
1679
1650
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1680
1651
|
return de_SearchContentCommandError(output, context);
|
|
1681
1652
|
}
|
|
1682
|
-
const contents = map({
|
|
1653
|
+
const contents = (0, smithy_client_1.map)({
|
|
1683
1654
|
$metadata: deserializeMetadata(output),
|
|
1684
1655
|
});
|
|
1685
1656
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
}
|
|
1657
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1658
|
+
contentSummaries: smithy_client_1._json,
|
|
1659
|
+
nextToken: smithy_client_1.expectString,
|
|
1660
|
+
});
|
|
1661
|
+
Object.assign(contents, doc);
|
|
1692
1662
|
return contents;
|
|
1693
1663
|
};
|
|
1694
1664
|
exports.de_SearchContentCommand = de_SearchContentCommand;
|
|
@@ -1710,10 +1680,9 @@ const de_SearchContentCommandError = async (output, context) => {
|
|
|
1710
1680
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1711
1681
|
default:
|
|
1712
1682
|
const parsedBody = parsedOutput.body;
|
|
1713
|
-
|
|
1683
|
+
return throwDefaultError({
|
|
1714
1684
|
output,
|
|
1715
1685
|
parsedBody,
|
|
1716
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1717
1686
|
errorCode,
|
|
1718
1687
|
});
|
|
1719
1688
|
}
|
|
@@ -1722,16 +1691,15 @@ const de_SearchSessionsCommand = async (output, context) => {
|
|
|
1722
1691
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1723
1692
|
return de_SearchSessionsCommandError(output, context);
|
|
1724
1693
|
}
|
|
1725
|
-
const contents = map({
|
|
1694
|
+
const contents = (0, smithy_client_1.map)({
|
|
1726
1695
|
$metadata: deserializeMetadata(output),
|
|
1727
1696
|
});
|
|
1728
1697
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
}
|
|
1698
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1699
|
+
nextToken: smithy_client_1.expectString,
|
|
1700
|
+
sessionSummaries: smithy_client_1._json,
|
|
1701
|
+
});
|
|
1702
|
+
Object.assign(contents, doc);
|
|
1735
1703
|
return contents;
|
|
1736
1704
|
};
|
|
1737
1705
|
exports.de_SearchSessionsCommand = de_SearchSessionsCommand;
|
|
@@ -1753,10 +1721,9 @@ const de_SearchSessionsCommandError = async (output, context) => {
|
|
|
1753
1721
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1754
1722
|
default:
|
|
1755
1723
|
const parsedBody = parsedOutput.body;
|
|
1756
|
-
|
|
1724
|
+
return throwDefaultError({
|
|
1757
1725
|
output,
|
|
1758
1726
|
parsedBody,
|
|
1759
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1760
1727
|
errorCode,
|
|
1761
1728
|
});
|
|
1762
1729
|
}
|
|
@@ -1765,22 +1732,17 @@ const de_StartContentUploadCommand = async (output, context) => {
|
|
|
1765
1732
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1766
1733
|
return de_StartContentUploadCommandError(output, context);
|
|
1767
1734
|
}
|
|
1768
|
-
const contents = map({
|
|
1735
|
+
const contents = (0, smithy_client_1.map)({
|
|
1769
1736
|
$metadata: deserializeMetadata(output),
|
|
1770
1737
|
});
|
|
1771
1738
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
contents.url = (0, smithy_client_1.expectString)(data.url);
|
|
1780
|
-
}
|
|
1781
|
-
if (data.urlExpiry != null) {
|
|
1782
|
-
contents.urlExpiry = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.urlExpiry)));
|
|
1783
|
-
}
|
|
1739
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1740
|
+
headersToInclude: smithy_client_1._json,
|
|
1741
|
+
uploadId: smithy_client_1.expectString,
|
|
1742
|
+
url: smithy_client_1.expectString,
|
|
1743
|
+
urlExpiry: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1744
|
+
});
|
|
1745
|
+
Object.assign(contents, doc);
|
|
1784
1746
|
return contents;
|
|
1785
1747
|
};
|
|
1786
1748
|
exports.de_StartContentUploadCommand = de_StartContentUploadCommand;
|
|
@@ -1802,10 +1764,9 @@ const de_StartContentUploadCommandError = async (output, context) => {
|
|
|
1802
1764
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1803
1765
|
default:
|
|
1804
1766
|
const parsedBody = parsedOutput.body;
|
|
1805
|
-
|
|
1767
|
+
return throwDefaultError({
|
|
1806
1768
|
output,
|
|
1807
1769
|
parsedBody,
|
|
1808
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1809
1770
|
errorCode,
|
|
1810
1771
|
});
|
|
1811
1772
|
}
|
|
@@ -1814,7 +1775,7 @@ const de_TagResourceCommand = async (output, context) => {
|
|
|
1814
1775
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1815
1776
|
return de_TagResourceCommandError(output, context);
|
|
1816
1777
|
}
|
|
1817
|
-
const contents = map({
|
|
1778
|
+
const contents = (0, smithy_client_1.map)({
|
|
1818
1779
|
$metadata: deserializeMetadata(output),
|
|
1819
1780
|
});
|
|
1820
1781
|
await collectBody(output.body, context);
|
|
@@ -1836,10 +1797,9 @@ const de_TagResourceCommandError = async (output, context) => {
|
|
|
1836
1797
|
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
1837
1798
|
default:
|
|
1838
1799
|
const parsedBody = parsedOutput.body;
|
|
1839
|
-
|
|
1800
|
+
return throwDefaultError({
|
|
1840
1801
|
output,
|
|
1841
1802
|
parsedBody,
|
|
1842
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1843
1803
|
errorCode,
|
|
1844
1804
|
});
|
|
1845
1805
|
}
|
|
@@ -1848,7 +1808,7 @@ const de_UntagResourceCommand = async (output, context) => {
|
|
|
1848
1808
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1849
1809
|
return de_UntagResourceCommandError(output, context);
|
|
1850
1810
|
}
|
|
1851
|
-
const contents = map({
|
|
1811
|
+
const contents = (0, smithy_client_1.map)({
|
|
1852
1812
|
$metadata: deserializeMetadata(output),
|
|
1853
1813
|
});
|
|
1854
1814
|
await collectBody(output.body, context);
|
|
@@ -1867,10 +1827,9 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
1867
1827
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1868
1828
|
default:
|
|
1869
1829
|
const parsedBody = parsedOutput.body;
|
|
1870
|
-
|
|
1830
|
+
return throwDefaultError({
|
|
1871
1831
|
output,
|
|
1872
1832
|
parsedBody,
|
|
1873
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1874
1833
|
errorCode,
|
|
1875
1834
|
});
|
|
1876
1835
|
}
|
|
@@ -1879,13 +1838,14 @@ const de_UpdateContentCommand = async (output, context) => {
|
|
|
1879
1838
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1880
1839
|
return de_UpdateContentCommandError(output, context);
|
|
1881
1840
|
}
|
|
1882
|
-
const contents = map({
|
|
1841
|
+
const contents = (0, smithy_client_1.map)({
|
|
1883
1842
|
$metadata: deserializeMetadata(output),
|
|
1884
1843
|
});
|
|
1885
1844
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
}
|
|
1845
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1846
|
+
content: (_) => de_ContentData(_, context),
|
|
1847
|
+
});
|
|
1848
|
+
Object.assign(contents, doc);
|
|
1889
1849
|
return contents;
|
|
1890
1850
|
};
|
|
1891
1851
|
exports.de_UpdateContentCommand = de_UpdateContentCommand;
|
|
@@ -1910,10 +1870,9 @@ const de_UpdateContentCommandError = async (output, context) => {
|
|
|
1910
1870
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1911
1871
|
default:
|
|
1912
1872
|
const parsedBody = parsedOutput.body;
|
|
1913
|
-
|
|
1873
|
+
return throwDefaultError({
|
|
1914
1874
|
output,
|
|
1915
1875
|
parsedBody,
|
|
1916
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1917
1876
|
errorCode,
|
|
1918
1877
|
});
|
|
1919
1878
|
}
|
|
@@ -1922,13 +1881,14 @@ const de_UpdateKnowledgeBaseTemplateUriCommand = async (output, context) => {
|
|
|
1922
1881
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1923
1882
|
return de_UpdateKnowledgeBaseTemplateUriCommandError(output, context);
|
|
1924
1883
|
}
|
|
1925
|
-
const contents = map({
|
|
1884
|
+
const contents = (0, smithy_client_1.map)({
|
|
1926
1885
|
$metadata: deserializeMetadata(output),
|
|
1927
1886
|
});
|
|
1928
1887
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
}
|
|
1888
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1889
|
+
knowledgeBase: (_) => de_KnowledgeBaseData(_, context),
|
|
1890
|
+
});
|
|
1891
|
+
Object.assign(contents, doc);
|
|
1932
1892
|
return contents;
|
|
1933
1893
|
};
|
|
1934
1894
|
exports.de_UpdateKnowledgeBaseTemplateUriCommand = de_UpdateKnowledgeBaseTemplateUriCommand;
|
|
@@ -1950,21 +1910,21 @@ const de_UpdateKnowledgeBaseTemplateUriCommandError = async (output, context) =>
|
|
|
1950
1910
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1951
1911
|
default:
|
|
1952
1912
|
const parsedBody = parsedOutput.body;
|
|
1953
|
-
|
|
1913
|
+
return throwDefaultError({
|
|
1954
1914
|
output,
|
|
1955
1915
|
parsedBody,
|
|
1956
|
-
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1957
1916
|
errorCode,
|
|
1958
1917
|
});
|
|
1959
1918
|
}
|
|
1960
1919
|
};
|
|
1961
|
-
const
|
|
1920
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(WisdomServiceException_1.WisdomServiceException);
|
|
1962
1921
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1963
|
-
const contents = map({});
|
|
1922
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1964
1923
|
const data = parsedOutput.body;
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
}
|
|
1924
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1925
|
+
message: smithy_client_1.expectString,
|
|
1926
|
+
});
|
|
1927
|
+
Object.assign(contents, doc);
|
|
1968
1928
|
const exception = new models_0_1.AccessDeniedException({
|
|
1969
1929
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1970
1930
|
...contents,
|
|
@@ -1972,11 +1932,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
1972
1932
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1973
1933
|
};
|
|
1974
1934
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1975
|
-
const contents = map({});
|
|
1935
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1976
1936
|
const data = parsedOutput.body;
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
}
|
|
1937
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1938
|
+
message: smithy_client_1.expectString,
|
|
1939
|
+
});
|
|
1940
|
+
Object.assign(contents, doc);
|
|
1980
1941
|
const exception = new models_0_1.ConflictException({
|
|
1981
1942
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1982
1943
|
...contents,
|
|
@@ -1984,11 +1945,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
1984
1945
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1985
1946
|
};
|
|
1986
1947
|
const de_PreconditionFailedExceptionRes = async (parsedOutput, context) => {
|
|
1987
|
-
const contents = map({});
|
|
1948
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1988
1949
|
const data = parsedOutput.body;
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
}
|
|
1950
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1951
|
+
message: smithy_client_1.expectString,
|
|
1952
|
+
});
|
|
1953
|
+
Object.assign(contents, doc);
|
|
1992
1954
|
const exception = new models_0_1.PreconditionFailedException({
|
|
1993
1955
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1994
1956
|
...contents,
|
|
@@ -1996,14 +1958,13 @@ const de_PreconditionFailedExceptionRes = async (parsedOutput, context) => {
|
|
|
1996
1958
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1997
1959
|
};
|
|
1998
1960
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1999
|
-
const contents = map({});
|
|
1961
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2000
1962
|
const data = parsedOutput.body;
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
}
|
|
1963
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1964
|
+
message: smithy_client_1.expectString,
|
|
1965
|
+
resourceName: smithy_client_1.expectString,
|
|
1966
|
+
});
|
|
1967
|
+
Object.assign(contents, doc);
|
|
2007
1968
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
2008
1969
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2009
1970
|
...contents,
|
|
@@ -2011,11 +1972,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
2011
1972
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2012
1973
|
};
|
|
2013
1974
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
2014
|
-
const contents = map({});
|
|
1975
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2015
1976
|
const data = parsedOutput.body;
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
}
|
|
1977
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1978
|
+
message: smithy_client_1.expectString,
|
|
1979
|
+
});
|
|
1980
|
+
Object.assign(contents, doc);
|
|
2019
1981
|
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
2020
1982
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2021
1983
|
...contents,
|
|
@@ -2023,14 +1985,13 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
2023
1985
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2024
1986
|
};
|
|
2025
1987
|
const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
2026
|
-
const contents = map({});
|
|
1988
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2027
1989
|
const data = parsedOutput.body;
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
}
|
|
1990
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1991
|
+
message: smithy_client_1.expectString,
|
|
1992
|
+
resourceName: smithy_client_1.expectString,
|
|
1993
|
+
});
|
|
1994
|
+
Object.assign(contents, doc);
|
|
2034
1995
|
const exception = new models_0_1.TooManyTagsException({
|
|
2035
1996
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2036
1997
|
...contents,
|
|
@@ -2038,510 +1999,82 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
|
2038
1999
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2039
2000
|
};
|
|
2040
2001
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
2041
|
-
const contents = map({});
|
|
2002
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2042
2003
|
const data = parsedOutput.body;
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
}
|
|
2004
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2005
|
+
message: smithy_client_1.expectString,
|
|
2006
|
+
});
|
|
2007
|
+
Object.assign(contents, doc);
|
|
2046
2008
|
const exception = new models_0_1.ValidationException({
|
|
2047
2009
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2048
2010
|
...contents,
|
|
2049
2011
|
});
|
|
2050
2012
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2051
2013
|
};
|
|
2052
|
-
const se_AppIntegrationsConfiguration = (input, context) => {
|
|
2053
|
-
return {
|
|
2054
|
-
...(input.appIntegrationArn != null && { appIntegrationArn: input.appIntegrationArn }),
|
|
2055
|
-
...(input.objectFields != null && { objectFields: se_ObjectFieldsList(input.objectFields, context) }),
|
|
2056
|
-
};
|
|
2057
|
-
};
|
|
2058
|
-
const se_AssistantAssociationInputData = (input, context) => {
|
|
2059
|
-
return models_0_1.AssistantAssociationInputData.visit(input, {
|
|
2060
|
-
knowledgeBaseId: (value) => ({ knowledgeBaseId: value }),
|
|
2061
|
-
_: (name, value) => ({ name: value }),
|
|
2062
|
-
});
|
|
2063
|
-
};
|
|
2064
|
-
const se_ContentMetadata = (input, context) => {
|
|
2065
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
2066
|
-
if (value === null) {
|
|
2067
|
-
return acc;
|
|
2068
|
-
}
|
|
2069
|
-
acc[key] = value;
|
|
2070
|
-
return acc;
|
|
2071
|
-
}, {});
|
|
2072
|
-
};
|
|
2073
|
-
const se_Filter = (input, context) => {
|
|
2074
|
-
return {
|
|
2075
|
-
...(input.field != null && { field: input.field }),
|
|
2076
|
-
...(input.operator != null && { operator: input.operator }),
|
|
2077
|
-
...(input.value != null && { value: input.value }),
|
|
2078
|
-
};
|
|
2079
|
-
};
|
|
2080
|
-
const se_FilterList = (input, context) => {
|
|
2081
|
-
return input
|
|
2082
|
-
.filter((e) => e != null)
|
|
2083
|
-
.map((entry) => {
|
|
2084
|
-
return se_Filter(entry, context);
|
|
2085
|
-
});
|
|
2086
|
-
};
|
|
2087
|
-
const se_ObjectFieldsList = (input, context) => {
|
|
2088
|
-
return input
|
|
2089
|
-
.filter((e) => e != null)
|
|
2090
|
-
.map((entry) => {
|
|
2091
|
-
return entry;
|
|
2092
|
-
});
|
|
2093
|
-
};
|
|
2094
|
-
const se_RecommendationIdList = (input, context) => {
|
|
2095
|
-
return input
|
|
2096
|
-
.filter((e) => e != null)
|
|
2097
|
-
.map((entry) => {
|
|
2098
|
-
return entry;
|
|
2099
|
-
});
|
|
2100
|
-
};
|
|
2101
|
-
const se_RenderingConfiguration = (input, context) => {
|
|
2102
|
-
return {
|
|
2103
|
-
...(input.templateUri != null && { templateUri: input.templateUri }),
|
|
2104
|
-
};
|
|
2105
|
-
};
|
|
2106
|
-
const se_SearchExpression = (input, context) => {
|
|
2107
|
-
return {
|
|
2108
|
-
...(input.filters != null && { filters: se_FilterList(input.filters, context) }),
|
|
2109
|
-
};
|
|
2110
|
-
};
|
|
2111
|
-
const se_ServerSideEncryptionConfiguration = (input, context) => {
|
|
2112
|
-
return {
|
|
2113
|
-
...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
|
|
2114
|
-
};
|
|
2115
|
-
};
|
|
2116
|
-
const se_SourceConfiguration = (input, context) => {
|
|
2117
|
-
return models_0_1.SourceConfiguration.visit(input, {
|
|
2118
|
-
appIntegrations: (value) => ({ appIntegrations: se_AppIntegrationsConfiguration(value, context) }),
|
|
2119
|
-
_: (name, value) => ({ name: value }),
|
|
2120
|
-
});
|
|
2121
|
-
};
|
|
2122
|
-
const se_Tags = (input, context) => {
|
|
2123
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
2124
|
-
if (value === null) {
|
|
2125
|
-
return acc;
|
|
2126
|
-
}
|
|
2127
|
-
acc[key] = value;
|
|
2128
|
-
return acc;
|
|
2129
|
-
}, {});
|
|
2130
|
-
};
|
|
2131
|
-
const de_AppIntegrationsConfiguration = (output, context) => {
|
|
2132
|
-
return {
|
|
2133
|
-
appIntegrationArn: (0, smithy_client_1.expectString)(output.appIntegrationArn),
|
|
2134
|
-
objectFields: output.objectFields != null ? de_ObjectFieldsList(output.objectFields, context) : undefined,
|
|
2135
|
-
};
|
|
2136
|
-
};
|
|
2137
|
-
const de_AssistantAssociationData = (output, context) => {
|
|
2138
|
-
return {
|
|
2139
|
-
assistantArn: (0, smithy_client_1.expectString)(output.assistantArn),
|
|
2140
|
-
assistantAssociationArn: (0, smithy_client_1.expectString)(output.assistantAssociationArn),
|
|
2141
|
-
assistantAssociationId: (0, smithy_client_1.expectString)(output.assistantAssociationId),
|
|
2142
|
-
assistantId: (0, smithy_client_1.expectString)(output.assistantId),
|
|
2143
|
-
associationData: output.associationData != null
|
|
2144
|
-
? de_AssistantAssociationOutputData((0, smithy_client_1.expectUnion)(output.associationData), context)
|
|
2145
|
-
: undefined,
|
|
2146
|
-
associationType: (0, smithy_client_1.expectString)(output.associationType),
|
|
2147
|
-
tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
|
|
2148
|
-
};
|
|
2149
|
-
};
|
|
2150
|
-
const de_AssistantAssociationOutputData = (output, context) => {
|
|
2151
|
-
if (output.knowledgeBaseAssociation != null) {
|
|
2152
|
-
return {
|
|
2153
|
-
knowledgeBaseAssociation: de_KnowledgeBaseAssociationData(output.knowledgeBaseAssociation, context),
|
|
2154
|
-
};
|
|
2155
|
-
}
|
|
2156
|
-
return { $unknown: Object.entries(output)[0] };
|
|
2157
|
-
};
|
|
2158
|
-
const de_AssistantAssociationSummary = (output, context) => {
|
|
2159
|
-
return {
|
|
2160
|
-
assistantArn: (0, smithy_client_1.expectString)(output.assistantArn),
|
|
2161
|
-
assistantAssociationArn: (0, smithy_client_1.expectString)(output.assistantAssociationArn),
|
|
2162
|
-
assistantAssociationId: (0, smithy_client_1.expectString)(output.assistantAssociationId),
|
|
2163
|
-
assistantId: (0, smithy_client_1.expectString)(output.assistantId),
|
|
2164
|
-
associationData: output.associationData != null
|
|
2165
|
-
? de_AssistantAssociationOutputData((0, smithy_client_1.expectUnion)(output.associationData), context)
|
|
2166
|
-
: undefined,
|
|
2167
|
-
associationType: (0, smithy_client_1.expectString)(output.associationType),
|
|
2168
|
-
tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
|
|
2169
|
-
};
|
|
2170
|
-
};
|
|
2171
|
-
const de_AssistantAssociationSummaryList = (output, context) => {
|
|
2172
|
-
const retVal = (output || [])
|
|
2173
|
-
.filter((e) => e != null)
|
|
2174
|
-
.map((entry) => {
|
|
2175
|
-
if (entry === null) {
|
|
2176
|
-
return null;
|
|
2177
|
-
}
|
|
2178
|
-
return de_AssistantAssociationSummary(entry, context);
|
|
2179
|
-
});
|
|
2180
|
-
return retVal;
|
|
2181
|
-
};
|
|
2182
|
-
const de_AssistantData = (output, context) => {
|
|
2183
|
-
return {
|
|
2184
|
-
assistantArn: (0, smithy_client_1.expectString)(output.assistantArn),
|
|
2185
|
-
assistantId: (0, smithy_client_1.expectString)(output.assistantId),
|
|
2186
|
-
description: (0, smithy_client_1.expectString)(output.description),
|
|
2187
|
-
name: (0, smithy_client_1.expectString)(output.name),
|
|
2188
|
-
serverSideEncryptionConfiguration: output.serverSideEncryptionConfiguration != null
|
|
2189
|
-
? de_ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context)
|
|
2190
|
-
: undefined,
|
|
2191
|
-
status: (0, smithy_client_1.expectString)(output.status),
|
|
2192
|
-
tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
|
|
2193
|
-
type: (0, smithy_client_1.expectString)(output.type),
|
|
2194
|
-
};
|
|
2195
|
-
};
|
|
2196
|
-
const de_AssistantList = (output, context) => {
|
|
2197
|
-
const retVal = (output || [])
|
|
2198
|
-
.filter((e) => e != null)
|
|
2199
|
-
.map((entry) => {
|
|
2200
|
-
if (entry === null) {
|
|
2201
|
-
return null;
|
|
2202
|
-
}
|
|
2203
|
-
return de_AssistantSummary(entry, context);
|
|
2204
|
-
});
|
|
2205
|
-
return retVal;
|
|
2206
|
-
};
|
|
2207
|
-
const de_AssistantSummary = (output, context) => {
|
|
2208
|
-
return {
|
|
2209
|
-
assistantArn: (0, smithy_client_1.expectString)(output.assistantArn),
|
|
2210
|
-
assistantId: (0, smithy_client_1.expectString)(output.assistantId),
|
|
2211
|
-
description: (0, smithy_client_1.expectString)(output.description),
|
|
2212
|
-
name: (0, smithy_client_1.expectString)(output.name),
|
|
2213
|
-
serverSideEncryptionConfiguration: output.serverSideEncryptionConfiguration != null
|
|
2214
|
-
? de_ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context)
|
|
2215
|
-
: undefined,
|
|
2216
|
-
status: (0, smithy_client_1.expectString)(output.status),
|
|
2217
|
-
tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
|
|
2218
|
-
type: (0, smithy_client_1.expectString)(output.type),
|
|
2219
|
-
};
|
|
2220
|
-
};
|
|
2221
2014
|
const de_ContentData = (output, context) => {
|
|
2222
|
-
return {
|
|
2223
|
-
contentArn:
|
|
2224
|
-
contentId:
|
|
2225
|
-
contentType:
|
|
2226
|
-
knowledgeBaseArn:
|
|
2227
|
-
knowledgeBaseId:
|
|
2228
|
-
linkOutUri:
|
|
2229
|
-
metadata:
|
|
2230
|
-
name:
|
|
2231
|
-
revisionId:
|
|
2232
|
-
status:
|
|
2233
|
-
tags:
|
|
2234
|
-
title:
|
|
2235
|
-
url:
|
|
2236
|
-
urlExpiry:
|
|
2237
|
-
};
|
|
2238
|
-
};
|
|
2239
|
-
const de_ContentMetadata = (output, context) => {
|
|
2240
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2241
|
-
if (value === null) {
|
|
2242
|
-
return acc;
|
|
2243
|
-
}
|
|
2244
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
2245
|
-
return acc;
|
|
2246
|
-
}, {});
|
|
2247
|
-
};
|
|
2248
|
-
const de_ContentReference = (output, context) => {
|
|
2249
|
-
return {
|
|
2250
|
-
contentArn: (0, smithy_client_1.expectString)(output.contentArn),
|
|
2251
|
-
contentId: (0, smithy_client_1.expectString)(output.contentId),
|
|
2252
|
-
knowledgeBaseArn: (0, smithy_client_1.expectString)(output.knowledgeBaseArn),
|
|
2253
|
-
knowledgeBaseId: (0, smithy_client_1.expectString)(output.knowledgeBaseId),
|
|
2254
|
-
};
|
|
2255
|
-
};
|
|
2256
|
-
const de_ContentSummary = (output, context) => {
|
|
2257
|
-
return {
|
|
2258
|
-
contentArn: (0, smithy_client_1.expectString)(output.contentArn),
|
|
2259
|
-
contentId: (0, smithy_client_1.expectString)(output.contentId),
|
|
2260
|
-
contentType: (0, smithy_client_1.expectString)(output.contentType),
|
|
2261
|
-
knowledgeBaseArn: (0, smithy_client_1.expectString)(output.knowledgeBaseArn),
|
|
2262
|
-
knowledgeBaseId: (0, smithy_client_1.expectString)(output.knowledgeBaseId),
|
|
2263
|
-
metadata: output.metadata != null ? de_ContentMetadata(output.metadata, context) : undefined,
|
|
2264
|
-
name: (0, smithy_client_1.expectString)(output.name),
|
|
2265
|
-
revisionId: (0, smithy_client_1.expectString)(output.revisionId),
|
|
2266
|
-
status: (0, smithy_client_1.expectString)(output.status),
|
|
2267
|
-
tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
|
|
2268
|
-
title: (0, smithy_client_1.expectString)(output.title),
|
|
2269
|
-
};
|
|
2270
|
-
};
|
|
2271
|
-
const de_ContentSummaryList = (output, context) => {
|
|
2272
|
-
const retVal = (output || [])
|
|
2273
|
-
.filter((e) => e != null)
|
|
2274
|
-
.map((entry) => {
|
|
2275
|
-
if (entry === null) {
|
|
2276
|
-
return null;
|
|
2277
|
-
}
|
|
2278
|
-
return de_ContentSummary(entry, context);
|
|
2015
|
+
return (0, smithy_client_1.take)(output, {
|
|
2016
|
+
contentArn: smithy_client_1.expectString,
|
|
2017
|
+
contentId: smithy_client_1.expectString,
|
|
2018
|
+
contentType: smithy_client_1.expectString,
|
|
2019
|
+
knowledgeBaseArn: smithy_client_1.expectString,
|
|
2020
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
2021
|
+
linkOutUri: smithy_client_1.expectString,
|
|
2022
|
+
metadata: smithy_client_1._json,
|
|
2023
|
+
name: smithy_client_1.expectString,
|
|
2024
|
+
revisionId: smithy_client_1.expectString,
|
|
2025
|
+
status: smithy_client_1.expectString,
|
|
2026
|
+
tags: smithy_client_1._json,
|
|
2027
|
+
title: smithy_client_1.expectString,
|
|
2028
|
+
url: smithy_client_1.expectString,
|
|
2029
|
+
urlExpiry: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2279
2030
|
});
|
|
2280
|
-
return retVal;
|
|
2281
|
-
};
|
|
2282
|
-
const de_Document = (output, context) => {
|
|
2283
|
-
return {
|
|
2284
|
-
contentReference: output.contentReference != null ? de_ContentReference(output.contentReference, context) : undefined,
|
|
2285
|
-
excerpt: output.excerpt != null ? de_DocumentText(output.excerpt, context) : undefined,
|
|
2286
|
-
title: output.title != null ? de_DocumentText(output.title, context) : undefined,
|
|
2287
|
-
};
|
|
2288
|
-
};
|
|
2289
|
-
const de_DocumentText = (output, context) => {
|
|
2290
|
-
return {
|
|
2291
|
-
highlights: output.highlights != null ? de_Highlights(output.highlights, context) : undefined,
|
|
2292
|
-
text: (0, smithy_client_1.expectString)(output.text),
|
|
2293
|
-
};
|
|
2294
|
-
};
|
|
2295
|
-
const de_Headers = (output, context) => {
|
|
2296
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2297
|
-
if (value === null) {
|
|
2298
|
-
return acc;
|
|
2299
|
-
}
|
|
2300
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
2301
|
-
return acc;
|
|
2302
|
-
}, {});
|
|
2303
|
-
};
|
|
2304
|
-
const de_Highlight = (output, context) => {
|
|
2305
|
-
return {
|
|
2306
|
-
beginOffsetInclusive: (0, smithy_client_1.expectInt32)(output.beginOffsetInclusive),
|
|
2307
|
-
endOffsetExclusive: (0, smithy_client_1.expectInt32)(output.endOffsetExclusive),
|
|
2308
|
-
};
|
|
2309
|
-
};
|
|
2310
|
-
const de_Highlights = (output, context) => {
|
|
2311
|
-
const retVal = (output || [])
|
|
2312
|
-
.filter((e) => e != null)
|
|
2313
|
-
.map((entry) => {
|
|
2314
|
-
if (entry === null) {
|
|
2315
|
-
return null;
|
|
2316
|
-
}
|
|
2317
|
-
return de_Highlight(entry, context);
|
|
2318
|
-
});
|
|
2319
|
-
return retVal;
|
|
2320
|
-
};
|
|
2321
|
-
const de_KnowledgeBaseAssociationData = (output, context) => {
|
|
2322
|
-
return {
|
|
2323
|
-
knowledgeBaseArn: (0, smithy_client_1.expectString)(output.knowledgeBaseArn),
|
|
2324
|
-
knowledgeBaseId: (0, smithy_client_1.expectString)(output.knowledgeBaseId),
|
|
2325
|
-
};
|
|
2326
2031
|
};
|
|
2327
2032
|
const de_KnowledgeBaseData = (output, context) => {
|
|
2328
|
-
return {
|
|
2329
|
-
description:
|
|
2330
|
-
knowledgeBaseArn:
|
|
2331
|
-
knowledgeBaseId:
|
|
2332
|
-
knowledgeBaseType:
|
|
2333
|
-
lastContentModificationTime:
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
serverSideEncryptionConfiguration: output.serverSideEncryptionConfiguration != null
|
|
2341
|
-
? de_ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context)
|
|
2342
|
-
: undefined,
|
|
2343
|
-
sourceConfiguration: output.sourceConfiguration != null
|
|
2344
|
-
? de_SourceConfiguration((0, smithy_client_1.expectUnion)(output.sourceConfiguration), context)
|
|
2345
|
-
: undefined,
|
|
2346
|
-
status: (0, smithy_client_1.expectString)(output.status),
|
|
2347
|
-
tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
|
|
2348
|
-
};
|
|
2349
|
-
};
|
|
2350
|
-
const de_KnowledgeBaseList = (output, context) => {
|
|
2351
|
-
const retVal = (output || [])
|
|
2352
|
-
.filter((e) => e != null)
|
|
2353
|
-
.map((entry) => {
|
|
2354
|
-
if (entry === null) {
|
|
2355
|
-
return null;
|
|
2356
|
-
}
|
|
2357
|
-
return de_KnowledgeBaseSummary(entry, context);
|
|
2033
|
+
return (0, smithy_client_1.take)(output, {
|
|
2034
|
+
description: smithy_client_1.expectString,
|
|
2035
|
+
knowledgeBaseArn: smithy_client_1.expectString,
|
|
2036
|
+
knowledgeBaseId: smithy_client_1.expectString,
|
|
2037
|
+
knowledgeBaseType: smithy_client_1.expectString,
|
|
2038
|
+
lastContentModificationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2039
|
+
name: smithy_client_1.expectString,
|
|
2040
|
+
renderingConfiguration: smithy_client_1._json,
|
|
2041
|
+
serverSideEncryptionConfiguration: smithy_client_1._json,
|
|
2042
|
+
sourceConfiguration: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
|
|
2043
|
+
status: smithy_client_1.expectString,
|
|
2044
|
+
tags: smithy_client_1._json,
|
|
2358
2045
|
});
|
|
2359
|
-
return retVal;
|
|
2360
|
-
};
|
|
2361
|
-
const de_KnowledgeBaseSummary = (output, context) => {
|
|
2362
|
-
return {
|
|
2363
|
-
description: (0, smithy_client_1.expectString)(output.description),
|
|
2364
|
-
knowledgeBaseArn: (0, smithy_client_1.expectString)(output.knowledgeBaseArn),
|
|
2365
|
-
knowledgeBaseId: (0, smithy_client_1.expectString)(output.knowledgeBaseId),
|
|
2366
|
-
knowledgeBaseType: (0, smithy_client_1.expectString)(output.knowledgeBaseType),
|
|
2367
|
-
name: (0, smithy_client_1.expectString)(output.name),
|
|
2368
|
-
renderingConfiguration: output.renderingConfiguration != null
|
|
2369
|
-
? de_RenderingConfiguration(output.renderingConfiguration, context)
|
|
2370
|
-
: undefined,
|
|
2371
|
-
serverSideEncryptionConfiguration: output.serverSideEncryptionConfiguration != null
|
|
2372
|
-
? de_ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context)
|
|
2373
|
-
: undefined,
|
|
2374
|
-
sourceConfiguration: output.sourceConfiguration != null
|
|
2375
|
-
? de_SourceConfiguration((0, smithy_client_1.expectUnion)(output.sourceConfiguration), context)
|
|
2376
|
-
: undefined,
|
|
2377
|
-
status: (0, smithy_client_1.expectString)(output.status),
|
|
2378
|
-
tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
|
|
2379
|
-
};
|
|
2380
|
-
};
|
|
2381
|
-
const de_NotifyRecommendationsReceivedError = (output, context) => {
|
|
2382
|
-
return {
|
|
2383
|
-
message: (0, smithy_client_1.expectString)(output.message),
|
|
2384
|
-
recommendationId: (0, smithy_client_1.expectString)(output.recommendationId),
|
|
2385
|
-
};
|
|
2386
|
-
};
|
|
2387
|
-
const de_NotifyRecommendationsReceivedErrorList = (output, context) => {
|
|
2388
|
-
const retVal = (output || [])
|
|
2389
|
-
.filter((e) => e != null)
|
|
2390
|
-
.map((entry) => {
|
|
2391
|
-
if (entry === null) {
|
|
2392
|
-
return null;
|
|
2393
|
-
}
|
|
2394
|
-
return de_NotifyRecommendationsReceivedError(entry, context);
|
|
2395
|
-
});
|
|
2396
|
-
return retVal;
|
|
2397
|
-
};
|
|
2398
|
-
const de_ObjectFieldsList = (output, context) => {
|
|
2399
|
-
const retVal = (output || [])
|
|
2400
|
-
.filter((e) => e != null)
|
|
2401
|
-
.map((entry) => {
|
|
2402
|
-
if (entry === null) {
|
|
2403
|
-
return null;
|
|
2404
|
-
}
|
|
2405
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
2406
|
-
});
|
|
2407
|
-
return retVal;
|
|
2408
|
-
};
|
|
2409
|
-
const de_QueryRecommendationTriggerData = (output, context) => {
|
|
2410
|
-
return {
|
|
2411
|
-
text: (0, smithy_client_1.expectString)(output.text),
|
|
2412
|
-
};
|
|
2413
2046
|
};
|
|
2414
2047
|
const de_QueryResultsList = (output, context) => {
|
|
2415
2048
|
const retVal = (output || [])
|
|
2416
2049
|
.filter((e) => e != null)
|
|
2417
2050
|
.map((entry) => {
|
|
2418
|
-
if (entry === null) {
|
|
2419
|
-
return null;
|
|
2420
|
-
}
|
|
2421
2051
|
return de_ResultData(entry, context);
|
|
2422
2052
|
});
|
|
2423
2053
|
return retVal;
|
|
2424
2054
|
};
|
|
2425
2055
|
const de_RecommendationData = (output, context) => {
|
|
2426
|
-
return {
|
|
2427
|
-
document:
|
|
2428
|
-
recommendationId:
|
|
2429
|
-
relevanceLevel:
|
|
2430
|
-
relevanceScore:
|
|
2431
|
-
type:
|
|
2432
|
-
};
|
|
2433
|
-
};
|
|
2434
|
-
const de_RecommendationIdList = (output, context) => {
|
|
2435
|
-
const retVal = (output || [])
|
|
2436
|
-
.filter((e) => e != null)
|
|
2437
|
-
.map((entry) => {
|
|
2438
|
-
if (entry === null) {
|
|
2439
|
-
return null;
|
|
2440
|
-
}
|
|
2441
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
2056
|
+
return (0, smithy_client_1.take)(output, {
|
|
2057
|
+
document: smithy_client_1._json,
|
|
2058
|
+
recommendationId: smithy_client_1.expectString,
|
|
2059
|
+
relevanceLevel: smithy_client_1.expectString,
|
|
2060
|
+
relevanceScore: smithy_client_1.limitedParseDouble,
|
|
2061
|
+
type: smithy_client_1.expectString,
|
|
2442
2062
|
});
|
|
2443
|
-
return retVal;
|
|
2444
2063
|
};
|
|
2445
2064
|
const de_RecommendationList = (output, context) => {
|
|
2446
2065
|
const retVal = (output || [])
|
|
2447
2066
|
.filter((e) => e != null)
|
|
2448
2067
|
.map((entry) => {
|
|
2449
|
-
if (entry === null) {
|
|
2450
|
-
return null;
|
|
2451
|
-
}
|
|
2452
2068
|
return de_RecommendationData(entry, context);
|
|
2453
2069
|
});
|
|
2454
2070
|
return retVal;
|
|
2455
2071
|
};
|
|
2456
|
-
const de_RecommendationTrigger = (output, context) => {
|
|
2457
|
-
return {
|
|
2458
|
-
data: output.data != null ? de_RecommendationTriggerData((0, smithy_client_1.expectUnion)(output.data), context) : undefined,
|
|
2459
|
-
id: (0, smithy_client_1.expectString)(output.id),
|
|
2460
|
-
recommendationIds: output.recommendationIds != null ? de_RecommendationIdList(output.recommendationIds, context) : undefined,
|
|
2461
|
-
source: (0, smithy_client_1.expectString)(output.source),
|
|
2462
|
-
type: (0, smithy_client_1.expectString)(output.type),
|
|
2463
|
-
};
|
|
2464
|
-
};
|
|
2465
|
-
const de_RecommendationTriggerData = (output, context) => {
|
|
2466
|
-
if (output.query != null) {
|
|
2467
|
-
return {
|
|
2468
|
-
query: de_QueryRecommendationTriggerData(output.query, context),
|
|
2469
|
-
};
|
|
2470
|
-
}
|
|
2471
|
-
return { $unknown: Object.entries(output)[0] };
|
|
2472
|
-
};
|
|
2473
|
-
const de_RecommendationTriggerList = (output, context) => {
|
|
2474
|
-
const retVal = (output || [])
|
|
2475
|
-
.filter((e) => e != null)
|
|
2476
|
-
.map((entry) => {
|
|
2477
|
-
if (entry === null) {
|
|
2478
|
-
return null;
|
|
2479
|
-
}
|
|
2480
|
-
return de_RecommendationTrigger(entry, context);
|
|
2481
|
-
});
|
|
2482
|
-
return retVal;
|
|
2483
|
-
};
|
|
2484
|
-
const de_RenderingConfiguration = (output, context) => {
|
|
2485
|
-
return {
|
|
2486
|
-
templateUri: (0, smithy_client_1.expectString)(output.templateUri),
|
|
2487
|
-
};
|
|
2488
|
-
};
|
|
2489
2072
|
const de_ResultData = (output, context) => {
|
|
2490
|
-
return {
|
|
2491
|
-
document:
|
|
2492
|
-
relevanceScore:
|
|
2493
|
-
resultId:
|
|
2494
|
-
};
|
|
2495
|
-
};
|
|
2496
|
-
const de_ServerSideEncryptionConfiguration = (output, context) => {
|
|
2497
|
-
return {
|
|
2498
|
-
kmsKeyId: (0, smithy_client_1.expectString)(output.kmsKeyId),
|
|
2499
|
-
};
|
|
2500
|
-
};
|
|
2501
|
-
const de_SessionData = (output, context) => {
|
|
2502
|
-
return {
|
|
2503
|
-
description: (0, smithy_client_1.expectString)(output.description),
|
|
2504
|
-
name: (0, smithy_client_1.expectString)(output.name),
|
|
2505
|
-
sessionArn: (0, smithy_client_1.expectString)(output.sessionArn),
|
|
2506
|
-
sessionId: (0, smithy_client_1.expectString)(output.sessionId),
|
|
2507
|
-
tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
|
|
2508
|
-
};
|
|
2509
|
-
};
|
|
2510
|
-
const de_SessionSummaries = (output, context) => {
|
|
2511
|
-
const retVal = (output || [])
|
|
2512
|
-
.filter((e) => e != null)
|
|
2513
|
-
.map((entry) => {
|
|
2514
|
-
if (entry === null) {
|
|
2515
|
-
return null;
|
|
2516
|
-
}
|
|
2517
|
-
return de_SessionSummary(entry, context);
|
|
2073
|
+
return (0, smithy_client_1.take)(output, {
|
|
2074
|
+
document: smithy_client_1._json,
|
|
2075
|
+
relevanceScore: smithy_client_1.limitedParseDouble,
|
|
2076
|
+
resultId: smithy_client_1.expectString,
|
|
2518
2077
|
});
|
|
2519
|
-
return retVal;
|
|
2520
|
-
};
|
|
2521
|
-
const de_SessionSummary = (output, context) => {
|
|
2522
|
-
return {
|
|
2523
|
-
assistantArn: (0, smithy_client_1.expectString)(output.assistantArn),
|
|
2524
|
-
assistantId: (0, smithy_client_1.expectString)(output.assistantId),
|
|
2525
|
-
sessionArn: (0, smithy_client_1.expectString)(output.sessionArn),
|
|
2526
|
-
sessionId: (0, smithy_client_1.expectString)(output.sessionId),
|
|
2527
|
-
};
|
|
2528
|
-
};
|
|
2529
|
-
const de_SourceConfiguration = (output, context) => {
|
|
2530
|
-
if (output.appIntegrations != null) {
|
|
2531
|
-
return {
|
|
2532
|
-
appIntegrations: de_AppIntegrationsConfiguration(output.appIntegrations, context),
|
|
2533
|
-
};
|
|
2534
|
-
}
|
|
2535
|
-
return { $unknown: Object.entries(output)[0] };
|
|
2536
|
-
};
|
|
2537
|
-
const de_Tags = (output, context) => {
|
|
2538
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2539
|
-
if (value === null) {
|
|
2540
|
-
return acc;
|
|
2541
|
-
}
|
|
2542
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
2543
|
-
return acc;
|
|
2544
|
-
}, {});
|
|
2545
2078
|
};
|
|
2546
2079
|
const deserializeMetadata = (output) => ({
|
|
2547
2080
|
httpStatusCode: output.statusCode,
|