@aws-sdk/client-bedrock-runtime 3.774.0 → 3.777.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/auth/httpAuthSchemeProvider.js +1 -3
- package/dist-cjs/index.js +17 -18
- package/dist-es/BedrockRuntimeClient.js +2 -1
- package/dist-es/auth/httpAuthSchemeProvider.js +1 -3
- package/dist-es/endpoint/EndpointParameters.js +2 -3
- package/dist-es/runtimeExtensions.js +2 -14
- package/dist-types/commands/ApplyGuardrailCommand.d.ts +1 -0
- package/dist-types/commands/ConverseCommand.d.ts +1 -0
- package/dist-types/commands/ConverseStreamCommand.d.ts +1 -0
- package/dist-types/commands/GetAsyncInvokeCommand.d.ts +1 -0
- package/dist-types/commands/InvokeModelCommand.d.ts +1 -0
- package/dist-types/commands/InvokeModelWithResponseStreamCommand.d.ts +1 -0
- package/dist-types/commands/ListAsyncInvokesCommand.d.ts +1 -0
- package/dist-types/commands/StartAsyncInvokeCommand.d.ts +1 -0
- package/package.json +37 -37
|
@@ -40,8 +40,6 @@ const defaultBedrockRuntimeHttpAuthSchemeProvider = (authParameters) => {
|
|
|
40
40
|
exports.defaultBedrockRuntimeHttpAuthSchemeProvider = defaultBedrockRuntimeHttpAuthSchemeProvider;
|
|
41
41
|
const resolveHttpAuthSchemeConfig = (config) => {
|
|
42
42
|
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
|
|
43
|
-
return {
|
|
44
|
-
...config_0,
|
|
45
|
-
};
|
|
43
|
+
return Object.assign(config_0, {});
|
|
46
44
|
};
|
|
47
45
|
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
package/dist-cjs/index.js
CHANGED
|
@@ -149,12 +149,11 @@ var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
|
|
|
149
149
|
|
|
150
150
|
// src/endpoint/EndpointParameters.ts
|
|
151
151
|
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
152
|
-
return {
|
|
153
|
-
...options,
|
|
152
|
+
return Object.assign(options, {
|
|
154
153
|
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
155
154
|
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
156
155
|
defaultSigningName: "bedrock"
|
|
157
|
-
};
|
|
156
|
+
});
|
|
158
157
|
}, "resolveClientEndpointParameters");
|
|
159
158
|
var commonParams = {
|
|
160
159
|
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
@@ -211,22 +210,21 @@ var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
|
|
|
211
210
|
}, "resolveHttpAuthRuntimeConfig");
|
|
212
211
|
|
|
213
212
|
// src/runtimeExtensions.ts
|
|
214
|
-
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
215
213
|
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
216
|
-
const extensionConfiguration =
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
214
|
+
const extensionConfiguration = Object.assign(
|
|
215
|
+
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
|
|
216
|
+
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
|
|
217
|
+
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
|
|
218
|
+
getHttpAuthExtensionConfiguration(runtimeConfig)
|
|
219
|
+
);
|
|
222
220
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
223
|
-
return
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
221
|
+
return Object.assign(
|
|
222
|
+
runtimeConfig,
|
|
223
|
+
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
224
|
+
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
225
|
+
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
226
|
+
resolveHttpAuthRuntimeConfig(extensionConfiguration)
|
|
227
|
+
);
|
|
230
228
|
}, "resolveRuntimeExtensions");
|
|
231
229
|
|
|
232
230
|
// src/BedrockRuntimeClient.ts
|
|
@@ -240,6 +238,8 @@ var BedrockRuntimeClient = class extends import_smithy_client.Client {
|
|
|
240
238
|
config;
|
|
241
239
|
constructor(...[configuration]) {
|
|
242
240
|
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
241
|
+
super(_config_0);
|
|
242
|
+
this.initConfig = _config_0;
|
|
243
243
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
244
244
|
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
|
|
245
245
|
const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
|
|
@@ -249,7 +249,6 @@ var BedrockRuntimeClient = class extends import_smithy_client.Client {
|
|
|
249
249
|
const _config_7 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_6);
|
|
250
250
|
const _config_8 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_7);
|
|
251
251
|
const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []);
|
|
252
|
-
super(_config_9);
|
|
253
252
|
this.config = _config_9;
|
|
254
253
|
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
255
254
|
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
@@ -18,6 +18,8 @@ export class BedrockRuntimeClient extends __Client {
|
|
|
18
18
|
config;
|
|
19
19
|
constructor(...[configuration]) {
|
|
20
20
|
const _config_0 = __getRuntimeConfig(configuration || {});
|
|
21
|
+
super(_config_0);
|
|
22
|
+
this.initConfig = _config_0;
|
|
21
23
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
22
24
|
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
23
25
|
const _config_3 = resolveRetryConfig(_config_2);
|
|
@@ -27,7 +29,6 @@ export class BedrockRuntimeClient extends __Client {
|
|
|
27
29
|
const _config_7 = resolveEventStreamSerdeConfig(_config_6);
|
|
28
30
|
const _config_8 = resolveHttpAuthSchemeConfig(_config_7);
|
|
29
31
|
const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []);
|
|
30
|
-
super(_config_9);
|
|
31
32
|
this.config = _config_9;
|
|
32
33
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
33
34
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
@@ -35,7 +35,5 @@ export const defaultBedrockRuntimeHttpAuthSchemeProvider = (authParameters) => {
|
|
|
35
35
|
};
|
|
36
36
|
export const resolveHttpAuthSchemeConfig = (config) => {
|
|
37
37
|
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
38
|
-
return {
|
|
39
|
-
...config_0,
|
|
40
|
-
};
|
|
38
|
+
return Object.assign(config_0, {});
|
|
41
39
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export const resolveClientEndpointParameters = (options) => {
|
|
2
|
-
return {
|
|
3
|
-
...options,
|
|
2
|
+
return Object.assign(options, {
|
|
4
3
|
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
5
4
|
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
6
5
|
defaultSigningName: "bedrock",
|
|
7
|
-
};
|
|
6
|
+
});
|
|
8
7
|
};
|
|
9
8
|
export const commonParams = {
|
|
10
9
|
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
@@ -2,20 +2,8 @@ import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfigurat
|
|
|
2
2
|
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
3
3
|
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
4
4
|
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
-
const asPartial = (t) => t;
|
|
6
5
|
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
7
|
-
const extensionConfiguration =
|
|
8
|
-
...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
|
|
9
|
-
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
|
10
|
-
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
|
11
|
-
...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
|
|
12
|
-
};
|
|
6
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
13
7
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
14
|
-
return
|
|
15
|
-
...runtimeConfig,
|
|
16
|
-
...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
|
|
17
|
-
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
|
18
|
-
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
|
19
|
-
...resolveHttpAuthRuntimeConfig(extensionConfiguration),
|
|
20
|
-
};
|
|
8
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
21
9
|
};
|
|
@@ -206,6 +206,7 @@ declare const ApplyGuardrailCommand_base: {
|
|
|
206
206
|
* @throws {@link BedrockRuntimeServiceException}
|
|
207
207
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
208
208
|
*
|
|
209
|
+
*
|
|
209
210
|
* @public
|
|
210
211
|
*/
|
|
211
212
|
export declare class ApplyGuardrailCommand extends ApplyGuardrailCommand_base {
|
|
@@ -560,6 +560,7 @@ declare const ConverseCommand_base: {
|
|
|
560
560
|
* @throws {@link BedrockRuntimeServiceException}
|
|
561
561
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
562
562
|
*
|
|
563
|
+
*
|
|
563
564
|
* @public
|
|
564
565
|
*/
|
|
565
566
|
export declare class ConverseCommand extends ConverseCommand_base {
|
|
@@ -527,6 +527,7 @@ declare const ConverseStreamCommand_base: {
|
|
|
527
527
|
* @throws {@link BedrockRuntimeServiceException}
|
|
528
528
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
529
529
|
*
|
|
530
|
+
*
|
|
530
531
|
* @public
|
|
531
532
|
*/
|
|
532
533
|
export declare class ConverseStreamCommand extends ConverseStreamCommand_base {
|
|
@@ -84,6 +84,7 @@ declare const GetAsyncInvokeCommand_base: {
|
|
|
84
84
|
* @throws {@link BedrockRuntimeServiceException}
|
|
85
85
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
86
86
|
*
|
|
87
|
+
*
|
|
87
88
|
* @public
|
|
88
89
|
*/
|
|
89
90
|
export declare class GetAsyncInvokeCommand extends GetAsyncInvokeCommand_base {
|
|
@@ -128,6 +128,7 @@ declare const InvokeModelCommand_base: {
|
|
|
128
128
|
* @throws {@link BedrockRuntimeServiceException}
|
|
129
129
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
130
130
|
*
|
|
131
|
+
*
|
|
131
132
|
* @public
|
|
132
133
|
*/
|
|
133
134
|
export declare class InvokeModelCommand extends InvokeModelCommand_base {
|
|
@@ -153,6 +153,7 @@ declare const InvokeModelWithResponseStreamCommand_base: {
|
|
|
153
153
|
* @throws {@link BedrockRuntimeServiceException}
|
|
154
154
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
155
155
|
*
|
|
156
|
+
*
|
|
156
157
|
* @public
|
|
157
158
|
*/
|
|
158
159
|
export declare class InvokeModelWithResponseStreamCommand extends InvokeModelWithResponseStreamCommand_base {
|
|
@@ -95,6 +95,7 @@ declare const ListAsyncInvokesCommand_base: {
|
|
|
95
95
|
* @throws {@link BedrockRuntimeServiceException}
|
|
96
96
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
97
97
|
*
|
|
98
|
+
*
|
|
98
99
|
* @public
|
|
99
100
|
*/
|
|
100
101
|
export declare class ListAsyncInvokesCommand extends ListAsyncInvokesCommand_base {
|
|
@@ -107,6 +107,7 @@ declare const StartAsyncInvokeCommand_base: {
|
|
|
107
107
|
* @throws {@link BedrockRuntimeServiceException}
|
|
108
108
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
109
109
|
*
|
|
110
|
+
*
|
|
110
111
|
* @public
|
|
111
112
|
*/
|
|
112
113
|
export declare class StartAsyncInvokeCommand extends StartAsyncInvokeCommand_base {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.777.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -20,45 +20,45 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/core": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
26
|
-
"@aws-sdk/middleware-logger": "3.
|
|
27
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
28
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
29
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
30
|
-
"@aws-sdk/types": "3.
|
|
31
|
-
"@aws-sdk/util-endpoints": "3.
|
|
32
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
33
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
34
|
-
"@smithy/config-resolver": "^4.0
|
|
35
|
-
"@smithy/core": "^3.
|
|
36
|
-
"@smithy/eventstream-serde-browser": "^4.0.
|
|
37
|
-
"@smithy/eventstream-serde-config-resolver": "^4.0
|
|
38
|
-
"@smithy/eventstream-serde-node": "^4.0.
|
|
39
|
-
"@smithy/fetch-http-handler": "^5.0.
|
|
40
|
-
"@smithy/hash-node": "^4.0.
|
|
41
|
-
"@smithy/invalid-dependency": "^4.0.
|
|
42
|
-
"@smithy/middleware-content-length": "^4.0.
|
|
43
|
-
"@smithy/middleware-endpoint": "^4.0
|
|
44
|
-
"@smithy/middleware-retry": "^4.0
|
|
45
|
-
"@smithy/middleware-serde": "^4.0.
|
|
46
|
-
"@smithy/middleware-stack": "^4.0.
|
|
47
|
-
"@smithy/node-config-provider": "^4.0.
|
|
48
|
-
"@smithy/node-http-handler": "^4.0.
|
|
49
|
-
"@smithy/protocol-http": "^5.0
|
|
50
|
-
"@smithy/smithy-client": "^4.
|
|
51
|
-
"@smithy/types": "^4.
|
|
52
|
-
"@smithy/url-parser": "^4.0.
|
|
23
|
+
"@aws-sdk/core": "3.775.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.777.0",
|
|
25
|
+
"@aws-sdk/middleware-host-header": "3.775.0",
|
|
26
|
+
"@aws-sdk/middleware-logger": "3.775.0",
|
|
27
|
+
"@aws-sdk/middleware-recursion-detection": "3.775.0",
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.775.0",
|
|
29
|
+
"@aws-sdk/region-config-resolver": "3.775.0",
|
|
30
|
+
"@aws-sdk/types": "3.775.0",
|
|
31
|
+
"@aws-sdk/util-endpoints": "3.775.0",
|
|
32
|
+
"@aws-sdk/util-user-agent-browser": "3.775.0",
|
|
33
|
+
"@aws-sdk/util-user-agent-node": "3.775.0",
|
|
34
|
+
"@smithy/config-resolver": "^4.1.0",
|
|
35
|
+
"@smithy/core": "^3.2.0",
|
|
36
|
+
"@smithy/eventstream-serde-browser": "^4.0.2",
|
|
37
|
+
"@smithy/eventstream-serde-config-resolver": "^4.1.0",
|
|
38
|
+
"@smithy/eventstream-serde-node": "^4.0.2",
|
|
39
|
+
"@smithy/fetch-http-handler": "^5.0.2",
|
|
40
|
+
"@smithy/hash-node": "^4.0.2",
|
|
41
|
+
"@smithy/invalid-dependency": "^4.0.2",
|
|
42
|
+
"@smithy/middleware-content-length": "^4.0.2",
|
|
43
|
+
"@smithy/middleware-endpoint": "^4.1.0",
|
|
44
|
+
"@smithy/middleware-retry": "^4.1.0",
|
|
45
|
+
"@smithy/middleware-serde": "^4.0.3",
|
|
46
|
+
"@smithy/middleware-stack": "^4.0.2",
|
|
47
|
+
"@smithy/node-config-provider": "^4.0.2",
|
|
48
|
+
"@smithy/node-http-handler": "^4.0.4",
|
|
49
|
+
"@smithy/protocol-http": "^5.1.0",
|
|
50
|
+
"@smithy/smithy-client": "^4.2.0",
|
|
51
|
+
"@smithy/types": "^4.2.0",
|
|
52
|
+
"@smithy/url-parser": "^4.0.2",
|
|
53
53
|
"@smithy/util-base64": "^4.0.0",
|
|
54
54
|
"@smithy/util-body-length-browser": "^4.0.0",
|
|
55
55
|
"@smithy/util-body-length-node": "^4.0.0",
|
|
56
|
-
"@smithy/util-defaults-mode-browser": "^4.0.
|
|
57
|
-
"@smithy/util-defaults-mode-node": "^4.0.
|
|
58
|
-
"@smithy/util-endpoints": "^3.0.
|
|
59
|
-
"@smithy/util-middleware": "^4.0.
|
|
60
|
-
"@smithy/util-retry": "^4.0.
|
|
61
|
-
"@smithy/util-stream": "^4.
|
|
56
|
+
"@smithy/util-defaults-mode-browser": "^4.0.8",
|
|
57
|
+
"@smithy/util-defaults-mode-node": "^4.0.8",
|
|
58
|
+
"@smithy/util-endpoints": "^3.0.2",
|
|
59
|
+
"@smithy/util-middleware": "^4.0.2",
|
|
60
|
+
"@smithy/util-retry": "^4.0.2",
|
|
61
|
+
"@smithy/util-stream": "^4.2.0",
|
|
62
62
|
"@smithy/util-utf8": "^4.0.0",
|
|
63
63
|
"@types/uuid": "^9.0.1",
|
|
64
64
|
"tslib": "^2.6.2",
|