vovk-hello-world 0.0.53 → 0.0.55

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 CHANGED
@@ -1,7 +1,7 @@
1
- <!-- Generated by vovk-cli v0.0.1-draft.392 at 2025-11-03T12:15:44.618Z -->
1
+ <!-- Generated by vovk-cli v0.0.1-draft.392 at 2025-11-03T12:24:18.891Z -->
2
2
 
3
3
 
4
- # vovk-hello-world v0.0.53 [![TypeScript](https://badgen.net/badge/-/TypeScript?icon=typescript&label&labelColor=blue&color=555555)](https://www.typescriptlang.org/) [![Vovk.ts](https://badgen.net/badge/Built%20with/Vovk.ts/333333?icon=https://vovk.dev/icon-white.svg)](https://vovk.dev)
4
+ # vovk-hello-world v0.0.55 [![TypeScript](https://badgen.net/badge/-/TypeScript?icon=typescript&label&labelColor=blue&color=555555)](https://www.typescriptlang.org/) [![Vovk.ts](https://badgen.net/badge/Built%20with/Vovk.ts/333333?icon=https://vovk.dev/icon-white.svg)](https://vovk.dev)
5
5
 
6
6
  > A showcase for Next.js + Vovk.ts + Zod, demonstrating its capabilities with TypeScript, Rust, and Python RPC.
7
7
 
@@ -22,7 +22,7 @@ npm install vovk-hello-world
22
22
  Update user by ID
23
23
 
24
24
 
25
- `POST http://localhost:3000/api/users/{id}`
25
+ `POST https://hello-world.vovk.dev/api/users/{id}`
26
26
 
27
27
  ```ts
28
28
  import { UserRPC } from 'vovk-hello-world';
@@ -65,7 +65,11 @@ console.log(response);
65
65
  // Response object
66
66
  // -----
67
67
  // Success status
68
- success: true
68
+ success: true,
69
+ // User ID
70
+ id: "00000000-0000-0000-0000-000000000000",
71
+ // Notification type
72
+ notify: "email"
69
73
  }
70
74
  */
71
75
  ```
@@ -80,7 +84,7 @@ console.log(response);
80
84
  Stream tokens to the client
81
85
 
82
86
 
83
- `GET http://localhost:3000/api/streams/tokens`
87
+ `GET https://hello-world.vovk.dev/api/streams/tokens`
84
88
 
85
89
  ```ts
86
90
  import { StreamRPC } from 'vovk-hello-world';
@@ -112,7 +116,7 @@ for await (const item of response) {
112
116
  Get the OpenAPI spec for the "Hello World" app API
113
117
 
114
118
 
115
- `GET http://localhost:3000/api/static/openapi.json`
119
+ `GET https://hello-world.vovk.dev/api/static/openapi.json`
116
120
 
117
121
  ```ts
118
122
  import { OpenApiRPC } from 'vovk-hello-world';
package/index.cjs CHANGED
@@ -107,11 +107,32 @@ var root_default = {
107
107
  "$schema": "https://json-schema.org/draft/2020-12/schema",
108
108
  "description": "Response object",
109
109
  "type": "object",
110
- "properties": { "success": {
111
- "description": "Success status",
112
- "type": "boolean"
113
- } },
114
- "required": ["success"],
110
+ "properties": {
111
+ "success": {
112
+ "description": "Success status",
113
+ "type": "boolean"
114
+ },
115
+ "id": {
116
+ "description": "User ID",
117
+ "type": "string",
118
+ "format": "uuid",
119
+ "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)$"
120
+ },
121
+ "notify": {
122
+ "description": "Notification type",
123
+ "type": "string",
124
+ "enum": [
125
+ "email",
126
+ "push",
127
+ "none"
128
+ ]
129
+ }
130
+ },
131
+ "required": [
132
+ "success",
133
+ "id",
134
+ "notify"
135
+ ],
115
136
  "additionalProperties": false
116
137
  }
117
138
  },
@@ -294,17 +315,17 @@ var openapi_default = {
294
315
  {
295
316
  "label": "TypeScript RPC",
296
317
  "lang": "typescript",
297
- "source": "import { UserRPC } from 'vovk-hello-world';\n\nconst response = await UserRPC.updateUser({\n body: {\n // -----\n // User data object\n // -----\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 // -----\n // Query parameters\n // -----\n // Notification type\n notify: \"email\"\n },\n params: {\n // -----\n // Path parameters\n // -----\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*/"
318
+ "source": "import { UserRPC } from 'vovk-hello-world';\n\nconst response = await UserRPC.updateUser({\n body: {\n // -----\n // User data object\n // -----\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 // -----\n // Query parameters\n // -----\n // Notification type\n notify: \"email\"\n },\n params: {\n // -----\n // Path parameters\n // -----\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 // User ID\n id: \"00000000-0000-0000-0000-000000000000\",\n // Notification type\n notify: \"email\"\n}\n*/"
298
319
  },
299
320
  {
300
321
  "label": "Python RPC",
301
322
  "lang": "python",
302
- "source": "from vovk_hello_world import UserRPC\n\nresponse = UserRPC.update_user(\n body={\n # -----\n # User data object\n # -----\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 # -----\n # Query parameters\n # -----\n # Notification type\n \"notify\": \"email\"\n },\n params={\n # -----\n # Path parameters\n # -----\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}"
323
+ "source": "from vovk_hello_world import UserRPC\n\nresponse = UserRPC.update_user(\n body={\n # -----\n # User data object\n # -----\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 # -----\n # Query parameters\n # -----\n # Notification type\n \"notify\": \"email\"\n },\n params={\n # -----\n # Path parameters\n # -----\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 # User ID\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n # Notification type\n \"notify\": \"email\"\n}"
303
324
  },
304
325
  {
305
326
  "label": "Rust RPC",
306
327
  "lang": "rust",
307
- "source": "use vovk_hello_world::user_rpc;\nuse serde_json::{ \n from_value, \n json \n};\n\npub fn main() {\n let response = user_rpc::update_user(\n from_value(json!({\n // -----\n // User data object\n // -----\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 // -----\n // Query parameters\n // -----\n // Notification type\n \"notify\": \"email\"\n })).unwrap(), /* query */ \n from_value(json!({\n // -----\n // Path parameters\n // -----\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 // -----\n // Response object\n // -----\n // Success status\n success: true\n } \n */\n Err(e) => println!(\"error: {:?}\", e),\n }\n}"
328
+ "source": "use vovk_hello_world::user_rpc;\nuse serde_json::{ \n from_value, \n json \n};\n\npub fn main() {\n let response = user_rpc::update_user(\n from_value(json!({\n // -----\n // User data object\n // -----\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 // -----\n // Query parameters\n // -----\n // Notification type\n \"notify\": \"email\"\n })).unwrap(), /* query */ \n from_value(json!({\n // -----\n // Path parameters\n // -----\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 // -----\n // Response object\n // -----\n // Success status\n success: true,\n // User ID\n id: \"00000000-0000-0000-0000-000000000000\",\n // Notification type\n notify: \"email\"\n } \n */\n Err(e) => println!(\"error: {:?}\", e),\n }\n}"
308
329
  }
309
330
  ],
310
331
  "parameters": [{
@@ -338,11 +359,32 @@ var openapi_default = {
338
359
  "$schema": "https://json-schema.org/draft/2020-12/schema",
339
360
  "description": "Response object",
340
361
  "type": "object",
341
- "properties": { "success": {
342
- "description": "Success status",
343
- "type": "boolean"
344
- } },
345
- "required": ["success"],
362
+ "properties": {
363
+ "success": {
364
+ "description": "Success status",
365
+ "type": "boolean"
366
+ },
367
+ "id": {
368
+ "description": "User ID",
369
+ "type": "string",
370
+ "format": "uuid",
371
+ "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)$"
372
+ },
373
+ "notify": {
374
+ "description": "Notification type",
375
+ "type": "string",
376
+ "enum": [
377
+ "email",
378
+ "push",
379
+ "none"
380
+ ]
381
+ }
382
+ },
383
+ "required": [
384
+ "success",
385
+ "id",
386
+ "notify"
387
+ ],
346
388
  "additionalProperties": false
347
389
  } } }
348
390
  } },
@@ -451,15 +493,15 @@ var openapi_default = {
451
493
  //#region tmp_prebundle/index.ts
452
494
  const UserRPC = (0, vovk.createRPC)(schema, "", "UserRPC", import("vovk"), {
453
495
  validateOnClient: import("vovk-ajv"),
454
- apiRoot: "http://localhost:3000/api"
496
+ apiRoot: "https://hello-world.vovk.dev/api"
455
497
  });
456
498
  const StreamRPC = (0, vovk.createRPC)(schema, "", "StreamRPC", import("vovk"), {
457
499
  validateOnClient: import("vovk-ajv"),
458
- apiRoot: "http://localhost:3000/api"
500
+ apiRoot: "https://hello-world.vovk.dev/api"
459
501
  });
460
502
  const OpenApiRPC = (0, vovk.createRPC)(schema, "static", "OpenApiRPC", import("vovk"), {
461
503
  validateOnClient: import("vovk-ajv"),
462
- apiRoot: "http://localhost:3000/api"
504
+ apiRoot: "https://hello-world.vovk.dev/api"
463
505
  });
464
506
 
465
507
  //#endregion
package/index.d.cts CHANGED
@@ -97,6 +97,17 @@ declare const schema: {
97
97
  description: string;
98
98
  type: string;
99
99
  };
100
+ id: {
101
+ description: string;
102
+ type: string;
103
+ format: string;
104
+ pattern: string;
105
+ };
106
+ notify: {
107
+ description: string;
108
+ type: string;
109
+ enum: string[];
110
+ };
100
111
  };
101
112
  required: string[];
102
113
  additionalProperties: boolean;
@@ -278,6 +289,17 @@ declare let paths: {
278
289
  description: string;
279
290
  type: string;
280
291
  };
292
+ id: {
293
+ description: string;
294
+ type: string;
295
+ format: string;
296
+ pattern: string;
297
+ };
298
+ notify: {
299
+ description: string;
300
+ type: string;
301
+ enum: string[];
302
+ };
281
303
  };
282
304
  required: string[];
283
305
  additionalProperties: boolean;
package/index.d.mts CHANGED
@@ -97,6 +97,17 @@ declare const schema: {
97
97
  description: string;
98
98
  type: string;
99
99
  };
100
+ id: {
101
+ description: string;
102
+ type: string;
103
+ format: string;
104
+ pattern: string;
105
+ };
106
+ notify: {
107
+ description: string;
108
+ type: string;
109
+ enum: string[];
110
+ };
100
111
  };
101
112
  required: string[];
102
113
  additionalProperties: boolean;
@@ -278,6 +289,17 @@ declare let paths: {
278
289
  description: string;
279
290
  type: string;
280
291
  };
292
+ id: {
293
+ description: string;
294
+ type: string;
295
+ format: string;
296
+ pattern: string;
297
+ };
298
+ notify: {
299
+ description: string;
300
+ type: string;
301
+ enum: string[];
302
+ };
281
303
  };
282
304
  required: string[];
283
305
  additionalProperties: boolean;
package/index.mjs CHANGED
@@ -83,11 +83,32 @@ var root_default = {
83
83
  "$schema": "https://json-schema.org/draft/2020-12/schema",
84
84
  "description": "Response object",
85
85
  "type": "object",
86
- "properties": { "success": {
87
- "description": "Success status",
88
- "type": "boolean"
89
- } },
90
- "required": ["success"],
86
+ "properties": {
87
+ "success": {
88
+ "description": "Success status",
89
+ "type": "boolean"
90
+ },
91
+ "id": {
92
+ "description": "User ID",
93
+ "type": "string",
94
+ "format": "uuid",
95
+ "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)$"
96
+ },
97
+ "notify": {
98
+ "description": "Notification type",
99
+ "type": "string",
100
+ "enum": [
101
+ "email",
102
+ "push",
103
+ "none"
104
+ ]
105
+ }
106
+ },
107
+ "required": [
108
+ "success",
109
+ "id",
110
+ "notify"
111
+ ],
91
112
  "additionalProperties": false
92
113
  }
93
114
  },
@@ -270,17 +291,17 @@ var openapi_default = {
270
291
  {
271
292
  "label": "TypeScript RPC",
272
293
  "lang": "typescript",
273
- "source": "import { UserRPC } from 'vovk-hello-world';\n\nconst response = await UserRPC.updateUser({\n body: {\n // -----\n // User data object\n // -----\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 // -----\n // Query parameters\n // -----\n // Notification type\n notify: \"email\"\n },\n params: {\n // -----\n // Path parameters\n // -----\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*/"
294
+ "source": "import { UserRPC } from 'vovk-hello-world';\n\nconst response = await UserRPC.updateUser({\n body: {\n // -----\n // User data object\n // -----\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 // -----\n // Query parameters\n // -----\n // Notification type\n notify: \"email\"\n },\n params: {\n // -----\n // Path parameters\n // -----\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 // User ID\n id: \"00000000-0000-0000-0000-000000000000\",\n // Notification type\n notify: \"email\"\n}\n*/"
274
295
  },
275
296
  {
276
297
  "label": "Python RPC",
277
298
  "lang": "python",
278
- "source": "from vovk_hello_world import UserRPC\n\nresponse = UserRPC.update_user(\n body={\n # -----\n # User data object\n # -----\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 # -----\n # Query parameters\n # -----\n # Notification type\n \"notify\": \"email\"\n },\n params={\n # -----\n # Path parameters\n # -----\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}"
299
+ "source": "from vovk_hello_world import UserRPC\n\nresponse = UserRPC.update_user(\n body={\n # -----\n # User data object\n # -----\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 # -----\n # Query parameters\n # -----\n # Notification type\n \"notify\": \"email\"\n },\n params={\n # -----\n # Path parameters\n # -----\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 # User ID\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n # Notification type\n \"notify\": \"email\"\n}"
279
300
  },
280
301
  {
281
302
  "label": "Rust RPC",
282
303
  "lang": "rust",
283
- "source": "use vovk_hello_world::user_rpc;\nuse serde_json::{ \n from_value, \n json \n};\n\npub fn main() {\n let response = user_rpc::update_user(\n from_value(json!({\n // -----\n // User data object\n // -----\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 // -----\n // Query parameters\n // -----\n // Notification type\n \"notify\": \"email\"\n })).unwrap(), /* query */ \n from_value(json!({\n // -----\n // Path parameters\n // -----\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 // -----\n // Response object\n // -----\n // Success status\n success: true\n } \n */\n Err(e) => println!(\"error: {:?}\", e),\n }\n}"
304
+ "source": "use vovk_hello_world::user_rpc;\nuse serde_json::{ \n from_value, \n json \n};\n\npub fn main() {\n let response = user_rpc::update_user(\n from_value(json!({\n // -----\n // User data object\n // -----\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 // -----\n // Query parameters\n // -----\n // Notification type\n \"notify\": \"email\"\n })).unwrap(), /* query */ \n from_value(json!({\n // -----\n // Path parameters\n // -----\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 // -----\n // Response object\n // -----\n // Success status\n success: true,\n // User ID\n id: \"00000000-0000-0000-0000-000000000000\",\n // Notification type\n notify: \"email\"\n } \n */\n Err(e) => println!(\"error: {:?}\", e),\n }\n}"
284
305
  }
285
306
  ],
286
307
  "parameters": [{
@@ -314,11 +335,32 @@ var openapi_default = {
314
335
  "$schema": "https://json-schema.org/draft/2020-12/schema",
315
336
  "description": "Response object",
316
337
  "type": "object",
317
- "properties": { "success": {
318
- "description": "Success status",
319
- "type": "boolean"
320
- } },
321
- "required": ["success"],
338
+ "properties": {
339
+ "success": {
340
+ "description": "Success status",
341
+ "type": "boolean"
342
+ },
343
+ "id": {
344
+ "description": "User ID",
345
+ "type": "string",
346
+ "format": "uuid",
347
+ "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)$"
348
+ },
349
+ "notify": {
350
+ "description": "Notification type",
351
+ "type": "string",
352
+ "enum": [
353
+ "email",
354
+ "push",
355
+ "none"
356
+ ]
357
+ }
358
+ },
359
+ "required": [
360
+ "success",
361
+ "id",
362
+ "notify"
363
+ ],
322
364
  "additionalProperties": false
323
365
  } } }
324
366
  } },
@@ -427,15 +469,15 @@ var openapi_default = {
427
469
  //#region tmp_prebundle/index.ts
428
470
  const UserRPC = createRPC(schema, "", "UserRPC", import("vovk"), {
429
471
  validateOnClient: import("vovk-ajv"),
430
- apiRoot: "http://localhost:3000/api"
472
+ apiRoot: "https://hello-world.vovk.dev/api"
431
473
  });
432
474
  const StreamRPC = createRPC(schema, "", "StreamRPC", import("vovk"), {
433
475
  validateOnClient: import("vovk-ajv"),
434
- apiRoot: "http://localhost:3000/api"
476
+ apiRoot: "https://hello-world.vovk.dev/api"
435
477
  });
436
478
  const OpenApiRPC = createRPC(schema, "static", "OpenApiRPC", import("vovk"), {
437
479
  validateOnClient: import("vovk-ajv"),
438
- apiRoot: "http://localhost:3000/api"
480
+ apiRoot: "https://hello-world.vovk.dev/api"
439
481
  });
440
482
 
441
483
  //#endregion
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  }
11
11
  },
12
12
  "name": "vovk-hello-world",
13
- "version": "0.0.53",
13
+ "version": "0.0.55",
14
14
  "description": "A showcase for Next.js + Vovk.ts + Zod, demonstrating its capabilities with TypeScript, Rust, and Python RPC.",
15
15
  "license": "MIT"
16
16
  }