@barumetric/contracts 1.4.8 → 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
@@ -12,47 +12,43 @@ import { Timestamp } from "./google/protobuf/timestamp";
12
12
  export const protobufPackage = "users.v1";
13
13
 
14
14
  export enum Gender {
15
- GENDER_UNSPECIFIED = 0,
16
- GENDER_MALE = 1,
17
- GENDER_FEMALE = 2,
18
- GENDER_OTHER = 3,
15
+ UNSPECIFIED = 0,
16
+ MALE = 1,
17
+ FEMALE = 2,
18
+ OTHER = 3,
19
19
  UNRECOGNIZED = -1,
20
20
  }
21
21
 
22
22
  export enum VerificationType {
23
- VERIFICATION_TYPE_UNSPECIFIED = 0,
24
- VERIFICATION_TYPE_PASSPORT = 1,
25
- VERIFICATION_TYPE_DRIVER_LICENSE = 2,
26
- VERIFICATION_TYPE_ID_CARD = 3,
27
- VERIFICATION_TYPE_RESIDENCE_PERMIT = 4,
28
- VERIFICATION_TYPE_BUSINESS_REGISTRATION = 5,
23
+ PASSPORT = 0,
24
+ DRIVER_LICENSE = 1,
25
+ ID_CARD = 2,
26
+ RESIDENCE_PERMIT = 3,
27
+ BUSINESS_REGISTRATION = 4,
29
28
  UNRECOGNIZED = -1,
30
29
  }
31
30
 
32
31
  export enum VerificationStatus {
33
- VERIFICATION_STATUS_UNSPECIFIED = 0,
34
- VERIFICATION_STATUS_PENDING = 1,
35
- VERIFICATION_STATUS_APPROVED = 2,
36
- VERIFICATION_STATUS_REJECTED = 3,
37
- VERIFICATION_STATUS_EXPIRED = 4,
32
+ PENDING = 0,
33
+ APPROVED = 1,
34
+ REJECTED = 2,
35
+ EXPIRED = 3,
38
36
  UNRECOGNIZED = -1,
39
37
  }
40
38
 
41
39
  export enum VerificationSource {
42
- VERIFICATION_SOURCE_UNSPECIFIED = 0,
43
- VERIFICATION_SOURCE_MANUAL_UPLOAD = 1,
44
- VERIFICATION_SOURCE_BANK_API = 2,
45
- VERIFICATION_SOURCE_THIRD_PARTY_KYC = 3,
46
- VERIFICATION_SOURCE_AUTO = 4,
40
+ MANUAL_UPLOAD = 0,
41
+ BANK_API = 1,
42
+ THIRD_PARTY_KYC = 2,
43
+ AUTO = 3,
47
44
  UNRECOGNIZED = -1,
48
45
  }
49
46
 
50
47
  export enum MessagePermission {
51
- MESSAGE_PERMISSION_UNSPECIFIED = 0,
52
- MESSAGE_PERMISSION_ALL = 1,
53
- MESSAGE_PERMISSION_VERIFIED_ONLY = 2,
54
- MESSAGE_PERMISSION_CONTACTS_ONLY = 3,
55
- MESSAGE_PERMISSION_NONE = 4,
48
+ ALL = 0,
49
+ VERIFIED_ONLY = 1,
50
+ CONTACTS_ONLY = 2,
51
+ NONE = 3,
56
52
  UNRECOGNIZED = -1,
57
53
  }
58
54
 
@@ -99,6 +95,18 @@ export interface PatchUserResponse {
99
95
  ok: boolean;
100
96
  }
101
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
+
102
110
  export interface User {
103
111
  id: string;
104
112
  /** Базовые поля */
@@ -212,6 +220,8 @@ export interface UsersServiceClient {
212
220
  createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
213
221
 
214
222
  patchUser(request: PatchUserRequest): Observable<PatchUserResponse>;
223
+
224
+ patchUserLocation(request: PatchUserLocationRequest): Observable<PatchUserLocationResponse>;
215
225
  }
216
226
 
217
227
  export interface UsersServiceController {
@@ -222,11 +232,15 @@ export interface UsersServiceController {
222
232
  ): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
223
233
 
224
234
  patchUser(request: PatchUserRequest): Promise<PatchUserResponse> | Observable<PatchUserResponse> | PatchUserResponse;
235
+
236
+ patchUserLocation(
237
+ request: PatchUserLocationRequest,
238
+ ): Promise<PatchUserLocationResponse> | Observable<PatchUserLocationResponse> | PatchUserLocationResponse;
225
239
  }
226
240
 
227
241
  export function UsersServiceControllerMethods() {
228
242
  return function (constructor: Function) {
229
- const grpcMethods: string[] = ["getMe", "createUser", "patchUser"];
243
+ const grpcMethods: string[] = ["getMe", "createUser", "patchUser", "patchUserLocation"];
230
244
  for (const method of grpcMethods) {
231
245
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
232
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.8",
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
 
@@ -147,41 +161,37 @@ message UserSettings {
147
161
  }
148
162
 
149
163
  enum Gender {
150
- GENDER_UNSPECIFIED = 0;
151
- GENDER_MALE = 1;
152
- GENDER_FEMALE = 2;
153
- GENDER_OTHER = 3;
164
+ UNSPECIFIED = 0;
165
+ MALE = 1;
166
+ FEMALE = 2;
167
+ OTHER = 3;
154
168
  }
155
169
 
156
170
  enum VerificationType {
157
- VERIFICATION_TYPE_UNSPECIFIED = 0;
158
- VERIFICATION_TYPE_PASSPORT = 1;
159
- VERIFICATION_TYPE_DRIVER_LICENSE = 2;
160
- VERIFICATION_TYPE_ID_CARD = 3;
161
- VERIFICATION_TYPE_RESIDENCE_PERMIT = 4;
162
- VERIFICATION_TYPE_BUSINESS_REGISTRATION = 5;
171
+ PASSPORT = 0;
172
+ DRIVER_LICENSE = 1;
173
+ ID_CARD = 2;
174
+ RESIDENCE_PERMIT = 3;
175
+ BUSINESS_REGISTRATION = 4;
163
176
  }
164
177
 
165
178
  enum VerificationStatus {
166
- VERIFICATION_STATUS_UNSPECIFIED = 0;
167
- VERIFICATION_STATUS_PENDING = 1;
168
- VERIFICATION_STATUS_APPROVED = 2;
169
- VERIFICATION_STATUS_REJECTED = 3;
170
- VERIFICATION_STATUS_EXPIRED = 4;
179
+ PENDING = 0;
180
+ APPROVED = 1;
181
+ REJECTED = 2;
182
+ EXPIRED = 3;
171
183
  }
172
184
 
173
185
  enum VerificationSource {
174
- VERIFICATION_SOURCE_UNSPECIFIED = 0;
175
- VERIFICATION_SOURCE_MANUAL_UPLOAD = 1;
176
- VERIFICATION_SOURCE_BANK_API = 2;
177
- VERIFICATION_SOURCE_THIRD_PARTY_KYC = 3;
178
- VERIFICATION_SOURCE_AUTO = 4;
186
+ MANUAL_UPLOAD = 0;
187
+ BANK_API = 1;
188
+ THIRD_PARTY_KYC = 2;
189
+ AUTO = 3;
179
190
  }
180
191
 
181
192
  enum MessagePermission {
182
- MESSAGE_PERMISSION_UNSPECIFIED = 0;
183
- MESSAGE_PERMISSION_ALL = 1;
184
- MESSAGE_PERMISSION_VERIFIED_ONLY = 2;
185
- MESSAGE_PERMISSION_CONTACTS_ONLY = 3;
186
- MESSAGE_PERMISSION_NONE = 4;
193
+ ALL = 0;
194
+ VERIFIED_ONLY = 1;
195
+ CONTACTS_ONLY = 2;
196
+ NONE = 3;
187
197
  }