|
|
@ -1494,12 +1494,12 @@ export class Api< |
|
|
|
* @tags DB Table column |
|
|
|
* @tags DB Table column |
|
|
|
* @name Read |
|
|
|
* @name Read |
|
|
|
* @summary Column Read |
|
|
|
* @summary Column Read |
|
|
|
* @request GET:/api/v1/db/meta/tables/{tableId}/columns/{columnId} |
|
|
|
* @request GET:/api/v1/db/meta/columns/{columnId} |
|
|
|
* @response `200` `ColumnType` OK |
|
|
|
* @response `200` `ColumnType` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
read: (tableId: string, columnId: string, params: RequestParams = {}) => |
|
|
|
read: (columnId: string, params: RequestParams = {}) => |
|
|
|
this.request<ColumnType, any>({ |
|
|
|
this.request<ColumnType, any>({ |
|
|
|
path: `/api/v1/db/meta/tables/${tableId}/columns/${columnId}`, |
|
|
|
path: `/api/v1/db/meta/columns/${columnId}`, |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
|
format: 'json', |
|
|
|
format: 'json', |
|
|
|
...params, |
|
|
|
...params, |
|
|
@ -1511,17 +1511,16 @@ export class Api< |
|
|
|
* @tags DB Table column |
|
|
|
* @tags DB Table column |
|
|
|
* @name Update |
|
|
|
* @name Update |
|
|
|
* @summary Column Update |
|
|
|
* @summary Column Update |
|
|
|
* @request PATCH:/api/v1/db/meta/tables/{tableId}/columns/{columnId} |
|
|
|
* @request PATCH:/api/v1/db/meta/columns/{columnId} |
|
|
|
* @response `200` `ColumnType` OK |
|
|
|
* @response `200` `ColumnType` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
update: ( |
|
|
|
update: ( |
|
|
|
tableId: string, |
|
|
|
|
|
|
|
columnId: string, |
|
|
|
columnId: string, |
|
|
|
data: ColumnReqType, |
|
|
|
data: ColumnReqType, |
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|
this.request<ColumnType, any>({ |
|
|
|
this.request<ColumnType, any>({ |
|
|
|
path: `/api/v1/db/meta/tables/${tableId}/columns/${columnId}`, |
|
|
|
path: `/api/v1/db/meta/columns/${columnId}`, |
|
|
|
method: 'PATCH', |
|
|
|
method: 'PATCH', |
|
|
|
body: data, |
|
|
|
body: data, |
|
|
|
type: ContentType.Json, |
|
|
|
type: ContentType.Json, |
|
|
@ -1534,12 +1533,12 @@ export class Api< |
|
|
|
* |
|
|
|
* |
|
|
|
* @tags DB Table column |
|
|
|
* @tags DB Table column |
|
|
|
* @name Delete |
|
|
|
* @name Delete |
|
|
|
* @request DELETE:/api/v1/db/meta/tables/{tableId}/columns/{columnId} |
|
|
|
* @request DELETE:/api/v1/db/meta/columns/{columnId} |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `void` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
delete: (tableId: string, columnId: string, params: RequestParams = {}) => |
|
|
|
delete: (columnId: string, params: RequestParams = {}) => |
|
|
|
this.request<void, any>({ |
|
|
|
this.request<void, any>({ |
|
|
|
path: `/api/v1/db/meta/tables/${tableId}/columns/${columnId}`, |
|
|
|
path: `/api/v1/db/meta/columns/${columnId}`, |
|
|
|
method: 'DELETE', |
|
|
|
method: 'DELETE', |
|
|
|
...params, |
|
|
|
...params, |
|
|
|
}), |
|
|
|
}), |
|
|
@ -1549,16 +1548,12 @@ export class Api< |
|
|
|
* |
|
|
|
* |
|
|
|
* @tags DB Table column |
|
|
|
* @tags DB Table column |
|
|
|
* @name PrimaryColumnSet |
|
|
|
* @name PrimaryColumnSet |
|
|
|
* @request POST:/api/v1/db/meta/tables/{tableId}/columns/{columnId}/primary |
|
|
|
* @request POST:/api/v1/db/meta/columns/{columnId}/primary |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `void` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
primaryColumnSet: ( |
|
|
|
primaryColumnSet: (columnId: string, params: RequestParams = {}) => |
|
|
|
tableId: string, |
|
|
|
|
|
|
|
columnId: string, |
|
|
|
|
|
|
|
params: RequestParams = {} |
|
|
|
|
|
|
|
) => |
|
|
|
|
|
|
|
this.request<void, any>({ |
|
|
|
this.request<void, any>({ |
|
|
|
path: `/api/v1/db/meta/tables/${tableId}/columns/${columnId}/primary`, |
|
|
|
path: `/api/v1/db/meta/columns/${columnId}/primary`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
...params, |
|
|
|
...params, |
|
|
|
}), |
|
|
|
}), |
|
|
|