From 1742c071cc839afa5bb27e1862daf45e67003d0d Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 5 Jul 2022 18:51:34 +0100 Subject: [PATCH] Updating definitions. --- packages/server/specs/openapi.json | 147 ---- packages/server/specs/openapi.yaml | 109 --- packages/server/src/definitions/openapi.ts | 952 ++++++++++----------- 3 files changed, 438 insertions(+), 770 deletions(-) diff --git a/packages/server/specs/openapi.json b/packages/server/specs/openapi.json index 30ef0a8c6f..e84061c41b 100644 --- a/packages/server/specs/openapi.json +++ b/packages/server/specs/openapi.json @@ -2110,153 +2110,6 @@ } } }, - "/tables/{tableId}/rows/search": { - "post": { - "summary": "Search for rows", - "tags": [ - "rows" - ], - "parameters": [ - { - "$ref": "#/components/parameters/tableId" - }, - { - "$ref": "#/components/parameters/appId" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "query" - ], - "properties": { - "query": { - "type": "object", - "properties": { - "string": { - "type": "object", - "example": { - "columnName1": "value", - "columnName2": "value" - }, - "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.", - "additionalProperties": { - "type": "string", - "description": "The value to search for in the column." - } - }, - "fuzzy": { - "type": "object", - "description": "A fuzzy search, only supported by internal tables." - }, - "range": { - "type": "object", - "description": "Searches within a range, the format of this must be columnName -> [low, high].", - "example": { - "columnName1": [ - 10, - 20 - ] - } - }, - "equal": { - "type": "object", - "description": "Searches for rows that have a column value that is exactly the value set." - }, - "notEqual": { - "type": "object", - "description": "Searches for any row which does not contain the specified column value." - }, - "empty": { - "type": "object", - "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": { - "columnName1": "" - } - }, - "notEmpty": { - "type": "object", - "description": "Searches for rows which have the specified column." - }, - "oneOf": { - "type": "object", - "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]." - } - } - }, - "paginate": { - "type": "boolean", - "description": "Enables pagination, by default this is disabled." - }, - "bookmark": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ], - "description": "If retrieving another page, the bookmark from the previous request must be supplied." - }, - "limit": { - "type": "integer", - "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." - }, - "sort": { - "type": "object", - "description": "A set of parameters describing the sort behaviour of the search.", - "properties": { - "order": { - "type": "string", - "enum": [ - "ascending", - "descending" - ], - "description": "The order of the sort, by default this is ascending." - }, - "column": { - "type": "string", - "description": "The name of the column by which the rows will be sorted." - }, - "type": { - "type": "string", - "enum": [ - "string", - "number" - ], - "description": "Defines whether the column should be treated as a string or as numbers when sorting." - } - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "The response will contain an array of rows that match the search parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/searchOutput" - }, - "examples": { - "search": { - "$ref": "#/components/examples/rows" - } - } - } - } - } - } - } - }, "/tables": { "post": { "summary": "Create a table", diff --git a/packages/server/specs/openapi.yaml b/packages/server/specs/openapi.yaml index ed55df953a..09da4227ff 100644 --- a/packages/server/specs/openapi.yaml +++ b/packages/server/specs/openapi.yaml @@ -1531,115 +1531,6 @@ paths: examples: enrichedRow: $ref: "#/components/examples/enrichedRow" - "/tables/{tableId}/rows/search": - post: - summary: Search for rows - tags: - - rows - parameters: - - $ref: "#/components/parameters/tableId" - - $ref: "#/components/parameters/appId" - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - query - properties: - query: - type: object - properties: - string: - type: object - example: - columnName1: value - columnName2: value - 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. - additionalProperties: - type: string - description: The value to search for in the column. - fuzzy: - type: object - description: A fuzzy search, only supported by internal tables. - range: - type: object - description: Searches within a range, the format of this must be columnName -> - [low, high]. - example: - columnName1: - - 10 - - 20 - equal: - type: object - description: Searches for rows that have a column value that is exactly the - value set. - notEqual: - type: object - description: Searches for any row which does not contain the specified column - value. - empty: - type: object - 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: - columnName1: "" - notEmpty: - type: object - description: Searches for rows which have the specified column. - oneOf: - type: object - 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]. - paginate: - type: boolean - description: Enables pagination, by default this is disabled. - bookmark: - oneOf: - - type: string - - type: integer - description: If retrieving another page, the bookmark from the previous request - must be supplied. - limit: - type: integer - 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. - sort: - type: object - description: A set of parameters describing the sort behaviour of the search. - properties: - order: - type: string - enum: - - ascending - - descending - description: The order of the sort, by default this is ascending. - column: - type: string - description: The name of the column by which the rows will be sorted. - type: - type: string - enum: - - string - - number - description: Defines whether the column should be treated as a string or as - numbers when sorting. - responses: - "200": - description: The response will contain an array of rows that match the search - parameters. - content: - application/json: - schema: - $ref: "#/components/schemas/searchOutput" - examples: - search: - $ref: "#/components/examples/rows" /tables: post: summary: Create a table diff --git a/packages/server/src/definitions/openapi.ts b/packages/server/src/definitions/openapi.ts index 0fef60f4a0..89fd24c125 100644 --- a/packages/server/src/definitions/openapi.ts +++ b/packages/server/src/definitions/openapi.ts @@ -9,79 +9,79 @@ export interface paths { parameters: { header: { /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; responses: { /** Returns the created application. */ 200: { content: { - "application/json": components["schemas"]["applicationOutput"] - } - } - } + "application/json": components["schemas"]["applicationOutput"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["application"] - } - } - } - } + "application/json": components["schemas"]["application"]; + }; + }; + }; + }; "/applications/{appId}": { get: { parameters: { path: { /** The ID of the app which this request is targeting. */ - appId: components["parameters"]["appIdUrl"] - } - } + appId: components["parameters"]["appIdUrl"]; + }; + }; responses: { /** Returns the retrieved application. */ 200: { content: { - "application/json": components["schemas"]["applicationOutput"] - } - } - } - } + "application/json": components["schemas"]["applicationOutput"]; + }; + }; + }; + }; put: { parameters: { path: { /** The ID of the app which this request is targeting. */ - appId: components["parameters"]["appIdUrl"] - } - } + appId: components["parameters"]["appIdUrl"]; + }; + }; responses: { /** Returns the updated application. */ 200: { content: { - "application/json": components["schemas"]["applicationOutput"] - } - } - } + "application/json": components["schemas"]["applicationOutput"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["application"] - } - } - } + "application/json": components["schemas"]["application"]; + }; + }; + }; delete: { parameters: { path: { /** The ID of the app which this request is targeting. */ - appId: components["parameters"]["appIdUrl"] - } - } + appId: components["parameters"]["appIdUrl"]; + }; + }; responses: { /** Returns the deleted application. */ 200: { content: { - "application/json": components["schemas"]["applicationOutput"] - } - } - } - } - } + "application/json": components["schemas"]["applicationOutput"]; + }; + }; + }; + }; + }; "/applications/search": { /** Based on application properties (currently only name) search for applications. */ post: { @@ -89,439 +89,363 @@ export interface paths { /** Returns the applications that were found based on the search parameters. */ 200: { content: { - "application/json": components["schemas"]["applicationSearch"] - } - } - } + "application/json": components["schemas"]["applicationSearch"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["nameSearch"] - } - } - } - } + "application/json": components["schemas"]["nameSearch"]; + }; + }; + }; + }; "/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. */ - queryId: components["parameters"]["queryId"] - } + queryId: components["parameters"]["queryId"]; + }; header: { /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; responses: { /** Returns the result of the query execution. */ 200: { content: { - "application/json": components["schemas"]["executeQueryOutput"] - } - } - } + "application/json": components["schemas"]["executeQueryOutput"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["executeQuery"] - } - } - } - } + "application/json": components["schemas"]["executeQuery"]; + }; + }; + }; + }; "/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. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; responses: { /** Returns the queries found based on the search parameters. */ 200: { content: { - "application/json": components["schemas"]["querySearch"] - } - } - } + "application/json": components["schemas"]["querySearch"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["nameSearch"] - } - } - } - } + "application/json": components["schemas"]["nameSearch"]; + }; + }; + }; + }; "/tables/{tableId}/rows": { /** Creates a row within the specified table. */ post: { parameters: { path: { /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"] - } + tableId: components["parameters"]["tableId"]; + }; header: { /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; 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: { - "application/json": components["schemas"]["rowOutput"] - } - } - } + "application/json": components["schemas"]["rowOutput"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["row"] - } - } - } - } + "application/json": components["schemas"]["row"]; + }; + }; + }; + }; "/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. */ - tableId: components["parameters"]["tableId"] + tableId: components["parameters"]["tableId"]; /** The ID of the row which this request is targeting. */ - rowId: components["parameters"]["rowId"] - } + rowId: components["parameters"]["rowId"]; + }; header: { /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; responses: { /** Returns the retrieved row. */ 200: { content: { - "application/json": components["schemas"]["rowOutput"] - } - } - } - } + "application/json": components["schemas"]["rowOutput"]; + }; + }; + }; + }; /** Updates a row within the specified table. */ put: { parameters: { path: { /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"] + tableId: components["parameters"]["tableId"]; /** The ID of the row which this request is targeting. */ - rowId: components["parameters"]["rowId"] - } + rowId: components["parameters"]["rowId"]; + }; header: { /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; responses: { /** Returns the created row, including the ID which has been generated for it. */ 200: { content: { - "application/json": components["schemas"]["rowOutput"] - } - } - } + "application/json": components["schemas"]["rowOutput"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["row"] - } - } - } + "application/json": components["schemas"]["row"]; + }; + }; + }; /** Deletes a row within the specified table. */ delete: { parameters: { path: { /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"] + tableId: components["parameters"]["tableId"]; /** The ID of the row which this request is targeting. */ - rowId: components["parameters"]["rowId"] - } + rowId: components["parameters"]["rowId"]; + }; header: { /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; responses: { /** Returns the deleted row, including the ID which has been generated for it. */ 200: { content: { - "application/json": components["schemas"]["rowOutput"] - } - } - } - } - } - "/tables/{tableId}/rows/search": { - post: { - parameters: { - path: { - /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"] - } - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } - responses: { - /** The response will contain an array of rows that match the search parameters. */ - 200: { - content: { - "application/json": components["schemas"]["searchOutput"] - } - } - } - 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] - */ - 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 columnName -> [low, high]. - * @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" - } - } - } - } - } - } + "application/json": components["schemas"]["rowOutput"]; + }; + }; + }; + }; + }; "/tables": { /** Create a table, this could be internal or external. */ post: { parameters: { header: { /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; responses: { /** Returns the created table, including the ID which has been generated for it. This can be internal or external data sources. */ 200: { content: { - "application/json": components["schemas"]["tableOutput"] - } - } - } + "application/json": components["schemas"]["tableOutput"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["table"] - } - } - } - } + "application/json": components["schemas"]["table"]; + }; + }; + }; + }; "/tables/{tableId}": { /** Lookup a table, this could be internal or external. */ get: { parameters: { path: { /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"] - } + tableId: components["parameters"]["tableId"]; + }; header: { /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; responses: { /** Returns the retrieved table. */ 200: { content: { - "application/json": components["schemas"]["tableOutput"] - } - } - } - } + "application/json": components["schemas"]["tableOutput"]; + }; + }; + }; + }; /** Update a table, this could be internal or external. */ put: { parameters: { path: { /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"] - } + tableId: components["parameters"]["tableId"]; + }; header: { /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; responses: { /** Returns the updated table. */ 200: { content: { - "application/json": components["schemas"]["tableOutput"] - } - } - } + "application/json": components["schemas"]["tableOutput"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["table"] - } - } - } + "application/json": components["schemas"]["table"]; + }; + }; + }; /** Delete a table, this could be internal or external. */ delete: { parameters: { path: { /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"] - } + tableId: components["parameters"]["tableId"]; + }; header: { /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; responses: { /** Returns the deleted table. */ 200: { content: { - "application/json": components["schemas"]["tableOutput"] - } - } - } - } - } + "application/json": components["schemas"]["tableOutput"]; + }; + }; + }; + }; + }; "/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. */ - "x-budibase-app-id": components["parameters"]["appId"] - } - } + "x-budibase-app-id": components["parameters"]["appId"]; + }; + }; responses: { /** Returns the found tables, based on the search parameters. */ 200: { content: { - "application/json": components["schemas"]["tableSearch"] - } - } - } + "application/json": components["schemas"]["tableSearch"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["nameSearch"] - } - } - } - } + "application/json": components["schemas"]["nameSearch"]; + }; + }; + }; + }; "/users": { post: { responses: { /** Returns the created user. */ 200: { content: { - "application/json": components["schemas"]["userOutput"] - } - } - } + "application/json": components["schemas"]["userOutput"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["user"] - } - } - } - } + "application/json": components["schemas"]["user"]; + }; + }; + }; + }; "/users/{userId}": { get: { parameters: { path: { /** The ID of the user which this request is targeting. */ - userId: components["parameters"]["userId"] - } - } + userId: components["parameters"]["userId"]; + }; + }; responses: { /** Returns the retrieved user. */ 200: { content: { - "application/json": components["schemas"]["userOutput"] - } - } - } - } + "application/json": components["schemas"]["userOutput"]; + }; + }; + }; + }; put: { parameters: { path: { /** The ID of the user which this request is targeting. */ - userId: components["parameters"]["userId"] - } - } + userId: components["parameters"]["userId"]; + }; + }; responses: { /** Returns the updated user. */ 200: { content: { - "application/json": components["schemas"]["userOutput"] - } - } - } + "application/json": components["schemas"]["userOutput"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["user"] - } - } - } + "application/json": components["schemas"]["user"]; + }; + }; + }; delete: { parameters: { path: { /** The ID of the user which this request is targeting. */ - userId: components["parameters"]["userId"] - } - } + userId: components["parameters"]["userId"]; + }; + }; responses: { /** Returns the deleted user. */ 200: { content: { - "application/json": components["schemas"]["userOutput"] - } - } - } - } - } + "application/json": components["schemas"]["userOutput"]; + }; + }; + }; + }; + }; "/users/search": { /** Based on user properties (currently only name) search for users. */ post: { @@ -529,102 +453,102 @@ export interface paths { /** Returns the found users based on search parameters. */ 200: { content: { - "application/json": components["schemas"]["userSearch"] - } - } - } + "application/json": components["schemas"]["userSearch"]; + }; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["nameSearch"] - } - } - } - } + "application/json": components["schemas"]["nameSearch"]; + }; + }; + }; + }; } export interface components { schemas: { application: { /** @description The name of the app. */ - name: string + name: string; /** @description The URL by which the app is accessed, this must be URL encoded. */ - url?: string - } + url?: string; + }; applicationOutput: { data: { /** @description The name of the app. */ - name: string + name: string; /** @description The URL by which the app is accessed, this must be URL encoded. */ - url: string + url: string; /** @description The ID of the app. */ - _id: string + _id: string; /** * @description The status of the app, stating it if is the development or published version. * @enum {string} */ - status: "development" | "published" + status: "development" | "published"; /** @description States when the app was created, will be constant. Stored in ISO format. */ - createdAt: string + createdAt: string; /** @description States the last time the app was updated - stored in ISO format. */ - updatedAt: string + updatedAt: string; /** @description States the version of the Budibase client this app is currently based on. */ - version: string + version: string; /** @description In a multi-tenant environment this will state the tenant this app is within. */ - tenantId?: string + tenantId?: string; /** @description The user this app is currently being built by. */ - lockedBy?: { [key: string]: unknown } - } - } + lockedBy?: { [key: string]: unknown }; + }; + }; applicationSearch: { data: { /** @description The name of the app. */ - name: string + name: string; /** @description The URL by which the app is accessed, this must be URL encoded. */ - url: string + url: string; /** @description The ID of the app. */ - _id: string + _id: string; /** * @description The status of the app, stating it if is the development or published version. * @enum {string} */ - status: "development" | "published" + status: "development" | "published"; /** @description States when the app was created, will be constant. Stored in ISO format. */ - createdAt: string + createdAt: string; /** @description States the last time the app was updated - stored in ISO format. */ - updatedAt: string + updatedAt: string; /** @description States the version of the Budibase client this app is currently based on. */ - version: string + version: string; /** @description In a multi-tenant environment this will state the tenant this app is within. */ - tenantId?: string + tenantId?: string; /** @description The user this app is currently being built by. */ - lockedBy?: { [key: string]: unknown } - }[] - } + lockedBy?: { [key: string]: unknown }; + }[]; + }; /** @description The row to be created/updated, based on the table schema. */ - row: { [key: string]: unknown } + 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 }[] + data: { [key: string]: unknown }[]; /** @description If pagination in use, this should be provided. */ - bookmark?: string | number + bookmark?: string | number; /** @description If pagination in use, this will determine if there is another page to fetch. */ - hasNextPage?: boolean - } + hasNextPage?: boolean; + }; rowOutput: { /** @description The row to be created/updated, based on the table schema. */ data: { /** @description The ID of the row. */ - _id: string + _id: string; /** @description The ID of the table this row comes from. */ - tableId: string - } & { [key: string]: unknown } - } + tableId: string; + } & { [key: string]: unknown }; + }; /** @description The table to be created/updated. */ table: { /** @description The name of the table. */ - name: string + name: string; /** @description The name of the column which should be used in relationship tags when relating to this table. */ - primaryDisplay?: string + primaryDisplay?: string; schema: { [key: string]: | { @@ -632,60 +556,60 @@ export interface components { * @description A relationship column. * @enum {string} */ - type?: "link" + 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" + type?: "string" | "number" | "object" | "boolean"; /** @description Defines whether the column is required or not. */ - presence?: boolean - } + presence?: boolean; + }; /** @description The name of the column. */ - name?: string + name?: string; /** @description Defines whether the column is automatically generated. */ - autocolumn?: boolean + autocolumn?: boolean; /** @description The name of the column which a relationship column is related to in another table. */ - fieldName?: string + fieldName?: string; /** @description The ID of the table which a relationship column is related to. */ - tableId?: string + 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" + 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 + through?: string; /** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */ - foreignKey?: string + 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 + 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 + throughTo?: string; } | { /** * @description A formula column. * @enum {string} */ - type?: "formula" + 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" + type?: "string" | "number" | "object" | "boolean"; /** @description Defines whether the column is required or not. */ - presence?: boolean - } + presence?: boolean; + }; /** @description The name of the column. */ - name?: string + name?: string; /** @description Defines whether the column is automatically generated. */ - autocolumn?: boolean + 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 + formula?: string; /** * @description Defines whether this is a static or dynamic formula. * @enum {string} */ - formulaType?: "static" | "dynamic" + formulaType?: "static" | "dynamic"; } | { /** @@ -705,28 +629,28 @@ export interface components { | "formula" | "auto" | "json" - | "internal" + | "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" + type?: "string" | "number" | "object" | "boolean"; /** @description Defines whether the column is required or not. */ - presence?: boolean - } + presence?: boolean; + }; /** @description The name of the column. */ - name?: string + name?: string; /** @description Defines whether the column is automatically generated. */ - autocolumn?: boolean - } - } - } + autocolumn?: boolean; + }; + }; + }; tableOutput: { /** @description The table to be created/updated. */ data: { /** @description The name of the table. */ - name: string + name: string; /** @description The name of the column which should be used in relationship tags when relating to this table. */ - primaryDisplay?: string + primaryDisplay?: string; schema: { [key: string]: | { @@ -734,22 +658,22 @@ export interface components { * @description A relationship column. * @enum {string} */ - type?: "link" + 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" + type?: "string" | "number" | "object" | "boolean"; /** @description Defines whether the column is required or not. */ - presence?: boolean - } + presence?: boolean; + }; /** @description The name of the column. */ - name?: string + name?: string; /** @description Defines whether the column is automatically generated. */ - autocolumn?: boolean + autocolumn?: boolean; /** @description The name of the column which a relationship column is related to in another table. */ - fieldName?: string + fieldName?: string; /** @description The ID of the table which a relationship column is related to. */ - tableId?: string + tableId?: string; /** * @description Defines the type of relationship that this column will be used for. * @enum {string} @@ -757,40 +681,40 @@ export interface components { relationshipType?: | "one-to-many" | "many-to-one" - | "many-to-many" + | "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 + through?: string; /** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */ - foreignKey?: string + 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 + 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 + throughTo?: string; } | { /** * @description A formula column. * @enum {string} */ - type?: "formula" + 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" + type?: "string" | "number" | "object" | "boolean"; /** @description Defines whether the column is required or not. */ - presence?: boolean - } + presence?: boolean; + }; /** @description The name of the column. */ - name?: string + name?: string; /** @description Defines whether the column is automatically generated. */ - autocolumn?: boolean + 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 + formula?: string; /** * @description Defines whether this is a static or dynamic formula. * @enum {string} */ - formulaType?: "static" | "dynamic" + formulaType?: "static" | "dynamic"; } | { /** @@ -810,30 +734,30 @@ export interface components { | "formula" | "auto" | "json" - | "internal" + | "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" + type?: "string" | "number" | "object" | "boolean"; /** @description Defines whether the column is required or not. */ - presence?: boolean - } + presence?: boolean; + }; /** @description The name of the column. */ - name?: string + name?: string; /** @description Defines whether the column is automatically generated. */ - autocolumn?: boolean - } - } + autocolumn?: boolean; + }; + }; /** @description The ID of the table. */ - _id: string - } - } + _id: string; + }; + }; tableSearch: { data: { /** @description The name of the table. */ - name: string + name: string; /** @description The name of the column which should be used in relationship tags when relating to this table. */ - primaryDisplay?: string + primaryDisplay?: string; schema: { [key: string]: | { @@ -841,22 +765,22 @@ export interface components { * @description A relationship column. * @enum {string} */ - type?: "link" + 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" + type?: "string" | "number" | "object" | "boolean"; /** @description Defines whether the column is required or not. */ - presence?: boolean - } + presence?: boolean; + }; /** @description The name of the column. */ - name?: string + name?: string; /** @description Defines whether the column is automatically generated. */ - autocolumn?: boolean + autocolumn?: boolean; /** @description The name of the column which a relationship column is related to in another table. */ - fieldName?: string + fieldName?: string; /** @description The ID of the table which a relationship column is related to. */ - tableId?: string + tableId?: string; /** * @description Defines the type of relationship that this column will be used for. * @enum {string} @@ -864,40 +788,40 @@ export interface components { relationshipType?: | "one-to-many" | "many-to-one" - | "many-to-many" + | "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 + through?: string; /** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */ - foreignKey?: string + 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 + 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 + throughTo?: string; } | { /** * @description A formula column. * @enum {string} */ - type?: "formula" + 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" + type?: "string" | "number" | "object" | "boolean"; /** @description Defines whether the column is required or not. */ - presence?: boolean - } + presence?: boolean; + }; /** @description The name of the column. */ - name?: string + name?: string; /** @description Defines whether the column is automatically generated. */ - autocolumn?: boolean + 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 + formula?: string; /** * @description Defines whether this is a static or dynamic formula. * @enum {string} */ - formulaType?: "static" | "dynamic" + formulaType?: "static" | "dynamic"; } | { /** @@ -917,20 +841,20 @@ export interface components { | "formula" | "auto" | "json" - | "internal" + | "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" + type?: "string" | "number" | "object" | "boolean"; /** @description Defines whether the column is required or not. */ - presence?: boolean - } + presence?: boolean; + }; /** @description The name of the column. */ - name?: string + name?: string; /** @description Defines whether the column is automatically generated. */ - autocolumn?: boolean - } - } + autocolumn?: boolean; + }; + }; /** @description The ID of the table. */ _id: string; }[]; @@ -949,179 +873,179 @@ export interface components { }; executeQueryOutput: { /** @description The data response from the query. */ - data: { [key: string]: unknown }[] + 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 } + headers?: { [key: string]: unknown }; /** @description The raw query response, as a string. */ - raw?: string - } + raw?: string; + }; /** @description If pagination is supported, this will contain the bookmark/anchor information for it. */ - pagination?: { [key: string]: unknown } - } + pagination?: { [key: string]: unknown }; + }; query: { /** @description The ID of the query. */ - _id: string + _id: string; /** @description The ID of the data source the query belongs to. */ - datasourceId?: string + datasourceId?: string; /** @description The bindings which are required to perform this query. */ - parameters?: string[] + parameters?: string[]; /** @description The fields that are used to perform this query, e.g. the sql statement */ - fields?: { [key: string]: unknown } + fields?: { [key: string]: unknown }; /** * @description The verb that describes this query. * @enum {undefined} */ - queryVerb?: "create" | "read" | "update" | "delete" + queryVerb?: "create" | "read" | "update" | "delete"; /** @description The name of the query. */ - name: string + name: string; /** @description The schema of the data returned when the query is executed. */ - schema: { [key: string]: unknown } + schema: { [key: string]: unknown }; /** @description The JavaScript transformer function, applied after the query responds with data. */ - transformer?: string + transformer?: string; /** @description Whether the query has readable data. */ - readable?: boolean - } + readable?: boolean; + }; querySearch: { data: { /** @description The ID of the query. */ - _id: string + _id: string; /** @description The ID of the data source the query belongs to. */ - datasourceId?: string + datasourceId?: string; /** @description The bindings which are required to perform this query. */ - parameters?: string[] + parameters?: string[]; /** @description The fields that are used to perform this query, e.g. the sql statement */ - fields?: { [key: string]: unknown } + fields?: { [key: string]: unknown }; /** * @description The verb that describes this query. * @enum {undefined} */ - queryVerb?: "create" | "read" | "update" | "delete" + queryVerb?: "create" | "read" | "update" | "delete"; /** @description The name of the query. */ - name: string + name: string; /** @description The schema of the data returned when the query is executed. */ - schema: { [key: string]: unknown } + schema: { [key: string]: unknown }; /** @description The JavaScript transformer function, applied after the query responds with data. */ - transformer?: string + transformer?: string; /** @description Whether the query has readable data. */ - readable?: boolean - }[] - } + readable?: boolean; + }[]; + }; user: { /** @description The email address of the user, this must be unique. */ - email: string + 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 + password?: string; /** * @description The status of the user, if they are active. * @enum {string} */ - status?: "active" + status?: "active"; /** @description The first name of the user */ - firstName?: string + firstName?: string; /** @description The last name of the user */ - lastName?: string + lastName?: string; /** @description If set to true forces the user to reset their password on first login. */ - forceResetPassword?: boolean + 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 - } + 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 - } + global?: boolean; + }; /** @description Contains the roles of the user per app (assuming they are not a builder user). */ - roles: { [key: string]: string } - } + roles: { [key: string]: string }; + }; userOutput: { data: { /** @description The email address of the user, this must be unique. */ - email: string + 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 + password?: string; /** * @description The status of the user, if they are active. * @enum {string} */ - status?: "active" + status?: "active"; /** @description The first name of the user */ - firstName?: string + firstName?: string; /** @description The last name of the user */ - lastName?: string + lastName?: string; /** @description If set to true forces the user to reset their password on first login. */ - forceResetPassword?: boolean + 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 - } + 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 - } + global?: boolean; + }; /** @description Contains the roles of the user per app (assuming they are not a builder user). */ - roles: { [key: string]: string } + roles: { [key: string]: string }; /** @description The ID of the user. */ - _id: string - } - } + _id: string; + }; + }; userSearch: { data: { /** @description The email address of the user, this must be unique. */ - email: string + 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 + password?: string; /** * @description The status of the user, if they are active. * @enum {string} */ - status?: "active" + status?: "active"; /** @description The first name of the user */ - firstName?: string + firstName?: string; /** @description The last name of the user */ - lastName?: string + lastName?: string; /** @description If set to true forces the user to reset their password on first login. */ - forceResetPassword?: boolean + 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 - } + 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 - } + global?: boolean; + }; /** @description Contains the roles of the user per app (assuming they are not a builder user). */ - roles: { [key: string]: string } + roles: { [key: string]: string }; /** @description The ID of the user. */ - _id: string - }[] - } + _id: string; + }[]; + }; nameSearch: { /** @description The name to be used when searching - this will be used in a case insensitive starts with match. */ - name: string - } - } + name: string; + }; + }; parameters: { /** @description The ID of the table which this request is targeting. */ - tableId: string + tableId: string; /** @description The ID of the row which this request is targeting. */ - rowId: string + rowId: string; /** @description The ID of the app which this request is targeting. */ - appId: string + appId: string; /** @description The ID of the app which this request is targeting. */ - appIdUrl: string + appIdUrl: string; /** @description The ID of the query which this request is targeting. */ - queryId: string + queryId: string; /** @description The ID of the user which this request is targeting. */ - userId: string - } + userId: string; + }; } export interface operations {}