2022-03-01 19:35:08 +01:00
/ * *
* This file was auto - generated by openapi - typescript .
* Do not make direct changes to the file .
* /
export interface paths {
"/applications" : {
post : {
parameters : {
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the created application. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "applicationOutput" ]
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "application" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
"/applications/{appId}" : {
get : {
parameters : {
path : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
appId : components [ "parameters" ] [ "appIdUrl" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the retrieved application. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "applicationOutput" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
put : {
parameters : {
path : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
appId : components [ "parameters" ] [ "appIdUrl" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the updated application. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "applicationOutput" ]
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "application" ]
}
}
}
2022-03-01 19:35:08 +01:00
delete : {
parameters : {
path : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
appId : components [ "parameters" ] [ "appIdUrl" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the deleted application. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "applicationOutput" ]
}
}
}
}
}
2022-03-01 19:35:08 +01:00
"/applications/search" : {
/** Based on application properties (currently only name) search for applications. */
post : {
parameters : {
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the applications that were found based on the search parameters. */
200 : {
content : {
"application/json" : {
2022-03-01 23:37:42 +01:00
data : components [ "schemas" ] [ "application" ] [ ]
}
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "nameSearch" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
"/queries/{queryId}" : {
/** Queries which have been created within a Budibase app can be executed using this, */
post : {
parameters : {
path : {
/** The ID of the query which this request is targeting. */
2022-03-01 23:37:42 +01:00
queryId : components [ "parameters" ] [ "queryId" ]
}
2022-03-01 19:35:08 +01:00
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the result of the query execution. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "executeQueryOutput" ]
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "executeQuery" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
"/queries/search" : {
/** Based on query properties (currently only name) search for queries. */
post : {
parameters : {
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the queries found based on the search parameters. */
200 : {
content : {
"application/json" : {
2022-03-01 23:37:42 +01:00
data : components [ "schemas" ] [ "query" ] [ ]
}
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "nameSearch" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
"/tables/{tableId}/rows" : {
/** Creates a row within the specified table. */
post : {
parameters : {
path : {
/** The ID of the table which this request is targeting. */
2022-03-01 23:37:42 +01:00
tableId : components [ "parameters" ] [ "tableId" ]
}
2022-03-01 19:35:08 +01:00
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the created row, including the ID which has been generated for it. This can be found in the Budibase portal, viewed under the developer information. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "rowOutput" ]
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "row" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
"/tables/{tableId}/rows/{rowId}" : {
/** This gets a single row, it will be enriched with the full related rows, rather than the squashed "primaryDisplay" format returned by the search endpoint. */
get : {
parameters : {
path : {
/** The ID of the table which this request is targeting. */
2022-03-01 23:37:42 +01:00
tableId : components [ "parameters" ] [ "tableId" ]
2022-03-01 19:35:08 +01:00
/** The ID of the row which this request is targeting. */
2022-03-01 23:37:42 +01:00
rowId : components [ "parameters" ] [ "rowId" ]
}
2022-03-01 19:35:08 +01:00
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the retrieved row. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "rowOutput" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
/** Updates a row within the specified table. */
put : {
parameters : {
path : {
/** The ID of the table which this request is targeting. */
2022-03-01 23:37:42 +01:00
tableId : components [ "parameters" ] [ "tableId" ]
2022-03-01 19:35:08 +01:00
/** The ID of the row which this request is targeting. */
2022-03-01 23:37:42 +01:00
rowId : components [ "parameters" ] [ "rowId" ]
}
2022-03-01 19:35:08 +01:00
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the created row, including the ID which has been generated for it. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "rowOutput" ]
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "row" ]
}
}
}
2022-03-01 19:35:08 +01:00
/** Deletes a row within the specified table. */
delete : {
parameters : {
path : {
/** The ID of the table which this request is targeting. */
2022-03-01 23:37:42 +01:00
tableId : components [ "parameters" ] [ "tableId" ]
2022-03-01 19:35:08 +01:00
/** The ID of the row which this request is targeting. */
2022-03-01 23:37:42 +01:00
rowId : components [ "parameters" ] [ "rowId" ]
}
2022-03-01 19:35:08 +01:00
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the deleted row, including the ID which has been generated for it. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "rowOutput" ]
}
}
}
}
}
2022-03-01 19:35:08 +01:00
"/tables/{tableId}/rows/search" : {
post : {
parameters : {
path : {
/** The ID of the table which this request is targeting. */
2022-03-01 23:37:42 +01:00
tableId : components [ "parameters" ] [ "tableId" ]
}
2022-03-01 19:35:08 +01:00
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** The response will contain an array of rows that match the search parameters. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "searchOutput" ]
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
"application/json" : {
query : {
/ * *
* @description A map of field name to the string to search for , this will look for rows that have a value starting with the string value .
* @example [ object Object ]
* /
2022-03-01 23:37:42 +01:00
string ? : { [ key : string ] : string }
2022-03-01 19:35:08 +01:00
/** @description A fuzzy search, only supported by internal tables. */
2022-03-01 23:37:42 +01:00
fuzzy ? : { [ key : string ] : unknown }
2022-03-01 19:35:08 +01:00
/ * *
* @description Searches within a range , the format of this must be columnName - > [ low , high ] .
* @example [ object Object ]
* /
2022-03-01 23:37:42 +01:00
range ? : { [ key : string ] : unknown }
2022-03-01 19:35:08 +01:00
/** @description Searches for rows that have a column value that is exactly the value set. */
2022-03-01 23:37:42 +01:00
equal ? : { [ key : string ] : unknown }
2022-03-01 19:35:08 +01:00
/** @description Searches for any row which does not contain the specified column value. */
2022-03-01 23:37:42 +01:00
notEqual ? : { [ key : string ] : unknown }
2022-03-01 19:35:08 +01:00
/ * *
* @description Searches for rows which do not contain the specified column . The object should simply contain keys of the column names , these can map to any value .
* @example [ object Object ]
* /
2022-03-01 23:37:42 +01:00
empty ? : { [ key : string ] : unknown }
2022-03-01 19:35:08 +01:00
/** @description Searches for rows which have the specified column. */
2022-03-01 23:37:42 +01:00
notEmpty ? : { [ key : string ] : unknown }
2022-03-01 19:35:08 +01:00
/** @description Searches for rows which have a column value that is any of the specified values. The format of this must be columnName -> [value1, value2]. */
2022-03-01 23:37:42 +01:00
oneOf ? : { [ key : string ] : unknown }
}
2022-03-01 19:35:08 +01:00
/** @description Enables pagination, by default this is disabled. */
2022-03-01 23:37:42 +01:00
paginate? : boolean
2022-03-01 19:35:08 +01:00
/** @description If retrieving another page, the bookmark from the previous request must be supplied. */
2022-03-01 23:37:42 +01:00
bookmark? : string | number
2022-03-01 19:35:08 +01:00
/** @description The maximum number of rows to return, useful when paginating, for internal tables this will be limited to 1000, for SQL tables it will be 5000. */
2022-03-01 23:37:42 +01:00
limit? : number
2022-03-01 19:35:08 +01:00
/** @description A set of parameters describing the sort behaviour of the search. */
sort ? : {
/ * *
* @description The order of the sort , by default this is ascending .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
order ? : "ascending" | "descending"
2022-03-01 19:35:08 +01:00
/** @description The name of the column by which the rows will be sorted. */
2022-03-01 23:37:42 +01:00
column? : string
2022-03-01 19:35:08 +01:00
/ * *
* @description Defines whether the column should be treated as a string or as numbers when sorting .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
type ? : "string" | "number"
}
}
}
}
}
}
2022-03-01 19:35:08 +01:00
"/tables" : {
/** Create a table, this could be internal or external. */
post : {
parameters : {
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the created table, including the ID which has been generated for it. This can be internal or external data sources. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "tableOutput" ]
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "table" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
"/tables/{tableId}" : {
/** Lookup a table, this could be internal or external. */
get : {
parameters : {
path : {
/** The ID of the table which this request is targeting. */
2022-03-01 23:37:42 +01:00
tableId : components [ "parameters" ] [ "tableId" ]
}
2022-03-01 19:35:08 +01:00
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the retrieved table. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "tableOutput" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
/** Update a table, this could be internal or external. */
put : {
parameters : {
path : {
/** The ID of the table which this request is targeting. */
2022-03-01 23:37:42 +01:00
tableId : components [ "parameters" ] [ "tableId" ]
}
2022-03-01 19:35:08 +01:00
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the updated table. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "tableOutput" ]
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "table" ]
}
}
}
2022-03-01 19:35:08 +01:00
/** Delete a table, this could be internal or external. */
delete : {
parameters : {
path : {
/** The ID of the table which this request is targeting. */
2022-03-01 23:37:42 +01:00
tableId : components [ "parameters" ] [ "tableId" ]
}
2022-03-01 19:35:08 +01:00
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the deleted table. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "tableOutput" ]
}
}
}
}
}
2022-03-01 19:35:08 +01:00
"/tables/search" : {
/** Based on table properties (currently only name) search for tables. This could be an internal or an external table. */
post : {
parameters : {
header : {
/** The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
"x-budibase-app-id" : components [ "parameters" ] [ "appId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the found tables, based on the search parameters. */
200 : {
content : {
"application/json" : {
2022-03-01 23:37:42 +01:00
data : components [ "schemas" ] [ "table" ] [ ]
}
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "nameSearch" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
"/users" : {
post : {
responses : {
/** Returns the created user. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "userOutput" ]
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "user" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
"/users/{userId}" : {
get : {
parameters : {
path : {
/** The ID of the user which this request is targeting. */
2022-03-01 23:37:42 +01:00
userId : components [ "parameters" ] [ "userId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the retrieved user. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "userOutput" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
put : {
parameters : {
path : {
/** The ID of the user which this request is targeting. */
2022-03-01 23:37:42 +01:00
userId : components [ "parameters" ] [ "userId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the updated user. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "userOutput" ]
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "user" ]
}
}
}
2022-03-01 19:35:08 +01:00
delete : {
parameters : {
path : {
/** The ID of the user which this request is targeting. */
2022-03-01 23:37:42 +01:00
userId : components [ "parameters" ] [ "userId" ]
}
}
2022-03-01 19:35:08 +01:00
responses : {
/** Returns the deleted user. */
200 : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "userOutput" ]
}
}
}
}
}
2022-03-01 19:35:08 +01:00
"/users/search" : {
/** Based on user properties (currently only name) search for users. */
post : {
responses : {
/** Returns the found users based on search parameters. */
200 : {
content : {
"application/json" : {
2022-03-01 23:37:42 +01:00
data : components [ "schemas" ] [ "user" ] [ ]
}
}
}
}
2022-03-01 19:35:08 +01:00
requestBody : {
content : {
2022-03-01 23:37:42 +01:00
"application/json" : components [ "schemas" ] [ "nameSearch" ]
}
}
}
}
2022-03-01 19:35:08 +01:00
}
export interface components {
schemas : {
application : {
/** @description The name of the app. */
2022-03-01 23:37:42 +01:00
name : string
2022-03-01 19:35:08 +01:00
/** @description The URL by which the app is accessed, this must be URL encoded. */
2022-03-01 23:37:42 +01:00
url : string
}
2022-03-01 19:35:08 +01:00
applicationOutput : {
data : {
/** @description The name of the app. */
2022-03-01 23:37:42 +01:00
name : string
2022-03-01 19:35:08 +01:00
/** @description The URL by which the app is accessed, this must be URL encoded. */
2022-03-01 23:37:42 +01:00
url : string
2022-03-01 19:35:08 +01:00
/** @description The ID of the app. */
2022-03-01 23:37:42 +01:00
_id : string
2022-03-01 19:35:08 +01:00
/ * *
* @description The status of the app , stating it if is the development or published version .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
status : "development" | "published"
2022-03-01 19:35:08 +01:00
/** @description States when the app was created, will be constant. Stored in ISO format. */
2022-03-01 23:37:42 +01:00
createdAt : string
2022-03-01 19:35:08 +01:00
/** @description States the last time the app was updated - stored in ISO format. */
2022-03-01 23:37:42 +01:00
updatedAt : string
2022-03-01 19:35:08 +01:00
/** @description States the version of the Budibase client this app is currently based on. */
2022-03-01 23:37:42 +01:00
version : string
2022-03-01 19:35:08 +01:00
/** @description In a multi-tenant environment this will state the tenant this app is within. */
2022-03-01 23:37:42 +01:00
tenantId? : string
2022-03-01 19:35:08 +01:00
/** @description The user this app is currently being built by. */
2022-03-01 23:37:42 +01:00
lockedBy ? : { [ key : string ] : unknown }
}
}
2022-03-01 19:35:08 +01:00
/** @description The row to be created/updated, based on the table schema. */
2022-03-01 23:37:42 +01:00
row : { [ key : string ] : unknown }
2022-03-01 19:35:08 +01:00
searchOutput : {
/** @description An array of rows, these will each contain an _id field which can be used to update or delete them. */
2022-03-01 23:37:42 +01:00
data : { [ key : string ] : unknown } [ ]
2022-03-01 19:35:08 +01:00
/** @description If pagination in use, this should be provided. */
2022-03-01 23:37:42 +01:00
bookmark? : string | number
2022-03-01 19:35:08 +01:00
/** @description If pagination in use, this will determine if there is another page to fetch. */
2022-03-01 23:37:42 +01:00
hasNextPage? : boolean
}
2022-03-01 19:35:08 +01:00
rowOutput : {
/** @description The row to be created/updated, based on the table schema. */
data : {
/** @description The ID of the row. */
2022-03-01 23:37:42 +01:00
_id : string
2022-03-01 19:35:08 +01:00
/** @description The ID of the table this row comes from. */
2022-03-01 23:37:42 +01:00
tableId : string
} & { [ key : string ] : unknown }
}
2022-03-01 19:35:08 +01:00
/** @description The table to be created/updated. */
table : {
/** @description The name of the table. */
2022-03-01 23:37:42 +01:00
name : string
2022-03-01 19:35:08 +01:00
/** @description The name of the column which should be used in relationship tags when relating to this table. */
2022-03-01 23:37:42 +01:00
primaryDisplay? : string
2022-03-01 19:35:08 +01:00
schema : {
[ key : string ] :
| {
/ * *
* @description A relationship column .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
type ? : "link"
2022-03-01 19:35:08 +01:00
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints ? : {
/** @enum {string} */
2022-03-01 23:37:42 +01:00
type ? : "string" | "number" | "object" | "boolean"
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is required or not. */
2022-03-01 23:37:42 +01:00
presence? : boolean
}
2022-03-01 19:35:08 +01:00
/** @description The name of the column. */
2022-03-01 23:37:42 +01:00
name? : string
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is automatically generated. */
2022-03-01 23:37:42 +01:00
autocolumn? : boolean
2022-03-01 19:35:08 +01:00
/** @description The name of the column which a relationship column is related to in another table. */
2022-03-01 23:37:42 +01:00
fieldName? : string
2022-03-01 19:35:08 +01:00
/** @description The ID of the table which a relationship column is related to. */
2022-03-01 23:37:42 +01:00
tableId? : string
2022-03-01 19:35:08 +01:00
/ * *
* @description Defines the type of relationship that this column will be used for .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
relationshipType ? : "one-to-many" | "many-to-one" | "many-to-many"
2022-03-01 19:35:08 +01:00
/** @description When using a SQL table that contains many to many relationships this defines the table the relationships are linked through. */
2022-03-01 23:37:42 +01:00
through? : string
2022-03-01 19:35:08 +01:00
/** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */
2022-03-01 23:37:42 +01:00
foreignKey? : string
2022-03-01 19:35:08 +01:00
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for this table. */
2022-03-01 23:37:42 +01:00
throughFrom? : string
2022-03-01 19:35:08 +01:00
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for the related table. */
2022-03-01 23:37:42 +01:00
throughTo? : string
2022-03-01 19:35:08 +01:00
}
| {
/ * *
* @description A formula column .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
type ? : "formula"
2022-03-01 19:35:08 +01:00
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints ? : {
/** @enum {string} */
2022-03-01 23:37:42 +01:00
type ? : "string" | "number" | "object" | "boolean"
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is required or not. */
2022-03-01 23:37:42 +01:00
presence? : boolean
}
2022-03-01 19:35:08 +01:00
/** @description The name of the column. */
2022-03-01 23:37:42 +01:00
name? : string
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is automatically generated. */
2022-03-01 23:37:42 +01:00
autocolumn? : boolean
2022-03-01 19:35:08 +01:00
/** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
2022-03-01 23:37:42 +01:00
formula? : string
2022-03-01 19:35:08 +01:00
/ * *
* @description Defines whether this is a static or dynamic formula .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
formulaType ? : "static" | "dynamic"
2022-03-01 19:35:08 +01:00
}
| {
/ * *
* @description Defines the type of the column , most explain themselves , a link column is a relationship .
* @enum { string }
* /
type ? :
| "string"
| "longform"
| "options"
| "number"
| "boolean"
| "array"
| "datetime"
| "attachment"
| "link"
| "formula"
| "auto"
| "json"
2022-03-01 23:37:42 +01:00
| "internal"
2022-03-01 19:35:08 +01:00
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints ? : {
/** @enum {string} */
2022-03-01 23:37:42 +01:00
type ? : "string" | "number" | "object" | "boolean"
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is required or not. */
2022-03-01 23:37:42 +01:00
presence? : boolean
}
2022-03-01 19:35:08 +01:00
/** @description The name of the column. */
2022-03-01 23:37:42 +01:00
name? : string
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is automatically generated. */
2022-03-01 23:37:42 +01:00
autocolumn? : boolean
}
}
}
2022-03-01 19:35:08 +01:00
tableOutput : {
/** @description The table to be created/updated. */
data : {
/** @description The name of the table. */
2022-03-01 23:37:42 +01:00
name : string
2022-03-01 19:35:08 +01:00
/** @description The name of the column which should be used in relationship tags when relating to this table. */
2022-03-01 23:37:42 +01:00
primaryDisplay? : string
2022-03-01 19:35:08 +01:00
schema : {
[ key : string ] :
| {
/ * *
* @description A relationship column .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
type ? : "link"
2022-03-01 19:35:08 +01:00
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints ? : {
/** @enum {string} */
2022-03-01 23:37:42 +01:00
type ? : "string" | "number" | "object" | "boolean"
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is required or not. */
2022-03-01 23:37:42 +01:00
presence? : boolean
}
2022-03-01 19:35:08 +01:00
/** @description The name of the column. */
2022-03-01 23:37:42 +01:00
name? : string
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is automatically generated. */
2022-03-01 23:37:42 +01:00
autocolumn? : boolean
2022-03-01 19:35:08 +01:00
/** @description The name of the column which a relationship column is related to in another table. */
2022-03-01 23:37:42 +01:00
fieldName? : string
2022-03-01 19:35:08 +01:00
/** @description The ID of the table which a relationship column is related to. */
2022-03-01 23:37:42 +01:00
tableId? : string
2022-03-01 19:35:08 +01:00
/ * *
* @description Defines the type of relationship that this column will be used for .
* @enum { string }
* /
relationshipType ? :
| "one-to-many"
| "many-to-one"
2022-03-01 23:37:42 +01:00
| "many-to-many"
2022-03-01 19:35:08 +01:00
/** @description When using a SQL table that contains many to many relationships this defines the table the relationships are linked through. */
2022-03-01 23:37:42 +01:00
through? : string
2022-03-01 19:35:08 +01:00
/** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */
2022-03-01 23:37:42 +01:00
foreignKey? : string
2022-03-01 19:35:08 +01:00
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for this table. */
2022-03-01 23:37:42 +01:00
throughFrom? : string
2022-03-01 19:35:08 +01:00
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for the related table. */
2022-03-01 23:37:42 +01:00
throughTo? : string
2022-03-01 19:35:08 +01:00
}
| {
/ * *
* @description A formula column .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
type ? : "formula"
2022-03-01 19:35:08 +01:00
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints ? : {
/** @enum {string} */
2022-03-01 23:37:42 +01:00
type ? : "string" | "number" | "object" | "boolean"
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is required or not. */
2022-03-01 23:37:42 +01:00
presence? : boolean
}
2022-03-01 19:35:08 +01:00
/** @description The name of the column. */
2022-03-01 23:37:42 +01:00
name? : string
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is automatically generated. */
2022-03-01 23:37:42 +01:00
autocolumn? : boolean
2022-03-01 19:35:08 +01:00
/** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
2022-03-01 23:37:42 +01:00
formula? : string
2022-03-01 19:35:08 +01:00
/ * *
* @description Defines whether this is a static or dynamic formula .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
formulaType ? : "static" | "dynamic"
2022-03-01 19:35:08 +01:00
}
| {
/ * *
* @description Defines the type of the column , most explain themselves , a link column is a relationship .
* @enum { string }
* /
type ? :
| "string"
| "longform"
| "options"
| "number"
| "boolean"
| "array"
| "datetime"
| "attachment"
| "link"
| "formula"
| "auto"
| "json"
2022-03-01 23:37:42 +01:00
| "internal"
2022-03-01 19:35:08 +01:00
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
constraints ? : {
/** @enum {string} */
2022-03-01 23:37:42 +01:00
type ? : "string" | "number" | "object" | "boolean"
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is required or not. */
2022-03-01 23:37:42 +01:00
presence? : boolean
}
2022-03-01 19:35:08 +01:00
/** @description The name of the column. */
2022-03-01 23:37:42 +01:00
name? : string
2022-03-01 19:35:08 +01:00
/** @description Defines whether the column is automatically generated. */
2022-03-01 23:37:42 +01:00
autocolumn? : boolean
}
}
2022-03-01 19:35:08 +01:00
/** @description The ID of the table. */
2022-03-01 23:37:42 +01:00
_id : string
}
}
2022-03-01 19:35:08 +01:00
/** @description The query body must contain the required parameters for the query, this depends on query type, setup and bindings. */
2022-03-01 23:37:42 +01:00
executeQuery : { [ key : string ] : unknown }
2022-03-01 19:35:08 +01:00
executeQueryOutput : {
/** @description The data response from the query. */
2022-03-01 23:37:42 +01:00
data : { [ key : string ] : unknown } [ ]
2022-03-01 19:35:08 +01:00
/** @description Extra information that is not part of the main data, e.g. headers. */
extra ? : {
/** @description If carrying out a REST request, this will contain the response headers. */
2022-03-01 23:37:42 +01:00
headers ? : { [ key : string ] : unknown }
2022-03-01 19:35:08 +01:00
/** @description The raw query response, as a string. */
2022-03-01 23:37:42 +01:00
raw? : string
}
2022-03-01 19:35:08 +01:00
/** @description If pagination is supported, this will contain the bookmark/anchor information for it. */
2022-03-01 23:37:42 +01:00
pagination ? : { [ key : string ] : unknown }
}
2022-03-01 19:35:08 +01:00
query : {
/** @description The ID of the query. */
2022-03-01 23:37:42 +01:00
_id : string
2022-03-01 19:35:08 +01:00
/** @description The ID of the data source the query belongs to. */
2022-03-01 23:37:42 +01:00
datasourceId? : string
2022-03-01 19:35:08 +01:00
/** @description The bindings which are required to perform this query. */
2022-03-01 23:37:42 +01:00
parameters? : string [ ]
2022-03-01 19:35:08 +01:00
/** @description The fields that are used to perform this query, e.g. the sql statement */
2022-03-01 23:37:42 +01:00
fields ? : { [ key : string ] : unknown }
2022-03-01 19:35:08 +01:00
/ * *
* @description The verb that describes this query .
* @enum { undefined }
* /
2022-03-01 23:37:42 +01:00
queryVerb ? : "create" | "read" | "update" | "delete"
2022-03-01 19:35:08 +01:00
/** @description The name of the query. */
2022-03-01 23:37:42 +01:00
name : string
2022-03-01 19:35:08 +01:00
/** @description The schema of the data returned when the query is executed. */
2022-03-01 23:37:42 +01:00
schema : { [ key : string ] : unknown }
2022-03-01 19:35:08 +01:00
/** @description The JavaScript transformer function, applied after the query responds with data. */
2022-03-01 23:37:42 +01:00
transformer? : string
2022-03-01 19:35:08 +01:00
/** @description Whether the query has readable data. */
2022-03-01 23:37:42 +01:00
readable? : boolean
}
2022-03-01 19:35:08 +01:00
user : {
/** @description The email address of the user, this must be unique. */
2022-03-01 23:37:42 +01:00
email : string
2022-03-01 19:35:08 +01:00
/** @description The password of the user if using password based login - this will never be returned. This can be left out of subsequent requests (updates) and will be enriched back into the user structure. */
2022-03-01 23:37:42 +01:00
password? : string
2022-03-01 19:35:08 +01:00
/ * *
* @description The status of the user , if they are active .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
status ? : "active"
2022-03-01 19:35:08 +01:00
/** @description The first name of the user */
2022-03-01 23:37:42 +01:00
firstName? : string
2022-03-01 19:35:08 +01:00
/** @description The last name of the user */
2022-03-01 23:37:42 +01:00
lastName? : string
2022-03-01 19:35:08 +01:00
/** @description If set to true forces the user to reset their password on first login. */
2022-03-01 23:37:42 +01:00
forceResetPassword? : boolean
2022-03-01 19:35:08 +01:00
/** @description Describes if the user is a builder user or not. */
builder ? : {
/** @description If set to true the user will be able to build any app in the system. */
2022-03-01 23:37:42 +01:00
global ? : boolean
}
2022-03-01 19:35:08 +01:00
/** @description Describes if the user is an admin user or not. */
admin ? : {
/** @description If set to true the user will be able to administrate the system. */
2022-03-01 23:37:42 +01:00
global ? : boolean
}
2022-03-01 19:35:08 +01:00
/** @description Contains the roles of the user per app (assuming they are not a builder user). */
2022-03-01 23:37:42 +01:00
roles : { [ key : string ] : string }
}
2022-03-01 19:35:08 +01:00
userOutput : {
data : {
/** @description The email address of the user, this must be unique. */
2022-03-01 23:37:42 +01:00
email : string
2022-03-01 19:35:08 +01:00
/** @description The password of the user if using password based login - this will never be returned. This can be left out of subsequent requests (updates) and will be enriched back into the user structure. */
2022-03-01 23:37:42 +01:00
password? : string
2022-03-01 19:35:08 +01:00
/ * *
* @description The status of the user , if they are active .
* @enum { string }
* /
2022-03-01 23:37:42 +01:00
status ? : "active"
2022-03-01 19:35:08 +01:00
/** @description The first name of the user */
2022-03-01 23:37:42 +01:00
firstName? : string
2022-03-01 19:35:08 +01:00
/** @description The last name of the user */
2022-03-01 23:37:42 +01:00
lastName? : string
2022-03-01 19:35:08 +01:00
/** @description If set to true forces the user to reset their password on first login. */
2022-03-01 23:37:42 +01:00
forceResetPassword? : boolean
2022-03-01 19:35:08 +01:00
/** @description Describes if the user is a builder user or not. */
builder ? : {
/** @description If set to true the user will be able to build any app in the system. */
2022-03-01 23:37:42 +01:00
global ? : boolean
}
2022-03-01 19:35:08 +01:00
/** @description Describes if the user is an admin user or not. */
admin ? : {
/** @description If set to true the user will be able to administrate the system. */
2022-03-01 23:37:42 +01:00
global ? : boolean
}
2022-03-01 19:35:08 +01:00
/** @description Contains the roles of the user per app (assuming they are not a builder user). */
2022-03-01 23:37:42 +01:00
roles : { [ key : string ] : string }
2022-03-01 19:35:08 +01:00
/** @description The ID of the user. */
2022-03-01 23:37:42 +01:00
_id : string
}
}
2022-03-01 19:35:08 +01:00
nameSearch : {
/** @description The name to be used when searching - this will be used in a case insensitive starts with match. */
2022-03-01 23:37:42 +01:00
name : string
}
}
2022-03-01 19:35:08 +01:00
parameters : {
/** @description The ID of the table which this request is targeting. */
2022-03-01 23:37:42 +01:00
tableId : string
2022-03-01 19:35:08 +01:00
/** @description The ID of the row which this request is targeting. */
2022-03-01 23:37:42 +01:00
rowId : string
2022-03-01 19:35:08 +01:00
/** @description The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
appId : string
2022-03-01 19:35:08 +01:00
/** @description The ID of the app which this request is targeting. */
2022-03-01 23:37:42 +01:00
appIdUrl : string
2022-03-01 19:35:08 +01:00
/** @description The ID of the query which this request is targeting. */
2022-03-01 23:37:42 +01:00
queryId : string
2022-03-01 19:35:08 +01:00
/** @description The ID of the user which this request is targeting. */
2022-03-01 23:37:42 +01:00
userId : string
}
2022-03-01 19:35:08 +01:00
}
export interface operations { }
export interface external { }