@aws-sdk/client-bedrock-agent-runtime 3.812.0 → 3.815.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +48 -0
  2. package/dist-cjs/index.js +829 -176
  3. package/dist-es/BedrockAgentRuntime.js +12 -0
  4. package/dist-es/commands/GetExecutionFlowSnapshotCommand.js +22 -0
  5. package/dist-es/commands/GetFlowExecutionCommand.js +22 -0
  6. package/dist-es/commands/GetInvocationStepCommand.js +1 -1
  7. package/dist-es/commands/ListFlowExecutionEventsCommand.js +23 -0
  8. package/dist-es/commands/ListFlowExecutionsCommand.js +22 -0
  9. package/dist-es/commands/PutInvocationStepCommand.js +1 -1
  10. package/dist-es/commands/RetrieveAndGenerateStreamCommand.js +1 -2
  11. package/dist-es/commands/RetrieveCommand.js +1 -2
  12. package/dist-es/commands/StartFlowExecutionCommand.js +23 -0
  13. package/dist-es/commands/StopFlowExecutionCommand.js +22 -0
  14. package/dist-es/commands/index.js +6 -0
  15. package/dist-es/models/models_0.js +202 -196
  16. package/dist-es/models/models_1.js +141 -1
  17. package/dist-es/pagination/ListFlowExecutionEventsPaginator.js +4 -0
  18. package/dist-es/pagination/ListFlowExecutionsPaginator.js +4 -0
  19. package/dist-es/pagination/index.js +2 -0
  20. package/dist-es/protocols/Aws_restJson1.js +370 -2
  21. package/dist-types/BedrockAgentRuntime.d.ts +42 -0
  22. package/dist-types/BedrockAgentRuntimeClient.d.ts +8 -2
  23. package/dist-types/commands/CreateInvocationCommand.d.ts +1 -1
  24. package/dist-types/commands/CreateSessionCommand.d.ts +1 -1
  25. package/dist-types/commands/DeleteSessionCommand.d.ts +1 -1
  26. package/dist-types/commands/EndSessionCommand.d.ts +1 -1
  27. package/dist-types/commands/GetExecutionFlowSnapshotCommand.d.ts +94 -0
  28. package/dist-types/commands/GetFlowExecutionCommand.d.ts +102 -0
  29. package/dist-types/commands/GetInvocationStepCommand.d.ts +1 -1
  30. package/dist-types/commands/GetSessionCommand.d.ts +1 -1
  31. package/dist-types/commands/ListFlowExecutionEventsCommand.d.ts +164 -0
  32. package/dist-types/commands/ListFlowExecutionsCommand.d.ts +101 -0
  33. package/dist-types/commands/ListInvocationStepsCommand.d.ts +1 -1
  34. package/dist-types/commands/ListInvocationsCommand.d.ts +1 -1
  35. package/dist-types/commands/ListSessionsCommand.d.ts +1 -2
  36. package/dist-types/commands/PutInvocationStepCommand.d.ts +1 -1
  37. package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +1 -2
  38. package/dist-types/commands/RetrieveCommand.d.ts +1 -2
  39. package/dist-types/commands/StartFlowExecutionCommand.d.ts +116 -0
  40. package/dist-types/commands/StopFlowExecutionCommand.d.ts +99 -0
  41. package/dist-types/commands/index.d.ts +6 -0
  42. package/dist-types/models/models_0.d.ts +3521 -3592
  43. package/dist-types/models/models_1.d.ts +972 -1
  44. package/dist-types/pagination/ListFlowExecutionEventsPaginator.d.ts +7 -0
  45. package/dist-types/pagination/ListFlowExecutionsPaginator.d.ts +7 -0
  46. package/dist-types/pagination/index.d.ts +2 -0
  47. package/dist-types/protocols/Aws_restJson1.d.ts +54 -0
  48. package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +102 -0
  49. package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +36 -0
  50. package/dist-types/ts3.4/commands/CreateInvocationCommand.d.ts +1 -1
  51. package/dist-types/ts3.4/commands/CreateSessionCommand.d.ts +1 -1
  52. package/dist-types/ts3.4/commands/DeleteSessionCommand.d.ts +1 -1
  53. package/dist-types/ts3.4/commands/EndSessionCommand.d.ts +1 -1
  54. package/dist-types/ts3.4/commands/GetExecutionFlowSnapshotCommand.d.ts +51 -0
  55. package/dist-types/ts3.4/commands/GetFlowExecutionCommand.d.ts +50 -0
  56. package/dist-types/ts3.4/commands/GetInvocationStepCommand.d.ts +1 -1
  57. package/dist-types/ts3.4/commands/GetSessionCommand.d.ts +1 -1
  58. package/dist-types/ts3.4/commands/ListFlowExecutionEventsCommand.d.ts +51 -0
  59. package/dist-types/ts3.4/commands/ListFlowExecutionsCommand.d.ts +51 -0
  60. package/dist-types/ts3.4/commands/ListInvocationStepsCommand.d.ts +1 -1
  61. package/dist-types/ts3.4/commands/ListInvocationsCommand.d.ts +1 -1
  62. package/dist-types/ts3.4/commands/ListSessionsCommand.d.ts +1 -2
  63. package/dist-types/ts3.4/commands/PutInvocationStepCommand.d.ts +1 -1
  64. package/dist-types/ts3.4/commands/RetrieveAndGenerateStreamCommand.d.ts +4 -2
  65. package/dist-types/ts3.4/commands/RetrieveCommand.d.ts +1 -2
  66. package/dist-types/ts3.4/commands/StartFlowExecutionCommand.d.ts +51 -0
  67. package/dist-types/ts3.4/commands/StopFlowExecutionCommand.d.ts +51 -0
  68. package/dist-types/ts3.4/commands/index.d.ts +6 -0
  69. package/dist-types/ts3.4/models/models_0.d.ts +393 -507
  70. package/dist-types/ts3.4/models/models_1.d.ts +490 -2
  71. package/dist-types/ts3.4/pagination/ListFlowExecutionEventsPaginator.d.ts +11 -0
  72. package/dist-types/ts3.4/pagination/ListFlowExecutionsPaginator.d.ts +11 -0
  73. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  74. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +72 -0
  75. package/package.json +1 -1
@@ -1,4 +1,935 @@
1
- import { AgentActionGroup, AgentCollaboration, BedrockModelConfigurations, CollaboratorConfiguration, ConversationHistory, CustomOrchestration, ExternalSourcesRetrieveAndGenerateConfiguration, FilterAttribute, GenerationConfiguration, GuardrailConfiguration, GuardrailConfigurationWithArn, ImplicitFilterConfiguration, InlineBedrockModelConfigurations, InlineSessionState, InputFile, InvocationResultMember, KnowledgeBaseQuery, OrchestrationConfiguration, OrchestrationType, PromptOverrideConfiguration, RetrieveAndGenerateInput, RetrieveAndGenerateSessionConfiguration, RetrieveAndGenerateType, SearchType, SessionStatus, StreamingConfigurations, VectorSearchRerankingConfiguration } from "./models_0";
1
+ import { DocumentType as __DocumentType } from "@smithy/types";
2
+ import { AccessDeniedException, AgentActionGroup, AgentCollaboration, BadGatewayException, BedrockModelConfigurations, CitationEvent, CollaboratorConfiguration, ConflictException, ConversationHistory, CustomOrchestration, DependencyFailedException, ExternalSourcesRetrieveAndGenerateConfiguration, FilterAttribute, GenerationConfiguration, GuadrailAction, GuardrailConfiguration, GuardrailConfigurationWithArn, GuardrailEvent, ImplicitFilterConfiguration, InlineBedrockModelConfigurations, InlineSessionState, InputFile, InternalServerException, InvocationResultMember, OrchestrationConfiguration, OrchestrationType, PromptOverrideConfiguration, ResourceNotFoundException, RetrievalResultContent, RetrievalResultLocation, RetrieveAndGenerateInput, RetrieveAndGenerateOutputEvent, RetrieveAndGenerateSessionConfiguration, RetrieveAndGenerateType, SearchType, ServiceQuotaExceededException, StreamingConfigurations, ThrottlingException, ValidationException, VectorSearchRerankingConfiguration } from "./models_0";
3
+ /**
4
+ * <p>A retrieve and generate stream response output.</p>
5
+ * @public
6
+ */
7
+ export type RetrieveAndGenerateStreamResponseOutput = RetrieveAndGenerateStreamResponseOutput.AccessDeniedExceptionMember | RetrieveAndGenerateStreamResponseOutput.BadGatewayExceptionMember | RetrieveAndGenerateStreamResponseOutput.CitationMember | RetrieveAndGenerateStreamResponseOutput.ConflictExceptionMember | RetrieveAndGenerateStreamResponseOutput.DependencyFailedExceptionMember | RetrieveAndGenerateStreamResponseOutput.GuardrailMember | RetrieveAndGenerateStreamResponseOutput.InternalServerExceptionMember | RetrieveAndGenerateStreamResponseOutput.OutputMember | RetrieveAndGenerateStreamResponseOutput.ResourceNotFoundExceptionMember | RetrieveAndGenerateStreamResponseOutput.ServiceQuotaExceededExceptionMember | RetrieveAndGenerateStreamResponseOutput.ThrottlingExceptionMember | RetrieveAndGenerateStreamResponseOutput.ValidationExceptionMember | RetrieveAndGenerateStreamResponseOutput.$UnknownMember;
8
+ /**
9
+ * @public
10
+ */
11
+ export declare namespace RetrieveAndGenerateStreamResponseOutput {
12
+ /**
13
+ * <p>An output event.</p>
14
+ * @public
15
+ */
16
+ interface OutputMember {
17
+ output: RetrieveAndGenerateOutputEvent;
18
+ citation?: never;
19
+ guardrail?: never;
20
+ internalServerException?: never;
21
+ validationException?: never;
22
+ resourceNotFoundException?: never;
23
+ serviceQuotaExceededException?: never;
24
+ throttlingException?: never;
25
+ accessDeniedException?: never;
26
+ conflictException?: never;
27
+ dependencyFailedException?: never;
28
+ badGatewayException?: never;
29
+ $unknown?: never;
30
+ }
31
+ /**
32
+ * <p>A citation event.</p>
33
+ * @public
34
+ */
35
+ interface CitationMember {
36
+ output?: never;
37
+ citation: CitationEvent;
38
+ guardrail?: never;
39
+ internalServerException?: never;
40
+ validationException?: never;
41
+ resourceNotFoundException?: never;
42
+ serviceQuotaExceededException?: never;
43
+ throttlingException?: never;
44
+ accessDeniedException?: never;
45
+ conflictException?: never;
46
+ dependencyFailedException?: never;
47
+ badGatewayException?: never;
48
+ $unknown?: never;
49
+ }
50
+ /**
51
+ * <p>A guardrail event.</p>
52
+ * @public
53
+ */
54
+ interface GuardrailMember {
55
+ output?: never;
56
+ citation?: never;
57
+ guardrail: GuardrailEvent;
58
+ internalServerException?: never;
59
+ validationException?: never;
60
+ resourceNotFoundException?: never;
61
+ serviceQuotaExceededException?: never;
62
+ throttlingException?: never;
63
+ accessDeniedException?: never;
64
+ conflictException?: never;
65
+ dependencyFailedException?: never;
66
+ badGatewayException?: never;
67
+ $unknown?: never;
68
+ }
69
+ /**
70
+ * <p>An internal server error occurred. Retry your request.</p>
71
+ * @public
72
+ */
73
+ interface InternalServerExceptionMember {
74
+ output?: never;
75
+ citation?: never;
76
+ guardrail?: never;
77
+ internalServerException: InternalServerException;
78
+ validationException?: never;
79
+ resourceNotFoundException?: never;
80
+ serviceQuotaExceededException?: never;
81
+ throttlingException?: never;
82
+ accessDeniedException?: never;
83
+ conflictException?: never;
84
+ dependencyFailedException?: never;
85
+ badGatewayException?: never;
86
+ $unknown?: never;
87
+ }
88
+ /**
89
+ * <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide.</p>
90
+ * @public
91
+ */
92
+ interface ValidationExceptionMember {
93
+ output?: never;
94
+ citation?: never;
95
+ guardrail?: never;
96
+ internalServerException?: never;
97
+ validationException: ValidationException;
98
+ resourceNotFoundException?: never;
99
+ serviceQuotaExceededException?: never;
100
+ throttlingException?: never;
101
+ accessDeniedException?: never;
102
+ conflictException?: never;
103
+ dependencyFailedException?: never;
104
+ badGatewayException?: never;
105
+ $unknown?: never;
106
+ }
107
+ /**
108
+ * <p>The specified resource ARN was not found. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide.</p>
109
+ * @public
110
+ */
111
+ interface ResourceNotFoundExceptionMember {
112
+ output?: never;
113
+ citation?: never;
114
+ guardrail?: never;
115
+ internalServerException?: never;
116
+ validationException?: never;
117
+ resourceNotFoundException: ResourceNotFoundException;
118
+ serviceQuotaExceededException?: never;
119
+ throttlingException?: never;
120
+ accessDeniedException?: never;
121
+ conflictException?: never;
122
+ dependencyFailedException?: never;
123
+ badGatewayException?: never;
124
+ $unknown?: never;
125
+ }
126
+ /**
127
+ * <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
128
+ * @public
129
+ */
130
+ interface ServiceQuotaExceededExceptionMember {
131
+ output?: never;
132
+ citation?: never;
133
+ guardrail?: never;
134
+ internalServerException?: never;
135
+ validationException?: never;
136
+ resourceNotFoundException?: never;
137
+ serviceQuotaExceededException: ServiceQuotaExceededException;
138
+ throttlingException?: never;
139
+ accessDeniedException?: never;
140
+ conflictException?: never;
141
+ dependencyFailedException?: never;
142
+ badGatewayException?: never;
143
+ $unknown?: never;
144
+ }
145
+ /**
146
+ * <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide.</p>
147
+ * @public
148
+ */
149
+ interface ThrottlingExceptionMember {
150
+ output?: never;
151
+ citation?: never;
152
+ guardrail?: never;
153
+ internalServerException?: never;
154
+ validationException?: never;
155
+ resourceNotFoundException?: never;
156
+ serviceQuotaExceededException?: never;
157
+ throttlingException: ThrottlingException;
158
+ accessDeniedException?: never;
159
+ conflictException?: never;
160
+ dependencyFailedException?: never;
161
+ badGatewayException?: never;
162
+ $unknown?: never;
163
+ }
164
+ /**
165
+ * <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide.</p>
166
+ * @public
167
+ */
168
+ interface AccessDeniedExceptionMember {
169
+ output?: never;
170
+ citation?: never;
171
+ guardrail?: never;
172
+ internalServerException?: never;
173
+ validationException?: never;
174
+ resourceNotFoundException?: never;
175
+ serviceQuotaExceededException?: never;
176
+ throttlingException?: never;
177
+ accessDeniedException: AccessDeniedException;
178
+ conflictException?: never;
179
+ dependencyFailedException?: never;
180
+ badGatewayException?: never;
181
+ $unknown?: never;
182
+ }
183
+ /**
184
+ * <p>Error occurred because of a conflict while performing an operation.</p>
185
+ * @public
186
+ */
187
+ interface ConflictExceptionMember {
188
+ output?: never;
189
+ citation?: never;
190
+ guardrail?: never;
191
+ internalServerException?: never;
192
+ validationException?: never;
193
+ resourceNotFoundException?: never;
194
+ serviceQuotaExceededException?: never;
195
+ throttlingException?: never;
196
+ accessDeniedException?: never;
197
+ conflictException: ConflictException;
198
+ dependencyFailedException?: never;
199
+ badGatewayException?: never;
200
+ $unknown?: never;
201
+ }
202
+ /**
203
+ * <p>The request failed due to a dependency error.</p>
204
+ * @public
205
+ */
206
+ interface DependencyFailedExceptionMember {
207
+ output?: never;
208
+ citation?: never;
209
+ guardrail?: never;
210
+ internalServerException?: never;
211
+ validationException?: never;
212
+ resourceNotFoundException?: never;
213
+ serviceQuotaExceededException?: never;
214
+ throttlingException?: never;
215
+ accessDeniedException?: never;
216
+ conflictException?: never;
217
+ dependencyFailedException: DependencyFailedException;
218
+ badGatewayException?: never;
219
+ $unknown?: never;
220
+ }
221
+ /**
222
+ * <p>The request failed due to a bad gateway error.</p>
223
+ * @public
224
+ */
225
+ interface BadGatewayExceptionMember {
226
+ output?: never;
227
+ citation?: never;
228
+ guardrail?: never;
229
+ internalServerException?: never;
230
+ validationException?: never;
231
+ resourceNotFoundException?: never;
232
+ serviceQuotaExceededException?: never;
233
+ throttlingException?: never;
234
+ accessDeniedException?: never;
235
+ conflictException?: never;
236
+ dependencyFailedException?: never;
237
+ badGatewayException: BadGatewayException;
238
+ $unknown?: never;
239
+ }
240
+ /**
241
+ * @public
242
+ */
243
+ interface $UnknownMember {
244
+ output?: never;
245
+ citation?: never;
246
+ guardrail?: never;
247
+ internalServerException?: never;
248
+ validationException?: never;
249
+ resourceNotFoundException?: never;
250
+ serviceQuotaExceededException?: never;
251
+ throttlingException?: never;
252
+ accessDeniedException?: never;
253
+ conflictException?: never;
254
+ dependencyFailedException?: never;
255
+ badGatewayException?: never;
256
+ $unknown: [string, any];
257
+ }
258
+ interface Visitor<T> {
259
+ output: (value: RetrieveAndGenerateOutputEvent) => T;
260
+ citation: (value: CitationEvent) => T;
261
+ guardrail: (value: GuardrailEvent) => T;
262
+ internalServerException: (value: InternalServerException) => T;
263
+ validationException: (value: ValidationException) => T;
264
+ resourceNotFoundException: (value: ResourceNotFoundException) => T;
265
+ serviceQuotaExceededException: (value: ServiceQuotaExceededException) => T;
266
+ throttlingException: (value: ThrottlingException) => T;
267
+ accessDeniedException: (value: AccessDeniedException) => T;
268
+ conflictException: (value: ConflictException) => T;
269
+ dependencyFailedException: (value: DependencyFailedException) => T;
270
+ badGatewayException: (value: BadGatewayException) => T;
271
+ _: (name: string, value: any) => T;
272
+ }
273
+ const visit: <T>(value: RetrieveAndGenerateStreamResponseOutput, visitor: Visitor<T>) => T;
274
+ }
275
+ /**
276
+ * @public
277
+ */
278
+ export interface RetrieveAndGenerateStreamResponse {
279
+ /**
280
+ * <p>A stream of events from the model.</p>
281
+ * @public
282
+ */
283
+ stream: AsyncIterable<RetrieveAndGenerateStreamResponseOutput> | undefined;
284
+ /**
285
+ * <p>The session ID.</p>
286
+ * @public
287
+ */
288
+ sessionId: string | undefined;
289
+ }
290
+ /**
291
+ * <p>Contains the query made to the knowledge base.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax">Retrieve request</a> – in the <code>retrievalQuery</code> field</p> </li> </ul>
292
+ * @public
293
+ */
294
+ export interface KnowledgeBaseQuery {
295
+ /**
296
+ * <p>The text of the query made to the knowledge base.</p>
297
+ * @public
298
+ */
299
+ text: string | undefined;
300
+ }
301
+ /**
302
+ * <p>Details about a result from querying the knowledge base.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax">Retrieve response</a> – in the <code>retrievalResults</code> field</p> </li> </ul>
303
+ * @public
304
+ */
305
+ export interface KnowledgeBaseRetrievalResult {
306
+ /**
307
+ * <p>Contains information about the content of the chunk.</p>
308
+ * @public
309
+ */
310
+ content: RetrievalResultContent | undefined;
311
+ /**
312
+ * <p>Contains information about the location of the data source.</p>
313
+ * @public
314
+ */
315
+ location?: RetrievalResultLocation | undefined;
316
+ /**
317
+ * <p>The level of relevance of the result to the query.</p>
318
+ * @public
319
+ */
320
+ score?: number | undefined;
321
+ /**
322
+ * <p>Contains metadata attributes and their values for the file in the data source. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds.html#kb-ds-metadata">Metadata and filtering</a>.</p>
323
+ * @public
324
+ */
325
+ metadata?: Record<string, __DocumentType> | undefined;
326
+ }
327
+ /**
328
+ * @public
329
+ */
330
+ export interface RetrieveResponse {
331
+ /**
332
+ * <p>A list of results from querying the knowledge base.</p>
333
+ * @public
334
+ */
335
+ retrievalResults: KnowledgeBaseRetrievalResult[] | undefined;
336
+ /**
337
+ * <p>Specifies if there is a guardrail intervention in the response.</p>
338
+ * @public
339
+ */
340
+ guardrailAction?: GuadrailAction | undefined;
341
+ /**
342
+ * <p>If there are more results than can fit in the response, the response returns a <code>nextToken</code>. Use this token in the <code>nextToken</code> field of another request to retrieve the next batch of results.</p>
343
+ * @public
344
+ */
345
+ nextToken?: string | undefined;
346
+ }
347
+ /**
348
+ * @public
349
+ */
350
+ export interface CreateSessionRequest {
351
+ /**
352
+ * <p>A map of key-value pairs containing attributes to be persisted across the session. For example, the user's ID, their language preference, and the type of device they are using.</p>
353
+ * @public
354
+ */
355
+ sessionMetadata?: Record<string, string> | undefined;
356
+ /**
357
+ * <p>The Amazon Resource Name (ARN) of the KMS key to use to encrypt the session data. The user or role creating the session must have permission to use the key. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/session-encryption.html">Amazon Bedrock session encryption</a>. </p>
358
+ * @public
359
+ */
360
+ encryptionKeyArn?: string | undefined;
361
+ /**
362
+ * <p>Specify the key-value pairs for the tags that you want to attach to the session.</p>
363
+ * @public
364
+ */
365
+ tags?: Record<string, string> | undefined;
366
+ }
367
+ /**
368
+ * @public
369
+ * @enum
370
+ */
371
+ export declare const SessionStatus: {
372
+ readonly ACTIVE: "ACTIVE";
373
+ readonly ENDED: "ENDED";
374
+ readonly EXPIRED: "EXPIRED";
375
+ };
376
+ /**
377
+ * @public
378
+ */
379
+ export type SessionStatus = (typeof SessionStatus)[keyof typeof SessionStatus];
380
+ /**
381
+ * @public
382
+ */
383
+ export interface CreateSessionResponse {
384
+ /**
385
+ * <p>The unique identifier for the session.</p>
386
+ * @public
387
+ */
388
+ sessionId: string | undefined;
389
+ /**
390
+ * <p>The Amazon Resource Name (ARN) of the created session.</p>
391
+ * @public
392
+ */
393
+ sessionArn: string | undefined;
394
+ /**
395
+ * <p>The current status of the session.</p>
396
+ * @public
397
+ */
398
+ sessionStatus: SessionStatus | undefined;
399
+ /**
400
+ * <p>The timestamp for when the session was created.</p>
401
+ * @public
402
+ */
403
+ createdAt: Date | undefined;
404
+ }
405
+ /**
406
+ * @public
407
+ */
408
+ export interface DeleteSessionRequest {
409
+ /**
410
+ * <p>The unique identifier for the session to be deleted. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
411
+ * @public
412
+ */
413
+ sessionIdentifier: string | undefined;
414
+ }
415
+ /**
416
+ * @public
417
+ */
418
+ export interface DeleteSessionResponse {
419
+ }
420
+ /**
421
+ * @public
422
+ */
423
+ export interface EndSessionRequest {
424
+ /**
425
+ * <p>The unique identifier for the session to end. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
426
+ * @public
427
+ */
428
+ sessionIdentifier: string | undefined;
429
+ }
430
+ /**
431
+ * @public
432
+ */
433
+ export interface EndSessionResponse {
434
+ /**
435
+ * <p>The unique identifier of the session you ended.</p>
436
+ * @public
437
+ */
438
+ sessionId: string | undefined;
439
+ /**
440
+ * <p>The Amazon Resource Name (ARN) of the session you ended.</p>
441
+ * @public
442
+ */
443
+ sessionArn: string | undefined;
444
+ /**
445
+ * <p>The current status of the session you ended.</p>
446
+ * @public
447
+ */
448
+ sessionStatus: SessionStatus | undefined;
449
+ }
450
+ /**
451
+ * @public
452
+ */
453
+ export interface GetSessionRequest {
454
+ /**
455
+ * <p>A unique identifier for the session to retrieve. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
456
+ * @public
457
+ */
458
+ sessionIdentifier: string | undefined;
459
+ }
460
+ /**
461
+ * @public
462
+ */
463
+ export interface GetSessionResponse {
464
+ /**
465
+ * <p>The unique identifier for the session in UUID format.</p>
466
+ * @public
467
+ */
468
+ sessionId: string | undefined;
469
+ /**
470
+ * <p>The Amazon Resource Name (ARN) of the session.</p>
471
+ * @public
472
+ */
473
+ sessionArn: string | undefined;
474
+ /**
475
+ * <p>The current status of the session.</p>
476
+ * @public
477
+ */
478
+ sessionStatus: SessionStatus | undefined;
479
+ /**
480
+ * <p>The timestamp for when the session was created.</p>
481
+ * @public
482
+ */
483
+ createdAt: Date | undefined;
484
+ /**
485
+ * <p>The timestamp for when the session was last modified.</p>
486
+ * @public
487
+ */
488
+ lastUpdatedAt: Date | undefined;
489
+ /**
490
+ * <p>A map of key-value pairs containing attributes persisted across the session.</p>
491
+ * @public
492
+ */
493
+ sessionMetadata?: Record<string, string> | undefined;
494
+ /**
495
+ * <p>The Amazon Resource Name (ARN) of the Key Management Service key used to encrypt the session data. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/session-encryption.html">Amazon Bedrock session encryption</a>.</p>
496
+ * @public
497
+ */
498
+ encryptionKeyArn?: string | undefined;
499
+ }
500
+ /**
501
+ * @public
502
+ */
503
+ export interface CreateInvocationRequest {
504
+ /**
505
+ * <p>A unique identifier for the invocation in UUID format.</p>
506
+ * @public
507
+ */
508
+ invocationId?: string | undefined;
509
+ /**
510
+ * <p>A description for the interactions in the invocation. For example, "User asking about weather in Seattle".</p>
511
+ * @public
512
+ */
513
+ description?: string | undefined;
514
+ /**
515
+ * <p>The unique identifier for the associated session for the invocation. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN). </p>
516
+ * @public
517
+ */
518
+ sessionIdentifier: string | undefined;
519
+ }
520
+ /**
521
+ * @public
522
+ */
523
+ export interface CreateInvocationResponse {
524
+ /**
525
+ * <p>The unique identifier for the session associated with the invocation.</p>
526
+ * @public
527
+ */
528
+ sessionId: string | undefined;
529
+ /**
530
+ * <p>The unique identifier for the invocation.</p>
531
+ * @public
532
+ */
533
+ invocationId: string | undefined;
534
+ /**
535
+ * <p>The timestamp for when the invocation was created.</p>
536
+ * @public
537
+ */
538
+ createdAt: Date | undefined;
539
+ }
540
+ /**
541
+ * @public
542
+ */
543
+ export interface ListInvocationsRequest {
544
+ /**
545
+ * <p>If the total number of results is greater than the <code>maxResults</code> value provided in the request, enter the token returned in the <code>nextToken</code> field in the response in this field to return the next batch of results. </p>
546
+ * @public
547
+ */
548
+ nextToken?: string | undefined;
549
+ /**
550
+ * <p>The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the <code>nextToken</code> field when making another request to return the next batch of results.</p>
551
+ * @public
552
+ */
553
+ maxResults?: number | undefined;
554
+ /**
555
+ * <p>The unique identifier for the session to list invocations for. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
556
+ * @public
557
+ */
558
+ sessionIdentifier: string | undefined;
559
+ }
560
+ /**
561
+ * <p>Contains details about an invocation in a session. For more information about sessions, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html">Store and retrieve conversation history and context with Amazon Bedrock sessions</a>.</p>
562
+ * @public
563
+ */
564
+ export interface InvocationSummary {
565
+ /**
566
+ * <p>The unique identifier for the session associated with the invocation.</p>
567
+ * @public
568
+ */
569
+ sessionId: string | undefined;
570
+ /**
571
+ * <p>A unique identifier for the invocation in UUID format.</p>
572
+ * @public
573
+ */
574
+ invocationId: string | undefined;
575
+ /**
576
+ * <p>The timestamp for when the invocation was created.</p>
577
+ * @public
578
+ */
579
+ createdAt: Date | undefined;
580
+ }
581
+ /**
582
+ * @public
583
+ */
584
+ export interface ListInvocationsResponse {
585
+ /**
586
+ * <p>A list of invocation summaries associated with the session.</p>
587
+ * @public
588
+ */
589
+ invocationSummaries: InvocationSummary[] | undefined;
590
+ /**
591
+ * <p>If the total number of results is greater than the <code>maxResults</code> value provided in the request, use this token when making another request in the <code>nextToken</code> field to return the next batch of results.</p>
592
+ * @public
593
+ */
594
+ nextToken?: string | undefined;
595
+ }
596
+ /**
597
+ * @public
598
+ */
599
+ export interface GetInvocationStepRequest {
600
+ /**
601
+ * <p>The unique identifier for the invocation in UUID format.</p>
602
+ * @public
603
+ */
604
+ invocationIdentifier: string | undefined;
605
+ /**
606
+ * <p>The unique identifier (in UUID format) for the specific invocation step to retrieve.</p>
607
+ * @public
608
+ */
609
+ invocationStepId: string | undefined;
610
+ /**
611
+ * <p>The unique identifier for the invocation step's associated session. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
612
+ * @public
613
+ */
614
+ sessionIdentifier: string | undefined;
615
+ }
616
+ /**
617
+ * @public
618
+ * @enum
619
+ */
620
+ export declare const ImageFormat: {
621
+ readonly GIF: "gif";
622
+ readonly JPEG: "jpeg";
623
+ readonly PNG: "png";
624
+ readonly WEBP: "webp";
625
+ };
626
+ /**
627
+ * @public
628
+ */
629
+ export type ImageFormat = (typeof ImageFormat)[keyof typeof ImageFormat];
630
+ /**
631
+ * <p>Information about the Amazon S3 bucket where the image is stored.</p>
632
+ * @public
633
+ */
634
+ export interface S3Location {
635
+ /**
636
+ * <p>The path to the Amazon S3 bucket where the image is stored.</p>
637
+ * @public
638
+ */
639
+ uri: string | undefined;
640
+ }
641
+ /**
642
+ * <p>The source for an image.</p>
643
+ * @public
644
+ */
645
+ export type ImageSource = ImageSource.BytesMember | ImageSource.S3LocationMember | ImageSource.$UnknownMember;
646
+ /**
647
+ * @public
648
+ */
649
+ export declare namespace ImageSource {
650
+ /**
651
+ * <p> The raw image bytes for the image. If you use an Amazon Web Services SDK, you don't need to encode the image bytes in base64.</p>
652
+ * @public
653
+ */
654
+ interface BytesMember {
655
+ bytes: Uint8Array;
656
+ s3Location?: never;
657
+ $unknown?: never;
658
+ }
659
+ /**
660
+ * <p>The path to the Amazon S3 bucket where the image is stored.</p>
661
+ * @public
662
+ */
663
+ interface S3LocationMember {
664
+ bytes?: never;
665
+ s3Location: S3Location;
666
+ $unknown?: never;
667
+ }
668
+ /**
669
+ * @public
670
+ */
671
+ interface $UnknownMember {
672
+ bytes?: never;
673
+ s3Location?: never;
674
+ $unknown: [string, any];
675
+ }
676
+ interface Visitor<T> {
677
+ bytes: (value: Uint8Array) => T;
678
+ s3Location: (value: S3Location) => T;
679
+ _: (name: string, value: any) => T;
680
+ }
681
+ const visit: <T>(value: ImageSource, visitor: Visitor<T>) => T;
682
+ }
683
+ /**
684
+ * <p>Image content for an invocation step.</p>
685
+ * @public
686
+ */
687
+ export interface ImageBlock {
688
+ /**
689
+ * <p>The format of the image.</p>
690
+ * @public
691
+ */
692
+ format: ImageFormat | undefined;
693
+ /**
694
+ * <p>The source for the image.</p>
695
+ * @public
696
+ */
697
+ source: ImageSource | undefined;
698
+ }
699
+ /**
700
+ * <p>A block of content that you pass to, or receive from, a Amazon Bedrock session in an invocation step. You pass the content to a session in the <code>payLoad</code> of the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_PutInvocationStep.html">PutInvocationStep</a> API operation. You retrieve the content with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_GetInvocationStep.html">GetInvocationStep</a> API operation.</p> <p>For more information about sessions, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html">Store and retrieve conversation history and context with Amazon Bedrock sessions</a>.</p>
701
+ * @public
702
+ */
703
+ export type BedrockSessionContentBlock = BedrockSessionContentBlock.ImageMember | BedrockSessionContentBlock.TextMember | BedrockSessionContentBlock.$UnknownMember;
704
+ /**
705
+ * @public
706
+ */
707
+ export declare namespace BedrockSessionContentBlock {
708
+ /**
709
+ * <p>The text in the invocation step.</p>
710
+ * @public
711
+ */
712
+ interface TextMember {
713
+ text: string;
714
+ image?: never;
715
+ $unknown?: never;
716
+ }
717
+ /**
718
+ * <p>The image in the invocation step.</p>
719
+ * @public
720
+ */
721
+ interface ImageMember {
722
+ text?: never;
723
+ image: ImageBlock;
724
+ $unknown?: never;
725
+ }
726
+ /**
727
+ * @public
728
+ */
729
+ interface $UnknownMember {
730
+ text?: never;
731
+ image?: never;
732
+ $unknown: [string, any];
733
+ }
734
+ interface Visitor<T> {
735
+ text: (value: string) => T;
736
+ image: (value: ImageBlock) => T;
737
+ _: (name: string, value: any) => T;
738
+ }
739
+ const visit: <T>(value: BedrockSessionContentBlock, visitor: Visitor<T>) => T;
740
+ }
741
+ /**
742
+ * <p>Payload content, such as text and images, for the invocation step.</p>
743
+ * @public
744
+ */
745
+ export type InvocationStepPayload = InvocationStepPayload.ContentBlocksMember | InvocationStepPayload.$UnknownMember;
746
+ /**
747
+ * @public
748
+ */
749
+ export declare namespace InvocationStepPayload {
750
+ /**
751
+ * <p>The content for the invocation step.</p>
752
+ * @public
753
+ */
754
+ interface ContentBlocksMember {
755
+ contentBlocks: BedrockSessionContentBlock[];
756
+ $unknown?: never;
757
+ }
758
+ /**
759
+ * @public
760
+ */
761
+ interface $UnknownMember {
762
+ contentBlocks?: never;
763
+ $unknown: [string, any];
764
+ }
765
+ interface Visitor<T> {
766
+ contentBlocks: (value: BedrockSessionContentBlock[]) => T;
767
+ _: (name: string, value: any) => T;
768
+ }
769
+ const visit: <T>(value: InvocationStepPayload, visitor: Visitor<T>) => T;
770
+ }
771
+ /**
772
+ * <p>Stores fine-grained state checkpoints, including text and images, for each interaction in an invocation in a session. For more information about sessions, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html">Store and retrieve conversation history and context with Amazon Bedrock sessions</a>. </p>
773
+ * @public
774
+ */
775
+ export interface InvocationStep {
776
+ /**
777
+ * <p>The unique identifier of the session containing the invocation step.</p>
778
+ * @public
779
+ */
780
+ sessionId: string | undefined;
781
+ /**
782
+ * <p>The unique identifier (in UUID format) for the invocation that includes the invocation step.</p>
783
+ * @public
784
+ */
785
+ invocationId: string | undefined;
786
+ /**
787
+ * <p>The unique identifier (in UUID format) for the invocation step.</p>
788
+ * @public
789
+ */
790
+ invocationStepId: string | undefined;
791
+ /**
792
+ * <p>The timestamp for when the invocation step was created.</p>
793
+ * @public
794
+ */
795
+ invocationStepTime: Date | undefined;
796
+ /**
797
+ * <p>Payload content, such as text and images, for the invocation step.</p>
798
+ * @public
799
+ */
800
+ payload: InvocationStepPayload | undefined;
801
+ }
802
+ /**
803
+ * @public
804
+ */
805
+ export interface GetInvocationStepResponse {
806
+ /**
807
+ * <p>The complete details of the requested invocation step.</p>
808
+ * @public
809
+ */
810
+ invocationStep: InvocationStep | undefined;
811
+ }
812
+ /**
813
+ * @public
814
+ */
815
+ export interface ListInvocationStepsRequest {
816
+ /**
817
+ * <p>The unique identifier (in UUID format) for the invocation to list invocation steps for.</p>
818
+ * @public
819
+ */
820
+ invocationIdentifier?: string | undefined;
821
+ /**
822
+ * <p>If the total number of results is greater than the <code>maxResults</code> value provided in the request, enter the token returned in the <code>nextToken</code> field in the response in this field to return the next batch of results. </p>
823
+ * @public
824
+ */
825
+ nextToken?: string | undefined;
826
+ /**
827
+ * <p>The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the <code>nextToken</code> field when making another request to return the next batch of results.</p>
828
+ * @public
829
+ */
830
+ maxResults?: number | undefined;
831
+ /**
832
+ * <p>The unique identifier for the session associated with the invocation steps. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
833
+ * @public
834
+ */
835
+ sessionIdentifier: string | undefined;
836
+ }
837
+ /**
838
+ * <p>Contains details about an invocation step within an invocation in a session. For more information about sessions, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html">Store and retrieve conversation history and context with Amazon Bedrock sessions</a>.</p>
839
+ * @public
840
+ */
841
+ export interface InvocationStepSummary {
842
+ /**
843
+ * <p>The unique identifier for the session associated with the invocation step.</p>
844
+ * @public
845
+ */
846
+ sessionId: string | undefined;
847
+ /**
848
+ * <p>A unique identifier for the invocation in UUID format.</p>
849
+ * @public
850
+ */
851
+ invocationId: string | undefined;
852
+ /**
853
+ * <p>The unique identifier (in UUID format) for the invocation step.</p>
854
+ * @public
855
+ */
856
+ invocationStepId: string | undefined;
857
+ /**
858
+ * <p>The timestamp for when the invocation step was created.</p>
859
+ * @public
860
+ */
861
+ invocationStepTime: Date | undefined;
862
+ }
863
+ /**
864
+ * @public
865
+ */
866
+ export interface ListInvocationStepsResponse {
867
+ /**
868
+ * <p>A list of summaries for each invocation step associated with a session and if you specified it, an invocation within the session.</p>
869
+ * @public
870
+ */
871
+ invocationStepSummaries: InvocationStepSummary[] | undefined;
872
+ /**
873
+ * <p>If the total number of results is greater than the <code>maxResults</code> value provided in the request, use this token when making another request in the <code>nextToken</code> field to return the next batch of results.</p>
874
+ * @public
875
+ */
876
+ nextToken?: string | undefined;
877
+ }
878
+ /**
879
+ * @public
880
+ */
881
+ export interface PutInvocationStepRequest {
882
+ /**
883
+ * <p>The unique identifier for the session to add the invocation step to. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
884
+ * @public
885
+ */
886
+ sessionIdentifier: string | undefined;
887
+ /**
888
+ * <p>The unique identifier (in UUID format) of the invocation to add the invocation step to.</p>
889
+ * @public
890
+ */
891
+ invocationIdentifier: string | undefined;
892
+ /**
893
+ * <p>The timestamp for when the invocation step occurred.</p>
894
+ * @public
895
+ */
896
+ invocationStepTime: Date | undefined;
897
+ /**
898
+ * <p>The payload for the invocation step, including text and images for the interaction.</p>
899
+ * @public
900
+ */
901
+ payload: InvocationStepPayload | undefined;
902
+ /**
903
+ * <p>The unique identifier of the invocation step in UUID format.</p>
904
+ * @public
905
+ */
906
+ invocationStepId?: string | undefined;
907
+ }
908
+ /**
909
+ * @public
910
+ */
911
+ export interface PutInvocationStepResponse {
912
+ /**
913
+ * <p>The unique identifier of the invocation step in UUID format.</p>
914
+ * @public
915
+ */
916
+ invocationStepId: string | undefined;
917
+ }
918
+ /**
919
+ * @public
920
+ */
921
+ export interface ListSessionsRequest {
922
+ /**
923
+ * <p>The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the <code>nextToken</code> field when making another request to return the next batch of results.</p>
924
+ * @public
925
+ */
926
+ maxResults?: number | undefined;
927
+ /**
928
+ * <p>If the total number of results is greater than the <code>maxResults</code> value provided in the request, enter the token returned in the <code>nextToken</code> field in the response in this field to return the next batch of results. </p>
929
+ * @public
930
+ */
931
+ nextToken?: string | undefined;
932
+ }
2
933
  /**
3
934
  * <p>Contains details about a session. For more information about sessions, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html">Store and retrieve conversation history and context with Amazon Bedrock sessions</a>.</p>
4
935
  * @public
@@ -939,6 +1870,46 @@ export interface InvokeInlineAgentRequest {
939
1870
  */
940
1871
  customOrchestration?: CustomOrchestration | undefined;
941
1872
  }
1873
+ /**
1874
+ * @internal
1875
+ */
1876
+ export declare const RetrieveAndGenerateStreamResponseOutputFilterSensitiveLog: (obj: RetrieveAndGenerateStreamResponseOutput) => any;
1877
+ /**
1878
+ * @internal
1879
+ */
1880
+ export declare const RetrieveAndGenerateStreamResponseFilterSensitiveLog: (obj: RetrieveAndGenerateStreamResponse) => any;
1881
+ /**
1882
+ * @internal
1883
+ */
1884
+ export declare const KnowledgeBaseQueryFilterSensitiveLog: (obj: KnowledgeBaseQuery) => any;
1885
+ /**
1886
+ * @internal
1887
+ */
1888
+ export declare const KnowledgeBaseRetrievalResultFilterSensitiveLog: (obj: KnowledgeBaseRetrievalResult) => any;
1889
+ /**
1890
+ * @internal
1891
+ */
1892
+ export declare const RetrieveResponseFilterSensitiveLog: (obj: RetrieveResponse) => any;
1893
+ /**
1894
+ * @internal
1895
+ */
1896
+ export declare const BedrockSessionContentBlockFilterSensitiveLog: (obj: BedrockSessionContentBlock) => any;
1897
+ /**
1898
+ * @internal
1899
+ */
1900
+ export declare const InvocationStepPayloadFilterSensitiveLog: (obj: InvocationStepPayload) => any;
1901
+ /**
1902
+ * @internal
1903
+ */
1904
+ export declare const InvocationStepFilterSensitiveLog: (obj: InvocationStep) => any;
1905
+ /**
1906
+ * @internal
1907
+ */
1908
+ export declare const GetInvocationStepResponseFilterSensitiveLog: (obj: GetInvocationStepResponse) => any;
1909
+ /**
1910
+ * @internal
1911
+ */
1912
+ export declare const PutInvocationStepRequestFilterSensitiveLog: (obj: PutInvocationStepRequest) => any;
942
1913
  /**
943
1914
  * @internal
944
1915
  */