@botpress/client 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/bundle.cjs +13 -10
  2. package/dist/bundle.cjs.map +4 -4
  3. package/dist/gen/index.d.ts +372 -13
  4. package/dist/gen/models.d.ts +1160 -0
  5. package/dist/gen/operations/addParticipant.d.ts +56 -0
  6. package/dist/gen/operations/breakDownWorkspaceUsageByBot.d.ts +27 -0
  7. package/dist/gen/operations/callAction.d.ts +36 -0
  8. package/dist/gen/operations/changeAISpendQuota.d.ts +21 -0
  9. package/dist/gen/operations/chargeWorkspaceUnpaidInvoices.d.ts +40 -0
  10. package/dist/gen/operations/checkHandleAvailability.d.ts +24 -0
  11. package/dist/gen/operations/configureIntegration.d.ts +24 -0
  12. package/dist/gen/operations/createBot.d.ts +487 -0
  13. package/dist/gen/operations/createConversation.d.ts +70 -0
  14. package/dist/gen/operations/createEvent.d.ts +95 -0
  15. package/dist/gen/operations/createFile.d.ts +108 -0
  16. package/dist/gen/operations/createIntegration.d.ts +533 -0
  17. package/dist/gen/operations/createIntegrationApiKey.d.ts +29 -0
  18. package/dist/gen/operations/createMessage.d.ts +98 -0
  19. package/dist/gen/operations/createPersonalAccessToken.d.ts +33 -0
  20. package/dist/gen/operations/createTable.d.ts +151 -0
  21. package/dist/gen/operations/createTableRows.d.ts +71 -0
  22. package/dist/gen/operations/createTask.d.ts +125 -0
  23. package/dist/gen/operations/createUser.d.ts +70 -0
  24. package/dist/gen/operations/createWorkspace.d.ts +39 -0
  25. package/dist/gen/operations/createWorkspaceMember.d.ts +27 -0
  26. package/dist/gen/operations/deleteBot.d.ts +21 -0
  27. package/dist/gen/operations/deleteBotIssue.d.ts +22 -0
  28. package/dist/gen/operations/deleteConversation.d.ts +21 -0
  29. package/dist/gen/operations/deleteFile.d.ts +21 -0
  30. package/dist/gen/operations/deleteIntegration.d.ts +21 -0
  31. package/dist/gen/operations/deleteIntegrationApiKey.d.ts +21 -0
  32. package/dist/gen/operations/deleteMessage.d.ts +21 -0
  33. package/dist/gen/operations/deletePersonalAccessToken.d.ts +21 -0
  34. package/dist/gen/operations/deleteTable.d.ts +21 -0
  35. package/dist/gen/operations/deleteTableRows.d.ts +36 -0
  36. package/dist/gen/operations/deleteTask.d.ts +21 -0
  37. package/dist/gen/operations/deleteUser.d.ts +21 -0
  38. package/dist/gen/operations/deleteWorkspace.d.ts +21 -0
  39. package/dist/gen/operations/deleteWorkspaceMember.d.ts +21 -0
  40. package/dist/gen/operations/duplicateTable.d.ts +137 -0
  41. package/dist/gen/operations/findTableRows.d.ts +94 -0
  42. package/dist/gen/operations/getAccount.d.ts +31 -0
  43. package/dist/gen/operations/getAccountPreference.d.ts +22 -0
  44. package/dist/gen/operations/getAllWorkspaceQuotaCompletion.d.ts +24 -0
  45. package/dist/gen/operations/getAuditRecords.d.ts +38 -0
  46. package/dist/gen/operations/getBot.d.ts +308 -0
  47. package/dist/gen/operations/getBotAnalytics.d.ts +49 -0
  48. package/dist/gen/operations/getBotLogs.d.ts +30 -0
  49. package/dist/gen/operations/getBotWebchat.d.ts +23 -0
  50. package/dist/gen/operations/getConversation.d.ts +56 -0
  51. package/dist/gen/operations/getEvent.d.ts +61 -0
  52. package/dist/gen/operations/getFile.d.ts +85 -0
  53. package/dist/gen/operations/getIntegration.d.ts +295 -0
  54. package/dist/gen/operations/getIntegrationByName.d.ts +296 -0
  55. package/dist/gen/operations/getIntegrationLogs.d.ts +30 -0
  56. package/dist/gen/operations/getMessage.d.ts +62 -0
  57. package/dist/gen/operations/getOrCreateConversation.d.ts +70 -0
  58. package/dist/gen/operations/getOrCreateMessage.d.ts +98 -0
  59. package/dist/gen/operations/getOrCreateTable.d.ts +164 -0
  60. package/dist/gen/operations/getOrCreateUser.d.ts +70 -0
  61. package/dist/gen/operations/getOrSetState.d.ts +76 -0
  62. package/dist/gen/operations/getParticipant.d.ts +53 -0
  63. package/dist/gen/operations/getPublicIntegration.d.ts +301 -0
  64. package/dist/gen/operations/getPublicIntegrationById.d.ts +300 -0
  65. package/dist/gen/operations/getPublicWorkspace.d.ts +31 -0
  66. package/dist/gen/operations/getState.d.ts +66 -0
  67. package/dist/gen/operations/getTable.d.ts +136 -0
  68. package/dist/gen/operations/getTableRow.d.ts +53 -0
  69. package/dist/gen/operations/getTask.d.ts +86 -0
  70. package/dist/gen/operations/getUpcomingInvoice.d.ts +29 -0
  71. package/dist/gen/operations/getUsage.d.ts +45 -0
  72. package/dist/gen/operations/getUser.d.ts +52 -0
  73. package/dist/gen/operations/getWorkspace.d.ts +39 -0
  74. package/dist/gen/operations/getWorkspaceMember.d.ts +25 -0
  75. package/dist/gen/operations/getWorkspaceQuota.d.ts +37 -0
  76. package/dist/gen/operations/introspect.d.ts +24 -0
  77. package/dist/gen/operations/listActivities.d.ts +42 -0
  78. package/dist/gen/operations/listBotIssueEvents.d.ts +32 -0
  79. package/dist/gen/operations/listBotIssues.d.ts +45 -0
  80. package/dist/gen/operations/listBots.d.ts +44 -0
  81. package/dist/gen/operations/listConversations.d.ts +64 -0
  82. package/dist/gen/operations/listEvents.d.ts +69 -0
  83. package/dist/gen/operations/listFiles.d.ts +94 -0
  84. package/dist/gen/operations/listIntegrationApiKeys.d.ts +26 -0
  85. package/dist/gen/operations/listIntegrations.d.ts +68 -0
  86. package/dist/gen/operations/listMessages.d.ts +69 -0
  87. package/dist/gen/operations/listParticipants.d.ts +56 -0
  88. package/dist/gen/operations/listPersonalAccessTokens.d.ts +25 -0
  89. package/dist/gen/operations/listPublicIntegrations.d.ts +72 -0
  90. package/dist/gen/operations/listTables.d.ts +126 -0
  91. package/dist/gen/operations/listTasks.d.ts +97 -0
  92. package/dist/gen/operations/listUsageHistory.d.ts +44 -0
  93. package/dist/gen/operations/listUsers.d.ts +59 -0
  94. package/dist/gen/operations/listWorkspaceInvoices.d.ts +53 -0
  95. package/dist/gen/operations/listWorkspaceMembers.d.ts +34 -0
  96. package/dist/gen/operations/listWorkspaceQuotas.d.ts +36 -0
  97. package/dist/gen/operations/listWorkspaceUsages.d.ts +45 -0
  98. package/dist/gen/operations/listWorkspaces.d.ts +48 -0
  99. package/dist/gen/operations/patchState.d.ts +72 -0
  100. package/dist/gen/operations/removeParticipant.d.ts +22 -0
  101. package/dist/gen/operations/renameTableColumn.d.ts +132 -0
  102. package/dist/gen/operations/runVrl.d.ts +28 -0
  103. package/dist/gen/operations/searchFiles.d.ts +60 -0
  104. package/dist/gen/operations/setAccountPreference.d.ts +22 -0
  105. package/dist/gen/operations/setState.d.ts +76 -0
  106. package/dist/gen/operations/setWorkspacePaymentMethod.d.ts +37 -0
  107. package/dist/gen/operations/trackAnalytics.d.ts +22 -0
  108. package/dist/gen/operations/transferBot.d.ts +25 -0
  109. package/dist/gen/operations/updateAccount.d.ts +34 -0
  110. package/dist/gen/operations/updateBot.d.ts +486 -0
  111. package/dist/gen/operations/updateConversation.d.ts +63 -0
  112. package/dist/gen/operations/updateFile.d.ts +95 -0
  113. package/dist/gen/operations/updateIntegration.d.ts +522 -0
  114. package/dist/gen/operations/updateMessage.d.ts +68 -0
  115. package/dist/gen/operations/updateTable.d.ts +152 -0
  116. package/dist/gen/operations/updateTableRows.d.ts +74 -0
  117. package/dist/gen/operations/updateTask.d.ts +114 -0
  118. package/dist/gen/operations/updateUser.d.ts +66 -0
  119. package/dist/gen/operations/updateWorkspace.d.ts +51 -0
  120. package/dist/gen/operations/updateWorkspaceMember.d.ts +27 -0
  121. package/dist/gen/operations/upsertTableRows.d.ts +107 -0
  122. package/dist/index.cjs +4 -1
  123. package/dist/index.cjs.map +4 -4
  124. package/dist/index.d.ts +5 -14
  125. package/dist/index.mjs +4 -1
  126. package/dist/index.mjs.map +4 -4
  127. package/openapi.ts +3 -3
  128. package/package.json +4 -2
  129. package/readme.md +2 -3
  130. package/dist/gen/api.d.ts +0 -14260
  131. package/dist/gen/base.d.ts +0 -54
  132. package/dist/gen/client.d.ts +0 -255
  133. package/dist/gen/common.d.ts +0 -65
  134. package/dist/gen/configuration.d.ts +0 -83
@@ -0,0 +1,1160 @@
1
+ export interface Bot {
2
+ /**
3
+ * Id of the [Bot](#schema_bot)
4
+ */
5
+ id: string;
6
+ /**
7
+ * Creation date of the [Bot](#schema_bot) in ISO 8601 format
8
+ */
9
+ createdAt: string;
10
+ /**
11
+ * Updating date of the [Bot](#schema_bot) in ISO 8601 format
12
+ */
13
+ updatedAt: string;
14
+ /**
15
+ * Signing secret of the [Bot](#schema_bot)
16
+ */
17
+ signingSecret: string;
18
+ /**
19
+ * A mapping of integrations to their configuration
20
+ */
21
+ integrations: {
22
+ [k: string]: {
23
+ enabled: boolean;
24
+ /**
25
+ * Name of the [Integration](#schema_integration)
26
+ */
27
+ name: string;
28
+ /**
29
+ * Version of the [Integration](#schema_integration)
30
+ */
31
+ version: string;
32
+ webhookUrl: string;
33
+ webhookId: string;
34
+ identifier?: string;
35
+ configuration: {
36
+ [k: string]: any;
37
+ };
38
+ status: "registration_pending" | "registered" | "registration_failed" | "unregistration_pending" | "unregistered" | "unregistration_failed";
39
+ statusReason: string | null;
40
+ /**
41
+ * ID of the [Integration](#schema_integration)
42
+ */
43
+ id: string;
44
+ /**
45
+ * Creation date of the [Integration](#schema_integration) in ISO 8601 format
46
+ */
47
+ createdAt: string;
48
+ /**
49
+ * Updating date of the [Integration](#schema_integration) in ISO 8601 format
50
+ */
51
+ updatedAt: string;
52
+ /**
53
+ * Title of the integration. This is the name that will be displayed in the UI
54
+ */
55
+ title: string;
56
+ /**
57
+ * Description of the integration. This is the description that will be displayed in the UI
58
+ */
59
+ description: string;
60
+ /**
61
+ * URL of the icon of the integration. This is the icon that will be displayed in the UI
62
+ */
63
+ iconUrl: string;
64
+ /**
65
+ * Idicates if the integration is public. Public integrations are available to all and cannot be updated without creating a new version.
66
+ */
67
+ public: boolean;
68
+ };
69
+ };
70
+ /**
71
+ * User object configuration
72
+ */
73
+ user: {
74
+ tags: {
75
+ /**
76
+ * Definition of a tag that can be provided on the object
77
+ */
78
+ [k: string]: {
79
+ /**
80
+ * Title of the tag
81
+ */
82
+ title?: string;
83
+ /**
84
+ * Description of the tag
85
+ */
86
+ description?: string;
87
+ };
88
+ };
89
+ };
90
+ /**
91
+ * Conversation object configuration
92
+ */
93
+ conversation: {
94
+ tags: {
95
+ /**
96
+ * Definition of a tag that can be provided on the object
97
+ */
98
+ [k: string]: {
99
+ /**
100
+ * Title of the tag
101
+ */
102
+ title?: string;
103
+ /**
104
+ * Description of the tag
105
+ */
106
+ description?: string;
107
+ };
108
+ };
109
+ };
110
+ /**
111
+ * Message object configuration
112
+ */
113
+ message: {
114
+ tags: {
115
+ /**
116
+ * Definition of a tag that can be provided on the object
117
+ */
118
+ [k: string]: {
119
+ /**
120
+ * Title of the tag
121
+ */
122
+ title?: string;
123
+ /**
124
+ * Description of the tag
125
+ */
126
+ description?: string;
127
+ };
128
+ };
129
+ };
130
+ /**
131
+ * A mapping of states to their definition
132
+ */
133
+ states: {
134
+ [k: string]: {
135
+ /**
136
+ * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
137
+ */
138
+ type: "conversation" | "user" | "bot" | "task";
139
+ /**
140
+ * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
141
+ */
142
+ schema: {
143
+ [k: string]: any;
144
+ };
145
+ /**
146
+ * Expiry of the [State](#schema_state) in milliseconds. The state will expire if it is idle for the configured value. By default, a state doesn't expire.
147
+ */
148
+ expiry?: number;
149
+ };
150
+ };
151
+ /**
152
+ * Configuration of the bot
153
+ */
154
+ configuration: {
155
+ /**
156
+ * Configuration data
157
+ */
158
+ data: {
159
+ [k: string]: any;
160
+ };
161
+ /**
162
+ * Schema of the configuration in the `JSON schema` format. The configuration data is validated against this `JSON schema`.
163
+ */
164
+ schema: {
165
+ [k: string]: any;
166
+ };
167
+ };
168
+ /**
169
+ * Events definition
170
+ */
171
+ events: {
172
+ /**
173
+ * Event Definition
174
+ */
175
+ [k: string]: {
176
+ /**
177
+ * Title of the event
178
+ */
179
+ title?: string;
180
+ /**
181
+ * Description of the event
182
+ */
183
+ description?: string;
184
+ schema: {
185
+ [k: string]: any;
186
+ };
187
+ };
188
+ };
189
+ /**
190
+ * Recurring events
191
+ */
192
+ recurringEvents: {
193
+ [k: string]: {
194
+ schedule: {
195
+ cron: string;
196
+ };
197
+ type: string;
198
+ payload: {
199
+ [k: string]: any;
200
+ };
201
+ /**
202
+ * The number of times the recurring event failed to run. This counter resets once the recurring event runs successfully.
203
+ */
204
+ failedAttempts: number;
205
+ /**
206
+ * The reason why the recurring event failed to run in the last attempt.
207
+ */
208
+ lastFailureReason: string | null;
209
+ };
210
+ };
211
+ /**
212
+ * Subscriptions of the bot
213
+ */
214
+ subscriptions: {
215
+ /**
216
+ * Events that the bot is currently subscribed on (ex: "slack:reactionAdded"). If null, the bot is subscribed to all events.
217
+ */
218
+ events: {
219
+ [k: string]: {};
220
+ } | null;
221
+ };
222
+ /**
223
+ * Actions definition
224
+ */
225
+ actions: {
226
+ /**
227
+ * Action definition
228
+ */
229
+ [k: string]: {
230
+ /**
231
+ * Title of the action
232
+ */
233
+ title?: string;
234
+ /**
235
+ * Description of the action
236
+ */
237
+ description?: string;
238
+ input: {
239
+ schema: {
240
+ [k: string]: any;
241
+ };
242
+ };
243
+ output: {
244
+ schema: {
245
+ [k: string]: any;
246
+ };
247
+ };
248
+ };
249
+ };
250
+ /**
251
+ * Name of the [Bot](#schema_bot)
252
+ */
253
+ name: string;
254
+ /**
255
+ * Last deployment date of the [Bot](#schema_bot) in the ISO 8601 format
256
+ */
257
+ deployedAt?: string;
258
+ /**
259
+ * Indicates if the [Bot](#schema_bot) is a development bot; Development bots run locally and can install dev integrations
260
+ */
261
+ dev: boolean;
262
+ /**
263
+ * Id of the user that created the bot
264
+ */
265
+ createdBy?: string;
266
+ /**
267
+ * Indicates if the [Bot](#schema_bot) should be in always alive mode
268
+ */
269
+ alwaysAlive: boolean;
270
+ /**
271
+ * Status of the bot
272
+ */
273
+ status: "active" | "deploying";
274
+ /**
275
+ * Media files associated with the [Bot](#schema_bot)
276
+ */
277
+ medias: {
278
+ /**
279
+ * URL of the media file
280
+ */
281
+ url: string;
282
+ /**
283
+ * Name of the media file
284
+ */
285
+ name: string;
286
+ }[];
287
+ }
288
+ export interface Integration {
289
+ /**
290
+ * ID of the [Integration](#schema_integration)
291
+ */
292
+ id: string;
293
+ /**
294
+ * Creation date of the [Integration](#schema_integration) in ISO 8601 format
295
+ */
296
+ createdAt: string;
297
+ /**
298
+ * Updating date of the [Integration](#schema_integration) in ISO 8601 format
299
+ */
300
+ updatedAt: string;
301
+ /**
302
+ * Global identifier configuration of the [Integration](#schema_integration)
303
+ */
304
+ identifier: {
305
+ /**
306
+ * VRL Script of the [Integration](#schema_integration) to handle incoming requests for a request that doesn't have an identifier
307
+ */
308
+ fallbackHandlerScript?: string;
309
+ /**
310
+ * VRL Script of the [Integration](#schema_integration) to extract the identifier from an incoming webhook often use for OAuth
311
+ */
312
+ extractScript?: string;
313
+ };
314
+ /**
315
+ * URL of the [Integration](#schema_integration)
316
+ */
317
+ url: string;
318
+ /**
319
+ * Name of the [Integration](#schema_integration)
320
+ */
321
+ name: string;
322
+ /**
323
+ * Version of the [Integration](#schema_integration)
324
+ */
325
+ version: string;
326
+ /**
327
+ * Configuration definition
328
+ */
329
+ configuration: {
330
+ /**
331
+ * Identifier configuration of the [Integration](#schema_integration)
332
+ */
333
+ identifier: {
334
+ linkTemplateScript?: string;
335
+ required: boolean;
336
+ };
337
+ /**
338
+ * Schema of the configuration in the `JSON schema` format. The configuration data is validated against this `JSON schema`.
339
+ */
340
+ schema?: {
341
+ [k: string]: any;
342
+ };
343
+ };
344
+ channels: {
345
+ /**
346
+ * Channel definition
347
+ */
348
+ [k: string]: {
349
+ /**
350
+ * Title of the channel
351
+ */
352
+ title?: string;
353
+ /**
354
+ * Description of the channel
355
+ */
356
+ description?: string;
357
+ messages: {
358
+ /**
359
+ * Message definition
360
+ */
361
+ [k: string]: {
362
+ schema: {
363
+ [k: string]: any;
364
+ };
365
+ };
366
+ };
367
+ /**
368
+ * Conversation object configuration
369
+ */
370
+ conversation: {
371
+ tags: {
372
+ /**
373
+ * Definition of a tag that can be provided on the object
374
+ */
375
+ [k: string]: {
376
+ /**
377
+ * Title of the tag
378
+ */
379
+ title?: string;
380
+ /**
381
+ * Description of the tag
382
+ */
383
+ description?: string;
384
+ };
385
+ };
386
+ /**
387
+ * The conversation creation setting determines how to create a conversation through the API directly. The integration will have to implement the `createConversation` functionality to support this setting.
388
+ */
389
+ creation: {
390
+ /**
391
+ * Enable conversation creation
392
+ */
393
+ enabled: boolean;
394
+ /**
395
+ * The list of tags that are required to be specified when calling the API directly to create a conversation.
396
+ */
397
+ requiredTags: string[];
398
+ };
399
+ };
400
+ /**
401
+ * Message object configuration
402
+ */
403
+ message: {
404
+ tags: {
405
+ /**
406
+ * Definition of a tag that can be provided on the object
407
+ */
408
+ [k: string]: {
409
+ /**
410
+ * Title of the tag
411
+ */
412
+ title?: string;
413
+ /**
414
+ * Description of the tag
415
+ */
416
+ description?: string;
417
+ };
418
+ };
419
+ };
420
+ };
421
+ };
422
+ states: {
423
+ /**
424
+ * State definition
425
+ */
426
+ [k: string]: {
427
+ /**
428
+ * Type of the [State](#schema_state) (`conversation`, `user` or `integration`)
429
+ */
430
+ type: "conversation" | "user" | "integration";
431
+ /**
432
+ * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
433
+ */
434
+ schema: {
435
+ [k: string]: any;
436
+ };
437
+ };
438
+ };
439
+ events: {
440
+ /**
441
+ * Event Definition
442
+ */
443
+ [k: string]: {
444
+ /**
445
+ * Title of the event
446
+ */
447
+ title?: string;
448
+ /**
449
+ * Description of the event
450
+ */
451
+ description?: string;
452
+ schema: {
453
+ [k: string]: any;
454
+ };
455
+ };
456
+ };
457
+ actions: {
458
+ /**
459
+ * Action definition
460
+ */
461
+ [k: string]: {
462
+ /**
463
+ * Title of the action
464
+ */
465
+ title?: string;
466
+ /**
467
+ * Description of the action
468
+ */
469
+ description?: string;
470
+ input: {
471
+ schema: {
472
+ [k: string]: any;
473
+ };
474
+ };
475
+ output: {
476
+ schema: {
477
+ [k: string]: any;
478
+ };
479
+ };
480
+ };
481
+ };
482
+ /**
483
+ * User object configuration
484
+ */
485
+ user: {
486
+ tags: {
487
+ /**
488
+ * Definition of a tag that can be provided on the object
489
+ */
490
+ [k: string]: {
491
+ /**
492
+ * Title of the tag
493
+ */
494
+ title?: string;
495
+ /**
496
+ * Description of the tag
497
+ */
498
+ description?: string;
499
+ };
500
+ };
501
+ /**
502
+ * The user creation setting determines how to create a user through the API directly. The integration will have to implement the `createUser` functionality to support this setting.
503
+ */
504
+ creation: {
505
+ /**
506
+ * Enable user creation
507
+ */
508
+ enabled: boolean;
509
+ /**
510
+ * The list of tags that are required to be specified when calling the API directly to create a user.
511
+ */
512
+ requiredTags: string[];
513
+ };
514
+ };
515
+ entities: {
516
+ /**
517
+ * Entity definition
518
+ */
519
+ [k: string]: {
520
+ /**
521
+ * Title of the entity
522
+ */
523
+ title?: string;
524
+ /**
525
+ * Description of the entity
526
+ */
527
+ description?: string;
528
+ schema: {
529
+ [k: string]: any;
530
+ };
531
+ };
532
+ };
533
+ /**
534
+ * Indicates if the integration is a development integration; Dev integrations run locally
535
+ */
536
+ dev: boolean;
537
+ /**
538
+ * Title of the integration. This is the name that will be displayed in the UI
539
+ */
540
+ title: string;
541
+ /**
542
+ * Description of the integration. This is the description that will be displayed in the UI
543
+ */
544
+ description: string;
545
+ /**
546
+ * URL of the icon of the integration. This is the icon that will be displayed in the UI
547
+ */
548
+ iconUrl: string;
549
+ /**
550
+ * URL of the readme of the integration. This is the readme that will be displayed in the UI
551
+ */
552
+ readmeUrl: string;
553
+ /**
554
+ * Idicates if the integration is public. Public integrations are available to all and cannot be updated without creating a new version.
555
+ */
556
+ public: boolean;
557
+ /**
558
+ * Secrets are integration-wide values available in the code via environment variables formatted with a SECRET_ prefix followed by your secret name. A secret name must respect SCREAMING_SNAKE casing.
559
+ */
560
+ secrets: string[];
561
+ }
562
+ export interface Workspace {
563
+ id: string;
564
+ name: string;
565
+ ownerId: string;
566
+ createdAt: string;
567
+ updatedAt: string;
568
+ botCount: number;
569
+ accountType: "free" | "premium";
570
+ billingVersion: "v1" | "v2";
571
+ plan: "community" | "team" | "enterprise";
572
+ blocked: boolean;
573
+ spendingLimit: number;
574
+ about?: string;
575
+ profilePicture?: string;
576
+ contactEmail?: string;
577
+ website?: string;
578
+ socialAccounts?: string[];
579
+ isPublic?: boolean;
580
+ handle?: string;
581
+ }
582
+ export interface WorkspaceMember {
583
+ id: string;
584
+ userId?: string;
585
+ email: string;
586
+ createdAt: string;
587
+ role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
588
+ }
589
+ export interface Account {
590
+ id: string;
591
+ email: string;
592
+ displayName?: string;
593
+ emailVerified: boolean;
594
+ profilePicture?: string;
595
+ /**
596
+ * Creation date of the [Account](#schema_account) in ISO 8601 format
597
+ */
598
+ createdAt: string;
599
+ }
600
+ export interface Usage {
601
+ /**
602
+ * Id of the usage that it is linked to. It can either be a workspace id or a bot id
603
+ */
604
+ id: string;
605
+ /**
606
+ * Period of the quota that it is applied to
607
+ */
608
+ period: string;
609
+ /**
610
+ * Value of the current usage
611
+ */
612
+ value: number;
613
+ /**
614
+ * Quota of the current usage
615
+ */
616
+ quota: number;
617
+ /**
618
+ * Usage type that can be used
619
+ */
620
+ 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";
621
+ }
622
+ export interface Issue {
623
+ id: string;
624
+ code: string;
625
+ createdAt: string;
626
+ lastSeenAt: string;
627
+ title: string;
628
+ description: string;
629
+ groupedData: {
630
+ [k: string]: {
631
+ raw: string;
632
+ pretty?: string;
633
+ };
634
+ };
635
+ eventsCount: number;
636
+ category: "user_code" | "limits" | "configuration" | "other";
637
+ resolutionLink: string | null;
638
+ }
639
+ export interface IssueEvent {
640
+ id: string;
641
+ createdAt: string;
642
+ data: {
643
+ [k: string]: {
644
+ raw: string;
645
+ pretty?: string;
646
+ };
647
+ };
648
+ }
649
+ export interface Activity {
650
+ id: string;
651
+ description: string;
652
+ taskId: string;
653
+ category: "unknown" | "capture" | "bot_message" | "user_message" | "agent_message" | "event" | "action" | "task_status" | "subtask_status" | "exception";
654
+ data: {
655
+ [k: string]: any;
656
+ };
657
+ /**
658
+ * Creation date of the activity in ISO 8601 format
659
+ */
660
+ createdAt: string;
661
+ }
662
+ /**
663
+ * The user object represents someone interacting with the bot within a specific integration. The same person interacting with a bot in slack and messenger will be represented with two different users.
664
+ */
665
+ export interface User {
666
+ /**
667
+ * Id of the [User](#schema_user)
668
+ */
669
+ id: string;
670
+ /**
671
+ * Creation date of the [User](#schema_user) in ISO 8601 format
672
+ */
673
+ createdAt: string;
674
+ /**
675
+ * Updating date of the [User](#schema_user) in ISO 8601 format
676
+ */
677
+ updatedAt: string;
678
+ /**
679
+ * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [User](#schema_user). The set of [Tags](/docs/developers/concepts/tags) available on a [User](#schema_user) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them.
680
+ */
681
+ tags: {
682
+ [k: string]: string;
683
+ };
684
+ /**
685
+ * Name of the [User](#schema_user)
686
+ */
687
+ name?: string;
688
+ /**
689
+ * Picture URL of the [User](#schema_user)
690
+ */
691
+ pictureUrl?: string;
692
+ }
693
+ /**
694
+ * 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.
695
+ */
696
+ export interface Conversation {
697
+ /**
698
+ * Id of the [Conversation](#schema_conversation)
699
+ */
700
+ id: string;
701
+ /**
702
+ * Id of the current [Task](#schema_task)
703
+ */
704
+ currentTaskId?: string;
705
+ /**
706
+ * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
707
+ */
708
+ createdAt: string;
709
+ /**
710
+ * Updating date of the [Conversation](#schema_conversation) in ISO 8601 format
711
+ */
712
+ updatedAt: string;
713
+ /**
714
+ * Name of the channel where the [Conversation](#schema_conversation) is happening
715
+ */
716
+ channel: string;
717
+ /**
718
+ * Name of the integration that created the [Conversation](#schema_conversation)
719
+ */
720
+ integration: string;
721
+ /**
722
+ * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Conversation](#schema_conversation). The set of [Tags](/docs/developers/concepts/tags) available on a [Conversation](#schema_conversation) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them.
723
+ */
724
+ tags: {
725
+ [k: string]: string;
726
+ };
727
+ }
728
+ /**
729
+ * The event object represents an action or an occurrence.
730
+ */
731
+ export interface Event {
732
+ /**
733
+ * Id of the [Event](#schema_event)
734
+ */
735
+ id: string;
736
+ /**
737
+ * Creation date of the [Event](#schema_event) in ISO 8601 format
738
+ */
739
+ createdAt: string;
740
+ /**
741
+ * Type of the [Event](#schema_event).
742
+ */
743
+ type: string;
744
+ /**
745
+ * Payload is the content of the event defined by the integration installed on your bot or one of the default events created by our api.
746
+ */
747
+ payload: {
748
+ [k: string]: any;
749
+ };
750
+ /**
751
+ * ID of the [Conversation](#schema_conversation) to link the event to.
752
+ */
753
+ conversationId?: string;
754
+ /**
755
+ * ID of the [User](#schema_user) to link the event to.
756
+ */
757
+ userId?: string;
758
+ /**
759
+ * ID of the [Message](#schema_message) to link the event to.
760
+ */
761
+ messageId?: string;
762
+ status: "pending" | "processed" | "ignored" | "failed";
763
+ /**
764
+ * Reason why the event failed to be processed
765
+ */
766
+ failureReason: string | null;
767
+ }
768
+ /**
769
+ * The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).
770
+ */
771
+ export interface Message {
772
+ /**
773
+ * Id of the [Message](#schema_message)
774
+ */
775
+ id: string;
776
+ /**
777
+ * Creation date of the [Message](#schema_message) in ISO 8601 format
778
+ */
779
+ createdAt: string;
780
+ /**
781
+ * Type of the [Message](#schema_message) represents the resource type that the message is related to
782
+ */
783
+ type: string;
784
+ /**
785
+ * Payload is the content type of the message. Accepted payload options: Text, Image, Choice, Dropdown, Card, Carousel, File, Audio, Video, Location
786
+ */
787
+ payload: {
788
+ [k: string]: any;
789
+ };
790
+ /**
791
+ * Direction of the message (`incoming` or `outgoing`).
792
+ */
793
+ direction: "incoming" | "outgoing";
794
+ /**
795
+ * ID of the [User](#schema_user)
796
+ */
797
+ userId: string;
798
+ /**
799
+ * ID of the [Conversation](#schema_conversation)
800
+ */
801
+ conversationId: string;
802
+ /**
803
+ * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Conversation](#schema_conversation). The set of [Tags](/docs/developers/concepts/tags) available on a [Conversation](#schema_conversation) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them.
804
+ */
805
+ tags: {
806
+ [k: string]: string;
807
+ };
808
+ }
809
+ /**
810
+ * The state object represents the current payload. A state is always linked to either a bot, a conversation or a user.
811
+ */
812
+ export interface State {
813
+ /**
814
+ * Id of the [State](#schema_state)
815
+ */
816
+ id: string;
817
+ /**
818
+ * Creation date of the [State](#schema_state) in ISO 8601 format
819
+ */
820
+ createdAt: string;
821
+ /**
822
+ * Updating date of the [State](#schema_state) in ISO 8601 format
823
+ */
824
+ updatedAt: string;
825
+ /**
826
+ * Id of the [Bot](#schema_bot)
827
+ */
828
+ botId: string;
829
+ /**
830
+ * Id of the [Conversation](#schema_conversation)
831
+ */
832
+ conversationId?: string;
833
+ /**
834
+ * Id of the [User](#schema_user)
835
+ */
836
+ userId?: string;
837
+ /**
838
+ * Name of the [State](#schema_state) which is declared inside the bot definition
839
+ */
840
+ name: string;
841
+ /**
842
+ * Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task` or `integration`) that the state is related to
843
+ */
844
+ type: "conversation" | "user" | "bot" | "task" | "integration";
845
+ /**
846
+ * Payload is the content of the state defined by your bot.
847
+ */
848
+ payload: {
849
+ [k: string]: any;
850
+ };
851
+ }
852
+ /**
853
+ * Task definition
854
+ */
855
+ export interface Task {
856
+ /**
857
+ * Id of the [Task](#schema_task)
858
+ */
859
+ id: string;
860
+ /**
861
+ * Title describing the task
862
+ */
863
+ title: string;
864
+ /**
865
+ * All the notes related to the execution of the current task
866
+ */
867
+ description: string;
868
+ /**
869
+ * Type of the task
870
+ */
871
+ type: string;
872
+ /**
873
+ * Content related to the task
874
+ */
875
+ data: {
876
+ [k: string]: any;
877
+ };
878
+ /**
879
+ * Status of the task
880
+ */
881
+ status: "pending" | "in_progress" | "failed" | "completed" | "blocked" | "paused" | "timeout" | "cancelled";
882
+ /**
883
+ * Parent task id is the parent task that created this task
884
+ */
885
+ parentTaskId?: string;
886
+ /**
887
+ * Conversation id related to this task
888
+ */
889
+ conversationId?: string;
890
+ /**
891
+ * Specific user related to this task
892
+ */
893
+ userId?: string;
894
+ /**
895
+ * The timeout date where the task should be failed in the ISO 8601 format
896
+ */
897
+ timeoutAt: string;
898
+ /**
899
+ * Creation date of the task in ISO 8601 format
900
+ */
901
+ createdAt: string;
902
+ /**
903
+ * Updating date of the task in ISO 8601 format
904
+ */
905
+ updatedAt: string;
906
+ /**
907
+ * If the task fails this is the reason behind it
908
+ */
909
+ failureReason?: string;
910
+ /**
911
+ * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Task](#schema_task). Individual keys can be unset by posting an empty value to them.
912
+ */
913
+ tags: {
914
+ [k: string]: string;
915
+ };
916
+ }
917
+ export interface Table {
918
+ /**
919
+ * Unique identifier for the table
920
+ */
921
+ id: string;
922
+ /**
923
+ * Required. This name is used to identify your table.
924
+ */
925
+ name: string;
926
+ /**
927
+ * The 'factor' multiplies the row's data storage limit by 4KB and its quota count, but can only be set at table creation and not modified later. For instance, a factor of 2 increases storage to 8KB but counts as 2 rows in your quota. The default factor is 1.
928
+ */
929
+ factor?: number;
930
+ /**
931
+ * A table designated as "frozen" is immutable in terms of its name and schema structure; modifications to its schema or a renaming operation are not permitted. The only action that can be taken on such a table is deletion. The schema established at the time of creation is locked in as the final structure. To implement any changes, the table must be duplicated with the desired alterations.
932
+ */
933
+ frozen?: boolean;
934
+ schema: {
935
+ $schema: string;
936
+ /**
937
+ * List of keys/columns in the table.
938
+ */
939
+ properties: {
940
+ [k: string]: {
941
+ type: "string" | "number" | "boolean" | "object" | "null";
942
+ format?: "date-time";
943
+ description?: string;
944
+ nullable?: boolean;
945
+ "x-zui": {
946
+ index: number;
947
+ /**
948
+ * [deprecated] ID of the column.
949
+ */
950
+ id?: string;
951
+ /**
952
+ * Indicates if the column is vectorized and searchable.
953
+ */
954
+ searchable?: boolean;
955
+ /**
956
+ * Indicates if the field is hidden in the UI
957
+ */
958
+ hidden?: boolean;
959
+ /**
960
+ * Order of the column in the UI
961
+ */
962
+ order?: number;
963
+ /**
964
+ * Width of the column in the UI
965
+ */
966
+ width?: number;
967
+ computed?: {
968
+ action: "ai" | "code";
969
+ dependencies?: string[];
970
+ /**
971
+ * Prompt when action is "ai"
972
+ */
973
+ prompt?: string;
974
+ /**
975
+ * Model to use when action is "ai"
976
+ */
977
+ model?: "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-16k" | "gpt-4o" | "gpt-4" | "gpt-4-turbo" | "gpt-4-0125-preview" | "gpt-4-1106-preview";
978
+ /**
979
+ * Code to execute when action is "code"
980
+ */
981
+ code?: string;
982
+ enabled?: boolean;
983
+ };
984
+ /**
985
+ * TypeScript typings for the column. Recommended if the type is "object", ex: "\{ foo: string; bar: number \}"
986
+ */
987
+ typings?: string;
988
+ };
989
+ };
990
+ };
991
+ /**
992
+ * Additional properties can be provided, but they will be ignored if no column matches.
993
+ */
994
+ additionalProperties: true;
995
+ /**
996
+ * Array of required properties.
997
+ */
998
+ required?: string[];
999
+ type: "object";
1000
+ };
1001
+ /**
1002
+ * Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs.
1003
+ */
1004
+ tags?: {
1005
+ [k: string]: string;
1006
+ };
1007
+ /**
1008
+ * Indicates if the table is enabled for computation.
1009
+ */
1010
+ isComputeEnabled?: boolean;
1011
+ /**
1012
+ * Timestamp of table creation.
1013
+ */
1014
+ createdAt?: string;
1015
+ /**
1016
+ * Timestamp of the last table update.
1017
+ */
1018
+ updatedAt?: string;
1019
+ }
1020
+ export interface Column {
1021
+ /**
1022
+ * Unique identifier for the column.
1023
+ */
1024
+ id?: string;
1025
+ /**
1026
+ * Name of the column, must be within length limits.
1027
+ */
1028
+ name: string;
1029
+ /**
1030
+ * Optional descriptive text about the column.
1031
+ */
1032
+ description?: string;
1033
+ /**
1034
+ * Indicates if the column is vectorized and searchable.
1035
+ */
1036
+ searchable?: boolean;
1037
+ /**
1038
+ * Specifies the data type of the column. Use "object" for complex data structures.
1039
+ */
1040
+ type: "string" | "number" | "boolean" | "date" | "object";
1041
+ /**
1042
+ * TypeScript typings for the column. Recommended if the type is "object", ex: "\{ foo: string; bar: number \}"
1043
+ */
1044
+ typings?: string;
1045
+ computed?: {
1046
+ action: "ai" | "code";
1047
+ dependencies?: string[];
1048
+ /**
1049
+ * Prompt when action is "ai"
1050
+ */
1051
+ prompt?: string;
1052
+ /**
1053
+ * Model to use when action is "ai"
1054
+ */
1055
+ model?: "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-16k" | "gpt-4o" | "gpt-4" | "gpt-4-turbo" | "gpt-4-0125-preview" | "gpt-4-1106-preview";
1056
+ /**
1057
+ * Code to execute when action is "code"
1058
+ */
1059
+ code?: string;
1060
+ enabled?: boolean;
1061
+ };
1062
+ schema?: {
1063
+ [k: string]: any;
1064
+ };
1065
+ }
1066
+ export interface Row {
1067
+ /**
1068
+ * Unique identifier for the row.
1069
+ */
1070
+ id: number;
1071
+ /**
1072
+ * Timestamp of row creation.
1073
+ */
1074
+ createdAt?: string;
1075
+ /**
1076
+ * Timestamp of the last row update.
1077
+ */
1078
+ updatedAt?: string;
1079
+ computed: {
1080
+ [k: string]: {
1081
+ status: string;
1082
+ error?: string;
1083
+ updatedBy?: string;
1084
+ updatedAt?: string;
1085
+ };
1086
+ };
1087
+ /**
1088
+ * [Read-only] List of stale values that are waiting to be recomputed.
1089
+ */
1090
+ stale?: string[];
1091
+ /**
1092
+ * Optional numeric value indicating similarity, when using findTableRows.
1093
+ */
1094
+ similarity?: number;
1095
+ [k: string]: any;
1096
+ }
1097
+ export interface File {
1098
+ /**
1099
+ * File ID
1100
+ */
1101
+ id: string;
1102
+ /**
1103
+ * The ID of the bot the file belongs to
1104
+ */
1105
+ botId: string;
1106
+ /**
1107
+ * File name
1108
+ */
1109
+ name: string | null;
1110
+ /**
1111
+ * If the file is not uploaded yet, this will be set to a `null` value.
1112
+ *
1113
+ * If the file has a `public_content` policy, this will contain the permanent public URL to retrieve the file, otherwise this will contain a temporary pre-signed URL to download the file which should be used shortly after retrieving and should not be stored long-term as the URL will expire after a short timeframe.
1114
+ */
1115
+ url: string | null;
1116
+ /**
1117
+ * File size in bytes. Non-null if file upload status is "COMPLETE".
1118
+ */
1119
+ size: number | null;
1120
+ /**
1121
+ * MIME type of the file's content
1122
+ */
1123
+ contentType: string;
1124
+ /**
1125
+ * The tags of the file as an object of key/value pairs
1126
+ */
1127
+ tags: {
1128
+ [k: string]: string;
1129
+ };
1130
+ /**
1131
+ * File creation timestamp in ISO 8601 format
1132
+ */
1133
+ createdAt: string;
1134
+ /**
1135
+ * File last update timestamp in ISO 8601 format
1136
+ */
1137
+ updatedAt: string;
1138
+ /**
1139
+ * Access policies configured for the file.
1140
+ */
1141
+ accessPolicies: ("integrations" | "public_content")[];
1142
+ /**
1143
+ * Whether the file was requested to be indexed for search or not.
1144
+ */
1145
+ index: boolean;
1146
+ /**
1147
+ * Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully.
1148
+ *
1149
+ * If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file.
1150
+ *
1151
+ * However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped).
1152
+ *
1153
+ * Once the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field.
1154
+ */
1155
+ status: "UPLOAD_PENDING" | "UPLOAD_FAILED" | "UPLOAD_COMPLETED" | "INDEXING_PENDING" | "INDEXING_FAILED" | "INDEXING_COMPLETED";
1156
+ /**
1157
+ * If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure.
1158
+ */
1159
+ failedStatusReason?: string;
1160
+ }