@aws-sdk/client-bedrock-agent 3.927.0 → 3.929.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.
Files changed (99) hide show
  1. package/dist-cjs/index.js +4469 -4748
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/BedrockAgentClient.js +2 -0
  4. package/dist-es/commands/AssociateAgentCollaboratorCommand.js +3 -10
  5. package/dist-es/commands/AssociateAgentKnowledgeBaseCommand.js +3 -9
  6. package/dist-es/commands/CreateAgentActionGroupCommand.js +3 -10
  7. package/dist-es/commands/CreateAgentAliasCommand.js +3 -9
  8. package/dist-es/commands/CreateAgentCommand.js +3 -10
  9. package/dist-es/commands/CreateDataSourceCommand.js +3 -10
  10. package/dist-es/commands/CreateFlowAliasCommand.js +3 -9
  11. package/dist-es/commands/CreateFlowCommand.js +3 -10
  12. package/dist-es/commands/CreateFlowVersionCommand.js +3 -10
  13. package/dist-es/commands/CreateKnowledgeBaseCommand.js +3 -10
  14. package/dist-es/commands/CreatePromptCommand.js +3 -10
  15. package/dist-es/commands/CreatePromptVersionCommand.js +3 -10
  16. package/dist-es/commands/DeleteAgentActionGroupCommand.js +3 -9
  17. package/dist-es/commands/DeleteAgentAliasCommand.js +3 -9
  18. package/dist-es/commands/DeleteAgentCommand.js +3 -9
  19. package/dist-es/commands/DeleteAgentVersionCommand.js +3 -9
  20. package/dist-es/commands/DeleteDataSourceCommand.js +3 -9
  21. package/dist-es/commands/DeleteFlowAliasCommand.js +3 -9
  22. package/dist-es/commands/DeleteFlowCommand.js +3 -9
  23. package/dist-es/commands/DeleteFlowVersionCommand.js +3 -9
  24. package/dist-es/commands/DeleteKnowledgeBaseCommand.js +3 -9
  25. package/dist-es/commands/DeleteKnowledgeBaseDocumentsCommand.js +3 -9
  26. package/dist-es/commands/DeletePromptCommand.js +3 -9
  27. package/dist-es/commands/DisassociateAgentCollaboratorCommand.js +3 -9
  28. package/dist-es/commands/DisassociateAgentKnowledgeBaseCommand.js +3 -9
  29. package/dist-es/commands/GetAgentActionGroupCommand.js +3 -10
  30. package/dist-es/commands/GetAgentAliasCommand.js +3 -9
  31. package/dist-es/commands/GetAgentCollaboratorCommand.js +3 -10
  32. package/dist-es/commands/GetAgentCommand.js +3 -10
  33. package/dist-es/commands/GetAgentKnowledgeBaseCommand.js +3 -9
  34. package/dist-es/commands/GetAgentVersionCommand.js +3 -10
  35. package/dist-es/commands/GetDataSourceCommand.js +3 -10
  36. package/dist-es/commands/GetFlowAliasCommand.js +3 -9
  37. package/dist-es/commands/GetFlowCommand.js +3 -10
  38. package/dist-es/commands/GetFlowVersionCommand.js +3 -10
  39. package/dist-es/commands/GetIngestionJobCommand.js +3 -9
  40. package/dist-es/commands/GetKnowledgeBaseCommand.js +3 -10
  41. package/dist-es/commands/GetKnowledgeBaseDocumentsCommand.js +3 -9
  42. package/dist-es/commands/GetPromptCommand.js +3 -10
  43. package/dist-es/commands/IngestKnowledgeBaseDocumentsCommand.js +3 -10
  44. package/dist-es/commands/ListAgentActionGroupsCommand.js +3 -9
  45. package/dist-es/commands/ListAgentAliasesCommand.js +3 -9
  46. package/dist-es/commands/ListAgentCollaboratorsCommand.js +3 -10
  47. package/dist-es/commands/ListAgentKnowledgeBasesCommand.js +3 -9
  48. package/dist-es/commands/ListAgentVersionsCommand.js +3 -9
  49. package/dist-es/commands/ListAgentsCommand.js +3 -9
  50. package/dist-es/commands/ListDataSourcesCommand.js +3 -9
  51. package/dist-es/commands/ListFlowAliasesCommand.js +3 -9
  52. package/dist-es/commands/ListFlowVersionsCommand.js +3 -9
  53. package/dist-es/commands/ListFlowsCommand.js +3 -9
  54. package/dist-es/commands/ListIngestionJobsCommand.js +3 -9
  55. package/dist-es/commands/ListKnowledgeBaseDocumentsCommand.js +3 -9
  56. package/dist-es/commands/ListKnowledgeBasesCommand.js +3 -9
  57. package/dist-es/commands/ListPromptsCommand.js +3 -9
  58. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  59. package/dist-es/commands/PrepareAgentCommand.js +3 -9
  60. package/dist-es/commands/PrepareFlowCommand.js +3 -9
  61. package/dist-es/commands/StartIngestionJobCommand.js +3 -9
  62. package/dist-es/commands/StopIngestionJobCommand.js +3 -9
  63. package/dist-es/commands/TagResourceCommand.js +3 -9
  64. package/dist-es/commands/UntagResourceCommand.js +3 -9
  65. package/dist-es/commands/UpdateAgentActionGroupCommand.js +3 -10
  66. package/dist-es/commands/UpdateAgentAliasCommand.js +3 -9
  67. package/dist-es/commands/UpdateAgentCollaboratorCommand.js +3 -10
  68. package/dist-es/commands/UpdateAgentCommand.js +3 -10
  69. package/dist-es/commands/UpdateAgentKnowledgeBaseCommand.js +3 -9
  70. package/dist-es/commands/UpdateDataSourceCommand.js +3 -10
  71. package/dist-es/commands/UpdateFlowAliasCommand.js +3 -9
  72. package/dist-es/commands/UpdateFlowCommand.js +3 -10
  73. package/dist-es/commands/UpdateKnowledgeBaseCommand.js +3 -10
  74. package/dist-es/commands/UpdatePromptCommand.js +3 -10
  75. package/dist-es/commands/ValidateFlowDefinitionCommand.js +3 -10
  76. package/dist-es/models/models_0.js +0 -453
  77. package/dist-es/models/models_1.js +0 -277
  78. package/dist-es/runtimeConfig.shared.js +2 -0
  79. package/dist-es/schemas/schemas_0.js +4319 -0
  80. package/dist-types/BedrockAgentClient.d.ts +10 -1
  81. package/dist-types/models/models_0.d.ts +0 -276
  82. package/dist-types/models/models_1.d.ts +0 -196
  83. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  84. package/dist-types/runtimeConfig.d.ts +1 -0
  85. package/dist-types/runtimeConfig.native.d.ts +1 -0
  86. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  87. package/dist-types/schemas/schemas_0.d.ts +550 -0
  88. package/dist-types/ts3.4/BedrockAgentClient.d.ts +4 -0
  89. package/dist-types/ts3.4/models/models_0.d.ts +0 -193
  90. package/dist-types/ts3.4/models/models_1.d.ts +0 -145
  91. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  92. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  93. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  94. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  95. package/dist-types/ts3.4/schemas/schemas_0.d.ts +557 -0
  96. package/package.json +5 -6
  97. package/dist-es/protocols/Aws_restJson1.js +0 -3385
  98. package/dist-types/protocols/Aws_restJson1.d.ts +0 -650
  99. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -869
@@ -1,3385 +0,0 @@
1
- import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { BedrockAgentServiceException as __BaseException } from "../models/BedrockAgentServiceException";
6
- import { AccessDeniedException, ConflictException, InternalServerException, PromptFlowNodeSourceConfiguration, PromptInferenceConfiguration, PromptTemplateConfiguration, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, Tool, ToolInputSchema, ValidationException, } from "../models/models_0";
7
- import { FlowNodeConfiguration, } from "../models/models_1";
8
- export const se_AssociateAgentCollaboratorCommand = async (input, context) => {
9
- const b = rb(input, context);
10
- const headers = {
11
- "content-type": "application/json",
12
- };
13
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/agentcollaborators");
14
- b.p("agentId", () => input.agentId, "{agentId}", false);
15
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
16
- let body;
17
- body = JSON.stringify(take(input, {
18
- agentDescriptor: (_) => _json(_),
19
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
20
- collaborationInstruction: [],
21
- collaboratorName: [],
22
- relayConversationHistory: [],
23
- }));
24
- b.m("PUT").h(headers).b(body);
25
- return b.build();
26
- };
27
- export const se_AssociateAgentKnowledgeBaseCommand = async (input, context) => {
28
- const b = rb(input, context);
29
- const headers = {
30
- "content-type": "application/json",
31
- };
32
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/knowledgebases");
33
- b.p("agentId", () => input.agentId, "{agentId}", false);
34
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
35
- let body;
36
- body = JSON.stringify(take(input, {
37
- description: [],
38
- knowledgeBaseId: [],
39
- knowledgeBaseState: [],
40
- }));
41
- b.m("PUT").h(headers).b(body);
42
- return b.build();
43
- };
44
- export const se_CreateAgentCommand = async (input, context) => {
45
- const b = rb(input, context);
46
- const headers = {
47
- "content-type": "application/json",
48
- };
49
- b.bp("/agents");
50
- let body;
51
- body = JSON.stringify(take(input, {
52
- agentCollaboration: [],
53
- agentName: [],
54
- agentResourceRoleArn: [],
55
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
56
- customOrchestration: (_) => _json(_),
57
- customerEncryptionKeyArn: [],
58
- description: [],
59
- foundationModel: [],
60
- guardrailConfiguration: (_) => _json(_),
61
- idleSessionTTLInSeconds: [],
62
- instruction: [],
63
- memoryConfiguration: (_) => _json(_),
64
- orchestrationType: [],
65
- promptOverrideConfiguration: (_) => se_PromptOverrideConfiguration(_, context),
66
- tags: (_) => _json(_),
67
- }));
68
- b.m("PUT").h(headers).b(body);
69
- return b.build();
70
- };
71
- export const se_CreateAgentActionGroupCommand = async (input, context) => {
72
- const b = rb(input, context);
73
- const headers = {
74
- "content-type": "application/json",
75
- };
76
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/actiongroups");
77
- b.p("agentId", () => input.agentId, "{agentId}", false);
78
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
79
- let body;
80
- body = JSON.stringify(take(input, {
81
- actionGroupExecutor: (_) => _json(_),
82
- actionGroupName: [],
83
- actionGroupState: [],
84
- apiSchema: (_) => _json(_),
85
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
86
- description: [],
87
- functionSchema: (_) => _json(_),
88
- parentActionGroupSignature: [],
89
- parentActionGroupSignatureParams: (_) => _json(_),
90
- }));
91
- b.m("PUT").h(headers).b(body);
92
- return b.build();
93
- };
94
- export const se_CreateAgentAliasCommand = async (input, context) => {
95
- const b = rb(input, context);
96
- const headers = {
97
- "content-type": "application/json",
98
- };
99
- b.bp("/agents/{agentId}/agentaliases");
100
- b.p("agentId", () => input.agentId, "{agentId}", false);
101
- let body;
102
- body = JSON.stringify(take(input, {
103
- agentAliasName: [],
104
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
105
- description: [],
106
- routingConfiguration: (_) => _json(_),
107
- tags: (_) => _json(_),
108
- }));
109
- b.m("PUT").h(headers).b(body);
110
- return b.build();
111
- };
112
- export const se_CreateDataSourceCommand = async (input, context) => {
113
- const b = rb(input, context);
114
- const headers = {
115
- "content-type": "application/json",
116
- };
117
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources");
118
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
119
- let body;
120
- body = JSON.stringify(take(input, {
121
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
122
- dataDeletionPolicy: [],
123
- dataSourceConfiguration: (_) => _json(_),
124
- description: [],
125
- name: [],
126
- serverSideEncryptionConfiguration: (_) => _json(_),
127
- vectorIngestionConfiguration: (_) => _json(_),
128
- }));
129
- b.m("PUT").h(headers).b(body);
130
- return b.build();
131
- };
132
- export const se_CreateFlowCommand = async (input, context) => {
133
- const b = rb(input, context);
134
- const headers = {
135
- "content-type": "application/json",
136
- };
137
- b.bp("/flows");
138
- let body;
139
- body = JSON.stringify(take(input, {
140
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
141
- customerEncryptionKeyArn: [],
142
- definition: (_) => se_FlowDefinition(_, context),
143
- description: [],
144
- executionRoleArn: [],
145
- name: [],
146
- tags: (_) => _json(_),
147
- }));
148
- b.m("POST").h(headers).b(body);
149
- return b.build();
150
- };
151
- export const se_CreateFlowAliasCommand = async (input, context) => {
152
- const b = rb(input, context);
153
- const headers = {
154
- "content-type": "application/json",
155
- };
156
- b.bp("/flows/{flowIdentifier}/aliases");
157
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
158
- let body;
159
- body = JSON.stringify(take(input, {
160
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
161
- concurrencyConfiguration: (_) => _json(_),
162
- description: [],
163
- name: [],
164
- routingConfiguration: (_) => _json(_),
165
- tags: (_) => _json(_),
166
- }));
167
- b.m("POST").h(headers).b(body);
168
- return b.build();
169
- };
170
- export const se_CreateFlowVersionCommand = async (input, context) => {
171
- const b = rb(input, context);
172
- const headers = {
173
- "content-type": "application/json",
174
- };
175
- b.bp("/flows/{flowIdentifier}/versions");
176
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
177
- let body;
178
- body = JSON.stringify(take(input, {
179
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
180
- description: [],
181
- }));
182
- b.m("POST").h(headers).b(body);
183
- return b.build();
184
- };
185
- export const se_CreateKnowledgeBaseCommand = async (input, context) => {
186
- const b = rb(input, context);
187
- const headers = {
188
- "content-type": "application/json",
189
- };
190
- b.bp("/knowledgebases");
191
- let body;
192
- body = JSON.stringify(take(input, {
193
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
194
- description: [],
195
- knowledgeBaseConfiguration: (_) => _json(_),
196
- name: [],
197
- roleArn: [],
198
- storageConfiguration: (_) => _json(_),
199
- tags: (_) => _json(_),
200
- }));
201
- b.m("PUT").h(headers).b(body);
202
- return b.build();
203
- };
204
- export const se_CreatePromptCommand = async (input, context) => {
205
- const b = rb(input, context);
206
- const headers = {
207
- "content-type": "application/json",
208
- };
209
- b.bp("/prompts");
210
- let body;
211
- body = JSON.stringify(take(input, {
212
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
213
- customerEncryptionKeyArn: [],
214
- defaultVariant: [],
215
- description: [],
216
- name: [],
217
- tags: (_) => _json(_),
218
- variants: (_) => se_PromptVariantList(_, context),
219
- }));
220
- b.m("POST").h(headers).b(body);
221
- return b.build();
222
- };
223
- export const se_CreatePromptVersionCommand = async (input, context) => {
224
- const b = rb(input, context);
225
- const headers = {
226
- "content-type": "application/json",
227
- };
228
- b.bp("/prompts/{promptIdentifier}/versions");
229
- b.p("promptIdentifier", () => input.promptIdentifier, "{promptIdentifier}", false);
230
- let body;
231
- body = JSON.stringify(take(input, {
232
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
233
- description: [],
234
- tags: (_) => _json(_),
235
- }));
236
- b.m("POST").h(headers).b(body);
237
- return b.build();
238
- };
239
- export const se_DeleteAgentCommand = async (input, context) => {
240
- const b = rb(input, context);
241
- const headers = {};
242
- b.bp("/agents/{agentId}");
243
- b.p("agentId", () => input.agentId, "{agentId}", false);
244
- const query = map({
245
- [_sRIUC]: [() => input.skipResourceInUseCheck !== void 0, () => input[_sRIUC].toString()],
246
- });
247
- let body;
248
- b.m("DELETE").h(headers).q(query).b(body);
249
- return b.build();
250
- };
251
- export const se_DeleteAgentActionGroupCommand = async (input, context) => {
252
- const b = rb(input, context);
253
- const headers = {};
254
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}");
255
- b.p("agentId", () => input.agentId, "{agentId}", false);
256
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
257
- b.p("actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
258
- const query = map({
259
- [_sRIUC]: [() => input.skipResourceInUseCheck !== void 0, () => input[_sRIUC].toString()],
260
- });
261
- let body;
262
- b.m("DELETE").h(headers).q(query).b(body);
263
- return b.build();
264
- };
265
- export const se_DeleteAgentAliasCommand = async (input, context) => {
266
- const b = rb(input, context);
267
- const headers = {};
268
- b.bp("/agents/{agentId}/agentaliases/{agentAliasId}");
269
- b.p("agentId", () => input.agentId, "{agentId}", false);
270
- b.p("agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
271
- let body;
272
- b.m("DELETE").h(headers).b(body);
273
- return b.build();
274
- };
275
- export const se_DeleteAgentVersionCommand = async (input, context) => {
276
- const b = rb(input, context);
277
- const headers = {};
278
- b.bp("/agents/{agentId}/agentversions/{agentVersion}");
279
- b.p("agentId", () => input.agentId, "{agentId}", false);
280
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
281
- const query = map({
282
- [_sRIUC]: [() => input.skipResourceInUseCheck !== void 0, () => input[_sRIUC].toString()],
283
- });
284
- let body;
285
- b.m("DELETE").h(headers).q(query).b(body);
286
- return b.build();
287
- };
288
- export const se_DeleteDataSourceCommand = async (input, context) => {
289
- const b = rb(input, context);
290
- const headers = {};
291
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}");
292
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
293
- b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
294
- let body;
295
- b.m("DELETE").h(headers).b(body);
296
- return b.build();
297
- };
298
- export const se_DeleteFlowCommand = async (input, context) => {
299
- const b = rb(input, context);
300
- const headers = {};
301
- b.bp("/flows/{flowIdentifier}");
302
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
303
- const query = map({
304
- [_sRIUC]: [() => input.skipResourceInUseCheck !== void 0, () => input[_sRIUC].toString()],
305
- });
306
- let body;
307
- b.m("DELETE").h(headers).q(query).b(body);
308
- return b.build();
309
- };
310
- export const se_DeleteFlowAliasCommand = async (input, context) => {
311
- const b = rb(input, context);
312
- const headers = {};
313
- b.bp("/flows/{flowIdentifier}/aliases/{aliasIdentifier}");
314
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
315
- b.p("aliasIdentifier", () => input.aliasIdentifier, "{aliasIdentifier}", false);
316
- let body;
317
- b.m("DELETE").h(headers).b(body);
318
- return b.build();
319
- };
320
- export const se_DeleteFlowVersionCommand = async (input, context) => {
321
- const b = rb(input, context);
322
- const headers = {};
323
- b.bp("/flows/{flowIdentifier}/versions/{flowVersion}");
324
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
325
- b.p("flowVersion", () => input.flowVersion, "{flowVersion}", false);
326
- const query = map({
327
- [_sRIUC]: [() => input.skipResourceInUseCheck !== void 0, () => input[_sRIUC].toString()],
328
- });
329
- let body;
330
- b.m("DELETE").h(headers).q(query).b(body);
331
- return b.build();
332
- };
333
- export const se_DeleteKnowledgeBaseCommand = async (input, context) => {
334
- const b = rb(input, context);
335
- const headers = {};
336
- b.bp("/knowledgebases/{knowledgeBaseId}");
337
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
338
- let body;
339
- b.m("DELETE").h(headers).b(body);
340
- return b.build();
341
- };
342
- export const se_DeleteKnowledgeBaseDocumentsCommand = async (input, context) => {
343
- const b = rb(input, context);
344
- const headers = {
345
- "content-type": "application/json",
346
- };
347
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents/deleteDocuments");
348
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
349
- b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
350
- let body;
351
- body = JSON.stringify(take(input, {
352
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
353
- documentIdentifiers: (_) => _json(_),
354
- }));
355
- b.m("POST").h(headers).b(body);
356
- return b.build();
357
- };
358
- export const se_DeletePromptCommand = async (input, context) => {
359
- const b = rb(input, context);
360
- const headers = {};
361
- b.bp("/prompts/{promptIdentifier}");
362
- b.p("promptIdentifier", () => input.promptIdentifier, "{promptIdentifier}", false);
363
- const query = map({
364
- [_pV]: [, input[_pV]],
365
- });
366
- let body;
367
- b.m("DELETE").h(headers).q(query).b(body);
368
- return b.build();
369
- };
370
- export const se_DisassociateAgentCollaboratorCommand = async (input, context) => {
371
- const b = rb(input, context);
372
- const headers = {};
373
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/agentcollaborators/{collaboratorId}");
374
- b.p("agentId", () => input.agentId, "{agentId}", false);
375
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
376
- b.p("collaboratorId", () => input.collaboratorId, "{collaboratorId}", false);
377
- let body;
378
- b.m("DELETE").h(headers).b(body);
379
- return b.build();
380
- };
381
- export const se_DisassociateAgentKnowledgeBaseCommand = async (input, context) => {
382
- const b = rb(input, context);
383
- const headers = {};
384
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}");
385
- b.p("agentId", () => input.agentId, "{agentId}", false);
386
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
387
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
388
- let body;
389
- b.m("DELETE").h(headers).b(body);
390
- return b.build();
391
- };
392
- export const se_GetAgentCommand = async (input, context) => {
393
- const b = rb(input, context);
394
- const headers = {};
395
- b.bp("/agents/{agentId}");
396
- b.p("agentId", () => input.agentId, "{agentId}", false);
397
- let body;
398
- b.m("GET").h(headers).b(body);
399
- return b.build();
400
- };
401
- export const se_GetAgentActionGroupCommand = async (input, context) => {
402
- const b = rb(input, context);
403
- const headers = {};
404
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}");
405
- b.p("agentId", () => input.agentId, "{agentId}", false);
406
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
407
- b.p("actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
408
- let body;
409
- b.m("GET").h(headers).b(body);
410
- return b.build();
411
- };
412
- export const se_GetAgentAliasCommand = async (input, context) => {
413
- const b = rb(input, context);
414
- const headers = {};
415
- b.bp("/agents/{agentId}/agentaliases/{agentAliasId}");
416
- b.p("agentId", () => input.agentId, "{agentId}", false);
417
- b.p("agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
418
- let body;
419
- b.m("GET").h(headers).b(body);
420
- return b.build();
421
- };
422
- export const se_GetAgentCollaboratorCommand = async (input, context) => {
423
- const b = rb(input, context);
424
- const headers = {};
425
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/agentcollaborators/{collaboratorId}");
426
- b.p("agentId", () => input.agentId, "{agentId}", false);
427
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
428
- b.p("collaboratorId", () => input.collaboratorId, "{collaboratorId}", false);
429
- let body;
430
- b.m("GET").h(headers).b(body);
431
- return b.build();
432
- };
433
- export const se_GetAgentKnowledgeBaseCommand = async (input, context) => {
434
- const b = rb(input, context);
435
- const headers = {};
436
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}");
437
- b.p("agentId", () => input.agentId, "{agentId}", false);
438
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
439
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
440
- let body;
441
- b.m("GET").h(headers).b(body);
442
- return b.build();
443
- };
444
- export const se_GetAgentVersionCommand = async (input, context) => {
445
- const b = rb(input, context);
446
- const headers = {};
447
- b.bp("/agents/{agentId}/agentversions/{agentVersion}");
448
- b.p("agentId", () => input.agentId, "{agentId}", false);
449
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
450
- let body;
451
- b.m("GET").h(headers).b(body);
452
- return b.build();
453
- };
454
- export const se_GetDataSourceCommand = async (input, context) => {
455
- const b = rb(input, context);
456
- const headers = {};
457
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}");
458
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
459
- b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
460
- let body;
461
- b.m("GET").h(headers).b(body);
462
- return b.build();
463
- };
464
- export const se_GetFlowCommand = async (input, context) => {
465
- const b = rb(input, context);
466
- const headers = {};
467
- b.bp("/flows/{flowIdentifier}");
468
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
469
- let body;
470
- b.m("GET").h(headers).b(body);
471
- return b.build();
472
- };
473
- export const se_GetFlowAliasCommand = async (input, context) => {
474
- const b = rb(input, context);
475
- const headers = {};
476
- b.bp("/flows/{flowIdentifier}/aliases/{aliasIdentifier}");
477
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
478
- b.p("aliasIdentifier", () => input.aliasIdentifier, "{aliasIdentifier}", false);
479
- let body;
480
- b.m("GET").h(headers).b(body);
481
- return b.build();
482
- };
483
- export const se_GetFlowVersionCommand = async (input, context) => {
484
- const b = rb(input, context);
485
- const headers = {};
486
- b.bp("/flows/{flowIdentifier}/versions/{flowVersion}");
487
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
488
- b.p("flowVersion", () => input.flowVersion, "{flowVersion}", false);
489
- let body;
490
- b.m("GET").h(headers).b(body);
491
- return b.build();
492
- };
493
- export const se_GetIngestionJobCommand = async (input, context) => {
494
- const b = rb(input, context);
495
- const headers = {};
496
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs/{ingestionJobId}");
497
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
498
- b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
499
- b.p("ingestionJobId", () => input.ingestionJobId, "{ingestionJobId}", false);
500
- let body;
501
- b.m("GET").h(headers).b(body);
502
- return b.build();
503
- };
504
- export const se_GetKnowledgeBaseCommand = async (input, context) => {
505
- const b = rb(input, context);
506
- const headers = {};
507
- b.bp("/knowledgebases/{knowledgeBaseId}");
508
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
509
- let body;
510
- b.m("GET").h(headers).b(body);
511
- return b.build();
512
- };
513
- export const se_GetKnowledgeBaseDocumentsCommand = async (input, context) => {
514
- const b = rb(input, context);
515
- const headers = {
516
- "content-type": "application/json",
517
- };
518
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents/getDocuments");
519
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
520
- b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
521
- let body;
522
- body = JSON.stringify(take(input, {
523
- documentIdentifiers: (_) => _json(_),
524
- }));
525
- b.m("POST").h(headers).b(body);
526
- return b.build();
527
- };
528
- export const se_GetPromptCommand = async (input, context) => {
529
- const b = rb(input, context);
530
- const headers = {};
531
- b.bp("/prompts/{promptIdentifier}");
532
- b.p("promptIdentifier", () => input.promptIdentifier, "{promptIdentifier}", false);
533
- const query = map({
534
- [_pV]: [, input[_pV]],
535
- });
536
- let body;
537
- b.m("GET").h(headers).q(query).b(body);
538
- return b.build();
539
- };
540
- export const se_IngestKnowledgeBaseDocumentsCommand = async (input, context) => {
541
- const b = rb(input, context);
542
- const headers = {
543
- "content-type": "application/json",
544
- };
545
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents");
546
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
547
- b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
548
- let body;
549
- body = JSON.stringify(take(input, {
550
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
551
- documents: (_) => se_KnowledgeBaseDocuments(_, context),
552
- }));
553
- b.m("PUT").h(headers).b(body);
554
- return b.build();
555
- };
556
- export const se_ListAgentActionGroupsCommand = async (input, context) => {
557
- const b = rb(input, context);
558
- const headers = {
559
- "content-type": "application/json",
560
- };
561
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/actiongroups");
562
- b.p("agentId", () => input.agentId, "{agentId}", false);
563
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
564
- let body;
565
- body = JSON.stringify(take(input, {
566
- maxResults: [],
567
- nextToken: [],
568
- }));
569
- b.m("POST").h(headers).b(body);
570
- return b.build();
571
- };
572
- export const se_ListAgentAliasesCommand = async (input, context) => {
573
- const b = rb(input, context);
574
- const headers = {
575
- "content-type": "application/json",
576
- };
577
- b.bp("/agents/{agentId}/agentaliases");
578
- b.p("agentId", () => input.agentId, "{agentId}", false);
579
- let body;
580
- body = JSON.stringify(take(input, {
581
- maxResults: [],
582
- nextToken: [],
583
- }));
584
- b.m("POST").h(headers).b(body);
585
- return b.build();
586
- };
587
- export const se_ListAgentCollaboratorsCommand = async (input, context) => {
588
- const b = rb(input, context);
589
- const headers = {
590
- "content-type": "application/json",
591
- };
592
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/agentcollaborators");
593
- b.p("agentId", () => input.agentId, "{agentId}", false);
594
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
595
- let body;
596
- body = JSON.stringify(take(input, {
597
- maxResults: [],
598
- nextToken: [],
599
- }));
600
- b.m("POST").h(headers).b(body);
601
- return b.build();
602
- };
603
- export const se_ListAgentKnowledgeBasesCommand = async (input, context) => {
604
- const b = rb(input, context);
605
- const headers = {
606
- "content-type": "application/json",
607
- };
608
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/knowledgebases");
609
- b.p("agentId", () => input.agentId, "{agentId}", false);
610
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
611
- let body;
612
- body = JSON.stringify(take(input, {
613
- maxResults: [],
614
- nextToken: [],
615
- }));
616
- b.m("POST").h(headers).b(body);
617
- return b.build();
618
- };
619
- export const se_ListAgentsCommand = async (input, context) => {
620
- const b = rb(input, context);
621
- const headers = {
622
- "content-type": "application/json",
623
- };
624
- b.bp("/agents");
625
- let body;
626
- body = JSON.stringify(take(input, {
627
- maxResults: [],
628
- nextToken: [],
629
- }));
630
- b.m("POST").h(headers).b(body);
631
- return b.build();
632
- };
633
- export const se_ListAgentVersionsCommand = async (input, context) => {
634
- const b = rb(input, context);
635
- const headers = {
636
- "content-type": "application/json",
637
- };
638
- b.bp("/agents/{agentId}/agentversions");
639
- b.p("agentId", () => input.agentId, "{agentId}", false);
640
- let body;
641
- body = JSON.stringify(take(input, {
642
- maxResults: [],
643
- nextToken: [],
644
- }));
645
- b.m("POST").h(headers).b(body);
646
- return b.build();
647
- };
648
- export const se_ListDataSourcesCommand = async (input, context) => {
649
- const b = rb(input, context);
650
- const headers = {
651
- "content-type": "application/json",
652
- };
653
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources");
654
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
655
- let body;
656
- body = JSON.stringify(take(input, {
657
- maxResults: [],
658
- nextToken: [],
659
- }));
660
- b.m("POST").h(headers).b(body);
661
- return b.build();
662
- };
663
- export const se_ListFlowAliasesCommand = async (input, context) => {
664
- const b = rb(input, context);
665
- const headers = {};
666
- b.bp("/flows/{flowIdentifier}/aliases");
667
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
668
- const query = map({
669
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
670
- [_nT]: [, input[_nT]],
671
- });
672
- let body;
673
- b.m("GET").h(headers).q(query).b(body);
674
- return b.build();
675
- };
676
- export const se_ListFlowsCommand = async (input, context) => {
677
- const b = rb(input, context);
678
- const headers = {};
679
- b.bp("/flows");
680
- const query = map({
681
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
682
- [_nT]: [, input[_nT]],
683
- });
684
- let body;
685
- b.m("GET").h(headers).q(query).b(body);
686
- return b.build();
687
- };
688
- export const se_ListFlowVersionsCommand = async (input, context) => {
689
- const b = rb(input, context);
690
- const headers = {};
691
- b.bp("/flows/{flowIdentifier}/versions");
692
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
693
- const query = map({
694
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
695
- [_nT]: [, input[_nT]],
696
- });
697
- let body;
698
- b.m("GET").h(headers).q(query).b(body);
699
- return b.build();
700
- };
701
- export const se_ListIngestionJobsCommand = async (input, context) => {
702
- const b = rb(input, context);
703
- const headers = {
704
- "content-type": "application/json",
705
- };
706
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs");
707
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
708
- b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
709
- let body;
710
- body = JSON.stringify(take(input, {
711
- filters: (_) => _json(_),
712
- maxResults: [],
713
- nextToken: [],
714
- sortBy: (_) => _json(_),
715
- }));
716
- b.m("POST").h(headers).b(body);
717
- return b.build();
718
- };
719
- export const se_ListKnowledgeBaseDocumentsCommand = async (input, context) => {
720
- const b = rb(input, context);
721
- const headers = {
722
- "content-type": "application/json",
723
- };
724
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents");
725
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
726
- b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
727
- let body;
728
- body = JSON.stringify(take(input, {
729
- maxResults: [],
730
- nextToken: [],
731
- }));
732
- b.m("POST").h(headers).b(body);
733
- return b.build();
734
- };
735
- export const se_ListKnowledgeBasesCommand = async (input, context) => {
736
- const b = rb(input, context);
737
- const headers = {
738
- "content-type": "application/json",
739
- };
740
- b.bp("/knowledgebases");
741
- let body;
742
- body = JSON.stringify(take(input, {
743
- maxResults: [],
744
- nextToken: [],
745
- }));
746
- b.m("POST").h(headers).b(body);
747
- return b.build();
748
- };
749
- export const se_ListPromptsCommand = async (input, context) => {
750
- const b = rb(input, context);
751
- const headers = {};
752
- b.bp("/prompts");
753
- const query = map({
754
- [_pI]: [, input[_pI]],
755
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
756
- [_nT]: [, input[_nT]],
757
- });
758
- let body;
759
- b.m("GET").h(headers).q(query).b(body);
760
- return b.build();
761
- };
762
- export const se_ListTagsForResourceCommand = async (input, context) => {
763
- const b = rb(input, context);
764
- const headers = {};
765
- b.bp("/tags/{resourceArn}");
766
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
767
- let body;
768
- b.m("GET").h(headers).b(body);
769
- return b.build();
770
- };
771
- export const se_PrepareAgentCommand = async (input, context) => {
772
- const b = rb(input, context);
773
- const headers = {};
774
- b.bp("/agents/{agentId}");
775
- b.p("agentId", () => input.agentId, "{agentId}", false);
776
- let body;
777
- b.m("POST").h(headers).b(body);
778
- return b.build();
779
- };
780
- export const se_PrepareFlowCommand = async (input, context) => {
781
- const b = rb(input, context);
782
- const headers = {};
783
- b.bp("/flows/{flowIdentifier}");
784
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
785
- let body;
786
- b.m("POST").h(headers).b(body);
787
- return b.build();
788
- };
789
- export const se_StartIngestionJobCommand = async (input, context) => {
790
- const b = rb(input, context);
791
- const headers = {
792
- "content-type": "application/json",
793
- };
794
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs");
795
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
796
- b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
797
- let body;
798
- body = JSON.stringify(take(input, {
799
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
800
- description: [],
801
- }));
802
- b.m("PUT").h(headers).b(body);
803
- return b.build();
804
- };
805
- export const se_StopIngestionJobCommand = async (input, context) => {
806
- const b = rb(input, context);
807
- const headers = {};
808
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs/{ingestionJobId}/stop");
809
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
810
- b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
811
- b.p("ingestionJobId", () => input.ingestionJobId, "{ingestionJobId}", false);
812
- let body;
813
- b.m("POST").h(headers).b(body);
814
- return b.build();
815
- };
816
- export const se_TagResourceCommand = async (input, context) => {
817
- const b = rb(input, context);
818
- const headers = {
819
- "content-type": "application/json",
820
- };
821
- b.bp("/tags/{resourceArn}");
822
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
823
- let body;
824
- body = JSON.stringify(take(input, {
825
- tags: (_) => _json(_),
826
- }));
827
- b.m("POST").h(headers).b(body);
828
- return b.build();
829
- };
830
- export const se_UntagResourceCommand = async (input, context) => {
831
- const b = rb(input, context);
832
- const headers = {};
833
- b.bp("/tags/{resourceArn}");
834
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
835
- const query = map({
836
- [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
837
- });
838
- let body;
839
- b.m("DELETE").h(headers).q(query).b(body);
840
- return b.build();
841
- };
842
- export const se_UpdateAgentCommand = async (input, context) => {
843
- const b = rb(input, context);
844
- const headers = {
845
- "content-type": "application/json",
846
- };
847
- b.bp("/agents/{agentId}");
848
- b.p("agentId", () => input.agentId, "{agentId}", false);
849
- let body;
850
- body = JSON.stringify(take(input, {
851
- agentCollaboration: [],
852
- agentName: [],
853
- agentResourceRoleArn: [],
854
- customOrchestration: (_) => _json(_),
855
- customerEncryptionKeyArn: [],
856
- description: [],
857
- foundationModel: [],
858
- guardrailConfiguration: (_) => _json(_),
859
- idleSessionTTLInSeconds: [],
860
- instruction: [],
861
- memoryConfiguration: (_) => _json(_),
862
- orchestrationType: [],
863
- promptOverrideConfiguration: (_) => se_PromptOverrideConfiguration(_, context),
864
- }));
865
- b.m("PUT").h(headers).b(body);
866
- return b.build();
867
- };
868
- export const se_UpdateAgentActionGroupCommand = async (input, context) => {
869
- const b = rb(input, context);
870
- const headers = {
871
- "content-type": "application/json",
872
- };
873
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}");
874
- b.p("agentId", () => input.agentId, "{agentId}", false);
875
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
876
- b.p("actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
877
- let body;
878
- body = JSON.stringify(take(input, {
879
- actionGroupExecutor: (_) => _json(_),
880
- actionGroupName: [],
881
- actionGroupState: [],
882
- apiSchema: (_) => _json(_),
883
- description: [],
884
- functionSchema: (_) => _json(_),
885
- parentActionGroupSignature: [],
886
- parentActionGroupSignatureParams: (_) => _json(_),
887
- }));
888
- b.m("PUT").h(headers).b(body);
889
- return b.build();
890
- };
891
- export const se_UpdateAgentAliasCommand = async (input, context) => {
892
- const b = rb(input, context);
893
- const headers = {
894
- "content-type": "application/json",
895
- };
896
- b.bp("/agents/{agentId}/agentaliases/{agentAliasId}");
897
- b.p("agentId", () => input.agentId, "{agentId}", false);
898
- b.p("agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
899
- let body;
900
- body = JSON.stringify(take(input, {
901
- agentAliasName: [],
902
- aliasInvocationState: [],
903
- description: [],
904
- routingConfiguration: (_) => _json(_),
905
- }));
906
- b.m("PUT").h(headers).b(body);
907
- return b.build();
908
- };
909
- export const se_UpdateAgentCollaboratorCommand = async (input, context) => {
910
- const b = rb(input, context);
911
- const headers = {
912
- "content-type": "application/json",
913
- };
914
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/agentcollaborators/{collaboratorId}");
915
- b.p("agentId", () => input.agentId, "{agentId}", false);
916
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
917
- b.p("collaboratorId", () => input.collaboratorId, "{collaboratorId}", false);
918
- let body;
919
- body = JSON.stringify(take(input, {
920
- agentDescriptor: (_) => _json(_),
921
- collaborationInstruction: [],
922
- collaboratorName: [],
923
- relayConversationHistory: [],
924
- }));
925
- b.m("PUT").h(headers).b(body);
926
- return b.build();
927
- };
928
- export const se_UpdateAgentKnowledgeBaseCommand = async (input, context) => {
929
- const b = rb(input, context);
930
- const headers = {
931
- "content-type": "application/json",
932
- };
933
- b.bp("/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}");
934
- b.p("agentId", () => input.agentId, "{agentId}", false);
935
- b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
936
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
937
- let body;
938
- body = JSON.stringify(take(input, {
939
- description: [],
940
- knowledgeBaseState: [],
941
- }));
942
- b.m("PUT").h(headers).b(body);
943
- return b.build();
944
- };
945
- export const se_UpdateDataSourceCommand = async (input, context) => {
946
- const b = rb(input, context);
947
- const headers = {
948
- "content-type": "application/json",
949
- };
950
- b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}");
951
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
952
- b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
953
- let body;
954
- body = JSON.stringify(take(input, {
955
- dataDeletionPolicy: [],
956
- dataSourceConfiguration: (_) => _json(_),
957
- description: [],
958
- name: [],
959
- serverSideEncryptionConfiguration: (_) => _json(_),
960
- vectorIngestionConfiguration: (_) => _json(_),
961
- }));
962
- b.m("PUT").h(headers).b(body);
963
- return b.build();
964
- };
965
- export const se_UpdateFlowCommand = async (input, context) => {
966
- const b = rb(input, context);
967
- const headers = {
968
- "content-type": "application/json",
969
- };
970
- b.bp("/flows/{flowIdentifier}");
971
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
972
- let body;
973
- body = JSON.stringify(take(input, {
974
- customerEncryptionKeyArn: [],
975
- definition: (_) => se_FlowDefinition(_, context),
976
- description: [],
977
- executionRoleArn: [],
978
- name: [],
979
- }));
980
- b.m("PUT").h(headers).b(body);
981
- return b.build();
982
- };
983
- export const se_UpdateFlowAliasCommand = async (input, context) => {
984
- const b = rb(input, context);
985
- const headers = {
986
- "content-type": "application/json",
987
- };
988
- b.bp("/flows/{flowIdentifier}/aliases/{aliasIdentifier}");
989
- b.p("flowIdentifier", () => input.flowIdentifier, "{flowIdentifier}", false);
990
- b.p("aliasIdentifier", () => input.aliasIdentifier, "{aliasIdentifier}", false);
991
- let body;
992
- body = JSON.stringify(take(input, {
993
- concurrencyConfiguration: (_) => _json(_),
994
- description: [],
995
- name: [],
996
- routingConfiguration: (_) => _json(_),
997
- }));
998
- b.m("PUT").h(headers).b(body);
999
- return b.build();
1000
- };
1001
- export const se_UpdateKnowledgeBaseCommand = async (input, context) => {
1002
- const b = rb(input, context);
1003
- const headers = {
1004
- "content-type": "application/json",
1005
- };
1006
- b.bp("/knowledgebases/{knowledgeBaseId}");
1007
- b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
1008
- let body;
1009
- body = JSON.stringify(take(input, {
1010
- description: [],
1011
- knowledgeBaseConfiguration: (_) => _json(_),
1012
- name: [],
1013
- roleArn: [],
1014
- storageConfiguration: (_) => _json(_),
1015
- }));
1016
- b.m("PUT").h(headers).b(body);
1017
- return b.build();
1018
- };
1019
- export const se_UpdatePromptCommand = async (input, context) => {
1020
- const b = rb(input, context);
1021
- const headers = {
1022
- "content-type": "application/json",
1023
- };
1024
- b.bp("/prompts/{promptIdentifier}");
1025
- b.p("promptIdentifier", () => input.promptIdentifier, "{promptIdentifier}", false);
1026
- let body;
1027
- body = JSON.stringify(take(input, {
1028
- customerEncryptionKeyArn: [],
1029
- defaultVariant: [],
1030
- description: [],
1031
- name: [],
1032
- variants: (_) => se_PromptVariantList(_, context),
1033
- }));
1034
- b.m("PUT").h(headers).b(body);
1035
- return b.build();
1036
- };
1037
- export const se_ValidateFlowDefinitionCommand = async (input, context) => {
1038
- const b = rb(input, context);
1039
- const headers = {
1040
- "content-type": "application/json",
1041
- };
1042
- b.bp("/flows/validate-definition");
1043
- let body;
1044
- body = JSON.stringify(take(input, {
1045
- definition: (_) => se_FlowDefinition(_, context),
1046
- }));
1047
- b.m("POST").h(headers).b(body);
1048
- return b.build();
1049
- };
1050
- export const de_AssociateAgentCollaboratorCommand = async (output, context) => {
1051
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1052
- return de_CommandError(output, context);
1053
- }
1054
- const contents = map({
1055
- $metadata: deserializeMetadata(output),
1056
- });
1057
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1058
- const doc = take(data, {
1059
- agentCollaborator: (_) => de_AgentCollaborator(_, context),
1060
- });
1061
- Object.assign(contents, doc);
1062
- return contents;
1063
- };
1064
- export const de_AssociateAgentKnowledgeBaseCommand = async (output, context) => {
1065
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1066
- return de_CommandError(output, context);
1067
- }
1068
- const contents = map({
1069
- $metadata: deserializeMetadata(output),
1070
- });
1071
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1072
- const doc = take(data, {
1073
- agentKnowledgeBase: (_) => de_AgentKnowledgeBase(_, context),
1074
- });
1075
- Object.assign(contents, doc);
1076
- return contents;
1077
- };
1078
- export const de_CreateAgentCommand = async (output, context) => {
1079
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1080
- return de_CommandError(output, context);
1081
- }
1082
- const contents = map({
1083
- $metadata: deserializeMetadata(output),
1084
- });
1085
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1086
- const doc = take(data, {
1087
- agent: (_) => de_Agent(_, context),
1088
- });
1089
- Object.assign(contents, doc);
1090
- return contents;
1091
- };
1092
- export const de_CreateAgentActionGroupCommand = async (output, context) => {
1093
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1094
- return de_CommandError(output, context);
1095
- }
1096
- const contents = map({
1097
- $metadata: deserializeMetadata(output),
1098
- });
1099
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1100
- const doc = take(data, {
1101
- agentActionGroup: (_) => de_AgentActionGroup(_, context),
1102
- });
1103
- Object.assign(contents, doc);
1104
- return contents;
1105
- };
1106
- export const de_CreateAgentAliasCommand = async (output, context) => {
1107
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1108
- return de_CommandError(output, context);
1109
- }
1110
- const contents = map({
1111
- $metadata: deserializeMetadata(output),
1112
- });
1113
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1114
- const doc = take(data, {
1115
- agentAlias: (_) => de_AgentAlias(_, context),
1116
- });
1117
- Object.assign(contents, doc);
1118
- return contents;
1119
- };
1120
- export const de_CreateDataSourceCommand = async (output, context) => {
1121
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1122
- return de_CommandError(output, context);
1123
- }
1124
- const contents = map({
1125
- $metadata: deserializeMetadata(output),
1126
- });
1127
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1128
- const doc = take(data, {
1129
- dataSource: (_) => de_DataSource(_, context),
1130
- });
1131
- Object.assign(contents, doc);
1132
- return contents;
1133
- };
1134
- export const de_CreateFlowCommand = async (output, context) => {
1135
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1136
- return de_CommandError(output, context);
1137
- }
1138
- const contents = map({
1139
- $metadata: deserializeMetadata(output),
1140
- });
1141
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1142
- const doc = take(data, {
1143
- arn: __expectString,
1144
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1145
- customerEncryptionKeyArn: __expectString,
1146
- definition: (_) => de_FlowDefinition(_, context),
1147
- description: __expectString,
1148
- executionRoleArn: __expectString,
1149
- id: __expectString,
1150
- name: __expectString,
1151
- status: __expectString,
1152
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1153
- version: __expectString,
1154
- });
1155
- Object.assign(contents, doc);
1156
- return contents;
1157
- };
1158
- export const de_CreateFlowAliasCommand = async (output, context) => {
1159
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1160
- return de_CommandError(output, context);
1161
- }
1162
- const contents = map({
1163
- $metadata: deserializeMetadata(output),
1164
- });
1165
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1166
- const doc = take(data, {
1167
- arn: __expectString,
1168
- concurrencyConfiguration: _json,
1169
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1170
- description: __expectString,
1171
- flowId: __expectString,
1172
- id: __expectString,
1173
- name: __expectString,
1174
- routingConfiguration: _json,
1175
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1176
- });
1177
- Object.assign(contents, doc);
1178
- return contents;
1179
- };
1180
- export const de_CreateFlowVersionCommand = async (output, context) => {
1181
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1182
- return de_CommandError(output, context);
1183
- }
1184
- const contents = map({
1185
- $metadata: deserializeMetadata(output),
1186
- });
1187
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1188
- const doc = take(data, {
1189
- arn: __expectString,
1190
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1191
- customerEncryptionKeyArn: __expectString,
1192
- definition: (_) => de_FlowDefinition(_, context),
1193
- description: __expectString,
1194
- executionRoleArn: __expectString,
1195
- id: __expectString,
1196
- name: __expectString,
1197
- status: __expectString,
1198
- version: __expectString,
1199
- });
1200
- Object.assign(contents, doc);
1201
- return contents;
1202
- };
1203
- export const de_CreateKnowledgeBaseCommand = async (output, context) => {
1204
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1205
- return de_CommandError(output, context);
1206
- }
1207
- const contents = map({
1208
- $metadata: deserializeMetadata(output),
1209
- });
1210
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1211
- const doc = take(data, {
1212
- knowledgeBase: (_) => de_KnowledgeBase(_, context),
1213
- });
1214
- Object.assign(contents, doc);
1215
- return contents;
1216
- };
1217
- export const de_CreatePromptCommand = async (output, context) => {
1218
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1219
- return de_CommandError(output, context);
1220
- }
1221
- const contents = map({
1222
- $metadata: deserializeMetadata(output),
1223
- });
1224
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1225
- const doc = take(data, {
1226
- arn: __expectString,
1227
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1228
- customerEncryptionKeyArn: __expectString,
1229
- defaultVariant: __expectString,
1230
- description: __expectString,
1231
- id: __expectString,
1232
- name: __expectString,
1233
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1234
- variants: (_) => de_PromptVariantList(_, context),
1235
- version: __expectString,
1236
- });
1237
- Object.assign(contents, doc);
1238
- return contents;
1239
- };
1240
- export const de_CreatePromptVersionCommand = async (output, context) => {
1241
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1242
- return de_CommandError(output, context);
1243
- }
1244
- const contents = map({
1245
- $metadata: deserializeMetadata(output),
1246
- });
1247
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1248
- const doc = take(data, {
1249
- arn: __expectString,
1250
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1251
- customerEncryptionKeyArn: __expectString,
1252
- defaultVariant: __expectString,
1253
- description: __expectString,
1254
- id: __expectString,
1255
- name: __expectString,
1256
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1257
- variants: (_) => de_PromptVariantList(_, context),
1258
- version: __expectString,
1259
- });
1260
- Object.assign(contents, doc);
1261
- return contents;
1262
- };
1263
- export const de_DeleteAgentCommand = async (output, context) => {
1264
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1265
- return de_CommandError(output, context);
1266
- }
1267
- const contents = map({
1268
- $metadata: deserializeMetadata(output),
1269
- });
1270
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1271
- const doc = take(data, {
1272
- agentId: __expectString,
1273
- agentStatus: __expectString,
1274
- });
1275
- Object.assign(contents, doc);
1276
- return contents;
1277
- };
1278
- export const de_DeleteAgentActionGroupCommand = async (output, context) => {
1279
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1280
- return de_CommandError(output, context);
1281
- }
1282
- const contents = map({
1283
- $metadata: deserializeMetadata(output),
1284
- });
1285
- await collectBody(output.body, context);
1286
- return contents;
1287
- };
1288
- export const de_DeleteAgentAliasCommand = async (output, context) => {
1289
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1290
- return de_CommandError(output, context);
1291
- }
1292
- const contents = map({
1293
- $metadata: deserializeMetadata(output),
1294
- });
1295
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1296
- const doc = take(data, {
1297
- agentAliasId: __expectString,
1298
- agentAliasStatus: __expectString,
1299
- agentId: __expectString,
1300
- });
1301
- Object.assign(contents, doc);
1302
- return contents;
1303
- };
1304
- export const de_DeleteAgentVersionCommand = async (output, context) => {
1305
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1306
- return de_CommandError(output, context);
1307
- }
1308
- const contents = map({
1309
- $metadata: deserializeMetadata(output),
1310
- });
1311
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1312
- const doc = take(data, {
1313
- agentId: __expectString,
1314
- agentStatus: __expectString,
1315
- agentVersion: __expectString,
1316
- });
1317
- Object.assign(contents, doc);
1318
- return contents;
1319
- };
1320
- export const de_DeleteDataSourceCommand = async (output, context) => {
1321
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1322
- return de_CommandError(output, context);
1323
- }
1324
- const contents = map({
1325
- $metadata: deserializeMetadata(output),
1326
- });
1327
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1328
- const doc = take(data, {
1329
- dataSourceId: __expectString,
1330
- knowledgeBaseId: __expectString,
1331
- status: __expectString,
1332
- });
1333
- Object.assign(contents, doc);
1334
- return contents;
1335
- };
1336
- export const de_DeleteFlowCommand = async (output, context) => {
1337
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1338
- return de_CommandError(output, context);
1339
- }
1340
- const contents = map({
1341
- $metadata: deserializeMetadata(output),
1342
- });
1343
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1344
- const doc = take(data, {
1345
- id: __expectString,
1346
- });
1347
- Object.assign(contents, doc);
1348
- return contents;
1349
- };
1350
- export const de_DeleteFlowAliasCommand = async (output, context) => {
1351
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1352
- return de_CommandError(output, context);
1353
- }
1354
- const contents = map({
1355
- $metadata: deserializeMetadata(output),
1356
- });
1357
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1358
- const doc = take(data, {
1359
- flowId: __expectString,
1360
- id: __expectString,
1361
- });
1362
- Object.assign(contents, doc);
1363
- return contents;
1364
- };
1365
- export const de_DeleteFlowVersionCommand = async (output, context) => {
1366
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1367
- return de_CommandError(output, context);
1368
- }
1369
- const contents = map({
1370
- $metadata: deserializeMetadata(output),
1371
- });
1372
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1373
- const doc = take(data, {
1374
- id: __expectString,
1375
- version: __expectString,
1376
- });
1377
- Object.assign(contents, doc);
1378
- return contents;
1379
- };
1380
- export const de_DeleteKnowledgeBaseCommand = async (output, context) => {
1381
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1382
- return de_CommandError(output, context);
1383
- }
1384
- const contents = map({
1385
- $metadata: deserializeMetadata(output),
1386
- });
1387
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1388
- const doc = take(data, {
1389
- knowledgeBaseId: __expectString,
1390
- status: __expectString,
1391
- });
1392
- Object.assign(contents, doc);
1393
- return contents;
1394
- };
1395
- export const de_DeleteKnowledgeBaseDocumentsCommand = async (output, context) => {
1396
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1397
- return de_CommandError(output, context);
1398
- }
1399
- const contents = map({
1400
- $metadata: deserializeMetadata(output),
1401
- });
1402
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1403
- const doc = take(data, {
1404
- documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
1405
- });
1406
- Object.assign(contents, doc);
1407
- return contents;
1408
- };
1409
- export const de_DeletePromptCommand = async (output, context) => {
1410
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1411
- return de_CommandError(output, context);
1412
- }
1413
- const contents = map({
1414
- $metadata: deserializeMetadata(output),
1415
- });
1416
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1417
- const doc = take(data, {
1418
- id: __expectString,
1419
- version: __expectString,
1420
- });
1421
- Object.assign(contents, doc);
1422
- return contents;
1423
- };
1424
- export const de_DisassociateAgentCollaboratorCommand = async (output, context) => {
1425
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1426
- return de_CommandError(output, context);
1427
- }
1428
- const contents = map({
1429
- $metadata: deserializeMetadata(output),
1430
- });
1431
- await collectBody(output.body, context);
1432
- return contents;
1433
- };
1434
- export const de_DisassociateAgentKnowledgeBaseCommand = async (output, context) => {
1435
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1436
- return de_CommandError(output, context);
1437
- }
1438
- const contents = map({
1439
- $metadata: deserializeMetadata(output),
1440
- });
1441
- await collectBody(output.body, context);
1442
- return contents;
1443
- };
1444
- export const de_GetAgentCommand = async (output, context) => {
1445
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1446
- return de_CommandError(output, context);
1447
- }
1448
- const contents = map({
1449
- $metadata: deserializeMetadata(output),
1450
- });
1451
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1452
- const doc = take(data, {
1453
- agent: (_) => de_Agent(_, context),
1454
- });
1455
- Object.assign(contents, doc);
1456
- return contents;
1457
- };
1458
- export const de_GetAgentActionGroupCommand = async (output, context) => {
1459
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1460
- return de_CommandError(output, context);
1461
- }
1462
- const contents = map({
1463
- $metadata: deserializeMetadata(output),
1464
- });
1465
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1466
- const doc = take(data, {
1467
- agentActionGroup: (_) => de_AgentActionGroup(_, context),
1468
- });
1469
- Object.assign(contents, doc);
1470
- return contents;
1471
- };
1472
- export const de_GetAgentAliasCommand = async (output, context) => {
1473
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1474
- return de_CommandError(output, context);
1475
- }
1476
- const contents = map({
1477
- $metadata: deserializeMetadata(output),
1478
- });
1479
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1480
- const doc = take(data, {
1481
- agentAlias: (_) => de_AgentAlias(_, context),
1482
- });
1483
- Object.assign(contents, doc);
1484
- return contents;
1485
- };
1486
- export const de_GetAgentCollaboratorCommand = async (output, context) => {
1487
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1488
- return de_CommandError(output, context);
1489
- }
1490
- const contents = map({
1491
- $metadata: deserializeMetadata(output),
1492
- });
1493
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1494
- const doc = take(data, {
1495
- agentCollaborator: (_) => de_AgentCollaborator(_, context),
1496
- });
1497
- Object.assign(contents, doc);
1498
- return contents;
1499
- };
1500
- export const de_GetAgentKnowledgeBaseCommand = async (output, context) => {
1501
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1502
- return de_CommandError(output, context);
1503
- }
1504
- const contents = map({
1505
- $metadata: deserializeMetadata(output),
1506
- });
1507
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1508
- const doc = take(data, {
1509
- agentKnowledgeBase: (_) => de_AgentKnowledgeBase(_, context),
1510
- });
1511
- Object.assign(contents, doc);
1512
- return contents;
1513
- };
1514
- export const de_GetAgentVersionCommand = async (output, context) => {
1515
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1516
- return de_CommandError(output, context);
1517
- }
1518
- const contents = map({
1519
- $metadata: deserializeMetadata(output),
1520
- });
1521
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1522
- const doc = take(data, {
1523
- agentVersion: (_) => de_AgentVersion(_, context),
1524
- });
1525
- Object.assign(contents, doc);
1526
- return contents;
1527
- };
1528
- export const de_GetDataSourceCommand = async (output, context) => {
1529
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1530
- return de_CommandError(output, context);
1531
- }
1532
- const contents = map({
1533
- $metadata: deserializeMetadata(output),
1534
- });
1535
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1536
- const doc = take(data, {
1537
- dataSource: (_) => de_DataSource(_, context),
1538
- });
1539
- Object.assign(contents, doc);
1540
- return contents;
1541
- };
1542
- export const de_GetFlowCommand = async (output, context) => {
1543
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1544
- return de_CommandError(output, context);
1545
- }
1546
- const contents = map({
1547
- $metadata: deserializeMetadata(output),
1548
- });
1549
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1550
- const doc = take(data, {
1551
- arn: __expectString,
1552
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1553
- customerEncryptionKeyArn: __expectString,
1554
- definition: (_) => de_FlowDefinition(_, context),
1555
- description: __expectString,
1556
- executionRoleArn: __expectString,
1557
- id: __expectString,
1558
- name: __expectString,
1559
- status: __expectString,
1560
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1561
- validations: _json,
1562
- version: __expectString,
1563
- });
1564
- Object.assign(contents, doc);
1565
- return contents;
1566
- };
1567
- export const de_GetFlowAliasCommand = async (output, context) => {
1568
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1569
- return de_CommandError(output, context);
1570
- }
1571
- const contents = map({
1572
- $metadata: deserializeMetadata(output),
1573
- });
1574
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1575
- const doc = take(data, {
1576
- arn: __expectString,
1577
- concurrencyConfiguration: _json,
1578
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1579
- description: __expectString,
1580
- flowId: __expectString,
1581
- id: __expectString,
1582
- name: __expectString,
1583
- routingConfiguration: _json,
1584
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1585
- });
1586
- Object.assign(contents, doc);
1587
- return contents;
1588
- };
1589
- export const de_GetFlowVersionCommand = async (output, context) => {
1590
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1591
- return de_CommandError(output, context);
1592
- }
1593
- const contents = map({
1594
- $metadata: deserializeMetadata(output),
1595
- });
1596
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1597
- const doc = take(data, {
1598
- arn: __expectString,
1599
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1600
- customerEncryptionKeyArn: __expectString,
1601
- definition: (_) => de_FlowDefinition(_, context),
1602
- description: __expectString,
1603
- executionRoleArn: __expectString,
1604
- id: __expectString,
1605
- name: __expectString,
1606
- status: __expectString,
1607
- version: __expectString,
1608
- });
1609
- Object.assign(contents, doc);
1610
- return contents;
1611
- };
1612
- export const de_GetIngestionJobCommand = async (output, context) => {
1613
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1614
- return de_CommandError(output, context);
1615
- }
1616
- const contents = map({
1617
- $metadata: deserializeMetadata(output),
1618
- });
1619
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1620
- const doc = take(data, {
1621
- ingestionJob: (_) => de_IngestionJob(_, context),
1622
- });
1623
- Object.assign(contents, doc);
1624
- return contents;
1625
- };
1626
- export const de_GetKnowledgeBaseCommand = async (output, context) => {
1627
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1628
- return de_CommandError(output, context);
1629
- }
1630
- const contents = map({
1631
- $metadata: deserializeMetadata(output),
1632
- });
1633
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1634
- const doc = take(data, {
1635
- knowledgeBase: (_) => de_KnowledgeBase(_, context),
1636
- });
1637
- Object.assign(contents, doc);
1638
- return contents;
1639
- };
1640
- export const de_GetKnowledgeBaseDocumentsCommand = async (output, context) => {
1641
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1642
- return de_CommandError(output, context);
1643
- }
1644
- const contents = map({
1645
- $metadata: deserializeMetadata(output),
1646
- });
1647
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1648
- const doc = take(data, {
1649
- documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
1650
- });
1651
- Object.assign(contents, doc);
1652
- return contents;
1653
- };
1654
- export const de_GetPromptCommand = async (output, context) => {
1655
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1656
- return de_CommandError(output, context);
1657
- }
1658
- const contents = map({
1659
- $metadata: deserializeMetadata(output),
1660
- });
1661
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1662
- const doc = take(data, {
1663
- arn: __expectString,
1664
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1665
- customerEncryptionKeyArn: __expectString,
1666
- defaultVariant: __expectString,
1667
- description: __expectString,
1668
- id: __expectString,
1669
- name: __expectString,
1670
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1671
- variants: (_) => de_PromptVariantList(_, context),
1672
- version: __expectString,
1673
- });
1674
- Object.assign(contents, doc);
1675
- return contents;
1676
- };
1677
- export const de_IngestKnowledgeBaseDocumentsCommand = async (output, context) => {
1678
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1679
- return de_CommandError(output, context);
1680
- }
1681
- const contents = map({
1682
- $metadata: deserializeMetadata(output),
1683
- });
1684
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1685
- const doc = take(data, {
1686
- documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
1687
- });
1688
- Object.assign(contents, doc);
1689
- return contents;
1690
- };
1691
- export const de_ListAgentActionGroupsCommand = async (output, context) => {
1692
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1693
- return de_CommandError(output, context);
1694
- }
1695
- const contents = map({
1696
- $metadata: deserializeMetadata(output),
1697
- });
1698
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1699
- const doc = take(data, {
1700
- actionGroupSummaries: (_) => de_ActionGroupSummaries(_, context),
1701
- nextToken: __expectString,
1702
- });
1703
- Object.assign(contents, doc);
1704
- return contents;
1705
- };
1706
- export const de_ListAgentAliasesCommand = async (output, context) => {
1707
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1708
- return de_CommandError(output, context);
1709
- }
1710
- const contents = map({
1711
- $metadata: deserializeMetadata(output),
1712
- });
1713
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1714
- const doc = take(data, {
1715
- agentAliasSummaries: (_) => de_AgentAliasSummaries(_, context),
1716
- nextToken: __expectString,
1717
- });
1718
- Object.assign(contents, doc);
1719
- return contents;
1720
- };
1721
- export const de_ListAgentCollaboratorsCommand = async (output, context) => {
1722
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1723
- return de_CommandError(output, context);
1724
- }
1725
- const contents = map({
1726
- $metadata: deserializeMetadata(output),
1727
- });
1728
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1729
- const doc = take(data, {
1730
- agentCollaboratorSummaries: (_) => de_AgentCollaboratorSummaries(_, context),
1731
- nextToken: __expectString,
1732
- });
1733
- Object.assign(contents, doc);
1734
- return contents;
1735
- };
1736
- export const de_ListAgentKnowledgeBasesCommand = async (output, context) => {
1737
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1738
- return de_CommandError(output, context);
1739
- }
1740
- const contents = map({
1741
- $metadata: deserializeMetadata(output),
1742
- });
1743
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1744
- const doc = take(data, {
1745
- agentKnowledgeBaseSummaries: (_) => de_AgentKnowledgeBaseSummaries(_, context),
1746
- nextToken: __expectString,
1747
- });
1748
- Object.assign(contents, doc);
1749
- return contents;
1750
- };
1751
- export const de_ListAgentsCommand = async (output, context) => {
1752
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1753
- return de_CommandError(output, context);
1754
- }
1755
- const contents = map({
1756
- $metadata: deserializeMetadata(output),
1757
- });
1758
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1759
- const doc = take(data, {
1760
- agentSummaries: (_) => de_AgentSummaries(_, context),
1761
- nextToken: __expectString,
1762
- });
1763
- Object.assign(contents, doc);
1764
- return contents;
1765
- };
1766
- export const de_ListAgentVersionsCommand = async (output, context) => {
1767
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1768
- return de_CommandError(output, context);
1769
- }
1770
- const contents = map({
1771
- $metadata: deserializeMetadata(output),
1772
- });
1773
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1774
- const doc = take(data, {
1775
- agentVersionSummaries: (_) => de_AgentVersionSummaries(_, context),
1776
- nextToken: __expectString,
1777
- });
1778
- Object.assign(contents, doc);
1779
- return contents;
1780
- };
1781
- export const de_ListDataSourcesCommand = async (output, context) => {
1782
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1783
- return de_CommandError(output, context);
1784
- }
1785
- const contents = map({
1786
- $metadata: deserializeMetadata(output),
1787
- });
1788
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1789
- const doc = take(data, {
1790
- dataSourceSummaries: (_) => de_DataSourceSummaries(_, context),
1791
- nextToken: __expectString,
1792
- });
1793
- Object.assign(contents, doc);
1794
- return contents;
1795
- };
1796
- export const de_ListFlowAliasesCommand = async (output, context) => {
1797
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1798
- return de_CommandError(output, context);
1799
- }
1800
- const contents = map({
1801
- $metadata: deserializeMetadata(output),
1802
- });
1803
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1804
- const doc = take(data, {
1805
- flowAliasSummaries: (_) => de_FlowAliasSummaries(_, context),
1806
- nextToken: __expectString,
1807
- });
1808
- Object.assign(contents, doc);
1809
- return contents;
1810
- };
1811
- export const de_ListFlowsCommand = async (output, context) => {
1812
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1813
- return de_CommandError(output, context);
1814
- }
1815
- const contents = map({
1816
- $metadata: deserializeMetadata(output),
1817
- });
1818
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1819
- const doc = take(data, {
1820
- flowSummaries: (_) => de_FlowSummaries(_, context),
1821
- nextToken: __expectString,
1822
- });
1823
- Object.assign(contents, doc);
1824
- return contents;
1825
- };
1826
- export const de_ListFlowVersionsCommand = async (output, context) => {
1827
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1828
- return de_CommandError(output, context);
1829
- }
1830
- const contents = map({
1831
- $metadata: deserializeMetadata(output),
1832
- });
1833
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1834
- const doc = take(data, {
1835
- flowVersionSummaries: (_) => de_FlowVersionSummaries(_, context),
1836
- nextToken: __expectString,
1837
- });
1838
- Object.assign(contents, doc);
1839
- return contents;
1840
- };
1841
- export const de_ListIngestionJobsCommand = async (output, context) => {
1842
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1843
- return de_CommandError(output, context);
1844
- }
1845
- const contents = map({
1846
- $metadata: deserializeMetadata(output),
1847
- });
1848
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1849
- const doc = take(data, {
1850
- ingestionJobSummaries: (_) => de_IngestionJobSummaries(_, context),
1851
- nextToken: __expectString,
1852
- });
1853
- Object.assign(contents, doc);
1854
- return contents;
1855
- };
1856
- export const de_ListKnowledgeBaseDocumentsCommand = async (output, context) => {
1857
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1858
- return de_CommandError(output, context);
1859
- }
1860
- const contents = map({
1861
- $metadata: deserializeMetadata(output),
1862
- });
1863
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1864
- const doc = take(data, {
1865
- documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
1866
- nextToken: __expectString,
1867
- });
1868
- Object.assign(contents, doc);
1869
- return contents;
1870
- };
1871
- export const de_ListKnowledgeBasesCommand = async (output, context) => {
1872
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1873
- return de_CommandError(output, context);
1874
- }
1875
- const contents = map({
1876
- $metadata: deserializeMetadata(output),
1877
- });
1878
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1879
- const doc = take(data, {
1880
- knowledgeBaseSummaries: (_) => de_KnowledgeBaseSummaries(_, context),
1881
- nextToken: __expectString,
1882
- });
1883
- Object.assign(contents, doc);
1884
- return contents;
1885
- };
1886
- export const de_ListPromptsCommand = async (output, context) => {
1887
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1888
- return de_CommandError(output, context);
1889
- }
1890
- const contents = map({
1891
- $metadata: deserializeMetadata(output),
1892
- });
1893
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1894
- const doc = take(data, {
1895
- nextToken: __expectString,
1896
- promptSummaries: (_) => de_PromptSummaries(_, context),
1897
- });
1898
- Object.assign(contents, doc);
1899
- return contents;
1900
- };
1901
- export const de_ListTagsForResourceCommand = async (output, context) => {
1902
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1903
- return de_CommandError(output, context);
1904
- }
1905
- const contents = map({
1906
- $metadata: deserializeMetadata(output),
1907
- });
1908
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1909
- const doc = take(data, {
1910
- tags: _json,
1911
- });
1912
- Object.assign(contents, doc);
1913
- return contents;
1914
- };
1915
- export const de_PrepareAgentCommand = async (output, context) => {
1916
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1917
- return de_CommandError(output, context);
1918
- }
1919
- const contents = map({
1920
- $metadata: deserializeMetadata(output),
1921
- });
1922
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1923
- const doc = take(data, {
1924
- agentId: __expectString,
1925
- agentStatus: __expectString,
1926
- agentVersion: __expectString,
1927
- preparedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1928
- });
1929
- Object.assign(contents, doc);
1930
- return contents;
1931
- };
1932
- export const de_PrepareFlowCommand = async (output, context) => {
1933
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1934
- return de_CommandError(output, context);
1935
- }
1936
- const contents = map({
1937
- $metadata: deserializeMetadata(output),
1938
- });
1939
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1940
- const doc = take(data, {
1941
- id: __expectString,
1942
- status: __expectString,
1943
- });
1944
- Object.assign(contents, doc);
1945
- return contents;
1946
- };
1947
- export const de_StartIngestionJobCommand = async (output, context) => {
1948
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1949
- return de_CommandError(output, context);
1950
- }
1951
- const contents = map({
1952
- $metadata: deserializeMetadata(output),
1953
- });
1954
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1955
- const doc = take(data, {
1956
- ingestionJob: (_) => de_IngestionJob(_, context),
1957
- });
1958
- Object.assign(contents, doc);
1959
- return contents;
1960
- };
1961
- export const de_StopIngestionJobCommand = async (output, context) => {
1962
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1963
- return de_CommandError(output, context);
1964
- }
1965
- const contents = map({
1966
- $metadata: deserializeMetadata(output),
1967
- });
1968
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1969
- const doc = take(data, {
1970
- ingestionJob: (_) => de_IngestionJob(_, context),
1971
- });
1972
- Object.assign(contents, doc);
1973
- return contents;
1974
- };
1975
- export const de_TagResourceCommand = async (output, context) => {
1976
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1977
- return de_CommandError(output, context);
1978
- }
1979
- const contents = map({
1980
- $metadata: deserializeMetadata(output),
1981
- });
1982
- await collectBody(output.body, context);
1983
- return contents;
1984
- };
1985
- export const de_UntagResourceCommand = async (output, context) => {
1986
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1987
- return de_CommandError(output, context);
1988
- }
1989
- const contents = map({
1990
- $metadata: deserializeMetadata(output),
1991
- });
1992
- await collectBody(output.body, context);
1993
- return contents;
1994
- };
1995
- export const de_UpdateAgentCommand = async (output, context) => {
1996
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1997
- return de_CommandError(output, context);
1998
- }
1999
- const contents = map({
2000
- $metadata: deserializeMetadata(output),
2001
- });
2002
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2003
- const doc = take(data, {
2004
- agent: (_) => de_Agent(_, context),
2005
- });
2006
- Object.assign(contents, doc);
2007
- return contents;
2008
- };
2009
- export const de_UpdateAgentActionGroupCommand = async (output, context) => {
2010
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2011
- return de_CommandError(output, context);
2012
- }
2013
- const contents = map({
2014
- $metadata: deserializeMetadata(output),
2015
- });
2016
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2017
- const doc = take(data, {
2018
- agentActionGroup: (_) => de_AgentActionGroup(_, context),
2019
- });
2020
- Object.assign(contents, doc);
2021
- return contents;
2022
- };
2023
- export const de_UpdateAgentAliasCommand = async (output, context) => {
2024
- if (output.statusCode !== 202 && output.statusCode >= 300) {
2025
- return de_CommandError(output, context);
2026
- }
2027
- const contents = map({
2028
- $metadata: deserializeMetadata(output),
2029
- });
2030
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2031
- const doc = take(data, {
2032
- agentAlias: (_) => de_AgentAlias(_, context),
2033
- });
2034
- Object.assign(contents, doc);
2035
- return contents;
2036
- };
2037
- export const de_UpdateAgentCollaboratorCommand = async (output, context) => {
2038
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2039
- return de_CommandError(output, context);
2040
- }
2041
- const contents = map({
2042
- $metadata: deserializeMetadata(output),
2043
- });
2044
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2045
- const doc = take(data, {
2046
- agentCollaborator: (_) => de_AgentCollaborator(_, context),
2047
- });
2048
- Object.assign(contents, doc);
2049
- return contents;
2050
- };
2051
- export const de_UpdateAgentKnowledgeBaseCommand = async (output, context) => {
2052
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2053
- return de_CommandError(output, context);
2054
- }
2055
- const contents = map({
2056
- $metadata: deserializeMetadata(output),
2057
- });
2058
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2059
- const doc = take(data, {
2060
- agentKnowledgeBase: (_) => de_AgentKnowledgeBase(_, context),
2061
- });
2062
- Object.assign(contents, doc);
2063
- return contents;
2064
- };
2065
- export const de_UpdateDataSourceCommand = async (output, context) => {
2066
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2067
- return de_CommandError(output, context);
2068
- }
2069
- const contents = map({
2070
- $metadata: deserializeMetadata(output),
2071
- });
2072
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2073
- const doc = take(data, {
2074
- dataSource: (_) => de_DataSource(_, context),
2075
- });
2076
- Object.assign(contents, doc);
2077
- return contents;
2078
- };
2079
- export const de_UpdateFlowCommand = async (output, context) => {
2080
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2081
- return de_CommandError(output, context);
2082
- }
2083
- const contents = map({
2084
- $metadata: deserializeMetadata(output),
2085
- });
2086
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2087
- const doc = take(data, {
2088
- arn: __expectString,
2089
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2090
- customerEncryptionKeyArn: __expectString,
2091
- definition: (_) => de_FlowDefinition(_, context),
2092
- description: __expectString,
2093
- executionRoleArn: __expectString,
2094
- id: __expectString,
2095
- name: __expectString,
2096
- status: __expectString,
2097
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2098
- version: __expectString,
2099
- });
2100
- Object.assign(contents, doc);
2101
- return contents;
2102
- };
2103
- export const de_UpdateFlowAliasCommand = async (output, context) => {
2104
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2105
- return de_CommandError(output, context);
2106
- }
2107
- const contents = map({
2108
- $metadata: deserializeMetadata(output),
2109
- });
2110
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2111
- const doc = take(data, {
2112
- arn: __expectString,
2113
- concurrencyConfiguration: _json,
2114
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2115
- description: __expectString,
2116
- flowId: __expectString,
2117
- id: __expectString,
2118
- name: __expectString,
2119
- routingConfiguration: _json,
2120
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2121
- });
2122
- Object.assign(contents, doc);
2123
- return contents;
2124
- };
2125
- export const de_UpdateKnowledgeBaseCommand = async (output, context) => {
2126
- if (output.statusCode !== 202 && output.statusCode >= 300) {
2127
- return de_CommandError(output, context);
2128
- }
2129
- const contents = map({
2130
- $metadata: deserializeMetadata(output),
2131
- });
2132
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2133
- const doc = take(data, {
2134
- knowledgeBase: (_) => de_KnowledgeBase(_, context),
2135
- });
2136
- Object.assign(contents, doc);
2137
- return contents;
2138
- };
2139
- export const de_UpdatePromptCommand = async (output, context) => {
2140
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2141
- return de_CommandError(output, context);
2142
- }
2143
- const contents = map({
2144
- $metadata: deserializeMetadata(output),
2145
- });
2146
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2147
- const doc = take(data, {
2148
- arn: __expectString,
2149
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2150
- customerEncryptionKeyArn: __expectString,
2151
- defaultVariant: __expectString,
2152
- description: __expectString,
2153
- id: __expectString,
2154
- name: __expectString,
2155
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2156
- variants: (_) => de_PromptVariantList(_, context),
2157
- version: __expectString,
2158
- });
2159
- Object.assign(contents, doc);
2160
- return contents;
2161
- };
2162
- export const de_ValidateFlowDefinitionCommand = async (output, context) => {
2163
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2164
- return de_CommandError(output, context);
2165
- }
2166
- const contents = map({
2167
- $metadata: deserializeMetadata(output),
2168
- });
2169
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2170
- const doc = take(data, {
2171
- validations: _json,
2172
- });
2173
- Object.assign(contents, doc);
2174
- return contents;
2175
- };
2176
- const de_CommandError = async (output, context) => {
2177
- const parsedOutput = {
2178
- ...output,
2179
- body: await parseErrorBody(output.body, context),
2180
- };
2181
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2182
- switch (errorCode) {
2183
- case "AccessDeniedException":
2184
- case "com.amazonaws.bedrockagent#AccessDeniedException":
2185
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2186
- case "ConflictException":
2187
- case "com.amazonaws.bedrockagent#ConflictException":
2188
- throw await de_ConflictExceptionRes(parsedOutput, context);
2189
- case "InternalServerException":
2190
- case "com.amazonaws.bedrockagent#InternalServerException":
2191
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2192
- case "ResourceNotFoundException":
2193
- case "com.amazonaws.bedrockagent#ResourceNotFoundException":
2194
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2195
- case "ServiceQuotaExceededException":
2196
- case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
2197
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2198
- case "ThrottlingException":
2199
- case "com.amazonaws.bedrockagent#ThrottlingException":
2200
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2201
- case "ValidationException":
2202
- case "com.amazonaws.bedrockagent#ValidationException":
2203
- throw await de_ValidationExceptionRes(parsedOutput, context);
2204
- default:
2205
- const parsedBody = parsedOutput.body;
2206
- return throwDefaultError({
2207
- output,
2208
- parsedBody,
2209
- errorCode,
2210
- });
2211
- }
2212
- };
2213
- const throwDefaultError = withBaseException(__BaseException);
2214
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2215
- const contents = map({});
2216
- const data = parsedOutput.body;
2217
- const doc = take(data, {
2218
- message: __expectString,
2219
- });
2220
- Object.assign(contents, doc);
2221
- const exception = new AccessDeniedException({
2222
- $metadata: deserializeMetadata(parsedOutput),
2223
- ...contents,
2224
- });
2225
- return __decorateServiceException(exception, parsedOutput.body);
2226
- };
2227
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
2228
- const contents = map({});
2229
- const data = parsedOutput.body;
2230
- const doc = take(data, {
2231
- message: __expectString,
2232
- });
2233
- Object.assign(contents, doc);
2234
- const exception = new ConflictException({
2235
- $metadata: deserializeMetadata(parsedOutput),
2236
- ...contents,
2237
- });
2238
- return __decorateServiceException(exception, parsedOutput.body);
2239
- };
2240
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2241
- const contents = map({});
2242
- const data = parsedOutput.body;
2243
- const doc = take(data, {
2244
- message: __expectString,
2245
- });
2246
- Object.assign(contents, doc);
2247
- const exception = new InternalServerException({
2248
- $metadata: deserializeMetadata(parsedOutput),
2249
- ...contents,
2250
- });
2251
- return __decorateServiceException(exception, parsedOutput.body);
2252
- };
2253
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2254
- const contents = map({});
2255
- const data = parsedOutput.body;
2256
- const doc = take(data, {
2257
- message: __expectString,
2258
- });
2259
- Object.assign(contents, doc);
2260
- const exception = new ResourceNotFoundException({
2261
- $metadata: deserializeMetadata(parsedOutput),
2262
- ...contents,
2263
- });
2264
- return __decorateServiceException(exception, parsedOutput.body);
2265
- };
2266
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2267
- const contents = map({});
2268
- const data = parsedOutput.body;
2269
- const doc = take(data, {
2270
- message: __expectString,
2271
- });
2272
- Object.assign(contents, doc);
2273
- const exception = new ServiceQuotaExceededException({
2274
- $metadata: deserializeMetadata(parsedOutput),
2275
- ...contents,
2276
- });
2277
- return __decorateServiceException(exception, parsedOutput.body);
2278
- };
2279
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2280
- const contents = map({});
2281
- const data = parsedOutput.body;
2282
- const doc = take(data, {
2283
- message: __expectString,
2284
- });
2285
- Object.assign(contents, doc);
2286
- const exception = new ThrottlingException({
2287
- $metadata: deserializeMetadata(parsedOutput),
2288
- ...contents,
2289
- });
2290
- return __decorateServiceException(exception, parsedOutput.body);
2291
- };
2292
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
2293
- const contents = map({});
2294
- const data = parsedOutput.body;
2295
- const doc = take(data, {
2296
- fieldList: _json,
2297
- message: __expectString,
2298
- });
2299
- Object.assign(contents, doc);
2300
- const exception = new ValidationException({
2301
- $metadata: deserializeMetadata(parsedOutput),
2302
- ...contents,
2303
- });
2304
- return __decorateServiceException(exception, parsedOutput.body);
2305
- };
2306
- const se_AdditionalModelRequestFields = (input, context) => {
2307
- return Object.entries(input).reduce((acc, [key, value]) => {
2308
- if (value === null) {
2309
- return acc;
2310
- }
2311
- acc[key] = se_AdditionalModelRequestFieldsValue(value, context);
2312
- return acc;
2313
- }, {});
2314
- };
2315
- const se_AdditionalModelRequestFieldsValue = (input, context) => {
2316
- return input;
2317
- };
2318
- const se_ByteContentDoc = (input, context) => {
2319
- return take(input, {
2320
- data: context.base64Encoder,
2321
- mimeType: [],
2322
- });
2323
- };
2324
- const se_ChatPromptTemplateConfiguration = (input, context) => {
2325
- return take(input, {
2326
- inputVariables: _json,
2327
- messages: _json,
2328
- system: _json,
2329
- toolConfiguration: (_) => se_ToolConfiguration(_, context),
2330
- });
2331
- };
2332
- const se_CustomContent = (input, context) => {
2333
- return take(input, {
2334
- customDocumentIdentifier: _json,
2335
- inlineContent: (_) => se_InlineContent(_, context),
2336
- s3Location: _json,
2337
- sourceType: [],
2338
- });
2339
- };
2340
- const se_DocumentContent = (input, context) => {
2341
- return take(input, {
2342
- custom: (_) => se_CustomContent(_, context),
2343
- dataSourceType: [],
2344
- s3: _json,
2345
- });
2346
- };
2347
- const se_DocumentMetadata = (input, context) => {
2348
- return take(input, {
2349
- inlineAttributes: (_) => se_MetadataAttributes(_, context),
2350
- s3Location: _json,
2351
- type: [],
2352
- });
2353
- };
2354
- const se_FlowDefinition = (input, context) => {
2355
- return take(input, {
2356
- connections: _json,
2357
- nodes: (_) => se_FlowNodes(_, context),
2358
- });
2359
- };
2360
- const se_FlowNode = (input, context) => {
2361
- return take(input, {
2362
- configuration: (_) => se_FlowNodeConfiguration(_, context),
2363
- inputs: _json,
2364
- name: [],
2365
- outputs: _json,
2366
- type: [],
2367
- });
2368
- };
2369
- const se_FlowNodeConfiguration = (input, context) => {
2370
- return FlowNodeConfiguration.visit(input, {
2371
- agent: (value) => ({ agent: _json(value) }),
2372
- collector: (value) => ({ collector: _json(value) }),
2373
- condition: (value) => ({ condition: _json(value) }),
2374
- inlineCode: (value) => ({ inlineCode: _json(value) }),
2375
- input: (value) => ({ input: _json(value) }),
2376
- iterator: (value) => ({ iterator: _json(value) }),
2377
- knowledgeBase: (value) => ({ knowledgeBase: se_KnowledgeBaseFlowNodeConfiguration(value, context) }),
2378
- lambdaFunction: (value) => ({ lambdaFunction: _json(value) }),
2379
- lex: (value) => ({ lex: _json(value) }),
2380
- loop: (value) => ({ loop: se_LoopFlowNodeConfiguration(value, context) }),
2381
- loopController: (value) => ({ loopController: _json(value) }),
2382
- loopInput: (value) => ({ loopInput: _json(value) }),
2383
- output: (value) => ({ output: _json(value) }),
2384
- prompt: (value) => ({ prompt: se_PromptFlowNodeConfiguration(value, context) }),
2385
- retrieval: (value) => ({ retrieval: _json(value) }),
2386
- storage: (value) => ({ storage: _json(value) }),
2387
- _: (name, value) => ({ [name]: value }),
2388
- });
2389
- };
2390
- const se_FlowNodes = (input, context) => {
2391
- return input
2392
- .filter((e) => e != null)
2393
- .map((entry) => {
2394
- return se_FlowNode(entry, context);
2395
- });
2396
- };
2397
- const se_InferenceConfiguration = (input, context) => {
2398
- return take(input, {
2399
- maximumLength: [],
2400
- stopSequences: _json,
2401
- temperature: __serializeFloat,
2402
- topK: [],
2403
- topP: __serializeFloat,
2404
- });
2405
- };
2406
- const se_InlineContent = (input, context) => {
2407
- return take(input, {
2408
- byteContent: (_) => se_ByteContentDoc(_, context),
2409
- textContent: _json,
2410
- type: [],
2411
- });
2412
- };
2413
- const se_KnowledgeBaseDocument = (input, context) => {
2414
- return take(input, {
2415
- content: (_) => se_DocumentContent(_, context),
2416
- metadata: (_) => se_DocumentMetadata(_, context),
2417
- });
2418
- };
2419
- const se_KnowledgeBaseDocuments = (input, context) => {
2420
- return input
2421
- .filter((e) => e != null)
2422
- .map((entry) => {
2423
- return se_KnowledgeBaseDocument(entry, context);
2424
- });
2425
- };
2426
- const se_KnowledgeBaseFlowNodeConfiguration = (input, context) => {
2427
- return take(input, {
2428
- guardrailConfiguration: _json,
2429
- inferenceConfiguration: (_) => se_PromptInferenceConfiguration(_, context),
2430
- knowledgeBaseId: [],
2431
- modelId: [],
2432
- numberOfResults: [],
2433
- orchestrationConfiguration: (_) => se_KnowledgeBaseOrchestrationConfiguration(_, context),
2434
- promptTemplate: _json,
2435
- rerankingConfiguration: (_) => se_VectorSearchRerankingConfiguration(_, context),
2436
- });
2437
- };
2438
- const se_KnowledgeBaseOrchestrationConfiguration = (input, context) => {
2439
- return take(input, {
2440
- additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
2441
- inferenceConfig: (_) => se_PromptInferenceConfiguration(_, context),
2442
- performanceConfig: _json,
2443
- promptTemplate: _json,
2444
- });
2445
- };
2446
- const se_LoopFlowNodeConfiguration = (input, context) => {
2447
- return take(input, {
2448
- definition: (_) => se_FlowDefinition(_, context),
2449
- });
2450
- };
2451
- const se_MetadataAttribute = (input, context) => {
2452
- return take(input, {
2453
- key: [],
2454
- value: (_) => se_MetadataAttributeValue(_, context),
2455
- });
2456
- };
2457
- const se_MetadataAttributes = (input, context) => {
2458
- return input
2459
- .filter((e) => e != null)
2460
- .map((entry) => {
2461
- return se_MetadataAttribute(entry, context);
2462
- });
2463
- };
2464
- const se_MetadataAttributeValue = (input, context) => {
2465
- return take(input, {
2466
- booleanValue: [],
2467
- numberValue: __serializeFloat,
2468
- stringListValue: _json,
2469
- stringValue: [],
2470
- type: [],
2471
- });
2472
- };
2473
- const se_PromptConfiguration = (input, context) => {
2474
- return take(input, {
2475
- additionalModelRequestFields: (_) => se_Document(_, context),
2476
- basePromptTemplate: [],
2477
- foundationModel: [],
2478
- inferenceConfiguration: (_) => se_InferenceConfiguration(_, context),
2479
- parserMode: [],
2480
- promptCreationMode: [],
2481
- promptState: [],
2482
- promptType: [],
2483
- });
2484
- };
2485
- const se_PromptConfigurations = (input, context) => {
2486
- return input
2487
- .filter((e) => e != null)
2488
- .map((entry) => {
2489
- return se_PromptConfiguration(entry, context);
2490
- });
2491
- };
2492
- const se_PromptFlowNodeConfiguration = (input, context) => {
2493
- return take(input, {
2494
- guardrailConfiguration: _json,
2495
- sourceConfiguration: (_) => se_PromptFlowNodeSourceConfiguration(_, context),
2496
- });
2497
- };
2498
- const se_PromptFlowNodeInlineConfiguration = (input, context) => {
2499
- return take(input, {
2500
- additionalModelRequestFields: (_) => se_Document(_, context),
2501
- inferenceConfiguration: (_) => se_PromptInferenceConfiguration(_, context),
2502
- modelId: [],
2503
- templateConfiguration: (_) => se_PromptTemplateConfiguration(_, context),
2504
- templateType: [],
2505
- });
2506
- };
2507
- const se_PromptFlowNodeSourceConfiguration = (input, context) => {
2508
- return PromptFlowNodeSourceConfiguration.visit(input, {
2509
- inline: (value) => ({ inline: se_PromptFlowNodeInlineConfiguration(value, context) }),
2510
- resource: (value) => ({ resource: _json(value) }),
2511
- _: (name, value) => ({ [name]: value }),
2512
- });
2513
- };
2514
- const se_PromptInferenceConfiguration = (input, context) => {
2515
- return PromptInferenceConfiguration.visit(input, {
2516
- text: (value) => ({ text: se_PromptModelInferenceConfiguration(value, context) }),
2517
- _: (name, value) => ({ [name]: value }),
2518
- });
2519
- };
2520
- const se_PromptModelInferenceConfiguration = (input, context) => {
2521
- return take(input, {
2522
- maxTokens: [],
2523
- stopSequences: _json,
2524
- temperature: __serializeFloat,
2525
- topP: __serializeFloat,
2526
- });
2527
- };
2528
- const se_PromptOverrideConfiguration = (input, context) => {
2529
- return take(input, {
2530
- overrideLambda: [],
2531
- promptConfigurations: (_) => se_PromptConfigurations(_, context),
2532
- });
2533
- };
2534
- const se_PromptTemplateConfiguration = (input, context) => {
2535
- return PromptTemplateConfiguration.visit(input, {
2536
- chat: (value) => ({ chat: se_ChatPromptTemplateConfiguration(value, context) }),
2537
- text: (value) => ({ text: _json(value) }),
2538
- _: (name, value) => ({ [name]: value }),
2539
- });
2540
- };
2541
- const se_PromptVariant = (input, context) => {
2542
- return take(input, {
2543
- additionalModelRequestFields: (_) => se_Document(_, context),
2544
- genAiResource: _json,
2545
- inferenceConfiguration: (_) => se_PromptInferenceConfiguration(_, context),
2546
- metadata: _json,
2547
- modelId: [],
2548
- name: [],
2549
- templateConfiguration: (_) => se_PromptTemplateConfiguration(_, context),
2550
- templateType: [],
2551
- });
2552
- };
2553
- const se_PromptVariantList = (input, context) => {
2554
- return input
2555
- .filter((e) => e != null)
2556
- .map((entry) => {
2557
- return se_PromptVariant(entry, context);
2558
- });
2559
- };
2560
- const se_Tool = (input, context) => {
2561
- return Tool.visit(input, {
2562
- cachePoint: (value) => ({ cachePoint: _json(value) }),
2563
- toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value, context) }),
2564
- _: (name, value) => ({ [name]: value }),
2565
- });
2566
- };
2567
- const se_ToolConfiguration = (input, context) => {
2568
- return take(input, {
2569
- toolChoice: _json,
2570
- tools: (_) => se_Tools(_, context),
2571
- });
2572
- };
2573
- const se_ToolInputSchema = (input, context) => {
2574
- return ToolInputSchema.visit(input, {
2575
- json: (value) => ({ json: se_Document(value, context) }),
2576
- _: (name, value) => ({ [name]: value }),
2577
- });
2578
- };
2579
- const se_Tools = (input, context) => {
2580
- return input
2581
- .filter((e) => e != null)
2582
- .map((entry) => {
2583
- return se_Tool(entry, context);
2584
- });
2585
- };
2586
- const se_ToolSpecification = (input, context) => {
2587
- return take(input, {
2588
- description: [],
2589
- inputSchema: (_) => se_ToolInputSchema(_, context),
2590
- name: [],
2591
- });
2592
- };
2593
- const se_VectorSearchBedrockRerankingConfiguration = (input, context) => {
2594
- return take(input, {
2595
- metadataConfiguration: _json,
2596
- modelConfiguration: (_) => se_VectorSearchBedrockRerankingModelConfiguration(_, context),
2597
- numberOfRerankedResults: [],
2598
- });
2599
- };
2600
- const se_VectorSearchBedrockRerankingModelConfiguration = (input, context) => {
2601
- return take(input, {
2602
- additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
2603
- modelArn: [],
2604
- });
2605
- };
2606
- const se_VectorSearchRerankingConfiguration = (input, context) => {
2607
- return take(input, {
2608
- bedrockRerankingConfiguration: (_) => se_VectorSearchBedrockRerankingConfiguration(_, context),
2609
- type: [],
2610
- });
2611
- };
2612
- const se_Document = (input, context) => {
2613
- return input;
2614
- };
2615
- const de_ActionGroupSummaries = (output, context) => {
2616
- const retVal = (output || [])
2617
- .filter((e) => e != null)
2618
- .map((entry) => {
2619
- return de_ActionGroupSummary(entry, context);
2620
- });
2621
- return retVal;
2622
- };
2623
- const de_ActionGroupSummary = (output, context) => {
2624
- return take(output, {
2625
- actionGroupId: __expectString,
2626
- actionGroupName: __expectString,
2627
- actionGroupState: __expectString,
2628
- description: __expectString,
2629
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2630
- });
2631
- };
2632
- const de_AdditionalModelRequestFields = (output, context) => {
2633
- return Object.entries(output).reduce((acc, [key, value]) => {
2634
- if (value === null) {
2635
- return acc;
2636
- }
2637
- acc[key] = de_AdditionalModelRequestFieldsValue(value, context);
2638
- return acc;
2639
- }, {});
2640
- };
2641
- const de_AdditionalModelRequestFieldsValue = (output, context) => {
2642
- return output;
2643
- };
2644
- const de_Agent = (output, context) => {
2645
- return take(output, {
2646
- agentArn: __expectString,
2647
- agentCollaboration: __expectString,
2648
- agentId: __expectString,
2649
- agentName: __expectString,
2650
- agentResourceRoleArn: __expectString,
2651
- agentStatus: __expectString,
2652
- agentVersion: __expectString,
2653
- clientToken: __expectString,
2654
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2655
- customOrchestration: _json,
2656
- customerEncryptionKeyArn: __expectString,
2657
- description: __expectString,
2658
- failureReasons: _json,
2659
- foundationModel: __expectString,
2660
- guardrailConfiguration: _json,
2661
- idleSessionTTLInSeconds: __expectInt32,
2662
- instruction: __expectString,
2663
- memoryConfiguration: _json,
2664
- orchestrationType: __expectString,
2665
- preparedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2666
- promptOverrideConfiguration: (_) => de_PromptOverrideConfiguration(_, context),
2667
- recommendedActions: _json,
2668
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2669
- });
2670
- };
2671
- const de_AgentActionGroup = (output, context) => {
2672
- return take(output, {
2673
- actionGroupExecutor: (_) => _json(__expectUnion(_)),
2674
- actionGroupId: __expectString,
2675
- actionGroupName: __expectString,
2676
- actionGroupState: __expectString,
2677
- agentId: __expectString,
2678
- agentVersion: __expectString,
2679
- apiSchema: (_) => _json(__expectUnion(_)),
2680
- clientToken: __expectString,
2681
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2682
- description: __expectString,
2683
- functionSchema: (_) => _json(__expectUnion(_)),
2684
- parentActionGroupSignatureParams: _json,
2685
- parentActionSignature: __expectString,
2686
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2687
- });
2688
- };
2689
- const de_AgentAlias = (output, context) => {
2690
- return take(output, {
2691
- agentAliasArn: __expectString,
2692
- agentAliasHistoryEvents: (_) => de_AgentAliasHistoryEvents(_, context),
2693
- agentAliasId: __expectString,
2694
- agentAliasName: __expectString,
2695
- agentAliasStatus: __expectString,
2696
- agentId: __expectString,
2697
- aliasInvocationState: __expectString,
2698
- clientToken: __expectString,
2699
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2700
- description: __expectString,
2701
- failureReasons: _json,
2702
- routingConfiguration: _json,
2703
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2704
- });
2705
- };
2706
- const de_AgentAliasHistoryEvent = (output, context) => {
2707
- return take(output, {
2708
- endDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2709
- routingConfiguration: _json,
2710
- startDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2711
- });
2712
- };
2713
- const de_AgentAliasHistoryEvents = (output, context) => {
2714
- const retVal = (output || [])
2715
- .filter((e) => e != null)
2716
- .map((entry) => {
2717
- return de_AgentAliasHistoryEvent(entry, context);
2718
- });
2719
- return retVal;
2720
- };
2721
- const de_AgentAliasSummaries = (output, context) => {
2722
- const retVal = (output || [])
2723
- .filter((e) => e != null)
2724
- .map((entry) => {
2725
- return de_AgentAliasSummary(entry, context);
2726
- });
2727
- return retVal;
2728
- };
2729
- const de_AgentAliasSummary = (output, context) => {
2730
- return take(output, {
2731
- agentAliasId: __expectString,
2732
- agentAliasName: __expectString,
2733
- agentAliasStatus: __expectString,
2734
- aliasInvocationState: __expectString,
2735
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2736
- description: __expectString,
2737
- routingConfiguration: _json,
2738
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2739
- });
2740
- };
2741
- const de_AgentCollaborator = (output, context) => {
2742
- return take(output, {
2743
- agentDescriptor: _json,
2744
- agentId: __expectString,
2745
- agentVersion: __expectString,
2746
- clientToken: __expectString,
2747
- collaborationInstruction: __expectString,
2748
- collaboratorId: __expectString,
2749
- collaboratorName: __expectString,
2750
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2751
- lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2752
- relayConversationHistory: __expectString,
2753
- });
2754
- };
2755
- const de_AgentCollaboratorSummaries = (output, context) => {
2756
- const retVal = (output || [])
2757
- .filter((e) => e != null)
2758
- .map((entry) => {
2759
- return de_AgentCollaboratorSummary(entry, context);
2760
- });
2761
- return retVal;
2762
- };
2763
- const de_AgentCollaboratorSummary = (output, context) => {
2764
- return take(output, {
2765
- agentDescriptor: _json,
2766
- agentId: __expectString,
2767
- agentVersion: __expectString,
2768
- collaborationInstruction: __expectString,
2769
- collaboratorId: __expectString,
2770
- collaboratorName: __expectString,
2771
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2772
- lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2773
- relayConversationHistory: __expectString,
2774
- });
2775
- };
2776
- const de_AgentKnowledgeBase = (output, context) => {
2777
- return take(output, {
2778
- agentId: __expectString,
2779
- agentVersion: __expectString,
2780
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2781
- description: __expectString,
2782
- knowledgeBaseId: __expectString,
2783
- knowledgeBaseState: __expectString,
2784
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2785
- });
2786
- };
2787
- const de_AgentKnowledgeBaseSummaries = (output, context) => {
2788
- const retVal = (output || [])
2789
- .filter((e) => e != null)
2790
- .map((entry) => {
2791
- return de_AgentKnowledgeBaseSummary(entry, context);
2792
- });
2793
- return retVal;
2794
- };
2795
- const de_AgentKnowledgeBaseSummary = (output, context) => {
2796
- return take(output, {
2797
- description: __expectString,
2798
- knowledgeBaseId: __expectString,
2799
- knowledgeBaseState: __expectString,
2800
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2801
- });
2802
- };
2803
- const de_AgentSummaries = (output, context) => {
2804
- const retVal = (output || [])
2805
- .filter((e) => e != null)
2806
- .map((entry) => {
2807
- return de_AgentSummary(entry, context);
2808
- });
2809
- return retVal;
2810
- };
2811
- const de_AgentSummary = (output, context) => {
2812
- return take(output, {
2813
- agentId: __expectString,
2814
- agentName: __expectString,
2815
- agentStatus: __expectString,
2816
- description: __expectString,
2817
- guardrailConfiguration: _json,
2818
- latestAgentVersion: __expectString,
2819
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2820
- });
2821
- };
2822
- const de_AgentVersion = (output, context) => {
2823
- return take(output, {
2824
- agentArn: __expectString,
2825
- agentCollaboration: __expectString,
2826
- agentId: __expectString,
2827
- agentName: __expectString,
2828
- agentResourceRoleArn: __expectString,
2829
- agentStatus: __expectString,
2830
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2831
- customerEncryptionKeyArn: __expectString,
2832
- description: __expectString,
2833
- failureReasons: _json,
2834
- foundationModel: __expectString,
2835
- guardrailConfiguration: _json,
2836
- idleSessionTTLInSeconds: __expectInt32,
2837
- instruction: __expectString,
2838
- memoryConfiguration: _json,
2839
- promptOverrideConfiguration: (_) => de_PromptOverrideConfiguration(_, context),
2840
- recommendedActions: _json,
2841
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2842
- version: __expectString,
2843
- });
2844
- };
2845
- const de_AgentVersionSummaries = (output, context) => {
2846
- const retVal = (output || [])
2847
- .filter((e) => e != null)
2848
- .map((entry) => {
2849
- return de_AgentVersionSummary(entry, context);
2850
- });
2851
- return retVal;
2852
- };
2853
- const de_AgentVersionSummary = (output, context) => {
2854
- return take(output, {
2855
- agentName: __expectString,
2856
- agentStatus: __expectString,
2857
- agentVersion: __expectString,
2858
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2859
- description: __expectString,
2860
- guardrailConfiguration: _json,
2861
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2862
- });
2863
- };
2864
- const de_ChatPromptTemplateConfiguration = (output, context) => {
2865
- return take(output, {
2866
- inputVariables: _json,
2867
- messages: _json,
2868
- system: _json,
2869
- toolConfiguration: (_) => de_ToolConfiguration(_, context),
2870
- });
2871
- };
2872
- const de_DataSource = (output, context) => {
2873
- return take(output, {
2874
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2875
- dataDeletionPolicy: __expectString,
2876
- dataSourceConfiguration: _json,
2877
- dataSourceId: __expectString,
2878
- description: __expectString,
2879
- failureReasons: _json,
2880
- knowledgeBaseId: __expectString,
2881
- name: __expectString,
2882
- serverSideEncryptionConfiguration: _json,
2883
- status: __expectString,
2884
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2885
- vectorIngestionConfiguration: _json,
2886
- });
2887
- };
2888
- const de_DataSourceSummaries = (output, context) => {
2889
- const retVal = (output || [])
2890
- .filter((e) => e != null)
2891
- .map((entry) => {
2892
- return de_DataSourceSummary(entry, context);
2893
- });
2894
- return retVal;
2895
- };
2896
- const de_DataSourceSummary = (output, context) => {
2897
- return take(output, {
2898
- dataSourceId: __expectString,
2899
- description: __expectString,
2900
- knowledgeBaseId: __expectString,
2901
- name: __expectString,
2902
- status: __expectString,
2903
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2904
- });
2905
- };
2906
- const de_FlowAliasSummaries = (output, context) => {
2907
- const retVal = (output || [])
2908
- .filter((e) => e != null)
2909
- .map((entry) => {
2910
- return de_FlowAliasSummary(entry, context);
2911
- });
2912
- return retVal;
2913
- };
2914
- const de_FlowAliasSummary = (output, context) => {
2915
- return take(output, {
2916
- arn: __expectString,
2917
- concurrencyConfiguration: _json,
2918
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2919
- description: __expectString,
2920
- flowId: __expectString,
2921
- id: __expectString,
2922
- name: __expectString,
2923
- routingConfiguration: _json,
2924
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2925
- });
2926
- };
2927
- const de_FlowDefinition = (output, context) => {
2928
- return take(output, {
2929
- connections: _json,
2930
- nodes: (_) => de_FlowNodes(_, context),
2931
- });
2932
- };
2933
- const de_FlowNode = (output, context) => {
2934
- return take(output, {
2935
- configuration: (_) => de_FlowNodeConfiguration(__expectUnion(_), context),
2936
- inputs: _json,
2937
- name: __expectString,
2938
- outputs: _json,
2939
- type: __expectString,
2940
- });
2941
- };
2942
- const de_FlowNodeConfiguration = (output, context) => {
2943
- if (output.agent != null) {
2944
- return {
2945
- agent: _json(output.agent),
2946
- };
2947
- }
2948
- if (output.collector != null) {
2949
- return {
2950
- collector: _json(output.collector),
2951
- };
2952
- }
2953
- if (output.condition != null) {
2954
- return {
2955
- condition: _json(output.condition),
2956
- };
2957
- }
2958
- if (output.inlineCode != null) {
2959
- return {
2960
- inlineCode: _json(output.inlineCode),
2961
- };
2962
- }
2963
- if (output.input != null) {
2964
- return {
2965
- input: _json(output.input),
2966
- };
2967
- }
2968
- if (output.iterator != null) {
2969
- return {
2970
- iterator: _json(output.iterator),
2971
- };
2972
- }
2973
- if (output.knowledgeBase != null) {
2974
- return {
2975
- knowledgeBase: de_KnowledgeBaseFlowNodeConfiguration(output.knowledgeBase, context),
2976
- };
2977
- }
2978
- if (output.lambdaFunction != null) {
2979
- return {
2980
- lambdaFunction: _json(output.lambdaFunction),
2981
- };
2982
- }
2983
- if (output.lex != null) {
2984
- return {
2985
- lex: _json(output.lex),
2986
- };
2987
- }
2988
- if (output.loop != null) {
2989
- return {
2990
- loop: de_LoopFlowNodeConfiguration(output.loop, context),
2991
- };
2992
- }
2993
- if (output.loopController != null) {
2994
- return {
2995
- loopController: _json(output.loopController),
2996
- };
2997
- }
2998
- if (output.loopInput != null) {
2999
- return {
3000
- loopInput: _json(output.loopInput),
3001
- };
3002
- }
3003
- if (output.output != null) {
3004
- return {
3005
- output: _json(output.output),
3006
- };
3007
- }
3008
- if (output.prompt != null) {
3009
- return {
3010
- prompt: de_PromptFlowNodeConfiguration(output.prompt, context),
3011
- };
3012
- }
3013
- if (output.retrieval != null) {
3014
- return {
3015
- retrieval: _json(output.retrieval),
3016
- };
3017
- }
3018
- if (output.storage != null) {
3019
- return {
3020
- storage: _json(output.storage),
3021
- };
3022
- }
3023
- return { $unknown: Object.entries(output)[0] };
3024
- };
3025
- const de_FlowNodes = (output, context) => {
3026
- const retVal = (output || [])
3027
- .filter((e) => e != null)
3028
- .map((entry) => {
3029
- return de_FlowNode(entry, context);
3030
- });
3031
- return retVal;
3032
- };
3033
- const de_FlowSummaries = (output, context) => {
3034
- const retVal = (output || [])
3035
- .filter((e) => e != null)
3036
- .map((entry) => {
3037
- return de_FlowSummary(entry, context);
3038
- });
3039
- return retVal;
3040
- };
3041
- const de_FlowSummary = (output, context) => {
3042
- return take(output, {
3043
- arn: __expectString,
3044
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3045
- description: __expectString,
3046
- id: __expectString,
3047
- name: __expectString,
3048
- status: __expectString,
3049
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3050
- version: __expectString,
3051
- });
3052
- };
3053
- const de_FlowVersionSummaries = (output, context) => {
3054
- const retVal = (output || [])
3055
- .filter((e) => e != null)
3056
- .map((entry) => {
3057
- return de_FlowVersionSummary(entry, context);
3058
- });
3059
- return retVal;
3060
- };
3061
- const de_FlowVersionSummary = (output, context) => {
3062
- return take(output, {
3063
- arn: __expectString,
3064
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3065
- id: __expectString,
3066
- status: __expectString,
3067
- version: __expectString,
3068
- });
3069
- };
3070
- const de_InferenceConfiguration = (output, context) => {
3071
- return take(output, {
3072
- maximumLength: __expectInt32,
3073
- stopSequences: _json,
3074
- temperature: __limitedParseFloat32,
3075
- topK: __expectInt32,
3076
- topP: __limitedParseFloat32,
3077
- });
3078
- };
3079
- const de_IngestionJob = (output, context) => {
3080
- return take(output, {
3081
- dataSourceId: __expectString,
3082
- description: __expectString,
3083
- failureReasons: _json,
3084
- ingestionJobId: __expectString,
3085
- knowledgeBaseId: __expectString,
3086
- startedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3087
- statistics: _json,
3088
- status: __expectString,
3089
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3090
- });
3091
- };
3092
- const de_IngestionJobSummaries = (output, context) => {
3093
- const retVal = (output || [])
3094
- .filter((e) => e != null)
3095
- .map((entry) => {
3096
- return de_IngestionJobSummary(entry, context);
3097
- });
3098
- return retVal;
3099
- };
3100
- const de_IngestionJobSummary = (output, context) => {
3101
- return take(output, {
3102
- dataSourceId: __expectString,
3103
- description: __expectString,
3104
- ingestionJobId: __expectString,
3105
- knowledgeBaseId: __expectString,
3106
- startedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3107
- statistics: _json,
3108
- status: __expectString,
3109
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3110
- });
3111
- };
3112
- const de_KnowledgeBase = (output, context) => {
3113
- return take(output, {
3114
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3115
- description: __expectString,
3116
- failureReasons: _json,
3117
- knowledgeBaseArn: __expectString,
3118
- knowledgeBaseConfiguration: _json,
3119
- knowledgeBaseId: __expectString,
3120
- name: __expectString,
3121
- roleArn: __expectString,
3122
- status: __expectString,
3123
- storageConfiguration: _json,
3124
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3125
- });
3126
- };
3127
- const de_KnowledgeBaseDocumentDetail = (output, context) => {
3128
- return take(output, {
3129
- dataSourceId: __expectString,
3130
- identifier: _json,
3131
- knowledgeBaseId: __expectString,
3132
- status: __expectString,
3133
- statusReason: __expectString,
3134
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3135
- });
3136
- };
3137
- const de_KnowledgeBaseDocumentDetails = (output, context) => {
3138
- const retVal = (output || [])
3139
- .filter((e) => e != null)
3140
- .map((entry) => {
3141
- return de_KnowledgeBaseDocumentDetail(entry, context);
3142
- });
3143
- return retVal;
3144
- };
3145
- const de_KnowledgeBaseFlowNodeConfiguration = (output, context) => {
3146
- return take(output, {
3147
- guardrailConfiguration: _json,
3148
- inferenceConfiguration: (_) => de_PromptInferenceConfiguration(__expectUnion(_), context),
3149
- knowledgeBaseId: __expectString,
3150
- modelId: __expectString,
3151
- numberOfResults: __expectInt32,
3152
- orchestrationConfiguration: (_) => de_KnowledgeBaseOrchestrationConfiguration(_, context),
3153
- promptTemplate: _json,
3154
- rerankingConfiguration: (_) => de_VectorSearchRerankingConfiguration(_, context),
3155
- });
3156
- };
3157
- const de_KnowledgeBaseOrchestrationConfiguration = (output, context) => {
3158
- return take(output, {
3159
- additionalModelRequestFields: (_) => de_AdditionalModelRequestFields(_, context),
3160
- inferenceConfig: (_) => de_PromptInferenceConfiguration(__expectUnion(_), context),
3161
- performanceConfig: _json,
3162
- promptTemplate: _json,
3163
- });
3164
- };
3165
- const de_KnowledgeBaseSummaries = (output, context) => {
3166
- const retVal = (output || [])
3167
- .filter((e) => e != null)
3168
- .map((entry) => {
3169
- return de_KnowledgeBaseSummary(entry, context);
3170
- });
3171
- return retVal;
3172
- };
3173
- const de_KnowledgeBaseSummary = (output, context) => {
3174
- return take(output, {
3175
- description: __expectString,
3176
- knowledgeBaseId: __expectString,
3177
- name: __expectString,
3178
- status: __expectString,
3179
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3180
- });
3181
- };
3182
- const de_LoopFlowNodeConfiguration = (output, context) => {
3183
- return take(output, {
3184
- definition: (_) => de_FlowDefinition(_, context),
3185
- });
3186
- };
3187
- const de_PromptConfiguration = (output, context) => {
3188
- return take(output, {
3189
- additionalModelRequestFields: (_) => de_Document(_, context),
3190
- basePromptTemplate: __expectString,
3191
- foundationModel: __expectString,
3192
- inferenceConfiguration: (_) => de_InferenceConfiguration(_, context),
3193
- parserMode: __expectString,
3194
- promptCreationMode: __expectString,
3195
- promptState: __expectString,
3196
- promptType: __expectString,
3197
- });
3198
- };
3199
- const de_PromptConfigurations = (output, context) => {
3200
- const retVal = (output || [])
3201
- .filter((e) => e != null)
3202
- .map((entry) => {
3203
- return de_PromptConfiguration(entry, context);
3204
- });
3205
- return retVal;
3206
- };
3207
- const de_PromptFlowNodeConfiguration = (output, context) => {
3208
- return take(output, {
3209
- guardrailConfiguration: _json,
3210
- sourceConfiguration: (_) => de_PromptFlowNodeSourceConfiguration(__expectUnion(_), context),
3211
- });
3212
- };
3213
- const de_PromptFlowNodeInlineConfiguration = (output, context) => {
3214
- return take(output, {
3215
- additionalModelRequestFields: (_) => de_Document(_, context),
3216
- inferenceConfiguration: (_) => de_PromptInferenceConfiguration(__expectUnion(_), context),
3217
- modelId: __expectString,
3218
- templateConfiguration: (_) => de_PromptTemplateConfiguration(__expectUnion(_), context),
3219
- templateType: __expectString,
3220
- });
3221
- };
3222
- const de_PromptFlowNodeSourceConfiguration = (output, context) => {
3223
- if (output.inline != null) {
3224
- return {
3225
- inline: de_PromptFlowNodeInlineConfiguration(output.inline, context),
3226
- };
3227
- }
3228
- if (output.resource != null) {
3229
- return {
3230
- resource: _json(output.resource),
3231
- };
3232
- }
3233
- return { $unknown: Object.entries(output)[0] };
3234
- };
3235
- const de_PromptInferenceConfiguration = (output, context) => {
3236
- if (output.text != null) {
3237
- return {
3238
- text: de_PromptModelInferenceConfiguration(output.text, context),
3239
- };
3240
- }
3241
- return { $unknown: Object.entries(output)[0] };
3242
- };
3243
- const de_PromptModelInferenceConfiguration = (output, context) => {
3244
- return take(output, {
3245
- maxTokens: __expectInt32,
3246
- stopSequences: _json,
3247
- temperature: __limitedParseFloat32,
3248
- topP: __limitedParseFloat32,
3249
- });
3250
- };
3251
- const de_PromptOverrideConfiguration = (output, context) => {
3252
- return take(output, {
3253
- overrideLambda: __expectString,
3254
- promptConfigurations: (_) => de_PromptConfigurations(_, context),
3255
- });
3256
- };
3257
- const de_PromptSummaries = (output, context) => {
3258
- const retVal = (output || [])
3259
- .filter((e) => e != null)
3260
- .map((entry) => {
3261
- return de_PromptSummary(entry, context);
3262
- });
3263
- return retVal;
3264
- };
3265
- const de_PromptSummary = (output, context) => {
3266
- return take(output, {
3267
- arn: __expectString,
3268
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3269
- description: __expectString,
3270
- id: __expectString,
3271
- name: __expectString,
3272
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3273
- version: __expectString,
3274
- });
3275
- };
3276
- const de_PromptTemplateConfiguration = (output, context) => {
3277
- if (output.chat != null) {
3278
- return {
3279
- chat: de_ChatPromptTemplateConfiguration(output.chat, context),
3280
- };
3281
- }
3282
- if (output.text != null) {
3283
- return {
3284
- text: _json(output.text),
3285
- };
3286
- }
3287
- return { $unknown: Object.entries(output)[0] };
3288
- };
3289
- const de_PromptVariant = (output, context) => {
3290
- return take(output, {
3291
- additionalModelRequestFields: (_) => de_Document(_, context),
3292
- genAiResource: (_) => _json(__expectUnion(_)),
3293
- inferenceConfiguration: (_) => de_PromptInferenceConfiguration(__expectUnion(_), context),
3294
- metadata: _json,
3295
- modelId: __expectString,
3296
- name: __expectString,
3297
- templateConfiguration: (_) => de_PromptTemplateConfiguration(__expectUnion(_), context),
3298
- templateType: __expectString,
3299
- });
3300
- };
3301
- const de_PromptVariantList = (output, context) => {
3302
- const retVal = (output || [])
3303
- .filter((e) => e != null)
3304
- .map((entry) => {
3305
- return de_PromptVariant(entry, context);
3306
- });
3307
- return retVal;
3308
- };
3309
- const de_Tool = (output, context) => {
3310
- if (output.cachePoint != null) {
3311
- return {
3312
- cachePoint: _json(output.cachePoint),
3313
- };
3314
- }
3315
- if (output.toolSpec != null) {
3316
- return {
3317
- toolSpec: de_ToolSpecification(output.toolSpec, context),
3318
- };
3319
- }
3320
- return { $unknown: Object.entries(output)[0] };
3321
- };
3322
- const de_ToolConfiguration = (output, context) => {
3323
- return take(output, {
3324
- toolChoice: (_) => _json(__expectUnion(_)),
3325
- tools: (_) => de_Tools(_, context),
3326
- });
3327
- };
3328
- const de_ToolInputSchema = (output, context) => {
3329
- if (output.json != null) {
3330
- return {
3331
- json: de_Document(output.json, context),
3332
- };
3333
- }
3334
- return { $unknown: Object.entries(output)[0] };
3335
- };
3336
- const de_Tools = (output, context) => {
3337
- const retVal = (output || [])
3338
- .filter((e) => e != null)
3339
- .map((entry) => {
3340
- return de_Tool(__expectUnion(entry), context);
3341
- });
3342
- return retVal;
3343
- };
3344
- const de_ToolSpecification = (output, context) => {
3345
- return take(output, {
3346
- description: __expectString,
3347
- inputSchema: (_) => de_ToolInputSchema(__expectUnion(_), context),
3348
- name: __expectString,
3349
- });
3350
- };
3351
- const de_VectorSearchBedrockRerankingConfiguration = (output, context) => {
3352
- return take(output, {
3353
- metadataConfiguration: _json,
3354
- modelConfiguration: (_) => de_VectorSearchBedrockRerankingModelConfiguration(_, context),
3355
- numberOfRerankedResults: __expectInt32,
3356
- });
3357
- };
3358
- const de_VectorSearchBedrockRerankingModelConfiguration = (output, context) => {
3359
- return take(output, {
3360
- additionalModelRequestFields: (_) => de_AdditionalModelRequestFields(_, context),
3361
- modelArn: __expectString,
3362
- });
3363
- };
3364
- const de_VectorSearchRerankingConfiguration = (output, context) => {
3365
- return take(output, {
3366
- bedrockRerankingConfiguration: (_) => de_VectorSearchBedrockRerankingConfiguration(_, context),
3367
- type: __expectString,
3368
- });
3369
- };
3370
- const de_Document = (output, context) => {
3371
- return output;
3372
- };
3373
- const deserializeMetadata = (output) => ({
3374
- httpStatusCode: output.statusCode,
3375
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
3376
- extendedRequestId: output.headers["x-amz-id-2"],
3377
- cfId: output.headers["x-amz-cf-id"],
3378
- });
3379
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
3380
- const _mR = "maxResults";
3381
- const _nT = "nextToken";
3382
- const _pI = "promptIdentifier";
3383
- const _pV = "promptVersion";
3384
- const _sRIUC = "skipResourceInUseCheck";
3385
- const _tK = "tagKeys";