@aws-sdk/client-bedrock-agent 3.702.0 → 3.705.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/README.md +72 -0
- package/dist-cjs/index.js +772 -28
- package/dist-es/BedrockAgent.js +18 -0
- package/dist-es/commands/AssociateAgentCollaboratorCommand.js +23 -0
- package/dist-es/commands/DeleteKnowledgeBaseDocumentsCommand.js +22 -0
- package/dist-es/commands/DisassociateAgentCollaboratorCommand.js +22 -0
- package/dist-es/commands/GetAgentCollaboratorCommand.js +23 -0
- package/dist-es/commands/GetKnowledgeBaseDocumentsCommand.js +22 -0
- package/dist-es/commands/IngestKnowledgeBaseDocumentsCommand.js +23 -0
- package/dist-es/commands/ListAgentCollaboratorsCommand.js +23 -0
- package/dist-es/commands/ListKnowledgeBaseDocumentsCommand.js +22 -0
- package/dist-es/commands/UpdateAgentCollaboratorCommand.js +23 -0
- package/dist-es/commands/index.js +9 -0
- package/dist-es/models/models_0.js +75 -18
- package/dist-es/models/models_1.js +71 -1
- package/dist-es/pagination/ListAgentCollaboratorsPaginator.js +4 -0
- package/dist-es/pagination/ListKnowledgeBaseDocumentsPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +392 -0
- package/dist-types/BedrockAgent.d.ts +63 -0
- package/dist-types/BedrockAgentClient.d.ts +11 -2
- package/dist-types/commands/AssociateAgentCollaboratorCommand.d.ts +113 -0
- package/dist-types/commands/AssociateAgentKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/commands/CreateAgentCommand.d.ts +4 -0
- package/dist-types/commands/CreateDataSourceCommand.d.ts +3 -3
- package/dist-types/commands/CreateKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/commands/DeleteKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/commands/DeleteKnowledgeBaseDocumentsCommand.d.ts +119 -0
- package/dist-types/commands/DisassociateAgentCollaboratorCommand.d.ts +89 -0
- package/dist-types/commands/DisassociateAgentKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/commands/GetAgentCollaboratorCommand.d.ts +101 -0
- package/dist-types/commands/GetAgentCommand.d.ts +2 -0
- package/dist-types/commands/GetAgentVersionCommand.d.ts +2 -0
- package/dist-types/commands/GetDataSourceCommand.d.ts +1 -1
- package/dist-types/commands/GetKnowledgeBaseDocumentsCommand.d.ts +118 -0
- package/dist-types/commands/IngestKnowledgeBaseDocumentsCommand.d.ts +161 -0
- package/dist-types/commands/ListAgentCollaboratorsCommand.d.ts +104 -0
- package/dist-types/commands/ListKnowledgeBaseDocumentsCommand.d.ts +110 -0
- package/dist-types/commands/UpdateAgentCollaboratorCommand.d.ts +113 -0
- package/dist-types/commands/UpdateAgentCommand.d.ts +4 -0
- package/dist-types/commands/UpdateDataSourceCommand.d.ts +2 -2
- package/dist-types/commands/index.d.ts +9 -0
- package/dist-types/models/models_0.d.ts +589 -475
- package/dist-types/models/models_1.d.ts +923 -1
- package/dist-types/pagination/ListAgentCollaboratorsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListKnowledgeBaseDocumentsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +81 -0
- package/dist-types/ts3.4/BedrockAgent.d.ts +153 -0
- package/dist-types/ts3.4/BedrockAgentClient.d.ts +54 -0
- package/dist-types/ts3.4/commands/AssociateAgentCollaboratorCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/AssociateAgentKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/CreateKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/DeleteKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/DeleteKnowledgeBaseDocumentsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DisassociateAgentCollaboratorCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DisassociateAgentKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/GetAgentCollaboratorCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetKnowledgeBaseDocumentsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/IngestKnowledgeBaseDocumentsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListAgentCollaboratorsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListKnowledgeBaseDocumentsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/UpdateAgentCollaboratorCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +9 -0
- package/dist-types/ts3.4/models/models_0.d.ts +185 -153
- package/dist-types/ts3.4/models/models_1.d.ts +270 -4
- package/dist-types/ts3.4/pagination/ListAgentCollaboratorsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListKnowledgeBaseDocumentsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +108 -0
- package/package.json +1 -1
|
@@ -4,6 +4,25 @@ import { _json, collectBody, decorateServiceException as __decorateServiceExcept
|
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
import { BedrockAgentServiceException as __BaseException } from "../models/BedrockAgentServiceException";
|
|
6
6
|
import { AccessDeniedException, ConflictException, FlowNodeConfiguration, InternalServerException, PromptFlowNodeSourceConfiguration, PromptInferenceConfiguration, PromptTemplateConfiguration, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, Tool, ToolInputSchema, ValidationException, } from "../models/models_0";
|
|
7
|
+
export const se_AssociateAgentCollaboratorCommand = async (input, context) => {
|
|
8
|
+
const b = rb(input, context);
|
|
9
|
+
const headers = {
|
|
10
|
+
"content-type": "application/json",
|
|
11
|
+
};
|
|
12
|
+
b.bp("/agents/{agentId}/agentversions/{agentVersion}/agentcollaborators");
|
|
13
|
+
b.p("agentId", () => input.agentId, "{agentId}", false);
|
|
14
|
+
b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
15
|
+
let body;
|
|
16
|
+
body = JSON.stringify(take(input, {
|
|
17
|
+
agentDescriptor: (_) => _json(_),
|
|
18
|
+
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
19
|
+
collaborationInstruction: [],
|
|
20
|
+
collaboratorName: [],
|
|
21
|
+
relayConversationHistory: [],
|
|
22
|
+
}));
|
|
23
|
+
b.m("PUT").h(headers).b(body);
|
|
24
|
+
return b.build();
|
|
25
|
+
};
|
|
7
26
|
export const se_AssociateAgentKnowledgeBaseCommand = async (input, context) => {
|
|
8
27
|
const b = rb(input, context);
|
|
9
28
|
const headers = {
|
|
@@ -29,6 +48,7 @@ export const se_CreateAgentCommand = async (input, context) => {
|
|
|
29
48
|
b.bp("/agents");
|
|
30
49
|
let body;
|
|
31
50
|
body = JSON.stringify(take(input, {
|
|
51
|
+
agentCollaboration: [],
|
|
32
52
|
agentName: [],
|
|
33
53
|
agentResourceRoleArn: [],
|
|
34
54
|
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
@@ -316,6 +336,22 @@ export const se_DeleteKnowledgeBaseCommand = async (input, context) => {
|
|
|
316
336
|
b.m("DELETE").h(headers).b(body);
|
|
317
337
|
return b.build();
|
|
318
338
|
};
|
|
339
|
+
export const se_DeleteKnowledgeBaseDocumentsCommand = async (input, context) => {
|
|
340
|
+
const b = rb(input, context);
|
|
341
|
+
const headers = {
|
|
342
|
+
"content-type": "application/json",
|
|
343
|
+
};
|
|
344
|
+
b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents/deleteDocuments");
|
|
345
|
+
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
346
|
+
b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
347
|
+
let body;
|
|
348
|
+
body = JSON.stringify(take(input, {
|
|
349
|
+
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
350
|
+
documentIdentifiers: (_) => _json(_),
|
|
351
|
+
}));
|
|
352
|
+
b.m("POST").h(headers).b(body);
|
|
353
|
+
return b.build();
|
|
354
|
+
};
|
|
319
355
|
export const se_DeletePromptCommand = async (input, context) => {
|
|
320
356
|
const b = rb(input, context);
|
|
321
357
|
const headers = {};
|
|
@@ -328,6 +364,17 @@ export const se_DeletePromptCommand = async (input, context) => {
|
|
|
328
364
|
b.m("DELETE").h(headers).q(query).b(body);
|
|
329
365
|
return b.build();
|
|
330
366
|
};
|
|
367
|
+
export const se_DisassociateAgentCollaboratorCommand = async (input, context) => {
|
|
368
|
+
const b = rb(input, context);
|
|
369
|
+
const headers = {};
|
|
370
|
+
b.bp("/agents/{agentId}/agentversions/{agentVersion}/agentcollaborators/{collaboratorId}");
|
|
371
|
+
b.p("agentId", () => input.agentId, "{agentId}", false);
|
|
372
|
+
b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
373
|
+
b.p("collaboratorId", () => input.collaboratorId, "{collaboratorId}", false);
|
|
374
|
+
let body;
|
|
375
|
+
b.m("DELETE").h(headers).b(body);
|
|
376
|
+
return b.build();
|
|
377
|
+
};
|
|
331
378
|
export const se_DisassociateAgentKnowledgeBaseCommand = async (input, context) => {
|
|
332
379
|
const b = rb(input, context);
|
|
333
380
|
const headers = {};
|
|
@@ -369,6 +416,17 @@ export const se_GetAgentAliasCommand = async (input, context) => {
|
|
|
369
416
|
b.m("GET").h(headers).b(body);
|
|
370
417
|
return b.build();
|
|
371
418
|
};
|
|
419
|
+
export const se_GetAgentCollaboratorCommand = async (input, context) => {
|
|
420
|
+
const b = rb(input, context);
|
|
421
|
+
const headers = {};
|
|
422
|
+
b.bp("/agents/{agentId}/agentversions/{agentVersion}/agentcollaborators/{collaboratorId}");
|
|
423
|
+
b.p("agentId", () => input.agentId, "{agentId}", false);
|
|
424
|
+
b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
425
|
+
b.p("collaboratorId", () => input.collaboratorId, "{collaboratorId}", false);
|
|
426
|
+
let body;
|
|
427
|
+
b.m("GET").h(headers).b(body);
|
|
428
|
+
return b.build();
|
|
429
|
+
};
|
|
372
430
|
export const se_GetAgentKnowledgeBaseCommand = async (input, context) => {
|
|
373
431
|
const b = rb(input, context);
|
|
374
432
|
const headers = {};
|
|
@@ -449,6 +507,21 @@ export const se_GetKnowledgeBaseCommand = async (input, context) => {
|
|
|
449
507
|
b.m("GET").h(headers).b(body);
|
|
450
508
|
return b.build();
|
|
451
509
|
};
|
|
510
|
+
export const se_GetKnowledgeBaseDocumentsCommand = async (input, context) => {
|
|
511
|
+
const b = rb(input, context);
|
|
512
|
+
const headers = {
|
|
513
|
+
"content-type": "application/json",
|
|
514
|
+
};
|
|
515
|
+
b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents/getDocuments");
|
|
516
|
+
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
517
|
+
b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
518
|
+
let body;
|
|
519
|
+
body = JSON.stringify(take(input, {
|
|
520
|
+
documentIdentifiers: (_) => _json(_),
|
|
521
|
+
}));
|
|
522
|
+
b.m("POST").h(headers).b(body);
|
|
523
|
+
return b.build();
|
|
524
|
+
};
|
|
452
525
|
export const se_GetPromptCommand = async (input, context) => {
|
|
453
526
|
const b = rb(input, context);
|
|
454
527
|
const headers = {};
|
|
@@ -461,6 +534,22 @@ export const se_GetPromptCommand = async (input, context) => {
|
|
|
461
534
|
b.m("GET").h(headers).q(query).b(body);
|
|
462
535
|
return b.build();
|
|
463
536
|
};
|
|
537
|
+
export const se_IngestKnowledgeBaseDocumentsCommand = async (input, context) => {
|
|
538
|
+
const b = rb(input, context);
|
|
539
|
+
const headers = {
|
|
540
|
+
"content-type": "application/json",
|
|
541
|
+
};
|
|
542
|
+
b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents");
|
|
543
|
+
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
544
|
+
b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
545
|
+
let body;
|
|
546
|
+
body = JSON.stringify(take(input, {
|
|
547
|
+
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
548
|
+
documents: (_) => se_KnowledgeBaseDocuments(_, context),
|
|
549
|
+
}));
|
|
550
|
+
b.m("PUT").h(headers).b(body);
|
|
551
|
+
return b.build();
|
|
552
|
+
};
|
|
464
553
|
export const se_ListAgentActionGroupsCommand = async (input, context) => {
|
|
465
554
|
const b = rb(input, context);
|
|
466
555
|
const headers = {
|
|
@@ -492,6 +581,22 @@ export const se_ListAgentAliasesCommand = async (input, context) => {
|
|
|
492
581
|
b.m("POST").h(headers).b(body);
|
|
493
582
|
return b.build();
|
|
494
583
|
};
|
|
584
|
+
export const se_ListAgentCollaboratorsCommand = async (input, context) => {
|
|
585
|
+
const b = rb(input, context);
|
|
586
|
+
const headers = {
|
|
587
|
+
"content-type": "application/json",
|
|
588
|
+
};
|
|
589
|
+
b.bp("/agents/{agentId}/agentversions/{agentVersion}/agentcollaborators");
|
|
590
|
+
b.p("agentId", () => input.agentId, "{agentId}", false);
|
|
591
|
+
b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
592
|
+
let body;
|
|
593
|
+
body = JSON.stringify(take(input, {
|
|
594
|
+
maxResults: [],
|
|
595
|
+
nextToken: [],
|
|
596
|
+
}));
|
|
597
|
+
b.m("POST").h(headers).b(body);
|
|
598
|
+
return b.build();
|
|
599
|
+
};
|
|
495
600
|
export const se_ListAgentKnowledgeBasesCommand = async (input, context) => {
|
|
496
601
|
const b = rb(input, context);
|
|
497
602
|
const headers = {
|
|
@@ -608,6 +713,22 @@ export const se_ListIngestionJobsCommand = async (input, context) => {
|
|
|
608
713
|
b.m("POST").h(headers).b(body);
|
|
609
714
|
return b.build();
|
|
610
715
|
};
|
|
716
|
+
export const se_ListKnowledgeBaseDocumentsCommand = async (input, context) => {
|
|
717
|
+
const b = rb(input, context);
|
|
718
|
+
const headers = {
|
|
719
|
+
"content-type": "application/json",
|
|
720
|
+
};
|
|
721
|
+
b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents");
|
|
722
|
+
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
723
|
+
b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
724
|
+
let body;
|
|
725
|
+
body = JSON.stringify(take(input, {
|
|
726
|
+
maxResults: [],
|
|
727
|
+
nextToken: [],
|
|
728
|
+
}));
|
|
729
|
+
b.m("POST").h(headers).b(body);
|
|
730
|
+
return b.build();
|
|
731
|
+
};
|
|
611
732
|
export const se_ListKnowledgeBasesCommand = async (input, context) => {
|
|
612
733
|
const b = rb(input, context);
|
|
613
734
|
const headers = {
|
|
@@ -724,6 +845,7 @@ export const se_UpdateAgentCommand = async (input, context) => {
|
|
|
724
845
|
b.p("agentId", () => input.agentId, "{agentId}", false);
|
|
725
846
|
let body;
|
|
726
847
|
body = JSON.stringify(take(input, {
|
|
848
|
+
agentCollaboration: [],
|
|
727
849
|
agentName: [],
|
|
728
850
|
agentResourceRoleArn: [],
|
|
729
851
|
customOrchestration: (_) => _json(_),
|
|
@@ -779,6 +901,25 @@ export const se_UpdateAgentAliasCommand = async (input, context) => {
|
|
|
779
901
|
b.m("PUT").h(headers).b(body);
|
|
780
902
|
return b.build();
|
|
781
903
|
};
|
|
904
|
+
export const se_UpdateAgentCollaboratorCommand = async (input, context) => {
|
|
905
|
+
const b = rb(input, context);
|
|
906
|
+
const headers = {
|
|
907
|
+
"content-type": "application/json",
|
|
908
|
+
};
|
|
909
|
+
b.bp("/agents/{agentId}/agentversions/{agentVersion}/agentcollaborators/{collaboratorId}");
|
|
910
|
+
b.p("agentId", () => input.agentId, "{agentId}", false);
|
|
911
|
+
b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
|
|
912
|
+
b.p("collaboratorId", () => input.collaboratorId, "{collaboratorId}", false);
|
|
913
|
+
let body;
|
|
914
|
+
body = JSON.stringify(take(input, {
|
|
915
|
+
agentDescriptor: (_) => _json(_),
|
|
916
|
+
collaborationInstruction: [],
|
|
917
|
+
collaboratorName: [],
|
|
918
|
+
relayConversationHistory: [],
|
|
919
|
+
}));
|
|
920
|
+
b.m("PUT").h(headers).b(body);
|
|
921
|
+
return b.build();
|
|
922
|
+
};
|
|
782
923
|
export const se_UpdateAgentKnowledgeBaseCommand = async (input, context) => {
|
|
783
924
|
const b = rb(input, context);
|
|
784
925
|
const headers = {
|
|
@@ -900,6 +1041,20 @@ export const se_ValidateFlowDefinitionCommand = async (input, context) => {
|
|
|
900
1041
|
b.m("POST").h(headers).b(body);
|
|
901
1042
|
return b.build();
|
|
902
1043
|
};
|
|
1044
|
+
export const de_AssociateAgentCollaboratorCommand = async (output, context) => {
|
|
1045
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1046
|
+
return de_CommandError(output, context);
|
|
1047
|
+
}
|
|
1048
|
+
const contents = map({
|
|
1049
|
+
$metadata: deserializeMetadata(output),
|
|
1050
|
+
});
|
|
1051
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1052
|
+
const doc = take(data, {
|
|
1053
|
+
agentCollaborator: (_) => de_AgentCollaborator(_, context),
|
|
1054
|
+
});
|
|
1055
|
+
Object.assign(contents, doc);
|
|
1056
|
+
return contents;
|
|
1057
|
+
};
|
|
903
1058
|
export const de_AssociateAgentKnowledgeBaseCommand = async (output, context) => {
|
|
904
1059
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
905
1060
|
return de_CommandError(output, context);
|
|
@@ -1230,6 +1385,20 @@ export const de_DeleteKnowledgeBaseCommand = async (output, context) => {
|
|
|
1230
1385
|
Object.assign(contents, doc);
|
|
1231
1386
|
return contents;
|
|
1232
1387
|
};
|
|
1388
|
+
export const de_DeleteKnowledgeBaseDocumentsCommand = async (output, context) => {
|
|
1389
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1390
|
+
return de_CommandError(output, context);
|
|
1391
|
+
}
|
|
1392
|
+
const contents = map({
|
|
1393
|
+
$metadata: deserializeMetadata(output),
|
|
1394
|
+
});
|
|
1395
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1396
|
+
const doc = take(data, {
|
|
1397
|
+
documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
|
|
1398
|
+
});
|
|
1399
|
+
Object.assign(contents, doc);
|
|
1400
|
+
return contents;
|
|
1401
|
+
};
|
|
1233
1402
|
export const de_DeletePromptCommand = async (output, context) => {
|
|
1234
1403
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1235
1404
|
return de_CommandError(output, context);
|
|
@@ -1245,6 +1414,16 @@ export const de_DeletePromptCommand = async (output, context) => {
|
|
|
1245
1414
|
Object.assign(contents, doc);
|
|
1246
1415
|
return contents;
|
|
1247
1416
|
};
|
|
1417
|
+
export const de_DisassociateAgentCollaboratorCommand = async (output, context) => {
|
|
1418
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1419
|
+
return de_CommandError(output, context);
|
|
1420
|
+
}
|
|
1421
|
+
const contents = map({
|
|
1422
|
+
$metadata: deserializeMetadata(output),
|
|
1423
|
+
});
|
|
1424
|
+
await collectBody(output.body, context);
|
|
1425
|
+
return contents;
|
|
1426
|
+
};
|
|
1248
1427
|
export const de_DisassociateAgentKnowledgeBaseCommand = async (output, context) => {
|
|
1249
1428
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1250
1429
|
return de_CommandError(output, context);
|
|
@@ -1297,6 +1476,20 @@ export const de_GetAgentAliasCommand = async (output, context) => {
|
|
|
1297
1476
|
Object.assign(contents, doc);
|
|
1298
1477
|
return contents;
|
|
1299
1478
|
};
|
|
1479
|
+
export const de_GetAgentCollaboratorCommand = async (output, context) => {
|
|
1480
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1481
|
+
return de_CommandError(output, context);
|
|
1482
|
+
}
|
|
1483
|
+
const contents = map({
|
|
1484
|
+
$metadata: deserializeMetadata(output),
|
|
1485
|
+
});
|
|
1486
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1487
|
+
const doc = take(data, {
|
|
1488
|
+
agentCollaborator: (_) => de_AgentCollaborator(_, context),
|
|
1489
|
+
});
|
|
1490
|
+
Object.assign(contents, doc);
|
|
1491
|
+
return contents;
|
|
1492
|
+
};
|
|
1300
1493
|
export const de_GetAgentKnowledgeBaseCommand = async (output, context) => {
|
|
1301
1494
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1302
1495
|
return de_CommandError(output, context);
|
|
@@ -1436,6 +1629,20 @@ export const de_GetKnowledgeBaseCommand = async (output, context) => {
|
|
|
1436
1629
|
Object.assign(contents, doc);
|
|
1437
1630
|
return contents;
|
|
1438
1631
|
};
|
|
1632
|
+
export const de_GetKnowledgeBaseDocumentsCommand = async (output, context) => {
|
|
1633
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1634
|
+
return de_CommandError(output, context);
|
|
1635
|
+
}
|
|
1636
|
+
const contents = map({
|
|
1637
|
+
$metadata: deserializeMetadata(output),
|
|
1638
|
+
});
|
|
1639
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1640
|
+
const doc = take(data, {
|
|
1641
|
+
documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
|
|
1642
|
+
});
|
|
1643
|
+
Object.assign(contents, doc);
|
|
1644
|
+
return contents;
|
|
1645
|
+
};
|
|
1439
1646
|
export const de_GetPromptCommand = async (output, context) => {
|
|
1440
1647
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1441
1648
|
return de_CommandError(output, context);
|
|
@@ -1459,6 +1666,20 @@ export const de_GetPromptCommand = async (output, context) => {
|
|
|
1459
1666
|
Object.assign(contents, doc);
|
|
1460
1667
|
return contents;
|
|
1461
1668
|
};
|
|
1669
|
+
export const de_IngestKnowledgeBaseDocumentsCommand = async (output, context) => {
|
|
1670
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1671
|
+
return de_CommandError(output, context);
|
|
1672
|
+
}
|
|
1673
|
+
const contents = map({
|
|
1674
|
+
$metadata: deserializeMetadata(output),
|
|
1675
|
+
});
|
|
1676
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1677
|
+
const doc = take(data, {
|
|
1678
|
+
documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
|
|
1679
|
+
});
|
|
1680
|
+
Object.assign(contents, doc);
|
|
1681
|
+
return contents;
|
|
1682
|
+
};
|
|
1462
1683
|
export const de_ListAgentActionGroupsCommand = async (output, context) => {
|
|
1463
1684
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1464
1685
|
return de_CommandError(output, context);
|
|
@@ -1489,6 +1710,21 @@ export const de_ListAgentAliasesCommand = async (output, context) => {
|
|
|
1489
1710
|
Object.assign(contents, doc);
|
|
1490
1711
|
return contents;
|
|
1491
1712
|
};
|
|
1713
|
+
export const de_ListAgentCollaboratorsCommand = async (output, context) => {
|
|
1714
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1715
|
+
return de_CommandError(output, context);
|
|
1716
|
+
}
|
|
1717
|
+
const contents = map({
|
|
1718
|
+
$metadata: deserializeMetadata(output),
|
|
1719
|
+
});
|
|
1720
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1721
|
+
const doc = take(data, {
|
|
1722
|
+
agentCollaboratorSummaries: (_) => de_AgentCollaboratorSummaries(_, context),
|
|
1723
|
+
nextToken: __expectString,
|
|
1724
|
+
});
|
|
1725
|
+
Object.assign(contents, doc);
|
|
1726
|
+
return contents;
|
|
1727
|
+
};
|
|
1492
1728
|
export const de_ListAgentKnowledgeBasesCommand = async (output, context) => {
|
|
1493
1729
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1494
1730
|
return de_CommandError(output, context);
|
|
@@ -1609,6 +1845,21 @@ export const de_ListIngestionJobsCommand = async (output, context) => {
|
|
|
1609
1845
|
Object.assign(contents, doc);
|
|
1610
1846
|
return contents;
|
|
1611
1847
|
};
|
|
1848
|
+
export const de_ListKnowledgeBaseDocumentsCommand = async (output, context) => {
|
|
1849
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1850
|
+
return de_CommandError(output, context);
|
|
1851
|
+
}
|
|
1852
|
+
const contents = map({
|
|
1853
|
+
$metadata: deserializeMetadata(output),
|
|
1854
|
+
});
|
|
1855
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1856
|
+
const doc = take(data, {
|
|
1857
|
+
documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
|
|
1858
|
+
nextToken: __expectString,
|
|
1859
|
+
});
|
|
1860
|
+
Object.assign(contents, doc);
|
|
1861
|
+
return contents;
|
|
1862
|
+
};
|
|
1612
1863
|
export const de_ListKnowledgeBasesCommand = async (output, context) => {
|
|
1613
1864
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1614
1865
|
return de_CommandError(output, context);
|
|
@@ -1775,6 +2026,20 @@ export const de_UpdateAgentAliasCommand = async (output, context) => {
|
|
|
1775
2026
|
Object.assign(contents, doc);
|
|
1776
2027
|
return contents;
|
|
1777
2028
|
};
|
|
2029
|
+
export const de_UpdateAgentCollaboratorCommand = async (output, context) => {
|
|
2030
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2031
|
+
return de_CommandError(output, context);
|
|
2032
|
+
}
|
|
2033
|
+
const contents = map({
|
|
2034
|
+
$metadata: deserializeMetadata(output),
|
|
2035
|
+
});
|
|
2036
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2037
|
+
const doc = take(data, {
|
|
2038
|
+
agentCollaborator: (_) => de_AgentCollaborator(_, context),
|
|
2039
|
+
});
|
|
2040
|
+
Object.assign(contents, doc);
|
|
2041
|
+
return contents;
|
|
2042
|
+
};
|
|
1778
2043
|
export const de_UpdateAgentKnowledgeBaseCommand = async (output, context) => {
|
|
1779
2044
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1780
2045
|
return de_CommandError(output, context);
|
|
@@ -2029,6 +2294,12 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
2029
2294
|
});
|
|
2030
2295
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
2031
2296
|
};
|
|
2297
|
+
const se_ByteContentDoc = (input, context) => {
|
|
2298
|
+
return take(input, {
|
|
2299
|
+
data: context.base64Encoder,
|
|
2300
|
+
mimeType: [],
|
|
2301
|
+
});
|
|
2302
|
+
};
|
|
2032
2303
|
const se_ChatPromptTemplateConfiguration = (input, context) => {
|
|
2033
2304
|
return take(input, {
|
|
2034
2305
|
inputVariables: _json,
|
|
@@ -2037,6 +2308,28 @@ const se_ChatPromptTemplateConfiguration = (input, context) => {
|
|
|
2037
2308
|
toolConfiguration: (_) => se_ToolConfiguration(_, context),
|
|
2038
2309
|
});
|
|
2039
2310
|
};
|
|
2311
|
+
const se_CustomContent = (input, context) => {
|
|
2312
|
+
return take(input, {
|
|
2313
|
+
customDocumentIdentifier: _json,
|
|
2314
|
+
inlineContent: (_) => se_InlineContent(_, context),
|
|
2315
|
+
s3Location: _json,
|
|
2316
|
+
sourceType: [],
|
|
2317
|
+
});
|
|
2318
|
+
};
|
|
2319
|
+
const se_DocumentContent = (input, context) => {
|
|
2320
|
+
return take(input, {
|
|
2321
|
+
custom: (_) => se_CustomContent(_, context),
|
|
2322
|
+
dataSourceType: [],
|
|
2323
|
+
s3: _json,
|
|
2324
|
+
});
|
|
2325
|
+
};
|
|
2326
|
+
const se_DocumentMetadata = (input, context) => {
|
|
2327
|
+
return take(input, {
|
|
2328
|
+
inlineAttributes: (_) => se_MetadataAttributes(_, context),
|
|
2329
|
+
s3Location: _json,
|
|
2330
|
+
type: [],
|
|
2331
|
+
});
|
|
2332
|
+
};
|
|
2040
2333
|
const se_FlowDefinition = (input, context) => {
|
|
2041
2334
|
return take(input, {
|
|
2042
2335
|
connections: _json,
|
|
@@ -2085,9 +2378,52 @@ const se_InferenceConfiguration = (input, context) => {
|
|
|
2085
2378
|
topP: __serializeFloat,
|
|
2086
2379
|
});
|
|
2087
2380
|
};
|
|
2381
|
+
const se_InlineContent = (input, context) => {
|
|
2382
|
+
return take(input, {
|
|
2383
|
+
byteContent: (_) => se_ByteContentDoc(_, context),
|
|
2384
|
+
textContent: _json,
|
|
2385
|
+
type: [],
|
|
2386
|
+
});
|
|
2387
|
+
};
|
|
2388
|
+
const se_KnowledgeBaseDocument = (input, context) => {
|
|
2389
|
+
return take(input, {
|
|
2390
|
+
content: (_) => se_DocumentContent(_, context),
|
|
2391
|
+
metadata: (_) => se_DocumentMetadata(_, context),
|
|
2392
|
+
});
|
|
2393
|
+
};
|
|
2394
|
+
const se_KnowledgeBaseDocuments = (input, context) => {
|
|
2395
|
+
return input
|
|
2396
|
+
.filter((e) => e != null)
|
|
2397
|
+
.map((entry) => {
|
|
2398
|
+
return se_KnowledgeBaseDocument(entry, context);
|
|
2399
|
+
});
|
|
2400
|
+
};
|
|
2401
|
+
const se_MetadataAttribute = (input, context) => {
|
|
2402
|
+
return take(input, {
|
|
2403
|
+
key: [],
|
|
2404
|
+
value: (_) => se_MetadataAttributeValue(_, context),
|
|
2405
|
+
});
|
|
2406
|
+
};
|
|
2407
|
+
const se_MetadataAttributes = (input, context) => {
|
|
2408
|
+
return input
|
|
2409
|
+
.filter((e) => e != null)
|
|
2410
|
+
.map((entry) => {
|
|
2411
|
+
return se_MetadataAttribute(entry, context);
|
|
2412
|
+
});
|
|
2413
|
+
};
|
|
2414
|
+
const se_MetadataAttributeValue = (input, context) => {
|
|
2415
|
+
return take(input, {
|
|
2416
|
+
booleanValue: [],
|
|
2417
|
+
numberValue: __serializeFloat,
|
|
2418
|
+
stringListValue: _json,
|
|
2419
|
+
stringValue: [],
|
|
2420
|
+
type: [],
|
|
2421
|
+
});
|
|
2422
|
+
};
|
|
2088
2423
|
const se_PromptConfiguration = (input, context) => {
|
|
2089
2424
|
return take(input, {
|
|
2090
2425
|
basePromptTemplate: [],
|
|
2426
|
+
foundationModel: [],
|
|
2091
2427
|
inferenceConfiguration: (_) => se_InferenceConfiguration(_, context),
|
|
2092
2428
|
parserMode: [],
|
|
2093
2429
|
promptCreationMode: [],
|
|
@@ -2225,6 +2561,7 @@ const de_ActionGroupSummary = (output, context) => {
|
|
|
2225
2561
|
const de_Agent = (output, context) => {
|
|
2226
2562
|
return take(output, {
|
|
2227
2563
|
agentArn: __expectString,
|
|
2564
|
+
agentCollaboration: __expectString,
|
|
2228
2565
|
agentId: __expectString,
|
|
2229
2566
|
agentName: __expectString,
|
|
2230
2567
|
agentResourceRoleArn: __expectString,
|
|
@@ -2315,6 +2652,41 @@ const de_AgentAliasSummary = (output, context) => {
|
|
|
2315
2652
|
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2316
2653
|
});
|
|
2317
2654
|
};
|
|
2655
|
+
const de_AgentCollaborator = (output, context) => {
|
|
2656
|
+
return take(output, {
|
|
2657
|
+
agentDescriptor: _json,
|
|
2658
|
+
agentId: __expectString,
|
|
2659
|
+
agentVersion: __expectString,
|
|
2660
|
+
clientToken: __expectString,
|
|
2661
|
+
collaborationInstruction: __expectString,
|
|
2662
|
+
collaboratorId: __expectString,
|
|
2663
|
+
collaboratorName: __expectString,
|
|
2664
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2665
|
+
lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2666
|
+
relayConversationHistory: __expectString,
|
|
2667
|
+
});
|
|
2668
|
+
};
|
|
2669
|
+
const de_AgentCollaboratorSummaries = (output, context) => {
|
|
2670
|
+
const retVal = (output || [])
|
|
2671
|
+
.filter((e) => e != null)
|
|
2672
|
+
.map((entry) => {
|
|
2673
|
+
return de_AgentCollaboratorSummary(entry, context);
|
|
2674
|
+
});
|
|
2675
|
+
return retVal;
|
|
2676
|
+
};
|
|
2677
|
+
const de_AgentCollaboratorSummary = (output, context) => {
|
|
2678
|
+
return take(output, {
|
|
2679
|
+
agentDescriptor: _json,
|
|
2680
|
+
agentId: __expectString,
|
|
2681
|
+
agentVersion: __expectString,
|
|
2682
|
+
collaborationInstruction: __expectString,
|
|
2683
|
+
collaboratorId: __expectString,
|
|
2684
|
+
collaboratorName: __expectString,
|
|
2685
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2686
|
+
lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2687
|
+
relayConversationHistory: __expectString,
|
|
2688
|
+
});
|
|
2689
|
+
};
|
|
2318
2690
|
const de_AgentKnowledgeBase = (output, context) => {
|
|
2319
2691
|
return take(output, {
|
|
2320
2692
|
agentId: __expectString,
|
|
@@ -2364,6 +2736,7 @@ const de_AgentSummary = (output, context) => {
|
|
|
2364
2736
|
const de_AgentVersion = (output, context) => {
|
|
2365
2737
|
return take(output, {
|
|
2366
2738
|
agentArn: __expectString,
|
|
2739
|
+
agentCollaboration: __expectString,
|
|
2367
2740
|
agentId: __expectString,
|
|
2368
2741
|
agentName: __expectString,
|
|
2369
2742
|
agentResourceRoleArn: __expectString,
|
|
@@ -2644,6 +3017,24 @@ const de_KnowledgeBase = (output, context) => {
|
|
|
2644
3017
|
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2645
3018
|
});
|
|
2646
3019
|
};
|
|
3020
|
+
const de_KnowledgeBaseDocumentDetail = (output, context) => {
|
|
3021
|
+
return take(output, {
|
|
3022
|
+
dataSourceId: __expectString,
|
|
3023
|
+
identifier: _json,
|
|
3024
|
+
knowledgeBaseId: __expectString,
|
|
3025
|
+
status: __expectString,
|
|
3026
|
+
statusReason: __expectString,
|
|
3027
|
+
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
3028
|
+
});
|
|
3029
|
+
};
|
|
3030
|
+
const de_KnowledgeBaseDocumentDetails = (output, context) => {
|
|
3031
|
+
const retVal = (output || [])
|
|
3032
|
+
.filter((e) => e != null)
|
|
3033
|
+
.map((entry) => {
|
|
3034
|
+
return de_KnowledgeBaseDocumentDetail(entry, context);
|
|
3035
|
+
});
|
|
3036
|
+
return retVal;
|
|
3037
|
+
};
|
|
2647
3038
|
const de_KnowledgeBaseSummaries = (output, context) => {
|
|
2648
3039
|
const retVal = (output || [])
|
|
2649
3040
|
.filter((e) => e != null)
|
|
@@ -2664,6 +3055,7 @@ const de_KnowledgeBaseSummary = (output, context) => {
|
|
|
2664
3055
|
const de_PromptConfiguration = (output, context) => {
|
|
2665
3056
|
return take(output, {
|
|
2666
3057
|
basePromptTemplate: __expectString,
|
|
3058
|
+
foundationModel: __expectString,
|
|
2667
3059
|
inferenceConfiguration: (_) => de_InferenceConfiguration(_, context),
|
|
2668
3060
|
parserMode: __expectString,
|
|
2669
3061
|
promptCreationMode: __expectString,
|