@arbiwallet/contracts 1.0.21 → 1.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.
package/gen/user.ts CHANGED
@@ -29,19 +29,30 @@ export interface UserResponse {
29
29
  updatedAt: string;
30
30
  }
31
31
 
32
+ export interface UpdateUserRequest {
33
+ userId: number;
34
+ firstName?: string | undefined;
35
+ lastName?: string | undefined;
36
+ avatar?: string | undefined;
37
+ }
38
+
32
39
  export const USER_PACKAGE_NAME = "user";
33
40
 
34
41
  export interface UserServiceClient {
35
42
  getUser(request: GetUserRequest): Observable<UserResponse>;
43
+
44
+ updateUser(request: UpdateUserRequest): Observable<UserResponse>;
36
45
  }
37
46
 
38
47
  export interface UserServiceController {
39
48
  getUser(request: GetUserRequest): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
49
+
50
+ updateUser(request: UpdateUserRequest): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
40
51
  }
41
52
 
42
53
  export function UserServiceControllerMethods() {
43
54
  return function (constructor: Function) {
44
- const grpcMethods: string[] = ["getUser"];
55
+ const grpcMethods: string[] = ["getUser", "updateUser"];
45
56
  for (const method of grpcMethods) {
46
57
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
47
58
  GrpcMethod("UserService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arbiwallet/contracts",
3
3
  "descriptions": "Generate and manage smart contracts for ArbiWallet",
4
- "version": "1.0.21",
4
+ "version": "1.0.22",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
package/proto/user.proto CHANGED
@@ -3,6 +3,7 @@ package user;
3
3
 
4
4
  service UserService {
5
5
  rpc GetUser (GetUserRequest) returns (UserResponse);
6
+ rpc UpdateUser (UpdateUserRequest) returns (UserResponse);
6
7
  }
7
8
 
8
9
  message GetUserRequest {
@@ -23,3 +24,10 @@ message UserResponse {
23
24
  string created_at = 11;
24
25
  string updated_at = 12;
25
26
  }
27
+
28
+ message UpdateUserRequest {
29
+ int32 user_id = 1;
30
+ optional string first_name = 2;
31
+ optional string last_name = 3;
32
+ optional string avatar = 4;
33
+ }