@arbiwallet/contracts 1.0.224 → 1.0.226
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/crm_manager.ts +29 -0
- package/gen/exchange_core.ts +8 -137
- package/gen/user.ts +57 -0
- package/package.json +1 -1
- package/proto/crm_manager.proto +23 -0
- package/proto/exchange_core.proto +9 -93
- package/proto/user.proto +36 -0
package/gen/crm_manager.ts
CHANGED
|
@@ -61,6 +61,28 @@ export interface ListManagersResponse {
|
|
|
61
61
|
pages: number;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
export interface BatchGetManagersByIdsRequest {
|
|
65
|
+
ids: string[];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface BatchGetManagersByIdsResponseRecord {
|
|
69
|
+
id: string;
|
|
70
|
+
email: string;
|
|
71
|
+
username: string;
|
|
72
|
+
firstName: string;
|
|
73
|
+
lastName: string;
|
|
74
|
+
displayName: string;
|
|
75
|
+
avatarUrl: string;
|
|
76
|
+
status: CrmManagerRecordStatus;
|
|
77
|
+
createdAtUnixMs: number;
|
|
78
|
+
updatedAtUnixMs: number;
|
|
79
|
+
sectionPermissions: SectionPermission[];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface BatchGetManagersByIdsResponse {
|
|
83
|
+
managers: BatchGetManagersByIdsResponseRecord[];
|
|
84
|
+
}
|
|
85
|
+
|
|
64
86
|
export interface GetManagerRequest {
|
|
65
87
|
managerId: string;
|
|
66
88
|
}
|
|
@@ -219,6 +241,8 @@ export const CRM_MANAGER_PACKAGE_NAME = "crm_manager";
|
|
|
219
241
|
export interface CrmManagerAdminServiceClient {
|
|
220
242
|
listManagers(request: ListManagersRequest): Observable<ListManagersResponse>;
|
|
221
243
|
|
|
244
|
+
batchGetManagersByIds(request: BatchGetManagersByIdsRequest): Observable<BatchGetManagersByIdsResponse>;
|
|
245
|
+
|
|
222
246
|
getManager(request: GetManagerRequest): Observable<GetManagerResponse>;
|
|
223
247
|
|
|
224
248
|
createManager(request: CreateManagerRequest): Observable<CreateManagerResponse>;
|
|
@@ -243,6 +267,10 @@ export interface CrmManagerAdminServiceController {
|
|
|
243
267
|
request: ListManagersRequest,
|
|
244
268
|
): Promise<ListManagersResponse> | Observable<ListManagersResponse> | ListManagersResponse;
|
|
245
269
|
|
|
270
|
+
batchGetManagersByIds(
|
|
271
|
+
request: BatchGetManagersByIdsRequest,
|
|
272
|
+
): Promise<BatchGetManagersByIdsResponse> | Observable<BatchGetManagersByIdsResponse> | BatchGetManagersByIdsResponse;
|
|
273
|
+
|
|
246
274
|
getManager(
|
|
247
275
|
request: GetManagerRequest,
|
|
248
276
|
): Promise<GetManagerResponse> | Observable<GetManagerResponse> | GetManagerResponse;
|
|
@@ -282,6 +310,7 @@ export function CrmManagerAdminServiceControllerMethods() {
|
|
|
282
310
|
return function (constructor: Function) {
|
|
283
311
|
const grpcMethods: string[] = [
|
|
284
312
|
"listManagers",
|
|
313
|
+
"batchGetManagersByIds",
|
|
285
314
|
"getManager",
|
|
286
315
|
"createManager",
|
|
287
316
|
"updateManager",
|
package/gen/exchange_core.ts
CHANGED
|
@@ -12,22 +12,6 @@ import { Struct } from "./google/protobuf/struct";
|
|
|
12
12
|
|
|
13
13
|
export const protobufPackage = "exchange_core";
|
|
14
14
|
|
|
15
|
-
export enum ExchangeDealStatus {
|
|
16
|
-
EXCHANGE_DEAL_STATUS_UNSPECIFIED = 0,
|
|
17
|
-
EXCHANGE_DEAL_STATUS_NO_DEAL = 1,
|
|
18
|
-
EXCHANGE_DEAL_STATUS_IN_PROGRESS = 2,
|
|
19
|
-
EXCHANGE_DEAL_STATUS_COMPLETED = 3,
|
|
20
|
-
EXCHANGE_DEAL_STATUS_CANCELLED = 4,
|
|
21
|
-
UNRECOGNIZED = -1,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export enum ExchangeDealAction {
|
|
25
|
-
EXCHANGE_DEAL_ACTION_UNSPECIFIED = 0,
|
|
26
|
-
EXCHANGE_DEAL_ACTION_CREATE_DEAL = 1,
|
|
27
|
-
EXCHANGE_DEAL_ACTION_OPEN_DEAL = 2,
|
|
28
|
-
UNRECOGNIZED = -1,
|
|
29
|
-
}
|
|
30
|
-
|
|
31
15
|
export interface AuthManagerContext {
|
|
32
16
|
managerId: string;
|
|
33
17
|
officeIds: string[];
|
|
@@ -48,7 +32,7 @@ export interface CreateExchangeDealRequest {
|
|
|
48
32
|
factOutputAmount?: number | undefined;
|
|
49
33
|
inputCurrencyId?: string | undefined;
|
|
50
34
|
outputCurrencyId?: string | undefined;
|
|
51
|
-
|
|
35
|
+
userId?: string | undefined;
|
|
52
36
|
managerPersonId?: string | undefined;
|
|
53
37
|
expensesForCourier?: number | undefined;
|
|
54
38
|
includeInTotalCalculation?: boolean | undefined;
|
|
@@ -65,7 +49,7 @@ export interface CreateExchangeDealRequest {
|
|
|
65
49
|
|
|
66
50
|
export interface CreateExchangeDealResult {
|
|
67
51
|
exchangeId: string;
|
|
68
|
-
|
|
52
|
+
userId: string;
|
|
69
53
|
inputAmount: number;
|
|
70
54
|
inputCurrencyId: string;
|
|
71
55
|
outputAmount: number;
|
|
@@ -85,7 +69,7 @@ export interface GetExchangeDealsRequest {
|
|
|
85
69
|
fromDate?: string | undefined;
|
|
86
70
|
toDate?: string | undefined;
|
|
87
71
|
managerId?: string | undefined;
|
|
88
|
-
|
|
72
|
+
userId?: string | undefined;
|
|
89
73
|
page?: number | undefined;
|
|
90
74
|
pageSize?: number | undefined;
|
|
91
75
|
ordering?: string | undefined;
|
|
@@ -98,7 +82,7 @@ export interface GetExchangeDealsManager {
|
|
|
98
82
|
|
|
99
83
|
export interface GetExchangeDealsItem {
|
|
100
84
|
id: string;
|
|
101
|
-
|
|
85
|
+
userId: string;
|
|
102
86
|
paymentId?: string | undefined;
|
|
103
87
|
inputAmount: number;
|
|
104
88
|
inputCurrencyId: string;
|
|
@@ -122,7 +106,7 @@ export interface GetExchangeDealsResponse {
|
|
|
122
106
|
export interface UpdateExchangeDealRequest {
|
|
123
107
|
authManagerContext: AuthManagerContext | undefined;
|
|
124
108
|
id: string;
|
|
125
|
-
|
|
109
|
+
userId?: string | undefined;
|
|
126
110
|
inputAmount?: number | undefined;
|
|
127
111
|
inputCurrencyId?: string | undefined;
|
|
128
112
|
inputWalletId?: string | undefined;
|
|
@@ -148,7 +132,7 @@ export interface UpdateExchangeDealRequest {
|
|
|
148
132
|
|
|
149
133
|
export interface UpdateExchangeDealResult {
|
|
150
134
|
id: string;
|
|
151
|
-
|
|
135
|
+
userId: string;
|
|
152
136
|
inputAmount: number;
|
|
153
137
|
inputCurrencyId: string;
|
|
154
138
|
outputAmount: number;
|
|
@@ -234,8 +218,8 @@ export interface GetTransactionsItem {
|
|
|
234
218
|
comment?: string | undefined;
|
|
235
219
|
exchangeId?: string | undefined;
|
|
236
220
|
exchangeUrl?: string | undefined;
|
|
237
|
-
|
|
238
|
-
|
|
221
|
+
managerId?: string | undefined;
|
|
222
|
+
managerName?: string | undefined;
|
|
239
223
|
accountType: number;
|
|
240
224
|
}
|
|
241
225
|
|
|
@@ -247,71 +231,6 @@ export interface GetTransactionsResponse {
|
|
|
247
231
|
summary: GetTransactionsSummaryItem[];
|
|
248
232
|
}
|
|
249
233
|
|
|
250
|
-
export interface GetExchangeDealHistoryStatisticsRequest {
|
|
251
|
-
dateFrom?: string | undefined;
|
|
252
|
-
dateTo?: string | undefined;
|
|
253
|
-
amountFrom?: number | undefined;
|
|
254
|
-
amountTo?: number | undefined;
|
|
255
|
-
inputCurrency?: string | undefined;
|
|
256
|
-
outputCurrency?:
|
|
257
|
-
| string
|
|
258
|
-
| undefined;
|
|
259
|
-
/** no_payment | with_payment | with_exchange | completed */
|
|
260
|
-
status?: string | undefined;
|
|
261
|
-
search?: string | undefined;
|
|
262
|
-
page?: number | undefined;
|
|
263
|
-
pageSize?: number | undefined;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
export interface GetExchangeDealHistoryStatisticsResponse {
|
|
267
|
-
items: ExchangeDealStateByCalculation[];
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
export interface GetExchangePaymentRefsByCalculationIdsRequest {
|
|
271
|
-
calculationIds: string[];
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export interface ExchangePaymentRefByCalculation {
|
|
275
|
-
calculationId: string;
|
|
276
|
-
paymentUuid: string;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export interface GetExchangePaymentRefsByCalculationIdsResponse {
|
|
280
|
-
items: ExchangePaymentRefByCalculation[];
|
|
281
|
-
notFoundCalculationIds: string[];
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export interface GetExchangeDealRefsByCalculationIdsRequest {
|
|
285
|
-
calculationIds: string[];
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export interface ExchangeDealRefByCalculation {
|
|
289
|
-
calculationId: string;
|
|
290
|
-
exchangeId: string;
|
|
291
|
-
status: boolean;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
export interface GetExchangeDealRefsByCalculationIdsResponse {
|
|
295
|
-
items: ExchangeDealRefByCalculation[];
|
|
296
|
-
notFoundCalculationIds: string[];
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
export interface GetExchangeDealStatesByCalculationIdsRequest {
|
|
300
|
-
calculationIds: string[];
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export interface ExchangeDealStateByCalculation {
|
|
304
|
-
calculationId: string;
|
|
305
|
-
dealId?: string | undefined;
|
|
306
|
-
status: ExchangeDealStatus;
|
|
307
|
-
allowedActions: ExchangeDealAction[];
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
export interface GetExchangeDealStatesByCalculationIdsResponse {
|
|
311
|
-
items: ExchangeDealStateByCalculation[];
|
|
312
|
-
notFoundCalculationIds: string[];
|
|
313
|
-
}
|
|
314
|
-
|
|
315
234
|
export const EXCHANGE_CORE_PACKAGE_NAME = "exchange_core";
|
|
316
235
|
|
|
317
236
|
wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
|
|
@@ -334,22 +253,6 @@ export interface ExchangeCoreServiceClient {
|
|
|
334
253
|
cancelExchangeDeal(request: CancelExchangeDealRequest): Observable<CancelExchangeDealResponse>;
|
|
335
254
|
|
|
336
255
|
getTransactions(request: GetTransactionsRequest): Observable<GetTransactionsResponse>;
|
|
337
|
-
|
|
338
|
-
getExchangeDealHistoryStatistics(
|
|
339
|
-
request: GetExchangeDealHistoryStatisticsRequest,
|
|
340
|
-
): Observable<GetExchangeDealHistoryStatisticsResponse>;
|
|
341
|
-
|
|
342
|
-
getExchangePaymentRefsByCalculationIds(
|
|
343
|
-
request: GetExchangePaymentRefsByCalculationIdsRequest,
|
|
344
|
-
): Observable<GetExchangePaymentRefsByCalculationIdsResponse>;
|
|
345
|
-
|
|
346
|
-
getExchangeDealRefsByCalculationIds(
|
|
347
|
-
request: GetExchangeDealRefsByCalculationIdsRequest,
|
|
348
|
-
): Observable<GetExchangeDealRefsByCalculationIdsResponse>;
|
|
349
|
-
|
|
350
|
-
getExchangeDealStatesByCalculationIds(
|
|
351
|
-
request: GetExchangeDealStatesByCalculationIdsRequest,
|
|
352
|
-
): Observable<GetExchangeDealStatesByCalculationIdsResponse>;
|
|
353
256
|
}
|
|
354
257
|
|
|
355
258
|
/**
|
|
@@ -382,34 +285,6 @@ export interface ExchangeCoreServiceController {
|
|
|
382
285
|
getTransactions(
|
|
383
286
|
request: GetTransactionsRequest,
|
|
384
287
|
): Promise<GetTransactionsResponse> | Observable<GetTransactionsResponse> | GetTransactionsResponse;
|
|
385
|
-
|
|
386
|
-
getExchangeDealHistoryStatistics(
|
|
387
|
-
request: GetExchangeDealHistoryStatisticsRequest,
|
|
388
|
-
):
|
|
389
|
-
| Promise<GetExchangeDealHistoryStatisticsResponse>
|
|
390
|
-
| Observable<GetExchangeDealHistoryStatisticsResponse>
|
|
391
|
-
| GetExchangeDealHistoryStatisticsResponse;
|
|
392
|
-
|
|
393
|
-
getExchangePaymentRefsByCalculationIds(
|
|
394
|
-
request: GetExchangePaymentRefsByCalculationIdsRequest,
|
|
395
|
-
):
|
|
396
|
-
| Promise<GetExchangePaymentRefsByCalculationIdsResponse>
|
|
397
|
-
| Observable<GetExchangePaymentRefsByCalculationIdsResponse>
|
|
398
|
-
| GetExchangePaymentRefsByCalculationIdsResponse;
|
|
399
|
-
|
|
400
|
-
getExchangeDealRefsByCalculationIds(
|
|
401
|
-
request: GetExchangeDealRefsByCalculationIdsRequest,
|
|
402
|
-
):
|
|
403
|
-
| Promise<GetExchangeDealRefsByCalculationIdsResponse>
|
|
404
|
-
| Observable<GetExchangeDealRefsByCalculationIdsResponse>
|
|
405
|
-
| GetExchangeDealRefsByCalculationIdsResponse;
|
|
406
|
-
|
|
407
|
-
getExchangeDealStatesByCalculationIds(
|
|
408
|
-
request: GetExchangeDealStatesByCalculationIdsRequest,
|
|
409
|
-
):
|
|
410
|
-
| Promise<GetExchangeDealStatesByCalculationIdsResponse>
|
|
411
|
-
| Observable<GetExchangeDealStatesByCalculationIdsResponse>
|
|
412
|
-
| GetExchangeDealStatesByCalculationIdsResponse;
|
|
413
288
|
}
|
|
414
289
|
|
|
415
290
|
export function ExchangeCoreServiceControllerMethods() {
|
|
@@ -421,10 +296,6 @@ export function ExchangeCoreServiceControllerMethods() {
|
|
|
421
296
|
"completeExchangeDeal",
|
|
422
297
|
"cancelExchangeDeal",
|
|
423
298
|
"getTransactions",
|
|
424
|
-
"getExchangeDealHistoryStatistics",
|
|
425
|
-
"getExchangePaymentRefsByCalculationIds",
|
|
426
|
-
"getExchangeDealRefsByCalculationIds",
|
|
427
|
-
"getExchangeDealStatesByCalculationIds",
|
|
428
299
|
];
|
|
429
300
|
for (const method of grpcMethods) {
|
|
430
301
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/user.ts
CHANGED
|
@@ -346,6 +346,38 @@ export interface ContactChangeMessageResponse {
|
|
|
346
346
|
message: string;
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
+
export interface BatchGetUserIdsBySearchRequest {
|
|
350
|
+
search: string;
|
|
351
|
+
/** Максимум возвращаемых id; сервис может дополнительно ограничить. */
|
|
352
|
+
limit: number;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export interface BatchGetUserIdsBySearchResponse {
|
|
356
|
+
userIds: number[];
|
|
357
|
+
/** true, если совпадений больше, чем limit (результат был обрезан). */
|
|
358
|
+
tooManyMatches: boolean;
|
|
359
|
+
totalMatches: number;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export interface BatchGetUsersByIdsRequest {
|
|
363
|
+
userIds: number[];
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export interface BatchUserPublicItem {
|
|
367
|
+
id: number;
|
|
368
|
+
uid: number;
|
|
369
|
+
firstName?: string | undefined;
|
|
370
|
+
lastName?: string | undefined;
|
|
371
|
+
avatar?: string | undefined;
|
|
372
|
+
telegramUsername?: string | undefined;
|
|
373
|
+
status: UserStatus;
|
|
374
|
+
crmCustomerId?: number | undefined;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export interface BatchGetUsersByIdsResponse {
|
|
378
|
+
items: BatchUserPublicItem[];
|
|
379
|
+
}
|
|
380
|
+
|
|
349
381
|
export interface UserBalance {
|
|
350
382
|
asset: string;
|
|
351
383
|
network: string;
|
|
@@ -461,6 +493,14 @@ export interface UserServiceClient {
|
|
|
461
493
|
requestChangePhoneCode(request: RequestChangePhoneCodeRequest): Observable<ContactChangeMessageResponse>;
|
|
462
494
|
|
|
463
495
|
verifyChangePhoneCode(request: VerifyChangePhoneCodeRequest): Observable<UserResponse>;
|
|
496
|
+
|
|
497
|
+
/** Батч-поиск пользователей по строке: возвращает только id (с защитой от слишком широкого поиска). */
|
|
498
|
+
|
|
499
|
+
batchGetUserIdsBySearch(request: BatchGetUserIdsBySearchRequest): Observable<BatchGetUserIdsBySearchResponse>;
|
|
500
|
+
|
|
501
|
+
/** Батч-получение публичных данных пользователей по списку id (для enrichment в других сервисах). */
|
|
502
|
+
|
|
503
|
+
batchGetUsersByIds(request: BatchGetUsersByIdsRequest): Observable<BatchGetUsersByIdsResponse>;
|
|
464
504
|
}
|
|
465
505
|
|
|
466
506
|
export interface UserServiceController {
|
|
@@ -625,6 +665,21 @@ export interface UserServiceController {
|
|
|
625
665
|
verifyChangePhoneCode(
|
|
626
666
|
request: VerifyChangePhoneCodeRequest,
|
|
627
667
|
): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
|
|
668
|
+
|
|
669
|
+
/** Батч-поиск пользователей по строке: возвращает только id (с защитой от слишком широкого поиска). */
|
|
670
|
+
|
|
671
|
+
batchGetUserIdsBySearch(
|
|
672
|
+
request: BatchGetUserIdsBySearchRequest,
|
|
673
|
+
):
|
|
674
|
+
| Promise<BatchGetUserIdsBySearchResponse>
|
|
675
|
+
| Observable<BatchGetUserIdsBySearchResponse>
|
|
676
|
+
| BatchGetUserIdsBySearchResponse;
|
|
677
|
+
|
|
678
|
+
/** Батч-получение публичных данных пользователей по списку id (для enrichment в других сервисах). */
|
|
679
|
+
|
|
680
|
+
batchGetUsersByIds(
|
|
681
|
+
request: BatchGetUsersByIdsRequest,
|
|
682
|
+
): Promise<BatchGetUsersByIdsResponse> | Observable<BatchGetUsersByIdsResponse> | BatchGetUsersByIdsResponse;
|
|
628
683
|
}
|
|
629
684
|
|
|
630
685
|
export function UserServiceControllerMethods() {
|
|
@@ -655,6 +710,8 @@ export function UserServiceControllerMethods() {
|
|
|
655
710
|
"verifyChangeEmailCode",
|
|
656
711
|
"requestChangePhoneCode",
|
|
657
712
|
"verifyChangePhoneCode",
|
|
713
|
+
"batchGetUserIdsBySearch",
|
|
714
|
+
"batchGetUsersByIds",
|
|
658
715
|
];
|
|
659
716
|
for (const method of grpcMethods) {
|
|
660
717
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbiwallet/contracts",
|
|
3
3
|
"descriptions": "Generate and manage smart contracts for ArbiWallet",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.226",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
package/proto/crm_manager.proto
CHANGED
|
@@ -3,6 +3,7 @@ package crm_manager;
|
|
|
3
3
|
|
|
4
4
|
service CrmManagerAdminService {
|
|
5
5
|
rpc ListManagers (ListManagersRequest) returns (ListManagersResponse);
|
|
6
|
+
rpc BatchGetManagersByIds (BatchGetManagersByIdsRequest) returns (BatchGetManagersByIdsResponse);
|
|
6
7
|
rpc GetManager (GetManagerRequest) returns (GetManagerResponse);
|
|
7
8
|
rpc CreateManager (CreateManagerRequest) returns (CreateManagerResponse);
|
|
8
9
|
rpc UpdateManager (UpdateManagerRequest) returns (UpdateManagerResponse);
|
|
@@ -64,6 +65,28 @@ message ListManagersResponse {
|
|
|
64
65
|
int32 pages = 5;
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
message BatchGetManagersByIdsRequest {
|
|
69
|
+
repeated string ids = 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
message BatchGetManagersByIdsResponseRecord {
|
|
73
|
+
string id = 1;
|
|
74
|
+
string email = 2;
|
|
75
|
+
string username = 3;
|
|
76
|
+
string first_name = 4;
|
|
77
|
+
string last_name = 5;
|
|
78
|
+
string display_name = 6;
|
|
79
|
+
string avatar_url = 7;
|
|
80
|
+
CrmManagerRecordStatus status = 8;
|
|
81
|
+
int64 created_at_unix_ms = 9;
|
|
82
|
+
int64 updated_at_unix_ms = 10;
|
|
83
|
+
repeated SectionPermission section_permissions = 11;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message BatchGetManagersByIdsResponse {
|
|
87
|
+
repeated BatchGetManagersByIdsResponseRecord managers = 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
67
90
|
message GetManagerRequest {
|
|
68
91
|
string manager_id = 1;
|
|
69
92
|
}
|
|
@@ -20,13 +20,6 @@ service ExchangeCoreService {
|
|
|
20
20
|
rpc CancelExchangeDeal(CancelExchangeDealRequest) returns (CancelExchangeDealResponse);
|
|
21
21
|
|
|
22
22
|
rpc GetTransactions(GetTransactionsRequest) returns (GetTransactionsResponse);
|
|
23
|
-
|
|
24
|
-
rpc GetExchangeDealHistoryStatistics(GetExchangeDealHistoryStatisticsRequest) returns (GetExchangeDealHistoryStatisticsResponse);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
rpc GetExchangePaymentRefsByCalculationIds(GetExchangePaymentRefsByCalculationIdsRequest) returns (GetExchangePaymentRefsByCalculationIdsResponse);
|
|
28
|
-
rpc GetExchangeDealRefsByCalculationIds(GetExchangeDealRefsByCalculationIdsRequest) returns (GetExchangeDealRefsByCalculationIdsResponse);
|
|
29
|
-
rpc GetExchangeDealStatesByCalculationIds(GetExchangeDealStatesByCalculationIdsRequest) returns (GetExchangeDealStatesByCalculationIdsResponse);
|
|
30
23
|
}
|
|
31
24
|
|
|
32
25
|
// message CreateExchangePaymentRequest {
|
|
@@ -36,7 +29,7 @@ service ExchangeCoreService {
|
|
|
36
29
|
// optional string calculation_id = 3;
|
|
37
30
|
// int32 agent_id = 4;
|
|
38
31
|
// optional double amount = 5;
|
|
39
|
-
// optional string
|
|
32
|
+
// optional string user_id = 6;
|
|
40
33
|
// optional string crypto_network = 7;
|
|
41
34
|
// optional string customer_source = 8;
|
|
42
35
|
// optional string customer_referrer = 9;
|
|
@@ -120,7 +113,7 @@ message CreateExchangeDealRequest {
|
|
|
120
113
|
optional string input_currency_id = 11;
|
|
121
114
|
optional string output_currency_id = 12;
|
|
122
115
|
|
|
123
|
-
optional string
|
|
116
|
+
optional string user_id = 13;
|
|
124
117
|
optional string manager_person_id = 14;
|
|
125
118
|
|
|
126
119
|
optional double expenses_for_courier = 15;
|
|
@@ -141,7 +134,7 @@ message CreateExchangeDealRequest {
|
|
|
141
134
|
|
|
142
135
|
message CreateExchangeDealResult {
|
|
143
136
|
string exchange_id = 1;
|
|
144
|
-
string
|
|
137
|
+
string user_id = 2;
|
|
145
138
|
double input_amount = 3;
|
|
146
139
|
string input_currency_id = 4;
|
|
147
140
|
double output_amount = 5;
|
|
@@ -161,7 +154,7 @@ message GetExchangeDealsRequest {
|
|
|
161
154
|
optional string from_date = 2;
|
|
162
155
|
optional string to_date = 3;
|
|
163
156
|
optional string manager_id = 4;
|
|
164
|
-
optional string
|
|
157
|
+
optional string user_id = 5;
|
|
165
158
|
optional int32 page = 6;
|
|
166
159
|
optional int32 page_size = 7;
|
|
167
160
|
optional string ordering = 8;
|
|
@@ -174,7 +167,7 @@ message GetExchangeDealsManager {
|
|
|
174
167
|
|
|
175
168
|
message GetExchangeDealsItem {
|
|
176
169
|
string id = 1;
|
|
177
|
-
string
|
|
170
|
+
string user_id = 2;
|
|
178
171
|
optional string payment_id = 3;
|
|
179
172
|
double input_amount = 4;
|
|
180
173
|
string input_currency_id = 5;
|
|
@@ -199,7 +192,7 @@ message UpdateExchangeDealRequest {
|
|
|
199
192
|
AuthManagerContext auth_manager_context = 1;
|
|
200
193
|
string id = 2;
|
|
201
194
|
|
|
202
|
-
optional string
|
|
195
|
+
optional string user_id = 3;
|
|
203
196
|
optional double input_amount = 4;
|
|
204
197
|
optional string input_currency_id = 5;
|
|
205
198
|
optional string input_wallet_id = 6;
|
|
@@ -226,7 +219,7 @@ message UpdateExchangeDealRequest {
|
|
|
226
219
|
|
|
227
220
|
message UpdateExchangeDealResult {
|
|
228
221
|
string id = 1;
|
|
229
|
-
string
|
|
222
|
+
string user_id = 2;
|
|
230
223
|
double input_amount = 3;
|
|
231
224
|
string input_currency_id = 4;
|
|
232
225
|
double output_amount = 5;
|
|
@@ -312,8 +305,8 @@ message GetTransactionsItem {
|
|
|
312
305
|
optional string comment = 19;
|
|
313
306
|
optional string exchange_id = 20;
|
|
314
307
|
optional string exchange_url = 21;
|
|
315
|
-
optional string
|
|
316
|
-
optional string
|
|
308
|
+
optional string manager_id = 22;
|
|
309
|
+
optional string manager_name = 23;
|
|
317
310
|
int32 account_type = 24;
|
|
318
311
|
}
|
|
319
312
|
|
|
@@ -324,80 +317,3 @@ message GetTransactionsResponse {
|
|
|
324
317
|
repeated GetTransactionsItem results = 4;
|
|
325
318
|
repeated GetTransactionsSummaryItem summary = 5;
|
|
326
319
|
}
|
|
327
|
-
|
|
328
|
-
message GetExchangeDealHistoryStatisticsRequest {
|
|
329
|
-
optional string date_from = 1;
|
|
330
|
-
optional string date_to = 2;
|
|
331
|
-
optional double amount_from = 3;
|
|
332
|
-
optional double amount_to = 4;
|
|
333
|
-
optional string input_currency = 5;
|
|
334
|
-
optional string output_currency = 6;
|
|
335
|
-
optional string status = 7; // no_payment | with_payment | with_exchange | completed
|
|
336
|
-
optional string search = 8;
|
|
337
|
-
optional int32 page = 9;
|
|
338
|
-
optional int32 page_size = 10;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
message GetExchangeDealHistoryStatisticsResponse {
|
|
342
|
-
repeated ExchangeDealStateByCalculation items = 1;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
message GetExchangePaymentRefsByCalculationIdsRequest {
|
|
346
|
-
repeated string calculation_ids = 1;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
message ExchangePaymentRefByCalculation {
|
|
350
|
-
string calculation_id = 1;
|
|
351
|
-
string payment_uuid = 2;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
message GetExchangePaymentRefsByCalculationIdsResponse {
|
|
355
|
-
repeated ExchangePaymentRefByCalculation items = 1;
|
|
356
|
-
repeated string not_found_calculation_ids = 2;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
message GetExchangeDealRefsByCalculationIdsRequest {
|
|
360
|
-
repeated string calculation_ids = 1;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
message ExchangeDealRefByCalculation {
|
|
364
|
-
string calculation_id = 1;
|
|
365
|
-
string exchange_id = 2;
|
|
366
|
-
bool status = 3;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
message GetExchangeDealRefsByCalculationIdsResponse {
|
|
370
|
-
repeated ExchangeDealRefByCalculation items = 1;
|
|
371
|
-
repeated string not_found_calculation_ids = 2;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
message GetExchangeDealStatesByCalculationIdsRequest {
|
|
376
|
-
repeated string calculation_ids = 1;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
enum ExchangeDealStatus {
|
|
380
|
-
EXCHANGE_DEAL_STATUS_UNSPECIFIED = 0;
|
|
381
|
-
EXCHANGE_DEAL_STATUS_NO_DEAL = 1;
|
|
382
|
-
EXCHANGE_DEAL_STATUS_IN_PROGRESS = 2;
|
|
383
|
-
EXCHANGE_DEAL_STATUS_COMPLETED = 3;
|
|
384
|
-
EXCHANGE_DEAL_STATUS_CANCELLED = 4;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
enum ExchangeDealAction {
|
|
388
|
-
EXCHANGE_DEAL_ACTION_UNSPECIFIED = 0;
|
|
389
|
-
EXCHANGE_DEAL_ACTION_CREATE_DEAL = 1;
|
|
390
|
-
EXCHANGE_DEAL_ACTION_OPEN_DEAL = 2;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
message ExchangeDealStateByCalculation {
|
|
394
|
-
string calculation_id = 1;
|
|
395
|
-
optional string deal_id = 2;
|
|
396
|
-
ExchangeDealStatus status = 3;
|
|
397
|
-
repeated ExchangeDealAction allowed_actions = 4;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
message GetExchangeDealStatesByCalculationIdsResponse {
|
|
401
|
-
repeated ExchangeDealStateByCalculation items = 1;
|
|
402
|
-
repeated string not_found_calculation_ids = 2;
|
|
403
|
-
}
|
package/proto/user.proto
CHANGED
|
@@ -44,6 +44,10 @@ service UserService {
|
|
|
44
44
|
// Смена phone: отправка SMS-кода через Twilio.
|
|
45
45
|
rpc RequestChangePhoneCode (RequestChangePhoneCodeRequest) returns (ContactChangeMessageResponse);
|
|
46
46
|
rpc VerifyChangePhoneCode (VerifyChangePhoneCodeRequest) returns (UserResponse);
|
|
47
|
+
// Батч-поиск пользователей по строке: возвращает только id (с защитой от слишком широкого поиска).
|
|
48
|
+
rpc BatchGetUserIdsBySearch (BatchGetUserIdsBySearchRequest) returns (BatchGetUserIdsBySearchResponse);
|
|
49
|
+
// Батч-получение публичных данных пользователей по списку id (для enrichment в других сервисах).
|
|
50
|
+
rpc BatchGetUsersByIds (BatchGetUsersByIdsRequest) returns (BatchGetUsersByIdsResponse);
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
enum UserStatus {
|
|
@@ -376,6 +380,38 @@ message ContactChangeMessageResponse {
|
|
|
376
380
|
string message = 1;
|
|
377
381
|
}
|
|
378
382
|
|
|
383
|
+
message BatchGetUserIdsBySearchRequest {
|
|
384
|
+
string search = 1;
|
|
385
|
+
// Максимум возвращаемых id; сервис может дополнительно ограничить.
|
|
386
|
+
int32 limit = 2;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
message BatchGetUserIdsBySearchResponse {
|
|
390
|
+
repeated int32 user_ids = 1;
|
|
391
|
+
// true, если совпадений больше, чем limit (результат был обрезан).
|
|
392
|
+
bool too_many_matches = 2;
|
|
393
|
+
int32 total_matches = 3;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
message BatchGetUsersByIdsRequest {
|
|
397
|
+
repeated int32 user_ids = 1;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
message BatchUserPublicItem {
|
|
401
|
+
int32 id = 1;
|
|
402
|
+
int32 uid = 2;
|
|
403
|
+
optional string first_name = 3;
|
|
404
|
+
optional string last_name = 4;
|
|
405
|
+
optional string avatar = 5;
|
|
406
|
+
optional string telegram_username = 6;
|
|
407
|
+
UserStatus status = 7;
|
|
408
|
+
optional int32 crm_customer_id = 8;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
message BatchGetUsersByIdsResponse {
|
|
412
|
+
repeated BatchUserPublicItem items = 1;
|
|
413
|
+
}
|
|
414
|
+
|
|
379
415
|
message UserBalance {
|
|
380
416
|
string asset = 1;
|
|
381
417
|
string network = 2;
|