* fixes for google sheets, admin checklist, and deleting an app from API * code review * splitting unpublish endpoint, moving deploy endpoint to applications controller. Still to do public API work and move deployment controller into application controller * updating REST method for unpublish in API test * unpublish and publish endpoint on public API, delete endpoint unpublishes and deletes app * removing skip_setup from prodAppDb call * removing commented code * unit tests and open API spec updates * unpublish, publish unit tests - delete still in progress * remove line updating app name in API test * unit tests * v2.1.46 * Update pro version to 2.1.46 * v2.2.0 * Update pro version to 2.2.0 * Fix for budibase plugin skeleton, which utilises the old import style. * Fix side nav styles * v2.2.1 * Update pro version to 2.2.1 * using dist folder to allow importing constants for openAPI specs * v2.2.2 * Update pro version to 2.2.2 * Fix for user enrichment call (updating to @budibase/nano fork) (#9038) * Fix for #9029 - this should fix the issue users have been experiencing with user enrichment calls in apps, essentially it utilises a fork of the nano library we use to interact with CouchDB, which has been updated to use a POST request rather than a GET request as it supports a larger set of data being sent as query parameters. * Incrementing Nano version to attempt to fix yarn registry issues. * v2.2.3 * Update pro version to 2.2.3 * Fix SQL table `_id` filtering (#9030) * Re-add support for filtering on _id using external SQL tables and fix filter key prefixes not working with _id field * Remove like operator from internal tables and only allow basic operators on SQL table _id column * Update data section filtering to respect new rules * Update automation section filtering to respect new rules * Update dynamic filter component to respect new rules * v2.2.4 * Update pro version to 2.2.4 * lock changes (#9047) * v2.2.5 * Update pro version to 2.2.5 * Make looping arrow point in right direction (#9053) * v2.2.6 * Update pro version to 2.2.6 * Types/attaching license to account (#9065) * adding license type to account * removing planDuration * v2.2.7 * Update pro version to 2.2.7 * Environment variable type coercion fix (#9074) * Environment variable type coercion fix * Update .gitignore * v2.2.8 * Update pro version to 2.2.8 * tests passing * all tests passing, updates to public API response * update unpublish call to return 204, openAPI spec and unit * fixing API tests Co-authored-by: Budibase Release Bot <> Co-authored-by: mike12345567 <me@michaeldrury.co.uk> Co-authored-by: Andrew Kingston <andrew@kingston.dev> Co-authored-by: melohagan <101575380+melohagan@users.noreply.github.com> Co-authored-by: Rory Powell <rory.codes@gmail.com>
832 lines
34 KiB
TypeScript
832 lines
34 KiB
TypeScript
/**
|
|
* This file was auto-generated by openapi-typescript.
|
|
* Do not make direct changes to the file.
|
|
*/
|
|
|
|
export interface paths {
|
|
"/applications": {
|
|
post: operations["create"];
|
|
};
|
|
"/applications/{appId}": {
|
|
get: operations["getById"];
|
|
put: operations["update"];
|
|
delete: operations["destroy"];
|
|
};
|
|
"/applications/search": {
|
|
/** Based on application properties (currently only name) search for applications. */
|
|
post: operations["search"];
|
|
};
|
|
"/queries/{queryId}": {
|
|
/** Queries which have been created within a Budibase app can be executed using this, */
|
|
post: operations["execute"];
|
|
};
|
|
"/queries/search": {
|
|
/** Based on query properties (currently only name) search for queries. */
|
|
post: operations["search"];
|
|
};
|
|
"/tables/{tableId}/rows": {
|
|
/** Creates a row within the specified table. */
|
|
post: operations["create"];
|
|
};
|
|
"/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: operations["getById"];
|
|
/** Updates a row within the specified table. */
|
|
put: operations["update"];
|
|
/** Deletes a row within the specified table. */
|
|
delete: operations["destroy"];
|
|
};
|
|
"/tables/{tableId}/rows/search": {
|
|
post: operations["search"];
|
|
};
|
|
"/tables": {
|
|
/** Create a table, this could be internal or external. */
|
|
post: operations["create"];
|
|
};
|
|
"/tables/{tableId}": {
|
|
/** Lookup a table, this could be internal or external. */
|
|
get: operations["getById"];
|
|
/** Update a table, this could be internal or external. */
|
|
put: operations["update"];
|
|
/** Delete a table, this could be internal or external. */
|
|
delete: operations["destroy"];
|
|
};
|
|
"/tables/search": {
|
|
/** Based on table properties (currently only name) search for tables. This could be an internal or an external table. */
|
|
post: operations["search"];
|
|
};
|
|
"/users": {
|
|
post: operations["create"];
|
|
};
|
|
"/users/{userId}": {
|
|
get: operations["getById"];
|
|
put: operations["update"];
|
|
delete: operations["destroy"];
|
|
};
|
|
"/users/search": {
|
|
/** Based on user properties (currently only name) search for users. */
|
|
post: operations["search"];
|
|
};
|
|
}
|
|
|
|
export interface components {
|
|
schemas: {
|
|
application: {
|
|
/** @description The name of the app. */
|
|
name: string;
|
|
/** @description The URL by which the app is accessed, this must be URL encoded. */
|
|
url?: string;
|
|
};
|
|
applicationOutput: {
|
|
data: {
|
|
/** @description The name of the app. */
|
|
name: string;
|
|
/** @description The URL by which the app is accessed, this must be URL encoded. */
|
|
url: string;
|
|
/** @description The ID of the app. */
|
|
_id: string;
|
|
/**
|
|
* @description The status of the app, stating it if is the development or published version.
|
|
* @enum {string}
|
|
*/
|
|
status: "development" | "published";
|
|
/** @description States when the app was created, will be constant. Stored in ISO format. */
|
|
createdAt: string;
|
|
/** @description States the last time the app was updated - stored in ISO format. */
|
|
updatedAt: string;
|
|
/** @description States the version of the Budibase client this app is currently based on. */
|
|
version: string;
|
|
/** @description In a multi-tenant environment this will state the tenant this app is within. */
|
|
tenantId?: string;
|
|
/** @description The user this app is currently being built by. */
|
|
lockedBy?: { [key: string]: unknown };
|
|
};
|
|
};
|
|
deploymentOutput: {
|
|
data: {
|
|
/** @description The ID of the deployment. */
|
|
_id: string;
|
|
/** @description The status of the deployment. */
|
|
status: "SUCCESS" | "FAILURE";
|
|
/** @description The URL by which the published app is accessed. */
|
|
appUrl?: string;
|
|
}
|
|
};
|
|
applicationSearch: {
|
|
data: {
|
|
/** @description The name of the app. */
|
|
name: string;
|
|
/** @description The URL by which the app is accessed, this must be URL encoded. */
|
|
url: string;
|
|
/** @description The ID of the app. */
|
|
_id: string;
|
|
/**
|
|
* @description The status of the app, stating it if is the development or published version.
|
|
* @enum {string}
|
|
*/
|
|
status: "development" | "published";
|
|
/** @description States when the app was created, will be constant. Stored in ISO format. */
|
|
createdAt: string;
|
|
/** @description States the last time the app was updated - stored in ISO format. */
|
|
updatedAt: string;
|
|
/** @description States the version of the Budibase client this app is currently based on. */
|
|
version: string;
|
|
/** @description In a multi-tenant environment this will state the tenant this app is within. */
|
|
tenantId?: string;
|
|
/** @description The user this app is currently being built by. */
|
|
lockedBy?: { [key: string]: unknown };
|
|
}[];
|
|
};
|
|
/** @description The row to be created/updated, based on the table schema. */
|
|
row: { [key: string]: unknown };
|
|
searchOutput: {
|
|
/** @description An array of rows, these will each contain an _id field which can be used to update or delete them. */
|
|
data: { [key: string]: unknown }[];
|
|
/** @description If pagination in use, this should be provided. */
|
|
bookmark?: string | number;
|
|
/** @description If pagination in use, this will determine if there is another page to fetch. */
|
|
hasNextPage?: boolean;
|
|
};
|
|
rowOutput: {
|
|
/** @description The row to be created/updated, based on the table schema. */
|
|
data: {
|
|
/** @description The ID of the row. */
|
|
_id: string;
|
|
/** @description The ID of the table this row comes from. */
|
|
tableId: string;
|
|
} & { [key: string]: unknown };
|
|
};
|
|
/** @description The table to be created/updated. */
|
|
table: {
|
|
/** @description The name of the table. */
|
|
name: string;
|
|
/** @description The name of the column which should be used in relationship tags when relating to this table. */
|
|
primaryDisplay?: string;
|
|
schema: {
|
|
[key: string]:
|
|
| {
|
|
/**
|
|
* @description A relationship column.
|
|
* @enum {string}
|
|
*/
|
|
type?: "link";
|
|
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
constraints?: {
|
|
/** @enum {string} */
|
|
type?: "string" | "number" | "object" | "boolean";
|
|
/** @description Defines whether the column is required or not. */
|
|
presence?: boolean;
|
|
};
|
|
/** @description The name of the column. */
|
|
name?: string;
|
|
/** @description Defines whether the column is automatically generated. */
|
|
autocolumn?: boolean;
|
|
/** @description The name of the column which a relationship column is related to in another table. */
|
|
fieldName?: string;
|
|
/** @description The ID of the table which a relationship column is related to. */
|
|
tableId?: string;
|
|
/**
|
|
* @description Defines the type of relationship that this column will be used for.
|
|
* @enum {string}
|
|
*/
|
|
relationshipType?: "one-to-many" | "many-to-one" | "many-to-many";
|
|
/** @description When using a SQL table that contains many to many relationships this defines the table the relationships are linked through. */
|
|
through?: string;
|
|
/** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */
|
|
foreignKey?: string;
|
|
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for this table. */
|
|
throughFrom?: string;
|
|
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for the related table. */
|
|
throughTo?: string;
|
|
}
|
|
| {
|
|
/**
|
|
* @description A formula column.
|
|
* @enum {string}
|
|
*/
|
|
type?: "formula";
|
|
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
constraints?: {
|
|
/** @enum {string} */
|
|
type?: "string" | "number" | "object" | "boolean";
|
|
/** @description Defines whether the column is required or not. */
|
|
presence?: boolean;
|
|
};
|
|
/** @description The name of the column. */
|
|
name?: string;
|
|
/** @description Defines whether the column is automatically generated. */
|
|
autocolumn?: boolean;
|
|
/** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
|
|
formula?: string;
|
|
/**
|
|
* @description Defines whether this is a static or dynamic formula.
|
|
* @enum {string}
|
|
*/
|
|
formulaType?: "static" | "dynamic";
|
|
}
|
|
| {
|
|
/**
|
|
* @description Defines the type of the column, most explain themselves, a link column is a relationship.
|
|
* @enum {string}
|
|
*/
|
|
type?:
|
|
| "string"
|
|
| "barcodeqr"
|
|
| "longform"
|
|
| "options"
|
|
| "number"
|
|
| "boolean"
|
|
| "array"
|
|
| "datetime"
|
|
| "attachment"
|
|
| "link"
|
|
| "formula"
|
|
| "auto"
|
|
| "json"
|
|
| "internal";
|
|
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
constraints?: {
|
|
/** @enum {string} */
|
|
type?: "string" | "number" | "object" | "boolean";
|
|
/** @description Defines whether the column is required or not. */
|
|
presence?: boolean;
|
|
};
|
|
/** @description The name of the column. */
|
|
name?: string;
|
|
/** @description Defines whether the column is automatically generated. */
|
|
autocolumn?: boolean;
|
|
};
|
|
};
|
|
};
|
|
tableOutput: {
|
|
/** @description The table to be created/updated. */
|
|
data: {
|
|
/** @description The name of the table. */
|
|
name: string;
|
|
/** @description The name of the column which should be used in relationship tags when relating to this table. */
|
|
primaryDisplay?: string;
|
|
schema: {
|
|
[key: string]:
|
|
| {
|
|
/**
|
|
* @description A relationship column.
|
|
* @enum {string}
|
|
*/
|
|
type?: "link";
|
|
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
constraints?: {
|
|
/** @enum {string} */
|
|
type?: "string" | "number" | "object" | "boolean";
|
|
/** @description Defines whether the column is required or not. */
|
|
presence?: boolean;
|
|
};
|
|
/** @description The name of the column. */
|
|
name?: string;
|
|
/** @description Defines whether the column is automatically generated. */
|
|
autocolumn?: boolean;
|
|
/** @description The name of the column which a relationship column is related to in another table. */
|
|
fieldName?: string;
|
|
/** @description The ID of the table which a relationship column is related to. */
|
|
tableId?: string;
|
|
/**
|
|
* @description Defines the type of relationship that this column will be used for.
|
|
* @enum {string}
|
|
*/
|
|
relationshipType?:
|
|
| "one-to-many"
|
|
| "many-to-one"
|
|
| "many-to-many";
|
|
/** @description When using a SQL table that contains many to many relationships this defines the table the relationships are linked through. */
|
|
through?: string;
|
|
/** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */
|
|
foreignKey?: string;
|
|
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for this table. */
|
|
throughFrom?: string;
|
|
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for the related table. */
|
|
throughTo?: string;
|
|
}
|
|
| {
|
|
/**
|
|
* @description A formula column.
|
|
* @enum {string}
|
|
*/
|
|
type?: "formula";
|
|
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
constraints?: {
|
|
/** @enum {string} */
|
|
type?: "string" | "number" | "object" | "boolean";
|
|
/** @description Defines whether the column is required or not. */
|
|
presence?: boolean;
|
|
};
|
|
/** @description The name of the column. */
|
|
name?: string;
|
|
/** @description Defines whether the column is automatically generated. */
|
|
autocolumn?: boolean;
|
|
/** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
|
|
formula?: string;
|
|
/**
|
|
* @description Defines whether this is a static or dynamic formula.
|
|
* @enum {string}
|
|
*/
|
|
formulaType?: "static" | "dynamic";
|
|
}
|
|
| {
|
|
/**
|
|
* @description Defines the type of the column, most explain themselves, a link column is a relationship.
|
|
* @enum {string}
|
|
*/
|
|
type?:
|
|
| "string"
|
|
| "barcodeqr"
|
|
| "longform"
|
|
| "options"
|
|
| "number"
|
|
| "boolean"
|
|
| "array"
|
|
| "datetime"
|
|
| "attachment"
|
|
| "link"
|
|
| "formula"
|
|
| "auto"
|
|
| "json"
|
|
| "internal";
|
|
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
constraints?: {
|
|
/** @enum {string} */
|
|
type?: "string" | "number" | "object" | "boolean";
|
|
/** @description Defines whether the column is required or not. */
|
|
presence?: boolean;
|
|
};
|
|
/** @description The name of the column. */
|
|
name?: string;
|
|
/** @description Defines whether the column is automatically generated. */
|
|
autocolumn?: boolean;
|
|
};
|
|
};
|
|
/** @description The ID of the table. */
|
|
_id: string;
|
|
};
|
|
};
|
|
tableSearch: {
|
|
data: {
|
|
/** @description The name of the table. */
|
|
name: string;
|
|
/** @description The name of the column which should be used in relationship tags when relating to this table. */
|
|
primaryDisplay?: string;
|
|
schema: {
|
|
[key: string]:
|
|
| {
|
|
/**
|
|
* @description A relationship column.
|
|
* @enum {string}
|
|
*/
|
|
type?: "link";
|
|
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
constraints?: {
|
|
/** @enum {string} */
|
|
type?: "string" | "number" | "object" | "boolean";
|
|
/** @description Defines whether the column is required or not. */
|
|
presence?: boolean;
|
|
};
|
|
/** @description The name of the column. */
|
|
name?: string;
|
|
/** @description Defines whether the column is automatically generated. */
|
|
autocolumn?: boolean;
|
|
/** @description The name of the column which a relationship column is related to in another table. */
|
|
fieldName?: string;
|
|
/** @description The ID of the table which a relationship column is related to. */
|
|
tableId?: string;
|
|
/**
|
|
* @description Defines the type of relationship that this column will be used for.
|
|
* @enum {string}
|
|
*/
|
|
relationshipType?:
|
|
| "one-to-many"
|
|
| "many-to-one"
|
|
| "many-to-many";
|
|
/** @description When using a SQL table that contains many to many relationships this defines the table the relationships are linked through. */
|
|
through?: string;
|
|
/** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */
|
|
foreignKey?: string;
|
|
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for this table. */
|
|
throughFrom?: string;
|
|
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for the related table. */
|
|
throughTo?: string;
|
|
}
|
|
| {
|
|
/**
|
|
* @description A formula column.
|
|
* @enum {string}
|
|
*/
|
|
type?: "formula";
|
|
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
constraints?: {
|
|
/** @enum {string} */
|
|
type?: "string" | "number" | "object" | "boolean";
|
|
/** @description Defines whether the column is required or not. */
|
|
presence?: boolean;
|
|
};
|
|
/** @description The name of the column. */
|
|
name?: string;
|
|
/** @description Defines whether the column is automatically generated. */
|
|
autocolumn?: boolean;
|
|
/** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
|
|
formula?: string;
|
|
/**
|
|
* @description Defines whether this is a static or dynamic formula.
|
|
* @enum {string}
|
|
*/
|
|
formulaType?: "static" | "dynamic";
|
|
}
|
|
| {
|
|
/**
|
|
* @description Defines the type of the column, most explain themselves, a link column is a relationship.
|
|
* @enum {string}
|
|
*/
|
|
type?:
|
|
| "string"
|
|
| "barcodeqr"
|
|
| "longform"
|
|
| "options"
|
|
| "number"
|
|
| "boolean"
|
|
| "array"
|
|
| "datetime"
|
|
| "attachment"
|
|
| "link"
|
|
| "formula"
|
|
| "auto"
|
|
| "json"
|
|
| "internal";
|
|
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
constraints?: {
|
|
/** @enum {string} */
|
|
type?: "string" | "number" | "object" | "boolean";
|
|
/** @description Defines whether the column is required or not. */
|
|
presence?: boolean;
|
|
};
|
|
/** @description The name of the column. */
|
|
name?: string;
|
|
/** @description Defines whether the column is automatically generated. */
|
|
autocolumn?: boolean;
|
|
};
|
|
};
|
|
/** @description The ID of the table. */
|
|
_id: string;
|
|
}[];
|
|
};
|
|
/** @description The parameters required for executing a query. */
|
|
executeQuery: {
|
|
/** @description This contains the required parameters for the query, this depends on query type, setup and bindings. */
|
|
parameters?: { [key: string]: unknown };
|
|
/** @description For supported query types (currently on REST) pagination can be performed using these properties. */
|
|
pagination?: {
|
|
/** @description The page which has been returned from a previous query. */
|
|
page?: string;
|
|
/** @description The number of rows to return per page. */
|
|
limit?: number;
|
|
};
|
|
};
|
|
executeQueryOutput: {
|
|
/** @description The data response from the query. */
|
|
data: { [key: string]: unknown }[];
|
|
/** @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. */
|
|
headers?: { [key: string]: unknown };
|
|
/** @description The raw query response, as a string. */
|
|
raw?: string;
|
|
};
|
|
/** @description If pagination is supported, this will contain the bookmark/anchor information for it. */
|
|
pagination?: { [key: string]: unknown };
|
|
};
|
|
query: {
|
|
/** @description The ID of the query. */
|
|
_id: string;
|
|
/** @description The ID of the datasource the query belongs to. */
|
|
datasourceId?: string;
|
|
/** @description The bindings which are required to perform this query. */
|
|
parameters?: string[];
|
|
/** @description The fields that are used to perform this query, e.g. the sql statement */
|
|
fields?: { [key: string]: unknown };
|
|
/**
|
|
* @description The verb that describes this query.
|
|
* @enum {undefined}
|
|
*/
|
|
queryVerb?: "create" | "read" | "update" | "delete";
|
|
/** @description The name of the query. */
|
|
name: string;
|
|
/** @description The schema of the data returned when the query is executed. */
|
|
schema: { [key: string]: unknown };
|
|
/** @description The JavaScript transformer function, applied after the query responds with data. */
|
|
transformer?: string;
|
|
/** @description Whether the query has readable data. */
|
|
readable?: boolean;
|
|
};
|
|
querySearch: {
|
|
data: {
|
|
/** @description The ID of the query. */
|
|
_id: string;
|
|
/** @description The ID of the datasource the query belongs to. */
|
|
datasourceId?: string;
|
|
/** @description The bindings which are required to perform this query. */
|
|
parameters?: string[];
|
|
/** @description The fields that are used to perform this query, e.g. the sql statement */
|
|
fields?: { [key: string]: unknown };
|
|
/**
|
|
* @description The verb that describes this query.
|
|
* @enum {undefined}
|
|
*/
|
|
queryVerb?: "create" | "read" | "update" | "delete";
|
|
/** @description The name of the query. */
|
|
name: string;
|
|
/** @description The schema of the data returned when the query is executed. */
|
|
schema: { [key: string]: unknown };
|
|
/** @description The JavaScript transformer function, applied after the query responds with data. */
|
|
transformer?: string;
|
|
/** @description Whether the query has readable data. */
|
|
readable?: boolean;
|
|
}[];
|
|
};
|
|
user: {
|
|
/** @description The email address of the user, this must be unique. */
|
|
email: string;
|
|
/** @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. */
|
|
password?: string;
|
|
/**
|
|
* @description The status of the user, if they are active.
|
|
* @enum {string}
|
|
*/
|
|
status?: "active";
|
|
/** @description The first name of the user */
|
|
firstName?: string;
|
|
/** @description The last name of the user */
|
|
lastName?: string;
|
|
/** @description If set to true forces the user to reset their password on first login. */
|
|
forceResetPassword?: boolean;
|
|
/** @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. */
|
|
global?: boolean;
|
|
};
|
|
/** @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. */
|
|
global?: boolean;
|
|
};
|
|
/** @description Contains the roles of the user per app (assuming they are not a builder user). */
|
|
roles: { [key: string]: string };
|
|
};
|
|
userOutput: {
|
|
data: {
|
|
/** @description The email address of the user, this must be unique. */
|
|
email: string;
|
|
/** @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. */
|
|
password?: string;
|
|
/**
|
|
* @description The status of the user, if they are active.
|
|
* @enum {string}
|
|
*/
|
|
status?: "active";
|
|
/** @description The first name of the user */
|
|
firstName?: string;
|
|
/** @description The last name of the user */
|
|
lastName?: string;
|
|
/** @description If set to true forces the user to reset their password on first login. */
|
|
forceResetPassword?: boolean;
|
|
/** @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. */
|
|
global?: boolean;
|
|
};
|
|
/** @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. */
|
|
global?: boolean;
|
|
};
|
|
/** @description Contains the roles of the user per app (assuming they are not a builder user). */
|
|
roles: { [key: string]: string };
|
|
/** @description The ID of the user. */
|
|
_id: string;
|
|
};
|
|
};
|
|
userSearch: {
|
|
data: {
|
|
/** @description The email address of the user, this must be unique. */
|
|
email: string;
|
|
/** @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. */
|
|
password?: string;
|
|
/**
|
|
* @description The status of the user, if they are active.
|
|
* @enum {string}
|
|
*/
|
|
status?: "active";
|
|
/** @description The first name of the user */
|
|
firstName?: string;
|
|
/** @description The last name of the user */
|
|
lastName?: string;
|
|
/** @description If set to true forces the user to reset their password on first login. */
|
|
forceResetPassword?: boolean;
|
|
/** @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. */
|
|
global?: boolean;
|
|
};
|
|
/** @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. */
|
|
global?: boolean;
|
|
};
|
|
/** @description Contains the roles of the user per app (assuming they are not a builder user). */
|
|
roles: { [key: string]: string };
|
|
/** @description The ID of the user. */
|
|
_id: string;
|
|
}[];
|
|
};
|
|
rowSearch: {
|
|
query: {
|
|
/** @description Specifies that a row should be returned if it satisfies any of the specified options, rather than requiring it to fulfill all the search parameters. This defaults to false, meaning AND logic will be used. */
|
|
allOr?: boolean;
|
|
/**
|
|
* @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]
|
|
*/
|
|
string?: { [key: string]: string };
|
|
/** @description A fuzzy search, only supported by internal tables. */
|
|
fuzzy?: { [key: string]: unknown };
|
|
/**
|
|
* @description Searches within a range, the format of this must be in the format of an object with a "low" and "high" property.
|
|
* @example [object Object]
|
|
*/
|
|
range?: { [key: string]: unknown };
|
|
/** @description Searches for rows that have a column value that is exactly the value set. */
|
|
equal?: { [key: string]: unknown };
|
|
/** @description Searches for any row which does not contain the specified column value. */
|
|
notEqual?: { [key: string]: unknown };
|
|
/**
|
|
* @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]
|
|
*/
|
|
empty?: { [key: string]: unknown };
|
|
/** @description Searches for rows which have the specified column. */
|
|
notEmpty?: { [key: string]: unknown };
|
|
/** @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]. */
|
|
oneOf?: { [key: string]: unknown };
|
|
};
|
|
/** @description Enables pagination, by default this is disabled. */
|
|
paginate?: boolean;
|
|
/** @description If retrieving another page, the bookmark from the previous request must be supplied. */
|
|
bookmark?: string | number;
|
|
/** @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. */
|
|
limit?: number;
|
|
/** @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}
|
|
*/
|
|
order?: "ascending" | "descending";
|
|
/** @description The name of the column by which the rows will be sorted. */
|
|
column?: string;
|
|
/**
|
|
* @description Defines whether the column should be treated as a string or as numbers when sorting.
|
|
* @enum {string}
|
|
*/
|
|
type?: "string" | "number";
|
|
};
|
|
};
|
|
nameSearch: {
|
|
/** @description The name to be used when searching - this will be used in a case insensitive starts with match. */
|
|
name: string;
|
|
};
|
|
};
|
|
parameters: {
|
|
/** @description The ID of the table which this request is targeting. */
|
|
tableId: string;
|
|
/** @description The ID of the row which this request is targeting. */
|
|
rowId: string;
|
|
/** @description The ID of the app which this request is targeting. */
|
|
appId: string;
|
|
/** @description The ID of the app which this request is targeting. */
|
|
appIdUrl: string;
|
|
/** @description The ID of the query which this request is targeting. */
|
|
queryId: string;
|
|
/** @description The ID of the user which this request is targeting. */
|
|
userId: string;
|
|
};
|
|
}
|
|
|
|
export interface operations {
|
|
create: {
|
|
responses: {
|
|
/** Returns the created user. */
|
|
200: {
|
|
content: {
|
|
"application/json": components["schemas"]["userOutput"];
|
|
};
|
|
};
|
|
};
|
|
requestBody: {
|
|
content: {
|
|
"application/json": components["schemas"]["user"];
|
|
};
|
|
};
|
|
};
|
|
getById: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the user which this request is targeting. */
|
|
userId: components["parameters"]["userId"];
|
|
};
|
|
};
|
|
responses: {
|
|
/** Returns the retrieved user. */
|
|
200: {
|
|
content: {
|
|
"application/json": components["schemas"]["userOutput"];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
update: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the user which this request is targeting. */
|
|
userId: components["parameters"]["userId"];
|
|
};
|
|
};
|
|
responses: {
|
|
/** Returns the updated user. */
|
|
200: {
|
|
content: {
|
|
"application/json": components["schemas"]["userOutput"];
|
|
};
|
|
};
|
|
};
|
|
requestBody: {
|
|
content: {
|
|
"application/json": components["schemas"]["user"];
|
|
};
|
|
};
|
|
};
|
|
destroy: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the user which this request is targeting. */
|
|
userId: components["parameters"]["userId"];
|
|
};
|
|
};
|
|
responses: {
|
|
/** Returns the deleted user. */
|
|
200: {
|
|
content: {
|
|
"application/json": components["schemas"]["userOutput"];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** Based on user properties (currently only name) search for users. */
|
|
search: {
|
|
responses: {
|
|
/** Returns the found users based on search parameters. */
|
|
200: {
|
|
content: {
|
|
"application/json": components["schemas"]["userSearch"];
|
|
};
|
|
};
|
|
};
|
|
requestBody: {
|
|
content: {
|
|
"application/json": components["schemas"]["nameSearch"];
|
|
};
|
|
};
|
|
};
|
|
/** Queries which have been created within a Budibase app can be executed using this, */
|
|
execute: {
|
|
parameters: {
|
|
path: {
|
|
/** The ID of the query which this request is targeting. */
|
|
queryId: components["parameters"]["queryId"];
|
|
};
|
|
header: {
|
|
/** The ID of the app which this request is targeting. */
|
|
"x-budibase-app-id": components["parameters"]["appId"];
|
|
};
|
|
};
|
|
responses: {
|
|
/** Returns the result of the query execution. */
|
|
200: {
|
|
content: {
|
|
"application/json": components["schemas"]["executeQueryOutput"];
|
|
};
|
|
};
|
|
};
|
|
requestBody: {
|
|
content: {
|
|
"application/json": components["schemas"]["executeQuery"];
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|
|
export interface external {}
|