|
|
@ -11,13 +11,16 @@ |
|
|
|
|
|
|
|
|
|
|
|
export interface UserType { |
|
|
|
export interface UserType { |
|
|
|
/** Unique identifier for the given user. */ |
|
|
|
/** Unique identifier for the given user. */ |
|
|
|
id: number; |
|
|
|
id: string; |
|
|
|
firstname: string; |
|
|
|
firstname: string; |
|
|
|
lastname: string; |
|
|
|
lastname: string; |
|
|
|
|
|
|
|
|
|
|
|
/** @format email */ |
|
|
|
/** @format email */ |
|
|
|
email: string; |
|
|
|
email: string; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @format email */ |
|
|
|
|
|
|
|
roles?: string; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @format date |
|
|
|
* @format date |
|
|
|
* @example 1997-10-31 |
|
|
|
* @example 1997-10-31 |
|
|
@ -127,6 +130,7 @@ export interface ViewType { |
|
|
|
order?: number; |
|
|
|
order?: number; |
|
|
|
fk_model_id?: string; |
|
|
|
fk_model_id?: string; |
|
|
|
slug?: string; |
|
|
|
slug?: string; |
|
|
|
|
|
|
|
show_system_fields?: boolean; |
|
|
|
lock_type?: 'collaborative' | 'locked' | 'personal'; |
|
|
|
lock_type?: 'collaborative' | 'locked' | 'personal'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -436,7 +440,7 @@ export interface SharedViewListType { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ViewListType { |
|
|
|
export interface ViewListType { |
|
|
|
list?: GridType | FormType | KanbanType | GalleryType; |
|
|
|
list?: ViewType[]; |
|
|
|
pageInfo?: PaginatedType; |
|
|
|
pageInfo?: PaginatedType; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -661,10 +665,7 @@ export interface FullRequestParams |
|
|
|
body?: unknown; |
|
|
|
body?: unknown; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export type RequestParams = Omit< |
|
|
|
export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'path'>; |
|
|
|
FullRequestParams, |
|
|
|
|
|
|
|
'body' | 'method' | 'query' | 'path' |
|
|
|
|
|
|
|
>; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface ApiConfig<SecurityDataType = unknown> |
|
|
|
export interface ApiConfig<SecurityDataType = unknown> |
|
|
|
extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> { |
|
|
|
extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> { |
|
|
@ -1271,10 +1272,10 @@ export class Api< |
|
|
|
* @tags Project |
|
|
|
* @tags Project |
|
|
|
* @name SharedBaseGet |
|
|
|
* @name SharedBaseGet |
|
|
|
* @request GET:/api/v1/db/meta/projects/{projectId}/shared |
|
|
|
* @request GET:/api/v1/db/meta/projects/{projectId}/shared |
|
|
|
* @response `200` `{ uuid?: string, url?: string }` OK |
|
|
|
* @response `200` `{ uuid?: string, url?: string, roles?: string }` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
sharedBaseGet: (projectId: string, params: RequestParams = {}) => |
|
|
|
sharedBaseGet: (projectId: string, params: RequestParams = {}) => |
|
|
|
this.request<{ uuid?: string; url?: string }, any>({ |
|
|
|
this.request<{ uuid?: string; url?: string; roles?: string }, any>({ |
|
|
|
path: `/api/v1/db/meta/projects/${projectId}/shared`, |
|
|
|
path: `/api/v1/db/meta/projects/${projectId}/shared`, |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
|
format: 'json', |
|
|
|
format: 'json', |
|
|
@ -1302,14 +1303,14 @@ export class Api< |
|
|
|
* @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` `{ url?: string, uuid?: string }` OK |
|
|
|
* @response `200` `{ uuid?: string, url?: string, roles?: string }` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
sharedBaseCreate: ( |
|
|
|
sharedBaseCreate: ( |
|
|
|
projectId: string, |
|
|
|
projectId: string, |
|
|
|
data: { roles?: string; password?: string }, |
|
|
|
data: { roles?: string; password?: string }, |
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|
this.request<{ url?: string; uuid?: string }, any>({ |
|
|
|
this.request<{ 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, |
|
|
@ -1324,18 +1325,19 @@ export class Api< |
|
|
|
* @tags Project |
|
|
|
* @tags Project |
|
|
|
* @name SharedBaseUpdate |
|
|
|
* @name SharedBaseUpdate |
|
|
|
* @request PATCH:/api/v1/db/meta/projects/{projectId}/shared |
|
|
|
* @request PATCH:/api/v1/db/meta/projects/{projectId}/shared |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `{ uuid?: string, url?: string, roles?: string }` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
sharedBaseUpdate: ( |
|
|
|
sharedBaseUpdate: ( |
|
|
|
projectId: string, |
|
|
|
projectId: string, |
|
|
|
data: { roles?: string; password?: string }, |
|
|
|
data: { roles?: string; password?: string }, |
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|
this.request<void, any>({ |
|
|
|
this.request<{ uuid?: string; url?: string; roles?: string }, any>({ |
|
|
|
path: `/api/v1/db/meta/projects/${projectId}/shared`, |
|
|
|
path: `/api/v1/db/meta/projects/${projectId}/shared`, |
|
|
|
method: 'PATCH', |
|
|
|
method: 'PATCH', |
|
|
|
body: data, |
|
|
|
body: data, |
|
|
|
type: ContentType.Json, |
|
|
|
type: ContentType.Json, |
|
|
|
|
|
|
|
format: 'json', |
|
|
|
...params, |
|
|
|
...params, |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|