@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,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultEndpointResolver = void 0;
4
+ const util_endpoints_1 = require("@smithy/util-endpoints");
5
+ const ruleset_1 = require("./ruleset");
6
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
7
+ return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {
8
+ endpointParams: endpointParams,
9
+ logger: context.logger,
10
+ });
11
+ };
12
+ exports.defaultEndpointResolver = defaultEndpointResolver;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ruleSet = void 0;
4
+ const s = "required", t = "fn", u = "argv", v = "ref";
5
+ const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "String" }, i = { [s]: true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }];
6
+ const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ rules: [{ endpoint: { url: "https://bedrock-agent-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ rules: [{ endpoint: { url: "https://bedrock-agent-runtime-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ rules: [{ endpoint: { url: "https://bedrock-agent-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { rules: [{ endpoint: { url: "https://bedrock-agent-runtime.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
7
+ exports.ruleSet = _data;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BedrockAgentRuntimeServiceException = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./BedrockAgentRuntimeClient"), exports);
6
+ tslib_1.__exportStar(require("./BedrockAgentRuntime"), exports);
7
+ tslib_1.__exportStar(require("./commands"), exports);
8
+ tslib_1.__exportStar(require("./pagination"), exports);
9
+ tslib_1.__exportStar(require("./models"), exports);
10
+ require("@aws-sdk/util-endpoints");
11
+ var BedrockAgentRuntimeServiceException_1 = require("./models/BedrockAgentRuntimeServiceException");
12
+ Object.defineProperty(exports, "BedrockAgentRuntimeServiceException", { enumerable: true, get: function () { return BedrockAgentRuntimeServiceException_1.BedrockAgentRuntimeServiceException; } });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BedrockAgentRuntimeServiceException = exports.__ServiceException = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
+ class BedrockAgentRuntimeServiceException extends smithy_client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, BedrockAgentRuntimeServiceException.prototype);
10
+ }
11
+ }
12
+ exports.BedrockAgentRuntimeServiceException = BedrockAgentRuntimeServiceException;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./models_0"), exports);
@@ -0,0 +1,439 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetrieveRequestFilterSensitiveLog = exports.KnowledgeBaseQueryFilterSensitiveLog = exports.RetrieveAndGenerateResponseFilterSensitiveLog = exports.RetrieveAndGenerateOutputFilterSensitiveLog = exports.RetrieveAndGenerateRequestFilterSensitiveLog = exports.RetrieveAndGenerateInputFilterSensitiveLog = exports.InvokeAgentResponseFilterSensitiveLog = exports.ResponseStreamFilterSensitiveLog = exports.TracePartFilterSensitiveLog = exports.TraceFilterSensitiveLog = exports.PreProcessingTraceFilterSensitiveLog = exports.PreProcessingModelInvocationOutputFilterSensitiveLog = exports.PreProcessingParsedResponseFilterSensitiveLog = exports.PostProcessingTraceFilterSensitiveLog = exports.PostProcessingModelInvocationOutputFilterSensitiveLog = exports.PostProcessingParsedResponseFilterSensitiveLog = exports.OrchestrationTraceFilterSensitiveLog = exports.RationaleFilterSensitiveLog = exports.ObservationFilterSensitiveLog = exports.RepromptResponseFilterSensitiveLog = exports.FinalResponseFilterSensitiveLog = exports.ModelInvocationInputFilterSensitiveLog = exports.InvocationInputFilterSensitiveLog = exports.KnowledgeBaseLookupInputFilterSensitiveLog = exports.FailureTraceFilterSensitiveLog = exports.PayloadPartFilterSensitiveLog = exports.InvokeAgentRequestFilterSensitiveLog = exports.ActionGroupInvocationOutputFilterSensitiveLog = exports.ActionGroupInvocationInputFilterSensitiveLog = exports.RetrieveAndGenerateType = exports.ResponseStream = exports.ValidationException = exports.Trace = exports.PreProcessingTrace = exports.PostProcessingTrace = exports.OrchestrationTrace = exports.Type = exports.Source = exports.PromptType = exports.CreationMode = exports.InvocationType = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.RetrievalResultLocationType = exports.InternalServerException = exports.DependencyFailedException = exports.ConflictException = exports.BadGatewayException = exports.AccessDeniedException = void 0;
4
+ exports.RetrieveResponseFilterSensitiveLog = void 0;
5
+ const smithy_client_1 = require("@smithy/smithy-client");
6
+ const BedrockAgentRuntimeServiceException_1 = require("./BedrockAgentRuntimeServiceException");
7
+ class AccessDeniedException extends BedrockAgentRuntimeServiceException_1.BedrockAgentRuntimeServiceException {
8
+ constructor(opts) {
9
+ super({
10
+ name: "AccessDeniedException",
11
+ $fault: "client",
12
+ ...opts,
13
+ });
14
+ this.name = "AccessDeniedException";
15
+ this.$fault = "client";
16
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
17
+ }
18
+ }
19
+ exports.AccessDeniedException = AccessDeniedException;
20
+ class BadGatewayException extends BedrockAgentRuntimeServiceException_1.BedrockAgentRuntimeServiceException {
21
+ constructor(opts) {
22
+ super({
23
+ name: "BadGatewayException",
24
+ $fault: "server",
25
+ ...opts,
26
+ });
27
+ this.name = "BadGatewayException";
28
+ this.$fault = "server";
29
+ Object.setPrototypeOf(this, BadGatewayException.prototype);
30
+ this.resourceName = opts.resourceName;
31
+ }
32
+ }
33
+ exports.BadGatewayException = BadGatewayException;
34
+ class ConflictException extends BedrockAgentRuntimeServiceException_1.BedrockAgentRuntimeServiceException {
35
+ constructor(opts) {
36
+ super({
37
+ name: "ConflictException",
38
+ $fault: "client",
39
+ ...opts,
40
+ });
41
+ this.name = "ConflictException";
42
+ this.$fault = "client";
43
+ Object.setPrototypeOf(this, ConflictException.prototype);
44
+ }
45
+ }
46
+ exports.ConflictException = ConflictException;
47
+ class DependencyFailedException extends BedrockAgentRuntimeServiceException_1.BedrockAgentRuntimeServiceException {
48
+ constructor(opts) {
49
+ super({
50
+ name: "DependencyFailedException",
51
+ $fault: "client",
52
+ ...opts,
53
+ });
54
+ this.name = "DependencyFailedException";
55
+ this.$fault = "client";
56
+ Object.setPrototypeOf(this, DependencyFailedException.prototype);
57
+ this.resourceName = opts.resourceName;
58
+ }
59
+ }
60
+ exports.DependencyFailedException = DependencyFailedException;
61
+ class InternalServerException extends BedrockAgentRuntimeServiceException_1.BedrockAgentRuntimeServiceException {
62
+ constructor(opts) {
63
+ super({
64
+ name: "InternalServerException",
65
+ $fault: "server",
66
+ ...opts,
67
+ });
68
+ this.name = "InternalServerException";
69
+ this.$fault = "server";
70
+ Object.setPrototypeOf(this, InternalServerException.prototype);
71
+ }
72
+ }
73
+ exports.InternalServerException = InternalServerException;
74
+ exports.RetrievalResultLocationType = {
75
+ S3: "S3",
76
+ };
77
+ class ResourceNotFoundException extends BedrockAgentRuntimeServiceException_1.BedrockAgentRuntimeServiceException {
78
+ constructor(opts) {
79
+ super({
80
+ name: "ResourceNotFoundException",
81
+ $fault: "client",
82
+ ...opts,
83
+ });
84
+ this.name = "ResourceNotFoundException";
85
+ this.$fault = "client";
86
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
87
+ }
88
+ }
89
+ exports.ResourceNotFoundException = ResourceNotFoundException;
90
+ class ServiceQuotaExceededException extends BedrockAgentRuntimeServiceException_1.BedrockAgentRuntimeServiceException {
91
+ constructor(opts) {
92
+ super({
93
+ name: "ServiceQuotaExceededException",
94
+ $fault: "client",
95
+ ...opts,
96
+ });
97
+ this.name = "ServiceQuotaExceededException";
98
+ this.$fault = "client";
99
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
100
+ }
101
+ }
102
+ exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
103
+ class ThrottlingException extends BedrockAgentRuntimeServiceException_1.BedrockAgentRuntimeServiceException {
104
+ constructor(opts) {
105
+ super({
106
+ name: "ThrottlingException",
107
+ $fault: "client",
108
+ ...opts,
109
+ });
110
+ this.name = "ThrottlingException";
111
+ this.$fault = "client";
112
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
113
+ }
114
+ }
115
+ exports.ThrottlingException = ThrottlingException;
116
+ exports.InvocationType = {
117
+ ACTION_GROUP: "ACTION_GROUP",
118
+ FINISH: "FINISH",
119
+ KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
120
+ };
121
+ exports.CreationMode = {
122
+ DEFAULT: "DEFAULT",
123
+ OVERRIDDEN: "OVERRIDDEN",
124
+ };
125
+ exports.PromptType = {
126
+ KNOWLEDGE_BASE_RESPONSE_GENERATION: "KNOWLEDGE_BASE_RESPONSE_GENERATION",
127
+ ORCHESTRATION: "ORCHESTRATION",
128
+ POST_PROCESSING: "POST_PROCESSING",
129
+ PRE_PROCESSING: "PRE_PROCESSING",
130
+ };
131
+ exports.Source = {
132
+ ACTION_GROUP: "ACTION_GROUP",
133
+ KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
134
+ PARSER: "PARSER",
135
+ };
136
+ exports.Type = {
137
+ ACTION_GROUP: "ACTION_GROUP",
138
+ ASK_USER: "ASK_USER",
139
+ FINISH: "FINISH",
140
+ KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
141
+ REPROMPT: "REPROMPT",
142
+ };
143
+ var OrchestrationTrace;
144
+ (function (OrchestrationTrace) {
145
+ OrchestrationTrace.visit = (value, visitor) => {
146
+ if (value.rationale !== undefined)
147
+ return visitor.rationale(value.rationale);
148
+ if (value.invocationInput !== undefined)
149
+ return visitor.invocationInput(value.invocationInput);
150
+ if (value.observation !== undefined)
151
+ return visitor.observation(value.observation);
152
+ if (value.modelInvocationInput !== undefined)
153
+ return visitor.modelInvocationInput(value.modelInvocationInput);
154
+ return visitor._(value.$unknown[0], value.$unknown[1]);
155
+ };
156
+ })(OrchestrationTrace = exports.OrchestrationTrace || (exports.OrchestrationTrace = {}));
157
+ var PostProcessingTrace;
158
+ (function (PostProcessingTrace) {
159
+ PostProcessingTrace.visit = (value, visitor) => {
160
+ if (value.modelInvocationInput !== undefined)
161
+ return visitor.modelInvocationInput(value.modelInvocationInput);
162
+ if (value.modelInvocationOutput !== undefined)
163
+ return visitor.modelInvocationOutput(value.modelInvocationOutput);
164
+ return visitor._(value.$unknown[0], value.$unknown[1]);
165
+ };
166
+ })(PostProcessingTrace = exports.PostProcessingTrace || (exports.PostProcessingTrace = {}));
167
+ var PreProcessingTrace;
168
+ (function (PreProcessingTrace) {
169
+ PreProcessingTrace.visit = (value, visitor) => {
170
+ if (value.modelInvocationInput !== undefined)
171
+ return visitor.modelInvocationInput(value.modelInvocationInput);
172
+ if (value.modelInvocationOutput !== undefined)
173
+ return visitor.modelInvocationOutput(value.modelInvocationOutput);
174
+ return visitor._(value.$unknown[0], value.$unknown[1]);
175
+ };
176
+ })(PreProcessingTrace = exports.PreProcessingTrace || (exports.PreProcessingTrace = {}));
177
+ var Trace;
178
+ (function (Trace) {
179
+ Trace.visit = (value, visitor) => {
180
+ if (value.preProcessingTrace !== undefined)
181
+ return visitor.preProcessingTrace(value.preProcessingTrace);
182
+ if (value.orchestrationTrace !== undefined)
183
+ return visitor.orchestrationTrace(value.orchestrationTrace);
184
+ if (value.postProcessingTrace !== undefined)
185
+ return visitor.postProcessingTrace(value.postProcessingTrace);
186
+ if (value.failureTrace !== undefined)
187
+ return visitor.failureTrace(value.failureTrace);
188
+ return visitor._(value.$unknown[0], value.$unknown[1]);
189
+ };
190
+ })(Trace = exports.Trace || (exports.Trace = {}));
191
+ class ValidationException extends BedrockAgentRuntimeServiceException_1.BedrockAgentRuntimeServiceException {
192
+ constructor(opts) {
193
+ super({
194
+ name: "ValidationException",
195
+ $fault: "client",
196
+ ...opts,
197
+ });
198
+ this.name = "ValidationException";
199
+ this.$fault = "client";
200
+ Object.setPrototypeOf(this, ValidationException.prototype);
201
+ }
202
+ }
203
+ exports.ValidationException = ValidationException;
204
+ var ResponseStream;
205
+ (function (ResponseStream) {
206
+ ResponseStream.visit = (value, visitor) => {
207
+ if (value.chunk !== undefined)
208
+ return visitor.chunk(value.chunk);
209
+ if (value.trace !== undefined)
210
+ return visitor.trace(value.trace);
211
+ if (value.internalServerException !== undefined)
212
+ return visitor.internalServerException(value.internalServerException);
213
+ if (value.validationException !== undefined)
214
+ return visitor.validationException(value.validationException);
215
+ if (value.resourceNotFoundException !== undefined)
216
+ return visitor.resourceNotFoundException(value.resourceNotFoundException);
217
+ if (value.serviceQuotaExceededException !== undefined)
218
+ return visitor.serviceQuotaExceededException(value.serviceQuotaExceededException);
219
+ if (value.throttlingException !== undefined)
220
+ return visitor.throttlingException(value.throttlingException);
221
+ if (value.accessDeniedException !== undefined)
222
+ return visitor.accessDeniedException(value.accessDeniedException);
223
+ if (value.conflictException !== undefined)
224
+ return visitor.conflictException(value.conflictException);
225
+ if (value.dependencyFailedException !== undefined)
226
+ return visitor.dependencyFailedException(value.dependencyFailedException);
227
+ if (value.badGatewayException !== undefined)
228
+ return visitor.badGatewayException(value.badGatewayException);
229
+ return visitor._(value.$unknown[0], value.$unknown[1]);
230
+ };
231
+ })(ResponseStream = exports.ResponseStream || (exports.ResponseStream = {}));
232
+ exports.RetrieveAndGenerateType = {
233
+ KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
234
+ };
235
+ const ActionGroupInvocationInputFilterSensitiveLog = (obj) => ({
236
+ ...obj,
237
+ ...(obj.actionGroupName && { actionGroupName: smithy_client_1.SENSITIVE_STRING }),
238
+ ...(obj.verb && { verb: smithy_client_1.SENSITIVE_STRING }),
239
+ ...(obj.apiPath && { apiPath: smithy_client_1.SENSITIVE_STRING }),
240
+ });
241
+ exports.ActionGroupInvocationInputFilterSensitiveLog = ActionGroupInvocationInputFilterSensitiveLog;
242
+ const ActionGroupInvocationOutputFilterSensitiveLog = (obj) => ({
243
+ ...obj,
244
+ ...(obj.text && { text: smithy_client_1.SENSITIVE_STRING }),
245
+ });
246
+ exports.ActionGroupInvocationOutputFilterSensitiveLog = ActionGroupInvocationOutputFilterSensitiveLog;
247
+ const InvokeAgentRequestFilterSensitiveLog = (obj) => ({
248
+ ...obj,
249
+ ...(obj.inputText && { inputText: smithy_client_1.SENSITIVE_STRING }),
250
+ });
251
+ exports.InvokeAgentRequestFilterSensitiveLog = InvokeAgentRequestFilterSensitiveLog;
252
+ const PayloadPartFilterSensitiveLog = (obj) => ({
253
+ ...obj,
254
+ ...(obj.bytes && { bytes: smithy_client_1.SENSITIVE_STRING }),
255
+ });
256
+ exports.PayloadPartFilterSensitiveLog = PayloadPartFilterSensitiveLog;
257
+ const FailureTraceFilterSensitiveLog = (obj) => ({
258
+ ...obj,
259
+ ...(obj.failureReason && { failureReason: smithy_client_1.SENSITIVE_STRING }),
260
+ });
261
+ exports.FailureTraceFilterSensitiveLog = FailureTraceFilterSensitiveLog;
262
+ const KnowledgeBaseLookupInputFilterSensitiveLog = (obj) => ({
263
+ ...obj,
264
+ ...(obj.text && { text: smithy_client_1.SENSITIVE_STRING }),
265
+ ...(obj.knowledgeBaseId && { knowledgeBaseId: smithy_client_1.SENSITIVE_STRING }),
266
+ });
267
+ exports.KnowledgeBaseLookupInputFilterSensitiveLog = KnowledgeBaseLookupInputFilterSensitiveLog;
268
+ const InvocationInputFilterSensitiveLog = (obj) => ({
269
+ ...obj,
270
+ ...(obj.actionGroupInvocationInput && {
271
+ actionGroupInvocationInput: (0, exports.ActionGroupInvocationInputFilterSensitiveLog)(obj.actionGroupInvocationInput),
272
+ }),
273
+ ...(obj.knowledgeBaseLookupInput && {
274
+ knowledgeBaseLookupInput: (0, exports.KnowledgeBaseLookupInputFilterSensitiveLog)(obj.knowledgeBaseLookupInput),
275
+ }),
276
+ });
277
+ exports.InvocationInputFilterSensitiveLog = InvocationInputFilterSensitiveLog;
278
+ const ModelInvocationInputFilterSensitiveLog = (obj) => ({
279
+ ...obj,
280
+ ...(obj.text && { text: smithy_client_1.SENSITIVE_STRING }),
281
+ });
282
+ exports.ModelInvocationInputFilterSensitiveLog = ModelInvocationInputFilterSensitiveLog;
283
+ const FinalResponseFilterSensitiveLog = (obj) => ({
284
+ ...obj,
285
+ ...(obj.text && { text: smithy_client_1.SENSITIVE_STRING }),
286
+ });
287
+ exports.FinalResponseFilterSensitiveLog = FinalResponseFilterSensitiveLog;
288
+ const RepromptResponseFilterSensitiveLog = (obj) => ({
289
+ ...obj,
290
+ ...(obj.source && { source: smithy_client_1.SENSITIVE_STRING }),
291
+ });
292
+ exports.RepromptResponseFilterSensitiveLog = RepromptResponseFilterSensitiveLog;
293
+ const ObservationFilterSensitiveLog = (obj) => ({
294
+ ...obj,
295
+ ...(obj.actionGroupInvocationOutput && {
296
+ actionGroupInvocationOutput: (0, exports.ActionGroupInvocationOutputFilterSensitiveLog)(obj.actionGroupInvocationOutput),
297
+ }),
298
+ ...(obj.finalResponse && { finalResponse: (0, exports.FinalResponseFilterSensitiveLog)(obj.finalResponse) }),
299
+ ...(obj.repromptResponse && { repromptResponse: smithy_client_1.SENSITIVE_STRING }),
300
+ });
301
+ exports.ObservationFilterSensitiveLog = ObservationFilterSensitiveLog;
302
+ const RationaleFilterSensitiveLog = (obj) => ({
303
+ ...obj,
304
+ ...(obj.text && { text: smithy_client_1.SENSITIVE_STRING }),
305
+ });
306
+ exports.RationaleFilterSensitiveLog = RationaleFilterSensitiveLog;
307
+ const OrchestrationTraceFilterSensitiveLog = (obj) => {
308
+ if (obj.rationale !== undefined)
309
+ return { rationale: smithy_client_1.SENSITIVE_STRING };
310
+ if (obj.invocationInput !== undefined)
311
+ return { invocationInput: smithy_client_1.SENSITIVE_STRING };
312
+ if (obj.observation !== undefined)
313
+ return { observation: smithy_client_1.SENSITIVE_STRING };
314
+ if (obj.modelInvocationInput !== undefined)
315
+ return { modelInvocationInput: smithy_client_1.SENSITIVE_STRING };
316
+ if (obj.$unknown !== undefined)
317
+ return { [obj.$unknown[0]]: "UNKNOWN" };
318
+ };
319
+ exports.OrchestrationTraceFilterSensitiveLog = OrchestrationTraceFilterSensitiveLog;
320
+ const PostProcessingParsedResponseFilterSensitiveLog = (obj) => ({
321
+ ...obj,
322
+ ...(obj.text && { text: smithy_client_1.SENSITIVE_STRING }),
323
+ });
324
+ exports.PostProcessingParsedResponseFilterSensitiveLog = PostProcessingParsedResponseFilterSensitiveLog;
325
+ const PostProcessingModelInvocationOutputFilterSensitiveLog = (obj) => ({
326
+ ...obj,
327
+ ...(obj.parsedResponse && { parsedResponse: smithy_client_1.SENSITIVE_STRING }),
328
+ });
329
+ exports.PostProcessingModelInvocationOutputFilterSensitiveLog = PostProcessingModelInvocationOutputFilterSensitiveLog;
330
+ const PostProcessingTraceFilterSensitiveLog = (obj) => {
331
+ if (obj.modelInvocationInput !== undefined)
332
+ return { modelInvocationInput: smithy_client_1.SENSITIVE_STRING };
333
+ if (obj.modelInvocationOutput !== undefined)
334
+ return { modelInvocationOutput: smithy_client_1.SENSITIVE_STRING };
335
+ if (obj.$unknown !== undefined)
336
+ return { [obj.$unknown[0]]: "UNKNOWN" };
337
+ };
338
+ exports.PostProcessingTraceFilterSensitiveLog = PostProcessingTraceFilterSensitiveLog;
339
+ const PreProcessingParsedResponseFilterSensitiveLog = (obj) => ({
340
+ ...obj,
341
+ ...(obj.rationale && { rationale: smithy_client_1.SENSITIVE_STRING }),
342
+ });
343
+ exports.PreProcessingParsedResponseFilterSensitiveLog = PreProcessingParsedResponseFilterSensitiveLog;
344
+ const PreProcessingModelInvocationOutputFilterSensitiveLog = (obj) => ({
345
+ ...obj,
346
+ ...(obj.parsedResponse && { parsedResponse: smithy_client_1.SENSITIVE_STRING }),
347
+ });
348
+ exports.PreProcessingModelInvocationOutputFilterSensitiveLog = PreProcessingModelInvocationOutputFilterSensitiveLog;
349
+ const PreProcessingTraceFilterSensitiveLog = (obj) => {
350
+ if (obj.modelInvocationInput !== undefined)
351
+ return { modelInvocationInput: smithy_client_1.SENSITIVE_STRING };
352
+ if (obj.modelInvocationOutput !== undefined)
353
+ return { modelInvocationOutput: smithy_client_1.SENSITIVE_STRING };
354
+ if (obj.$unknown !== undefined)
355
+ return { [obj.$unknown[0]]: "UNKNOWN" };
356
+ };
357
+ exports.PreProcessingTraceFilterSensitiveLog = PreProcessingTraceFilterSensitiveLog;
358
+ const TraceFilterSensitiveLog = (obj) => {
359
+ if (obj.preProcessingTrace !== undefined)
360
+ return { preProcessingTrace: smithy_client_1.SENSITIVE_STRING };
361
+ if (obj.orchestrationTrace !== undefined)
362
+ return { orchestrationTrace: smithy_client_1.SENSITIVE_STRING };
363
+ if (obj.postProcessingTrace !== undefined)
364
+ return { postProcessingTrace: smithy_client_1.SENSITIVE_STRING };
365
+ if (obj.failureTrace !== undefined)
366
+ return { failureTrace: smithy_client_1.SENSITIVE_STRING };
367
+ if (obj.$unknown !== undefined)
368
+ return { [obj.$unknown[0]]: "UNKNOWN" };
369
+ };
370
+ exports.TraceFilterSensitiveLog = TraceFilterSensitiveLog;
371
+ const TracePartFilterSensitiveLog = (obj) => ({
372
+ ...obj,
373
+ ...(obj.trace && { trace: smithy_client_1.SENSITIVE_STRING }),
374
+ });
375
+ exports.TracePartFilterSensitiveLog = TracePartFilterSensitiveLog;
376
+ const ResponseStreamFilterSensitiveLog = (obj) => {
377
+ if (obj.chunk !== undefined)
378
+ return { chunk: smithy_client_1.SENSITIVE_STRING };
379
+ if (obj.trace !== undefined)
380
+ return { trace: smithy_client_1.SENSITIVE_STRING };
381
+ if (obj.internalServerException !== undefined)
382
+ return { internalServerException: obj.internalServerException };
383
+ if (obj.validationException !== undefined)
384
+ return { validationException: obj.validationException };
385
+ if (obj.resourceNotFoundException !== undefined)
386
+ return { resourceNotFoundException: obj.resourceNotFoundException };
387
+ if (obj.serviceQuotaExceededException !== undefined)
388
+ return { serviceQuotaExceededException: obj.serviceQuotaExceededException };
389
+ if (obj.throttlingException !== undefined)
390
+ return { throttlingException: obj.throttlingException };
391
+ if (obj.accessDeniedException !== undefined)
392
+ return { accessDeniedException: obj.accessDeniedException };
393
+ if (obj.conflictException !== undefined)
394
+ return { conflictException: obj.conflictException };
395
+ if (obj.dependencyFailedException !== undefined)
396
+ return { dependencyFailedException: obj.dependencyFailedException };
397
+ if (obj.badGatewayException !== undefined)
398
+ return { badGatewayException: obj.badGatewayException };
399
+ if (obj.$unknown !== undefined)
400
+ return { [obj.$unknown[0]]: "UNKNOWN" };
401
+ };
402
+ exports.ResponseStreamFilterSensitiveLog = ResponseStreamFilterSensitiveLog;
403
+ const InvokeAgentResponseFilterSensitiveLog = (obj) => ({
404
+ ...obj,
405
+ ...(obj.completion && { completion: "STREAMING_CONTENT" }),
406
+ });
407
+ exports.InvokeAgentResponseFilterSensitiveLog = InvokeAgentResponseFilterSensitiveLog;
408
+ const RetrieveAndGenerateInputFilterSensitiveLog = (obj) => ({
409
+ ...obj,
410
+ });
411
+ exports.RetrieveAndGenerateInputFilterSensitiveLog = RetrieveAndGenerateInputFilterSensitiveLog;
412
+ const RetrieveAndGenerateRequestFilterSensitiveLog = (obj) => ({
413
+ ...obj,
414
+ ...(obj.input && { input: smithy_client_1.SENSITIVE_STRING }),
415
+ });
416
+ exports.RetrieveAndGenerateRequestFilterSensitiveLog = RetrieveAndGenerateRequestFilterSensitiveLog;
417
+ const RetrieveAndGenerateOutputFilterSensitiveLog = (obj) => ({
418
+ ...obj,
419
+ });
420
+ exports.RetrieveAndGenerateOutputFilterSensitiveLog = RetrieveAndGenerateOutputFilterSensitiveLog;
421
+ const RetrieveAndGenerateResponseFilterSensitiveLog = (obj) => ({
422
+ ...obj,
423
+ ...(obj.output && { output: smithy_client_1.SENSITIVE_STRING }),
424
+ });
425
+ exports.RetrieveAndGenerateResponseFilterSensitiveLog = RetrieveAndGenerateResponseFilterSensitiveLog;
426
+ const KnowledgeBaseQueryFilterSensitiveLog = (obj) => ({
427
+ ...obj,
428
+ });
429
+ exports.KnowledgeBaseQueryFilterSensitiveLog = KnowledgeBaseQueryFilterSensitiveLog;
430
+ const RetrieveRequestFilterSensitiveLog = (obj) => ({
431
+ ...obj,
432
+ ...(obj.retrievalQuery && { retrievalQuery: smithy_client_1.SENSITIVE_STRING }),
433
+ });
434
+ exports.RetrieveRequestFilterSensitiveLog = RetrieveRequestFilterSensitiveLog;
435
+ const RetrieveResponseFilterSensitiveLog = (obj) => ({
436
+ ...obj,
437
+ ...(obj.retrievalResults && { retrievalResults: smithy_client_1.SENSITIVE_STRING }),
438
+ });
439
+ exports.RetrieveResponseFilterSensitiveLog = RetrieveResponseFilterSensitiveLog;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateRetrieve = void 0;
4
+ const BedrockAgentRuntimeClient_1 = require("../BedrockAgentRuntimeClient");
5
+ const RetrieveCommand_1 = require("../commands/RetrieveCommand");
6
+ const makePagedClientRequest = async (client, input, ...args) => {
7
+ return await client.send(new RetrieveCommand_1.RetrieveCommand(input), ...args);
8
+ };
9
+ async function* paginateRetrieve(config, input, ...additionalArguments) {
10
+ let token = config.startingToken || undefined;
11
+ let hasNext = true;
12
+ let page;
13
+ while (hasNext) {
14
+ input.nextToken = token;
15
+ if (config.client instanceof BedrockAgentRuntimeClient_1.BedrockAgentRuntimeClient) {
16
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
+ }
18
+ else {
19
+ throw new Error("Invalid client, expected BedrockAgentRuntime | BedrockAgentRuntimeClient");
20
+ }
21
+ yield page;
22
+ const prevToken = token;
23
+ token = page.nextToken;
24
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
25
+ }
26
+ return undefined;
27
+ }
28
+ exports.paginateRetrieve = paginateRetrieve;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./Interfaces"), exports);
5
+ tslib_1.__exportStar(require("./RetrievePaginator"), exports);