diff --git a/packages/client-sdk/src/open/client/core/OpenAPI.ts b/packages/client-sdk/src/open/client/core/OpenAPI.ts index bd17274..b87b877 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.13.1', + VERSION: '1.15.7', 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 e9b9d92..e2260e9 100644 --- a/packages/client-sdk/src/open/client/services.gen.ts +++ b/packages/client-sdk/src/open/client/services.gen.ts @@ -51,6 +51,21 @@ export class UserService { }); } + /** + * @param data The data for the request. + * @param data.requestBody + * @returns unknown Successful response + * @throws ApiError + */ + public static userRegister(data: $OpenApiTs['/register']['post']['req']): CancelablePromise<$OpenApiTs['/register']['post']['res'][200]> { + return __request(OpenAPI, { + method: 'POST', + url: '/register', + body: data.requestBody, + mediaType: 'application/json' + }); + } + } export class WorkspaceService { @@ -84,6 +99,21 @@ export class WorkspaceService { }); } + /** + * @param data The data for the request. + * @param data.requestBody + * @returns unknown Successful response + * @throws ApiError + */ + public static workspaceRename(data: $OpenApiTs['/workspace//rename']['patch']['req']): CancelablePromise<$OpenApiTs['/workspace//rename']['patch']['res'][200]> { + return __request(OpenAPI, { + method: 'PATCH', + url: '/workspace//rename', + body: data.requestBody, + mediaType: 'application/json' + }); + } + /** * @param data The data for the request. * @param data.workspaceId @@ -428,6 +458,24 @@ export class WebsiteService { }); } + /** + * @param data The data for the request. + * @param data.workspaceId + * @param data.websiteId + * @returns unknown Successful response + * @throws ApiError + */ + public static websiteDelete(data: $OpenApiTs['/workspace/{workspaceId}/website/{websiteId}']['delete']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/website/{websiteId}']['delete']['res'][200]> { + return __request(OpenAPI, { + method: 'DELETE', + url: '/workspace/{workspaceId}/website/{websiteId}', + path: { + workspaceId: data.workspaceId, + websiteId: data.websiteId + } + }); + } + /** * @param data The data for the request. * @param data.workspaceId @@ -449,6 +497,68 @@ export class WebsiteService { }); } + /** + * @param data The data for the request. + * @param data.workspaceId + * @param data.websiteId + * @param data.requestBody + * @returns string Successful response + * @returns unknown Error response + * @throws ApiError + */ + public static websiteGenerateLighthouseReport(data: $OpenApiTs['/workspace/{workspaceId}/website/{websiteId}/generateLighthouseReport']['post']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/website/{websiteId}/generateLighthouseReport']['post']['res'][200] | $OpenApiTs['/workspace/{workspaceId}/website/{websiteId}/generateLighthouseReport']['post']['res'][200]> { + return __request(OpenAPI, { + method: 'POST', + url: '/workspace/{workspaceId}/website/{websiteId}/generateLighthouseReport', + path: { + workspaceId: data.workspaceId, + websiteId: data.websiteId + }, + body: data.requestBody, + mediaType: 'application/json' + }); + } + + /** + * @param data The data for the request. + * @param data.workspaceId + * @param data.websiteId + * @param data.limit + * @param data.cursor + * @returns unknown Successful response + * @throws ApiError + */ + public static websiteGetLighthouseReport(data: $OpenApiTs['/workspace/{workspaceId}/website/{websiteId}/getLighthouseReport']['get']['req']): CancelablePromise<$OpenApiTs['/workspace/{workspaceId}/website/{websiteId}/getLighthouseReport']['get']['res'][200]> { + return __request(OpenAPI, { + method: 'GET', + url: '/workspace/{workspaceId}/website/{websiteId}/getLighthouseReport', + path: { + workspaceId: data.workspaceId, + websiteId: data.websiteId + }, + query: { + limit: data.limit, + cursor: data.cursor + } + }); + } + + /** + * @param data The data for the request. + * @param data.lighthouseId + * @returns unknown Successful response + * @throws ApiError + */ + public static websiteGetLighthouseJson(data: $OpenApiTs['/lighthouse/{lighthouseId}']['get']['req']): CancelablePromise<$OpenApiTs['/lighthouse/{lighthouseId}']['get']['res'][200]> { + return __request(OpenAPI, { + method: 'GET', + url: '/lighthouse/{lighthouseId}', + path: { + lighthouseId: data.lighthouseId + } + }); + } + } export class MonitorService { @@ -1316,6 +1426,7 @@ export class FeedService { * @param data.channelId * @param data.limit * @param data.cursor + * @param data.archived * @returns unknown Successful response * @throws ApiError */ @@ -1329,7 +1440,8 @@ export class FeedService { }, query: { limit: data.limit, - cursor: data.cursor + cursor: data.cursor, + archived: data.archived } }); } @@ -1390,6 +1502,86 @@ export class FeedService { }); } + /** + * @param data The data for the request. + * @param data.channelId + * @param data.eventId + * @param data.requestBody + * @returns unknown Successful response + * @throws ApiError + */ + public static feedArchiveEvent(data: $OpenApiTs['/feed/{channelId}/{eventId}/archive']['patch']['req']): CancelablePromise<$OpenApiTs['/feed/{channelId}/{eventId}/archive']['patch']['res'][200]> { + return __request(OpenAPI, { + method: 'PATCH', + url: '/feed/{channelId}/{eventId}/archive', + path: { + channelId: data.channelId, + eventId: data.eventId + }, + body: data.requestBody, + mediaType: 'application/json' + }); + } + + /** + * @param data The data for the request. + * @param data.channelId + * @param data.eventId + * @param data.requestBody + * @returns unknown Successful response + * @throws ApiError + */ + public static feedUnarchiveEvent(data: $OpenApiTs['/feed/{channelId}/{eventId}/unarchive']['patch']['req']): CancelablePromise<$OpenApiTs['/feed/{channelId}/{eventId}/unarchive']['patch']['res'][200]> { + return __request(OpenAPI, { + method: 'PATCH', + url: '/feed/{channelId}/{eventId}/unarchive', + path: { + channelId: data.channelId, + eventId: data.eventId + }, + body: data.requestBody, + mediaType: 'application/json' + }); + } + + /** + * @param data The data for the request. + * @param data.channelId + * @param data.requestBody + * @returns number Successful response + * @returns unknown Error response + * @throws ApiError + */ + public static feedClearAllArchivedEvents(data: $OpenApiTs['/feed/{channelId}/clearAllArchivedEvents']['patch']['req']): CancelablePromise<$OpenApiTs['/feed/{channelId}/clearAllArchivedEvents']['patch']['res'][200] | $OpenApiTs['/feed/{channelId}/clearAllArchivedEvents']['patch']['res'][200]> { + return __request(OpenAPI, { + method: 'PATCH', + url: '/feed/{channelId}/clearAllArchivedEvents', + path: { + channelId: data.channelId + }, + body: data.requestBody, + mediaType: 'application/json' + }); + } + + /** + * webhook playground + * @param data The data for the request. + * @param data.workspaceId + * @returns string Successful response + * @returns unknown Error response + * @throws ApiError + */ + public static feedIntegrationPlayground(data: $OpenApiTs['/feed/playground/{workspaceId}']['post']['req']): CancelablePromise<$OpenApiTs['/feed/playground/{workspaceId}']['post']['res'][200] | $OpenApiTs['/feed/playground/{workspaceId}']['post']['res'][200]> { + return __request(OpenAPI, { + method: 'POST', + url: '/feed/playground/{workspaceId}', + path: { + workspaceId: data.workspaceId + } + }); + } + /** * integrate with github webhook * @param data The data for the request. @@ -1426,4 +1618,22 @@ export class FeedService { }); } + /** + * integrate with sentry webhook + * @param data The data for the request. + * @param data.channelId + * @returns string Successful response + * @returns unknown Error response + * @throws ApiError + */ + public static feedIntegrationSentry(data: $OpenApiTs['/feed/{channelId}/sentry']['post']['req']): CancelablePromise<$OpenApiTs['/feed/{channelId}/sentry']['post']['res'][200] | $OpenApiTs['/feed/{channelId}/sentry']['post']['res'][200]> { + return __request(OpenAPI, { + method: 'POST', + url: '/feed/{channelId}/sentry', + 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 d1a2972..60ad011 100644 --- a/packages/client-sdk/src/open/client/types.gen.ts +++ b/packages/client-sdk/src/open/client/types.gen.ts @@ -43,10 +43,7 @@ export type $OpenApiTs = { createdAt: string; updatedAt: string; deletedAt: string | null; - currentWorkspace: { - id: string; - name: string; - }; + currentWorkspaceId: string | null; workspaces: Array<{ role: string; workspace: { @@ -82,10 +79,44 @@ export type $OpenApiTs = { createdAt: string; updatedAt: string; deletedAt: string | null; - currentWorkspace: { - id: string; - name: string; - }; + currentWorkspaceId: string | null; + workspaces: Array<{ + role: string; + workspace: { + id: string; + name: string; + }; + }>; + }; + token: string; + }; + }; + }; + }; + '/register': { + post: { + req: { + requestBody: { + username: string; + password: string; + }; + }; + res: { + /** + * Successful response + */ + 200: { + info: { + id: string; + role: string; + username: string; + nickname: string | null; + avatar: string | null; + email: string | null; + createdAt: string; + updatedAt: string; + deletedAt: string | null; + currentWorkspaceId: string | null; workspaces: Array<{ role: string; workspace: { @@ -120,10 +151,7 @@ export type $OpenApiTs = { createdAt: string; updatedAt: string; deletedAt: string | null; - currentWorkspace: { - id: string; - name: string; - }; + currentWorkspaceId: string | null; workspaces: Array<{ role: string; workspace: { @@ -156,10 +184,7 @@ export type $OpenApiTs = { createdAt: string; updatedAt: string; deletedAt: string | null; - currentWorkspace: { - id: string; - name: string; - }; + currentWorkspaceId: string | null; workspaces: Array<{ role: string; workspace: { @@ -171,6 +196,25 @@ export type $OpenApiTs = { }; }; }; + '/workspace//rename': { + patch: { + req: { + requestBody: { + workspaceId: string; + name: string; + }; + }; + res: { + /** + * Successful response + */ + 200: { + id: string; + name: string; + }; + }; + }; + }; '/workspace//{workspaceId}': { delete: { req: { @@ -213,7 +257,7 @@ export type $OpenApiTs = { post: { req: { requestBody: { - targetUserEmail: string; + emailOrId: string; }; workspaceId: string; }; @@ -501,6 +545,31 @@ export type $OpenApiTs = { }; }; }; + '/workspace/{workspaceId}/website/{websiteId}': { + delete: { + req: { + websiteId: string; + workspaceId: string; + }; + res: { + /** + * Successful response + */ + 200: { + id: string; + workspaceId: string; + name: string; + domain: string | null; + shareId: string | null; + resetAt: string | null; + monitorId: string | null; + createdAt: string; + updatedAt: string; + deletedAt: string | null; + }; + }; + }; + }; '/workspace/{workspaceId}/website/{websiteId}/update': { put: { req: { @@ -531,6 +600,68 @@ export type $OpenApiTs = { }; }; }; + '/workspace/{workspaceId}/website/{websiteId}/generateLighthouseReport': { + post: { + req: { + requestBody: { + url: string; + }; + websiteId: string; + workspaceId: string; + }; + res: { + /** + * Error response + */ + 200: { + message: string; + code: string; + issues?: Array<{ + message: string; + }>; + }; + }; + }; + }; + '/workspace/{workspaceId}/website/{websiteId}/getLighthouseReport': { + get: { + req: { + cursor?: string; + limit?: number; + websiteId: string; + workspaceId: string; + }; + res: { + /** + * Successful response + */ + 200: { + items: Array<{ + id: string; + status: 'Pending' | 'Success' | 'Failed'; + url: string; + createdAt: string; + }>; + nextCursor?: string; + }; + }; + }; + }; + '/lighthouse/{lighthouseId}': { + get: { + req: { + lighthouseId: string; + }; + res: { + /** + * Successful response + */ + 200: { + [key: string]: unknown; + }; + }; + }; + }; '/workspace/{workspaceId}/monitor/all': { get: { req: { @@ -864,6 +995,9 @@ export type $OpenApiTs = { slug: string; title: string; description: string; + body: { + [key: string]: unknown; + }; monitorList: Array<{ id: string; showCurrent?: boolean; @@ -890,6 +1024,9 @@ export type $OpenApiTs = { slug: string; title: string; description: string; + body: { + [key: string]: unknown; + }; monitorList: Array<{ id: string; showCurrent?: boolean; @@ -908,6 +1045,9 @@ export type $OpenApiTs = { slug: string; title: string; description?: string; + body?: { + [key: string]: unknown; + }; monitorList?: Array<{ id: string; showCurrent?: boolean; @@ -926,6 +1066,9 @@ export type $OpenApiTs = { slug: string; title: string; description: string; + body: { + [key: string]: unknown; + }; monitorList: Array<{ id: string; showCurrent?: boolean; @@ -945,6 +1088,9 @@ export type $OpenApiTs = { slug?: string; title?: string; description?: string; + body?: { + [key: string]: unknown; + }; monitorList?: Array<{ id: string; showCurrent?: boolean; @@ -963,6 +1109,9 @@ export type $OpenApiTs = { slug: string; title: string; description: string; + body: { + [key: string]: unknown; + }; monitorList: Array<{ id: string; showCurrent?: boolean; @@ -990,6 +1139,9 @@ export type $OpenApiTs = { slug: string; title: string; description: string; + body: { + [key: string]: unknown; + }; monitorList: Array<{ id: string; showCurrent?: boolean; @@ -1608,6 +1760,7 @@ export type $OpenApiTs = { '/workspace/{workspaceId}/feed/{channelId}/fetchEventsByCursor': { get: { req: { + archived?: boolean; channelId: string; cursor?: string; limit?: number; @@ -1631,6 +1784,10 @@ export type $OpenApiTs = { senderName?: string | null; url?: string | null; important: boolean; + archived: boolean; + payload?: { + [key: string]: unknown; + } | null; }>; nextCursor?: string; }; @@ -1696,6 +1853,9 @@ export type $OpenApiTs = { senderId?: string | null; senderName?: string | null; important: boolean; + payload?: { + [key: string]: unknown; + } | null; }; }; res: { @@ -1715,6 +1875,85 @@ export type $OpenApiTs = { senderName?: string | null; url?: string | null; important: boolean; + archived: boolean; + payload?: { + [key: string]: unknown; + } | null; + }; + }; + }; + }; + '/feed/{channelId}/{eventId}/archive': { + patch: { + req: { + channelId: string; + eventId: string; + requestBody: { + workspaceId: string; + }; + }; + res: { + /** + * Successful response + */ + 200: unknown; + }; + }; + }; + '/feed/{channelId}/{eventId}/unarchive': { + patch: { + req: { + channelId: string; + eventId: string; + requestBody: { + workspaceId: string; + }; + }; + res: { + /** + * Successful response + */ + 200: unknown; + }; + }; + }; + '/feed/{channelId}/clearAllArchivedEvents': { + patch: { + req: { + channelId: string; + requestBody: { + workspaceId: string; + }; + }; + res: { + /** + * Error response + */ + 200: { + message: string; + code: string; + issues?: Array<{ + message: string; + }>; + }; + }; + }; + }; + '/feed/playground/{workspaceId}': { + post: { + req: { + workspaceId: string; + }; + res: { + /** + * Error response + */ + 200: { + message: string; + code: string; + issues?: Array<{ + message: string; + }>; }; }; }; @@ -1757,4 +1996,23 @@ export type $OpenApiTs = { }; }; }; + '/feed/{channelId}/sentry': { + 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/src/server/trpc/index.ts b/src/server/trpc/index.ts index 87f4972..910ccc7 100644 --- a/src/server/trpc/index.ts +++ b/src/server/trpc/index.ts @@ -24,12 +24,15 @@ export const trpcOpenapiHttpHandler = createOpenApiHttpHandler({ createContext, } as any); +const title = 'Tianji OpenAPI'; + const description = ` -
Github: https://github.com/msgbyte/tianji
`.trim(); + export const trpcOpenapiDocument = generateOpenApiDocument(appRouter, { - title: 'Tianji OpenAPI', + title, description, version: `v${packageJson.default.version}`, baseUrl: 'http://localhost:12345/open', diff --git a/website/openapi.json b/website/openapi.json index 60b57d6..8a89335 100644 --- a/website/openapi.json +++ b/website/openapi.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Tianji OpenAPI","description":"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}}}}}}} +{"openapi":"3.0.3","info":{"title":"Tianji OpenAPI","description":"