@arbiwallet/contracts 1.0.274 → 1.0.275

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.
@@ -345,6 +345,20 @@ export interface GetUserIdsWithDealsInPeriodResponse {
345
345
  userIds: number[];
346
346
  }
347
347
 
348
+ export interface BatchGetUserDealStatsRequest {
349
+ userIds: number[];
350
+ }
351
+
352
+ export interface UserDealStats {
353
+ userId: number;
354
+ exchangeCountLastMonth: number;
355
+ totalProfit: number;
356
+ }
357
+
358
+ export interface BatchGetUserDealStatsResponse {
359
+ items: UserDealStats[];
360
+ }
361
+
348
362
  export interface ExchangeCalculationsFiltersRequest {
349
363
  dateFrom?: string | undefined;
350
364
  dateTo?: string | undefined;
@@ -626,6 +640,8 @@ export interface ExchangeCoreServiceClient {
626
640
  request: GetUserIdsWithDealsInPeriodRequest,
627
641
  ): Observable<GetUserIdsWithDealsInPeriodResponse>;
628
642
 
643
+ batchGetUserDealStats(request: BatchGetUserDealStatsRequest): Observable<BatchGetUserDealStatsResponse>;
644
+
629
645
  createExchangePayment(request: CreateExchangePaymentRequest): Observable<CreateExchangePaymentResponse>;
630
646
 
631
647
  handlePaymentWebhook(request: HandlePaymentWebhookRequest): Observable<HandlePaymentWebhookResponse>;
@@ -705,6 +721,10 @@ export interface ExchangeCoreServiceController {
705
721
  | Observable<GetUserIdsWithDealsInPeriodResponse>
706
722
  | GetUserIdsWithDealsInPeriodResponse;
707
723
 
724
+ batchGetUserDealStats(
725
+ request: BatchGetUserDealStatsRequest,
726
+ ): Promise<BatchGetUserDealStatsResponse> | Observable<BatchGetUserDealStatsResponse> | BatchGetUserDealStatsResponse;
727
+
708
728
  createExchangePayment(
709
729
  request: CreateExchangePaymentRequest,
710
730
  ): Promise<CreateExchangePaymentResponse> | Observable<CreateExchangePaymentResponse> | CreateExchangePaymentResponse;
@@ -767,6 +787,7 @@ export function ExchangeCoreServiceControllerMethods() {
767
787
  "completeExchangeDeal",
768
788
  "cancelExchangeDeal",
769
789
  "getUserIdsWithDealsInPeriod",
790
+ "batchGetUserDealStats",
770
791
  "createExchangePayment",
771
792
  "handlePaymentWebhook",
772
793
  "getExchangePayments",
package/gen/user.ts CHANGED
@@ -27,6 +27,12 @@ export enum UserKycStatus {
27
27
  UNRECOGNIZED = -1,
28
28
  }
29
29
 
30
+ export enum UserSearchBonusType {
31
+ PROFIT = 0,
32
+ VOLUME = 1,
33
+ UNRECOGNIZED = -1,
34
+ }
35
+
30
36
  export enum UserSortBy {
31
37
  CREATED_AT = 0,
32
38
  STATUS = 1,
@@ -81,6 +87,8 @@ export interface UserResponse {
81
87
  frequency?: number | undefined;
82
88
  ltv?: number | undefined;
83
89
  userSearchUpdatedAt?: string | undefined;
90
+ bonusType?: UserSearchBonusType | undefined;
91
+ referrerName?: string | undefined;
84
92
  }
85
93
 
86
94
  export interface UpdateUserRequest {
@@ -141,6 +149,7 @@ export interface UserSearchReferralStats {
141
149
  referrerUserId?: number | undefined;
142
150
  refPercent?: number | undefined;
143
151
  referralVolume: number;
152
+ bonusType?: UserSearchBonusType | undefined;
144
153
  }
145
154
 
146
155
  export interface UserSearchStatsUpdate {
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.274",
4
+ "version": "1.0.275",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -21,6 +21,7 @@ service ExchangeCoreService {
21
21
  rpc CompleteExchangeDeal(CompleteExchangeDealRequest) returns (CompleteExchangeDealResponse);
22
22
  rpc CancelExchangeDeal(CancelExchangeDealRequest) returns (CancelExchangeDealResponse);
23
23
  rpc GetUserIdsWithDealsInPeriod(GetUserIdsWithDealsInPeriodRequest) returns (GetUserIdsWithDealsInPeriodResponse);
24
+ rpc BatchGetUserDealStats(BatchGetUserDealStatsRequest) returns (BatchGetUserDealStatsResponse);
24
25
 
25
26
  rpc CreateExchangePayment(CreateExchangePaymentRequest) returns (CreateExchangePaymentResponse);
26
27
  rpc HandlePaymentWebhook(HandlePaymentWebhookRequest) returns (HandlePaymentWebhookResponse);
@@ -391,6 +392,20 @@ message GetUserIdsWithDealsInPeriodResponse {
391
392
  repeated int32 user_ids = 1;
392
393
  }
393
394
 
395
+ message BatchGetUserDealStatsRequest {
396
+ repeated int32 user_ids = 1;
397
+ }
398
+
399
+ message UserDealStats {
400
+ int32 user_id = 1;
401
+ int32 exchange_count_last_month = 2;
402
+ double total_profit = 3;
403
+ }
404
+
405
+ message BatchGetUserDealStatsResponse {
406
+ repeated UserDealStats items = 1;
407
+ }
408
+
394
409
  message ExchangeCalculationsFiltersRequest {
395
410
  optional string date_from = 1;
396
411
  optional string date_to = 2;
package/proto/user.proto CHANGED
@@ -81,6 +81,11 @@ enum UserKycStatus {
81
81
  REJECTED = 6;
82
82
  }
83
83
 
84
+ enum UserSearchBonusType {
85
+ PROFIT = 0;
86
+ VOLUME = 1;
87
+ }
88
+
84
89
  message GetUserRequest {
85
90
  int32 id = 1;
86
91
  }
@@ -122,6 +127,8 @@ message UserResponse {
122
127
  optional double frequency = 34;
123
128
  optional double ltv = 35;
124
129
  optional string user_search_updated_at = 36;
130
+ optional UserSearchBonusType bonus_type = 37;
131
+ optional string referrer_name = 38;
125
132
  }
126
133
 
127
134
  message UpdateUserRequest {
@@ -193,6 +200,7 @@ message UserSearchReferralStats {
193
200
  optional int32 referrer_user_id = 1;
194
201
  optional double ref_percent = 2;
195
202
  double referral_volume = 3;
203
+ optional UserSearchBonusType bonus_type = 4;
196
204
  }
197
205
 
198
206
  message UserSearchStatsUpdate {