@trash-streamers/contracts 1.1.5 → 1.1.6

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.
@@ -1,4 +1,5 @@
1
1
  export declare const PROTO_PATHS: {
2
2
  readonly AUTH: string;
3
3
  readonly ACCOUNT: string;
4
+ readonly USERS: string;
4
5
  };
@@ -5,4 +5,5 @@ const path_1 = require("path");
5
5
  exports.PROTO_PATHS = {
6
6
  AUTH: (0, path_1.join)(__dirname, '../../proto/auth.proto'),
7
7
  ACCOUNT: (0, path_1.join)(__dirname, '../../proto/account.proto'),
8
+ USERS: (0, path_1.join)(__dirname, '../../proto/users.proto')
8
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trash-streamers/contracts",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "scripts": {
@@ -0,0 +1,45 @@
1
+ syntax = "proto3";
2
+
3
+ package users.v1;
4
+
5
+ service UsersService {
6
+ rpc GetMe (GetMeRequest) returns (GetMeResponse);
7
+
8
+ rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
9
+ rpc PatchUser (PatchUserRequest) returns (PatchUserResponse);
10
+ }
11
+
12
+ message GetMeRequest {
13
+ string id = 1;
14
+ }
15
+
16
+ message GetMeResponse {
17
+ User user = 1;
18
+ }
19
+
20
+ message CreateUserRequest {
21
+ string id = 1;
22
+ }
23
+
24
+ message CreateUserResponse {
25
+ bool ok = 1;
26
+ }
27
+
28
+ message PatchUserRequest {
29
+ string user_id = 1;
30
+
31
+ optional string name = 2;
32
+ optional string avatar = 3;
33
+ }
34
+
35
+ message PatchUserResponse {
36
+ bool ok = 1;
37
+ }
38
+
39
+ message User {
40
+ string id = 1;
41
+ optional string name = 2;
42
+ optional string phone = 3;
43
+ optional string email = 4;
44
+ optional string avatar = 5;
45
+ }