@arbiwallet/contracts 1.0.227 → 1.0.228
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 +50 -5
- package/gen/exchange_rates.ts +51 -0
- package/package.json +1 -1
- package/proto/exchange_core.proto +35 -7
- package/proto/exchange_rates.proto +32 -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,38 @@ 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
|
+
|
|
275
|
+
export interface GetExchangeDealsCountsResponse {
|
|
276
|
+
withExchangeCount: number;
|
|
277
|
+
completedCount: number;
|
|
278
|
+
}
|
|
279
|
+
|
|
252
280
|
export const EXCHANGE_CORE_PACKAGE_NAME = "exchange_core";
|
|
253
281
|
|
|
254
282
|
wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
|
|
@@ -273,6 +301,10 @@ export interface ExchangeCoreServiceClient {
|
|
|
273
301
|
getTransactions(request: GetTransactionsRequest): Observable<GetTransactionsResponse>;
|
|
274
302
|
|
|
275
303
|
getTransactionsSummary(request: GetTransactionsSummaryRequest): Observable<GetTransactionsSummaryResponse>;
|
|
304
|
+
|
|
305
|
+
getPaymentsSummary(request: ExchangeCalculationsFiltersRequest): Observable<GetPaymentsSummaryResponse>;
|
|
306
|
+
|
|
307
|
+
getExchangeDealsCounts(request: ExchangeCalculationsFiltersRequest): Observable<GetExchangeDealsCountsResponse>;
|
|
276
308
|
}
|
|
277
309
|
|
|
278
310
|
/**
|
|
@@ -312,6 +344,17 @@ export interface ExchangeCoreServiceController {
|
|
|
312
344
|
| Promise<GetTransactionsSummaryResponse>
|
|
313
345
|
| Observable<GetTransactionsSummaryResponse>
|
|
314
346
|
| GetTransactionsSummaryResponse;
|
|
347
|
+
|
|
348
|
+
getPaymentsSummary(
|
|
349
|
+
request: ExchangeCalculationsFiltersRequest,
|
|
350
|
+
): Promise<GetPaymentsSummaryResponse> | Observable<GetPaymentsSummaryResponse> | GetPaymentsSummaryResponse;
|
|
351
|
+
|
|
352
|
+
getExchangeDealsCounts(
|
|
353
|
+
request: ExchangeCalculationsFiltersRequest,
|
|
354
|
+
):
|
|
355
|
+
| Promise<GetExchangeDealsCountsResponse>
|
|
356
|
+
| Observable<GetExchangeDealsCountsResponse>
|
|
357
|
+
| GetExchangeDealsCountsResponse;
|
|
315
358
|
}
|
|
316
359
|
|
|
317
360
|
export function ExchangeCoreServiceControllerMethods() {
|
|
@@ -324,6 +367,8 @@ export function ExchangeCoreServiceControllerMethods() {
|
|
|
324
367
|
"cancelExchangeDeal",
|
|
325
368
|
"getTransactions",
|
|
326
369
|
"getTransactionsSummary",
|
|
370
|
+
"getPaymentsSummary",
|
|
371
|
+
"getExchangeDealsCounts",
|
|
327
372
|
];
|
|
328
373
|
for (const method of grpcMethods) {
|
|
329
374
|
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,24 @@ export interface GetExchangeCalculationHistoryResponse {
|
|
|
350
364
|
pagination?: ExchangeCalculationHistoryPagination | undefined;
|
|
351
365
|
}
|
|
352
366
|
|
|
367
|
+
export interface GetCalculationCountsResponse {
|
|
368
|
+
totalCount: number;
|
|
369
|
+
uniqueCustomers: number;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export interface CalculationsInputCurrencySummaryItem {
|
|
373
|
+
currency: string;
|
|
374
|
+
total: number;
|
|
375
|
+
completed: number;
|
|
376
|
+
inProgress: number;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export interface GetCalculationsInputCurrencySummaryResponse {
|
|
380
|
+
withExchangeCount: number;
|
|
381
|
+
completedCount: number;
|
|
382
|
+
items: CalculationsInputCurrencySummaryItem[];
|
|
383
|
+
}
|
|
384
|
+
|
|
353
385
|
export const EXCHANGE_RATES_PACKAGE_NAME = "exchange_rates";
|
|
354
386
|
|
|
355
387
|
wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
|
|
@@ -390,6 +422,12 @@ export interface ExchangeRatesServiceClient {
|
|
|
390
422
|
getExchangeCalculationHistory(
|
|
391
423
|
request: GetExchangeCalculationHistoryRequest,
|
|
392
424
|
): Observable<GetExchangeCalculationHistoryResponse>;
|
|
425
|
+
|
|
426
|
+
getCalculationCounts(request: ExchangeCalculationFiltersRequest): Observable<GetCalculationCountsResponse>;
|
|
427
|
+
|
|
428
|
+
getCalculationsInputCurrencySummary(
|
|
429
|
+
request: ExchangeCalculationFiltersRequest,
|
|
430
|
+
): Observable<GetCalculationsInputCurrencySummaryResponse>;
|
|
393
431
|
}
|
|
394
432
|
|
|
395
433
|
export interface ExchangeRatesServiceController {
|
|
@@ -466,6 +504,17 @@ export interface ExchangeRatesServiceController {
|
|
|
466
504
|
| Promise<GetExchangeCalculationHistoryResponse>
|
|
467
505
|
| Observable<GetExchangeCalculationHistoryResponse>
|
|
468
506
|
| GetExchangeCalculationHistoryResponse;
|
|
507
|
+
|
|
508
|
+
getCalculationCounts(
|
|
509
|
+
request: ExchangeCalculationFiltersRequest,
|
|
510
|
+
): Promise<GetCalculationCountsResponse> | Observable<GetCalculationCountsResponse> | GetCalculationCountsResponse;
|
|
511
|
+
|
|
512
|
+
getCalculationsInputCurrencySummary(
|
|
513
|
+
request: ExchangeCalculationFiltersRequest,
|
|
514
|
+
):
|
|
515
|
+
| Promise<GetCalculationsInputCurrencySummaryResponse>
|
|
516
|
+
| Observable<GetCalculationsInputCurrencySummaryResponse>
|
|
517
|
+
| GetCalculationsInputCurrencySummaryResponse;
|
|
469
518
|
}
|
|
470
519
|
|
|
471
520
|
export function ExchangeRatesServiceControllerMethods() {
|
|
@@ -488,6 +537,8 @@ export function ExchangeRatesServiceControllerMethods() {
|
|
|
488
537
|
"calculateExchange",
|
|
489
538
|
"getExchangeCalculation",
|
|
490
539
|
"getExchangeCalculationHistory",
|
|
540
|
+
"getCalculationCounts",
|
|
541
|
+
"getCalculationsInputCurrencySummary",
|
|
491
542
|
];
|
|
492
543
|
for (const method of grpcMethods) {
|
|
493
544
|
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.228",
|
|
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,9 @@ 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);
|
|
26
|
+
rpc GetExchangeDealsCounts(ExchangeCalculationsFiltersRequest) returns (GetExchangeDealsCountsResponse);
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
// message CreateExchangePaymentRequest {
|
|
@@ -152,13 +155,9 @@ message CreateExchangeDealResponse {
|
|
|
152
155
|
|
|
153
156
|
message GetExchangeDealsRequest {
|
|
154
157
|
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;
|
|
158
|
+
ExchangeCalculationsFiltersRequest filter = 2;
|
|
159
|
+
optional int32 page = 3;
|
|
160
|
+
optional int32 page_size = 4;
|
|
162
161
|
}
|
|
163
162
|
|
|
164
163
|
message GetExchangeDealsManager {
|
|
@@ -336,3 +335,32 @@ message GetTransactionsResponse {
|
|
|
336
335
|
message GetTransactionsSummaryResponse {
|
|
337
336
|
repeated GetTransactionsSummaryItem summary = 1;
|
|
338
337
|
}
|
|
338
|
+
|
|
339
|
+
message ExchangeCalculationsFiltersRequest {
|
|
340
|
+
optional string date_from = 1;
|
|
341
|
+
optional string date_to = 2;
|
|
342
|
+
optional double amount_from = 3;
|
|
343
|
+
optional double amount_to = 4;
|
|
344
|
+
optional string input_currency = 5;
|
|
345
|
+
optional string output_currency = 6;
|
|
346
|
+
optional string status = 7; // no_payment | with_payment | with_exchange | completed
|
|
347
|
+
optional string search = 8;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
message PaymentsSummaryItem {
|
|
351
|
+
string currency = 1;
|
|
352
|
+
double total = 2;
|
|
353
|
+
double paid = 3;
|
|
354
|
+
double unpaid = 4;
|
|
355
|
+
int32 percent = 5;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
message GetPaymentsSummaryResponse {
|
|
359
|
+
int32 with_payment_count = 1;
|
|
360
|
+
repeated PaymentsSummaryItem items = 2;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
message GetExchangeDealsCountsResponse {
|
|
364
|
+
int32 with_exchange_count = 1;
|
|
365
|
+
int32 completed_count = 2;
|
|
366
|
+
}
|
|
@@ -32,6 +32,9 @@ service ExchangeRatesService {
|
|
|
32
32
|
rpc CalculateExchange(CalculateExchangeRequest) returns (CalculateExchangeResponse);
|
|
33
33
|
rpc GetExchangeCalculation(GetExchangeCalculationRequest) returns (GetExchangeCalculationResponse);
|
|
34
34
|
rpc GetExchangeCalculationHistory(GetExchangeCalculationHistoryRequest) returns (GetExchangeCalculationHistoryResponse);
|
|
35
|
+
|
|
36
|
+
rpc GetCalculationCounts(ExchangeCalculationFiltersRequest) returns (GetCalculationCountsResponse);
|
|
37
|
+
rpc GetCalculationsInputCurrencySummary(ExchangeCalculationFiltersRequest) returns (GetCalculationsInputCurrencySummaryResponse);
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
message CurrencySetting {
|
|
@@ -293,6 +296,17 @@ message GetExchangeCalculationHistoryRequest {
|
|
|
293
296
|
optional int32 page_size = 10;
|
|
294
297
|
}
|
|
295
298
|
|
|
299
|
+
message ExchangeCalculationFiltersRequest {
|
|
300
|
+
optional string date_from = 1;
|
|
301
|
+
optional string date_to = 2;
|
|
302
|
+
optional double amount_from = 3;
|
|
303
|
+
optional double amount_to = 4;
|
|
304
|
+
optional string input_currency = 5;
|
|
305
|
+
optional string output_currency = 6;
|
|
306
|
+
optional string status = 7; // no_payment | with_payment | with_exchange | completed
|
|
307
|
+
optional string search = 8;
|
|
308
|
+
}
|
|
309
|
+
|
|
296
310
|
message ExchangeCalculationHistoryAppliedFilters {
|
|
297
311
|
optional string date_from = 1;
|
|
298
312
|
optional string date_to = 2;
|
|
@@ -361,3 +375,21 @@ message GetExchangeCalculationHistoryResponse {
|
|
|
361
375
|
optional ExchangeCalculationHistoryAppliedFilters filters = 4;
|
|
362
376
|
optional ExchangeCalculationHistoryPagination pagination = 5;
|
|
363
377
|
}
|
|
378
|
+
|
|
379
|
+
message GetCalculationCountsResponse {
|
|
380
|
+
int32 total_count = 1;
|
|
381
|
+
int32 unique_customers = 2;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
message CalculationsInputCurrencySummaryItem {
|
|
385
|
+
string currency = 1;
|
|
386
|
+
double total = 2;
|
|
387
|
+
double completed = 3;
|
|
388
|
+
double in_progress = 4;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
message GetCalculationsInputCurrencySummaryResponse {
|
|
392
|
+
int32 with_exchange_count = 1;
|
|
393
|
+
int32 completed_count = 2;
|
|
394
|
+
repeated CalculationsInputCurrencySummaryItem items = 3;
|
|
395
|
+
}
|