@aws/lsp-codewhisperer 0.0.4 → 0.0.5
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/CHANGELOG.md +7 -0
- package/out/client/sigv4/service.json +1 -1
- package/out/client/token/bearer-token-service.json +1 -1
- package/out/index.d.ts +1 -0
- package/out/index.js +1 -0
- package/out/index.js.map +1 -1
- package/out/language-server/chat/chatController.d.ts +25 -0
- package/out/language-server/chat/chatController.js +117 -0
- package/out/language-server/chat/chatController.js.map +1 -0
- package/out/language-server/chat/chatController.test.d.ts +1 -0
- package/out/language-server/chat/chatController.test.js +240 -0
- package/out/language-server/chat/chatController.test.js.map +1 -0
- package/out/language-server/chat/chatEventParser.d.ts +24 -0
- package/out/language-server/chat/chatEventParser.js +84 -0
- package/out/language-server/chat/chatEventParser.js.map +1 -0
- package/out/language-server/chat/chatEventParser.test.d.ts +1 -0
- package/out/language-server/chat/chatEventParser.test.js +189 -0
- package/out/language-server/chat/chatEventParser.test.js.map +1 -0
- package/out/language-server/chat/chatSessionManagementService.d.ts +16 -0
- package/out/language-server/chat/chatSessionManagementService.js +92 -0
- package/out/language-server/chat/chatSessionManagementService.js.map +1 -0
- package/out/language-server/chat/chatSessionManagementService.test.d.ts +1 -0
- package/out/language-server/chat/chatSessionManagementService.test.js +73 -0
- package/out/language-server/chat/chatSessionManagementService.test.js.map +1 -0
- package/out/language-server/chat/chatSessionService.d.ts +13 -0
- package/out/language-server/chat/chatSessionService.js +63 -0
- package/out/language-server/chat/chatSessionService.js.map +1 -0
- package/out/language-server/chat/chatSessionService.test.d.ts +1 -0
- package/out/language-server/chat/chatSessionService.test.js +80 -0
- package/out/language-server/chat/chatSessionService.test.js.map +1 -0
- package/out/language-server/chat/contexts/documentContext.d.ts +17 -0
- package/out/language-server/chat/contexts/documentContext.js +59 -0
- package/out/language-server/chat/contexts/documentContext.js.map +1 -0
- package/out/language-server/chat/contexts/documentContext.test.d.ts +1 -0
- package/out/language-server/chat/contexts/documentContext.test.js +147 -0
- package/out/language-server/chat/contexts/documentContext.test.js.map +1 -0
- package/out/language-server/chat/contexts/utils.d.ts +10 -0
- package/out/language-server/chat/contexts/utils.js +71 -0
- package/out/language-server/chat/contexts/utils.js.map +1 -0
- package/out/language-server/chat/contexts/utils.test.d.ts +1 -0
- package/out/language-server/chat/contexts/utils.test.js +72 -0
- package/out/language-server/chat/contexts/utils.test.js.map +1 -0
- package/out/language-server/chat/utils.d.ts +4 -0
- package/out/language-server/chat/utils.js +34 -0
- package/out/language-server/chat/utils.js.map +1 -0
- package/out/language-server/codeWhispererSecurityScanServer.d.ts +1 -1
- package/out/language-server/codeWhispererSecurityScanServer.js +41 -26
- package/out/language-server/codeWhispererSecurityScanServer.js.map +1 -1
- package/out/language-server/codeWhispererServer.js +1 -1
- package/out/language-server/codeWhispererServer.js.map +1 -1
- package/out/language-server/languageDetection.d.ts +9 -2
- package/out/language-server/languageDetection.js +84 -20
- package/out/language-server/languageDetection.js.map +1 -1
- package/out/language-server/languageDetection.test.d.ts +1 -0
- package/out/language-server/languageDetection.test.js +31 -0
- package/out/language-server/languageDetection.test.js.map +1 -0
- package/out/language-server/proxy-server.d.ts +1 -0
- package/out/language-server/proxy-server.js +35 -1
- package/out/language-server/proxy-server.js.map +1 -1
- package/out/language-server/qChatServer.d.ts +3 -0
- package/out/language-server/qChatServer.js +31 -0
- package/out/language-server/qChatServer.js.map +1 -0
- package/out/language-server/qChatServer.test.d.ts +1 -0
- package/out/language-server/qChatServer.test.js +51 -0
- package/out/language-server/qChatServer.test.js.map +1 -0
- package/out/language-server/securityScan/securityScanDiagnosticsProvider.d.ts +2 -3
- package/out/language-server/securityScan/securityScanDiagnosticsProvider.js +5 -23
- package/out/language-server/securityScan/securityScanDiagnosticsProvider.js.map +1 -1
- package/out/language-server/securityScan/types.d.ts +8 -6
- package/out/language-server/testUtils.d.ts +1 -0
- package/out/language-server/testUtils.js +17 -1
- package/out/language-server/testUtils.js.map +1 -1
- package/out/language-server/types.d.ts +13 -0
- package/out/language-server/types.js +3 -0
- package/out/language-server/types.js.map +1 -0
- package/out/language-server/utils.d.ts +3 -0
- package/out/language-server/utils.js +19 -1
- package/out/language-server/utils.js.map +1 -1
- package/out/language-server/utils.test.d.ts +1 -0
- package/out/language-server/utils.test.js +33 -0
- package/out/language-server/utils.test.js.map +1 -0
- package/package.json +13 -4
- package/src.gen/@amzn/codewhisperer-streaming/LICENSE +201 -0
- package/src.gen/@amzn/codewhisperer-streaming/README.md +464 -0
- package/src.gen/@amzn/codewhisperer-streaming/api-extractor.json +4 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/CodeWhispererStreaming.js +17 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/CodeWhispererStreamingClient.js +42 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/commands/ExportResultArchiveCommand.js +42 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/commands/GenerateAssistantResponseCommand.js +42 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/commands/GenerateTaskAssistPlanCommand.js +42 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/commands/index.js +6 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/endpoints.js +165 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/extensionConfiguration.js +2 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/index.js +10 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/models/CodeWhispererStreamingServiceException.js +12 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/models/index.js +4 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/models/models_0.js +361 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/protocols/Aws_restJson1.js +458 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/runtimeConfig.browser.js +38 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/runtimeConfig.js +46 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/runtimeConfig.native.js +15 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/runtimeConfig.shared.js +22 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-cjs/runtimeExtensions.js +22 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/CodeWhispererStreaming.js +13 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/CodeWhispererStreamingClient.js +38 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/commands/ExportResultArchiveCommand.js +38 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/commands/GenerateAssistantResponseCommand.js +38 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/commands/GenerateTaskAssistPlanCommand.js +38 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/commands/index.js +3 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/endpoints.js +161 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/extensionConfiguration.js +1 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/index.js +5 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/models/CodeWhispererStreamingServiceException.js +8 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/models/index.js +1 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/models/models_0.js +328 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/protocols/Aws_restJson1.js +449 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/runtimeConfig.browser.js +33 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/runtimeConfig.js +41 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/runtimeConfig.native.js +11 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/runtimeConfig.shared.js +18 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-es/runtimeExtensions.js +18 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/CodeWhispererStreaming.d.ts +30 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/CodeWhispererStreamingClient.d.ts +169 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/commands/ExportResultArchiveCommand.d.ts +103 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/commands/GenerateAssistantResponseCommand.d.ts +294 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/commands/GenerateTaskAssistPlanCommand.d.ts +304 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/commands/index.d.ts +3 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/endpoints.d.ts +2 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/extensionConfiguration.d.ts +8 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/index.d.ts +5 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/models/CodeWhispererStreamingServiceException.d.ts +13 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/models/index.d.ts +1 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/models/models_0.d.ts +1173 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/protocols/Aws_restJson1.d.ts +29 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/runtimeConfig.browser.d.ts +39 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/runtimeConfig.d.ts +39 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/runtimeConfig.native.d.ts +38 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/runtimeConfig.shared.d.ts +17 -0
- package/src.gen/@amzn/codewhisperer-streaming/dist-types/runtimeExtensions.d.ts +17 -0
- package/src.gen/@amzn/codewhisperer-streaming/package.json +87 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/CodeWhispererStreaming.ts +84 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/CodeWhispererStreamingClient.ts +304 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/commands/ExportResultArchiveCommand.ts +177 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/commands/GenerateAssistantResponseCommand.ts +369 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/commands/GenerateTaskAssistPlanCommand.ts +379 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/commands/index.ts +4 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/endpoints.ts +170 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/extensionConfiguration.ts +12 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/index.ts +8 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/models/CodeWhispererStreamingServiceException.ts +22 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/models/index.ts +2 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/models/models_0.ts +1518 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/protocols/Aws_restJson1.ts +740 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.browser.ts +42 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.native.ts +17 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.shared.ts +24 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.ts +55 -0
- package/src.gen/@amzn/codewhisperer-streaming/src/runtimeExtensions.ts +44 -0
- package/src.gen/@amzn/codewhisperer-streaming/typedoc.json +5 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ExportResultArchiveCommandInput, ExportResultArchiveCommandOutput } from '../commands/ExportResultArchiveCommand';
|
|
2
|
+
import { GenerateAssistantResponseCommandInput, GenerateAssistantResponseCommandOutput } from '../commands/GenerateAssistantResponseCommand';
|
|
3
|
+
import { GenerateTaskAssistPlanCommandInput, GenerateTaskAssistPlanCommandOutput } from '../commands/GenerateTaskAssistPlanCommand';
|
|
4
|
+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from '@smithy/protocol-http';
|
|
5
|
+
import { EventStreamSerdeContext as __EventStreamSerdeContext, SerdeContext as __SerdeContext } from '@smithy/types';
|
|
6
|
+
/**
|
|
7
|
+
* serializeAws_restJson1ExportResultArchiveCommand
|
|
8
|
+
*/
|
|
9
|
+
export declare const se_ExportResultArchiveCommand: (input: ExportResultArchiveCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
10
|
+
/**
|
|
11
|
+
* serializeAws_restJson1GenerateAssistantResponseCommand
|
|
12
|
+
*/
|
|
13
|
+
export declare const se_GenerateAssistantResponseCommand: (input: GenerateAssistantResponseCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
14
|
+
/**
|
|
15
|
+
* serializeAws_restJson1GenerateTaskAssistPlanCommand
|
|
16
|
+
*/
|
|
17
|
+
export declare const se_GenerateTaskAssistPlanCommand: (input: GenerateTaskAssistPlanCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
18
|
+
/**
|
|
19
|
+
* deserializeAws_restJson1ExportResultArchiveCommand
|
|
20
|
+
*/
|
|
21
|
+
export declare const de_ExportResultArchiveCommand: (output: __HttpResponse, context: __SerdeContext & __EventStreamSerdeContext) => Promise<ExportResultArchiveCommandOutput>;
|
|
22
|
+
/**
|
|
23
|
+
* deserializeAws_restJson1GenerateAssistantResponseCommand
|
|
24
|
+
*/
|
|
25
|
+
export declare const de_GenerateAssistantResponseCommand: (output: __HttpResponse, context: __SerdeContext & __EventStreamSerdeContext) => Promise<GenerateAssistantResponseCommandOutput>;
|
|
26
|
+
/**
|
|
27
|
+
* deserializeAws_restJson1GenerateTaskAssistPlanCommand
|
|
28
|
+
*/
|
|
29
|
+
export declare const de_GenerateTaskAssistPlanCommand: (output: __HttpResponse, context: __SerdeContext & __EventStreamSerdeContext) => Promise<GenerateTaskAssistPlanCommandOutput>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FetchHttpHandler as RequestHandler } from '@smithy/fetch-http-handler';
|
|
2
|
+
import { CodeWhispererStreamingClientConfig } from './CodeWhispererStreamingClient';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const getRuntimeConfig: (config: CodeWhispererStreamingClientConfig) => {
|
|
7
|
+
runtime: string;
|
|
8
|
+
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
|
|
9
|
+
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
10
|
+
defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
|
|
11
|
+
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|
|
12
|
+
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
13
|
+
requestHandler: ((import("@smithy/types").RequestHandler<any, any, import("@smithy/types").HttpHandlerOptions> | Record<string, unknown> | import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/fetch-http-handler").FetchHttpHandlerOptions) & import("@smithy/types").RequestHandler<import("@smithy/protocol-http").HttpRequest, import("@smithy/protocol-http").HttpResponse, import("@smithy/types").HttpHandlerOptions> & {
|
|
14
|
+
updateHttpClientConfig(key: never, value: never): void;
|
|
15
|
+
httpHandlerConfigs(): {};
|
|
16
|
+
}) | RequestHandler;
|
|
17
|
+
retryMode: string | import("@smithy/types").Provider<string>;
|
|
18
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
19
|
+
streamCollector: import("@smithy/types").StreamCollector;
|
|
20
|
+
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
21
|
+
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
22
|
+
apiVersion: string;
|
|
23
|
+
urlParser: import("@smithy/types").UrlParser;
|
|
24
|
+
base64Decoder: import("@smithy/types").Decoder;
|
|
25
|
+
base64Encoder: (_input: string | Uint8Array) => string;
|
|
26
|
+
utf8Decoder: import("@smithy/types").Decoder;
|
|
27
|
+
utf8Encoder: (input: string | Uint8Array) => string;
|
|
28
|
+
disableHostPrefix: boolean;
|
|
29
|
+
serviceId: string;
|
|
30
|
+
regionInfoProvider: import("@smithy/types").RegionInfoProvider;
|
|
31
|
+
logger: import("@smithy/types").Logger;
|
|
32
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
33
|
+
region?: string | import("@smithy/types").Provider<string> | undefined;
|
|
34
|
+
endpoint?: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | undefined;
|
|
35
|
+
tls?: boolean | undefined;
|
|
36
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
37
|
+
token?: import("@aws-sdk/types").TokenIdentity | import("@aws-sdk/types").TokenIdentityProvider | undefined;
|
|
38
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { NodeHttpHandler as RequestHandler } from '@smithy/node-http-handler';
|
|
2
|
+
import { CodeWhispererStreamingClientConfig } from './CodeWhispererStreamingClient';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const getRuntimeConfig: (config: CodeWhispererStreamingClientConfig) => {
|
|
7
|
+
runtime: string;
|
|
8
|
+
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
|
|
9
|
+
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
10
|
+
defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
|
|
11
|
+
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|
|
12
|
+
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
13
|
+
requestHandler: ((import("@smithy/types").RequestHandler<any, any, import("@smithy/types").HttpHandlerOptions> | Record<string, unknown> | import("@smithy/node-http-handler").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions) & import("@smithy/types").RequestHandler<import("@smithy/protocol-http").HttpRequest, import("@smithy/protocol-http").HttpResponse, import("@smithy/types").HttpHandlerOptions> & {
|
|
14
|
+
updateHttpClientConfig(key: never, value: never): void;
|
|
15
|
+
httpHandlerConfigs(): {};
|
|
16
|
+
}) | RequestHandler;
|
|
17
|
+
retryMode: string | import("@smithy/types").Provider<string>;
|
|
18
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
19
|
+
streamCollector: import("@smithy/types").StreamCollector;
|
|
20
|
+
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
21
|
+
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
22
|
+
apiVersion: string;
|
|
23
|
+
urlParser: import("@smithy/types").UrlParser;
|
|
24
|
+
base64Decoder: import("@smithy/types").Decoder;
|
|
25
|
+
base64Encoder: (_input: string | Uint8Array) => string;
|
|
26
|
+
utf8Decoder: import("@smithy/types").Decoder;
|
|
27
|
+
utf8Encoder: (input: string | Uint8Array) => string;
|
|
28
|
+
disableHostPrefix: boolean;
|
|
29
|
+
serviceId: string;
|
|
30
|
+
regionInfoProvider: import("@smithy/types").RegionInfoProvider;
|
|
31
|
+
logger: import("@smithy/types").Logger;
|
|
32
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
33
|
+
region?: string | import("@smithy/types").Provider<string> | undefined;
|
|
34
|
+
endpoint?: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | undefined;
|
|
35
|
+
tls?: boolean | undefined;
|
|
36
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
37
|
+
token?: import("@aws-sdk/types").TokenIdentity | import("@aws-sdk/types").TokenIdentityProvider | undefined;
|
|
38
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
39
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CodeWhispererStreamingClientConfig } from './CodeWhispererStreamingClient';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const getRuntimeConfig: (config: CodeWhispererStreamingClientConfig) => {
|
|
6
|
+
runtime: string;
|
|
7
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
8
|
+
requestHandler: ((import("@smithy/types").RequestHandler<any, any, import("@smithy/types").HttpHandlerOptions> | Record<string, unknown> | import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions) & import("@smithy/types").RequestHandler<import("@smithy/protocol-http").HttpRequest, import("@smithy/protocol-http").HttpResponse, import("@smithy/types").HttpHandlerOptions> & {
|
|
9
|
+
updateHttpClientConfig(key: never, value: never): void;
|
|
10
|
+
httpHandlerConfigs(): {};
|
|
11
|
+
}) | import("@smithy/fetch-http-handler").FetchHttpHandler;
|
|
12
|
+
apiVersion: string;
|
|
13
|
+
urlParser: import("@smithy/types").UrlParser;
|
|
14
|
+
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
15
|
+
streamCollector: import("@smithy/types").StreamCollector;
|
|
16
|
+
base64Decoder: import("@smithy/types").Decoder;
|
|
17
|
+
base64Encoder: (_input: string | Uint8Array) => string;
|
|
18
|
+
utf8Decoder: import("@smithy/types").Decoder;
|
|
19
|
+
utf8Encoder: (input: string | Uint8Array) => string;
|
|
20
|
+
disableHostPrefix: boolean;
|
|
21
|
+
serviceId: string;
|
|
22
|
+
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
23
|
+
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
24
|
+
regionInfoProvider: import("@smithy/types").RegionInfoProvider;
|
|
25
|
+
defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
|
|
26
|
+
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
27
|
+
retryMode: string | import("@smithy/types").Provider<string>;
|
|
28
|
+
logger: import("@smithy/types").Logger;
|
|
29
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
30
|
+
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|
|
31
|
+
defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
|
|
32
|
+
region?: string | import("@smithy/types").Provider<string> | undefined;
|
|
33
|
+
endpoint?: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | undefined;
|
|
34
|
+
tls?: boolean | undefined;
|
|
35
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
36
|
+
token?: import("@aws-sdk/types").TokenIdentity | import("@aws-sdk/types").TokenIdentityProvider | undefined;
|
|
37
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
38
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CodeWhispererStreamingClientConfig } from './CodeWhispererStreamingClient';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const getRuntimeConfig: (config: CodeWhispererStreamingClientConfig) => {
|
|
6
|
+
apiVersion: string;
|
|
7
|
+
base64Decoder: import("@smithy/types").Decoder;
|
|
8
|
+
base64Encoder: (_input: string | Uint8Array) => string;
|
|
9
|
+
disableHostPrefix: boolean;
|
|
10
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
11
|
+
logger: import("@smithy/types").Logger;
|
|
12
|
+
regionInfoProvider: import("@smithy/types").RegionInfoProvider;
|
|
13
|
+
serviceId: string;
|
|
14
|
+
urlParser: import("@smithy/types").UrlParser;
|
|
15
|
+
utf8Decoder: import("@smithy/types").Decoder;
|
|
16
|
+
utf8Encoder: (input: string | Uint8Array) => string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CodeWhispererStreamingExtensionConfiguration } from './extensionConfiguration';
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface RuntimeExtension {
|
|
6
|
+
configure(extensionConfiguration: CodeWhispererStreamingExtensionConfiguration): void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export interface RuntimeExtensionsConfig {
|
|
12
|
+
extensions: RuntimeExtension[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const resolveRuntimeExtensions: (runtimeConfig: any, extensions: RuntimeExtension[]) => any;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@amzn/codewhisperer-streaming",
|
|
3
|
+
"description": "@amzn/codewhisperer-streaming client",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "concurrently 'npm:build:cjs' 'npm:build:es' 'npm:build:types'",
|
|
7
|
+
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
8
|
+
"build:docs": "typedoc",
|
|
9
|
+
"build:es": "tsc -p tsconfig.es.json",
|
|
10
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
11
|
+
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
|
|
12
|
+
"prepack": "npm run clean && npm run build"
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist-cjs/index.js",
|
|
15
|
+
"types": "./dist-types/index.d.ts",
|
|
16
|
+
"module": "./dist-es/index.js",
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@aws-crypto/sha256-browser": "3.0.0",
|
|
20
|
+
"@aws-crypto/sha256-js": "3.0.0",
|
|
21
|
+
"@aws-sdk/middleware-host-header": "3.425.0",
|
|
22
|
+
"@aws-sdk/middleware-logger": "3.425.0",
|
|
23
|
+
"@aws-sdk/middleware-recursion-detection": "3.425.0",
|
|
24
|
+
"@aws-sdk/middleware-token": "3.425.0",
|
|
25
|
+
"@aws-sdk/middleware-user-agent": "3.425.0",
|
|
26
|
+
"@aws-sdk/region-config-resolver": "3.425.0",
|
|
27
|
+
"@aws-sdk/types": "3.425.0",
|
|
28
|
+
"@aws-sdk/util-retry": "^3.374.0",
|
|
29
|
+
"@aws-sdk/util-user-agent-browser": "3.425.0",
|
|
30
|
+
"@aws-sdk/util-user-agent-node": "3.425.0",
|
|
31
|
+
"@smithy/config-resolver": "^2.0.11",
|
|
32
|
+
"@smithy/eventstream-serde-browser": "^2.0.10",
|
|
33
|
+
"@smithy/eventstream-serde-config-resolver": "^2.0.10",
|
|
34
|
+
"@smithy/eventstream-serde-node": "^2.0.10",
|
|
35
|
+
"@smithy/fetch-http-handler": "^2.2.1",
|
|
36
|
+
"@smithy/hash-node": "^2.0.10",
|
|
37
|
+
"@smithy/invalid-dependency": "^2.0.10",
|
|
38
|
+
"@smithy/middleware-content-length": "^2.0.12",
|
|
39
|
+
"@smithy/middleware-retry": "^2.0.13",
|
|
40
|
+
"@smithy/middleware-serde": "^2.0.10",
|
|
41
|
+
"@smithy/middleware-stack": "^2.0.4",
|
|
42
|
+
"@smithy/node-config-provider": "^2.0.13",
|
|
43
|
+
"@smithy/node-http-handler": "^2.1.6",
|
|
44
|
+
"@smithy/protocol-http": "^3.0.6",
|
|
45
|
+
"@smithy/smithy-client": "^2.1.9",
|
|
46
|
+
"@smithy/types": "^2.3.4",
|
|
47
|
+
"@smithy/url-parser": "^2.0.10",
|
|
48
|
+
"@smithy/util-base64": "^2.0.0",
|
|
49
|
+
"@smithy/util-body-length-browser": "^2.0.0",
|
|
50
|
+
"@smithy/util-body-length-node": "^2.1.0",
|
|
51
|
+
"@smithy/util-defaults-mode-browser": "^2.0.13",
|
|
52
|
+
"@smithy/util-defaults-mode-node": "^2.0.15",
|
|
53
|
+
"@smithy/util-retry": "^2.0.3",
|
|
54
|
+
"@smithy/util-utf8": "^2.0.0",
|
|
55
|
+
"tslib": "^2.5.0",
|
|
56
|
+
"uuid": "^9.0.1"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@smithy/service-client-documentation-generator": "^2.0.0",
|
|
60
|
+
"@tsconfig/node14": "1.0.3",
|
|
61
|
+
"@types/node": "^14.14.31",
|
|
62
|
+
"@types/uuid": "^9.0.8",
|
|
63
|
+
"concurrently": "7.0.0",
|
|
64
|
+
"rimraf": "^3.0.0",
|
|
65
|
+
"typedoc": "0.25.13",
|
|
66
|
+
"typescript": "~5.4.5"
|
|
67
|
+
},
|
|
68
|
+
"engines": {
|
|
69
|
+
"node": ">=14.0.0"
|
|
70
|
+
},
|
|
71
|
+
"typesVersions": {
|
|
72
|
+
"<4.0": {
|
|
73
|
+
"dist-types/*": [
|
|
74
|
+
"dist-types/ts3.4/*"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"files": [
|
|
79
|
+
"dist-*/**"
|
|
80
|
+
],
|
|
81
|
+
"browser": {
|
|
82
|
+
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
83
|
+
},
|
|
84
|
+
"react-native": {
|
|
85
|
+
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// smithy-typescript generated code
|
|
2
|
+
import { CodeWhispererStreamingClient, CodeWhispererStreamingClientConfig } from './CodeWhispererStreamingClient'
|
|
3
|
+
import {
|
|
4
|
+
ExportResultArchiveCommand,
|
|
5
|
+
ExportResultArchiveCommandInput,
|
|
6
|
+
ExportResultArchiveCommandOutput,
|
|
7
|
+
} from './commands/ExportResultArchiveCommand'
|
|
8
|
+
import {
|
|
9
|
+
GenerateAssistantResponseCommand,
|
|
10
|
+
GenerateAssistantResponseCommandInput,
|
|
11
|
+
GenerateAssistantResponseCommandOutput,
|
|
12
|
+
} from './commands/GenerateAssistantResponseCommand'
|
|
13
|
+
import {
|
|
14
|
+
GenerateTaskAssistPlanCommand,
|
|
15
|
+
GenerateTaskAssistPlanCommandInput,
|
|
16
|
+
GenerateTaskAssistPlanCommandOutput,
|
|
17
|
+
} from './commands/GenerateTaskAssistPlanCommand'
|
|
18
|
+
import { createAggregatedClient } from '@smithy/smithy-client'
|
|
19
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from '@smithy/types'
|
|
20
|
+
|
|
21
|
+
const commands = {
|
|
22
|
+
ExportResultArchiveCommand,
|
|
23
|
+
GenerateAssistantResponseCommand,
|
|
24
|
+
GenerateTaskAssistPlanCommand,
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface CodeWhispererStreaming {
|
|
28
|
+
/**
|
|
29
|
+
* @see {@link ExportResultArchiveCommand}
|
|
30
|
+
*/
|
|
31
|
+
exportResultArchive(
|
|
32
|
+
args: ExportResultArchiveCommandInput,
|
|
33
|
+
options?: __HttpHandlerOptions
|
|
34
|
+
): Promise<ExportResultArchiveCommandOutput>
|
|
35
|
+
exportResultArchive(
|
|
36
|
+
args: ExportResultArchiveCommandInput,
|
|
37
|
+
cb: (err: any, data?: ExportResultArchiveCommandOutput) => void
|
|
38
|
+
): void
|
|
39
|
+
exportResultArchive(
|
|
40
|
+
args: ExportResultArchiveCommandInput,
|
|
41
|
+
options: __HttpHandlerOptions,
|
|
42
|
+
cb: (err: any, data?: ExportResultArchiveCommandOutput) => void
|
|
43
|
+
): void
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @see {@link GenerateAssistantResponseCommand}
|
|
47
|
+
*/
|
|
48
|
+
generateAssistantResponse(
|
|
49
|
+
args: GenerateAssistantResponseCommandInput,
|
|
50
|
+
options?: __HttpHandlerOptions
|
|
51
|
+
): Promise<GenerateAssistantResponseCommandOutput>
|
|
52
|
+
generateAssistantResponse(
|
|
53
|
+
args: GenerateAssistantResponseCommandInput,
|
|
54
|
+
cb: (err: any, data?: GenerateAssistantResponseCommandOutput) => void
|
|
55
|
+
): void
|
|
56
|
+
generateAssistantResponse(
|
|
57
|
+
args: GenerateAssistantResponseCommandInput,
|
|
58
|
+
options: __HttpHandlerOptions,
|
|
59
|
+
cb: (err: any, data?: GenerateAssistantResponseCommandOutput) => void
|
|
60
|
+
): void
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @see {@link GenerateTaskAssistPlanCommand}
|
|
64
|
+
*/
|
|
65
|
+
generateTaskAssistPlan(
|
|
66
|
+
args: GenerateTaskAssistPlanCommandInput,
|
|
67
|
+
options?: __HttpHandlerOptions
|
|
68
|
+
): Promise<GenerateTaskAssistPlanCommandOutput>
|
|
69
|
+
generateTaskAssistPlan(
|
|
70
|
+
args: GenerateTaskAssistPlanCommandInput,
|
|
71
|
+
cb: (err: any, data?: GenerateTaskAssistPlanCommandOutput) => void
|
|
72
|
+
): void
|
|
73
|
+
generateTaskAssistPlan(
|
|
74
|
+
args: GenerateTaskAssistPlanCommandInput,
|
|
75
|
+
options: __HttpHandlerOptions,
|
|
76
|
+
cb: (err: any, data?: GenerateTaskAssistPlanCommandOutput) => void
|
|
77
|
+
): void
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export class CodeWhispererStreaming extends CodeWhispererStreamingClient implements CodeWhispererStreaming {}
|
|
84
|
+
createAggregatedClient(commands, CodeWhispererStreaming)
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
// smithy-typescript generated code
|
|
2
|
+
import {
|
|
3
|
+
ExportResultArchiveCommandInput,
|
|
4
|
+
ExportResultArchiveCommandOutput,
|
|
5
|
+
} from './commands/ExportResultArchiveCommand'
|
|
6
|
+
import {
|
|
7
|
+
GenerateAssistantResponseCommandInput,
|
|
8
|
+
GenerateAssistantResponseCommandOutput,
|
|
9
|
+
} from './commands/GenerateAssistantResponseCommand'
|
|
10
|
+
import {
|
|
11
|
+
GenerateTaskAssistPlanCommandInput,
|
|
12
|
+
GenerateTaskAssistPlanCommandOutput,
|
|
13
|
+
} from './commands/GenerateTaskAssistPlanCommand'
|
|
14
|
+
import { getRuntimeConfig as __getRuntimeConfig } from './runtimeConfig'
|
|
15
|
+
import { RuntimeExtension, RuntimeExtensionsConfig, resolveRuntimeExtensions } from './runtimeExtensions'
|
|
16
|
+
import {
|
|
17
|
+
HostHeaderInputConfig,
|
|
18
|
+
HostHeaderResolvedConfig,
|
|
19
|
+
getHostHeaderPlugin,
|
|
20
|
+
resolveHostHeaderConfig,
|
|
21
|
+
} from '@aws-sdk/middleware-host-header'
|
|
22
|
+
import { getLoggerPlugin } from '@aws-sdk/middleware-logger'
|
|
23
|
+
import { getRecursionDetectionPlugin } from '@aws-sdk/middleware-recursion-detection'
|
|
24
|
+
import { TokenInputConfig, TokenResolvedConfig, getTokenPlugin, resolveTokenConfig } from '@aws-sdk/middleware-token'
|
|
25
|
+
import {
|
|
26
|
+
UserAgentInputConfig,
|
|
27
|
+
UserAgentResolvedConfig,
|
|
28
|
+
getUserAgentPlugin,
|
|
29
|
+
resolveUserAgentConfig,
|
|
30
|
+
} from '@aws-sdk/middleware-user-agent'
|
|
31
|
+
import {
|
|
32
|
+
EndpointsInputConfig,
|
|
33
|
+
EndpointsResolvedConfig,
|
|
34
|
+
RegionInputConfig,
|
|
35
|
+
RegionResolvedConfig,
|
|
36
|
+
resolveEndpointsConfig,
|
|
37
|
+
resolveRegionConfig,
|
|
38
|
+
} from '@smithy/config-resolver'
|
|
39
|
+
import {
|
|
40
|
+
EventStreamSerdeInputConfig,
|
|
41
|
+
EventStreamSerdeResolvedConfig,
|
|
42
|
+
resolveEventStreamSerdeConfig,
|
|
43
|
+
} from '@smithy/eventstream-serde-config-resolver'
|
|
44
|
+
import { getContentLengthPlugin } from '@smithy/middleware-content-length'
|
|
45
|
+
import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from '@smithy/middleware-retry'
|
|
46
|
+
import { HttpHandler as __HttpHandler } from '@smithy/protocol-http'
|
|
47
|
+
import {
|
|
48
|
+
Client as __Client,
|
|
49
|
+
DefaultsMode as __DefaultsMode,
|
|
50
|
+
SmithyConfiguration as __SmithyConfiguration,
|
|
51
|
+
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
|
|
52
|
+
} from '@smithy/smithy-client'
|
|
53
|
+
import {
|
|
54
|
+
Provider,
|
|
55
|
+
RegionInfoProvider,
|
|
56
|
+
BodyLengthCalculator as __BodyLengthCalculator,
|
|
57
|
+
CheckOptionalClientConfig as __CheckOptionalClientConfig,
|
|
58
|
+
Checksum as __Checksum,
|
|
59
|
+
ChecksumConstructor as __ChecksumConstructor,
|
|
60
|
+
Decoder as __Decoder,
|
|
61
|
+
Encoder as __Encoder,
|
|
62
|
+
EventStreamSerdeProvider as __EventStreamSerdeProvider,
|
|
63
|
+
Hash as __Hash,
|
|
64
|
+
HashConstructor as __HashConstructor,
|
|
65
|
+
HttpHandlerOptions as __HttpHandlerOptions,
|
|
66
|
+
Logger as __Logger,
|
|
67
|
+
Provider as __Provider,
|
|
68
|
+
StreamCollector as __StreamCollector,
|
|
69
|
+
UrlParser as __UrlParser,
|
|
70
|
+
UserAgent as __UserAgent,
|
|
71
|
+
} from '@smithy/types'
|
|
72
|
+
|
|
73
|
+
export { __Client }
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
export type ServiceInputTypes =
|
|
79
|
+
| ExportResultArchiveCommandInput
|
|
80
|
+
| GenerateAssistantResponseCommandInput
|
|
81
|
+
| GenerateTaskAssistPlanCommandInput
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
export type ServiceOutputTypes =
|
|
87
|
+
| ExportResultArchiveCommandOutput
|
|
88
|
+
| GenerateAssistantResponseCommandOutput
|
|
89
|
+
| GenerateTaskAssistPlanCommandOutput
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
95
|
+
/**
|
|
96
|
+
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
97
|
+
*/
|
|
98
|
+
requestHandler?: __HttpHandler
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
102
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
sha256?: __ChecksumConstructor | __HashConstructor
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
urlParser?: __UrlParser
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A function that can calculate the length of a request body.
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
bodyLengthChecker?: __BodyLengthCalculator
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* A function that converts a stream into an array of bytes.
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
streamCollector?: __StreamCollector
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
base64Decoder?: __Decoder
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
133
|
+
* @internal
|
|
134
|
+
*/
|
|
135
|
+
base64Encoder?: __Encoder
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
139
|
+
* @internal
|
|
140
|
+
*/
|
|
141
|
+
utf8Decoder?: __Decoder
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
145
|
+
* @internal
|
|
146
|
+
*/
|
|
147
|
+
utf8Encoder?: __Encoder
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* The runtime environment.
|
|
151
|
+
* @internal
|
|
152
|
+
*/
|
|
153
|
+
runtime?: string
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
157
|
+
* trait of an operation.
|
|
158
|
+
*/
|
|
159
|
+
disableHostPrefix?: boolean
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Unique service identifier.
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
serviceId?: string
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
169
|
+
*/
|
|
170
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Enables FIPS compatible endpoints.
|
|
174
|
+
*/
|
|
175
|
+
useFipsEndpoint?: boolean | __Provider<boolean>
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Fetch related hostname, signing name or signing region with given region.
|
|
179
|
+
* @internal
|
|
180
|
+
*/
|
|
181
|
+
regionInfoProvider?: RegionInfoProvider
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
185
|
+
* @internal
|
|
186
|
+
*/
|
|
187
|
+
defaultUserAgentProvider?: Provider<__UserAgent>
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
191
|
+
*/
|
|
192
|
+
maxAttempts?: number | __Provider<number>
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Specifies which retry algorithm to use.
|
|
196
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
197
|
+
*
|
|
198
|
+
*/
|
|
199
|
+
retryMode?: string | __Provider<string>
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Optional logger for logging debug/info/warn/error.
|
|
203
|
+
*/
|
|
204
|
+
logger?: __Logger
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Optional extensions
|
|
208
|
+
*/
|
|
209
|
+
extensions?: RuntimeExtension[]
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The function that provides necessary utilities for generating and parsing event stream
|
|
213
|
+
*/
|
|
214
|
+
eventStreamSerdeProvider?: __EventStreamSerdeProvider
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
218
|
+
*/
|
|
219
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @public
|
|
224
|
+
*/
|
|
225
|
+
export type CodeWhispererStreamingClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
|
|
226
|
+
ClientDefaults &
|
|
227
|
+
RegionInputConfig &
|
|
228
|
+
EndpointsInputConfig &
|
|
229
|
+
RetryInputConfig &
|
|
230
|
+
HostHeaderInputConfig &
|
|
231
|
+
TokenInputConfig &
|
|
232
|
+
UserAgentInputConfig &
|
|
233
|
+
EventStreamSerdeInputConfig
|
|
234
|
+
/**
|
|
235
|
+
* @public
|
|
236
|
+
*
|
|
237
|
+
* The configuration interface of CodeWhispererStreamingClient class constructor that set the region, credentials and other options.
|
|
238
|
+
*/
|
|
239
|
+
export interface CodeWhispererStreamingClientConfig extends CodeWhispererStreamingClientConfigType {}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @public
|
|
243
|
+
*/
|
|
244
|
+
export type CodeWhispererStreamingClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
|
|
245
|
+
Required<ClientDefaults> &
|
|
246
|
+
RuntimeExtensionsConfig &
|
|
247
|
+
RegionResolvedConfig &
|
|
248
|
+
EndpointsResolvedConfig &
|
|
249
|
+
RetryResolvedConfig &
|
|
250
|
+
HostHeaderResolvedConfig &
|
|
251
|
+
TokenResolvedConfig &
|
|
252
|
+
UserAgentResolvedConfig &
|
|
253
|
+
EventStreamSerdeResolvedConfig
|
|
254
|
+
/**
|
|
255
|
+
* @public
|
|
256
|
+
*
|
|
257
|
+
* The resolved configuration interface of CodeWhispererStreamingClient class. This is resolved and normalized from the {@link CodeWhispererStreamingClientConfig | constructor configuration interface}.
|
|
258
|
+
*/
|
|
259
|
+
export interface CodeWhispererStreamingClientResolvedConfig extends CodeWhispererStreamingClientResolvedConfigType {}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @public
|
|
263
|
+
*/
|
|
264
|
+
export class CodeWhispererStreamingClient extends __Client<
|
|
265
|
+
__HttpHandlerOptions,
|
|
266
|
+
ServiceInputTypes,
|
|
267
|
+
ServiceOutputTypes,
|
|
268
|
+
CodeWhispererStreamingClientResolvedConfig
|
|
269
|
+
> {
|
|
270
|
+
/**
|
|
271
|
+
* The resolved configuration of CodeWhispererStreamingClient class. This is resolved and normalized from the {@link CodeWhispererStreamingClientConfig | constructor configuration interface}.
|
|
272
|
+
*/
|
|
273
|
+
readonly config: CodeWhispererStreamingClientResolvedConfig
|
|
274
|
+
|
|
275
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<CodeWhispererStreamingClientConfig>) {
|
|
276
|
+
let _config_0 = __getRuntimeConfig(configuration || {})
|
|
277
|
+
let _config_1 = resolveRegionConfig(_config_0)
|
|
278
|
+
let _config_2 = resolveEndpointsConfig(_config_1)
|
|
279
|
+
let _config_3 = resolveRetryConfig(_config_2)
|
|
280
|
+
let _config_4 = resolveHostHeaderConfig(_config_3)
|
|
281
|
+
let _config_5 = resolveTokenConfig(_config_4)
|
|
282
|
+
let _config_6 = resolveUserAgentConfig(_config_5)
|
|
283
|
+
let _config_7 = resolveEventStreamSerdeConfig(_config_6)
|
|
284
|
+
let _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || [])
|
|
285
|
+
super(_config_8)
|
|
286
|
+
this.config = _config_8
|
|
287
|
+
this.middlewareStack.use(getRetryPlugin(this.config))
|
|
288
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config))
|
|
289
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config))
|
|
290
|
+
this.middlewareStack.use(getLoggerPlugin(this.config))
|
|
291
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config))
|
|
292
|
+
this.middlewareStack.use(getTokenPlugin(this.config))
|
|
293
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config))
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
298
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
299
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
300
|
+
*/
|
|
301
|
+
destroy(): void {
|
|
302
|
+
super.destroy()
|
|
303
|
+
}
|
|
304
|
+
}
|