@arbiwallet/contracts 1.0.226 → 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 +84 -11
- package/gen/exchange_rates.ts +51 -0
- package/package.json +1 -1
- package/proto/exchange_core.proto +60 -13
- 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 {
|
|
@@ -190,12 +186,6 @@ export interface GetTransactionsRequest {
|
|
|
190
186
|
pageSize?: number | undefined;
|
|
191
187
|
}
|
|
192
188
|
|
|
193
|
-
export interface GetTransactionsSummaryItem {
|
|
194
|
-
currency: string;
|
|
195
|
-
totalIncome: number;
|
|
196
|
-
totalExpense: number;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
189
|
export interface GetTransactionsItem {
|
|
200
190
|
id: string;
|
|
201
191
|
transactionDatetime: string;
|
|
@@ -223,6 +213,26 @@ export interface GetTransactionsItem {
|
|
|
223
213
|
accountType: number;
|
|
224
214
|
}
|
|
225
215
|
|
|
216
|
+
export interface GetTransactionsSummaryRequest {
|
|
217
|
+
authManagerContext: AuthManagerContext | undefined;
|
|
218
|
+
startDate?: string | undefined;
|
|
219
|
+
endDate?: string | undefined;
|
|
220
|
+
userId?: string | undefined;
|
|
221
|
+
currencyId?: string | undefined;
|
|
222
|
+
walletId?: string | undefined;
|
|
223
|
+
type?: number | undefined;
|
|
224
|
+
accountType?: number | undefined;
|
|
225
|
+
categoryId?: string | undefined;
|
|
226
|
+
businessUnitId?: string | undefined;
|
|
227
|
+
search?: string | undefined;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface GetTransactionsSummaryItem {
|
|
231
|
+
currency: string;
|
|
232
|
+
totalIncome: number;
|
|
233
|
+
totalExpense: number;
|
|
234
|
+
}
|
|
235
|
+
|
|
226
236
|
export interface GetTransactionsResponse {
|
|
227
237
|
count: number;
|
|
228
238
|
next?: string | undefined;
|
|
@@ -231,6 +241,42 @@ export interface GetTransactionsResponse {
|
|
|
231
241
|
summary: GetTransactionsSummaryItem[];
|
|
232
242
|
}
|
|
233
243
|
|
|
244
|
+
export interface GetTransactionsSummaryResponse {
|
|
245
|
+
summary: GetTransactionsSummaryItem[];
|
|
246
|
+
}
|
|
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
|
+
|
|
234
280
|
export const EXCHANGE_CORE_PACKAGE_NAME = "exchange_core";
|
|
235
281
|
|
|
236
282
|
wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
|
|
@@ -253,6 +299,12 @@ export interface ExchangeCoreServiceClient {
|
|
|
253
299
|
cancelExchangeDeal(request: CancelExchangeDealRequest): Observable<CancelExchangeDealResponse>;
|
|
254
300
|
|
|
255
301
|
getTransactions(request: GetTransactionsRequest): Observable<GetTransactionsResponse>;
|
|
302
|
+
|
|
303
|
+
getTransactionsSummary(request: GetTransactionsSummaryRequest): Observable<GetTransactionsSummaryResponse>;
|
|
304
|
+
|
|
305
|
+
getPaymentsSummary(request: ExchangeCalculationsFiltersRequest): Observable<GetPaymentsSummaryResponse>;
|
|
306
|
+
|
|
307
|
+
getExchangeDealsCounts(request: ExchangeCalculationsFiltersRequest): Observable<GetExchangeDealsCountsResponse>;
|
|
256
308
|
}
|
|
257
309
|
|
|
258
310
|
/**
|
|
@@ -285,6 +337,24 @@ export interface ExchangeCoreServiceController {
|
|
|
285
337
|
getTransactions(
|
|
286
338
|
request: GetTransactionsRequest,
|
|
287
339
|
): Promise<GetTransactionsResponse> | Observable<GetTransactionsResponse> | GetTransactionsResponse;
|
|
340
|
+
|
|
341
|
+
getTransactionsSummary(
|
|
342
|
+
request: GetTransactionsSummaryRequest,
|
|
343
|
+
):
|
|
344
|
+
| Promise<GetTransactionsSummaryResponse>
|
|
345
|
+
| Observable<GetTransactionsSummaryResponse>
|
|
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;
|
|
288
358
|
}
|
|
289
359
|
|
|
290
360
|
export function ExchangeCoreServiceControllerMethods() {
|
|
@@ -296,6 +366,9 @@ export function ExchangeCoreServiceControllerMethods() {
|
|
|
296
366
|
"completeExchangeDeal",
|
|
297
367
|
"cancelExchangeDeal",
|
|
298
368
|
"getTransactions",
|
|
369
|
+
"getTransactionsSummary",
|
|
370
|
+
"getPaymentsSummary",
|
|
371
|
+
"getExchangeDealsCounts",
|
|
299
372
|
];
|
|
300
373
|
for (const method of grpcMethods) {
|
|
301
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
|
},
|
|
@@ -20,6 +20,10 @@ service ExchangeCoreService {
|
|
|
20
20
|
rpc CancelExchangeDeal(CancelExchangeDealRequest) returns (CancelExchangeDealResponse);
|
|
21
21
|
|
|
22
22
|
rpc GetTransactions(GetTransactionsRequest) returns (GetTransactionsResponse);
|
|
23
|
+
rpc GetTransactionsSummary(GetTransactionsSummaryRequest) returns (GetTransactionsSummaryResponse);
|
|
24
|
+
|
|
25
|
+
rpc GetPaymentsSummary(ExchangeCalculationsFiltersRequest) returns (GetPaymentsSummaryResponse);
|
|
26
|
+
rpc GetExchangeDealsCounts(ExchangeCalculationsFiltersRequest) returns (GetExchangeDealsCountsResponse);
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
// message CreateExchangePaymentRequest {
|
|
@@ -151,13 +155,9 @@ message CreateExchangeDealResponse {
|
|
|
151
155
|
|
|
152
156
|
message GetExchangeDealsRequest {
|
|
153
157
|
AuthManagerContext auth_manager_context = 1;
|
|
154
|
-
|
|
155
|
-
optional
|
|
156
|
-
optional
|
|
157
|
-
optional string user_id = 5;
|
|
158
|
-
optional int32 page = 6;
|
|
159
|
-
optional int32 page_size = 7;
|
|
160
|
-
optional string ordering = 8;
|
|
158
|
+
ExchangeCalculationsFiltersRequest filter = 2;
|
|
159
|
+
optional int32 page = 3;
|
|
160
|
+
optional int32 page_size = 4;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
message GetExchangeDealsManager {
|
|
@@ -277,12 +277,6 @@ message GetTransactionsRequest {
|
|
|
277
277
|
optional int32 page_size = 13;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
message GetTransactionsSummaryItem {
|
|
281
|
-
string currency = 1;
|
|
282
|
-
double total_income = 2;
|
|
283
|
-
double total_expense = 3;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
280
|
message GetTransactionsItem {
|
|
287
281
|
string id = 1;
|
|
288
282
|
string transaction_datetime = 2;
|
|
@@ -310,6 +304,26 @@ message GetTransactionsItem {
|
|
|
310
304
|
int32 account_type = 24;
|
|
311
305
|
}
|
|
312
306
|
|
|
307
|
+
message GetTransactionsSummaryRequest {
|
|
308
|
+
AuthManagerContext auth_manager_context = 1;
|
|
309
|
+
optional string start_date = 2;
|
|
310
|
+
optional string end_date = 3;
|
|
311
|
+
optional string user_id = 4;
|
|
312
|
+
optional string currency_id = 5;
|
|
313
|
+
optional string wallet_id = 6;
|
|
314
|
+
optional int32 type = 7;
|
|
315
|
+
optional int32 account_type = 8;
|
|
316
|
+
optional string category_id = 9;
|
|
317
|
+
optional string business_unit_id = 10;
|
|
318
|
+
optional string search = 11;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
message GetTransactionsSummaryItem {
|
|
322
|
+
string currency = 1;
|
|
323
|
+
double total_income = 2;
|
|
324
|
+
double total_expense = 3;
|
|
325
|
+
}
|
|
326
|
+
|
|
313
327
|
message GetTransactionsResponse {
|
|
314
328
|
int32 count = 1;
|
|
315
329
|
optional string next = 2;
|
|
@@ -317,3 +331,36 @@ message GetTransactionsResponse {
|
|
|
317
331
|
repeated GetTransactionsItem results = 4;
|
|
318
332
|
repeated GetTransactionsSummaryItem summary = 5;
|
|
319
333
|
}
|
|
334
|
+
|
|
335
|
+
message GetTransactionsSummaryResponse {
|
|
336
|
+
repeated GetTransactionsSummaryItem summary = 1;
|
|
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
|
+
}
|