@botpress/api 1.49.0 → 1.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-openapi.log +5 -5
- package/dist/index.js +59 -9
- package/dist/src/gen/runtime/state.d.ts +23 -0
- package/dist/src/gen/state.d.ts +23 -0
- package/package.json +2 -2
- package/src/gen/admin/openapi.json +1 -1
- package/src/gen/admin/state.ts +1 -1
- package/src/gen/files/openapi.json +1 -1
- package/src/gen/files/state.ts +1 -1
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/runtime/metadata.json +1 -1
- package/src/gen/runtime/openapi.json +1 -1
- package/src/gen/runtime/state.ts +28 -3
- package/src/gen/state.ts +28 -3
- package/src/gen/tables/openapi.json +1 -1
- package/src/gen/tables/state.ts +1 -1
package/src/gen/runtime/state.ts
CHANGED
|
@@ -679,6 +679,28 @@ export const state = {
|
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
681
|
},
|
|
682
|
+
"cancelScheduledEvent": {
|
|
683
|
+
"name": "cancelScheduledEvent",
|
|
684
|
+
"description": "Permanently cancels a scheduled [Event](#schema_event). The event must be in a `scheduled` state.",
|
|
685
|
+
"method": "delete",
|
|
686
|
+
"path": "/v1/chat/events/scheduled/{id}",
|
|
687
|
+
"parameters": {
|
|
688
|
+
"id": {
|
|
689
|
+
"in": "path",
|
|
690
|
+
"type": "string",
|
|
691
|
+
"description": "Event id"
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
"section": "event",
|
|
695
|
+
"response": {
|
|
696
|
+
"description": "Returns an empty object",
|
|
697
|
+
"schema": {
|
|
698
|
+
"type": "object",
|
|
699
|
+
"title": "cancelScheduledEventResponse",
|
|
700
|
+
"additionalProperties": false
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
},
|
|
682
704
|
"createMessage": {
|
|
683
705
|
"name": "createMessage",
|
|
684
706
|
"description": "Creates a new [Message](#schema_message). When creating a new [Message](#schema_message), the required tags must be provided. See the specific integration for more details.",
|
|
@@ -2643,7 +2665,7 @@ export const state = {
|
|
|
2643
2665
|
"title": "Botpress Runtime API",
|
|
2644
2666
|
"description": "API for Botpress Runtime",
|
|
2645
2667
|
"server": "https://api.botpress.cloud",
|
|
2646
|
-
"version": "1.
|
|
2668
|
+
"version": "1.50.0",
|
|
2647
2669
|
"prefix": "v1"
|
|
2648
2670
|
},
|
|
2649
2671
|
"errors": [
|
|
@@ -2814,6 +2836,7 @@ export const state = {
|
|
|
2814
2836
|
"createEventResponse": true,
|
|
2815
2837
|
"getEventResponse": true,
|
|
2816
2838
|
"listEventsResponse": true,
|
|
2839
|
+
"cancelScheduledEventResponse": true,
|
|
2817
2840
|
"createMessageResponse": true,
|
|
2818
2841
|
"getOrCreateMessageResponse": true,
|
|
2819
2842
|
"getMessageResponse": true,
|
|
@@ -3019,7 +3042,8 @@ export const state = {
|
|
|
3019
3042
|
"processed",
|
|
3020
3043
|
"ignored",
|
|
3021
3044
|
"failed",
|
|
3022
|
-
"scheduled"
|
|
3045
|
+
"scheduled",
|
|
3046
|
+
"canceled"
|
|
3023
3047
|
]
|
|
3024
3048
|
},
|
|
3025
3049
|
"failureReason": {
|
|
@@ -3450,7 +3474,8 @@ export const state = {
|
|
|
3450
3474
|
"operations": [
|
|
3451
3475
|
"createEvent",
|
|
3452
3476
|
"getEvent",
|
|
3453
|
-
"listEvents"
|
|
3477
|
+
"listEvents",
|
|
3478
|
+
"cancelScheduledEvent"
|
|
3454
3479
|
],
|
|
3455
3480
|
"schema": "Event"
|
|
3456
3481
|
},
|
package/src/gen/state.ts
CHANGED
|
@@ -679,6 +679,28 @@ export const state = {
|
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
681
|
},
|
|
682
|
+
"cancelScheduledEvent": {
|
|
683
|
+
"name": "cancelScheduledEvent",
|
|
684
|
+
"description": "Permanently cancels a scheduled [Event](#schema_event). The event must be in a `scheduled` state.",
|
|
685
|
+
"method": "delete",
|
|
686
|
+
"path": "/v1/chat/events/scheduled/{id}",
|
|
687
|
+
"parameters": {
|
|
688
|
+
"id": {
|
|
689
|
+
"in": "path",
|
|
690
|
+
"type": "string",
|
|
691
|
+
"description": "Event id"
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
"section": "event",
|
|
695
|
+
"response": {
|
|
696
|
+
"description": "Returns an empty object",
|
|
697
|
+
"schema": {
|
|
698
|
+
"type": "object",
|
|
699
|
+
"title": "cancelScheduledEventResponse",
|
|
700
|
+
"additionalProperties": false
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
},
|
|
682
704
|
"createMessage": {
|
|
683
705
|
"name": "createMessage",
|
|
684
706
|
"description": "Creates a new [Message](#schema_message). When creating a new [Message](#schema_message), the required tags must be provided. See the specific integration for more details.",
|
|
@@ -19779,7 +19801,7 @@ export const state = {
|
|
|
19779
19801
|
"title": "Botpress API",
|
|
19780
19802
|
"description": "API for Botpress Cloud",
|
|
19781
19803
|
"server": "https://api.botpress.cloud",
|
|
19782
|
-
"version": "1.
|
|
19804
|
+
"version": "1.50.0",
|
|
19783
19805
|
"prefix": "v1"
|
|
19784
19806
|
},
|
|
19785
19807
|
"errors": [
|
|
@@ -20000,6 +20022,7 @@ export const state = {
|
|
|
20000
20022
|
"createEventResponse": true,
|
|
20001
20023
|
"getEventResponse": true,
|
|
20002
20024
|
"listEventsResponse": true,
|
|
20025
|
+
"cancelScheduledEventResponse": true,
|
|
20003
20026
|
"createMessageResponse": true,
|
|
20004
20027
|
"getOrCreateMessageResponse": true,
|
|
20005
20028
|
"getMessageResponse": true,
|
|
@@ -22802,7 +22825,8 @@ export const state = {
|
|
|
22802
22825
|
"processed",
|
|
22803
22826
|
"ignored",
|
|
22804
22827
|
"failed",
|
|
22805
|
-
"scheduled"
|
|
22828
|
+
"scheduled",
|
|
22829
|
+
"canceled"
|
|
22806
22830
|
]
|
|
22807
22831
|
},
|
|
22808
22832
|
"failureReason": {
|
|
@@ -23800,7 +23824,8 @@ export const state = {
|
|
|
23800
23824
|
"operations": [
|
|
23801
23825
|
"createEvent",
|
|
23802
23826
|
"getEvent",
|
|
23803
|
-
"listEvents"
|
|
23827
|
+
"listEvents",
|
|
23828
|
+
"cancelScheduledEvent"
|
|
23804
23829
|
],
|
|
23805
23830
|
"schema": "Event"
|
|
23806
23831
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"openapi":"3.0.0","servers":[{"url":"https://api.botpress.cloud"}],"info":{"title":"Botpress Tables API","description":"API for Botpress Tables","version":"1.49.0"},"paths":{"/v1/tables":{"get":{"operationId":"listTables","description":"Retrieves a list of all tables associated with your bot.","parameters":[{"name":"tags","in":"query","description":"Optional filters to narrow down the list by tags associated with tables.","schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/listTablesResponse"},"default":{"$ref":"#/components/responses/listTablesResponse"}}},"post":{"operationId":"createTable","description":"Initiates the creation of a new table based on the provided schema, excluding system-managed fields like IDs and timestamps.","parameters":[{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/createTableResponse"},"default":{"$ref":"#/components/responses/createTableResponse"}},"requestBody":{"$ref":"#/components/requestBodies/createTableBody"}}},"/v1/tables/{table}":{"get":{"operationId":"getTable","description":"Retrieves detailed information about a specific table, identified by its name or unique identifier.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getTableResponse"},"default":{"$ref":"#/components/responses/getTableResponse"}}},"post":{"operationId":"getOrCreateTable","description":"Retrieves information about a specific table if it exists; otherwise, creates a new table based on the provided schema.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getOrCreateTableResponse"},"default":{"$ref":"#/components/responses/getOrCreateTableResponse"}},"requestBody":{"$ref":"#/components/requestBodies/getOrCreateTableBody"}},"put":{"operationId":"updateTable","description":"Updates the schema or the name of an existing table.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/updateTableResponse"},"default":{"$ref":"#/components/responses/updateTableResponse"}},"requestBody":{"$ref":"#/components/requestBodies/updateTableBody"}},"delete":{"operationId":"deleteTable","description":"Permanently deletes a table and all its associated data from the system. Use with caution, as this action cannot be undone.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/deleteTableResponse"},"default":{"$ref":"#/components/responses/deleteTableResponse"}}}},"/v1/tables/{sourceTableId}/duplicate":{"post":{"operationId":"duplicateTable","description":"Duplicates the table schema & content","parameters":[{"name":"sourceTableId","in":"path","description":"The table's unique identifier","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/duplicateTableResponse"},"default":{"$ref":"#/components/responses/duplicateTableResponse"}},"requestBody":{"$ref":"#/components/requestBodies/duplicateTableBody"}}},"/v1/tables/{table}/export":{"get":{"operationId":"exportTable","description":"Starts an export job for the table","parameters":[{"name":"table","in":"path","description":"The table's unique identifier","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"The format of the exported file. CSV includes only the data while JSON includes the schema.","schema":{"type":"string","enum":["csv","json"]}},{"name":"compress","in":"query","description":"Whether or not the export is compressed (gzipped).","schema":{"default":true,"type":"boolean"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/exportTableResponse"},"default":{"$ref":"#/components/responses/exportTableResponse"}}}},"/v1/tables/{table}/jobs":{"get":{"operationId":"getTableJobs","description":"Returns a list of recent jobs for the table (export/import operations)","parameters":[{"name":"table","in":"path","description":"The table's unique identifier","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getTableJobsResponse"},"default":{"$ref":"#/components/responses/getTableJobsResponse"}}}},"/v1/tables/{table}/import":{"post":{"operationId":"importTable","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.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/importTableResponse"},"default":{"$ref":"#/components/responses/importTableResponse"}},"requestBody":{"$ref":"#/components/requestBodies/importTableBody"}}},"/v1/tables/{table}/column":{"put":{"operationId":"renameTableColumn","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.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/renameTableColumnResponse"},"default":{"$ref":"#/components/responses/renameTableColumnResponse"}},"requestBody":{"$ref":"#/components/requestBodies/renameTableColumnBody"}}},"/v1/tables/{table}/row":{"get":{"operationId":"getTableRow","description":"Fetches a specific row from a table using the row's unique identifier.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"id","in":"query","description":"Identifier of the row within the table.","required":true,"schema":{"type":"integer"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getTableRowResponse"},"default":{"$ref":"#/components/responses/getTableRowResponse"}}}},"/v1/tables/{table}/rows/find":{"post":{"operationId":"findTableRows","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.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/findTableRowsResponse"},"default":{"$ref":"#/components/responses/findTableRowsResponse"}},"requestBody":{"$ref":"#/components/requestBodies/findTableRowsBody"}}},"/v1/tables/{table}/rows":{"post":{"operationId":"createTableRows","description":"Inserts one or multiple new rows into the specified table.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/createTableRowsResponse"},"default":{"$ref":"#/components/responses/createTableRowsResponse"}},"requestBody":{"$ref":"#/components/requestBodies/createTableRowsBody"}},"put":{"operationId":"updateTableRows","description":"Updates specified rows in a table, allowing partial success with detailed feedback on errors.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/updateTableRowsResponse"},"default":{"$ref":"#/components/responses/updateTableRowsResponse"}},"requestBody":{"$ref":"#/components/requestBodies/updateTableRowsBody"}}},"/v1/tables/{table}/rows/delete":{"post":{"operationId":"deleteTableRows","description":"Allows selective deletion of rows or complete clearance of a table.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/deleteTableRowsResponse"},"default":{"$ref":"#/components/responses/deleteTableRowsResponse"}},"requestBody":{"$ref":"#/components/requestBodies/deleteTableRowsBody"}}},"/v1/tables/{table}/rows/upsert":{"post":{"operationId":"upsertTableRows","description":"Inserts or updates rows based on a key. If a row exists, it is updated; otherwise, a new row is created.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/upsertTableRowsResponse"},"default":{"$ref":"#/components/responses/upsertTableRowsResponse"}},"requestBody":{"$ref":"#/components/requestBodies/upsertTableRowsBody"}}}},"components":{"schemas":{"Table":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the table"},"name":{"description":"Required. This name is used to identify your table.","type":"string","minLength":1},"factor":{"default":1,"type":"number","minimum":1,"maximum":30,"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."},"frozen":{"type":"boolean","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."},"schema":{"type":"object","properties":{"$schema":{"type":"string"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean","object","array","null"]},"format":{"type":"string","enum":["date-time"]},"description":{"type":"string"},"pattern":{"type":"string","description":"String properties must match this pattern"},"enum":{"type":"array","items":{"type":"string"},"description":"String properties must be one of these values"},"items":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean","object","array","null"]}},"required":["type"],"additionalProperties":true,"description":"Defines the shape of items in an array"},"nullable":{"default":true,"type":"boolean"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean","object","array","null"]}},"required":["type"],"additionalProperties":true}},"x-zui":{"type":"object","properties":{"index":{"type":"integer"},"id":{"type":"string","description":"[deprecated] ID of the column."},"searchable":{"type":"boolean","description":"Indicates if the column is vectorized and searchable."},"hidden":{"type":"boolean","description":"Indicates if the field is hidden in the UI"},"order":{"type":"number","description":"Order of the column in the UI"},"width":{"type":"number","description":"Width of the column in the UI"},"schemaId":{"type":"string","description":"ID of the schema"},"computed":{"type":"object","properties":{"action":{"type":"string","enum":["ai","code","workflow"]},"dependencies":{"default":[],"type":"array","items":{"type":"string"}},"prompt":{"type":"string","description":"Prompt when action is \"ai\""},"code":{"type":"string","description":"Code to execute when action is \"code\""},"model":{"default":"gpt-4o","type":"string","maxLength":80,"description":"Model to use when action is \"ai\""},"workflowId":{"type":"string","maxLength":20,"description":"ID of Workflow to execute when action is \"workflow\""},"enabled":{"type":"boolean"}},"required":["action"],"additionalProperties":false},"typings":{"type":"string","description":"TypeScript typings for the column. Recommended if the type is \"object\", ex: \"\\{ foo: string; bar: number \\}\""}},"required":["index"],"additionalProperties":false}},"required":["type","x-zui"],"additionalProperties":false},"description":"List of keys/columns in the table."},"additionalProperties":{"type":"boolean","enum":[true],"description":"Additional properties can be provided, but they will be ignored if no column matches."},"required":{"type":"array","items":{"type":"string"},"description":"Array of required properties."},"type":{"type":"string","enum":["object"]}},"required":["properties","additionalProperties","type"],"additionalProperties":false},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."},"isComputeEnabled":{"type":"boolean","description":"Indicates if the table is enabled for computation."},"createdAt":{"type":"string","format":"date-time","description":"Timestamp of table creation."},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp of the last table update."}},"required":["id","name","schema"],"additionalProperties":false},"Column":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the column."},"name":{"type":"string","minLength":1,"maxLength":30,"description":"Name of the column, must be within length limits."},"description":{"type":"string","description":"Optional descriptive text about the column."},"searchable":{"type":"boolean","description":"Indicates if the column is vectorized and searchable."},"type":{"type":"string","enum":["string","number","boolean","date","object"],"description":"Specifies the data type of the column. Use \"object\" for complex data structures."},"typings":{"type":"string","description":"TypeScript typings for the column. Recommended if the type is \"object\", ex: \"\\{ foo: string; bar: number \\}\""},"computed":{"type":"object","properties":{"action":{"type":"string","enum":["ai","code","workflow"]},"dependencies":{"default":[],"type":"array","items":{"type":"string"}},"prompt":{"type":"string","description":"Prompt when action is \"ai\""},"code":{"type":"string","description":"Code to execute when action is \"code\""},"model":{"default":"gpt-4o","type":"string","maxLength":80,"description":"Model to use when action is \"ai\""},"workflowId":{"type":"string","maxLength":20,"description":"ID of Workflow to execute when action is \"workflow\""},"enabled":{"type":"boolean"}},"required":["action"],"additionalProperties":false},"schema":{"type":"object","additionalProperties":true}},"required":["name","type"],"additionalProperties":false},"Row":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier for the row."},"createdAt":{"type":"string","format":"date-time","description":"Timestamp of row creation."},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp of the last row update."},"computed":{"type":"object","additionalProperties":{"type":"object","properties":{"status":{"type":"string"},"error":{"type":"string"},"updatedBy":{"type":"string"},"updatedAt":{"type":"string"}},"required":["status"],"additionalProperties":false}},"stale":{"type":"array","items":{"type":"string"},"description":"[Read-only] List of stale values that are waiting to be recomputed."},"similarity":{"type":"number","description":"Optional numeric value indicating similarity, when using findTableRows."}},"required":["id","computed"],"additionalProperties":true}},"responses":{"listTablesResponse":{"description":"Returns a list of tables.","content":{"application/json":{"schema":{"type":"object","properties":{"tables":{"type":"array","items":{"$ref":"#/components/schemas/Table"}}},"required":["tables"],"title":"listTablesResponse","additionalProperties":false}}}},"getTableResponse":{"description":"Details of the requested table, including row count and indexing status.","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"},"rows":{"type":"number","description":"The total number of rows present in the table."},"stale":{"type":"number","description":"The number of stale rows that are waiting to be processed"},"indexing":{"type":"number","description":"The number of rows that are waiting to be indexed (for search)"}},"required":["table","rows","stale","indexing"],"title":"getTableResponse","additionalProperties":false}}}},"getOrCreateTableResponse":{"description":"The retrieved or created table object.","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"},"created":{"type":"boolean","description":"Flag indicating if the table was newly created."},"rows":{"type":"number","description":"The total number of rows present in the table."},"stale":{"type":"number","description":"The number of stale rows that are waiting to be processed"},"indexing":{"type":"number","description":"The number of rows that are waiting to be indexed (for search)"}},"required":["table","created","rows","stale","indexing"],"title":"getOrCreateTableResponse","additionalProperties":false}}}},"createTableResponse":{"description":"The created table object.","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"}},"required":["table"],"title":"createTableResponse","additionalProperties":false}}}},"duplicateTableResponse":{"description":"The created table object.","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"},"rows":{"type":"number","description":"The total number of rows present in the table."}},"required":["table","rows"],"title":"duplicateTableResponse","additionalProperties":false}}}},"exportTableResponse":{"description":"The export job","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"botId":{"type":"string"},"tableId":{"type":"string"},"type":{"type":"string","enum":["export","import"]},"status":{"type":"string","enum":["pending","in_progress","finalizing","completed","failed"]},"progress":{"default":0,"type":"number"},"inputFileId":{"type":"string","nullable":true},"outputFileId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","botId","tableId","type","status","inputFileId","outputFileId","createdAt","updatedAt"],"additionalProperties":false}},"required":["job"],"title":"exportTableResponse","additionalProperties":false}}}},"getTableJobsResponse":{"description":"The most recent jobs","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"botId":{"type":"string"},"tableId":{"type":"string"},"type":{"type":"string","enum":["export","import"]},"status":{"type":"string","enum":["pending","in_progress","finalizing","completed","failed"]},"progress":{"default":0,"type":"number"},"inputFileId":{"type":"string","nullable":true},"outputFileId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","botId","tableId","type","status","inputFileId","outputFileId","createdAt","updatedAt"]}}},"required":["jobs"],"title":"getTableJobsResponse","additionalProperties":false}}}},"importTableResponse":{"description":"The import job","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"botId":{"type":"string"},"tableId":{"type":"string"},"type":{"type":"string","enum":["export","import"]},"status":{"type":"string","enum":["pending","in_progress","finalizing","completed","failed"]},"progress":{"default":0,"type":"number"},"inputFileId":{"type":"string","nullable":true},"outputFileId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","botId","tableId","type","status","inputFileId","outputFileId","createdAt","updatedAt"],"additionalProperties":false}},"required":["job"],"title":"importTableResponse","additionalProperties":false}}}},"updateTableResponse":{"description":"The updated table","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"},"staleColumns":{"type":"array","items":{"type":"string"},"description":"List of columns that have become stale following the modification."}},"required":["table"],"title":"updateTableResponse","additionalProperties":false}}}},"renameTableColumnResponse":{"description":"Confirmation of the column rename operation, including the updated table schema.","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"}},"required":["table"],"title":"renameTableColumnResponse","additionalProperties":false}}}},"deleteTableResponse":{"description":"Confirmation that the table has been deleted.","content":{"application/json":{"schema":{"type":"object","title":"deleteTableResponse","additionalProperties":false}}}},"getTableRowResponse":{"description":"The requested row object.","content":{"application/json":{"schema":{"type":"object","properties":{"row":{"$ref":"#/components/schemas/Row"}},"required":["row"],"title":"getTableRowResponse","additionalProperties":false}}}},"findTableRowsResponse":{"description":"A collection of rows that match the search criteria, along with metadata such as total count and pagination details.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"hasMore":{"type":"boolean","description":"Flag indicating if there are more rows to fetch."},"offset":{"type":"integer"},"limit":{"type":"integer"},"warnings":{"type":"array","items":{"type":"string"},"description":"Alerts for minor issues that don't block the operation but suggest possible improvements."}},"required":["rows","hasMore","offset","limit"],"title":"findTableRowsResponse","additionalProperties":false}}}},"createTableRowsResponse":{"description":"A summary of the insertion operation, including any warnings or errors encountered, and the inserted row data.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"warnings":{"type":"array","items":{"type":"string"},"description":"Alerts for minor issues that don't block the operation but suggest possible improvements."},"errors":{"type":"array","items":{"type":"string"},"description":"Critical issues in specific elements that prevent their successful processing, allowing partial operation success."}},"required":["rows"],"title":"createTableRowsResponse","additionalProperties":false}}}},"deleteTableRowsResponse":{"description":"Confirms the number of rows successfully deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deletedRows":{"type":"number"}},"required":["deletedRows"],"title":"deleteTableRowsResponse","additionalProperties":false}}}},"updateTableRowsResponse":{"description":"Returns updated rows, including warnings for minor issues and errors for failed updates.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"warnings":{"type":"array","items":{"type":"string"},"description":"Alerts for minor issues that don't block the operation but suggest possible improvements."},"errors":{"type":"array","items":{"type":"string"},"description":"Critical issues in specific elements that prevent their successful processing, allowing partial operation success."}},"required":["rows"],"title":"updateTableRowsResponse","additionalProperties":false}}}},"upsertTableRowsResponse":{"description":"Summary of insertions and updates, including any warnings or errors.","content":{"application/json":{"schema":{"type":"object","properties":{"inserted":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"updated":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"warnings":{"type":"array","items":{"type":"string"},"description":"Alerts for minor issues that don't block the operation but suggest possible improvements."},"errors":{"type":"array","items":{"type":"string"},"description":"Critical issues in specific elements that prevent their successful processing, allowing partial operation success."}},"required":["inserted","updated"],"title":"upsertTableRowsResponse","additionalProperties":false}}}}},"requestBodies":{"getOrCreateTableBody":{"description":"Schema defining the structure of the table","content":{"application/json":{"schema":{"type":"object","properties":{"factor":{"default":1,"type":"number","minimum":1,"maximum":30,"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."},"frozen":{"type":"boolean","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."},"schema":{"type":"object","additionalProperties":true,"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."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."},"isComputeEnabled":{"type":"boolean","description":"Indicates if the table is enabled for computation."}},"required":["schema"],"title":"getOrCreateTableBody","additionalProperties":false}}}},"createTableBody":{"description":"Schema defining the structure of the new table","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Required. This name is used to identify your table.","type":"string","minLength":1},"factor":{"default":1,"type":"number","minimum":1,"maximum":30,"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."},"frozen":{"type":"boolean","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."},"schema":{"type":"object","additionalProperties":true,"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."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."},"isComputeEnabled":{"type":"boolean","description":"Indicates if the table is enabled for computation."}},"required":["name","schema"],"title":"createTableBody","additionalProperties":false}}}},"duplicateTableBody":{"description":"Parameters for the duplication operation.","content":{"application/json":{"schema":{"type":"object","properties":{"tableName":{"type":"string"},"schemaOnly":{"type":"boolean","description":"Only duplicate the schema, not the content"},"factor":{"type":"number","description":"Use a different factor for the table. Leave empty to use the same as the duplicated table."}},"title":"duplicateTableBody","additionalProperties":false}}}},"importTableBody":{"description":"Content to import","content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"The file ID to import. It must have been uploaded to the Files API before. Supported formats: CSV, JSON (gzipped or not)"}},"required":["fileId"],"title":"importTableBody","additionalProperties":false}}}},"updateTableBody":{"description":"The updated schema/name of the table.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Required. This name is used to identify your table.","type":"string","minLength":1},"frozen":{"type":"boolean","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."},"schema":{"type":"object","additionalProperties":true,"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."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."},"isComputeEnabled":{"type":"boolean","description":"Indicates if the table is enabled for computation."}},"title":"updateTableBody","additionalProperties":false}}}},"renameTableColumnBody":{"description":"Details of the column to be renamed, including its current name and the desired new name.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The existing name of the column."},"newName":{"description":"The new name to assign to the column.","type":"string","minLength":1,"maxLength":30}},"required":["name","newName"],"title":"renameTableColumnBody","additionalProperties":false}}}},"findTableRowsBody":{"description":"The search criteria and filters to apply when searching for rows. This includes conditions, search terms, and pagination options.","content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":100,"type":"integer","minimum":1,"maximum":1000,"description":"Limit for pagination, specifying the maximum number of rows to return."},"offset":{"default":0,"type":"integer","minimum":0,"description":"Offset for pagination, specifying where to start returning rows from."},"filter":{"type":"object","additionalProperties":true,"description":"Provide a mongodb-like filter to apply to the query. Example: \\{ \"name\": \\{ \"$eq\": \"John\" \\} \\}"},"group":{"type":"object","additionalProperties":true,"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\"] \\}"},"search":{"type":"string","maxLength":1024,"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. "},"select":{"type":"array","items":{"type":"string"},"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."},"orderBy":{"default":"id","type":"string","description":"Specifies the column by which to order the results. By default it is ordered by id. Build-in columns: id, createdAt, updatedAt"},"orderDirection":{"default":"asc","type":"string","enum":["asc","desc"],"description":"Specifies the direction of sorting, either ascending or descending."}},"title":"findTableRowsBody","additionalProperties":false}}}},"createTableRowsBody":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"minItems":1,"maxItems":1000},"waitComputed":{"type":"boolean","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."}},"required":["rows"],"title":"createTableRowsBody","additionalProperties":false}}}},"deleteTableRowsBody":{"description":"Identifiers of the rows to be deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"number","maximum":2147483647},"maxItems":1000},"filter":{"type":"object","additionalProperties":true,"description":"Filter to apply when deleting rows. Example: \\{ \"name\": \\{ \"$eq\": \"John\" \\} \\}"},"deleteAllRows":{"type":"boolean","description":"Flag to delete all rows. Use with caution as this action is irreversible."}},"title":"deleteTableRowsBody","additionalProperties":false}}}},"updateTableRowsBody":{"description":"Data for rows to update, including IDs. Errors affect only specific rows, not the entire batch.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","maximum":2147483647}},"required":["id"],"additionalProperties":true},"minItems":1,"maxItems":1000,"description":"Rows with updated data, identified by ID."},"waitComputed":{"type":"boolean","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."}},"required":["rows"],"title":"updateTableRowsBody","additionalProperties":false}}}},"upsertTableRowsBody":{"description":"Rows for insertion or update, with a key column to determine action. Supports partial successes.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","maximum":2147483647}},"additionalProperties":true},"minItems":1,"maxItems":1000},"keyColumn":{"default":"id","type":"string","minLength":1,"maxLength":30,"description":"Determines if a row is inserted or updated. Defaults to \"id\"."},"waitComputed":{"type":"boolean","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."}},"required":["rows"],"title":"upsertTableRowsBody","additionalProperties":false}}}}},"parameters":{},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"BearerAuth":[]}]}
|
|
1
|
+
{"openapi":"3.0.0","servers":[{"url":"https://api.botpress.cloud"}],"info":{"title":"Botpress Tables API","description":"API for Botpress Tables","version":"1.50.0"},"paths":{"/v1/tables":{"get":{"operationId":"listTables","description":"Retrieves a list of all tables associated with your bot.","parameters":[{"name":"tags","in":"query","description":"Optional filters to narrow down the list by tags associated with tables.","schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/listTablesResponse"},"default":{"$ref":"#/components/responses/listTablesResponse"}}},"post":{"operationId":"createTable","description":"Initiates the creation of a new table based on the provided schema, excluding system-managed fields like IDs and timestamps.","parameters":[{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/createTableResponse"},"default":{"$ref":"#/components/responses/createTableResponse"}},"requestBody":{"$ref":"#/components/requestBodies/createTableBody"}}},"/v1/tables/{table}":{"get":{"operationId":"getTable","description":"Retrieves detailed information about a specific table, identified by its name or unique identifier.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getTableResponse"},"default":{"$ref":"#/components/responses/getTableResponse"}}},"post":{"operationId":"getOrCreateTable","description":"Retrieves information about a specific table if it exists; otherwise, creates a new table based on the provided schema.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getOrCreateTableResponse"},"default":{"$ref":"#/components/responses/getOrCreateTableResponse"}},"requestBody":{"$ref":"#/components/requestBodies/getOrCreateTableBody"}},"put":{"operationId":"updateTable","description":"Updates the schema or the name of an existing table.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/updateTableResponse"},"default":{"$ref":"#/components/responses/updateTableResponse"}},"requestBody":{"$ref":"#/components/requestBodies/updateTableBody"}},"delete":{"operationId":"deleteTable","description":"Permanently deletes a table and all its associated data from the system. Use with caution, as this action cannot be undone.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/deleteTableResponse"},"default":{"$ref":"#/components/responses/deleteTableResponse"}}}},"/v1/tables/{sourceTableId}/duplicate":{"post":{"operationId":"duplicateTable","description":"Duplicates the table schema & content","parameters":[{"name":"sourceTableId","in":"path","description":"The table's unique identifier","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/duplicateTableResponse"},"default":{"$ref":"#/components/responses/duplicateTableResponse"}},"requestBody":{"$ref":"#/components/requestBodies/duplicateTableBody"}}},"/v1/tables/{table}/export":{"get":{"operationId":"exportTable","description":"Starts an export job for the table","parameters":[{"name":"table","in":"path","description":"The table's unique identifier","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"The format of the exported file. CSV includes only the data while JSON includes the schema.","schema":{"type":"string","enum":["csv","json"]}},{"name":"compress","in":"query","description":"Whether or not the export is compressed (gzipped).","schema":{"default":true,"type":"boolean"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/exportTableResponse"},"default":{"$ref":"#/components/responses/exportTableResponse"}}}},"/v1/tables/{table}/jobs":{"get":{"operationId":"getTableJobs","description":"Returns a list of recent jobs for the table (export/import operations)","parameters":[{"name":"table","in":"path","description":"The table's unique identifier","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getTableJobsResponse"},"default":{"$ref":"#/components/responses/getTableJobsResponse"}}}},"/v1/tables/{table}/import":{"post":{"operationId":"importTable","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.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/importTableResponse"},"default":{"$ref":"#/components/responses/importTableResponse"}},"requestBody":{"$ref":"#/components/requestBodies/importTableBody"}}},"/v1/tables/{table}/column":{"put":{"operationId":"renameTableColumn","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.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/renameTableColumnResponse"},"default":{"$ref":"#/components/responses/renameTableColumnResponse"}},"requestBody":{"$ref":"#/components/requestBodies/renameTableColumnBody"}}},"/v1/tables/{table}/row":{"get":{"operationId":"getTableRow","description":"Fetches a specific row from a table using the row's unique identifier.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"id","in":"query","description":"Identifier of the row within the table.","required":true,"schema":{"type":"integer"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getTableRowResponse"},"default":{"$ref":"#/components/responses/getTableRowResponse"}}}},"/v1/tables/{table}/rows/find":{"post":{"operationId":"findTableRows","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.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/findTableRowsResponse"},"default":{"$ref":"#/components/responses/findTableRowsResponse"}},"requestBody":{"$ref":"#/components/requestBodies/findTableRowsBody"}}},"/v1/tables/{table}/rows":{"post":{"operationId":"createTableRows","description":"Inserts one or multiple new rows into the specified table.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/createTableRowsResponse"},"default":{"$ref":"#/components/responses/createTableRowsResponse"}},"requestBody":{"$ref":"#/components/requestBodies/createTableRowsBody"}},"put":{"operationId":"updateTableRows","description":"Updates specified rows in a table, allowing partial success with detailed feedback on errors.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/updateTableRowsResponse"},"default":{"$ref":"#/components/responses/updateTableRowsResponse"}},"requestBody":{"$ref":"#/components/requestBodies/updateTableRowsBody"}}},"/v1/tables/{table}/rows/delete":{"post":{"operationId":"deleteTableRows","description":"Allows selective deletion of rows or complete clearance of a table.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/deleteTableRowsResponse"},"default":{"$ref":"#/components/responses/deleteTableRowsResponse"}},"requestBody":{"$ref":"#/components/requestBodies/deleteTableRowsBody"}}},"/v1/tables/{table}/rows/upsert":{"post":{"operationId":"upsertTableRows","description":"Inserts or updates rows based on a key. If a row exists, it is updated; otherwise, a new row is created.","parameters":[{"name":"table","in":"path","description":"The table's name or unique identifier for targeting specific table operations.","required":true,"schema":{"type":"string"}},{"name":"x-bot-id","in":"header","description":"Bot id","required":true,"schema":{"type":"string"}},{"name":"x-integration-id","in":"header","description":"Integration id","required":false,"schema":{"type":"string"}},{"name":"x-integration-alias","in":"header","description":"Integration alias","required":false,"schema":{"type":"string"}},{"name":"x-integration-name","in":"header","description":"Integration name","required":false,"schema":{"type":"string"}},{"name":"x-user-id","in":"header","description":"User Id","required":false,"schema":{"type":"string"}},{"name":"x-user-role","in":"header","description":"User Role","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/upsertTableRowsResponse"},"default":{"$ref":"#/components/responses/upsertTableRowsResponse"}},"requestBody":{"$ref":"#/components/requestBodies/upsertTableRowsBody"}}}},"components":{"schemas":{"Table":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the table"},"name":{"description":"Required. This name is used to identify your table.","type":"string","minLength":1},"factor":{"default":1,"type":"number","minimum":1,"maximum":30,"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."},"frozen":{"type":"boolean","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."},"schema":{"type":"object","properties":{"$schema":{"type":"string"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean","object","array","null"]},"format":{"type":"string","enum":["date-time"]},"description":{"type":"string"},"pattern":{"type":"string","description":"String properties must match this pattern"},"enum":{"type":"array","items":{"type":"string"},"description":"String properties must be one of these values"},"items":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean","object","array","null"]}},"required":["type"],"additionalProperties":true,"description":"Defines the shape of items in an array"},"nullable":{"default":true,"type":"boolean"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean","object","array","null"]}},"required":["type"],"additionalProperties":true}},"x-zui":{"type":"object","properties":{"index":{"type":"integer"},"id":{"type":"string","description":"[deprecated] ID of the column."},"searchable":{"type":"boolean","description":"Indicates if the column is vectorized and searchable."},"hidden":{"type":"boolean","description":"Indicates if the field is hidden in the UI"},"order":{"type":"number","description":"Order of the column in the UI"},"width":{"type":"number","description":"Width of the column in the UI"},"schemaId":{"type":"string","description":"ID of the schema"},"computed":{"type":"object","properties":{"action":{"type":"string","enum":["ai","code","workflow"]},"dependencies":{"default":[],"type":"array","items":{"type":"string"}},"prompt":{"type":"string","description":"Prompt when action is \"ai\""},"code":{"type":"string","description":"Code to execute when action is \"code\""},"model":{"default":"gpt-4o","type":"string","maxLength":80,"description":"Model to use when action is \"ai\""},"workflowId":{"type":"string","maxLength":20,"description":"ID of Workflow to execute when action is \"workflow\""},"enabled":{"type":"boolean"}},"required":["action"],"additionalProperties":false},"typings":{"type":"string","description":"TypeScript typings for the column. Recommended if the type is \"object\", ex: \"\\{ foo: string; bar: number \\}\""}},"required":["index"],"additionalProperties":false}},"required":["type","x-zui"],"additionalProperties":false},"description":"List of keys/columns in the table."},"additionalProperties":{"type":"boolean","enum":[true],"description":"Additional properties can be provided, but they will be ignored if no column matches."},"required":{"type":"array","items":{"type":"string"},"description":"Array of required properties."},"type":{"type":"string","enum":["object"]}},"required":["properties","additionalProperties","type"],"additionalProperties":false},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."},"isComputeEnabled":{"type":"boolean","description":"Indicates if the table is enabled for computation."},"createdAt":{"type":"string","format":"date-time","description":"Timestamp of table creation."},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp of the last table update."}},"required":["id","name","schema"],"additionalProperties":false},"Column":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the column."},"name":{"type":"string","minLength":1,"maxLength":30,"description":"Name of the column, must be within length limits."},"description":{"type":"string","description":"Optional descriptive text about the column."},"searchable":{"type":"boolean","description":"Indicates if the column is vectorized and searchable."},"type":{"type":"string","enum":["string","number","boolean","date","object"],"description":"Specifies the data type of the column. Use \"object\" for complex data structures."},"typings":{"type":"string","description":"TypeScript typings for the column. Recommended if the type is \"object\", ex: \"\\{ foo: string; bar: number \\}\""},"computed":{"type":"object","properties":{"action":{"type":"string","enum":["ai","code","workflow"]},"dependencies":{"default":[],"type":"array","items":{"type":"string"}},"prompt":{"type":"string","description":"Prompt when action is \"ai\""},"code":{"type":"string","description":"Code to execute when action is \"code\""},"model":{"default":"gpt-4o","type":"string","maxLength":80,"description":"Model to use when action is \"ai\""},"workflowId":{"type":"string","maxLength":20,"description":"ID of Workflow to execute when action is \"workflow\""},"enabled":{"type":"boolean"}},"required":["action"],"additionalProperties":false},"schema":{"type":"object","additionalProperties":true}},"required":["name","type"],"additionalProperties":false},"Row":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier for the row."},"createdAt":{"type":"string","format":"date-time","description":"Timestamp of row creation."},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp of the last row update."},"computed":{"type":"object","additionalProperties":{"type":"object","properties":{"status":{"type":"string"},"error":{"type":"string"},"updatedBy":{"type":"string"},"updatedAt":{"type":"string"}},"required":["status"],"additionalProperties":false}},"stale":{"type":"array","items":{"type":"string"},"description":"[Read-only] List of stale values that are waiting to be recomputed."},"similarity":{"type":"number","description":"Optional numeric value indicating similarity, when using findTableRows."}},"required":["id","computed"],"additionalProperties":true}},"responses":{"listTablesResponse":{"description":"Returns a list of tables.","content":{"application/json":{"schema":{"type":"object","properties":{"tables":{"type":"array","items":{"$ref":"#/components/schemas/Table"}}},"required":["tables"],"title":"listTablesResponse","additionalProperties":false}}}},"getTableResponse":{"description":"Details of the requested table, including row count and indexing status.","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"},"rows":{"type":"number","description":"The total number of rows present in the table."},"stale":{"type":"number","description":"The number of stale rows that are waiting to be processed"},"indexing":{"type":"number","description":"The number of rows that are waiting to be indexed (for search)"}},"required":["table","rows","stale","indexing"],"title":"getTableResponse","additionalProperties":false}}}},"getOrCreateTableResponse":{"description":"The retrieved or created table object.","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"},"created":{"type":"boolean","description":"Flag indicating if the table was newly created."},"rows":{"type":"number","description":"The total number of rows present in the table."},"stale":{"type":"number","description":"The number of stale rows that are waiting to be processed"},"indexing":{"type":"number","description":"The number of rows that are waiting to be indexed (for search)"}},"required":["table","created","rows","stale","indexing"],"title":"getOrCreateTableResponse","additionalProperties":false}}}},"createTableResponse":{"description":"The created table object.","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"}},"required":["table"],"title":"createTableResponse","additionalProperties":false}}}},"duplicateTableResponse":{"description":"The created table object.","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"},"rows":{"type":"number","description":"The total number of rows present in the table."}},"required":["table","rows"],"title":"duplicateTableResponse","additionalProperties":false}}}},"exportTableResponse":{"description":"The export job","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"botId":{"type":"string"},"tableId":{"type":"string"},"type":{"type":"string","enum":["export","import"]},"status":{"type":"string","enum":["pending","in_progress","finalizing","completed","failed"]},"progress":{"default":0,"type":"number"},"inputFileId":{"type":"string","nullable":true},"outputFileId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","botId","tableId","type","status","inputFileId","outputFileId","createdAt","updatedAt"],"additionalProperties":false}},"required":["job"],"title":"exportTableResponse","additionalProperties":false}}}},"getTableJobsResponse":{"description":"The most recent jobs","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"botId":{"type":"string"},"tableId":{"type":"string"},"type":{"type":"string","enum":["export","import"]},"status":{"type":"string","enum":["pending","in_progress","finalizing","completed","failed"]},"progress":{"default":0,"type":"number"},"inputFileId":{"type":"string","nullable":true},"outputFileId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","botId","tableId","type","status","inputFileId","outputFileId","createdAt","updatedAt"]}}},"required":["jobs"],"title":"getTableJobsResponse","additionalProperties":false}}}},"importTableResponse":{"description":"The import job","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"botId":{"type":"string"},"tableId":{"type":"string"},"type":{"type":"string","enum":["export","import"]},"status":{"type":"string","enum":["pending","in_progress","finalizing","completed","failed"]},"progress":{"default":0,"type":"number"},"inputFileId":{"type":"string","nullable":true},"outputFileId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","botId","tableId","type","status","inputFileId","outputFileId","createdAt","updatedAt"],"additionalProperties":false}},"required":["job"],"title":"importTableResponse","additionalProperties":false}}}},"updateTableResponse":{"description":"The updated table","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"},"staleColumns":{"type":"array","items":{"type":"string"},"description":"List of columns that have become stale following the modification."}},"required":["table"],"title":"updateTableResponse","additionalProperties":false}}}},"renameTableColumnResponse":{"description":"Confirmation of the column rename operation, including the updated table schema.","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"$ref":"#/components/schemas/Table"}},"required":["table"],"title":"renameTableColumnResponse","additionalProperties":false}}}},"deleteTableResponse":{"description":"Confirmation that the table has been deleted.","content":{"application/json":{"schema":{"type":"object","title":"deleteTableResponse","additionalProperties":false}}}},"getTableRowResponse":{"description":"The requested row object.","content":{"application/json":{"schema":{"type":"object","properties":{"row":{"$ref":"#/components/schemas/Row"}},"required":["row"],"title":"getTableRowResponse","additionalProperties":false}}}},"findTableRowsResponse":{"description":"A collection of rows that match the search criteria, along with metadata such as total count and pagination details.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"hasMore":{"type":"boolean","description":"Flag indicating if there are more rows to fetch."},"offset":{"type":"integer"},"limit":{"type":"integer"},"warnings":{"type":"array","items":{"type":"string"},"description":"Alerts for minor issues that don't block the operation but suggest possible improvements."}},"required":["rows","hasMore","offset","limit"],"title":"findTableRowsResponse","additionalProperties":false}}}},"createTableRowsResponse":{"description":"A summary of the insertion operation, including any warnings or errors encountered, and the inserted row data.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"warnings":{"type":"array","items":{"type":"string"},"description":"Alerts for minor issues that don't block the operation but suggest possible improvements."},"errors":{"type":"array","items":{"type":"string"},"description":"Critical issues in specific elements that prevent their successful processing, allowing partial operation success."}},"required":["rows"],"title":"createTableRowsResponse","additionalProperties":false}}}},"deleteTableRowsResponse":{"description":"Confirms the number of rows successfully deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deletedRows":{"type":"number"}},"required":["deletedRows"],"title":"deleteTableRowsResponse","additionalProperties":false}}}},"updateTableRowsResponse":{"description":"Returns updated rows, including warnings for minor issues and errors for failed updates.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"warnings":{"type":"array","items":{"type":"string"},"description":"Alerts for minor issues that don't block the operation but suggest possible improvements."},"errors":{"type":"array","items":{"type":"string"},"description":"Critical issues in specific elements that prevent their successful processing, allowing partial operation success."}},"required":["rows"],"title":"updateTableRowsResponse","additionalProperties":false}}}},"upsertTableRowsResponse":{"description":"Summary of insertions and updates, including any warnings or errors.","content":{"application/json":{"schema":{"type":"object","properties":{"inserted":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"updated":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"warnings":{"type":"array","items":{"type":"string"},"description":"Alerts for minor issues that don't block the operation but suggest possible improvements."},"errors":{"type":"array","items":{"type":"string"},"description":"Critical issues in specific elements that prevent their successful processing, allowing partial operation success."}},"required":["inserted","updated"],"title":"upsertTableRowsResponse","additionalProperties":false}}}}},"requestBodies":{"getOrCreateTableBody":{"description":"Schema defining the structure of the table","content":{"application/json":{"schema":{"type":"object","properties":{"factor":{"default":1,"type":"number","minimum":1,"maximum":30,"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."},"frozen":{"type":"boolean","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."},"schema":{"type":"object","additionalProperties":true,"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."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."},"isComputeEnabled":{"type":"boolean","description":"Indicates if the table is enabled for computation."}},"required":["schema"],"title":"getOrCreateTableBody","additionalProperties":false}}}},"createTableBody":{"description":"Schema defining the structure of the new table","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Required. This name is used to identify your table.","type":"string","minLength":1},"factor":{"default":1,"type":"number","minimum":1,"maximum":30,"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."},"frozen":{"type":"boolean","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."},"schema":{"type":"object","additionalProperties":true,"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."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."},"isComputeEnabled":{"type":"boolean","description":"Indicates if the table is enabled for computation."}},"required":["name","schema"],"title":"createTableBody","additionalProperties":false}}}},"duplicateTableBody":{"description":"Parameters for the duplication operation.","content":{"application/json":{"schema":{"type":"object","properties":{"tableName":{"type":"string"},"schemaOnly":{"type":"boolean","description":"Only duplicate the schema, not the content"},"factor":{"type":"number","description":"Use a different factor for the table. Leave empty to use the same as the duplicated table."}},"title":"duplicateTableBody","additionalProperties":false}}}},"importTableBody":{"description":"Content to import","content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"The file ID to import. It must have been uploaded to the Files API before. Supported formats: CSV, JSON (gzipped or not)"}},"required":["fileId"],"title":"importTableBody","additionalProperties":false}}}},"updateTableBody":{"description":"The updated schema/name of the table.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Required. This name is used to identify your table.","type":"string","minLength":1},"frozen":{"type":"boolean","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."},"schema":{"type":"object","additionalProperties":true,"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."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."},"isComputeEnabled":{"type":"boolean","description":"Indicates if the table is enabled for computation."}},"title":"updateTableBody","additionalProperties":false}}}},"renameTableColumnBody":{"description":"Details of the column to be renamed, including its current name and the desired new name.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The existing name of the column."},"newName":{"description":"The new name to assign to the column.","type":"string","minLength":1,"maxLength":30}},"required":["name","newName"],"title":"renameTableColumnBody","additionalProperties":false}}}},"findTableRowsBody":{"description":"The search criteria and filters to apply when searching for rows. This includes conditions, search terms, and pagination options.","content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":100,"type":"integer","minimum":1,"maximum":1000,"description":"Limit for pagination, specifying the maximum number of rows to return."},"offset":{"default":0,"type":"integer","minimum":0,"description":"Offset for pagination, specifying where to start returning rows from."},"filter":{"type":"object","additionalProperties":true,"description":"Provide a mongodb-like filter to apply to the query. Example: \\{ \"name\": \\{ \"$eq\": \"John\" \\} \\}"},"group":{"type":"object","additionalProperties":true,"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\"] \\}"},"search":{"type":"string","maxLength":1024,"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. "},"select":{"type":"array","items":{"type":"string"},"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."},"orderBy":{"default":"id","type":"string","description":"Specifies the column by which to order the results. By default it is ordered by id. Build-in columns: id, createdAt, updatedAt"},"orderDirection":{"default":"asc","type":"string","enum":["asc","desc"],"description":"Specifies the direction of sorting, either ascending or descending."}},"title":"findTableRowsBody","additionalProperties":false}}}},"createTableRowsBody":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"minItems":1,"maxItems":1000},"waitComputed":{"type":"boolean","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."}},"required":["rows"],"title":"createTableRowsBody","additionalProperties":false}}}},"deleteTableRowsBody":{"description":"Identifiers of the rows to be deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"number","maximum":2147483647},"maxItems":1000},"filter":{"type":"object","additionalProperties":true,"description":"Filter to apply when deleting rows. Example: \\{ \"name\": \\{ \"$eq\": \"John\" \\} \\}"},"deleteAllRows":{"type":"boolean","description":"Flag to delete all rows. Use with caution as this action is irreversible."}},"title":"deleteTableRowsBody","additionalProperties":false}}}},"updateTableRowsBody":{"description":"Data for rows to update, including IDs. Errors affect only specific rows, not the entire batch.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","maximum":2147483647}},"required":["id"],"additionalProperties":true},"minItems":1,"maxItems":1000,"description":"Rows with updated data, identified by ID."},"waitComputed":{"type":"boolean","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."}},"required":["rows"],"title":"updateTableRowsBody","additionalProperties":false}}}},"upsertTableRowsBody":{"description":"Rows for insertion or update, with a key column to determine action. Supports partial successes.","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","maximum":2147483647}},"additionalProperties":true},"minItems":1,"maxItems":1000},"keyColumn":{"default":"id","type":"string","minLength":1,"maxLength":30,"description":"Determines if a row is inserted or updated. Defaults to \"id\"."},"waitComputed":{"type":"boolean","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."}},"required":["rows"],"title":"upsertTableRowsBody","additionalProperties":false}}}}},"parameters":{},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"BearerAuth":[]}]}
|
package/src/gen/tables/state.ts
CHANGED
|
@@ -1226,7 +1226,7 @@ export const state = {
|
|
|
1226
1226
|
"title": "Botpress Tables API",
|
|
1227
1227
|
"description": "API for Botpress Tables",
|
|
1228
1228
|
"server": "https://api.botpress.cloud",
|
|
1229
|
-
"version": "1.
|
|
1229
|
+
"version": "1.50.0",
|
|
1230
1230
|
"prefix": "v1"
|
|
1231
1231
|
},
|
|
1232
1232
|
"errors": [
|