@aws-sdk/client-bedrock-agent-runtime 3.731.1 → 3.733.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -76,6 +76,8 @@ __export(src_exports, {
76
76
  FlowInputContent: () => FlowInputContent,
77
77
  FlowInputContentFilterSensitiveLog: () => FlowInputContentFilterSensitiveLog,
78
78
  FlowInputFilterSensitiveLog: () => FlowInputFilterSensitiveLog,
79
+ FlowMultiTurnInputContent: () => FlowMultiTurnInputContent,
80
+ FlowMultiTurnInputRequestEventFilterSensitiveLog: () => FlowMultiTurnInputRequestEventFilterSensitiveLog,
79
81
  FlowOutputContent: () => FlowOutputContent,
80
82
  FlowOutputEventFilterSensitiveLog: () => FlowOutputEventFilterSensitiveLog,
81
83
  FlowResponseStream: () => FlowResponseStream,
@@ -660,16 +662,17 @@ var PerformanceConfigLatency = {
660
662
  STANDARD: "standard"
661
663
  };
662
664
  var FlowCompletionReason = {
665
+ INPUT_REQUIRED: "INPUT_REQUIRED",
663
666
  SUCCESS: "SUCCESS"
664
667
  };
665
- var FlowOutputContent;
666
- ((FlowOutputContent3) => {
667
- FlowOutputContent3.visit = /* @__PURE__ */ __name((value, visitor) => {
668
+ var FlowMultiTurnInputContent;
669
+ ((FlowMultiTurnInputContent3) => {
670
+ FlowMultiTurnInputContent3.visit = /* @__PURE__ */ __name((value, visitor) => {
668
671
  if (value.document !== void 0)
669
672
  return visitor.document(value.document);
670
673
  return visitor._(value.$unknown[0], value.$unknown[1]);
671
674
  }, "visit");
672
- })(FlowOutputContent || (FlowOutputContent = {}));
675
+ })(FlowMultiTurnInputContent || (FlowMultiTurnInputContent = {}));
673
676
  var NodeType = {
674
677
  CONDITION_NODE: "ConditionNode",
675
678
  FLOW_INPUT_NODE: "FlowInputNode",
@@ -679,6 +682,14 @@ var NodeType = {
679
682
  LEX_NODE: "LexNode",
680
683
  PROMPT_NODE: "PromptNode"
681
684
  };
685
+ var FlowOutputContent;
686
+ ((FlowOutputContent3) => {
687
+ FlowOutputContent3.visit = /* @__PURE__ */ __name((value, visitor) => {
688
+ if (value.document !== void 0)
689
+ return visitor.document(value.document);
690
+ return visitor._(value.$unknown[0], value.$unknown[1]);
691
+ }, "visit");
692
+ })(FlowOutputContent || (FlowOutputContent = {}));
682
693
  var FlowTraceNodeInputContent;
683
694
  ((FlowTraceNodeInputContent3) => {
684
695
  FlowTraceNodeInputContent3.visit = /* @__PURE__ */ __name((value, visitor) => {
@@ -806,6 +817,8 @@ var FlowResponseStream;
806
817
  return visitor.dependencyFailedException(value.dependencyFailedException);
807
818
  if (value.badGatewayException !== void 0)
808
819
  return visitor.badGatewayException(value.badGatewayException);
820
+ if (value.flowMultiTurnInputRequestEvent !== void 0)
821
+ return visitor.flowMultiTurnInputRequestEvent(value.flowMultiTurnInputRequestEvent);
809
822
  return visitor._(value.$unknown[0], value.$unknown[1]);
810
823
  }, "visit");
811
824
  })(FlowResponseStream || (FlowResponseStream = {}));
@@ -1414,6 +1427,10 @@ var InvokeFlowRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1414
1427
  var FlowCompletionEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1415
1428
  ...obj
1416
1429
  }), "FlowCompletionEventFilterSensitiveLog");
1430
+ var FlowMultiTurnInputRequestEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1431
+ ...obj,
1432
+ ...obj.content && { content: obj.content }
1433
+ }), "FlowMultiTurnInputRequestEventFilterSensitiveLog");
1417
1434
  var FlowOutputEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1418
1435
  ...obj,
1419
1436
  ...obj.content && { content: obj.content }
@@ -1486,6 +1503,8 @@ var FlowResponseStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
1486
1503
  return { dependencyFailedException: obj.dependencyFailedException };
1487
1504
  if (obj.badGatewayException !== void 0)
1488
1505
  return { badGatewayException: obj.badGatewayException };
1506
+ if (obj.flowMultiTurnInputRequestEvent !== void 0)
1507
+ return { flowMultiTurnInputRequestEvent: import_smithy_client.SENSITIVE_STRING };
1489
1508
  if (obj.$unknown !== void 0)
1490
1509
  return { [obj.$unknown[0]]: "UNKNOWN" };
1491
1510
  }, "FlowResponseStreamFilterSensitiveLog");
@@ -2349,6 +2368,7 @@ var se_InvokeFlowCommand = /* @__PURE__ */ __name(async (input, context) => {
2349
2368
  body = JSON.stringify(
2350
2369
  (0, import_smithy_client.take)(input, {
2351
2370
  enableTrace: [],
2371
+ executionId: [],
2352
2372
  inputs: (_) => se_FlowInputs(_, context),
2353
2373
  modelPerformanceConfiguration: (_) => (0, import_smithy_client._json)(_)
2354
2374
  })
@@ -2532,7 +2552,8 @@ var de_InvokeFlowCommand = /* @__PURE__ */ __name(async (output, context) => {
2532
2552
  return de_CommandError(output, context);
2533
2553
  }
2534
2554
  const contents = (0, import_smithy_client.map)({
2535
- $metadata: deserializeMetadata(output)
2555
+ $metadata: deserializeMetadata(output),
2556
+ [_eI]: [, output.headers[_xabfei]]
2536
2557
  });
2537
2558
  const data = output.body;
2538
2559
  contents.responseStream = de_FlowResponseStream(data, context);
@@ -2872,6 +2893,14 @@ var de_FlowResponseStream = /* @__PURE__ */ __name((output, context) => {
2872
2893
  badGatewayException: await de_BadGatewayException_event(event["badGatewayException"], context)
2873
2894
  };
2874
2895
  }
2896
+ if (event["flowMultiTurnInputRequestEvent"] != null) {
2897
+ return {
2898
+ flowMultiTurnInputRequestEvent: await de_FlowMultiTurnInputRequestEvent_event(
2899
+ event["flowMultiTurnInputRequestEvent"],
2900
+ context
2901
+ )
2902
+ };
2903
+ }
2875
2904
  return { $unknown: output };
2876
2905
  });
2877
2906
  }, "de_FlowResponseStream");
@@ -3212,6 +3241,12 @@ var de_FlowCompletionEvent_event = /* @__PURE__ */ __name(async (output, context
3212
3241
  Object.assign(contents, (0, import_smithy_client._json)(data));
3213
3242
  return contents;
3214
3243
  }, "de_FlowCompletionEvent_event");
3244
+ var de_FlowMultiTurnInputRequestEvent_event = /* @__PURE__ */ __name(async (output, context) => {
3245
+ const contents = {};
3246
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
3247
+ Object.assign(contents, de_FlowMultiTurnInputRequestEvent(data, context));
3248
+ return contents;
3249
+ }, "de_FlowMultiTurnInputRequestEvent_event");
3215
3250
  var de_FlowOutputEvent_event = /* @__PURE__ */ __name(async (output, context) => {
3216
3251
  const contents = {};
3217
3252
  const data = await (0, import_core2.parseJsonBody)(output.body, context);
@@ -3410,6 +3445,7 @@ var se_FilterValue = /* @__PURE__ */ __name((input, context) => {
3410
3445
  var se_FlowInput = /* @__PURE__ */ __name((input, context) => {
3411
3446
  return (0, import_smithy_client.take)(input, {
3412
3447
  content: (_) => se_FlowInputContent(_, context),
3448
+ nodeInputName: [],
3413
3449
  nodeName: [],
3414
3450
  nodeOutputName: []
3415
3451
  });
@@ -3674,6 +3710,21 @@ var de_FilePart = /* @__PURE__ */ __name((output, context) => {
3674
3710
  files: (_) => de_OutputFiles(_, context)
3675
3711
  });
3676
3712
  }, "de_FilePart");
3713
+ var de_FlowMultiTurnInputContent = /* @__PURE__ */ __name((output, context) => {
3714
+ if (output.document != null) {
3715
+ return {
3716
+ document: de_Document(output.document, context)
3717
+ };
3718
+ }
3719
+ return { $unknown: Object.entries(output)[0] };
3720
+ }, "de_FlowMultiTurnInputContent");
3721
+ var de_FlowMultiTurnInputRequestEvent = /* @__PURE__ */ __name((output, context) => {
3722
+ return (0, import_smithy_client.take)(output, {
3723
+ content: (_) => de_FlowMultiTurnInputContent((0, import_core2.awsExpectUnion)(_), context),
3724
+ nodeName: import_smithy_client.expectString,
3725
+ nodeType: import_smithy_client.expectString
3726
+ });
3727
+ }, "de_FlowMultiTurnInputRequestEvent");
3677
3728
  var de_FlowOutputContent = /* @__PURE__ */ __name((output, context) => {
3678
3729
  if (output.document != null) {
3679
3730
  return {
@@ -4065,6 +4116,7 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
4065
4116
  cfId: output.headers["x-amz-cf-id"]
4066
4117
  }), "deserializeMetadata");
4067
4118
  var _cT = "contentType";
4119
+ var _eI = "executionId";
4068
4120
  var _mI = "memoryId";
4069
4121
  var _mIa = "maxItems";
4070
4122
  var _mT = "memoryType";
@@ -4074,6 +4126,7 @@ var _sI = "sessionId";
4074
4126
  var _xabact = "x-amzn-bedrock-agent-content-type";
4075
4127
  var _xabami = "x-amz-bedrock-agent-memory-id";
4076
4128
  var _xabasi = "x-amz-bedrock-agent-session-id";
4129
+ var _xabfei = "x-amz-bedrock-flow-execution-id";
4077
4130
  var _xabkbsi = "x-amzn-bedrock-knowledge-base-session-id";
4078
4131
  var _xasa = "x-amz-source-arn";
4079
4132
 
@@ -4350,8 +4403,9 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
4350
4403
  FlowInputContent,
4351
4404
  PerformanceConfigLatency,
4352
4405
  FlowCompletionReason,
4353
- FlowOutputContent,
4406
+ FlowMultiTurnInputContent,
4354
4407
  NodeType,
4408
+ FlowOutputContent,
4355
4409
  FlowTraceNodeInputContent,
4356
4410
  FlowTraceNodeOutputContent,
4357
4411
  FlowTrace,
@@ -4437,6 +4491,7 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
4437
4491
  FlowInputFilterSensitiveLog,
4438
4492
  InvokeFlowRequestFilterSensitiveLog,
4439
4493
  FlowCompletionEventFilterSensitiveLog,
4494
+ FlowMultiTurnInputRequestEventFilterSensitiveLog,
4440
4495
  FlowOutputEventFilterSensitiveLog,
4441
4496
  FlowTraceConditionFilterSensitiveLog,
4442
4497
  FlowTraceConditionNodeResultEventFilterSensitiveLog,
@@ -164,16 +164,17 @@ export const PerformanceConfigLatency = {
164
164
  STANDARD: "standard",
165
165
  };
166
166
  export const FlowCompletionReason = {
167
+ INPUT_REQUIRED: "INPUT_REQUIRED",
167
168
  SUCCESS: "SUCCESS",
168
169
  };
169
- export var FlowOutputContent;
170
- (function (FlowOutputContent) {
171
- FlowOutputContent.visit = (value, visitor) => {
170
+ export var FlowMultiTurnInputContent;
171
+ (function (FlowMultiTurnInputContent) {
172
+ FlowMultiTurnInputContent.visit = (value, visitor) => {
172
173
  if (value.document !== undefined)
173
174
  return visitor.document(value.document);
174
175
  return visitor._(value.$unknown[0], value.$unknown[1]);
175
176
  };
176
- })(FlowOutputContent || (FlowOutputContent = {}));
177
+ })(FlowMultiTurnInputContent || (FlowMultiTurnInputContent = {}));
177
178
  export const NodeType = {
178
179
  CONDITION_NODE: "ConditionNode",
179
180
  FLOW_INPUT_NODE: "FlowInputNode",
@@ -183,6 +184,14 @@ export const NodeType = {
183
184
  LEX_NODE: "LexNode",
184
185
  PROMPT_NODE: "PromptNode",
185
186
  };
187
+ export var FlowOutputContent;
188
+ (function (FlowOutputContent) {
189
+ FlowOutputContent.visit = (value, visitor) => {
190
+ if (value.document !== undefined)
191
+ return visitor.document(value.document);
192
+ return visitor._(value.$unknown[0], value.$unknown[1]);
193
+ };
194
+ })(FlowOutputContent || (FlowOutputContent = {}));
186
195
  export var FlowTraceNodeInputContent;
187
196
  (function (FlowTraceNodeInputContent) {
188
197
  FlowTraceNodeInputContent.visit = (value, visitor) => {
@@ -286,6 +295,8 @@ export var FlowResponseStream;
286
295
  return visitor.dependencyFailedException(value.dependencyFailedException);
287
296
  if (value.badGatewayException !== undefined)
288
297
  return visitor.badGatewayException(value.badGatewayException);
298
+ if (value.flowMultiTurnInputRequestEvent !== undefined)
299
+ return visitor.flowMultiTurnInputRequestEvent(value.flowMultiTurnInputRequestEvent);
289
300
  return visitor._(value.$unknown[0], value.$unknown[1]);
290
301
  };
291
302
  })(FlowResponseStream || (FlowResponseStream = {}));
@@ -886,6 +897,10 @@ export const InvokeFlowRequestFilterSensitiveLog = (obj) => ({
886
897
  export const FlowCompletionEventFilterSensitiveLog = (obj) => ({
887
898
  ...obj,
888
899
  });
900
+ export const FlowMultiTurnInputRequestEventFilterSensitiveLog = (obj) => ({
901
+ ...obj,
902
+ ...(obj.content && { content: obj.content }),
903
+ });
889
904
  export const FlowOutputEventFilterSensitiveLog = (obj) => ({
890
905
  ...obj,
891
906
  ...(obj.content && { content: obj.content }),
@@ -958,6 +973,8 @@ export const FlowResponseStreamFilterSensitiveLog = (obj) => {
958
973
  return { dependencyFailedException: obj.dependencyFailedException };
959
974
  if (obj.badGatewayException !== undefined)
960
975
  return { badGatewayException: obj.badGatewayException };
976
+ if (obj.flowMultiTurnInputRequestEvent !== undefined)
977
+ return { flowMultiTurnInputRequestEvent: SENSITIVE_STRING };
961
978
  if (obj.$unknown !== undefined)
962
979
  return { [obj.$unknown[0]]: "UNKNOWN" };
963
980
  };
@@ -81,6 +81,7 @@ export const se_InvokeFlowCommand = async (input, context) => {
81
81
  let body;
82
82
  body = JSON.stringify(take(input, {
83
83
  enableTrace: [],
84
+ executionId: [],
84
85
  inputs: (_) => se_FlowInputs(_, context),
85
86
  modelPerformanceConfiguration: (_) => _json(_),
86
87
  }));
@@ -252,6 +253,7 @@ export const de_InvokeFlowCommand = async (output, context) => {
252
253
  }
253
254
  const contents = map({
254
255
  $metadata: deserializeMetadata(output),
256
+ [_eI]: [, output.headers[_xabfei]],
255
257
  });
256
258
  const data = output.body;
257
259
  contents.responseStream = de_FlowResponseStream(data, context);
@@ -582,6 +584,11 @@ const de_FlowResponseStream = (output, context) => {
582
584
  badGatewayException: await de_BadGatewayException_event(event["badGatewayException"], context),
583
585
  };
584
586
  }
587
+ if (event["flowMultiTurnInputRequestEvent"] != null) {
588
+ return {
589
+ flowMultiTurnInputRequestEvent: await de_FlowMultiTurnInputRequestEvent_event(event["flowMultiTurnInputRequestEvent"], context),
590
+ };
591
+ }
585
592
  return { $unknown: output };
586
593
  });
587
594
  };
@@ -892,6 +899,12 @@ const de_FlowCompletionEvent_event = async (output, context) => {
892
899
  Object.assign(contents, _json(data));
893
900
  return contents;
894
901
  };
902
+ const de_FlowMultiTurnInputRequestEvent_event = async (output, context) => {
903
+ const contents = {};
904
+ const data = await parseBody(output.body, context);
905
+ Object.assign(contents, de_FlowMultiTurnInputRequestEvent(data, context));
906
+ return contents;
907
+ };
895
908
  const de_FlowOutputEvent_event = async (output, context) => {
896
909
  const contents = {};
897
910
  const data = await parseBody(output.body, context);
@@ -1092,6 +1105,7 @@ const se_FilterValue = (input, context) => {
1092
1105
  const se_FlowInput = (input, context) => {
1093
1106
  return take(input, {
1094
1107
  content: (_) => se_FlowInputContent(_, context),
1108
+ nodeInputName: [],
1095
1109
  nodeName: [],
1096
1110
  nodeOutputName: [],
1097
1111
  });
@@ -1372,6 +1386,21 @@ const de_FilePart = (output, context) => {
1372
1386
  files: (_) => de_OutputFiles(_, context),
1373
1387
  });
1374
1388
  };
1389
+ const de_FlowMultiTurnInputContent = (output, context) => {
1390
+ if (output.document != null) {
1391
+ return {
1392
+ document: de_Document(output.document, context),
1393
+ };
1394
+ }
1395
+ return { $unknown: Object.entries(output)[0] };
1396
+ };
1397
+ const de_FlowMultiTurnInputRequestEvent = (output, context) => {
1398
+ return take(output, {
1399
+ content: (_) => de_FlowMultiTurnInputContent(__expectUnion(_), context),
1400
+ nodeName: __expectString,
1401
+ nodeType: __expectString,
1402
+ });
1403
+ };
1375
1404
  const de_FlowOutputContent = (output, context) => {
1376
1405
  if (output.document != null) {
1377
1406
  return {
@@ -1778,6 +1807,7 @@ const deserializeMetadata = (output) => ({
1778
1807
  });
1779
1808
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1780
1809
  const _cT = "contentType";
1810
+ const _eI = "executionId";
1781
1811
  const _mI = "memoryId";
1782
1812
  const _mIa = "maxItems";
1783
1813
  const _mT = "memoryType";
@@ -1787,5 +1817,6 @@ const _sI = "sessionId";
1787
1817
  const _xabact = "x-amzn-bedrock-agent-content-type";
1788
1818
  const _xabami = "x-amz-bedrock-agent-memory-id";
1789
1819
  const _xabasi = "x-amz-bedrock-agent-session-id";
1820
+ const _xabfei = "x-amz-bedrock-flow-execution-id";
1790
1821
  const _xabkbsi = "x-amzn-bedrock-knowledge-base-session-id";
1791
1822
  const _xasa = "x-amz-source-arn";
@@ -43,10 +43,11 @@ declare const InvokeFlowCommand_base: {
43
43
  * inputs: [ // FlowInputs // required
44
44
  * { // FlowInput
45
45
  * nodeName: "STRING_VALUE", // required
46
- * nodeOutputName: "STRING_VALUE", // required
46
+ * nodeOutputName: "STRING_VALUE",
47
47
  * content: { // FlowInputContent Union: only one key present
48
48
  * document: "DOCUMENT_VALUE",
49
49
  * },
50
+ * nodeInputName: "STRING_VALUE",
50
51
  * },
51
52
  * ],
52
53
  * enableTrace: true || false,
@@ -55,6 +56,7 @@ declare const InvokeFlowCommand_base: {
55
56
  * latency: "standard" || "optimized",
56
57
  * },
57
58
  * },
59
+ * executionId: "STRING_VALUE",
58
60
  * };
59
61
  * const command = new InvokeFlowCommand(input);
60
62
  * const response = await client.send(command);
@@ -68,7 +70,7 @@ declare const InvokeFlowCommand_base: {
68
70
  * // },
69
71
  * // },
70
72
  * // flowCompletionEvent: { // FlowCompletionEvent
71
- * // completionReason: "SUCCESS", // required
73
+ * // completionReason: "SUCCESS" || "INPUT_REQUIRED", // required
72
74
  * // },
73
75
  * // flowTraceEvent: { // FlowTraceEvent
74
76
  * // trace: { // FlowTrace Union: only one key present
@@ -136,7 +138,15 @@ declare const InvokeFlowCommand_base: {
136
138
  * // message: "STRING_VALUE",
137
139
  * // resourceName: "STRING_VALUE",
138
140
  * // },
141
+ * // flowMultiTurnInputRequestEvent: { // FlowMultiTurnInputRequestEvent
142
+ * // nodeName: "STRING_VALUE", // required
143
+ * // nodeType: "FlowInputNode" || "FlowOutputNode" || "LambdaFunctionNode" || "KnowledgeBaseNode" || "PromptNode" || "ConditionNode" || "LexNode", // required
144
+ * // content: { // FlowMultiTurnInputContent Union: only one key present
145
+ * // document: "DOCUMENT_VALUE",
146
+ * // },
147
+ * // },
139
148
  * // },
149
+ * // executionId: "STRING_VALUE",
140
150
  * // };
141
151
  *
142
152
  * ```
@@ -1111,12 +1111,17 @@ export interface FlowInput {
1111
1111
  * <p>The name of the output from the flow input node that begins the prompt flow.</p>
1112
1112
  * @public
1113
1113
  */
1114
- nodeOutputName: string | undefined;
1114
+ nodeOutputName?: string | undefined;
1115
1115
  /**
1116
1116
  * <p>Contains information about an input into the prompt flow.</p>
1117
1117
  * @public
1118
1118
  */
1119
1119
  content: FlowInputContent | undefined;
1120
+ /**
1121
+ * <p>The name of the input from the flow input node.</p>
1122
+ * @public
1123
+ */
1124
+ nodeInputName?: string | undefined;
1120
1125
  }
1121
1126
  /**
1122
1127
  * @public
@@ -1181,12 +1186,18 @@ export interface InvokeFlowRequest {
1181
1186
  * @public
1182
1187
  */
1183
1188
  modelPerformanceConfiguration?: ModelPerformanceConfiguration | undefined;
1189
+ /**
1190
+ * <p>The unique identifier for the current flow execution. If you don't provide a value, Amazon Bedrock creates the identifier for you. </p>
1191
+ * @public
1192
+ */
1193
+ executionId?: string | undefined;
1184
1194
  }
1185
1195
  /**
1186
1196
  * @public
1187
1197
  * @enum
1188
1198
  */
1189
1199
  export declare const FlowCompletionReason: {
1200
+ readonly INPUT_REQUIRED: "INPUT_REQUIRED";
1190
1201
  readonly SUCCESS: "SUCCESS";
1191
1202
  };
1192
1203
  /**
@@ -1205,16 +1216,16 @@ export interface FlowCompletionEvent {
1205
1216
  completionReason: FlowCompletionReason | undefined;
1206
1217
  }
1207
1218
  /**
1208
- * <p>Contains information about the content in an output from prompt flow invocation.</p>
1219
+ * <p>The content structure containing input information for multi-turn flow interactions.</p>
1209
1220
  * @public
1210
1221
  */
1211
- export type FlowOutputContent = FlowOutputContent.DocumentMember | FlowOutputContent.$UnknownMember;
1222
+ export type FlowMultiTurnInputContent = FlowMultiTurnInputContent.DocumentMember | FlowMultiTurnInputContent.$UnknownMember;
1212
1223
  /**
1213
1224
  * @public
1214
1225
  */
1215
- export declare namespace FlowOutputContent {
1226
+ export declare namespace FlowMultiTurnInputContent {
1216
1227
  /**
1217
- * <p>The content in the output.</p>
1228
+ * <p>The requested additional input to send back to the multi-turn flow node.</p>
1218
1229
  * @public
1219
1230
  */
1220
1231
  interface DocumentMember {
@@ -1232,7 +1243,7 @@ export declare namespace FlowOutputContent {
1232
1243
  document: (value: __DocumentType) => T;
1233
1244
  _: (name: string, value: any) => T;
1234
1245
  }
1235
- const visit: <T>(value: FlowOutputContent, visitor: Visitor<T>) => T;
1246
+ const visit: <T>(value: FlowMultiTurnInputContent, visitor: Visitor<T>) => T;
1236
1247
  }
1237
1248
  /**
1238
1249
  * @public
@@ -1251,6 +1262,57 @@ export declare const NodeType: {
1251
1262
  * @public
1252
1263
  */
1253
1264
  export type NodeType = (typeof NodeType)[keyof typeof NodeType];
1265
+ /**
1266
+ * <p>Response object from the flow multi-turn node requesting additional information.</p>
1267
+ * @public
1268
+ */
1269
+ export interface FlowMultiTurnInputRequestEvent {
1270
+ /**
1271
+ * <p>The name of the node in the flow that is requesting the input.</p>
1272
+ * @public
1273
+ */
1274
+ nodeName: string | undefined;
1275
+ /**
1276
+ * <p>The type of the node in the flow that is requesting the input.</p>
1277
+ * @public
1278
+ */
1279
+ nodeType: NodeType | undefined;
1280
+ /**
1281
+ * <p>The content payload containing the input request details for the multi-turn interaction.</p>
1282
+ * @public
1283
+ */
1284
+ content: FlowMultiTurnInputContent | undefined;
1285
+ }
1286
+ /**
1287
+ * <p>Contains information about the content in an output from prompt flow invocation.</p>
1288
+ * @public
1289
+ */
1290
+ export type FlowOutputContent = FlowOutputContent.DocumentMember | FlowOutputContent.$UnknownMember;
1291
+ /**
1292
+ * @public
1293
+ */
1294
+ export declare namespace FlowOutputContent {
1295
+ /**
1296
+ * <p>The content in the output.</p>
1297
+ * @public
1298
+ */
1299
+ interface DocumentMember {
1300
+ document: __DocumentType;
1301
+ $unknown?: never;
1302
+ }
1303
+ /**
1304
+ * @public
1305
+ */
1306
+ interface $UnknownMember {
1307
+ document?: never;
1308
+ $unknown: [string, any];
1309
+ }
1310
+ interface Visitor<T> {
1311
+ document: (value: __DocumentType) => T;
1312
+ _: (name: string, value: any) => T;
1313
+ }
1314
+ const visit: <T>(value: FlowOutputContent, visitor: Visitor<T>) => T;
1315
+ }
1254
1316
  /**
1255
1317
  * <p>Contains information about an output from prompt flow invoction.</p>
1256
1318
  * @public
@@ -1557,7 +1619,7 @@ export declare class ValidationException extends __BaseException {
1557
1619
  * <p>The output of the flow.</p>
1558
1620
  * @public
1559
1621
  */
1560
- export type FlowResponseStream = FlowResponseStream.AccessDeniedExceptionMember | FlowResponseStream.BadGatewayExceptionMember | FlowResponseStream.ConflictExceptionMember | FlowResponseStream.DependencyFailedExceptionMember | FlowResponseStream.FlowCompletionEventMember | FlowResponseStream.FlowOutputEventMember | FlowResponseStream.FlowTraceEventMember | FlowResponseStream.InternalServerExceptionMember | FlowResponseStream.ResourceNotFoundExceptionMember | FlowResponseStream.ServiceQuotaExceededExceptionMember | FlowResponseStream.ThrottlingExceptionMember | FlowResponseStream.ValidationExceptionMember | FlowResponseStream.$UnknownMember;
1622
+ export type FlowResponseStream = FlowResponseStream.AccessDeniedExceptionMember | FlowResponseStream.BadGatewayExceptionMember | FlowResponseStream.ConflictExceptionMember | FlowResponseStream.DependencyFailedExceptionMember | FlowResponseStream.FlowCompletionEventMember | FlowResponseStream.FlowMultiTurnInputRequestEventMember | FlowResponseStream.FlowOutputEventMember | FlowResponseStream.FlowTraceEventMember | FlowResponseStream.InternalServerExceptionMember | FlowResponseStream.ResourceNotFoundExceptionMember | FlowResponseStream.ServiceQuotaExceededExceptionMember | FlowResponseStream.ThrottlingExceptionMember | FlowResponseStream.ValidationExceptionMember | FlowResponseStream.$UnknownMember;
1561
1623
  /**
1562
1624
  * @public
1563
1625
  */
@@ -1579,6 +1641,7 @@ export declare namespace FlowResponseStream {
1579
1641
  conflictException?: never;
1580
1642
  dependencyFailedException?: never;
1581
1643
  badGatewayException?: never;
1644
+ flowMultiTurnInputRequestEvent?: never;
1582
1645
  $unknown?: never;
1583
1646
  }
1584
1647
  /**
@@ -1598,6 +1661,7 @@ export declare namespace FlowResponseStream {
1598
1661
  conflictException?: never;
1599
1662
  dependencyFailedException?: never;
1600
1663
  badGatewayException?: never;
1664
+ flowMultiTurnInputRequestEvent?: never;
1601
1665
  $unknown?: never;
1602
1666
  }
1603
1667
  /**
@@ -1617,6 +1681,7 @@ export declare namespace FlowResponseStream {
1617
1681
  conflictException?: never;
1618
1682
  dependencyFailedException?: never;
1619
1683
  badGatewayException?: never;
1684
+ flowMultiTurnInputRequestEvent?: never;
1620
1685
  $unknown?: never;
1621
1686
  }
1622
1687
  /**
@@ -1636,6 +1701,7 @@ export declare namespace FlowResponseStream {
1636
1701
  conflictException?: never;
1637
1702
  dependencyFailedException?: never;
1638
1703
  badGatewayException?: never;
1704
+ flowMultiTurnInputRequestEvent?: never;
1639
1705
  $unknown?: never;
1640
1706
  }
1641
1707
  /**
@@ -1655,6 +1721,7 @@ export declare namespace FlowResponseStream {
1655
1721
  conflictException?: never;
1656
1722
  dependencyFailedException?: never;
1657
1723
  badGatewayException?: never;
1724
+ flowMultiTurnInputRequestEvent?: never;
1658
1725
  $unknown?: never;
1659
1726
  }
1660
1727
  /**
@@ -1674,6 +1741,7 @@ export declare namespace FlowResponseStream {
1674
1741
  conflictException?: never;
1675
1742
  dependencyFailedException?: never;
1676
1743
  badGatewayException?: never;
1744
+ flowMultiTurnInputRequestEvent?: never;
1677
1745
  $unknown?: never;
1678
1746
  }
1679
1747
  /**
@@ -1693,6 +1761,7 @@ export declare namespace FlowResponseStream {
1693
1761
  conflictException?: never;
1694
1762
  dependencyFailedException?: never;
1695
1763
  badGatewayException?: never;
1764
+ flowMultiTurnInputRequestEvent?: never;
1696
1765
  $unknown?: never;
1697
1766
  }
1698
1767
  /**
@@ -1712,6 +1781,7 @@ export declare namespace FlowResponseStream {
1712
1781
  conflictException?: never;
1713
1782
  dependencyFailedException?: never;
1714
1783
  badGatewayException?: never;
1784
+ flowMultiTurnInputRequestEvent?: never;
1715
1785
  $unknown?: never;
1716
1786
  }
1717
1787
  /**
@@ -1731,6 +1801,7 @@ export declare namespace FlowResponseStream {
1731
1801
  conflictException?: never;
1732
1802
  dependencyFailedException?: never;
1733
1803
  badGatewayException?: never;
1804
+ flowMultiTurnInputRequestEvent?: never;
1734
1805
  $unknown?: never;
1735
1806
  }
1736
1807
  /**
@@ -1750,6 +1821,7 @@ export declare namespace FlowResponseStream {
1750
1821
  conflictException: ConflictException;
1751
1822
  dependencyFailedException?: never;
1752
1823
  badGatewayException?: never;
1824
+ flowMultiTurnInputRequestEvent?: never;
1753
1825
  $unknown?: never;
1754
1826
  }
1755
1827
  /**
@@ -1769,6 +1841,7 @@ export declare namespace FlowResponseStream {
1769
1841
  conflictException?: never;
1770
1842
  dependencyFailedException: DependencyFailedException;
1771
1843
  badGatewayException?: never;
1844
+ flowMultiTurnInputRequestEvent?: never;
1772
1845
  $unknown?: never;
1773
1846
  }
1774
1847
  /**
@@ -1788,6 +1861,27 @@ export declare namespace FlowResponseStream {
1788
1861
  conflictException?: never;
1789
1862
  dependencyFailedException?: never;
1790
1863
  badGatewayException: BadGatewayException;
1864
+ flowMultiTurnInputRequestEvent?: never;
1865
+ $unknown?: never;
1866
+ }
1867
+ /**
1868
+ * <p>The event stream containing the multi-turn input request information from the flow.</p>
1869
+ * @public
1870
+ */
1871
+ interface FlowMultiTurnInputRequestEventMember {
1872
+ flowOutputEvent?: never;
1873
+ flowCompletionEvent?: never;
1874
+ flowTraceEvent?: never;
1875
+ internalServerException?: never;
1876
+ validationException?: never;
1877
+ resourceNotFoundException?: never;
1878
+ serviceQuotaExceededException?: never;
1879
+ throttlingException?: never;
1880
+ accessDeniedException?: never;
1881
+ conflictException?: never;
1882
+ dependencyFailedException?: never;
1883
+ badGatewayException?: never;
1884
+ flowMultiTurnInputRequestEvent: FlowMultiTurnInputRequestEvent;
1791
1885
  $unknown?: never;
1792
1886
  }
1793
1887
  /**
@@ -1806,6 +1900,7 @@ export declare namespace FlowResponseStream {
1806
1900
  conflictException?: never;
1807
1901
  dependencyFailedException?: never;
1808
1902
  badGatewayException?: never;
1903
+ flowMultiTurnInputRequestEvent?: never;
1809
1904
  $unknown: [string, any];
1810
1905
  }
1811
1906
  interface Visitor<T> {
@@ -1821,6 +1916,7 @@ export declare namespace FlowResponseStream {
1821
1916
  conflictException: (value: ConflictException) => T;
1822
1917
  dependencyFailedException: (value: DependencyFailedException) => T;
1823
1918
  badGatewayException: (value: BadGatewayException) => T;
1919
+ flowMultiTurnInputRequestEvent: (value: FlowMultiTurnInputRequestEvent) => T;
1824
1920
  _: (name: string, value: any) => T;
1825
1921
  }
1826
1922
  const visit: <T>(value: FlowResponseStream, visitor: Visitor<T>) => T;
@@ -1834,6 +1930,11 @@ export interface InvokeFlowResponse {
1834
1930
  * @public
1835
1931
  */
1836
1932
  responseStream: AsyncIterable<FlowResponseStream> | undefined;
1933
+ /**
1934
+ * <p>The unique identifier for the current flow execution.</p>
1935
+ * @public
1936
+ */
1937
+ executionId?: string | undefined;
1837
1938
  }
1838
1939
  /**
1839
1940
  * @public
@@ -7708,6 +7809,10 @@ export declare const InvokeFlowRequestFilterSensitiveLog: (obj: InvokeFlowReques
7708
7809
  * @internal
7709
7810
  */
7710
7811
  export declare const FlowCompletionEventFilterSensitiveLog: (obj: FlowCompletionEvent) => any;
7812
+ /**
7813
+ * @internal
7814
+ */
7815
+ export declare const FlowMultiTurnInputRequestEventFilterSensitiveLog: (obj: FlowMultiTurnInputRequestEvent) => any;
7711
7816
  /**
7712
7817
  * @internal
7713
7818
  */
@@ -362,8 +362,9 @@ export declare namespace FlowInputContent {
362
362
  }
363
363
  export interface FlowInput {
364
364
  nodeName: string | undefined;
365
- nodeOutputName: string | undefined;
365
+ nodeOutputName?: string | undefined;
366
366
  content: FlowInputContent | undefined;
367
+ nodeInputName?: string | undefined;
367
368
  }
368
369
  export declare const PerformanceConfigLatency: {
369
370
  readonly OPTIMIZED: "optimized";
@@ -383,8 +384,10 @@ export interface InvokeFlowRequest {
383
384
  inputs: FlowInput[] | undefined;
384
385
  enableTrace?: boolean | undefined;
385
386
  modelPerformanceConfiguration?: ModelPerformanceConfiguration | undefined;
387
+ executionId?: string | undefined;
386
388
  }
387
389
  export declare const FlowCompletionReason: {
390
+ readonly INPUT_REQUIRED: "INPUT_REQUIRED";
388
391
  readonly SUCCESS: "SUCCESS";
389
392
  };
390
393
  export type FlowCompletionReason =
@@ -392,10 +395,10 @@ export type FlowCompletionReason =
392
395
  export interface FlowCompletionEvent {
393
396
  completionReason: FlowCompletionReason | undefined;
394
397
  }
395
- export type FlowOutputContent =
396
- | FlowOutputContent.DocumentMember
397
- | FlowOutputContent.$UnknownMember;
398
- export declare namespace FlowOutputContent {
398
+ export type FlowMultiTurnInputContent =
399
+ | FlowMultiTurnInputContent.DocumentMember
400
+ | FlowMultiTurnInputContent.$UnknownMember;
401
+ export declare namespace FlowMultiTurnInputContent {
399
402
  interface DocumentMember {
400
403
  document: __DocumentType;
401
404
  $unknown?: never;
@@ -408,7 +411,7 @@ export declare namespace FlowOutputContent {
408
411
  document: (value: __DocumentType) => T;
409
412
  _: (name: string, value: any) => T;
410
413
  }
411
- const visit: <T>(value: FlowOutputContent, visitor: Visitor<T>) => T;
414
+ const visit: <T>(value: FlowMultiTurnInputContent, visitor: Visitor<T>) => T;
412
415
  }
413
416
  export declare const NodeType: {
414
417
  readonly CONDITION_NODE: "ConditionNode";
@@ -420,6 +423,29 @@ export declare const NodeType: {
420
423
  readonly PROMPT_NODE: "PromptNode";
421
424
  };
422
425
  export type NodeType = (typeof NodeType)[keyof typeof NodeType];
426
+ export interface FlowMultiTurnInputRequestEvent {
427
+ nodeName: string | undefined;
428
+ nodeType: NodeType | undefined;
429
+ content: FlowMultiTurnInputContent | undefined;
430
+ }
431
+ export type FlowOutputContent =
432
+ | FlowOutputContent.DocumentMember
433
+ | FlowOutputContent.$UnknownMember;
434
+ export declare namespace FlowOutputContent {
435
+ interface DocumentMember {
436
+ document: __DocumentType;
437
+ $unknown?: never;
438
+ }
439
+ interface $UnknownMember {
440
+ document?: never;
441
+ $unknown: [string, any];
442
+ }
443
+ interface Visitor<T> {
444
+ document: (value: __DocumentType) => T;
445
+ _: (name: string, value: any) => T;
446
+ }
447
+ const visit: <T>(value: FlowOutputContent, visitor: Visitor<T>) => T;
448
+ }
423
449
  export interface FlowOutputEvent {
424
450
  nodeName: string | undefined;
425
451
  nodeType: NodeType | undefined;
@@ -562,6 +588,7 @@ export type FlowResponseStream =
562
588
  | FlowResponseStream.ConflictExceptionMember
563
589
  | FlowResponseStream.DependencyFailedExceptionMember
564
590
  | FlowResponseStream.FlowCompletionEventMember
591
+ | FlowResponseStream.FlowMultiTurnInputRequestEventMember
565
592
  | FlowResponseStream.FlowOutputEventMember
566
593
  | FlowResponseStream.FlowTraceEventMember
567
594
  | FlowResponseStream.InternalServerExceptionMember
@@ -584,6 +611,7 @@ export declare namespace FlowResponseStream {
584
611
  conflictException?: never;
585
612
  dependencyFailedException?: never;
586
613
  badGatewayException?: never;
614
+ flowMultiTurnInputRequestEvent?: never;
587
615
  $unknown?: never;
588
616
  }
589
617
  interface FlowCompletionEventMember {
@@ -599,6 +627,7 @@ export declare namespace FlowResponseStream {
599
627
  conflictException?: never;
600
628
  dependencyFailedException?: never;
601
629
  badGatewayException?: never;
630
+ flowMultiTurnInputRequestEvent?: never;
602
631
  $unknown?: never;
603
632
  }
604
633
  interface FlowTraceEventMember {
@@ -614,6 +643,7 @@ export declare namespace FlowResponseStream {
614
643
  conflictException?: never;
615
644
  dependencyFailedException?: never;
616
645
  badGatewayException?: never;
646
+ flowMultiTurnInputRequestEvent?: never;
617
647
  $unknown?: never;
618
648
  }
619
649
  interface InternalServerExceptionMember {
@@ -629,6 +659,7 @@ export declare namespace FlowResponseStream {
629
659
  conflictException?: never;
630
660
  dependencyFailedException?: never;
631
661
  badGatewayException?: never;
662
+ flowMultiTurnInputRequestEvent?: never;
632
663
  $unknown?: never;
633
664
  }
634
665
  interface ValidationExceptionMember {
@@ -644,6 +675,7 @@ export declare namespace FlowResponseStream {
644
675
  conflictException?: never;
645
676
  dependencyFailedException?: never;
646
677
  badGatewayException?: never;
678
+ flowMultiTurnInputRequestEvent?: never;
647
679
  $unknown?: never;
648
680
  }
649
681
  interface ResourceNotFoundExceptionMember {
@@ -659,6 +691,7 @@ export declare namespace FlowResponseStream {
659
691
  conflictException?: never;
660
692
  dependencyFailedException?: never;
661
693
  badGatewayException?: never;
694
+ flowMultiTurnInputRequestEvent?: never;
662
695
  $unknown?: never;
663
696
  }
664
697
  interface ServiceQuotaExceededExceptionMember {
@@ -674,6 +707,7 @@ export declare namespace FlowResponseStream {
674
707
  conflictException?: never;
675
708
  dependencyFailedException?: never;
676
709
  badGatewayException?: never;
710
+ flowMultiTurnInputRequestEvent?: never;
677
711
  $unknown?: never;
678
712
  }
679
713
  interface ThrottlingExceptionMember {
@@ -689,6 +723,7 @@ export declare namespace FlowResponseStream {
689
723
  conflictException?: never;
690
724
  dependencyFailedException?: never;
691
725
  badGatewayException?: never;
726
+ flowMultiTurnInputRequestEvent?: never;
692
727
  $unknown?: never;
693
728
  }
694
729
  interface AccessDeniedExceptionMember {
@@ -704,6 +739,7 @@ export declare namespace FlowResponseStream {
704
739
  conflictException?: never;
705
740
  dependencyFailedException?: never;
706
741
  badGatewayException?: never;
742
+ flowMultiTurnInputRequestEvent?: never;
707
743
  $unknown?: never;
708
744
  }
709
745
  interface ConflictExceptionMember {
@@ -719,6 +755,7 @@ export declare namespace FlowResponseStream {
719
755
  conflictException: ConflictException;
720
756
  dependencyFailedException?: never;
721
757
  badGatewayException?: never;
758
+ flowMultiTurnInputRequestEvent?: never;
722
759
  $unknown?: never;
723
760
  }
724
761
  interface DependencyFailedExceptionMember {
@@ -734,6 +771,7 @@ export declare namespace FlowResponseStream {
734
771
  conflictException?: never;
735
772
  dependencyFailedException: DependencyFailedException;
736
773
  badGatewayException?: never;
774
+ flowMultiTurnInputRequestEvent?: never;
737
775
  $unknown?: never;
738
776
  }
739
777
  interface BadGatewayExceptionMember {
@@ -749,6 +787,23 @@ export declare namespace FlowResponseStream {
749
787
  conflictException?: never;
750
788
  dependencyFailedException?: never;
751
789
  badGatewayException: BadGatewayException;
790
+ flowMultiTurnInputRequestEvent?: never;
791
+ $unknown?: never;
792
+ }
793
+ interface FlowMultiTurnInputRequestEventMember {
794
+ flowOutputEvent?: never;
795
+ flowCompletionEvent?: never;
796
+ flowTraceEvent?: never;
797
+ internalServerException?: never;
798
+ validationException?: never;
799
+ resourceNotFoundException?: never;
800
+ serviceQuotaExceededException?: never;
801
+ throttlingException?: never;
802
+ accessDeniedException?: never;
803
+ conflictException?: never;
804
+ dependencyFailedException?: never;
805
+ badGatewayException?: never;
806
+ flowMultiTurnInputRequestEvent: FlowMultiTurnInputRequestEvent;
752
807
  $unknown?: never;
753
808
  }
754
809
  interface $UnknownMember {
@@ -764,6 +819,7 @@ export declare namespace FlowResponseStream {
764
819
  conflictException?: never;
765
820
  dependencyFailedException?: never;
766
821
  badGatewayException?: never;
822
+ flowMultiTurnInputRequestEvent?: never;
767
823
  $unknown: [string, any];
768
824
  }
769
825
  interface Visitor<T> {
@@ -779,12 +835,16 @@ export declare namespace FlowResponseStream {
779
835
  conflictException: (value: ConflictException) => T;
780
836
  dependencyFailedException: (value: DependencyFailedException) => T;
781
837
  badGatewayException: (value: BadGatewayException) => T;
838
+ flowMultiTurnInputRequestEvent: (
839
+ value: FlowMultiTurnInputRequestEvent
840
+ ) => T;
782
841
  _: (name: string, value: any) => T;
783
842
  }
784
843
  const visit: <T>(value: FlowResponseStream, visitor: Visitor<T>) => T;
785
844
  }
786
845
  export interface InvokeFlowResponse {
787
846
  responseStream: AsyncIterable<FlowResponseStream> | undefined;
847
+ executionId?: string | undefined;
788
848
  }
789
849
  export declare const InputQueryType: {
790
850
  readonly TEXT: "TEXT";
@@ -3365,6 +3425,9 @@ export declare const InvokeFlowRequestFilterSensitiveLog: (
3365
3425
  export declare const FlowCompletionEventFilterSensitiveLog: (
3366
3426
  obj: FlowCompletionEvent
3367
3427
  ) => any;
3428
+ export declare const FlowMultiTurnInputRequestEventFilterSensitiveLog: (
3429
+ obj: FlowMultiTurnInputRequestEvent
3430
+ ) => any;
3368
3431
  export declare const FlowOutputEventFilterSensitiveLog: (
3369
3432
  obj: FlowOutputEvent
3370
3433
  ) => any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bedrock-agent-runtime",
3
3
  "description": "AWS SDK for JavaScript Bedrock Agent Runtime Client for Node.js, Browser and React Native",
4
- "version": "3.731.1",
4
+ "version": "3.733.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-agent-runtime",