@botpress/api 1.53.0 → 1.54.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.
@@ -1,2553 +0,0 @@
1
- // This file was generated by the Opapi Generator
2
- /* eslint-disable */
3
- /* prettier-ignore */
4
- import * as opapi from '@bpinternal/opapi'
5
- export type State = opapi.State<'Table' | 'Column' | 'Row', 'x-bot-id' | 'x-integration-id' | 'x-integration-alias' | 'x-integration-name' | 'x-user-id' | 'x-user-role', 'tables'>
6
- export const state = {
7
- "operations": {
8
- "listTables": {
9
- "name": "listTables",
10
- "path": "/v1/tables",
11
- "description": "Retrieves a list of all tables associated with your bot.",
12
- "method": "get",
13
- "parameters": {
14
- "tags": {
15
- "in": "query",
16
- "type": "object",
17
- "schema": {
18
- "type": "object",
19
- "additionalProperties": {
20
- "type": "string"
21
- }
22
- },
23
- "description": "Optional filters to narrow down the list by tags associated with tables."
24
- },
25
- "x-bot-id": {
26
- "in": "header",
27
- "description": "Bot id",
28
- "type": "string",
29
- "required": true
30
- },
31
- "x-integration-id": {
32
- "in": "header",
33
- "description": "Integration id",
34
- "type": "string",
35
- "required": false
36
- },
37
- "x-integration-alias": {
38
- "in": "header",
39
- "description": "Integration alias",
40
- "type": "string",
41
- "required": false
42
- },
43
- "x-integration-name": {
44
- "in": "header",
45
- "description": "Integration name",
46
- "type": "string",
47
- "required": false
48
- },
49
- "x-user-id": {
50
- "in": "header",
51
- "description": "User Id",
52
- "type": "string",
53
- "required": false
54
- },
55
- "x-user-role": {
56
- "in": "header",
57
- "description": "User Role",
58
- "type": "string",
59
- "required": false
60
- }
61
- },
62
- "section": "tables",
63
- "response": {
64
- "description": "Returns a list of tables.",
65
- "schema": {
66
- "type": "object",
67
- "properties": {
68
- "tables": {
69
- "type": "array",
70
- "items": {
71
- "$ref": "#/components/schemas/Table"
72
- }
73
- }
74
- },
75
- "required": [
76
- "tables"
77
- ],
78
- "title": "listTablesResponse",
79
- "additionalProperties": false
80
- }
81
- },
82
- "tags": [
83
- "documented"
84
- ]
85
- },
86
- "getTable": {
87
- "name": "getTable",
88
- "path": "/v1/tables/{table}",
89
- "description": "Retrieves detailed information about a specific table, identified by its name or unique identifier.",
90
- "parameters": {
91
- "table": {
92
- "type": "string",
93
- "description": "The table's name or unique identifier for targeting specific table operations.",
94
- "in": "path"
95
- },
96
- "x-bot-id": {
97
- "in": "header",
98
- "description": "Bot id",
99
- "type": "string",
100
- "required": true
101
- },
102
- "x-integration-id": {
103
- "in": "header",
104
- "description": "Integration id",
105
- "type": "string",
106
- "required": false
107
- },
108
- "x-integration-alias": {
109
- "in": "header",
110
- "description": "Integration alias",
111
- "type": "string",
112
- "required": false
113
- },
114
- "x-integration-name": {
115
- "in": "header",
116
- "description": "Integration name",
117
- "type": "string",
118
- "required": false
119
- },
120
- "x-user-id": {
121
- "in": "header",
122
- "description": "User Id",
123
- "type": "string",
124
- "required": false
125
- },
126
- "x-user-role": {
127
- "in": "header",
128
- "description": "User Role",
129
- "type": "string",
130
- "required": false
131
- }
132
- },
133
- "method": "get",
134
- "section": "tables",
135
- "response": {
136
- "description": "Details of the requested table, including row count and indexing status.",
137
- "schema": {
138
- "type": "object",
139
- "properties": {
140
- "table": {
141
- "$ref": "#/components/schemas/Table"
142
- },
143
- "rows": {
144
- "type": "number",
145
- "description": "The total number of rows present in the table."
146
- },
147
- "stale": {
148
- "type": "number",
149
- "description": "The number of stale rows that are waiting to be processed"
150
- },
151
- "indexing": {
152
- "type": "number",
153
- "description": "The number of rows that are waiting to be indexed (for search)"
154
- }
155
- },
156
- "required": [
157
- "table",
158
- "rows",
159
- "stale",
160
- "indexing"
161
- ],
162
- "title": "getTableResponse",
163
- "additionalProperties": false
164
- }
165
- },
166
- "tags": [
167
- "documented"
168
- ]
169
- },
170
- "getOrCreateTable": {
171
- "name": "getOrCreateTable",
172
- "path": "/v1/tables/{table}",
173
- "description": "Retrieves information about a specific table if it exists; otherwise, creates a new table based on the provided schema.",
174
- "parameters": {
175
- "table": {
176
- "type": "string",
177
- "description": "The table's name or unique identifier for targeting specific table operations.",
178
- "in": "path"
179
- },
180
- "x-bot-id": {
181
- "in": "header",
182
- "description": "Bot id",
183
- "type": "string",
184
- "required": true
185
- },
186
- "x-integration-id": {
187
- "in": "header",
188
- "description": "Integration id",
189
- "type": "string",
190
- "required": false
191
- },
192
- "x-integration-alias": {
193
- "in": "header",
194
- "description": "Integration alias",
195
- "type": "string",
196
- "required": false
197
- },
198
- "x-integration-name": {
199
- "in": "header",
200
- "description": "Integration name",
201
- "type": "string",
202
- "required": false
203
- },
204
- "x-user-id": {
205
- "in": "header",
206
- "description": "User Id",
207
- "type": "string",
208
- "required": false
209
- },
210
- "x-user-role": {
211
- "in": "header",
212
- "description": "User Role",
213
- "type": "string",
214
- "required": false
215
- }
216
- },
217
- "method": "post",
218
- "requestBody": {
219
- "description": "Schema defining the structure of the table",
220
- "schema": {
221
- "type": "object",
222
- "properties": {
223
- "factor": {
224
- "default": 1,
225
- "type": "number",
226
- "minimum": 1,
227
- "maximum": 30,
228
- "description": "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."
229
- },
230
- "frozen": {
231
- "type": "boolean",
232
- "description": "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."
233
- },
234
- "schema": {
235
- "type": "object",
236
- "additionalProperties": true,
237
- "description": "Provide an object or a JSON schema to define the columns of the table. A maximum of 20 keys in the object/schema is allowed."
238
- },
239
- "tags": {
240
- "type": "object",
241
- "additionalProperties": {
242
- "type": "string"
243
- },
244
- "description": "Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."
245
- },
246
- "isComputeEnabled": {
247
- "type": "boolean",
248
- "description": "Indicates if the table is enabled for computation."
249
- }
250
- },
251
- "required": [
252
- "schema"
253
- ],
254
- "title": "getOrCreateTableBody",
255
- "additionalProperties": false
256
- }
257
- },
258
- "section": "tables",
259
- "response": {
260
- "description": "The retrieved or created table object.",
261
- "schema": {
262
- "type": "object",
263
- "properties": {
264
- "table": {
265
- "$ref": "#/components/schemas/Table"
266
- },
267
- "created": {
268
- "type": "boolean",
269
- "description": "Flag indicating if the table was newly created."
270
- },
271
- "rows": {
272
- "type": "number",
273
- "description": "The total number of rows present in the table."
274
- },
275
- "stale": {
276
- "type": "number",
277
- "description": "The number of stale rows that are waiting to be processed"
278
- },
279
- "indexing": {
280
- "type": "number",
281
- "description": "The number of rows that are waiting to be indexed (for search)"
282
- }
283
- },
284
- "required": [
285
- "table",
286
- "created",
287
- "rows",
288
- "stale",
289
- "indexing"
290
- ],
291
- "title": "getOrCreateTableResponse",
292
- "additionalProperties": false
293
- }
294
- },
295
- "tags": [
296
- "documented"
297
- ]
298
- },
299
- "createTable": {
300
- "name": "createTable",
301
- "path": "/v1/tables",
302
- "description": "Initiates the creation of a new table based on the provided schema, excluding system-managed fields like IDs and timestamps.",
303
- "method": "post",
304
- "requestBody": {
305
- "description": "Schema defining the structure of the new table",
306
- "schema": {
307
- "type": "object",
308
- "properties": {
309
- "name": {
310
- "description": "Required. This name is used to identify your table.",
311
- "type": "string",
312
- "minLength": 1
313
- },
314
- "factor": {
315
- "default": 1,
316
- "type": "number",
317
- "minimum": 1,
318
- "maximum": 30,
319
- "description": "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."
320
- },
321
- "frozen": {
322
- "type": "boolean",
323
- "description": "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."
324
- },
325
- "schema": {
326
- "type": "object",
327
- "additionalProperties": true,
328
- "description": "Provide an object or a JSON schema to define the columns of the table. A maximum of 20 keys in the object/schema is allowed."
329
- },
330
- "tags": {
331
- "type": "object",
332
- "additionalProperties": {
333
- "type": "string"
334
- },
335
- "description": "Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."
336
- },
337
- "isComputeEnabled": {
338
- "type": "boolean",
339
- "description": "Indicates if the table is enabled for computation."
340
- }
341
- },
342
- "required": [
343
- "name",
344
- "schema"
345
- ],
346
- "title": "createTableBody",
347
- "additionalProperties": false
348
- }
349
- },
350
- "section": "tables",
351
- "response": {
352
- "description": "The created table object.",
353
- "schema": {
354
- "type": "object",
355
- "properties": {
356
- "table": {
357
- "$ref": "#/components/schemas/Table"
358
- }
359
- },
360
- "required": [
361
- "table"
362
- ],
363
- "title": "createTableResponse",
364
- "additionalProperties": false
365
- }
366
- },
367
- "tags": [
368
- "documented"
369
- ],
370
- "parameters": {
371
- "x-bot-id": {
372
- "in": "header",
373
- "description": "Bot id",
374
- "type": "string",
375
- "required": true
376
- },
377
- "x-integration-id": {
378
- "in": "header",
379
- "description": "Integration id",
380
- "type": "string",
381
- "required": false
382
- },
383
- "x-integration-alias": {
384
- "in": "header",
385
- "description": "Integration alias",
386
- "type": "string",
387
- "required": false
388
- },
389
- "x-integration-name": {
390
- "in": "header",
391
- "description": "Integration name",
392
- "type": "string",
393
- "required": false
394
- },
395
- "x-user-id": {
396
- "in": "header",
397
- "description": "User Id",
398
- "type": "string",
399
- "required": false
400
- },
401
- "x-user-role": {
402
- "in": "header",
403
- "description": "User Role",
404
- "type": "string",
405
- "required": false
406
- }
407
- }
408
- },
409
- "duplicateTable": {
410
- "name": "duplicateTable",
411
- "path": "/v1/tables/{sourceTableId}/duplicate",
412
- "description": "Duplicates the table schema & content",
413
- "parameters": {
414
- "sourceTableId": {
415
- "type": "string",
416
- "description": "The table's unique identifier",
417
- "in": "path"
418
- },
419
- "x-bot-id": {
420
- "in": "header",
421
- "description": "Bot id",
422
- "type": "string",
423
- "required": true
424
- },
425
- "x-integration-id": {
426
- "in": "header",
427
- "description": "Integration id",
428
- "type": "string",
429
- "required": false
430
- },
431
- "x-integration-alias": {
432
- "in": "header",
433
- "description": "Integration alias",
434
- "type": "string",
435
- "required": false
436
- },
437
- "x-integration-name": {
438
- "in": "header",
439
- "description": "Integration name",
440
- "type": "string",
441
- "required": false
442
- },
443
- "x-user-id": {
444
- "in": "header",
445
- "description": "User Id",
446
- "type": "string",
447
- "required": false
448
- },
449
- "x-user-role": {
450
- "in": "header",
451
- "description": "User Role",
452
- "type": "string",
453
- "required": false
454
- }
455
- },
456
- "method": "post",
457
- "requestBody": {
458
- "description": "Parameters for the duplication operation.",
459
- "schema": {
460
- "type": "object",
461
- "properties": {
462
- "tableName": {
463
- "type": "string"
464
- },
465
- "schemaOnly": {
466
- "type": "boolean",
467
- "description": "Only duplicate the schema, not the content"
468
- },
469
- "factor": {
470
- "type": "number",
471
- "description": "Use a different factor for the table. Leave empty to use the same as the duplicated table."
472
- }
473
- },
474
- "title": "duplicateTableBody",
475
- "additionalProperties": false
476
- }
477
- },
478
- "section": "tables",
479
- "response": {
480
- "description": "The created table object.",
481
- "schema": {
482
- "type": "object",
483
- "properties": {
484
- "table": {
485
- "$ref": "#/components/schemas/Table"
486
- },
487
- "rows": {
488
- "type": "number",
489
- "description": "The total number of rows present in the table."
490
- }
491
- },
492
- "required": [
493
- "table",
494
- "rows"
495
- ],
496
- "title": "duplicateTableResponse",
497
- "additionalProperties": false
498
- }
499
- },
500
- "tags": [
501
- "documented"
502
- ]
503
- },
504
- "exportTable": {
505
- "name": "exportTable",
506
- "path": "/v1/tables/{table}/export",
507
- "description": "Starts an export job for the table",
508
- "parameters": {
509
- "table": {
510
- "type": "string",
511
- "description": "The table's unique identifier",
512
- "in": "path"
513
- },
514
- "format": {
515
- "in": "query",
516
- "type": "object",
517
- "description": "The format of the exported file. CSV includes only the data while JSON includes the schema.",
518
- "schema": {
519
- "type": "string",
520
- "enum": [
521
- "csv",
522
- "json"
523
- ]
524
- }
525
- },
526
- "compress": {
527
- "in": "query",
528
- "type": "object",
529
- "description": "Whether or not the export is compressed (gzipped).",
530
- "schema": {
531
- "default": true,
532
- "type": "boolean"
533
- }
534
- },
535
- "x-bot-id": {
536
- "in": "header",
537
- "description": "Bot id",
538
- "type": "string",
539
- "required": true
540
- },
541
- "x-integration-id": {
542
- "in": "header",
543
- "description": "Integration id",
544
- "type": "string",
545
- "required": false
546
- },
547
- "x-integration-alias": {
548
- "in": "header",
549
- "description": "Integration alias",
550
- "type": "string",
551
- "required": false
552
- },
553
- "x-integration-name": {
554
- "in": "header",
555
- "description": "Integration name",
556
- "type": "string",
557
- "required": false
558
- },
559
- "x-user-id": {
560
- "in": "header",
561
- "description": "User Id",
562
- "type": "string",
563
- "required": false
564
- },
565
- "x-user-role": {
566
- "in": "header",
567
- "description": "User Role",
568
- "type": "string",
569
- "required": false
570
- }
571
- },
572
- "method": "get",
573
- "section": "tables",
574
- "response": {
575
- "description": "The export job",
576
- "schema": {
577
- "type": "object",
578
- "properties": {
579
- "job": {
580
- "type": "object",
581
- "properties": {
582
- "id": {
583
- "type": "string"
584
- },
585
- "botId": {
586
- "type": "string"
587
- },
588
- "tableId": {
589
- "type": "string"
590
- },
591
- "type": {
592
- "type": "string",
593
- "enum": [
594
- "export",
595
- "import"
596
- ]
597
- },
598
- "status": {
599
- "type": "string",
600
- "enum": [
601
- "pending",
602
- "in_progress",
603
- "finalizing",
604
- "completed",
605
- "failed"
606
- ]
607
- },
608
- "progress": {
609
- "default": 0,
610
- "type": "number"
611
- },
612
- "inputFileId": {
613
- "type": "string",
614
- "nullable": true
615
- },
616
- "outputFileId": {
617
- "type": "string",
618
- "nullable": true
619
- },
620
- "createdAt": {
621
- "type": "string",
622
- "format": "date-time"
623
- },
624
- "updatedAt": {
625
- "type": "string",
626
- "format": "date-time"
627
- }
628
- },
629
- "required": [
630
- "id",
631
- "botId",
632
- "tableId",
633
- "type",
634
- "status",
635
- "inputFileId",
636
- "outputFileId",
637
- "createdAt",
638
- "updatedAt"
639
- ],
640
- "additionalProperties": false
641
- }
642
- },
643
- "required": [
644
- "job"
645
- ],
646
- "title": "exportTableResponse",
647
- "additionalProperties": false
648
- }
649
- }
650
- },
651
- "getTableJobs": {
652
- "name": "getTableJobs",
653
- "path": "/v1/tables/{table}/jobs",
654
- "description": "Returns a list of recent jobs for the table (export/import operations)",
655
- "parameters": {
656
- "table": {
657
- "type": "string",
658
- "description": "The table's unique identifier",
659
- "in": "path"
660
- },
661
- "x-bot-id": {
662
- "in": "header",
663
- "description": "Bot id",
664
- "type": "string",
665
- "required": true
666
- },
667
- "x-integration-id": {
668
- "in": "header",
669
- "description": "Integration id",
670
- "type": "string",
671
- "required": false
672
- },
673
- "x-integration-alias": {
674
- "in": "header",
675
- "description": "Integration alias",
676
- "type": "string",
677
- "required": false
678
- },
679
- "x-integration-name": {
680
- "in": "header",
681
- "description": "Integration name",
682
- "type": "string",
683
- "required": false
684
- },
685
- "x-user-id": {
686
- "in": "header",
687
- "description": "User Id",
688
- "type": "string",
689
- "required": false
690
- },
691
- "x-user-role": {
692
- "in": "header",
693
- "description": "User Role",
694
- "type": "string",
695
- "required": false
696
- }
697
- },
698
- "method": "get",
699
- "section": "tables",
700
- "response": {
701
- "description": "The most recent jobs",
702
- "schema": {
703
- "type": "object",
704
- "properties": {
705
- "jobs": {
706
- "type": "array",
707
- "items": {
708
- "type": "object",
709
- "properties": {
710
- "id": {
711
- "type": "string"
712
- },
713
- "botId": {
714
- "type": "string"
715
- },
716
- "tableId": {
717
- "type": "string"
718
- },
719
- "type": {
720
- "type": "string",
721
- "enum": [
722
- "export",
723
- "import"
724
- ]
725
- },
726
- "status": {
727
- "type": "string",
728
- "enum": [
729
- "pending",
730
- "in_progress",
731
- "finalizing",
732
- "completed",
733
- "failed"
734
- ]
735
- },
736
- "progress": {
737
- "default": 0,
738
- "type": "number"
739
- },
740
- "inputFileId": {
741
- "type": "string",
742
- "nullable": true
743
- },
744
- "outputFileId": {
745
- "type": "string",
746
- "nullable": true
747
- },
748
- "createdAt": {
749
- "type": "string",
750
- "format": "date-time"
751
- },
752
- "updatedAt": {
753
- "type": "string",
754
- "format": "date-time"
755
- }
756
- },
757
- "required": [
758
- "id",
759
- "botId",
760
- "tableId",
761
- "type",
762
- "status",
763
- "inputFileId",
764
- "outputFileId",
765
- "createdAt",
766
- "updatedAt"
767
- ]
768
- }
769
- }
770
- },
771
- "required": [
772
- "jobs"
773
- ],
774
- "title": "getTableJobsResponse",
775
- "additionalProperties": false
776
- }
777
- }
778
- },
779
- "importTable": {
780
- "name": "importTable",
781
- "path": "/v1/tables/{table}/import",
782
- "description": "Import the content of a file into a table. The table must already have been created with the correct schema. Data already in the table will be kept.",
783
- "method": "post",
784
- "parameters": {
785
- "table": {
786
- "type": "string",
787
- "description": "The table's name or unique identifier for targeting specific table operations.",
788
- "in": "path"
789
- },
790
- "x-bot-id": {
791
- "in": "header",
792
- "description": "Bot id",
793
- "type": "string",
794
- "required": true
795
- },
796
- "x-integration-id": {
797
- "in": "header",
798
- "description": "Integration id",
799
- "type": "string",
800
- "required": false
801
- },
802
- "x-integration-alias": {
803
- "in": "header",
804
- "description": "Integration alias",
805
- "type": "string",
806
- "required": false
807
- },
808
- "x-integration-name": {
809
- "in": "header",
810
- "description": "Integration name",
811
- "type": "string",
812
- "required": false
813
- },
814
- "x-user-id": {
815
- "in": "header",
816
- "description": "User Id",
817
- "type": "string",
818
- "required": false
819
- },
820
- "x-user-role": {
821
- "in": "header",
822
- "description": "User Role",
823
- "type": "string",
824
- "required": false
825
- }
826
- },
827
- "requestBody": {
828
- "description": "Content to import",
829
- "schema": {
830
- "type": "object",
831
- "properties": {
832
- "fileId": {
833
- "type": "string",
834
- "description": "The file ID to import. It must have been uploaded to the Files API before. Supported formats: CSV, JSON (gzipped or not)"
835
- }
836
- },
837
- "required": [
838
- "fileId"
839
- ],
840
- "title": "importTableBody",
841
- "additionalProperties": false
842
- }
843
- },
844
- "section": "tables",
845
- "response": {
846
- "description": "The import job",
847
- "schema": {
848
- "type": "object",
849
- "properties": {
850
- "job": {
851
- "type": "object",
852
- "properties": {
853
- "id": {
854
- "type": "string"
855
- },
856
- "botId": {
857
- "type": "string"
858
- },
859
- "tableId": {
860
- "type": "string"
861
- },
862
- "type": {
863
- "type": "string",
864
- "enum": [
865
- "export",
866
- "import"
867
- ]
868
- },
869
- "status": {
870
- "type": "string",
871
- "enum": [
872
- "pending",
873
- "in_progress",
874
- "finalizing",
875
- "completed",
876
- "failed"
877
- ]
878
- },
879
- "progress": {
880
- "default": 0,
881
- "type": "number"
882
- },
883
- "inputFileId": {
884
- "type": "string",
885
- "nullable": true
886
- },
887
- "outputFileId": {
888
- "type": "string",
889
- "nullable": true
890
- },
891
- "createdAt": {
892
- "type": "string",
893
- "format": "date-time"
894
- },
895
- "updatedAt": {
896
- "type": "string",
897
- "format": "date-time"
898
- }
899
- },
900
- "required": [
901
- "id",
902
- "botId",
903
- "tableId",
904
- "type",
905
- "status",
906
- "inputFileId",
907
- "outputFileId",
908
- "createdAt",
909
- "updatedAt"
910
- ],
911
- "additionalProperties": false
912
- }
913
- },
914
- "required": [
915
- "job"
916
- ],
917
- "title": "importTableResponse",
918
- "additionalProperties": false
919
- }
920
- }
921
- },
922
- "updateTable": {
923
- "name": "updateTable",
924
- "path": "/v1/tables/{table}",
925
- "description": "Updates the schema or the name of an existing table.",
926
- "method": "put",
927
- "parameters": {
928
- "table": {
929
- "type": "string",
930
- "description": "The table's name or unique identifier for targeting specific table operations.",
931
- "in": "path"
932
- },
933
- "x-bot-id": {
934
- "in": "header",
935
- "description": "Bot id",
936
- "type": "string",
937
- "required": true
938
- },
939
- "x-integration-id": {
940
- "in": "header",
941
- "description": "Integration id",
942
- "type": "string",
943
- "required": false
944
- },
945
- "x-integration-alias": {
946
- "in": "header",
947
- "description": "Integration alias",
948
- "type": "string",
949
- "required": false
950
- },
951
- "x-integration-name": {
952
- "in": "header",
953
- "description": "Integration name",
954
- "type": "string",
955
- "required": false
956
- },
957
- "x-user-id": {
958
- "in": "header",
959
- "description": "User Id",
960
- "type": "string",
961
- "required": false
962
- },
963
- "x-user-role": {
964
- "in": "header",
965
- "description": "User Role",
966
- "type": "string",
967
- "required": false
968
- }
969
- },
970
- "requestBody": {
971
- "description": "The updated schema/name of the table.",
972
- "schema": {
973
- "type": "object",
974
- "properties": {
975
- "name": {
976
- "description": "Required. This name is used to identify your table.",
977
- "type": "string",
978
- "minLength": 1
979
- },
980
- "frozen": {
981
- "type": "boolean",
982
- "description": "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."
983
- },
984
- "schema": {
985
- "type": "object",
986
- "additionalProperties": true,
987
- "description": "Provide an object or a JSON schema to define the columns of the table. A maximum of 20 keys in the object/schema is allowed."
988
- },
989
- "tags": {
990
- "type": "object",
991
- "additionalProperties": {
992
- "type": "string"
993
- },
994
- "description": "Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."
995
- },
996
- "isComputeEnabled": {
997
- "type": "boolean",
998
- "description": "Indicates if the table is enabled for computation."
999
- }
1000
- },
1001
- "title": "updateTableBody",
1002
- "additionalProperties": false
1003
- }
1004
- },
1005
- "section": "tables",
1006
- "response": {
1007
- "description": "The updated table",
1008
- "schema": {
1009
- "type": "object",
1010
- "properties": {
1011
- "table": {
1012
- "$ref": "#/components/schemas/Table"
1013
- },
1014
- "staleColumns": {
1015
- "type": "array",
1016
- "items": {
1017
- "type": "string"
1018
- },
1019
- "description": "List of columns that have become stale following the modification."
1020
- }
1021
- },
1022
- "required": [
1023
- "table"
1024
- ],
1025
- "title": "updateTableResponse",
1026
- "additionalProperties": false
1027
- }
1028
- },
1029
- "tags": [
1030
- "documented"
1031
- ]
1032
- },
1033
- "renameTableColumn": {
1034
- "name": "renameTableColumn",
1035
- "path": "/v1/tables/{table}/column",
1036
- "description": "Renames an existing column within a table to better reflect its content or usage. The operation targets a specific table and requires the current and new column names.",
1037
- "method": "put",
1038
- "parameters": {
1039
- "table": {
1040
- "type": "string",
1041
- "description": "The table's name or unique identifier for targeting specific table operations.",
1042
- "in": "path"
1043
- },
1044
- "x-bot-id": {
1045
- "in": "header",
1046
- "description": "Bot id",
1047
- "type": "string",
1048
- "required": true
1049
- },
1050
- "x-integration-id": {
1051
- "in": "header",
1052
- "description": "Integration id",
1053
- "type": "string",
1054
- "required": false
1055
- },
1056
- "x-integration-alias": {
1057
- "in": "header",
1058
- "description": "Integration alias",
1059
- "type": "string",
1060
- "required": false
1061
- },
1062
- "x-integration-name": {
1063
- "in": "header",
1064
- "description": "Integration name",
1065
- "type": "string",
1066
- "required": false
1067
- },
1068
- "x-user-id": {
1069
- "in": "header",
1070
- "description": "User Id",
1071
- "type": "string",
1072
- "required": false
1073
- },
1074
- "x-user-role": {
1075
- "in": "header",
1076
- "description": "User Role",
1077
- "type": "string",
1078
- "required": false
1079
- }
1080
- },
1081
- "requestBody": {
1082
- "description": "Details of the column to be renamed, including its current name and the desired new name.",
1083
- "schema": {
1084
- "type": "object",
1085
- "properties": {
1086
- "name": {
1087
- "type": "string",
1088
- "description": "The existing name of the column."
1089
- },
1090
- "newName": {
1091
- "description": "The new name to assign to the column.",
1092
- "type": "string",
1093
- "minLength": 1,
1094
- "maxLength": 30
1095
- }
1096
- },
1097
- "required": [
1098
- "name",
1099
- "newName"
1100
- ],
1101
- "title": "renameTableColumnBody",
1102
- "additionalProperties": false
1103
- }
1104
- },
1105
- "section": "tables",
1106
- "response": {
1107
- "description": "Confirmation of the column rename operation, including the updated table schema.",
1108
- "schema": {
1109
- "type": "object",
1110
- "properties": {
1111
- "table": {
1112
- "$ref": "#/components/schemas/Table"
1113
- }
1114
- },
1115
- "required": [
1116
- "table"
1117
- ],
1118
- "title": "renameTableColumnResponse",
1119
- "additionalProperties": false
1120
- }
1121
- },
1122
- "tags": [
1123
- "documented"
1124
- ]
1125
- },
1126
- "deleteTable": {
1127
- "name": "deleteTable",
1128
- "path": "/v1/tables/{table}",
1129
- "description": "Permanently deletes a table and all its associated data from the system. Use with caution, as this action cannot be undone.",
1130
- "parameters": {
1131
- "table": {
1132
- "type": "string",
1133
- "description": "The table's name or unique identifier for targeting specific table operations.",
1134
- "in": "path"
1135
- },
1136
- "x-bot-id": {
1137
- "in": "header",
1138
- "description": "Bot id",
1139
- "type": "string",
1140
- "required": true
1141
- },
1142
- "x-integration-id": {
1143
- "in": "header",
1144
- "description": "Integration id",
1145
- "type": "string",
1146
- "required": false
1147
- },
1148
- "x-integration-alias": {
1149
- "in": "header",
1150
- "description": "Integration alias",
1151
- "type": "string",
1152
- "required": false
1153
- },
1154
- "x-integration-name": {
1155
- "in": "header",
1156
- "description": "Integration name",
1157
- "type": "string",
1158
- "required": false
1159
- },
1160
- "x-user-id": {
1161
- "in": "header",
1162
- "description": "User Id",
1163
- "type": "string",
1164
- "required": false
1165
- },
1166
- "x-user-role": {
1167
- "in": "header",
1168
- "description": "User Role",
1169
- "type": "string",
1170
- "required": false
1171
- }
1172
- },
1173
- "method": "delete",
1174
- "section": "tables",
1175
- "response": {
1176
- "description": "Confirmation that the table has been deleted.",
1177
- "schema": {
1178
- "type": "object",
1179
- "title": "deleteTableResponse",
1180
- "additionalProperties": false
1181
- }
1182
- },
1183
- "tags": [
1184
- "documented"
1185
- ]
1186
- },
1187
- "getTableRow": {
1188
- "name": "getTableRow",
1189
- "path": "/v1/tables/{table}/row",
1190
- "description": "Fetches a specific row from a table using the row's unique identifier.",
1191
- "parameters": {
1192
- "table": {
1193
- "type": "string",
1194
- "description": "The table's name or unique identifier for targeting specific table operations.",
1195
- "in": "path"
1196
- },
1197
- "id": {
1198
- "type": "object",
1199
- "description": "Identifier of the row within the table.",
1200
- "in": "query",
1201
- "required": true,
1202
- "schema": {
1203
- "type": "integer"
1204
- }
1205
- },
1206
- "x-bot-id": {
1207
- "in": "header",
1208
- "description": "Bot id",
1209
- "type": "string",
1210
- "required": true
1211
- },
1212
- "x-integration-id": {
1213
- "in": "header",
1214
- "description": "Integration id",
1215
- "type": "string",
1216
- "required": false
1217
- },
1218
- "x-integration-alias": {
1219
- "in": "header",
1220
- "description": "Integration alias",
1221
- "type": "string",
1222
- "required": false
1223
- },
1224
- "x-integration-name": {
1225
- "in": "header",
1226
- "description": "Integration name",
1227
- "type": "string",
1228
- "required": false
1229
- },
1230
- "x-user-id": {
1231
- "in": "header",
1232
- "description": "User Id",
1233
- "type": "string",
1234
- "required": false
1235
- },
1236
- "x-user-role": {
1237
- "in": "header",
1238
- "description": "User Role",
1239
- "type": "string",
1240
- "required": false
1241
- }
1242
- },
1243
- "method": "get",
1244
- "section": "tables",
1245
- "response": {
1246
- "description": "The requested row object.",
1247
- "schema": {
1248
- "type": "object",
1249
- "properties": {
1250
- "row": {
1251
- "$ref": "#/components/schemas/Row"
1252
- }
1253
- },
1254
- "required": [
1255
- "row"
1256
- ],
1257
- "title": "getTableRowResponse",
1258
- "additionalProperties": false
1259
- }
1260
- },
1261
- "tags": [
1262
- "documented"
1263
- ]
1264
- },
1265
- "findTableRows": {
1266
- "name": "findTableRows",
1267
- "path": "/v1/tables/{table}/rows/find",
1268
- "description": "Enables the search and filtering of rows within a table based on specific criteria. This operation supports complex queries for advanced data manipulation and retrieval.",
1269
- "parameters": {
1270
- "table": {
1271
- "type": "string",
1272
- "description": "The table's name or unique identifier for targeting specific table operations.",
1273
- "in": "path"
1274
- },
1275
- "x-bot-id": {
1276
- "in": "header",
1277
- "description": "Bot id",
1278
- "type": "string",
1279
- "required": true
1280
- },
1281
- "x-integration-id": {
1282
- "in": "header",
1283
- "description": "Integration id",
1284
- "type": "string",
1285
- "required": false
1286
- },
1287
- "x-integration-alias": {
1288
- "in": "header",
1289
- "description": "Integration alias",
1290
- "type": "string",
1291
- "required": false
1292
- },
1293
- "x-integration-name": {
1294
- "in": "header",
1295
- "description": "Integration name",
1296
- "type": "string",
1297
- "required": false
1298
- },
1299
- "x-user-id": {
1300
- "in": "header",
1301
- "description": "User Id",
1302
- "type": "string",
1303
- "required": false
1304
- },
1305
- "x-user-role": {
1306
- "in": "header",
1307
- "description": "User Role",
1308
- "type": "string",
1309
- "required": false
1310
- }
1311
- },
1312
- "requestBody": {
1313
- "description": "The search criteria and filters to apply when searching for rows. This includes conditions, search terms, and pagination options.",
1314
- "schema": {
1315
- "type": "object",
1316
- "properties": {
1317
- "limit": {
1318
- "default": 100,
1319
- "type": "integer",
1320
- "minimum": 1,
1321
- "maximum": 1000,
1322
- "description": "Limit for pagination, specifying the maximum number of rows to return."
1323
- },
1324
- "offset": {
1325
- "default": 0,
1326
- "type": "integer",
1327
- "minimum": 0,
1328
- "description": "Offset for pagination, specifying where to start returning rows from."
1329
- },
1330
- "filter": {
1331
- "type": "object",
1332
- "additionalProperties": true,
1333
- "description": "Provide a mongodb-like filter to apply to the query. Example: \\{ \"name\": \\{ \"$eq\": \"John\" \\} \\}"
1334
- },
1335
- "group": {
1336
- "type": "object",
1337
- "additionalProperties": true,
1338
- "description": "Group the rows by a specific column and apply aggregations to them. Allowed values: key, avg, max, min, sum, count. Example: \\{ \"someId\": \"key\", \"orders\": [\"sum\", \"avg\"] \\}"
1339
- },
1340
- "search": {
1341
- "type": "string",
1342
- "maxLength": 1024,
1343
- "description": "Search term to apply to the row search. When using this parameter, some rows which doesn't match the search term will be returned, use the similarity field to know how much the row matches the search term. "
1344
- },
1345
- "select": {
1346
- "type": "array",
1347
- "items": {
1348
- "type": "string"
1349
- },
1350
- "description": "Specify which columns to return in the response. Supports both top-level columns (e.g., \"name\") and nested attributes using dot notation (e.g., \"attributes.price\"). System columns (id, createdAt, updatedAt, etc.) are always included. If omitted, all columns are returned."
1351
- },
1352
- "orderBy": {
1353
- "default": "id",
1354
- "type": "string",
1355
- "description": "Specifies the column by which to order the results. By default it is ordered by id. Build-in columns: id, createdAt, updatedAt"
1356
- },
1357
- "orderDirection": {
1358
- "default": "asc",
1359
- "type": "string",
1360
- "enum": [
1361
- "asc",
1362
- "desc"
1363
- ],
1364
- "description": "Specifies the direction of sorting, either ascending or descending."
1365
- }
1366
- },
1367
- "title": "findTableRowsBody",
1368
- "additionalProperties": false
1369
- }
1370
- },
1371
- "method": "post",
1372
- "section": "tables",
1373
- "response": {
1374
- "description": "A collection of rows that match the search criteria, along with metadata such as total count and pagination details.",
1375
- "schema": {
1376
- "type": "object",
1377
- "properties": {
1378
- "rows": {
1379
- "type": "array",
1380
- "items": {
1381
- "$ref": "#/components/schemas/Row"
1382
- }
1383
- },
1384
- "hasMore": {
1385
- "type": "boolean",
1386
- "description": "Flag indicating if there are more rows to fetch."
1387
- },
1388
- "offset": {
1389
- "type": "integer"
1390
- },
1391
- "limit": {
1392
- "type": "integer"
1393
- },
1394
- "warnings": {
1395
- "type": "array",
1396
- "items": {
1397
- "type": "string"
1398
- },
1399
- "description": "Alerts for minor issues that don't block the operation but suggest possible improvements."
1400
- }
1401
- },
1402
- "required": [
1403
- "rows",
1404
- "hasMore",
1405
- "offset",
1406
- "limit"
1407
- ],
1408
- "title": "findTableRowsResponse",
1409
- "additionalProperties": false
1410
- }
1411
- },
1412
- "tags": [
1413
- "documented"
1414
- ]
1415
- },
1416
- "createTableRows": {
1417
- "name": "createTableRows",
1418
- "path": "/v1/tables/{table}/rows",
1419
- "description": "Inserts one or multiple new rows into the specified table.",
1420
- "parameters": {
1421
- "table": {
1422
- "type": "string",
1423
- "description": "The table's name or unique identifier for targeting specific table operations.",
1424
- "in": "path"
1425
- },
1426
- "x-bot-id": {
1427
- "in": "header",
1428
- "description": "Bot id",
1429
- "type": "string",
1430
- "required": true
1431
- },
1432
- "x-integration-id": {
1433
- "in": "header",
1434
- "description": "Integration id",
1435
- "type": "string",
1436
- "required": false
1437
- },
1438
- "x-integration-alias": {
1439
- "in": "header",
1440
- "description": "Integration alias",
1441
- "type": "string",
1442
- "required": false
1443
- },
1444
- "x-integration-name": {
1445
- "in": "header",
1446
- "description": "Integration name",
1447
- "type": "string",
1448
- "required": false
1449
- },
1450
- "x-user-id": {
1451
- "in": "header",
1452
- "description": "User Id",
1453
- "type": "string",
1454
- "required": false
1455
- },
1456
- "x-user-role": {
1457
- "in": "header",
1458
- "description": "User Role",
1459
- "type": "string",
1460
- "required": false
1461
- }
1462
- },
1463
- "requestBody": {
1464
- "description": "A batch of new rows to insert into the table. Each row must adhere to the table’s schema. A maximum of 1000 rows can be inserted in a single request.",
1465
- "schema": {
1466
- "type": "object",
1467
- "properties": {
1468
- "rows": {
1469
- "type": "array",
1470
- "items": {
1471
- "type": "object",
1472
- "properties": {},
1473
- "additionalProperties": true
1474
- },
1475
- "minItems": 1,
1476
- "maxItems": 1000
1477
- },
1478
- "waitComputed": {
1479
- "type": "boolean",
1480
- "description": "Ensure computed columns are fully processed before returning the result. This is applicable only when the number of rows involved is fewer than 1."
1481
- }
1482
- },
1483
- "required": [
1484
- "rows"
1485
- ],
1486
- "title": "createTableRowsBody",
1487
- "additionalProperties": false
1488
- }
1489
- },
1490
- "method": "post",
1491
- "section": "tables",
1492
- "response": {
1493
- "description": "A summary of the insertion operation, including any warnings or errors encountered, and the inserted row data.",
1494
- "schema": {
1495
- "type": "object",
1496
- "properties": {
1497
- "rows": {
1498
- "type": "array",
1499
- "items": {
1500
- "$ref": "#/components/schemas/Row"
1501
- }
1502
- },
1503
- "warnings": {
1504
- "type": "array",
1505
- "items": {
1506
- "type": "string"
1507
- },
1508
- "description": "Alerts for minor issues that don't block the operation but suggest possible improvements."
1509
- },
1510
- "errors": {
1511
- "type": "array",
1512
- "items": {
1513
- "type": "string"
1514
- },
1515
- "description": "Critical issues in specific elements that prevent their successful processing, allowing partial operation success."
1516
- }
1517
- },
1518
- "required": [
1519
- "rows"
1520
- ],
1521
- "title": "createTableRowsResponse",
1522
- "additionalProperties": false
1523
- }
1524
- },
1525
- "tags": [
1526
- "documented"
1527
- ]
1528
- },
1529
- "deleteTableRows": {
1530
- "name": "deleteTableRows",
1531
- "path": "/v1/tables/{table}/rows/delete",
1532
- "description": "Allows selective deletion of rows or complete clearance of a table.",
1533
- "parameters": {
1534
- "table": {
1535
- "type": "string",
1536
- "description": "The table's name or unique identifier for targeting specific table operations.",
1537
- "in": "path"
1538
- },
1539
- "x-bot-id": {
1540
- "in": "header",
1541
- "description": "Bot id",
1542
- "type": "string",
1543
- "required": true
1544
- },
1545
- "x-integration-id": {
1546
- "in": "header",
1547
- "description": "Integration id",
1548
- "type": "string",
1549
- "required": false
1550
- },
1551
- "x-integration-alias": {
1552
- "in": "header",
1553
- "description": "Integration alias",
1554
- "type": "string",
1555
- "required": false
1556
- },
1557
- "x-integration-name": {
1558
- "in": "header",
1559
- "description": "Integration name",
1560
- "type": "string",
1561
- "required": false
1562
- },
1563
- "x-user-id": {
1564
- "in": "header",
1565
- "description": "User Id",
1566
- "type": "string",
1567
- "required": false
1568
- },
1569
- "x-user-role": {
1570
- "in": "header",
1571
- "description": "User Role",
1572
- "type": "string",
1573
- "required": false
1574
- }
1575
- },
1576
- "requestBody": {
1577
- "description": "Identifiers of the rows to be deleted.",
1578
- "schema": {
1579
- "type": "object",
1580
- "properties": {
1581
- "ids": {
1582
- "type": "array",
1583
- "items": {
1584
- "type": "number",
1585
- "maximum": 2147483647
1586
- },
1587
- "maxItems": 1000
1588
- },
1589
- "filter": {
1590
- "type": "object",
1591
- "additionalProperties": true,
1592
- "description": "Filter to apply when deleting rows. Example: \\{ \"name\": \\{ \"$eq\": \"John\" \\} \\}"
1593
- },
1594
- "deleteAllRows": {
1595
- "type": "boolean",
1596
- "description": "Flag to delete all rows. Use with caution as this action is irreversible."
1597
- }
1598
- },
1599
- "title": "deleteTableRowsBody",
1600
- "additionalProperties": false
1601
- }
1602
- },
1603
- "method": "post",
1604
- "section": "tables",
1605
- "response": {
1606
- "description": "Confirms the number of rows successfully deleted.",
1607
- "schema": {
1608
- "type": "object",
1609
- "properties": {
1610
- "deletedRows": {
1611
- "type": "number"
1612
- }
1613
- },
1614
- "required": [
1615
- "deletedRows"
1616
- ],
1617
- "title": "deleteTableRowsResponse",
1618
- "additionalProperties": false
1619
- }
1620
- },
1621
- "tags": [
1622
- "documented"
1623
- ]
1624
- },
1625
- "updateTableRows": {
1626
- "name": "updateTableRows",
1627
- "path": "/v1/tables/{table}/rows",
1628
- "description": "Updates specified rows in a table, allowing partial success with detailed feedback on errors.",
1629
- "method": "put",
1630
- "parameters": {
1631
- "table": {
1632
- "type": "string",
1633
- "description": "The table's name or unique identifier for targeting specific table operations.",
1634
- "in": "path"
1635
- },
1636
- "x-bot-id": {
1637
- "in": "header",
1638
- "description": "Bot id",
1639
- "type": "string",
1640
- "required": true
1641
- },
1642
- "x-integration-id": {
1643
- "in": "header",
1644
- "description": "Integration id",
1645
- "type": "string",
1646
- "required": false
1647
- },
1648
- "x-integration-alias": {
1649
- "in": "header",
1650
- "description": "Integration alias",
1651
- "type": "string",
1652
- "required": false
1653
- },
1654
- "x-integration-name": {
1655
- "in": "header",
1656
- "description": "Integration name",
1657
- "type": "string",
1658
- "required": false
1659
- },
1660
- "x-user-id": {
1661
- "in": "header",
1662
- "description": "User Id",
1663
- "type": "string",
1664
- "required": false
1665
- },
1666
- "x-user-role": {
1667
- "in": "header",
1668
- "description": "User Role",
1669
- "type": "string",
1670
- "required": false
1671
- }
1672
- },
1673
- "requestBody": {
1674
- "description": "Data for rows to update, including IDs. Errors affect only specific rows, not the entire batch.",
1675
- "schema": {
1676
- "type": "object",
1677
- "properties": {
1678
- "rows": {
1679
- "type": "array",
1680
- "items": {
1681
- "type": "object",
1682
- "properties": {
1683
- "id": {
1684
- "type": "number",
1685
- "maximum": 2147483647
1686
- }
1687
- },
1688
- "required": [
1689
- "id"
1690
- ],
1691
- "additionalProperties": true
1692
- },
1693
- "minItems": 1,
1694
- "maxItems": 1000,
1695
- "description": "Rows with updated data, identified by ID."
1696
- },
1697
- "waitComputed": {
1698
- "type": "boolean",
1699
- "description": "Ensure computed columns are fully processed before returning the result. This is applicable only when the number of rows involved is fewer than 1."
1700
- }
1701
- },
1702
- "required": [
1703
- "rows"
1704
- ],
1705
- "title": "updateTableRowsBody",
1706
- "additionalProperties": false
1707
- }
1708
- },
1709
- "section": "tables",
1710
- "response": {
1711
- "description": "Returns updated rows, including warnings for minor issues and errors for failed updates.",
1712
- "schema": {
1713
- "type": "object",
1714
- "properties": {
1715
- "rows": {
1716
- "type": "array",
1717
- "items": {
1718
- "$ref": "#/components/schemas/Row"
1719
- }
1720
- },
1721
- "warnings": {
1722
- "type": "array",
1723
- "items": {
1724
- "type": "string"
1725
- },
1726
- "description": "Alerts for minor issues that don't block the operation but suggest possible improvements."
1727
- },
1728
- "errors": {
1729
- "type": "array",
1730
- "items": {
1731
- "type": "string"
1732
- },
1733
- "description": "Critical issues in specific elements that prevent their successful processing, allowing partial operation success."
1734
- }
1735
- },
1736
- "required": [
1737
- "rows"
1738
- ],
1739
- "title": "updateTableRowsResponse",
1740
- "additionalProperties": false
1741
- }
1742
- },
1743
- "tags": [
1744
- "documented"
1745
- ]
1746
- },
1747
- "upsertTableRows": {
1748
- "name": "upsertTableRows",
1749
- "path": "/v1/tables/{table}/rows/upsert",
1750
- "description": "Inserts or updates rows based on a key. If a row exists, it is updated; otherwise, a new row is created.",
1751
- "method": "post",
1752
- "parameters": {
1753
- "table": {
1754
- "type": "string",
1755
- "description": "The table's name or unique identifier for targeting specific table operations.",
1756
- "in": "path"
1757
- },
1758
- "x-bot-id": {
1759
- "in": "header",
1760
- "description": "Bot id",
1761
- "type": "string",
1762
- "required": true
1763
- },
1764
- "x-integration-id": {
1765
- "in": "header",
1766
- "description": "Integration id",
1767
- "type": "string",
1768
- "required": false
1769
- },
1770
- "x-integration-alias": {
1771
- "in": "header",
1772
- "description": "Integration alias",
1773
- "type": "string",
1774
- "required": false
1775
- },
1776
- "x-integration-name": {
1777
- "in": "header",
1778
- "description": "Integration name",
1779
- "type": "string",
1780
- "required": false
1781
- },
1782
- "x-user-id": {
1783
- "in": "header",
1784
- "description": "User Id",
1785
- "type": "string",
1786
- "required": false
1787
- },
1788
- "x-user-role": {
1789
- "in": "header",
1790
- "description": "User Role",
1791
- "type": "string",
1792
- "required": false
1793
- }
1794
- },
1795
- "requestBody": {
1796
- "description": "Rows for insertion or update, with a key column to determine action. Supports partial successes.",
1797
- "schema": {
1798
- "type": "object",
1799
- "properties": {
1800
- "rows": {
1801
- "type": "array",
1802
- "items": {
1803
- "type": "object",
1804
- "properties": {
1805
- "id": {
1806
- "type": "number",
1807
- "maximum": 2147483647
1808
- }
1809
- },
1810
- "additionalProperties": true
1811
- },
1812
- "minItems": 1,
1813
- "maxItems": 1000
1814
- },
1815
- "keyColumn": {
1816
- "default": "id",
1817
- "type": "string",
1818
- "minLength": 1,
1819
- "maxLength": 30,
1820
- "description": "Determines if a row is inserted or updated. Defaults to \"id\"."
1821
- },
1822
- "waitComputed": {
1823
- "type": "boolean",
1824
- "description": "Ensure computed columns are fully processed before returning the result. This is applicable only when the number of rows involved is fewer than 1."
1825
- }
1826
- },
1827
- "required": [
1828
- "rows"
1829
- ],
1830
- "title": "upsertTableRowsBody",
1831
- "additionalProperties": false
1832
- }
1833
- },
1834
- "section": "tables",
1835
- "response": {
1836
- "description": "Summary of insertions and updates, including any warnings or errors.",
1837
- "schema": {
1838
- "type": "object",
1839
- "properties": {
1840
- "inserted": {
1841
- "type": "array",
1842
- "items": {
1843
- "$ref": "#/components/schemas/Row"
1844
- }
1845
- },
1846
- "updated": {
1847
- "type": "array",
1848
- "items": {
1849
- "$ref": "#/components/schemas/Row"
1850
- }
1851
- },
1852
- "warnings": {
1853
- "type": "array",
1854
- "items": {
1855
- "type": "string"
1856
- },
1857
- "description": "Alerts for minor issues that don't block the operation but suggest possible improvements."
1858
- },
1859
- "errors": {
1860
- "type": "array",
1861
- "items": {
1862
- "type": "string"
1863
- },
1864
- "description": "Critical issues in specific elements that prevent their successful processing, allowing partial operation success."
1865
- }
1866
- },
1867
- "required": [
1868
- "inserted",
1869
- "updated"
1870
- ],
1871
- "title": "upsertTableRowsResponse",
1872
- "additionalProperties": false
1873
- }
1874
- },
1875
- "tags": [
1876
- "documented"
1877
- ]
1878
- }
1879
- },
1880
- "metadata": {
1881
- "title": "Botpress Tables API",
1882
- "description": "API for Botpress Tables",
1883
- "server": "https://api.botpress.cloud",
1884
- "version": "1.53.0",
1885
- "prefix": "v1"
1886
- },
1887
- "defaultParameters": {
1888
- "x-bot-id": {
1889
- "in": "header",
1890
- "description": "Bot id",
1891
- "type": "string",
1892
- "required": true
1893
- },
1894
- "x-integration-id": {
1895
- "in": "header",
1896
- "description": "Integration id",
1897
- "type": "string",
1898
- "required": false
1899
- },
1900
- "x-integration-alias": {
1901
- "in": "header",
1902
- "description": "Integration alias",
1903
- "type": "string",
1904
- "required": false
1905
- },
1906
- "x-integration-name": {
1907
- "in": "header",
1908
- "description": "Integration name",
1909
- "type": "string",
1910
- "required": false
1911
- },
1912
- "x-user-id": {
1913
- "in": "header",
1914
- "description": "User Id",
1915
- "type": "string",
1916
- "required": false
1917
- },
1918
- "x-user-role": {
1919
- "in": "header",
1920
- "description": "User Role",
1921
- "type": "string",
1922
- "required": false
1923
- }
1924
- },
1925
- "errors": [
1926
- {
1927
- "status": 500,
1928
- "type": "Unknown",
1929
- "description": "An unknown error occurred"
1930
- },
1931
- {
1932
- "status": 500,
1933
- "type": "Internal",
1934
- "description": "An internal error occurred"
1935
- },
1936
- {
1937
- "status": 401,
1938
- "type": "Unauthorized",
1939
- "description": "The request requires to be authenticated."
1940
- },
1941
- {
1942
- "status": 403,
1943
- "type": "Forbidden",
1944
- "description": "The requested action can't be peform by this resource."
1945
- },
1946
- {
1947
- "status": 413,
1948
- "type": "PayloadTooLarge",
1949
- "description": "The request payload is too large."
1950
- },
1951
- {
1952
- "status": 400,
1953
- "type": "InvalidPayload",
1954
- "description": "The request payload is invalid."
1955
- },
1956
- {
1957
- "status": 415,
1958
- "type": "UnsupportedMediaType",
1959
- "description": "The request is invalid because the content-type is not supported."
1960
- },
1961
- {
1962
- "status": 405,
1963
- "type": "MethodNotFound",
1964
- "description": "The requested method does not exist."
1965
- },
1966
- {
1967
- "status": 404,
1968
- "type": "ResourceNotFound",
1969
- "description": "The requested resource does not exist."
1970
- },
1971
- {
1972
- "status": 400,
1973
- "type": "InvalidJsonSchema",
1974
- "description": "The provided JSON schema is invalid."
1975
- },
1976
- {
1977
- "status": 400,
1978
- "type": "InvalidDataFormat",
1979
- "description": "The provided data doesn't respect the provided JSON schema."
1980
- },
1981
- {
1982
- "status": 400,
1983
- "type": "InvalidIdentifier",
1984
- "description": "The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters."
1985
- },
1986
- {
1987
- "status": 409,
1988
- "type": "RelationConflict",
1989
- "description": "The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together."
1990
- },
1991
- {
1992
- "status": 409,
1993
- "type": "ReferenceConstraint",
1994
- "description": "The resource cannot be deleted because it's referenced by another resource"
1995
- },
1996
- {
1997
- "status": 409,
1998
- "type": "ResourceLockedConflict",
1999
- "description": "The resource is current locked and cannot be operated on until the lock is released."
2000
- },
2001
- {
2002
- "status": 410,
2003
- "type": "ResourceGone",
2004
- "description": "The requested resource is no longer available."
2005
- },
2006
- {
2007
- "status": 400,
2008
- "type": "ReferenceNotFound",
2009
- "description": "The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request."
2010
- },
2011
- {
2012
- "status": 400,
2013
- "type": "InvalidQuery",
2014
- "description": "The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource."
2015
- },
2016
- {
2017
- "status": 400,
2018
- "type": "Runtime",
2019
- "description": "An error happened during the execution of a runtime (bot or integration)."
2020
- },
2021
- {
2022
- "status": 409,
2023
- "type": "AlreadyExists",
2024
- "description": "The record attempted to be created already exists."
2025
- },
2026
- {
2027
- "status": 429,
2028
- "type": "RateLimited",
2029
- "description": "The request has been rate limited."
2030
- },
2031
- {
2032
- "status": 402,
2033
- "type": "PaymentRequired",
2034
- "description": "A payment is required to perform this request."
2035
- },
2036
- {
2037
- "status": 403,
2038
- "type": "QuotaExceeded",
2039
- "description": "The request exceeds the allowed quota. Quotas are a soft limit that can be increased."
2040
- },
2041
- {
2042
- "status": 413,
2043
- "type": "LimitExceeded",
2044
- "description": "The request exceeds the allowed limit. Limits are a hard limit that cannot be increased."
2045
- },
2046
- {
2047
- "status": 400,
2048
- "type": "BreakingChanges",
2049
- "description": "Request payload contains breaking changes which is not allowed for this resource without a version increment."
2050
- }
2051
- ],
2052
- "refs": {
2053
- "parameters": {},
2054
- "requestBodies": {
2055
- "getOrCreateTableBody": true,
2056
- "createTableBody": true,
2057
- "duplicateTableBody": true,
2058
- "importTableBody": true,
2059
- "updateTableBody": true,
2060
- "renameTableColumnBody": true,
2061
- "findTableRowsBody": true,
2062
- "createTableRowsBody": true,
2063
- "deleteTableRowsBody": true,
2064
- "updateTableRowsBody": true,
2065
- "upsertTableRowsBody": true
2066
- },
2067
- "responses": {
2068
- "listTablesResponse": true,
2069
- "getTableResponse": true,
2070
- "getOrCreateTableResponse": true,
2071
- "createTableResponse": true,
2072
- "duplicateTableResponse": true,
2073
- "exportTableResponse": true,
2074
- "getTableJobsResponse": true,
2075
- "importTableResponse": true,
2076
- "updateTableResponse": true,
2077
- "renameTableColumnResponse": true,
2078
- "deleteTableResponse": true,
2079
- "getTableRowResponse": true,
2080
- "findTableRowsResponse": true,
2081
- "createTableRowsResponse": true,
2082
- "deleteTableRowsResponse": true,
2083
- "updateTableRowsResponse": true,
2084
- "upsertTableRowsResponse": true
2085
- },
2086
- "schemas": {
2087
- "Table": true,
2088
- "Column": true,
2089
- "Row": true
2090
- }
2091
- },
2092
- "schemas": {
2093
- "Table": {
2094
- "section": "tables",
2095
- "schema": {
2096
- "type": "object",
2097
- "properties": {
2098
- "id": {
2099
- "type": "string",
2100
- "description": "Unique identifier for the table"
2101
- },
2102
- "name": {
2103
- "description": "Required. This name is used to identify your table.",
2104
- "type": "string",
2105
- "minLength": 1
2106
- },
2107
- "factor": {
2108
- "default": 1,
2109
- "type": "number",
2110
- "minimum": 1,
2111
- "maximum": 30,
2112
- "description": "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."
2113
- },
2114
- "frozen": {
2115
- "type": "boolean",
2116
- "description": "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."
2117
- },
2118
- "schema": {
2119
- "type": "object",
2120
- "properties": {
2121
- "$schema": {
2122
- "type": "string"
2123
- },
2124
- "properties": {
2125
- "type": "object",
2126
- "additionalProperties": {
2127
- "type": "object",
2128
- "properties": {
2129
- "type": {
2130
- "type": "string",
2131
- "enum": [
2132
- "string",
2133
- "number",
2134
- "boolean",
2135
- "object",
2136
- "array",
2137
- "null"
2138
- ]
2139
- },
2140
- "format": {
2141
- "type": "string",
2142
- "enum": [
2143
- "date-time"
2144
- ]
2145
- },
2146
- "description": {
2147
- "type": "string"
2148
- },
2149
- "pattern": {
2150
- "type": "string",
2151
- "description": "String properties must match this pattern"
2152
- },
2153
- "enum": {
2154
- "type": "array",
2155
- "items": {
2156
- "type": "string"
2157
- },
2158
- "description": "String properties must be one of these values"
2159
- },
2160
- "items": {
2161
- "type": "object",
2162
- "properties": {
2163
- "type": {
2164
- "type": "string",
2165
- "enum": [
2166
- "string",
2167
- "number",
2168
- "boolean",
2169
- "object",
2170
- "array",
2171
- "null"
2172
- ]
2173
- }
2174
- },
2175
- "required": [
2176
- "type"
2177
- ],
2178
- "additionalProperties": true,
2179
- "description": "Defines the shape of items in an array"
2180
- },
2181
- "nullable": {
2182
- "default": true,
2183
- "type": "boolean"
2184
- },
2185
- "properties": {
2186
- "type": "object",
2187
- "additionalProperties": {
2188
- "type": "object",
2189
- "properties": {
2190
- "type": {
2191
- "type": "string",
2192
- "enum": [
2193
- "string",
2194
- "number",
2195
- "boolean",
2196
- "object",
2197
- "array",
2198
- "null"
2199
- ]
2200
- }
2201
- },
2202
- "required": [
2203
- "type"
2204
- ],
2205
- "additionalProperties": true
2206
- }
2207
- },
2208
- "x-zui": {
2209
- "type": "object",
2210
- "properties": {
2211
- "index": {
2212
- "type": "integer"
2213
- },
2214
- "id": {
2215
- "type": "string",
2216
- "description": "[deprecated] ID of the column."
2217
- },
2218
- "searchable": {
2219
- "type": "boolean",
2220
- "description": "Indicates if the column is vectorized and searchable."
2221
- },
2222
- "hidden": {
2223
- "type": "boolean",
2224
- "description": "Indicates if the field is hidden in the UI"
2225
- },
2226
- "order": {
2227
- "type": "number",
2228
- "description": "Order of the column in the UI"
2229
- },
2230
- "width": {
2231
- "type": "number",
2232
- "description": "Width of the column in the UI"
2233
- },
2234
- "schemaId": {
2235
- "type": "string",
2236
- "description": "ID of the schema"
2237
- },
2238
- "computed": {
2239
- "type": "object",
2240
- "properties": {
2241
- "action": {
2242
- "type": "string",
2243
- "enum": [
2244
- "ai",
2245
- "code",
2246
- "workflow"
2247
- ]
2248
- },
2249
- "dependencies": {
2250
- "default": [],
2251
- "type": "array",
2252
- "items": {
2253
- "type": "string"
2254
- }
2255
- },
2256
- "prompt": {
2257
- "type": "string",
2258
- "description": "Prompt when action is \"ai\""
2259
- },
2260
- "code": {
2261
- "type": "string",
2262
- "description": "Code to execute when action is \"code\""
2263
- },
2264
- "model": {
2265
- "default": "gpt-4o",
2266
- "type": "string",
2267
- "maxLength": 80,
2268
- "description": "Model to use when action is \"ai\""
2269
- },
2270
- "workflowId": {
2271
- "type": "string",
2272
- "maxLength": 20,
2273
- "description": "ID of Workflow to execute when action is \"workflow\""
2274
- },
2275
- "enabled": {
2276
- "type": "boolean"
2277
- }
2278
- },
2279
- "required": [
2280
- "action"
2281
- ],
2282
- "additionalProperties": false
2283
- },
2284
- "typings": {
2285
- "type": "string",
2286
- "description": "TypeScript typings for the column. Recommended if the type is \"object\", ex: \"\\{ foo: string; bar: number \\}\""
2287
- }
2288
- },
2289
- "required": [
2290
- "index"
2291
- ],
2292
- "additionalProperties": false
2293
- }
2294
- },
2295
- "required": [
2296
- "type",
2297
- "x-zui"
2298
- ],
2299
- "additionalProperties": false
2300
- },
2301
- "description": "List of keys/columns in the table."
2302
- },
2303
- "additionalProperties": {
2304
- "type": "boolean",
2305
- "enum": [
2306
- true
2307
- ],
2308
- "description": "Additional properties can be provided, but they will be ignored if no column matches."
2309
- },
2310
- "required": {
2311
- "type": "array",
2312
- "items": {
2313
- "type": "string"
2314
- },
2315
- "description": "Array of required properties."
2316
- },
2317
- "type": {
2318
- "type": "string",
2319
- "enum": [
2320
- "object"
2321
- ]
2322
- }
2323
- },
2324
- "required": [
2325
- "properties",
2326
- "additionalProperties",
2327
- "type"
2328
- ],
2329
- "additionalProperties": false
2330
- },
2331
- "tags": {
2332
- "type": "object",
2333
- "additionalProperties": {
2334
- "type": "string"
2335
- },
2336
- "description": "Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."
2337
- },
2338
- "isComputeEnabled": {
2339
- "type": "boolean",
2340
- "description": "Indicates if the table is enabled for computation."
2341
- },
2342
- "createdAt": {
2343
- "type": "string",
2344
- "format": "date-time",
2345
- "description": "Timestamp of table creation."
2346
- },
2347
- "updatedAt": {
2348
- "type": "string",
2349
- "format": "date-time",
2350
- "description": "Timestamp of the last table update."
2351
- }
2352
- },
2353
- "required": [
2354
- "id",
2355
- "name",
2356
- "schema"
2357
- ],
2358
- "additionalProperties": false
2359
- }
2360
- },
2361
- "Column": {
2362
- "section": "tables",
2363
- "schema": {
2364
- "type": "object",
2365
- "properties": {
2366
- "id": {
2367
- "type": "string",
2368
- "description": "Unique identifier for the column."
2369
- },
2370
- "name": {
2371
- "type": "string",
2372
- "minLength": 1,
2373
- "maxLength": 30,
2374
- "description": "Name of the column, must be within length limits."
2375
- },
2376
- "description": {
2377
- "type": "string",
2378
- "description": "Optional descriptive text about the column."
2379
- },
2380
- "searchable": {
2381
- "type": "boolean",
2382
- "description": "Indicates if the column is vectorized and searchable."
2383
- },
2384
- "type": {
2385
- "type": "string",
2386
- "enum": [
2387
- "string",
2388
- "number",
2389
- "boolean",
2390
- "date",
2391
- "object"
2392
- ],
2393
- "description": "Specifies the data type of the column. Use \"object\" for complex data structures."
2394
- },
2395
- "typings": {
2396
- "type": "string",
2397
- "description": "TypeScript typings for the column. Recommended if the type is \"object\", ex: \"\\{ foo: string; bar: number \\}\""
2398
- },
2399
- "computed": {
2400
- "type": "object",
2401
- "properties": {
2402
- "action": {
2403
- "type": "string",
2404
- "enum": [
2405
- "ai",
2406
- "code",
2407
- "workflow"
2408
- ]
2409
- },
2410
- "dependencies": {
2411
- "default": [],
2412
- "type": "array",
2413
- "items": {
2414
- "type": "string"
2415
- }
2416
- },
2417
- "prompt": {
2418
- "type": "string",
2419
- "description": "Prompt when action is \"ai\""
2420
- },
2421
- "code": {
2422
- "type": "string",
2423
- "description": "Code to execute when action is \"code\""
2424
- },
2425
- "model": {
2426
- "default": "gpt-4o",
2427
- "type": "string",
2428
- "maxLength": 80,
2429
- "description": "Model to use when action is \"ai\""
2430
- },
2431
- "workflowId": {
2432
- "type": "string",
2433
- "maxLength": 20,
2434
- "description": "ID of Workflow to execute when action is \"workflow\""
2435
- },
2436
- "enabled": {
2437
- "type": "boolean"
2438
- }
2439
- },
2440
- "required": [
2441
- "action"
2442
- ],
2443
- "additionalProperties": false
2444
- },
2445
- "schema": {
2446
- "type": "object",
2447
- "additionalProperties": true
2448
- }
2449
- },
2450
- "required": [
2451
- "name",
2452
- "type"
2453
- ],
2454
- "additionalProperties": false
2455
- }
2456
- },
2457
- "Row": {
2458
- "section": "tables",
2459
- "schema": {
2460
- "type": "object",
2461
- "properties": {
2462
- "id": {
2463
- "type": "number",
2464
- "description": "Unique identifier for the row."
2465
- },
2466
- "createdAt": {
2467
- "type": "string",
2468
- "format": "date-time",
2469
- "description": "Timestamp of row creation."
2470
- },
2471
- "updatedAt": {
2472
- "type": "string",
2473
- "format": "date-time",
2474
- "description": "Timestamp of the last row update."
2475
- },
2476
- "computed": {
2477
- "type": "object",
2478
- "additionalProperties": {
2479
- "type": "object",
2480
- "properties": {
2481
- "status": {
2482
- "type": "string"
2483
- },
2484
- "error": {
2485
- "type": "string"
2486
- },
2487
- "updatedBy": {
2488
- "type": "string"
2489
- },
2490
- "updatedAt": {
2491
- "type": "string"
2492
- }
2493
- },
2494
- "required": [
2495
- "status"
2496
- ],
2497
- "additionalProperties": false
2498
- }
2499
- },
2500
- "stale": {
2501
- "type": "array",
2502
- "items": {
2503
- "type": "string"
2504
- },
2505
- "description": "[Read-only] List of stale values that are waiting to be recomputed."
2506
- },
2507
- "similarity": {
2508
- "type": "number",
2509
- "description": "Optional numeric value indicating similarity, when using findTableRows."
2510
- }
2511
- },
2512
- "required": [
2513
- "id",
2514
- "computed"
2515
- ],
2516
- "additionalProperties": true
2517
- }
2518
- }
2519
- },
2520
- "sections": [
2521
- {
2522
- "title": "Tables",
2523
- "description": "Manage and interact with table structures, including creation, updates, and querying of tables and their rows.",
2524
- "name": "tables",
2525
- "operations": [
2526
- "listTables",
2527
- "getTable",
2528
- "getOrCreateTable",
2529
- "createTable",
2530
- "duplicateTable",
2531
- "exportTable",
2532
- "getTableJobs",
2533
- "importTable",
2534
- "updateTable",
2535
- "renameTableColumn",
2536
- "deleteTable",
2537
- "getTableRow",
2538
- "findTableRows",
2539
- "createTableRows",
2540
- "deleteTableRows",
2541
- "updateTableRows",
2542
- "upsertTableRows"
2543
- ],
2544
- "schema": "Table"
2545
- }
2546
- ],
2547
- "options": {
2548
- "allowUnions": false
2549
- },
2550
- "security": [
2551
- "BearerAuth"
2552
- ]
2553
- } satisfies State