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