@arbiwallet/contracts 1.0.266 → 1.0.268
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/exchange_core.ts +10 -0
- package/gen/ledger.ts +2 -1
- package/gen/referral.ts +26 -0
- package/gen/user.ts +23 -0
- package/package.json +1 -1
- package/proto/exchange_core.proto +10 -0
- package/proto/ledger.proto +2 -1
- package/proto/referral.proto +15 -0
- package/proto/user.proto +11 -0
package/gen/exchange_core.ts
CHANGED
|
@@ -168,6 +168,15 @@ export interface GetExchangeDealsItem {
|
|
|
168
168
|
outputAmountInUsdt?: number | undefined;
|
|
169
169
|
includeInTotalCalculation: boolean;
|
|
170
170
|
oneCurrencyExchange: boolean;
|
|
171
|
+
profitPercent?: number | undefined;
|
|
172
|
+
profit?: number | undefined;
|
|
173
|
+
profitCurrencyId?: string | undefined;
|
|
174
|
+
usdtProfit?: number | undefined;
|
|
175
|
+
expensesForCourier?: number | undefined;
|
|
176
|
+
referrerBonusAmount?: number | undefined;
|
|
177
|
+
referrerPercent?: number | undefined;
|
|
178
|
+
managerPersonId?: string | undefined;
|
|
179
|
+
managerPersonName?: string | undefined;
|
|
171
180
|
}
|
|
172
181
|
|
|
173
182
|
export interface GetExchangeDealsResponse {
|
|
@@ -401,6 +410,7 @@ export interface GetExchangePaymentsItem {
|
|
|
401
410
|
customerName?: string | undefined;
|
|
402
411
|
managerName?: string | undefined;
|
|
403
412
|
calculationId?: string | undefined;
|
|
413
|
+
cryptoNetwork?: string | undefined;
|
|
404
414
|
}
|
|
405
415
|
|
|
406
416
|
export interface GetExchangePaymentsResponse {
|
package/gen/ledger.ts
CHANGED
|
@@ -341,7 +341,8 @@ export interface GetTransactionFeedRequest {
|
|
|
341
341
|
| string
|
|
342
342
|
| undefined;
|
|
343
343
|
/**
|
|
344
|
-
* Фильтр
|
|
344
|
+
* Фильтр для UI: "wallet" | "card" | "withdrawal" | "deposit" | "internal_transfer".
|
|
345
|
+
* wallet — UNION transaction_feed_items + card_operation; card — только card_operation (+ reference_id = cardId).
|
|
345
346
|
* deposit включает записи reference_type deposit и deposit_hold.
|
|
346
347
|
*/
|
|
347
348
|
referenceKind?:
|
package/gen/referral.ts
CHANGED
|
@@ -138,6 +138,20 @@ export interface BatchGetDirectReferrersByUserIdsResponse {
|
|
|
138
138
|
directReferrerIds: number[];
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
export interface BatchGetExchangeReferralSummariesRequest {
|
|
142
|
+
exchangeIds: string[];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface ExchangeReferralSummary {
|
|
146
|
+
exchangeId: string;
|
|
147
|
+
amount: string;
|
|
148
|
+
percent: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface BatchGetExchangeReferralSummariesResponse {
|
|
152
|
+
summaries: ExchangeReferralSummary[];
|
|
153
|
+
}
|
|
154
|
+
|
|
141
155
|
export interface ApplyExchangeCompletedRequest {
|
|
142
156
|
exchangeId: string;
|
|
143
157
|
walletUserId: string;
|
|
@@ -273,6 +287,10 @@ export interface ReferralServiceClient {
|
|
|
273
287
|
request: BatchGetDirectReferrersByUserIdsRequest,
|
|
274
288
|
): Observable<BatchGetDirectReferrersByUserIdsResponse>;
|
|
275
289
|
|
|
290
|
+
batchGetExchangeReferralSummaries(
|
|
291
|
+
request: BatchGetExchangeReferralSummariesRequest,
|
|
292
|
+
): Observable<BatchGetExchangeReferralSummariesResponse>;
|
|
293
|
+
|
|
276
294
|
applyExchangeCompleted(request: ApplyExchangeCompletedRequest): Observable<ApplyExchangeCompletedResponse>;
|
|
277
295
|
|
|
278
296
|
applyExchangeCancelled(request: ApplyExchangeCancelledRequest): Observable<ApplyExchangeCancelledResponse>;
|
|
@@ -325,6 +343,13 @@ export interface ReferralServiceController {
|
|
|
325
343
|
| Observable<BatchGetDirectReferrersByUserIdsResponse>
|
|
326
344
|
| BatchGetDirectReferrersByUserIdsResponse;
|
|
327
345
|
|
|
346
|
+
batchGetExchangeReferralSummaries(
|
|
347
|
+
request: BatchGetExchangeReferralSummariesRequest,
|
|
348
|
+
):
|
|
349
|
+
| Promise<BatchGetExchangeReferralSummariesResponse>
|
|
350
|
+
| Observable<BatchGetExchangeReferralSummariesResponse>
|
|
351
|
+
| BatchGetExchangeReferralSummariesResponse;
|
|
352
|
+
|
|
328
353
|
applyExchangeCompleted(
|
|
329
354
|
request: ApplyExchangeCompletedRequest,
|
|
330
355
|
):
|
|
@@ -373,6 +398,7 @@ export function ReferralServiceControllerMethods() {
|
|
|
373
398
|
"listReferrals",
|
|
374
399
|
"getReferredUserIds",
|
|
375
400
|
"batchGetDirectReferrersByUserIds",
|
|
401
|
+
"batchGetExchangeReferralSummaries",
|
|
376
402
|
"applyExchangeCompleted",
|
|
377
403
|
"applyExchangeCancelled",
|
|
378
404
|
"listCommissions",
|
package/gen/user.ts
CHANGED
|
@@ -202,6 +202,15 @@ export interface ForwardManagerChatMessageResponse {
|
|
|
202
202
|
ok: boolean;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
export interface DeleteManagerChatMessageRequest {
|
|
206
|
+
messageId: string;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface DeleteManagerChatMessageResponse {
|
|
210
|
+
ok: boolean;
|
|
211
|
+
message?: string | undefined;
|
|
212
|
+
}
|
|
213
|
+
|
|
205
214
|
export interface PostArbiWalletChatMessageRequest {
|
|
206
215
|
walletUserId: number;
|
|
207
216
|
/** Частичное тело от клиента: text, content, reply_to, datetime (ISO UTC). */
|
|
@@ -541,6 +550,10 @@ export interface UserServiceClient {
|
|
|
541
550
|
|
|
542
551
|
forwardManagerChatMessage(request: ForwardManagerChatMessageRequest): Observable<ForwardManagerChatMessageResponse>;
|
|
543
552
|
|
|
553
|
+
/** Удаление сообщения из Monica CRM: soft-delete по message_id + Socket.IO `notification` с is_deleted. */
|
|
554
|
+
|
|
555
|
+
deleteManagerChatMessage(request: DeleteManagerChatMessageRequest): Observable<DeleteManagerChatMessageResponse>;
|
|
556
|
+
|
|
544
557
|
/** Чат AlexAI (chat-analytics): POST /api/v1/arbi-wallet/messages; CRM session только на user-service. */
|
|
545
558
|
|
|
546
559
|
postArbiWalletChatMessage(request: PostArbiWalletChatMessageRequest): Observable<PostArbiWalletChatMessageResponse>;
|
|
@@ -693,6 +706,15 @@ export interface UserServiceController {
|
|
|
693
706
|
| Observable<ForwardManagerChatMessageResponse>
|
|
694
707
|
| ForwardManagerChatMessageResponse;
|
|
695
708
|
|
|
709
|
+
/** Удаление сообщения из Monica CRM: soft-delete по message_id + Socket.IO `notification` с is_deleted. */
|
|
710
|
+
|
|
711
|
+
deleteManagerChatMessage(
|
|
712
|
+
request: DeleteManagerChatMessageRequest,
|
|
713
|
+
):
|
|
714
|
+
| Promise<DeleteManagerChatMessageResponse>
|
|
715
|
+
| Observable<DeleteManagerChatMessageResponse>
|
|
716
|
+
| DeleteManagerChatMessageResponse;
|
|
717
|
+
|
|
696
718
|
/** Чат AlexAI (chat-analytics): POST /api/v1/arbi-wallet/messages; CRM session только на user-service. */
|
|
697
719
|
|
|
698
720
|
postArbiWalletChatMessage(
|
|
@@ -871,6 +893,7 @@ export function UserServiceControllerMethods() {
|
|
|
871
893
|
"submitWalletCrmExchangeOrder",
|
|
872
894
|
"listWalletExchangeRecentPairs",
|
|
873
895
|
"forwardManagerChatMessage",
|
|
896
|
+
"deleteManagerChatMessage",
|
|
874
897
|
"postArbiWalletChatMessage",
|
|
875
898
|
"listArbiWalletChatMessages",
|
|
876
899
|
"proxyArbiWalletChatMedia",
|
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.268",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
|
@@ -200,6 +200,15 @@ message GetExchangeDealsItem {
|
|
|
200
200
|
optional double output_amount_in_usdt = 30;
|
|
201
201
|
bool include_in_total_calculation = 31;
|
|
202
202
|
bool one_currency_exchange = 32;
|
|
203
|
+
optional double profit_percent = 33;
|
|
204
|
+
optional double profit = 34;
|
|
205
|
+
optional string profit_currency_id = 35;
|
|
206
|
+
optional double usdt_profit = 36;
|
|
207
|
+
optional double expenses_for_courier = 37;
|
|
208
|
+
optional double referrer_bonus_amount = 38;
|
|
209
|
+
optional double referrer_percent = 39;
|
|
210
|
+
optional string manager_person_id = 40;
|
|
211
|
+
optional string manager_person_name = 41;
|
|
203
212
|
}
|
|
204
213
|
|
|
205
214
|
message GetExchangeDealsResponse {
|
|
@@ -443,6 +452,7 @@ message GetExchangePaymentsItem {
|
|
|
443
452
|
optional string customer_name = 11;
|
|
444
453
|
optional string manager_name = 12;
|
|
445
454
|
optional string calculation_id = 13;
|
|
455
|
+
optional string crypto_network = 14;
|
|
446
456
|
}
|
|
447
457
|
|
|
448
458
|
message GetExchangePaymentsResponse {
|
package/proto/ledger.proto
CHANGED
|
@@ -301,7 +301,8 @@ message GetTransactionFeedRequest {
|
|
|
301
301
|
optional int32 offset = 4;
|
|
302
302
|
optional string asset = 5; // Фильтр по активу, напр. USDT.
|
|
303
303
|
optional string network = 6; // Фильтр по сети, напр. TRON, BSC.
|
|
304
|
-
// Фильтр
|
|
304
|
+
// Фильтр для UI: "wallet" | "card" | "withdrawal" | "deposit" | "internal_transfer".
|
|
305
|
+
// wallet — UNION transaction_feed_items + card_operation; card — только card_operation (+ reference_id = cardId).
|
|
305
306
|
// deposit включает записи reference_type deposit и deposit_hold.
|
|
306
307
|
optional string reference_kind = 7;
|
|
307
308
|
// true: все события по выводу (RESERVED, WITHDRAWAL_STATUS, FINALIZED, …). По умолчанию — одна строка на вывод (последнее событие).
|
package/proto/referral.proto
CHANGED
|
@@ -12,6 +12,7 @@ service ReferralService {
|
|
|
12
12
|
rpc ListReferrals(ListReferralsRequest) returns (ListReferralsResponse);
|
|
13
13
|
rpc GetReferredUserIds(GetReferredUserIdsRequest) returns (GetReferredUserIdsResponse);
|
|
14
14
|
rpc BatchGetDirectReferrersByUserIds(BatchGetDirectReferrersByUserIdsRequest) returns (BatchGetDirectReferrersByUserIdsResponse);
|
|
15
|
+
rpc BatchGetExchangeReferralSummaries(BatchGetExchangeReferralSummariesRequest) returns (BatchGetExchangeReferralSummariesResponse);
|
|
15
16
|
rpc ApplyExchangeCompleted(ApplyExchangeCompletedRequest) returns (ApplyExchangeCompletedResponse);
|
|
16
17
|
rpc ApplyExchangeCancelled(ApplyExchangeCancelledRequest) returns (ApplyExchangeCancelledResponse);
|
|
17
18
|
rpc ListCommissions(ListCommissionsRequest) returns (ListCommissionsResponse);
|
|
@@ -145,6 +146,20 @@ message BatchGetDirectReferrersByUserIdsResponse {
|
|
|
145
146
|
repeated int32 direct_referrer_ids = 1;
|
|
146
147
|
}
|
|
147
148
|
|
|
149
|
+
message BatchGetExchangeReferralSummariesRequest {
|
|
150
|
+
repeated string exchange_ids = 1;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
message ExchangeReferralSummary {
|
|
154
|
+
string exchange_id = 1;
|
|
155
|
+
string amount = 2;
|
|
156
|
+
string percent = 3;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
message BatchGetExchangeReferralSummariesResponse {
|
|
160
|
+
repeated ExchangeReferralSummary summaries = 1;
|
|
161
|
+
}
|
|
162
|
+
|
|
148
163
|
message ApplyExchangeCompletedRequest {
|
|
149
164
|
string exchange_id = 1;
|
|
150
165
|
string wallet_user_id = 2;
|
package/proto/user.proto
CHANGED
|
@@ -20,6 +20,8 @@ service UserService {
|
|
|
20
20
|
rpc ListWalletExchangeRecentPairs (ListWalletExchangeRecentPairsRequest) returns (ListWalletExchangeRecentPairsResponse);
|
|
21
21
|
// Сообщение менеджера клиенту: публикация в Rabbit app.notification → gateway → Socket.IO `notification`.
|
|
22
22
|
rpc ForwardManagerChatMessage (ForwardManagerChatMessageRequest) returns (ForwardManagerChatMessageResponse);
|
|
23
|
+
// Удаление сообщения из Monica CRM: soft-delete по message_id + Socket.IO `notification` с is_deleted.
|
|
24
|
+
rpc DeleteManagerChatMessage (DeleteManagerChatMessageRequest) returns (DeleteManagerChatMessageResponse);
|
|
23
25
|
// Чат AlexAI (chat-analytics): POST /api/v1/arbi-wallet/messages; CRM session только на user-service.
|
|
24
26
|
rpc PostArbiWalletChatMessage (PostArbiWalletChatMessageRequest) returns (PostArbiWalletChatMessageResponse);
|
|
25
27
|
// Чат AlexAI (chat-analytics): GET /api/v1/arbi-wallet/messages?wallet_client_id=… — список сообщений пользователя.
|
|
@@ -249,6 +251,15 @@ message ForwardManagerChatMessageResponse {
|
|
|
249
251
|
bool ok = 1;
|
|
250
252
|
}
|
|
251
253
|
|
|
254
|
+
message DeleteManagerChatMessageRequest {
|
|
255
|
+
string message_id = 1;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
message DeleteManagerChatMessageResponse {
|
|
259
|
+
bool ok = 1;
|
|
260
|
+
optional string message = 2;
|
|
261
|
+
}
|
|
262
|
+
|
|
252
263
|
message PostArbiWalletChatMessageRequest {
|
|
253
264
|
int32 wallet_user_id = 1;
|
|
254
265
|
// Частичное тело от клиента: text, content, reply_to, datetime (ISO UTC).
|