diff --git a/packages/client-sdk/src/open/client/core/OpenAPI.ts b/packages/client-sdk/src/open/client/core/OpenAPI.ts index 5183e0c..bd17274 100644 --- a/packages/client-sdk/src/open/client/core/OpenAPI.ts +++ b/packages/client-sdk/src/open/client/core/OpenAPI.ts @@ -47,7 +47,7 @@ export const OpenAPI: OpenAPIConfig = { PASSWORD: undefined, TOKEN: undefined, USERNAME: undefined, - VERSION: '1.11.4', + VERSION: '1.13.1', WITH_CREDENTIALS: false, interceptors: { request: new Interceptors(), diff --git a/packages/client-sdk/src/open/client/services.gen.ts b/packages/client-sdk/src/open/client/services.gen.ts index bb69944..e9b9d92 100644 --- a/packages/client-sdk/src/open/client/services.gen.ts +++ b/packages/client-sdk/src/open/client/services.gen.ts @@ -54,16 +54,118 @@ export class UserService { } export class WorkspaceService { + /** + * @param data The data for the request. + * @param data.requestBody + * @returns unknown Successful response + * @throws ApiError + */ + public static workspaceCreate(data: $OpenApiTs['/workspace//create']['post']['req']): CancelablePromise<$OpenApiTs['/workspace//create']['post']['res'][200]> { + return __request(OpenAPI, { + method: 'POST', + url: '/workspace//create', + body: data.requestBody, + mediaType: 'application/json' + }); + } + + /** + * @param data The data for the request. + * @param data.requestBody + * @returns unknown Successful response + * @throws ApiError + */ + public static workspaceSwitch(data: $OpenApiTs['/workspace//switch']['post']['req']): CancelablePromise<$OpenApiTs['/workspace//switch']['post']['res'][200]> { + return __request(OpenAPI, { + method: 'POST', + url: '/workspace//switch', + body: data.requestBody, + mediaType: 'application/json' + }); + } + /** * @param data The data for the request. * @param data.workspaceId * @returns unknown Successful response * @throws ApiError */ - public static workspaceGetServiceCount(data: $OpenApiTs['/workspace/{workspaceId}/getServiceCount']['get']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/getServiceCount']['get']['res'][200]> { + public static workspaceDelete(data: $OpenApiTs['/workspace//{workspaceId}']['delete']['req']): CancelablePromise<$OpenApiTs['/workspace//{workspaceId}']['delete']['res'][200]> { + return __request(OpenAPI, { + method: 'DELETE', + url: '/workspace//{workspaceId}', + path: { + workspaceId: data.workspaceId + } + }); + } + + /** + * @param data The data for the request. + * @param data.workspaceId + * @returns unknown Successful response + * @throws ApiError + */ + public static workspaceMembers(data: $OpenApiTs['/workspace//{workspaceId}/members']['get']['req']): CancelablePromise<$OpenApiTs['/workspace//{workspaceId}/members']['get']['res'][200]> { return __request(OpenAPI, { method: 'GET', - url: '/workspace/{workspaceId}/getServiceCount', + url: '/workspace//{workspaceId}/members', + path: { + workspaceId: data.workspaceId + } + }); + } + + /** + * @param data The data for the request. + * @param data.workspaceId + * @param data.requestBody + * @returns unknown Successful response + * @throws ApiError + */ + public static workspaceInvite(data: $OpenApiTs['/workspace//{workspaceId}/invite']['post']['req']): CancelablePromise<$OpenApiTs['/workspace//{workspaceId}/invite']['post']['res'][200]> { + return __request(OpenAPI, { + method: 'POST', + url: '/workspace//{workspaceId}/invite', + path: { + workspaceId: data.workspaceId + }, + body: data.requestBody, + mediaType: 'application/json' + }); + } + + /** + * Administrator kicks a user out of a workspace. + * @param data The data for the request. + * @param data.workspaceId + * @param data.targetUserId + * @returns unknown Successful response + * @throws ApiError + */ + public static workspaceTick(data: $OpenApiTs['/workspace//{workspaceId}/tick']['delete']['req']): CancelablePromise<$OpenApiTs['/workspace//{workspaceId}/tick']['delete']['res'][200]> { + return __request(OpenAPI, { + method: 'DELETE', + url: '/workspace//{workspaceId}/tick', + path: { + workspaceId: data.workspaceId + }, + query: { + targetUserId: data.targetUserId + } + }); + } + + /** + * @param data The data for the request. + * @param data.workspaceId + * @returns unknown Successful response + * @throws ApiError + */ + public static workspaceGetServiceCount(data: $OpenApiTs['/workspace//{workspaceId}/getServiceCount']['get']['req']): CancelablePromise<$OpenApiTs['/workspace//{workspaceId}/getServiceCount']['get']['res'][200]> { + return __request(OpenAPI, { + method: 'GET', + url: '/workspace//{workspaceId}/getServiceCount', path: { workspaceId: data.workspaceId } @@ -998,10 +1100,11 @@ export class SurveyService { * @param data.workspaceId * @param data.surveyId * @param data.requestBody - * @returns unknown Successful response + * @returns string Successful response + * @returns unknown Error response * @throws ApiError */ - public static surveySubmit(data: $OpenApiTs['/workspace/{workspaceId}/survey/{surveyId}/submit']['post']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/survey/{surveyId}/submit']['post']['res'][200]> { + public static surveySubmit(data: $OpenApiTs['/workspace/{workspaceId}/survey/{surveyId}/submit']['post']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/survey/{surveyId}/submit']['post']['res'][200] | $OpenApiTs['/workspace/{workspaceId}/survey/{surveyId}/submit']['post']['res'][200]> { return __request(OpenAPI, { method: 'POST', url: '/workspace/{workspaceId}/survey/{surveyId}/submit', @@ -1305,4 +1408,22 @@ export class FeedService { }); } + /** + * integrate with tencent-cloud webhook + * @param data The data for the request. + * @param data.channelId + * @returns string Successful response + * @returns unknown Error response + * @throws ApiError + */ + public static feedIntegrationTencentCloudAlarm(data: $OpenApiTs['/feed/{channelId}/tencent-cloud/alarm']['post']['req']): CancelablePromise<$OpenApiTs['/feed/{channelId}/tencent-cloud/alarm']['post']['res'][200] | $OpenApiTs['/feed/{channelId}/tencent-cloud/alarm']['post']['res'][200]> { + return __request(OpenAPI, { + method: 'POST', + url: '/feed/{channelId}/tencent-cloud/alarm', + path: { + channelId: data.channelId + } + }); + } + } \ No newline at end of file diff --git a/packages/client-sdk/src/open/client/types.gen.ts b/packages/client-sdk/src/open/client/types.gen.ts index ca940c5..d1a2972 100644 --- a/packages/client-sdk/src/open/client/types.gen.ts +++ b/packages/client-sdk/src/open/client/types.gen.ts @@ -15,6 +15,7 @@ export type $OpenApiTs = { alphaMode: boolean; disableAnonymousTelemetry: boolean; customTrackerScriptName?: string; + authProvider: Array<(string)>; }; }; }; @@ -33,21 +34,18 @@ export type $OpenApiTs = { */ 200: { info: { - username: string; id: string; role: string; + username: string; + nickname: string | null; + avatar: string | null; + email: string | null; createdAt: string; updatedAt: string; deletedAt: string | null; currentWorkspace: { id: string; name: string; - dashboardLayout: { - layouts: { - [key: string]: (unknown[]); - }; - items: unknown[]; - } | null; }; workspaces: Array<{ role: string; @@ -75,21 +73,18 @@ export type $OpenApiTs = { */ 200: { info: { - username: string; id: string; role: string; + username: string; + nickname: string | null; + avatar: string | null; + email: string | null; createdAt: string; updatedAt: string; deletedAt: string | null; currentWorkspace: { id: string; name: string; - dashboardLayout: { - layouts: { - [key: string]: (unknown[]); - }; - items: unknown[]; - } | null; }; workspaces: Array<{ role: string; @@ -104,7 +99,147 @@ export type $OpenApiTs = { }; }; }; - '/workspace/{workspaceId}/getServiceCount': { + '/workspace//create': { + post: { + req: { + requestBody: { + name: string; + }; + }; + res: { + /** + * Successful response + */ + 200: { + id: string; + role: string; + username: string; + nickname: string | null; + avatar: string | null; + email: string | null; + createdAt: string; + updatedAt: string; + deletedAt: string | null; + currentWorkspace: { + id: string; + name: string; + }; + workspaces: Array<{ + role: string; + workspace: { + id: string; + name: string; + }; + }>; + }; + }; + }; + }; + '/workspace//switch': { + post: { + req: { + requestBody: { + workspaceId: string; + }; + }; + res: { + /** + * Successful response + */ + 200: { + id: string; + role: string; + username: string; + nickname: string | null; + avatar: string | null; + email: string | null; + createdAt: string; + updatedAt: string; + deletedAt: string | null; + currentWorkspace: { + id: string; + name: string; + }; + workspaces: Array<{ + role: string; + workspace: { + id: string; + name: string; + }; + }>; + }; + }; + }; + }; + '/workspace//{workspaceId}': { + delete: { + req: { + workspaceId: string; + }; + res: { + /** + * Successful response + */ + 200: unknown; + }; + }; + }; + '/workspace//{workspaceId}/members': { + get: { + req: { + workspaceId: string; + }; + res: { + /** + * Successful response + */ + 200: Array<{ + userId: string; + workspaceId: string; + role: string; + createdAt: string; + updatedAt: string; + user: { + username: string; + nickname: string | null; + email: string | null; + emailVerified: string | null; + }; + }>; + }; + }; + }; + '/workspace//{workspaceId}/invite': { + post: { + req: { + requestBody: { + targetUserEmail: string; + }; + workspaceId: string; + }; + res: { + /** + * Successful response + */ + 200: unknown; + }; + }; + }; + '/workspace//{workspaceId}/tick': { + delete: { + req: { + targetUserId: string; + workspaceId: string; + }; + res: { + /** + * Successful response + */ + 200: unknown; + }; + }; + }; + '/workspace//{workspaceId}/getServiceCount': { get: { req: { workspaceId: string; @@ -1095,6 +1230,8 @@ export type $OpenApiTs = { options?: Array<(string)>; }>; }; + feedChannelIds: Array<(string)>; + feedTemplate: string; createdAt: string; updatedAt: string; }>; @@ -1123,6 +1260,8 @@ export type $OpenApiTs = { options?: Array<(string)>; }>; }; + feedChannelIds: Array<(string)>; + feedTemplate: string; createdAt: string; updatedAt: string; } | null; @@ -1181,9 +1320,15 @@ export type $OpenApiTs = { }; res: { /** - * Successful response + * Error response */ - 200: unknown; + 200: { + message: string; + code: string; + issues?: Array<{ + message: string; + }>; + }; }; }; }; @@ -1200,6 +1345,8 @@ export type $OpenApiTs = { options?: Array<(string)>; }>; }; + feedChannelIds: Array<(string)>; + feedTemplate: string; }; workspaceId: string; }; @@ -1219,6 +1366,8 @@ export type $OpenApiTs = { options?: Array<(string)>; }>; }; + feedChannelIds: Array<(string)>; + feedTemplate: string; createdAt: string; updatedAt: string; }; @@ -1238,6 +1387,8 @@ export type $OpenApiTs = { options?: Array<(string)>; }>; }; + feedChannelIds?: Array<(string)>; + feedTemplate?: string; }; surveyId: string; workspaceId: string; @@ -1258,6 +1409,8 @@ export type $OpenApiTs = { options?: Array<(string)>; }>; }; + feedChannelIds: Array<(string)>; + feedTemplate: string; createdAt: string; updatedAt: string; }; @@ -1286,6 +1439,8 @@ export type $OpenApiTs = { options?: Array<(string)>; }>; }; + feedChannelIds: Array<(string)>; + feedTemplate: string; createdAt: string; updatedAt: string; }; @@ -1372,6 +1527,8 @@ export type $OpenApiTs = { websiteAcceptedCount: number; websiteEventCount: number; monitorExecutionCount: number; + surveyCount: number; + feedEventCount: number; }; }; }; @@ -1389,7 +1546,7 @@ export type $OpenApiTs = { id: string; workspaceId: string; name: string; - notifyFrequency: string; + notifyFrequency: 'none' | 'event' | 'day' | 'week' | 'month'; createdAt: string; updatedAt: string; _count: { @@ -1414,7 +1571,7 @@ export type $OpenApiTs = { id: string; workspaceId: string; name: string; - notifyFrequency: string; + notifyFrequency: 'none' | 'event' | 'day' | 'week' | 'month'; createdAt: string; updatedAt: string; } | null; @@ -1428,7 +1585,7 @@ export type $OpenApiTs = { requestBody: { notificationIds?: Array<(string)>; name: string; - notifyFrequency: string; + notifyFrequency: 'none' | 'event' | 'day' | 'week' | 'month'; }; workspaceId: string; }; @@ -1441,7 +1598,7 @@ export type $OpenApiTs = { id: string; workspaceId: string; name: string; - notifyFrequency: string; + notifyFrequency: 'none' | 'event' | 'day' | 'week' | 'month'; createdAt: string; updatedAt: string; } | null; @@ -1485,7 +1642,7 @@ export type $OpenApiTs = { req: { requestBody: { name: string; - notifyFrequency: string; + notifyFrequency: 'none' | 'event' | 'day' | 'week' | 'month'; notificationIds?: Array<(string)>; }; workspaceId: string; @@ -1499,7 +1656,7 @@ export type $OpenApiTs = { id: string; workspaceId: string; name: string; - notifyFrequency: string; + notifyFrequency: 'none' | 'event' | 'day' | 'week' | 'month'; createdAt: string; updatedAt: string; }; @@ -1520,7 +1677,7 @@ export type $OpenApiTs = { id: string; workspaceId: string; name: string; - notifyFrequency: string; + notifyFrequency: 'none' | 'event' | 'day' | 'week' | 'month'; createdAt: string; updatedAt: string; }; @@ -1581,4 +1738,23 @@ export type $OpenApiTs = { }; }; }; + '/feed/{channelId}/tencent-cloud/alarm': { + post: { + req: { + channelId: string; + }; + res: { + /** + * Error response + */ + 200: { + message: string; + code: string; + issues?: Array<{ + message: string; + }>; + }; + }; + }; + }; }; \ No newline at end of file diff --git a/scripts/build-openapi-schema.ts b/scripts/build-openapi-schema.ts index 43617cf..899ad19 100644 --- a/scripts/build-openapi-schema.ts +++ b/scripts/build-openapi-schema.ts @@ -1,6 +1,10 @@ import { trpcOpenapiDocument } from '../src/server/trpc'; import fs from 'fs-extra'; import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); const target = path.resolve(__dirname, '../website/openapi.json'); fs.writeJSON(target, trpcOpenapiDocument) diff --git a/website/openapi.json b/website/openapi.json index 4ff8e48..60b57d6 100644 --- a/website/openapi.json +++ b/website/openapi.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Tianji OpenAPI","description":"

Insight into everything

\n

Github: https://github.com/msgbyte/tianji

","version":"v1.11.4"},"servers":[{"url":"http://localhost:12345/open"}],"paths":{"/global/config":{"get":{"operationId":"global-config","description":"Get Tianji system global config","tags":["Global"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"allowRegister":{"type":"boolean"},"websiteId":{"type":"string"},"amapToken":{"type":"string"},"mapboxToken":{"type":"string"},"alphaMode":{"type":"boolean"},"disableAnonymousTelemetry":{"type":"boolean"},"customTrackerScriptName":{"type":"string"}},"required":["allowRegister","alphaMode","disableAnonymousTelemetry"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/login":{"post":{"operationId":"user-login","tags":["User"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}},"required":["username","password"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"info":{"type":"object","properties":{"username":{"type":"string"},"id":{"type":"string"},"role":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"currentWorkspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dashboardLayout":{"type":"object","properties":{"layouts":{"type":"object","additionalProperties":{"type":"array"}},"items":{"type":"array"}},"required":["layouts","items"],"additionalProperties":false,"nullable":true}},"required":["id","name","dashboardLayout"],"additionalProperties":false},"workspaces":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["role","workspace"],"additionalProperties":false}}},"required":["username","id","role","createdAt","updatedAt","deletedAt","currentWorkspace","workspaces"],"additionalProperties":false},"token":{"type":"string"}},"required":["info","token"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/loginWithToken":{"post":{"operationId":"user-loginWithToken","tags":["User"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"info":{"type":"object","properties":{"username":{"type":"string"},"id":{"type":"string"},"role":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"currentWorkspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dashboardLayout":{"type":"object","properties":{"layouts":{"type":"object","additionalProperties":{"type":"array"}},"items":{"type":"array"}},"required":["layouts","items"],"additionalProperties":false,"nullable":true}},"required":["id","name","dashboardLayout"],"additionalProperties":false},"workspaces":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["role","workspace"],"additionalProperties":false}}},"required":["username","id","role","createdAt","updatedAt","deletedAt","currentWorkspace","workspaces"],"additionalProperties":false},"token":{"type":"string"}},"required":["info","token"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/getServiceCount":{"get":{"operationId":"workspace-getServiceCount","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"website":{"type":"number"},"monitor":{"type":"number"},"server":{"type":"number"},"telemetry":{"type":"number"},"page":{"type":"number"},"survey":{"type":"number"},"feed":{"type":"number"}},"required":["website","monitor","server","telemetry","page","survey","feed"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/onlineCount":{"get":{"operationId":"website-onlineCount","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/all":{"get":{"operationId":"website-all","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","nullable":true},"shareId":{"type":"string","nullable":true},"resetAt":{"type":"string","format":"date-time","nullable":true},"monitorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/allOverview":{"get":{"operationId":"website-allOverview","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"number"}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/info":{"get":{"operationId":"website-info","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","nullable":true},"shareId":{"type":"string","nullable":true},"resetAt":{"type":"string","format":"date-time","nullable":true},"monitorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/stats":{"get":{"operationId":"website-stats","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"unit","in":"query","required":false,"schema":{"type":"string"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}},{"name":"referrer","in":"query","required":false,"schema":{"type":"string"}},{"name":"title","in":"query","required":false,"schema":{"type":"string"}},{"name":"os","in":"query","required":false,"schema":{"type":"string"}},{"name":"browser","in":"query","required":false,"schema":{"type":"string"}},{"name":"device","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"pageviews":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false},"uniques":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false},"totaltime":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false},"bounces":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false}},"required":["pageviews","uniques","totaltime","bounces"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/geoStats":{"get":{"operationId":"website-geoStats","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"longitude":{"type":"number"},"latitude":{"type":"number"},"count":{"type":"number"}},"required":["longitude","latitude","count"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/pageviews":{"get":{"operationId":"website-pageviews","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"unit","in":"query","required":false,"schema":{"type":"string"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}},{"name":"referrer","in":"query","required":false,"schema":{"type":"string"}},{"name":"title","in":"query","required":false,"schema":{"type":"string"}},{"name":"os","in":"query","required":false,"schema":{"type":"string"}},{"name":"browser","in":"query","required":false,"schema":{"type":"string"}},{"name":"device","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"pageviews":{},"sessions":{}},"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/metrics":{"get":{"operationId":"website-metrics","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["url","language","referrer","title","browser","os","device","country","event"]}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"referrer","in":"query","required":false,"schema":{"type":"string"}},{"name":"title","in":"query","required":false,"schema":{"type":"string"}},{"name":"os","in":"query","required":false,"schema":{"type":"string"}},{"name":"browser","in":"query","required":false,"schema":{"type":"string"}},{"name":"device","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"language","in":"query","required":false,"schema":{"type":"string"}},{"name":"event","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string","nullable":true},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/add":{"post":{"operationId":"website-add","tags":["Website"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"domain":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"},{"type":"string","maxLength":500,"anyOf":[{"format":"ipv4"},{"format":"ipv6"}]}]}},"required":["name","domain"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","nullable":true},"shareId":{"type":"string","nullable":true},"resetAt":{"type":"string","format":"date-time","nullable":true},"monitorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/update":{"put":{"operationId":"website-updateInfo","tags":["Website"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"domain":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"},{"type":"string","maxLength":500,"anyOf":[{"format":"ipv4"},{"format":"ipv6"}]}]},"monitorId":{"type":"string","pattern":"^[a-z][a-z0-9]*$","nullable":true}},"required":["name","domain"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","nullable":true},"shareId":{"type":"string","nullable":true},"resetAt":{"type":"string","format":"date-time","nullable":true},"monitorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/all":{"get":{"operationId":"monitor-all","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean"},"interval":{"type":"integer"},"maxRetries":{"type":"integer"},"payload":{"type":"object","additionalProperties":{}},"trendingMode":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt","notifications"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}":{"get":{"operationId":"monitor-get","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean"},"interval":{"type":"integer"},"maxRetries":{"type":"integer"},"payload":{"type":"object","additionalProperties":{}},"trendingMode":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt","notifications"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}},"delete":{"operationId":"monitor-delete","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean"},"interval":{"type":"integer"},"maxRetries":{"type":"integer"},"payload":{"type":"object","additionalProperties":{}},"trendingMode":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/monitor/getPublicInfo":{"post":{"operationId":"monitor-getPublicInfo","tags":["Monitor"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monitorIds":{"type":"array","items":{"type":"string"}}},"required":["monitorIds"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id","name","type"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/upsert":{"post":{"operationId":"monitor-upsert","tags":["Monitor"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9]*$"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean","default":true},"interval":{"type":"integer","minimum":5,"maximum":10000,"default":20},"maxRetries":{"type":"integer","minimum":0,"maximum":10,"default":0},"trendingMode":{"type":"boolean","default":false},"notificationIds":{"type":"array","items":{"type":"string"},"default":[]},"payload":{"type":"object","properties":{},"additionalProperties":true}},"required":["name","type","payload"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean"},"interval":{"type":"integer"},"maxRetries":{"type":"integer"},"payload":{"type":"object","additionalProperties":{}},"trendingMode":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}/data":{"get":{"operationId":"monitor-data","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"createdAt":{"type":"string","format":"date-time"}},"required":["value","createdAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}/changeActive":{"patch":{"operationId":"monitor-changeActive","tags":["Monitor"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean"},"interval":{"type":"integer"},"maxRetries":{"type":"integer"},"payload":{"type":"object","additionalProperties":{}},"trendingMode":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}/recentData":{"get":{"operationId":"monitor-recentData","tags":["Monitor"],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"take","in":"query","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"createdAt":{"type":"string","format":"date-time"}},"required":["value","createdAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}/dataMetrics":{"get":{"operationId":"monitor-dataMetrics","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"recent1DayAvg":{"type":"number"},"recent1DayOnlineCount":{"type":"number"},"recent1DayOfflineCount":{"type":"number"},"recent30DayOnlineCount":{"type":"number"},"recent30DayOfflineCount":{"type":"number"}},"required":["recent1DayAvg","recent1DayOnlineCount","recent1DayOfflineCount","recent30DayOnlineCount","recent30DayOfflineCount"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/events":{"get":{"operationId":"monitor-events","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":20}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"monitorId":{"type":"string"},"type":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","message","monitorId","type","createdAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/clearEvents":{"delete":{"operationId":"monitor-clearEvents","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/clearData":{"delete":{"operationId":"monitor-clearData","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}/status":{"get":{"operationId":"monitor-getStatus","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"statusName","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"monitorId":{"type":"string"},"statusName":{"type":"string"},"payload":{"anyOf":[{"enum":["null"],"nullable":true},{"type":"object","additionalProperties":{}},{"type":"array"},{"type":"string"},{"type":"boolean"},{"type":"number"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["monitorId","statusName","payload","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/getAllPages":{"get":{"operationId":"monitor-getAllPages","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","slug","title","description","monitorList","createdAt","updatedAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/monitor/getPageInfo":{"get":{"operationId":"monitor-getPageInfo","tags":["Monitor"],"parameters":[{"name":"slug","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","slug","title","description","monitorList","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/createStatusPage":{"post":{"operationId":"monitor-createPage","tags":["Monitor"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true}},"required":["slug","title"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","slug","title","description","monitorList","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/updateStatusPage":{"patch":{"operationId":"monitor-editPage","tags":["Monitor"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true}},"required":["id"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","slug","title","description","monitorList","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/deleteStatusPage":{"delete":{"operationId":"monitor-deletePage","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","slug","title","description","monitorList","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/all":{"get":{"operationId":"telemetry-all","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/info":{"get":{"operationId":"telemetry-info","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"telemetryId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/allEventCount":{"get":{"operationId":"telemetry-allEventCount","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"number"}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/eventCount":{"get":{"operationId":"telemetry-eventCount","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"telemetryId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/upsert":{"post":{"operationId":"telemetry-upsert","tags":["Telemetry"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"telemetryId":{"type":"string"},"name":{"type":"string"}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/delete":{"post":{"operationId":"telemetry-delete","tags":["Telemetry"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"telemetryId":{"type":"string"}},"required":["telemetryId"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/pageviews":{"get":{"operationId":"telemetry-pageviews","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"telemetryId","in":"query","required":true,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"unit","in":"query","required":false,"schema":{"type":"string"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"pageviews":{},"sessions":{}},"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/metrics":{"get":{"operationId":"telemetry-metrics","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"telemetryId","in":"query","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["source","url","event","referrer","country"]}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string","nullable":true},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/stats":{"get":{"operationId":"telemetry-stats","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"telemetryId","in":"query","required":true,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"unit","in":"query","required":false,"schema":{"type":"string"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"pageviews":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false},"uniques":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false}},"required":["pageviews","uniques"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/all":{"get":{"operationId":"survey-all","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","payload","createdAt","updatedAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}":{"get":{"operationId":"survey-get","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","payload","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}/count":{"get":{"operationId":"survey-count","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/allResultCount":{"get":{"operationId":"survey-allResultCount","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"number"}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}/submit":{"post":{"operationId":"survey-submit","tags":["Survey"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","additionalProperties":{}}},"required":["payload"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/create":{"post":{"operationId":"survey-create","tags":["Survey"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}},"required":["name","payload"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","payload","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}/update":{"patch":{"operationId":"survey-update","tags":["Survey"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}},"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","payload","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}/delete":{"delete":{"operationId":"survey-delete","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","payload","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}/result/list":{"get":{"operationId":"survey-resultList","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":1000,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":false,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":false,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"surveyId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"sessionId":{"type":"string"},"payload":{"type":"object","additionalProperties":{}},"browser":{"type":"string","nullable":true},"os":{"type":"string","nullable":true},"language":{"type":"string","nullable":true},"ip":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"subdivision1":{"type":"string","nullable":true},"subdivision2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"longitude":{"type":"number","nullable":true},"latitude":{"type":"number","nullable":true},"accuracyRadius":{"type":"integer","nullable":true}},"required":["id","surveyId","createdAt","sessionId","payload"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/audit/fetchByCursor":{"get":{"operationId":"auditLog-fetchByCursor","description":"Fetch workspace audit log","tags":["AuditLog"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"content":{"type":"string"},"relatedId":{"type":"string","nullable":true},"relatedType":{"type":"string","enum":["Monitor","Notification"],"nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","content","createdAt"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/billing/usage":{"get":{"operationId":"billing-usage","description":"get workspace usage","tags":["Billing"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"websiteAcceptedCount":{"type":"number"},"websiteEventCount":{"type":"number"},"monitorExecutionCount":{"type":"number"}},"required":["websiteAcceptedCount","websiteEventCount","monitorExecutionCount"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/channels":{"get":{"operationId":"feed-channels","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"notifyFrequency":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"_count":{"type":"object","properties":{"events":{"type":"number"}},"required":["events"],"additionalProperties":false}},"required":["id","workspaceId","name","notifyFrequency","createdAt","updatedAt","_count"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/{channelId}/info":{"get":{"operationId":"feed-channelInfo","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"notifyFrequency":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["notificationIds","id","workspaceId","name","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/{channelId}/update":{"post":{"operationId":"feed-updateChannelInfo","tags":["Feed"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"},"default":[]},"name":{"type":"string"},"notifyFrequency":{"type":"string"}},"required":["name","notifyFrequency"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"notifyFrequency":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["notificationIds","id","workspaceId","name","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/{channelId}/fetchEventsByCursor":{"get":{"operationId":"feed-fetchEventsByCursor","description":"Fetch workspace feed channel events","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channelId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"type":"string","nullable":true},"senderName":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"important":{"type":"boolean"}},"required":["id","channelId","createdAt","updatedAt","eventName","eventContent","tags","source","important"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/createChannel":{"post":{"operationId":"feed-createChannel","tags":["Feed"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"notifyFrequency":{"type":"string"},"notificationIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["name","notifyFrequency"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"notifyFrequency":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["notificationIds","id","workspaceId","name","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/{channelId}":{"delete":{"operationId":"feed-deleteChannel","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"notifyFrequency":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/feed/{channelId}/send":{"post":{"operationId":"feed-sendEvent","tags":["Feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"type":"string","nullable":true},"senderName":{"type":"string","nullable":true},"important":{"type":"boolean"}},"required":["eventName","eventContent","tags","source","important"],"additionalProperties":false}}}},"parameters":[{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"channelId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"type":"string","nullable":true},"senderName":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"important":{"type":"boolean"}},"required":["id","channelId","createdAt","updatedAt","eventName","eventContent","tags","source","important"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/feed/{channelId}/github":{"post":{"operationId":"feed-integration-github","summary":"integrate with github webhook","tags":["Feed"],"parameters":[{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"default":{"$ref":"#/components/responses/error"}}}}},"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}}}}}} +{"openapi":"3.0.3","info":{"title":"Tianji OpenAPI","description":"

Insight into everything

\n

Github: https://github.com/msgbyte/tianji

","version":"v1.13.1"},"servers":[{"url":"http://localhost:12345/open"}],"paths":{"/global/config":{"get":{"operationId":"global-config","description":"Get Tianji system global config","tags":["Global"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"allowRegister":{"type":"boolean"},"websiteId":{"type":"string"},"amapToken":{"type":"string"},"mapboxToken":{"type":"string"},"alphaMode":{"type":"boolean"},"disableAnonymousTelemetry":{"type":"boolean"},"customTrackerScriptName":{"type":"string"},"authProvider":{"type":"array","items":{"type":"string"}}},"required":["allowRegister","alphaMode","disableAnonymousTelemetry","authProvider"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/login":{"post":{"operationId":"user-login","tags":["User"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}},"required":["username","password"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"info":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"currentWorkspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workspaces":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["role","workspace"],"additionalProperties":false}}},"required":["id","role","username","nickname","avatar","email","createdAt","updatedAt","deletedAt","currentWorkspace","workspaces"],"additionalProperties":false},"token":{"type":"string"}},"required":["info","token"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/loginWithToken":{"post":{"operationId":"user-loginWithToken","tags":["User"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"info":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"currentWorkspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workspaces":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["role","workspace"],"additionalProperties":false}}},"required":["id","role","username","nickname","avatar","email","createdAt","updatedAt","deletedAt","currentWorkspace","workspaces"],"additionalProperties":false},"token":{"type":"string"}},"required":["info","token"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace//create":{"post":{"operationId":"workspace-create","tags":["Workspace"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":60,"minLength":4,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"required":["name"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"currentWorkspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workspaces":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["role","workspace"],"additionalProperties":false}}},"required":["id","role","username","nickname","avatar","email","createdAt","updatedAt","deletedAt","currentWorkspace","workspaces"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace//switch":{"post":{"operationId":"workspace-switch","tags":["Workspace"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true},"currentWorkspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workspaces":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["role","workspace"],"additionalProperties":false}}},"required":["id","role","username","nickname","avatar","email","createdAt","updatedAt","deletedAt","currentWorkspace","workspaces"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace//{workspaceId}":{"delete":{"operationId":"workspace-delete","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace//{workspaceId}/members":{"get":{"operationId":"workspace-members","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"workspaceId":{"type":"string"},"role":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"user":{"type":"object","properties":{"username":{"type":"string"},"nickname":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"emailVerified":{"type":"string","format":"date-time","nullable":true}},"required":["username","nickname","email","emailVerified"],"additionalProperties":false}},"required":["userId","workspaceId","role","createdAt","updatedAt","user"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace//{workspaceId}/invite":{"post":{"operationId":"workspace-invite","tags":["Workspace"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetUserEmail":{"type":"string"}},"required":["targetUserEmail"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace//{workspaceId}/tick":{"delete":{"operationId":"workspace-tick","description":"Administrator kicks a user out of a workspace.","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"targetUserId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace//{workspaceId}/getServiceCount":{"get":{"operationId":"workspace-getServiceCount","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"website":{"type":"number"},"monitor":{"type":"number"},"server":{"type":"number"},"telemetry":{"type":"number"},"page":{"type":"number"},"survey":{"type":"number"},"feed":{"type":"number"}},"required":["website","monitor","server","telemetry","page","survey","feed"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/onlineCount":{"get":{"operationId":"website-onlineCount","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/all":{"get":{"operationId":"website-all","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","nullable":true},"shareId":{"type":"string","nullable":true},"resetAt":{"type":"string","format":"date-time","nullable":true},"monitorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/allOverview":{"get":{"operationId":"website-allOverview","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"number"}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/info":{"get":{"operationId":"website-info","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","nullable":true},"shareId":{"type":"string","nullable":true},"resetAt":{"type":"string","format":"date-time","nullable":true},"monitorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/stats":{"get":{"operationId":"website-stats","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"unit","in":"query","required":false,"schema":{"type":"string"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}},{"name":"referrer","in":"query","required":false,"schema":{"type":"string"}},{"name":"title","in":"query","required":false,"schema":{"type":"string"}},{"name":"os","in":"query","required":false,"schema":{"type":"string"}},{"name":"browser","in":"query","required":false,"schema":{"type":"string"}},{"name":"device","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"pageviews":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false},"uniques":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false},"totaltime":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false},"bounces":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false}},"required":["pageviews","uniques","totaltime","bounces"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/geoStats":{"get":{"operationId":"website-geoStats","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"longitude":{"type":"number"},"latitude":{"type":"number"},"count":{"type":"number"}},"required":["longitude","latitude","count"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/pageviews":{"get":{"operationId":"website-pageviews","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"unit","in":"query","required":false,"schema":{"type":"string"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}},{"name":"referrer","in":"query","required":false,"schema":{"type":"string"}},{"name":"title","in":"query","required":false,"schema":{"type":"string"}},{"name":"os","in":"query","required":false,"schema":{"type":"string"}},{"name":"browser","in":"query","required":false,"schema":{"type":"string"}},{"name":"device","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"pageviews":{},"sessions":{}},"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/metrics":{"get":{"operationId":"website-metrics","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["url","language","referrer","title","browser","os","device","country","event"]}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"referrer","in":"query","required":false,"schema":{"type":"string"}},{"name":"title","in":"query","required":false,"schema":{"type":"string"}},{"name":"os","in":"query","required":false,"schema":{"type":"string"}},{"name":"browser","in":"query","required":false,"schema":{"type":"string"}},{"name":"device","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"language","in":"query","required":false,"schema":{"type":"string"}},{"name":"event","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string","nullable":true},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/add":{"post":{"operationId":"website-add","tags":["Website"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"domain":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"},{"type":"string","maxLength":500,"anyOf":[{"format":"ipv4"},{"format":"ipv6"}]}]}},"required":["name","domain"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","nullable":true},"shareId":{"type":"string","nullable":true},"resetAt":{"type":"string","format":"date-time","nullable":true},"monitorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/website/{websiteId}/update":{"put":{"operationId":"website-updateInfo","tags":["Website"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"domain":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"},{"type":"string","maxLength":500,"anyOf":[{"format":"ipv4"},{"format":"ipv6"}]}]},"monitorId":{"type":"string","pattern":"^[a-z][a-z0-9]*$","nullable":true}},"required":["name","domain"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"websiteId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","nullable":true},"shareId":{"type":"string","nullable":true},"resetAt":{"type":"string","format":"date-time","nullable":true},"monitorId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/all":{"get":{"operationId":"monitor-all","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean"},"interval":{"type":"integer"},"maxRetries":{"type":"integer"},"payload":{"type":"object","additionalProperties":{}},"trendingMode":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt","notifications"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}":{"get":{"operationId":"monitor-get","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean"},"interval":{"type":"integer"},"maxRetries":{"type":"integer"},"payload":{"type":"object","additionalProperties":{}},"trendingMode":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt","notifications"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}},"delete":{"operationId":"monitor-delete","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean"},"interval":{"type":"integer"},"maxRetries":{"type":"integer"},"payload":{"type":"object","additionalProperties":{}},"trendingMode":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/monitor/getPublicInfo":{"post":{"operationId":"monitor-getPublicInfo","tags":["Monitor"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monitorIds":{"type":"array","items":{"type":"string"}}},"required":["monitorIds"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id","name","type"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/upsert":{"post":{"operationId":"monitor-upsert","tags":["Monitor"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9]*$"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean","default":true},"interval":{"type":"integer","minimum":5,"maximum":10000,"default":20},"maxRetries":{"type":"integer","minimum":0,"maximum":10,"default":0},"trendingMode":{"type":"boolean","default":false},"notificationIds":{"type":"array","items":{"type":"string"},"default":[]},"payload":{"type":"object","properties":{},"additionalProperties":true}},"required":["name","type","payload"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean"},"interval":{"type":"integer"},"maxRetries":{"type":"integer"},"payload":{"type":"object","additionalProperties":{}},"trendingMode":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}/data":{"get":{"operationId":"monitor-data","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"createdAt":{"type":"string","format":"date-time"}},"required":["value","createdAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}/changeActive":{"patch":{"operationId":"monitor-changeActive","tags":["Monitor"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean"},"interval":{"type":"integer"},"maxRetries":{"type":"integer"},"payload":{"type":"object","additionalProperties":{}},"trendingMode":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}/recentData":{"get":{"operationId":"monitor-recentData","tags":["Monitor"],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"take","in":"query","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"createdAt":{"type":"string","format":"date-time"}},"required":["value","createdAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}/dataMetrics":{"get":{"operationId":"monitor-dataMetrics","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"recent1DayAvg":{"type":"number"},"recent1DayOnlineCount":{"type":"number"},"recent1DayOfflineCount":{"type":"number"},"recent30DayOnlineCount":{"type":"number"},"recent30DayOfflineCount":{"type":"number"}},"required":["recent1DayAvg","recent1DayOnlineCount","recent1DayOfflineCount","recent30DayOnlineCount","recent30DayOfflineCount"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/events":{"get":{"operationId":"monitor-events","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":20}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"monitorId":{"type":"string"},"type":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","message","monitorId","type","createdAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/clearEvents":{"delete":{"operationId":"monitor-clearEvents","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/clearData":{"delete":{"operationId":"monitor-clearData","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/{monitorId}/status":{"get":{"operationId":"monitor-getStatus","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"monitorId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"statusName","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"monitorId":{"type":"string"},"statusName":{"type":"string"},"payload":{"anyOf":[{"enum":["null"],"nullable":true},{"type":"object","additionalProperties":{}},{"type":"array"},{"type":"string"},{"type":"boolean"},{"type":"number"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["monitorId","statusName","payload","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/getAllPages":{"get":{"operationId":"monitor-getAllPages","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","slug","title","description","monitorList","createdAt","updatedAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/monitor/getPageInfo":{"get":{"operationId":"monitor-getPageInfo","tags":["Monitor"],"parameters":[{"name":"slug","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","slug","title","description","monitorList","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/createStatusPage":{"post":{"operationId":"monitor-createPage","tags":["Monitor"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true}},"required":["slug","title"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","slug","title","description","monitorList","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/updateStatusPage":{"patch":{"operationId":"monitor-editPage","tags":["Monitor"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true}},"required":["id"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","slug","title","description","monitorList","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/monitor/deleteStatusPage":{"delete":{"operationId":"monitor-deletePage","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false}},"domain":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","slug","title","description","monitorList","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/all":{"get":{"operationId":"telemetry-all","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/info":{"get":{"operationId":"telemetry-info","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"telemetryId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/allEventCount":{"get":{"operationId":"telemetry-allEventCount","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"number"}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/eventCount":{"get":{"operationId":"telemetry-eventCount","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"telemetryId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/upsert":{"post":{"operationId":"telemetry-upsert","tags":["Telemetry"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"telemetryId":{"type":"string"},"name":{"type":"string"}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/delete":{"post":{"operationId":"telemetry-delete","tags":["Telemetry"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"telemetryId":{"type":"string"}},"required":["telemetryId"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/pageviews":{"get":{"operationId":"telemetry-pageviews","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"telemetryId","in":"query","required":true,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"unit","in":"query","required":false,"schema":{"type":"string"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"pageviews":{},"sessions":{}},"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/metrics":{"get":{"operationId":"telemetry-metrics","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"telemetryId","in":"query","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["source","url","event","referrer","country"]}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string","nullable":true},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/telemetry/stats":{"get":{"operationId":"telemetry-stats","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"telemetryId","in":"query","required":true,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"unit","in":"query","required":false,"schema":{"type":"string"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"pageviews":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false},"uniques":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false}},"required":["pageviews","uniques"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/all":{"get":{"operationId":"survey-all","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"feedChannelIds":{"type":"array","items":{"type":"string"}},"feedTemplate":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","payload","feedChannelIds","feedTemplate","createdAt","updatedAt"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}":{"get":{"operationId":"survey-get","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"feedChannelIds":{"type":"array","items":{"type":"string"}},"feedTemplate":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","payload","feedChannelIds","feedTemplate","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}/count":{"get":{"operationId":"survey-count","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/allResultCount":{"get":{"operationId":"survey-allResultCount","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"number"}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}/submit":{"post":{"operationId":"survey-submit","tags":["Survey"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","additionalProperties":{}}},"required":["payload"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/create":{"post":{"operationId":"survey-create","tags":["Survey"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"feedChannelIds":{"type":"array","items":{"type":"string"}},"feedTemplate":{"type":"string"}},"required":["name","payload","feedChannelIds","feedTemplate"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"feedChannelIds":{"type":"array","items":{"type":"string"}},"feedTemplate":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","payload","feedChannelIds","feedTemplate","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}/update":{"patch":{"operationId":"survey-update","tags":["Survey"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"feedChannelIds":{"type":"array","items":{"type":"string"}},"feedTemplate":{"type":"string"}},"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"feedChannelIds":{"type":"array","items":{"type":"string"}},"feedTemplate":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","payload","feedChannelIds","feedTemplate","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}/delete":{"delete":{"operationId":"survey-delete","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","select","email"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"feedChannelIds":{"type":"array","items":{"type":"string"}},"feedTemplate":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","payload","feedChannelIds","feedTemplate","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/survey/{surveyId}/result/list":{"get":{"operationId":"survey-resultList","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":1000,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"startAt","in":"query","required":false,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":false,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"surveyId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"sessionId":{"type":"string"},"payload":{"type":"object","additionalProperties":{}},"browser":{"type":"string","nullable":true},"os":{"type":"string","nullable":true},"language":{"type":"string","nullable":true},"ip":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"subdivision1":{"type":"string","nullable":true},"subdivision2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"longitude":{"type":"number","nullable":true},"latitude":{"type":"number","nullable":true},"accuracyRadius":{"type":"integer","nullable":true}},"required":["id","surveyId","createdAt","sessionId","payload"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/audit/fetchByCursor":{"get":{"operationId":"auditLog-fetchByCursor","description":"Fetch workspace audit log","tags":["AuditLog"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"content":{"type":"string"},"relatedId":{"type":"string","nullable":true},"relatedType":{"type":"string","enum":["Monitor","Notification"],"nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","content","createdAt"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/billing/usage":{"get":{"operationId":"billing-usage","description":"get workspace usage","tags":["Billing"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"startAt","in":"query","required":true,"schema":{"type":"number"}},{"name":"endAt","in":"query","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"websiteAcceptedCount":{"type":"number"},"websiteEventCount":{"type":"number"},"monitorExecutionCount":{"type":"number"},"surveyCount":{"type":"number"},"feedEventCount":{"type":"number"}},"required":["websiteAcceptedCount","websiteEventCount","monitorExecutionCount","surveyCount","feedEventCount"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/channels":{"get":{"operationId":"feed-channels","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"_count":{"type":"object","properties":{"events":{"type":"number"}},"required":["events"],"additionalProperties":false}},"required":["id","workspaceId","name","notifyFrequency","createdAt","updatedAt","_count"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/{channelId}/info":{"get":{"operationId":"feed-channelInfo","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["notificationIds","id","workspaceId","name","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/{channelId}/update":{"post":{"operationId":"feed-updateChannelInfo","tags":["Feed"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"},"default":[]},"name":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]}},"required":["name","notifyFrequency"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["notificationIds","id","workspaceId","name","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/{channelId}/fetchEventsByCursor":{"get":{"operationId":"feed-fetchEventsByCursor","description":"Fetch workspace feed channel events","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channelId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"type":"string","nullable":true},"senderName":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"important":{"type":"boolean"}},"required":["id","channelId","createdAt","updatedAt","eventName","eventContent","tags","source","important"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/createChannel":{"post":{"operationId":"feed-createChannel","tags":["Feed"],"security":[{"Authorization":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"notificationIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["name","notifyFrequency"],"additionalProperties":false}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["notificationIds","id","workspaceId","name","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/workspace/{workspaceId}/feed/{channelId}":{"delete":{"operationId":"feed-deleteChannel","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*$"}},{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/feed/{channelId}/send":{"post":{"operationId":"feed-sendEvent","tags":["Feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"type":"string","nullable":true},"senderName":{"type":"string","nullable":true},"important":{"type":"boolean"}},"required":["eventName","eventContent","tags","source","important"],"additionalProperties":false}}}},"parameters":[{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"channelId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"type":"string","nullable":true},"senderName":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"important":{"type":"boolean"}},"required":["id","channelId","createdAt","updatedAt","eventName","eventContent","tags","source","important"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/feed/{channelId}/github":{"post":{"operationId":"feed-integration-github","summary":"integrate with github webhook","tags":["Feed"],"parameters":[{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"default":{"$ref":"#/components/responses/error"}}}},"/feed/{channelId}/tencent-cloud/alarm":{"post":{"operationId":"feed-integration-tencentCloudAlarm","summary":"integrate with tencent-cloud webhook","tags":["Feed"],"parameters":[{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"default":{"$ref":"#/components/responses/error"}}}}},"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}}}}}}