@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,38 @@
|
|
|
1
|
+
import { ExportResultArchiveResponseFilterSensitiveLog, } from '../models/models_0';
|
|
2
|
+
import { de_ExportResultArchiveCommand, se_ExportResultArchiveCommand } from '../protocols/Aws_restJson1';
|
|
3
|
+
import { getSerdePlugin } from '@smithy/middleware-serde';
|
|
4
|
+
import { Command as $Command } from '@smithy/smithy-client';
|
|
5
|
+
import { SMITHY_CONTEXT_KEY, } from '@smithy/types';
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class ExportResultArchiveCommand extends $Command {
|
|
8
|
+
constructor(input) {
|
|
9
|
+
super();
|
|
10
|
+
this.input = input;
|
|
11
|
+
}
|
|
12
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
13
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
14
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
15
|
+
const { logger } = configuration;
|
|
16
|
+
const clientName = 'CodeWhispererStreamingClient';
|
|
17
|
+
const commandName = 'ExportResultArchiveCommand';
|
|
18
|
+
const handlerExecutionContext = {
|
|
19
|
+
logger,
|
|
20
|
+
clientName,
|
|
21
|
+
commandName,
|
|
22
|
+
inputFilterSensitiveLog: (_) => _,
|
|
23
|
+
outputFilterSensitiveLog: ExportResultArchiveResponseFilterSensitiveLog,
|
|
24
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
25
|
+
service: 'AmazonCodeWhispererStreamingService',
|
|
26
|
+
operation: 'ExportResultArchive',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
const { requestHandler } = configuration;
|
|
30
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
31
|
+
}
|
|
32
|
+
serialize(input, context) {
|
|
33
|
+
return se_ExportResultArchiveCommand(input, context);
|
|
34
|
+
}
|
|
35
|
+
deserialize(output, context) {
|
|
36
|
+
return de_ExportResultArchiveCommand(output, context);
|
|
37
|
+
}
|
|
38
|
+
}
|
package/src.gen/@amzn/codewhisperer-streaming/dist-es/commands/GenerateAssistantResponseCommand.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { GenerateAssistantResponseRequestFilterSensitiveLog, GenerateAssistantResponseResponseFilterSensitiveLog, } from '../models/models_0';
|
|
2
|
+
import { de_GenerateAssistantResponseCommand, se_GenerateAssistantResponseCommand } from '../protocols/Aws_restJson1';
|
|
3
|
+
import { getSerdePlugin } from '@smithy/middleware-serde';
|
|
4
|
+
import { Command as $Command } from '@smithy/smithy-client';
|
|
5
|
+
import { SMITHY_CONTEXT_KEY, } from '@smithy/types';
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GenerateAssistantResponseCommand extends $Command {
|
|
8
|
+
constructor(input) {
|
|
9
|
+
super();
|
|
10
|
+
this.input = input;
|
|
11
|
+
}
|
|
12
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
13
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
14
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
15
|
+
const { logger } = configuration;
|
|
16
|
+
const clientName = 'CodeWhispererStreamingClient';
|
|
17
|
+
const commandName = 'GenerateAssistantResponseCommand';
|
|
18
|
+
const handlerExecutionContext = {
|
|
19
|
+
logger,
|
|
20
|
+
clientName,
|
|
21
|
+
commandName,
|
|
22
|
+
inputFilterSensitiveLog: GenerateAssistantResponseRequestFilterSensitiveLog,
|
|
23
|
+
outputFilterSensitiveLog: GenerateAssistantResponseResponseFilterSensitiveLog,
|
|
24
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
25
|
+
service: 'AmazonCodeWhispererStreamingService',
|
|
26
|
+
operation: 'GenerateAssistantResponse',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
const { requestHandler } = configuration;
|
|
30
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
31
|
+
}
|
|
32
|
+
serialize(input, context) {
|
|
33
|
+
return se_GenerateAssistantResponseCommand(input, context);
|
|
34
|
+
}
|
|
35
|
+
deserialize(output, context) {
|
|
36
|
+
return de_GenerateAssistantResponseCommand(output, context);
|
|
37
|
+
}
|
|
38
|
+
}
|
package/src.gen/@amzn/codewhisperer-streaming/dist-es/commands/GenerateTaskAssistPlanCommand.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { GenerateTaskAssistPlanRequestFilterSensitiveLog, GenerateTaskAssistPlanResponseFilterSensitiveLog, } from '../models/models_0';
|
|
2
|
+
import { de_GenerateTaskAssistPlanCommand, se_GenerateTaskAssistPlanCommand } from '../protocols/Aws_restJson1';
|
|
3
|
+
import { getSerdePlugin } from '@smithy/middleware-serde';
|
|
4
|
+
import { Command as $Command } from '@smithy/smithy-client';
|
|
5
|
+
import { SMITHY_CONTEXT_KEY, } from '@smithy/types';
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GenerateTaskAssistPlanCommand extends $Command {
|
|
8
|
+
constructor(input) {
|
|
9
|
+
super();
|
|
10
|
+
this.input = input;
|
|
11
|
+
}
|
|
12
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
13
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
14
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
15
|
+
const { logger } = configuration;
|
|
16
|
+
const clientName = 'CodeWhispererStreamingClient';
|
|
17
|
+
const commandName = 'GenerateTaskAssistPlanCommand';
|
|
18
|
+
const handlerExecutionContext = {
|
|
19
|
+
logger,
|
|
20
|
+
clientName,
|
|
21
|
+
commandName,
|
|
22
|
+
inputFilterSensitiveLog: GenerateTaskAssistPlanRequestFilterSensitiveLog,
|
|
23
|
+
outputFilterSensitiveLog: GenerateTaskAssistPlanResponseFilterSensitiveLog,
|
|
24
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
25
|
+
service: 'AmazonCodeWhispererStreamingService',
|
|
26
|
+
operation: 'GenerateTaskAssistPlan',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
const { requestHandler } = configuration;
|
|
30
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
31
|
+
}
|
|
32
|
+
serialize(input, context) {
|
|
33
|
+
return se_GenerateTaskAssistPlanCommand(input, context);
|
|
34
|
+
}
|
|
35
|
+
deserialize(output, context) {
|
|
36
|
+
return de_GenerateTaskAssistPlanCommand(output, context);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { getRegionInfo } from '@smithy/config-resolver';
|
|
2
|
+
const regionHash = {};
|
|
3
|
+
const partitionHash = {
|
|
4
|
+
aws: {
|
|
5
|
+
regions: [
|
|
6
|
+
'af-south-1',
|
|
7
|
+
'ap-east-1',
|
|
8
|
+
'ap-northeast-1',
|
|
9
|
+
'ap-northeast-2',
|
|
10
|
+
'ap-northeast-3',
|
|
11
|
+
'ap-south-1',
|
|
12
|
+
'ap-south-2',
|
|
13
|
+
'ap-southeast-1',
|
|
14
|
+
'ap-southeast-2',
|
|
15
|
+
'ap-southeast-3',
|
|
16
|
+
'ap-southeast-4',
|
|
17
|
+
'ca-central-1',
|
|
18
|
+
'eu-central-1',
|
|
19
|
+
'eu-central-2',
|
|
20
|
+
'eu-north-1',
|
|
21
|
+
'eu-south-1',
|
|
22
|
+
'eu-south-2',
|
|
23
|
+
'eu-west-1',
|
|
24
|
+
'eu-west-2',
|
|
25
|
+
'eu-west-3',
|
|
26
|
+
'il-central-1',
|
|
27
|
+
'me-central-1',
|
|
28
|
+
'me-south-1',
|
|
29
|
+
'sa-east-1',
|
|
30
|
+
'us-east-1',
|
|
31
|
+
'us-east-2',
|
|
32
|
+
'us-west-1',
|
|
33
|
+
'us-west-2',
|
|
34
|
+
],
|
|
35
|
+
regionRegex: '^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$',
|
|
36
|
+
variants: [
|
|
37
|
+
{
|
|
38
|
+
hostname: 'amazoncodewhispererstreamingservice.{region}.amazonaws.com',
|
|
39
|
+
tags: [],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
hostname: 'amazoncodewhispererstreamingservice-fips.{region}.amazonaws.com',
|
|
43
|
+
tags: ['fips'],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
hostname: 'amazoncodewhispererstreamingservice-fips.{region}.api.aws',
|
|
47
|
+
tags: ['dualstack', 'fips'],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
hostname: 'amazoncodewhispererstreamingservice.{region}.api.aws',
|
|
51
|
+
tags: ['dualstack'],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
'aws-cn': {
|
|
56
|
+
regions: ['cn-north-1', 'cn-northwest-1'],
|
|
57
|
+
regionRegex: '^cn\\-\\w+\\-\\d+$',
|
|
58
|
+
variants: [
|
|
59
|
+
{
|
|
60
|
+
hostname: 'amazoncodewhispererstreamingservice.{region}.amazonaws.com.cn',
|
|
61
|
+
tags: [],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
hostname: 'amazoncodewhispererstreamingservice-fips.{region}.amazonaws.com.cn',
|
|
65
|
+
tags: ['fips'],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
hostname: 'amazoncodewhispererstreamingservice-fips.{region}.api.amazonwebservices.com.cn',
|
|
69
|
+
tags: ['dualstack', 'fips'],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
hostname: 'amazoncodewhispererstreamingservice.{region}.api.amazonwebservices.com.cn',
|
|
73
|
+
tags: ['dualstack'],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
'aws-iso': {
|
|
78
|
+
regions: ['us-iso-east-1', 'us-iso-west-1'],
|
|
79
|
+
regionRegex: '^us\\-iso\\-\\w+\\-\\d+$',
|
|
80
|
+
variants: [
|
|
81
|
+
{
|
|
82
|
+
hostname: 'amazoncodewhispererstreamingservice.{region}.c2s.ic.gov',
|
|
83
|
+
tags: [],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
hostname: 'amazoncodewhispererstreamingservice-fips.{region}.c2s.ic.gov',
|
|
87
|
+
tags: ['fips'],
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
'aws-iso-b': {
|
|
92
|
+
regions: ['us-isob-east-1'],
|
|
93
|
+
regionRegex: '^us\\-isob\\-\\w+\\-\\d+$',
|
|
94
|
+
variants: [
|
|
95
|
+
{
|
|
96
|
+
hostname: 'amazoncodewhispererstreamingservice.{region}.sc2s.sgov.gov',
|
|
97
|
+
tags: [],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
hostname: 'amazoncodewhispererstreamingservice-fips.{region}.sc2s.sgov.gov',
|
|
101
|
+
tags: ['fips'],
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
'aws-iso-e': {
|
|
106
|
+
regions: [],
|
|
107
|
+
regionRegex: '^eu\\-isoe\\-\\w+\\-\\d+$',
|
|
108
|
+
variants: [
|
|
109
|
+
{
|
|
110
|
+
hostname: 'amazoncodewhispererstreamingservice.{region}.cloud.adc-e.uk',
|
|
111
|
+
tags: [],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
hostname: 'amazoncodewhispererstreamingservice-fips.{region}.cloud.adc-e.uk',
|
|
115
|
+
tags: ['fips'],
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
'aws-iso-f': {
|
|
120
|
+
regions: [],
|
|
121
|
+
regionRegex: '^us\\-isof\\-\\w+\\-\\d+$',
|
|
122
|
+
variants: [
|
|
123
|
+
{
|
|
124
|
+
hostname: 'amazoncodewhispererstreamingservice.{region}.csp.hci.ic.gov',
|
|
125
|
+
tags: [],
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
hostname: 'amazoncodewhispererstreamingservice-fips.{region}.csp.hci.ic.gov',
|
|
129
|
+
tags: ['fips'],
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
'aws-us-gov': {
|
|
134
|
+
regions: ['us-gov-east-1', 'us-gov-west-1'],
|
|
135
|
+
regionRegex: '^us\\-gov\\-\\w+\\-\\d+$',
|
|
136
|
+
variants: [
|
|
137
|
+
{
|
|
138
|
+
hostname: 'amazoncodewhispererstreamingservice.{region}.amazonaws.com',
|
|
139
|
+
tags: [],
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
hostname: 'amazoncodewhispererstreamingservice-fips.{region}.amazonaws.com',
|
|
143
|
+
tags: ['fips'],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
hostname: 'amazoncodewhispererstreamingservice-fips.{region}.api.aws',
|
|
147
|
+
tags: ['dualstack', 'fips'],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
hostname: 'amazoncodewhispererstreamingservice.{region}.api.aws',
|
|
151
|
+
tags: ['dualstack'],
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
|
|
157
|
+
...options,
|
|
158
|
+
signingService: 'amazoncodewhispererstreamingservice',
|
|
159
|
+
regionHash,
|
|
160
|
+
partitionHash,
|
|
161
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from '@smithy/smithy-client';
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class CodeWhispererStreamingServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, CodeWhispererStreamingServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './models_0';
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { CodeWhispererStreamingServiceException as __BaseException } from './CodeWhispererStreamingServiceException';
|
|
2
|
+
import { SENSITIVE_STRING } from '@smithy/smithy-client';
|
|
3
|
+
export const AccessDeniedExceptionReason = {
|
|
4
|
+
UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS: 'UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS',
|
|
5
|
+
};
|
|
6
|
+
export class AccessDeniedException extends __BaseException {
|
|
7
|
+
constructor(opts) {
|
|
8
|
+
super({
|
|
9
|
+
name: 'AccessDeniedException',
|
|
10
|
+
$fault: 'client',
|
|
11
|
+
...opts,
|
|
12
|
+
});
|
|
13
|
+
this.name = 'AccessDeniedException';
|
|
14
|
+
this.$fault = 'client';
|
|
15
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
16
|
+
this.reason = opts.reason;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class InternalServerException extends __BaseException {
|
|
20
|
+
constructor(opts) {
|
|
21
|
+
super({
|
|
22
|
+
name: 'InternalServerException',
|
|
23
|
+
$fault: 'server',
|
|
24
|
+
...opts,
|
|
25
|
+
});
|
|
26
|
+
this.name = 'InternalServerException';
|
|
27
|
+
this.$fault = 'server';
|
|
28
|
+
this.$retryable = {};
|
|
29
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
33
|
+
constructor(opts) {
|
|
34
|
+
super({
|
|
35
|
+
name: 'ResourceNotFoundException',
|
|
36
|
+
$fault: 'client',
|
|
37
|
+
...opts,
|
|
38
|
+
});
|
|
39
|
+
this.name = 'ResourceNotFoundException';
|
|
40
|
+
this.$fault = 'client';
|
|
41
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export class ThrottlingException extends __BaseException {
|
|
45
|
+
constructor(opts) {
|
|
46
|
+
super({
|
|
47
|
+
name: 'ThrottlingException',
|
|
48
|
+
$fault: 'client',
|
|
49
|
+
...opts,
|
|
50
|
+
});
|
|
51
|
+
this.name = 'ThrottlingException';
|
|
52
|
+
this.$fault = 'client';
|
|
53
|
+
this.$retryable = {
|
|
54
|
+
throttling: true,
|
|
55
|
+
};
|
|
56
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export const ValidationExceptionReason = {
|
|
60
|
+
INVALID_CONVERSATION_ID: 'INVALID_CONVERSATION_ID',
|
|
61
|
+
};
|
|
62
|
+
export class ValidationException extends __BaseException {
|
|
63
|
+
constructor(opts) {
|
|
64
|
+
super({
|
|
65
|
+
name: 'ValidationException',
|
|
66
|
+
$fault: 'client',
|
|
67
|
+
...opts,
|
|
68
|
+
});
|
|
69
|
+
this.name = 'ValidationException';
|
|
70
|
+
this.$fault = 'client';
|
|
71
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
72
|
+
this.reason = opts.reason;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export const AssistantResponseEventFilterSensitiveLog = (obj) => ({
|
|
76
|
+
...obj,
|
|
77
|
+
...(obj.content && { content: SENSITIVE_STRING }),
|
|
78
|
+
});
|
|
79
|
+
export const UserIntent = {
|
|
80
|
+
APPLY_COMMON_BEST_PRACTICES: 'APPLY_COMMON_BEST_PRACTICES',
|
|
81
|
+
CITE_SOURCES: 'CITE_SOURCES',
|
|
82
|
+
EXPLAIN_CODE_SELECTION: 'EXPLAIN_CODE_SELECTION',
|
|
83
|
+
EXPLAIN_LINE_BY_LINE: 'EXPLAIN_LINE_BY_LINE',
|
|
84
|
+
IMPROVE_CODE: 'IMPROVE_CODE',
|
|
85
|
+
SHOW_EXAMPLES: 'SHOW_EXAMPLES',
|
|
86
|
+
SUGGEST_ALTERNATE_IMPLEMENTATION: 'SUGGEST_ALTERNATE_IMPLEMENTATION',
|
|
87
|
+
};
|
|
88
|
+
export const FollowupPromptFilterSensitiveLog = (obj) => ({
|
|
89
|
+
...obj,
|
|
90
|
+
...(obj.content && { content: SENSITIVE_STRING }),
|
|
91
|
+
});
|
|
92
|
+
export const SupplementaryWebLinkFilterSensitiveLog = (obj) => ({
|
|
93
|
+
...obj,
|
|
94
|
+
...(obj.url && { url: SENSITIVE_STRING }),
|
|
95
|
+
...(obj.title && { title: SENSITIVE_STRING }),
|
|
96
|
+
...(obj.snippet && { snippet: SENSITIVE_STRING }),
|
|
97
|
+
});
|
|
98
|
+
export const AssistantResponseMessageFilterSensitiveLog = (obj) => ({
|
|
99
|
+
...obj,
|
|
100
|
+
...(obj.content && { content: SENSITIVE_STRING }),
|
|
101
|
+
...(obj.supplementaryWebLinks && {
|
|
102
|
+
supplementaryWebLinks: obj.supplementaryWebLinks.map(item => SupplementaryWebLinkFilterSensitiveLog(item)),
|
|
103
|
+
}),
|
|
104
|
+
...(obj.followupPrompt && { followupPrompt: FollowupPromptFilterSensitiveLog(obj.followupPrompt) }),
|
|
105
|
+
});
|
|
106
|
+
export class ConflictException extends __BaseException {
|
|
107
|
+
constructor(opts) {
|
|
108
|
+
super({
|
|
109
|
+
name: 'ConflictException',
|
|
110
|
+
$fault: 'client',
|
|
111
|
+
...opts,
|
|
112
|
+
});
|
|
113
|
+
this.name = 'ConflictException';
|
|
114
|
+
this.$fault = 'client';
|
|
115
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
export const ContentChecksumType = {
|
|
119
|
+
SHA_256: 'SHA_256',
|
|
120
|
+
};
|
|
121
|
+
export const BinaryMetadataEventFilterSensitiveLog = (obj) => ({
|
|
122
|
+
...obj,
|
|
123
|
+
});
|
|
124
|
+
export const BinaryPayloadEventFilterSensitiveLog = (obj) => ({
|
|
125
|
+
...obj,
|
|
126
|
+
...(obj.bytes && { bytes: SENSITIVE_STRING }),
|
|
127
|
+
});
|
|
128
|
+
export const DiagnosticSeverity = {
|
|
129
|
+
ERROR: 'ERROR',
|
|
130
|
+
HINT: 'HINT',
|
|
131
|
+
INFORMATION: 'INFORMATION',
|
|
132
|
+
WARNING: 'WARNING',
|
|
133
|
+
};
|
|
134
|
+
export const RuntimeDiagnosticFilterSensitiveLog = (obj) => ({
|
|
135
|
+
...obj,
|
|
136
|
+
...(obj.source && { source: SENSITIVE_STRING }),
|
|
137
|
+
...(obj.message && { message: SENSITIVE_STRING }),
|
|
138
|
+
});
|
|
139
|
+
export const SymbolType = {
|
|
140
|
+
DECLARATION: 'DECLARATION',
|
|
141
|
+
USAGE: 'USAGE',
|
|
142
|
+
};
|
|
143
|
+
export const TextDocumentFilterSensitiveLog = (obj) => ({
|
|
144
|
+
...obj,
|
|
145
|
+
...(obj.relativeFilePath && { relativeFilePath: SENSITIVE_STRING }),
|
|
146
|
+
...(obj.text && { text: SENSITIVE_STRING }),
|
|
147
|
+
});
|
|
148
|
+
export const TextDocumentDiagnosticFilterSensitiveLog = (obj) => ({
|
|
149
|
+
...obj,
|
|
150
|
+
...(obj.document && { document: TextDocumentFilterSensitiveLog(obj.document) }),
|
|
151
|
+
...(obj.source && { source: SENSITIVE_STRING }),
|
|
152
|
+
...(obj.message && { message: SENSITIVE_STRING }),
|
|
153
|
+
});
|
|
154
|
+
export var Diagnostic;
|
|
155
|
+
(function (Diagnostic) {
|
|
156
|
+
Diagnostic.visit = (value, visitor) => {
|
|
157
|
+
if (value.textDocumentDiagnostic !== undefined)
|
|
158
|
+
return visitor.textDocumentDiagnostic(value.textDocumentDiagnostic);
|
|
159
|
+
if (value.runtimeDiagnostic !== undefined)
|
|
160
|
+
return visitor.runtimeDiagnostic(value.runtimeDiagnostic);
|
|
161
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
162
|
+
};
|
|
163
|
+
})(Diagnostic || (Diagnostic = {}));
|
|
164
|
+
export const DiagnosticFilterSensitiveLog = (obj) => {
|
|
165
|
+
if (obj.textDocumentDiagnostic !== undefined)
|
|
166
|
+
return { textDocumentDiagnostic: TextDocumentDiagnosticFilterSensitiveLog(obj.textDocumentDiagnostic) };
|
|
167
|
+
if (obj.runtimeDiagnostic !== undefined)
|
|
168
|
+
return { runtimeDiagnostic: RuntimeDiagnosticFilterSensitiveLog(obj.runtimeDiagnostic) };
|
|
169
|
+
if (obj.$unknown !== undefined)
|
|
170
|
+
return { [obj.$unknown[0]]: 'UNKNOWN' };
|
|
171
|
+
};
|
|
172
|
+
export var CursorState;
|
|
173
|
+
(function (CursorState) {
|
|
174
|
+
CursorState.visit = (value, visitor) => {
|
|
175
|
+
if (value.position !== undefined)
|
|
176
|
+
return visitor.position(value.position);
|
|
177
|
+
if (value.range !== undefined)
|
|
178
|
+
return visitor.range(value.range);
|
|
179
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
180
|
+
};
|
|
181
|
+
})(CursorState || (CursorState = {}));
|
|
182
|
+
export const EditorStateFilterSensitiveLog = (obj) => ({
|
|
183
|
+
...obj,
|
|
184
|
+
...(obj.document && { document: TextDocumentFilterSensitiveLog(obj.document) }),
|
|
185
|
+
...(obj.cursorState && { cursorState: obj.cursorState }),
|
|
186
|
+
});
|
|
187
|
+
export const UserInputMessageContextFilterSensitiveLog = (obj) => ({
|
|
188
|
+
...obj,
|
|
189
|
+
...(obj.editorState && { editorState: EditorStateFilterSensitiveLog(obj.editorState) }),
|
|
190
|
+
...(obj.diagnostic && { diagnostic: DiagnosticFilterSensitiveLog(obj.diagnostic) }),
|
|
191
|
+
});
|
|
192
|
+
export const UserInputMessageFilterSensitiveLog = (obj) => ({
|
|
193
|
+
...obj,
|
|
194
|
+
...(obj.content && { content: SENSITIVE_STRING }),
|
|
195
|
+
...(obj.userInputMessageContext && {
|
|
196
|
+
userInputMessageContext: UserInputMessageContextFilterSensitiveLog(obj.userInputMessageContext),
|
|
197
|
+
}),
|
|
198
|
+
});
|
|
199
|
+
export var ChatMessage;
|
|
200
|
+
(function (ChatMessage) {
|
|
201
|
+
ChatMessage.visit = (value, visitor) => {
|
|
202
|
+
if (value.userInputMessage !== undefined)
|
|
203
|
+
return visitor.userInputMessage(value.userInputMessage);
|
|
204
|
+
if (value.assistantResponseMessage !== undefined)
|
|
205
|
+
return visitor.assistantResponseMessage(value.assistantResponseMessage);
|
|
206
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
207
|
+
};
|
|
208
|
+
})(ChatMessage || (ChatMessage = {}));
|
|
209
|
+
export const ChatMessageFilterSensitiveLog = (obj) => {
|
|
210
|
+
if (obj.userInputMessage !== undefined)
|
|
211
|
+
return { userInputMessage: UserInputMessageFilterSensitiveLog(obj.userInputMessage) };
|
|
212
|
+
if (obj.assistantResponseMessage !== undefined)
|
|
213
|
+
return { assistantResponseMessage: AssistantResponseMessageFilterSensitiveLog(obj.assistantResponseMessage) };
|
|
214
|
+
if (obj.$unknown !== undefined)
|
|
215
|
+
return { [obj.$unknown[0]]: 'UNKNOWN' };
|
|
216
|
+
};
|
|
217
|
+
export const FollowupPromptEventFilterSensitiveLog = (obj) => ({
|
|
218
|
+
...obj,
|
|
219
|
+
...(obj.followupPrompt && { followupPrompt: FollowupPromptFilterSensitiveLog(obj.followupPrompt) }),
|
|
220
|
+
});
|
|
221
|
+
export const InvalidStateReason = {
|
|
222
|
+
INVALID_TASK_ASSIST_PLAN: 'INVALID_TASK_ASSIST_PLAN',
|
|
223
|
+
};
|
|
224
|
+
export const SupplementaryWebLinksEventFilterSensitiveLog = (obj) => ({
|
|
225
|
+
...obj,
|
|
226
|
+
...(obj.supplementaryWebLinks && {
|
|
227
|
+
supplementaryWebLinks: obj.supplementaryWebLinks.map(item => SupplementaryWebLinkFilterSensitiveLog(item)),
|
|
228
|
+
}),
|
|
229
|
+
});
|
|
230
|
+
export var ChatResponseStream;
|
|
231
|
+
(function (ChatResponseStream) {
|
|
232
|
+
ChatResponseStream.visit = (value, visitor) => {
|
|
233
|
+
if (value.messageMetadataEvent !== undefined)
|
|
234
|
+
return visitor.messageMetadataEvent(value.messageMetadataEvent);
|
|
235
|
+
if (value.assistantResponseEvent !== undefined)
|
|
236
|
+
return visitor.assistantResponseEvent(value.assistantResponseEvent);
|
|
237
|
+
if (value.codeReferenceEvent !== undefined)
|
|
238
|
+
return visitor.codeReferenceEvent(value.codeReferenceEvent);
|
|
239
|
+
if (value.supplementaryWebLinksEvent !== undefined)
|
|
240
|
+
return visitor.supplementaryWebLinksEvent(value.supplementaryWebLinksEvent);
|
|
241
|
+
if (value.followupPromptEvent !== undefined)
|
|
242
|
+
return visitor.followupPromptEvent(value.followupPromptEvent);
|
|
243
|
+
if (value.invalidStateEvent !== undefined)
|
|
244
|
+
return visitor.invalidStateEvent(value.invalidStateEvent);
|
|
245
|
+
if (value.error !== undefined)
|
|
246
|
+
return visitor.error(value.error);
|
|
247
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
248
|
+
};
|
|
249
|
+
})(ChatResponseStream || (ChatResponseStream = {}));
|
|
250
|
+
export const ChatResponseStreamFilterSensitiveLog = (obj) => {
|
|
251
|
+
if (obj.messageMetadataEvent !== undefined)
|
|
252
|
+
return { messageMetadataEvent: obj.messageMetadataEvent };
|
|
253
|
+
if (obj.assistantResponseEvent !== undefined)
|
|
254
|
+
return { assistantResponseEvent: AssistantResponseEventFilterSensitiveLog(obj.assistantResponseEvent) };
|
|
255
|
+
if (obj.codeReferenceEvent !== undefined)
|
|
256
|
+
return { codeReferenceEvent: obj.codeReferenceEvent };
|
|
257
|
+
if (obj.supplementaryWebLinksEvent !== undefined)
|
|
258
|
+
return {
|
|
259
|
+
supplementaryWebLinksEvent: SupplementaryWebLinksEventFilterSensitiveLog(obj.supplementaryWebLinksEvent),
|
|
260
|
+
};
|
|
261
|
+
if (obj.followupPromptEvent !== undefined)
|
|
262
|
+
return { followupPromptEvent: FollowupPromptEventFilterSensitiveLog(obj.followupPromptEvent) };
|
|
263
|
+
if (obj.invalidStateEvent !== undefined)
|
|
264
|
+
return { invalidStateEvent: obj.invalidStateEvent };
|
|
265
|
+
if (obj.error !== undefined)
|
|
266
|
+
return { error: obj.error };
|
|
267
|
+
if (obj.$unknown !== undefined)
|
|
268
|
+
return { [obj.$unknown[0]]: 'UNKNOWN' };
|
|
269
|
+
};
|
|
270
|
+
export const ChatTriggerType = {
|
|
271
|
+
DIAGNOSTIC: 'DIAGNOSTIC',
|
|
272
|
+
MANUAL: 'MANUAL',
|
|
273
|
+
};
|
|
274
|
+
export const ContextTruncationScheme = {
|
|
275
|
+
ANALYSIS: 'ANALYSIS',
|
|
276
|
+
GUMBY: 'GUMBY',
|
|
277
|
+
};
|
|
278
|
+
export const ConversationStateFilterSensitiveLog = (obj) => ({
|
|
279
|
+
...obj,
|
|
280
|
+
...(obj.history && { history: obj.history.map(item => ChatMessageFilterSensitiveLog(item)) }),
|
|
281
|
+
...(obj.currentMessage && { currentMessage: ChatMessageFilterSensitiveLog(obj.currentMessage) }),
|
|
282
|
+
});
|
|
283
|
+
export const ExportIntent = {
|
|
284
|
+
TASK_ASSIST: 'TASK_ASSIST',
|
|
285
|
+
TRANSFORMATION: 'TRANSFORMATION',
|
|
286
|
+
};
|
|
287
|
+
export var ResultArchiveStream;
|
|
288
|
+
(function (ResultArchiveStream) {
|
|
289
|
+
ResultArchiveStream.visit = (value, visitor) => {
|
|
290
|
+
if (value.binaryMetadataEvent !== undefined)
|
|
291
|
+
return visitor.binaryMetadataEvent(value.binaryMetadataEvent);
|
|
292
|
+
if (value.binaryPayloadEvent !== undefined)
|
|
293
|
+
return visitor.binaryPayloadEvent(value.binaryPayloadEvent);
|
|
294
|
+
if (value.internalServerException !== undefined)
|
|
295
|
+
return visitor.internalServerException(value.internalServerException);
|
|
296
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
297
|
+
};
|
|
298
|
+
})(ResultArchiveStream || (ResultArchiveStream = {}));
|
|
299
|
+
export const ResultArchiveStreamFilterSensitiveLog = (obj) => {
|
|
300
|
+
if (obj.binaryMetadataEvent !== undefined)
|
|
301
|
+
return { binaryMetadataEvent: SENSITIVE_STRING };
|
|
302
|
+
if (obj.binaryPayloadEvent !== undefined)
|
|
303
|
+
return { binaryPayloadEvent: SENSITIVE_STRING };
|
|
304
|
+
if (obj.internalServerException !== undefined)
|
|
305
|
+
return { internalServerException: obj.internalServerException };
|
|
306
|
+
if (obj.$unknown !== undefined)
|
|
307
|
+
return { [obj.$unknown[0]]: 'UNKNOWN' };
|
|
308
|
+
};
|
|
309
|
+
export const GenerateAssistantResponseRequestFilterSensitiveLog = (obj) => ({
|
|
310
|
+
...obj,
|
|
311
|
+
...(obj.conversationState && { conversationState: ConversationStateFilterSensitiveLog(obj.conversationState) }),
|
|
312
|
+
});
|
|
313
|
+
export const GenerateAssistantResponseResponseFilterSensitiveLog = (obj) => ({
|
|
314
|
+
...obj,
|
|
315
|
+
...(obj.generateAssistantResponseResponse && { generateAssistantResponseResponse: 'STREAMING_CONTENT' }),
|
|
316
|
+
});
|
|
317
|
+
export const ExportResultArchiveResponseFilterSensitiveLog = (obj) => ({
|
|
318
|
+
...obj,
|
|
319
|
+
...(obj.body && { body: 'STREAMING_CONTENT' }),
|
|
320
|
+
});
|
|
321
|
+
export const GenerateTaskAssistPlanRequestFilterSensitiveLog = (obj) => ({
|
|
322
|
+
...obj,
|
|
323
|
+
...(obj.conversationState && { conversationState: ConversationStateFilterSensitiveLog(obj.conversationState) }),
|
|
324
|
+
});
|
|
325
|
+
export const GenerateTaskAssistPlanResponseFilterSensitiveLog = (obj) => ({
|
|
326
|
+
...obj,
|
|
327
|
+
...(obj.planningResponseStream && { planningResponseStream: 'STREAMING_CONTENT' }),
|
|
328
|
+
});
|