@arbiwallet/contracts 1.0.262 → 1.0.264

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.
@@ -129,24 +129,44 @@ export interface GetExchangeDealsManager {
129
129
  email: string;
130
130
  }
131
131
 
132
+ export interface GetExchangeDealsReceipt {
133
+ id: string;
134
+ amount?: number | undefined;
135
+ createdAt?: string | undefined;
136
+ }
137
+
132
138
  export interface GetExchangeDealsItem {
133
139
  id: string;
140
+ dailyId: string;
134
141
  userId: string;
135
- paymentId?: string | undefined;
142
+ userText: string;
143
+ createdAt: string;
136
144
  inputAmount: number;
137
145
  inputCurrencyId: string;
146
+ inputWalletId: string;
147
+ methodId: string;
138
148
  outputAmount: number;
139
- outputCurrencyId: string;
140
149
  factOutputAmount: number;
150
+ outputCurrencyId: string;
151
+ outputWalletId: string;
152
+ exchangeStatusId: string;
141
153
  status: boolean;
142
- exchangeStatusName: string;
143
- calculationSourceId?: string | undefined;
154
+ payed: boolean;
155
+ referrerId?: string | undefined;
156
+ referrerText?: string | undefined;
157
+ officeId?: string | undefined;
158
+ receipts: GetExchangeDealsReceipt[];
144
159
  manager?: GetExchangeDealsManager | undefined;
145
- createdAt: string;
160
+ paymentId?: string | undefined;
161
+ payerName: string;
162
+ payerData: string;
163
+ calculationSourceId?: string | undefined;
146
164
  exchangeRate1Iter?: number | undefined;
147
165
  exchangeRate2Iter?: number | undefined;
148
166
  usdtRate?: number | undefined;
149
- payed: boolean;
167
+ outputAmountInUsdt?: number | undefined;
168
+ includeInTotalCalculation: boolean;
169
+ oneCurrencyExchange: boolean;
150
170
  }
151
171
 
152
172
  export interface GetExchangeDealsResponse {
package/gen/referral.ts CHANGED
@@ -98,8 +98,6 @@ export interface GetReferralSummaryResponse {
98
98
  balances: ReferralBalanceItem[];
99
99
  referralsCount: number;
100
100
  totalUsdVolume: string;
101
- totalUsdtBalance: string;
102
- availableUsdtBalance: string;
103
101
  }
104
102
 
105
103
  export interface ListReferralsRequest {
@@ -124,6 +122,22 @@ export interface ListReferralsResponse {
124
122
  limit: number;
125
123
  }
126
124
 
125
+ export interface GetReferredUserIdsRequest {
126
+ userId: number;
127
+ }
128
+
129
+ export interface GetReferredUserIdsResponse {
130
+ referredUserIds: number[];
131
+ }
132
+
133
+ export interface BatchGetDirectReferrersByUserIdsRequest {
134
+ userIds: number[];
135
+ }
136
+
137
+ export interface BatchGetDirectReferrersByUserIdsResponse {
138
+ directReferrerIds: number[];
139
+ }
140
+
127
141
  export interface ApplyExchangeCompletedRequest {
128
142
  exchangeId: string;
129
143
  walletUserId: string;
@@ -199,28 +213,6 @@ export interface ConfirmPayoutRequest {
199
213
  confirmedByManagerId?: string | undefined;
200
214
  }
201
215
 
202
- export interface UpdatePayoutRequest {
203
- payoutId: string;
204
- amount?: string | undefined;
205
- currency?: string | undefined;
206
- paymentMethod?: string | undefined;
207
- outputCurrency?: string | undefined;
208
- comment?: string | undefined;
209
- }
210
-
211
- export interface CancelPayoutRequest {
212
- payoutId: string;
213
- reason?: string | undefined;
214
- }
215
-
216
- export interface DeletePayoutRequest {
217
- payoutId: string;
218
- }
219
-
220
- export interface DeletePayoutResponse {
221
- deleted: boolean;
222
- }
223
-
224
216
  export interface ReferralPayoutResponse {
225
217
  id: string;
226
218
  profileId: string;
@@ -232,7 +224,6 @@ export interface ReferralPayoutResponse {
232
224
  comment?: string | undefined;
233
225
  createdAt: string;
234
226
  updatedAt: string;
235
- walletUserId?: string | undefined;
236
227
  }
237
228
 
238
229
  export interface ListPayoutsRequest {
@@ -248,22 +239,6 @@ export interface ListPayoutsResponse {
248
239
  limit: number;
249
240
  }
250
241
 
251
- export interface RecreatedBalanceItem {
252
- currency: string;
253
- amount: string;
254
- }
255
-
256
- export interface RecreateBonusesRequest {
257
- walletUserId: string;
258
- }
259
-
260
- export interface RecreateBonusesResponse {
261
- success: boolean;
262
- commissionsCount: number;
263
- payoutsCount: number;
264
- balances: RecreatedBalanceItem[];
265
- }
266
-
267
242
  export interface AdminRecalculateExchangeRequest {
268
243
  exchangeId: string;
269
244
  dryRun: boolean;
@@ -292,6 +267,12 @@ export interface ReferralServiceClient {
292
267
 
293
268
  listReferrals(request: ListReferralsRequest): Observable<ListReferralsResponse>;
294
269
 
270
+ getReferredUserIds(request: GetReferredUserIdsRequest): Observable<GetReferredUserIdsResponse>;
271
+
272
+ batchGetDirectReferrersByUserIds(
273
+ request: BatchGetDirectReferrersByUserIdsRequest,
274
+ ): Observable<BatchGetDirectReferrersByUserIdsResponse>;
275
+
295
276
  applyExchangeCompleted(request: ApplyExchangeCompletedRequest): Observable<ApplyExchangeCompletedResponse>;
296
277
 
297
278
  applyExchangeCancelled(request: ApplyExchangeCancelledRequest): Observable<ApplyExchangeCancelledResponse>;
@@ -302,16 +283,8 @@ export interface ReferralServiceClient {
302
283
 
303
284
  confirmPayout(request: ConfirmPayoutRequest): Observable<ReferralPayoutResponse>;
304
285
 
305
- updatePayout(request: UpdatePayoutRequest): Observable<ReferralPayoutResponse>;
306
-
307
- cancelPayout(request: CancelPayoutRequest): Observable<ReferralPayoutResponse>;
308
-
309
- deletePayout(request: DeletePayoutRequest): Observable<DeletePayoutResponse>;
310
-
311
286
  listPayouts(request: ListPayoutsRequest): Observable<ListPayoutsResponse>;
312
287
 
313
- recreateBonuses(request: RecreateBonusesRequest): Observable<RecreateBonusesResponse>;
314
-
315
288
  adminRecalculateExchange(request: AdminRecalculateExchangeRequest): Observable<AdminRecalculateExchangeResponse>;
316
289
  }
317
290
 
@@ -341,6 +314,17 @@ export interface ReferralServiceController {
341
314
  request: ListReferralsRequest,
342
315
  ): Promise<ListReferralsResponse> | Observable<ListReferralsResponse> | ListReferralsResponse;
343
316
 
317
+ getReferredUserIds(
318
+ request: GetReferredUserIdsRequest,
319
+ ): Promise<GetReferredUserIdsResponse> | Observable<GetReferredUserIdsResponse> | GetReferredUserIdsResponse;
320
+
321
+ batchGetDirectReferrersByUserIds(
322
+ request: BatchGetDirectReferrersByUserIdsRequest,
323
+ ):
324
+ | Promise<BatchGetDirectReferrersByUserIdsResponse>
325
+ | Observable<BatchGetDirectReferrersByUserIdsResponse>
326
+ | BatchGetDirectReferrersByUserIdsResponse;
327
+
344
328
  applyExchangeCompleted(
345
329
  request: ApplyExchangeCompletedRequest,
346
330
  ):
@@ -367,26 +351,10 @@ export interface ReferralServiceController {
367
351
  request: ConfirmPayoutRequest,
368
352
  ): Promise<ReferralPayoutResponse> | Observable<ReferralPayoutResponse> | ReferralPayoutResponse;
369
353
 
370
- updatePayout(
371
- request: UpdatePayoutRequest,
372
- ): Promise<ReferralPayoutResponse> | Observable<ReferralPayoutResponse> | ReferralPayoutResponse;
373
-
374
- cancelPayout(
375
- request: CancelPayoutRequest,
376
- ): Promise<ReferralPayoutResponse> | Observable<ReferralPayoutResponse> | ReferralPayoutResponse;
377
-
378
- deletePayout(
379
- request: DeletePayoutRequest,
380
- ): Promise<DeletePayoutResponse> | Observable<DeletePayoutResponse> | DeletePayoutResponse;
381
-
382
354
  listPayouts(
383
355
  request: ListPayoutsRequest,
384
356
  ): Promise<ListPayoutsResponse> | Observable<ListPayoutsResponse> | ListPayoutsResponse;
385
357
 
386
- recreateBonuses(
387
- request: RecreateBonusesRequest,
388
- ): Promise<RecreateBonusesResponse> | Observable<RecreateBonusesResponse> | RecreateBonusesResponse;
389
-
390
358
  adminRecalculateExchange(
391
359
  request: AdminRecalculateExchangeRequest,
392
360
  ):
@@ -403,16 +371,14 @@ export function ReferralServiceControllerMethods() {
403
371
  "bindReferralByCode",
404
372
  "getReferralSummary",
405
373
  "listReferrals",
374
+ "getReferredUserIds",
375
+ "batchGetDirectReferrersByUserIds",
406
376
  "applyExchangeCompleted",
407
377
  "applyExchangeCancelled",
408
378
  "listCommissions",
409
379
  "createPayout",
410
380
  "confirmPayout",
411
- "updatePayout",
412
- "cancelPayout",
413
- "deletePayout",
414
381
  "listPayouts",
415
- "recreateBonuses",
416
382
  "adminRecalculateExchange",
417
383
  ];
418
384
  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.262",
4
+ "version": "1.0.264",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -161,24 +161,44 @@ message GetExchangeDealsManager {
161
161
  string email = 2;
162
162
  }
163
163
 
164
+ message GetExchangeDealsReceipt {
165
+ string id = 1;
166
+ optional double amount = 2;
167
+ optional string created_at = 3;
168
+ }
169
+
164
170
  message GetExchangeDealsItem {
165
171
  string id = 1;
166
- string user_id = 2;
167
- optional string payment_id = 3;
168
- double input_amount = 4;
169
- string input_currency_id = 5;
170
- double output_amount = 6;
171
- string output_currency_id = 7;
172
- double fact_output_amount = 8;
173
- bool status = 9;
174
- string exchange_status_name = 10;
175
- optional string calculation_source_id = 11;
176
- optional GetExchangeDealsManager manager = 12;
177
- string created_at = 13;
178
- optional double exchange_rate_1_iter = 14;
179
- optional double exchange_rate_2_iter = 15;
180
- optional double usdt_rate = 16;
181
- bool payed = 17;
172
+ string daily_id = 2;
173
+ string user_id = 3;
174
+ string user_text = 4;
175
+ string created_at = 5;
176
+ double input_amount = 6;
177
+ string input_currency_id = 7;
178
+ string input_wallet_id = 8;
179
+ string method_id = 9;
180
+ double output_amount = 10;
181
+ double fact_output_amount = 11;
182
+ string output_currency_id = 12;
183
+ string output_wallet_id = 13;
184
+ string exchange_status_id = 14;
185
+ bool status = 15;
186
+ bool payed = 16;
187
+ optional string referrer_id = 17;
188
+ optional string referrer_text = 18;
189
+ optional string office_id = 19;
190
+ repeated GetExchangeDealsReceipt receipts = 20;
191
+ optional GetExchangeDealsManager manager = 21;
192
+ optional string payment_id = 22;
193
+ string payer_name = 23;
194
+ string payer_data = 24;
195
+ optional string calculation_source_id = 25;
196
+ optional double exchange_rate_1_iter = 26;
197
+ optional double exchange_rate_2_iter = 27;
198
+ optional double usdt_rate = 28;
199
+ optional double output_amount_in_usdt = 29;
200
+ bool include_in_total_calculation = 30;
201
+ bool one_currency_exchange = 31;
182
202
  }
183
203
 
184
204
  message GetExchangeDealsResponse {
@@ -10,16 +10,14 @@ service ReferralService {
10
10
  rpc BindReferralByCode(BindReferralByCodeRequest) returns (BindReferralByCodeResponse);
11
11
  rpc GetReferralSummary(GetReferralSummaryRequest) returns (GetReferralSummaryResponse);
12
12
  rpc ListReferrals(ListReferralsRequest) returns (ListReferralsResponse);
13
+ rpc GetReferredUserIds(GetReferredUserIdsRequest) returns (GetReferredUserIdsResponse);
14
+ rpc BatchGetDirectReferrersByUserIds(BatchGetDirectReferrersByUserIdsRequest) returns (BatchGetDirectReferrersByUserIdsResponse);
13
15
  rpc ApplyExchangeCompleted(ApplyExchangeCompletedRequest) returns (ApplyExchangeCompletedResponse);
14
16
  rpc ApplyExchangeCancelled(ApplyExchangeCancelledRequest) returns (ApplyExchangeCancelledResponse);
15
17
  rpc ListCommissions(ListCommissionsRequest) returns (ListCommissionsResponse);
16
18
  rpc CreatePayout(CreatePayoutRequest) returns (ReferralPayoutResponse);
17
19
  rpc ConfirmPayout(ConfirmPayoutRequest) returns (ReferralPayoutResponse);
18
- rpc UpdatePayout(UpdatePayoutRequest) returns (ReferralPayoutResponse);
19
- rpc CancelPayout(CancelPayoutRequest) returns (ReferralPayoutResponse);
20
- rpc DeletePayout(DeletePayoutRequest) returns (DeletePayoutResponse);
21
20
  rpc ListPayouts(ListPayoutsRequest) returns (ListPayoutsResponse);
22
- rpc RecreateBonuses(RecreateBonusesRequest) returns (RecreateBonusesResponse);
23
21
  rpc AdminRecalculateExchange(AdminRecalculateExchangeRequest) returns (AdminRecalculateExchangeResponse);
24
22
  }
25
23
 
@@ -107,8 +105,6 @@ message GetReferralSummaryResponse {
107
105
  repeated ReferralBalanceItem balances = 2;
108
106
  int32 referrals_count = 3;
109
107
  string total_usd_volume = 4;
110
- string total_usdt_balance = 5;
111
- string available_usdt_balance = 6;
112
108
  }
113
109
 
114
110
  message ListReferralsRequest {
@@ -133,6 +129,22 @@ message ListReferralsResponse {
133
129
  int32 limit = 4;
134
130
  }
135
131
 
132
+ message GetReferredUserIdsRequest {
133
+ int32 user_id = 1;
134
+ }
135
+
136
+ message GetReferredUserIdsResponse {
137
+ repeated int32 referred_user_ids = 1;
138
+ }
139
+
140
+ message BatchGetDirectReferrersByUserIdsRequest {
141
+ repeated int32 user_ids = 1;
142
+ }
143
+
144
+ message BatchGetDirectReferrersByUserIdsResponse {
145
+ repeated int32 direct_referrer_ids = 1;
146
+ }
147
+
136
148
  message ApplyExchangeCompletedRequest {
137
149
  string exchange_id = 1;
138
150
  string wallet_user_id = 2;
@@ -208,28 +220,6 @@ message ConfirmPayoutRequest {
208
220
  optional string confirmed_by_manager_id = 2;
209
221
  }
210
222
 
211
- message UpdatePayoutRequest {
212
- string payout_id = 1;
213
- optional string amount = 2;
214
- optional string currency = 3;
215
- optional string payment_method = 4;
216
- optional string output_currency = 5;
217
- optional string comment = 6;
218
- }
219
-
220
- message CancelPayoutRequest {
221
- string payout_id = 1;
222
- optional string reason = 2;
223
- }
224
-
225
- message DeletePayoutRequest {
226
- string payout_id = 1;
227
- }
228
-
229
- message DeletePayoutResponse {
230
- bool deleted = 1;
231
- }
232
-
233
223
  message ReferralPayoutResponse {
234
224
  string id = 1;
235
225
  string profile_id = 2;
@@ -241,7 +231,6 @@ message ReferralPayoutResponse {
241
231
  optional string comment = 8;
242
232
  string created_at = 9;
243
233
  string updated_at = 10;
244
- optional string wallet_user_id = 11;
245
234
  }
246
235
 
247
236
  message ListPayoutsRequest {
@@ -257,22 +246,6 @@ message ListPayoutsResponse {
257
246
  int32 limit = 4;
258
247
  }
259
248
 
260
- message RecreatedBalanceItem {
261
- string currency = 1;
262
- string amount = 2;
263
- }
264
-
265
- message RecreateBonusesRequest {
266
- string wallet_user_id = 1;
267
- }
268
-
269
- message RecreateBonusesResponse {
270
- bool success = 1;
271
- int32 commissions_count = 2;
272
- int32 payouts_count = 3;
273
- repeated RecreatedBalanceItem balances = 4;
274
- }
275
-
276
249
  message AdminRecalculateExchangeRequest {
277
250
  string exchange_id = 1;
278
251
  bool dry_run = 2;