chore: update openapi document

This commit is contained in:
moonrailgun 2024-10-23 23:53:32 +08:00
parent 1df32dc257
commit e402ee1688
4 changed files with 211 additions and 68 deletions

View File

@ -47,7 +47,7 @@ export const OpenAPI: OpenAPIConfig = {
PASSWORD: undefined, PASSWORD: undefined,
TOKEN: undefined, TOKEN: undefined,
USERNAME: undefined, USERNAME: undefined,
VERSION: '1.15.7', VERSION: '1.16.1',
WITH_CREDENTIALS: false, WITH_CREDENTIALS: false,
interceptors: { interceptors: {
request: new Interceptors(), request: new Interceptors(),

View File

@ -120,10 +120,10 @@ export class WorkspaceService {
* @returns unknown Successful response * @returns unknown Successful response
* @throws ApiError * @throws ApiError
*/ */
public static workspaceDelete(data: $OpenApiTs['/workspace//{workspaceId}']['delete']['req']): CancelablePromise<$OpenApiTs['/workspace//{workspaceId}']['delete']['res'][200]> { public static workspaceDelete(data: $OpenApiTs['/workspace//{workspaceId}/del']['delete']['req']): CancelablePromise<$OpenApiTs['/workspace//{workspaceId}/del']['delete']['res'][200]> {
return __request(OpenAPI, { return __request(OpenAPI, {
method: 'DELETE', method: 'DELETE',
url: '/workspace//{workspaceId}', url: '/workspace//{workspaceId}/del',
path: { path: {
workspaceId: data.workspaceId workspaceId: data.workspaceId
} }
@ -146,6 +146,25 @@ export class WorkspaceService {
}); });
} }
/**
* @param data The data for the request.
* @param data.workspaceId
* @param data.requestBody
* @returns unknown Successful response
* @throws ApiError
*/
public static workspaceUpdateSettings(data: $OpenApiTs['/workspace//{workspaceId}/updateSettings']['post']['req']): CancelablePromise<$OpenApiTs['/workspace//{workspaceId}/updateSettings']['post']['res'][200]> {
return __request(OpenAPI, {
method: 'POST',
url: '/workspace//{workspaceId}/updateSettings',
path: {
workspaceId: data.workspaceId
},
body: data.requestBody,
mediaType: 'application/json'
});
}
/** /**
* @param data The data for the request. * @param data The data for the request.
* @param data.workspaceId * @param data.workspaceId
@ -585,28 +604,10 @@ export class MonitorService {
* @returns unknown Successful response * @returns unknown Successful response
* @throws ApiError * @throws ApiError
*/ */
public static monitorGet(data: $OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}']['get']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}']['get']['res'][200]> { public static monitorGet(data: $OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}/get']['get']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}/get']['get']['res'][200]> {
return __request(OpenAPI, { return __request(OpenAPI, {
method: 'GET', method: 'GET',
url: '/workspace/{workspaceId}/monitor/{monitorId}', url: '/workspace/{workspaceId}/monitor/{monitorId}/get',
path: {
workspaceId: data.workspaceId,
monitorId: data.monitorId
}
});
}
/**
* @param data The data for the request.
* @param data.workspaceId
* @param data.monitorId
* @returns unknown Successful response
* @throws ApiError
*/
public static monitorDelete(data: $OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}']['delete']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}']['delete']['res'][200]> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/workspace/{workspaceId}/monitor/{monitorId}',
path: { path: {
workspaceId: data.workspaceId, workspaceId: data.workspaceId,
monitorId: data.monitorId monitorId: data.monitorId
@ -648,6 +649,24 @@ export class MonitorService {
}); });
} }
/**
* @param data The data for the request.
* @param data.workspaceId
* @param data.monitorId
* @returns unknown Successful response
* @throws ApiError
*/
public static monitorDelete(data: $OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}/del']['delete']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}/del']['delete']['res'][200]> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/workspace/{workspaceId}/monitor/{monitorId}/del',
path: {
workspaceId: data.workspaceId,
monitorId: data.monitorId
}
});
}
/** /**
* @param data The data for the request. * @param data The data for the request.
* @param data.workspaceId * @param data.workspaceId
@ -715,6 +734,42 @@ export class MonitorService {
}); });
} }
/**
* @param data The data for the request.
* @param data.workspaceId
* @param data.monitorId
* @returns unknown Successful response
* @throws ApiError
*/
public static monitorPublicSummary(data: $OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}/publicSummary']['get']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}/publicSummary']['get']['res'][200]> {
return __request(OpenAPI, {
method: 'GET',
url: '/workspace/{workspaceId}/monitor/{monitorId}/publicSummary',
path: {
workspaceId: data.workspaceId,
monitorId: data.monitorId
}
});
}
/**
* @param data The data for the request.
* @param data.workspaceId
* @param data.monitorId
* @returns unknown Successful response
* @throws ApiError
*/
public static monitorPublicData(data: $OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}/publicData']['get']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/monitor/{monitorId}/publicData']['get']['res'][200]> {
return __request(OpenAPI, {
method: 'GET',
url: '/workspace/{workspaceId}/monitor/{monitorId}/publicData',
path: {
workspaceId: data.workspaceId,
monitorId: data.monitorId
}
});
}
/** /**
* @param data The data for the request. * @param data The data for the request.
* @param data.workspaceId * @param data.workspaceId
@ -1158,10 +1213,10 @@ export class SurveyService {
* @returns unknown Successful response * @returns unknown Successful response
* @throws ApiError * @throws ApiError
*/ */
public static surveyGet(data: $OpenApiTs['/workspace/{workspaceId}/survey/{surveyId}']['get']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/survey/{surveyId}']['get']['res'][200]> { public static surveyGet(data: $OpenApiTs['/workspace/{workspaceId}/survey/{surveyId}/get']['get']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/survey/{surveyId}/get']['get']['res'][200]> {
return __request(OpenAPI, { return __request(OpenAPI, {
method: 'GET', method: 'GET',
url: '/workspace/{workspaceId}/survey/{surveyId}', url: '/workspace/{workspaceId}/survey/{surveyId}/get',
path: { path: {
workspaceId: data.workspaceId, workspaceId: data.workspaceId,
surveyId: data.surveyId surveyId: data.surveyId
@ -1472,10 +1527,10 @@ export class FeedService {
* @returns unknown Successful response * @returns unknown Successful response
* @throws ApiError * @throws ApiError
*/ */
public static feedDeleteChannel(data: $OpenApiTs['/workspace/{workspaceId}/feed/{channelId}']['delete']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/feed/{channelId}']['delete']['res'][200]> { public static feedDeleteChannel(data: $OpenApiTs['/workspace/{workspaceId}/feed/{channelId}/del']['delete']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/feed/{channelId}/del']['delete']['res'][200]> {
return __request(OpenAPI, { return __request(OpenAPI, {
method: 'DELETE', method: 'DELETE',
url: '/workspace/{workspaceId}/feed/{channelId}', url: '/workspace/{workspaceId}/feed/{channelId}/del',
path: { path: {
workspaceId: data.workspaceId, workspaceId: data.workspaceId,
channelId: data.channelId channelId: data.channelId

View File

@ -49,6 +49,9 @@ export type $OpenApiTs = {
workspace: { workspace: {
id: string; id: string;
name: string; name: string;
settings: {
[key: string]: unknown;
};
}; };
}>; }>;
}; };
@ -85,6 +88,9 @@ export type $OpenApiTs = {
workspace: { workspace: {
id: string; id: string;
name: string; name: string;
settings: {
[key: string]: unknown;
};
}; };
}>; }>;
}; };
@ -122,6 +128,9 @@ export type $OpenApiTs = {
workspace: { workspace: {
id: string; id: string;
name: string; name: string;
settings: {
[key: string]: unknown;
};
}; };
}>; }>;
}; };
@ -157,6 +166,9 @@ export type $OpenApiTs = {
workspace: { workspace: {
id: string; id: string;
name: string; name: string;
settings: {
[key: string]: unknown;
};
}; };
}>; }>;
}; };
@ -190,6 +202,9 @@ export type $OpenApiTs = {
workspace: { workspace: {
id: string; id: string;
name: string; name: string;
settings: {
[key: string]: unknown;
};
}; };
}>; }>;
}; };
@ -211,11 +226,14 @@ export type $OpenApiTs = {
200: { 200: {
id: string; id: string;
name: string; name: string;
settings: {
[key: string]: unknown;
}; };
}; };
}; };
}; };
'/workspace//{workspaceId}': { };
'/workspace//{workspaceId}/del': {
delete: { delete: {
req: { req: {
workspaceId: string; workspaceId: string;
@ -253,6 +271,30 @@ export type $OpenApiTs = {
}; };
}; };
}; };
'/workspace//{workspaceId}/updateSettings': {
post: {
req: {
requestBody: {
settings: {
[key: string]: unknown;
};
};
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
id: string;
name: string;
settings: {
[key: string]: unknown;
};
};
};
};
};
'/workspace//{workspaceId}/invite': { '/workspace//{workspaceId}/invite': {
post: { post: {
req: { req: {
@ -692,7 +734,7 @@ export type $OpenApiTs = {
}; };
}; };
}; };
'/workspace/{workspaceId}/monitor/{monitorId}': { '/workspace/{workspaceId}/monitor/{monitorId}/get': {
get: { get: {
req: { req: {
monitorId: string; monitorId: string;
@ -722,9 +764,43 @@ export type $OpenApiTs = {
} | null; } | null;
}; };
}; };
delete: { };
'/monitor/getPublicInfo': {
post: {
req: { req: {
monitorId: string; requestBody: {
monitorIds: Array<(string)>;
};
};
res: {
/**
* Successful response
*/
200: Array<{
id: string;
name: string;
type: string;
trendingMode: boolean;
}>;
};
};
};
'/workspace/{workspaceId}/monitor/upsert': {
post: {
req: {
requestBody: {
id?: string;
name: string;
type: string;
active?: boolean;
interval?: number;
maxRetries?: number;
trendingMode?: boolean;
notificationIds?: Array<(string)>;
payload: {
[key: string]: unknown;
};
};
workspaceId: string; workspaceId: string;
}; };
res: { res: {
@ -749,41 +825,10 @@ export type $OpenApiTs = {
}; };
}; };
}; };
'/monitor/getPublicInfo': { '/workspace/{workspaceId}/monitor/{monitorId}/del': {
post: { delete: {
req: { req: {
requestBody: { monitorId: string;
monitorIds: Array<(string)>;
};
};
res: {
/**
* Successful response
*/
200: Array<{
id: string;
name: string;
type: string;
}>;
};
};
};
'/workspace/{workspaceId}/monitor/upsert': {
post: {
req: {
requestBody: {
id?: string;
name: string;
type: string;
active?: boolean;
interval?: number;
maxRetries?: number;
trendingMode?: boolean;
notificationIds?: Array<(string)>;
payload: {
[key: string]: unknown;
};
};
workspaceId: string; workspaceId: string;
}; };
res: { res: {
@ -876,6 +921,42 @@ export type $OpenApiTs = {
}; };
}; };
}; };
'/workspace/{workspaceId}/monitor/{monitorId}/publicSummary': {
get: {
req: {
monitorId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: Array<{
day: string;
totalCount: number;
upCount: number;
upRate: number;
}>;
};
};
};
'/workspace/{workspaceId}/monitor/{monitorId}/publicData': {
get: {
req: {
monitorId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: Array<{
value: number;
createdAt: string;
}>;
};
};
};
'/workspace/{workspaceId}/monitor/{monitorId}/dataMetrics': { '/workspace/{workspaceId}/monitor/{monitorId}/dataMetrics': {
get: { get: {
req: { req: {
@ -1384,13 +1465,14 @@ export type $OpenApiTs = {
}; };
feedChannelIds: Array<(string)>; feedChannelIds: Array<(string)>;
feedTemplate: string; feedTemplate: string;
webhookUrl: string;
createdAt: string; createdAt: string;
updatedAt: string; updatedAt: string;
}>; }>;
}; };
}; };
}; };
'/workspace/{workspaceId}/survey/{surveyId}': { '/workspace/{workspaceId}/survey/{surveyId}/get': {
get: { get: {
req: { req: {
surveyId: string; surveyId: string;
@ -1414,6 +1496,7 @@ export type $OpenApiTs = {
}; };
feedChannelIds: Array<(string)>; feedChannelIds: Array<(string)>;
feedTemplate: string; feedTemplate: string;
webhookUrl: string;
createdAt: string; createdAt: string;
updatedAt: string; updatedAt: string;
} | null; } | null;
@ -1499,6 +1582,7 @@ export type $OpenApiTs = {
}; };
feedChannelIds: Array<(string)>; feedChannelIds: Array<(string)>;
feedTemplate: string; feedTemplate: string;
webhookUrl: string;
}; };
workspaceId: string; workspaceId: string;
}; };
@ -1520,6 +1604,7 @@ export type $OpenApiTs = {
}; };
feedChannelIds: Array<(string)>; feedChannelIds: Array<(string)>;
feedTemplate: string; feedTemplate: string;
webhookUrl: string;
createdAt: string; createdAt: string;
updatedAt: string; updatedAt: string;
}; };
@ -1541,6 +1626,7 @@ export type $OpenApiTs = {
}; };
feedChannelIds?: Array<(string)>; feedChannelIds?: Array<(string)>;
feedTemplate?: string; feedTemplate?: string;
webhookUrl?: string;
}; };
surveyId: string; surveyId: string;
workspaceId: string; workspaceId: string;
@ -1563,6 +1649,7 @@ export type $OpenApiTs = {
}; };
feedChannelIds: Array<(string)>; feedChannelIds: Array<(string)>;
feedTemplate: string; feedTemplate: string;
webhookUrl: string;
createdAt: string; createdAt: string;
updatedAt: string; updatedAt: string;
}; };
@ -1593,6 +1680,7 @@ export type $OpenApiTs = {
}; };
feedChannelIds: Array<(string)>; feedChannelIds: Array<(string)>;
feedTemplate: string; feedTemplate: string;
webhookUrl: string;
createdAt: string; createdAt: string;
updatedAt: string; updatedAt: string;
}; };
@ -1820,7 +1908,7 @@ export type $OpenApiTs = {
}; };
}; };
}; };
'/workspace/{workspaceId}/feed/{channelId}': { '/workspace/{workspaceId}/feed/{channelId}/del': {
delete: { delete: {
req: { req: {
channelId: string; channelId: string;

File diff suppressed because one or more lines are too long