@cinema_learn/contracts 1.1.2 → 1.1.4

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.
@@ -5,5 +5,5 @@ const node_path_1 = require("node:path");
5
5
  exports.PROTO_PATHS = {
6
6
  AUTH: (0, node_path_1.join)(__dirname, "../../proto/auth.proto"),
7
7
  ACCOUNT: (0, node_path_1.join)(__dirname, "../../proto/account.proto"),
8
- USER: (0, node_path_1.join)(__dirname, "../../proto/user.proto"),
8
+ USER: (0, node_path_1.join)(__dirname, "../../proto/users.proto"),
9
9
  };
package/gen/users.ts CHANGED
@@ -26,6 +26,15 @@ export interface CreateUserResponse {
26
26
  ok: boolean;
27
27
  }
28
28
 
29
+ export interface PatchUserRequest {
30
+ id: string;
31
+ name?: string | undefined;
32
+ }
33
+
34
+ export interface PatchUserResponse {
35
+ ok: boolean;
36
+ }
37
+
29
38
  export interface User {
30
39
  id: string;
31
40
  name?: string | undefined;
@@ -40,6 +49,8 @@ export interface UserServiceClient {
40
49
  getMe(request: GetMeRequest): Observable<GetMeResponse>;
41
50
 
42
51
  createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
52
+
53
+ patchUser(request: PatchUserRequest): Observable<PatchUserResponse>;
43
54
  }
44
55
 
45
56
  export interface UserServiceController {
@@ -48,11 +59,13 @@ export interface UserServiceController {
48
59
  createUser(
49
60
  request: CreateUserRequest,
50
61
  ): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
62
+
63
+ patchUser(request: PatchUserRequest): Promise<PatchUserResponse> | Observable<PatchUserResponse> | PatchUserResponse;
51
64
  }
52
65
 
53
66
  export function UserServiceControllerMethods() {
54
67
  return function (constructor: Function) {
55
- const grpcMethods: string[] = ["getMe", "createUser"];
68
+ const grpcMethods: string[] = ["getMe", "createUser", "patchUser"];
56
69
  for (const method of grpcMethods) {
57
70
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
58
71
  GrpcMethod("UserService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinema_learn/contracts",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "scripts": {
package/proto/users.proto CHANGED
@@ -6,6 +6,8 @@ service UserService {
6
6
  rpc GetMe(GetMeRequest) returns (GetMeResponse);
7
7
 
8
8
  rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
9
+
10
+ rpc PatchUser(PatchUserRequest) returns (PatchUserResponse);
9
11
  }
10
12
 
11
13
  message GetMeRequest {
@@ -24,6 +26,16 @@ message CreateUserResponse {
24
26
  bool ok = 1;
25
27
  }
26
28
 
29
+ message PatchUserRequest {
30
+ string id = 1;
31
+
32
+ optional string name = 2;
33
+ }
34
+
35
+ message PatchUserResponse {
36
+ bool ok = 1;
37
+ }
38
+
27
39
  message User {
28
40
  string id = 1;
29
41
  optional string name = 2;