@aws/lsp-codewhisperer 0.0.4 → 0.0.6
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 +11 -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 +62 -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 +79 -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.d.ts +1 -1
- package/out/language-server/codeWhispererServer.js +4 -4
- 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,1173 @@
|
|
|
1
|
+
import { CodeWhispererStreamingServiceException as __BaseException } from './CodeWhispererStreamingServiceException';
|
|
2
|
+
import { ExceptionOptionType as __ExceptionOptionType } from '@smithy/smithy-client';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
* @enum
|
|
6
|
+
*/
|
|
7
|
+
export declare const AccessDeniedExceptionReason: {
|
|
8
|
+
readonly UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS: "UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export type AccessDeniedExceptionReason = (typeof AccessDeniedExceptionReason)[keyof typeof AccessDeniedExceptionReason];
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
* This exception is thrown when the user does not have sufficient access to perform this action.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AccessDeniedException extends __BaseException {
|
|
19
|
+
readonly name: 'AccessDeniedException';
|
|
20
|
+
readonly $fault: 'client';
|
|
21
|
+
/**
|
|
22
|
+
* @public
|
|
23
|
+
* Reason for AccessDeniedException
|
|
24
|
+
*/
|
|
25
|
+
reason?: AccessDeniedExceptionReason | string;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @public
|
|
33
|
+
* This exception is thrown when an unexpected error occurred during the processing of a request.
|
|
34
|
+
*/
|
|
35
|
+
export declare class InternalServerException extends __BaseException {
|
|
36
|
+
readonly name: 'InternalServerException';
|
|
37
|
+
readonly $fault: 'server';
|
|
38
|
+
$retryable: {};
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @public
|
|
46
|
+
* This exception is thrown when describing a resource that does not exist.
|
|
47
|
+
*/
|
|
48
|
+
export declare class ResourceNotFoundException extends __BaseException {
|
|
49
|
+
readonly name: 'ResourceNotFoundException';
|
|
50
|
+
readonly $fault: 'client';
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @public
|
|
58
|
+
* This exception is thrown when request was denied due to request throttling.
|
|
59
|
+
*/
|
|
60
|
+
export declare class ThrottlingException extends __BaseException {
|
|
61
|
+
readonly name: 'ThrottlingException';
|
|
62
|
+
readonly $fault: 'client';
|
|
63
|
+
$retryable: {
|
|
64
|
+
throttling: boolean;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @public
|
|
73
|
+
* @enum
|
|
74
|
+
*/
|
|
75
|
+
export declare const ValidationExceptionReason: {
|
|
76
|
+
readonly INVALID_CONVERSATION_ID: "INVALID_CONVERSATION_ID";
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
export type ValidationExceptionReason = (typeof ValidationExceptionReason)[keyof typeof ValidationExceptionReason];
|
|
82
|
+
/**
|
|
83
|
+
* @public
|
|
84
|
+
* This exception is thrown when the input fails to satisfy the constraints specified by the service.
|
|
85
|
+
*/
|
|
86
|
+
export declare class ValidationException extends __BaseException {
|
|
87
|
+
readonly name: 'ValidationException';
|
|
88
|
+
readonly $fault: 'client';
|
|
89
|
+
/**
|
|
90
|
+
* @public
|
|
91
|
+
* Reason for ValidationException
|
|
92
|
+
*/
|
|
93
|
+
reason?: ValidationExceptionReason | string;
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @public
|
|
101
|
+
* Streaming Response Event for Assistant Markdown text message.
|
|
102
|
+
*/
|
|
103
|
+
export interface AssistantResponseEvent {
|
|
104
|
+
/**
|
|
105
|
+
* @public
|
|
106
|
+
* The content of the text message in markdown format.
|
|
107
|
+
*/
|
|
108
|
+
content: string | undefined;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
export declare const AssistantResponseEventFilterSensitiveLog: (obj: AssistantResponseEvent) => any;
|
|
114
|
+
/**
|
|
115
|
+
* @public
|
|
116
|
+
* @enum
|
|
117
|
+
*/
|
|
118
|
+
export declare const UserIntent: {
|
|
119
|
+
/**
|
|
120
|
+
* Apply Common Best Practices
|
|
121
|
+
*/
|
|
122
|
+
readonly APPLY_COMMON_BEST_PRACTICES: "APPLY_COMMON_BEST_PRACTICES";
|
|
123
|
+
/**
|
|
124
|
+
* Cite Sources
|
|
125
|
+
*/
|
|
126
|
+
readonly CITE_SOURCES: "CITE_SOURCES";
|
|
127
|
+
/**
|
|
128
|
+
* Explain Code Selection
|
|
129
|
+
*/
|
|
130
|
+
readonly EXPLAIN_CODE_SELECTION: "EXPLAIN_CODE_SELECTION";
|
|
131
|
+
/**
|
|
132
|
+
* Explain Code Line By Line
|
|
133
|
+
*/
|
|
134
|
+
readonly EXPLAIN_LINE_BY_LINE: "EXPLAIN_LINE_BY_LINE";
|
|
135
|
+
/**
|
|
136
|
+
* Improve Code
|
|
137
|
+
*/
|
|
138
|
+
readonly IMPROVE_CODE: "IMPROVE_CODE";
|
|
139
|
+
/**
|
|
140
|
+
* Show More Examples
|
|
141
|
+
*/
|
|
142
|
+
readonly SHOW_EXAMPLES: "SHOW_EXAMPLES";
|
|
143
|
+
/**
|
|
144
|
+
* Suggest Alternative Implementation
|
|
145
|
+
*/
|
|
146
|
+
readonly SUGGEST_ALTERNATE_IMPLEMENTATION: "SUGGEST_ALTERNATE_IMPLEMENTATION";
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* @public
|
|
150
|
+
*/
|
|
151
|
+
export type UserIntent = (typeof UserIntent)[keyof typeof UserIntent];
|
|
152
|
+
/**
|
|
153
|
+
* @public
|
|
154
|
+
* Followup Prompt for the Assistant Response
|
|
155
|
+
*/
|
|
156
|
+
export interface FollowupPrompt {
|
|
157
|
+
/**
|
|
158
|
+
* @public
|
|
159
|
+
* The content of the text message in markdown format.
|
|
160
|
+
*/
|
|
161
|
+
content: string | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* @public
|
|
164
|
+
* User Intent
|
|
165
|
+
*/
|
|
166
|
+
userIntent?: UserIntent | string;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* @internal
|
|
170
|
+
*/
|
|
171
|
+
export declare const FollowupPromptFilterSensitiveLog: (obj: FollowupPrompt) => any;
|
|
172
|
+
/**
|
|
173
|
+
* @public
|
|
174
|
+
* Represents span in a text
|
|
175
|
+
*/
|
|
176
|
+
export interface Span {
|
|
177
|
+
start?: number;
|
|
178
|
+
end?: number;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* @public
|
|
182
|
+
* Code Reference / Repository details
|
|
183
|
+
*/
|
|
184
|
+
export interface Reference {
|
|
185
|
+
/**
|
|
186
|
+
* @public
|
|
187
|
+
* License name
|
|
188
|
+
*/
|
|
189
|
+
licenseName?: string;
|
|
190
|
+
/**
|
|
191
|
+
* @public
|
|
192
|
+
* Code Repsitory for the associated reference
|
|
193
|
+
*/
|
|
194
|
+
repository?: string;
|
|
195
|
+
/**
|
|
196
|
+
* @public
|
|
197
|
+
* Respository URL
|
|
198
|
+
*/
|
|
199
|
+
url?: string;
|
|
200
|
+
/**
|
|
201
|
+
* @public
|
|
202
|
+
* Span / Range for the Reference
|
|
203
|
+
*/
|
|
204
|
+
recommendationContentSpan?: Span;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* @public
|
|
208
|
+
* Represents an additional reference link retured with the Chat message
|
|
209
|
+
*/
|
|
210
|
+
export interface SupplementaryWebLink {
|
|
211
|
+
/**
|
|
212
|
+
* @public
|
|
213
|
+
* URL of the web reference link
|
|
214
|
+
*/
|
|
215
|
+
url: string | undefined;
|
|
216
|
+
/**
|
|
217
|
+
* @public
|
|
218
|
+
* Title of the web reference link
|
|
219
|
+
*/
|
|
220
|
+
title: string | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* @public
|
|
223
|
+
* Relevant text snippet from the link
|
|
224
|
+
*/
|
|
225
|
+
snippet?: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* @internal
|
|
229
|
+
*/
|
|
230
|
+
export declare const SupplementaryWebLinkFilterSensitiveLog: (obj: SupplementaryWebLink) => any;
|
|
231
|
+
/**
|
|
232
|
+
* @public
|
|
233
|
+
* Markdown text message.
|
|
234
|
+
*/
|
|
235
|
+
export interface AssistantResponseMessage {
|
|
236
|
+
/**
|
|
237
|
+
* @public
|
|
238
|
+
* Unique identifier for the chat message
|
|
239
|
+
*/
|
|
240
|
+
messageId?: string;
|
|
241
|
+
/**
|
|
242
|
+
* @public
|
|
243
|
+
* The content of the text message in markdown format.
|
|
244
|
+
*/
|
|
245
|
+
content: string | undefined;
|
|
246
|
+
/**
|
|
247
|
+
* @public
|
|
248
|
+
* Web References
|
|
249
|
+
*/
|
|
250
|
+
supplementaryWebLinks?: SupplementaryWebLink[];
|
|
251
|
+
/**
|
|
252
|
+
* @public
|
|
253
|
+
* Code References
|
|
254
|
+
*/
|
|
255
|
+
references?: Reference[];
|
|
256
|
+
/**
|
|
257
|
+
* @public
|
|
258
|
+
* Followup Prompt
|
|
259
|
+
*/
|
|
260
|
+
followupPrompt?: FollowupPrompt;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* @internal
|
|
264
|
+
*/
|
|
265
|
+
export declare const AssistantResponseMessageFilterSensitiveLog: (obj: AssistantResponseMessage) => any;
|
|
266
|
+
/**
|
|
267
|
+
* @public
|
|
268
|
+
* This exception is thrown when the action to perform could not be completed because the resource is in a conflicting state.
|
|
269
|
+
*/
|
|
270
|
+
export declare class ConflictException extends __BaseException {
|
|
271
|
+
readonly name: 'ConflictException';
|
|
272
|
+
readonly $fault: 'client';
|
|
273
|
+
/**
|
|
274
|
+
* @internal
|
|
275
|
+
*/
|
|
276
|
+
constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* @public
|
|
280
|
+
* Programming Languages supported by CodeWhisperer
|
|
281
|
+
*/
|
|
282
|
+
export interface ProgrammingLanguage {
|
|
283
|
+
languageName: string | undefined;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* @public
|
|
287
|
+
* @enum
|
|
288
|
+
*/
|
|
289
|
+
export declare const ContentChecksumType: {
|
|
290
|
+
readonly SHA_256: "SHA_256";
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* @public
|
|
294
|
+
*/
|
|
295
|
+
export type ContentChecksumType = (typeof ContentChecksumType)[keyof typeof ContentChecksumType];
|
|
296
|
+
/**
|
|
297
|
+
* @public
|
|
298
|
+
* Payload Part
|
|
299
|
+
*/
|
|
300
|
+
export interface BinaryMetadataEvent {
|
|
301
|
+
/**
|
|
302
|
+
* @public
|
|
303
|
+
* Content length of the binary payload
|
|
304
|
+
*/
|
|
305
|
+
size?: number;
|
|
306
|
+
/**
|
|
307
|
+
* @public
|
|
308
|
+
* Content type of the response
|
|
309
|
+
*/
|
|
310
|
+
mimeType?: string;
|
|
311
|
+
/**
|
|
312
|
+
* @public
|
|
313
|
+
* Content checksum of the binary payload
|
|
314
|
+
*/
|
|
315
|
+
contentChecksum?: string;
|
|
316
|
+
/**
|
|
317
|
+
* @public
|
|
318
|
+
* Content checksum type of the binary payload
|
|
319
|
+
*/
|
|
320
|
+
contentChecksumType?: ContentChecksumType | string;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* @internal
|
|
324
|
+
*/
|
|
325
|
+
export declare const BinaryMetadataEventFilterSensitiveLog: (obj: BinaryMetadataEvent) => any;
|
|
326
|
+
/**
|
|
327
|
+
* @public
|
|
328
|
+
* Payload Part
|
|
329
|
+
*/
|
|
330
|
+
export interface BinaryPayloadEvent {
|
|
331
|
+
/**
|
|
332
|
+
* @public
|
|
333
|
+
* Payload Part's body
|
|
334
|
+
*/
|
|
335
|
+
bytes?: Uint8Array;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* @internal
|
|
339
|
+
*/
|
|
340
|
+
export declare const BinaryPayloadEventFilterSensitiveLog: (obj: BinaryPayloadEvent) => any;
|
|
341
|
+
/**
|
|
342
|
+
* @public
|
|
343
|
+
* @enum
|
|
344
|
+
*/
|
|
345
|
+
export declare const DiagnosticSeverity: {
|
|
346
|
+
readonly ERROR: "ERROR";
|
|
347
|
+
readonly HINT: "HINT";
|
|
348
|
+
readonly INFORMATION: "INFORMATION";
|
|
349
|
+
readonly WARNING: "WARNING";
|
|
350
|
+
};
|
|
351
|
+
/**
|
|
352
|
+
* @public
|
|
353
|
+
*/
|
|
354
|
+
export type DiagnosticSeverity = (typeof DiagnosticSeverity)[keyof typeof DiagnosticSeverity];
|
|
355
|
+
/**
|
|
356
|
+
* @public
|
|
357
|
+
* Structure to represent metadata about a Runtime Diagnostics
|
|
358
|
+
*/
|
|
359
|
+
export interface RuntimeDiagnostic {
|
|
360
|
+
/**
|
|
361
|
+
* @public
|
|
362
|
+
* A human-readable string describing the source of the diagnostic
|
|
363
|
+
*/
|
|
364
|
+
source: string | undefined;
|
|
365
|
+
/**
|
|
366
|
+
* @public
|
|
367
|
+
* Diagnostic Error type
|
|
368
|
+
*/
|
|
369
|
+
severity: DiagnosticSeverity | string | undefined;
|
|
370
|
+
/**
|
|
371
|
+
* @public
|
|
372
|
+
* The diagnostic's message.
|
|
373
|
+
*/
|
|
374
|
+
message: string | undefined;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* @internal
|
|
378
|
+
*/
|
|
379
|
+
export declare const RuntimeDiagnosticFilterSensitiveLog: (obj: RuntimeDiagnostic) => any;
|
|
380
|
+
/**
|
|
381
|
+
* @public
|
|
382
|
+
* @enum
|
|
383
|
+
*/
|
|
384
|
+
export declare const SymbolType: {
|
|
385
|
+
readonly DECLARATION: "DECLARATION";
|
|
386
|
+
readonly USAGE: "USAGE";
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* @public
|
|
390
|
+
*/
|
|
391
|
+
export type SymbolType = (typeof SymbolType)[keyof typeof SymbolType];
|
|
392
|
+
/**
|
|
393
|
+
* @public
|
|
394
|
+
*/
|
|
395
|
+
export interface DocumentSymbol {
|
|
396
|
+
/**
|
|
397
|
+
* @public
|
|
398
|
+
* Name of the Document Symbol
|
|
399
|
+
*/
|
|
400
|
+
name: string | undefined;
|
|
401
|
+
/**
|
|
402
|
+
* @public
|
|
403
|
+
* Symbol type - DECLARATION / USAGE
|
|
404
|
+
*/
|
|
405
|
+
type: SymbolType | string | undefined;
|
|
406
|
+
/**
|
|
407
|
+
* @public
|
|
408
|
+
* Symbol package / source for FullyQualified names
|
|
409
|
+
*/
|
|
410
|
+
source?: string;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* @public
|
|
414
|
+
* Represents a Text Document / File
|
|
415
|
+
*/
|
|
416
|
+
export interface TextDocument {
|
|
417
|
+
/**
|
|
418
|
+
* @public
|
|
419
|
+
* Filepath relative to the root of the workspace
|
|
420
|
+
*/
|
|
421
|
+
relativeFilePath: string | undefined;
|
|
422
|
+
/**
|
|
423
|
+
* @public
|
|
424
|
+
* The text document's language identifier.
|
|
425
|
+
*/
|
|
426
|
+
programmingLanguage?: ProgrammingLanguage;
|
|
427
|
+
/**
|
|
428
|
+
* @public
|
|
429
|
+
* Content of the text document
|
|
430
|
+
*/
|
|
431
|
+
text?: string;
|
|
432
|
+
/**
|
|
433
|
+
* @public
|
|
434
|
+
* DocumentSymbols parsed from a text document
|
|
435
|
+
*/
|
|
436
|
+
documentSymbols?: DocumentSymbol[];
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* @internal
|
|
440
|
+
*/
|
|
441
|
+
export declare const TextDocumentFilterSensitiveLog: (obj: TextDocument) => any;
|
|
442
|
+
/**
|
|
443
|
+
* @public
|
|
444
|
+
* Indicates Cursor postion in a Text Document
|
|
445
|
+
*/
|
|
446
|
+
export interface Position {
|
|
447
|
+
/**
|
|
448
|
+
* @public
|
|
449
|
+
* Line position in a document.
|
|
450
|
+
*/
|
|
451
|
+
line: number | undefined;
|
|
452
|
+
/**
|
|
453
|
+
* @public
|
|
454
|
+
* Character offset on a line in a document (zero-based)
|
|
455
|
+
*/
|
|
456
|
+
character: number | undefined;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* @public
|
|
460
|
+
* Indicates Range / Span in a Text Document
|
|
461
|
+
*/
|
|
462
|
+
export interface Range {
|
|
463
|
+
/**
|
|
464
|
+
* @public
|
|
465
|
+
* The range's start position.
|
|
466
|
+
*/
|
|
467
|
+
start: Position | undefined;
|
|
468
|
+
/**
|
|
469
|
+
* @public
|
|
470
|
+
* The range's end position.
|
|
471
|
+
*/
|
|
472
|
+
end: Position | undefined;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* @public
|
|
476
|
+
* Structure to represent metadata about a TextDocument Diagnostic
|
|
477
|
+
*/
|
|
478
|
+
export interface TextDocumentDiagnostic {
|
|
479
|
+
/**
|
|
480
|
+
* @public
|
|
481
|
+
* Represents a Text Document associated with Diagnostic
|
|
482
|
+
*/
|
|
483
|
+
document: TextDocument | undefined;
|
|
484
|
+
/**
|
|
485
|
+
* @public
|
|
486
|
+
* The range at which the message applies.
|
|
487
|
+
*/
|
|
488
|
+
range: Range | undefined;
|
|
489
|
+
/**
|
|
490
|
+
* @public
|
|
491
|
+
* A human-readable string describing the source of the diagnostic
|
|
492
|
+
*/
|
|
493
|
+
source: string | undefined;
|
|
494
|
+
/**
|
|
495
|
+
* @public
|
|
496
|
+
* Diagnostic Error type
|
|
497
|
+
*/
|
|
498
|
+
severity: DiagnosticSeverity | string | undefined;
|
|
499
|
+
/**
|
|
500
|
+
* @public
|
|
501
|
+
* The diagnostic's message.
|
|
502
|
+
*/
|
|
503
|
+
message: string | undefined;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* @internal
|
|
507
|
+
*/
|
|
508
|
+
export declare const TextDocumentDiagnosticFilterSensitiveLog: (obj: TextDocumentDiagnostic) => any;
|
|
509
|
+
/**
|
|
510
|
+
* @public
|
|
511
|
+
* Represents a Diagnostic message
|
|
512
|
+
*/
|
|
513
|
+
export type Diagnostic = Diagnostic.RuntimeDiagnosticMember | Diagnostic.TextDocumentDiagnosticMember | Diagnostic.$UnknownMember;
|
|
514
|
+
/**
|
|
515
|
+
* @public
|
|
516
|
+
*/
|
|
517
|
+
export declare namespace Diagnostic {
|
|
518
|
+
/**
|
|
519
|
+
* @public
|
|
520
|
+
* Diagnostics originating from a TextDocument
|
|
521
|
+
*/
|
|
522
|
+
interface TextDocumentDiagnosticMember {
|
|
523
|
+
textDocumentDiagnostic: TextDocumentDiagnostic;
|
|
524
|
+
runtimeDiagnostic?: never;
|
|
525
|
+
$unknown?: never;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* @public
|
|
529
|
+
* Diagnostics originating from a Runtime
|
|
530
|
+
*/
|
|
531
|
+
interface RuntimeDiagnosticMember {
|
|
532
|
+
textDocumentDiagnostic?: never;
|
|
533
|
+
runtimeDiagnostic: RuntimeDiagnostic;
|
|
534
|
+
$unknown?: never;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* @public
|
|
538
|
+
*/
|
|
539
|
+
interface $UnknownMember {
|
|
540
|
+
textDocumentDiagnostic?: never;
|
|
541
|
+
runtimeDiagnostic?: never;
|
|
542
|
+
$unknown: [string, any];
|
|
543
|
+
}
|
|
544
|
+
interface Visitor<T> {
|
|
545
|
+
textDocumentDiagnostic: (value: TextDocumentDiagnostic) => T;
|
|
546
|
+
runtimeDiagnostic: (value: RuntimeDiagnostic) => T;
|
|
547
|
+
_: (name: string, value: any) => T;
|
|
548
|
+
}
|
|
549
|
+
const visit: <T>(value: Diagnostic, visitor: Visitor<T>) => T;
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* @internal
|
|
553
|
+
*/
|
|
554
|
+
export declare const DiagnosticFilterSensitiveLog: (obj: Diagnostic) => any;
|
|
555
|
+
/**
|
|
556
|
+
* @public
|
|
557
|
+
* Represents the state of the Cursor in an Editor
|
|
558
|
+
*/
|
|
559
|
+
export type CursorState = CursorState.PositionMember | CursorState.RangeMember | CursorState.$UnknownMember;
|
|
560
|
+
/**
|
|
561
|
+
* @public
|
|
562
|
+
*/
|
|
563
|
+
export declare namespace CursorState {
|
|
564
|
+
/**
|
|
565
|
+
* @public
|
|
566
|
+
* Represents a cursor position in a Text Document
|
|
567
|
+
*/
|
|
568
|
+
interface PositionMember {
|
|
569
|
+
position: Position;
|
|
570
|
+
range?: never;
|
|
571
|
+
$unknown?: never;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* @public
|
|
575
|
+
* Represents a text selection in a Text Document
|
|
576
|
+
*/
|
|
577
|
+
interface RangeMember {
|
|
578
|
+
position?: never;
|
|
579
|
+
range: Range;
|
|
580
|
+
$unknown?: never;
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* @public
|
|
584
|
+
*/
|
|
585
|
+
interface $UnknownMember {
|
|
586
|
+
position?: never;
|
|
587
|
+
range?: never;
|
|
588
|
+
$unknown: [string, any];
|
|
589
|
+
}
|
|
590
|
+
interface Visitor<T> {
|
|
591
|
+
position: (value: Position) => T;
|
|
592
|
+
range: (value: Range) => T;
|
|
593
|
+
_: (name: string, value: any) => T;
|
|
594
|
+
}
|
|
595
|
+
const visit: <T>(value: CursorState, visitor: Visitor<T>) => T;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* @public
|
|
599
|
+
* Represents the state of an Editor
|
|
600
|
+
*/
|
|
601
|
+
export interface EditorState {
|
|
602
|
+
/**
|
|
603
|
+
* @public
|
|
604
|
+
* Represents currently edited file
|
|
605
|
+
*/
|
|
606
|
+
document?: TextDocument;
|
|
607
|
+
/**
|
|
608
|
+
* @public
|
|
609
|
+
* Position of the cursor
|
|
610
|
+
*/
|
|
611
|
+
cursorState?: CursorState;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* @internal
|
|
615
|
+
*/
|
|
616
|
+
export declare const EditorStateFilterSensitiveLog: (obj: EditorState) => any;
|
|
617
|
+
/**
|
|
618
|
+
* @public
|
|
619
|
+
* Additional Chat message context associated with the Chat Message
|
|
620
|
+
*/
|
|
621
|
+
export interface UserInputMessageContext {
|
|
622
|
+
/**
|
|
623
|
+
* @public
|
|
624
|
+
* Editor state chat message context.
|
|
625
|
+
*/
|
|
626
|
+
editorState?: EditorState;
|
|
627
|
+
/**
|
|
628
|
+
* @public
|
|
629
|
+
* Diagnostic chat message context.
|
|
630
|
+
*/
|
|
631
|
+
diagnostic?: Diagnostic;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* @internal
|
|
635
|
+
*/
|
|
636
|
+
export declare const UserInputMessageContextFilterSensitiveLog: (obj: UserInputMessageContext) => any;
|
|
637
|
+
/**
|
|
638
|
+
* @public
|
|
639
|
+
* Structure to represent a chat input message from User
|
|
640
|
+
*/
|
|
641
|
+
export interface UserInputMessage {
|
|
642
|
+
/**
|
|
643
|
+
* @public
|
|
644
|
+
* The content of the chat message.
|
|
645
|
+
*/
|
|
646
|
+
content: string | undefined;
|
|
647
|
+
/**
|
|
648
|
+
* @public
|
|
649
|
+
* Chat message context associated with the Chat Message
|
|
650
|
+
*/
|
|
651
|
+
userInputMessageContext?: UserInputMessageContext;
|
|
652
|
+
/**
|
|
653
|
+
* @public
|
|
654
|
+
* User Intent
|
|
655
|
+
*/
|
|
656
|
+
userIntent?: UserIntent | string;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* @internal
|
|
660
|
+
*/
|
|
661
|
+
export declare const UserInputMessageFilterSensitiveLog: (obj: UserInputMessage) => any;
|
|
662
|
+
/**
|
|
663
|
+
* @public
|
|
664
|
+
*/
|
|
665
|
+
export type ChatMessage = ChatMessage.AssistantResponseMessageMember | ChatMessage.UserInputMessageMember | ChatMessage.$UnknownMember;
|
|
666
|
+
/**
|
|
667
|
+
* @public
|
|
668
|
+
*/
|
|
669
|
+
export declare namespace ChatMessage {
|
|
670
|
+
/**
|
|
671
|
+
* @public
|
|
672
|
+
* Structure to represent a chat input message from User
|
|
673
|
+
*/
|
|
674
|
+
interface UserInputMessageMember {
|
|
675
|
+
userInputMessage: UserInputMessage;
|
|
676
|
+
assistantResponseMessage?: never;
|
|
677
|
+
$unknown?: never;
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* @public
|
|
681
|
+
* Markdown text message.
|
|
682
|
+
*/
|
|
683
|
+
interface AssistantResponseMessageMember {
|
|
684
|
+
userInputMessage?: never;
|
|
685
|
+
assistantResponseMessage: AssistantResponseMessage;
|
|
686
|
+
$unknown?: never;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* @public
|
|
690
|
+
*/
|
|
691
|
+
interface $UnknownMember {
|
|
692
|
+
userInputMessage?: never;
|
|
693
|
+
assistantResponseMessage?: never;
|
|
694
|
+
$unknown: [string, any];
|
|
695
|
+
}
|
|
696
|
+
interface Visitor<T> {
|
|
697
|
+
userInputMessage: (value: UserInputMessage) => T;
|
|
698
|
+
assistantResponseMessage: (value: AssistantResponseMessage) => T;
|
|
699
|
+
_: (name: string, value: any) => T;
|
|
700
|
+
}
|
|
701
|
+
const visit: <T>(value: ChatMessage, visitor: Visitor<T>) => T;
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* @internal
|
|
705
|
+
*/
|
|
706
|
+
export declare const ChatMessageFilterSensitiveLog: (obj: ChatMessage) => any;
|
|
707
|
+
/**
|
|
708
|
+
* @public
|
|
709
|
+
* Streaming Response Event for CodeReferences
|
|
710
|
+
*/
|
|
711
|
+
export interface CodeReferenceEvent {
|
|
712
|
+
/**
|
|
713
|
+
* @public
|
|
714
|
+
* Code References for Assistant Response Message
|
|
715
|
+
*/
|
|
716
|
+
references?: Reference[];
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* @public
|
|
720
|
+
* Streaming Response Event for Followup Prompt.
|
|
721
|
+
*/
|
|
722
|
+
export interface FollowupPromptEvent {
|
|
723
|
+
/**
|
|
724
|
+
* @public
|
|
725
|
+
* Followup Prompt for the Assistant Response
|
|
726
|
+
*/
|
|
727
|
+
followupPrompt?: FollowupPrompt;
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* @internal
|
|
731
|
+
*/
|
|
732
|
+
export declare const FollowupPromptEventFilterSensitiveLog: (obj: FollowupPromptEvent) => any;
|
|
733
|
+
/**
|
|
734
|
+
* @public
|
|
735
|
+
* @enum
|
|
736
|
+
*/
|
|
737
|
+
export declare const InvalidStateReason: {
|
|
738
|
+
readonly INVALID_TASK_ASSIST_PLAN: "INVALID_TASK_ASSIST_PLAN";
|
|
739
|
+
};
|
|
740
|
+
/**
|
|
741
|
+
* @public
|
|
742
|
+
*/
|
|
743
|
+
export type InvalidStateReason = (typeof InvalidStateReason)[keyof typeof InvalidStateReason];
|
|
744
|
+
/**
|
|
745
|
+
* @public
|
|
746
|
+
* Streaming Response Event when an Invalid State is reached
|
|
747
|
+
*/
|
|
748
|
+
export interface InvalidStateEvent {
|
|
749
|
+
/**
|
|
750
|
+
* @public
|
|
751
|
+
* Reasons for Invalid State Event
|
|
752
|
+
*/
|
|
753
|
+
reason: InvalidStateReason | string | undefined;
|
|
754
|
+
message: string | undefined;
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* @public
|
|
758
|
+
* Streaming Response Event for AssistantResponse Metadata
|
|
759
|
+
*/
|
|
760
|
+
export interface MessageMetadataEvent {
|
|
761
|
+
/**
|
|
762
|
+
* @public
|
|
763
|
+
* Unique identifier for the conversation
|
|
764
|
+
*/
|
|
765
|
+
conversationId?: string;
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* @public
|
|
769
|
+
* Streaming Response Event for SupplementaryWebLinks
|
|
770
|
+
*/
|
|
771
|
+
export interface SupplementaryWebLinksEvent {
|
|
772
|
+
/**
|
|
773
|
+
* @public
|
|
774
|
+
* Web References for Assistant Response Message
|
|
775
|
+
*/
|
|
776
|
+
supplementaryWebLinks?: SupplementaryWebLink[];
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* @internal
|
|
780
|
+
*/
|
|
781
|
+
export declare const SupplementaryWebLinksEventFilterSensitiveLog: (obj: SupplementaryWebLinksEvent) => any;
|
|
782
|
+
/**
|
|
783
|
+
* @public
|
|
784
|
+
* Streaming events from UniDirectional Streaming Conversational APIs.
|
|
785
|
+
*/
|
|
786
|
+
export type ChatResponseStream = ChatResponseStream.AssistantResponseEventMember | ChatResponseStream.CodeReferenceEventMember | ChatResponseStream.ErrorMember | ChatResponseStream.FollowupPromptEventMember | ChatResponseStream.InvalidStateEventMember | ChatResponseStream.MessageMetadataEventMember | ChatResponseStream.SupplementaryWebLinksEventMember | ChatResponseStream.$UnknownMember;
|
|
787
|
+
/**
|
|
788
|
+
* @public
|
|
789
|
+
*/
|
|
790
|
+
export declare namespace ChatResponseStream {
|
|
791
|
+
/**
|
|
792
|
+
* @public
|
|
793
|
+
* Message Metadata event
|
|
794
|
+
*/
|
|
795
|
+
interface MessageMetadataEventMember {
|
|
796
|
+
messageMetadataEvent: MessageMetadataEvent;
|
|
797
|
+
assistantResponseEvent?: never;
|
|
798
|
+
codeReferenceEvent?: never;
|
|
799
|
+
supplementaryWebLinksEvent?: never;
|
|
800
|
+
followupPromptEvent?: never;
|
|
801
|
+
invalidStateEvent?: never;
|
|
802
|
+
error?: never;
|
|
803
|
+
$unknown?: never;
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* @public
|
|
807
|
+
* Assistant response event - Text / Code snippet
|
|
808
|
+
*/
|
|
809
|
+
interface AssistantResponseEventMember {
|
|
810
|
+
messageMetadataEvent?: never;
|
|
811
|
+
assistantResponseEvent: AssistantResponseEvent;
|
|
812
|
+
codeReferenceEvent?: never;
|
|
813
|
+
supplementaryWebLinksEvent?: never;
|
|
814
|
+
followupPromptEvent?: never;
|
|
815
|
+
invalidStateEvent?: never;
|
|
816
|
+
error?: never;
|
|
817
|
+
$unknown?: never;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* @public
|
|
821
|
+
* Code References event
|
|
822
|
+
*/
|
|
823
|
+
interface CodeReferenceEventMember {
|
|
824
|
+
messageMetadataEvent?: never;
|
|
825
|
+
assistantResponseEvent?: never;
|
|
826
|
+
codeReferenceEvent: CodeReferenceEvent;
|
|
827
|
+
supplementaryWebLinksEvent?: never;
|
|
828
|
+
followupPromptEvent?: never;
|
|
829
|
+
invalidStateEvent?: never;
|
|
830
|
+
error?: never;
|
|
831
|
+
$unknown?: never;
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* @public
|
|
835
|
+
* Web Reference links event
|
|
836
|
+
*/
|
|
837
|
+
interface SupplementaryWebLinksEventMember {
|
|
838
|
+
messageMetadataEvent?: never;
|
|
839
|
+
assistantResponseEvent?: never;
|
|
840
|
+
codeReferenceEvent?: never;
|
|
841
|
+
supplementaryWebLinksEvent: SupplementaryWebLinksEvent;
|
|
842
|
+
followupPromptEvent?: never;
|
|
843
|
+
invalidStateEvent?: never;
|
|
844
|
+
error?: never;
|
|
845
|
+
$unknown?: never;
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* @public
|
|
849
|
+
* Followup prompt event
|
|
850
|
+
*/
|
|
851
|
+
interface FollowupPromptEventMember {
|
|
852
|
+
messageMetadataEvent?: never;
|
|
853
|
+
assistantResponseEvent?: never;
|
|
854
|
+
codeReferenceEvent?: never;
|
|
855
|
+
supplementaryWebLinksEvent?: never;
|
|
856
|
+
followupPromptEvent: FollowupPromptEvent;
|
|
857
|
+
invalidStateEvent?: never;
|
|
858
|
+
error?: never;
|
|
859
|
+
$unknown?: never;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* @public
|
|
863
|
+
* Invalid State event
|
|
864
|
+
*/
|
|
865
|
+
interface InvalidStateEventMember {
|
|
866
|
+
messageMetadataEvent?: never;
|
|
867
|
+
assistantResponseEvent?: never;
|
|
868
|
+
codeReferenceEvent?: never;
|
|
869
|
+
supplementaryWebLinksEvent?: never;
|
|
870
|
+
followupPromptEvent?: never;
|
|
871
|
+
invalidStateEvent: InvalidStateEvent;
|
|
872
|
+
error?: never;
|
|
873
|
+
$unknown?: never;
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* @public
|
|
877
|
+
* Internal Server Exception
|
|
878
|
+
*/
|
|
879
|
+
interface ErrorMember {
|
|
880
|
+
messageMetadataEvent?: never;
|
|
881
|
+
assistantResponseEvent?: never;
|
|
882
|
+
codeReferenceEvent?: never;
|
|
883
|
+
supplementaryWebLinksEvent?: never;
|
|
884
|
+
followupPromptEvent?: never;
|
|
885
|
+
invalidStateEvent?: never;
|
|
886
|
+
error: InternalServerException;
|
|
887
|
+
$unknown?: never;
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* @public
|
|
891
|
+
*/
|
|
892
|
+
interface $UnknownMember {
|
|
893
|
+
messageMetadataEvent?: never;
|
|
894
|
+
assistantResponseEvent?: never;
|
|
895
|
+
codeReferenceEvent?: never;
|
|
896
|
+
supplementaryWebLinksEvent?: never;
|
|
897
|
+
followupPromptEvent?: never;
|
|
898
|
+
invalidStateEvent?: never;
|
|
899
|
+
error?: never;
|
|
900
|
+
$unknown: [string, any];
|
|
901
|
+
}
|
|
902
|
+
interface Visitor<T> {
|
|
903
|
+
messageMetadataEvent: (value: MessageMetadataEvent) => T;
|
|
904
|
+
assistantResponseEvent: (value: AssistantResponseEvent) => T;
|
|
905
|
+
codeReferenceEvent: (value: CodeReferenceEvent) => T;
|
|
906
|
+
supplementaryWebLinksEvent: (value: SupplementaryWebLinksEvent) => T;
|
|
907
|
+
followupPromptEvent: (value: FollowupPromptEvent) => T;
|
|
908
|
+
invalidStateEvent: (value: InvalidStateEvent) => T;
|
|
909
|
+
error: (value: InternalServerException) => T;
|
|
910
|
+
_: (name: string, value: any) => T;
|
|
911
|
+
}
|
|
912
|
+
const visit: <T>(value: ChatResponseStream, visitor: Visitor<T>) => T;
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* @internal
|
|
916
|
+
*/
|
|
917
|
+
export declare const ChatResponseStreamFilterSensitiveLog: (obj: ChatResponseStream) => any;
|
|
918
|
+
/**
|
|
919
|
+
* @public
|
|
920
|
+
* @enum
|
|
921
|
+
*/
|
|
922
|
+
export declare const ChatTriggerType: {
|
|
923
|
+
/**
|
|
924
|
+
* Indicates the Chat was triggered in response to a IDE diagnostic
|
|
925
|
+
*/
|
|
926
|
+
readonly DIAGNOSTIC: "DIAGNOSTIC";
|
|
927
|
+
/**
|
|
928
|
+
* Indicates the Chat was triggered due to an explicit chat request by an end-user
|
|
929
|
+
*/
|
|
930
|
+
readonly MANUAL: "MANUAL";
|
|
931
|
+
};
|
|
932
|
+
/**
|
|
933
|
+
* @public
|
|
934
|
+
*/
|
|
935
|
+
export type ChatTriggerType = (typeof ChatTriggerType)[keyof typeof ChatTriggerType];
|
|
936
|
+
/**
|
|
937
|
+
* @public
|
|
938
|
+
* @enum
|
|
939
|
+
*/
|
|
940
|
+
export declare const ContextTruncationScheme: {
|
|
941
|
+
readonly ANALYSIS: "ANALYSIS";
|
|
942
|
+
readonly GUMBY: "GUMBY";
|
|
943
|
+
};
|
|
944
|
+
/**
|
|
945
|
+
* @public
|
|
946
|
+
*/
|
|
947
|
+
export type ContextTruncationScheme = (typeof ContextTruncationScheme)[keyof typeof ContextTruncationScheme];
|
|
948
|
+
/**
|
|
949
|
+
* @public
|
|
950
|
+
* Structure to represent the current state of a chat conversation.
|
|
951
|
+
*/
|
|
952
|
+
export interface ConversationState {
|
|
953
|
+
/**
|
|
954
|
+
* @public
|
|
955
|
+
* Unique identifier for the chat conversation stream
|
|
956
|
+
*/
|
|
957
|
+
conversationId?: string;
|
|
958
|
+
/**
|
|
959
|
+
* @public
|
|
960
|
+
* Holds the history of chat messages.
|
|
961
|
+
*/
|
|
962
|
+
history?: ChatMessage[];
|
|
963
|
+
/**
|
|
964
|
+
* @public
|
|
965
|
+
* Holds the current message being processed or displayed.
|
|
966
|
+
*/
|
|
967
|
+
currentMessage: ChatMessage | undefined;
|
|
968
|
+
/**
|
|
969
|
+
* @public
|
|
970
|
+
* Trigger Reason for Chat
|
|
971
|
+
*/
|
|
972
|
+
chatTriggerType: ChatTriggerType | string | undefined;
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* @internal
|
|
976
|
+
*/
|
|
977
|
+
export declare const ConversationStateFilterSensitiveLog: (obj: ConversationState) => any;
|
|
978
|
+
/**
|
|
979
|
+
* @public
|
|
980
|
+
* @enum
|
|
981
|
+
*/
|
|
982
|
+
export declare const ExportIntent: {
|
|
983
|
+
/**
|
|
984
|
+
* Code Task Assist
|
|
985
|
+
*/
|
|
986
|
+
readonly TASK_ASSIST: "TASK_ASSIST";
|
|
987
|
+
/**
|
|
988
|
+
* Code Transformation
|
|
989
|
+
*/
|
|
990
|
+
readonly TRANSFORMATION: "TRANSFORMATION";
|
|
991
|
+
};
|
|
992
|
+
/**
|
|
993
|
+
* @public
|
|
994
|
+
*/
|
|
995
|
+
export type ExportIntent = (typeof ExportIntent)[keyof typeof ExportIntent];
|
|
996
|
+
/**
|
|
997
|
+
* @public
|
|
998
|
+
* Response Stream
|
|
999
|
+
*/
|
|
1000
|
+
export type ResultArchiveStream = ResultArchiveStream.BinaryMetadataEventMember | ResultArchiveStream.BinaryPayloadEventMember | ResultArchiveStream.InternalServerExceptionMember | ResultArchiveStream.$UnknownMember;
|
|
1001
|
+
/**
|
|
1002
|
+
* @public
|
|
1003
|
+
*/
|
|
1004
|
+
export declare namespace ResultArchiveStream {
|
|
1005
|
+
/**
|
|
1006
|
+
* @public
|
|
1007
|
+
* Payload Part
|
|
1008
|
+
*/
|
|
1009
|
+
interface BinaryMetadataEventMember {
|
|
1010
|
+
binaryMetadataEvent: BinaryMetadataEvent;
|
|
1011
|
+
binaryPayloadEvent?: never;
|
|
1012
|
+
internalServerException?: never;
|
|
1013
|
+
$unknown?: never;
|
|
1014
|
+
}
|
|
1015
|
+
/**
|
|
1016
|
+
* @public
|
|
1017
|
+
* Payload Part
|
|
1018
|
+
*/
|
|
1019
|
+
interface BinaryPayloadEventMember {
|
|
1020
|
+
binaryMetadataEvent?: never;
|
|
1021
|
+
binaryPayloadEvent: BinaryPayloadEvent;
|
|
1022
|
+
internalServerException?: never;
|
|
1023
|
+
$unknown?: never;
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* @public
|
|
1027
|
+
* This exception is thrown when an unexpected error occurred during the processing of a request.
|
|
1028
|
+
*/
|
|
1029
|
+
interface InternalServerExceptionMember {
|
|
1030
|
+
binaryMetadataEvent?: never;
|
|
1031
|
+
binaryPayloadEvent?: never;
|
|
1032
|
+
internalServerException: InternalServerException;
|
|
1033
|
+
$unknown?: never;
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* @public
|
|
1037
|
+
*/
|
|
1038
|
+
interface $UnknownMember {
|
|
1039
|
+
binaryMetadataEvent?: never;
|
|
1040
|
+
binaryPayloadEvent?: never;
|
|
1041
|
+
internalServerException?: never;
|
|
1042
|
+
$unknown: [string, any];
|
|
1043
|
+
}
|
|
1044
|
+
interface Visitor<T> {
|
|
1045
|
+
binaryMetadataEvent: (value: BinaryMetadataEvent) => T;
|
|
1046
|
+
binaryPayloadEvent: (value: BinaryPayloadEvent) => T;
|
|
1047
|
+
internalServerException: (value: InternalServerException) => T;
|
|
1048
|
+
_: (name: string, value: any) => T;
|
|
1049
|
+
}
|
|
1050
|
+
const visit: <T>(value: ResultArchiveStream, visitor: Visitor<T>) => T;
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* @internal
|
|
1054
|
+
*/
|
|
1055
|
+
export declare const ResultArchiveStreamFilterSensitiveLog: (obj: ResultArchiveStream) => any;
|
|
1056
|
+
/**
|
|
1057
|
+
* @public
|
|
1058
|
+
* Represents a Workspace state uploaded to S3 for Async Code Actions
|
|
1059
|
+
*/
|
|
1060
|
+
export interface WorkspaceState {
|
|
1061
|
+
/**
|
|
1062
|
+
* @public
|
|
1063
|
+
* Upload ID representing an Upload using a PreSigned URL
|
|
1064
|
+
*/
|
|
1065
|
+
uploadId: string | undefined;
|
|
1066
|
+
/**
|
|
1067
|
+
* @public
|
|
1068
|
+
* Primary programming language of the Workspace
|
|
1069
|
+
*/
|
|
1070
|
+
programmingLanguage: ProgrammingLanguage | undefined;
|
|
1071
|
+
/**
|
|
1072
|
+
* @public
|
|
1073
|
+
* Workspace context truncation schemes based on usecase
|
|
1074
|
+
*/
|
|
1075
|
+
contextTruncationScheme?: ContextTruncationScheme | string;
|
|
1076
|
+
}
|
|
1077
|
+
/**
|
|
1078
|
+
* @public
|
|
1079
|
+
* Structure to represent a new generate assistant response request.
|
|
1080
|
+
*/
|
|
1081
|
+
export interface GenerateAssistantResponseRequest {
|
|
1082
|
+
/**
|
|
1083
|
+
* @public
|
|
1084
|
+
* Structure to represent the current state of a chat conversation.
|
|
1085
|
+
*/
|
|
1086
|
+
conversationState: ConversationState | undefined;
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* @internal
|
|
1090
|
+
*/
|
|
1091
|
+
export declare const GenerateAssistantResponseRequestFilterSensitiveLog: (obj: GenerateAssistantResponseRequest) => any;
|
|
1092
|
+
/**
|
|
1093
|
+
* @public
|
|
1094
|
+
* Structure to represent generate assistant response response.
|
|
1095
|
+
*/
|
|
1096
|
+
export interface GenerateAssistantResponseResponse {
|
|
1097
|
+
/**
|
|
1098
|
+
* @public
|
|
1099
|
+
* ID which represents a multi-turn conversation
|
|
1100
|
+
*/
|
|
1101
|
+
conversationId: string | undefined;
|
|
1102
|
+
/**
|
|
1103
|
+
* @public
|
|
1104
|
+
* Streaming events from UniDirectional Streaming Conversational APIs.
|
|
1105
|
+
*/
|
|
1106
|
+
generateAssistantResponseResponse: AsyncIterable<ChatResponseStream> | undefined;
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* @internal
|
|
1110
|
+
*/
|
|
1111
|
+
export declare const GenerateAssistantResponseResponseFilterSensitiveLog: (obj: GenerateAssistantResponseResponse) => any;
|
|
1112
|
+
/**
|
|
1113
|
+
* @public
|
|
1114
|
+
* Structure to represent a new ExportResultArchive request.
|
|
1115
|
+
*/
|
|
1116
|
+
export interface ExportResultArchiveRequest {
|
|
1117
|
+
exportId: string | undefined;
|
|
1118
|
+
/**
|
|
1119
|
+
* @public
|
|
1120
|
+
* Export Intent
|
|
1121
|
+
*/
|
|
1122
|
+
exportIntent: ExportIntent | string | undefined;
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* @public
|
|
1126
|
+
* Structure to represent ExportResultArchive response.
|
|
1127
|
+
*/
|
|
1128
|
+
export interface ExportResultArchiveResponse {
|
|
1129
|
+
/**
|
|
1130
|
+
* @public
|
|
1131
|
+
* Response Stream
|
|
1132
|
+
*/
|
|
1133
|
+
body: AsyncIterable<ResultArchiveStream> | undefined;
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* @internal
|
|
1137
|
+
*/
|
|
1138
|
+
export declare const ExportResultArchiveResponseFilterSensitiveLog: (obj: ExportResultArchiveResponse) => any;
|
|
1139
|
+
/**
|
|
1140
|
+
* @public
|
|
1141
|
+
* Structure to represent execute planning interaction request.
|
|
1142
|
+
*/
|
|
1143
|
+
export interface GenerateTaskAssistPlanRequest {
|
|
1144
|
+
/**
|
|
1145
|
+
* @public
|
|
1146
|
+
* Structure to represent the current state of a chat conversation.
|
|
1147
|
+
*/
|
|
1148
|
+
conversationState: ConversationState | undefined;
|
|
1149
|
+
/**
|
|
1150
|
+
* @public
|
|
1151
|
+
* Represents a Workspace state uploaded to S3 for Async Code Actions
|
|
1152
|
+
*/
|
|
1153
|
+
workspaceState: WorkspaceState | undefined;
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
* @internal
|
|
1157
|
+
*/
|
|
1158
|
+
export declare const GenerateTaskAssistPlanRequestFilterSensitiveLog: (obj: GenerateTaskAssistPlanRequest) => any;
|
|
1159
|
+
/**
|
|
1160
|
+
* @public
|
|
1161
|
+
* Structure to represent execute planning interaction response.
|
|
1162
|
+
*/
|
|
1163
|
+
export interface GenerateTaskAssistPlanResponse {
|
|
1164
|
+
/**
|
|
1165
|
+
* @public
|
|
1166
|
+
* Streaming events from UniDirectional Streaming Conversational APIs.
|
|
1167
|
+
*/
|
|
1168
|
+
planningResponseStream?: AsyncIterable<ChatResponseStream>;
|
|
1169
|
+
}
|
|
1170
|
+
/**
|
|
1171
|
+
* @internal
|
|
1172
|
+
*/
|
|
1173
|
+
export declare const GenerateTaskAssistPlanResponseFilterSensitiveLog: (obj: GenerateTaskAssistPlanResponse) => any;
|