vovk-hello-world 0.0.46 → 0.0.49
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/README.md +23 -11
- package/index.cjs +384 -407
- package/index.d.cts +239 -44
- package/index.d.mts +239 -44
- package/index.mjs +382 -406
- package/package.json +2 -59
- package/openapi.cjs +0 -264
- package/openapi.d.cts +0 -2
- package/schema.cjs +0 -199
- package/schema.d.cts +0 -190
package/package.json
CHANGED
|
@@ -7,67 +7,10 @@
|
|
|
7
7
|
"import": "./index.mjs",
|
|
8
8
|
"require": "./index.cjs",
|
|
9
9
|
"types": "./index.d.mts"
|
|
10
|
-
},
|
|
11
|
-
"./schema": {
|
|
12
|
-
"import": "./schema.cjs",
|
|
13
|
-
"require": "./schema.cjs",
|
|
14
|
-
"types": "./schema.d.cts"
|
|
15
|
-
},
|
|
16
|
-
"./openapi": {
|
|
17
|
-
"import": "./openapi.cjs",
|
|
18
|
-
"require": "./openapi.cjs",
|
|
19
|
-
"types": "./openapi.d.cts"
|
|
20
10
|
}
|
|
21
11
|
},
|
|
22
12
|
"name": "vovk-hello-world",
|
|
23
|
-
"version": "0.0.
|
|
13
|
+
"version": "0.0.49",
|
|
24
14
|
"description": "A showcase for Next.js + Vovk.ts + Zod, demonstrating its capabilities with TypeScript, Rust, and Python RPC.",
|
|
25
|
-
"
|
|
26
|
-
"dev": "vovk dev --next-dev -- --turbopack",
|
|
27
|
-
"build": "vovk generate && next build",
|
|
28
|
-
"start": "next start",
|
|
29
|
-
"lint": "next lint",
|
|
30
|
-
"bundle": "vovk bundle",
|
|
31
|
-
"#comment1": "Demo scripts for running examples in different languages",
|
|
32
|
-
"demo": "npm run demo:ts && npm run demo:rs && npm run demo:py",
|
|
33
|
-
"demo:ts": "node --experimental-strip-types demo_node/index.mts",
|
|
34
|
-
"demo:rs": "cargo run --manifest-path ./demo_rust/Cargo.toml --quiet",
|
|
35
|
-
"demo:py": "python3 -m pip install --upgrade vovk_hello_world --quiet && python3 demo_python.py",
|
|
36
|
-
"#comment2": "Postversion scripts for publishing",
|
|
37
|
-
"postversion:ts": "npm run bundle && npm publish ./dist",
|
|
38
|
-
"postversion:rs": "cargo publish --manifest-path dist_rust/Cargo.toml --allow-dirty",
|
|
39
|
-
"postversion:py": "python3 -m build ./dist_python --wheel --sdist && python3 -m twine upload ./dist_python/dist/*",
|
|
40
|
-
"postversion": "vovk generate && npm run postversion:ts && npm run postversion:rs && npm run postversion:py && git push && git push --tags",
|
|
41
|
-
"patch": "npm version patch"
|
|
42
|
-
},
|
|
43
|
-
"license": "MIT",
|
|
44
|
-
"dependencies": {
|
|
45
|
-
"@scalar/api-reference-react": "^0.7.42",
|
|
46
|
-
"@tanstack/react-query": "^5.85.5",
|
|
47
|
-
"ajv": "^8.17.1",
|
|
48
|
-
"next": "15.5.2",
|
|
49
|
-
"react": "^19.1.1",
|
|
50
|
-
"react-dom": "^19.1.1",
|
|
51
|
-
"vovk": "^3.0.0-draft.408",
|
|
52
|
-
"vovk-ajv": "^0.0.0-draft.100",
|
|
53
|
-
"vovk-client": "^0.0.4-draft.128",
|
|
54
|
-
"vovk-hello-world": "^0.0.43",
|
|
55
|
-
"vovk-zod": "^1.0.0-draft.141",
|
|
56
|
-
"zod": "^4.1.5"
|
|
57
|
-
},
|
|
58
|
-
"devDependencies": {
|
|
59
|
-
"@eslint/eslintrc": "^3",
|
|
60
|
-
"@tailwindcss/postcss": "^4.1.12",
|
|
61
|
-
"@types/node": "^24",
|
|
62
|
-
"@types/react": "^19",
|
|
63
|
-
"@types/react-dom": "^19",
|
|
64
|
-
"eslint": "^9",
|
|
65
|
-
"eslint-config-next": "15.5.2",
|
|
66
|
-
"postcss": "^8",
|
|
67
|
-
"tailwindcss": "^4.1.12",
|
|
68
|
-
"typescript": "^5",
|
|
69
|
-
"vovk-cli": "^0.0.1-draft.346",
|
|
70
|
-
"vovk-python": "^0.0.1-draft.70",
|
|
71
|
-
"vovk-rust": "^0.0.1-draft.56"
|
|
72
|
-
}
|
|
15
|
+
"license": "MIT"
|
|
73
16
|
}
|
package/openapi.cjs
DELETED
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region tmp_prebundle/openapi.json
|
|
3
|
-
var info = {
|
|
4
|
-
"title": "\"Hello World\" app API",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"description": "API for \"Hello World\" app hosted at https://vovk-hello-world.vercel.app/. Source code is available on Github https://github.com/finom/vovk-hello-world.",
|
|
7
|
-
"license": {
|
|
8
|
-
"name": "MIT",
|
|
9
|
-
"url": "https://opensource.org/licenses/MIT"
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
var openapi = "3.1.0";
|
|
13
|
-
var components = { "schemas": {
|
|
14
|
-
"HttpStatus": {
|
|
15
|
-
"type": "integer",
|
|
16
|
-
"description": "HTTP status code",
|
|
17
|
-
"enum": [
|
|
18
|
-
100,
|
|
19
|
-
101,
|
|
20
|
-
102,
|
|
21
|
-
103,
|
|
22
|
-
200,
|
|
23
|
-
201,
|
|
24
|
-
202,
|
|
25
|
-
203,
|
|
26
|
-
204,
|
|
27
|
-
205,
|
|
28
|
-
206,
|
|
29
|
-
300,
|
|
30
|
-
301,
|
|
31
|
-
302,
|
|
32
|
-
303,
|
|
33
|
-
304,
|
|
34
|
-
307,
|
|
35
|
-
308,
|
|
36
|
-
400,
|
|
37
|
-
401,
|
|
38
|
-
402,
|
|
39
|
-
403,
|
|
40
|
-
404,
|
|
41
|
-
405,
|
|
42
|
-
406,
|
|
43
|
-
407,
|
|
44
|
-
408,
|
|
45
|
-
409,
|
|
46
|
-
410,
|
|
47
|
-
411,
|
|
48
|
-
412,
|
|
49
|
-
413,
|
|
50
|
-
414,
|
|
51
|
-
415,
|
|
52
|
-
416,
|
|
53
|
-
417,
|
|
54
|
-
418,
|
|
55
|
-
421,
|
|
56
|
-
422,
|
|
57
|
-
424,
|
|
58
|
-
428,
|
|
59
|
-
429,
|
|
60
|
-
500,
|
|
61
|
-
501,
|
|
62
|
-
502,
|
|
63
|
-
503,
|
|
64
|
-
504,
|
|
65
|
-
505
|
|
66
|
-
]
|
|
67
|
-
},
|
|
68
|
-
"VovkErrorResponse": {
|
|
69
|
-
"type": "object",
|
|
70
|
-
"description": "Vovk error response",
|
|
71
|
-
"properties": {
|
|
72
|
-
"cause": { "description": "Error cause of any shape" },
|
|
73
|
-
"statusCode": { "$ref": "#/components/schemas/HttpStatus" },
|
|
74
|
-
"message": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"description": "Error message"
|
|
77
|
-
},
|
|
78
|
-
"isError": {
|
|
79
|
-
"type": "boolean",
|
|
80
|
-
"const": true,
|
|
81
|
-
"description": "Indicates that this object represents an error"
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
"required": [
|
|
85
|
-
"statusCode",
|
|
86
|
-
"message",
|
|
87
|
-
"isError"
|
|
88
|
-
],
|
|
89
|
-
"additionalProperties": false
|
|
90
|
-
}
|
|
91
|
-
} };
|
|
92
|
-
var paths = {
|
|
93
|
-
"/api/users/{id}": { "post": {
|
|
94
|
-
"summary": "Update user",
|
|
95
|
-
"description": "Update user by ID",
|
|
96
|
-
"x-codeSamples": [
|
|
97
|
-
{
|
|
98
|
-
"label": "TypeScript RPC",
|
|
99
|
-
"lang": "typescript",
|
|
100
|
-
"source": "import { UserRPC } from 'vovk-client';\n\nconst response = await UserRPC.updateUser({\n body: {\n // User email\n email: \"john@example.com\",\n // User profile object\n profile: {\n // User full name\n name: \"John Doe\",\n // User age\n age: 25\n }\n },\n query: {\n // Notification type\n notify: \"email\"\n },\n params: {\n // User ID\n id: \"123e4567-e89b-12d3-a456-426614174000\"\n },\n});\n\nconsole.log(response); \n/* \n{\n // -----\n // Response object\n // -----\n // Success status\n success: true\n}\n*/"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"label": "Python RPC",
|
|
104
|
-
"lang": "python",
|
|
105
|
-
"source": "from vovk_client import UserRPC\n\nresponse = UserRPC.update_user(\n body={\n # User email\n \"email\": \"john@example.com\",\n # User profile object\n \"profile\": {\n # User full name\n \"name\": \"John Doe\",\n # User age\n \"age\": 25\n }\n },\n query={\n # Notification type\n \"notify\": \"email\"\n },\n params={\n # User ID\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n)\n\nprint(response)\n{\n # -----\n # Response object\n # -----\n # Success status\n \"success\": true\n}"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"label": "Rust RPC",
|
|
109
|
-
"lang": "rust",
|
|
110
|
-
"source": "use vovk_client::user_rpc;\nuse serde_json::{ \n from_value, \n json \n};\n\n\npub fn main() {\n let response = user_rpc::update_user(\n from_value(json!({\n // User email\n \"email\": \"john@example.com\",\n // User profile object\n \"profile\": {\n // User full name\n \"name\": \"John Doe\",\n // User age\n \"age\": 25\n }\n })).unwrap(), /* body */ \n from_value(json!({\n // Notification type\n \"notify\": \"email\"\n })).unwrap(), /* query */ \n from_value(json!({\n // User ID\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\"\n })).unwrap(), /* params */ \n None, /* headers (HashMap) */ \n None, /* api_root */\n false, /* disable_client_validation */\n );\n\nmatch response {\n Ok(output) => println!(\"{:?}\", output),\n /* \n output {\n // Success status\n success: true\n } \n */\n Err(e) => println!(\"error: {:?}\", e),\n }\n}"
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
"parameters": [{
|
|
114
|
-
"name": "notify",
|
|
115
|
-
"in": "query",
|
|
116
|
-
"required": true,
|
|
117
|
-
"schema": {
|
|
118
|
-
"description": "Notification type",
|
|
119
|
-
"type": "string",
|
|
120
|
-
"enum": [
|
|
121
|
-
"email",
|
|
122
|
-
"push",
|
|
123
|
-
"none"
|
|
124
|
-
]
|
|
125
|
-
}
|
|
126
|
-
}, {
|
|
127
|
-
"name": "id",
|
|
128
|
-
"in": "path",
|
|
129
|
-
"required": true,
|
|
130
|
-
"schema": {
|
|
131
|
-
"description": "User ID",
|
|
132
|
-
"examples": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
133
|
-
"type": "string",
|
|
134
|
-
"format": "uuid",
|
|
135
|
-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
136
|
-
}
|
|
137
|
-
}],
|
|
138
|
-
"responses": { "200": {
|
|
139
|
-
"description": "Response object",
|
|
140
|
-
"content": { "application/json": { "schema": {
|
|
141
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
142
|
-
"description": "Response object",
|
|
143
|
-
"type": "object",
|
|
144
|
-
"properties": { "success": {
|
|
145
|
-
"description": "Success status",
|
|
146
|
-
"type": "boolean"
|
|
147
|
-
} },
|
|
148
|
-
"required": ["success"],
|
|
149
|
-
"additionalProperties": false
|
|
150
|
-
} } }
|
|
151
|
-
} },
|
|
152
|
-
"requestBody": {
|
|
153
|
-
"description": "User data object",
|
|
154
|
-
"required": true,
|
|
155
|
-
"content": { "application/json": { "schema": {
|
|
156
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
157
|
-
"description": "User data object",
|
|
158
|
-
"type": "object",
|
|
159
|
-
"properties": {
|
|
160
|
-
"email": {
|
|
161
|
-
"description": "User email",
|
|
162
|
-
"examples": ["john@example.com", "jane@example.com"],
|
|
163
|
-
"type": "string",
|
|
164
|
-
"format": "email",
|
|
165
|
-
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
|
|
166
|
-
},
|
|
167
|
-
"profile": {
|
|
168
|
-
"description": "User profile object",
|
|
169
|
-
"type": "object",
|
|
170
|
-
"properties": {
|
|
171
|
-
"name": {
|
|
172
|
-
"description": "User full name",
|
|
173
|
-
"examples": ["John Doe", "Jane Smith"],
|
|
174
|
-
"type": "string"
|
|
175
|
-
},
|
|
176
|
-
"age": {
|
|
177
|
-
"description": "User age",
|
|
178
|
-
"examples": [25, 30],
|
|
179
|
-
"type": "integer",
|
|
180
|
-
"minimum": 16,
|
|
181
|
-
"maximum": 120
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
"required": ["name", "age"],
|
|
185
|
-
"additionalProperties": false
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
"required": ["email", "profile"],
|
|
189
|
-
"additionalProperties": false
|
|
190
|
-
} } }
|
|
191
|
-
}
|
|
192
|
-
} },
|
|
193
|
-
"/api/streams/tokens": { "get": {
|
|
194
|
-
"summary": "Stream tokens",
|
|
195
|
-
"description": "Stream tokens to the client",
|
|
196
|
-
"x-codeSamples": [
|
|
197
|
-
{
|
|
198
|
-
"label": "TypeScript RPC",
|
|
199
|
-
"lang": "typescript",
|
|
200
|
-
"source": "import { StreamRPC } from 'vovk-client';\n\nusing response = await StreamRPC.streamTokens();\n\nfor await (const item of response) {\n console.log(item); \n /*\n {\n // Message from the token\n message: \"string\"\n }\n */\n}"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
"label": "Python RPC",
|
|
204
|
-
"lang": "python",
|
|
205
|
-
"source": "from vovk_client import StreamRPC\n\nresponse = StreamRPC.stream_tokens()\n\nfor i, item in enumerate(response):\n print(f\"iteration #{i}:\\n {item}\")\n # iteration #0:\n {\n # Message from the token\n \"message\": \"string\"\n }"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"label": "Rust RPC",
|
|
209
|
-
"lang": "rust",
|
|
210
|
-
"source": "use vovk_client::stream_rpc;\nuse serde_json::{ \n from_value, \n json \n};\n\n\npub fn main() {\n let response = stream_rpc::stream_tokens(\n (), /* body */ \n (), /* query */ \n (), /* params */ \n None, /* headers (HashMap) */ \n None, /* api_root */\n false, /* disable_client_validation */\n );\n\nmatch response {\n Ok(stream) => {\n for (i, item) in stream.enumerate() {\n println!(\"#{}: {:?}\", i, item);\n /*\n #0: iteration {\n // Message from the token\n message: \"string\"\n }\n */\n }\n },\n Err(e) => println!(\"Error initiating stream: {:?}\", e),\n }\n}"
|
|
211
|
-
}
|
|
212
|
-
],
|
|
213
|
-
"responses": { "200": {
|
|
214
|
-
"description": "Streamed token object",
|
|
215
|
-
"content": { "application/jsonl": { "schema": {
|
|
216
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
217
|
-
"description": "Streamed token object",
|
|
218
|
-
"type": "object",
|
|
219
|
-
"properties": { "message": {
|
|
220
|
-
"description": "Message from the token",
|
|
221
|
-
"type": "string"
|
|
222
|
-
} },
|
|
223
|
-
"required": ["message"],
|
|
224
|
-
"additionalProperties": false,
|
|
225
|
-
"examples": ["{\"message\":\"string\"}\n{\"message\":\"string\"}\n{\"message\":\"string\"}"]
|
|
226
|
-
} } }
|
|
227
|
-
} }
|
|
228
|
-
} },
|
|
229
|
-
"/api/static/openapi/spec.json": { "get": {
|
|
230
|
-
"summary": "OpenAPI spec",
|
|
231
|
-
"description": "Get the OpenAPI spec for the \"Hello World\" app API",
|
|
232
|
-
"x-codeSamples": [
|
|
233
|
-
{
|
|
234
|
-
"label": "TypeScript RPC",
|
|
235
|
-
"lang": "typescript",
|
|
236
|
-
"source": "import { OpenApiRPC } from 'vovk-client';\n\nconst response = await OpenApiRPC.getSpec();"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"label": "Python RPC",
|
|
240
|
-
"lang": "python",
|
|
241
|
-
"source": "from vovk_client import OpenApiRPC\n\nresponse = OpenApiRPC.get_spec()"
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
"label": "Rust RPC",
|
|
245
|
-
"lang": "rust",
|
|
246
|
-
"source": "use vovk_client::open_api_rpc;\nuse serde_json::{ \n from_value, \n json \n};\n\n\npub fn main() {\n let response = open_api_rpc::get_spec(\n (), /* body */ \n (), /* query */ \n (), /* params */ \n None, /* headers (HashMap) */ \n None, /* api_root */\n false, /* disable_client_validation */\n );\n}"
|
|
247
|
-
}
|
|
248
|
-
]
|
|
249
|
-
} }
|
|
250
|
-
};
|
|
251
|
-
var openapi_default = {
|
|
252
|
-
info,
|
|
253
|
-
openapi,
|
|
254
|
-
components,
|
|
255
|
-
paths
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
//#endregion
|
|
259
|
-
Object.defineProperty(exports, 'openapi', {
|
|
260
|
-
enumerable: true,
|
|
261
|
-
get: function () {
|
|
262
|
-
return openapi_default;
|
|
263
|
-
}
|
|
264
|
-
});
|
package/openapi.d.cts
DELETED
package/schema.cjs
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region .vovk-schema/_meta.json
|
|
3
|
-
var $schema$2 = "https://vovk.dev/api/schema/v3/meta.json";
|
|
4
|
-
var config = {
|
|
5
|
-
"libs": {},
|
|
6
|
-
"generatorConfig": {
|
|
7
|
-
"origin": "http://localhost:3000",
|
|
8
|
-
"imports": { "validateOnClient": "vovk-ajv" },
|
|
9
|
-
"openAPIObject": { "info": {
|
|
10
|
-
"title": "\"Hello World\" app API",
|
|
11
|
-
"description": "API for \"Hello World\" app hosted at https://vovk-hello-world.vercel.app/. Source code is available on Github https://github.com/finom/vovk-hello-world.",
|
|
12
|
-
"license": {
|
|
13
|
-
"name": "MIT",
|
|
14
|
-
"url": "https://opensource.org/licenses/MIT"
|
|
15
|
-
},
|
|
16
|
-
"version": "1.0.0"
|
|
17
|
-
} },
|
|
18
|
-
"segments": {}
|
|
19
|
-
},
|
|
20
|
-
"$schema": "https://vovk.dev/api/schema/v3/config.json"
|
|
21
|
-
};
|
|
22
|
-
var _meta_default = {
|
|
23
|
-
$schema: $schema$2,
|
|
24
|
-
config
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region .vovk-schema/root.json
|
|
29
|
-
var $schema$1 = "https://vovk.dev/api/schema/v3/segment.json";
|
|
30
|
-
var emitSchema$1 = true;
|
|
31
|
-
var segmentName$1 = "";
|
|
32
|
-
var segmentType$1 = "segment";
|
|
33
|
-
var controllers$1 = {
|
|
34
|
-
"UserRPC": {
|
|
35
|
-
"rpcModuleName": "UserRPC",
|
|
36
|
-
"originalControllerName": "UserController",
|
|
37
|
-
"prefix": "users",
|
|
38
|
-
"handlers": { "updateUser": {
|
|
39
|
-
"validation": {
|
|
40
|
-
"body": {
|
|
41
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
42
|
-
"description": "User data object",
|
|
43
|
-
"type": "object",
|
|
44
|
-
"properties": {
|
|
45
|
-
"email": {
|
|
46
|
-
"description": "User email",
|
|
47
|
-
"examples": ["john@example.com", "jane@example.com"],
|
|
48
|
-
"type": "string",
|
|
49
|
-
"format": "email",
|
|
50
|
-
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
|
|
51
|
-
},
|
|
52
|
-
"profile": {
|
|
53
|
-
"description": "User profile object",
|
|
54
|
-
"type": "object",
|
|
55
|
-
"properties": {
|
|
56
|
-
"name": {
|
|
57
|
-
"description": "User full name",
|
|
58
|
-
"examples": ["John Doe", "Jane Smith"],
|
|
59
|
-
"type": "string"
|
|
60
|
-
},
|
|
61
|
-
"age": {
|
|
62
|
-
"description": "User age",
|
|
63
|
-
"examples": [25, 30],
|
|
64
|
-
"type": "integer",
|
|
65
|
-
"minimum": 16,
|
|
66
|
-
"maximum": 120
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"required": ["name", "age"],
|
|
70
|
-
"additionalProperties": false
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"required": ["email", "profile"],
|
|
74
|
-
"additionalProperties": false
|
|
75
|
-
},
|
|
76
|
-
"query": {
|
|
77
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
78
|
-
"description": "Query parameters",
|
|
79
|
-
"type": "object",
|
|
80
|
-
"properties": { "notify": {
|
|
81
|
-
"description": "Notification type",
|
|
82
|
-
"type": "string",
|
|
83
|
-
"enum": [
|
|
84
|
-
"email",
|
|
85
|
-
"push",
|
|
86
|
-
"none"
|
|
87
|
-
]
|
|
88
|
-
} },
|
|
89
|
-
"required": ["notify"],
|
|
90
|
-
"additionalProperties": false
|
|
91
|
-
},
|
|
92
|
-
"params": {
|
|
93
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
94
|
-
"description": "Path parameters",
|
|
95
|
-
"type": "object",
|
|
96
|
-
"properties": { "id": {
|
|
97
|
-
"description": "User ID",
|
|
98
|
-
"examples": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
99
|
-
"type": "string",
|
|
100
|
-
"format": "uuid",
|
|
101
|
-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
102
|
-
} },
|
|
103
|
-
"required": ["id"],
|
|
104
|
-
"additionalProperties": false
|
|
105
|
-
},
|
|
106
|
-
"output": {
|
|
107
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
108
|
-
"description": "Response object",
|
|
109
|
-
"type": "object",
|
|
110
|
-
"properties": { "success": {
|
|
111
|
-
"description": "Success status",
|
|
112
|
-
"type": "boolean"
|
|
113
|
-
} },
|
|
114
|
-
"required": ["success"],
|
|
115
|
-
"additionalProperties": false
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"operationObject": {
|
|
119
|
-
"summary": "Update user",
|
|
120
|
-
"description": "Update user by ID"
|
|
121
|
-
},
|
|
122
|
-
"path": "{id}",
|
|
123
|
-
"httpMethod": "POST"
|
|
124
|
-
} }
|
|
125
|
-
},
|
|
126
|
-
"StreamRPC": {
|
|
127
|
-
"rpcModuleName": "StreamRPC",
|
|
128
|
-
"originalControllerName": "StreamController",
|
|
129
|
-
"prefix": "streams",
|
|
130
|
-
"handlers": { "streamTokens": {
|
|
131
|
-
"validation": { "iteration": {
|
|
132
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
133
|
-
"description": "Streamed token object",
|
|
134
|
-
"type": "object",
|
|
135
|
-
"properties": { "message": {
|
|
136
|
-
"description": "Message from the token",
|
|
137
|
-
"type": "string"
|
|
138
|
-
} },
|
|
139
|
-
"required": ["message"],
|
|
140
|
-
"additionalProperties": false
|
|
141
|
-
} },
|
|
142
|
-
"operationObject": {
|
|
143
|
-
"summary": "Stream tokens",
|
|
144
|
-
"description": "Stream tokens to the client"
|
|
145
|
-
},
|
|
146
|
-
"path": "tokens",
|
|
147
|
-
"httpMethod": "GET"
|
|
148
|
-
} }
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
var root_default = {
|
|
152
|
-
$schema: $schema$1,
|
|
153
|
-
emitSchema: emitSchema$1,
|
|
154
|
-
segmentName: segmentName$1,
|
|
155
|
-
segmentType: segmentType$1,
|
|
156
|
-
controllers: controllers$1
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
//#endregion
|
|
160
|
-
//#region .vovk-schema/static.json
|
|
161
|
-
var $schema = "https://vovk.dev/api/schema/v3/segment.json";
|
|
162
|
-
var emitSchema = true;
|
|
163
|
-
var segmentName = "static";
|
|
164
|
-
var segmentType = "segment";
|
|
165
|
-
var controllers = { "OpenApiRPC": {
|
|
166
|
-
"rpcModuleName": "OpenApiRPC",
|
|
167
|
-
"originalControllerName": "OpenApiController",
|
|
168
|
-
"prefix": "openapi",
|
|
169
|
-
"handlers": { "getSpec": {
|
|
170
|
-
"path": "spec.json",
|
|
171
|
-
"httpMethod": "GET",
|
|
172
|
-
"operationObject": {
|
|
173
|
-
"summary": "OpenAPI spec",
|
|
174
|
-
"description": "Get the OpenAPI spec for the \"Hello World\" app API"
|
|
175
|
-
}
|
|
176
|
-
} }
|
|
177
|
-
} };
|
|
178
|
-
var static_default = {
|
|
179
|
-
$schema,
|
|
180
|
-
emitSchema,
|
|
181
|
-
segmentName,
|
|
182
|
-
segmentType,
|
|
183
|
-
controllers
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
//#endregion
|
|
187
|
-
//#region tmp_prebundle/schema.ts
|
|
188
|
-
const segments = {
|
|
189
|
-
"": root_default,
|
|
190
|
-
"static": static_default
|
|
191
|
-
};
|
|
192
|
-
const schema = {
|
|
193
|
-
$schema: "https://vovk.dev/api/schema/v3/schema.json",
|
|
194
|
-
segments,
|
|
195
|
-
meta: { ..._meta_default }
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
//#endregion
|
|
199
|
-
exports.schema = schema;
|