|
|
@ -672,7 +672,7 @@ export interface SignInReqType { |
|
|
|
password: string; |
|
|
|
password: string; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ForgotPasswordReqType { |
|
|
|
export interface PasswordForgotReqType { |
|
|
|
email: string; |
|
|
|
email: string; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -686,7 +686,7 @@ export interface PasswordChangeReqType { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ApiTokenReqType { |
|
|
|
export interface ApiTokenReqType { |
|
|
|
description?: string; |
|
|
|
description?: string | null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface PluginType { |
|
|
|
export interface PluginType { |
|
|
@ -881,6 +881,45 @@ export type VisibilityRuleReqType = { |
|
|
|
|
|
|
|
|
|
|
|
export type NcBoolType = boolean | number | null; |
|
|
|
export type NcBoolType = boolean | number | null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface CommentReqType { |
|
|
|
|
|
|
|
row_id: string; |
|
|
|
|
|
|
|
fk_model_id: string; |
|
|
|
|
|
|
|
description?: string; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface AuditRowUpdateReqType { |
|
|
|
|
|
|
|
fk_model_id?: string; |
|
|
|
|
|
|
|
column_name?: string; |
|
|
|
|
|
|
|
row_id?: string; |
|
|
|
|
|
|
|
value?: any; |
|
|
|
|
|
|
|
prev_value?: any; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface OrgUserReqType { |
|
|
|
|
|
|
|
email?: string; |
|
|
|
|
|
|
|
roles?: string; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface ProjectUserReqType { |
|
|
|
|
|
|
|
email?: string; |
|
|
|
|
|
|
|
roles?: string; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface SharedBaseReqType { |
|
|
|
|
|
|
|
uuid?: string | null; |
|
|
|
|
|
|
|
roles?: string | null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface PluginTestReqType { |
|
|
|
|
|
|
|
title?: string; |
|
|
|
|
|
|
|
input?: any; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface PluginReqType { |
|
|
|
|
|
|
|
active?: NcBoolType; |
|
|
|
|
|
|
|
input?: any; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
import axios, { AxiosInstance, AxiosRequestConfig, ResponseType } from 'axios'; |
|
|
|
import axios, { AxiosInstance, AxiosRequestConfig, ResponseType } from 'axios'; |
|
|
|
|
|
|
|
|
|
|
|
export type QueryParamsType = Record<string | number, any>; |
|
|
|
export type QueryParamsType = Record<string | number, any>; |
|
|
@ -1149,7 +1188,7 @@ export class Api< |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `401` `void` Unauthorized |
|
|
|
* @response `401` `void` Unauthorized |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
passwordForgot: (data: ForgotPasswordReqType, params: RequestParams = {}) => |
|
|
|
passwordForgot: (data: PasswordForgotReqType, params: RequestParams = {}) => |
|
|
|
this.request<void, void>({ |
|
|
|
this.request<void, void>({ |
|
|
|
path: `/api/v1/auth/password/forgot`, |
|
|
|
path: `/api/v1/auth/password/forgot`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
@ -1304,7 +1343,7 @@ export class Api< |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
projectUserAdd: ( |
|
|
|
projectUserAdd: ( |
|
|
|
projectId: string, |
|
|
|
projectId: string, |
|
|
|
data: any, |
|
|
|
data: ProjectUserReqType, |
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|
this.request<any, any>({ |
|
|
|
this.request<any, any>({ |
|
|
@ -1328,7 +1367,7 @@ export class Api< |
|
|
|
projectUserUpdate: ( |
|
|
|
projectUserUpdate: ( |
|
|
|
projectId: string, |
|
|
|
projectId: string, |
|
|
|
userId: string, |
|
|
|
userId: string, |
|
|
|
data: any, |
|
|
|
data: ProjectUserReqType, |
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|
this.request<any, any>({ |
|
|
|
this.request<any, any>({ |
|
|
@ -1427,7 +1466,7 @@ export class Api< |
|
|
|
* @request POST:/api/v1/tokens |
|
|
|
* @request POST:/api/v1/tokens |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `void` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
create: (data: ApiTokenType, params: RequestParams = {}) => |
|
|
|
create: (data: ApiTokenReqType, params: RequestParams = {}) => |
|
|
|
this.request<void, any>({ |
|
|
|
this.request<void, any>({ |
|
|
|
path: `/api/v1/tokens`, |
|
|
|
path: `/api/v1/tokens`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
@ -1605,7 +1644,11 @@ export class Api< |
|
|
|
* @request PATCH:/api/v1/users/{userId} |
|
|
|
* @request PATCH:/api/v1/users/{userId} |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `void` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
update: (userId: string, data: UserType, params: RequestParams = {}) => |
|
|
|
update: ( |
|
|
|
|
|
|
|
userId: string, |
|
|
|
|
|
|
|
data: OrgUserReqType, |
|
|
|
|
|
|
|
params: RequestParams = {} |
|
|
|
|
|
|
|
) => |
|
|
|
this.request<void, any>({ |
|
|
|
this.request<void, any>({ |
|
|
|
path: `/api/v1/users/${userId}`, |
|
|
|
path: `/api/v1/users/${userId}`, |
|
|
|
method: 'PATCH', |
|
|
|
method: 'PATCH', |
|
|
@ -1903,18 +1946,13 @@ export class Api< |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* No description |
|
|
|
* No description |
|
|
|
*
|
|
|
|
* |
|
|
|
* @tags Project |
|
|
|
* @tags Project |
|
|
|
* @name SharedBaseCreate |
|
|
|
* @name SharedBaseCreate |
|
|
|
* @request POST:/api/v1/db/meta/projects/{projectId}/shared |
|
|
|
* @request POST:/api/v1/db/meta/projects/{projectId}/shared |
|
|
|
* @response `200` `{
|
|
|
|
* @response `200` `SharedBaseReqType` OK |
|
|
|
uuid?: string, |
|
|
|
*/ |
|
|
|
url?: string, |
|
|
|
|
|
|
|
roles?: string, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}` OK
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
sharedBaseCreate: ( |
|
|
|
sharedBaseCreate: ( |
|
|
|
projectId: string, |
|
|
|
projectId: string, |
|
|
|
data: { |
|
|
|
data: { |
|
|
@ -1923,14 +1961,7 @@ export class Api< |
|
|
|
}, |
|
|
|
}, |
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|
this.request< |
|
|
|
this.request<SharedBaseReqType, any>({ |
|
|
|
{ |
|
|
|
|
|
|
|
uuid?: string; |
|
|
|
|
|
|
|
url?: string; |
|
|
|
|
|
|
|
roles?: string; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
any |
|
|
|
|
|
|
|
>({ |
|
|
|
|
|
|
|
path: `/api/v1/db/meta/projects/${projectId}/shared`, |
|
|
|
path: `/api/v1/db/meta/projects/${projectId}/shared`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
body: data, |
|
|
|
body: data, |
|
|
@ -4353,14 +4384,7 @@ export class Api< |
|
|
|
* @request POST:/api/v1/db/meta/audits/comments |
|
|
|
* @request POST:/api/v1/db/meta/audits/comments |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `void` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
commentRow: ( |
|
|
|
commentRow: (data: CommentReqType, params: RequestParams = {}) => |
|
|
|
data: { |
|
|
|
|
|
|
|
row_id: string; |
|
|
|
|
|
|
|
fk_model_id: string; |
|
|
|
|
|
|
|
description?: string; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
params: RequestParams = {} |
|
|
|
|
|
|
|
) => |
|
|
|
|
|
|
|
this.request<void, any>({ |
|
|
|
this.request<void, any>({ |
|
|
|
path: `/api/v1/db/meta/audits/comments`, |
|
|
|
path: `/api/v1/db/meta/audits/comments`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
@ -4402,13 +4426,7 @@ export class Api< |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
auditRowUpdate: ( |
|
|
|
auditRowUpdate: ( |
|
|
|
rowId: string, |
|
|
|
rowId: string, |
|
|
|
data: { |
|
|
|
data: AuditRowUpdateReqType, |
|
|
|
fk_model_id?: string; |
|
|
|
|
|
|
|
column_name?: string; |
|
|
|
|
|
|
|
row_id?: string; |
|
|
|
|
|
|
|
value?: string; |
|
|
|
|
|
|
|
prev_value?: string; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|
this.request<void, any>({ |
|
|
|
this.request<void, any>({ |
|
|
@ -4833,15 +4851,7 @@ export class Api< |
|
|
|
* @response `400` `void` Bad Request |
|
|
|
* @response `400` `void` Bad Request |
|
|
|
* @response `401` `void` Unauthorized |
|
|
|
* @response `401` `void` Unauthorized |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
test: ( |
|
|
|
test: (data: PluginTestReqType, params: RequestParams = {}) => |
|
|
|
data: { |
|
|
|
|
|
|
|
id?: string; |
|
|
|
|
|
|
|
title?: string; |
|
|
|
|
|
|
|
input?: any; |
|
|
|
|
|
|
|
category?: string; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
params: RequestParams = {} |
|
|
|
|
|
|
|
) => |
|
|
|
|
|
|
|
this.request<any, void>({ |
|
|
|
this.request<any, void>({ |
|
|
|
path: `/api/v1/db/meta/plugins/test`, |
|
|
|
path: `/api/v1/db/meta/plugins/test`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
@ -4857,10 +4867,10 @@ export class Api< |
|
|
|
* @tags Plugin |
|
|
|
* @tags Plugin |
|
|
|
* @name Update |
|
|
|
* @name Update |
|
|
|
* @request PATCH:/api/v1/db/meta/plugins/{pluginId} |
|
|
|
* @request PATCH:/api/v1/db/meta/plugins/{pluginId} |
|
|
|
* @response `200` `PluginType` OK |
|
|
|
* @response `200` `PluginReqType` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
update: (pluginId: string, data: PluginType, params: RequestParams = {}) => |
|
|
|
update: (pluginId: string, data: PluginType, params: RequestParams = {}) => |
|
|
|
this.request<PluginType, any>({ |
|
|
|
this.request<PluginReqType, any>({ |
|
|
|
path: `/api/v1/db/meta/plugins/${pluginId}`, |
|
|
|
path: `/api/v1/db/meta/plugins/${pluginId}`, |
|
|
|
method: 'PATCH', |
|
|
|
method: 'PATCH', |
|
|
|
body: data, |
|
|
|
body: data, |
|
|
|