@botpress/client 0.32.0 → 0.33.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/index.d.ts CHANGED
@@ -47,7 +47,7 @@ interface CreateConversationRequestBody {
47
47
  type CreateConversationInput = CreateConversationRequestBody & CreateConversationRequestHeaders & CreateConversationRequestQuery & CreateConversationRequestParams;
48
48
  interface CreateConversationResponse {
49
49
  /**
50
- * The conversation object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
50
+ * The [Conversation](#schema_conversation) object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
51
51
  */
52
52
  conversation: {
53
53
  /**
@@ -58,6 +58,10 @@ interface CreateConversationResponse {
58
58
  * Id of the current [Task](#schema_task)
59
59
  */
60
60
  currentTaskId?: string;
61
+ /**
62
+ * Id of the current [Workflow](#schema_workflow)
63
+ */
64
+ currentWorkflowId?: string;
61
65
  /**
62
66
  * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
63
67
  */
@@ -95,7 +99,7 @@ interface GetConversationRequestBody {
95
99
  type GetConversationInput = GetConversationRequestBody & GetConversationRequestHeaders & GetConversationRequestQuery & GetConversationRequestParams;
96
100
  interface GetConversationResponse {
97
101
  /**
98
- * The conversation object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
102
+ * The [Conversation](#schema_conversation) object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
99
103
  */
100
104
  conversation: {
101
105
  /**
@@ -106,6 +110,10 @@ interface GetConversationResponse {
106
110
  * Id of the current [Task](#schema_task)
107
111
  */
108
112
  currentTaskId?: string;
113
+ /**
114
+ * Id of the current [Workflow](#schema_workflow)
115
+ */
116
+ currentWorkflowId?: string;
109
117
  /**
110
118
  * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
111
119
  */
@@ -158,6 +166,10 @@ interface ListConversationsResponse {
158
166
  * Id of the current [Task](#schema_task)
159
167
  */
160
168
  currentTaskId?: string;
169
+ /**
170
+ * Id of the current [Workflow](#schema_workflow)
171
+ */
172
+ currentWorkflowId?: string;
161
173
  /**
162
174
  * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
163
175
  */
@@ -215,7 +227,7 @@ interface GetOrCreateConversationRequestBody {
215
227
  type GetOrCreateConversationInput = GetOrCreateConversationRequestBody & GetOrCreateConversationRequestHeaders & GetOrCreateConversationRequestQuery & GetOrCreateConversationRequestParams;
216
228
  interface GetOrCreateConversationResponse {
217
229
  /**
218
- * The conversation object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
230
+ * The [Conversation](#schema_conversation) object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
219
231
  */
220
232
  conversation: {
221
233
  /**
@@ -226,6 +238,10 @@ interface GetOrCreateConversationResponse {
226
238
  * Id of the current [Task](#schema_task)
227
239
  */
228
240
  currentTaskId?: string;
241
+ /**
242
+ * Id of the current [Workflow](#schema_workflow)
243
+ */
244
+ currentWorkflowId?: string;
229
245
  /**
230
246
  * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
231
247
  */
@@ -270,7 +286,7 @@ interface UpdateConversationRequestBody {
270
286
  type UpdateConversationInput = UpdateConversationRequestBody & UpdateConversationRequestHeaders & UpdateConversationRequestQuery & UpdateConversationRequestParams;
271
287
  interface UpdateConversationResponse {
272
288
  /**
273
- * The conversation object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
289
+ * The [Conversation](#schema_conversation) object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
274
290
  */
275
291
  conversation: {
276
292
  /**
@@ -281,6 +297,10 @@ interface UpdateConversationResponse {
281
297
  * Id of the current [Task](#schema_task)
282
298
  */
283
299
  currentTaskId?: string;
300
+ /**
301
+ * Id of the current [Workflow](#schema_workflow)
302
+ */
303
+ currentWorkflowId?: string;
284
304
  /**
285
305
  * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
286
306
  */
@@ -553,7 +573,7 @@ interface CreateEventResponse {
553
573
  * ID of the [Message](#schema_message) to link the event to.
554
574
  */
555
575
  messageId?: string;
556
- status: "pending" | "processed" | "ignored" | "failed";
576
+ status: "pending" | "processed" | "ignored" | "failed" | "scheduled";
557
577
  /**
558
578
  * Reason why the event failed to be processed
559
579
  */
@@ -606,7 +626,7 @@ interface GetEventResponse {
606
626
  * ID of the [Message](#schema_message) to link the event to.
607
627
  */
608
628
  messageId?: string;
609
- status: "pending" | "processed" | "ignored" | "failed";
629
+ status: "pending" | "processed" | "ignored" | "failed" | "scheduled";
610
630
  /**
611
631
  * Reason why the event failed to be processed
612
632
  */
@@ -622,7 +642,7 @@ interface ListEventsRequestQuery {
622
642
  conversationId?: string;
623
643
  userId?: string;
624
644
  messageId?: string;
625
- status?: string;
645
+ status?: "pending" | "ignored" | "processed" | "failed" | "scheduled";
626
646
  }
627
647
  interface ListEventsRequestParams {
628
648
  }
@@ -661,7 +681,7 @@ interface ListEventsResponse {
661
681
  * ID of the [Message](#schema_message) to link the event to.
662
682
  */
663
683
  messageId?: string;
664
- status: "pending" | "processed" | "ignored" | "failed";
684
+ status: "pending" | "processed" | "ignored" | "failed" | "scheduled";
665
685
  /**
666
686
  * Reason why the event failed to be processed
667
687
  */
@@ -1338,7 +1358,7 @@ interface SetStateExpiryRequestHeaders {
1338
1358
  interface SetStateExpiryRequestQuery {
1339
1359
  }
1340
1360
  interface SetStateExpiryRequestParams {
1341
- type: "conversation" | "user" | "bot" | "integration" | "task";
1361
+ type: "conversation" | "user" | "bot" | "integration" | "task" | "workflow";
1342
1362
  id: string;
1343
1363
  name: string;
1344
1364
  }
@@ -1383,9 +1403,9 @@ interface SetStateExpiryResponse {
1383
1403
  */
1384
1404
  name: string;
1385
1405
  /**
1386
- * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task` or `integration`) that the state is related to
1406
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to
1387
1407
  */
1388
- type: "conversation" | "user" | "bot" | "task" | "integration";
1408
+ type: "conversation" | "user" | "bot" | "task" | "integration" | "workflow";
1389
1409
  /**
1390
1410
  * Payload is the content of the state defined by your bot.
1391
1411
  */
@@ -1400,7 +1420,7 @@ interface GetStateRequestHeaders {
1400
1420
  interface GetStateRequestQuery {
1401
1421
  }
1402
1422
  interface GetStateRequestParams {
1403
- type: "conversation" | "user" | "bot" | "integration" | "task";
1423
+ type: "conversation" | "user" | "bot" | "integration" | "task" | "workflow";
1404
1424
  id: string;
1405
1425
  name: string;
1406
1426
  }
@@ -1441,9 +1461,9 @@ interface GetStateResponse {
1441
1461
  */
1442
1462
  name: string;
1443
1463
  /**
1444
- * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task` or `integration`) that the state is related to
1464
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to
1445
1465
  */
1446
- type: "conversation" | "user" | "bot" | "task" | "integration";
1466
+ type: "conversation" | "user" | "bot" | "task" | "integration" | "workflow";
1447
1467
  /**
1448
1468
  * Payload is the content of the state defined by your bot.
1449
1469
  */
@@ -1461,7 +1481,7 @@ interface SetStateRequestHeaders {
1461
1481
  interface SetStateRequestQuery {
1462
1482
  }
1463
1483
  interface SetStateRequestParams {
1464
- type: "conversation" | "user" | "bot" | "integration" | "task";
1484
+ type: "conversation" | "user" | "bot" | "integration" | "task" | "workflow";
1465
1485
  id: string;
1466
1486
  name: string;
1467
1487
  }
@@ -1512,9 +1532,9 @@ interface SetStateResponse {
1512
1532
  */
1513
1533
  name: string;
1514
1534
  /**
1515
- * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task` or `integration`) that the state is related to
1535
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to
1516
1536
  */
1517
- type: "conversation" | "user" | "bot" | "task" | "integration";
1537
+ type: "conversation" | "user" | "bot" | "task" | "integration" | "workflow";
1518
1538
  /**
1519
1539
  * Payload is the content of the state defined by your bot.
1520
1540
  */
@@ -1529,7 +1549,7 @@ interface GetOrSetStateRequestHeaders {
1529
1549
  interface GetOrSetStateRequestQuery {
1530
1550
  }
1531
1551
  interface GetOrSetStateRequestParams {
1532
- type: "conversation" | "user" | "bot" | "integration" | "task";
1552
+ type: "conversation" | "user" | "bot" | "integration" | "task" | "workflow";
1533
1553
  id: string;
1534
1554
  name: string;
1535
1555
  }
@@ -1580,9 +1600,9 @@ interface GetOrSetStateResponse {
1580
1600
  */
1581
1601
  name: string;
1582
1602
  /**
1583
- * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task` or `integration`) that the state is related to
1603
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to
1584
1604
  */
1585
- type: "conversation" | "user" | "bot" | "task" | "integration";
1605
+ type: "conversation" | "user" | "bot" | "task" | "integration" | "workflow";
1586
1606
  /**
1587
1607
  * Payload is the content of the state defined by your bot.
1588
1608
  */
@@ -1600,7 +1620,7 @@ interface PatchStateRequestHeaders {
1600
1620
  interface PatchStateRequestQuery {
1601
1621
  }
1602
1622
  interface PatchStateRequestParams {
1603
- type: "conversation" | "user" | "bot" | "integration" | "task";
1623
+ type: "conversation" | "user" | "bot" | "integration" | "task" | "workflow";
1604
1624
  id: string;
1605
1625
  name: string;
1606
1626
  }
@@ -1647,9 +1667,9 @@ interface PatchStateResponse {
1647
1667
  */
1648
1668
  name: string;
1649
1669
  /**
1650
- * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task` or `integration`) that the state is related to
1670
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to
1651
1671
  */
1652
- type: "conversation" | "user" | "bot" | "task" | "integration";
1672
+ type: "conversation" | "user" | "bot" | "task" | "integration" | "workflow";
1653
1673
  /**
1654
1674
  * Payload is the content of the state defined by your bot.
1655
1675
  */
@@ -2109,6 +2129,530 @@ interface ListTasksResponse {
2109
2129
  };
2110
2130
  }
2111
2131
 
2132
+ interface CreateWorkflowRequestHeaders {
2133
+ }
2134
+ interface CreateWorkflowRequestQuery {
2135
+ }
2136
+ interface CreateWorkflowRequestParams {
2137
+ }
2138
+ interface CreateWorkflowRequestBody {
2139
+ /**
2140
+ * Name of the workflow
2141
+ */
2142
+ name: string;
2143
+ /**
2144
+ * Content related to the workflow
2145
+ */
2146
+ input?: {
2147
+ [k: string]: any;
2148
+ };
2149
+ /**
2150
+ * Parent workflow id is the parent workflow that created this workflow
2151
+ */
2152
+ parentWorkflowId?: string;
2153
+ /**
2154
+ * Conversation id related to this workflow
2155
+ */
2156
+ conversationId?: string;
2157
+ /**
2158
+ * Specific user related to this workflow
2159
+ */
2160
+ userId?: string;
2161
+ /**
2162
+ * The timeout date where the workflow should be failed in the ISO 8601 format
2163
+ */
2164
+ timeoutAt?: string;
2165
+ /**
2166
+ * Tags for the [Workflow](#schema_workflow)
2167
+ */
2168
+ tags?: {
2169
+ [k: string]: string;
2170
+ };
2171
+ status: "pending" | "in_progress";
2172
+ /**
2173
+ * Event id must be specified if the workflow is created with the status in_progress
2174
+ */
2175
+ eventId?: string;
2176
+ }
2177
+ type CreateWorkflowInput = CreateWorkflowRequestBody & CreateWorkflowRequestHeaders & CreateWorkflowRequestQuery & CreateWorkflowRequestParams;
2178
+ interface CreateWorkflowResponse {
2179
+ /**
2180
+ * Workflow definition
2181
+ */
2182
+ workflow: {
2183
+ /**
2184
+ * Id of the [Workflow](#schema_workflow)
2185
+ */
2186
+ id: string;
2187
+ /**
2188
+ * Name of the workflow
2189
+ */
2190
+ name: string;
2191
+ /**
2192
+ * Status of the [Workflow](#schema_workflow)
2193
+ */
2194
+ status: "pending" | "in_progress" | "failed" | "completed" | "listening" | "paused" | "timedout" | "cancelled";
2195
+ /**
2196
+ * Input provided to the [Workflow](#schema_workflow)
2197
+ */
2198
+ input: {
2199
+ [k: string]: any;
2200
+ };
2201
+ /**
2202
+ * Data returned by the [Workflow](#schema_workflow) output
2203
+ */
2204
+ output: {
2205
+ [k: string]: any;
2206
+ };
2207
+ /**
2208
+ * Parent [Workflow](#schema_workflow) id is the parent [Workflow](#schema_workflow) that created this [Workflow](#schema_workflow)
2209
+ */
2210
+ parentWorkflowId?: string;
2211
+ /**
2212
+ * Conversation id related to this [Workflow](#schema_workflow)
2213
+ */
2214
+ conversationId?: string;
2215
+ /**
2216
+ * User id related to this [Workflow](#schema_workflow)
2217
+ */
2218
+ userId?: string;
2219
+ /**
2220
+ * Creation date of the [Workflow](#schema_workflow) in ISO 8601 format
2221
+ */
2222
+ createdAt: string;
2223
+ /**
2224
+ * Updating date of the [Workflow](#schema_workflow) in ISO 8601 format
2225
+ */
2226
+ updatedAt: string;
2227
+ /**
2228
+ * The date when the [Workflow](#schema_workflow) completed in ISO 8601 format
2229
+ */
2230
+ completedAt?: string;
2231
+ /**
2232
+ * If the [Workflow](#schema_workflow) fails this is the reason behind it
2233
+ */
2234
+ failureReason?: string;
2235
+ /**
2236
+ * The timeout date when the [Workflow](#schema_workflow) will fail in the ISO 8601 format
2237
+ */
2238
+ timeoutAt: string;
2239
+ /**
2240
+ * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Workflow](#schema_workflow). Individual keys can be unset by posting an empty value to them.
2241
+ */
2242
+ tags: {
2243
+ [k: string]: string;
2244
+ };
2245
+ };
2246
+ }
2247
+
2248
+ interface GetWorkflowRequestHeaders {
2249
+ }
2250
+ interface GetWorkflowRequestQuery {
2251
+ }
2252
+ interface GetWorkflowRequestParams {
2253
+ id: string;
2254
+ }
2255
+ interface GetWorkflowRequestBody {
2256
+ }
2257
+ type GetWorkflowInput = GetWorkflowRequestBody & GetWorkflowRequestHeaders & GetWorkflowRequestQuery & GetWorkflowRequestParams;
2258
+ interface GetWorkflowResponse {
2259
+ /**
2260
+ * Workflow definition
2261
+ */
2262
+ workflow: {
2263
+ /**
2264
+ * Id of the [Workflow](#schema_workflow)
2265
+ */
2266
+ id: string;
2267
+ /**
2268
+ * Name of the workflow
2269
+ */
2270
+ name: string;
2271
+ /**
2272
+ * Status of the [Workflow](#schema_workflow)
2273
+ */
2274
+ status: "pending" | "in_progress" | "failed" | "completed" | "listening" | "paused" | "timedout" | "cancelled";
2275
+ /**
2276
+ * Input provided to the [Workflow](#schema_workflow)
2277
+ */
2278
+ input: {
2279
+ [k: string]: any;
2280
+ };
2281
+ /**
2282
+ * Data returned by the [Workflow](#schema_workflow) output
2283
+ */
2284
+ output: {
2285
+ [k: string]: any;
2286
+ };
2287
+ /**
2288
+ * Parent [Workflow](#schema_workflow) id is the parent [Workflow](#schema_workflow) that created this [Workflow](#schema_workflow)
2289
+ */
2290
+ parentWorkflowId?: string;
2291
+ /**
2292
+ * Conversation id related to this [Workflow](#schema_workflow)
2293
+ */
2294
+ conversationId?: string;
2295
+ /**
2296
+ * User id related to this [Workflow](#schema_workflow)
2297
+ */
2298
+ userId?: string;
2299
+ /**
2300
+ * Creation date of the [Workflow](#schema_workflow) in ISO 8601 format
2301
+ */
2302
+ createdAt: string;
2303
+ /**
2304
+ * Updating date of the [Workflow](#schema_workflow) in ISO 8601 format
2305
+ */
2306
+ updatedAt: string;
2307
+ /**
2308
+ * The date when the [Workflow](#schema_workflow) completed in ISO 8601 format
2309
+ */
2310
+ completedAt?: string;
2311
+ /**
2312
+ * If the [Workflow](#schema_workflow) fails this is the reason behind it
2313
+ */
2314
+ failureReason?: string;
2315
+ /**
2316
+ * The timeout date when the [Workflow](#schema_workflow) will fail in the ISO 8601 format
2317
+ */
2318
+ timeoutAt: string;
2319
+ /**
2320
+ * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Workflow](#schema_workflow). Individual keys can be unset by posting an empty value to them.
2321
+ */
2322
+ tags: {
2323
+ [k: string]: string;
2324
+ };
2325
+ };
2326
+ }
2327
+
2328
+ interface UpdateWorkflowRequestHeaders {
2329
+ }
2330
+ interface UpdateWorkflowRequestQuery {
2331
+ }
2332
+ interface UpdateWorkflowRequestParams {
2333
+ id: string;
2334
+ }
2335
+ interface UpdateWorkflowRequestBody {
2336
+ /**
2337
+ * Content related to the workflow
2338
+ */
2339
+ output?: {
2340
+ [k: string]: any;
2341
+ };
2342
+ /**
2343
+ * The timeout date where the workflow should be failed in the ISO 8601 format
2344
+ */
2345
+ timeoutAt?: string;
2346
+ /**
2347
+ * Status of the workflow
2348
+ */
2349
+ status?: "completed" | "cancelled" | "listening" | "paused" | "failed";
2350
+ /**
2351
+ * Reason why the workflow failed
2352
+ */
2353
+ failureReason?: string;
2354
+ /**
2355
+ * Tags for the [Workflow](#schema_workflow)
2356
+ */
2357
+ tags?: {
2358
+ [k: string]: string;
2359
+ };
2360
+ /**
2361
+ * Specific user related to this workflow
2362
+ */
2363
+ userId?: string;
2364
+ }
2365
+ type UpdateWorkflowInput = UpdateWorkflowRequestBody & UpdateWorkflowRequestHeaders & UpdateWorkflowRequestQuery & UpdateWorkflowRequestParams;
2366
+ interface UpdateWorkflowResponse {
2367
+ /**
2368
+ * Workflow definition
2369
+ */
2370
+ workflow: {
2371
+ /**
2372
+ * Id of the [Workflow](#schema_workflow)
2373
+ */
2374
+ id: string;
2375
+ /**
2376
+ * Name of the workflow
2377
+ */
2378
+ name: string;
2379
+ /**
2380
+ * Status of the [Workflow](#schema_workflow)
2381
+ */
2382
+ status: "pending" | "in_progress" | "failed" | "completed" | "listening" | "paused" | "timedout" | "cancelled";
2383
+ /**
2384
+ * Input provided to the [Workflow](#schema_workflow)
2385
+ */
2386
+ input: {
2387
+ [k: string]: any;
2388
+ };
2389
+ /**
2390
+ * Data returned by the [Workflow](#schema_workflow) output
2391
+ */
2392
+ output: {
2393
+ [k: string]: any;
2394
+ };
2395
+ /**
2396
+ * Parent [Workflow](#schema_workflow) id is the parent [Workflow](#schema_workflow) that created this [Workflow](#schema_workflow)
2397
+ */
2398
+ parentWorkflowId?: string;
2399
+ /**
2400
+ * Conversation id related to this [Workflow](#schema_workflow)
2401
+ */
2402
+ conversationId?: string;
2403
+ /**
2404
+ * User id related to this [Workflow](#schema_workflow)
2405
+ */
2406
+ userId?: string;
2407
+ /**
2408
+ * Creation date of the [Workflow](#schema_workflow) in ISO 8601 format
2409
+ */
2410
+ createdAt: string;
2411
+ /**
2412
+ * Updating date of the [Workflow](#schema_workflow) in ISO 8601 format
2413
+ */
2414
+ updatedAt: string;
2415
+ /**
2416
+ * The date when the [Workflow](#schema_workflow) completed in ISO 8601 format
2417
+ */
2418
+ completedAt?: string;
2419
+ /**
2420
+ * If the [Workflow](#schema_workflow) fails this is the reason behind it
2421
+ */
2422
+ failureReason?: string;
2423
+ /**
2424
+ * The timeout date when the [Workflow](#schema_workflow) will fail in the ISO 8601 format
2425
+ */
2426
+ timeoutAt: string;
2427
+ /**
2428
+ * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Workflow](#schema_workflow). Individual keys can be unset by posting an empty value to them.
2429
+ */
2430
+ tags: {
2431
+ [k: string]: string;
2432
+ };
2433
+ };
2434
+ }
2435
+
2436
+ interface DeleteWorkflowRequestHeaders {
2437
+ }
2438
+ interface DeleteWorkflowRequestQuery {
2439
+ }
2440
+ interface DeleteWorkflowRequestParams {
2441
+ id: string;
2442
+ }
2443
+ interface DeleteWorkflowRequestBody {
2444
+ }
2445
+ type DeleteWorkflowInput = DeleteWorkflowRequestBody & DeleteWorkflowRequestHeaders & DeleteWorkflowRequestQuery & DeleteWorkflowRequestParams;
2446
+ interface DeleteWorkflowResponse {
2447
+ }
2448
+
2449
+ interface ListWorkflowsRequestHeaders {
2450
+ }
2451
+ interface ListWorkflowsRequestQuery {
2452
+ nextToken?: string;
2453
+ tags?: {
2454
+ [k: string]: string;
2455
+ };
2456
+ conversationId?: string;
2457
+ userId?: string;
2458
+ parentWorkflowId?: string;
2459
+ statuses?: ("pending" | "in_progress" | "failed" | "completed" | "listening" | "paused" | "timedout" | "cancelled")[];
2460
+ name?: string;
2461
+ }
2462
+ interface ListWorkflowsRequestParams {
2463
+ }
2464
+ interface ListWorkflowsRequestBody {
2465
+ }
2466
+ type ListWorkflowsInput = ListWorkflowsRequestBody & ListWorkflowsRequestHeaders & ListWorkflowsRequestQuery & ListWorkflowsRequestParams;
2467
+ interface ListWorkflowsResponse {
2468
+ workflows: {
2469
+ /**
2470
+ * Id of the [Workflow](#schema_workflow)
2471
+ */
2472
+ id: string;
2473
+ /**
2474
+ * Name of the workflow
2475
+ */
2476
+ name: string;
2477
+ /**
2478
+ * Status of the [Workflow](#schema_workflow)
2479
+ */
2480
+ status: "pending" | "in_progress" | "failed" | "completed" | "listening" | "paused" | "timedout" | "cancelled";
2481
+ /**
2482
+ * Input provided to the [Workflow](#schema_workflow)
2483
+ */
2484
+ input: {
2485
+ [k: string]: any;
2486
+ };
2487
+ /**
2488
+ * Data returned by the [Workflow](#schema_workflow) output
2489
+ */
2490
+ output: {
2491
+ [k: string]: any;
2492
+ };
2493
+ /**
2494
+ * Parent [Workflow](#schema_workflow) id is the parent [Workflow](#schema_workflow) that created this [Workflow](#schema_workflow)
2495
+ */
2496
+ parentWorkflowId?: string;
2497
+ /**
2498
+ * Conversation id related to this [Workflow](#schema_workflow)
2499
+ */
2500
+ conversationId?: string;
2501
+ /**
2502
+ * User id related to this [Workflow](#schema_workflow)
2503
+ */
2504
+ userId?: string;
2505
+ /**
2506
+ * Creation date of the [Workflow](#schema_workflow) in ISO 8601 format
2507
+ */
2508
+ createdAt: string;
2509
+ /**
2510
+ * Updating date of the [Workflow](#schema_workflow) in ISO 8601 format
2511
+ */
2512
+ updatedAt: string;
2513
+ /**
2514
+ * The date when the [Workflow](#schema_workflow) completed in ISO 8601 format
2515
+ */
2516
+ completedAt?: string;
2517
+ /**
2518
+ * If the [Workflow](#schema_workflow) fails this is the reason behind it
2519
+ */
2520
+ failureReason?: string;
2521
+ /**
2522
+ * The timeout date when the [Workflow](#schema_workflow) will fail in the ISO 8601 format
2523
+ */
2524
+ timeoutAt: string;
2525
+ /**
2526
+ * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Workflow](#schema_workflow). Individual keys can be unset by posting an empty value to them.
2527
+ */
2528
+ tags: {
2529
+ [k: string]: string;
2530
+ };
2531
+ }[];
2532
+ meta: {
2533
+ /**
2534
+ * The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint.
2535
+ */
2536
+ nextToken?: string;
2537
+ };
2538
+ }
2539
+
2540
+ interface GetOrCreateWorkflowRequestHeaders {
2541
+ }
2542
+ interface GetOrCreateWorkflowRequestQuery {
2543
+ }
2544
+ interface GetOrCreateWorkflowRequestParams {
2545
+ }
2546
+ interface GetOrCreateWorkflowRequestBody {
2547
+ /**
2548
+ * Name of the workflow
2549
+ */
2550
+ name: string;
2551
+ /**
2552
+ * Content related to the workflow
2553
+ */
2554
+ input?: {
2555
+ [k: string]: any;
2556
+ };
2557
+ /**
2558
+ * Parent workflow id is the parent workflow that created this workflow
2559
+ */
2560
+ parentWorkflowId?: string;
2561
+ /**
2562
+ * Conversation id related to this workflow
2563
+ */
2564
+ conversationId?: string;
2565
+ /**
2566
+ * Specific user related to this workflow
2567
+ */
2568
+ userId?: string;
2569
+ /**
2570
+ * The timeout date where the workflow should be failed in the ISO 8601 format
2571
+ */
2572
+ timeoutAt?: string;
2573
+ /**
2574
+ * Tags for the [Workflow](#schema_workflow)
2575
+ */
2576
+ tags?: {
2577
+ [k: string]: string;
2578
+ };
2579
+ status: "pending" | "in_progress";
2580
+ /**
2581
+ * Event id must be specified if the workflow is created with the status in_progress
2582
+ */
2583
+ eventId?: string;
2584
+ }
2585
+ type GetOrCreateWorkflowInput = GetOrCreateWorkflowRequestBody & GetOrCreateWorkflowRequestHeaders & GetOrCreateWorkflowRequestQuery & GetOrCreateWorkflowRequestParams;
2586
+ interface GetOrCreateWorkflowResponse {
2587
+ /**
2588
+ * Workflow definition
2589
+ */
2590
+ workflow: {
2591
+ /**
2592
+ * Id of the [Workflow](#schema_workflow)
2593
+ */
2594
+ id: string;
2595
+ /**
2596
+ * Name of the workflow
2597
+ */
2598
+ name: string;
2599
+ /**
2600
+ * Status of the [Workflow](#schema_workflow)
2601
+ */
2602
+ status: "pending" | "in_progress" | "failed" | "completed" | "listening" | "paused" | "timedout" | "cancelled";
2603
+ /**
2604
+ * Input provided to the [Workflow](#schema_workflow)
2605
+ */
2606
+ input: {
2607
+ [k: string]: any;
2608
+ };
2609
+ /**
2610
+ * Data returned by the [Workflow](#schema_workflow) output
2611
+ */
2612
+ output: {
2613
+ [k: string]: any;
2614
+ };
2615
+ /**
2616
+ * Parent [Workflow](#schema_workflow) id is the parent [Workflow](#schema_workflow) that created this [Workflow](#schema_workflow)
2617
+ */
2618
+ parentWorkflowId?: string;
2619
+ /**
2620
+ * Conversation id related to this [Workflow](#schema_workflow)
2621
+ */
2622
+ conversationId?: string;
2623
+ /**
2624
+ * User id related to this [Workflow](#schema_workflow)
2625
+ */
2626
+ userId?: string;
2627
+ /**
2628
+ * Creation date of the [Workflow](#schema_workflow) in ISO 8601 format
2629
+ */
2630
+ createdAt: string;
2631
+ /**
2632
+ * Updating date of the [Workflow](#schema_workflow) in ISO 8601 format
2633
+ */
2634
+ updatedAt: string;
2635
+ /**
2636
+ * The date when the [Workflow](#schema_workflow) completed in ISO 8601 format
2637
+ */
2638
+ completedAt?: string;
2639
+ /**
2640
+ * If the [Workflow](#schema_workflow) fails this is the reason behind it
2641
+ */
2642
+ failureReason?: string;
2643
+ /**
2644
+ * The timeout date when the [Workflow](#schema_workflow) will fail in the ISO 8601 format
2645
+ */
2646
+ timeoutAt: string;
2647
+ /**
2648
+ * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Workflow](#schema_workflow). Individual keys can be unset by posting an empty value to them.
2649
+ */
2650
+ tags: {
2651
+ [k: string]: string;
2652
+ };
2653
+ };
2654
+ }
2655
+
2112
2656
  interface TrackAnalyticsRequestHeaders {
2113
2657
  }
2114
2658
  interface TrackAnalyticsRequestQuery {
@@ -8170,6 +8714,32 @@ interface ListUsageHistoryResponse {
8170
8714
  }[];
8171
8715
  }
8172
8716
 
8717
+ interface ListUsageActivityRequestHeaders {
8718
+ }
8719
+ interface ListUsageActivityRequestQuery {
8720
+ type: "invocation_timeout" | "invocation_calls" | "storage_count" | "bot_count" | "knowledgebase_vector_storage" | "workspace_ratelimit" | "table_row_count" | "workspace_member_count" | "integrations_owned_count" | "ai_spend" | "openai_spend" | "bing_search_spend" | "always_alive";
8721
+ nextToken?: string;
8722
+ }
8723
+ interface ListUsageActivityRequestParams {
8724
+ id: string;
8725
+ }
8726
+ interface ListUsageActivityRequestBody {
8727
+ }
8728
+ type ListUsageActivityInput = ListUsageActivityRequestBody & ListUsageActivityRequestHeaders & ListUsageActivityRequestQuery & ListUsageActivityRequestParams;
8729
+ interface ListUsageActivityResponse {
8730
+ data: {
8731
+ timestamp: string;
8732
+ value: number;
8733
+ period: string;
8734
+ metadata: {
8735
+ [k: string]: any | null;
8736
+ };
8737
+ }[];
8738
+ meta: {
8739
+ nextToken?: string;
8740
+ };
8741
+ }
8742
+
8173
8743
  interface ChangeAispendQuotaRequestHeaders {
8174
8744
  }
8175
8745
  interface ChangeAispendQuotaRequestQuery {
@@ -8847,6 +9417,10 @@ interface ListTablesResponse {
8847
9417
  * Width of the column in the UI
8848
9418
  */
8849
9419
  width?: number;
9420
+ /**
9421
+ * ID of the schema
9422
+ */
9423
+ schemaId?: string;
8850
9424
  computed?: {
8851
9425
  action: "ai" | "code" | "workflow";
8852
9426
  dependencies?: string[];
@@ -8988,6 +9562,10 @@ interface GetTableResponse {
8988
9562
  * Width of the column in the UI
8989
9563
  */
8990
9564
  width?: number;
9565
+ /**
9566
+ * ID of the schema
9567
+ */
9568
+ schemaId?: string;
8991
9569
  computed?: {
8992
9570
  action: "ai" | "code" | "workflow";
8993
9571
  dependencies?: string[];
@@ -9165,6 +9743,10 @@ interface GetOrCreateTableResponse {
9165
9743
  * Width of the column in the UI
9166
9744
  */
9167
9745
  width?: number;
9746
+ /**
9747
+ * ID of the schema
9748
+ */
9749
+ schemaId?: string;
9168
9750
  computed?: {
9169
9751
  action: "ai" | "code" | "workflow";
9170
9752
  dependencies?: string[];
@@ -9349,6 +9931,10 @@ interface CreateTableResponse {
9349
9931
  * Width of the column in the UI
9350
9932
  */
9351
9933
  width?: number;
9934
+ /**
9935
+ * ID of the schema
9936
+ */
9937
+ schemaId?: string;
9352
9938
  computed?: {
9353
9939
  action: "ai" | "code" | "workflow";
9354
9940
  dependencies?: string[];
@@ -9499,6 +10085,10 @@ interface DuplicateTableResponse {
9499
10085
  * Width of the column in the UI
9500
10086
  */
9501
10087
  width?: number;
10088
+ /**
10089
+ * ID of the schema
10090
+ */
10091
+ schemaId?: string;
9502
10092
  computed?: {
9503
10093
  action: "ai" | "code" | "workflow";
9504
10094
  dependencies?: string[];
@@ -9668,6 +10258,10 @@ interface UpdateTableResponse {
9668
10258
  * Width of the column in the UI
9669
10259
  */
9670
10260
  width?: number;
10261
+ /**
10262
+ * ID of the schema
10263
+ */
10264
+ schemaId?: string;
9671
10265
  computed?: {
9672
10266
  action: "ai" | "code" | "workflow";
9673
10267
  dependencies?: string[];
@@ -9821,6 +10415,10 @@ interface RenameTableColumnResponse {
9821
10415
  * Width of the column in the UI
9822
10416
  */
9823
10417
  width?: number;
10418
+ /**
10419
+ * ID of the schema
10420
+ */
10421
+ schemaId?: string;
9824
10422
  computed?: {
9825
10423
  action: "ai" | "code" | "workflow";
9826
10424
  dependencies?: string[];
@@ -11126,7 +11724,7 @@ interface User {
11126
11724
  pictureUrl?: string;
11127
11725
  }
11128
11726
  /**
11129
- * The conversation object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
11727
+ * The [Conversation](#schema_conversation) object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
11130
11728
  */
11131
11729
  interface Conversation {
11132
11730
  /**
@@ -11137,6 +11735,10 @@ interface Conversation {
11137
11735
  * Id of the current [Task](#schema_task)
11138
11736
  */
11139
11737
  currentTaskId?: string;
11738
+ /**
11739
+ * Id of the current [Workflow](#schema_workflow)
11740
+ */
11741
+ currentWorkflowId?: string;
11140
11742
  /**
11141
11743
  * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
11142
11744
  */
@@ -11194,7 +11796,7 @@ interface Event {
11194
11796
  * ID of the [Message](#schema_message) to link the event to.
11195
11797
  */
11196
11798
  messageId?: string;
11197
- status: "pending" | "processed" | "ignored" | "failed";
11799
+ status: "pending" | "processed" | "ignored" | "failed" | "scheduled";
11198
11800
  /**
11199
11801
  * Reason why the event failed to be processed
11200
11802
  */
@@ -11274,9 +11876,9 @@ interface State {
11274
11876
  */
11275
11877
  name: string;
11276
11878
  /**
11277
- * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task` or `integration`) that the state is related to
11879
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to
11278
11880
  */
11279
- type: "conversation" | "user" | "bot" | "task" | "integration";
11881
+ type: "conversation" | "user" | "bot" | "task" | "integration" | "workflow";
11280
11882
  /**
11281
11883
  * Payload is the content of the state defined by your bot.
11282
11884
  */
@@ -11355,6 +11957,10 @@ interface Table {
11355
11957
  * Width of the column in the UI
11356
11958
  */
11357
11959
  width?: number;
11960
+ /**
11961
+ * ID of the schema
11962
+ */
11963
+ schemaId?: string;
11358
11964
  computed?: {
11359
11965
  action: "ai" | "code" | "workflow";
11360
11966
  dependencies?: string[];
@@ -11606,6 +12212,12 @@ declare class Client$1 {
11606
12212
  readonly updateTask: (input: UpdateTaskInput) => Promise<UpdateTaskResponse>;
11607
12213
  readonly deleteTask: (input: DeleteTaskInput) => Promise<DeleteTaskResponse>;
11608
12214
  readonly listTasks: (input: ListTasksInput) => Promise<ListTasksResponse>;
12215
+ readonly createWorkflow: (input: CreateWorkflowInput) => Promise<CreateWorkflowResponse>;
12216
+ readonly getWorkflow: (input: GetWorkflowInput) => Promise<GetWorkflowResponse>;
12217
+ readonly updateWorkflow: (input: UpdateWorkflowInput) => Promise<UpdateWorkflowResponse>;
12218
+ readonly deleteWorkflow: (input: DeleteWorkflowInput) => Promise<DeleteWorkflowResponse>;
12219
+ readonly listWorkflows: (input: ListWorkflowsInput) => Promise<ListWorkflowsResponse>;
12220
+ readonly getOrCreateWorkflow: (input: GetOrCreateWorkflowInput) => Promise<GetOrCreateWorkflowResponse>;
11609
12221
  readonly trackAnalytics: (input: TrackAnalyticsInput) => Promise<TrackAnalyticsResponse>;
11610
12222
  readonly runVrl: (input: RunVrlInput) => Promise<RunVrlResponse>;
11611
12223
  readonly getAccount: (input: GetAccountInput) => Promise<GetAccountResponse>;
@@ -11678,6 +12290,7 @@ declare class Client$1 {
11678
12290
  readonly getUsage: (input: GetUsageInput) => Promise<GetUsageResponse>;
11679
12291
  readonly getMultipleUsages: (input: GetMultipleUsagesInput) => Promise<GetMultipleUsagesResponse>;
11680
12292
  readonly listUsageHistory: (input: ListUsageHistoryInput) => Promise<ListUsageHistoryResponse>;
12293
+ readonly listUsageActivity: (input: ListUsageActivityInput) => Promise<ListUsageActivityResponse>;
11681
12294
  readonly changeAISpendQuota: (input: ChangeAispendQuotaInput) => Promise<ChangeAispendQuotaResponse>;
11682
12295
  readonly listActivities: (input: ListActivitiesInput) => Promise<ListActivitiesResponse>;
11683
12296
  readonly introspect: (input: IntrospectInput) => Promise<IntrospectResponse>;
@@ -12035,6 +12648,7 @@ declare class Lister {
12035
12648
  readonly conversations: (props: ListInputs['listConversations']) => AsyncCollection<{
12036
12649
  id: string;
12037
12650
  currentTaskId?: string | undefined;
12651
+ currentWorkflowId?: string | undefined;
12038
12652
  createdAt: string;
12039
12653
  updatedAt: string;
12040
12654
  channel: string;
@@ -12063,7 +12677,7 @@ declare class Lister {
12063
12677
  conversationId?: string | undefined;
12064
12678
  userId?: string | undefined;
12065
12679
  messageId?: string | undefined;
12066
- status: "pending" | "processed" | "ignored" | "failed";
12680
+ status: "pending" | "processed" | "ignored" | "failed" | "scheduled";
12067
12681
  failureReason: string | null;
12068
12682
  }>;
12069
12683
  readonly messages: (props: ListInputs['listMessages']) => AsyncCollection<{