@candesk/contracts 4.1.0 → 4.1.2

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,6 +5,13 @@ export interface GetUserRequest {
5
5
  export interface GetUserResponse {
6
6
  user: User | undefined;
7
7
  }
8
+ export interface UpdateUserRequest {
9
+ id: string;
10
+ name?: string | undefined;
11
+ }
12
+ export interface UpdateUserResponse {
13
+ user: User | undefined;
14
+ }
8
15
  export interface User {
9
16
  id: string;
10
17
  name?: string | undefined;
@@ -12,4 +19,5 @@ export interface User {
12
19
  }
13
20
  export interface UserService {
14
21
  getUser(request: GetUserRequest): Promise<GetUserResponse>;
22
+ updateUser(request: UpdateUserRequest): Promise<UpdateUserResponse>;
15
23
  }
@@ -6,6 +6,13 @@ export interface GetUserRequest {
6
6
  export interface GetUserResponse {
7
7
  user: User | undefined;
8
8
  }
9
+ export interface UpdateUserRequest {
10
+ id: string;
11
+ name?: string | undefined;
12
+ }
13
+ export interface UpdateUserResponse {
14
+ user: User | undefined;
15
+ }
9
16
  export interface User {
10
17
  id: string;
11
18
  name?: string | undefined;
@@ -14,9 +21,11 @@ export interface User {
14
21
  export declare const USER_V1_PACKAGE_NAME = "user.v1";
15
22
  export interface UserServiceClient {
16
23
  getUser(request: GetUserRequest): Observable<GetUserResponse>;
24
+ updateUser(request: UpdateUserRequest): Observable<UpdateUserResponse>;
17
25
  }
18
26
  export interface UserServiceController {
19
27
  getUser(request: GetUserRequest): Promise<GetUserResponse> | Observable<GetUserResponse> | GetUserResponse;
28
+ updateUser(request: UpdateUserRequest): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
20
29
  }
21
30
  export declare function UserServiceControllerMethods(): (constructor: Function) => void;
22
31
  export declare const USER_SERVICE_NAME = "UserService";
package/dist/nest/user.js CHANGED
@@ -13,7 +13,7 @@ exports.protobufPackage = "user.v1";
13
13
  exports.USER_V1_PACKAGE_NAME = "user.v1";
14
14
  function UserServiceControllerMethods() {
15
15
  return function (constructor) {
16
- const grpcMethods = ["getUser"];
16
+ const grpcMethods = ["getUser", "updateUser"];
17
17
  for (const method of grpcMethods) {
18
18
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
19
  (0, microservices_1.GrpcMethod)("UserService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "4.1.0",
3
+ "version": "4.1.2",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
package/proto/user.proto CHANGED
@@ -4,6 +4,7 @@ package user.v1;
4
4
 
5
5
  service UserService {
6
6
  rpc GetUser (GetUserRequest) returns (GetUserResponse);
7
+ rpc UpdateUser (UpdateUserRequest) returns (UpdateUserResponse);
7
8
  }
8
9
 
9
10
  message GetUserRequest {
@@ -14,6 +15,15 @@ message GetUserResponse {
14
15
  User user = 1;
15
16
  }
16
17
 
18
+ message UpdateUserRequest {
19
+ string id = 1;
20
+ optional string name = 2;
21
+ }
22
+
23
+ message UpdateUserResponse {
24
+ User user = 1;
25
+ }
26
+
17
27
  message User {
18
28
  string id = 1;
19
29
  optional string name = 2;