@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.
- package/LICENSE +201 -0
- package/README.md +229 -0
- package/dist-cjs/BedrockAgentRuntime.js +17 -0
- package/dist-cjs/BedrockAgentRuntimeClient.js +45 -0
- package/dist-cjs/commands/InvokeAgentCommand.js +52 -0
- package/dist-cjs/commands/RetrieveAndGenerateCommand.js +52 -0
- package/dist-cjs/commands/RetrieveCommand.js +52 -0
- package/dist-cjs/commands/index.js +6 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +12 -0
- package/dist-cjs/models/BedrockAgentRuntimeServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +439 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/RetrievePaginator.js +28 -0
- package/dist-cjs/pagination/index.js +5 -0
- package/dist-cjs/protocols/Aws_restJson1.js +689 -0
- package/dist-cjs/runtimeConfig.browser.js +41 -0
- package/dist-cjs/runtimeConfig.js +52 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +24 -0
- package/dist-cjs/runtimeExtensions.js +22 -0
- package/dist-es/BedrockAgentRuntime.js +13 -0
- package/dist-es/BedrockAgentRuntimeClient.js +41 -0
- package/dist-es/commands/InvokeAgentCommand.js +48 -0
- package/dist-es/commands/RetrieveAndGenerateCommand.js +48 -0
- package/dist-es/commands/RetrieveCommand.js +48 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +7 -0
- package/dist-es/models/BedrockAgentRuntimeServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +396 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/RetrievePaginator.js +24 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +680 -0
- package/dist-es/runtimeConfig.browser.js +36 -0
- package/dist-es/runtimeConfig.js +47 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +20 -0
- package/dist-es/runtimeExtensions.js +18 -0
- package/dist-types/BedrockAgentRuntime.d.ts +31 -0
- package/dist-types/BedrockAgentRuntimeClient.d.ts +177 -0
- package/dist-types/commands/InvokeAgentCommand.d.ts +321 -0
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +142 -0
- package/dist-types/commands/RetrieveCommand.d.ts +123 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +22 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist-types/index.d.ts +15 -0
- package/dist-types/models/BedrockAgentRuntimeServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1598 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/RetrievePaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +29 -0
- package/dist-types/runtimeConfig.browser.d.ts +47 -0
- package/dist-types/runtimeConfig.d.ts +47 -0
- package/dist-types/runtimeConfig.native.d.ts +46 -0
- package/dist-types/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +58 -0
- package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +147 -0
- package/dist-types/ts3.4/commands/InvokeAgentCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/RetrieveAndGenerateCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/RetrieveCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
- package/dist-types/ts3.4/index.d.ts +10 -0
- package/dist-types/ts3.4/models/BedrockAgentRuntimeServiceException.d.ts +8 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +737 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/RetrievePaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +44 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +100 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +91 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
- package/package.json +105 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
|
|
5
|
+
import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-browser";
|
|
6
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
7
|
+
import { invalidProvider } from "@smithy/invalid-dependency";
|
|
8
|
+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
9
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
10
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
11
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
12
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
13
|
+
export const getRuntimeConfig = (config) => {
|
|
14
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
15
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
16
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
17
|
+
return {
|
|
18
|
+
...clientSharedValues,
|
|
19
|
+
...config,
|
|
20
|
+
runtime: "browser",
|
|
21
|
+
defaultsMode,
|
|
22
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
23
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
25
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
26
|
+
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
27
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
28
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
29
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
30
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
31
|
+
sha256: config?.sha256 ?? Sha256,
|
|
32
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
33
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
34
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
3
|
+
import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
|
4
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
5
|
+
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
6
|
+
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
|
|
7
|
+
import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-node";
|
|
8
|
+
import { Hash } from "@smithy/hash-node";
|
|
9
|
+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
|
|
10
|
+
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
11
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
12
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
13
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
14
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
15
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
16
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
17
|
+
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
|
|
18
|
+
export const getRuntimeConfig = (config) => {
|
|
19
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
20
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
21
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
22
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
23
|
+
awsCheckVersion(process.version);
|
|
24
|
+
return {
|
|
25
|
+
...clientSharedValues,
|
|
26
|
+
...config,
|
|
27
|
+
runtime: "node",
|
|
28
|
+
defaultsMode,
|
|
29
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
30
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
|
|
31
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
32
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
33
|
+
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
34
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
35
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
36
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
37
|
+
retryMode: config?.retryMode ??
|
|
38
|
+
loadNodeConfig({
|
|
39
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
40
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
41
|
+
}),
|
|
42
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
43
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
44
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
45
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
2
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
3
|
+
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
4
|
+
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
5
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
6
|
+
export const getRuntimeConfig = (config) => {
|
|
7
|
+
return {
|
|
8
|
+
apiVersion: "2023-07-26",
|
|
9
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
10
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
11
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
12
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
13
|
+
extensions: config?.extensions ?? [],
|
|
14
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
15
|
+
serviceId: config?.serviceId ?? "Bedrock Agent Runtime",
|
|
16
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
17
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
18
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
|
2
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
3
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
4
|
+
const asPartial = (t) => t;
|
|
5
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
|
+
const extensionConfiguration = {
|
|
7
|
+
...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
|
|
8
|
+
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
|
9
|
+
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
|
10
|
+
};
|
|
11
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
12
|
+
return {
|
|
13
|
+
...runtimeConfig,
|
|
14
|
+
...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
|
|
15
|
+
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
|
16
|
+
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { BedrockAgentRuntimeClient } from "./BedrockAgentRuntimeClient";
|
|
3
|
+
import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
|
|
4
|
+
import { RetrieveAndGenerateCommandInput, RetrieveAndGenerateCommandOutput } from "./commands/RetrieveAndGenerateCommand";
|
|
5
|
+
import { RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";
|
|
6
|
+
export interface BedrockAgentRuntime {
|
|
7
|
+
/**
|
|
8
|
+
* @see {@link InvokeAgentCommand}
|
|
9
|
+
*/
|
|
10
|
+
invokeAgent(args: InvokeAgentCommandInput, options?: __HttpHandlerOptions): Promise<InvokeAgentCommandOutput>;
|
|
11
|
+
invokeAgent(args: InvokeAgentCommandInput, cb: (err: any, data?: InvokeAgentCommandOutput) => void): void;
|
|
12
|
+
invokeAgent(args: InvokeAgentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeAgentCommandOutput) => void): void;
|
|
13
|
+
/**
|
|
14
|
+
* @see {@link RetrieveCommand}
|
|
15
|
+
*/
|
|
16
|
+
retrieve(args: RetrieveCommandInput, options?: __HttpHandlerOptions): Promise<RetrieveCommandOutput>;
|
|
17
|
+
retrieve(args: RetrieveCommandInput, cb: (err: any, data?: RetrieveCommandOutput) => void): void;
|
|
18
|
+
retrieve(args: RetrieveCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RetrieveCommandOutput) => void): void;
|
|
19
|
+
/**
|
|
20
|
+
* @see {@link RetrieveAndGenerateCommand}
|
|
21
|
+
*/
|
|
22
|
+
retrieveAndGenerate(args: RetrieveAndGenerateCommandInput, options?: __HttpHandlerOptions): Promise<RetrieveAndGenerateCommandOutput>;
|
|
23
|
+
retrieveAndGenerate(args: RetrieveAndGenerateCommandInput, cb: (err: any, data?: RetrieveAndGenerateCommandOutput) => void): void;
|
|
24
|
+
retrieveAndGenerate(args: RetrieveAndGenerateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RetrieveAndGenerateCommandOutput) => void): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @public
|
|
28
|
+
* Amazon Bedrock Agent
|
|
29
|
+
*/
|
|
30
|
+
export declare class BedrockAgentRuntime extends BedrockAgentRuntimeClient implements BedrockAgentRuntime {
|
|
31
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
2
|
+
import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
|
|
3
|
+
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
4
|
+
import { Credentials as __Credentials } from "@aws-sdk/types";
|
|
5
|
+
import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
|
|
6
|
+
import { EventStreamSerdeInputConfig, EventStreamSerdeResolvedConfig } from "@smithy/eventstream-serde-config-resolver";
|
|
7
|
+
import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
|
|
8
|
+
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
9
|
+
import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
|
|
10
|
+
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
11
|
+
import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, EventStreamSerdeProvider as __EventStreamSerdeProvider, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
12
|
+
import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
|
|
13
|
+
import { RetrieveAndGenerateCommandInput, RetrieveAndGenerateCommandOutput } from "./commands/RetrieveAndGenerateCommand";
|
|
14
|
+
import { RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";
|
|
15
|
+
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
16
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
17
|
+
export { __Client };
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export type ServiceInputTypes = InvokeAgentCommandInput | RetrieveAndGenerateCommandInput | RetrieveCommandInput;
|
|
22
|
+
/**
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export type ServiceOutputTypes = InvokeAgentCommandOutput | RetrieveAndGenerateCommandOutput | RetrieveCommandOutput;
|
|
26
|
+
/**
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
30
|
+
/**
|
|
31
|
+
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
32
|
+
*/
|
|
33
|
+
requestHandler?: __HttpHandler;
|
|
34
|
+
/**
|
|
35
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
36
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
40
|
+
/**
|
|
41
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
urlParser?: __UrlParser;
|
|
45
|
+
/**
|
|
46
|
+
* A function that can calculate the length of a request body.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
50
|
+
/**
|
|
51
|
+
* A function that converts a stream into an array of bytes.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
streamCollector?: __StreamCollector;
|
|
55
|
+
/**
|
|
56
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
base64Decoder?: __Decoder;
|
|
60
|
+
/**
|
|
61
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
base64Encoder?: __Encoder;
|
|
65
|
+
/**
|
|
66
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
utf8Decoder?: __Decoder;
|
|
70
|
+
/**
|
|
71
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
utf8Encoder?: __Encoder;
|
|
75
|
+
/**
|
|
76
|
+
* The runtime environment.
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
runtime?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
82
|
+
* trait of an operation.
|
|
83
|
+
*/
|
|
84
|
+
disableHostPrefix?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Unique service identifier.
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
serviceId?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
92
|
+
*/
|
|
93
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
94
|
+
/**
|
|
95
|
+
* Enables FIPS compatible endpoints.
|
|
96
|
+
*/
|
|
97
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
98
|
+
/**
|
|
99
|
+
* The AWS region to which this client will send requests
|
|
100
|
+
*/
|
|
101
|
+
region?: string | __Provider<string>;
|
|
102
|
+
/**
|
|
103
|
+
* Default credentials provider; Not available in browser runtime.
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
|
|
107
|
+
/**
|
|
108
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
112
|
+
/**
|
|
113
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
114
|
+
*/
|
|
115
|
+
maxAttempts?: number | __Provider<number>;
|
|
116
|
+
/**
|
|
117
|
+
* Specifies which retry algorithm to use.
|
|
118
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
119
|
+
*
|
|
120
|
+
*/
|
|
121
|
+
retryMode?: string | __Provider<string>;
|
|
122
|
+
/**
|
|
123
|
+
* Optional logger for logging debug/info/warn/error.
|
|
124
|
+
*/
|
|
125
|
+
logger?: __Logger;
|
|
126
|
+
/**
|
|
127
|
+
* Optional extensions
|
|
128
|
+
*/
|
|
129
|
+
extensions?: RuntimeExtension[];
|
|
130
|
+
/**
|
|
131
|
+
* The function that provides necessary utilities for generating and parsing event stream
|
|
132
|
+
*/
|
|
133
|
+
eventStreamSerdeProvider?: __EventStreamSerdeProvider;
|
|
134
|
+
/**
|
|
135
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
136
|
+
*/
|
|
137
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* @public
|
|
141
|
+
*/
|
|
142
|
+
export type BedrockAgentRuntimeClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & EventStreamSerdeInputConfig & ClientInputEndpointParameters;
|
|
143
|
+
/**
|
|
144
|
+
* @public
|
|
145
|
+
*
|
|
146
|
+
* The configuration interface of BedrockAgentRuntimeClient class constructor that set the region, credentials and other options.
|
|
147
|
+
*/
|
|
148
|
+
export interface BedrockAgentRuntimeClientConfig extends BedrockAgentRuntimeClientConfigType {
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @public
|
|
152
|
+
*/
|
|
153
|
+
export type BedrockAgentRuntimeClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & EventStreamSerdeResolvedConfig & ClientResolvedEndpointParameters;
|
|
154
|
+
/**
|
|
155
|
+
* @public
|
|
156
|
+
*
|
|
157
|
+
* The resolved configuration interface of BedrockAgentRuntimeClient class. This is resolved and normalized from the {@link BedrockAgentRuntimeClientConfig | constructor configuration interface}.
|
|
158
|
+
*/
|
|
159
|
+
export interface BedrockAgentRuntimeClientResolvedConfig extends BedrockAgentRuntimeClientResolvedConfigType {
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* @public
|
|
163
|
+
* Amazon Bedrock Agent
|
|
164
|
+
*/
|
|
165
|
+
export declare class BedrockAgentRuntimeClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, BedrockAgentRuntimeClientResolvedConfig> {
|
|
166
|
+
/**
|
|
167
|
+
* The resolved configuration of BedrockAgentRuntimeClient class. This is resolved and normalized from the {@link BedrockAgentRuntimeClientConfig | constructor configuration interface}.
|
|
168
|
+
*/
|
|
169
|
+
readonly config: BedrockAgentRuntimeClientResolvedConfig;
|
|
170
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<BedrockAgentRuntimeClientConfig>);
|
|
171
|
+
/**
|
|
172
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
173
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
174
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
175
|
+
*/
|
|
176
|
+
destroy(): void;
|
|
177
|
+
}
|