@botpress/api 1.52.0 → 1.52.1
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 +159 -154
- package/dist/src/index.d.ts +6 -175
- 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/openapi.json +1 -1
- package/src/gen/runtime/openapi.json +1 -1
- package/src/gen/runtime/state.ts +1 -1
- package/src/gen/state.ts +1 -1
- package/src/gen/tables/openapi.json +1 -1
- package/src/gen/tables/state.ts +1 -1
package/src/gen/runtime/state.ts
CHANGED
|
@@ -3608,7 +3608,7 @@ export const state = {
|
|
|
3608
3608
|
"title": "Botpress Runtime API",
|
|
3609
3609
|
"description": "API for Botpress Runtime",
|
|
3610
3610
|
"server": "https://api.botpress.cloud",
|
|
3611
|
-
"version": "1.52.
|
|
3611
|
+
"version": "1.52.1",
|
|
3612
3612
|
"prefix": "v1"
|
|
3613
3613
|
},
|
|
3614
3614
|
"defaultParameters": {
|
package/src/gen/state.ts
CHANGED
|
@@ -20101,7 +20101,7 @@ export const state = {
|
|
|
20101
20101
|
"title": "Botpress API",
|
|
20102
20102
|
"description": "API for Botpress Cloud",
|
|
20103
20103
|
"server": "https://api.botpress.cloud",
|
|
20104
|
-
"version": "1.52.
|
|
20104
|
+
"version": "1.52.1",
|
|
20105
20105
|
"prefix": "v1"
|
|
20106
20106
|
},
|
|
20107
20107
|
"errors": [
|
|
@@ -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.52.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"}},"tags":["documented"]},"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"}},"tags":["documented"],"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"}},"tags":["documented"]},"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"}},"tags":["documented"],"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"}},"tags":["documented"],"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"}},"tags":["documented"]}},"/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"}},"tags":["documented"],"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"}},"tags":["documented"],"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"}},"tags":["documented"]}},"/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"}},"tags":["documented"],"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"}},"tags":["documented"],"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"}},"tags":["documented"],"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"}},"tags":["documented"],"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"}},"tags":["documented"],"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":[]}],"tags":[{"name":"documented"}]}
|
|
1
|
+
{"openapi":"3.0.0","servers":[{"url":"https://api.botpress.cloud"}],"info":{"title":"Botpress Tables API","description":"API for Botpress Tables","version":"1.52.1"},"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"}},"tags":["documented"]},"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"}},"tags":["documented"],"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"}},"tags":["documented"]},"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"}},"tags":["documented"],"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"}},"tags":["documented"],"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"}},"tags":["documented"]}},"/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"}},"tags":["documented"],"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"}},"tags":["documented"],"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"}},"tags":["documented"]}},"/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"}},"tags":["documented"],"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"}},"tags":["documented"],"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"}},"tags":["documented"],"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"}},"tags":["documented"],"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"}},"tags":["documented"],"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":[]}],"tags":[{"name":"documented"}]}
|
package/src/gen/tables/state.ts
CHANGED
|
@@ -1881,7 +1881,7 @@ export const state = {
|
|
|
1881
1881
|
"title": "Botpress Tables API",
|
|
1882
1882
|
"description": "API for Botpress Tables",
|
|
1883
1883
|
"server": "https://api.botpress.cloud",
|
|
1884
|
-
"version": "1.52.
|
|
1884
|
+
"version": "1.52.1",
|
|
1885
1885
|
"prefix": "v1"
|
|
1886
1886
|
},
|
|
1887
1887
|
"defaultParameters": {
|