mtmsdk 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gomtmapi/@tanstack/react-query.gen.d.ts +2883 -0
- package/dist/gomtmapi/@tanstack/react-query.gen.d.ts.map +1 -0
- package/dist/gomtmapi/@tanstack/react-query.gen.js +2990 -0
- package/dist/gomtmapi/@tanstack/react-query.gen.js.map +1 -0
- package/dist/gomtmapi/client/client.d.ts +3 -0
- package/dist/gomtmapi/client/client.d.ts.map +1 -0
- package/dist/gomtmapi/client/client.js +146 -0
- package/dist/gomtmapi/client/client.js.map +1 -0
- package/dist/gomtmapi/client/index.d.ts +8 -0
- package/dist/gomtmapi/client/index.d.ts.map +1 -0
- package/dist/gomtmapi/client/index.js +5 -0
- package/dist/gomtmapi/client/index.js.map +1 -0
- package/dist/gomtmapi/client/types.d.ts +120 -0
- package/dist/gomtmapi/client/types.d.ts.map +1 -0
- package/dist/gomtmapi/client/types.js +2 -0
- package/dist/gomtmapi/client/types.js.map +1 -0
- package/dist/gomtmapi/client/utils.d.ts +46 -0
- package/dist/gomtmapi/client/utils.d.ts.map +1 -0
- package/dist/gomtmapi/client/utils.js +285 -0
- package/dist/gomtmapi/client/utils.js.map +1 -0
- package/dist/gomtmapi/client.gen.d.ts +13 -0
- package/dist/gomtmapi/client.gen.d.ts.map +1 -0
- package/dist/gomtmapi/client.gen.js +4 -0
- package/dist/gomtmapi/client.gen.js.map +1 -0
- package/dist/gomtmapi/core/auth.d.ts +19 -0
- package/dist/gomtmapi/core/auth.d.ts.map +1 -0
- package/dist/gomtmapi/core/auth.js +14 -0
- package/dist/gomtmapi/core/auth.js.map +1 -0
- package/dist/gomtmapi/core/bodySerializer.d.ts +18 -0
- package/dist/gomtmapi/core/bodySerializer.d.ts.map +1 -0
- package/dist/gomtmapi/core/bodySerializer.js +54 -0
- package/dist/gomtmapi/core/bodySerializer.js.map +1 -0
- package/dist/gomtmapi/core/params.d.ts +24 -0
- package/dist/gomtmapi/core/params.d.ts.map +1 -0
- package/dist/gomtmapi/core/params.js +88 -0
- package/dist/gomtmapi/core/params.js.map +1 -0
- package/dist/gomtmapi/core/pathSerializer.d.ts +34 -0
- package/dist/gomtmapi/core/pathSerializer.d.ts.map +1 -0
- package/dist/gomtmapi/core/pathSerializer.js +114 -0
- package/dist/gomtmapi/core/pathSerializer.js.map +1 -0
- package/dist/gomtmapi/core/types.d.ts +74 -0
- package/dist/gomtmapi/core/types.d.ts.map +1 -0
- package/dist/gomtmapi/core/types.js +2 -0
- package/dist/gomtmapi/core/types.js.map +1 -0
- package/dist/gomtmapi/index.d.ts +3 -0
- package/dist/gomtmapi/index.d.ts.map +1 -0
- package/dist/gomtmapi/index.js +4 -0
- package/dist/gomtmapi/index.js.map +1 -0
- package/dist/gomtmapi/schemas.gen.d.ts +4385 -0
- package/dist/gomtmapi/schemas.gen.d.ts.map +1 -0
- package/dist/gomtmapi/schemas.gen.js +4521 -0
- package/dist/gomtmapi/schemas.gen.js.map +1 -0
- package/dist/gomtmapi/sdk.gen.d.ts +574 -0
- package/dist/gomtmapi/sdk.gen.d.ts.map +1 -0
- package/dist/gomtmapi/sdk.gen.js +2259 -0
- package/dist/gomtmapi/sdk.gen.js.map +1 -0
- package/dist/gomtmapi/types.gen.d.ts +6480 -0
- package/dist/gomtmapi/types.gen.d.ts.map +1 -0
- package/dist/gomtmapi/types.gen.js +70 -0
- package/dist/gomtmapi/types.gen.js.map +1 -0
- package/dist/gomtmapi/zod.gen.d.ts +5324 -0
- package/dist/gomtmapi/zod.gen.d.ts.map +1 -0
- package/dist/gomtmapi/zod.gen.js +2534 -0
- package/dist/gomtmapi/zod.gen.js.map +1 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.d.ts +2260 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.js +2413 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.js.map +1 -0
- package/dist/gomtmapi_v2/client/client.d.ts +3 -0
- package/dist/gomtmapi_v2/client/client.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/client.js +146 -0
- package/dist/gomtmapi_v2/client/client.js.map +1 -0
- package/dist/gomtmapi_v2/client/index.d.ts +8 -0
- package/dist/gomtmapi_v2/client/index.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/index.js +5 -0
- package/dist/gomtmapi_v2/client/index.js.map +1 -0
- package/dist/gomtmapi_v2/client/types.d.ts +120 -0
- package/dist/gomtmapi_v2/client/types.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/types.js +2 -0
- package/dist/gomtmapi_v2/client/types.js.map +1 -0
- package/dist/gomtmapi_v2/client/utils.d.ts +46 -0
- package/dist/gomtmapi_v2/client/utils.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/utils.js +285 -0
- package/dist/gomtmapi_v2/client/utils.js.map +1 -0
- package/dist/gomtmapi_v2/client.gen.d.ts +13 -0
- package/dist/gomtmapi_v2/client.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client.gen.js +4 -0
- package/dist/gomtmapi_v2/client.gen.js.map +1 -0
- package/dist/gomtmapi_v2/core/auth.d.ts +19 -0
- package/dist/gomtmapi_v2/core/auth.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/auth.js +14 -0
- package/dist/gomtmapi_v2/core/auth.js.map +1 -0
- package/dist/gomtmapi_v2/core/bodySerializer.d.ts +18 -0
- package/dist/gomtmapi_v2/core/bodySerializer.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/bodySerializer.js +54 -0
- package/dist/gomtmapi_v2/core/bodySerializer.js.map +1 -0
- package/dist/gomtmapi_v2/core/params.d.ts +24 -0
- package/dist/gomtmapi_v2/core/params.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/params.js +88 -0
- package/dist/gomtmapi_v2/core/params.js.map +1 -0
- package/dist/gomtmapi_v2/core/pathSerializer.d.ts +34 -0
- package/dist/gomtmapi_v2/core/pathSerializer.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/pathSerializer.js +114 -0
- package/dist/gomtmapi_v2/core/pathSerializer.js.map +1 -0
- package/dist/gomtmapi_v2/core/types.d.ts +74 -0
- package/dist/gomtmapi_v2/core/types.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/types.js +2 -0
- package/dist/gomtmapi_v2/core/types.js.map +1 -0
- package/dist/gomtmapi_v2/index.d.ts +3 -0
- package/dist/gomtmapi_v2/index.d.ts.map +1 -0
- package/dist/gomtmapi_v2/index.js +4 -0
- package/dist/gomtmapi_v2/index.js.map +1 -0
- package/dist/gomtmapi_v2/schemas.gen.d.ts +2371 -0
- package/dist/gomtmapi_v2/schemas.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/schemas.gen.js +2372 -0
- package/dist/gomtmapi_v2/schemas.gen.js.map +1 -0
- package/dist/gomtmapi_v2/sdk.gen.d.ts +974 -0
- package/dist/gomtmapi_v2/sdk.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/sdk.gen.js +1345 -0
- package/dist/gomtmapi_v2/sdk.gen.js.map +1 -0
- package/dist/gomtmapi_v2/types.gen.d.ts +2964 -0
- package/dist/gomtmapi_v2/types.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/types.gen.js +3 -0
- package/dist/gomtmapi_v2/types.gen.js.map +1 -0
- package/dist/gomtmapi_v2/zod.gen.d.ts +2327 -0
- package/dist/gomtmapi_v2/zod.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/zod.gen.js +1768 -0
- package/dist/gomtmapi_v2/zod.gen.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/adk-utils.d.ts +24 -0
- package/dist/lib/adk-utils.d.ts.map +1 -0
- package/dist/lib/adk-utils.js +51 -0
- package/dist/lib/adk-utils.js.map +1 -0
- package/dist/lib/constants.d.ts +40 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +40 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/d1-utils.d.ts +5 -0
- package/dist/lib/d1-utils.d.ts.map +1 -0
- package/dist/lib/d1-utils.js +36 -0
- package/dist/lib/d1-utils.js.map +1 -0
- package/dist/lib/get-query-client.d.ts +3 -0
- package/dist/lib/get-query-client.d.ts.map +1 -0
- package/dist/lib/get-query-client.js +43 -0
- package/dist/lib/get-query-client.js.map +1 -0
- package/dist/lib/mtmutils.d.ts +2 -0
- package/dist/lib/mtmutils.d.ts.map +1 -0
- package/dist/lib/mtmutils.js +9 -0
- package/dist/lib/mtmutils.js.map +1 -0
- package/dist/mtgate_api/zod.gen.d.ts +48 -48
- package/dist/mtmai_api/@tanstack/react-query.gen.d.ts +1286 -0
- package/dist/mtmai_api/@tanstack/react-query.gen.d.ts.map +1 -0
- package/dist/mtmai_api/@tanstack/react-query.gen.js +1321 -0
- package/dist/mtmai_api/@tanstack/react-query.gen.js.map +1 -0
- package/dist/mtmai_api/client/client.d.ts +3 -0
- package/dist/mtmai_api/client/client.d.ts.map +1 -0
- package/dist/mtmai_api/client/client.js +146 -0
- package/dist/mtmai_api/client/client.js.map +1 -0
- package/dist/mtmai_api/client/index.d.ts +8 -0
- package/dist/mtmai_api/client/index.d.ts.map +1 -0
- package/dist/mtmai_api/client/index.js +5 -0
- package/dist/mtmai_api/client/index.js.map +1 -0
- package/dist/mtmai_api/client/types.d.ts +120 -0
- package/dist/mtmai_api/client/types.d.ts.map +1 -0
- package/dist/mtmai_api/client/types.js +2 -0
- package/dist/mtmai_api/client/types.js.map +1 -0
- package/dist/mtmai_api/client/utils.d.ts +46 -0
- package/dist/mtmai_api/client/utils.d.ts.map +1 -0
- package/dist/mtmai_api/client/utils.js +285 -0
- package/dist/mtmai_api/client/utils.js.map +1 -0
- package/dist/mtmai_api/client.gen.d.ts +13 -0
- package/dist/mtmai_api/client.gen.d.ts.map +1 -0
- package/dist/mtmai_api/client.gen.js +4 -0
- package/dist/mtmai_api/client.gen.js.map +1 -0
- package/dist/mtmai_api/core/auth.d.ts +19 -0
- package/dist/mtmai_api/core/auth.d.ts.map +1 -0
- package/dist/mtmai_api/core/auth.js +14 -0
- package/dist/mtmai_api/core/auth.js.map +1 -0
- package/dist/mtmai_api/core/bodySerializer.d.ts +18 -0
- package/dist/mtmai_api/core/bodySerializer.d.ts.map +1 -0
- package/dist/mtmai_api/core/bodySerializer.js +54 -0
- package/dist/mtmai_api/core/bodySerializer.js.map +1 -0
- package/dist/mtmai_api/core/params.d.ts +24 -0
- package/dist/mtmai_api/core/params.d.ts.map +1 -0
- package/dist/mtmai_api/core/params.js +88 -0
- package/dist/mtmai_api/core/params.js.map +1 -0
- package/dist/mtmai_api/core/pathSerializer.d.ts +34 -0
- package/dist/mtmai_api/core/pathSerializer.d.ts.map +1 -0
- package/dist/mtmai_api/core/pathSerializer.js +114 -0
- package/dist/mtmai_api/core/pathSerializer.js.map +1 -0
- package/dist/mtmai_api/core/types.d.ts +74 -0
- package/dist/mtmai_api/core/types.d.ts.map +1 -0
- package/dist/mtmai_api/core/types.js +2 -0
- package/dist/mtmai_api/core/types.js.map +1 -0
- package/dist/mtmai_api/index.d.ts +3 -0
- package/dist/mtmai_api/index.d.ts.map +1 -0
- package/dist/mtmai_api/index.js +4 -0
- package/dist/mtmai_api/index.js.map +1 -0
- package/dist/mtmai_api/schemas.gen.d.ts +7364 -0
- package/dist/mtmai_api/schemas.gen.d.ts.map +1 -0
- package/dist/mtmai_api/schemas.gen.js +9574 -0
- package/dist/mtmai_api/schemas.gen.js.map +1 -0
- package/dist/mtmai_api/sdk.gen.d.ts +264 -0
- package/dist/mtmai_api/sdk.gen.d.ts.map +1 -0
- package/dist/mtmai_api/sdk.gen.js +598 -0
- package/dist/mtmai_api/sdk.gen.js.map +1 -0
- package/dist/mtmai_api/types.gen.d.ts +6376 -0
- package/dist/mtmai_api/types.gen.d.ts.map +1 -0
- package/dist/mtmai_api/types.gen.js +240 -0
- package/dist/mtmai_api/types.gen.js.map +1 -0
- package/dist/mtmai_api/zod.gen.d.ts +35067 -0
- package/dist/mtmai_api/zod.gen.d.ts.map +1 -0
- package/dist/mtmai_api/zod.gen.js +2930 -0
- package/dist/mtmai_api/zod.gen.js.map +1 -0
- package/dist/store/MtmsdkProvider.d.ts +15 -0
- package/dist/store/MtmsdkProvider.d.ts.map +1 -0
- package/dist/store/MtmsdkProvider.js +50 -0
- package/dist/store/MtmsdkProvider.js.map +1 -0
- package/dist/store/ReactQueryApiV2Provider.d.ts +10 -0
- package/dist/store/ReactQueryApiV2Provider.d.ts.map +1 -0
- package/dist/store/ReactQueryApiV2Provider.js +24 -0
- package/dist/store/ReactQueryApiV2Provider.js.map +1 -0
- package/dist/store/ReactQueryCfApiProvider.d.ts +9 -0
- package/dist/store/ReactQueryCfApiProvider.d.ts.map +1 -0
- package/dist/store/ReactQueryCfApiProvider.js +26 -0
- package/dist/store/ReactQueryCfApiProvider.js.map +1 -0
- package/dist/store/ReactQueryMtmaiApiProvider.d.ts +10 -0
- package/dist/store/ReactQueryMtmaiApiProvider.d.ts.map +1 -0
- package/dist/store/ReactQueryMtmaiApiProvider.js +23 -0
- package/dist/store/ReactQueryMtmaiApiProvider.js.map +1 -0
- package/dist/store/ReactQueryProvider.d.ts +10 -0
- package/dist/store/ReactQueryProvider.d.ts.map +1 -0
- package/dist/store/ReactQueryProvider.js +24 -0
- package/dist/store/ReactQueryProvider.js.map +1 -0
- package/package.json +69 -15
|
@@ -0,0 +1,4521 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
export const HealthStatusSchema = {
|
|
3
|
+
type: "object",
|
|
4
|
+
properties: {
|
|
5
|
+
status: {
|
|
6
|
+
type: "string",
|
|
7
|
+
description: "Overall health status",
|
|
8
|
+
example: "healthy",
|
|
9
|
+
enum: ["healthy", "unhealthy", "degraded"],
|
|
10
|
+
},
|
|
11
|
+
version: {
|
|
12
|
+
type: "string",
|
|
13
|
+
description: "API version",
|
|
14
|
+
example: "1.0.0",
|
|
15
|
+
},
|
|
16
|
+
timestamp: {
|
|
17
|
+
type: "string",
|
|
18
|
+
format: "date-time",
|
|
19
|
+
description: "Health check timestamp",
|
|
20
|
+
example: "2024-01-01T12:00:00Z",
|
|
21
|
+
},
|
|
22
|
+
services: {
|
|
23
|
+
type: "object",
|
|
24
|
+
description: "Status of individual services",
|
|
25
|
+
properties: {
|
|
26
|
+
database: {
|
|
27
|
+
type: "string",
|
|
28
|
+
enum: ["healthy", "unhealthy"],
|
|
29
|
+
example: "healthy",
|
|
30
|
+
},
|
|
31
|
+
repository: {
|
|
32
|
+
type: "string",
|
|
33
|
+
enum: ["healthy", "unhealthy"],
|
|
34
|
+
example: "healthy",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
additionalProperties: {
|
|
38
|
+
type: "string",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
uptime: {
|
|
42
|
+
type: "integer",
|
|
43
|
+
format: "int64",
|
|
44
|
+
description: "Service uptime in seconds",
|
|
45
|
+
example: 3600,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
required: ["status", "version", "timestamp"],
|
|
49
|
+
};
|
|
50
|
+
export const APIErrorSchema = {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
code: {
|
|
54
|
+
type: "integer",
|
|
55
|
+
description: "a custom Hatchet error code",
|
|
56
|
+
format: "uint64",
|
|
57
|
+
example: 1400,
|
|
58
|
+
},
|
|
59
|
+
field: {
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "the field that this error is associated with, if applicable",
|
|
62
|
+
example: "name",
|
|
63
|
+
},
|
|
64
|
+
description: {
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "a description for this error",
|
|
67
|
+
example: "A descriptive error message",
|
|
68
|
+
},
|
|
69
|
+
docs_link: {
|
|
70
|
+
type: "string",
|
|
71
|
+
description: "a link to the documentation for this error, if it exists",
|
|
72
|
+
example: "github.com/hatchet-dev/hatchet",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
required: ["description"],
|
|
76
|
+
};
|
|
77
|
+
export const APIErrorsSchema = {
|
|
78
|
+
type: "object",
|
|
79
|
+
properties: {
|
|
80
|
+
errors: {
|
|
81
|
+
type: "array",
|
|
82
|
+
items: {
|
|
83
|
+
$ref: "#/components/schemas/APIError",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
required: ["errors"],
|
|
88
|
+
};
|
|
89
|
+
export const APIMetaAuthSchema = {
|
|
90
|
+
type: "object",
|
|
91
|
+
properties: {
|
|
92
|
+
schemes: {
|
|
93
|
+
items: {
|
|
94
|
+
type: "string",
|
|
95
|
+
},
|
|
96
|
+
type: "array",
|
|
97
|
+
description: "the supported types of authentication",
|
|
98
|
+
example: ["basic", "google"],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
export const APIMetaPosthogSchema = {
|
|
103
|
+
type: "object",
|
|
104
|
+
properties: {
|
|
105
|
+
apiKey: {
|
|
106
|
+
type: "string",
|
|
107
|
+
description: "the PostHog API key",
|
|
108
|
+
example: "phk_1234567890abcdef",
|
|
109
|
+
},
|
|
110
|
+
apiHost: {
|
|
111
|
+
type: "string",
|
|
112
|
+
description: "the PostHog API host",
|
|
113
|
+
example: "https://posthog.example.com",
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
export const APIMetaSchema = {
|
|
118
|
+
type: "object",
|
|
119
|
+
properties: {
|
|
120
|
+
auth: {
|
|
121
|
+
$ref: "#/components/schemas/APIMetaAuth",
|
|
122
|
+
},
|
|
123
|
+
pylonAppId: {
|
|
124
|
+
type: "string",
|
|
125
|
+
description: "the Pylon app ID for usepylon.com chat support",
|
|
126
|
+
example: "12345678-1234-1234-1234-123456789012",
|
|
127
|
+
},
|
|
128
|
+
posthog: {
|
|
129
|
+
$ref: "#/components/schemas/APIMetaPosthog",
|
|
130
|
+
},
|
|
131
|
+
allowSignup: {
|
|
132
|
+
type: "boolean",
|
|
133
|
+
description: "whether or not users can sign up for this instance",
|
|
134
|
+
example: true,
|
|
135
|
+
},
|
|
136
|
+
allowInvites: {
|
|
137
|
+
type: "boolean",
|
|
138
|
+
description: "whether or not users can invite other users to this instance",
|
|
139
|
+
example: true,
|
|
140
|
+
},
|
|
141
|
+
allowCreateTenant: {
|
|
142
|
+
type: "boolean",
|
|
143
|
+
description: "whether or not users can create new tenants",
|
|
144
|
+
example: true,
|
|
145
|
+
},
|
|
146
|
+
allowChangePassword: {
|
|
147
|
+
type: "boolean",
|
|
148
|
+
description: "whether or not users can change their password",
|
|
149
|
+
example: true,
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
export const APIMetaIntegrationSchema = {
|
|
154
|
+
type: "object",
|
|
155
|
+
properties: {
|
|
156
|
+
name: {
|
|
157
|
+
type: "string",
|
|
158
|
+
description: "the name of the integration",
|
|
159
|
+
example: "github",
|
|
160
|
+
},
|
|
161
|
+
enabled: {
|
|
162
|
+
type: "boolean",
|
|
163
|
+
description: "whether this integration is enabled on the instance",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
required: ["name", "enabled"],
|
|
167
|
+
};
|
|
168
|
+
export const ListAPIMetaIntegrationSchema = {
|
|
169
|
+
type: "array",
|
|
170
|
+
items: {
|
|
171
|
+
$ref: "#/components/schemas/APIMetaIntegration",
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
export const UserLoginRequestSchema = {
|
|
175
|
+
properties: {
|
|
176
|
+
email: {
|
|
177
|
+
type: "string",
|
|
178
|
+
format: "email",
|
|
179
|
+
description: "The email address of the user.",
|
|
180
|
+
"x-oapi-codegen-extra-tags": {
|
|
181
|
+
validate: "required,email",
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
password: {
|
|
185
|
+
type: "string",
|
|
186
|
+
description: "The password of the user.",
|
|
187
|
+
"x-oapi-codegen-extra-tags": {
|
|
188
|
+
validate: "required",
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
required: ["email", "password"],
|
|
193
|
+
type: "object",
|
|
194
|
+
};
|
|
195
|
+
export const APIResourceMetaSchema = {
|
|
196
|
+
properties: {
|
|
197
|
+
id: {
|
|
198
|
+
type: "string",
|
|
199
|
+
description: "the id of this resource, in UUID format",
|
|
200
|
+
example: "bb214807-246e-43a5-a25d-41761d1cff9e",
|
|
201
|
+
minLength: 0,
|
|
202
|
+
maxLength: 36,
|
|
203
|
+
},
|
|
204
|
+
createdAt: {
|
|
205
|
+
type: "string",
|
|
206
|
+
description: "the time that this resource was created",
|
|
207
|
+
format: "date-time",
|
|
208
|
+
example: "2022-12-13T15:06:48.888358-05:00",
|
|
209
|
+
},
|
|
210
|
+
updatedAt: {
|
|
211
|
+
type: "string",
|
|
212
|
+
description: "the time that this resource was last updated",
|
|
213
|
+
format: "date-time",
|
|
214
|
+
example: "2022-12-13T15:06:48.888358-05:00",
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
required: ["id", "createdAt", "updatedAt"],
|
|
218
|
+
};
|
|
219
|
+
export const UserRoleSchema = {
|
|
220
|
+
type: "string",
|
|
221
|
+
enum: ["USER", "ADMIN", "SUPER_ADMIN"],
|
|
222
|
+
description: "User role in the system",
|
|
223
|
+
};
|
|
224
|
+
export const UserSchema = {
|
|
225
|
+
properties: {
|
|
226
|
+
metadata: {
|
|
227
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
228
|
+
},
|
|
229
|
+
name: {
|
|
230
|
+
type: "string",
|
|
231
|
+
description: "The display name of the user.",
|
|
232
|
+
},
|
|
233
|
+
email: {
|
|
234
|
+
type: "string",
|
|
235
|
+
format: "email",
|
|
236
|
+
description: "The email address of the user.",
|
|
237
|
+
},
|
|
238
|
+
emailVerified: {
|
|
239
|
+
type: "boolean",
|
|
240
|
+
description: "Whether the user has verified their email address.",
|
|
241
|
+
},
|
|
242
|
+
hasPassword: {
|
|
243
|
+
type: "boolean",
|
|
244
|
+
description: "Whether the user has a password set.",
|
|
245
|
+
},
|
|
246
|
+
emailHash: {
|
|
247
|
+
type: "string",
|
|
248
|
+
description: "A hash of the user's email address for use with Pylon Support Chat",
|
|
249
|
+
},
|
|
250
|
+
userToken: {
|
|
251
|
+
type: "string",
|
|
252
|
+
description: "The user's token for use with Pylon Support Chat",
|
|
253
|
+
},
|
|
254
|
+
avatarUrl: {
|
|
255
|
+
type: "string",
|
|
256
|
+
description: "The user's avatar URL, typically from OAuth provider like GitHub",
|
|
257
|
+
},
|
|
258
|
+
role: {
|
|
259
|
+
$ref: "#/components/schemas/UserRole",
|
|
260
|
+
description: "The user's role in the system",
|
|
261
|
+
default: "USER",
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
required: ["metadata", "email", "emailVerified", "userToken", "role"],
|
|
265
|
+
type: "object",
|
|
266
|
+
};
|
|
267
|
+
export const PaginationResponseSchema = {
|
|
268
|
+
type: "object",
|
|
269
|
+
properties: {
|
|
270
|
+
current_page: {
|
|
271
|
+
type: "integer",
|
|
272
|
+
description: "the current page",
|
|
273
|
+
format: "int64",
|
|
274
|
+
example: 2,
|
|
275
|
+
},
|
|
276
|
+
next_page: {
|
|
277
|
+
type: "integer",
|
|
278
|
+
description: "the next page",
|
|
279
|
+
format: "int64",
|
|
280
|
+
example: 3,
|
|
281
|
+
},
|
|
282
|
+
num_pages: {
|
|
283
|
+
type: "integer",
|
|
284
|
+
description: "the total number of pages for listing",
|
|
285
|
+
format: "int64",
|
|
286
|
+
example: 10,
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
example: {
|
|
290
|
+
next_page: 3,
|
|
291
|
+
num_pages: 10,
|
|
292
|
+
current_page: 2,
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
export const TenantAlertEmailGroupSchema = {
|
|
296
|
+
properties: {
|
|
297
|
+
metadata: {
|
|
298
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
299
|
+
},
|
|
300
|
+
emails: {
|
|
301
|
+
type: "array",
|
|
302
|
+
items: {
|
|
303
|
+
type: "string",
|
|
304
|
+
},
|
|
305
|
+
description: "A list of emails for users",
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
required: ["metadata", "emails"],
|
|
309
|
+
type: "object",
|
|
310
|
+
};
|
|
311
|
+
export const TenantAlertEmailGroupListSchema = {
|
|
312
|
+
properties: {
|
|
313
|
+
pagination: {
|
|
314
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
315
|
+
},
|
|
316
|
+
rows: {
|
|
317
|
+
items: {
|
|
318
|
+
$ref: "#/components/schemas/TenantAlertEmailGroup",
|
|
319
|
+
},
|
|
320
|
+
type: "array",
|
|
321
|
+
"x-go-name": "Rows",
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
};
|
|
325
|
+
export const CreateTenantAlertEmailGroupRequestSchema = {
|
|
326
|
+
properties: {
|
|
327
|
+
emails: {
|
|
328
|
+
type: "array",
|
|
329
|
+
items: {
|
|
330
|
+
type: "string",
|
|
331
|
+
},
|
|
332
|
+
description: "A list of emails for users",
|
|
333
|
+
"x-oapi-codegen-extra-tags": {
|
|
334
|
+
validate: "required,dive,email",
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
required: ["emails"],
|
|
339
|
+
type: "object",
|
|
340
|
+
};
|
|
341
|
+
export const TenantResourceSchema = {
|
|
342
|
+
enum: [
|
|
343
|
+
"WORKER",
|
|
344
|
+
"WORKER_SLOT",
|
|
345
|
+
"WORKFLOW_RUN",
|
|
346
|
+
"TASK_RUN",
|
|
347
|
+
"CRON",
|
|
348
|
+
"SCHEDULE",
|
|
349
|
+
],
|
|
350
|
+
type: "string",
|
|
351
|
+
};
|
|
352
|
+
export const TenantResourceLimitSchema = {
|
|
353
|
+
properties: {
|
|
354
|
+
metadata: {
|
|
355
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
356
|
+
},
|
|
357
|
+
resource: {
|
|
358
|
+
$ref: "#/components/schemas/TenantResource",
|
|
359
|
+
description: "The resource associated with this limit.",
|
|
360
|
+
},
|
|
361
|
+
limitValue: {
|
|
362
|
+
type: "integer",
|
|
363
|
+
description: "The limit associated with this limit.",
|
|
364
|
+
},
|
|
365
|
+
alarmValue: {
|
|
366
|
+
type: "integer",
|
|
367
|
+
description: "The alarm value associated with this limit to warn of approaching limit value.",
|
|
368
|
+
},
|
|
369
|
+
value: {
|
|
370
|
+
type: "integer",
|
|
371
|
+
description: "The current value associated with this limit.",
|
|
372
|
+
},
|
|
373
|
+
window: {
|
|
374
|
+
type: "string",
|
|
375
|
+
description: "The meter window for the limit. (i.e. 1 day, 1 week, 1 month)",
|
|
376
|
+
},
|
|
377
|
+
lastRefill: {
|
|
378
|
+
type: "string",
|
|
379
|
+
description: "The last time the limit was refilled.",
|
|
380
|
+
format: "date-time",
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
required: ["metadata", "tenantId", "resource", "limitValue", "value"],
|
|
384
|
+
type: "object",
|
|
385
|
+
};
|
|
386
|
+
export const TenantResourcePolicySchema = {
|
|
387
|
+
properties: {
|
|
388
|
+
limits: {
|
|
389
|
+
type: "array",
|
|
390
|
+
items: {
|
|
391
|
+
$ref: "#/components/schemas/TenantResourceLimit",
|
|
392
|
+
},
|
|
393
|
+
description: "A list of resource limits for the tenant.",
|
|
394
|
+
},
|
|
395
|
+
},
|
|
396
|
+
required: ["limits"],
|
|
397
|
+
type: "object",
|
|
398
|
+
};
|
|
399
|
+
export const UpdateTenantAlertEmailGroupRequestSchema = {
|
|
400
|
+
properties: {
|
|
401
|
+
emails: {
|
|
402
|
+
type: "array",
|
|
403
|
+
items: {
|
|
404
|
+
type: "string",
|
|
405
|
+
},
|
|
406
|
+
description: "A list of emails for users",
|
|
407
|
+
"x-oapi-codegen-extra-tags": {
|
|
408
|
+
validate: "required,dive,email",
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
required: ["emails"],
|
|
413
|
+
type: "object",
|
|
414
|
+
};
|
|
415
|
+
export const UserChangePasswordRequestSchema = {
|
|
416
|
+
properties: {
|
|
417
|
+
password: {
|
|
418
|
+
type: "string",
|
|
419
|
+
description: "The password of the user.",
|
|
420
|
+
"x-oapi-codegen-extra-tags": {
|
|
421
|
+
validate: "required,password",
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
newPassword: {
|
|
425
|
+
type: "string",
|
|
426
|
+
description: "The new password for the user.",
|
|
427
|
+
"x-oapi-codegen-extra-tags": {
|
|
428
|
+
validate: "required,password",
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
required: ["password", "newPassword"],
|
|
433
|
+
type: "object",
|
|
434
|
+
};
|
|
435
|
+
export const UserRegisterRequestSchema = {
|
|
436
|
+
properties: {
|
|
437
|
+
name: {
|
|
438
|
+
type: "string",
|
|
439
|
+
description: "The name of the user (optional).",
|
|
440
|
+
},
|
|
441
|
+
email: {
|
|
442
|
+
type: "string",
|
|
443
|
+
format: "email",
|
|
444
|
+
description: "The email address of the user.",
|
|
445
|
+
"x-oapi-codegen-extra-tags": {
|
|
446
|
+
validate: "required,email",
|
|
447
|
+
},
|
|
448
|
+
},
|
|
449
|
+
password: {
|
|
450
|
+
type: "string",
|
|
451
|
+
description: "The password of the user.",
|
|
452
|
+
"x-oapi-codegen-extra-tags": {
|
|
453
|
+
validate: "required,password",
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
required: ["email", "password"],
|
|
458
|
+
type: "object",
|
|
459
|
+
};
|
|
460
|
+
export const UserTenantPublicSchema = {
|
|
461
|
+
properties: {
|
|
462
|
+
email: {
|
|
463
|
+
type: "string",
|
|
464
|
+
format: "email",
|
|
465
|
+
description: "The email address of the user.",
|
|
466
|
+
},
|
|
467
|
+
name: {
|
|
468
|
+
type: "string",
|
|
469
|
+
description: "The display name of the user.",
|
|
470
|
+
},
|
|
471
|
+
},
|
|
472
|
+
required: ["email"],
|
|
473
|
+
type: "object",
|
|
474
|
+
};
|
|
475
|
+
export const TenantMemberRoleSchema = {
|
|
476
|
+
enum: ["OWNER", "ADMIN", "MEMBER"],
|
|
477
|
+
type: "string",
|
|
478
|
+
};
|
|
479
|
+
export const TenantSchema = {
|
|
480
|
+
properties: {
|
|
481
|
+
metadata: {
|
|
482
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
483
|
+
},
|
|
484
|
+
name: {
|
|
485
|
+
type: "string",
|
|
486
|
+
description: "The name of the tenant.",
|
|
487
|
+
},
|
|
488
|
+
slug: {
|
|
489
|
+
type: "string",
|
|
490
|
+
description: "The slug of the tenant.",
|
|
491
|
+
},
|
|
492
|
+
analyticsOptOut: {
|
|
493
|
+
type: "boolean",
|
|
494
|
+
description: "Whether the tenant has opted out of analytics.",
|
|
495
|
+
},
|
|
496
|
+
alertMemberEmails: {
|
|
497
|
+
type: "boolean",
|
|
498
|
+
description: "Whether to alert tenant members.",
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
required: ["metadata", "name", "slug"],
|
|
502
|
+
};
|
|
503
|
+
export const TenantMemberSchema = {
|
|
504
|
+
properties: {
|
|
505
|
+
metadata: {
|
|
506
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
507
|
+
},
|
|
508
|
+
user: {
|
|
509
|
+
$ref: "#/components/schemas/UserTenantPublic",
|
|
510
|
+
description: "The user associated with this tenant member.",
|
|
511
|
+
},
|
|
512
|
+
role: {
|
|
513
|
+
$ref: "#/components/schemas/TenantMemberRole",
|
|
514
|
+
description: "The role of the user in the tenant.",
|
|
515
|
+
},
|
|
516
|
+
tenant: {
|
|
517
|
+
$ref: "#/components/schemas/Tenant",
|
|
518
|
+
description: "The tenant associated with this tenant member.",
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
required: ["metadata", "user", "role"],
|
|
522
|
+
type: "object",
|
|
523
|
+
};
|
|
524
|
+
export const UserTenantMembershipsListSchema = {
|
|
525
|
+
properties: {
|
|
526
|
+
pagination: {
|
|
527
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
528
|
+
},
|
|
529
|
+
rows: {
|
|
530
|
+
items: {
|
|
531
|
+
$ref: "#/components/schemas/TenantMember",
|
|
532
|
+
},
|
|
533
|
+
type: "array",
|
|
534
|
+
"x-go-name": "Rows",
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
};
|
|
538
|
+
export const TenantInviteSchema = {
|
|
539
|
+
properties: {
|
|
540
|
+
metadata: {
|
|
541
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
542
|
+
},
|
|
543
|
+
email: {
|
|
544
|
+
type: "string",
|
|
545
|
+
description: "The email of the user to invite.",
|
|
546
|
+
},
|
|
547
|
+
role: {
|
|
548
|
+
$ref: "#/components/schemas/TenantMemberRole",
|
|
549
|
+
description: "The role of the user in the tenant.",
|
|
550
|
+
},
|
|
551
|
+
tenantId: {
|
|
552
|
+
type: "string",
|
|
553
|
+
description: "The tenant id associated with this tenant invite.",
|
|
554
|
+
},
|
|
555
|
+
tenantName: {
|
|
556
|
+
type: "string",
|
|
557
|
+
description: "The tenant name for the tenant.",
|
|
558
|
+
},
|
|
559
|
+
expires: {
|
|
560
|
+
type: "string",
|
|
561
|
+
description: "The time that this invite expires.",
|
|
562
|
+
format: "date-time",
|
|
563
|
+
},
|
|
564
|
+
},
|
|
565
|
+
required: ["metadata", "email", "role", "expires", "tenantId"],
|
|
566
|
+
type: "object",
|
|
567
|
+
};
|
|
568
|
+
export const TenantInviteListSchema = {
|
|
569
|
+
properties: {
|
|
570
|
+
pagination: {
|
|
571
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
572
|
+
},
|
|
573
|
+
rows: {
|
|
574
|
+
items: {
|
|
575
|
+
$ref: "#/components/schemas/TenantInvite",
|
|
576
|
+
},
|
|
577
|
+
type: "array",
|
|
578
|
+
"x-go-name": "Rows",
|
|
579
|
+
},
|
|
580
|
+
},
|
|
581
|
+
};
|
|
582
|
+
export const AcceptInviteRequestSchema = {
|
|
583
|
+
properties: {
|
|
584
|
+
invite: {
|
|
585
|
+
type: "string",
|
|
586
|
+
example: "bb214807-246e-43a5-a25d-41761d1cff9e",
|
|
587
|
+
minLength: 36,
|
|
588
|
+
maxLength: 36,
|
|
589
|
+
"x-oapi-codegen-extra-tags": {
|
|
590
|
+
validate: "required,uuid",
|
|
591
|
+
},
|
|
592
|
+
},
|
|
593
|
+
},
|
|
594
|
+
required: ["invite"],
|
|
595
|
+
type: "object",
|
|
596
|
+
};
|
|
597
|
+
export const RejectInviteRequestSchema = {
|
|
598
|
+
properties: {
|
|
599
|
+
invite: {
|
|
600
|
+
type: "string",
|
|
601
|
+
example: "bb214807-246e-43a5-a25d-41761d1cff9e",
|
|
602
|
+
minLength: 36,
|
|
603
|
+
maxLength: 36,
|
|
604
|
+
"x-oapi-codegen-extra-tags": {
|
|
605
|
+
validate: "required,uuid",
|
|
606
|
+
},
|
|
607
|
+
},
|
|
608
|
+
},
|
|
609
|
+
required: ["invite"],
|
|
610
|
+
type: "object",
|
|
611
|
+
};
|
|
612
|
+
export const GitHubRepositorySchema = {
|
|
613
|
+
properties: {
|
|
614
|
+
id: {
|
|
615
|
+
type: "integer",
|
|
616
|
+
description: "The GitHub repository ID",
|
|
617
|
+
},
|
|
618
|
+
name: {
|
|
619
|
+
type: "string",
|
|
620
|
+
description: "The repository name",
|
|
621
|
+
},
|
|
622
|
+
fullName: {
|
|
623
|
+
type: "string",
|
|
624
|
+
description: "The full repository name (owner/repo)",
|
|
625
|
+
},
|
|
626
|
+
htmlUrl: {
|
|
627
|
+
type: "string",
|
|
628
|
+
format: "uri",
|
|
629
|
+
description: "The repository HTML URL",
|
|
630
|
+
},
|
|
631
|
+
cloneUrl: {
|
|
632
|
+
type: "string",
|
|
633
|
+
format: "uri",
|
|
634
|
+
description: "The repository clone URL",
|
|
635
|
+
},
|
|
636
|
+
private: {
|
|
637
|
+
type: "boolean",
|
|
638
|
+
description: "Whether the repository is private",
|
|
639
|
+
},
|
|
640
|
+
description: {
|
|
641
|
+
type: "string",
|
|
642
|
+
description: "The repository description",
|
|
643
|
+
nullable: true,
|
|
644
|
+
},
|
|
645
|
+
language: {
|
|
646
|
+
type: "string",
|
|
647
|
+
description: "The primary programming language",
|
|
648
|
+
nullable: true,
|
|
649
|
+
},
|
|
650
|
+
stargazersCount: {
|
|
651
|
+
type: "integer",
|
|
652
|
+
description: "Number of stars",
|
|
653
|
+
},
|
|
654
|
+
forksCount: {
|
|
655
|
+
type: "integer",
|
|
656
|
+
description: "Number of forks",
|
|
657
|
+
},
|
|
658
|
+
updatedAt: {
|
|
659
|
+
type: "string",
|
|
660
|
+
format: "date-time",
|
|
661
|
+
description: "Last updated timestamp",
|
|
662
|
+
},
|
|
663
|
+
},
|
|
664
|
+
required: [
|
|
665
|
+
"id",
|
|
666
|
+
"name",
|
|
667
|
+
"fullName",
|
|
668
|
+
"htmlUrl",
|
|
669
|
+
"cloneUrl",
|
|
670
|
+
"private",
|
|
671
|
+
"stargazersCount",
|
|
672
|
+
"forksCount",
|
|
673
|
+
"updatedAt",
|
|
674
|
+
],
|
|
675
|
+
type: "object",
|
|
676
|
+
};
|
|
677
|
+
export const GitHubRepositoryListSchema = {
|
|
678
|
+
properties: {
|
|
679
|
+
rows: {
|
|
680
|
+
type: "array",
|
|
681
|
+
items: {
|
|
682
|
+
$ref: "#/components/schemas/GitHubRepository",
|
|
683
|
+
},
|
|
684
|
+
description: "List of GitHub repositories",
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
|
+
required: ["rows"],
|
|
688
|
+
type: "object",
|
|
689
|
+
};
|
|
690
|
+
export const AdminUserListSchema = {
|
|
691
|
+
properties: {
|
|
692
|
+
pagination: {
|
|
693
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
694
|
+
},
|
|
695
|
+
rows: {
|
|
696
|
+
type: "array",
|
|
697
|
+
items: {
|
|
698
|
+
$ref: "#/components/schemas/User",
|
|
699
|
+
},
|
|
700
|
+
description: "List of users",
|
|
701
|
+
},
|
|
702
|
+
totalCount: {
|
|
703
|
+
type: "integer",
|
|
704
|
+
description: "Total number of users matching the filter",
|
|
705
|
+
},
|
|
706
|
+
},
|
|
707
|
+
required: ["rows", "totalCount"],
|
|
708
|
+
type: "object",
|
|
709
|
+
};
|
|
710
|
+
export const AdminUserCreateRequestSchema = {
|
|
711
|
+
properties: {
|
|
712
|
+
name: {
|
|
713
|
+
type: "string",
|
|
714
|
+
description: "The display name of the user",
|
|
715
|
+
maxLength: 255,
|
|
716
|
+
},
|
|
717
|
+
email: {
|
|
718
|
+
type: "string",
|
|
719
|
+
format: "email",
|
|
720
|
+
description: "The email address of the user",
|
|
721
|
+
maxLength: 255,
|
|
722
|
+
"x-oapi-codegen-extra-tags": {
|
|
723
|
+
validate: "required,email",
|
|
724
|
+
},
|
|
725
|
+
},
|
|
726
|
+
password: {
|
|
727
|
+
type: "string",
|
|
728
|
+
description: "The password for the user",
|
|
729
|
+
minLength: 8,
|
|
730
|
+
maxLength: 128,
|
|
731
|
+
"x-oapi-codegen-extra-tags": {
|
|
732
|
+
validate: "required,min=8",
|
|
733
|
+
},
|
|
734
|
+
},
|
|
735
|
+
role: {
|
|
736
|
+
$ref: "#/components/schemas/UserRole",
|
|
737
|
+
description: "The role to assign to the user",
|
|
738
|
+
default: "USER",
|
|
739
|
+
},
|
|
740
|
+
emailVerified: {
|
|
741
|
+
type: "boolean",
|
|
742
|
+
description: "Whether to mark the email as verified",
|
|
743
|
+
default: false,
|
|
744
|
+
},
|
|
745
|
+
},
|
|
746
|
+
required: ["email", "password"],
|
|
747
|
+
type: "object",
|
|
748
|
+
};
|
|
749
|
+
export const AdminUserUpdateRequestSchema = {
|
|
750
|
+
properties: {
|
|
751
|
+
name: {
|
|
752
|
+
type: "string",
|
|
753
|
+
description: "The display name of the user",
|
|
754
|
+
maxLength: 255,
|
|
755
|
+
},
|
|
756
|
+
email: {
|
|
757
|
+
type: "string",
|
|
758
|
+
format: "email",
|
|
759
|
+
description: "The email address of the user",
|
|
760
|
+
maxLength: 255,
|
|
761
|
+
"x-oapi-codegen-extra-tags": {
|
|
762
|
+
validate: "omitempty,email",
|
|
763
|
+
},
|
|
764
|
+
},
|
|
765
|
+
password: {
|
|
766
|
+
type: "string",
|
|
767
|
+
description: "New password for the user (optional)",
|
|
768
|
+
minLength: 8,
|
|
769
|
+
maxLength: 128,
|
|
770
|
+
"x-oapi-codegen-extra-tags": {
|
|
771
|
+
validate: "omitempty,min=8",
|
|
772
|
+
},
|
|
773
|
+
},
|
|
774
|
+
role: {
|
|
775
|
+
$ref: "#/components/schemas/UserRole",
|
|
776
|
+
description: "The role to assign to the user",
|
|
777
|
+
},
|
|
778
|
+
emailVerified: {
|
|
779
|
+
type: "boolean",
|
|
780
|
+
description: "Whether the email is verified",
|
|
781
|
+
},
|
|
782
|
+
},
|
|
783
|
+
type: "object",
|
|
784
|
+
};
|
|
785
|
+
export const APIMessageSchema = {
|
|
786
|
+
type: "object",
|
|
787
|
+
properties: {
|
|
788
|
+
message: {
|
|
789
|
+
type: "string",
|
|
790
|
+
description: "A message describing the result of the operation",
|
|
791
|
+
example: "Operation completed successfully",
|
|
792
|
+
},
|
|
793
|
+
},
|
|
794
|
+
required: ["message"],
|
|
795
|
+
};
|
|
796
|
+
export const RoleSchema = {
|
|
797
|
+
properties: {
|
|
798
|
+
metadata: {
|
|
799
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
800
|
+
},
|
|
801
|
+
name: {
|
|
802
|
+
type: "string",
|
|
803
|
+
description: "Role name (unique)",
|
|
804
|
+
},
|
|
805
|
+
description: {
|
|
806
|
+
type: "string",
|
|
807
|
+
description: "Optional role description",
|
|
808
|
+
},
|
|
809
|
+
},
|
|
810
|
+
required: ["metadata", "name"],
|
|
811
|
+
type: "object",
|
|
812
|
+
};
|
|
813
|
+
export const RoleListSchema = {
|
|
814
|
+
properties: {
|
|
815
|
+
rows: {
|
|
816
|
+
type: "array",
|
|
817
|
+
items: {
|
|
818
|
+
$ref: "#/components/schemas/Role",
|
|
819
|
+
},
|
|
820
|
+
description: "List of roles",
|
|
821
|
+
},
|
|
822
|
+
},
|
|
823
|
+
required: ["rows"],
|
|
824
|
+
type: "object",
|
|
825
|
+
};
|
|
826
|
+
export const AdminAssignRoleRequestSchema = {
|
|
827
|
+
properties: {
|
|
828
|
+
roleName: {
|
|
829
|
+
type: "string",
|
|
830
|
+
description: "Role name to assign to the user",
|
|
831
|
+
},
|
|
832
|
+
},
|
|
833
|
+
required: ["roleName"],
|
|
834
|
+
type: "object",
|
|
835
|
+
};
|
|
836
|
+
export const TenantParameterSchema = {
|
|
837
|
+
type: "string",
|
|
838
|
+
format: "uuid",
|
|
839
|
+
minLength: 36,
|
|
840
|
+
maxLength: 36,
|
|
841
|
+
};
|
|
842
|
+
export const TunnelConfigSchema = {
|
|
843
|
+
type: "object",
|
|
844
|
+
properties: {
|
|
845
|
+
cloudflareToken: {
|
|
846
|
+
type: "string",
|
|
847
|
+
description: "Cloudflare API token for tunnel management",
|
|
848
|
+
example: "cf_token_123456789",
|
|
849
|
+
},
|
|
850
|
+
domain: {
|
|
851
|
+
type: "string",
|
|
852
|
+
description: "Domain name for the tunnel",
|
|
853
|
+
example: "yuepa8.com",
|
|
854
|
+
},
|
|
855
|
+
localPort: {
|
|
856
|
+
type: "string",
|
|
857
|
+
description: "Local port number for the tunnel",
|
|
858
|
+
example: "7788",
|
|
859
|
+
},
|
|
860
|
+
tunnelName: {
|
|
861
|
+
type: "string",
|
|
862
|
+
description: "Custom tunnel name (optional)",
|
|
863
|
+
example: "my-tunnel",
|
|
864
|
+
},
|
|
865
|
+
description: {
|
|
866
|
+
type: "string",
|
|
867
|
+
description: "Description of the tunnel configuration",
|
|
868
|
+
example: "Development tunnel for testing",
|
|
869
|
+
},
|
|
870
|
+
},
|
|
871
|
+
required: ["cloudflareToken", "domain", "localPort"],
|
|
872
|
+
};
|
|
873
|
+
export const UserSettingsSchema = {
|
|
874
|
+
type: "object",
|
|
875
|
+
properties: {
|
|
876
|
+
metadata: {
|
|
877
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
878
|
+
},
|
|
879
|
+
tunnelConfig: {
|
|
880
|
+
$ref: "#/components/schemas/TunnelConfig",
|
|
881
|
+
description: "Cloudflare tunnel configuration (user-specific)",
|
|
882
|
+
},
|
|
883
|
+
exportMetadata: {
|
|
884
|
+
type: "object",
|
|
885
|
+
description: "Metadata about settings export/import",
|
|
886
|
+
properties: {
|
|
887
|
+
exportTimestamp: {
|
|
888
|
+
type: "string",
|
|
889
|
+
format: "date-time",
|
|
890
|
+
description: "When the settings were last exported",
|
|
891
|
+
},
|
|
892
|
+
exportVersion: {
|
|
893
|
+
type: "string",
|
|
894
|
+
description: "Version of the export format",
|
|
895
|
+
example: "1.0",
|
|
896
|
+
},
|
|
897
|
+
exportBy: {
|
|
898
|
+
type: "string",
|
|
899
|
+
description: "Who exported the settings",
|
|
900
|
+
example: "user",
|
|
901
|
+
},
|
|
902
|
+
},
|
|
903
|
+
},
|
|
904
|
+
},
|
|
905
|
+
required: ["metadata"],
|
|
906
|
+
};
|
|
907
|
+
export const UserSettingsUpdateRequestSchema = {
|
|
908
|
+
type: "object",
|
|
909
|
+
properties: {
|
|
910
|
+
tunnelConfig: {
|
|
911
|
+
$ref: "#/components/schemas/TunnelConfig",
|
|
912
|
+
description: "Cloudflare tunnel configuration (user-specific)",
|
|
913
|
+
},
|
|
914
|
+
exportMetadata: {
|
|
915
|
+
type: "object",
|
|
916
|
+
description: "Metadata about settings export/import",
|
|
917
|
+
properties: {
|
|
918
|
+
exportTimestamp: {
|
|
919
|
+
type: "string",
|
|
920
|
+
format: "date-time",
|
|
921
|
+
description: "When the settings were last exported",
|
|
922
|
+
},
|
|
923
|
+
exportVersion: {
|
|
924
|
+
type: "string",
|
|
925
|
+
description: "Version of the export format",
|
|
926
|
+
example: "1.0",
|
|
927
|
+
},
|
|
928
|
+
exportBy: {
|
|
929
|
+
type: "string",
|
|
930
|
+
description: "Who exported the settings",
|
|
931
|
+
example: "user",
|
|
932
|
+
},
|
|
933
|
+
},
|
|
934
|
+
},
|
|
935
|
+
},
|
|
936
|
+
};
|
|
937
|
+
export const UserSettingsCreateRequestSchema = {
|
|
938
|
+
type: "object",
|
|
939
|
+
properties: {
|
|
940
|
+
tunnelConfig: {
|
|
941
|
+
$ref: "#/components/schemas/TunnelConfig",
|
|
942
|
+
description: "Cloudflare tunnel configuration (user-specific)",
|
|
943
|
+
},
|
|
944
|
+
exportMetadata: {
|
|
945
|
+
type: "object",
|
|
946
|
+
description: "Metadata about settings export/import",
|
|
947
|
+
properties: {
|
|
948
|
+
exportTimestamp: {
|
|
949
|
+
type: "string",
|
|
950
|
+
format: "date-time",
|
|
951
|
+
description: "When the settings were last exported",
|
|
952
|
+
},
|
|
953
|
+
exportVersion: {
|
|
954
|
+
type: "string",
|
|
955
|
+
description: "Version of the export format",
|
|
956
|
+
example: "1.0",
|
|
957
|
+
},
|
|
958
|
+
exportBy: {
|
|
959
|
+
type: "string",
|
|
960
|
+
description: "Who exported the settings",
|
|
961
|
+
example: "user",
|
|
962
|
+
},
|
|
963
|
+
},
|
|
964
|
+
},
|
|
965
|
+
},
|
|
966
|
+
};
|
|
967
|
+
export const ServiceSchema = {
|
|
968
|
+
type: "object",
|
|
969
|
+
properties: {
|
|
970
|
+
name: {
|
|
971
|
+
type: "string",
|
|
972
|
+
description: "Service name",
|
|
973
|
+
enum: ["vnc", "sshd", "tunnel", "napcat"],
|
|
974
|
+
example: "vnc",
|
|
975
|
+
},
|
|
976
|
+
displayName: {
|
|
977
|
+
type: "string",
|
|
978
|
+
description: "Human readable service name",
|
|
979
|
+
example: "VNC Remote Desktop",
|
|
980
|
+
},
|
|
981
|
+
status: {
|
|
982
|
+
type: "string",
|
|
983
|
+
description: "Current service status",
|
|
984
|
+
enum: ["running", "stopped", "starting", "stopping", "error"],
|
|
985
|
+
example: "running",
|
|
986
|
+
},
|
|
987
|
+
description: {
|
|
988
|
+
type: "string",
|
|
989
|
+
description: "Service description",
|
|
990
|
+
example: "Web-based VNC remote desktop service",
|
|
991
|
+
},
|
|
992
|
+
port: {
|
|
993
|
+
type: "integer",
|
|
994
|
+
description: "Service port number",
|
|
995
|
+
example: 8444,
|
|
996
|
+
},
|
|
997
|
+
url: {
|
|
998
|
+
type: "string",
|
|
999
|
+
description: "Service access URL",
|
|
1000
|
+
example: "http://localhost:8444",
|
|
1001
|
+
},
|
|
1002
|
+
pid: {
|
|
1003
|
+
type: "integer",
|
|
1004
|
+
description: "Process ID if running",
|
|
1005
|
+
example: 12345,
|
|
1006
|
+
},
|
|
1007
|
+
startedAt: {
|
|
1008
|
+
type: "string",
|
|
1009
|
+
format: "date-time",
|
|
1010
|
+
description: "Service start time",
|
|
1011
|
+
example: "2024-01-01T12:00:00Z",
|
|
1012
|
+
},
|
|
1013
|
+
config: {
|
|
1014
|
+
type: "object",
|
|
1015
|
+
description: "Service configuration",
|
|
1016
|
+
additionalProperties: true,
|
|
1017
|
+
},
|
|
1018
|
+
logs: {
|
|
1019
|
+
type: "array",
|
|
1020
|
+
description: "Recent service logs",
|
|
1021
|
+
items: {
|
|
1022
|
+
type: "string",
|
|
1023
|
+
},
|
|
1024
|
+
example: ["Service started successfully", "Listening on port 8444"],
|
|
1025
|
+
},
|
|
1026
|
+
health: {
|
|
1027
|
+
type: "object",
|
|
1028
|
+
description: "Service health information",
|
|
1029
|
+
properties: {
|
|
1030
|
+
status: {
|
|
1031
|
+
type: "string",
|
|
1032
|
+
enum: ["healthy", "unhealthy", "unknown"],
|
|
1033
|
+
example: "healthy",
|
|
1034
|
+
},
|
|
1035
|
+
lastCheck: {
|
|
1036
|
+
type: "string",
|
|
1037
|
+
format: "date-time",
|
|
1038
|
+
example: "2024-01-01T12:00:00Z",
|
|
1039
|
+
},
|
|
1040
|
+
message: {
|
|
1041
|
+
type: "string",
|
|
1042
|
+
example: "Service is responding normally",
|
|
1043
|
+
},
|
|
1044
|
+
},
|
|
1045
|
+
},
|
|
1046
|
+
},
|
|
1047
|
+
required: ["name", "displayName", "status", "description"],
|
|
1048
|
+
};
|
|
1049
|
+
export const ServiceStartRequestSchema = {
|
|
1050
|
+
type: "object",
|
|
1051
|
+
properties: {
|
|
1052
|
+
config: {
|
|
1053
|
+
type: "object",
|
|
1054
|
+
description: "Service-specific configuration",
|
|
1055
|
+
additionalProperties: true,
|
|
1056
|
+
},
|
|
1057
|
+
force: {
|
|
1058
|
+
type: "boolean",
|
|
1059
|
+
description: "Force start even if already running",
|
|
1060
|
+
default: false,
|
|
1061
|
+
},
|
|
1062
|
+
},
|
|
1063
|
+
additionalProperties: false,
|
|
1064
|
+
};
|
|
1065
|
+
export const ServiceOperationResponseSchema = {
|
|
1066
|
+
type: "object",
|
|
1067
|
+
properties: {
|
|
1068
|
+
success: {
|
|
1069
|
+
type: "boolean",
|
|
1070
|
+
description: "Operation success status",
|
|
1071
|
+
example: true,
|
|
1072
|
+
},
|
|
1073
|
+
message: {
|
|
1074
|
+
type: "string",
|
|
1075
|
+
description: "Operation result message",
|
|
1076
|
+
example: "Service started successfully",
|
|
1077
|
+
},
|
|
1078
|
+
service: {
|
|
1079
|
+
$ref: "#/components/schemas/Service",
|
|
1080
|
+
},
|
|
1081
|
+
operationId: {
|
|
1082
|
+
type: "string",
|
|
1083
|
+
description: "Unique operation identifier",
|
|
1084
|
+
example: "op_123456",
|
|
1085
|
+
},
|
|
1086
|
+
timestamp: {
|
|
1087
|
+
type: "string",
|
|
1088
|
+
format: "date-time",
|
|
1089
|
+
description: "Operation timestamp",
|
|
1090
|
+
example: "2024-01-01T12:00:00Z",
|
|
1091
|
+
},
|
|
1092
|
+
},
|
|
1093
|
+
required: ["success", "message", "service", "timestamp"],
|
|
1094
|
+
};
|
|
1095
|
+
export const VNCServiceLogsSchema = {
|
|
1096
|
+
type: "object",
|
|
1097
|
+
properties: {
|
|
1098
|
+
logs: {
|
|
1099
|
+
type: "array",
|
|
1100
|
+
description: "Service log entries",
|
|
1101
|
+
items: {
|
|
1102
|
+
type: "object",
|
|
1103
|
+
properties: {
|
|
1104
|
+
timestamp: {
|
|
1105
|
+
type: "string",
|
|
1106
|
+
format: "date-time",
|
|
1107
|
+
description: "Log entry timestamp",
|
|
1108
|
+
example: "2024-01-01T12:00:00Z",
|
|
1109
|
+
},
|
|
1110
|
+
level: {
|
|
1111
|
+
type: "string",
|
|
1112
|
+
description: "Log level",
|
|
1113
|
+
enum: ["debug", "info", "warn", "error"],
|
|
1114
|
+
example: "info",
|
|
1115
|
+
},
|
|
1116
|
+
message: {
|
|
1117
|
+
type: "string",
|
|
1118
|
+
description: "Log message",
|
|
1119
|
+
example: "VNC service started successfully",
|
|
1120
|
+
},
|
|
1121
|
+
source: {
|
|
1122
|
+
type: "string",
|
|
1123
|
+
description: "Log source component",
|
|
1124
|
+
example: "vnc-server",
|
|
1125
|
+
},
|
|
1126
|
+
},
|
|
1127
|
+
required: ["timestamp", "level", "message"],
|
|
1128
|
+
},
|
|
1129
|
+
},
|
|
1130
|
+
totalLines: {
|
|
1131
|
+
type: "integer",
|
|
1132
|
+
description: "Total number of log lines available",
|
|
1133
|
+
example: 1500,
|
|
1134
|
+
},
|
|
1135
|
+
hasMore: {
|
|
1136
|
+
type: "boolean",
|
|
1137
|
+
description: "Whether more logs are available",
|
|
1138
|
+
example: true,
|
|
1139
|
+
},
|
|
1140
|
+
},
|
|
1141
|
+
required: ["logs", "totalLines", "hasMore"],
|
|
1142
|
+
};
|
|
1143
|
+
export const VNCServiceDiagnosticsSchema = {
|
|
1144
|
+
type: "object",
|
|
1145
|
+
properties: {
|
|
1146
|
+
service: {
|
|
1147
|
+
type: "string",
|
|
1148
|
+
description: "Service name",
|
|
1149
|
+
example: "vnc",
|
|
1150
|
+
},
|
|
1151
|
+
status: {
|
|
1152
|
+
type: "string",
|
|
1153
|
+
description: "Overall diagnostic status",
|
|
1154
|
+
enum: ["healthy", "warning", "error"],
|
|
1155
|
+
example: "healthy",
|
|
1156
|
+
},
|
|
1157
|
+
checks: {
|
|
1158
|
+
type: "array",
|
|
1159
|
+
description: "Individual diagnostic checks",
|
|
1160
|
+
items: {
|
|
1161
|
+
type: "object",
|
|
1162
|
+
properties: {
|
|
1163
|
+
name: {
|
|
1164
|
+
type: "string",
|
|
1165
|
+
description: "Check name",
|
|
1166
|
+
example: "process_running",
|
|
1167
|
+
},
|
|
1168
|
+
status: {
|
|
1169
|
+
type: "string",
|
|
1170
|
+
enum: ["pass", "fail", "warning"],
|
|
1171
|
+
example: "pass",
|
|
1172
|
+
},
|
|
1173
|
+
message: {
|
|
1174
|
+
type: "string",
|
|
1175
|
+
description: "Check result message",
|
|
1176
|
+
example: "VNC process is running with PID 12345",
|
|
1177
|
+
},
|
|
1178
|
+
details: {
|
|
1179
|
+
type: "object",
|
|
1180
|
+
description: "Additional check details",
|
|
1181
|
+
additionalProperties: true,
|
|
1182
|
+
},
|
|
1183
|
+
},
|
|
1184
|
+
required: ["name", "status", "message"],
|
|
1185
|
+
},
|
|
1186
|
+
},
|
|
1187
|
+
environment: {
|
|
1188
|
+
type: "object",
|
|
1189
|
+
description: "Environment information",
|
|
1190
|
+
properties: {
|
|
1191
|
+
hostname: {
|
|
1192
|
+
type: "string",
|
|
1193
|
+
example: "dev-container",
|
|
1194
|
+
},
|
|
1195
|
+
platform: {
|
|
1196
|
+
type: "string",
|
|
1197
|
+
example: "linux",
|
|
1198
|
+
},
|
|
1199
|
+
containerized: {
|
|
1200
|
+
type: "boolean",
|
|
1201
|
+
example: true,
|
|
1202
|
+
},
|
|
1203
|
+
display: {
|
|
1204
|
+
type: "string",
|
|
1205
|
+
example: ":1",
|
|
1206
|
+
},
|
|
1207
|
+
},
|
|
1208
|
+
additionalProperties: true,
|
|
1209
|
+
},
|
|
1210
|
+
recommendations: {
|
|
1211
|
+
type: "array",
|
|
1212
|
+
description: "Recommendations for issues found",
|
|
1213
|
+
items: {
|
|
1214
|
+
type: "string",
|
|
1215
|
+
},
|
|
1216
|
+
example: [
|
|
1217
|
+
"Consider increasing memory allocation",
|
|
1218
|
+
"Check firewall settings",
|
|
1219
|
+
],
|
|
1220
|
+
},
|
|
1221
|
+
},
|
|
1222
|
+
required: ["service", "status", "checks", "environment"],
|
|
1223
|
+
};
|
|
1224
|
+
export const ServiceConfigSchema = {
|
|
1225
|
+
type: "object",
|
|
1226
|
+
properties: {
|
|
1227
|
+
id: {
|
|
1228
|
+
type: "string",
|
|
1229
|
+
format: "uuid",
|
|
1230
|
+
description: "Configuration ID",
|
|
1231
|
+
example: "123e4567-e89b-12d3-a456-426614174000",
|
|
1232
|
+
},
|
|
1233
|
+
tenantId: {
|
|
1234
|
+
type: "string",
|
|
1235
|
+
format: "uuid",
|
|
1236
|
+
description: "Tenant ID",
|
|
1237
|
+
example: "123e4567-e89b-12d3-a456-426614174000",
|
|
1238
|
+
},
|
|
1239
|
+
serviceName: {
|
|
1240
|
+
type: "string",
|
|
1241
|
+
description: "Service name",
|
|
1242
|
+
enum: ["vnc", "sshd", "tunnel", "napcat"],
|
|
1243
|
+
example: "vnc",
|
|
1244
|
+
},
|
|
1245
|
+
displayName: {
|
|
1246
|
+
type: "string",
|
|
1247
|
+
description: "Human readable service name",
|
|
1248
|
+
example: "VNC Remote Desktop",
|
|
1249
|
+
},
|
|
1250
|
+
description: {
|
|
1251
|
+
type: "string",
|
|
1252
|
+
description: "Service description",
|
|
1253
|
+
example: "Web-based VNC remote desktop service",
|
|
1254
|
+
},
|
|
1255
|
+
config: {
|
|
1256
|
+
type: "object",
|
|
1257
|
+
description: "Service configuration parameters",
|
|
1258
|
+
additionalProperties: true,
|
|
1259
|
+
example: {
|
|
1260
|
+
port: 8444,
|
|
1261
|
+
display: ":1",
|
|
1262
|
+
password: "secret123",
|
|
1263
|
+
},
|
|
1264
|
+
},
|
|
1265
|
+
isEnabled: {
|
|
1266
|
+
type: "boolean",
|
|
1267
|
+
description: "Whether the service is enabled",
|
|
1268
|
+
example: true,
|
|
1269
|
+
},
|
|
1270
|
+
autoStart: {
|
|
1271
|
+
type: "boolean",
|
|
1272
|
+
description: "Whether to auto-start the service",
|
|
1273
|
+
example: false,
|
|
1274
|
+
},
|
|
1275
|
+
createdAt: {
|
|
1276
|
+
type: "string",
|
|
1277
|
+
format: "date-time",
|
|
1278
|
+
description: "Configuration creation time",
|
|
1279
|
+
example: "2024-01-01T12:00:00Z",
|
|
1280
|
+
},
|
|
1281
|
+
updatedAt: {
|
|
1282
|
+
type: "string",
|
|
1283
|
+
format: "date-time",
|
|
1284
|
+
description: "Configuration last update time",
|
|
1285
|
+
example: "2024-01-01T12:00:00Z",
|
|
1286
|
+
},
|
|
1287
|
+
},
|
|
1288
|
+
required: [
|
|
1289
|
+
"id",
|
|
1290
|
+
"tenantId",
|
|
1291
|
+
"serviceName",
|
|
1292
|
+
"displayName",
|
|
1293
|
+
"config",
|
|
1294
|
+
"isEnabled",
|
|
1295
|
+
"autoStart",
|
|
1296
|
+
"createdAt",
|
|
1297
|
+
"updatedAt",
|
|
1298
|
+
],
|
|
1299
|
+
};
|
|
1300
|
+
export const ServiceConfigUpdateRequestSchema = {
|
|
1301
|
+
type: "object",
|
|
1302
|
+
properties: {
|
|
1303
|
+
displayName: {
|
|
1304
|
+
type: "string",
|
|
1305
|
+
description: "Human readable service name",
|
|
1306
|
+
example: "VNC Remote Desktop",
|
|
1307
|
+
},
|
|
1308
|
+
description: {
|
|
1309
|
+
type: "string",
|
|
1310
|
+
description: "Service description",
|
|
1311
|
+
example: "Web-based VNC remote desktop service",
|
|
1312
|
+
},
|
|
1313
|
+
config: {
|
|
1314
|
+
type: "object",
|
|
1315
|
+
description: "Service configuration parameters",
|
|
1316
|
+
additionalProperties: true,
|
|
1317
|
+
example: {
|
|
1318
|
+
port: 8444,
|
|
1319
|
+
display: ":1",
|
|
1320
|
+
password: "secret123",
|
|
1321
|
+
},
|
|
1322
|
+
},
|
|
1323
|
+
isEnabled: {
|
|
1324
|
+
type: "boolean",
|
|
1325
|
+
description: "Whether the service is enabled",
|
|
1326
|
+
example: true,
|
|
1327
|
+
},
|
|
1328
|
+
autoStart: {
|
|
1329
|
+
type: "boolean",
|
|
1330
|
+
description: "Whether to auto-start the service",
|
|
1331
|
+
example: false,
|
|
1332
|
+
},
|
|
1333
|
+
},
|
|
1334
|
+
required: ["config"],
|
|
1335
|
+
};
|
|
1336
|
+
export const CreateTenantRequestSchema = {
|
|
1337
|
+
properties: {
|
|
1338
|
+
name: {
|
|
1339
|
+
type: "string",
|
|
1340
|
+
description: "The name of the tenant.",
|
|
1341
|
+
"x-oapi-codegen-extra-tags": {
|
|
1342
|
+
validate: "required",
|
|
1343
|
+
},
|
|
1344
|
+
},
|
|
1345
|
+
slug: {
|
|
1346
|
+
type: "string",
|
|
1347
|
+
description: "The slug of the tenant.",
|
|
1348
|
+
"x-oapi-codegen-extra-tags": {
|
|
1349
|
+
validate: "required,hatchetName",
|
|
1350
|
+
},
|
|
1351
|
+
},
|
|
1352
|
+
},
|
|
1353
|
+
required: ["name", "slug"],
|
|
1354
|
+
type: "object",
|
|
1355
|
+
};
|
|
1356
|
+
export const TenantVersionSchema = {
|
|
1357
|
+
enum: ["V0", "V1"],
|
|
1358
|
+
type: "string",
|
|
1359
|
+
};
|
|
1360
|
+
export const UpdateTenantRequestSchema = {
|
|
1361
|
+
properties: {
|
|
1362
|
+
name: {
|
|
1363
|
+
type: "string",
|
|
1364
|
+
description: "The name of the tenant.",
|
|
1365
|
+
},
|
|
1366
|
+
analyticsOptOut: {
|
|
1367
|
+
type: "boolean",
|
|
1368
|
+
description: "Whether the tenant has opted out of analytics.",
|
|
1369
|
+
},
|
|
1370
|
+
alertMemberEmails: {
|
|
1371
|
+
type: "boolean",
|
|
1372
|
+
description: "Whether to alert tenant members.",
|
|
1373
|
+
},
|
|
1374
|
+
enableWorkflowRunFailureAlerts: {
|
|
1375
|
+
type: "boolean",
|
|
1376
|
+
description: "Whether to send alerts when workflow runs fail.",
|
|
1377
|
+
},
|
|
1378
|
+
enableExpiringTokenAlerts: {
|
|
1379
|
+
type: "boolean",
|
|
1380
|
+
description: "Whether to enable alerts when tokens are approaching expiration.",
|
|
1381
|
+
},
|
|
1382
|
+
enableTenantResourceLimitAlerts: {
|
|
1383
|
+
type: "boolean",
|
|
1384
|
+
description: "Whether to enable alerts when tenant resources are approaching limits.",
|
|
1385
|
+
},
|
|
1386
|
+
maxAlertingFrequency: {
|
|
1387
|
+
type: "string",
|
|
1388
|
+
description: "The max frequency at which to alert.",
|
|
1389
|
+
"x-oapi-codegen-extra-tags": {
|
|
1390
|
+
validate: "omitnil,duration",
|
|
1391
|
+
},
|
|
1392
|
+
},
|
|
1393
|
+
version: {
|
|
1394
|
+
$ref: "#/components/schemas/TenantVersion",
|
|
1395
|
+
description: "The version of the tenant.",
|
|
1396
|
+
},
|
|
1397
|
+
},
|
|
1398
|
+
type: "object",
|
|
1399
|
+
};
|
|
1400
|
+
export const TenantAlertingSettingsSchema = {
|
|
1401
|
+
properties: {
|
|
1402
|
+
metadata: {
|
|
1403
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
1404
|
+
},
|
|
1405
|
+
alertMemberEmails: {
|
|
1406
|
+
type: "boolean",
|
|
1407
|
+
description: "Whether to alert tenant members.",
|
|
1408
|
+
},
|
|
1409
|
+
enableWorkflowRunFailureAlerts: {
|
|
1410
|
+
type: "boolean",
|
|
1411
|
+
description: "Whether to send alerts when workflow runs fail.",
|
|
1412
|
+
},
|
|
1413
|
+
enableExpiringTokenAlerts: {
|
|
1414
|
+
type: "boolean",
|
|
1415
|
+
description: "Whether to enable alerts when tokens are approaching expiration.",
|
|
1416
|
+
},
|
|
1417
|
+
enableTenantResourceLimitAlerts: {
|
|
1418
|
+
type: "boolean",
|
|
1419
|
+
description: "Whether to enable alerts when tenant resources are approaching limits.",
|
|
1420
|
+
},
|
|
1421
|
+
maxAlertingFrequency: {
|
|
1422
|
+
type: "string",
|
|
1423
|
+
description: "The max frequency at which to alert.",
|
|
1424
|
+
},
|
|
1425
|
+
lastAlertedAt: {
|
|
1426
|
+
type: "string",
|
|
1427
|
+
description: "The last time an alert was sent.",
|
|
1428
|
+
format: "date-time",
|
|
1429
|
+
},
|
|
1430
|
+
},
|
|
1431
|
+
required: ["metadata", "maxAlertingFrequency"],
|
|
1432
|
+
type: "object",
|
|
1433
|
+
};
|
|
1434
|
+
export const CreateTenantInviteRequestSchema = {
|
|
1435
|
+
properties: {
|
|
1436
|
+
email: {
|
|
1437
|
+
type: "string",
|
|
1438
|
+
description: "The email of the user to invite.",
|
|
1439
|
+
"x-oapi-codegen-extra-tags": {
|
|
1440
|
+
validate: "required,email",
|
|
1441
|
+
},
|
|
1442
|
+
},
|
|
1443
|
+
role: {
|
|
1444
|
+
$ref: "#/components/schemas/TenantMemberRole",
|
|
1445
|
+
description: "The role of the user in the tenant.",
|
|
1446
|
+
"x-oapi-codegen-extra-tags": {
|
|
1447
|
+
validate: "required",
|
|
1448
|
+
},
|
|
1449
|
+
},
|
|
1450
|
+
},
|
|
1451
|
+
required: ["email", "role"],
|
|
1452
|
+
type: "object",
|
|
1453
|
+
};
|
|
1454
|
+
export const UpdateTenantInviteRequestSchema = {
|
|
1455
|
+
properties: {
|
|
1456
|
+
role: {
|
|
1457
|
+
$ref: "#/components/schemas/TenantMemberRole",
|
|
1458
|
+
description: "The role of the user in the tenant.",
|
|
1459
|
+
"x-oapi-codegen-extra-tags": {
|
|
1460
|
+
validate: "required",
|
|
1461
|
+
},
|
|
1462
|
+
},
|
|
1463
|
+
},
|
|
1464
|
+
required: ["role"],
|
|
1465
|
+
type: "object",
|
|
1466
|
+
};
|
|
1467
|
+
export const APITokenSchema = {
|
|
1468
|
+
type: "object",
|
|
1469
|
+
properties: {
|
|
1470
|
+
metadata: {
|
|
1471
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
1472
|
+
},
|
|
1473
|
+
name: {
|
|
1474
|
+
type: "string",
|
|
1475
|
+
description: "The name of the API token.",
|
|
1476
|
+
maxLength: 255,
|
|
1477
|
+
},
|
|
1478
|
+
expiresAt: {
|
|
1479
|
+
type: "string",
|
|
1480
|
+
format: "date-time",
|
|
1481
|
+
description: "When the API token expires.",
|
|
1482
|
+
},
|
|
1483
|
+
},
|
|
1484
|
+
required: ["metadata", "name", "expiresAt"],
|
|
1485
|
+
};
|
|
1486
|
+
export const ListAPITokensResponseSchema = {
|
|
1487
|
+
properties: {
|
|
1488
|
+
pagination: {
|
|
1489
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
1490
|
+
},
|
|
1491
|
+
rows: {
|
|
1492
|
+
items: {
|
|
1493
|
+
$ref: "#/components/schemas/APIToken",
|
|
1494
|
+
},
|
|
1495
|
+
type: "array",
|
|
1496
|
+
},
|
|
1497
|
+
},
|
|
1498
|
+
};
|
|
1499
|
+
export const CreateAPITokenRequestSchema = {
|
|
1500
|
+
type: "object",
|
|
1501
|
+
properties: {
|
|
1502
|
+
name: {
|
|
1503
|
+
type: "string",
|
|
1504
|
+
description: "A name for the API token.",
|
|
1505
|
+
maxLength: 255,
|
|
1506
|
+
},
|
|
1507
|
+
expiresIn: {
|
|
1508
|
+
type: "string",
|
|
1509
|
+
description: "The duration for which the token is valid.",
|
|
1510
|
+
"x-oapi-codegen-extra-tags": {
|
|
1511
|
+
validate: "omitnil,duration",
|
|
1512
|
+
},
|
|
1513
|
+
},
|
|
1514
|
+
},
|
|
1515
|
+
required: ["name"],
|
|
1516
|
+
};
|
|
1517
|
+
export const CreateAPITokenResponseSchema = {
|
|
1518
|
+
type: "object",
|
|
1519
|
+
properties: {
|
|
1520
|
+
token: {
|
|
1521
|
+
type: "string",
|
|
1522
|
+
description: "The API token.",
|
|
1523
|
+
},
|
|
1524
|
+
},
|
|
1525
|
+
required: ["token"],
|
|
1526
|
+
};
|
|
1527
|
+
export const TenantMemberListSchema = {
|
|
1528
|
+
properties: {
|
|
1529
|
+
pagination: {
|
|
1530
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
1531
|
+
},
|
|
1532
|
+
rows: {
|
|
1533
|
+
items: {
|
|
1534
|
+
$ref: "#/components/schemas/TenantMember",
|
|
1535
|
+
},
|
|
1536
|
+
type: "array",
|
|
1537
|
+
"x-go-name": "Rows",
|
|
1538
|
+
},
|
|
1539
|
+
},
|
|
1540
|
+
};
|
|
1541
|
+
export const TenantInfoExportSchema = {
|
|
1542
|
+
properties: {
|
|
1543
|
+
tenant: {
|
|
1544
|
+
$ref: "#/components/schemas/Tenant",
|
|
1545
|
+
description: "The tenant basic information",
|
|
1546
|
+
},
|
|
1547
|
+
members: {
|
|
1548
|
+
type: "array",
|
|
1549
|
+
items: {
|
|
1550
|
+
$ref: "#/components/schemas/TenantMember",
|
|
1551
|
+
},
|
|
1552
|
+
description: "The tenant members list",
|
|
1553
|
+
},
|
|
1554
|
+
invites: {
|
|
1555
|
+
type: "array",
|
|
1556
|
+
items: {
|
|
1557
|
+
$ref: "#/components/schemas/TenantInvite",
|
|
1558
|
+
},
|
|
1559
|
+
description: "The tenant invites list",
|
|
1560
|
+
},
|
|
1561
|
+
export_metadata: {
|
|
1562
|
+
type: "object",
|
|
1563
|
+
properties: {
|
|
1564
|
+
export_version: {
|
|
1565
|
+
type: "string",
|
|
1566
|
+
description: "The export format version",
|
|
1567
|
+
},
|
|
1568
|
+
export_timestamp: {
|
|
1569
|
+
type: "string",
|
|
1570
|
+
format: "date-time",
|
|
1571
|
+
description: "The timestamp when the export was created",
|
|
1572
|
+
},
|
|
1573
|
+
export_by: {
|
|
1574
|
+
type: "string",
|
|
1575
|
+
format: "uuid",
|
|
1576
|
+
description: "The user ID who performed the export",
|
|
1577
|
+
},
|
|
1578
|
+
total_members: {
|
|
1579
|
+
type: "integer",
|
|
1580
|
+
description: "Total number of members",
|
|
1581
|
+
},
|
|
1582
|
+
total_invites: {
|
|
1583
|
+
type: "integer",
|
|
1584
|
+
description: "Total number of pending invites",
|
|
1585
|
+
},
|
|
1586
|
+
},
|
|
1587
|
+
required: [
|
|
1588
|
+
"export_version",
|
|
1589
|
+
"export_timestamp",
|
|
1590
|
+
"export_by",
|
|
1591
|
+
"total_members",
|
|
1592
|
+
"total_invites",
|
|
1593
|
+
],
|
|
1594
|
+
},
|
|
1595
|
+
},
|
|
1596
|
+
required: ["tenant", "members", "invites", "export_metadata"],
|
|
1597
|
+
type: "object",
|
|
1598
|
+
};
|
|
1599
|
+
export const ServerInfoSchema = {
|
|
1600
|
+
properties: {
|
|
1601
|
+
version: {
|
|
1602
|
+
type: "string",
|
|
1603
|
+
description: "Server version",
|
|
1604
|
+
},
|
|
1605
|
+
frontend: {
|
|
1606
|
+
type: "object",
|
|
1607
|
+
properties: {
|
|
1608
|
+
port: {
|
|
1609
|
+
type: "integer",
|
|
1610
|
+
description: "Frontend server port",
|
|
1611
|
+
},
|
|
1612
|
+
enabled: {
|
|
1613
|
+
type: "boolean",
|
|
1614
|
+
description: "Whether frontend is enabled",
|
|
1615
|
+
},
|
|
1616
|
+
dir: {
|
|
1617
|
+
type: "string",
|
|
1618
|
+
description: "Frontend source directory",
|
|
1619
|
+
},
|
|
1620
|
+
autoOpenBrowser: {
|
|
1621
|
+
type: "boolean",
|
|
1622
|
+
description: "Whether to auto open browser",
|
|
1623
|
+
},
|
|
1624
|
+
},
|
|
1625
|
+
required: ["port", "enabled", "dir", "autoOpenBrowser"],
|
|
1626
|
+
},
|
|
1627
|
+
server: {
|
|
1628
|
+
type: "object",
|
|
1629
|
+
properties: {
|
|
1630
|
+
port: {
|
|
1631
|
+
type: "integer",
|
|
1632
|
+
description: "Server port",
|
|
1633
|
+
},
|
|
1634
|
+
host: {
|
|
1635
|
+
type: "string",
|
|
1636
|
+
description: "Server host",
|
|
1637
|
+
},
|
|
1638
|
+
},
|
|
1639
|
+
required: ["port", "host"],
|
|
1640
|
+
},
|
|
1641
|
+
},
|
|
1642
|
+
required: ["version", "frontend", "server"],
|
|
1643
|
+
};
|
|
1644
|
+
export const SitePropertiesSchema = {
|
|
1645
|
+
required: [
|
|
1646
|
+
"id",
|
|
1647
|
+
"tenant_id",
|
|
1648
|
+
"title",
|
|
1649
|
+
"description",
|
|
1650
|
+
"automation_enabled",
|
|
1651
|
+
"state",
|
|
1652
|
+
"enabled",
|
|
1653
|
+
],
|
|
1654
|
+
properties: {
|
|
1655
|
+
id: {
|
|
1656
|
+
type: "string",
|
|
1657
|
+
description: "站点ID",
|
|
1658
|
+
},
|
|
1659
|
+
tenant_id: {
|
|
1660
|
+
type: "string",
|
|
1661
|
+
description: "租户ID",
|
|
1662
|
+
},
|
|
1663
|
+
updated_at: {
|
|
1664
|
+
type: "string",
|
|
1665
|
+
description: "更新时间",
|
|
1666
|
+
},
|
|
1667
|
+
created_at: {
|
|
1668
|
+
type: "string",
|
|
1669
|
+
description: "创建时间",
|
|
1670
|
+
},
|
|
1671
|
+
enabled: {
|
|
1672
|
+
type: "boolean",
|
|
1673
|
+
description: "是否启用",
|
|
1674
|
+
},
|
|
1675
|
+
title: {
|
|
1676
|
+
type: "string",
|
|
1677
|
+
description: "site 标题",
|
|
1678
|
+
},
|
|
1679
|
+
description: {
|
|
1680
|
+
type: "string",
|
|
1681
|
+
description: "site 描述",
|
|
1682
|
+
},
|
|
1683
|
+
automation_enabled: {
|
|
1684
|
+
type: "boolean",
|
|
1685
|
+
description: "是否启用自动化",
|
|
1686
|
+
},
|
|
1687
|
+
state: {
|
|
1688
|
+
type: "object",
|
|
1689
|
+
description: "站点状态",
|
|
1690
|
+
properties: {
|
|
1691
|
+
status: {
|
|
1692
|
+
type: "string",
|
|
1693
|
+
description: "站点状态",
|
|
1694
|
+
},
|
|
1695
|
+
},
|
|
1696
|
+
},
|
|
1697
|
+
},
|
|
1698
|
+
};
|
|
1699
|
+
export const SiteSchema = {
|
|
1700
|
+
allOf: [
|
|
1701
|
+
{
|
|
1702
|
+
$ref: "#/components/schemas/SiteProperties",
|
|
1703
|
+
},
|
|
1704
|
+
],
|
|
1705
|
+
};
|
|
1706
|
+
export const SiteListSchema = {
|
|
1707
|
+
properties: {
|
|
1708
|
+
pagination: {
|
|
1709
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
1710
|
+
},
|
|
1711
|
+
rows: {
|
|
1712
|
+
items: {
|
|
1713
|
+
$ref: "#/components/schemas/Site",
|
|
1714
|
+
},
|
|
1715
|
+
type: "array",
|
|
1716
|
+
"x-go-name": "Rows",
|
|
1717
|
+
},
|
|
1718
|
+
},
|
|
1719
|
+
};
|
|
1720
|
+
export const CreateSiteRequestSchema = {
|
|
1721
|
+
properties: {
|
|
1722
|
+
title: {
|
|
1723
|
+
type: "string",
|
|
1724
|
+
description: "site 标题",
|
|
1725
|
+
},
|
|
1726
|
+
description: {
|
|
1727
|
+
type: "string",
|
|
1728
|
+
description: "site 描述",
|
|
1729
|
+
},
|
|
1730
|
+
host: {
|
|
1731
|
+
type: "string",
|
|
1732
|
+
description: "入站域名(指定绑定入站域名)",
|
|
1733
|
+
},
|
|
1734
|
+
},
|
|
1735
|
+
required: ["title", "description"],
|
|
1736
|
+
};
|
|
1737
|
+
export const UpdateSiteRequestSchema = {
|
|
1738
|
+
type: "object",
|
|
1739
|
+
properties: {
|
|
1740
|
+
title: {
|
|
1741
|
+
type: "string",
|
|
1742
|
+
description: "site 标题",
|
|
1743
|
+
},
|
|
1744
|
+
},
|
|
1745
|
+
};
|
|
1746
|
+
export const SiteHostPropertiesSchema = {
|
|
1747
|
+
required: ["id", "host"],
|
|
1748
|
+
properties: {
|
|
1749
|
+
id: {
|
|
1750
|
+
type: "string",
|
|
1751
|
+
description: "site-host id",
|
|
1752
|
+
},
|
|
1753
|
+
title: {
|
|
1754
|
+
type: "string",
|
|
1755
|
+
description: "site-host 标题",
|
|
1756
|
+
},
|
|
1757
|
+
description: {
|
|
1758
|
+
type: "string",
|
|
1759
|
+
description: "site-host 描述",
|
|
1760
|
+
},
|
|
1761
|
+
host: {
|
|
1762
|
+
type: "string",
|
|
1763
|
+
description: "绑定域名",
|
|
1764
|
+
},
|
|
1765
|
+
},
|
|
1766
|
+
};
|
|
1767
|
+
export const SiteHostSchema = {
|
|
1768
|
+
allOf: [
|
|
1769
|
+
{
|
|
1770
|
+
$ref: "#/components/schemas/SiteHostProperties",
|
|
1771
|
+
},
|
|
1772
|
+
],
|
|
1773
|
+
};
|
|
1774
|
+
export const SiteHostListSchema = {
|
|
1775
|
+
properties: {
|
|
1776
|
+
pagination: {
|
|
1777
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
1778
|
+
},
|
|
1779
|
+
rows: {
|
|
1780
|
+
items: {
|
|
1781
|
+
$ref: "#/components/schemas/SiteHost",
|
|
1782
|
+
},
|
|
1783
|
+
type: "array",
|
|
1784
|
+
"x-go-name": "Rows",
|
|
1785
|
+
},
|
|
1786
|
+
},
|
|
1787
|
+
};
|
|
1788
|
+
export const FrontendConfigSchema = {
|
|
1789
|
+
properties: {
|
|
1790
|
+
cookieAccessToken: {
|
|
1791
|
+
type: "string",
|
|
1792
|
+
description: "Cookie access token",
|
|
1793
|
+
},
|
|
1794
|
+
dashPath: {
|
|
1795
|
+
type: "string",
|
|
1796
|
+
description: "Dashboard path",
|
|
1797
|
+
},
|
|
1798
|
+
hotKeyDebug: {
|
|
1799
|
+
type: "string",
|
|
1800
|
+
description: "Hot key debug",
|
|
1801
|
+
},
|
|
1802
|
+
defaultTenantAccessToken: {
|
|
1803
|
+
type: "string",
|
|
1804
|
+
description: "实验性质,默认租户的access token",
|
|
1805
|
+
},
|
|
1806
|
+
},
|
|
1807
|
+
required: [
|
|
1808
|
+
"cookieAccessToken",
|
|
1809
|
+
"dashPath",
|
|
1810
|
+
"hotKeyDebug",
|
|
1811
|
+
"defaultTenantAccessToken",
|
|
1812
|
+
],
|
|
1813
|
+
};
|
|
1814
|
+
export const EndpointSchema = {
|
|
1815
|
+
properties: {
|
|
1816
|
+
metadata: {
|
|
1817
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
1818
|
+
},
|
|
1819
|
+
name: {
|
|
1820
|
+
type: "string",
|
|
1821
|
+
},
|
|
1822
|
+
url: {
|
|
1823
|
+
type: "string",
|
|
1824
|
+
},
|
|
1825
|
+
token: {
|
|
1826
|
+
type: "string",
|
|
1827
|
+
},
|
|
1828
|
+
type: {
|
|
1829
|
+
type: "string",
|
|
1830
|
+
},
|
|
1831
|
+
},
|
|
1832
|
+
required: ["metadata", "name", "url", "token", "type"],
|
|
1833
|
+
};
|
|
1834
|
+
export const EndpointListSchema = {
|
|
1835
|
+
properties: {
|
|
1836
|
+
pagination: {
|
|
1837
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
1838
|
+
},
|
|
1839
|
+
rows: {
|
|
1840
|
+
items: {
|
|
1841
|
+
$ref: "#/components/schemas/Endpoint",
|
|
1842
|
+
},
|
|
1843
|
+
type: "array",
|
|
1844
|
+
},
|
|
1845
|
+
},
|
|
1846
|
+
};
|
|
1847
|
+
export const UpdateEndpointRequestSchema = {
|
|
1848
|
+
properties: {
|
|
1849
|
+
name: {
|
|
1850
|
+
type: "string",
|
|
1851
|
+
},
|
|
1852
|
+
url: {
|
|
1853
|
+
type: "string",
|
|
1854
|
+
},
|
|
1855
|
+
token: {
|
|
1856
|
+
type: "string",
|
|
1857
|
+
},
|
|
1858
|
+
},
|
|
1859
|
+
};
|
|
1860
|
+
export const MtWorkerTaskSchema = {
|
|
1861
|
+
type: "object",
|
|
1862
|
+
properties: {
|
|
1863
|
+
id: {
|
|
1864
|
+
type: "string",
|
|
1865
|
+
},
|
|
1866
|
+
name: {
|
|
1867
|
+
type: "string",
|
|
1868
|
+
},
|
|
1869
|
+
},
|
|
1870
|
+
};
|
|
1871
|
+
export const WorkflowWorkerSchema = {
|
|
1872
|
+
type: "object",
|
|
1873
|
+
properties: {
|
|
1874
|
+
id: {
|
|
1875
|
+
type: "string",
|
|
1876
|
+
description: "Worker唯一标识符",
|
|
1877
|
+
},
|
|
1878
|
+
name: {
|
|
1879
|
+
type: "string",
|
|
1880
|
+
description: "Worker名称",
|
|
1881
|
+
},
|
|
1882
|
+
status: {
|
|
1883
|
+
type: "string",
|
|
1884
|
+
enum: ["running", "stopped", "starting", "stopping", "error"],
|
|
1885
|
+
description: "Worker状态",
|
|
1886
|
+
},
|
|
1887
|
+
hatchetUrl: {
|
|
1888
|
+
type: "string",
|
|
1889
|
+
description: "Hatchet服务器URL",
|
|
1890
|
+
},
|
|
1891
|
+
startedAt: {
|
|
1892
|
+
type: "string",
|
|
1893
|
+
format: "date-time",
|
|
1894
|
+
description: "启动时间",
|
|
1895
|
+
},
|
|
1896
|
+
pid: {
|
|
1897
|
+
type: "integer",
|
|
1898
|
+
description: "进程ID",
|
|
1899
|
+
},
|
|
1900
|
+
workflows: {
|
|
1901
|
+
type: "array",
|
|
1902
|
+
items: {
|
|
1903
|
+
type: "string",
|
|
1904
|
+
},
|
|
1905
|
+
description: "支持的工作流列表",
|
|
1906
|
+
},
|
|
1907
|
+
},
|
|
1908
|
+
};
|
|
1909
|
+
export const StartWorkerRequestSchema = {
|
|
1910
|
+
type: "object",
|
|
1911
|
+
required: ["name"],
|
|
1912
|
+
properties: {
|
|
1913
|
+
name: {
|
|
1914
|
+
type: "string",
|
|
1915
|
+
description: "Worker名称",
|
|
1916
|
+
},
|
|
1917
|
+
hatchetUrl: {
|
|
1918
|
+
type: "string",
|
|
1919
|
+
description: "Hatchet服务器URL",
|
|
1920
|
+
},
|
|
1921
|
+
hatchetToken: {
|
|
1922
|
+
type: "string",
|
|
1923
|
+
description: "Hatchet认证令牌",
|
|
1924
|
+
},
|
|
1925
|
+
workflows: {
|
|
1926
|
+
type: "array",
|
|
1927
|
+
items: {
|
|
1928
|
+
type: "string",
|
|
1929
|
+
},
|
|
1930
|
+
description: "要启用的工作流列表",
|
|
1931
|
+
},
|
|
1932
|
+
},
|
|
1933
|
+
};
|
|
1934
|
+
export const StopWorkerRequestSchema = {
|
|
1935
|
+
type: "object",
|
|
1936
|
+
required: ["workerId"],
|
|
1937
|
+
properties: {
|
|
1938
|
+
workerId: {
|
|
1939
|
+
type: "string",
|
|
1940
|
+
description: "要停止的Worker ID",
|
|
1941
|
+
},
|
|
1942
|
+
},
|
|
1943
|
+
};
|
|
1944
|
+
export const WorkerStatusSchema = {
|
|
1945
|
+
type: "object",
|
|
1946
|
+
properties: {
|
|
1947
|
+
id: {
|
|
1948
|
+
type: "string",
|
|
1949
|
+
description: "Worker ID",
|
|
1950
|
+
},
|
|
1951
|
+
name: {
|
|
1952
|
+
type: "string",
|
|
1953
|
+
description: "Worker名称",
|
|
1954
|
+
},
|
|
1955
|
+
status: {
|
|
1956
|
+
type: "string",
|
|
1957
|
+
enum: ["running", "stopped", "starting", "stopping", "error"],
|
|
1958
|
+
description: "Worker状态",
|
|
1959
|
+
},
|
|
1960
|
+
uptime: {
|
|
1961
|
+
type: "integer",
|
|
1962
|
+
description: "运行时间(秒)",
|
|
1963
|
+
},
|
|
1964
|
+
tasksProcessed: {
|
|
1965
|
+
type: "integer",
|
|
1966
|
+
description: "已处理任务数",
|
|
1967
|
+
},
|
|
1968
|
+
lastActivity: {
|
|
1969
|
+
type: "string",
|
|
1970
|
+
format: "date-time",
|
|
1971
|
+
description: "最后活动时间",
|
|
1972
|
+
},
|
|
1973
|
+
errorMessage: {
|
|
1974
|
+
type: "string",
|
|
1975
|
+
description: "错误信息(如果有)",
|
|
1976
|
+
},
|
|
1977
|
+
},
|
|
1978
|
+
};
|
|
1979
|
+
export const RunWorkflowRequestSchema = {
|
|
1980
|
+
type: "object",
|
|
1981
|
+
required: ["workflowType"],
|
|
1982
|
+
properties: {
|
|
1983
|
+
workflowType: {
|
|
1984
|
+
type: "string",
|
|
1985
|
+
enum: ["hello", "first-task"],
|
|
1986
|
+
description: "工作流类型",
|
|
1987
|
+
},
|
|
1988
|
+
name: {
|
|
1989
|
+
type: "string",
|
|
1990
|
+
description: "名称参数(用于hello工作流)",
|
|
1991
|
+
},
|
|
1992
|
+
message: {
|
|
1993
|
+
type: "string",
|
|
1994
|
+
description: "消息参数(用于first-task工作流)",
|
|
1995
|
+
},
|
|
1996
|
+
},
|
|
1997
|
+
};
|
|
1998
|
+
export const WorkflowResultSchema = {
|
|
1999
|
+
type: "object",
|
|
2000
|
+
properties: {
|
|
2001
|
+
success: {
|
|
2002
|
+
type: "boolean",
|
|
2003
|
+
description: "执行是否成功",
|
|
2004
|
+
},
|
|
2005
|
+
result: {
|
|
2006
|
+
type: "object",
|
|
2007
|
+
description: "工作流执行结果",
|
|
2008
|
+
},
|
|
2009
|
+
error: {
|
|
2010
|
+
type: "string",
|
|
2011
|
+
description: "错误信息(如果有)",
|
|
2012
|
+
},
|
|
2013
|
+
executionTime: {
|
|
2014
|
+
type: "number",
|
|
2015
|
+
description: "执行时间(毫秒)",
|
|
2016
|
+
},
|
|
2017
|
+
},
|
|
2018
|
+
};
|
|
2019
|
+
export const RunContainerRequestSchema = {
|
|
2020
|
+
type: "object",
|
|
2021
|
+
properties: {
|
|
2022
|
+
name: {
|
|
2023
|
+
type: "string",
|
|
2024
|
+
description: "Container name (optional, will be auto-generated if not provided)",
|
|
2025
|
+
minLength: 1,
|
|
2026
|
+
maxLength: 255,
|
|
2027
|
+
},
|
|
2028
|
+
image: {
|
|
2029
|
+
type: "string",
|
|
2030
|
+
description: "Docker image to run",
|
|
2031
|
+
default: "gitgit188/gomtm:latest",
|
|
2032
|
+
},
|
|
2033
|
+
command: {
|
|
2034
|
+
type: "string",
|
|
2035
|
+
description: "Command to run in container (optional)",
|
|
2036
|
+
},
|
|
2037
|
+
environment: {
|
|
2038
|
+
type: "object",
|
|
2039
|
+
description: "Environment variables",
|
|
2040
|
+
additionalProperties: true,
|
|
2041
|
+
},
|
|
2042
|
+
volumes: {
|
|
2043
|
+
type: "array",
|
|
2044
|
+
description: "Volume mounts",
|
|
2045
|
+
items: {
|
|
2046
|
+
type: "string",
|
|
2047
|
+
},
|
|
2048
|
+
},
|
|
2049
|
+
ports: {
|
|
2050
|
+
type: "array",
|
|
2051
|
+
description: "Port mappings",
|
|
2052
|
+
items: {
|
|
2053
|
+
type: "string",
|
|
2054
|
+
},
|
|
2055
|
+
},
|
|
2056
|
+
privileged: {
|
|
2057
|
+
type: "boolean",
|
|
2058
|
+
description: "Run container in privileged mode",
|
|
2059
|
+
default: true,
|
|
2060
|
+
},
|
|
2061
|
+
autoRemove: {
|
|
2062
|
+
type: "boolean",
|
|
2063
|
+
description: "Automatically remove container when it exits",
|
|
2064
|
+
default: true,
|
|
2065
|
+
},
|
|
2066
|
+
},
|
|
2067
|
+
};
|
|
2068
|
+
export const RunContainerResponseSchema = {
|
|
2069
|
+
type: "object",
|
|
2070
|
+
properties: {
|
|
2071
|
+
containerId: {
|
|
2072
|
+
type: "string",
|
|
2073
|
+
description: "The Docker container ID",
|
|
2074
|
+
},
|
|
2075
|
+
containerName: {
|
|
2076
|
+
type: "string",
|
|
2077
|
+
description: "The container name",
|
|
2078
|
+
},
|
|
2079
|
+
status: {
|
|
2080
|
+
type: "string",
|
|
2081
|
+
description: "Container status",
|
|
2082
|
+
enum: ["created", "running", "stopped", "error"],
|
|
2083
|
+
},
|
|
2084
|
+
message: {
|
|
2085
|
+
type: "string",
|
|
2086
|
+
description: "Status message or error details",
|
|
2087
|
+
},
|
|
2088
|
+
dockerCommand: {
|
|
2089
|
+
type: "string",
|
|
2090
|
+
description: "The actual docker command that was executed",
|
|
2091
|
+
},
|
|
2092
|
+
},
|
|
2093
|
+
required: ["containerId", "containerName", "status", "message"],
|
|
2094
|
+
};
|
|
2095
|
+
export const PostSchema = {
|
|
2096
|
+
properties: {
|
|
2097
|
+
metadata: {
|
|
2098
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
2099
|
+
},
|
|
2100
|
+
title: {
|
|
2101
|
+
type: "string",
|
|
2102
|
+
},
|
|
2103
|
+
content: {
|
|
2104
|
+
type: "string",
|
|
2105
|
+
description: "The tenant associated with this tenant blog",
|
|
2106
|
+
},
|
|
2107
|
+
slug: {
|
|
2108
|
+
type: "string",
|
|
2109
|
+
description: "The slug of the post",
|
|
2110
|
+
},
|
|
2111
|
+
status: {
|
|
2112
|
+
type: "string",
|
|
2113
|
+
enum: ["DRAFT", "PUBLISHED"],
|
|
2114
|
+
},
|
|
2115
|
+
},
|
|
2116
|
+
required: ["metadata", "title", "content", "slug", "status"],
|
|
2117
|
+
};
|
|
2118
|
+
export const PostListSchema = {
|
|
2119
|
+
properties: {
|
|
2120
|
+
pagination: {
|
|
2121
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
2122
|
+
},
|
|
2123
|
+
rows: {
|
|
2124
|
+
items: {
|
|
2125
|
+
$ref: "#/components/schemas/Post",
|
|
2126
|
+
},
|
|
2127
|
+
type: "array",
|
|
2128
|
+
},
|
|
2129
|
+
},
|
|
2130
|
+
};
|
|
2131
|
+
export const UpdatePostRequestSchema = {
|
|
2132
|
+
properties: {
|
|
2133
|
+
title: {
|
|
2134
|
+
type: "string",
|
|
2135
|
+
minLength: 3,
|
|
2136
|
+
maxLength: 200,
|
|
2137
|
+
},
|
|
2138
|
+
content: {
|
|
2139
|
+
type: "string",
|
|
2140
|
+
description: "The content of the post",
|
|
2141
|
+
minLength: 50,
|
|
2142
|
+
maxLength: 10240,
|
|
2143
|
+
},
|
|
2144
|
+
slug: {
|
|
2145
|
+
type: "string",
|
|
2146
|
+
description: "The slug of the post",
|
|
2147
|
+
minLength: 3,
|
|
2148
|
+
maxLength: 200,
|
|
2149
|
+
},
|
|
2150
|
+
status: {
|
|
2151
|
+
type: "string",
|
|
2152
|
+
enum: ["DRAFT", "PUBLISHED"],
|
|
2153
|
+
},
|
|
2154
|
+
},
|
|
2155
|
+
required: ["title", "content", "slug", "status"],
|
|
2156
|
+
};
|
|
2157
|
+
export const CreatePostRequestSchema = {
|
|
2158
|
+
properties: {
|
|
2159
|
+
siteId: {
|
|
2160
|
+
type: "string",
|
|
2161
|
+
format: "uuid",
|
|
2162
|
+
minLength: 36,
|
|
2163
|
+
maxLength: 36,
|
|
2164
|
+
},
|
|
2165
|
+
title: {
|
|
2166
|
+
type: "string",
|
|
2167
|
+
minLength: 3,
|
|
2168
|
+
maxLength: 200,
|
|
2169
|
+
},
|
|
2170
|
+
content: {
|
|
2171
|
+
type: "string",
|
|
2172
|
+
description: "The tenant associated with this tenant blog.",
|
|
2173
|
+
minLength: 50,
|
|
2174
|
+
maxLength: 10240,
|
|
2175
|
+
},
|
|
2176
|
+
slug: {
|
|
2177
|
+
type: "string",
|
|
2178
|
+
description: "The slug of the post",
|
|
2179
|
+
minLength: 3,
|
|
2180
|
+
maxLength: 200,
|
|
2181
|
+
},
|
|
2182
|
+
authorId: {
|
|
2183
|
+
type: "string",
|
|
2184
|
+
format: "uuid",
|
|
2185
|
+
minLength: 36,
|
|
2186
|
+
maxLength: 36,
|
|
2187
|
+
},
|
|
2188
|
+
status: {
|
|
2189
|
+
type: "string",
|
|
2190
|
+
enum: ["draft", "published"],
|
|
2191
|
+
},
|
|
2192
|
+
},
|
|
2193
|
+
required: ["siteId", "title", "content", "slug"],
|
|
2194
|
+
};
|
|
2195
|
+
export const SbWorkerProfileSchema = {
|
|
2196
|
+
required: [
|
|
2197
|
+
"frontendUrl",
|
|
2198
|
+
"isDebug",
|
|
2199
|
+
"autoStart",
|
|
2200
|
+
"defaultProfileName",
|
|
2201
|
+
"defaultProfileUrl",
|
|
2202
|
+
"defaultProfileType",
|
|
2203
|
+
],
|
|
2204
|
+
properties: {
|
|
2205
|
+
frontendUrl: {
|
|
2206
|
+
type: "string",
|
|
2207
|
+
},
|
|
2208
|
+
isDebug: {
|
|
2209
|
+
type: "boolean",
|
|
2210
|
+
},
|
|
2211
|
+
autoStart: {
|
|
2212
|
+
type: "boolean",
|
|
2213
|
+
},
|
|
2214
|
+
defaultProfileName: {
|
|
2215
|
+
type: "string",
|
|
2216
|
+
},
|
|
2217
|
+
defaultProfileUrl: {
|
|
2218
|
+
type: "string",
|
|
2219
|
+
},
|
|
2220
|
+
},
|
|
2221
|
+
};
|
|
2222
|
+
export const SbOutboundSchema = {
|
|
2223
|
+
description: "Sing-box outbound configuration",
|
|
2224
|
+
properties: {
|
|
2225
|
+
id: {
|
|
2226
|
+
type: "string",
|
|
2227
|
+
format: "uuid",
|
|
2228
|
+
description: "Unique identifier",
|
|
2229
|
+
},
|
|
2230
|
+
tag: {
|
|
2231
|
+
type: "string",
|
|
2232
|
+
description: "Tag name for this outbound",
|
|
2233
|
+
},
|
|
2234
|
+
type: {
|
|
2235
|
+
type: "string",
|
|
2236
|
+
description: "Type of outbound protocol",
|
|
2237
|
+
},
|
|
2238
|
+
server: {
|
|
2239
|
+
type: "string",
|
|
2240
|
+
description: "Server address",
|
|
2241
|
+
},
|
|
2242
|
+
server_port: {
|
|
2243
|
+
type: "integer",
|
|
2244
|
+
description: "Server port number",
|
|
2245
|
+
},
|
|
2246
|
+
password: {
|
|
2247
|
+
type: "string",
|
|
2248
|
+
description: "Authentication password",
|
|
2249
|
+
nullable: true,
|
|
2250
|
+
},
|
|
2251
|
+
security: {
|
|
2252
|
+
type: "string",
|
|
2253
|
+
description: "Security protocol",
|
|
2254
|
+
nullable: true,
|
|
2255
|
+
},
|
|
2256
|
+
domain_resolver: {
|
|
2257
|
+
type: "string",
|
|
2258
|
+
description: "Domain resolver configuration",
|
|
2259
|
+
nullable: true,
|
|
2260
|
+
},
|
|
2261
|
+
full_config: {
|
|
2262
|
+
type: "object",
|
|
2263
|
+
description: "Complete configuration in JSON format",
|
|
2264
|
+
},
|
|
2265
|
+
created_at: {
|
|
2266
|
+
type: "string",
|
|
2267
|
+
format: "date-time",
|
|
2268
|
+
description: "Creation timestamp",
|
|
2269
|
+
},
|
|
2270
|
+
updated_at: {
|
|
2271
|
+
type: "string",
|
|
2272
|
+
format: "date-time",
|
|
2273
|
+
description: "Last update timestamp",
|
|
2274
|
+
},
|
|
2275
|
+
},
|
|
2276
|
+
};
|
|
2277
|
+
export const SbOutboundCreateSchema = {
|
|
2278
|
+
description: "Create a new sing-box outbound",
|
|
2279
|
+
required: ["tag", "type", "server", "server_port", "full_config"],
|
|
2280
|
+
properties: {
|
|
2281
|
+
tag: {
|
|
2282
|
+
type: "string",
|
|
2283
|
+
description: "Tag name for this outbound",
|
|
2284
|
+
},
|
|
2285
|
+
type: {
|
|
2286
|
+
type: "string",
|
|
2287
|
+
description: "Type of outbound protocol",
|
|
2288
|
+
},
|
|
2289
|
+
server: {
|
|
2290
|
+
type: "string",
|
|
2291
|
+
description: "Server address",
|
|
2292
|
+
},
|
|
2293
|
+
server_port: {
|
|
2294
|
+
type: "integer",
|
|
2295
|
+
description: "Server port number",
|
|
2296
|
+
},
|
|
2297
|
+
password: {
|
|
2298
|
+
type: "string",
|
|
2299
|
+
description: "Authentication password",
|
|
2300
|
+
nullable: true,
|
|
2301
|
+
},
|
|
2302
|
+
security: {
|
|
2303
|
+
type: "string",
|
|
2304
|
+
description: "Security protocol",
|
|
2305
|
+
nullable: true,
|
|
2306
|
+
},
|
|
2307
|
+
domain_resolver: {
|
|
2308
|
+
type: "string",
|
|
2309
|
+
description: "Domain resolver configuration",
|
|
2310
|
+
nullable: true,
|
|
2311
|
+
},
|
|
2312
|
+
full_config: {
|
|
2313
|
+
type: "object",
|
|
2314
|
+
description: "Complete configuration in JSON format",
|
|
2315
|
+
},
|
|
2316
|
+
},
|
|
2317
|
+
};
|
|
2318
|
+
export const SbImportRequestSchema = {
|
|
2319
|
+
required: ["url"],
|
|
2320
|
+
properties: {
|
|
2321
|
+
url: {
|
|
2322
|
+
type: "string",
|
|
2323
|
+
},
|
|
2324
|
+
},
|
|
2325
|
+
};
|
|
2326
|
+
export const BrowserSchema = {
|
|
2327
|
+
description: "浏览器配置,类似于指纹浏览器的功能,用于管理浏览器配置文件",
|
|
2328
|
+
required: ["name", "url"],
|
|
2329
|
+
properties: {
|
|
2330
|
+
metadata: {
|
|
2331
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
2332
|
+
},
|
|
2333
|
+
name: {
|
|
2334
|
+
type: "string",
|
|
2335
|
+
description: "浏览器配置名称",
|
|
2336
|
+
example: "测试浏览器配置",
|
|
2337
|
+
},
|
|
2338
|
+
description: {
|
|
2339
|
+
type: "string",
|
|
2340
|
+
description: "浏览器配置描述",
|
|
2341
|
+
example: "用于测试的浏览器配置",
|
|
2342
|
+
},
|
|
2343
|
+
url: {
|
|
2344
|
+
type: "string",
|
|
2345
|
+
description: "浏览器默认访问URL",
|
|
2346
|
+
example: "https://example.com",
|
|
2347
|
+
},
|
|
2348
|
+
properties: {
|
|
2349
|
+
type: "object",
|
|
2350
|
+
description: "浏览器配置属性(JSON格式)",
|
|
2351
|
+
additionalProperties: true,
|
|
2352
|
+
example: {
|
|
2353
|
+
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
|
|
2354
|
+
viewport: {
|
|
2355
|
+
width: 375,
|
|
2356
|
+
height: 667,
|
|
2357
|
+
},
|
|
2358
|
+
},
|
|
2359
|
+
},
|
|
2360
|
+
tags: {
|
|
2361
|
+
type: "array",
|
|
2362
|
+
items: {
|
|
2363
|
+
type: "string",
|
|
2364
|
+
},
|
|
2365
|
+
description: "浏览器配置标签",
|
|
2366
|
+
example: ["测试", "开发"],
|
|
2367
|
+
},
|
|
2368
|
+
lastUsedAt: {
|
|
2369
|
+
type: "string",
|
|
2370
|
+
format: "date-time",
|
|
2371
|
+
description: "最后使用时间",
|
|
2372
|
+
},
|
|
2373
|
+
createdAt: {
|
|
2374
|
+
type: "string",
|
|
2375
|
+
format: "date-time",
|
|
2376
|
+
description: "创建时间",
|
|
2377
|
+
},
|
|
2378
|
+
updatedAt: {
|
|
2379
|
+
type: "string",
|
|
2380
|
+
format: "date-time",
|
|
2381
|
+
description: "更新时间",
|
|
2382
|
+
},
|
|
2383
|
+
},
|
|
2384
|
+
};
|
|
2385
|
+
export const BrowserListSchema = {
|
|
2386
|
+
description: "浏览器配置列表响应",
|
|
2387
|
+
properties: {
|
|
2388
|
+
pagination: {
|
|
2389
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
2390
|
+
},
|
|
2391
|
+
rows: {
|
|
2392
|
+
type: "array",
|
|
2393
|
+
items: {
|
|
2394
|
+
$ref: "#/components/schemas/Browser",
|
|
2395
|
+
},
|
|
2396
|
+
description: "浏览器配置列表",
|
|
2397
|
+
},
|
|
2398
|
+
},
|
|
2399
|
+
};
|
|
2400
|
+
export const BrowserCreateSchema = {
|
|
2401
|
+
description: "创建浏览器配置的请求",
|
|
2402
|
+
required: ["name", "url"],
|
|
2403
|
+
properties: {
|
|
2404
|
+
name: {
|
|
2405
|
+
type: "string",
|
|
2406
|
+
description: "浏览器配置名称",
|
|
2407
|
+
example: "测试浏览器配置",
|
|
2408
|
+
"x-oapi-codegen-extra-tags": {
|
|
2409
|
+
validate: "required",
|
|
2410
|
+
},
|
|
2411
|
+
},
|
|
2412
|
+
description: {
|
|
2413
|
+
type: "string",
|
|
2414
|
+
description: "浏览器配置描述",
|
|
2415
|
+
example: "用于测试的浏览器配置",
|
|
2416
|
+
},
|
|
2417
|
+
url: {
|
|
2418
|
+
type: "string",
|
|
2419
|
+
description: "浏览器默认访问URL",
|
|
2420
|
+
example: "https://example.com",
|
|
2421
|
+
"x-oapi-codegen-extra-tags": {
|
|
2422
|
+
validate: "required,url",
|
|
2423
|
+
},
|
|
2424
|
+
},
|
|
2425
|
+
properties: {
|
|
2426
|
+
type: "object",
|
|
2427
|
+
description: "浏览器配置属性(JSON格式)",
|
|
2428
|
+
additionalProperties: true,
|
|
2429
|
+
example: {
|
|
2430
|
+
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
|
|
2431
|
+
viewport: {
|
|
2432
|
+
width: 375,
|
|
2433
|
+
height: 667,
|
|
2434
|
+
},
|
|
2435
|
+
},
|
|
2436
|
+
},
|
|
2437
|
+
tags: {
|
|
2438
|
+
type: "array",
|
|
2439
|
+
items: {
|
|
2440
|
+
type: "string",
|
|
2441
|
+
},
|
|
2442
|
+
description: "浏览器配置标签",
|
|
2443
|
+
example: ["测试", "开发"],
|
|
2444
|
+
},
|
|
2445
|
+
},
|
|
2446
|
+
};
|
|
2447
|
+
export const BrowserExportSchema = {
|
|
2448
|
+
description: "浏览器配置导出响应",
|
|
2449
|
+
properties: {
|
|
2450
|
+
exportedAt: {
|
|
2451
|
+
type: "string",
|
|
2452
|
+
format: "date-time",
|
|
2453
|
+
description: "导出时间",
|
|
2454
|
+
},
|
|
2455
|
+
tenantId: {
|
|
2456
|
+
type: "string",
|
|
2457
|
+
format: "uuid",
|
|
2458
|
+
description: "租户ID",
|
|
2459
|
+
},
|
|
2460
|
+
browsers: {
|
|
2461
|
+
type: "array",
|
|
2462
|
+
items: {
|
|
2463
|
+
$ref: "#/components/schemas/Browser",
|
|
2464
|
+
},
|
|
2465
|
+
description: "导出的浏览器配置列表",
|
|
2466
|
+
},
|
|
2467
|
+
count: {
|
|
2468
|
+
type: "integer",
|
|
2469
|
+
description: "导出的浏览器配置数量",
|
|
2470
|
+
},
|
|
2471
|
+
},
|
|
2472
|
+
};
|
|
2473
|
+
export const UserDataArchiveSchema = {
|
|
2474
|
+
description: "用户数据归档信息",
|
|
2475
|
+
properties: {
|
|
2476
|
+
archive: {
|
|
2477
|
+
type: "string",
|
|
2478
|
+
description: "Base64编码的tar.gz用户数据归档",
|
|
2479
|
+
},
|
|
2480
|
+
checksum: {
|
|
2481
|
+
type: "string",
|
|
2482
|
+
description: "MD5校验和",
|
|
2483
|
+
},
|
|
2484
|
+
size: {
|
|
2485
|
+
type: "integer",
|
|
2486
|
+
format: "int64",
|
|
2487
|
+
description: "原始数据大小(字节)",
|
|
2488
|
+
},
|
|
2489
|
+
},
|
|
2490
|
+
};
|
|
2491
|
+
export const BrowserWithUserDataSchema = {
|
|
2492
|
+
description: "包含用户数据的浏览器配置",
|
|
2493
|
+
properties: {
|
|
2494
|
+
config: {
|
|
2495
|
+
$ref: "#/components/schemas/Browser",
|
|
2496
|
+
description: "浏览器配置信息",
|
|
2497
|
+
},
|
|
2498
|
+
userData: {
|
|
2499
|
+
$ref: "#/components/schemas/UserDataArchive",
|
|
2500
|
+
description: "用户数据归档,可选",
|
|
2501
|
+
},
|
|
2502
|
+
},
|
|
2503
|
+
};
|
|
2504
|
+
export const ExportMetadataSchema = {
|
|
2505
|
+
description: "导出元数据",
|
|
2506
|
+
properties: {
|
|
2507
|
+
version: {
|
|
2508
|
+
type: "string",
|
|
2509
|
+
description: "导出格式版本",
|
|
2510
|
+
example: "2.0",
|
|
2511
|
+
},
|
|
2512
|
+
includeUserData: {
|
|
2513
|
+
type: "boolean",
|
|
2514
|
+
description: "是否包含用户数据",
|
|
2515
|
+
},
|
|
2516
|
+
totalSize: {
|
|
2517
|
+
type: "integer",
|
|
2518
|
+
format: "int64",
|
|
2519
|
+
description: "总数据大小(字节)",
|
|
2520
|
+
},
|
|
2521
|
+
compressionRatio: {
|
|
2522
|
+
type: "number",
|
|
2523
|
+
format: "float",
|
|
2524
|
+
description: "压缩比率",
|
|
2525
|
+
},
|
|
2526
|
+
},
|
|
2527
|
+
};
|
|
2528
|
+
export const BrowserCompleteExportSchema = {
|
|
2529
|
+
description: "浏览器完整导出响应,包含配置和用户数据",
|
|
2530
|
+
properties: {
|
|
2531
|
+
exportedAt: {
|
|
2532
|
+
type: "string",
|
|
2533
|
+
format: "date-time",
|
|
2534
|
+
description: "导出时间",
|
|
2535
|
+
},
|
|
2536
|
+
tenantId: {
|
|
2537
|
+
type: "string",
|
|
2538
|
+
format: "uuid",
|
|
2539
|
+
description: "租户ID",
|
|
2540
|
+
},
|
|
2541
|
+
browsers: {
|
|
2542
|
+
type: "array",
|
|
2543
|
+
items: {
|
|
2544
|
+
$ref: "#/components/schemas/BrowserWithUserData",
|
|
2545
|
+
},
|
|
2546
|
+
description: "导出的浏览器配置和用户数据列表",
|
|
2547
|
+
},
|
|
2548
|
+
count: {
|
|
2549
|
+
type: "integer",
|
|
2550
|
+
description: "导出的浏览器配置数量",
|
|
2551
|
+
},
|
|
2552
|
+
metadata: {
|
|
2553
|
+
$ref: "#/components/schemas/ExportMetadata",
|
|
2554
|
+
description: "导出元数据",
|
|
2555
|
+
},
|
|
2556
|
+
},
|
|
2557
|
+
};
|
|
2558
|
+
export const BrowserImportSchema = {
|
|
2559
|
+
description: "浏览器配置导入请求",
|
|
2560
|
+
required: ["browsers"],
|
|
2561
|
+
properties: {
|
|
2562
|
+
browsers: {
|
|
2563
|
+
type: "array",
|
|
2564
|
+
items: {
|
|
2565
|
+
$ref: "#/components/schemas/BrowserCreate",
|
|
2566
|
+
},
|
|
2567
|
+
description: "要导入的浏览器配置列表",
|
|
2568
|
+
},
|
|
2569
|
+
overwrite: {
|
|
2570
|
+
type: "boolean",
|
|
2571
|
+
description: "是否覆盖同名的现有配置",
|
|
2572
|
+
default: false,
|
|
2573
|
+
},
|
|
2574
|
+
},
|
|
2575
|
+
};
|
|
2576
|
+
export const BrowserImportResultSchema = {
|
|
2577
|
+
description: "浏览器配置导入结果",
|
|
2578
|
+
properties: {
|
|
2579
|
+
importedAt: {
|
|
2580
|
+
type: "string",
|
|
2581
|
+
format: "date-time",
|
|
2582
|
+
description: "导入时间",
|
|
2583
|
+
},
|
|
2584
|
+
totalCount: {
|
|
2585
|
+
type: "integer",
|
|
2586
|
+
description: "总共尝试导入的配置数量",
|
|
2587
|
+
},
|
|
2588
|
+
successCount: {
|
|
2589
|
+
type: "integer",
|
|
2590
|
+
description: "成功导入的配置数量",
|
|
2591
|
+
},
|
|
2592
|
+
failedCount: {
|
|
2593
|
+
type: "integer",
|
|
2594
|
+
description: "导入失败的配置数量",
|
|
2595
|
+
},
|
|
2596
|
+
errors: {
|
|
2597
|
+
type: "array",
|
|
2598
|
+
items: {
|
|
2599
|
+
type: "object",
|
|
2600
|
+
properties: {
|
|
2601
|
+
index: {
|
|
2602
|
+
type: "integer",
|
|
2603
|
+
description: "失败配置在数组中的索引",
|
|
2604
|
+
},
|
|
2605
|
+
name: {
|
|
2606
|
+
type: "string",
|
|
2607
|
+
description: "失败配置的名称",
|
|
2608
|
+
},
|
|
2609
|
+
error: {
|
|
2610
|
+
type: "string",
|
|
2611
|
+
description: "失败原因",
|
|
2612
|
+
},
|
|
2613
|
+
},
|
|
2614
|
+
},
|
|
2615
|
+
description: "导入失败的详细信息",
|
|
2616
|
+
},
|
|
2617
|
+
},
|
|
2618
|
+
};
|
|
2619
|
+
export const BrowserUpdateSchema = {
|
|
2620
|
+
description: "更新浏览器配置的请求",
|
|
2621
|
+
properties: {
|
|
2622
|
+
name: {
|
|
2623
|
+
type: "string",
|
|
2624
|
+
description: "浏览器配置名称",
|
|
2625
|
+
example: "更新后的浏览器配置",
|
|
2626
|
+
},
|
|
2627
|
+
description: {
|
|
2628
|
+
type: "string",
|
|
2629
|
+
description: "浏览器配置描述",
|
|
2630
|
+
example: "更新后的描述",
|
|
2631
|
+
},
|
|
2632
|
+
url: {
|
|
2633
|
+
type: "string",
|
|
2634
|
+
description: "浏览器默认访问URL",
|
|
2635
|
+
example: "https://updated-example.com",
|
|
2636
|
+
},
|
|
2637
|
+
properties: {
|
|
2638
|
+
type: "object",
|
|
2639
|
+
description: "浏览器配置属性(JSON格式)",
|
|
2640
|
+
additionalProperties: true,
|
|
2641
|
+
},
|
|
2642
|
+
tags: {
|
|
2643
|
+
type: "array",
|
|
2644
|
+
items: {
|
|
2645
|
+
type: "string",
|
|
2646
|
+
},
|
|
2647
|
+
description: "浏览器配置标签",
|
|
2648
|
+
},
|
|
2649
|
+
},
|
|
2650
|
+
};
|
|
2651
|
+
export const BrowserLaunchOptionsSchema = {
|
|
2652
|
+
description: "浏览器启动可选参数",
|
|
2653
|
+
type: "object",
|
|
2654
|
+
properties: {
|
|
2655
|
+
headless: {
|
|
2656
|
+
type: "boolean",
|
|
2657
|
+
description: "是否以无头模式运行;为 false 表示“有头”。",
|
|
2658
|
+
default: true,
|
|
2659
|
+
},
|
|
2660
|
+
display: {
|
|
2661
|
+
type: "string",
|
|
2662
|
+
description: "Linux 显示器名,仅在有头模式下有效。",
|
|
2663
|
+
default: ":1",
|
|
2664
|
+
},
|
|
2665
|
+
},
|
|
2666
|
+
};
|
|
2667
|
+
export const BrowserLaunchResultSchema = {
|
|
2668
|
+
description: "浏览器启动结果",
|
|
2669
|
+
properties: {
|
|
2670
|
+
success: {
|
|
2671
|
+
type: "boolean",
|
|
2672
|
+
description: "启动是否成功",
|
|
2673
|
+
},
|
|
2674
|
+
message: {
|
|
2675
|
+
type: "string",
|
|
2676
|
+
description: "启动结果消息",
|
|
2677
|
+
},
|
|
2678
|
+
launchedAt: {
|
|
2679
|
+
type: "string",
|
|
2680
|
+
format: "date-time",
|
|
2681
|
+
description: "启动时间",
|
|
2682
|
+
},
|
|
2683
|
+
browserId: {
|
|
2684
|
+
type: "string",
|
|
2685
|
+
format: "uuid",
|
|
2686
|
+
description: "浏览器配置ID",
|
|
2687
|
+
},
|
|
2688
|
+
browserName: {
|
|
2689
|
+
type: "string",
|
|
2690
|
+
description: "浏览器配置名称",
|
|
2691
|
+
},
|
|
2692
|
+
url: {
|
|
2693
|
+
type: "string",
|
|
2694
|
+
description: "启动时访问的URL",
|
|
2695
|
+
},
|
|
2696
|
+
},
|
|
2697
|
+
};
|
|
2698
|
+
export const BrowserCloseResultSchema = {
|
|
2699
|
+
description: "浏览器关闭结果",
|
|
2700
|
+
properties: {
|
|
2701
|
+
success: {
|
|
2702
|
+
type: "boolean",
|
|
2703
|
+
description: "关闭是否成功",
|
|
2704
|
+
},
|
|
2705
|
+
message: {
|
|
2706
|
+
type: "string",
|
|
2707
|
+
description: "关闭结果消息",
|
|
2708
|
+
},
|
|
2709
|
+
closedAt: {
|
|
2710
|
+
type: "string",
|
|
2711
|
+
format: "date-time",
|
|
2712
|
+
description: "关闭时间",
|
|
2713
|
+
},
|
|
2714
|
+
browserId: {
|
|
2715
|
+
type: "string",
|
|
2716
|
+
format: "uuid",
|
|
2717
|
+
description: "浏览器配置ID",
|
|
2718
|
+
},
|
|
2719
|
+
browserName: {
|
|
2720
|
+
type: "string",
|
|
2721
|
+
description: "浏览器配置名称",
|
|
2722
|
+
},
|
|
2723
|
+
processInfo: {
|
|
2724
|
+
type: "object",
|
|
2725
|
+
description: "进程信息",
|
|
2726
|
+
properties: {
|
|
2727
|
+
pid: {
|
|
2728
|
+
type: "integer",
|
|
2729
|
+
description: "进程ID",
|
|
2730
|
+
},
|
|
2731
|
+
status: {
|
|
2732
|
+
type: "string",
|
|
2733
|
+
description: "进程状态",
|
|
2734
|
+
enum: ["running", "stopped", "not_found"],
|
|
2735
|
+
},
|
|
2736
|
+
},
|
|
2737
|
+
},
|
|
2738
|
+
},
|
|
2739
|
+
};
|
|
2740
|
+
export const BrowserStatusSchema = {
|
|
2741
|
+
description: "浏览器实例运行状态",
|
|
2742
|
+
properties: {
|
|
2743
|
+
browserId: {
|
|
2744
|
+
type: "string",
|
|
2745
|
+
format: "uuid",
|
|
2746
|
+
description: "浏览器配置ID",
|
|
2747
|
+
},
|
|
2748
|
+
browserName: {
|
|
2749
|
+
type: "string",
|
|
2750
|
+
description: "浏览器配置名称",
|
|
2751
|
+
},
|
|
2752
|
+
status: {
|
|
2753
|
+
type: "string",
|
|
2754
|
+
description: "浏览器实例状态",
|
|
2755
|
+
enum: ["running", "stopped", "starting", "stopping"],
|
|
2756
|
+
},
|
|
2757
|
+
processId: {
|
|
2758
|
+
type: "integer",
|
|
2759
|
+
description: "浏览器进程ID",
|
|
2760
|
+
},
|
|
2761
|
+
startedAt: {
|
|
2762
|
+
type: "string",
|
|
2763
|
+
format: "date-time",
|
|
2764
|
+
description: "启动时间",
|
|
2765
|
+
},
|
|
2766
|
+
stoppedAt: {
|
|
2767
|
+
type: "string",
|
|
2768
|
+
format: "date-time",
|
|
2769
|
+
description: "停止时间",
|
|
2770
|
+
},
|
|
2771
|
+
remoteDebuggingUrl: {
|
|
2772
|
+
type: "string",
|
|
2773
|
+
description: "远程调试URL",
|
|
2774
|
+
},
|
|
2775
|
+
error: {
|
|
2776
|
+
type: "string",
|
|
2777
|
+
description: "错误信息",
|
|
2778
|
+
},
|
|
2779
|
+
},
|
|
2780
|
+
};
|
|
2781
|
+
export const BrowserCookieSchema = {
|
|
2782
|
+
description: "浏览器cookie信息",
|
|
2783
|
+
required: ["name", "value", "domain", "path"],
|
|
2784
|
+
properties: {
|
|
2785
|
+
name: {
|
|
2786
|
+
type: "string",
|
|
2787
|
+
description: "Cookie名称",
|
|
2788
|
+
},
|
|
2789
|
+
value: {
|
|
2790
|
+
type: "string",
|
|
2791
|
+
description: "Cookie值",
|
|
2792
|
+
},
|
|
2793
|
+
domain: {
|
|
2794
|
+
type: "string",
|
|
2795
|
+
description: "Cookie所属域名",
|
|
2796
|
+
},
|
|
2797
|
+
path: {
|
|
2798
|
+
type: "string",
|
|
2799
|
+
description: "Cookie路径",
|
|
2800
|
+
},
|
|
2801
|
+
expires: {
|
|
2802
|
+
type: "string",
|
|
2803
|
+
format: "date-time",
|
|
2804
|
+
description: "过期时间",
|
|
2805
|
+
},
|
|
2806
|
+
httpOnly: {
|
|
2807
|
+
type: "boolean",
|
|
2808
|
+
description: "是否仅HTTP访问",
|
|
2809
|
+
},
|
|
2810
|
+
secure: {
|
|
2811
|
+
type: "boolean",
|
|
2812
|
+
description: "是否仅HTTPS传输",
|
|
2813
|
+
},
|
|
2814
|
+
sameSite: {
|
|
2815
|
+
type: "string",
|
|
2816
|
+
description: "SameSite属性",
|
|
2817
|
+
enum: ["Strict", "Lax", "None"],
|
|
2818
|
+
},
|
|
2819
|
+
size: {
|
|
2820
|
+
type: "integer",
|
|
2821
|
+
description: "Cookie大小(字节)",
|
|
2822
|
+
},
|
|
2823
|
+
},
|
|
2824
|
+
};
|
|
2825
|
+
export const BrowserCookiesSchema = {
|
|
2826
|
+
description: "浏览器cookies信息,按域名分组",
|
|
2827
|
+
required: [
|
|
2828
|
+
"browserId",
|
|
2829
|
+
"browserName",
|
|
2830
|
+
"status",
|
|
2831
|
+
"cookiesByDomain",
|
|
2832
|
+
"totalCookies",
|
|
2833
|
+
"domainCount",
|
|
2834
|
+
"retrievedAt",
|
|
2835
|
+
],
|
|
2836
|
+
properties: {
|
|
2837
|
+
browserId: {
|
|
2838
|
+
type: "string",
|
|
2839
|
+
format: "uuid",
|
|
2840
|
+
description: "浏览器配置ID",
|
|
2841
|
+
},
|
|
2842
|
+
browserName: {
|
|
2843
|
+
type: "string",
|
|
2844
|
+
description: "浏览器配置名称",
|
|
2845
|
+
},
|
|
2846
|
+
status: {
|
|
2847
|
+
type: "string",
|
|
2848
|
+
description: "浏览器实例状态",
|
|
2849
|
+
enum: ["running", "stopped"],
|
|
2850
|
+
},
|
|
2851
|
+
cookiesByDomain: {
|
|
2852
|
+
type: "object",
|
|
2853
|
+
description: "按域名分组的cookies",
|
|
2854
|
+
additionalProperties: {
|
|
2855
|
+
type: "array",
|
|
2856
|
+
items: {
|
|
2857
|
+
$ref: "#/components/schemas/BrowserCookie",
|
|
2858
|
+
},
|
|
2859
|
+
},
|
|
2860
|
+
},
|
|
2861
|
+
totalCookies: {
|
|
2862
|
+
type: "integer",
|
|
2863
|
+
description: "总cookie数量",
|
|
2864
|
+
},
|
|
2865
|
+
domainCount: {
|
|
2866
|
+
type: "integer",
|
|
2867
|
+
description: "域名数量",
|
|
2868
|
+
},
|
|
2869
|
+
retrievedAt: {
|
|
2870
|
+
type: "string",
|
|
2871
|
+
format: "date-time",
|
|
2872
|
+
description: "获取时间",
|
|
2873
|
+
},
|
|
2874
|
+
},
|
|
2875
|
+
};
|
|
2876
|
+
export const BrowserCookieUpdateSchema = {
|
|
2877
|
+
description: "单个cookie更新信息",
|
|
2878
|
+
required: ["name", "domain"],
|
|
2879
|
+
properties: {
|
|
2880
|
+
name: {
|
|
2881
|
+
type: "string",
|
|
2882
|
+
description: "Cookie名称",
|
|
2883
|
+
},
|
|
2884
|
+
value: {
|
|
2885
|
+
type: "string",
|
|
2886
|
+
description: "Cookie值,删除操作时可为空",
|
|
2887
|
+
},
|
|
2888
|
+
domain: {
|
|
2889
|
+
type: "string",
|
|
2890
|
+
description: "Cookie所属域名",
|
|
2891
|
+
},
|
|
2892
|
+
path: {
|
|
2893
|
+
type: "string",
|
|
2894
|
+
description: "Cookie路径",
|
|
2895
|
+
default: "/",
|
|
2896
|
+
},
|
|
2897
|
+
expires: {
|
|
2898
|
+
type: "string",
|
|
2899
|
+
format: "date-time",
|
|
2900
|
+
description: "过期时间",
|
|
2901
|
+
},
|
|
2902
|
+
httpOnly: {
|
|
2903
|
+
type: "boolean",
|
|
2904
|
+
description: "是否仅HTTP访问",
|
|
2905
|
+
default: false,
|
|
2906
|
+
},
|
|
2907
|
+
secure: {
|
|
2908
|
+
type: "boolean",
|
|
2909
|
+
description: "是否仅HTTPS传输",
|
|
2910
|
+
default: false,
|
|
2911
|
+
},
|
|
2912
|
+
sameSite: {
|
|
2913
|
+
type: "string",
|
|
2914
|
+
description: "SameSite属性",
|
|
2915
|
+
enum: ["Strict", "Lax", "None"],
|
|
2916
|
+
default: "Lax",
|
|
2917
|
+
},
|
|
2918
|
+
},
|
|
2919
|
+
};
|
|
2920
|
+
export const BrowserCookiesUpdateSchema = {
|
|
2921
|
+
description: "浏览器cookies更新请求",
|
|
2922
|
+
required: ["cookies"],
|
|
2923
|
+
properties: {
|
|
2924
|
+
cookies: {
|
|
2925
|
+
type: "array",
|
|
2926
|
+
items: {
|
|
2927
|
+
$ref: "#/components/schemas/BrowserCookieUpdate",
|
|
2928
|
+
},
|
|
2929
|
+
description: "要更新的cookies列表",
|
|
2930
|
+
},
|
|
2931
|
+
operation: {
|
|
2932
|
+
type: "string",
|
|
2933
|
+
description: "操作类型",
|
|
2934
|
+
enum: ["replace", "merge", "delete"],
|
|
2935
|
+
default: "replace",
|
|
2936
|
+
},
|
|
2937
|
+
},
|
|
2938
|
+
};
|
|
2939
|
+
export const BrowserCookiesUpdateResultSchema = {
|
|
2940
|
+
description: "Cookies更新结果",
|
|
2941
|
+
properties: {
|
|
2942
|
+
success: {
|
|
2943
|
+
type: "boolean",
|
|
2944
|
+
description: "更新是否成功",
|
|
2945
|
+
},
|
|
2946
|
+
message: {
|
|
2947
|
+
type: "string",
|
|
2948
|
+
description: "更新结果消息",
|
|
2949
|
+
},
|
|
2950
|
+
updatedAt: {
|
|
2951
|
+
type: "string",
|
|
2952
|
+
format: "date-time",
|
|
2953
|
+
description: "更新时间",
|
|
2954
|
+
},
|
|
2955
|
+
affectedCount: {
|
|
2956
|
+
type: "integer",
|
|
2957
|
+
description: "受影响的cookie数量",
|
|
2958
|
+
},
|
|
2959
|
+
browserId: {
|
|
2960
|
+
type: "string",
|
|
2961
|
+
format: "uuid",
|
|
2962
|
+
description: "浏览器配置ID",
|
|
2963
|
+
},
|
|
2964
|
+
},
|
|
2965
|
+
};
|
|
2966
|
+
export const BrowserStateSchema = {
|
|
2967
|
+
description: "浏览器持久化状态信息",
|
|
2968
|
+
properties: {
|
|
2969
|
+
browserId: {
|
|
2970
|
+
type: "string",
|
|
2971
|
+
format: "uuid",
|
|
2972
|
+
description: "浏览器配置ID",
|
|
2973
|
+
},
|
|
2974
|
+
browserName: {
|
|
2975
|
+
type: "string",
|
|
2976
|
+
description: "浏览器配置名称",
|
|
2977
|
+
},
|
|
2978
|
+
sessionData: {
|
|
2979
|
+
type: "object",
|
|
2980
|
+
description: "会话数据,包含cookies、localStorage等",
|
|
2981
|
+
additionalProperties: true,
|
|
2982
|
+
},
|
|
2983
|
+
lastSavedAt: {
|
|
2984
|
+
type: "string",
|
|
2985
|
+
format: "date-time",
|
|
2986
|
+
description: "最后保存时间",
|
|
2987
|
+
},
|
|
2988
|
+
version: {
|
|
2989
|
+
type: "string",
|
|
2990
|
+
description: "状态数据版本",
|
|
2991
|
+
default: "1.0",
|
|
2992
|
+
},
|
|
2993
|
+
},
|
|
2994
|
+
};
|
|
2995
|
+
export const BrowserStateUpdateSchema = {
|
|
2996
|
+
description: "浏览器状态更新请求",
|
|
2997
|
+
properties: {
|
|
2998
|
+
sessionData: {
|
|
2999
|
+
type: "object",
|
|
3000
|
+
description: "要更新的会话数据",
|
|
3001
|
+
additionalProperties: true,
|
|
3002
|
+
},
|
|
3003
|
+
mergeMode: {
|
|
3004
|
+
type: "boolean",
|
|
3005
|
+
description: "是否合并模式(true=合并,false=替换)",
|
|
3006
|
+
default: true,
|
|
3007
|
+
},
|
|
3008
|
+
},
|
|
3009
|
+
};
|
|
3010
|
+
export const BrowserStateUpdateResultSchema = {
|
|
3011
|
+
description: "浏览器状态更新结果",
|
|
3012
|
+
properties: {
|
|
3013
|
+
success: {
|
|
3014
|
+
type: "boolean",
|
|
3015
|
+
description: "更新是否成功",
|
|
3016
|
+
},
|
|
3017
|
+
message: {
|
|
3018
|
+
type: "string",
|
|
3019
|
+
description: "更新结果消息",
|
|
3020
|
+
},
|
|
3021
|
+
updatedAt: {
|
|
3022
|
+
type: "string",
|
|
3023
|
+
format: "date-time",
|
|
3024
|
+
description: "更新时间",
|
|
3025
|
+
},
|
|
3026
|
+
browserId: {
|
|
3027
|
+
type: "string",
|
|
3028
|
+
format: "uuid",
|
|
3029
|
+
description: "浏览器配置ID",
|
|
3030
|
+
},
|
|
3031
|
+
version: {
|
|
3032
|
+
type: "string",
|
|
3033
|
+
description: "更新后的状态数据版本",
|
|
3034
|
+
},
|
|
3035
|
+
},
|
|
3036
|
+
};
|
|
3037
|
+
export const BotConfigSchema = {
|
|
3038
|
+
required: [
|
|
3039
|
+
"public_server",
|
|
3040
|
+
"private_server",
|
|
3041
|
+
"frontend_url",
|
|
3042
|
+
"local_http_server_enabled",
|
|
3043
|
+
"local_http_server_port",
|
|
3044
|
+
"adb_server_enabled",
|
|
3045
|
+
"hatchet_token",
|
|
3046
|
+
],
|
|
3047
|
+
properties: {
|
|
3048
|
+
public_server: {
|
|
3049
|
+
type: "string",
|
|
3050
|
+
},
|
|
3051
|
+
private_server: {
|
|
3052
|
+
type: "string",
|
|
3053
|
+
},
|
|
3054
|
+
frontend_url: {
|
|
3055
|
+
type: "string",
|
|
3056
|
+
},
|
|
3057
|
+
local_http_server_enabled: {
|
|
3058
|
+
type: "boolean",
|
|
3059
|
+
},
|
|
3060
|
+
local_http_server_port: {
|
|
3061
|
+
type: "integer",
|
|
3062
|
+
},
|
|
3063
|
+
adb_server_enabled: {
|
|
3064
|
+
type: "boolean",
|
|
3065
|
+
},
|
|
3066
|
+
adb_server_port: {
|
|
3067
|
+
type: "integer",
|
|
3068
|
+
default: 5555,
|
|
3069
|
+
},
|
|
3070
|
+
hatchet_token: {
|
|
3071
|
+
type: "string",
|
|
3072
|
+
},
|
|
3073
|
+
},
|
|
3074
|
+
};
|
|
3075
|
+
export const BotSchema = {
|
|
3076
|
+
required: ["id", "created_at", "updated_at", "name", "description", "config"],
|
|
3077
|
+
properties: {
|
|
3078
|
+
id: {
|
|
3079
|
+
type: "string",
|
|
3080
|
+
},
|
|
3081
|
+
created_at: {
|
|
3082
|
+
type: "string",
|
|
3083
|
+
format: "date-time",
|
|
3084
|
+
},
|
|
3085
|
+
updated_at: {
|
|
3086
|
+
type: "string",
|
|
3087
|
+
format: "date-time",
|
|
3088
|
+
},
|
|
3089
|
+
name: {
|
|
3090
|
+
type: "string",
|
|
3091
|
+
},
|
|
3092
|
+
description: {
|
|
3093
|
+
type: "string",
|
|
3094
|
+
},
|
|
3095
|
+
config: {
|
|
3096
|
+
$ref: "#/components/schemas/BotConfig",
|
|
3097
|
+
},
|
|
3098
|
+
},
|
|
3099
|
+
};
|
|
3100
|
+
export const BotListSchema = {
|
|
3101
|
+
required: ["pagination", "rows"],
|
|
3102
|
+
properties: {
|
|
3103
|
+
pagination: {
|
|
3104
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
3105
|
+
},
|
|
3106
|
+
rows: {
|
|
3107
|
+
items: {
|
|
3108
|
+
$ref: "#/components/schemas/Bot",
|
|
3109
|
+
},
|
|
3110
|
+
type: "array",
|
|
3111
|
+
},
|
|
3112
|
+
},
|
|
3113
|
+
};
|
|
3114
|
+
export const BotLocalStateSchema = {
|
|
3115
|
+
required: ["bot_id", "device_type", "host_name"],
|
|
3116
|
+
properties: {
|
|
3117
|
+
bot_id: {
|
|
3118
|
+
type: "string",
|
|
3119
|
+
},
|
|
3120
|
+
device_type: {
|
|
3121
|
+
type: "string",
|
|
3122
|
+
enum: ["unknown", "android", "ios", "web"],
|
|
3123
|
+
},
|
|
3124
|
+
host_name: {
|
|
3125
|
+
type: "string",
|
|
3126
|
+
},
|
|
3127
|
+
},
|
|
3128
|
+
};
|
|
3129
|
+
export const SystemSetupRequestSchema = {
|
|
3130
|
+
type: "object",
|
|
3131
|
+
properties: {
|
|
3132
|
+
dbUrl: {
|
|
3133
|
+
type: "string",
|
|
3134
|
+
description: "PostgreSQL database connection string",
|
|
3135
|
+
example: "postgresql://postgres:postgres@localhost:5432/gomtm",
|
|
3136
|
+
pattern: "^postgresql:",
|
|
3137
|
+
},
|
|
3138
|
+
email: {
|
|
3139
|
+
type: "string",
|
|
3140
|
+
format: "email",
|
|
3141
|
+
description: "Administrator email for the first user",
|
|
3142
|
+
example: "admin@example.com",
|
|
3143
|
+
},
|
|
3144
|
+
password: {
|
|
3145
|
+
type: "string",
|
|
3146
|
+
description: "Password for the first administrator user (also saved as superPassword for compatibility)",
|
|
3147
|
+
example: "ChangeMe123!",
|
|
3148
|
+
minLength: 6,
|
|
3149
|
+
},
|
|
3150
|
+
},
|
|
3151
|
+
required: ["dbUrl", "email", "password"],
|
|
3152
|
+
};
|
|
3153
|
+
export const SystemLogEntrySchema = {
|
|
3154
|
+
type: "object",
|
|
3155
|
+
properties: {
|
|
3156
|
+
id: {
|
|
3157
|
+
type: "string",
|
|
3158
|
+
description: "Unique identifier for the log entry",
|
|
3159
|
+
example: "log_123456789",
|
|
3160
|
+
},
|
|
3161
|
+
timestamp: {
|
|
3162
|
+
type: "string",
|
|
3163
|
+
format: "date-time",
|
|
3164
|
+
description: "When the log entry was created",
|
|
3165
|
+
example: "2025-07-27T07:15:20.262Z",
|
|
3166
|
+
},
|
|
3167
|
+
level: {
|
|
3168
|
+
type: "string",
|
|
3169
|
+
enum: ["DEBUG", "INFO", "WARN", "ERROR"],
|
|
3170
|
+
description: "Log level",
|
|
3171
|
+
example: "INFO",
|
|
3172
|
+
},
|
|
3173
|
+
module: {
|
|
3174
|
+
type: "string",
|
|
3175
|
+
description: "Module or component that generated the log",
|
|
3176
|
+
example: "server",
|
|
3177
|
+
},
|
|
3178
|
+
message: {
|
|
3179
|
+
type: "string",
|
|
3180
|
+
description: "Log message content",
|
|
3181
|
+
example: "Database migration completed successfully",
|
|
3182
|
+
},
|
|
3183
|
+
context: {
|
|
3184
|
+
type: "object",
|
|
3185
|
+
additionalProperties: true,
|
|
3186
|
+
description: "Additional context data for the log entry",
|
|
3187
|
+
example: {
|
|
3188
|
+
applied: 0,
|
|
3189
|
+
current: "",
|
|
3190
|
+
target: "",
|
|
3191
|
+
},
|
|
3192
|
+
},
|
|
3193
|
+
source: {
|
|
3194
|
+
type: "string",
|
|
3195
|
+
description: "Source file or location where the log was generated",
|
|
3196
|
+
example: "mtm/api/v1/server/handlers/system/logs.go:21",
|
|
3197
|
+
},
|
|
3198
|
+
},
|
|
3199
|
+
required: ["id", "timestamp", "level", "module", "message"],
|
|
3200
|
+
};
|
|
3201
|
+
export const SystemLogsResponseSchema = {
|
|
3202
|
+
type: "object",
|
|
3203
|
+
properties: {
|
|
3204
|
+
logs: {
|
|
3205
|
+
type: "array",
|
|
3206
|
+
items: {
|
|
3207
|
+
$ref: "#/components/schemas/SystemLogEntry",
|
|
3208
|
+
},
|
|
3209
|
+
description: "Array of system log entries",
|
|
3210
|
+
},
|
|
3211
|
+
total: {
|
|
3212
|
+
type: "integer",
|
|
3213
|
+
description: "Total number of log entries matching the filter criteria",
|
|
3214
|
+
example: 1250,
|
|
3215
|
+
},
|
|
3216
|
+
limit: {
|
|
3217
|
+
type: "integer",
|
|
3218
|
+
description: "Maximum number of logs returned in this response",
|
|
3219
|
+
example: 100,
|
|
3220
|
+
},
|
|
3221
|
+
offset: {
|
|
3222
|
+
type: "integer",
|
|
3223
|
+
description: "Number of logs skipped for pagination",
|
|
3224
|
+
example: 0,
|
|
3225
|
+
},
|
|
3226
|
+
hasMore: {
|
|
3227
|
+
type: "boolean",
|
|
3228
|
+
description: "Whether there are more logs available",
|
|
3229
|
+
example: true,
|
|
3230
|
+
},
|
|
3231
|
+
},
|
|
3232
|
+
required: ["logs", "total", "limit", "offset", "hasMore"],
|
|
3233
|
+
};
|
|
3234
|
+
export const OAuthProviderSchema = {
|
|
3235
|
+
type: "object",
|
|
3236
|
+
properties: {
|
|
3237
|
+
name: {
|
|
3238
|
+
type: "string",
|
|
3239
|
+
description: "OAuth provider name",
|
|
3240
|
+
example: "github",
|
|
3241
|
+
},
|
|
3242
|
+
displayName: {
|
|
3243
|
+
type: "string",
|
|
3244
|
+
description: "Display name for the OAuth provider",
|
|
3245
|
+
example: "GitHub",
|
|
3246
|
+
},
|
|
3247
|
+
enabled: {
|
|
3248
|
+
type: "boolean",
|
|
3249
|
+
description: "Whether the OAuth provider is enabled",
|
|
3250
|
+
example: true,
|
|
3251
|
+
},
|
|
3252
|
+
clientId: {
|
|
3253
|
+
type: "string",
|
|
3254
|
+
description: "OAuth client ID",
|
|
3255
|
+
example: "your-github-client-id",
|
|
3256
|
+
},
|
|
3257
|
+
clientSecret: {
|
|
3258
|
+
type: "string",
|
|
3259
|
+
description: "OAuth client secret",
|
|
3260
|
+
example: "your-github-client-secret",
|
|
3261
|
+
},
|
|
3262
|
+
scopes: {
|
|
3263
|
+
type: "array",
|
|
3264
|
+
items: {
|
|
3265
|
+
type: "string",
|
|
3266
|
+
},
|
|
3267
|
+
description: "OAuth scopes",
|
|
3268
|
+
example: ["read:user", "user:email"],
|
|
3269
|
+
},
|
|
3270
|
+
},
|
|
3271
|
+
required: ["name", "displayName", "enabled"],
|
|
3272
|
+
};
|
|
3273
|
+
export const OAuthConfigResponseSchema = {
|
|
3274
|
+
type: "object",
|
|
3275
|
+
properties: {
|
|
3276
|
+
success: {
|
|
3277
|
+
type: "boolean",
|
|
3278
|
+
description: "Whether the request was successful",
|
|
3279
|
+
example: true,
|
|
3280
|
+
},
|
|
3281
|
+
message: {
|
|
3282
|
+
type: "string",
|
|
3283
|
+
description: "Human-readable message",
|
|
3284
|
+
example: "OAuth configuration retrieved successfully",
|
|
3285
|
+
},
|
|
3286
|
+
providers: {
|
|
3287
|
+
type: "object",
|
|
3288
|
+
additionalProperties: {
|
|
3289
|
+
$ref: "#/components/schemas/OAuthProvider",
|
|
3290
|
+
},
|
|
3291
|
+
description: "OAuth providers configuration",
|
|
3292
|
+
example: {
|
|
3293
|
+
github: {
|
|
3294
|
+
name: "github",
|
|
3295
|
+
displayName: "GitHub",
|
|
3296
|
+
enabled: true,
|
|
3297
|
+
clientId: "your-github-client-id",
|
|
3298
|
+
clientSecret: "your-github-client-secret",
|
|
3299
|
+
scopes: ["read:user", "user:email"],
|
|
3300
|
+
},
|
|
3301
|
+
google: {
|
|
3302
|
+
name: "google",
|
|
3303
|
+
displayName: "Google",
|
|
3304
|
+
enabled: false,
|
|
3305
|
+
clientId: "",
|
|
3306
|
+
clientSecret: "",
|
|
3307
|
+
scopes: ["openid", "profile", "email"],
|
|
3308
|
+
},
|
|
3309
|
+
},
|
|
3310
|
+
},
|
|
3311
|
+
},
|
|
3312
|
+
required: ["success", "message", "providers"],
|
|
3313
|
+
};
|
|
3314
|
+
export const OAuthConfigRequestSchema = {
|
|
3315
|
+
type: "object",
|
|
3316
|
+
properties: {
|
|
3317
|
+
providers: {
|
|
3318
|
+
type: "object",
|
|
3319
|
+
additionalProperties: {
|
|
3320
|
+
$ref: "#/components/schemas/OAuthProvider",
|
|
3321
|
+
},
|
|
3322
|
+
description: "OAuth providers configuration to save",
|
|
3323
|
+
example: {
|
|
3324
|
+
github: {
|
|
3325
|
+
name: "github",
|
|
3326
|
+
displayName: "GitHub",
|
|
3327
|
+
enabled: true,
|
|
3328
|
+
clientId: "your-github-client-id",
|
|
3329
|
+
clientSecret: "your-github-client-secret",
|
|
3330
|
+
scopes: ["read:user", "user:email"],
|
|
3331
|
+
},
|
|
3332
|
+
google: {
|
|
3333
|
+
name: "google",
|
|
3334
|
+
displayName: "Google",
|
|
3335
|
+
enabled: false,
|
|
3336
|
+
clientId: "",
|
|
3337
|
+
clientSecret: "",
|
|
3338
|
+
scopes: ["openid", "profile", "email"],
|
|
3339
|
+
},
|
|
3340
|
+
},
|
|
3341
|
+
},
|
|
3342
|
+
},
|
|
3343
|
+
required: ["providers"],
|
|
3344
|
+
};
|
|
3345
|
+
export const SystemPerformanceMetricsSchema = {
|
|
3346
|
+
type: "object",
|
|
3347
|
+
properties: {
|
|
3348
|
+
cpuUsage: {
|
|
3349
|
+
type: "number",
|
|
3350
|
+
format: "float",
|
|
3351
|
+
description: "CPU usage percentage",
|
|
3352
|
+
example: 25.5,
|
|
3353
|
+
minimum: 0,
|
|
3354
|
+
maximum: 100,
|
|
3355
|
+
},
|
|
3356
|
+
memoryUsage: {
|
|
3357
|
+
type: "number",
|
|
3358
|
+
format: "float",
|
|
3359
|
+
description: "Memory usage percentage",
|
|
3360
|
+
example: 60.2,
|
|
3361
|
+
minimum: 0,
|
|
3362
|
+
maximum: 100,
|
|
3363
|
+
},
|
|
3364
|
+
diskUsage: {
|
|
3365
|
+
type: "number",
|
|
3366
|
+
format: "float",
|
|
3367
|
+
description: "Disk usage percentage",
|
|
3368
|
+
example: 45.8,
|
|
3369
|
+
minimum: 0,
|
|
3370
|
+
maximum: 100,
|
|
3371
|
+
},
|
|
3372
|
+
memoryTotal: {
|
|
3373
|
+
type: "integer",
|
|
3374
|
+
format: "int64",
|
|
3375
|
+
description: "Total memory in bytes",
|
|
3376
|
+
example: 8589934592,
|
|
3377
|
+
},
|
|
3378
|
+
memoryUsed: {
|
|
3379
|
+
type: "integer",
|
|
3380
|
+
format: "int64",
|
|
3381
|
+
description: "Used memory in bytes",
|
|
3382
|
+
example: 5167308390,
|
|
3383
|
+
},
|
|
3384
|
+
memoryFree: {
|
|
3385
|
+
type: "integer",
|
|
3386
|
+
format: "int64",
|
|
3387
|
+
description: "Free memory in bytes",
|
|
3388
|
+
example: 3422626202,
|
|
3389
|
+
},
|
|
3390
|
+
loadAverage: {
|
|
3391
|
+
type: "array",
|
|
3392
|
+
items: {
|
|
3393
|
+
type: "number",
|
|
3394
|
+
format: "float",
|
|
3395
|
+
},
|
|
3396
|
+
description: "System load average (1min, 5min, 15min)",
|
|
3397
|
+
example: [1.2, 1.5, 1.8],
|
|
3398
|
+
minItems: 3,
|
|
3399
|
+
maxItems: 3,
|
|
3400
|
+
},
|
|
3401
|
+
uptime: {
|
|
3402
|
+
type: "integer",
|
|
3403
|
+
format: "int64",
|
|
3404
|
+
description: "System uptime in seconds",
|
|
3405
|
+
example: 86400,
|
|
3406
|
+
},
|
|
3407
|
+
timestamp: {
|
|
3408
|
+
type: "string",
|
|
3409
|
+
format: "date-time",
|
|
3410
|
+
description: "Timestamp when metrics were collected",
|
|
3411
|
+
example: "2025-01-27T14:30:00Z",
|
|
3412
|
+
},
|
|
3413
|
+
},
|
|
3414
|
+
required: [
|
|
3415
|
+
"cpuUsage",
|
|
3416
|
+
"memoryUsage",
|
|
3417
|
+
"diskUsage",
|
|
3418
|
+
"memoryTotal",
|
|
3419
|
+
"memoryUsed",
|
|
3420
|
+
"memoryFree",
|
|
3421
|
+
"loadAverage",
|
|
3422
|
+
"uptime",
|
|
3423
|
+
"timestamp",
|
|
3424
|
+
],
|
|
3425
|
+
};
|
|
3426
|
+
export const CloudflareAccountConfigSchema = {
|
|
3427
|
+
type: "object",
|
|
3428
|
+
properties: {
|
|
3429
|
+
accountId: {
|
|
3430
|
+
type: "string",
|
|
3431
|
+
description: "Cloudflare Account ID",
|
|
3432
|
+
example: "1234567890abcdef1234567890abcdef",
|
|
3433
|
+
},
|
|
3434
|
+
apiEmail: {
|
|
3435
|
+
type: "string",
|
|
3436
|
+
format: "email",
|
|
3437
|
+
description: "Cloudflare API Email",
|
|
3438
|
+
example: "admin@example.com",
|
|
3439
|
+
},
|
|
3440
|
+
apiToken: {
|
|
3441
|
+
type: "string",
|
|
3442
|
+
description: "Cloudflare API Token",
|
|
3443
|
+
example: "your-cloudflare-api-token",
|
|
3444
|
+
},
|
|
3445
|
+
},
|
|
3446
|
+
required: ["accountId", "apiEmail", "apiToken"],
|
|
3447
|
+
};
|
|
3448
|
+
export const CloudflareR2ConfigSchema = {
|
|
3449
|
+
type: "object",
|
|
3450
|
+
properties: {
|
|
3451
|
+
token: {
|
|
3452
|
+
type: "string",
|
|
3453
|
+
description: "Cloudflare R2 Token",
|
|
3454
|
+
example: "your-r2-token",
|
|
3455
|
+
},
|
|
3456
|
+
accessKey: {
|
|
3457
|
+
type: "string",
|
|
3458
|
+
description: "R2 Access Key",
|
|
3459
|
+
example: "your-r2-access-key",
|
|
3460
|
+
},
|
|
3461
|
+
secretKey: {
|
|
3462
|
+
type: "string",
|
|
3463
|
+
description: "R2 Secret Key",
|
|
3464
|
+
example: "your-r2-secret-key",
|
|
3465
|
+
},
|
|
3466
|
+
bucket: {
|
|
3467
|
+
type: "string",
|
|
3468
|
+
description: "Default R2 bucket name",
|
|
3469
|
+
example: "my-default-bucket",
|
|
3470
|
+
},
|
|
3471
|
+
},
|
|
3472
|
+
required: ["token", "accessKey", "secretKey", "bucket"],
|
|
3473
|
+
};
|
|
3474
|
+
export const SystemSettingsSchema = {
|
|
3475
|
+
type: "object",
|
|
3476
|
+
properties: {
|
|
3477
|
+
mainDomain: {
|
|
3478
|
+
type: "string",
|
|
3479
|
+
description: "Main domain for the system",
|
|
3480
|
+
example: "yuepa8.com",
|
|
3481
|
+
},
|
|
3482
|
+
cloudflareAccount: {
|
|
3483
|
+
$ref: "#/components/schemas/CloudflareAccountConfig",
|
|
3484
|
+
},
|
|
3485
|
+
cloudflareR2: {
|
|
3486
|
+
$ref: "#/components/schemas/CloudflareR2Config",
|
|
3487
|
+
},
|
|
3488
|
+
nodeAuthToken: {
|
|
3489
|
+
type: "string",
|
|
3490
|
+
description: "NPM authentication token for deployment",
|
|
3491
|
+
example: "npm_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
3492
|
+
},
|
|
3493
|
+
secretKey: {
|
|
3494
|
+
type: "string",
|
|
3495
|
+
description: "Encryption secret key for symmetric encryption",
|
|
3496
|
+
example: "your-32-character-secret-key-here",
|
|
3497
|
+
},
|
|
3498
|
+
exportMetadata: {
|
|
3499
|
+
type: "object",
|
|
3500
|
+
description: "Metadata about settings export/import",
|
|
3501
|
+
properties: {
|
|
3502
|
+
exportTimestamp: {
|
|
3503
|
+
type: "string",
|
|
3504
|
+
format: "date-time",
|
|
3505
|
+
description: "When the settings were last exported",
|
|
3506
|
+
},
|
|
3507
|
+
exportVersion: {
|
|
3508
|
+
type: "string",
|
|
3509
|
+
description: "Version of the export format",
|
|
3510
|
+
example: "1.0",
|
|
3511
|
+
},
|
|
3512
|
+
exportBy: {
|
|
3513
|
+
type: "string",
|
|
3514
|
+
description: "User who exported the settings",
|
|
3515
|
+
example: "admin@example.com",
|
|
3516
|
+
},
|
|
3517
|
+
},
|
|
3518
|
+
},
|
|
3519
|
+
},
|
|
3520
|
+
};
|
|
3521
|
+
export const SystemSettingsResponseSchema = {
|
|
3522
|
+
type: "object",
|
|
3523
|
+
properties: {
|
|
3524
|
+
success: {
|
|
3525
|
+
type: "boolean",
|
|
3526
|
+
description: "Whether the request was successful",
|
|
3527
|
+
example: true,
|
|
3528
|
+
},
|
|
3529
|
+
message: {
|
|
3530
|
+
type: "string",
|
|
3531
|
+
description: "Human-readable message",
|
|
3532
|
+
example: "System settings retrieved successfully",
|
|
3533
|
+
},
|
|
3534
|
+
settings: {
|
|
3535
|
+
$ref: "#/components/schemas/SystemSettings",
|
|
3536
|
+
},
|
|
3537
|
+
},
|
|
3538
|
+
required: ["success", "message", "settings"],
|
|
3539
|
+
};
|
|
3540
|
+
export const SystemSettingsUpdateRequestSchema = {
|
|
3541
|
+
type: "object",
|
|
3542
|
+
properties: {
|
|
3543
|
+
mainDomain: {
|
|
3544
|
+
type: "string",
|
|
3545
|
+
description: "Main domain for the system",
|
|
3546
|
+
example: "yuepa8.com",
|
|
3547
|
+
},
|
|
3548
|
+
cloudflareAccount: {
|
|
3549
|
+
$ref: "#/components/schemas/CloudflareAccountConfig",
|
|
3550
|
+
},
|
|
3551
|
+
cloudflareR2: {
|
|
3552
|
+
$ref: "#/components/schemas/CloudflareR2Config",
|
|
3553
|
+
},
|
|
3554
|
+
nodeAuthToken: {
|
|
3555
|
+
type: "string",
|
|
3556
|
+
description: "NPM authentication token for deployment",
|
|
3557
|
+
example: "npm_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
3558
|
+
},
|
|
3559
|
+
secretKey: {
|
|
3560
|
+
type: "string",
|
|
3561
|
+
description: "Encryption secret key for symmetric encryption",
|
|
3562
|
+
example: "your-32-character-secret-key-here",
|
|
3563
|
+
},
|
|
3564
|
+
},
|
|
3565
|
+
};
|
|
3566
|
+
export const SystemSettingsImportResponseSchema = {
|
|
3567
|
+
type: "object",
|
|
3568
|
+
properties: {
|
|
3569
|
+
success: {
|
|
3570
|
+
type: "boolean",
|
|
3571
|
+
description: "Whether the import was successful",
|
|
3572
|
+
example: true,
|
|
3573
|
+
},
|
|
3574
|
+
message: {
|
|
3575
|
+
type: "string",
|
|
3576
|
+
description: "Human-readable message about the import result",
|
|
3577
|
+
example: "System settings imported successfully",
|
|
3578
|
+
},
|
|
3579
|
+
importedCount: {
|
|
3580
|
+
type: "integer",
|
|
3581
|
+
description: "Number of settings imported",
|
|
3582
|
+
example: 5,
|
|
3583
|
+
},
|
|
3584
|
+
skippedCount: {
|
|
3585
|
+
type: "integer",
|
|
3586
|
+
description: "Number of settings skipped",
|
|
3587
|
+
example: 0,
|
|
3588
|
+
},
|
|
3589
|
+
errors: {
|
|
3590
|
+
type: "array",
|
|
3591
|
+
items: {
|
|
3592
|
+
type: "string",
|
|
3593
|
+
},
|
|
3594
|
+
description: "List of import errors if any",
|
|
3595
|
+
example: [],
|
|
3596
|
+
},
|
|
3597
|
+
},
|
|
3598
|
+
required: ["success", "message", "importedCount", "skippedCount", "errors"],
|
|
3599
|
+
};
|
|
3600
|
+
export const APIResourceMetaPropertiesSchema = {
|
|
3601
|
+
required: ["metadata"],
|
|
3602
|
+
properties: {
|
|
3603
|
+
metadata: {
|
|
3604
|
+
$ref: "#/components/schemas/APIResourceMeta",
|
|
3605
|
+
},
|
|
3606
|
+
},
|
|
3607
|
+
};
|
|
3608
|
+
export const QueueMetricsSchema = {
|
|
3609
|
+
type: "object",
|
|
3610
|
+
properties: {
|
|
3611
|
+
numQueued: {
|
|
3612
|
+
type: "integer",
|
|
3613
|
+
description: "The number of items in the queue.",
|
|
3614
|
+
},
|
|
3615
|
+
numRunning: {
|
|
3616
|
+
type: "integer",
|
|
3617
|
+
description: "The number of items running.",
|
|
3618
|
+
},
|
|
3619
|
+
numPending: {
|
|
3620
|
+
type: "integer",
|
|
3621
|
+
description: "The number of items pending.",
|
|
3622
|
+
},
|
|
3623
|
+
},
|
|
3624
|
+
required: ["numQueued", "numRunning", "numPending"],
|
|
3625
|
+
};
|
|
3626
|
+
export const TenantQueueMetricsSchema = {
|
|
3627
|
+
properties: {
|
|
3628
|
+
total: {
|
|
3629
|
+
$ref: "#/components/schemas/QueueMetrics",
|
|
3630
|
+
description: "The total queue metrics.",
|
|
3631
|
+
},
|
|
3632
|
+
workflow: {
|
|
3633
|
+
type: "object",
|
|
3634
|
+
additionalProperties: {
|
|
3635
|
+
$ref: "#/components/schemas/QueueMetrics",
|
|
3636
|
+
},
|
|
3637
|
+
},
|
|
3638
|
+
queues: {
|
|
3639
|
+
type: "object",
|
|
3640
|
+
additionalProperties: {
|
|
3641
|
+
type: "integer",
|
|
3642
|
+
},
|
|
3643
|
+
},
|
|
3644
|
+
},
|
|
3645
|
+
};
|
|
3646
|
+
export const TenantListSchema = {
|
|
3647
|
+
properties: {
|
|
3648
|
+
pagination: {
|
|
3649
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
3650
|
+
},
|
|
3651
|
+
rows: {
|
|
3652
|
+
items: {
|
|
3653
|
+
$ref: "#/components/schemas/Tenant",
|
|
3654
|
+
},
|
|
3655
|
+
type: "array",
|
|
3656
|
+
"x-go-name": "Rows",
|
|
3657
|
+
},
|
|
3658
|
+
},
|
|
3659
|
+
};
|
|
3660
|
+
export const LogLineSchema = {
|
|
3661
|
+
properties: {
|
|
3662
|
+
createdAt: {
|
|
3663
|
+
type: "string",
|
|
3664
|
+
format: "date-time",
|
|
3665
|
+
description: "The creation date of the log line.",
|
|
3666
|
+
},
|
|
3667
|
+
message: {
|
|
3668
|
+
type: "string",
|
|
3669
|
+
description: "The log message.",
|
|
3670
|
+
},
|
|
3671
|
+
metadata: {
|
|
3672
|
+
type: "object",
|
|
3673
|
+
description: "The log metadata.",
|
|
3674
|
+
},
|
|
3675
|
+
},
|
|
3676
|
+
required: ["createdAt", "message", "metadata"],
|
|
3677
|
+
};
|
|
3678
|
+
export const LogLineLevelSchema = {
|
|
3679
|
+
type: "string",
|
|
3680
|
+
enum: ["DEBUG", "INFO", "WARN", "ERROR"],
|
|
3681
|
+
};
|
|
3682
|
+
export const LogLineListSchema = {
|
|
3683
|
+
properties: {
|
|
3684
|
+
pagination: {
|
|
3685
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
3686
|
+
},
|
|
3687
|
+
rows: {
|
|
3688
|
+
items: {
|
|
3689
|
+
$ref: "#/components/schemas/LogLine",
|
|
3690
|
+
},
|
|
3691
|
+
type: "array",
|
|
3692
|
+
},
|
|
3693
|
+
},
|
|
3694
|
+
};
|
|
3695
|
+
export const CommonResultSchema = {
|
|
3696
|
+
required: ["Success", "Message"],
|
|
3697
|
+
properties: {
|
|
3698
|
+
Success: {
|
|
3699
|
+
type: "boolean",
|
|
3700
|
+
},
|
|
3701
|
+
Message: {
|
|
3702
|
+
type: "string",
|
|
3703
|
+
},
|
|
3704
|
+
other: {
|
|
3705
|
+
type: "object",
|
|
3706
|
+
},
|
|
3707
|
+
},
|
|
3708
|
+
};
|
|
3709
|
+
export const FormFieldSchema = {
|
|
3710
|
+
required: ["type", "name"],
|
|
3711
|
+
properties: {
|
|
3712
|
+
type: {
|
|
3713
|
+
type: "string",
|
|
3714
|
+
enum: ["text", "number", "boolean", "array", "object"],
|
|
3715
|
+
default: "text",
|
|
3716
|
+
},
|
|
3717
|
+
name: {
|
|
3718
|
+
type: "string",
|
|
3719
|
+
},
|
|
3720
|
+
default_value: {
|
|
3721
|
+
type: "string",
|
|
3722
|
+
},
|
|
3723
|
+
label: {
|
|
3724
|
+
type: "string",
|
|
3725
|
+
},
|
|
3726
|
+
description: {
|
|
3727
|
+
type: "string",
|
|
3728
|
+
},
|
|
3729
|
+
required: {
|
|
3730
|
+
type: "boolean",
|
|
3731
|
+
},
|
|
3732
|
+
min: {
|
|
3733
|
+
type: "number",
|
|
3734
|
+
},
|
|
3735
|
+
max: {
|
|
3736
|
+
type: "number",
|
|
3737
|
+
},
|
|
3738
|
+
placeholder: {
|
|
3739
|
+
type: "string",
|
|
3740
|
+
},
|
|
3741
|
+
},
|
|
3742
|
+
};
|
|
3743
|
+
export const SchemaFormSchema = {
|
|
3744
|
+
required: ["title", "fields"],
|
|
3745
|
+
properties: {
|
|
3746
|
+
form_type: {
|
|
3747
|
+
type: "string",
|
|
3748
|
+
enum: ["schema", "custom"],
|
|
3749
|
+
default: "schema",
|
|
3750
|
+
},
|
|
3751
|
+
form_name: {
|
|
3752
|
+
type: "string",
|
|
3753
|
+
},
|
|
3754
|
+
title: {
|
|
3755
|
+
type: "string",
|
|
3756
|
+
},
|
|
3757
|
+
description: {
|
|
3758
|
+
type: "string",
|
|
3759
|
+
},
|
|
3760
|
+
layout: {
|
|
3761
|
+
type: "string",
|
|
3762
|
+
enum: ["vertical", "horizontal"],
|
|
3763
|
+
default: "vertical",
|
|
3764
|
+
},
|
|
3765
|
+
fields: {
|
|
3766
|
+
type: "array",
|
|
3767
|
+
items: {
|
|
3768
|
+
$ref: "#/components/schemas/FormField",
|
|
3769
|
+
},
|
|
3770
|
+
},
|
|
3771
|
+
},
|
|
3772
|
+
};
|
|
3773
|
+
export const MtWorkerPropertiesSchema = {
|
|
3774
|
+
type: "object",
|
|
3775
|
+
properties: {
|
|
3776
|
+
id: {
|
|
3777
|
+
type: "string",
|
|
3778
|
+
},
|
|
3779
|
+
name: {
|
|
3780
|
+
type: "string",
|
|
3781
|
+
},
|
|
3782
|
+
},
|
|
3783
|
+
};
|
|
3784
|
+
export const McpToolSchema = {
|
|
3785
|
+
type: "object",
|
|
3786
|
+
description: "MCP 工具信息",
|
|
3787
|
+
properties: {
|
|
3788
|
+
name: {
|
|
3789
|
+
type: "string",
|
|
3790
|
+
description: "工具名称",
|
|
3791
|
+
example: "hello-mcp",
|
|
3792
|
+
},
|
|
3793
|
+
description: {
|
|
3794
|
+
type: "string",
|
|
3795
|
+
description: "工具描述",
|
|
3796
|
+
example: "A simple tool that echoes back a message with a greeting",
|
|
3797
|
+
},
|
|
3798
|
+
},
|
|
3799
|
+
required: ["name", "description"],
|
|
3800
|
+
};
|
|
3801
|
+
export const McpInfoSchema = {
|
|
3802
|
+
type: "object",
|
|
3803
|
+
description: "MCP 服务信息",
|
|
3804
|
+
properties: {
|
|
3805
|
+
name: {
|
|
3806
|
+
type: "string",
|
|
3807
|
+
description: "MCP 服务名称",
|
|
3808
|
+
example: "gomtm-mcp-server-v2",
|
|
3809
|
+
},
|
|
3810
|
+
version: {
|
|
3811
|
+
type: "string",
|
|
3812
|
+
description: "MCP 服务版本",
|
|
3813
|
+
example: "1.0.0",
|
|
3814
|
+
},
|
|
3815
|
+
description: {
|
|
3816
|
+
type: "string",
|
|
3817
|
+
description: "MCP 服务描述",
|
|
3818
|
+
example: "GoMTM MCP Server v2 using official Go SDK",
|
|
3819
|
+
},
|
|
3820
|
+
baseUrl: {
|
|
3821
|
+
type: "string",
|
|
3822
|
+
description: "MCP 服务基础URL路径",
|
|
3823
|
+
example: "/mcp_v2/",
|
|
3824
|
+
},
|
|
3825
|
+
endpoints: {
|
|
3826
|
+
type: "object",
|
|
3827
|
+
description: "MCP 服务端点配置",
|
|
3828
|
+
properties: {
|
|
3829
|
+
sse: {
|
|
3830
|
+
type: "string",
|
|
3831
|
+
description: "SSE 端点URL",
|
|
3832
|
+
example: "http://localhost:8080/mcp_v2/sse",
|
|
3833
|
+
},
|
|
3834
|
+
message: {
|
|
3835
|
+
type: "string",
|
|
3836
|
+
description: "消息端点URL",
|
|
3837
|
+
example: "http://localhost:8080/mcp_v2/message",
|
|
3838
|
+
},
|
|
3839
|
+
health: {
|
|
3840
|
+
type: "string",
|
|
3841
|
+
description: "健康检查端点URL",
|
|
3842
|
+
example: "http://localhost:8080/mcp_v2/health",
|
|
3843
|
+
},
|
|
3844
|
+
},
|
|
3845
|
+
required: ["sse", "message", "health"],
|
|
3846
|
+
},
|
|
3847
|
+
status: {
|
|
3848
|
+
type: "string",
|
|
3849
|
+
enum: ["running", "stopped", "error"],
|
|
3850
|
+
description: "MCP 服务状态",
|
|
3851
|
+
example: "running",
|
|
3852
|
+
},
|
|
3853
|
+
tools: {
|
|
3854
|
+
type: "array",
|
|
3855
|
+
description: "可用的 MCP 工具列表",
|
|
3856
|
+
items: {
|
|
3857
|
+
$ref: "#/components/schemas/McpTool",
|
|
3858
|
+
},
|
|
3859
|
+
},
|
|
3860
|
+
},
|
|
3861
|
+
required: [
|
|
3862
|
+
"name",
|
|
3863
|
+
"version",
|
|
3864
|
+
"description",
|
|
3865
|
+
"baseUrl",
|
|
3866
|
+
"endpoints",
|
|
3867
|
+
"status",
|
|
3868
|
+
],
|
|
3869
|
+
};
|
|
3870
|
+
export const McpDiagnosticCheckSchema = {
|
|
3871
|
+
type: "object",
|
|
3872
|
+
description: "MCP 诊断检查项",
|
|
3873
|
+
properties: {
|
|
3874
|
+
name: {
|
|
3875
|
+
type: "string",
|
|
3876
|
+
description: "检查项名称",
|
|
3877
|
+
example: "health_check",
|
|
3878
|
+
},
|
|
3879
|
+
description: {
|
|
3880
|
+
type: "string",
|
|
3881
|
+
description: "检查项描述",
|
|
3882
|
+
example: "健康检查端点测试",
|
|
3883
|
+
},
|
|
3884
|
+
status: {
|
|
3885
|
+
type: "string",
|
|
3886
|
+
enum: ["passed", "failed", "unknown"],
|
|
3887
|
+
description: "检查结果状态",
|
|
3888
|
+
example: "passed",
|
|
3889
|
+
},
|
|
3890
|
+
message: {
|
|
3891
|
+
type: "string",
|
|
3892
|
+
description: "检查结果消息",
|
|
3893
|
+
example: "健康检查端点正常",
|
|
3894
|
+
},
|
|
3895
|
+
error: {
|
|
3896
|
+
type: "string",
|
|
3897
|
+
description: "错误信息(如果检查失败)",
|
|
3898
|
+
example: "连接超时",
|
|
3899
|
+
},
|
|
3900
|
+
},
|
|
3901
|
+
required: ["name", "description", "status", "message"],
|
|
3902
|
+
};
|
|
3903
|
+
export const McpDiagnosticsSchema = {
|
|
3904
|
+
type: "object",
|
|
3905
|
+
description: "MCP 服务诊断结果",
|
|
3906
|
+
properties: {
|
|
3907
|
+
timestamp: {
|
|
3908
|
+
type: "string",
|
|
3909
|
+
format: "date-time",
|
|
3910
|
+
description: "诊断执行时间",
|
|
3911
|
+
example: "2024-01-28T10:30:00Z",
|
|
3912
|
+
},
|
|
3913
|
+
sseUrl: {
|
|
3914
|
+
type: "string",
|
|
3915
|
+
description: "测试的 SSE 端点URL",
|
|
3916
|
+
example: "http://localhost:8080/mcp_v2/sse",
|
|
3917
|
+
},
|
|
3918
|
+
healthUrl: {
|
|
3919
|
+
type: "string",
|
|
3920
|
+
description: "测试的健康检查端点URL",
|
|
3921
|
+
example: "http://localhost:8080/mcp_v2/health",
|
|
3922
|
+
},
|
|
3923
|
+
status: {
|
|
3924
|
+
type: "string",
|
|
3925
|
+
enum: ["healthy", "unhealthy", "unknown"],
|
|
3926
|
+
description: "整体诊断状态",
|
|
3927
|
+
example: "healthy",
|
|
3928
|
+
},
|
|
3929
|
+
message: {
|
|
3930
|
+
type: "string",
|
|
3931
|
+
description: "诊断结果消息",
|
|
3932
|
+
example: "所有检查都通过",
|
|
3933
|
+
},
|
|
3934
|
+
checks: {
|
|
3935
|
+
type: "array",
|
|
3936
|
+
description: "详细的检查结果列表",
|
|
3937
|
+
items: {
|
|
3938
|
+
$ref: "#/components/schemas/McpDiagnosticCheck",
|
|
3939
|
+
},
|
|
3940
|
+
},
|
|
3941
|
+
tools: {
|
|
3942
|
+
type: "array",
|
|
3943
|
+
description: "检测到的工具列表",
|
|
3944
|
+
items: {
|
|
3945
|
+
$ref: "#/components/schemas/McpTool",
|
|
3946
|
+
},
|
|
3947
|
+
},
|
|
3948
|
+
},
|
|
3949
|
+
required: ["timestamp", "sseUrl", "healthUrl", "status", "checks"],
|
|
3950
|
+
};
|
|
3951
|
+
export const AgentEventTypeSchema = {
|
|
3952
|
+
type: "string",
|
|
3953
|
+
enum: [
|
|
3954
|
+
"ThoughtEvent",
|
|
3955
|
+
"TextMessage",
|
|
3956
|
+
"PlatformAccountFlowInput",
|
|
3957
|
+
"ChatMessageInput",
|
|
3958
|
+
"SocialAddFollowersInput",
|
|
3959
|
+
"SocialLoginInput",
|
|
3960
|
+
"TenantInitInput",
|
|
3961
|
+
"AskUserFunctionCallInput",
|
|
3962
|
+
"StartNewChatInput",
|
|
3963
|
+
],
|
|
3964
|
+
};
|
|
3965
|
+
export const FlowNamesSchema = {
|
|
3966
|
+
type: "string",
|
|
3967
|
+
enum: [
|
|
3968
|
+
"sys",
|
|
3969
|
+
"tenant",
|
|
3970
|
+
"assistant",
|
|
3971
|
+
"ag",
|
|
3972
|
+
"browser",
|
|
3973
|
+
"resource",
|
|
3974
|
+
"instagram",
|
|
3975
|
+
"social",
|
|
3976
|
+
"team",
|
|
3977
|
+
"adk",
|
|
3978
|
+
],
|
|
3979
|
+
};
|
|
3980
|
+
export const AgentRunnerInputSchema = {
|
|
3981
|
+
properties: {
|
|
3982
|
+
content: {
|
|
3983
|
+
type: "string",
|
|
3984
|
+
},
|
|
3985
|
+
},
|
|
3986
|
+
};
|
|
3987
|
+
export const AgentRunnerOutputSchema = {
|
|
3988
|
+
properties: {
|
|
3989
|
+
content: {
|
|
3990
|
+
type: "string",
|
|
3991
|
+
},
|
|
3992
|
+
},
|
|
3993
|
+
};
|
|
3994
|
+
export const AgentPropertiesSchema = {
|
|
3995
|
+
required: ["name", "description", "provider", "config", "teamId"],
|
|
3996
|
+
properties: {
|
|
3997
|
+
name: {
|
|
3998
|
+
type: "string",
|
|
3999
|
+
},
|
|
4000
|
+
description: {
|
|
4001
|
+
type: "string",
|
|
4002
|
+
},
|
|
4003
|
+
provider: {
|
|
4004
|
+
type: "string",
|
|
4005
|
+
},
|
|
4006
|
+
config: {
|
|
4007
|
+
type: "object",
|
|
4008
|
+
},
|
|
4009
|
+
teamId: {
|
|
4010
|
+
type: "string",
|
|
4011
|
+
},
|
|
4012
|
+
},
|
|
4013
|
+
};
|
|
4014
|
+
export const AgentSchema = {
|
|
4015
|
+
allOf: [
|
|
4016
|
+
{
|
|
4017
|
+
$ref: "#/components/schemas/APIResourceMetaProperties",
|
|
4018
|
+
},
|
|
4019
|
+
{
|
|
4020
|
+
$ref: "#/components/schemas/AgentProperties",
|
|
4021
|
+
},
|
|
4022
|
+
],
|
|
4023
|
+
};
|
|
4024
|
+
export const AgentListSchema = {
|
|
4025
|
+
properties: {
|
|
4026
|
+
pagination: {
|
|
4027
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
4028
|
+
},
|
|
4029
|
+
rows: {
|
|
4030
|
+
type: "array",
|
|
4031
|
+
items: {
|
|
4032
|
+
$ref: "#/components/schemas/Agent",
|
|
4033
|
+
},
|
|
4034
|
+
},
|
|
4035
|
+
},
|
|
4036
|
+
};
|
|
4037
|
+
export const AgentTopicTypesSchema = {
|
|
4038
|
+
type: "string",
|
|
4039
|
+
enum: [
|
|
4040
|
+
"user",
|
|
4041
|
+
"human",
|
|
4042
|
+
"instagram",
|
|
4043
|
+
"browser",
|
|
4044
|
+
"socioety",
|
|
4045
|
+
"code",
|
|
4046
|
+
"router",
|
|
4047
|
+
"research",
|
|
4048
|
+
"writer",
|
|
4049
|
+
"tenant",
|
|
4050
|
+
"closure",
|
|
4051
|
+
"response",
|
|
4052
|
+
],
|
|
4053
|
+
};
|
|
4054
|
+
export const BrowserTaskSchema = {
|
|
4055
|
+
description: "浏览器(browser use)任务",
|
|
4056
|
+
required: ["content"],
|
|
4057
|
+
properties: {
|
|
4058
|
+
content: {
|
|
4059
|
+
type: "string",
|
|
4060
|
+
},
|
|
4061
|
+
},
|
|
4062
|
+
};
|
|
4063
|
+
export const BrowserOpenTaskSchema = {
|
|
4064
|
+
description: "打开浏览器备用,一般用于调试目的Open a browser and navigate to a URL.",
|
|
4065
|
+
required: ["url"],
|
|
4066
|
+
properties: {
|
|
4067
|
+
url: {
|
|
4068
|
+
type: "string",
|
|
4069
|
+
},
|
|
4070
|
+
},
|
|
4071
|
+
};
|
|
4072
|
+
export const BrowserConfigSchema = {
|
|
4073
|
+
description: "浏览器配置(未完成)",
|
|
4074
|
+
properties: {
|
|
4075
|
+
persistent: {
|
|
4076
|
+
type: "boolean",
|
|
4077
|
+
},
|
|
4078
|
+
},
|
|
4079
|
+
};
|
|
4080
|
+
export const ScheduledItemSchema = {
|
|
4081
|
+
required: ["id", "type", "trigger", "nextTrigger", "description"],
|
|
4082
|
+
properties: {
|
|
4083
|
+
id: {
|
|
4084
|
+
type: "string",
|
|
4085
|
+
},
|
|
4086
|
+
type: {
|
|
4087
|
+
type: "string",
|
|
4088
|
+
enum: ["cron", "scheduled", "delayed"],
|
|
4089
|
+
},
|
|
4090
|
+
trigger: {
|
|
4091
|
+
type: "string",
|
|
4092
|
+
},
|
|
4093
|
+
nextTrigger: {
|
|
4094
|
+
type: "string",
|
|
4095
|
+
},
|
|
4096
|
+
description: {
|
|
4097
|
+
type: "string",
|
|
4098
|
+
},
|
|
4099
|
+
},
|
|
4100
|
+
};
|
|
4101
|
+
export const PlatformAccountPropertiesSchema = {
|
|
4102
|
+
required: ["username", "password", "platform"],
|
|
4103
|
+
properties: {
|
|
4104
|
+
label: {
|
|
4105
|
+
type: "string",
|
|
4106
|
+
},
|
|
4107
|
+
description: {
|
|
4108
|
+
type: "string",
|
|
4109
|
+
},
|
|
4110
|
+
username: {
|
|
4111
|
+
type: "string",
|
|
4112
|
+
},
|
|
4113
|
+
email: {
|
|
4114
|
+
type: "string",
|
|
4115
|
+
},
|
|
4116
|
+
password: {
|
|
4117
|
+
type: "string",
|
|
4118
|
+
},
|
|
4119
|
+
token: {
|
|
4120
|
+
type: "string",
|
|
4121
|
+
},
|
|
4122
|
+
type: {
|
|
4123
|
+
type: "string",
|
|
4124
|
+
},
|
|
4125
|
+
platform: {
|
|
4126
|
+
type: "string",
|
|
4127
|
+
},
|
|
4128
|
+
enabled: {
|
|
4129
|
+
type: "boolean",
|
|
4130
|
+
},
|
|
4131
|
+
tags: {
|
|
4132
|
+
type: "array",
|
|
4133
|
+
items: {
|
|
4134
|
+
type: "string",
|
|
4135
|
+
},
|
|
4136
|
+
},
|
|
4137
|
+
state: {
|
|
4138
|
+
type: "object",
|
|
4139
|
+
additionalProperties: true,
|
|
4140
|
+
},
|
|
4141
|
+
error: {
|
|
4142
|
+
type: "string",
|
|
4143
|
+
},
|
|
4144
|
+
},
|
|
4145
|
+
};
|
|
4146
|
+
export const PlatformAccountSchema = {
|
|
4147
|
+
allOf: [
|
|
4148
|
+
{
|
|
4149
|
+
$ref: "#/components/schemas/APIResourceMetaProperties",
|
|
4150
|
+
},
|
|
4151
|
+
{
|
|
4152
|
+
$ref: "#/components/schemas/PlatformAccountProperties",
|
|
4153
|
+
},
|
|
4154
|
+
],
|
|
4155
|
+
};
|
|
4156
|
+
export const PlatformAccountListSchema = {
|
|
4157
|
+
properties: {
|
|
4158
|
+
pagination: {
|
|
4159
|
+
$ref: "#/components/schemas/PaginationResponse",
|
|
4160
|
+
},
|
|
4161
|
+
rows: {
|
|
4162
|
+
items: {
|
|
4163
|
+
$ref: "#/components/schemas/PlatformAccount",
|
|
4164
|
+
},
|
|
4165
|
+
type: "array",
|
|
4166
|
+
},
|
|
4167
|
+
},
|
|
4168
|
+
};
|
|
4169
|
+
export const PlatformAccountUpsertSchema = {
|
|
4170
|
+
allOf: [
|
|
4171
|
+
{
|
|
4172
|
+
$ref: "#/components/schemas/PlatformAccountProperties",
|
|
4173
|
+
},
|
|
4174
|
+
],
|
|
4175
|
+
};
|
|
4176
|
+
export const SbOutboundListSchema = {
|
|
4177
|
+
description: "List of sing-box outbounds",
|
|
4178
|
+
properties: {
|
|
4179
|
+
outbounds: {
|
|
4180
|
+
type: "array",
|
|
4181
|
+
items: {
|
|
4182
|
+
$ref: "#/components/schemas/SbOutbound",
|
|
4183
|
+
},
|
|
4184
|
+
},
|
|
4185
|
+
},
|
|
4186
|
+
};
|
|
4187
|
+
export const SbNetworkInterfaceSchema = {
|
|
4188
|
+
description: "Network interface information",
|
|
4189
|
+
required: ["name", "isUp", "type"],
|
|
4190
|
+
properties: {
|
|
4191
|
+
name: {
|
|
4192
|
+
type: "string",
|
|
4193
|
+
description: "Interface name (e.g., eth0, tun0)",
|
|
4194
|
+
},
|
|
4195
|
+
isUp: {
|
|
4196
|
+
type: "boolean",
|
|
4197
|
+
description: "Whether the interface is up",
|
|
4198
|
+
},
|
|
4199
|
+
type: {
|
|
4200
|
+
type: "string",
|
|
4201
|
+
enum: ["ethernet", "wifi", "tun", "tap", "loopback", "other"],
|
|
4202
|
+
description: "Type of network interface",
|
|
4203
|
+
},
|
|
4204
|
+
ipAddresses: {
|
|
4205
|
+
type: "array",
|
|
4206
|
+
items: {
|
|
4207
|
+
type: "string",
|
|
4208
|
+
},
|
|
4209
|
+
description: "List of IP addresses assigned to this interface",
|
|
4210
|
+
},
|
|
4211
|
+
macAddress: {
|
|
4212
|
+
type: "string",
|
|
4213
|
+
description: "MAC address of the interface (if applicable)",
|
|
4214
|
+
},
|
|
4215
|
+
mtu: {
|
|
4216
|
+
type: "integer",
|
|
4217
|
+
description: "Maximum Transmission Unit",
|
|
4218
|
+
},
|
|
4219
|
+
rxBytes: {
|
|
4220
|
+
type: "integer",
|
|
4221
|
+
description: "Bytes received",
|
|
4222
|
+
},
|
|
4223
|
+
txBytes: {
|
|
4224
|
+
type: "integer",
|
|
4225
|
+
description: "Bytes transmitted",
|
|
4226
|
+
},
|
|
4227
|
+
flags: {
|
|
4228
|
+
type: "array",
|
|
4229
|
+
items: {
|
|
4230
|
+
type: "string",
|
|
4231
|
+
},
|
|
4232
|
+
description: "Interface flags (UP, RUNNING, etc.)",
|
|
4233
|
+
},
|
|
4234
|
+
},
|
|
4235
|
+
};
|
|
4236
|
+
export const SbTorProcessSchema = {
|
|
4237
|
+
description: "Information about a Tor process",
|
|
4238
|
+
required: ["pid", "command", "isEmbedded"],
|
|
4239
|
+
properties: {
|
|
4240
|
+
pid: {
|
|
4241
|
+
type: "integer",
|
|
4242
|
+
description: "Process ID",
|
|
4243
|
+
},
|
|
4244
|
+
command: {
|
|
4245
|
+
type: "string",
|
|
4246
|
+
description: "Command line used to start the process",
|
|
4247
|
+
},
|
|
4248
|
+
isEmbedded: {
|
|
4249
|
+
type: "boolean",
|
|
4250
|
+
description: "Whether this is an embedded Tor process",
|
|
4251
|
+
},
|
|
4252
|
+
startTime: {
|
|
4253
|
+
type: "string",
|
|
4254
|
+
format: "date-time",
|
|
4255
|
+
description: "When the process was started",
|
|
4256
|
+
},
|
|
4257
|
+
memoryUsage: {
|
|
4258
|
+
type: "integer",
|
|
4259
|
+
description: "Memory usage in bytes",
|
|
4260
|
+
},
|
|
4261
|
+
cpuUsage: {
|
|
4262
|
+
type: "number",
|
|
4263
|
+
description: "CPU usage percentage",
|
|
4264
|
+
},
|
|
4265
|
+
status: {
|
|
4266
|
+
type: "string",
|
|
4267
|
+
enum: ["running", "sleeping", "stopped", "zombie"],
|
|
4268
|
+
description: "Process status",
|
|
4269
|
+
},
|
|
4270
|
+
},
|
|
4271
|
+
};
|
|
4272
|
+
export const SbSystemInfoSchema = {
|
|
4273
|
+
description: "System information relevant to Tor operation",
|
|
4274
|
+
required: ["os", "architecture", "hasRootPrivileges"],
|
|
4275
|
+
properties: {
|
|
4276
|
+
os: {
|
|
4277
|
+
type: "string",
|
|
4278
|
+
description: "Operating system name",
|
|
4279
|
+
},
|
|
4280
|
+
architecture: {
|
|
4281
|
+
type: "string",
|
|
4282
|
+
description: "System architecture (amd64, arm64, etc.)",
|
|
4283
|
+
},
|
|
4284
|
+
hasRootPrivileges: {
|
|
4285
|
+
type: "boolean",
|
|
4286
|
+
description: "Whether the process has root/admin privileges",
|
|
4287
|
+
},
|
|
4288
|
+
kernelVersion: {
|
|
4289
|
+
type: "string",
|
|
4290
|
+
description: "Kernel version",
|
|
4291
|
+
},
|
|
4292
|
+
availableMemory: {
|
|
4293
|
+
type: "integer",
|
|
4294
|
+
description: "Available system memory in bytes",
|
|
4295
|
+
},
|
|
4296
|
+
totalMemory: {
|
|
4297
|
+
type: "integer",
|
|
4298
|
+
description: "Total system memory in bytes",
|
|
4299
|
+
},
|
|
4300
|
+
loadAverage: {
|
|
4301
|
+
type: "array",
|
|
4302
|
+
items: {
|
|
4303
|
+
type: "number",
|
|
4304
|
+
},
|
|
4305
|
+
description: "System load average (1, 5, 15 minutes)",
|
|
4306
|
+
},
|
|
4307
|
+
isCodespaces: {
|
|
4308
|
+
type: "boolean",
|
|
4309
|
+
description: "Whether running in GitHub Codespaces",
|
|
4310
|
+
},
|
|
4311
|
+
isContainer: {
|
|
4312
|
+
type: "boolean",
|
|
4313
|
+
description: "Whether running in a container",
|
|
4314
|
+
},
|
|
4315
|
+
},
|
|
4316
|
+
};
|
|
4317
|
+
export const SbEmbeddedTorInfoSchema = {
|
|
4318
|
+
description: "Information about the embedded Tor instance",
|
|
4319
|
+
properties: {
|
|
4320
|
+
version: {
|
|
4321
|
+
type: "string",
|
|
4322
|
+
description: "Embedded Tor version",
|
|
4323
|
+
},
|
|
4324
|
+
isActive: {
|
|
4325
|
+
type: "boolean",
|
|
4326
|
+
description: "Whether embedded Tor is currently active",
|
|
4327
|
+
},
|
|
4328
|
+
dataDirectory: {
|
|
4329
|
+
type: "string",
|
|
4330
|
+
description: "Path to Tor data directory",
|
|
4331
|
+
},
|
|
4332
|
+
configurationSummary: {
|
|
4333
|
+
type: "object",
|
|
4334
|
+
description: "Summary of current Tor configuration",
|
|
4335
|
+
},
|
|
4336
|
+
bootstrapProgress: {
|
|
4337
|
+
type: "integer",
|
|
4338
|
+
minimum: 0,
|
|
4339
|
+
maximum: 100,
|
|
4340
|
+
description: "Tor bootstrap progress percentage",
|
|
4341
|
+
},
|
|
4342
|
+
circuitCount: {
|
|
4343
|
+
type: "integer",
|
|
4344
|
+
description: "Number of active circuits",
|
|
4345
|
+
},
|
|
4346
|
+
relayCount: {
|
|
4347
|
+
type: "integer",
|
|
4348
|
+
description: "Number of known relays",
|
|
4349
|
+
},
|
|
4350
|
+
},
|
|
4351
|
+
};
|
|
4352
|
+
export const SbRouteEntrySchema = {
|
|
4353
|
+
description: "Routing table entry",
|
|
4354
|
+
required: ["destination", "gateway", "interface"],
|
|
4355
|
+
properties: {
|
|
4356
|
+
destination: {
|
|
4357
|
+
type: "string",
|
|
4358
|
+
description: "Destination network (CIDR notation)",
|
|
4359
|
+
},
|
|
4360
|
+
gateway: {
|
|
4361
|
+
type: "string",
|
|
4362
|
+
description: "Gateway IP address",
|
|
4363
|
+
},
|
|
4364
|
+
interface: {
|
|
4365
|
+
type: "string",
|
|
4366
|
+
description: "Network interface name",
|
|
4367
|
+
},
|
|
4368
|
+
metric: {
|
|
4369
|
+
type: "integer",
|
|
4370
|
+
description: "Route metric/priority",
|
|
4371
|
+
},
|
|
4372
|
+
flags: {
|
|
4373
|
+
type: "array",
|
|
4374
|
+
items: {
|
|
4375
|
+
type: "string",
|
|
4376
|
+
},
|
|
4377
|
+
description: "Route flags",
|
|
4378
|
+
},
|
|
4379
|
+
},
|
|
4380
|
+
};
|
|
4381
|
+
export const SbDNSConfigurationSchema = {
|
|
4382
|
+
description: "DNS configuration information",
|
|
4383
|
+
properties: {
|
|
4384
|
+
nameservers: {
|
|
4385
|
+
type: "array",
|
|
4386
|
+
items: {
|
|
4387
|
+
type: "string",
|
|
4388
|
+
},
|
|
4389
|
+
description: "List of configured DNS nameservers",
|
|
4390
|
+
},
|
|
4391
|
+
searchDomains: {
|
|
4392
|
+
type: "array",
|
|
4393
|
+
items: {
|
|
4394
|
+
type: "string",
|
|
4395
|
+
},
|
|
4396
|
+
description: "DNS search domains",
|
|
4397
|
+
},
|
|
4398
|
+
torDNSPort: {
|
|
4399
|
+
type: "integer",
|
|
4400
|
+
description: "Port used for Tor DNS resolution",
|
|
4401
|
+
},
|
|
4402
|
+
dnsOverTor: {
|
|
4403
|
+
type: "boolean",
|
|
4404
|
+
description: "Whether DNS queries are routed through Tor",
|
|
4405
|
+
},
|
|
4406
|
+
},
|
|
4407
|
+
};
|
|
4408
|
+
export const SbPerformanceMetricsSchema = {
|
|
4409
|
+
description: "Performance metrics for Tor V4",
|
|
4410
|
+
properties: {
|
|
4411
|
+
connectionCount: {
|
|
4412
|
+
type: "integer",
|
|
4413
|
+
description: "Number of active connections",
|
|
4414
|
+
},
|
|
4415
|
+
bytesReceived: {
|
|
4416
|
+
type: "integer",
|
|
4417
|
+
description: "Total bytes received",
|
|
4418
|
+
},
|
|
4419
|
+
bytesSent: {
|
|
4420
|
+
type: "integer",
|
|
4421
|
+
description: "Total bytes sent",
|
|
4422
|
+
},
|
|
4423
|
+
averageLatency: {
|
|
4424
|
+
type: "number",
|
|
4425
|
+
description: "Average connection latency in milliseconds",
|
|
4426
|
+
},
|
|
4427
|
+
circuitBuildTime: {
|
|
4428
|
+
type: "number",
|
|
4429
|
+
description: "Average circuit build time in milliseconds",
|
|
4430
|
+
},
|
|
4431
|
+
lastActivityTime: {
|
|
4432
|
+
type: "string",
|
|
4433
|
+
format: "date-time",
|
|
4434
|
+
description: "Timestamp of last network activity",
|
|
4435
|
+
},
|
|
4436
|
+
},
|
|
4437
|
+
};
|
|
4438
|
+
export const MobileHelloSchema = {
|
|
4439
|
+
type: "object",
|
|
4440
|
+
properties: {
|
|
4441
|
+
message: {
|
|
4442
|
+
type: "string",
|
|
4443
|
+
},
|
|
4444
|
+
},
|
|
4445
|
+
};
|
|
4446
|
+
export const DatabaseSetupRequestSchema = {
|
|
4447
|
+
type: "object",
|
|
4448
|
+
properties: {
|
|
4449
|
+
databaseUrl: {
|
|
4450
|
+
type: "string",
|
|
4451
|
+
description: "PostgreSQL database connection string",
|
|
4452
|
+
example: "postgresql://postgres:postgres@localhost:5432/gomtm",
|
|
4453
|
+
pattern: "^postgresql:",
|
|
4454
|
+
},
|
|
4455
|
+
},
|
|
4456
|
+
required: ["databaseUrl"],
|
|
4457
|
+
};
|
|
4458
|
+
export const DatabaseSetupResponseSchema = {
|
|
4459
|
+
type: "object",
|
|
4460
|
+
properties: {
|
|
4461
|
+
success: {
|
|
4462
|
+
type: "boolean",
|
|
4463
|
+
description: "Whether the database configuration was successful",
|
|
4464
|
+
example: true,
|
|
4465
|
+
},
|
|
4466
|
+
message: {
|
|
4467
|
+
type: "string",
|
|
4468
|
+
description: "Success message",
|
|
4469
|
+
example: "Database configured successfully",
|
|
4470
|
+
},
|
|
4471
|
+
databaseUrl: {
|
|
4472
|
+
type: "string",
|
|
4473
|
+
description: "The configured database URL (without sensitive information)",
|
|
4474
|
+
example: "postgresql://***:***@localhost:5432/gomtm",
|
|
4475
|
+
},
|
|
4476
|
+
},
|
|
4477
|
+
required: ["success", "message"],
|
|
4478
|
+
};
|
|
4479
|
+
export const SetupStatusResponseSchema = {
|
|
4480
|
+
type: "object",
|
|
4481
|
+
properties: {
|
|
4482
|
+
databaseConfigured: {
|
|
4483
|
+
type: "boolean",
|
|
4484
|
+
description: "Whether database is configured",
|
|
4485
|
+
example: true,
|
|
4486
|
+
},
|
|
4487
|
+
setupComplete: {
|
|
4488
|
+
type: "boolean",
|
|
4489
|
+
description: "Whether system setup is complete (only database configuration needed)",
|
|
4490
|
+
example: false,
|
|
4491
|
+
},
|
|
4492
|
+
dbReady: {
|
|
4493
|
+
type: "boolean",
|
|
4494
|
+
description: "Whether the database connection has been validated and is ready",
|
|
4495
|
+
example: false,
|
|
4496
|
+
},
|
|
4497
|
+
lastError: {
|
|
4498
|
+
type: "string",
|
|
4499
|
+
nullable: true,
|
|
4500
|
+
description: "Last error message occurred during validation (if any)",
|
|
4501
|
+
example: "could not connect to database: timeout",
|
|
4502
|
+
},
|
|
4503
|
+
nextStep: {
|
|
4504
|
+
type: "string",
|
|
4505
|
+
enum: ["database", "complete"],
|
|
4506
|
+
description: "Next step in the setup process",
|
|
4507
|
+
example: "database",
|
|
4508
|
+
},
|
|
4509
|
+
},
|
|
4510
|
+
required: ["databaseConfigured", "setupComplete", "nextStep"],
|
|
4511
|
+
};
|
|
4512
|
+
export const CreateSiteResponseSchema = {
|
|
4513
|
+
$ref: "#/components/schemas/Site",
|
|
4514
|
+
};
|
|
4515
|
+
export const CreateSiteHostRequestSchema = {
|
|
4516
|
+
$ref: "#/components/schemas/SiteHostProperties",
|
|
4517
|
+
};
|
|
4518
|
+
export const UpdateSiteHostRequestSchema = {
|
|
4519
|
+
$ref: "#/components/schemas/SiteHost",
|
|
4520
|
+
};
|
|
4521
|
+
//# sourceMappingURL=schemas.gen.js.map
|