@arbiwallet/contracts 1.0.293 → 1.0.294
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/referral.ts +69 -0
- package/package.json +1 -1
- package/proto/referral.proto +46 -0
package/gen/referral.ts
CHANGED
|
@@ -215,6 +215,15 @@ export interface BatchGetExchangeReferralSummariesResponse {
|
|
|
215
215
|
summaries: ExchangeReferralSummary[];
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
export interface BatchGetCommissionsByExchangeIdsRequest {
|
|
219
|
+
walletUserId: string;
|
|
220
|
+
exchangeIds: string[];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface BatchGetCommissionsByExchangeIdsResponse {
|
|
224
|
+
items: ReferralCommissionItem[];
|
|
225
|
+
}
|
|
226
|
+
|
|
218
227
|
export interface ApplyExchangeCompletedRequest {
|
|
219
228
|
exchangeId: string;
|
|
220
229
|
walletUserId: string;
|
|
@@ -275,6 +284,40 @@ export interface ListCommissionsResponse {
|
|
|
275
284
|
limit: number;
|
|
276
285
|
}
|
|
277
286
|
|
|
287
|
+
export interface CreatePersonalBonusRequest {
|
|
288
|
+
walletUserId: string;
|
|
289
|
+
amount: string;
|
|
290
|
+
currency: string;
|
|
291
|
+
reason?: string | undefined;
|
|
292
|
+
comment?: string | undefined;
|
|
293
|
+
createdBy?: string | undefined;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface PersonalBonusItem {
|
|
297
|
+
id: number;
|
|
298
|
+
profileId: number;
|
|
299
|
+
amount: string;
|
|
300
|
+
currency: string;
|
|
301
|
+
reason?: string | undefined;
|
|
302
|
+
comment?: string | undefined;
|
|
303
|
+
createdBy?: string | undefined;
|
|
304
|
+
createdAt: string;
|
|
305
|
+
updatedAt: string;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export interface ListPersonalBonusesRequest {
|
|
309
|
+
walletUserId: string;
|
|
310
|
+
page?: number | undefined;
|
|
311
|
+
limit?: number | undefined;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export interface ListPersonalBonusesResponse {
|
|
315
|
+
items: PersonalBonusItem[];
|
|
316
|
+
total: number;
|
|
317
|
+
page: number;
|
|
318
|
+
limit: number;
|
|
319
|
+
}
|
|
320
|
+
|
|
278
321
|
export interface CreatePayoutRequest {
|
|
279
322
|
walletUserId: string;
|
|
280
323
|
amount: string;
|
|
@@ -408,12 +451,20 @@ export interface ReferralServiceClient {
|
|
|
408
451
|
request: BatchGetExchangeReferralSummariesRequest,
|
|
409
452
|
): Observable<BatchGetExchangeReferralSummariesResponse>;
|
|
410
453
|
|
|
454
|
+
batchGetCommissionsByExchangeIds(
|
|
455
|
+
request: BatchGetCommissionsByExchangeIdsRequest,
|
|
456
|
+
): Observable<BatchGetCommissionsByExchangeIdsResponse>;
|
|
457
|
+
|
|
411
458
|
applyExchangeCompleted(request: ApplyExchangeCompletedRequest): Observable<ApplyExchangeCompletedResponse>;
|
|
412
459
|
|
|
413
460
|
applyExchangeCancelled(request: ApplyExchangeCancelledRequest): Observable<ApplyExchangeCancelledResponse>;
|
|
414
461
|
|
|
415
462
|
listCommissions(request: ListCommissionsRequest): Observable<ListCommissionsResponse>;
|
|
416
463
|
|
|
464
|
+
createPersonalBonus(request: CreatePersonalBonusRequest): Observable<PersonalBonusItem>;
|
|
465
|
+
|
|
466
|
+
listPersonalBonuses(request: ListPersonalBonusesRequest): Observable<ListPersonalBonusesResponse>;
|
|
467
|
+
|
|
417
468
|
createPayout(request: CreatePayoutRequest): Observable<ReferralPayoutResponse>;
|
|
418
469
|
|
|
419
470
|
confirmPayout(request: ConfirmPayoutRequest): Observable<ReferralPayoutResponse>;
|
|
@@ -500,6 +551,13 @@ export interface ReferralServiceController {
|
|
|
500
551
|
| Observable<BatchGetExchangeReferralSummariesResponse>
|
|
501
552
|
| BatchGetExchangeReferralSummariesResponse;
|
|
502
553
|
|
|
554
|
+
batchGetCommissionsByExchangeIds(
|
|
555
|
+
request: BatchGetCommissionsByExchangeIdsRequest,
|
|
556
|
+
):
|
|
557
|
+
| Promise<BatchGetCommissionsByExchangeIdsResponse>
|
|
558
|
+
| Observable<BatchGetCommissionsByExchangeIdsResponse>
|
|
559
|
+
| BatchGetCommissionsByExchangeIdsResponse;
|
|
560
|
+
|
|
503
561
|
applyExchangeCompleted(
|
|
504
562
|
request: ApplyExchangeCompletedRequest,
|
|
505
563
|
):
|
|
@@ -518,6 +576,14 @@ export interface ReferralServiceController {
|
|
|
518
576
|
request: ListCommissionsRequest,
|
|
519
577
|
): Promise<ListCommissionsResponse> | Observable<ListCommissionsResponse> | ListCommissionsResponse;
|
|
520
578
|
|
|
579
|
+
createPersonalBonus(
|
|
580
|
+
request: CreatePersonalBonusRequest,
|
|
581
|
+
): Promise<PersonalBonusItem> | Observable<PersonalBonusItem> | PersonalBonusItem;
|
|
582
|
+
|
|
583
|
+
listPersonalBonuses(
|
|
584
|
+
request: ListPersonalBonusesRequest,
|
|
585
|
+
): Promise<ListPersonalBonusesResponse> | Observable<ListPersonalBonusesResponse> | ListPersonalBonusesResponse;
|
|
586
|
+
|
|
521
587
|
createPayout(
|
|
522
588
|
request: CreatePayoutRequest,
|
|
523
589
|
): Promise<ReferralPayoutResponse> | Observable<ReferralPayoutResponse> | ReferralPayoutResponse;
|
|
@@ -568,9 +634,12 @@ export function ReferralServiceControllerMethods() {
|
|
|
568
634
|
"getReferredUserIds",
|
|
569
635
|
"batchGetDirectReferrersByUserIds",
|
|
570
636
|
"batchGetExchangeReferralSummaries",
|
|
637
|
+
"batchGetCommissionsByExchangeIds",
|
|
571
638
|
"applyExchangeCompleted",
|
|
572
639
|
"applyExchangeCancelled",
|
|
573
640
|
"listCommissions",
|
|
641
|
+
"createPersonalBonus",
|
|
642
|
+
"listPersonalBonuses",
|
|
574
643
|
"createPayout",
|
|
575
644
|
"confirmPayout",
|
|
576
645
|
"updatePayout",
|
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.294",
|
|
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/referral.proto
CHANGED
|
@@ -18,9 +18,12 @@ service ReferralService {
|
|
|
18
18
|
rpc GetReferredUserIds(GetReferredUserIdsRequest) returns (GetReferredUserIdsResponse);
|
|
19
19
|
rpc BatchGetDirectReferrersByUserIds(BatchGetDirectReferrersByUserIdsRequest) returns (BatchGetDirectReferrersByUserIdsResponse);
|
|
20
20
|
rpc BatchGetExchangeReferralSummaries(BatchGetExchangeReferralSummariesRequest) returns (BatchGetExchangeReferralSummariesResponse);
|
|
21
|
+
rpc BatchGetCommissionsByExchangeIds(BatchGetCommissionsByExchangeIdsRequest) returns (BatchGetCommissionsByExchangeIdsResponse);
|
|
21
22
|
rpc ApplyExchangeCompleted(ApplyExchangeCompletedRequest) returns (ApplyExchangeCompletedResponse);
|
|
22
23
|
rpc ApplyExchangeCancelled(ApplyExchangeCancelledRequest) returns (ApplyExchangeCancelledResponse);
|
|
23
24
|
rpc ListCommissions(ListCommissionsRequest) returns (ListCommissionsResponse);
|
|
25
|
+
rpc CreatePersonalBonus(CreatePersonalBonusRequest) returns (PersonalBonusItem);
|
|
26
|
+
rpc ListPersonalBonuses(ListPersonalBonusesRequest) returns (ListPersonalBonusesResponse);
|
|
24
27
|
rpc CreatePayout(CreatePayoutRequest) returns (ReferralPayoutResponse);
|
|
25
28
|
rpc ConfirmPayout(ConfirmPayoutRequest) returns (ReferralPayoutResponse);
|
|
26
29
|
rpc UpdatePayout(UpdatePayoutRequest) returns (ReferralPayoutResponse);
|
|
@@ -218,6 +221,15 @@ message BatchGetExchangeReferralSummariesResponse {
|
|
|
218
221
|
repeated ExchangeReferralSummary summaries = 1;
|
|
219
222
|
}
|
|
220
223
|
|
|
224
|
+
message BatchGetCommissionsByExchangeIdsRequest {
|
|
225
|
+
string wallet_user_id = 1;
|
|
226
|
+
repeated string exchange_ids = 2;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
message BatchGetCommissionsByExchangeIdsResponse {
|
|
230
|
+
repeated ReferralCommissionItem items = 1;
|
|
231
|
+
}
|
|
232
|
+
|
|
221
233
|
message ApplyExchangeCompletedRequest {
|
|
222
234
|
string exchange_id = 1;
|
|
223
235
|
string wallet_user_id = 2;
|
|
@@ -278,6 +290,40 @@ message ListCommissionsResponse {
|
|
|
278
290
|
int32 limit = 4;
|
|
279
291
|
}
|
|
280
292
|
|
|
293
|
+
message CreatePersonalBonusRequest {
|
|
294
|
+
string wallet_user_id = 1;
|
|
295
|
+
string amount = 2;
|
|
296
|
+
string currency = 3;
|
|
297
|
+
optional string reason = 4;
|
|
298
|
+
optional string comment = 5;
|
|
299
|
+
optional string created_by = 6;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
message PersonalBonusItem {
|
|
303
|
+
int64 id = 1;
|
|
304
|
+
int64 profile_id = 2;
|
|
305
|
+
string amount = 3;
|
|
306
|
+
string currency = 4;
|
|
307
|
+
optional string reason = 5;
|
|
308
|
+
optional string comment = 6;
|
|
309
|
+
optional string created_by = 7;
|
|
310
|
+
string created_at = 8;
|
|
311
|
+
string updated_at = 9;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
message ListPersonalBonusesRequest {
|
|
315
|
+
string wallet_user_id = 1;
|
|
316
|
+
optional int32 page = 2;
|
|
317
|
+
optional int32 limit = 3;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
message ListPersonalBonusesResponse {
|
|
321
|
+
repeated PersonalBonusItem items = 1;
|
|
322
|
+
int32 total = 2;
|
|
323
|
+
int32 page = 3;
|
|
324
|
+
int32 limit = 4;
|
|
325
|
+
}
|
|
326
|
+
|
|
281
327
|
message CreatePayoutRequest {
|
|
282
328
|
string wallet_user_id = 1;
|
|
283
329
|
string amount = 2;
|