@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 +40 -26
- package/package.json +1 -1
- package/proto/users.proto +35 -25
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
164
|
+
UNSPECIFIED = 0;
|
|
165
|
+
MALE = 1;
|
|
166
|
+
FEMALE = 2;
|
|
167
|
+
OTHER = 3;
|
|
154
168
|
}
|
|
155
169
|
|
|
156
170
|
enum VerificationType {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
MESSAGE_PERMISSION_NONE = 4;
|
|
193
|
+
ALL = 0;
|
|
194
|
+
VERIFIED_ONLY = 1;
|
|
195
|
+
CONTACTS_ONLY = 2;
|
|
196
|
+
NONE = 3;
|
|
187
197
|
}
|