tianji-client-sdk
Version:
1,694 lines (1,688 loc) • 141 kB
text/typescript
// This file is auto-generated by @hey-api/openapi-ts
/**
* The error information
*/
export type error_BAD_REQUEST = {
/**
* The error message
*/
message: string;
/**
* The error code
*/
code: string;
/**
* An array of issues that were responsible for the error
*/
issues?: Array<{
message: string;
}>;
};
/**
* The error information
*/
export type error_UNAUTHORIZED = {
/**
* The error message
*/
message: string;
/**
* The error code
*/
code: string;
/**
* An array of issues that were responsible for the error
*/
issues?: Array<{
message: string;
}>;
};
/**
* The error information
*/
export type error_FORBIDDEN = {
/**
* The error message
*/
message: string;
/**
* The error code
*/
code: string;
/**
* An array of issues that were responsible for the error
*/
issues?: Array<{
message: string;
}>;
};
/**
* The error information
*/
export type error_INTERNAL_SERVER_ERROR = {
/**
* The error message
*/
message: string;
/**
* The error code
*/
code: string;
/**
* An array of issues that were responsible for the error
*/
issues?: Array<{
message: string;
}>;
};
/**
* The error information
*/
export type error_NOT_FOUND = {
/**
* The error message
*/
message: string;
/**
* The error code
*/
code: string;
/**
* An array of issues that were responsible for the error
*/
issues?: Array<{
message: string;
}>;
};
export type $OpenApiTs = {
'/ai/classifySurvey': {
post: {
req: {
requestBody: {
workspaceId: string;
surveyId: string;
startAt: number;
endAt: number;
runStrategy: 'skipExist' | 'skipInSuggest' | 'rebuildAll';
languageStrategy?: 'default' | 'user';
payloadContentField: string;
suggestionCategory: Array<(string)>;
};
};
res: {
/**
* Successful response
*/
200: 'ok';
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/ai/translateSurvey': {
post: {
req: {
requestBody: {
workspaceId: string;
surveyId: string;
startAt: number;
endAt: number;
runStrategy: 'skipExist' | 'rebuildAll';
languageStrategy?: 'default' | 'user';
payloadContentField: string;
};
};
res: {
/**
* Successful response
*/
200: 'ok';
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/aiGateway/info': {
get: {
req: {
gatewayId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
id: string;
workspaceId: string;
name: string;
modelApiKey?: string | null;
customModelBaseUrl?: string | null;
customModelName?: string | null;
customModelInputPrice?: number | null;
customModelOutputPrice?: number | null;
createdAt: string;
updatedAt: string;
} | null;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/aiGateway/update': {
patch: {
req: {
requestBody: {
workspaceId: string;
gatewayId: string;
name: string;
modelApiKey: string | null;
customModelBaseUrl: string | null;
customModelName: string | null;
customModelInputPrice: number | null;
customModelOutputPrice: number | null;
};
};
res: {
/**
* Successful response
*/
200: {
id: string;
workspaceId: string;
name: string;
modelApiKey?: string | null;
customModelBaseUrl?: string | null;
customModelName?: string | null;
customModelInputPrice?: number | null;
customModelOutputPrice?: number | null;
createdAt: string;
updatedAt: string;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/aiGateway/delete': {
delete: {
req: {
gatewayId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
id: string;
workspaceId: string;
name: string;
modelApiKey?: string | null;
customModelBaseUrl?: string | null;
customModelName?: string | null;
customModelInputPrice?: number | null;
customModelOutputPrice?: number | null;
createdAt: string;
updatedAt: string;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/aiGateway/logs': {
get: {
req: {
cursor?: string;
gatewayId: string;
limit?: number;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
items: Array<{
id: string;
workspaceId: string;
gatewayId: string;
inputToken: number;
outputToken: number;
stream: boolean;
modelName: string;
status: 'Pending' | 'Success' | 'Failed';
duration: number;
ttft: number;
price: number;
userId?: string | null;
createdAt: string;
updatedAt: string;
requestPayload?: unknown;
responsePayload?: unknown;
}>;
nextCursor?: string;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/aiGateway/all': {
get: {
req: {
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: Array<{
id: string;
workspaceId: string;
name: string;
modelApiKey?: string | null;
customModelBaseUrl?: string | null;
customModelName?: string | null;
customModelInputPrice?: number | null;
customModelOutputPrice?: number | null;
createdAt: string;
updatedAt: string;
}>;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/aiGateway/create': {
post: {
req: {
requestBody: {
name: string;
modelApiKey: string | null;
customModelBaseUrl: string | null;
customModelName: string | null;
customModelInputPrice: number | null;
customModelOutputPrice: number | null;
};
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
id: string;
workspaceId: string;
name: string;
modelApiKey?: string | null;
customModelBaseUrl?: string | null;
customModelName?: string | null;
customModelInputPrice?: number | null;
customModelOutputPrice?: number | null;
createdAt: string;
updatedAt: string;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/application/all': {
get: {
req: {
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: Array<{
id: string;
workspaceId: string;
name: string;
createdAt: string;
updatedAt: string;
deletedAt?: string | null;
}>;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/application/{applicationId}/info': {
get: {
req: {
applicationId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
id: string;
workspaceId: string;
name: string;
createdAt: string;
updatedAt: string;
deletedAt?: string | null;
applicationStoreInfos: Array<{
applicationId: string;
storeType: string;
storeId: string;
appId: string;
title: string;
description: string;
releaseNotes: string;
url: string;
downloads?: number | null;
score?: number | null;
ratingCount?: number | null;
reviews?: number | null;
version?: string | null;
size?: number | null;
createdAt: string;
updatedAt: string;
}>;
} | null;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/application/create': {
post: {
req: {
requestBody: {
name: string;
appstoreId?: string;
playstoreId?: string;
};
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
id: string;
workspaceId: string;
name: string;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/application/{applicationId}/update': {
patch: {
req: {
applicationId: string;
requestBody: {
name: string;
appstoreId?: string;
playstoreId?: string;
};
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
id: string;
workspaceId: string;
name: string;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/application/{applicationId}/delete': {
delete: {
req: {
applicationId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
id: string;
workspaceId: string;
name: string;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/application/storeAppSearch': {
get: {
req: {
keyword: string;
storeType: 'appstore' | 'googleplay';
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: Array<{
id?: string;
appId: string;
title: string;
icon: string;
}>;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/application/{applicationId}/storeInfoHistory': {
get: {
req: {
applicationId: string;
endAt: number;
startAt: number;
storeId?: string;
storeType: 'appstore' | 'googleplay';
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: Array<{
downloads?: number | null;
score?: number | null;
ratingCount?: number | null;
reviews?: number | null;
size?: number | null;
createdAt: string;
}>;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/application/{applicationId}/eventStats': {
get: {
req: {
applicationId: string;
endAt: number;
startAt: number;
timezone?: string;
unit?: 'minute' | 'hour' | 'day' | 'month' | 'year';
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
current: Array<{
date: string;
eventCount: number;
sessionCount: number;
totalTime: number;
avgEventsPerSession: number;
avgScreensPerSession: number;
}>;
previous: Array<{
date: string;
eventCount: number;
sessionCount: number;
totalTime: number;
avgEventsPerSession: number;
avgScreensPerSession: number;
}>;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/global/config': {
get: {
res: {
/**
* Successful response
*/
200: {
allowRegister: boolean;
websiteId?: string;
amapToken?: string;
mapboxToken?: string;
alphaMode: boolean;
disableAnonymousTelemetry: boolean;
customTrackerScriptName?: string;
authProvider: Array<(string)>;
enableBilling: boolean;
enableAI: boolean;
};
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/login': {
post: {
req: {
requestBody: {
username: string;
password: string;
};
};
res: {
/**
* Successful response
*/
200: {
info: {
id: string;
role: string;
username: string;
nickname: string | null;
avatar: string | null;
email: string | null;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
currentWorkspaceId: string | null;
workspaces: Array<{
role: string;
workspace: {
id: string;
name: string;
settings: {
[key: string]: unknown;
};
paused: boolean;
};
}>;
};
token: string;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/loginWithToken': {
post: {
req: {
requestBody: {
token: string;
};
};
res: {
/**
* Successful response
*/
200: {
info: {
id: string;
role: string;
username: string;
nickname: string | null;
avatar: string | null;
email: string | null;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
currentWorkspaceId: string | null;
workspaces: Array<{
role: string;
workspace: {
id: string;
name: string;
settings: {
[key: string]: unknown;
};
paused: boolean;
};
}>;
};
token: string;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/create': {
post: {
req: {
requestBody: {
name: string;
};
};
res: {
/**
* Successful response
*/
200: {
id: string;
role: string;
username: string;
nickname: string | null;
avatar: string | null;
email: string | null;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
currentWorkspaceId: string | null;
workspaces: Array<{
role: string;
workspace: {
id: string;
name: string;
settings: {
[key: string]: unknown;
};
paused: boolean;
};
}>;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/switch': {
post: {
req: {
requestBody: {
workspaceId: string;
};
};
res: {
/**
* Successful response
*/
200: {
id: string;
role: string;
username: string;
nickname: string | null;
avatar: string | null;
email: string | null;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
currentWorkspaceId: string | null;
workspaces: Array<{
role: string;
workspace: {
id: string;
name: string;
settings: {
[key: string]: unknown;
};
paused: boolean;
};
}>;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/rename': {
patch: {
req: {
requestBody: {
workspaceId: string;
name: string;
};
};
res: {
/**
* Successful response
*/
200: {
id: string;
name: string;
settings: {
[key: string]: unknown;
};
paused: boolean;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/del': {
delete: {
req: {
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: unknown;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/members': {
get: {
req: {
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: Array<{
userId: string;
workspaceId: string;
role: string;
createdAt: string;
updatedAt: string;
user: {
username: string;
nickname: string | null;
email: string | null;
emailVerified: string | null;
};
}>;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/updateSettings': {
post: {
req: {
requestBody: {
settings: {
[key: string]: unknown;
};
};
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
id: string;
name: string;
settings: {
[key: string]: unknown;
};
paused: boolean;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/invite': {
post: {
req: {
requestBody: {
emailOrId: string;
role?: 'admin' | 'readOnly';
};
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: unknown;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/tick': {
delete: {
req: {
targetUserId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: unknown;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/updateMemberRole': {
patch: {
req: {
requestBody: {
userId: string;
role: 'owner' | 'admin' | 'readOnly';
};
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: unknown;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/getServiceCount': {
get: {
req: {
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
website: number;
application: number;
monitor: number;
server: number;
telemetry: number;
page: number;
survey: number;
feed: number;
aiGateway: number;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/website/{websiteId}/onlineCount': {
get: {
req: {
websiteId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: number;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/website/all': {
get: {
req: {
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: Array<{
id: string;
workspaceId: string;
name: string;
domain: string | null;
shareId: string | null;
resetAt: string | null;
monitorId: string | null;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
}>;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/website/allOverview': {
get: {
req: {
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
[key: string]: (number);
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/website/{websiteId}/info': {
get: {
req: {
websiteId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
id: string;
workspaceId: string;
name: string;
domain: string | null;
shareId: string | null;
resetAt: string | null;
monitorId: string | null;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
} | null;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/website/{websiteId}/stats': {
get: {
req: {
browser?: string;
city?: string;
country?: string;
device?: string;
endAt: number;
os?: string;
referrer?: string;
region?: string;
startAt: number;
timezone?: string;
title?: string;
unit?: string;
url?: string;
websiteId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
pageviews: {
value: number;
prev: number;
};
uniques: {
value: number;
prev: number;
};
totaltime: {
value: number;
prev: number;
};
bounces: {
value: number;
prev: number;
};
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/website/{websiteId}/geoStats': {
get: {
req: {
endAt: number;
startAt: number;
websiteId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: Array<{
longitude: number;
latitude: number;
count: number;
}>;
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: error_UNAUTHORIZED;
/**
* Insufficient access
*/
403: error_FORBIDDEN;
/**
* Not found
*/
404: error_NOT_FOUND;
/**
* Internal server error
*/
500: error_INTERNAL_SERVER_ERROR;
};
};
};
'/workspace/{workspaceId}/website/{websiteId}/pageviews': {
get: {
req: {
browser?: string;
city?: string;
country?: string;
device?: string;
endAt: number;
os?: string;
referrer?: string;
region?: string;
startAt: number;
timezone?: string;
title?: string;
unit?: string;
url?: string;
websiteId: string;
workspaceId: string;
};
res: {
/**
* Successful response
*/
200: {
pageviews?: unknown;
sessions?: unknown;
};
/**
* Invalid input data
*/
400: error_BAD_REQUEST;
/**
* Authorization not provided
*/
401: er