@aws-sdk/client-bedrock-agent-runtime 3.461.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 (95) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +229 -0
  3. package/dist-cjs/BedrockAgentRuntime.js +17 -0
  4. package/dist-cjs/BedrockAgentRuntimeClient.js +45 -0
  5. package/dist-cjs/commands/InvokeAgentCommand.js +52 -0
  6. package/dist-cjs/commands/RetrieveAndGenerateCommand.js +52 -0
  7. package/dist-cjs/commands/RetrieveCommand.js +52 -0
  8. package/dist-cjs/commands/index.js +6 -0
  9. package/dist-cjs/endpoint/EndpointParameters.js +12 -0
  10. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  11. package/dist-cjs/endpoint/ruleset.js +7 -0
  12. package/dist-cjs/extensionConfiguration.js +2 -0
  13. package/dist-cjs/index.js +12 -0
  14. package/dist-cjs/models/BedrockAgentRuntimeServiceException.js +12 -0
  15. package/dist-cjs/models/index.js +4 -0
  16. package/dist-cjs/models/models_0.js +439 -0
  17. package/dist-cjs/pagination/Interfaces.js +2 -0
  18. package/dist-cjs/pagination/RetrievePaginator.js +28 -0
  19. package/dist-cjs/pagination/index.js +5 -0
  20. package/dist-cjs/protocols/Aws_restJson1.js +689 -0
  21. package/dist-cjs/runtimeConfig.browser.js +41 -0
  22. package/dist-cjs/runtimeConfig.js +52 -0
  23. package/dist-cjs/runtimeConfig.native.js +15 -0
  24. package/dist-cjs/runtimeConfig.shared.js +24 -0
  25. package/dist-cjs/runtimeExtensions.js +22 -0
  26. package/dist-es/BedrockAgentRuntime.js +13 -0
  27. package/dist-es/BedrockAgentRuntimeClient.js +41 -0
  28. package/dist-es/commands/InvokeAgentCommand.js +48 -0
  29. package/dist-es/commands/RetrieveAndGenerateCommand.js +48 -0
  30. package/dist-es/commands/RetrieveCommand.js +48 -0
  31. package/dist-es/commands/index.js +3 -0
  32. package/dist-es/endpoint/EndpointParameters.js +8 -0
  33. package/dist-es/endpoint/endpointResolver.js +8 -0
  34. package/dist-es/endpoint/ruleset.js +4 -0
  35. package/dist-es/extensionConfiguration.js +1 -0
  36. package/dist-es/index.js +7 -0
  37. package/dist-es/models/BedrockAgentRuntimeServiceException.js +8 -0
  38. package/dist-es/models/index.js +1 -0
  39. package/dist-es/models/models_0.js +396 -0
  40. package/dist-es/pagination/Interfaces.js +1 -0
  41. package/dist-es/pagination/RetrievePaginator.js +24 -0
  42. package/dist-es/pagination/index.js +2 -0
  43. package/dist-es/protocols/Aws_restJson1.js +680 -0
  44. package/dist-es/runtimeConfig.browser.js +36 -0
  45. package/dist-es/runtimeConfig.js +47 -0
  46. package/dist-es/runtimeConfig.native.js +11 -0
  47. package/dist-es/runtimeConfig.shared.js +20 -0
  48. package/dist-es/runtimeExtensions.js +18 -0
  49. package/dist-types/BedrockAgentRuntime.d.ts +31 -0
  50. package/dist-types/BedrockAgentRuntimeClient.d.ts +177 -0
  51. package/dist-types/commands/InvokeAgentCommand.d.ts +321 -0
  52. package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +142 -0
  53. package/dist-types/commands/RetrieveCommand.d.ts +123 -0
  54. package/dist-types/commands/index.d.ts +3 -0
  55. package/dist-types/endpoint/EndpointParameters.d.ts +22 -0
  56. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  57. package/dist-types/endpoint/ruleset.d.ts +2 -0
  58. package/dist-types/extensionConfiguration.d.ts +8 -0
  59. package/dist-types/index.d.ts +15 -0
  60. package/dist-types/models/BedrockAgentRuntimeServiceException.d.ts +13 -0
  61. package/dist-types/models/index.d.ts +1 -0
  62. package/dist-types/models/models_0.d.ts +1598 -0
  63. package/dist-types/pagination/Interfaces.d.ts +8 -0
  64. package/dist-types/pagination/RetrievePaginator.d.ts +7 -0
  65. package/dist-types/pagination/index.d.ts +2 -0
  66. package/dist-types/protocols/Aws_restJson1.d.ts +29 -0
  67. package/dist-types/runtimeConfig.browser.d.ts +47 -0
  68. package/dist-types/runtimeConfig.d.ts +47 -0
  69. package/dist-types/runtimeConfig.native.d.ts +46 -0
  70. package/dist-types/runtimeConfig.shared.d.ts +19 -0
  71. package/dist-types/runtimeExtensions.d.ts +17 -0
  72. package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +58 -0
  73. package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +147 -0
  74. package/dist-types/ts3.4/commands/InvokeAgentCommand.d.ts +35 -0
  75. package/dist-types/ts3.4/commands/RetrieveAndGenerateCommand.d.ts +39 -0
  76. package/dist-types/ts3.4/commands/RetrieveCommand.d.ts +35 -0
  77. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  78. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
  79. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  80. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  81. package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
  82. package/dist-types/ts3.4/index.d.ts +10 -0
  83. package/dist-types/ts3.4/models/BedrockAgentRuntimeServiceException.d.ts +8 -0
  84. package/dist-types/ts3.4/models/index.d.ts +1 -0
  85. package/dist-types/ts3.4/models/models_0.d.ts +737 -0
  86. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  87. package/dist-types/ts3.4/pagination/RetrievePaginator.d.ts +11 -0
  88. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  89. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +44 -0
  90. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
  91. package/dist-types/ts3.4/runtimeConfig.d.ts +100 -0
  92. package/dist-types/ts3.4/runtimeConfig.native.d.ts +91 -0
  93. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
  94. package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
  95. package/package.json +105 -0
@@ -0,0 +1,396 @@
1
+ import { SENSITIVE_STRING } from "@smithy/smithy-client";
2
+ import { BedrockAgentRuntimeServiceException as __BaseException } from "./BedrockAgentRuntimeServiceException";
3
+ export class AccessDeniedException extends __BaseException {
4
+ constructor(opts) {
5
+ super({
6
+ name: "AccessDeniedException",
7
+ $fault: "client",
8
+ ...opts,
9
+ });
10
+ this.name = "AccessDeniedException";
11
+ this.$fault = "client";
12
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
13
+ }
14
+ }
15
+ export class BadGatewayException extends __BaseException {
16
+ constructor(opts) {
17
+ super({
18
+ name: "BadGatewayException",
19
+ $fault: "server",
20
+ ...opts,
21
+ });
22
+ this.name = "BadGatewayException";
23
+ this.$fault = "server";
24
+ Object.setPrototypeOf(this, BadGatewayException.prototype);
25
+ this.resourceName = opts.resourceName;
26
+ }
27
+ }
28
+ export class ConflictException extends __BaseException {
29
+ constructor(opts) {
30
+ super({
31
+ name: "ConflictException",
32
+ $fault: "client",
33
+ ...opts,
34
+ });
35
+ this.name = "ConflictException";
36
+ this.$fault = "client";
37
+ Object.setPrototypeOf(this, ConflictException.prototype);
38
+ }
39
+ }
40
+ export class DependencyFailedException extends __BaseException {
41
+ constructor(opts) {
42
+ super({
43
+ name: "DependencyFailedException",
44
+ $fault: "client",
45
+ ...opts,
46
+ });
47
+ this.name = "DependencyFailedException";
48
+ this.$fault = "client";
49
+ Object.setPrototypeOf(this, DependencyFailedException.prototype);
50
+ this.resourceName = opts.resourceName;
51
+ }
52
+ }
53
+ export class InternalServerException extends __BaseException {
54
+ constructor(opts) {
55
+ super({
56
+ name: "InternalServerException",
57
+ $fault: "server",
58
+ ...opts,
59
+ });
60
+ this.name = "InternalServerException";
61
+ this.$fault = "server";
62
+ Object.setPrototypeOf(this, InternalServerException.prototype);
63
+ }
64
+ }
65
+ export const RetrievalResultLocationType = {
66
+ S3: "S3",
67
+ };
68
+ export class ResourceNotFoundException extends __BaseException {
69
+ constructor(opts) {
70
+ super({
71
+ name: "ResourceNotFoundException",
72
+ $fault: "client",
73
+ ...opts,
74
+ });
75
+ this.name = "ResourceNotFoundException";
76
+ this.$fault = "client";
77
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
78
+ }
79
+ }
80
+ export class ServiceQuotaExceededException extends __BaseException {
81
+ constructor(opts) {
82
+ super({
83
+ name: "ServiceQuotaExceededException",
84
+ $fault: "client",
85
+ ...opts,
86
+ });
87
+ this.name = "ServiceQuotaExceededException";
88
+ this.$fault = "client";
89
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
90
+ }
91
+ }
92
+ export class ThrottlingException extends __BaseException {
93
+ constructor(opts) {
94
+ super({
95
+ name: "ThrottlingException",
96
+ $fault: "client",
97
+ ...opts,
98
+ });
99
+ this.name = "ThrottlingException";
100
+ this.$fault = "client";
101
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
102
+ }
103
+ }
104
+ export const InvocationType = {
105
+ ACTION_GROUP: "ACTION_GROUP",
106
+ FINISH: "FINISH",
107
+ KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
108
+ };
109
+ export const CreationMode = {
110
+ DEFAULT: "DEFAULT",
111
+ OVERRIDDEN: "OVERRIDDEN",
112
+ };
113
+ export const PromptType = {
114
+ KNOWLEDGE_BASE_RESPONSE_GENERATION: "KNOWLEDGE_BASE_RESPONSE_GENERATION",
115
+ ORCHESTRATION: "ORCHESTRATION",
116
+ POST_PROCESSING: "POST_PROCESSING",
117
+ PRE_PROCESSING: "PRE_PROCESSING",
118
+ };
119
+ export const Source = {
120
+ ACTION_GROUP: "ACTION_GROUP",
121
+ KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
122
+ PARSER: "PARSER",
123
+ };
124
+ export const Type = {
125
+ ACTION_GROUP: "ACTION_GROUP",
126
+ ASK_USER: "ASK_USER",
127
+ FINISH: "FINISH",
128
+ KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
129
+ REPROMPT: "REPROMPT",
130
+ };
131
+ export var OrchestrationTrace;
132
+ (function (OrchestrationTrace) {
133
+ OrchestrationTrace.visit = (value, visitor) => {
134
+ if (value.rationale !== undefined)
135
+ return visitor.rationale(value.rationale);
136
+ if (value.invocationInput !== undefined)
137
+ return visitor.invocationInput(value.invocationInput);
138
+ if (value.observation !== undefined)
139
+ return visitor.observation(value.observation);
140
+ if (value.modelInvocationInput !== undefined)
141
+ return visitor.modelInvocationInput(value.modelInvocationInput);
142
+ return visitor._(value.$unknown[0], value.$unknown[1]);
143
+ };
144
+ })(OrchestrationTrace || (OrchestrationTrace = {}));
145
+ export var PostProcessingTrace;
146
+ (function (PostProcessingTrace) {
147
+ PostProcessingTrace.visit = (value, visitor) => {
148
+ if (value.modelInvocationInput !== undefined)
149
+ return visitor.modelInvocationInput(value.modelInvocationInput);
150
+ if (value.modelInvocationOutput !== undefined)
151
+ return visitor.modelInvocationOutput(value.modelInvocationOutput);
152
+ return visitor._(value.$unknown[0], value.$unknown[1]);
153
+ };
154
+ })(PostProcessingTrace || (PostProcessingTrace = {}));
155
+ export var PreProcessingTrace;
156
+ (function (PreProcessingTrace) {
157
+ PreProcessingTrace.visit = (value, visitor) => {
158
+ if (value.modelInvocationInput !== undefined)
159
+ return visitor.modelInvocationInput(value.modelInvocationInput);
160
+ if (value.modelInvocationOutput !== undefined)
161
+ return visitor.modelInvocationOutput(value.modelInvocationOutput);
162
+ return visitor._(value.$unknown[0], value.$unknown[1]);
163
+ };
164
+ })(PreProcessingTrace || (PreProcessingTrace = {}));
165
+ export var Trace;
166
+ (function (Trace) {
167
+ Trace.visit = (value, visitor) => {
168
+ if (value.preProcessingTrace !== undefined)
169
+ return visitor.preProcessingTrace(value.preProcessingTrace);
170
+ if (value.orchestrationTrace !== undefined)
171
+ return visitor.orchestrationTrace(value.orchestrationTrace);
172
+ if (value.postProcessingTrace !== undefined)
173
+ return visitor.postProcessingTrace(value.postProcessingTrace);
174
+ if (value.failureTrace !== undefined)
175
+ return visitor.failureTrace(value.failureTrace);
176
+ return visitor._(value.$unknown[0], value.$unknown[1]);
177
+ };
178
+ })(Trace || (Trace = {}));
179
+ export class ValidationException extends __BaseException {
180
+ constructor(opts) {
181
+ super({
182
+ name: "ValidationException",
183
+ $fault: "client",
184
+ ...opts,
185
+ });
186
+ this.name = "ValidationException";
187
+ this.$fault = "client";
188
+ Object.setPrototypeOf(this, ValidationException.prototype);
189
+ }
190
+ }
191
+ export var ResponseStream;
192
+ (function (ResponseStream) {
193
+ ResponseStream.visit = (value, visitor) => {
194
+ if (value.chunk !== undefined)
195
+ return visitor.chunk(value.chunk);
196
+ if (value.trace !== undefined)
197
+ return visitor.trace(value.trace);
198
+ if (value.internalServerException !== undefined)
199
+ return visitor.internalServerException(value.internalServerException);
200
+ if (value.validationException !== undefined)
201
+ return visitor.validationException(value.validationException);
202
+ if (value.resourceNotFoundException !== undefined)
203
+ return visitor.resourceNotFoundException(value.resourceNotFoundException);
204
+ if (value.serviceQuotaExceededException !== undefined)
205
+ return visitor.serviceQuotaExceededException(value.serviceQuotaExceededException);
206
+ if (value.throttlingException !== undefined)
207
+ return visitor.throttlingException(value.throttlingException);
208
+ if (value.accessDeniedException !== undefined)
209
+ return visitor.accessDeniedException(value.accessDeniedException);
210
+ if (value.conflictException !== undefined)
211
+ return visitor.conflictException(value.conflictException);
212
+ if (value.dependencyFailedException !== undefined)
213
+ return visitor.dependencyFailedException(value.dependencyFailedException);
214
+ if (value.badGatewayException !== undefined)
215
+ return visitor.badGatewayException(value.badGatewayException);
216
+ return visitor._(value.$unknown[0], value.$unknown[1]);
217
+ };
218
+ })(ResponseStream || (ResponseStream = {}));
219
+ export const RetrieveAndGenerateType = {
220
+ KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
221
+ };
222
+ export const ActionGroupInvocationInputFilterSensitiveLog = (obj) => ({
223
+ ...obj,
224
+ ...(obj.actionGroupName && { actionGroupName: SENSITIVE_STRING }),
225
+ ...(obj.verb && { verb: SENSITIVE_STRING }),
226
+ ...(obj.apiPath && { apiPath: SENSITIVE_STRING }),
227
+ });
228
+ export const ActionGroupInvocationOutputFilterSensitiveLog = (obj) => ({
229
+ ...obj,
230
+ ...(obj.text && { text: SENSITIVE_STRING }),
231
+ });
232
+ export const InvokeAgentRequestFilterSensitiveLog = (obj) => ({
233
+ ...obj,
234
+ ...(obj.inputText && { inputText: SENSITIVE_STRING }),
235
+ });
236
+ export const PayloadPartFilterSensitiveLog = (obj) => ({
237
+ ...obj,
238
+ ...(obj.bytes && { bytes: SENSITIVE_STRING }),
239
+ });
240
+ export const FailureTraceFilterSensitiveLog = (obj) => ({
241
+ ...obj,
242
+ ...(obj.failureReason && { failureReason: SENSITIVE_STRING }),
243
+ });
244
+ export const KnowledgeBaseLookupInputFilterSensitiveLog = (obj) => ({
245
+ ...obj,
246
+ ...(obj.text && { text: SENSITIVE_STRING }),
247
+ ...(obj.knowledgeBaseId && { knowledgeBaseId: SENSITIVE_STRING }),
248
+ });
249
+ export const InvocationInputFilterSensitiveLog = (obj) => ({
250
+ ...obj,
251
+ ...(obj.actionGroupInvocationInput && {
252
+ actionGroupInvocationInput: ActionGroupInvocationInputFilterSensitiveLog(obj.actionGroupInvocationInput),
253
+ }),
254
+ ...(obj.knowledgeBaseLookupInput && {
255
+ knowledgeBaseLookupInput: KnowledgeBaseLookupInputFilterSensitiveLog(obj.knowledgeBaseLookupInput),
256
+ }),
257
+ });
258
+ export const ModelInvocationInputFilterSensitiveLog = (obj) => ({
259
+ ...obj,
260
+ ...(obj.text && { text: SENSITIVE_STRING }),
261
+ });
262
+ export const FinalResponseFilterSensitiveLog = (obj) => ({
263
+ ...obj,
264
+ ...(obj.text && { text: SENSITIVE_STRING }),
265
+ });
266
+ export const RepromptResponseFilterSensitiveLog = (obj) => ({
267
+ ...obj,
268
+ ...(obj.source && { source: SENSITIVE_STRING }),
269
+ });
270
+ export const ObservationFilterSensitiveLog = (obj) => ({
271
+ ...obj,
272
+ ...(obj.actionGroupInvocationOutput && {
273
+ actionGroupInvocationOutput: ActionGroupInvocationOutputFilterSensitiveLog(obj.actionGroupInvocationOutput),
274
+ }),
275
+ ...(obj.finalResponse && { finalResponse: FinalResponseFilterSensitiveLog(obj.finalResponse) }),
276
+ ...(obj.repromptResponse && { repromptResponse: SENSITIVE_STRING }),
277
+ });
278
+ export const RationaleFilterSensitiveLog = (obj) => ({
279
+ ...obj,
280
+ ...(obj.text && { text: SENSITIVE_STRING }),
281
+ });
282
+ export const OrchestrationTraceFilterSensitiveLog = (obj) => {
283
+ if (obj.rationale !== undefined)
284
+ return { rationale: SENSITIVE_STRING };
285
+ if (obj.invocationInput !== undefined)
286
+ return { invocationInput: SENSITIVE_STRING };
287
+ if (obj.observation !== undefined)
288
+ return { observation: SENSITIVE_STRING };
289
+ if (obj.modelInvocationInput !== undefined)
290
+ return { modelInvocationInput: SENSITIVE_STRING };
291
+ if (obj.$unknown !== undefined)
292
+ return { [obj.$unknown[0]]: "UNKNOWN" };
293
+ };
294
+ export const PostProcessingParsedResponseFilterSensitiveLog = (obj) => ({
295
+ ...obj,
296
+ ...(obj.text && { text: SENSITIVE_STRING }),
297
+ });
298
+ export const PostProcessingModelInvocationOutputFilterSensitiveLog = (obj) => ({
299
+ ...obj,
300
+ ...(obj.parsedResponse && { parsedResponse: SENSITIVE_STRING }),
301
+ });
302
+ export const PostProcessingTraceFilterSensitiveLog = (obj) => {
303
+ if (obj.modelInvocationInput !== undefined)
304
+ return { modelInvocationInput: SENSITIVE_STRING };
305
+ if (obj.modelInvocationOutput !== undefined)
306
+ return { modelInvocationOutput: SENSITIVE_STRING };
307
+ if (obj.$unknown !== undefined)
308
+ return { [obj.$unknown[0]]: "UNKNOWN" };
309
+ };
310
+ export const PreProcessingParsedResponseFilterSensitiveLog = (obj) => ({
311
+ ...obj,
312
+ ...(obj.rationale && { rationale: SENSITIVE_STRING }),
313
+ });
314
+ export const PreProcessingModelInvocationOutputFilterSensitiveLog = (obj) => ({
315
+ ...obj,
316
+ ...(obj.parsedResponse && { parsedResponse: SENSITIVE_STRING }),
317
+ });
318
+ export const PreProcessingTraceFilterSensitiveLog = (obj) => {
319
+ if (obj.modelInvocationInput !== undefined)
320
+ return { modelInvocationInput: SENSITIVE_STRING };
321
+ if (obj.modelInvocationOutput !== undefined)
322
+ return { modelInvocationOutput: SENSITIVE_STRING };
323
+ if (obj.$unknown !== undefined)
324
+ return { [obj.$unknown[0]]: "UNKNOWN" };
325
+ };
326
+ export const TraceFilterSensitiveLog = (obj) => {
327
+ if (obj.preProcessingTrace !== undefined)
328
+ return { preProcessingTrace: SENSITIVE_STRING };
329
+ if (obj.orchestrationTrace !== undefined)
330
+ return { orchestrationTrace: SENSITIVE_STRING };
331
+ if (obj.postProcessingTrace !== undefined)
332
+ return { postProcessingTrace: SENSITIVE_STRING };
333
+ if (obj.failureTrace !== undefined)
334
+ return { failureTrace: SENSITIVE_STRING };
335
+ if (obj.$unknown !== undefined)
336
+ return { [obj.$unknown[0]]: "UNKNOWN" };
337
+ };
338
+ export const TracePartFilterSensitiveLog = (obj) => ({
339
+ ...obj,
340
+ ...(obj.trace && { trace: SENSITIVE_STRING }),
341
+ });
342
+ export const ResponseStreamFilterSensitiveLog = (obj) => {
343
+ if (obj.chunk !== undefined)
344
+ return { chunk: SENSITIVE_STRING };
345
+ if (obj.trace !== undefined)
346
+ return { trace: SENSITIVE_STRING };
347
+ if (obj.internalServerException !== undefined)
348
+ return { internalServerException: obj.internalServerException };
349
+ if (obj.validationException !== undefined)
350
+ return { validationException: obj.validationException };
351
+ if (obj.resourceNotFoundException !== undefined)
352
+ return { resourceNotFoundException: obj.resourceNotFoundException };
353
+ if (obj.serviceQuotaExceededException !== undefined)
354
+ return { serviceQuotaExceededException: obj.serviceQuotaExceededException };
355
+ if (obj.throttlingException !== undefined)
356
+ return { throttlingException: obj.throttlingException };
357
+ if (obj.accessDeniedException !== undefined)
358
+ return { accessDeniedException: obj.accessDeniedException };
359
+ if (obj.conflictException !== undefined)
360
+ return { conflictException: obj.conflictException };
361
+ if (obj.dependencyFailedException !== undefined)
362
+ return { dependencyFailedException: obj.dependencyFailedException };
363
+ if (obj.badGatewayException !== undefined)
364
+ return { badGatewayException: obj.badGatewayException };
365
+ if (obj.$unknown !== undefined)
366
+ return { [obj.$unknown[0]]: "UNKNOWN" };
367
+ };
368
+ export const InvokeAgentResponseFilterSensitiveLog = (obj) => ({
369
+ ...obj,
370
+ ...(obj.completion && { completion: "STREAMING_CONTENT" }),
371
+ });
372
+ export const RetrieveAndGenerateInputFilterSensitiveLog = (obj) => ({
373
+ ...obj,
374
+ });
375
+ export const RetrieveAndGenerateRequestFilterSensitiveLog = (obj) => ({
376
+ ...obj,
377
+ ...(obj.input && { input: SENSITIVE_STRING }),
378
+ });
379
+ export const RetrieveAndGenerateOutputFilterSensitiveLog = (obj) => ({
380
+ ...obj,
381
+ });
382
+ export const RetrieveAndGenerateResponseFilterSensitiveLog = (obj) => ({
383
+ ...obj,
384
+ ...(obj.output && { output: SENSITIVE_STRING }),
385
+ });
386
+ export const KnowledgeBaseQueryFilterSensitiveLog = (obj) => ({
387
+ ...obj,
388
+ });
389
+ export const RetrieveRequestFilterSensitiveLog = (obj) => ({
390
+ ...obj,
391
+ ...(obj.retrievalQuery && { retrievalQuery: SENSITIVE_STRING }),
392
+ });
393
+ export const RetrieveResponseFilterSensitiveLog = (obj) => ({
394
+ ...obj,
395
+ ...(obj.retrievalResults && { retrievalResults: SENSITIVE_STRING }),
396
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import { BedrockAgentRuntimeClient } from "../BedrockAgentRuntimeClient";
2
+ import { RetrieveCommand } from "../commands/RetrieveCommand";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new RetrieveCommand(input), ...args);
5
+ };
6
+ export async function* paginateRetrieve(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ if (config.client instanceof BedrockAgentRuntimeClient) {
13
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
14
+ }
15
+ else {
16
+ throw new Error("Invalid client, expected BedrockAgentRuntime | BedrockAgentRuntimeClient");
17
+ }
18
+ yield page;
19
+ const prevToken = token;
20
+ token = page.nextToken;
21
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
22
+ }
23
+ return undefined;
24
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./Interfaces";
2
+ export * from "./RetrievePaginator";