@barumetric/contracts 1.4.9 → 1.4.10

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/ts/users.ts CHANGED
@@ -95,6 +95,18 @@ export interface PatchUserResponse {
95
95
  ok: boolean;
96
96
  }
97
97
 
98
+ export interface PatchUserLocationRequest {
99
+ userId: string;
100
+ city?: string | undefined;
101
+ region?: string | undefined;
102
+ latitude?: number | undefined;
103
+ longitude?: number | undefined;
104
+ }
105
+
106
+ export interface PatchUserLocationResponse {
107
+ ok: boolean;
108
+ }
109
+
98
110
  export interface User {
99
111
  id: string;
100
112
  /** Базовые поля */
@@ -208,6 +220,8 @@ export interface UsersServiceClient {
208
220
  createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
209
221
 
210
222
  patchUser(request: PatchUserRequest): Observable<PatchUserResponse>;
223
+
224
+ patchUserLocation(request: PatchUserLocationRequest): Observable<PatchUserLocationResponse>;
211
225
  }
212
226
 
213
227
  export interface UsersServiceController {
@@ -218,11 +232,15 @@ export interface UsersServiceController {
218
232
  ): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
219
233
 
220
234
  patchUser(request: PatchUserRequest): Promise<PatchUserResponse> | Observable<PatchUserResponse> | PatchUserResponse;
235
+
236
+ patchUserLocation(
237
+ request: PatchUserLocationRequest,
238
+ ): Promise<PatchUserLocationResponse> | Observable<PatchUserLocationResponse> | PatchUserLocationResponse;
221
239
  }
222
240
 
223
241
  export function UsersServiceControllerMethods() {
224
242
  return function (constructor: Function) {
225
- const grpcMethods: string[] = ["getMe", "createUser", "patchUser"];
243
+ const grpcMethods: string[] = ["getMe", "createUser", "patchUser", "patchUserLocation"];
226
244
  for (const method of grpcMethods) {
227
245
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
228
246
  GrpcMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barumetric/contracts",
3
- "version": "1.4.9",
3
+ "version": "1.4.10",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/users.proto CHANGED
@@ -9,6 +9,7 @@ service UsersService {
9
9
 
10
10
  rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
11
11
  rpc PatchUser (PatchUserRequest) returns (PatchUserResponse);
12
+ rpc PatchUserLocation (PatchUserLocationRequest) returns (PatchUserLocationResponse);
12
13
  }
13
14
 
14
15
  message GetMeRequest {
@@ -54,6 +55,19 @@ message PatchUserResponse {
54
55
  bool ok = 1;
55
56
  }
56
57
 
58
+ message PatchUserLocationRequest {
59
+ string user_id = 1;
60
+
61
+ optional string city = 2;
62
+ optional string region = 3;
63
+ optional double latitude = 4;
64
+ optional double longitude = 5;
65
+ }
66
+
67
+ message PatchUserLocationResponse {
68
+ bool ok = 1;
69
+ }
70
+
57
71
  message User {
58
72
  string id = 1;
59
73