@arbiwallet/contracts 1.0.240 → 1.0.242
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 +10 -6
- package/gen/exchange_rates.ts +46 -0
- package/gen/referral.ts +66 -0
- package/package.json +1 -1
- package/proto/exchange_core.proto +12 -8
- package/proto/exchange_rates.proto +25 -0
- package/proto/referral.proto +42 -0
package/gen/exchange_core.ts
CHANGED
|
@@ -306,14 +306,18 @@ export interface GetExchangePaymentsRequest {
|
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
export interface GetExchangePaymentsItem {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
amount: number;
|
|
312
|
-
status: number;
|
|
313
|
-
paymentAgentStatus?: string | undefined;
|
|
314
|
-
paymentLink?: string | undefined;
|
|
309
|
+
id: string;
|
|
310
|
+
arbipayId: string;
|
|
315
311
|
qrLink?: string | undefined;
|
|
312
|
+
arbipayLink: string;
|
|
313
|
+
paymentAgent: number;
|
|
314
|
+
amount?: number | undefined;
|
|
315
|
+
amountUsdt?: number | undefined;
|
|
316
|
+
status: number;
|
|
316
317
|
cryptoAddress?: string | undefined;
|
|
318
|
+
createdAt: string;
|
|
319
|
+
customerName?: string | undefined;
|
|
320
|
+
managerName?: string | undefined;
|
|
317
321
|
}
|
|
318
322
|
|
|
319
323
|
export interface GetExchangePaymentsResponse {
|
package/gen/exchange_rates.ts
CHANGED
|
@@ -391,6 +391,28 @@ export interface GetExchangeCalculationStatsResponse {
|
|
|
391
391
|
items: CalculationsInputCurrencySummaryItem[];
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
+
export interface UpdateCalculationPaymentParamsRequest {
|
|
395
|
+
calculationId: string;
|
|
396
|
+
paymentId: string;
|
|
397
|
+
paymentIdStatus?: number | undefined;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export interface UpdateCalculationPaymentParamsResponse {
|
|
401
|
+
ok: boolean;
|
|
402
|
+
error?: string | undefined;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export interface UpdateCalculationDealParamsRequest {
|
|
406
|
+
calculationId: string;
|
|
407
|
+
exchangeDealId?: string | undefined;
|
|
408
|
+
exchangeDealStatus?: number | undefined;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export interface UpdateCalculationDealParamsResponse {
|
|
412
|
+
ok: boolean;
|
|
413
|
+
error?: string | undefined;
|
|
414
|
+
}
|
|
415
|
+
|
|
394
416
|
export const EXCHANGE_RATES_PACKAGE_NAME = "exchange_rates";
|
|
395
417
|
|
|
396
418
|
wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
|
|
@@ -435,6 +457,14 @@ export interface ExchangeRatesServiceClient {
|
|
|
435
457
|
getExchangeCalculationStats(
|
|
436
458
|
request: ExchangeCalculationFiltersRequest,
|
|
437
459
|
): Observable<GetExchangeCalculationStatsResponse>;
|
|
460
|
+
|
|
461
|
+
updateCalculationPaymentParams(
|
|
462
|
+
request: UpdateCalculationPaymentParamsRequest,
|
|
463
|
+
): Observable<UpdateCalculationPaymentParamsResponse>;
|
|
464
|
+
|
|
465
|
+
updateCalculationDealParams(
|
|
466
|
+
request: UpdateCalculationDealParamsRequest,
|
|
467
|
+
): Observable<UpdateCalculationDealParamsResponse>;
|
|
438
468
|
}
|
|
439
469
|
|
|
440
470
|
export interface ExchangeRatesServiceController {
|
|
@@ -518,6 +548,20 @@ export interface ExchangeRatesServiceController {
|
|
|
518
548
|
| Promise<GetExchangeCalculationStatsResponse>
|
|
519
549
|
| Observable<GetExchangeCalculationStatsResponse>
|
|
520
550
|
| GetExchangeCalculationStatsResponse;
|
|
551
|
+
|
|
552
|
+
updateCalculationPaymentParams(
|
|
553
|
+
request: UpdateCalculationPaymentParamsRequest,
|
|
554
|
+
):
|
|
555
|
+
| Promise<UpdateCalculationPaymentParamsResponse>
|
|
556
|
+
| Observable<UpdateCalculationPaymentParamsResponse>
|
|
557
|
+
| UpdateCalculationPaymentParamsResponse;
|
|
558
|
+
|
|
559
|
+
updateCalculationDealParams(
|
|
560
|
+
request: UpdateCalculationDealParamsRequest,
|
|
561
|
+
):
|
|
562
|
+
| Promise<UpdateCalculationDealParamsResponse>
|
|
563
|
+
| Observable<UpdateCalculationDealParamsResponse>
|
|
564
|
+
| UpdateCalculationDealParamsResponse;
|
|
521
565
|
}
|
|
522
566
|
|
|
523
567
|
export function ExchangeRatesServiceControllerMethods() {
|
|
@@ -541,6 +585,8 @@ export function ExchangeRatesServiceControllerMethods() {
|
|
|
541
585
|
"getExchangeCalculation",
|
|
542
586
|
"getExchangeCalculationHistory",
|
|
543
587
|
"getExchangeCalculationStats",
|
|
588
|
+
"updateCalculationPaymentParams",
|
|
589
|
+
"updateCalculationDealParams",
|
|
544
590
|
];
|
|
545
591
|
for (const method of grpcMethods) {
|
|
546
592
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/referral.ts
CHANGED
|
@@ -197,6 +197,28 @@ export interface ConfirmPayoutRequest {
|
|
|
197
197
|
confirmedByManagerId?: string | undefined;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
+
export interface UpdatePayoutRequest {
|
|
201
|
+
payoutId: string;
|
|
202
|
+
amount?: string | undefined;
|
|
203
|
+
currency?: string | undefined;
|
|
204
|
+
paymentMethod?: string | undefined;
|
|
205
|
+
outputCurrency?: string | undefined;
|
|
206
|
+
comment?: string | undefined;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface CancelPayoutRequest {
|
|
210
|
+
payoutId: string;
|
|
211
|
+
reason?: string | undefined;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface DeletePayoutRequest {
|
|
215
|
+
payoutId: string;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface DeletePayoutResponse {
|
|
219
|
+
deleted: boolean;
|
|
220
|
+
}
|
|
221
|
+
|
|
200
222
|
export interface ReferralPayoutResponse {
|
|
201
223
|
id: string;
|
|
202
224
|
profileId: string;
|
|
@@ -223,6 +245,22 @@ export interface ListPayoutsResponse {
|
|
|
223
245
|
limit: number;
|
|
224
246
|
}
|
|
225
247
|
|
|
248
|
+
export interface RecreatedBalanceItem {
|
|
249
|
+
currency: string;
|
|
250
|
+
amount: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface RecreateBonusesRequest {
|
|
254
|
+
walletUserId: string;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface RecreateBonusesResponse {
|
|
258
|
+
success: boolean;
|
|
259
|
+
commissionsCount: number;
|
|
260
|
+
payoutsCount: number;
|
|
261
|
+
balances: RecreatedBalanceItem[];
|
|
262
|
+
}
|
|
263
|
+
|
|
226
264
|
export interface AdminRecalculateExchangeRequest {
|
|
227
265
|
exchangeId: string;
|
|
228
266
|
dryRun: boolean;
|
|
@@ -261,8 +299,16 @@ export interface ReferralServiceClient {
|
|
|
261
299
|
|
|
262
300
|
confirmPayout(request: ConfirmPayoutRequest): Observable<ReferralPayoutResponse>;
|
|
263
301
|
|
|
302
|
+
updatePayout(request: UpdatePayoutRequest): Observable<ReferralPayoutResponse>;
|
|
303
|
+
|
|
304
|
+
cancelPayout(request: CancelPayoutRequest): Observable<ReferralPayoutResponse>;
|
|
305
|
+
|
|
306
|
+
deletePayout(request: DeletePayoutRequest): Observable<DeletePayoutResponse>;
|
|
307
|
+
|
|
264
308
|
listPayouts(request: ListPayoutsRequest): Observable<ListPayoutsResponse>;
|
|
265
309
|
|
|
310
|
+
recreateBonuses(request: RecreateBonusesRequest): Observable<RecreateBonusesResponse>;
|
|
311
|
+
|
|
266
312
|
adminRecalculateExchange(request: AdminRecalculateExchangeRequest): Observable<AdminRecalculateExchangeResponse>;
|
|
267
313
|
}
|
|
268
314
|
|
|
@@ -318,10 +364,26 @@ export interface ReferralServiceController {
|
|
|
318
364
|
request: ConfirmPayoutRequest,
|
|
319
365
|
): Promise<ReferralPayoutResponse> | Observable<ReferralPayoutResponse> | ReferralPayoutResponse;
|
|
320
366
|
|
|
367
|
+
updatePayout(
|
|
368
|
+
request: UpdatePayoutRequest,
|
|
369
|
+
): Promise<ReferralPayoutResponse> | Observable<ReferralPayoutResponse> | ReferralPayoutResponse;
|
|
370
|
+
|
|
371
|
+
cancelPayout(
|
|
372
|
+
request: CancelPayoutRequest,
|
|
373
|
+
): Promise<ReferralPayoutResponse> | Observable<ReferralPayoutResponse> | ReferralPayoutResponse;
|
|
374
|
+
|
|
375
|
+
deletePayout(
|
|
376
|
+
request: DeletePayoutRequest,
|
|
377
|
+
): Promise<DeletePayoutResponse> | Observable<DeletePayoutResponse> | DeletePayoutResponse;
|
|
378
|
+
|
|
321
379
|
listPayouts(
|
|
322
380
|
request: ListPayoutsRequest,
|
|
323
381
|
): Promise<ListPayoutsResponse> | Observable<ListPayoutsResponse> | ListPayoutsResponse;
|
|
324
382
|
|
|
383
|
+
recreateBonuses(
|
|
384
|
+
request: RecreateBonusesRequest,
|
|
385
|
+
): Promise<RecreateBonusesResponse> | Observable<RecreateBonusesResponse> | RecreateBonusesResponse;
|
|
386
|
+
|
|
325
387
|
adminRecalculateExchange(
|
|
326
388
|
request: AdminRecalculateExchangeRequest,
|
|
327
389
|
):
|
|
@@ -343,7 +405,11 @@ export function ReferralServiceControllerMethods() {
|
|
|
343
405
|
"listCommissions",
|
|
344
406
|
"createPayout",
|
|
345
407
|
"confirmPayout",
|
|
408
|
+
"updatePayout",
|
|
409
|
+
"cancelPayout",
|
|
410
|
+
"deletePayout",
|
|
346
411
|
"listPayouts",
|
|
412
|
+
"recreateBonuses",
|
|
347
413
|
"adminRecalculateExchange",
|
|
348
414
|
];
|
|
349
415
|
for (const method of grpcMethods) {
|
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.242",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
|
@@ -333,14 +333,18 @@ message GetExchangePaymentsRequest {
|
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
message GetExchangePaymentsItem {
|
|
336
|
-
string
|
|
337
|
-
string
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
optional
|
|
342
|
-
optional
|
|
343
|
-
|
|
336
|
+
string id = 1;
|
|
337
|
+
string arbipay_id = 2;
|
|
338
|
+
optional string qr_link = 3;
|
|
339
|
+
string arbipay_link = 4;
|
|
340
|
+
int32 payment_agent = 5;
|
|
341
|
+
optional double amount = 6;
|
|
342
|
+
optional double amount_usdt = 7;
|
|
343
|
+
int32 status = 8;
|
|
344
|
+
optional string crypto_address = 9;
|
|
345
|
+
string created_at = 10;
|
|
346
|
+
optional string customer_name = 11;
|
|
347
|
+
optional string manager_name = 12;
|
|
344
348
|
}
|
|
345
349
|
|
|
346
350
|
message GetExchangePaymentsResponse {
|
|
@@ -33,6 +33,9 @@ service ExchangeRatesService {
|
|
|
33
33
|
rpc GetExchangeCalculation(GetExchangeCalculationRequest) returns (GetExchangeCalculationResponse);
|
|
34
34
|
rpc GetExchangeCalculationHistory(GetExchangeCalculationHistoryRequest) returns (GetExchangeCalculationHistoryResponse);
|
|
35
35
|
rpc GetExchangeCalculationStats(ExchangeCalculationFiltersRequest) returns (GetExchangeCalculationStatsResponse);
|
|
36
|
+
|
|
37
|
+
rpc UpdateCalculationPaymentParams(UpdateCalculationPaymentParamsRequest) returns (UpdateCalculationPaymentParamsResponse);
|
|
38
|
+
rpc UpdateCalculationDealParams(UpdateCalculationDealParamsRequest) returns (UpdateCalculationDealParamsResponse);
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
message CurrencySetting {
|
|
@@ -401,3 +404,25 @@ message GetExchangeCalculationStatsResponse {
|
|
|
401
404
|
int32 completed_count = 4;
|
|
402
405
|
repeated CalculationsInputCurrencySummaryItem items = 5;
|
|
403
406
|
}
|
|
407
|
+
|
|
408
|
+
message UpdateCalculationPaymentParamsRequest {
|
|
409
|
+
string calculation_id = 1;
|
|
410
|
+
string payment_id = 2;
|
|
411
|
+
optional int32 payment_id_status = 3;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
message UpdateCalculationPaymentParamsResponse {
|
|
415
|
+
bool ok = 1;
|
|
416
|
+
optional string error = 2;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
message UpdateCalculationDealParamsRequest {
|
|
420
|
+
string calculation_id = 1;
|
|
421
|
+
optional string exchange_deal_id = 2;
|
|
422
|
+
optional int32 exchange_deal_status = 3;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
message UpdateCalculationDealParamsResponse {
|
|
426
|
+
bool ok = 1;
|
|
427
|
+
optional string error = 2;
|
|
428
|
+
}
|
package/proto/referral.proto
CHANGED
|
@@ -15,7 +15,11 @@ service ReferralService {
|
|
|
15
15
|
rpc ListCommissions(ListCommissionsRequest) returns (ListCommissionsResponse);
|
|
16
16
|
rpc CreatePayout(CreatePayoutRequest) returns (ReferralPayoutResponse);
|
|
17
17
|
rpc ConfirmPayout(ConfirmPayoutRequest) returns (ReferralPayoutResponse);
|
|
18
|
+
rpc UpdatePayout(UpdatePayoutRequest) returns (ReferralPayoutResponse);
|
|
19
|
+
rpc CancelPayout(CancelPayoutRequest) returns (ReferralPayoutResponse);
|
|
20
|
+
rpc DeletePayout(DeletePayoutRequest) returns (DeletePayoutResponse);
|
|
18
21
|
rpc ListPayouts(ListPayoutsRequest) returns (ListPayoutsResponse);
|
|
22
|
+
rpc RecreateBonuses(RecreateBonusesRequest) returns (RecreateBonusesResponse);
|
|
19
23
|
rpc AdminRecalculateExchange(AdminRecalculateExchangeRequest) returns (AdminRecalculateExchangeResponse);
|
|
20
24
|
}
|
|
21
25
|
|
|
@@ -202,6 +206,28 @@ message ConfirmPayoutRequest {
|
|
|
202
206
|
optional string confirmed_by_manager_id = 2;
|
|
203
207
|
}
|
|
204
208
|
|
|
209
|
+
message UpdatePayoutRequest {
|
|
210
|
+
string payout_id = 1;
|
|
211
|
+
optional string amount = 2;
|
|
212
|
+
optional string currency = 3;
|
|
213
|
+
optional string payment_method = 4;
|
|
214
|
+
optional string output_currency = 5;
|
|
215
|
+
optional string comment = 6;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
message CancelPayoutRequest {
|
|
219
|
+
string payout_id = 1;
|
|
220
|
+
optional string reason = 2;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
message DeletePayoutRequest {
|
|
224
|
+
string payout_id = 1;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
message DeletePayoutResponse {
|
|
228
|
+
bool deleted = 1;
|
|
229
|
+
}
|
|
230
|
+
|
|
205
231
|
message ReferralPayoutResponse {
|
|
206
232
|
string id = 1;
|
|
207
233
|
string profile_id = 2;
|
|
@@ -228,6 +254,22 @@ message ListPayoutsResponse {
|
|
|
228
254
|
int32 limit = 4;
|
|
229
255
|
}
|
|
230
256
|
|
|
257
|
+
message RecreatedBalanceItem {
|
|
258
|
+
string currency = 1;
|
|
259
|
+
string amount = 2;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
message RecreateBonusesRequest {
|
|
263
|
+
string wallet_user_id = 1;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
message RecreateBonusesResponse {
|
|
267
|
+
bool success = 1;
|
|
268
|
+
int32 commissions_count = 2;
|
|
269
|
+
int32 payouts_count = 3;
|
|
270
|
+
repeated RecreatedBalanceItem balances = 4;
|
|
271
|
+
}
|
|
272
|
+
|
|
231
273
|
message AdminRecalculateExchangeRequest {
|
|
232
274
|
string exchange_id = 1;
|
|
233
275
|
bool dry_run = 2;
|