From acfe6bc8154e446fcfc64f6e45e9b3051aa5debb Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 4 Mar 2023 19:46:41 +0800 Subject: [PATCH] chore(sdk): regenerate Api.ts --- packages/nocodb-sdk/src/lib/Api.ts | 71 +++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 5 deletions(-) diff --git a/packages/nocodb-sdk/src/lib/Api.ts b/packages/nocodb-sdk/src/lib/Api.ts index b421ae426d..9f434b8cae 100644 --- a/packages/nocodb-sdk/src/lib/Api.ts +++ b/packages/nocodb-sdk/src/lib/Api.ts @@ -238,7 +238,7 @@ export interface BaseType { | 'oracledb' | 'pg' | 'snowflake' - | 'sqlite'; + | 'sqlite3'; } /** @@ -378,7 +378,7 @@ export interface ColumnType { pv?: BoolType; /** Is Required? */ rqd?: BoolType; - /** Is System Colun? */ + /** Is System Column? */ system?: BoolType; /** * Column Title @@ -389,7 +389,44 @@ export interface ColumnType { * The data type in UI * @example SingleLineText */ - uidt?: string; + uidt?: + | 'Attachment' + | 'AutoNumber' + | 'Barcode' + | 'Button' + | 'Checkbox' + | 'Collaborator' + | 'Count' + | 'CreateTime' + | 'Currency' + | 'Date' + | 'DateTime' + | 'Decimal' + | 'Duration' + | 'Email' + | 'Formula' + | 'ForeignKey' + | 'GeoData' + | 'Geometry' + | 'ID' + | 'JSON' + | 'LastModifiedTime' + | 'LongText' + | 'LinkToAnotherRecord' + | 'Lookup' + | 'MultiSelect' + | 'Number' + | 'Percent' + | 'PhoneNumber' + | 'Rating' + | 'Rollup' + | 'SingleLineText' + | 'SingleSelect' + | 'SpecificDBType' + | 'Time' + | 'URL' + | 'Year' + | 'QrCode'; /** Is Unsigned? */ un?: BoolType; /** Is unique? */ @@ -1443,17 +1480,21 @@ export interface NormalColumnRequestType { | 'Duration' | 'Email' | 'Formula' + | 'ForeignKey' | 'GeoData' | 'Geometry' | 'ID' | 'JSON' | 'LastModifiedTime' | 'LongText' + | 'LinkToAnotherRecord' + | 'Lookup' | 'MultiSelect' | 'Number' | 'Percent' | 'PhoneNumber' | 'Rating' + | 'Rollup' | 'SingleLineText' | 'SingleSelect' | 'SpecificDBType' @@ -2141,10 +2182,26 @@ export interface ViewReqType { show_system_fields?: BoolType; } +/** + * Model for View Column Update Request + */ +export interface ViewColumnUpdateReqType { + /** View Title */ + show?: BoolType; + /** + * The order of the list of views. + * @min 0 + * @example 1 + */ + order?: number; +} + /** * Model for View Column Request */ export interface ViewColumnReqType { + /** Foreign Key to Column */ + fk_column_id?: IdType; /** View Title */ show?: BoolType; /** @@ -4395,7 +4452,11 @@ export class Api< * @request POST:/api/v1/db/meta/views/{viewId}/columns * @response `200` `void` OK */ - create: (viewId: string, data: ColumnReqType, params: RequestParams = {}) => + create: ( + viewId: string, + data: ViewColumnReqType, + params: RequestParams = {} + ) => this.request({ path: `/api/v1/db/meta/views/${viewId}/columns`, method: 'POST', @@ -4416,7 +4477,7 @@ export class Api< update: ( viewId: IdType, columnId: IdType, - data: ViewColumnReqType, + data: ViewColumnUpdateReqType, params: RequestParams = {} ) => this.request({