@arbiwallet/contracts 1.0.283 → 1.0.285
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 +33 -14
- package/gen/user.ts +24 -5
- package/package.json +1 -1
- package/proto/referral.proto +18 -11
- package/proto/user.proto +9 -2
package/gen/referral.ts
CHANGED
|
@@ -46,12 +46,12 @@ export interface EnsureReferralProfileRequest {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export interface ReferralProfileResponse {
|
|
49
|
-
id:
|
|
49
|
+
id: number;
|
|
50
50
|
walletUserId: string;
|
|
51
51
|
legacyCustomerId?: number | undefined;
|
|
52
52
|
telegramId?: string | undefined;
|
|
53
53
|
refCode: string;
|
|
54
|
-
referrerProfileId?:
|
|
54
|
+
referrerProfileId?: number | undefined;
|
|
55
55
|
bonusType: ReferralBonusType;
|
|
56
56
|
refPercent: string;
|
|
57
57
|
status: ReferralProfileStatus;
|
|
@@ -110,8 +110,14 @@ export interface AdminReferralProfileByUserIdResponse {
|
|
|
110
110
|
profileId: string;
|
|
111
111
|
userId: number;
|
|
112
112
|
refCode: string;
|
|
113
|
-
referrerUserId?:
|
|
114
|
-
|
|
113
|
+
referrerUserId?:
|
|
114
|
+
| number
|
|
115
|
+
| undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Строковый тип для admin-flow, чтобы избежать тихого enum-default в gRPC loader.
|
|
118
|
+
* Нормализуется сервисом в ReferralBonusType (PROFIT/VOLUME).
|
|
119
|
+
*/
|
|
120
|
+
bonusType: string;
|
|
115
121
|
refPercent: string;
|
|
116
122
|
status: ReferralProfileStatus;
|
|
117
123
|
createdAt: string;
|
|
@@ -126,11 +132,24 @@ export interface AdminUpdateReferralProfileByUserIdRequest {
|
|
|
126
132
|
* Разрешено только если у профиля еще нет реферера.
|
|
127
133
|
* Если текущий реферер уже задан, сервис возвращает ошибку REFERRER_ALREADY_SET.
|
|
128
134
|
*/
|
|
129
|
-
referrerUserId?:
|
|
130
|
-
|
|
135
|
+
referrerUserId?:
|
|
136
|
+
| number
|
|
137
|
+
| undefined;
|
|
138
|
+
/**
|
|
139
|
+
* Строковый тип для admin-flow, чтобы избежать тихого enum-default в gRPC loader.
|
|
140
|
+
* Допустимые значения: PROFIT | VOLUME | REFERRAL_BONUS_TYPE_PROFIT | REFERRAL_BONUS_TYPE_VOLUME.
|
|
141
|
+
*/
|
|
142
|
+
bonusType?: string | undefined;
|
|
131
143
|
refPercent?: string | undefined;
|
|
132
144
|
refCode?: string | undefined;
|
|
133
|
-
changedBy?:
|
|
145
|
+
changedBy?:
|
|
146
|
+
| string
|
|
147
|
+
| undefined;
|
|
148
|
+
/**
|
|
149
|
+
* true — в этом запросе нужно выполнить изменение referrer_user_id;
|
|
150
|
+
* false/отсутствует — referrer_user_id игнорируется.
|
|
151
|
+
*/
|
|
152
|
+
referrerChanged?: boolean | undefined;
|
|
134
153
|
}
|
|
135
154
|
|
|
136
155
|
export interface GetUserReferralMetricsRequest {
|
|
@@ -151,7 +170,7 @@ export interface ListReferralsRequest {
|
|
|
151
170
|
}
|
|
152
171
|
|
|
153
172
|
export interface ReferralListItem {
|
|
154
|
-
profileId:
|
|
173
|
+
profileId: number;
|
|
155
174
|
walletUserId: string;
|
|
156
175
|
legacyCustomerId?: number | undefined;
|
|
157
176
|
telegramId?: string | undefined;
|
|
@@ -234,10 +253,10 @@ export interface ListCommissionsRequest {
|
|
|
234
253
|
}
|
|
235
254
|
|
|
236
255
|
export interface ReferralCommissionItem {
|
|
237
|
-
id:
|
|
256
|
+
id: number;
|
|
238
257
|
exchangeId: string;
|
|
239
|
-
referrerProfileId:
|
|
240
|
-
referredProfileId:
|
|
258
|
+
referrerProfileId: number;
|
|
259
|
+
referredProfileId: number;
|
|
241
260
|
level: number;
|
|
242
261
|
bonusType: ReferralBonusType;
|
|
243
262
|
percent: string;
|
|
@@ -267,13 +286,13 @@ export interface CreatePayoutRequest {
|
|
|
267
286
|
}
|
|
268
287
|
|
|
269
288
|
export interface ConfirmPayoutRequest {
|
|
270
|
-
payoutId:
|
|
289
|
+
payoutId: number;
|
|
271
290
|
confirmedByManagerId?: string | undefined;
|
|
272
291
|
}
|
|
273
292
|
|
|
274
293
|
export interface ReferralPayoutResponse {
|
|
275
|
-
id:
|
|
276
|
-
profileId:
|
|
294
|
+
id: number;
|
|
295
|
+
profileId: number;
|
|
277
296
|
amount: string;
|
|
278
297
|
currency: string;
|
|
279
298
|
paymentMethod: string;
|
package/gen/user.ts
CHANGED
|
@@ -120,8 +120,14 @@ export interface AdminUserForUpdateResponse {
|
|
|
120
120
|
whatsapp?: string | undefined;
|
|
121
121
|
advChannel?: string | undefined;
|
|
122
122
|
refCode?: string | undefined;
|
|
123
|
-
referrerUserId?:
|
|
124
|
-
|
|
123
|
+
referrerUserId?:
|
|
124
|
+
| number
|
|
125
|
+
| undefined;
|
|
126
|
+
/**
|
|
127
|
+
* Строковый тип для admin-flow, чтобы избежать тихого enum-default при межсервисном проксировании.
|
|
128
|
+
* Допустимые значения: PROFIT | VOLUME | REFERRAL_BONUS_TYPE_PROFIT | REFERRAL_BONUS_TYPE_VOLUME.
|
|
129
|
+
*/
|
|
130
|
+
bonusType?: string | undefined;
|
|
125
131
|
refPercent?:
|
|
126
132
|
| number
|
|
127
133
|
| undefined;
|
|
@@ -153,8 +159,14 @@ export interface AdminUpdateUserProfileRequest {
|
|
|
153
159
|
* Разрешено только если у пользователя еще нет реферера.
|
|
154
160
|
* Если текущий реферер уже задан, сервис возвращает ошибку REFERRER_ALREADY_SET.
|
|
155
161
|
*/
|
|
156
|
-
referrerUserId?:
|
|
157
|
-
|
|
162
|
+
referrerUserId?:
|
|
163
|
+
| number
|
|
164
|
+
| undefined;
|
|
165
|
+
/**
|
|
166
|
+
* Строковый тип для admin-flow, чтобы избежать тихого enum-default при межсервисном проксировании.
|
|
167
|
+
* Допустимые значения: PROFIT | VOLUME | REFERRAL_BONUS_TYPE_PROFIT | REFERRAL_BONUS_TYPE_VOLUME.
|
|
168
|
+
*/
|
|
169
|
+
bonusType?: string | undefined;
|
|
158
170
|
refPercent?: number | undefined;
|
|
159
171
|
isPartner?: boolean | undefined;
|
|
160
172
|
attention?: string | undefined;
|
|
@@ -162,7 +174,14 @@ export interface AdminUpdateUserProfileRequest {
|
|
|
162
174
|
comment?: string | undefined;
|
|
163
175
|
instagram?: string | undefined;
|
|
164
176
|
facebook?: string | undefined;
|
|
165
|
-
facebookUrl?:
|
|
177
|
+
facebookUrl?:
|
|
178
|
+
| string
|
|
179
|
+
| undefined;
|
|
180
|
+
/**
|
|
181
|
+
* true — в этом запросе нужно выполнить изменение referrer_user_id;
|
|
182
|
+
* false/отсутствует — referrer_user_id игнорируется и не должен вызывать REFERRER_ALREADY_SET.
|
|
183
|
+
*/
|
|
184
|
+
referrerChanged?: boolean | undefined;
|
|
166
185
|
}
|
|
167
186
|
|
|
168
187
|
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.
|
|
4
|
+
"version": "1.0.285",
|
|
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
|
@@ -59,12 +59,12 @@ message EnsureReferralProfileRequest {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
message ReferralProfileResponse {
|
|
62
|
-
|
|
62
|
+
int64 id = 1;
|
|
63
63
|
string wallet_user_id = 2;
|
|
64
64
|
optional int64 legacy_customer_id = 3;
|
|
65
65
|
optional string telegram_id = 4;
|
|
66
66
|
string ref_code = 5;
|
|
67
|
-
optional
|
|
67
|
+
optional int64 referrer_profile_id = 6;
|
|
68
68
|
ReferralBonusType bonus_type = 7;
|
|
69
69
|
string ref_percent = 8;
|
|
70
70
|
ReferralProfileStatus status = 9;
|
|
@@ -124,7 +124,9 @@ message AdminReferralProfileByUserIdResponse {
|
|
|
124
124
|
int32 user_id = 2;
|
|
125
125
|
string ref_code = 3;
|
|
126
126
|
optional int32 referrer_user_id = 4;
|
|
127
|
-
|
|
127
|
+
// Строковый тип для admin-flow, чтобы избежать тихого enum-default в gRPC loader.
|
|
128
|
+
// Нормализуется сервисом в ReferralBonusType (PROFIT/VOLUME).
|
|
129
|
+
string bonus_type = 5;
|
|
128
130
|
string ref_percent = 6;
|
|
129
131
|
ReferralProfileStatus status = 7;
|
|
130
132
|
string created_at = 8;
|
|
@@ -138,10 +140,15 @@ message AdminUpdateReferralProfileByUserIdRequest {
|
|
|
138
140
|
// Разрешено только если у профиля еще нет реферера.
|
|
139
141
|
// Если текущий реферер уже задан, сервис возвращает ошибку REFERRER_ALREADY_SET.
|
|
140
142
|
optional int32 referrer_user_id = 2;
|
|
141
|
-
|
|
143
|
+
// Строковый тип для admin-flow, чтобы избежать тихого enum-default в gRPC loader.
|
|
144
|
+
// Допустимые значения: PROFIT | VOLUME | REFERRAL_BONUS_TYPE_PROFIT | REFERRAL_BONUS_TYPE_VOLUME.
|
|
145
|
+
optional string bonus_type = 3;
|
|
142
146
|
optional string ref_percent = 4;
|
|
143
147
|
optional string ref_code = 5;
|
|
144
148
|
optional string changed_by = 6;
|
|
149
|
+
// true — в этом запросе нужно выполнить изменение referrer_user_id;
|
|
150
|
+
// false/отсутствует — referrer_user_id игнорируется.
|
|
151
|
+
optional bool referrer_changed = 7;
|
|
145
152
|
}
|
|
146
153
|
|
|
147
154
|
message GetUserReferralMetricsRequest {
|
|
@@ -162,7 +169,7 @@ message ListReferralsRequest {
|
|
|
162
169
|
}
|
|
163
170
|
|
|
164
171
|
message ReferralListItem {
|
|
165
|
-
|
|
172
|
+
int64 profile_id = 1;
|
|
166
173
|
string wallet_user_id = 2;
|
|
167
174
|
optional int64 legacy_customer_id = 3;
|
|
168
175
|
optional string telegram_id = 4;
|
|
@@ -245,10 +252,10 @@ message ListCommissionsRequest {
|
|
|
245
252
|
}
|
|
246
253
|
|
|
247
254
|
message ReferralCommissionItem {
|
|
248
|
-
|
|
255
|
+
int64 id = 1;
|
|
249
256
|
string exchange_id = 2;
|
|
250
|
-
|
|
251
|
-
|
|
257
|
+
int64 referrer_profile_id = 3;
|
|
258
|
+
int64 referred_profile_id = 4;
|
|
252
259
|
int32 level = 5;
|
|
253
260
|
ReferralBonusType bonus_type = 6;
|
|
254
261
|
string percent = 7;
|
|
@@ -278,13 +285,13 @@ message CreatePayoutRequest {
|
|
|
278
285
|
}
|
|
279
286
|
|
|
280
287
|
message ConfirmPayoutRequest {
|
|
281
|
-
|
|
288
|
+
int64 payout_id = 1;
|
|
282
289
|
optional string confirmed_by_manager_id = 2;
|
|
283
290
|
}
|
|
284
291
|
|
|
285
292
|
message ReferralPayoutResponse {
|
|
286
|
-
|
|
287
|
-
|
|
293
|
+
int64 id = 1;
|
|
294
|
+
int64 profile_id = 2;
|
|
288
295
|
string amount = 3;
|
|
289
296
|
string currency = 4;
|
|
290
297
|
string payment_method = 5;
|
package/proto/user.proto
CHANGED
|
@@ -165,7 +165,9 @@ message AdminUserForUpdateResponse {
|
|
|
165
165
|
optional string adv_channel = 10;
|
|
166
166
|
optional string ref_code = 11;
|
|
167
167
|
optional int32 referrer_user_id = 12;
|
|
168
|
-
|
|
168
|
+
// Строковый тип для admin-flow, чтобы избежать тихого enum-default при межсервисном проксировании.
|
|
169
|
+
// Допустимые значения: PROFIT | VOLUME | REFERRAL_BONUS_TYPE_PROFIT | REFERRAL_BONUS_TYPE_VOLUME.
|
|
170
|
+
optional string bonus_type = 13;
|
|
169
171
|
optional double ref_percent = 14;
|
|
170
172
|
// true, если в рамках AdminUpdateUserProfile был установлен referrer_user_id.
|
|
171
173
|
bool referrer_changed = 15;
|
|
@@ -192,7 +194,9 @@ message AdminUpdateUserProfileRequest {
|
|
|
192
194
|
// Разрешено только если у пользователя еще нет реферера.
|
|
193
195
|
// Если текущий реферер уже задан, сервис возвращает ошибку REFERRER_ALREADY_SET.
|
|
194
196
|
optional int32 referrer_user_id = 11;
|
|
195
|
-
|
|
197
|
+
// Строковый тип для admin-flow, чтобы избежать тихого enum-default при межсервисном проксировании.
|
|
198
|
+
// Допустимые значения: PROFIT | VOLUME | REFERRAL_BONUS_TYPE_PROFIT | REFERRAL_BONUS_TYPE_VOLUME.
|
|
199
|
+
optional string bonus_type = 12;
|
|
196
200
|
optional double ref_percent = 13;
|
|
197
201
|
optional bool is_partner = 14;
|
|
198
202
|
optional string attention = 15;
|
|
@@ -201,6 +205,9 @@ message AdminUpdateUserProfileRequest {
|
|
|
201
205
|
optional string instagram = 18;
|
|
202
206
|
optional string facebook = 19;
|
|
203
207
|
optional string facebook_url = 20;
|
|
208
|
+
// true — в этом запросе нужно выполнить изменение referrer_user_id;
|
|
209
|
+
// false/отсутствует — referrer_user_id игнорируется и не должен вызывать REFERRER_ALREADY_SET.
|
|
210
|
+
optional bool referrer_changed = 21;
|
|
204
211
|
}
|
|
205
212
|
|
|
206
213
|
message UpdateUserRequest {
|