@microservsforsell/contracts 1.1.3 → 1.1.5

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.
@@ -12,6 +12,13 @@ export interface CreateUserRequest {
12
12
  export interface CreateUserResponse {
13
13
  ok: boolean;
14
14
  }
15
+ export interface PatchUserRequest {
16
+ userId: string;
17
+ name?: string | undefined;
18
+ }
19
+ export interface PatchUserResponse {
20
+ ok: boolean;
21
+ }
15
22
  export interface User {
16
23
  id: string;
17
24
  name?: string | undefined;
@@ -23,10 +30,12 @@ export declare const USERS_V1_PACKAGE_NAME = "users.v1";
23
30
  export interface UsersServiceClient {
24
31
  getMe(request: GetMeRequest): Observable<GetMeResponse>;
25
32
  createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
33
+ patchUser(request: PatchUserRequest): Observable<PatchUserResponse>;
26
34
  }
27
35
  export interface UsersServiceController {
28
36
  getMe(request: GetMeRequest): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
29
37
  createUser(request: CreateUserRequest): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
38
+ patchUser(request: PatchUserRequest): Promise<PatchUserResponse> | Observable<PatchUserResponse> | PatchUserResponse;
30
39
  }
31
40
  export declare function UsersServiceControllerMethods(): (constructor: Function) => void;
32
41
  export declare const USERS_SERVICE_NAME = "UsersService";
package/dist/gen/users.js CHANGED
@@ -13,7 +13,7 @@ exports.protobufPackage = "users.v1";
13
13
  exports.USERS_V1_PACKAGE_NAME = "users.v1";
14
14
  function UsersServiceControllerMethods() {
15
15
  return function (constructor) {
16
- const grpcMethods = ["getMe", "createUser"];
16
+ const grpcMethods = ["getMe", "createUser", "patchUser"];
17
17
  for (const method of grpcMethods) {
18
18
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
19
  (0, microservices_1.GrpcMethod)("UsersService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microservsforsell/contracts",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Protobuf definitions and generated Typecript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/users.proto CHANGED
@@ -5,6 +5,8 @@ package users.v1;
5
5
  service UsersService {
6
6
  rpc GetMe (GetMeRequest) returns (GetMeResponse);
7
7
  rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
8
+ rpc PatchUser (PatchUserRequest) returns (PatchUserResponse);
9
+
8
10
  }
9
11
 
10
12
  message GetMeRequest {
@@ -21,6 +23,14 @@ message CreateUserResponse {
21
23
  bool ok = 1;
22
24
  }
23
25
 
26
+ message PatchUserRequest {
27
+ string user_id = 1;
28
+ optional string name = 2;
29
+ }
30
+ message PatchUserResponse {
31
+ bool ok = 1;
32
+ }
33
+
24
34
  message User {
25
35
  string id = 1;
26
36
  optional string name = 2;