@arbiwallet/contracts 1.0.227 → 1.0.229
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/exchange_core.ts +35 -5
- package/gen/exchange_rates.ts +41 -0
- package/package.json +1 -1
- package/proto/exchange_core.proto +29 -7
- package/proto/exchange_rates.proto +27 -0
package/gen/exchange_core.ts
CHANGED
|
@@ -66,13 +66,9 @@ export interface CreateExchangeDealResponse {
|
|
|
66
66
|
|
|
67
67
|
export interface GetExchangeDealsRequest {
|
|
68
68
|
authManagerContext: AuthManagerContext | undefined;
|
|
69
|
-
|
|
70
|
-
toDate?: string | undefined;
|
|
71
|
-
managerId?: string | undefined;
|
|
72
|
-
userId?: string | undefined;
|
|
69
|
+
filter: ExchangeCalculationsFiltersRequest | undefined;
|
|
73
70
|
page?: number | undefined;
|
|
74
71
|
pageSize?: number | undefined;
|
|
75
|
-
ordering?: string | undefined;
|
|
76
72
|
}
|
|
77
73
|
|
|
78
74
|
export interface GetExchangeDealsManager {
|
|
@@ -249,6 +245,33 @@ export interface GetTransactionsSummaryResponse {
|
|
|
249
245
|
summary: GetTransactionsSummaryItem[];
|
|
250
246
|
}
|
|
251
247
|
|
|
248
|
+
export interface ExchangeCalculationsFiltersRequest {
|
|
249
|
+
dateFrom?: string | undefined;
|
|
250
|
+
dateTo?: string | undefined;
|
|
251
|
+
amountFrom?: number | undefined;
|
|
252
|
+
amountTo?: number | undefined;
|
|
253
|
+
inputCurrency?: string | undefined;
|
|
254
|
+
outputCurrency?:
|
|
255
|
+
| string
|
|
256
|
+
| undefined;
|
|
257
|
+
/** no_payment | with_payment | with_exchange | completed */
|
|
258
|
+
status?: string | undefined;
|
|
259
|
+
search?: string | undefined;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export interface PaymentsSummaryItem {
|
|
263
|
+
currency: string;
|
|
264
|
+
total: number;
|
|
265
|
+
paid: number;
|
|
266
|
+
unpaid: number;
|
|
267
|
+
percent: number;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface GetPaymentsSummaryResponse {
|
|
271
|
+
withPaymentCount: number;
|
|
272
|
+
items: PaymentsSummaryItem[];
|
|
273
|
+
}
|
|
274
|
+
|
|
252
275
|
export const EXCHANGE_CORE_PACKAGE_NAME = "exchange_core";
|
|
253
276
|
|
|
254
277
|
wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
|
|
@@ -273,6 +296,8 @@ export interface ExchangeCoreServiceClient {
|
|
|
273
296
|
getTransactions(request: GetTransactionsRequest): Observable<GetTransactionsResponse>;
|
|
274
297
|
|
|
275
298
|
getTransactionsSummary(request: GetTransactionsSummaryRequest): Observable<GetTransactionsSummaryResponse>;
|
|
299
|
+
|
|
300
|
+
getPaymentsSummary(request: ExchangeCalculationsFiltersRequest): Observable<GetPaymentsSummaryResponse>;
|
|
276
301
|
}
|
|
277
302
|
|
|
278
303
|
/**
|
|
@@ -312,6 +337,10 @@ export interface ExchangeCoreServiceController {
|
|
|
312
337
|
| Promise<GetTransactionsSummaryResponse>
|
|
313
338
|
| Observable<GetTransactionsSummaryResponse>
|
|
314
339
|
| GetTransactionsSummaryResponse;
|
|
340
|
+
|
|
341
|
+
getPaymentsSummary(
|
|
342
|
+
request: ExchangeCalculationsFiltersRequest,
|
|
343
|
+
): Promise<GetPaymentsSummaryResponse> | Observable<GetPaymentsSummaryResponse> | GetPaymentsSummaryResponse;
|
|
315
344
|
}
|
|
316
345
|
|
|
317
346
|
export function ExchangeCoreServiceControllerMethods() {
|
|
@@ -324,6 +353,7 @@ export function ExchangeCoreServiceControllerMethods() {
|
|
|
324
353
|
"cancelExchangeDeal",
|
|
325
354
|
"getTransactions",
|
|
326
355
|
"getTransactionsSummary",
|
|
356
|
+
"getPaymentsSummary",
|
|
327
357
|
];
|
|
328
358
|
for (const method of grpcMethods) {
|
|
329
359
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/exchange_rates.ts
CHANGED
|
@@ -296,6 +296,20 @@ export interface GetExchangeCalculationHistoryRequest {
|
|
|
296
296
|
pageSize?: number | undefined;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
+
export interface ExchangeCalculationFiltersRequest {
|
|
300
|
+
dateFrom?: string | undefined;
|
|
301
|
+
dateTo?: string | undefined;
|
|
302
|
+
amountFrom?: number | undefined;
|
|
303
|
+
amountTo?: number | undefined;
|
|
304
|
+
inputCurrency?: string | undefined;
|
|
305
|
+
outputCurrency?:
|
|
306
|
+
| string
|
|
307
|
+
| undefined;
|
|
308
|
+
/** no_payment | with_payment | with_exchange | completed */
|
|
309
|
+
status?: string | undefined;
|
|
310
|
+
search?: string | undefined;
|
|
311
|
+
}
|
|
312
|
+
|
|
299
313
|
export interface ExchangeCalculationHistoryAppliedFilters {
|
|
300
314
|
dateFrom?: string | undefined;
|
|
301
315
|
dateTo?: string | undefined;
|
|
@@ -350,6 +364,21 @@ export interface GetExchangeCalculationHistoryResponse {
|
|
|
350
364
|
pagination?: ExchangeCalculationHistoryPagination | undefined;
|
|
351
365
|
}
|
|
352
366
|
|
|
367
|
+
export interface CalculationsInputCurrencySummaryItem {
|
|
368
|
+
currency: string;
|
|
369
|
+
total: number;
|
|
370
|
+
completed: number;
|
|
371
|
+
inProgress: number;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export interface GetExchangeCalculationStatsResponse {
|
|
375
|
+
totalCount: number;
|
|
376
|
+
uniqueCustomers: number;
|
|
377
|
+
withExchangeCount: number;
|
|
378
|
+
completedCount: number;
|
|
379
|
+
items: CalculationsInputCurrencySummaryItem[];
|
|
380
|
+
}
|
|
381
|
+
|
|
353
382
|
export const EXCHANGE_RATES_PACKAGE_NAME = "exchange_rates";
|
|
354
383
|
|
|
355
384
|
wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
|
|
@@ -390,6 +419,10 @@ export interface ExchangeRatesServiceClient {
|
|
|
390
419
|
getExchangeCalculationHistory(
|
|
391
420
|
request: GetExchangeCalculationHistoryRequest,
|
|
392
421
|
): Observable<GetExchangeCalculationHistoryResponse>;
|
|
422
|
+
|
|
423
|
+
getExchangeCalculationStats(
|
|
424
|
+
request: ExchangeCalculationFiltersRequest,
|
|
425
|
+
): Observable<GetExchangeCalculationStatsResponse>;
|
|
393
426
|
}
|
|
394
427
|
|
|
395
428
|
export interface ExchangeRatesServiceController {
|
|
@@ -466,6 +499,13 @@ export interface ExchangeRatesServiceController {
|
|
|
466
499
|
| Promise<GetExchangeCalculationHistoryResponse>
|
|
467
500
|
| Observable<GetExchangeCalculationHistoryResponse>
|
|
468
501
|
| GetExchangeCalculationHistoryResponse;
|
|
502
|
+
|
|
503
|
+
getExchangeCalculationStats(
|
|
504
|
+
request: ExchangeCalculationFiltersRequest,
|
|
505
|
+
):
|
|
506
|
+
| Promise<GetExchangeCalculationStatsResponse>
|
|
507
|
+
| Observable<GetExchangeCalculationStatsResponse>
|
|
508
|
+
| GetExchangeCalculationStatsResponse;
|
|
469
509
|
}
|
|
470
510
|
|
|
471
511
|
export function ExchangeRatesServiceControllerMethods() {
|
|
@@ -488,6 +528,7 @@ export function ExchangeRatesServiceControllerMethods() {
|
|
|
488
528
|
"calculateExchange",
|
|
489
529
|
"getExchangeCalculation",
|
|
490
530
|
"getExchangeCalculationHistory",
|
|
531
|
+
"getExchangeCalculationStats",
|
|
491
532
|
];
|
|
492
533
|
for (const method of grpcMethods) {
|
|
493
534
|
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.229",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
|
@@ -21,6 +21,8 @@ service ExchangeCoreService {
|
|
|
21
21
|
|
|
22
22
|
rpc GetTransactions(GetTransactionsRequest) returns (GetTransactionsResponse);
|
|
23
23
|
rpc GetTransactionsSummary(GetTransactionsSummaryRequest) returns (GetTransactionsSummaryResponse);
|
|
24
|
+
|
|
25
|
+
rpc GetPaymentsSummary(ExchangeCalculationsFiltersRequest) returns (GetPaymentsSummaryResponse);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
// message CreateExchangePaymentRequest {
|
|
@@ -152,13 +154,9 @@ message CreateExchangeDealResponse {
|
|
|
152
154
|
|
|
153
155
|
message GetExchangeDealsRequest {
|
|
154
156
|
AuthManagerContext auth_manager_context = 1;
|
|
155
|
-
|
|
156
|
-
optional
|
|
157
|
-
optional
|
|
158
|
-
optional string user_id = 5;
|
|
159
|
-
optional int32 page = 6;
|
|
160
|
-
optional int32 page_size = 7;
|
|
161
|
-
optional string ordering = 8;
|
|
157
|
+
ExchangeCalculationsFiltersRequest filter = 2;
|
|
158
|
+
optional int32 page = 3;
|
|
159
|
+
optional int32 page_size = 4;
|
|
162
160
|
}
|
|
163
161
|
|
|
164
162
|
message GetExchangeDealsManager {
|
|
@@ -336,3 +334,27 @@ message GetTransactionsResponse {
|
|
|
336
334
|
message GetTransactionsSummaryResponse {
|
|
337
335
|
repeated GetTransactionsSummaryItem summary = 1;
|
|
338
336
|
}
|
|
337
|
+
|
|
338
|
+
message ExchangeCalculationsFiltersRequest {
|
|
339
|
+
optional string date_from = 1;
|
|
340
|
+
optional string date_to = 2;
|
|
341
|
+
optional double amount_from = 3;
|
|
342
|
+
optional double amount_to = 4;
|
|
343
|
+
optional string input_currency = 5;
|
|
344
|
+
optional string output_currency = 6;
|
|
345
|
+
optional string status = 7; // no_payment | with_payment | with_exchange | completed
|
|
346
|
+
optional string search = 8;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
message PaymentsSummaryItem {
|
|
350
|
+
string currency = 1;
|
|
351
|
+
double total = 2;
|
|
352
|
+
double paid = 3;
|
|
353
|
+
double unpaid = 4;
|
|
354
|
+
int32 percent = 5;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
message GetPaymentsSummaryResponse {
|
|
358
|
+
int32 with_payment_count = 1;
|
|
359
|
+
repeated PaymentsSummaryItem items = 2;
|
|
360
|
+
}
|
|
@@ -32,6 +32,7 @@ service ExchangeRatesService {
|
|
|
32
32
|
rpc CalculateExchange(CalculateExchangeRequest) returns (CalculateExchangeResponse);
|
|
33
33
|
rpc GetExchangeCalculation(GetExchangeCalculationRequest) returns (GetExchangeCalculationResponse);
|
|
34
34
|
rpc GetExchangeCalculationHistory(GetExchangeCalculationHistoryRequest) returns (GetExchangeCalculationHistoryResponse);
|
|
35
|
+
rpc GetExchangeCalculationStats(ExchangeCalculationFiltersRequest) returns (GetExchangeCalculationStatsResponse);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
message CurrencySetting {
|
|
@@ -293,6 +294,17 @@ message GetExchangeCalculationHistoryRequest {
|
|
|
293
294
|
optional int32 page_size = 10;
|
|
294
295
|
}
|
|
295
296
|
|
|
297
|
+
message ExchangeCalculationFiltersRequest {
|
|
298
|
+
optional string date_from = 1;
|
|
299
|
+
optional string date_to = 2;
|
|
300
|
+
optional double amount_from = 3;
|
|
301
|
+
optional double amount_to = 4;
|
|
302
|
+
optional string input_currency = 5;
|
|
303
|
+
optional string output_currency = 6;
|
|
304
|
+
optional string status = 7; // no_payment | with_payment | with_exchange | completed
|
|
305
|
+
optional string search = 8;
|
|
306
|
+
}
|
|
307
|
+
|
|
296
308
|
message ExchangeCalculationHistoryAppliedFilters {
|
|
297
309
|
optional string date_from = 1;
|
|
298
310
|
optional string date_to = 2;
|
|
@@ -361,3 +373,18 @@ message GetExchangeCalculationHistoryResponse {
|
|
|
361
373
|
optional ExchangeCalculationHistoryAppliedFilters filters = 4;
|
|
362
374
|
optional ExchangeCalculationHistoryPagination pagination = 5;
|
|
363
375
|
}
|
|
376
|
+
|
|
377
|
+
message CalculationsInputCurrencySummaryItem {
|
|
378
|
+
string currency = 1;
|
|
379
|
+
double total = 2;
|
|
380
|
+
double completed = 3;
|
|
381
|
+
double in_progress = 4;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
message GetExchangeCalculationStatsResponse {
|
|
385
|
+
int32 total_count = 1;
|
|
386
|
+
int32 unique_customers = 2;
|
|
387
|
+
int32 with_exchange_count = 3;
|
|
388
|
+
int32 completed_count = 4;
|
|
389
|
+
repeated CalculationsInputCurrencySummaryItem items = 5;
|
|
390
|
+
}
|