@arbiwallet/contracts 1.0.69 → 1.0.71
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/card.ts +0 -97
- package/gen/user.ts +41 -0
- package/package.json +1 -1
- package/proto/card.proto +0 -69
- package/proto/user.proto +20 -0
package/gen/card.ts
CHANGED
|
@@ -125,72 +125,6 @@ export interface GetTopupFeeResponse {
|
|
|
125
125
|
amountToCard: string;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
export interface GetTopupDepositAddressRequest {
|
|
129
|
-
accountId: number;
|
|
130
|
-
cardId: number;
|
|
131
|
-
invoiceCurrency: string;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export interface GetTopupDepositAddressResponse {
|
|
135
|
-
cardId: number;
|
|
136
|
-
invoiceId: string;
|
|
137
|
-
address: string;
|
|
138
|
-
invoiceCurrency: string;
|
|
139
|
-
status: string;
|
|
140
|
-
amount: string;
|
|
141
|
-
paidAmount: string;
|
|
142
|
-
network: string;
|
|
143
|
-
expiresAt: string;
|
|
144
|
-
currency: string;
|
|
145
|
-
subaccountUsdtBalance: string;
|
|
146
|
-
subaccountBalanceCurrency: string;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export interface GetTopupInvoiceRequest {
|
|
150
|
-
accountId: number;
|
|
151
|
-
invoiceId: string;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export interface GetTopupInvoiceResponse {
|
|
155
|
-
invoiceId: string;
|
|
156
|
-
status: string;
|
|
157
|
-
address: string;
|
|
158
|
-
invoiceCurrency: string;
|
|
159
|
-
amount: string;
|
|
160
|
-
txHash: string;
|
|
161
|
-
paidAmount: string;
|
|
162
|
-
network: string;
|
|
163
|
-
expiresAt: string;
|
|
164
|
-
currency: string;
|
|
165
|
-
processingStatus: string;
|
|
166
|
-
subaccountUsdtBalance: string;
|
|
167
|
-
subaccountBalanceCurrency: string;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export interface UpdateAutoTopupRequest {
|
|
171
|
-
accountId: number;
|
|
172
|
-
cardId: number;
|
|
173
|
-
isAutoTopup: boolean;
|
|
174
|
-
autoTopAmount: string;
|
|
175
|
-
autoTopupLimit: string;
|
|
176
|
-
currentAutoTopupAmount: string;
|
|
177
|
-
cardBalanceThreshold: string;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export interface GetAutoTopupRequest {
|
|
181
|
-
accountId: number;
|
|
182
|
-
cardId: number;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export interface AutoTopupResponse {
|
|
186
|
-
cardId: number;
|
|
187
|
-
isAutoTopup: boolean;
|
|
188
|
-
autoTopAmount: string;
|
|
189
|
-
autoTopupLimit: string;
|
|
190
|
-
currentAutoTopupAmount: string;
|
|
191
|
-
cardBalanceThreshold: string;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
128
|
export interface ListCardsRequest {
|
|
195
129
|
accountId: number;
|
|
196
130
|
}
|
|
@@ -410,14 +344,6 @@ export interface CardServiceClient {
|
|
|
410
344
|
|
|
411
345
|
getTopupFee(request: GetTopupFeeRequest): Observable<GetTopupFeeResponse>;
|
|
412
346
|
|
|
413
|
-
getTopupDepositAddress(request: GetTopupDepositAddressRequest): Observable<GetTopupDepositAddressResponse>;
|
|
414
|
-
|
|
415
|
-
getTopupInvoice(request: GetTopupInvoiceRequest): Observable<GetTopupInvoiceResponse>;
|
|
416
|
-
|
|
417
|
-
updateAutoTopup(request: UpdateAutoTopupRequest): Observable<AutoTopupResponse>;
|
|
418
|
-
|
|
419
|
-
getAutoTopup(request: GetAutoTopupRequest): Observable<AutoTopupResponse>;
|
|
420
|
-
|
|
421
347
|
listCards(request: ListCardsRequest): Observable<ListCardsResponse>;
|
|
422
348
|
|
|
423
349
|
listCardsPaginated(request: ListCardsPaginatedRequest): Observable<ListCardsPaginatedResponse>;
|
|
@@ -468,25 +394,6 @@ export interface CardServiceController {
|
|
|
468
394
|
request: GetTopupFeeRequest,
|
|
469
395
|
): Promise<GetTopupFeeResponse> | Observable<GetTopupFeeResponse> | GetTopupFeeResponse;
|
|
470
396
|
|
|
471
|
-
getTopupDepositAddress(
|
|
472
|
-
request: GetTopupDepositAddressRequest,
|
|
473
|
-
):
|
|
474
|
-
| Promise<GetTopupDepositAddressResponse>
|
|
475
|
-
| Observable<GetTopupDepositAddressResponse>
|
|
476
|
-
| GetTopupDepositAddressResponse;
|
|
477
|
-
|
|
478
|
-
getTopupInvoice(
|
|
479
|
-
request: GetTopupInvoiceRequest,
|
|
480
|
-
): Promise<GetTopupInvoiceResponse> | Observable<GetTopupInvoiceResponse> | GetTopupInvoiceResponse;
|
|
481
|
-
|
|
482
|
-
updateAutoTopup(
|
|
483
|
-
request: UpdateAutoTopupRequest,
|
|
484
|
-
): Promise<AutoTopupResponse> | Observable<AutoTopupResponse> | AutoTopupResponse;
|
|
485
|
-
|
|
486
|
-
getAutoTopup(
|
|
487
|
-
request: GetAutoTopupRequest,
|
|
488
|
-
): Promise<AutoTopupResponse> | Observable<AutoTopupResponse> | AutoTopupResponse;
|
|
489
|
-
|
|
490
397
|
listCards(request: ListCardsRequest): Promise<ListCardsResponse> | Observable<ListCardsResponse> | ListCardsResponse;
|
|
491
398
|
|
|
492
399
|
listCardsPaginated(
|
|
@@ -549,10 +456,6 @@ export function CardServiceControllerMethods() {
|
|
|
549
456
|
"createCardsBatch",
|
|
550
457
|
"topupCard",
|
|
551
458
|
"getTopupFee",
|
|
552
|
-
"getTopupDepositAddress",
|
|
553
|
-
"getTopupInvoice",
|
|
554
|
-
"updateAutoTopup",
|
|
555
|
-
"getAutoTopup",
|
|
556
459
|
"listCards",
|
|
557
460
|
"listCardsPaginated",
|
|
558
461
|
"getCard",
|
package/gen/user.ts
CHANGED
|
@@ -203,6 +203,23 @@ export interface ListArbiWalletChatMessagesResponse {
|
|
|
203
203
|
bodyJson: string;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
export interface GetSupportChatLastReadRequest {
|
|
207
|
+
walletUserId: number;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface GetSupportChatLastReadResponse {
|
|
211
|
+
lastReadMessageId: number;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface SetSupportChatLastReadRequest {
|
|
215
|
+
walletUserId: number;
|
|
216
|
+
lastReadMessageId: number;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface SetSupportChatLastReadResponse {
|
|
220
|
+
ok: boolean;
|
|
221
|
+
}
|
|
222
|
+
|
|
206
223
|
export interface UserBalance {
|
|
207
224
|
asset: string;
|
|
208
225
|
network: string;
|
|
@@ -270,6 +287,12 @@ export interface UserServiceClient {
|
|
|
270
287
|
listArbiWalletChatMessages(
|
|
271
288
|
request: ListArbiWalletChatMessagesRequest,
|
|
272
289
|
): Observable<ListArbiWalletChatMessagesResponse>;
|
|
290
|
+
|
|
291
|
+
/** Локально в user-service: последний прочитанный message_id из chat-analytics (read receipt). */
|
|
292
|
+
|
|
293
|
+
getSupportChatLastRead(request: GetSupportChatLastReadRequest): Observable<GetSupportChatLastReadResponse>;
|
|
294
|
+
|
|
295
|
+
setSupportChatLastRead(request: SetSupportChatLastReadRequest): Observable<SetSupportChatLastReadResponse>;
|
|
273
296
|
}
|
|
274
297
|
|
|
275
298
|
export interface UserServiceController {
|
|
@@ -346,6 +369,22 @@ export interface UserServiceController {
|
|
|
346
369
|
| Promise<ListArbiWalletChatMessagesResponse>
|
|
347
370
|
| Observable<ListArbiWalletChatMessagesResponse>
|
|
348
371
|
| ListArbiWalletChatMessagesResponse;
|
|
372
|
+
|
|
373
|
+
/** Локально в user-service: последний прочитанный message_id из chat-analytics (read receipt). */
|
|
374
|
+
|
|
375
|
+
getSupportChatLastRead(
|
|
376
|
+
request: GetSupportChatLastReadRequest,
|
|
377
|
+
):
|
|
378
|
+
| Promise<GetSupportChatLastReadResponse>
|
|
379
|
+
| Observable<GetSupportChatLastReadResponse>
|
|
380
|
+
| GetSupportChatLastReadResponse;
|
|
381
|
+
|
|
382
|
+
setSupportChatLastRead(
|
|
383
|
+
request: SetSupportChatLastReadRequest,
|
|
384
|
+
):
|
|
385
|
+
| Promise<SetSupportChatLastReadResponse>
|
|
386
|
+
| Observable<SetSupportChatLastReadResponse>
|
|
387
|
+
| SetSupportChatLastReadResponse;
|
|
349
388
|
}
|
|
350
389
|
|
|
351
390
|
export function UserServiceControllerMethods() {
|
|
@@ -363,6 +402,8 @@ export function UserServiceControllerMethods() {
|
|
|
363
402
|
"forwardManagerChatMessage",
|
|
364
403
|
"postArbiWalletChatMessage",
|
|
365
404
|
"listArbiWalletChatMessages",
|
|
405
|
+
"getSupportChatLastRead",
|
|
406
|
+
"setSupportChatLastRead",
|
|
366
407
|
];
|
|
367
408
|
for (const method of grpcMethods) {
|
|
368
409
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
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.71",
|
|
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/card.proto
CHANGED
|
@@ -12,10 +12,6 @@ service CardService {
|
|
|
12
12
|
rpc CreateCardsBatch(CreateCardsBatchRequest) returns (CreateCardsBatchResponse);
|
|
13
13
|
rpc TopupCard(TopupCardRequest) returns (TopupCardResponse);
|
|
14
14
|
rpc GetTopupFee(GetTopupFeeRequest) returns (GetTopupFeeResponse);
|
|
15
|
-
rpc GetTopupDepositAddress(GetTopupDepositAddressRequest) returns (GetTopupDepositAddressResponse);
|
|
16
|
-
rpc GetTopupInvoice(GetTopupInvoiceRequest) returns (GetTopupInvoiceResponse);
|
|
17
|
-
rpc UpdateAutoTopup(UpdateAutoTopupRequest) returns (AutoTopupResponse);
|
|
18
|
-
rpc GetAutoTopup(GetAutoTopupRequest) returns (AutoTopupResponse);
|
|
19
15
|
|
|
20
16
|
rpc ListCards(ListCardsRequest) returns (ListCardsResponse);
|
|
21
17
|
rpc ListCardsPaginated(ListCardsPaginatedRequest) returns (ListCardsPaginatedResponse);
|
|
@@ -152,71 +148,6 @@ message GetTopupFeeResponse {
|
|
|
152
148
|
string amount_to_card = 7;
|
|
153
149
|
}
|
|
154
150
|
|
|
155
|
-
message GetTopupDepositAddressRequest {
|
|
156
|
-
int64 account_id = 1;
|
|
157
|
-
int64 card_id = 2;
|
|
158
|
-
string invoice_currency = 3;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
message GetTopupDepositAddressResponse {
|
|
162
|
-
int64 card_id = 1;
|
|
163
|
-
string invoice_id = 2;
|
|
164
|
-
string address = 3;
|
|
165
|
-
string invoice_currency = 4;
|
|
166
|
-
string status = 5;
|
|
167
|
-
string amount = 6;
|
|
168
|
-
string paid_amount = 7;
|
|
169
|
-
string network = 8;
|
|
170
|
-
string expires_at = 9;
|
|
171
|
-
string currency = 10;
|
|
172
|
-
string subaccount_usdt_balance = 11;
|
|
173
|
-
string subaccount_balance_currency = 12;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
message GetTopupInvoiceRequest {
|
|
177
|
-
int64 account_id = 1;
|
|
178
|
-
string invoice_id = 2;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
message GetTopupInvoiceResponse {
|
|
182
|
-
string invoice_id = 1;
|
|
183
|
-
string status = 2;
|
|
184
|
-
string address = 3;
|
|
185
|
-
string invoice_currency = 4;
|
|
186
|
-
string amount = 5;
|
|
187
|
-
string tx_hash = 6;
|
|
188
|
-
string paid_amount = 7;
|
|
189
|
-
string network = 8;
|
|
190
|
-
string expires_at = 9;
|
|
191
|
-
string currency = 10;
|
|
192
|
-
string processing_status = 11;
|
|
193
|
-
string subaccount_usdt_balance = 12;
|
|
194
|
-
string subaccount_balance_currency = 13;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
message UpdateAutoTopupRequest {
|
|
198
|
-
int64 account_id = 1;
|
|
199
|
-
int64 card_id = 2;
|
|
200
|
-
bool is_auto_topup = 3;
|
|
201
|
-
string auto_top_amount = 4;
|
|
202
|
-
string auto_topup_limit = 5;
|
|
203
|
-
string current_auto_topup_amount = 6;
|
|
204
|
-
string card_balance_threshold = 7;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
message GetAutoTopupRequest {
|
|
208
|
-
int64 account_id = 1;
|
|
209
|
-
int64 card_id = 2;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
message AutoTopupResponse {
|
|
213
|
-
int64 card_id = 1;
|
|
214
|
-
bool is_auto_topup = 2;
|
|
215
|
-
string auto_top_amount = 3;
|
|
216
|
-
string auto_topup_limit = 4;
|
|
217
|
-
string current_auto_topup_amount = 5;
|
|
218
|
-
string card_balance_threshold = 6;
|
|
219
|
-
}
|
|
220
151
|
|
|
221
152
|
message ListCardsRequest {
|
|
222
153
|
int64 account_id = 1;
|
package/proto/user.proto
CHANGED
|
@@ -22,6 +22,9 @@ service UserService {
|
|
|
22
22
|
rpc PostArbiWalletChatMessage (PostArbiWalletChatMessageRequest) returns (PostArbiWalletChatMessageResponse);
|
|
23
23
|
// Чат AlexAI (chat-analytics): GET /api/v1/arbi-wallet/messages?wallet_client_id=… — список сообщений пользователя.
|
|
24
24
|
rpc ListArbiWalletChatMessages (ListArbiWalletChatMessagesRequest) returns (ListArbiWalletChatMessagesResponse);
|
|
25
|
+
// Локально в user-service: последний прочитанный message_id из chat-analytics (read receipt).
|
|
26
|
+
rpc GetSupportChatLastRead (GetSupportChatLastReadRequest) returns (GetSupportChatLastReadResponse);
|
|
27
|
+
rpc SetSupportChatLastRead (SetSupportChatLastReadRequest) returns (SetSupportChatLastReadResponse);
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
enum UserStatus {
|
|
@@ -211,6 +214,23 @@ message ListArbiWalletChatMessagesResponse {
|
|
|
211
214
|
string body_json = 2;
|
|
212
215
|
}
|
|
213
216
|
|
|
217
|
+
message GetSupportChatLastReadRequest {
|
|
218
|
+
int32 wallet_user_id = 1;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
message GetSupportChatLastReadResponse {
|
|
222
|
+
int32 last_read_message_id = 1;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
message SetSupportChatLastReadRequest {
|
|
226
|
+
int32 wallet_user_id = 1;
|
|
227
|
+
int32 last_read_message_id = 2;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
message SetSupportChatLastReadResponse {
|
|
231
|
+
bool ok = 1;
|
|
232
|
+
}
|
|
233
|
+
|
|
214
234
|
message UserBalance {
|
|
215
235
|
string asset = 1;
|
|
216
236
|
string network = 2;
|