vovk-hello-world 0.0.21 → 0.0.22

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.
Files changed (2) hide show
  1. package/README.md +29 -15
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- <!-- auto-generated by vovk-cli v0.0.1-draft.293 at 2025-07-13T11:08:29.133Z -->
1
+ <!-- auto-generated by vovk-cli v0.0.1-draft.299 at 2025-07-18T17:49:53.423Z -->
2
2
 
3
3
 
4
- # vovk-hello-world v0.0.21 [![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.22 [![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
 
@@ -21,31 +21,42 @@ npm install vovk-hello-world
21
21
 
22
22
  Update user by ID
23
23
 
24
+
24
25
  `POST http://localhost:3000/api/users/{id}`
25
26
 
26
27
  ```ts
27
28
  import { UserRPC } from 'vovk-hello-world';
28
29
 
29
30
  const response = await UserRPC.updateUser({
30
- params: {
31
- id: "123e4567-e89b-12d3-a456-426614174000"
32
- },
33
31
  body: {
34
- email: "john@example.com",
35
- profile: {
36
- name: "John Doe",
37
- age: 25
38
- }
39
- },
32
+ // User email
33
+ email: "john@example.com",
34
+ // User profile object
35
+ profile: {
36
+ // User full name
37
+ name: "John Doe",
38
+ // User age
39
+ age: 25
40
+ }
41
+ },
40
42
  query: {
41
- notify: "email"
42
- },
43
+ // Notification type
44
+ notify: "email"
45
+ },
46
+ params: {
47
+ // User ID
48
+ id: "123e4567-e89b-12d3-a456-426614174000"
49
+ },
43
50
  });
44
51
 
45
52
  console.log(response);
46
53
  /*
47
54
  {
48
- success: true
55
+ // -----
56
+ // Response object
57
+ // -----
58
+ // Success status
59
+ success: true
49
60
  }
50
61
  */
51
62
  ```
@@ -59,6 +70,7 @@ console.log(response);
59
70
 
60
71
  Stream tokens to the client
61
72
 
73
+
62
74
  `GET http://localhost:3000/api/streams/tokens`
63
75
 
64
76
  ```ts
@@ -70,7 +82,8 @@ for await (const item of response) {
70
82
  console.log(item);
71
83
  /*
72
84
  {
73
- message: "string"
85
+ // Message from the token
86
+ message: "string"
74
87
  }
75
88
  */
76
89
  }
@@ -86,6 +99,7 @@ for await (const item of response) {
86
99
 
87
100
  Get the OpenAPI spec for the "Hello World" app API
88
101
 
102
+
89
103
  `GET http://localhost:3000/api/static/openapi/spec.json`
90
104
 
91
105
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk-hello-world",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "A showcase for Next.js + Vovk.ts + Zod, demonstrating its capabilities with TypeScript, Rust, and Python RPC.",
5
5
  "license": "MIT",
6
6
  "main": "./index.cjs",