@arbiwallet/contracts 1.0.241 → 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/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.241",
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
  },
@@ -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;