@arbiwallet/contracts 1.0.151 → 1.0.200

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/content.ts CHANGED
@@ -232,12 +232,8 @@ export interface GetPublicFilialsResponse {
232
232
  export interface CreatePartnerRequest {
233
233
  imageUrl: string;
234
234
  title: string;
235
- url?: string | undefined;
235
+ url: string;
236
236
  order: number;
237
- body?: string | undefined;
238
- isActive?: boolean | undefined;
239
- longitude?: number | undefined;
240
- latitude?: number | undefined;
241
237
  }
242
238
 
243
239
  export interface CreatePartnerResponse {
@@ -439,12 +435,8 @@ export interface Partner {
439
435
  id: number;
440
436
  imageUrl: string;
441
437
  title: string;
442
- url?: string | undefined;
438
+ url: string;
443
439
  order: number;
444
- body?: string | undefined;
445
- isActive?: boolean | undefined;
446
- latitude?: number | undefined;
447
- longitude?: number | undefined;
448
440
  }
449
441
 
450
442
  export interface Blog {
@@ -0,0 +1,361 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.4
4
+ // protoc v7.34.0
5
+ // source: referral.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "referral.v1";
12
+
13
+ export enum ReferralProfileStatus {
14
+ REFERRAL_PROFILE_STATUS_ACTIVE = 0,
15
+ REFERRAL_PROFILE_STATUS_BLOCKED = 1,
16
+ UNRECOGNIZED = -1,
17
+ }
18
+
19
+ export enum ReferralBonusType {
20
+ REFERRAL_BONUS_TYPE_PROFIT = 0,
21
+ REFERRAL_BONUS_TYPE_VOLUME = 1,
22
+ UNRECOGNIZED = -1,
23
+ }
24
+
25
+ export enum ReferralCommissionStatus {
26
+ REFERRAL_COMMISSION_STATUS_CONFIRMED = 0,
27
+ REFERRAL_COMMISSION_STATUS_CANCELLED = 1,
28
+ UNRECOGNIZED = -1,
29
+ }
30
+
31
+ export enum ReferralPayoutStatus {
32
+ REFERRAL_PAYOUT_STATUS_CREATED = 0,
33
+ REFERRAL_PAYOUT_STATUS_CONFIRMED = 1,
34
+ REFERRAL_PAYOUT_STATUS_CANCELLED = 2,
35
+ UNRECOGNIZED = -1,
36
+ }
37
+
38
+ export interface EnsureReferralProfileRequest {
39
+ walletUserId: string;
40
+ legacyCustomerId?: number | undefined;
41
+ telegramId?: string | undefined;
42
+ refCode?: string | undefined;
43
+ referrerCode?: string | undefined;
44
+ source?: string | undefined;
45
+ utmJson?: string | undefined;
46
+ }
47
+
48
+ export interface ReferralProfileResponse {
49
+ id: string;
50
+ walletUserId: string;
51
+ legacyCustomerId?: number | undefined;
52
+ telegramId?: string | undefined;
53
+ refCode: string;
54
+ referrerProfileId?: string | undefined;
55
+ bonusType: ReferralBonusType;
56
+ refPercent: string;
57
+ status: ReferralProfileStatus;
58
+ createdAt: string;
59
+ updatedAt: string;
60
+ }
61
+
62
+ export interface GetReferralLinkRequest {
63
+ walletUserId: string;
64
+ baseUrl?: string | undefined;
65
+ }
66
+
67
+ export interface GetReferralLinkResponse {
68
+ refCode: string;
69
+ link: string;
70
+ }
71
+
72
+ export interface BindReferralByCodeRequest {
73
+ walletUserId: string;
74
+ refCode: string;
75
+ source?: string | undefined;
76
+ utmJson?: string | undefined;
77
+ }
78
+
79
+ export interface BindReferralByCodeResponse {
80
+ success: boolean;
81
+ profile: ReferralProfileResponse | undefined;
82
+ referrer?: ReferralProfileResponse | undefined;
83
+ }
84
+
85
+ export interface GetReferralSummaryRequest {
86
+ walletUserId: string;
87
+ }
88
+
89
+ export interface ReferralBalanceItem {
90
+ currency: string;
91
+ total: string;
92
+ available: string;
93
+ heldCurrentWeek: string;
94
+ }
95
+
96
+ export interface GetReferralSummaryResponse {
97
+ profile: ReferralProfileResponse | undefined;
98
+ balances: ReferralBalanceItem[];
99
+ referralsCount: number;
100
+ totalUsdVolume: string;
101
+ }
102
+
103
+ export interface ListReferralsRequest {
104
+ walletUserId: string;
105
+ page?: number | undefined;
106
+ limit?: number | undefined;
107
+ }
108
+
109
+ export interface ReferralListItem {
110
+ profileId: string;
111
+ walletUserId: string;
112
+ legacyCustomerId?: number | undefined;
113
+ telegramId?: string | undefined;
114
+ refCode: string;
115
+ createdAt: string;
116
+ }
117
+
118
+ export interface ListReferralsResponse {
119
+ items: ReferralListItem[];
120
+ total: number;
121
+ page: number;
122
+ limit: number;
123
+ }
124
+
125
+ export interface ApplyExchangeCompletedRequest {
126
+ exchangeId: string;
127
+ walletUserId: string;
128
+ legacyCustomerId?: number | undefined;
129
+ outputAmount: string;
130
+ factOutputAmount?: string | undefined;
131
+ outputCurrency: string;
132
+ profitAmount: string;
133
+ profitCurrency: string;
134
+ courierExpenses?: string | undefined;
135
+ usdtRate?: string | undefined;
136
+ completedAt?: string | undefined;
137
+ calculationSnapshotJson?: string | undefined;
138
+ }
139
+
140
+ export interface ApplyExchangeCompletedResponse {
141
+ created: boolean;
142
+ commission?: ReferralCommissionItem | undefined;
143
+ balances: ReferralBalanceItem[];
144
+ }
145
+
146
+ export interface ApplyExchangeCancelledRequest {
147
+ exchangeId: string;
148
+ reason?: string | undefined;
149
+ }
150
+
151
+ export interface ApplyExchangeCancelledResponse {
152
+ cancelledCount: number;
153
+ balances: ReferralBalanceItem[];
154
+ }
155
+
156
+ export interface ListCommissionsRequest {
157
+ walletUserId: string;
158
+ page?: number | undefined;
159
+ limit?: number | undefined;
160
+ }
161
+
162
+ export interface ReferralCommissionItem {
163
+ id: string;
164
+ exchangeId: string;
165
+ referrerProfileId: string;
166
+ referredProfileId: string;
167
+ level: number;
168
+ bonusType: ReferralBonusType;
169
+ percent: string;
170
+ baseAmount: string;
171
+ amount: string;
172
+ currency: string;
173
+ status: ReferralCommissionStatus;
174
+ createdAt: string;
175
+ cancelledAt?: string | undefined;
176
+ }
177
+
178
+ export interface ListCommissionsResponse {
179
+ items: ReferralCommissionItem[];
180
+ total: number;
181
+ page: number;
182
+ limit: number;
183
+ }
184
+
185
+ export interface CreatePayoutRequest {
186
+ walletUserId: string;
187
+ amount: string;
188
+ currency: string;
189
+ paymentMethod: string;
190
+ outputCurrency?: string | undefined;
191
+ comment?: string | undefined;
192
+ createdByManagerId?: string | undefined;
193
+ }
194
+
195
+ export interface ConfirmPayoutRequest {
196
+ payoutId: string;
197
+ confirmedByManagerId?: string | undefined;
198
+ }
199
+
200
+ export interface ReferralPayoutResponse {
201
+ id: string;
202
+ profileId: string;
203
+ amount: string;
204
+ currency: string;
205
+ paymentMethod: string;
206
+ outputCurrency?: string | undefined;
207
+ status: ReferralPayoutStatus;
208
+ comment?: string | undefined;
209
+ createdAt: string;
210
+ updatedAt: string;
211
+ }
212
+
213
+ export interface ListPayoutsRequest {
214
+ walletUserId: string;
215
+ page?: number | undefined;
216
+ limit?: number | undefined;
217
+ }
218
+
219
+ export interface ListPayoutsResponse {
220
+ items: ReferralPayoutResponse[];
221
+ total: number;
222
+ page: number;
223
+ limit: number;
224
+ }
225
+
226
+ export interface AdminRecalculateExchangeRequest {
227
+ exchangeId: string;
228
+ dryRun: boolean;
229
+ }
230
+
231
+ export interface AdminRecalculateExchangeResponse {
232
+ changed: boolean;
233
+ commission?: ReferralCommissionItem | undefined;
234
+ }
235
+
236
+ export const REFERRAL_V1_PACKAGE_NAME = "referral.v1";
237
+
238
+ /**
239
+ * ReferralService owns referral attribution, referral commissions, bonus balances,
240
+ * weekly payout holds, and payout lifecycle for ArbiExchange/ArbiWallet.
241
+ */
242
+
243
+ export interface ReferralServiceClient {
244
+ ensureReferralProfile(request: EnsureReferralProfileRequest): Observable<ReferralProfileResponse>;
245
+
246
+ getReferralLink(request: GetReferralLinkRequest): Observable<GetReferralLinkResponse>;
247
+
248
+ bindReferralByCode(request: BindReferralByCodeRequest): Observable<BindReferralByCodeResponse>;
249
+
250
+ getReferralSummary(request: GetReferralSummaryRequest): Observable<GetReferralSummaryResponse>;
251
+
252
+ listReferrals(request: ListReferralsRequest): Observable<ListReferralsResponse>;
253
+
254
+ applyExchangeCompleted(request: ApplyExchangeCompletedRequest): Observable<ApplyExchangeCompletedResponse>;
255
+
256
+ applyExchangeCancelled(request: ApplyExchangeCancelledRequest): Observable<ApplyExchangeCancelledResponse>;
257
+
258
+ listCommissions(request: ListCommissionsRequest): Observable<ListCommissionsResponse>;
259
+
260
+ createPayout(request: CreatePayoutRequest): Observable<ReferralPayoutResponse>;
261
+
262
+ confirmPayout(request: ConfirmPayoutRequest): Observable<ReferralPayoutResponse>;
263
+
264
+ listPayouts(request: ListPayoutsRequest): Observable<ListPayoutsResponse>;
265
+
266
+ adminRecalculateExchange(request: AdminRecalculateExchangeRequest): Observable<AdminRecalculateExchangeResponse>;
267
+ }
268
+
269
+ /**
270
+ * ReferralService owns referral attribution, referral commissions, bonus balances,
271
+ * weekly payout holds, and payout lifecycle for ArbiExchange/ArbiWallet.
272
+ */
273
+
274
+ export interface ReferralServiceController {
275
+ ensureReferralProfile(
276
+ request: EnsureReferralProfileRequest,
277
+ ): Promise<ReferralProfileResponse> | Observable<ReferralProfileResponse> | ReferralProfileResponse;
278
+
279
+ getReferralLink(
280
+ request: GetReferralLinkRequest,
281
+ ): Promise<GetReferralLinkResponse> | Observable<GetReferralLinkResponse> | GetReferralLinkResponse;
282
+
283
+ bindReferralByCode(
284
+ request: BindReferralByCodeRequest,
285
+ ): Promise<BindReferralByCodeResponse> | Observable<BindReferralByCodeResponse> | BindReferralByCodeResponse;
286
+
287
+ getReferralSummary(
288
+ request: GetReferralSummaryRequest,
289
+ ): Promise<GetReferralSummaryResponse> | Observable<GetReferralSummaryResponse> | GetReferralSummaryResponse;
290
+
291
+ listReferrals(
292
+ request: ListReferralsRequest,
293
+ ): Promise<ListReferralsResponse> | Observable<ListReferralsResponse> | ListReferralsResponse;
294
+
295
+ applyExchangeCompleted(
296
+ request: ApplyExchangeCompletedRequest,
297
+ ):
298
+ | Promise<ApplyExchangeCompletedResponse>
299
+ | Observable<ApplyExchangeCompletedResponse>
300
+ | ApplyExchangeCompletedResponse;
301
+
302
+ applyExchangeCancelled(
303
+ request: ApplyExchangeCancelledRequest,
304
+ ):
305
+ | Promise<ApplyExchangeCancelledResponse>
306
+ | Observable<ApplyExchangeCancelledResponse>
307
+ | ApplyExchangeCancelledResponse;
308
+
309
+ listCommissions(
310
+ request: ListCommissionsRequest,
311
+ ): Promise<ListCommissionsResponse> | Observable<ListCommissionsResponse> | ListCommissionsResponse;
312
+
313
+ createPayout(
314
+ request: CreatePayoutRequest,
315
+ ): Promise<ReferralPayoutResponse> | Observable<ReferralPayoutResponse> | ReferralPayoutResponse;
316
+
317
+ confirmPayout(
318
+ request: ConfirmPayoutRequest,
319
+ ): Promise<ReferralPayoutResponse> | Observable<ReferralPayoutResponse> | ReferralPayoutResponse;
320
+
321
+ listPayouts(
322
+ request: ListPayoutsRequest,
323
+ ): Promise<ListPayoutsResponse> | Observable<ListPayoutsResponse> | ListPayoutsResponse;
324
+
325
+ adminRecalculateExchange(
326
+ request: AdminRecalculateExchangeRequest,
327
+ ):
328
+ | Promise<AdminRecalculateExchangeResponse>
329
+ | Observable<AdminRecalculateExchangeResponse>
330
+ | AdminRecalculateExchangeResponse;
331
+ }
332
+
333
+ export function ReferralServiceControllerMethods() {
334
+ return function (constructor: Function) {
335
+ const grpcMethods: string[] = [
336
+ "ensureReferralProfile",
337
+ "getReferralLink",
338
+ "bindReferralByCode",
339
+ "getReferralSummary",
340
+ "listReferrals",
341
+ "applyExchangeCompleted",
342
+ "applyExchangeCancelled",
343
+ "listCommissions",
344
+ "createPayout",
345
+ "confirmPayout",
346
+ "listPayouts",
347
+ "adminRecalculateExchange",
348
+ ];
349
+ for (const method of grpcMethods) {
350
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
351
+ GrpcMethod("ReferralService", method)(constructor.prototype[method], method, descriptor);
352
+ }
353
+ const grpcStreamMethods: string[] = [];
354
+ for (const method of grpcStreamMethods) {
355
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
356
+ GrpcStreamMethod("ReferralService", method)(constructor.prototype[method], method, descriptor);
357
+ }
358
+ };
359
+ }
360
+
361
+ export const REFERRAL_SERVICE_NAME = "ReferralService";
package/gen/user.ts CHANGED
@@ -66,6 +66,7 @@ export interface UserResponse {
66
66
  kyc: UserKycInfo | undefined;
67
67
  cardFirstName?: string | undefined;
68
68
  cardLastName?: string | undefined;
69
+ crmCustomerId?: number | undefined;
69
70
  }
70
71
 
71
72
  export interface UpdateUserRequest {
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.151",
4
+ "version": "1.0.200",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -292,12 +292,8 @@ message GetPublicFilialsResponse {
292
292
  message CreatePartnerRequest {
293
293
  string image_url = 1;
294
294
  string title = 2;
295
- optional string url = 3;
295
+ string url = 3;
296
296
  int32 order = 4;
297
- optional string body = 5;
298
- optional bool is_active = 6;
299
- optional double longitude = 7;
300
- optional double latitude = 8;
301
297
  }
302
298
 
303
299
  message CreatePartnerResponse {
@@ -493,12 +489,8 @@ message Partner {
493
489
  int32 id = 1;
494
490
  string image_url = 2;
495
491
  string title = 3;
496
- optional string url = 4;
492
+ string url = 4;
497
493
  int32 order = 5;
498
- optional string body = 6;
499
- optional bool is_active = 7;
500
- optional double latitude = 8;
501
- optional double longitude = 9;
502
494
  }
503
495
 
504
496
  message Blog {
@@ -0,0 +1,239 @@
1
+ syntax = "proto3";
2
+
3
+ package referral.v1;
4
+
5
+ // ReferralService owns referral attribution, referral commissions, bonus balances,
6
+ // weekly payout holds, and payout lifecycle for ArbiExchange/ArbiWallet.
7
+ service ReferralService {
8
+ rpc EnsureReferralProfile(EnsureReferralProfileRequest) returns (ReferralProfileResponse);
9
+ rpc GetReferralLink(GetReferralLinkRequest) returns (GetReferralLinkResponse);
10
+ rpc BindReferralByCode(BindReferralByCodeRequest) returns (BindReferralByCodeResponse);
11
+ rpc GetReferralSummary(GetReferralSummaryRequest) returns (GetReferralSummaryResponse);
12
+ rpc ListReferrals(ListReferralsRequest) returns (ListReferralsResponse);
13
+ rpc ApplyExchangeCompleted(ApplyExchangeCompletedRequest) returns (ApplyExchangeCompletedResponse);
14
+ rpc ApplyExchangeCancelled(ApplyExchangeCancelledRequest) returns (ApplyExchangeCancelledResponse);
15
+ rpc ListCommissions(ListCommissionsRequest) returns (ListCommissionsResponse);
16
+ rpc CreatePayout(CreatePayoutRequest) returns (ReferralPayoutResponse);
17
+ rpc ConfirmPayout(ConfirmPayoutRequest) returns (ReferralPayoutResponse);
18
+ rpc ListPayouts(ListPayoutsRequest) returns (ListPayoutsResponse);
19
+ rpc AdminRecalculateExchange(AdminRecalculateExchangeRequest) returns (AdminRecalculateExchangeResponse);
20
+ }
21
+
22
+ enum ReferralProfileStatus {
23
+ REFERRAL_PROFILE_STATUS_ACTIVE = 0;
24
+ REFERRAL_PROFILE_STATUS_BLOCKED = 1;
25
+ }
26
+
27
+ enum ReferralBonusType {
28
+ REFERRAL_BONUS_TYPE_PROFIT = 0;
29
+ REFERRAL_BONUS_TYPE_VOLUME = 1;
30
+ }
31
+
32
+ enum ReferralCommissionStatus {
33
+ REFERRAL_COMMISSION_STATUS_CONFIRMED = 0;
34
+ REFERRAL_COMMISSION_STATUS_CANCELLED = 1;
35
+ }
36
+
37
+ enum ReferralPayoutStatus {
38
+ REFERRAL_PAYOUT_STATUS_CREATED = 0;
39
+ REFERRAL_PAYOUT_STATUS_CONFIRMED = 1;
40
+ REFERRAL_PAYOUT_STATUS_CANCELLED = 2;
41
+ }
42
+
43
+ message EnsureReferralProfileRequest {
44
+ string wallet_user_id = 1;
45
+ optional int64 legacy_customer_id = 2;
46
+ optional string telegram_id = 3;
47
+ optional string ref_code = 4;
48
+ optional string referrer_code = 5;
49
+ optional string source = 6;
50
+ optional string utm_json = 7;
51
+ }
52
+
53
+ message ReferralProfileResponse {
54
+ string id = 1;
55
+ string wallet_user_id = 2;
56
+ optional int64 legacy_customer_id = 3;
57
+ optional string telegram_id = 4;
58
+ string ref_code = 5;
59
+ optional string referrer_profile_id = 6;
60
+ ReferralBonusType bonus_type = 7;
61
+ string ref_percent = 8;
62
+ ReferralProfileStatus status = 9;
63
+ string created_at = 10;
64
+ string updated_at = 11;
65
+ }
66
+
67
+ message GetReferralLinkRequest {
68
+ string wallet_user_id = 1;
69
+ optional string base_url = 2;
70
+ }
71
+
72
+ message GetReferralLinkResponse {
73
+ string ref_code = 1;
74
+ string link = 2;
75
+ }
76
+
77
+ message BindReferralByCodeRequest {
78
+ string wallet_user_id = 1;
79
+ string ref_code = 2;
80
+ optional string source = 3;
81
+ optional string utm_json = 4;
82
+ }
83
+
84
+ message BindReferralByCodeResponse {
85
+ bool success = 1;
86
+ ReferralProfileResponse profile = 2;
87
+ optional ReferralProfileResponse referrer = 3;
88
+ }
89
+
90
+ message GetReferralSummaryRequest {
91
+ string wallet_user_id = 1;
92
+ }
93
+
94
+ message ReferralBalanceItem {
95
+ string currency = 1;
96
+ string total = 2;
97
+ string available = 3;
98
+ string held_current_week = 4;
99
+ }
100
+
101
+ message GetReferralSummaryResponse {
102
+ ReferralProfileResponse profile = 1;
103
+ repeated ReferralBalanceItem balances = 2;
104
+ int32 referrals_count = 3;
105
+ string total_usd_volume = 4;
106
+ }
107
+
108
+ message ListReferralsRequest {
109
+ string wallet_user_id = 1;
110
+ optional int32 page = 2;
111
+ optional int32 limit = 3;
112
+ }
113
+
114
+ message ReferralListItem {
115
+ string profile_id = 1;
116
+ string wallet_user_id = 2;
117
+ optional int64 legacy_customer_id = 3;
118
+ optional string telegram_id = 4;
119
+ string ref_code = 5;
120
+ string created_at = 6;
121
+ }
122
+
123
+ message ListReferralsResponse {
124
+ repeated ReferralListItem items = 1;
125
+ int32 total = 2;
126
+ int32 page = 3;
127
+ int32 limit = 4;
128
+ }
129
+
130
+ message ApplyExchangeCompletedRequest {
131
+ string exchange_id = 1;
132
+ string wallet_user_id = 2;
133
+ optional int64 legacy_customer_id = 3;
134
+ string output_amount = 4;
135
+ optional string fact_output_amount = 5;
136
+ string output_currency = 6;
137
+ string profit_amount = 7;
138
+ string profit_currency = 8;
139
+ optional string courier_expenses = 9;
140
+ optional string usdt_rate = 10;
141
+ optional string completed_at = 11;
142
+ optional string calculation_snapshot_json = 12;
143
+ }
144
+
145
+ message ApplyExchangeCompletedResponse {
146
+ bool created = 1;
147
+ optional ReferralCommissionItem commission = 2;
148
+ repeated ReferralBalanceItem balances = 3;
149
+ }
150
+
151
+ message ApplyExchangeCancelledRequest {
152
+ string exchange_id = 1;
153
+ optional string reason = 2;
154
+ }
155
+
156
+ message ApplyExchangeCancelledResponse {
157
+ int32 cancelled_count = 1;
158
+ repeated ReferralBalanceItem balances = 2;
159
+ }
160
+
161
+ message ListCommissionsRequest {
162
+ string wallet_user_id = 1;
163
+ optional int32 page = 2;
164
+ optional int32 limit = 3;
165
+ }
166
+
167
+ message ReferralCommissionItem {
168
+ string id = 1;
169
+ string exchange_id = 2;
170
+ string referrer_profile_id = 3;
171
+ string referred_profile_id = 4;
172
+ int32 level = 5;
173
+ ReferralBonusType bonus_type = 6;
174
+ string percent = 7;
175
+ string base_amount = 8;
176
+ string amount = 9;
177
+ string currency = 10;
178
+ ReferralCommissionStatus status = 11;
179
+ string created_at = 12;
180
+ optional string cancelled_at = 13;
181
+ }
182
+
183
+ message ListCommissionsResponse {
184
+ repeated ReferralCommissionItem items = 1;
185
+ int32 total = 2;
186
+ int32 page = 3;
187
+ int32 limit = 4;
188
+ }
189
+
190
+ message CreatePayoutRequest {
191
+ string wallet_user_id = 1;
192
+ string amount = 2;
193
+ string currency = 3;
194
+ string payment_method = 4;
195
+ optional string output_currency = 5;
196
+ optional string comment = 6;
197
+ optional string created_by_manager_id = 7;
198
+ }
199
+
200
+ message ConfirmPayoutRequest {
201
+ string payout_id = 1;
202
+ optional string confirmed_by_manager_id = 2;
203
+ }
204
+
205
+ message ReferralPayoutResponse {
206
+ string id = 1;
207
+ string profile_id = 2;
208
+ string amount = 3;
209
+ string currency = 4;
210
+ string payment_method = 5;
211
+ optional string output_currency = 6;
212
+ ReferralPayoutStatus status = 7;
213
+ optional string comment = 8;
214
+ string created_at = 9;
215
+ string updated_at = 10;
216
+ }
217
+
218
+ message ListPayoutsRequest {
219
+ string wallet_user_id = 1;
220
+ optional int32 page = 2;
221
+ optional int32 limit = 3;
222
+ }
223
+
224
+ message ListPayoutsResponse {
225
+ repeated ReferralPayoutResponse items = 1;
226
+ int32 total = 2;
227
+ int32 page = 3;
228
+ int32 limit = 4;
229
+ }
230
+
231
+ message AdminRecalculateExchangeRequest {
232
+ string exchange_id = 1;
233
+ bool dry_run = 2;
234
+ }
235
+
236
+ message AdminRecalculateExchangeResponse {
237
+ bool changed = 1;
238
+ optional ReferralCommissionItem commission = 2;
239
+ }
package/proto/user.proto CHANGED
@@ -85,6 +85,7 @@ message UserResponse {
85
85
  UserKycInfo kyc = 17;
86
86
  optional string card_first_name = 20;
87
87
  optional string card_last_name = 21;
88
+ optional int32 crm_customer_id = 22;
88
89
  }
89
90
 
90
91
  message UpdateUserRequest {