UNPKG

tianji-client-sdk

Version:

1,585 lines 113 kB
"use strict"; // This file is auto-generated by @hey-api/openapi-ts Object.defineProperty(exports, "__esModule", { value: true }); exports.WorkerService = exports.FeedService = exports.BillingService = exports.AuditLogService = exports.SurveyService = exports.TelemetryService = exports.MonitorService = exports.WebsiteService = exports.WorkspaceService = exports.UserService = exports.GlobalService = exports.ApplicationService = exports.AiGatewayService = exports.AiService = void 0; const OpenAPI_1 = require("./core/OpenAPI"); const request_1 = require("./core/request"); class AiService { /** * Classify survey * classify survey * @param data The data for the request. * @param data.requestBody * @returns "ok" Successful response * @throws ApiError */ static aiClassifySurvey(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/ai/classifySurvey', body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Translate survey * translate survey * @param data The data for the request. * @param data.requestBody * @returns "ok" Successful response * @throws ApiError */ static aiTranslateSurvey(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/ai/translateSurvey', body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Get gateway info * @param data The data for the request. * @param data.workspaceId * @param data.gatewayId * @returns unknown Successful response * @throws ApiError */ static aiGatewayInfo(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/aiGateway/info', query: { workspaceId: data.workspaceId, gatewayId: data.gatewayId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Update gateway * @param data The data for the request. * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static aiGatewayUpdate(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'PATCH', url: '/aiGateway/update', body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Delete gateway * @param data The data for the request. * @param data.workspaceId * @param data.gatewayId * @returns unknown Successful response * @throws ApiError */ static aiGatewayDelete(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'DELETE', url: '/aiGateway/delete', query: { workspaceId: data.workspaceId, gatewayId: data.gatewayId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get gateway logs * @param data The data for the request. * @param data.workspaceId * @param data.gatewayId * @param data.cursor * @param data.limit * @param data.logId * @returns unknown Successful response * @throws ApiError */ static aiGatewayLogs(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/aiGateway/logs', query: { workspaceId: data.workspaceId, gatewayId: data.gatewayId, cursor: data.cursor, limit: data.limit, logId: data.logId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get model pricing * @param data The data for the request. * @param data.workspaceId * @param data.search * @param data.limit * @returns unknown Successful response * @throws ApiError */ static aiGatewayModelPricing(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/aiGateway/model-pricing', query: { workspaceId: data.workspaceId, search: data.search, limit: data.limit }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get quota alert * @param data The data for the request. * @param data.workspaceId * @param data.gatewayId * @returns unknown Successful response * @throws ApiError */ static aiGatewayQuotaAlertGet(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/aiGateway/quota-alert', query: { workspaceId: data.workspaceId, gatewayId: data.gatewayId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Upsert quota alert * @param data The data for the request. * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static aiGatewayQuotaAlertUpsert(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/aiGateway/quota-alert/upsert', body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Delete quota alert * @param data The data for the request. * @param data.workspaceId * @param data.gatewayId * @returns boolean Successful response * @throws ApiError */ static aiGatewayQuotaAlertDelete(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'DELETE', url: '/aiGateway/quota-alert/delete', query: { workspaceId: data.workspaceId, gatewayId: data.gatewayId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } } exports.AiService = AiService; class AiGatewayService { /** * Get all gateways * @param data The data for the request. * @param data.workspaceId * @returns unknown Successful response * @throws ApiError */ static aiGatewayAll(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/aiGateway/all', path: { workspaceId: data.workspaceId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } } exports.AiGatewayService = AiGatewayService; class ApplicationService { /** * Create gateway * @param data The data for the request. * @param data.workspaceId * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static aiGatewayCreate(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/{workspaceId}/aiGateway/create', path: { workspaceId: data.workspaceId }, body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Get all applications * @param data The data for the request. * @param data.workspaceId * @returns unknown Successful response * @throws ApiError */ static applicationAll(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/application/all', path: { workspaceId: data.workspaceId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get application info * @param data The data for the request. * @param data.workspaceId * @param data.applicationId * @returns unknown Successful response * @throws ApiError */ static applicationInfo(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/application/{applicationId}/info', path: { workspaceId: data.workspaceId, applicationId: data.applicationId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Create application * @param data The data for the request. * @param data.workspaceId * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static applicationCreate(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/{workspaceId}/application/create', path: { workspaceId: data.workspaceId }, body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Update application * @param data The data for the request. * @param data.workspaceId * @param data.applicationId * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static applicationUpdate(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'PATCH', url: '/workspace/{workspaceId}/application/{applicationId}/update', path: { workspaceId: data.workspaceId, applicationId: data.applicationId }, body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Delete application * @param data The data for the request. * @param data.workspaceId * @param data.applicationId * @returns unknown Successful response * @throws ApiError */ static applicationDelete(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'DELETE', url: '/workspace/{workspaceId}/application/{applicationId}/delete', path: { workspaceId: data.workspaceId, applicationId: data.applicationId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Search store apps * @param data The data for the request. * @param data.workspaceId * @param data.keyword * @param data.storeType * @returns unknown Successful response * @throws ApiError */ static applicationStoreAppSearch(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/application/storeAppSearch', query: { workspaceId: data.workspaceId, keyword: data.keyword, storeType: data.storeType }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get store info history * @param data The data for the request. * @param data.workspaceId * @param data.applicationId * @param data.storeType * @param data.startAt * @param data.endAt * @param data.storeId * @returns unknown Successful response * @throws ApiError */ static applicationStoreInfoHistory(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/application/{applicationId}/storeInfoHistory', path: { workspaceId: data.workspaceId, applicationId: data.applicationId }, query: { storeType: data.storeType, storeId: data.storeId, startAt: data.startAt, endAt: data.endAt }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get event stats * @param data The data for the request. * @param data.workspaceId * @param data.applicationId * @param data.startAt * @param data.endAt * @param data.timezone * @param data.unit * @returns unknown Successful response * @throws ApiError */ static applicationEventStats(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/application/{applicationId}/eventStats', path: { workspaceId: data.workspaceId, applicationId: data.applicationId }, query: { startAt: data.startAt, endAt: data.endAt, timezone: data.timezone, unit: data.unit }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } } exports.ApplicationService = ApplicationService; class GlobalService { /** * Get global config * Get Tianji system global config * @returns unknown Successful response * @throws ApiError */ static globalConfig() { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/global/config', errors: { 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } } exports.GlobalService = GlobalService; class UserService { /** * User login * @param data The data for the request. * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static userLogin(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/login', body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Login with token * @param data The data for the request. * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static userLoginWithToken(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/loginWithToken', body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Register user * @param data The data for the request. * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static userRegister(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/register', body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } } exports.UserService = UserService; class WorkspaceService { /** * Create workspace * @param data The data for the request. * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static workspaceCreate(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/create', body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Switch workspace * @param data The data for the request. * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static workspaceSwitch(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/switch', body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Rename workspace * @param data The data for the request. * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static workspaceRename(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'PATCH', url: '/workspace/rename', body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Delete workspace * @param data The data for the request. * @param data.workspaceId * @returns unknown Successful response * @throws ApiError */ static workspaceDelete(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'DELETE', url: '/workspace/{workspaceId}/del', path: { workspaceId: data.workspaceId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get members * @param data The data for the request. * @param data.workspaceId * @returns unknown Successful response * @throws ApiError */ static workspaceMembers(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/members', path: { workspaceId: data.workspaceId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Update settings * @param data The data for the request. * @param data.workspaceId * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static workspaceUpdateSettings(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/{workspaceId}/updateSettings', path: { workspaceId: data.workspaceId }, body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Invite member * @param data The data for the request. * @param data.workspaceId * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static workspaceInvite(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/{workspaceId}/invite', path: { workspaceId: data.workspaceId }, body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Kick member * Administrator kicks a user out of a workspace. * @param data The data for the request. * @param data.workspaceId * @param data.targetUserId * @returns unknown Successful response * @throws ApiError */ static workspaceTick(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'DELETE', url: '/workspace/{workspaceId}/tick', path: { workspaceId: data.workspaceId }, query: { targetUserId: data.targetUserId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Update member role * Update workspace member role * @param data The data for the request. * @param data.workspaceId * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static workspaceUpdateMemberRole(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'PATCH', url: '/workspace/{workspaceId}/updateMemberRole', path: { workspaceId: data.workspaceId }, body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get service count * @param data The data for the request. * @param data.workspaceId * @returns unknown Successful response * @throws ApiError */ static workspaceGetServiceCount(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/getServiceCount', path: { workspaceId: data.workspaceId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } } exports.WorkspaceService = WorkspaceService; class WebsiteService { /** * Get online count * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @returns number Successful response * @throws ApiError */ static websiteOnlineCount(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/website/{websiteId}/onlineCount', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get all websites * @param data The data for the request. * @param data.workspaceId * @returns unknown Successful response * @throws ApiError */ static websiteAll(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/website/all', path: { workspaceId: data.workspaceId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get overview * @param data The data for the request. * @param data.workspaceId * @returns number Successful response * @throws ApiError */ static websiteAllOverview(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/website/allOverview', path: { workspaceId: data.workspaceId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get website info * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @returns unknown Successful response * @throws ApiError */ static websiteInfo(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/website/{websiteId}/info', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get stats * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @param data.startAt * @param data.endAt * @param data.unit * @param data.url * @param data.country * @param data.region * @param data.city * @param data.timezone * @param data.referrer * @param data.title * @param data.os * @param data.browser * @param data.device * @returns unknown Successful response * @throws ApiError */ static websiteStats(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/website/{websiteId}/stats', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, query: { startAt: data.startAt, endAt: data.endAt, unit: data.unit, url: data.url, country: data.country, region: data.region, city: data.city, timezone: data.timezone, referrer: data.referrer, title: data.title, os: data.os, browser: data.browser, device: data.device }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get geo stats * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @param data.startAt * @param data.endAt * @returns unknown Successful response * @throws ApiError */ static websiteGeoStats(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/website/{websiteId}/geoStats', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, query: { startAt: data.startAt, endAt: data.endAt }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get pageviews * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @param data.startAt * @param data.endAt * @param data.unit * @param data.url * @param data.country * @param data.region * @param data.city * @param data.timezone * @param data.referrer * @param data.title * @param data.os * @param data.browser * @param data.device * @returns unknown Successful response * @throws ApiError */ static websitePageviews(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/website/{websiteId}/pageviews', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, query: { startAt: data.startAt, endAt: data.endAt, unit: data.unit, url: data.url, country: data.country, region: data.region, city: data.city, timezone: data.timezone, referrer: data.referrer, title: data.title, os: data.os, browser: data.browser, device: data.device }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get metrics * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @param data.type * @param data.startAt * @param data.endAt * @param data.url * @param data.referrer * @param data.title * @param data.os * @param data.browser * @param data.device * @param data.country * @param data.region * @param data.city * @param data.language * @param data.event * @param data.utmSource * @param data.utmMedium * @param data.utmCampaign * @param data.utmTerm * @param data.utmContent * @returns unknown Successful response * @throws ApiError */ static websiteMetrics(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/website/{websiteId}/metrics', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, query: { type: data.type, startAt: data.startAt, endAt: data.endAt, url: data.url, referrer: data.referrer, title: data.title, os: data.os, browser: data.browser, device: data.device, country: data.country, region: data.region, city: data.city, language: data.language, event: data.event, utm_source: data.utmSource, utm_medium: data.utmMedium, utm_campaign: data.utmCampaign, utm_term: data.utmTerm, utm_content: data.utmContent }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Add website * @param data The data for the request. * @param data.workspaceId * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static websiteAdd(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/{workspaceId}/website/add', path: { workspaceId: data.workspaceId }, body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Delete website * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @returns unknown Successful response * @throws ApiError */ static websiteDelete(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'DELETE', url: '/workspace/{workspaceId}/website/{websiteId}', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Update website * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static websiteUpdateInfo(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'PUT', url: '/workspace/{workspaceId}/website/{websiteId}/update', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Generate Lighthouse report * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @param data.requestBody * @returns string Successful response * @throws ApiError */ static websiteGenerateLighthouseReport(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/{workspaceId}/website/{websiteId}/generateLighthouseReport', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Get Lighthouse report * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @param data.limit * @param data.cursor * @returns unknown Successful response * @throws ApiError */ static websiteGetLighthouseReport(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/website/{websiteId}/getLighthouseReport', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, query: { limit: data.limit, cursor: data.cursor }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get Lighthouse JSON * @param data The data for the request. * @param data.lighthouseId * @returns unknown Successful response * @throws ApiError */ static websiteGetLighthouseJson(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/lighthouse/{lighthouseId}', path: { lighthouseId: data.lighthouseId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get public info * @param data The data for the request. * @param data.shareId * @returns unknown Successful response * @throws ApiError */ static websiteGetPublicInfoByShareId(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/website/public/{shareId}/info', path: { shareId: data.shareId }, errors: { 400: 'Invalid input data', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get public stats * @param data The data for the request. * @param data.shareId * @param data.range * @returns unknown Successful response * @throws ApiError */ static websiteGetPublicStatsByShareId(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/website/public/{shareId}/stats', path: { shareId: data.shareId }, query: { range: data.range }, errors: { 400: 'Invalid input data', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get public metrics * @param data The data for the request. * @param data.shareId * @param data.type * @param data.range * @returns unknown Successful response * @throws ApiError */ static websiteGetPublicMetricsByShareId(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/website/public/{shareId}/metrics', path: { shareId: data.shareId }, query: { type: data.type, range: data.range }, errors: { 400: 'Invalid input data', 404: 'Not found', 500: 'Internal server error' } }); } /** * Enable share * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @returns unknown Successful response * @throws ApiError */ static websiteCreateOrEnableShare(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/{workspaceId}/website/{websiteId}/share/enable', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Disable share * @param data The data for the request. * @param data.workspaceId * @param data.websiteId * @returns unknown Successful response * @throws ApiError */ static websiteDisableShare(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/{workspaceId}/website/{websiteId}/share/disable', path: { workspaceId: data.workspaceId, websiteId: data.websiteId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } } exports.WebsiteService = WebsiteService; class MonitorService { /** * Get all monitors * @param data The data for the request. * @param data.workspaceId * @returns unknown Successful response * @throws ApiError */ static monitorAll(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/monitor/all', path: { workspaceId: data.workspaceId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get monitor * @param data The data for the request. * @param data.workspaceId * @param data.monitorId * @returns unknown Successful response * @throws ApiError */ static monitorGet(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'GET', url: '/workspace/{workspaceId}/monitor/{monitorId}/get', path: { workspaceId: data.workspaceId, monitorId: data.monitorId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Get public info * @param data The data for the request. * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static monitorGetPublicInfo(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/monitor/getPublicInfo', body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 500: 'Internal server error' } }); } /** * Upsert monitor * @param data The data for the request. * @param data.workspaceId * @param data.requestBody * @returns unknown Successful response * @throws ApiError */ static monitorUpsert(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/{workspaceId}/monitor/upsert', path: { workspaceId: data.workspaceId }, body: data.requestBody, mediaType: 'application/json', errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Delete monitor * @param data The data for the request. * @param data.workspaceId * @param data.monitorId * @returns unknown Successful response * @throws ApiError */ static monitorDelete(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'DELETE', url: '/workspace/{workspaceId}/monitor/{monitorId}/del', path: { workspaceId: data.workspaceId, monitorId: data.monitorId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 404: 'Not found', 500: 'Internal server error' } }); } /** * Regenerate push token * @param data The data for the request. * @param data.workspaceId * @param data.monitorId * @returns string Successful response * @throws ApiError */ static monitorRegeneratePushToken(data) { return (0, request_1.request)(OpenAPI_1.OpenAPI, { method: 'POST', url: '/workspace/{workspaceId}/monitor/{monitorId}/regeneratePushToken', path: { workspaceId: data.workspaceId, monitorId: data.monitorId }, errors: { 400: 'Invalid input data', 401: 'Authorization not provided', 403: 'Insufficient access', 500: 'Internal server error' } }); } /** * Trigger monitor * @param data The data for the request. * @param data.workspac