Browse Source

chore(nocodb-sdk): reformat API.ts

pull/4170/head
Wing-Kam Wong 2 years ago
parent
commit
1104e1b994
  1. 557
      packages/nocodb-sdk/src/lib/Api.ts

557
packages/nocodb-sdk/src/lib/Api.ts

@ -14,22 +14,17 @@ export interface UserType {
id: string;
firstname: string;
lastname: string;
/** @format email */
email: string;
/** @format email */
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
@ -44,7 +39,10 @@ export interface PageReqQueryParamsType {
}
export interface UserListType {
users: { list: UserType; pageInfo: PaginatedType };
users: {
list: UserType;
pageInfo: PaginatedType;
};
}
export interface ProjectReqType {
@ -101,7 +99,10 @@ export interface BaseReqType {
}
export interface BaseListType {
bases: { list: BaseType[]; pageInfo: PaginatedType };
bases: {
list: BaseType[];
pageInfo: PaginatedType;
};
}
export interface TableType {
@ -187,7 +188,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;
@ -198,7 +199,9 @@ export interface FilterType {
}
export interface FilterListType {
filters: { list: FilterType[] };
filters: {
list: FilterType[];
};
}
export interface SortType {
@ -212,7 +215,9 @@ export interface SortType {
}
export interface SortListType {
sorts: { list: SharedViewType[] };
sorts: {
list: SharedViewType[];
};
}
export interface ColumnType {
@ -256,7 +261,9 @@ export interface ColumnType {
}
export interface ColumnListType {
columns: { list: ColumnType[] };
columns: {
list: ColumnType[];
};
}
export interface LinkToAnotherRecordType {
@ -641,7 +648,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;
@ -826,16 +838,32 @@ export class Api<
* @name Signup
* @summary Signup
* @request POST:/api/v1/auth/user/signup
* @response `200` `{ token?: string }` OK
* @response `400` `{ msg?: string }` Bad Request
* @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,
@ -850,14 +878,30 @@ export class Api<
* @name Signin
* @summary Signin
* @request POST:/api/v1/auth/user/signin
* @response `200` `{ token?: string }` OK
* @response `400` `{ msg?: string }` Bad Request
* @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,
@ -875,7 +919,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<UserInfoType, any>({
path: `/api/v1/auth/user/me`,
method: 'GET',
@ -894,7 +944,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<void, void>({
path: `/api/v1/auth/password/forgot`,
method: 'POST',
@ -910,14 +965,30 @@ export class Api<
* @name PasswordChange
* @summary Password change
* @request POST:/api/v1/auth/password/change
* @response `200` `{ msg?: string }` OK
* @response `400` `{ msg?: string }` Bad request
* @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,
@ -969,7 +1040,9 @@ export class Api<
*/
passwordReset: (
token: string,
data: { new_password?: string },
data: {
new_password?: string;
},
params: RequestParams = {}
) =>
this.request<void, any>({
@ -1003,11 +1076,23 @@ export class Api<
* @name ProjectUserList
* @summary Project users
* @request GET:/api/v1/db/meta/projects/{projectId}/users
* @response `200` `{ users?: { list: (UserType)[], pageInfo: PaginatedType } }` OK
* @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`,
@ -1112,7 +1197,17 @@ export class Api<
* @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
* @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<
@ -1146,7 +1241,9 @@ export class Api<
*/
modelVisibilityList: (
projectId: string,
query?: { includeM2M?: boolean },
query?: {
includeM2M?: boolean;
},
params: RequestParams = {}
) =>
this.request<any[], any>({
@ -1189,7 +1286,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<ProjectListType, any>({
@ -1209,7 +1310,9 @@ export class Api<
* @response `200` `ProjectType` OK
*/
create: (
data: ProjectType & { external?: boolean },
data: ProjectType & {
external?: boolean;
},
params: RequestParams = {}
) =>
this.request<ProjectType, any>({
@ -1278,10 +1381,22 @@ export class Api<
* @tags Project
* @name SharedBaseGet
* @request GET:/api/v1/db/meta/projects/{projectId}/shared
* @response `200` `{ uuid?: string, url?: string, roles?: string }` OK
* @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',
@ -1309,14 +1424,29 @@ export class Api<
* @tags Project
* @name SharedBaseCreate
* @request POST:/api/v1/db/meta/projects/{projectId}/shared
* @response `200` `{ uuid?: string, url?: string, roles?: string }` OK
* @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,
@ -1331,14 +1461,29 @@ export class Api<
* @tags Project
* @name SharedBaseUpdate
* @request PATCH:/api/v1/db/meta/projects/{projectId}/shared
* @response `200` `{ uuid?: string, url?: string, roles?: string }` OK
* @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,
@ -1402,14 +1547,27 @@ export class Api<
* @tags Project
* @name AuditList
* @request GET:/api/v1/db/meta/projects/{projectId}/audits
* @response `200` `{ list: (AuditType)[], pageInfo: PaginatedType }` OK
* @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,
@ -1491,7 +1649,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<any, any>({
@ -1528,7 +1689,9 @@ export class Api<
*/
reorder: (
tableId: string,
data: { order?: number },
data: {
order?: number;
},
params: RequestParams = {}
) =>
this.request<void, any>({
@ -1682,7 +1845,9 @@ export class Api<
*/
showAllColumn: (
viewId: string,
query?: { ignoreIds?: any[] },
query?: {
ignoreIds?: any[];
},
params: RequestParams = {}
) =>
this.request<void, any>({
@ -1702,7 +1867,9 @@ export class Api<
*/
hideAllColumn: (
viewId: string,
query?: { ignoreIds?: any[] },
query?: {
ignoreIds?: any[];
},
params: RequestParams = {}
) =>
this.request<void, any>({
@ -1983,10 +2150,18 @@ export class Api<
* @tags DB view share
* @name Create
* @request POST:/api/v1/db/meta/views/{viewId}/share
* @response `200` `{ uuid?: string }` OK
* @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',
@ -2003,7 +2178,10 @@ export class Api<
*/
update: (
viewId: string,
data: { password?: string; meta?: any },
data: {
password?: string;
meta?: any;
},
params: RequestParams = {}
) =>
this.request<SharedViewType, any>({
@ -2091,10 +2269,23 @@ export class Api<
* @tags DB table sort
* @name List
* @request GET:/api/v1/db/meta/views/{viewId}/sorts
* @response `200` `{ sorts?: { list?: (SortType)[] } }` OK
* @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',
@ -2367,7 +2558,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<any, any>({
@ -2392,6 +2587,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;
@ -2422,7 +2618,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<any, any>({
@ -2617,7 +2819,9 @@ export class Api<
projectName: string,
tableName: string,
data: any,
query?: { where?: string },
query?: {
where?: string;
},
params: RequestParams = {}
) =>
this.request<any, any>({
@ -2644,7 +2848,9 @@ export class Api<
projectName: string,
tableName: string,
data: any,
query?: { where?: string },
query?: {
where?: string;
},
params: RequestParams = {}
) =>
this.request<any, any>({
@ -2728,7 +2934,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<any, any>({
@ -2812,7 +3021,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<any, any>({
@ -2837,7 +3052,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<any, any>({
@ -2888,7 +3109,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<any, any>({
@ -2914,6 +3141,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;
@ -2944,7 +3172,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<any, any>({
@ -3089,7 +3321,10 @@ export class Api<
groupedDataList: (
sharedViewUuid: string,
columnId: string,
query?: { limit?: string; offset?: string },
query?: {
limit?: string;
offset?: string;
},
params: RequestParams = {}
) =>
this.request<any, any>({
@ -3110,7 +3345,10 @@ export class Api<
*/
dataList: (
sharedViewUuid: string,
query?: { limit?: string; offset?: string },
query?: {
limit?: string;
offset?: string;
},
params: RequestParams = {}
) =>
this.request<any, any>({
@ -3156,7 +3394,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<any, any>({
@ -3198,7 +3439,10 @@ export class Api<
dataRelationList: (
sharedViewUuid: string,
columnName: string,
query?: { limit?: string; offset?: string },
query?: {
limit?: string;
offset?: string;
},
params: RequestParams = {}
) =>
this.request<any, any>({
@ -3215,10 +3459,18 @@ export class Api<
* @tags Public
* @name SharedBaseGet
* @request GET:/api/v1/db/public/shared-base/{sharedBaseUuid}/meta
* @response `200` `{ project_id?: string }` OK
* @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',
@ -3231,7 +3483,16 @@ export class Api<
* @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
* @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<
@ -3241,7 +3502,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`,
@ -3260,7 +3523,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<any, any>({
@ -3280,7 +3547,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<void, any>({
@ -3300,7 +3571,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<any, any>({
@ -3344,10 +3618,20 @@ export class Api<
* @tags Utils
* @name TestConnection
* @request POST:/api/v1/db/meta/connection/test
* @response `200` `{ code?: number, message?: string }` OK
* @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,
@ -3444,14 +3728,53 @@ export class Api<
* @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
* @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;
@ -3469,7 +3792,9 @@ export class Api<
webhookCount?: number;
filterCount?: number;
sortCount?: number;
rowCount?: { TotalRecords?: string }[];
rowCount?: {
TotalRecords?: string;
}[];
userCount?: number;
}[];
userCount?: number;
@ -3520,10 +3845,20 @@ export class Api<
* @tags DB table webhook
* @name List
* @request GET:/api/v1/db/meta/tables/{tableId}/hooks
* @response `200` `{ list: (HookType)[], pageInfo: PaginatedType }` OK
* @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',
@ -3558,7 +3893,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<any, any>({
@ -3576,7 +3917,14 @@ export class Api<
* @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
* @response `200` `{
plugins?: {
list: (PluginType)[],
pageInfo: PaginatedType,
},
}` OK
*/
samplePayloadGet: (
tableId: string,
@ -3584,7 +3932,12 @@ export class Api<
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}`,
@ -3633,10 +3986,20 @@ export class Api<
* @tags Plugin
* @name List
* @request GET:/api/v1/db/meta/plugins
* @response `200` `{ list?: (PluginType)[], pageInfo?: PaginatedType }` OK
* @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',
@ -3670,7 +4033,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<any, void>({
@ -3745,7 +4113,9 @@ export class Api<
*/
create: (
projectId: string,
data: { description?: string },
data: {
description?: string;
},
params: RequestParams = {}
) =>
this.request<void, any>({
@ -3781,8 +4151,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<any, any>({
@ -3803,7 +4178,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;

Loading…
Cancel
Save