Files
2026-07-13 12:30:54 +08:00

2 lines
232 KiB
JSON

{"openapi":"3.1.0","info":{"title":"Tianji OpenAPI","description":"## Tianji - All-in-One Insight Hub\n\n**Tianji** is a comprehensive, **open-source** monitoring and analytics platform designed for independent developers and small teams. It combines multiple essential tools into one lightweight solution.\n\n> **Getting Started:** Visit our official website at [tianji.dev](https://tianji.dev/) for complete documentation, tutorials, and deployment guides.\n\n### Core Features\n\n- **Website Analytics** - Track website visitors without cookies (GDPR/CCPA compliant)\n- **Uptime Monitor** - Monitor your services 24/7 with alerts\n- **Server Status** - Real-time server metrics and performance monitoring\n- **Docker Status** - Monitor Docker containers and services\n- **Status Page** - Public status pages for your services\n- **Telemetry** - Collect telemetry data from distributed systems\n- **Survey** - User feedback and satisfaction surveys\n- **Feeds** - Event streams and notification management\n- **Short Link** - URL shortener with analytics\n- **AI Gateway** - AI model proxy with cost tracking\n\n### Why Tianji?\n\n- **Open Source** - Apache 2.0 License, free forever\n- **Privacy First** - GDPR & CCPA compliant, no cookie tracking\n- **All-in-One** - Multiple tools in one lightweight platform\n- **Self-Hosted** - Full control over your data\n- **Community Driven** - Active community and continuous improvements\n\n### Authentication\n\nThe Tianji API uses **Bearer Token** authentication. Include your API key in the Authorization header:\n\n```\nAuthorization: Bearer <YOUR_API_KEY>\n```\n\n**How to obtain an API key:**\n\n1. Log in to your Tianji instance\n2. Click on your avatar in the top right corner\n3. Navigate to **Settings → API Keys**\n4. Click the + button to create a new API key\n5. Name your key and save it securely\n\nFor detailed authentication instructions and code examples, see the [Authentication Documentation](https://tianji.dev/docs/api/authentication).\n\n### Resources\n\n- **Website:** [tianji.dev](https://tianji.dev/)\n- **GitHub:** [github.com/msgbyte/tianji](https://github.com/msgbyte/tianji)\n- **Community:** [Join our Discord](https://discord.gg/8Vv47wAEej)\n- **Cloud:** [Try Tianji Cloud](https://tianji.dev/)\n\n---\n\n**Note:** This OpenAPI documentation provides programmatic access to all Tianji features. For detailed usage instructions, examples, and best practices, please visit our [official website](https://tianji.dev/).","version":"v1.30.25"},"servers":[{"url":"/open"}],"paths":{"/ai/classifySurvey":{"post":{"operationId":"ai-classifySurvey","summary":"Classify survey","description":"classify survey","tags":["AI"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"surveyId":{"type":"string"},"startAt":{"type":"number"},"endAt":{"type":"number"},"runStrategy":{"type":"string","enum":["skipExist","skipInSuggest","rebuildAll"]},"languageStrategy":{"default":"default","type":"string","enum":["default","user"]},"payloadContentField":{"type":"string"},"suggestionCategory":{"type":"array","items":{"type":"string"}}},"required":["workspaceId","surveyId","startAt","endAt","runStrategy","payloadContentField","suggestionCategory"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string","const":"ok"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ai/translateSurvey":{"post":{"operationId":"ai-translateSurvey","summary":"Translate survey","description":"translate survey","tags":["AI"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"surveyId":{"type":"string"},"startAt":{"type":"number"},"endAt":{"type":"number"},"runStrategy":{"type":"string","enum":["skipExist","rebuildAll"]},"languageStrategy":{"default":"user","type":"string","enum":["default","user"]},"payloadContentField":{"type":"string"}},"required":["workspaceId","surveyId","startAt","endAt","runStrategy","payloadContentField"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string","const":"ok"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/aiGateway/all":{"get":{"operationId":"aiGateway-all","summary":"Get all gateways","tags":["AIGateway"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"modelApiKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelBaseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelInputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"customModelOutputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/aiGateway/info":{"get":{"operationId":"aiGateway-info","summary":"Get gateway info","tags":["AI"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"gatewayId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"modelApiKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelBaseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelInputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"customModelOutputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/aiGateway/create":{"post":{"operationId":"aiGateway-create","summary":"Create gateway","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"modelApiKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelBaseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelInputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"customModelOutputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","modelApiKey","customModelBaseUrl","customModelName","customModelInputPrice","customModelOutputPrice"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"modelApiKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelBaseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelInputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"customModelOutputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/aiGateway/update":{"patch":{"operationId":"aiGateway-update","summary":"Update gateway","tags":["AI"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"gatewayId":{"type":"string"},"name":{"type":"string","maxLength":100},"modelApiKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelBaseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelInputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"customModelOutputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["workspaceId","gatewayId","name","modelApiKey","customModelBaseUrl","customModelName","customModelInputPrice","customModelOutputPrice"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"modelApiKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelBaseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelInputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"customModelOutputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/aiGateway/delete":{"delete":{"operationId":"aiGateway-delete","summary":"Delete gateway","tags":["AI"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"gatewayId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"modelApiKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelBaseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"customModelInputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"customModelOutputPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/aiGateway/logs":{"get":{"operationId":"aiGateway-logs","summary":"Get gateway logs","tags":["AI"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"gatewayId","schema":{"type":"string"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"logId","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"},"gatewayId":{"type":"string"},"inputToken":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outputToken":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stream":{"type":"boolean"},"modelName":{"type":"string"},"status":{"type":"string","enum":["Pending","Success","Failed"]},"duration":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ttft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"type":"number"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestPayload":{},"responsePayload":{}},"required":["id","workspaceId","gatewayId","inputToken","outputToken","stream","modelName","status","duration","ttft","price","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/aiGateway/model-pricing":{"get":{"operationId":"aiGateway-modelPricing","summary":"Get model pricing","tags":["AI"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":10,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"api":{"type":"string"},"doc":{"type":"string"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"attachment":{"type":"boolean"},"reasoning":{"type":"boolean"},"temperature":{"type":"boolean"},"tool_call":{"type":"boolean"},"knowledge":{"type":"string"},"release_date":{"type":"string"},"last_updated":{"type":"string"},"modalities":{"type":"object","properties":{"input":{"type":"array","items":{"type":"string"}},"output":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"open_weights":{"type":"boolean"},"cost":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"cache_read":{"type":"number"}},"additionalProperties":false},"limit":{"type":"object","properties":{"context":{"type":"number"},"output":{"type":"number"}},"additionalProperties":false}},"required":["id","name"],"additionalProperties":false}}},"required":["id","name","models"],"additionalProperties":false}}},"required":["providers"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/aiGateway/quota-alert":{"get":{"operationId":"aiGateway-quotaAlert-get","summary":"Get quota alert","tags":["AI"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"gatewayId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"dailyQuota":{"type":"number"},"enabled":{"type":"boolean"},"notificationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAlertSentAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"alertLevel80Sent":{"type":"boolean"},"alertLevel100Sent":{"type":"boolean"},"alertLevel150Sent":{"type":"boolean"}},"required":["id","dailyQuota","enabled","notificationId","lastAlertSentAt","alertLevel80Sent","alertLevel100Sent","alertLevel150Sent"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/aiGateway/quota-alert/upsert":{"post":{"operationId":"aiGateway-quotaAlert-upsert","summary":"Upsert quota alert","tags":["AI"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"gatewayId":{"type":"string"},"dailyQuota":{"type":"number","minimum":0},"enabled":{"type":"boolean"},"notificationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["workspaceId","gatewayId","dailyQuota","enabled","notificationId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"dailyQuota":{"type":"number"},"enabled":{"type":"boolean"},"notificationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","dailyQuota","enabled","notificationId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/aiGateway/quota-alert/delete":{"delete":{"operationId":"aiGateway-quotaAlert-delete","summary":"Delete quota alert","tags":["AI"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"gatewayId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/global/config":{"get":{"operationId":"global-config","summary":"Get global config","description":"Get Tianji system global config","tags":["Global"],"security":[{"Authorization":[]}],"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"},"serverTimezone":{"type":"string"},"authProvider":{"type":"array","items":{"type":"string"}},"customAuthProviderIcon":{"type":"string"},"smtpAvailable":{"type":"boolean"},"enableBilling":{"type":"boolean"},"ai":{"type":"object","properties":{"enable":{"type":"boolean"},"contextWindow":{"type":"number"}},"required":["enable","contextWindow"],"additionalProperties":false},"enableFunctionWorker":{"type":"boolean"},"observability":{"type":"object","properties":{"tianji":{"type":"object","properties":{"baseUrl":{"type":"string"},"websiteId":{"type":"string"}},"additionalProperties":false}},"required":["tianji"],"additionalProperties":false}},"required":["allowRegister","alphaMode","disableAnonymousTelemetry","authProvider","smtpAvailable","enableBilling","ai","enableFunctionWorker","observability"],"additionalProperties":false}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/login":{"post":{"operationId":"user-login","summary":"User login","tags":["User"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}},"required":["username","password"]}}}},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaces":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"paused":{"type":"boolean"}},"required":["id","name","settings","paused"],"additionalProperties":false}},"required":["role","workspace"],"additionalProperties":false}}},"required":["id","role","username","nickname","avatar","email","createdAt","updatedAt","deletedAt","currentWorkspaceId","workspaces"],"additionalProperties":false},"token":{"type":"string"}},"required":["info","token"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/loginWithToken":{"post":{"operationId":"user-loginWithToken","summary":"Login with token","tags":["User"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaces":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"paused":{"type":"boolean"}},"required":["id","name","settings","paused"],"additionalProperties":false}},"required":["role","workspace"],"additionalProperties":false}}},"required":["id","role","username","nickname","avatar","email","createdAt","updatedAt","deletedAt","currentWorkspaceId","workspaces"],"additionalProperties":false},"token":{"type":"string"}},"required":["info","token"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/register":{"post":{"operationId":"user-register","summary":"Register user","tags":["User"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}},"required":["username","password"]}}}},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaces":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"paused":{"type":"boolean"}},"required":["id","name","settings","paused"],"additionalProperties":false}},"required":["role","workspace"],"additionalProperties":false}}},"required":["id","role","username","nickname","avatar","email","createdAt","updatedAt","deletedAt","currentWorkspaceId","workspaces"],"additionalProperties":false},"token":{"type":"string"}},"required":["info","token"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/create":{"post":{"operationId":"workspace-create","summary":"Create workspace","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":60}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"username":{"type":"string"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaces":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"paused":{"type":"boolean"}},"required":["id","name","settings","paused"],"additionalProperties":false}},"required":["role","workspace"],"additionalProperties":false}}},"required":["id","role","username","nickname","avatar","email","createdAt","updatedAt","deletedAt","currentWorkspaceId","workspaces"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/switch":{"post":{"operationId":"workspace-switch","summary":"Switch workspace","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"username":{"type":"string"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaces":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"paused":{"type":"boolean"}},"required":["id","name","settings","paused"],"additionalProperties":false}},"required":["role","workspace"],"additionalProperties":false}}},"required":["id","role","username","nickname","avatar","email","createdAt","updatedAt","deletedAt","currentWorkspaceId","workspaces"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/rename":{"patch":{"operationId":"workspace-rename","summary":"Rename workspace","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"name":{"type":"string","minLength":4,"maxLength":60}},"required":["workspaceId","name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"paused":{"type":"boolean"}},"required":["id","name","settings","paused"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/del":{"delete":{"operationId":"workspace-delete","summary":"Delete workspace","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/members":{"get":{"operationId":"workspace-members","summary":"Get members","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"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"},"updatedAt":{"type":"string"},"user":{"type":"object","properties":{"username":{"type":"string"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["username","nickname","email","emailVerified"],"additionalProperties":false}},"required":["userId","workspaceId","role","createdAt","updatedAt","user"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/updateSettings":{"post":{"operationId":"workspace-updateSettings","summary":"Update settings","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{},"additionalProperties":{}}},"required":["settings"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"paused":{"type":"boolean"}},"required":["id","name","settings","paused"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/invite":{"post":{"operationId":"workspace-invite","summary":"Invite member","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emailOrId":{"type":"string"},"role":{"default":"readOnly","type":"string","enum":["admin","readOnly"]}},"required":["emailOrId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/tick":{"delete":{"operationId":"workspace-tick","summary":"Kick member","description":"Administrator kicks a user out of a workspace.","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"targetUserId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/updateMemberRole":{"patch":{"operationId":"workspace-updateMemberRole","summary":"Update member role","description":"Update workspace member role","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"role":{"type":"string","enum":["owner","admin","readOnly"]}},"required":["userId","role"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/getServiceCount":{"get":{"operationId":"workspace-getServiceCount","summary":"Get service count","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"website":{"type":"number"},"application":{"type":"number"},"monitor":{"type":"number"},"server":{"type":"number"},"telemetry":{"type":"number"},"page":{"type":"number"},"survey":{"type":"number"},"feed":{"type":"number"},"shortLink":{"type":"number"},"aiGateway":{"type":"number"},"functionWorker":{"type":"number"}},"required":["website","application","monitor","server","telemetry","page","survey","feed","shortLink","aiGateway","functionWorker"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/recheckPauseStatus":{"post":{"operationId":"workspace-recheckPauseStatus","summary":"Recheck workspace pause status","description":"Manually trigger workspace pause status check based on usage limits","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}/onlineCount":{"get":{"operationId":"website-onlineCount","summary":"Get online count","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/all":{"get":{"operationId":"website-all","summary":"Get all websites","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resetAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"monitorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/allOverview":{"get":{"operationId":"website-allOverview","summary":"Get overview","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}/info":{"get":{"operationId":"website-info","summary":"Get website info","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resetAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"monitorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}/stats":{"get":{"operationId":"website-stats","summary":"Get stats","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string"},"required":true},{"in":"query","name":"startAt","schema":{"type":"number"},"required":true},{"in":"query","name":"endAt","schema":{"type":"number"},"required":true},{"in":"query","name":"unit","schema":{"type":"string"}},{"in":"query","name":"url","schema":{"type":"string"}},{"in":"query","name":"country","schema":{"type":"string"}},{"in":"query","name":"region","schema":{"type":"string"}},{"in":"query","name":"city","schema":{"type":"string"}},{"in":"query","name":"timezone","schema":{"type":"string"}},{"in":"query","name":"referrer","schema":{"type":"string"}},{"in":"query","name":"title","schema":{"type":"string"}},{"in":"query","name":"os","schema":{"type":"string"}},{"in":"query","name":"browser","schema":{"type":"string"}},{"in":"query","name":"device","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}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}/geoStats":{"get":{"operationId":"website-geoStats","summary":"Get geo stats","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string"},"required":true},{"in":"query","name":"startAt","schema":{"type":"number"},"required":true},{"in":"query","name":"endAt","schema":{"type":"number"},"required":true}],"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}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}/pageviews":{"get":{"operationId":"website-pageviews","summary":"Get pageviews","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string"},"required":true},{"in":"query","name":"startAt","schema":{"type":"number"},"required":true},{"in":"query","name":"endAt","schema":{"type":"number"},"required":true},{"in":"query","name":"unit","schema":{"type":"string"}},{"in":"query","name":"url","schema":{"type":"string"}},{"in":"query","name":"country","schema":{"type":"string"}},{"in":"query","name":"region","schema":{"type":"string"}},{"in":"query","name":"city","schema":{"type":"string"}},{"in":"query","name":"timezone","schema":{"type":"string"}},{"in":"query","name":"referrer","schema":{"type":"string"}},{"in":"query","name":"title","schema":{"type":"string"}},{"in":"query","name":"os","schema":{"type":"string"}},{"in":"query","name":"browser","schema":{"type":"string"}},{"in":"query","name":"device","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"pageviews":{},"sessions":{}},"required":["pageviews","sessions"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}/metrics":{"get":{"operationId":"website-metrics","summary":"Get metrics","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string"},"required":true},{"in":"query","name":"type","schema":{"type":"string","enum":["url","language","referrer","title","browser","os","device","country","event","utm_source","utm_medium","utm_campaign","utm_term","utm_content"]},"required":true},{"in":"query","name":"startAt","schema":{"type":"number"},"required":true},{"in":"query","name":"endAt","schema":{"type":"number"},"required":true},{"in":"query","name":"url","schema":{"type":"string"}},{"in":"query","name":"referrer","schema":{"type":"string"}},{"in":"query","name":"title","schema":{"type":"string"}},{"in":"query","name":"os","schema":{"type":"string"}},{"in":"query","name":"browser","schema":{"type":"string"}},{"in":"query","name":"device","schema":{"type":"string"}},{"in":"query","name":"country","schema":{"type":"string"}},{"in":"query","name":"region","schema":{"type":"string"}},{"in":"query","name":"city","schema":{"type":"string"}},{"in":"query","name":"language","schema":{"type":"string"}},{"in":"query","name":"event","schema":{"type":"string"}},{"in":"query","name":"utm_source","schema":{"type":"string"}},{"in":"query","name":"utm_medium","schema":{"type":"string"}},{"in":"query","name":"utm_campaign","schema":{"type":"string"}},{"in":"query","name":"utm_term","schema":{"type":"string"}},{"in":"query","name":"utm_content","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"x":{"anyOf":[{"type":"string"},{"type":"null"}]},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/add":{"post":{"operationId":"website-add","summary":"Add website","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"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])$"},{"anyOf":[{"type":"string","maxLength":500,"format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"string","maxLength":500,"format":"ipv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"}]}]}},"required":["name","domain"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resetAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"monitorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}":{"delete":{"operationId":"website-delete","summary":"Delete website","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resetAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"monitorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}/update":{"put":{"operationId":"website-updateInfo","summary":"Update website","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"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])$"},{"anyOf":[{"type":"string","maxLength":500,"format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"string","maxLength":500,"format":"ipv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"}]}]},"monitorId":{"anyOf":[{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},{"type":"null"}]}},"required":["name","domain"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resetAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"monitorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","domain","shareId","resetAt","monitorId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}/generateLighthouseReport":{"post":{"operationId":"website-generateLighthouseReport","summary":"Generate Lighthouse report","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}/getLighthouseReport":{"get":{"operationId":"website-getLighthouseReport","summary":"Get Lighthouse report","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"limit","schema":{"default":10,"type":"number","minimum":1,"maximum":100}},{"in":"query","name":"cursor","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"},"status":{"type":"string","enum":["Pending","Success","Failed"]},"url":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","status","url","createdAt"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/lighthouse/{lighthouseId}":{"get":{"operationId":"website-getLighthouseJSON","summary":"Get Lighthouse JSON","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"lighthouseId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/website/public/{shareId}/info":{"get":{"operationId":"website-getPublicInfoByShareId","summary":"Get public info","tags":["Website"],"parameters":[{"in":"path","name":"shareId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"shareId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/website/public/{shareId}/stats":{"get":{"operationId":"website-getPublicStatsByShareId","summary":"Get public stats","tags":["Website"],"parameters":[{"in":"path","name":"shareId","schema":{"type":"string"},"required":true},{"in":"query","name":"range","schema":{"default":"24h","type":"string","enum":["realtime","24h","7d","30d","90d"]}}],"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},"visitors":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false},"bounce_rate":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false},"average_visit_duration":{"type":"object","properties":{"value":{"type":"number"},"prev":{"type":"number"}},"required":["value","prev"],"additionalProperties":false},"pageviews_trend":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"value":{"type":"number"}},"required":["date","value"],"additionalProperties":false}}},"required":["pageviews","visitors","bounce_rate","average_visit_duration","pageviews_trend"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/website/public/{shareId}/metrics":{"get":{"operationId":"website-getPublicMetricsByShareId","summary":"Get public metrics","tags":["Website"],"parameters":[{"in":"path","name":"shareId","schema":{"type":"string"},"required":true},{"in":"query","name":"type","schema":{"type":"string","enum":["url","language","referrer","title","browser","os","device","country","event","utm_source","utm_medium","utm_campaign","utm_term","utm_content"]},"required":true},{"in":"query","name":"range","schema":{"default":"24h","type":"string","enum":["realtime","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"x":{"anyOf":[{"type":"string"},{"type":"null"}]},"y":{"type":"number"},"ratio":{"type":"number"}},"required":["x","y","ratio"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}/share/enable":{"post":{"operationId":"website-createOrEnableShare","summary":"Enable share","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"shareUrl":{"type":"string"}},"required":["shareUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/website/{websiteId}/share/disable":{"post":{"operationId":"website-disableShare","summary":"Disable share","tags":["Website"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"websiteId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/application/all":{"get":{"operationId":"application-all","summary":"Get all applications","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"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"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/application/{applicationId}/info":{"get":{"operationId":"application-info","summary":"Get application info","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"applicationId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"applicationStoreInfos":{"type":"array","items":{"type":"object","properties":{"applicationId":{"type":"string"},"storeType":{"type":"string"},"storeId":{"type":"string"},"appId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"releaseNotes":{"type":"string"},"url":{"type":"string"},"downloads":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"ratingCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"reviews":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["applicationId","storeType","storeId","appId","title","description","releaseNotes","url","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","workspaceId","name","createdAt","updatedAt","applicationStoreInfos"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/application/create":{"post":{"operationId":"application-create","summary":"Create application","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"appstoreId":{"type":"string","pattern":"^id.*"},"playstoreId":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/application/{applicationId}/update":{"patch":{"operationId":"application-update","summary":"Update application","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"applicationId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"appstoreId":{"type":"string","pattern":"^id.*"},"playstoreId":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/application/{applicationId}/delete":{"delete":{"operationId":"application-delete","summary":"Delete application","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"applicationId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/application/storeAppSearch":{"get":{"operationId":"application-storeAppSearch","summary":"Search store apps","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"keyword","schema":{"type":"string"},"required":true},{"in":"query","name":"storeType","schema":{"type":"string","enum":["appstore","googleplay"]},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"appId":{"type":"string"},"title":{"type":"string"},"icon":{"type":"string"}},"required":["appId","title","icon"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/application/{applicationId}/storeInfoHistory":{"get":{"operationId":"application-storeInfoHistory","summary":"Get store info history","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"applicationId","schema":{"type":"string"},"required":true},{"in":"query","name":"storeType","schema":{"type":"string","enum":["appstore","googleplay"]},"required":true},{"in":"query","name":"storeId","schema":{"type":"string"}},{"in":"query","name":"startAt","schema":{"type":"number"},"required":true},{"in":"query","name":"endAt","schema":{"type":"number"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"downloads":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"ratingCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"reviews":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/application/{applicationId}/eventStats":{"get":{"operationId":"application-eventStats","summary":"Get event stats","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"applicationId","schema":{"type":"string"},"required":true},{"in":"query","name":"startAt","schema":{"type":"number"},"required":true},{"in":"query","name":"endAt","schema":{"type":"number"},"required":true},{"in":"query","name":"timezone","schema":{"type":"string"}},{"in":"query","name":"unit","schema":{"type":"string","enum":["minute","hour","day","month","year"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"current":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"eventCount":{"type":"number"},"sessionCount":{"type":"number"},"totalTime":{"type":"number"},"avgEventsPerSession":{"type":"number"},"avgScreensPerSession":{"type":"number"}},"required":["date","eventCount","sessionCount","totalTime","avgEventsPerSession","avgScreensPerSession"],"additionalProperties":false}},"previous":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"eventCount":{"type":"number"},"sessionCount":{"type":"number"},"totalTime":{"type":"number"},"avgEventsPerSession":{"type":"number"},"avgScreensPerSession":{"type":"number"}},"required":["date","eventCount","sessionCount","totalTime","avgEventsPerSession","avgScreensPerSession"],"additionalProperties":false}},"currentTotalSessionCount":{"type":"number"},"previousTotalSessionCount":{"type":"number"}},"required":["current","previous","currentTotalSessionCount","previousTotalSessionCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/all":{"get":{"operationId":"monitor-all","summary":"Get all monitors","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"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","minimum":-9007199254740991,"maximum":9007199254740991},"maxRetries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"trendingMode":{"type":"boolean"},"recentError":{"anyOf":[{"type":"string"},{"type":"null"}]},"upMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"downMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"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}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/{monitorId}/get":{"get":{"operationId":"monitor-get","summary":"Get monitor","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"active":{"type":"boolean"},"interval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxRetries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"trendingMode":{"type":"boolean"},"recentError":{"anyOf":[{"type":"string"},{"type":"null"}]},"upMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"downMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"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},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/monitor/getPublicInfo":{"post":{"operationId":"monitor-getPublicInfo","summary":"Get public info","tags":["Monitor"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monitorIds":{"type":"array","items":{"type":"string"}}},"required":["monitorIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"trendingMode":{"type":"boolean"}},"required":["id","name","type","trendingMode"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/upsert":{"post":{"operationId":"monitor-upsert","summary":"Upsert monitor","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"name":{"type":"string"},"type":{"type":"string"},"active":{"default":true,"type":"boolean"},"interval":{"default":20,"type":"integer","minimum":5,"maximum":10000},"maxRetries":{"default":0,"type":"integer","minimum":0,"maximum":10},"trendingMode":{"default":false,"type":"boolean"},"notificationIds":{"default":[],"type":"array","items":{"type":"string"}},"payload":{"type":"object","properties":{},"additionalProperties":{}},"upMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"downMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","type","payload"]}}}},"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","minimum":-9007199254740991,"maximum":9007199254740991},"maxRetries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"trendingMode":{"type":"boolean"},"recentError":{"anyOf":[{"type":"string"},{"type":"null"}]},"upMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"downMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/{monitorId}/del":{"delete":{"operationId":"monitor-delete","summary":"Delete monitor","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"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","minimum":-9007199254740991,"maximum":9007199254740991},"maxRetries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"trendingMode":{"type":"boolean"},"recentError":{"anyOf":[{"type":"string"},{"type":"null"}]},"upMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"downMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/{monitorId}/regeneratePushToken":{"post":{"operationId":"monitor-regeneratePushToken","summary":"Regenerate push token","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/{monitorId}/trigger":{"post":{"operationId":"monitor-triggerMonitor","summary":"Trigger monitor","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"monitorId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/{monitorId}/data":{"get":{"operationId":"monitor-data","summary":"Get data","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"startAt","schema":{"type":"number"},"required":true},{"in":"query","name":"endAt","schema":{"type":"number"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"createdAt":{"type":"string"}},"required":["value","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/{monitorId}/changeActive":{"patch":{"operationId":"monitor-changeActive","summary":"Change active status","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"monitorId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"]}}}},"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","minimum":-9007199254740991,"maximum":9007199254740991},"maxRetries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"trendingMode":{"type":"boolean"},"recentError":{"anyOf":[{"type":"string"},{"type":"null"}]},"upMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"downMessageTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","type","active","interval","maxRetries","payload","trendingMode","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/{monitorId}/recentData":{"get":{"operationId":"monitor-recentData","summary":"Get recent data","tags":["Monitor"],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"take","schema":{"type":"number"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"createdAt":{"type":"string"}},"required":["value","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/{monitorId}/publicSummary":{"get":{"operationId":"monitor-publicSummary","summary":"Get public summary","tags":["Monitor"],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"totalCount":{"type":"number"},"upCount":{"type":"number"},"upRate":{"type":"number"}},"required":["day","totalCount","upCount","upRate"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/{monitorId}/publicData":{"get":{"operationId":"monitor-publicData","summary":"Get public data","tags":["Monitor"],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"createdAt":{"type":"string"}},"required":["value","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/{monitorId}/dataMetrics":{"get":{"operationId":"monitor-dataMetrics","summary":"Get data metrics","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"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}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/events":{"get":{"operationId":"monitor-events","summary":"Get events","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"}},{"in":"query","name":"limit","schema":{"default":20,"type":"number"}}],"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"}},"required":["id","message","monitorId","type","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/clearEvents":{"delete":{"operationId":"monitor-clearEvents","summary":"Clear events","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/clearData":{"delete":{"operationId":"monitor-clearData","summary":"Clear data","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/monitor/{monitorId}/status":{"get":{"operationId":"monitor-getStatus","summary":"Get status","tags":["Monitor"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"monitorId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"statusName","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"monitorId":{"type":"string"},"statusName":{"type":"string"},"payload":{"anyOf":[{"type":"null"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}},{"type":"string"},{"type":"boolean"},{"type":"number"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["monitorId","statusName","payload","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/page/all":{"get":{"operationId":"page-getAllPages","summary":"Get all pages","tags":["Page"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"type","schema":{"default":"all","type":"string","enum":["status","static","all"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"default":false,"type":"boolean"},"showDetail":{"default":true,"type":"boolean"}},"required":["id"],"additionalProperties":false}},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"status"}},"required":["id","workspaceId","slug","title","description","body","monitorList","createdAt","updatedAt","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"type":{"type":"string","const":"static"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","type","slug","title","description","payload","createdAt","updatedAt"],"additionalProperties":false}]}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/page/{slug}":{"get":{"operationId":"page-getPageInfo","summary":"Get page info","tags":["Page"],"parameters":[{"in":"path","name":"slug","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"default":false,"type":"boolean"},"showDetail":{"default":true,"type":"boolean"}},"required":["id"],"additionalProperties":false}},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"status"}},"required":["id","workspaceId","slug","title","description","body","monitorList","createdAt","updatedAt","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"type":{"type":"string","const":"static"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","type","slug","title","description","payload","createdAt","updatedAt"],"additionalProperties":false}]},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/page/create":{"post":{"operationId":"page-createPage","summary":"Create page","tags":["Page"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"default":false,"type":"boolean"},"showDetail":{"default":true,"type":"boolean"}},"required":["id"],"additionalProperties":false}},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"status"}},"required":["id","workspaceId","slug","title","description","body","monitorList","createdAt","updatedAt","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"type":{"type":"string","const":"static"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","type","slug","title","description","payload","createdAt","updatedAt"],"additionalProperties":false}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/page/edit":{"patch":{"operationId":"page-editPage","summary":"Edit page","tags":["Page"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"domain":{"type":"string"},"body":{},"monitorList":{},"payload":{}},"required":["id"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"default":false,"type":"boolean"},"showDetail":{"default":true,"type":"boolean"}},"required":["id"],"additionalProperties":false}},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"status"}},"required":["id","workspaceId","slug","title","description","body","monitorList","createdAt","updatedAt","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"type":{"type":"string","const":"static"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","type","slug","title","description","payload","createdAt","updatedAt"],"additionalProperties":false}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/page/delete":{"delete":{"operationId":"page-deletePage","summary":"Delete page","tags":["Page"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"monitorList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"showCurrent":{"default":false,"type":"boolean"},"showDetail":{"default":true,"type":"boolean"}},"required":["id"],"additionalProperties":false}},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"status"}},"required":["id","workspaceId","slug","title","description","body","monitorList","createdAt","updatedAt","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"type":{"type":"string","const":"static"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","type","slug","title","description","payload","createdAt","updatedAt"],"additionalProperties":false}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/telemetry/all":{"get":{"operationId":"telemetry-all","summary":"Get all telemetry","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"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"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/telemetry/info":{"get":{"operationId":"telemetry-info","summary":"Get telemetry info","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"telemetryId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/telemetry/allEventCount":{"get":{"operationId":"telemetry-allEventCount","summary":"Get all event count","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/telemetry/eventCount":{"get":{"operationId":"telemetry-eventCount","summary":"Get event count","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"telemetryId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/telemetry/upsert":{"post":{"operationId":"telemetry-upsert","summary":"Upsert telemetry","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"telemetryId":{"type":"string"},"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/telemetry/delete":{"post":{"operationId":"telemetry-delete","summary":"Delete telemetry","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"telemetryId":{"type":"string"}},"required":["telemetryId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/telemetry/pageviews":{"get":{"operationId":"telemetry-pageviews","summary":"Get pageviews","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"telemetryId","schema":{"type":"string"},"required":true},{"in":"query","name":"startAt","schema":{"type":"number"},"required":true},{"in":"query","name":"endAt","schema":{"type":"number"},"required":true},{"in":"query","name":"unit","schema":{"type":"string"}},{"in":"query","name":"url","schema":{"type":"string"}},{"in":"query","name":"country","schema":{"type":"string"}},{"in":"query","name":"region","schema":{"type":"string"}},{"in":"query","name":"city","schema":{"type":"string"}},{"in":"query","name":"timezone","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"pageviews":{},"sessions":{}},"required":["pageviews","sessions"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/telemetry/metrics":{"get":{"operationId":"telemetry-metrics","summary":"Get metrics","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"telemetryId","schema":{"type":"string"},"required":true},{"in":"query","name":"type","schema":{"type":"string","enum":["source","url","event","referrer","country"]},"required":true},{"in":"query","name":"startAt","schema":{"type":"number"},"required":true},{"in":"query","name":"endAt","schema":{"type":"number"},"required":true},{"in":"query","name":"url","schema":{"type":"string"}},{"in":"query","name":"country","schema":{"type":"string"}},{"in":"query","name":"region","schema":{"type":"string"}},{"in":"query","name":"city","schema":{"type":"string"}},{"in":"query","name":"timezone","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"x":{"anyOf":[{"type":"string"},{"type":"null"}]},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/telemetry/stats":{"get":{"operationId":"telemetry-stats","summary":"Get stats","tags":["Telemetry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"telemetryId","schema":{"type":"string"},"required":true},{"in":"query","name":"startAt","schema":{"type":"number"},"required":true},{"in":"query","name":"endAt","schema":{"type":"number"},"required":true},{"in":"query","name":"unit","schema":{"type":"string"}},{"in":"query","name":"url","schema":{"type":"string"}},{"in":"query","name":"country","schema":{"type":"string"}},{"in":"query","name":"region","schema":{"type":"string"}},{"in":"query","name":"city","schema":{"type":"string"}},{"in":"query","name":"timezone","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}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/all":{"get":{"operationId":"survey-all","summary":"Get all surveys","description":"Get all surveys","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"desc":{"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","imageUrl","hidden"]},"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"},"webhookUrl":{"type":"string"},"recentSuggestionCategory":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","desc","payload","feedChannelIds","feedTemplate","webhookUrl","recentSuggestionCategory","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/{surveyId}/get":{"get":{"operationId":"survey-get","summary":"Get survey","description":"Get a specific survey by ID","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string"},"required":true},{"in":"path","name":"surveyId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"desc":{"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","imageUrl","hidden"]},"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"},"webhookUrl":{"type":"string"},"recentSuggestionCategory":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","desc","payload","feedChannelIds","feedTemplate","webhookUrl","recentSuggestionCategory","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/{surveyId}/count":{"get":{"operationId":"survey-count","summary":"Get result count","description":"Get the total count of survey results","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"surveyId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/allResultCount":{"get":{"operationId":"survey-allResultCount","summary":"Get all result counts","description":"Get result counts for all surveys in the workspace","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/{surveyId}/submit":{"post":{"operationId":"survey-submit","summary":"Submit survey","description":"Submit survey responses","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string"},"required":true},{"in":"path","name":"surveyId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["payload"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string","const":"success"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/create":{"post":{"operationId":"survey-create","summary":"Create survey","description":"Create a new survey with payload, feed channels and webhook configuration","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"desc":{"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","imageUrl","hidden"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"]}}},"required":["items"]},"feedChannelIds":{"type":"array","items":{"type":"string"}},"feedTemplate":{"type":"string"},"webhookUrl":{"type":"string"}},"required":["name","payload","feedChannelIds","feedTemplate","webhookUrl"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"desc":{"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","imageUrl","hidden"]},"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"},"webhookUrl":{"type":"string"},"recentSuggestionCategory":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","desc","payload","feedChannelIds","feedTemplate","webhookUrl","recentSuggestionCategory","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/{surveyId}/update":{"patch":{"operationId":"survey-update","summary":"Update survey","description":"Update an existing survey configuration","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"surveyId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"desc":{"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","imageUrl","hidden"]},"options":{"type":"array","items":{"type":"string"}}},"required":["label","name","type"]}}},"required":["items"]},"feedChannelIds":{"type":"array","items":{"type":"string"}},"feedTemplate":{"type":"string"},"webhookUrl":{"type":"string"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"desc":{"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","imageUrl","hidden"]},"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"},"webhookUrl":{"type":"string"},"recentSuggestionCategory":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","desc","payload","feedChannelIds","feedTemplate","webhookUrl","recentSuggestionCategory","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/{surveyId}/delete":{"delete":{"operationId":"survey-delete","summary":"Delete survey","description":"Delete a survey permanently","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"surveyId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"desc":{"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","imageUrl","hidden"]},"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"},"webhookUrl":{"type":"string"},"recentSuggestionCategory":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","desc","payload","feedChannelIds","feedTemplate","webhookUrl","recentSuggestionCategory","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/{surveyId}/duplicate":{"post":{"operationId":"survey-duplicate","summary":"Duplicate survey","description":"Duplicate an existing survey with a new name","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"surveyId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"desc":{"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","imageUrl","hidden"]},"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"},"webhookUrl":{"type":"string"},"recentSuggestionCategory":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","desc","payload","feedChannelIds","feedTemplate","webhookUrl","recentSuggestionCategory","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/result/{resultId}":{"get":{"operationId":"survey-getResult","summary":"Get result","description":"Get a specific survey result by result ID","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"resultId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"surveyId":{"type":"string"},"createdAt":{"type":"string"},"sessionId":{"type":"string"},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"browser":{"anyOf":[{"type":"string"},{"type":"null"}]},"os":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"ip":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"subdivision1":{"anyOf":[{"type":"string"},{"type":"null"}]},"subdivision2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"accuracyRadius":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"aiCategory":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiTranslation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","surveyId","createdAt","sessionId","payload"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/{surveyId}/result/list":{"get":{"operationId":"survey-resultList","summary":"Get result list","description":"Get paginated list of survey results with optional date range and filters","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"surveyId","schema":{"type":"string"},"required":true},{"in":"query","name":"limit","schema":{"default":50,"type":"number","minimum":1,"maximum":1000}},{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"startAt","schema":{"type":"number"}},{"in":"query","name":"endAt","schema":{"type":"number"}},{"in":"query","name":"filter","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"},"surveyId":{"type":"string"},"createdAt":{"type":"string"},"sessionId":{"type":"string"},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"browser":{"anyOf":[{"type":"string"},{"type":"null"}]},"os":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"ip":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"subdivision1":{"anyOf":[{"type":"string"},{"type":"null"}]},"subdivision2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"accuracyRadius":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"aiCategory":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiTranslation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","surveyId","createdAt","sessionId","payload"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/{surveyId}/stats":{"get":{"operationId":"survey-stats","summary":"Get stats","description":"Get survey submission statistics grouped by date","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"surveyId","schema":{"type":"string"},"required":true},{"in":"query","name":"startAt","schema":{"type":"number"}},{"in":"query","name":"endAt","schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"number"}},"required":["date","count"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/survey/{surveyId}/aiCategoryList":{"get":{"operationId":"survey-aiCategoryList","summary":"Get AI categories","description":"Get AI-categorized survey results with counts for each category","tags":["Survey"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"surveyId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"number"}},"required":["name","count"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/serverStatus/publicInfo":{"post":{"operationId":"serverStatus-publicInfo","summary":"Get server status","tags":["Monitor"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"serverNames":{"type":"array","items":{"type":"string"}}},"required":["workspaceId","serverNames"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"hostname":{"type":"string"},"timeout":{"type":"number"},"updatedAt":{"type":"number"},"payload":{}},"required":["workspaceId","name","hostname","updatedAt","payload"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/audit/fetchByCursor":{"get":{"operationId":"auditLog-fetchByCursor","summary":"Fetch audit log","description":"Fetch workspace audit log","tags":["AuditLog"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"limit","schema":{"default":50,"type":"number","minimum":1,"maximum":100}},{"in":"query","name":"cursor","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"relatedType":{"anyOf":[{"type":"string","enum":["Monitor","Notification","Task","FunctionWorker"]},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","workspaceId","content","createdAt"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/audit/clear":{"delete":{"operationId":"auditLog-clear","summary":"Clear audit log","description":"clear all workspace audit log","tags":["AuditLog"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/billing/usage":{"get":{"operationId":"billing-usage","summary":"Get usage","description":"get workspace usage","tags":["Billing"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"startAt","schema":{"type":"number"},"required":true},{"in":"query","name":"endAt","schema":{"type":"number"},"required":true}],"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}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/billing/limit":{"get":{"operationId":"billing-limit","summary":"Get limit","description":"get workspace subscription limit","tags":["Billing"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"maxWebsiteCount":{"type":"number"},"maxWebsiteEventCount":{"type":"number"},"maxMonitorExecutionCount":{"type":"number"},"maxSurveyCount":{"type":"number"},"maxFeedChannelCount":{"type":"number"},"maxFeedEventCount":{"type":"number"}},"required":["maxWebsiteCount","maxWebsiteEventCount","maxMonitorExecutionCount","maxSurveyCount","maxFeedChannelCount","maxFeedEventCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/billing/currentTier":{"get":{"operationId":"billing-currentTier","summary":"Get current tier","description":"get workspace current tier","tags":["Billing"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string","enum":["FREE","PRO","TEAM","UNLIMITED"]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/billing/currentSubscription":{"get":{"operationId":"billing-currentSubscription","summary":"Get subscription","description":"get workspace current subscription","tags":["Billing"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"subscriptionId":{"type":"string"},"workspaceId":{"type":"string"},"storeId":{"type":"string"},"productId":{"type":"string"},"variantId":{"type":"string"},"status":{"type":"string"},"cardBrand":{"type":"string"},"cardLastFour":{"type":"string"},"renewsAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"tier":{"type":"string"}},"required":["subscriptionId","workspaceId","storeId","productId","variantId","status","cardBrand","cardLastFour","renewsAt","createdAt","updatedAt","tier"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/billing/credit":{"get":{"operationId":"billing-credit","summary":"Get credit","description":"get workspace credit balance","tags":["Billing"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"credit":{"type":"number"}},"required":["credit"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/billing/credit/bills":{"get":{"operationId":"billing-creditBills","summary":"Get credit bills","description":"list workspace credit bills","tags":["Billing"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"page","schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"in":"query","name":"pageSize","schema":{"default":10,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"type":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"}},"required":["id","workspaceId","type","amount","createdAt"],"additionalProperties":false}},"total":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"}},"required":["list","total","page","pageSize"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/billing/credit/packs":{"get":{"operationId":"billing-creditPacks","summary":"Get credit packs","description":"list available credit packs","tags":["Billing"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"variantId":{"type":"string"},"credit":{"type":"number"},"price":{"type":"number"},"currency":{"type":"string"}},"required":["id","name","variantId","credit","price","currency"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/billing/credit/checkout":{"post":{"operationId":"billing-creditCheckout","summary":"Checkout credit","description":"create credit checkout session","tags":["Billing"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"packId":{"type":"string"},"redirectUrl":{"type":"string"}},"required":["workspaceId","packId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/feed/channels":{"get":{"operationId":"feed-channels","summary":"Get all channels","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"webhookSignature":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"publicShareId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"events":{"type":"number"}},"required":["events"],"additionalProperties":false}},"required":["id","workspaceId","name","webhookSignature","notifyFrequency","createdAt","updatedAt","_count"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/feed/{channelId}/info":{"get":{"operationId":"feed-channelInfo","summary":"Get channel info","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"webhookSignature":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"publicShareId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["notificationIds","id","workspaceId","name","webhookSignature","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/feed/{channelId}/update":{"post":{"operationId":"feed-updateChannelInfo","summary":"Update channel","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notificationIds":{"default":[],"type":"array","items":{"type":"string"}},"name":{"type":"string"},"webhookSignature":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]}},"required":["name","webhookSignature","notifyFrequency"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"webhookSignature":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"publicShareId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["notificationIds","id","workspaceId","name","webhookSignature","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/feed/{channelId}/fetchEventsByCursor":{"get":{"operationId":"feed-fetchEventsByCursor","summary":"Fetch events","description":"Fetch workspace feed channel events","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"channelId","schema":{"type":"string"},"required":true},{"in":"query","name":"limit","schema":{"default":50,"type":"number","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"archived","schema":{"default":false,"type":"boolean"}}],"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"},"updatedAt":{"type":"string"},"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"important":{"type":"boolean"},"archived":{"type":"boolean"},"payload":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["id","channelId","createdAt","updatedAt","eventName","eventContent","tags","source","important","archived"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/public/{shareId}/events":{"get":{"operationId":"feed-fetchPublicEventsByCursor","description":"Fetch public feed channel events by shareId","tags":["Feed"],"parameters":[{"in":"path","name":"shareId","schema":{"type":"string"},"required":true},{"in":"query","name":"limit","schema":{"default":50,"type":"number","minimum":1,"maximum":100}},{"in":"query","name":"cursor","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"},"updatedAt":{"type":"string"},"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"important":{"type":"boolean"},"archived":{"type":"boolean"},"payload":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["id","channelId","createdAt","updatedAt","eventName","eventContent","tags","source","important","archived"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/public/{shareId}/info":{"get":{"operationId":"feed-getChannelByShareId","description":"Fetch public feed channel info by shareId","tags":["Feed"],"parameters":[{"in":"path","name":"shareId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publicShareId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/feed/createChannel":{"post":{"operationId":"feed-createChannel","summary":"Create channel","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"notificationIds":{"default":[],"type":"array","items":{"type":"string"}}},"required":["name","notifyFrequency"]}}}},"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"},"webhookSignature":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"publicShareId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["notificationIds","id","workspaceId","name","webhookSignature","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/feed/{channelId}/refreshPublicShare":{"post":{"operationId":"feed-refreshPublicShareId","summary":"Refresh public share","description":"Regenerate public share id for feed channel","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"publicShareId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["publicShareId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/feed/{channelId}/disablePublicShare":{"post":{"operationId":"feed-disablePublicShareId","summary":"Disable public share","description":"Disable public share for feed channel","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"publicShareId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["publicShareId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/feed/{channelId}/del":{"delete":{"operationId":"feed-deleteChannel","summary":"Delete channel","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"webhookSignature":{"type":"string"},"notifyFrequency":{"type":"string","enum":["none","event","day","week","month"]},"publicShareId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","webhookSignature","notifyFrequency","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/{channelId}/send":{"post":{"operationId":"feed-sendEvent","tags":["Feed"],"parameters":[{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"default":[],"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"important":{"type":"boolean"},"payload":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["eventName","eventContent","source","important"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"channelId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"important":{"type":"boolean"},"archived":{"type":"boolean"},"payload":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["id","channelId","createdAt","updatedAt","eventName","eventContent","tags","source","important","archived"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/{channelId}/{eventId}/archive":{"patch":{"operationId":"feed-archiveEvent","tags":["Feed"],"parameters":[{"in":"path","name":"channelId","schema":{"type":"string"},"required":true},{"in":"path","name":"eventId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/{channelId}/{eventId}/unarchive":{"patch":{"operationId":"feed-unarchiveEvent","tags":["Feed"],"parameters":[{"in":"path","name":"channelId","schema":{"type":"string"},"required":true},{"in":"path","name":"eventId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/{channelId}/clearAllArchivedEvents":{"patch":{"operationId":"feed-clearAllArchivedEvents","tags":["Feed"],"parameters":[{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/playground/{workspaceId}":{"post":{"operationId":"feed-integration-playground","summary":"webhook playground","tags":["Feed"],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/{channelId}/github":{"post":{"operationId":"feed-integration-github","summary":"integrate with github webhook","tags":["Feed"],"parameters":[{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/{channelId}/stripe":{"post":{"operationId":"feed-integration-stripe","summary":"integrate with stripe webhook","tags":["Feed"],"parameters":[{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/{channelId}/tencent-cloud/alarm":{"post":{"operationId":"feed-integration-tencentCloudAlarm","summary":"integrate with tencent-cloud webhook","tags":["Feed"],"parameters":[{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/{channelId}/sentry":{"post":{"operationId":"feed-integration-sentry","summary":"integrate with sentry webhook","tags":["Feed"],"parameters":[{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/feed/state/all":{"get":{"operationId":"feed-state-all","summary":"Get all states","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"query","name":"channelId","schema":{"type":"string"},"required":true},{"in":"query","name":"limit","schema":{"default":5,"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channelId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"eventId":{"type":"string"},"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"important":{"type":"boolean"},"status":{"type":"string","enum":["Ongoing","Resolved"]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["id","channelId","createdAt","updatedAt","eventId","eventName","eventContent","tags","source","important","status"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/feed/{channelId}/state/upsert":{"post":{"operationId":"feed-state-upsert","tags":["Feed"],"parameters":[{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string"},"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"important":{"type":"boolean"},"payload":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["eventId","eventName","eventContent","tags","source","important"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"channelId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"eventId":{"type":"string"},"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"important":{"type":"boolean"},"status":{"type":"string","enum":["Ongoing","Resolved"]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["id","channelId","createdAt","updatedAt","eventId","eventName","eventContent","tags","source","important","status"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/feed/{channelId}/state/resolve":{"post":{"operationId":"feed-state-resolve","summary":"Resolve state","tags":["Feed"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"channelId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stateId":{"type":"string"}},"required":["stateId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"channelId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"eventId":{"type":"string"},"eventName":{"type":"string"},"eventContent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"senderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"important":{"type":"boolean"},"status":{"type":"string","enum":["Ongoing","Resolved"]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["id","channelId","createdAt","updatedAt","eventId","eventName","eventContent","tags","source","important","status"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/worker/all":{"get":{"operationId":"worker-all","summary":"Get all workers in workspace","tags":["Worker"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"type":"string"},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"enableCron":{"type":"boolean"},"cronExpression":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"type":"string","enum":["Public","Private"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","code","revision","active","enableCron","visibility","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/worker/{workerId}/info":{"get":{"operationId":"worker-get","summary":"Get worker by ID","tags":["Worker"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"workerId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"type":"string"},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"enableCron":{"type":"boolean"},"cronExpression":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"type":"string","enum":["Public","Private"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","code","revision","active","enableCron","visibility","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/worker/upsert":{"post":{"operationId":"worker-upsert","summary":"Create or update worker","tags":["Worker"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"code":{"type":"string","minLength":1},"active":{"default":true,"type":"boolean"},"enableCron":{"default":false,"type":"boolean"},"cronExpression":{"type":"string"}},"required":["name","code"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"type":"string"},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"enableCron":{"type":"boolean"},"cronExpression":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"type":"string","enum":["Public","Private"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","code","revision","active","enableCron","visibility","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/worker/{workerId}/delete":{"delete":{"operationId":"worker-delete","summary":"Delete worker","tags":["Worker"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"workerId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"type":"string"},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"enableCron":{"type":"boolean"},"cronExpression":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"type":"string","enum":["Public","Private"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","code","revision","active","enableCron","visibility","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/worker/{workerId}/toggleActive":{"patch":{"operationId":"worker-toggleActive","summary":"Toggle worker active status","tags":["Worker"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"workerId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"type":"string"},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"enableCron":{"type":"boolean"},"cronExpression":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"type":"string","enum":["Public","Private"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","name","code","revision","active","enableCron","visibility","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace/{workspaceId}/worker/{workerId}/revisions":{"get":{"operationId":"worker-getRevisions","summary":"Get worker revisions","tags":["Worker"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true},{"in":"path","name":"workerId","schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","workerId","revision","code","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}},"components":{"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","example":{"code":"BAD_REQUEST","message":"Invalid input data","issues":[]},"type":"object","properties":{"message":{"description":"The error message","example":"Invalid input data","type":"string"},"code":{"description":"The error code","example":"BAD_REQUEST","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","example":{"code":"UNAUTHORIZED","message":"Authorization not provided","issues":[]},"type":"object","properties":{"message":{"description":"The error message","example":"Authorization not provided","type":"string"},"code":{"description":"The error code","example":"UNAUTHORIZED","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","example":{"code":"FORBIDDEN","message":"Insufficient access","issues":[]},"type":"object","properties":{"message":{"description":"The error message","example":"Insufficient access","type":"string"},"code":{"description":"The error code","example":"FORBIDDEN","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","example":{"code":"INTERNAL_SERVER_ERROR","message":"Internal server error","issues":[]},"type":"object","properties":{"message":{"description":"The error message","example":"Internal server error","type":"string"},"code":{"description":"The error code","example":"INTERNAL_SERVER_ERROR","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","example":{"code":"NOT_FOUND","message":"Not found","issues":[]},"type":"object","properties":{"message":{"description":"The error message","example":"Not found","type":"string"},"code":{"description":"The error code","example":"NOT_FOUND","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}},"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}}}}