@alebooking/contracts 1.1.3 → 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.
package/gen/user.ts CHANGED
@@ -23,6 +23,15 @@ export interface CreateUserRequest {
23
23
  id: string;
24
24
  }
25
25
 
26
+ export interface PatchUserRequest {
27
+ id: string;
28
+ name?: string | undefined;
29
+ }
30
+
31
+ export interface PatchUserResponse {
32
+ user: User | undefined;
33
+ }
34
+
26
35
  export interface User {
27
36
  id: string;
28
37
  name?: string | undefined;
@@ -37,17 +46,21 @@ export interface UserServiceClient {
37
46
  getMe(request: GetMeRequest): Observable<GetMeResponse>;
38
47
 
39
48
  createUser(request: CreateUserRequest): Observable<Empty>;
49
+
50
+ patchUser(request: PatchUserRequest): Observable<PatchUserResponse>;
40
51
  }
41
52
 
42
53
  export interface UserServiceController {
43
54
  getMe(request: GetMeRequest): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
44
55
 
45
56
  createUser(request: CreateUserRequest): void;
57
+
58
+ patchUser(request: PatchUserRequest): Promise<PatchUserResponse> | Observable<PatchUserResponse> | PatchUserResponse;
46
59
  }
47
60
 
48
61
  export function UserServiceControllerMethods() {
49
62
  return function (constructor: Function) {
50
- const grpcMethods: string[] = ["getMe", "createUser"];
63
+ const grpcMethods: string[] = ["getMe", "createUser", "patchUser"];
51
64
  for (const method of grpcMethods) {
52
65
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
53
66
  GrpcMethod("UserService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alebooking/contracts",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Protobug definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/user.proto CHANGED
@@ -7,6 +7,7 @@ import "google/protobuf/empty.proto";
7
7
  service UserService {
8
8
  rpc GetMe (GetMeRequest) returns (GetMeResponse);
9
9
  rpc CreateUser (CreateUserRequest) returns (google.protobuf.Empty);
10
+ rpc PatchUser (PatchUserRequest) returns (PatchUserResponse);
10
11
  }
11
12
 
12
13
  message GetMeRequest {
@@ -21,6 +22,16 @@ message CreateUserRequest {
21
22
  string id = 1;
22
23
  }
23
24
 
25
+ message PatchUserRequest {
26
+ string id = 1;
27
+
28
+ optional string name = 2;
29
+ }
30
+
31
+ message PatchUserResponse {
32
+ User user = 1;
33
+ }
34
+
24
35
  message User {
25
36
  string id = 1;
26
37
  optional string name = 2;