diff --git a/packages/nc-gui/components/account/UserList.vue b/packages/nc-gui/components/account/UserList.vue index a05550aea4..663ad1bdb0 100644 --- a/packages/nc-gui/components/account/UserList.vue +++ b/packages/nc-gui/components/account/UserList.vue @@ -22,6 +22,8 @@ const currentLimit = $ref(10) const showUserModal = ref(false) +const userMadalKey = ref(0) + const searchText = ref('') const pagination = reactive({ @@ -67,8 +69,7 @@ const deleteUser = async (userId: string) => { Modal.confirm({ title: 'Are you sure you want to delete this user?', type: 'warn', - content: - 'On deleting, user will remove from from organization and any sync source(Airtable) created by user will get removed', + content: 'On deleting, user will remove from organization and any sync source(Airtable) created by user will get removed', onOk: async () => { try { await api.orgUsers.delete(userId) @@ -138,7 +139,17 @@ const copyPasswordResetUrl = async (user: User) => {
- +
Invite new user @@ -253,7 +264,7 @@ const copyPasswordResetUrl = async (user: User) => { - +
diff --git a/packages/nocodb-sdk/src/lib/Api.ts b/packages/nocodb-sdk/src/lib/Api.ts index fb61f09e2e..495d7ca56c 100644 --- a/packages/nocodb-sdk/src/lib/Api.ts +++ b/packages/nocodb-sdk/src/lib/Api.ts @@ -14,20 +14,16 @@ export interface UserType { id: string; firstname: string; lastname: string; - /** @format email */ email: string; roles?: string; - /** * @format date * @example 1997-10-31 */ date_of_birth?: string; - /** Set to true if the user's email has been verified. */ email_verified: boolean; - /** * The date that the user was created. * @format date @@ -42,7 +38,10 @@ export interface PageReqQueryParamsType { } export interface UserListType { - users: { list: UserType; pageInfo: PaginatedType }; + users: { + list: UserType; + pageInfo: PaginatedType; + }; } export interface ProjectReqType { @@ -99,7 +98,10 @@ export interface BaseReqType { } export interface BaseListType { - bases: { list: BaseType[]; pageInfo: PaginatedType }; + bases: { + list: BaseType[]; + pageInfo: PaginatedType; + }; } export interface TableType { @@ -185,7 +187,7 @@ export interface FilterType { fk_column_id?: string; logical_op?: string; comparison_op?: string; - value?: string | number | number | boolean | null; + value?: string | number | boolean | null; is_group?: boolean; children?: FilterType[]; project_id?: string; @@ -196,7 +198,9 @@ export interface FilterType { } export interface FilterListType { - filters: { list: FilterType[] }; + filters: { + list: FilterType[]; + }; } export interface SortType { @@ -210,7 +214,9 @@ export interface SortType { } export interface SortListType { - sorts: { list: SharedViewType[] }; + sorts: { + list: SharedViewType[]; + }; } export interface ColumnType { @@ -254,7 +260,9 @@ export interface ColumnType { } export interface ColumnListType { - columns: { list: ColumnType[] }; + columns: { + list: ColumnType[]; + }; } export interface LinkToAnotherRecordType { @@ -642,7 +650,12 @@ export type ColumnReqType = fk_relation_column_id?: string; fk_lookup_column_id?: string; } - | { uidt?: string; formula_raw?: string; formula?: string; title?: string }; + | { + uidt?: string; + formula_raw?: string; + formula?: string; + title?: string; + }; export interface UserInfoType { id?: string; @@ -821,22 +834,38 @@ export class Api< > extends HttpClient { auth = { /** - * @description Create a new user with provided email and password and first user is marked as super admin. - * - * @tags Auth - * @name Signup - * @summary Signup - * @request POST:/api/v1/auth/user/signup - * @response `200` `{ token?: string }` OK - * @response `400` `{ msg?: string }` Bad Request - * @response `401` `void` Unauthorized - * @response `403` `void` Forbidden - */ + * @description Create a new user with provided email and password and first user is marked as super admin. + * + * @tags Auth + * @name Signup + * @summary Signup + * @request POST:/api/v1/auth/user/signup + * @response `200` `{ + token?: string, + +}` OK + * @response `400` `{ + msg?: string, + +}` Bad Request + * @response `401` `void` Unauthorized + * @response `403` `void` Forbidden + */ signup: ( - data: { email?: string; password?: string }, + data: { + email?: string; + password?: string; + }, params: RequestParams = {} ) => - this.request<{ token?: string }, { msg?: string } | void>({ + this.request< + { + token?: string; + }, + { + msg?: string; + } | void + >({ path: `/api/v1/auth/user/signup`, method: 'POST', body: data, @@ -845,20 +874,36 @@ export class Api< }), /** - * @description Authenticate existing user with their email and password. Successful login will return a JWT access-token. - * - * @tags Auth - * @name Signin - * @summary Signin - * @request POST:/api/v1/auth/user/signin - * @response `200` `{ token?: string }` OK - * @response `400` `{ msg?: string }` Bad Request - */ + * @description Authenticate existing user with their email and password. Successful login will return a JWT access-token. + * + * @tags Auth + * @name Signin + * @summary Signin + * @request POST:/api/v1/auth/user/signin + * @response `200` `{ + token?: string, + +}` OK + * @response `400` `{ + msg?: string, + +}` Bad Request + */ signin: ( - data: { email: string; password: string }, + data: { + email: string; + password: string; + }, params: RequestParams = {} ) => - this.request<{ token?: string }, { msg?: string }>({ + this.request< + { + token?: string; + }, + { + msg?: string; + } + >({ path: `/api/v1/auth/user/signin`, method: 'POST', body: data, @@ -876,7 +921,13 @@ export class Api< * @request GET:/api/v1/auth/user/me * @response `200` `UserInfoType` OK */ - me: (query?: { project_id?: string }, params: RequestParams = {}) => + me: ( + query?: { + /** Pass project id to get project specific roles along with user info */ + project_id?: string; + }, + params: RequestParams = {} + ) => this.request({ path: `/api/v1/auth/user/me`, method: 'GET', @@ -895,7 +946,12 @@ export class Api< * @response `200` `void` OK * @response `401` `void` Unauthorized */ - passwordForgot: (data: { email?: string }, params: RequestParams = {}) => + passwordForgot: ( + data: { + email?: string; + }, + params: RequestParams = {} + ) => this.request({ path: `/api/v1/auth/password/forgot`, method: 'POST', @@ -905,20 +961,36 @@ export class Api< }), /** - * @description Change password of authenticated user with a new one. - * - * @tags Auth - * @name PasswordChange - * @summary Password change - * @request POST:/api/v1/auth/password/change - * @response `200` `{ msg?: string }` OK - * @response `400` `{ msg?: string }` Bad request - */ + * @description Change password of authenticated user with a new one. + * + * @tags Auth + * @name PasswordChange + * @summary Password change + * @request POST:/api/v1/auth/password/change + * @response `200` `{ + msg?: string, + +}` OK + * @response `400` `{ + msg?: string, + +}` Bad request + */ passwordChange: ( - data: { currentPassword?: string; newPassword?: string }, + data: { + currentPassword?: string; + newPassword?: string; + }, params: RequestParams = {} ) => - this.request<{ msg?: string }, { msg?: string }>({ + this.request< + { + msg?: string; + }, + { + msg?: string; + } + >({ path: `/api/v1/auth/password/change`, method: 'POST', body: data, @@ -970,7 +1042,9 @@ export class Api< */ passwordReset: ( token: string, - data: { new_password?: string }, + data: { + new_password?: string; + }, params: RequestParams = {} ) => this.request({ @@ -998,17 +1072,29 @@ export class Api< }), /** - * No description - * - * @tags Auth - * @name ProjectUserList - * @summary Project users - * @request GET:/api/v1/db/meta/projects/{projectId}/users - * @response `200` `{ users?: { list: (UserType)[], pageInfo: PaginatedType } }` OK - */ + * No description + * + * @tags Auth + * @name ProjectUserList + * @summary Project users + * @request GET:/api/v1/db/meta/projects/{projectId}/users + * @response `200` `{ + users?: { + list: (UserType)[], + pageInfo: PaginatedType, + +}, + +}` OK + */ projectUserList: (projectId: string, params: RequestParams = {}) => this.request< - { users?: { list: UserType[]; pageInfo: PaginatedType } }, + { + users?: { + list: UserType[]; + pageInfo: PaginatedType; + }; + }, any >({ path: `/api/v1/db/meta/projects/${projectId}/users`, @@ -1107,19 +1193,31 @@ export class Api< }; orgTokens = { /** - * No description - * - * @tags Org tokens - * @name List - * @summary Organisation API Tokens List - * @request GET:/api/v1/tokens - * @response `200` `{ users?: { list: ((ApiTokenType & { created_by?: string }))[], pageInfo: PaginatedType } }` OK - */ + * No description + * + * @tags Org tokens + * @name List + * @summary Organisation API Tokens List + * @request GET:/api/v1/tokens + * @response `200` `{ + users?: { + list: ((ApiTokenType & { + created_by?: string, + +}))[], + pageInfo: PaginatedType, + +}, + +}` OK + */ list: (params: RequestParams = {}) => this.request< { users?: { - list: (ApiTokenType & { created_by?: string })[]; + list: (ApiTokenType & { + created_by?: string; + })[]; pageInfo: PaginatedType; }; }, @@ -1165,16 +1263,24 @@ export class Api< }; orgLicense = { /** - * No description - * - * @tags Org license - * @name Get - * @summary App license get - * @request GET:/api/v1/license - * @response `200` `{ key?: string }` OK - */ + * No description + * + * @tags Org license + * @name Get + * @summary App license get + * @request GET:/api/v1/license + * @response `200` `{ + key?: string, + +}` OK + */ get: (params: RequestParams = {}) => - this.request<{ key?: string }, any>({ + this.request< + { + key?: string; + }, + any + >({ path: `/api/v1/license`, method: 'GET', format: 'json', @@ -1190,7 +1296,12 @@ export class Api< * @request POST:/api/v1/license * @response `200` `void` OK */ - set: (data: { key?: string }, params: RequestParams = {}) => + set: ( + data: { + key?: string; + }, + params: RequestParams = {} + ) => this.request({ path: `/api/v1/license`, method: 'POST', @@ -1201,16 +1312,24 @@ export class Api< }; orgAppSettings = { /** - * No description - * - * @tags Org app settings - * @name Get - * @summary App settings get - * @request GET:/api/v1/app-settings - * @response `200` `{ invite_only_signup?: boolean }` OK - */ + * No description + * + * @tags Org app settings + * @name Get + * @summary App settings get + * @request GET:/api/v1/app-settings + * @response `200` `{ + invite_only_signup?: boolean, + +}` OK + */ get: (params: RequestParams = {}) => - this.request<{ invite_only_signup?: boolean }, any>({ + this.request< + { + invite_only_signup?: boolean; + }, + any + >({ path: `/api/v1/app-settings`, method: 'GET', format: 'json', @@ -1226,7 +1345,12 @@ export class Api< * @request POST:/api/v1/app-settings * @response `200` `void` OK */ - set: (data: { invite_only_signup?: boolean }, params: RequestParams = {}) => + set: ( + data: { + invite_only_signup?: boolean; + }, + params: RequestParams = {} + ) => this.request({ path: `/api/v1/app-settings`, method: 'POST', @@ -1237,17 +1361,29 @@ export class Api< }; orgUsers = { /** - * No description - * - * @tags Org users - * @name List - * @summary Organisation Users - * @request GET:/api/v1/users - * @response `200` `{ users?: { list: (UserType)[], pageInfo: PaginatedType } }` OK - */ + * No description + * + * @tags Org users + * @name List + * @summary Organisation Users + * @request GET:/api/v1/users + * @response `200` `{ + users?: { + list: (UserType)[], + pageInfo: PaginatedType, + +}, + +}` OK + */ list: (params: RequestParams = {}) => this.request< - { users?: { list: UserType[]; pageInfo: PaginatedType } }, + { + users?: { + list: UserType[]; + pageInfo: PaginatedType; + }; + }, any >({ path: `/api/v1/users`, @@ -1326,17 +1462,24 @@ export class Api< }), /** - * No description - * - * @tags Org users - * @name GeneratePasswordResetToken - * @summary Organisation User Generate Password Reset Token - * @request POST:/api/v1/users/{userId}/generate-reset-url - * @response `200` `{ reset_password_token?: string, reset_password_url?: string }` OK - */ + * No description + * + * @tags Org users + * @name GeneratePasswordResetToken + * @summary Organisation User Generate Password Reset Token + * @request POST:/api/v1/users/{userId}/generate-reset-url + * @response `200` `{ + reset_password_token?: string, + reset_password_url?: string, + +}` OK + */ generatePasswordResetToken: (userId: string, params: RequestParams = {}) => this.request< - { reset_password_token?: string; reset_password_url?: string }, + { + reset_password_token?: string; + reset_password_url?: string; + }, any >({ path: `/api/v1/users/${userId}/generate-reset-url`, @@ -1347,14 +1490,24 @@ export class Api< }; project = { /** - * No description - * - * @tags Project - * @name MetaGet - * @summary Project info - * @request GET:/api/v1/db/meta/projects/{projectId}/info - * @response `200` `{ Node?: string, Arch?: string, Platform?: string, Docker?: boolean, Database?: string, ProjectOnRootDB?: string, RootDB?: string, PackageVersion?: string }` OK - */ + * No description + * + * @tags Project + * @name MetaGet + * @summary Project info + * @request GET:/api/v1/db/meta/projects/{projectId}/info + * @response `200` `{ + Node?: string, + Arch?: string, + Platform?: string, + Docker?: boolean, + Database?: string, + ProjectOnRootDB?: string, + RootDB?: string, + PackageVersion?: string, + +}` OK + */ metaGet: (projectId: string, params: RequestParams = {}, query: object) => this.request< { @@ -1387,7 +1540,9 @@ export class Api< */ modelVisibilityList: ( projectId: string, - query?: { includeM2M?: boolean }, + query?: { + includeM2M?: boolean; + }, params: RequestParams = {} ) => this.request({ @@ -1430,7 +1585,11 @@ export class Api< * @response `201` `ProjectListType` */ list: ( - query?: { page?: number; pageSize?: number; sort?: string }, + query?: { + page?: number; + pageSize?: number; + sort?: string; + }, params: RequestParams = {} ) => this.request({ @@ -1450,7 +1609,9 @@ export class Api< * @response `200` `ProjectType` OK */ create: ( - data: ProjectType & { external?: boolean }, + data: ProjectType & { + external?: boolean; + }, params: RequestParams = {} ) => this.request({ @@ -1514,15 +1675,27 @@ export class Api< }), /** - * @description Read project details - * - * @tags Project - * @name SharedBaseGet - * @request GET:/api/v1/db/meta/projects/{projectId}/shared - * @response `200` `{ uuid?: string, url?: string, roles?: string }` OK - */ + * @description Read project details + * + * @tags Project + * @name SharedBaseGet + * @request GET:/api/v1/db/meta/projects/{projectId}/shared + * @response `200` `{ + uuid?: string, + url?: string, + roles?: string, + +}` OK + */ sharedBaseGet: (projectId: string, params: RequestParams = {}) => - this.request<{ uuid?: string; url?: string; roles?: string }, any>({ + this.request< + { + uuid?: string; + url?: string; + roles?: string; + }, + any + >({ path: `/api/v1/db/meta/projects/${projectId}/shared`, method: 'GET', format: 'json', @@ -1545,19 +1718,34 @@ export class Api< }), /** - * No description - * - * @tags Project - * @name SharedBaseCreate - * @request POST:/api/v1/db/meta/projects/{projectId}/shared - * @response `200` `{ uuid?: string, url?: string, roles?: string }` OK - */ + * No description + * + * @tags Project + * @name SharedBaseCreate + * @request POST:/api/v1/db/meta/projects/{projectId}/shared + * @response `200` `{ + uuid?: string, + url?: string, + roles?: string, + +}` OK + */ sharedBaseCreate: ( projectId: string, - data: { roles?: string; password?: string }, + data: { + roles?: string; + password?: string; + }, params: RequestParams = {} ) => - this.request<{ uuid?: string; url?: string; roles?: string }, any>({ + this.request< + { + uuid?: string; + url?: string; + roles?: string; + }, + any + >({ path: `/api/v1/db/meta/projects/${projectId}/shared`, method: 'POST', body: data, @@ -1567,19 +1755,34 @@ export class Api< }), /** - * No description - * - * @tags Project - * @name SharedBaseUpdate - * @request PATCH:/api/v1/db/meta/projects/{projectId}/shared - * @response `200` `{ uuid?: string, url?: string, roles?: string }` OK - */ + * No description + * + * @tags Project + * @name SharedBaseUpdate + * @request PATCH:/api/v1/db/meta/projects/{projectId}/shared + * @response `200` `{ + uuid?: string, + url?: string, + roles?: string, + +}` OK + */ sharedBaseUpdate: ( projectId: string, - data: { roles?: string; password?: string }, + data: { + roles?: string; + password?: string; + }, params: RequestParams = {} ) => - this.request<{ uuid?: string; url?: string; roles?: string }, any>({ + this.request< + { + uuid?: string; + url?: string; + roles?: string; + }, + any + >({ path: `/api/v1/db/meta/projects/${projectId}/shared`, method: 'PATCH', body: data, @@ -1638,19 +1841,32 @@ export class Api< }), /** - * No description - * - * @tags Project - * @name AuditList - * @request GET:/api/v1/db/meta/projects/{projectId}/audits - * @response `200` `{ list: (AuditType)[], pageInfo: PaginatedType }` OK - */ + * No description + * + * @tags Project + * @name AuditList + * @request GET:/api/v1/db/meta/projects/{projectId}/audits + * @response `200` `{ + list: (AuditType)[], + pageInfo: PaginatedType, + +}` OK + */ auditList: ( projectId: string, - query?: { offset?: string; limit?: string }, + query?: { + offset?: string; + limit?: string; + }, params: RequestParams = {} ) => - this.request<{ list: AuditType[]; pageInfo: PaginatedType }, any>({ + this.request< + { + list: AuditType[]; + pageInfo: PaginatedType; + }, + any + >({ path: `/api/v1/db/meta/projects/${projectId}/audits`, method: 'GET', query: query, @@ -1732,7 +1948,10 @@ export class Api< */ update: ( tableId: string, - data: { table_name?: string; project_id?: string }, + data: { + table_name?: string; + project_id?: string; + }, params: RequestParams = {} ) => this.request({ @@ -1769,7 +1988,9 @@ export class Api< */ reorder: ( tableId: string, - data: { order?: number }, + data: { + order?: number; + }, params: RequestParams = {} ) => this.request({ @@ -1923,7 +2144,9 @@ export class Api< */ showAllColumn: ( viewId: string, - query?: { ignoreIds?: any[] }, + query?: { + ignoreIds?: any[]; + }, params: RequestParams = {} ) => this.request({ @@ -1943,7 +2166,9 @@ export class Api< */ hideAllColumn: ( viewId: string, - query?: { ignoreIds?: any[] }, + query?: { + ignoreIds?: any[]; + }, params: RequestParams = {} ) => this.request({ @@ -2219,15 +2444,23 @@ export class Api< }), /** - * No description - * - * @tags DB view share - * @name Create - * @request POST:/api/v1/db/meta/views/{viewId}/share - * @response `200` `{ uuid?: string }` OK - */ + * No description + * + * @tags DB view share + * @name Create + * @request POST:/api/v1/db/meta/views/{viewId}/share + * @response `200` `{ + uuid?: string, + +}` OK + */ create: (viewId: string, params: RequestParams = {}) => - this.request<{ uuid?: string }, any>({ + this.request< + { + uuid?: string; + }, + any + >({ path: `/api/v1/db/meta/views/${viewId}/share`, method: 'POST', format: 'json', @@ -2244,7 +2477,10 @@ export class Api< */ update: ( viewId: string, - data: { password?: string; meta?: any }, + data: { + password?: string; + meta?: any; + }, params: RequestParams = {} ) => this.request({ @@ -2327,15 +2563,28 @@ export class Api< }; dbTableSort = { /** - * No description - * - * @tags DB table sort - * @name List - * @request GET:/api/v1/db/meta/views/{viewId}/sorts - * @response `200` `{ sorts?: { list?: (SortType)[] } }` OK - */ + * No description + * + * @tags DB table sort + * @name List + * @request GET:/api/v1/db/meta/views/{viewId}/sorts + * @response `200` `{ + sorts?: { + list?: (SortType)[], + +}, + +}` OK + */ list: (viewId: string, params: RequestParams = {}) => - this.request<{ sorts?: { list?: SortType[] } }, any>({ + this.request< + { + sorts?: { + list?: SortType[]; + }; + }, + any + >({ path: `/api/v1/db/meta/views/${viewId}/sorts`, method: 'GET', format: 'json', @@ -2608,7 +2857,11 @@ export class Api< orgs: string, projectName: string, tableName: string, - query?: { fields?: any[]; sort?: any[]; where?: string }, + query?: { + fields?: any[]; + sort?: any[]; + where?: string; + }, params: RequestParams = {} ) => this.request({ @@ -2633,6 +2886,7 @@ export class Api< projectName: string, tableName: string, query?: { + /** Column name of the column you want to group by, eg. `column_name=column1` */ column_name?: string; sort?: any[]; where?: string; @@ -2663,7 +2917,13 @@ export class Api< projectName: string, tableName: string, columnId: string, - query?: { fields?: any[]; sort?: any[]; where?: string; nested?: any }, + query?: { + fields?: any[]; + sort?: any[]; + where?: string; + /** Query params for nested data */ + nested?: any; + }, params: RequestParams = {} ) => this.request({ @@ -2858,7 +3118,9 @@ export class Api< projectName: string, tableName: string, data: any, - query?: { where?: string }, + query?: { + where?: string; + }, params: RequestParams = {} ) => this.request({ @@ -2885,7 +3147,9 @@ export class Api< projectName: string, tableName: string, data: any, - query?: { where?: string }, + query?: { + where?: string; + }, params: RequestParams = {} ) => this.request({ @@ -2969,7 +3233,10 @@ export class Api< relationType: 'mm' | 'hm' | 'bt', columnName: string, refRowId: string, - query?: { limit?: string; offset?: string }, + query?: { + limit?: string; + offset?: string; + }, params: RequestParams = {} ) => this.request({ @@ -3053,7 +3320,13 @@ export class Api< tableName: string, viewName: string, columnId: string, - query?: { fields?: any[]; sort?: any[]; where?: string; nested?: any }, + query?: { + fields?: any[]; + sort?: any[]; + where?: string; + /** Query params for nested data */ + nested?: any; + }, params: RequestParams = {} ) => this.request({ @@ -3078,7 +3351,13 @@ export class Api< projectName: string, tableName: string, viewName: string, - query?: { fields?: any[]; sort?: any[]; where?: string; nested?: any }, + query?: { + fields?: any[]; + sort?: any[]; + where?: string; + /** Query params for nested data */ + nested?: any; + }, params: RequestParams = {} ) => this.request({ @@ -3129,7 +3408,13 @@ export class Api< projectName: string, tableName: string, viewName: string, - query?: { fields?: any[]; sort?: any[]; where?: string; nested?: any }, + query?: { + fields?: any[]; + sort?: any[]; + where?: string; + /** Query params for nested data */ + nested?: any; + }, params: RequestParams = {} ) => this.request({ @@ -3155,6 +3440,7 @@ export class Api< tableName: string, viewName: string, query?: { + /** Column name of the column you want to group by, eg. `column_name=column1` */ column_name?: string; sort?: any[]; where?: string; @@ -3185,7 +3471,11 @@ export class Api< projectName: string, tableName: string, viewName: string, - query?: { where?: string; nested?: any }, + query?: { + where?: string; + /** Query params for nested data */ + nested?: any; + }, params: RequestParams = {} ) => this.request({ @@ -3330,7 +3620,10 @@ export class Api< groupedDataList: ( sharedViewUuid: string, columnId: string, - query?: { limit?: string; offset?: string }, + query?: { + limit?: string; + offset?: string; + }, params: RequestParams = {} ) => this.request({ @@ -3351,7 +3644,10 @@ export class Api< */ dataList: ( sharedViewUuid: string, - query?: { limit?: string; offset?: string }, + query?: { + limit?: string; + offset?: string; + }, params: RequestParams = {} ) => this.request({ @@ -3397,7 +3693,10 @@ export class Api< rowId: string, relationType: 'mm' | 'hm' | 'bt', columnName: string, - query?: { limit?: string; offset?: string }, + query?: { + limit?: string; + offset?: string; + }, params: RequestParams = {} ) => this.request({ @@ -3439,7 +3738,10 @@ export class Api< dataRelationList: ( sharedViewUuid: string, columnName: string, - query?: { limit?: string; offset?: string }, + query?: { + limit?: string; + offset?: string; + }, params: RequestParams = {} ) => this.request({ @@ -3451,15 +3753,23 @@ export class Api< }), /** - * @description Read project details - * - * @tags Public - * @name SharedBaseGet - * @request GET:/api/v1/db/public/shared-base/{sharedBaseUuid}/meta - * @response `200` `{ project_id?: string }` OK - */ + * @description Read project details + * + * @tags Public + * @name SharedBaseGet + * @request GET:/api/v1/db/public/shared-base/{sharedBaseUuid}/meta + * @response `200` `{ + project_id?: string, + +}` OK + */ sharedBaseGet: (sharedBaseUuid: string, params: RequestParams = {}) => - this.request<{ project_id?: string }, any>({ + this.request< + { + project_id?: string; + }, + any + >({ path: `/api/v1/db/public/shared-base/${sharedBaseUuid}/meta`, method: 'GET', format: 'json', @@ -3467,13 +3777,22 @@ export class Api< }), /** - * No description - * - * @tags Public - * @name SharedViewMetaGet - * @request GET:/api/v1/db/public/shared-view/{sharedViewUuid}/meta - * @response `200` `(ViewType & { relatedMetas?: any, client?: string, columns?: ((GridColumnType | FormColumnType | GalleryColumnType) & ColumnType), model?: TableType } & { view?: (FormType | GridType | GalleryType) })` OK - */ + * No description + * + * @tags Public + * @name SharedViewMetaGet + * @request GET:/api/v1/db/public/shared-view/{sharedViewUuid}/meta + * @response `200` `(ViewType & { + relatedMetas?: any, + client?: string, + columns?: ((GridColumnType | FormColumnType | GalleryColumnType) & ColumnType), + model?: TableType, + +} & { + view?: (FormType | GridType | GalleryType), + +})` OK + */ sharedViewMetaGet: (sharedViewUuid: string, params: RequestParams = {}) => this.request< ViewType & { @@ -3482,7 +3801,9 @@ export class Api< columns?: (GridColumnType | FormColumnType | GalleryColumnType) & ColumnType; model?: TableType; - } & { view?: FormType | GridType | GalleryType }, + } & { + view?: FormType | GridType | GalleryType; + }, any >({ path: `/api/v1/db/public/shared-view/${sharedViewUuid}/meta`, @@ -3501,7 +3822,11 @@ export class Api< * @response `201` `any` Created */ commentList: ( - query: { row_id: string; fk_model_id: string; comments_only?: boolean }, + query: { + row_id: string; + fk_model_id: string; + comments_only?: boolean; + }, params: RequestParams = {} ) => this.request({ @@ -3521,7 +3846,11 @@ export class Api< * @response `200` `void` OK */ commentRow: ( - data: { row_id: string; fk_model_id: string; description?: string }, + data: { + row_id: string; + fk_model_id: string; + description?: string; + }, params: RequestParams = {} ) => this.request({ @@ -3541,7 +3870,10 @@ export class Api< * @response `201` `any` Created */ commentCount: ( - query: { ids: any; fk_model_id: string }, + query: { + ids: any; + fk_model_id: string; + }, params: RequestParams = {} ) => this.request({ @@ -3580,15 +3912,25 @@ export class Api< }), /** - * No description - * - * @tags Utils - * @name TestConnection - * @request POST:/api/v1/db/meta/connection/test - * @response `200` `{ code?: number, message?: string }` OK - */ + * No description + * + * @tags Utils + * @name TestConnection + * @request POST:/api/v1/db/meta/connection/test + * @response `200` `{ + code?: number, + message?: string, + +}` OK + */ testConnection: (data: any, params: RequestParams = {}) => - this.request<{ code?: number; message?: string }, any>({ + this.request< + { + code?: number; + message?: string; + }, + any + >({ path: `/api/v1/db/meta/connection/test`, method: 'POST', body: data, @@ -3680,19 +4022,58 @@ export class Api< }), /** - * No description - * - * @tags Utils - * @name AggregatedMetaInfo - * @request GET:/api/v1/aggregated-meta-info - * @response `200` `{ projectCount?: number, projects?: ({ tableCount?: { table?: number, view?: number }, external?: boolean, viewCount?: { formCount?: number, gridCount?: number, galleryCount?: number, kanbanCount?: number, total?: number, sharedFormCount?: number, sharedGridCount?: number, sharedGalleryCount?: number, sharedKanbanCount?: number, sharedTotal?: number, sharedLockedCount?: number }, webhookCount?: number, filterCount?: number, sortCount?: number, rowCount?: ({ TotalRecords?: string })[], userCount?: number })[], userCount?: number, sharedBaseCount?: number }` OK - */ + * No description + * + * @tags Utils + * @name AggregatedMetaInfo + * @request GET:/api/v1/aggregated-meta-info + * @response `200` `{ + projectCount?: number, + projects?: ({ + tableCount?: { + table?: number, + view?: number, + +}, + external?: boolean, + viewCount?: { + formCount?: number, + gridCount?: number, + galleryCount?: number, + kanbanCount?: number, + total?: number, + sharedFormCount?: number, + sharedGridCount?: number, + sharedGalleryCount?: number, + sharedKanbanCount?: number, + sharedTotal?: number, + sharedLockedCount?: number, + +}, + webhookCount?: number, + filterCount?: number, + sortCount?: number, + rowCount?: ({ + TotalRecords?: string, + +})[], + userCount?: number, + +})[], + userCount?: number, + sharedBaseCount?: number, + +}` OK + */ aggregatedMetaInfo: (params: RequestParams = {}) => this.request< { projectCount?: number; projects?: { - tableCount?: { table?: number; view?: number }; + tableCount?: { + table?: number; + view?: number; + }; external?: boolean; viewCount?: { formCount?: number; @@ -3710,7 +4091,9 @@ export class Api< webhookCount?: number; filterCount?: number; sortCount?: number; - rowCount?: { TotalRecords?: string }[]; + rowCount?: { + TotalRecords?: string; + }[]; userCount?: number; }[]; userCount?: number; @@ -3756,15 +4139,25 @@ export class Api< }; dbTableWebhook = { /** - * No description - * - * @tags DB table webhook - * @name List - * @request GET:/api/v1/db/meta/tables/{tableId}/hooks - * @response `200` `{ list: (HookType)[], pageInfo: PaginatedType }` OK - */ + * No description + * + * @tags DB table webhook + * @name List + * @request GET:/api/v1/db/meta/tables/{tableId}/hooks + * @response `200` `{ + list: (HookType)[], + pageInfo: PaginatedType, + +}` OK + */ list: (tableId: string, params: RequestParams = {}) => - this.request<{ list: HookType[]; pageInfo: PaginatedType }, any>({ + this.request< + { + list: HookType[]; + pageInfo: PaginatedType; + }, + any + >({ path: `/api/v1/db/meta/tables/${tableId}/hooks`, method: 'GET', format: 'json', @@ -3799,7 +4192,13 @@ export class Api< */ test: ( tableId: string, - data: { payload?: { data?: any; user?: any }; hook?: HookType }, + data: { + payload?: { + data?: any; + user?: any; + }; + hook?: HookType; + }, params: RequestParams = {} ) => this.request({ @@ -3812,20 +4211,32 @@ export class Api< }), /** - * No description - * - * @tags DB table webhook - * @name SamplePayloadGet - * @request GET:/api/v1/db/meta/tables/{tableId}/hooks/samplePayload/{operation} - * @response `200` `{ plugins?: { list: (PluginType)[], pageInfo: PaginatedType } }` OK - */ + * No description + * + * @tags DB table webhook + * @name SamplePayloadGet + * @request GET:/api/v1/db/meta/tables/{tableId}/hooks/samplePayload/{operation} + * @response `200` `{ + plugins?: { + list: (PluginType)[], + pageInfo: PaginatedType, + +}, + +}` OK + */ samplePayloadGet: ( tableId: string, operation: 'update' | 'delete' | 'insert', params: RequestParams = {} ) => this.request< - { plugins?: { list: PluginType[]; pageInfo: PaginatedType } }, + { + plugins?: { + list: PluginType[]; + pageInfo: PaginatedType; + }; + }, any >({ path: `/api/v1/db/meta/tables/${tableId}/hooks/samplePayload/${operation}`, @@ -3869,15 +4280,25 @@ export class Api< }; plugin = { /** - * No description - * - * @tags Plugin - * @name List - * @request GET:/api/v1/db/meta/plugins - * @response `200` `{ list?: (PluginType)[], pageInfo?: PaginatedType }` OK - */ + * No description + * + * @tags Plugin + * @name List + * @request GET:/api/v1/db/meta/plugins + * @response `200` `{ + list?: (PluginType)[], + pageInfo?: PaginatedType, + +}` OK + */ list: (params: RequestParams = {}) => - this.request<{ list?: PluginType[]; pageInfo?: PaginatedType }, any>({ + this.request< + { + list?: PluginType[]; + pageInfo?: PaginatedType; + }, + any + >({ path: `/api/v1/db/meta/plugins`, method: 'GET', format: 'json', @@ -3911,7 +4332,12 @@ export class Api< * @response `401` `void` Unauthorized */ test: ( - data: { id?: string; title?: string; input?: any; category?: string }, + data: { + id?: string; + title?: string; + input?: any; + category?: string; + }, params: RequestParams = {} ) => this.request({ @@ -3986,7 +4412,9 @@ export class Api< */ create: ( projectId: string, - data: { description?: string }, + data: { + description?: string; + }, params: RequestParams = {} ) => this.request({ @@ -4022,8 +4450,13 @@ export class Api< * @request POST:/api/v1/db/storage/upload */ upload: ( - query: { path: string }, - data: { files?: any; json?: string }, + query: { + path: string; + }, + data: { + files?: any; + json?: string; + }, params: RequestParams = {} ) => this.request({ @@ -4044,7 +4477,9 @@ export class Api< * @request POST:/api/v1/db/storage/upload-by-url */ uploadByUrl: ( - query: { path: string }, + query: { + path: string; + }, data: { url?: string; fileName?: string;