@botpress/api 0.16.2 → 0.16.4

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/src/gen/state.ts CHANGED
@@ -11,6 +11,7 @@ export type State = opapi.State<
11
11
  | "Usage"
12
12
  | "Issue"
13
13
  | "IssueEvent"
14
+ | "Activity"
14
15
  | "User"
15
16
  | "Conversation"
16
17
  | "Event"
@@ -39,6 +40,7 @@ export type State = opapi.State<
39
40
  | "usage"
40
41
  | "quotas"
41
42
  | "helper"
43
+ | "activity"
42
44
  | "tables"
43
45
  >;
44
46
  export const state = {
@@ -265,6 +267,9 @@ export const state = {
265
267
  schema: {
266
268
  type: "object",
267
269
  properties: {
270
+ currentTaskId: {
271
+ type: "string",
272
+ },
268
273
  tags: {
269
274
  type: "object",
270
275
  additionalProperties: {
@@ -273,7 +278,6 @@ export const state = {
273
278
  description: "Tags for the [Conversation](#schema_conversation)",
274
279
  },
275
280
  },
276
- required: ["tags"],
277
281
  title: "updateConversationBody",
278
282
  additionalProperties: false,
279
283
  },
@@ -1303,7 +1307,7 @@ export const state = {
1303
1307
  in: "path",
1304
1308
  type: "string",
1305
1309
  description: "State type",
1306
- enum: ["conversation", "user", "bot", "integration"],
1310
+ enum: ["conversation", "user", "bot", "integration", "task"],
1307
1311
  },
1308
1312
  id: {
1309
1313
  in: "path",
@@ -1344,7 +1348,7 @@ export const state = {
1344
1348
  in: "path",
1345
1349
  type: "string",
1346
1350
  description: "State type",
1347
- enum: ["conversation", "user", "bot", "integration"],
1351
+ enum: ["conversation", "user", "bot", "integration", "task"],
1348
1352
  },
1349
1353
  id: {
1350
1354
  in: "path",
@@ -1410,7 +1414,7 @@ export const state = {
1410
1414
  in: "path",
1411
1415
  type: "string",
1412
1416
  description: "State type",
1413
- enum: ["conversation", "user", "bot", "integration"],
1417
+ enum: ["conversation", "user", "bot", "integration", "task"],
1414
1418
  },
1415
1419
  id: {
1416
1420
  in: "path",
@@ -1578,16 +1582,20 @@ export const state = {
1578
1582
  properties: {
1579
1583
  title: {
1580
1584
  type: "string",
1585
+ maxLength: 2000,
1581
1586
  description: "Title describing the task",
1582
1587
  },
1583
- instruction: {
1588
+ description: {
1584
1589
  type: "string",
1590
+ maxLength: 20000,
1585
1591
  description:
1586
1592
  "All the notes related to the execution of the current task",
1587
1593
  },
1588
1594
  type: {
1589
1595
  type: "string",
1590
- description: "Type of the task",
1596
+ maxLength: 200,
1597
+ description:
1598
+ "Unique identifier of the integration that was installed on the bot",
1591
1599
  },
1592
1600
  data: {
1593
1601
  type: "object",
@@ -1622,7 +1630,7 @@ export const state = {
1622
1630
  description: "Tags for the [Task](#schema_task)",
1623
1631
  },
1624
1632
  },
1625
- required: ["title", "type", "conversationId"],
1633
+ required: ["type", "conversationId"],
1626
1634
  title: "createTaskBody",
1627
1635
  additionalProperties: false,
1628
1636
  },
@@ -1668,7 +1676,7 @@ export const state = {
1668
1676
  type: "string",
1669
1677
  description: "Title describing the task",
1670
1678
  },
1671
- instruction: {
1679
+ description: {
1672
1680
  type: "string",
1673
1681
  description:
1674
1682
  "All the notes related to the execution of the current task",
@@ -1693,6 +1701,8 @@ export const state = {
1693
1701
  "completed",
1694
1702
  "blocked",
1695
1703
  "paused",
1704
+ "timeout",
1705
+ "cancelled",
1696
1706
  ],
1697
1707
  description: "Status of the task",
1698
1708
  },
@@ -1790,7 +1800,7 @@ export const state = {
1790
1800
  },
1791
1801
  status: {
1792
1802
  in: "query",
1793
- type: "string",
1803
+ type: "string[]",
1794
1804
  description: "Status",
1795
1805
  enum: [
1796
1806
  "pending",
@@ -1799,6 +1809,8 @@ export const state = {
1799
1809
  "completed",
1800
1810
  "blocked",
1801
1811
  "paused",
1812
+ "timeout",
1813
+ "cancelled",
1802
1814
  ],
1803
1815
  },
1804
1816
  type: {
@@ -2319,9 +2331,9 @@ export const state = {
2319
2331
  properties: {
2320
2332
  type: {
2321
2333
  type: "string",
2322
- enum: ["conversation", "user", "bot"],
2334
+ enum: ["conversation", "user", "bot", "task"],
2323
2335
  description:
2324
- "Type of the [State](#schema_state) (`conversation`, `user` or `bot`)",
2336
+ "Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)",
2325
2337
  },
2326
2338
  schema: {
2327
2339
  type: "object",
@@ -2746,9 +2758,9 @@ export const state = {
2746
2758
  properties: {
2747
2759
  type: {
2748
2760
  type: "string",
2749
- enum: ["conversation", "user", "bot"],
2761
+ enum: ["conversation", "user", "bot", "task"],
2750
2762
  description:
2751
- "Type of the [State](#schema_state) (`conversation`, `user` or `bot`)",
2763
+ "Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)",
2752
2764
  },
2753
2765
  schema: {
2754
2766
  type: "object",
@@ -5215,7 +5227,7 @@ export const state = {
5215
5227
  linkTemplateScript: {
5216
5228
  type: "string",
5217
5229
  maxLength: 2000,
5218
- description: "Signing secret of the [Bot](#schema_bot)",
5230
+ description: "Title describing the task",
5219
5231
  },
5220
5232
  },
5221
5233
  additionalProperties: false,
@@ -5320,12 +5332,12 @@ export const state = {
5320
5332
  fallbackHandlerScript: {
5321
5333
  type: "string",
5322
5334
  maxLength: 2000,
5323
- description: "Signing secret of the [Bot](#schema_bot)",
5335
+ description: "Title describing the task",
5324
5336
  },
5325
5337
  extractScript: {
5326
5338
  type: "string",
5327
5339
  maxLength: 2000,
5328
- description: "Signing secret of the [Bot](#schema_bot)",
5340
+ description: "Title describing the task",
5329
5341
  },
5330
5342
  },
5331
5343
  additionalProperties: false,
@@ -5588,7 +5600,7 @@ export const state = {
5588
5600
  linkTemplateScript: {
5589
5601
  type: "string",
5590
5602
  maxLength: 2000,
5591
- description: "Signing secret of the [Bot](#schema_bot)",
5603
+ description: "Title describing the task",
5592
5604
  nullable: true,
5593
5605
  },
5594
5606
  required: {
@@ -5719,13 +5731,13 @@ export const state = {
5719
5731
  extractScript: {
5720
5732
  type: "string",
5721
5733
  maxLength: 2000,
5722
- description: "Signing secret of the [Bot](#schema_bot)",
5734
+ description: "Title describing the task",
5723
5735
  nullable: true,
5724
5736
  },
5725
5737
  fallbackHandlerScript: {
5726
5738
  type: "string",
5727
5739
  maxLength: 2000,
5728
- description: "Signing secret of the [Bot](#schema_bot)",
5740
+ description: "Title describing the task",
5729
5741
  nullable: true,
5730
5742
  },
5731
5743
  },
@@ -6342,6 +6354,64 @@ export const state = {
6342
6354
  },
6343
6355
  parameters: {},
6344
6356
  },
6357
+ listActivities: {
6358
+ name: "listActivities",
6359
+ description: "List activities of a task",
6360
+ method: "get",
6361
+ section: "activity",
6362
+ path: "/v1/admin/activities",
6363
+ disableDefaultParameters: {
6364
+ "x-workspace-id": true,
6365
+ },
6366
+ parameters: {
6367
+ nextToken: {
6368
+ in: "query",
6369
+ description:
6370
+ "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
6371
+ type: "string",
6372
+ },
6373
+ taskId: {
6374
+ in: "query",
6375
+ description: "ID of the task to list activities for",
6376
+ type: "string",
6377
+ required: true,
6378
+ },
6379
+ botId: {
6380
+ in: "query",
6381
+ description: "ID of the bot to list activities for",
6382
+ type: "string",
6383
+ required: true,
6384
+ },
6385
+ },
6386
+ response: {
6387
+ description: "Success",
6388
+ schema: {
6389
+ type: "object",
6390
+ properties: {
6391
+ activities: {
6392
+ type: "array",
6393
+ items: {
6394
+ $ref: "#/components/schemas/Activity",
6395
+ },
6396
+ },
6397
+ meta: {
6398
+ type: "object",
6399
+ properties: {
6400
+ nextToken: {
6401
+ type: "string",
6402
+ description:
6403
+ "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.",
6404
+ },
6405
+ },
6406
+ additionalProperties: false,
6407
+ },
6408
+ },
6409
+ required: ["activities", "meta"],
6410
+ title: "listActivitiesResponse",
6411
+ additionalProperties: false,
6412
+ },
6413
+ },
6414
+ },
6345
6415
  introspect: {
6346
6416
  name: "introspect",
6347
6417
  description: "Introspect the API",
@@ -6563,7 +6633,7 @@ export const state = {
6563
6633
  title: "Botpress API",
6564
6634
  description: "API for Botpress Cloud",
6565
6635
  server: "https://api.botpress.cloud",
6566
- version: "0.16.2",
6636
+ version: "0.16.4",
6567
6637
  prefix: "v1",
6568
6638
  },
6569
6639
  errors: [
@@ -6811,6 +6881,7 @@ export const state = {
6811
6881
  getUsageResponse: true,
6812
6882
  listUsageHistoryResponse: true,
6813
6883
  changeAISpendQuotaResponse: true,
6884
+ listActivitiesResponse: true,
6814
6885
  introspectResponse: true,
6815
6886
  createFileResponse: true,
6816
6887
  getFileResponse: true,
@@ -6827,6 +6898,7 @@ export const state = {
6827
6898
  Usage: true,
6828
6899
  Issue: true,
6829
6900
  IssueEvent: true,
6901
+ Activity: true,
6830
6902
  User: true,
6831
6903
  Conversation: true,
6832
6904
  Event: true,
@@ -6866,7 +6938,7 @@ export const state = {
6866
6938
  signingSecret: {
6867
6939
  type: "string",
6868
6940
  maxLength: 2000,
6869
- description: "Signing secret of the [Bot](#schema_bot)",
6941
+ description: "Title describing the task",
6870
6942
  },
6871
6943
  integrations: {
6872
6944
  type: "object",
@@ -6879,30 +6951,27 @@ export const state = {
6879
6951
  name: {
6880
6952
  type: "string",
6881
6953
  maxLength: 200,
6882
- description:
6883
- "Type of the [Message](#schema_message) represents the resource type that the message is related to",
6954
+ description: "Type of the task",
6884
6955
  },
6885
6956
  version: {
6886
6957
  type: "string",
6887
6958
  maxLength: 200,
6888
- description:
6889
- "Type of the [Message](#schema_message) represents the resource type that the message is related to",
6959
+ description: "Type of the task",
6890
6960
  },
6891
6961
  webhookUrl: {
6892
6962
  type: "string",
6893
6963
  maxLength: 2000,
6894
- description: "Signing secret of the [Bot](#schema_bot)",
6964
+ description: "Title describing the task",
6895
6965
  },
6896
6966
  webhookId: {
6897
6967
  type: "string",
6898
6968
  maxLength: 200,
6899
- description:
6900
- "Type of the [Message](#schema_message) represents the resource type that the message is related to",
6969
+ description: "Type of the task",
6901
6970
  },
6902
6971
  identifier: {
6903
6972
  type: "string",
6904
6973
  maxLength: 2000,
6905
- description: "Signing secret of the [Bot](#schema_bot)",
6974
+ description: "Title describing the task",
6906
6975
  },
6907
6976
  configuration: {
6908
6977
  type: "object",
@@ -6922,7 +6991,7 @@ export const state = {
6922
6991
  statusReason: {
6923
6992
  type: "string",
6924
6993
  maxLength: 2000,
6925
- description: "Signing secret of the [Bot](#schema_bot)",
6994
+ description: "Title describing the task",
6926
6995
  nullable: true,
6927
6996
  },
6928
6997
  id: {
@@ -7076,9 +7145,9 @@ export const state = {
7076
7145
  properties: {
7077
7146
  type: {
7078
7147
  type: "string",
7079
- enum: ["conversation", "user", "bot"],
7148
+ enum: ["conversation", "user", "bot", "task"],
7080
7149
  description:
7081
- "Type of the [State](#schema_state) (`conversation`, `user` or `bot`)",
7150
+ "Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)",
7082
7151
  },
7083
7152
  schema: {
7084
7153
  type: "object",
@@ -7154,8 +7223,7 @@ export const state = {
7154
7223
  cron: {
7155
7224
  type: "string",
7156
7225
  maxLength: 200,
7157
- description:
7158
- "Type of the [Message](#schema_message) represents the resource type that the message is related to",
7226
+ description: "Type of the task",
7159
7227
  },
7160
7228
  },
7161
7229
  required: ["cron"],
@@ -7164,8 +7232,7 @@ export const state = {
7164
7232
  type: {
7165
7233
  type: "string",
7166
7234
  maxLength: 200,
7167
- description:
7168
- "Type of the [Message](#schema_message) represents the resource type that the message is related to",
7235
+ description: "Type of the task",
7169
7236
  },
7170
7237
  payload: {
7171
7238
  type: "object",
@@ -7332,14 +7399,12 @@ export const state = {
7332
7399
  name: {
7333
7400
  type: "string",
7334
7401
  maxLength: 200,
7335
- description:
7336
- "Type of the [Message](#schema_message) represents the resource type that the message is related to",
7402
+ description: "Type of the task",
7337
7403
  },
7338
7404
  version: {
7339
7405
  type: "string",
7340
7406
  maxLength: 200,
7341
- description:
7342
- "Type of the [Message](#schema_message) represents the resource type that the message is related to",
7407
+ description: "Type of the task",
7343
7408
  },
7344
7409
  configuration: {
7345
7410
  type: "object",
@@ -7350,7 +7415,7 @@ export const state = {
7350
7415
  linkTemplateScript: {
7351
7416
  type: "string",
7352
7417
  maxLength: 2000,
7353
- description: "Signing secret of the [Bot](#schema_bot)",
7418
+ description: "Title describing the task",
7354
7419
  },
7355
7420
  required: {
7356
7421
  type: "boolean",
@@ -7979,6 +8044,56 @@ export const state = {
7979
8044
  additionalProperties: false,
7980
8045
  },
7981
8046
  },
8047
+ Activity: {
8048
+ section: "activity",
8049
+ schema: {
8050
+ type: "object",
8051
+ properties: {
8052
+ id: {
8053
+ type: "string",
8054
+ },
8055
+ description: {
8056
+ type: "string",
8057
+ },
8058
+ taskId: {
8059
+ type: "string",
8060
+ },
8061
+ category: {
8062
+ type: "string",
8063
+ enum: [
8064
+ "unknown",
8065
+ "capture",
8066
+ "bot_message",
8067
+ "user_message",
8068
+ "agent_message",
8069
+ "event",
8070
+ "action",
8071
+ "task_status",
8072
+ "subtask_status",
8073
+ "exception",
8074
+ ],
8075
+ },
8076
+ data: {
8077
+ type: "object",
8078
+ additionalProperties: true,
8079
+ },
8080
+ createdAt: {
8081
+ type: "string",
8082
+ format: "date-time",
8083
+ description: "Creation date of the activity in ISO 8601 format",
8084
+ },
8085
+ },
8086
+ required: [
8087
+ "id",
8088
+ "description",
8089
+ "taskId",
8090
+ "category",
8091
+ "data",
8092
+ "createdAt",
8093
+ ],
8094
+ additionalProperties: false,
8095
+ },
8096
+ },
7982
8097
  User: {
7983
8098
  section: "user",
7984
8099
  schema: {
@@ -8108,8 +8223,7 @@ export const state = {
8108
8223
  type: {
8109
8224
  type: "string",
8110
8225
  maxLength: 200,
8111
- description:
8112
- "Type of the [Message](#schema_message) represents the resource type that the message is related to",
8226
+ description: "Type of the task",
8113
8227
  },
8114
8228
  payload: {
8115
8229
  type: "object",
@@ -8180,8 +8294,7 @@ export const state = {
8180
8294
  type: {
8181
8295
  type: "string",
8182
8296
  maxLength: 200,
8183
- description:
8184
- "Type of the [Message](#schema_message) represents the resource type that the message is related to",
8297
+ description: "Type of the task",
8185
8298
  },
8186
8299
  payload: {
8187
8300
  type: "object",
@@ -8274,14 +8387,13 @@ export const state = {
8274
8387
  name: {
8275
8388
  type: "string",
8276
8389
  maxLength: 200,
8277
- description:
8278
- "Type of the [Message](#schema_message) represents the resource type that the message is related to",
8390
+ description: "Type of the task",
8279
8391
  },
8280
8392
  type: {
8281
8393
  type: "string",
8282
- enum: ["conversation", "user", "bot", "integration"],
8394
+ enum: ["conversation", "user", "bot", "task", "integration"],
8283
8395
  description:
8284
- "Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot` or `integration`) that the state is related to",
8396
+ "Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task` or `integration`) that the state is related to",
8285
8397
  },
8286
8398
  payload: {
8287
8399
  type: "object",
@@ -8320,7 +8432,7 @@ export const state = {
8320
8432
  maxLength: 64,
8321
8433
  description: "Title describing the task",
8322
8434
  },
8323
- instruction: {
8435
+ description: {
8324
8436
  type: "string",
8325
8437
  maxLength: 256,
8326
8438
  description:
@@ -8344,6 +8456,8 @@ export const state = {
8344
8456
  "completed",
8345
8457
  "blocked",
8346
8458
  "paused",
8459
+ "timeout",
8460
+ "cancelled",
8347
8461
  ],
8348
8462
  description: "Status of the task",
8349
8463
  },
@@ -8399,7 +8513,7 @@ export const state = {
8399
8513
  required: [
8400
8514
  "id",
8401
8515
  "title",
8402
- "instruction",
8516
+ "description",
8403
8517
  "type",
8404
8518
  "data",
8405
8519
  "status",
@@ -8508,6 +8622,10 @@ export const state = {
8508
8622
  index: {
8509
8623
  type: "integer",
8510
8624
  },
8625
+ id: {
8626
+ type: "string",
8627
+ description: "[deprecated] ID of the column.",
8628
+ },
8511
8629
  searchable: {
8512
8630
  type: "boolean",
8513
8631
  description:
@@ -8530,7 +8648,9 @@ export const state = {
8530
8648
  },
8531
8649
  additionalProperties: {
8532
8650
  type: "boolean",
8533
- enum: [false],
8651
+ enum: [true],
8652
+ description:
8653
+ "Additional properties can be provided, but they will be ignored if no column matches.",
8534
8654
  },
8535
8655
  required: {
8536
8656
  type: "array",
@@ -8848,6 +8968,13 @@ export const state = {
8848
8968
  name: "helper",
8849
8969
  operations: ["runVrl"],
8850
8970
  },
8971
+ {
8972
+ title: "Activity",
8973
+ description: "",
8974
+ name: "activity",
8975
+ operations: ["listActivities"],
8976
+ schema: "Activity",
8977
+ },
8851
8978
  {
8852
8979
  title: "Tables",
8853
8980
  description: "Operations related to table management.",