@arbiwallet/contracts 1.0.120 → 1.0.122
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 +22 -0
- package/gen/content.ts +2 -0
- package/gen/ledger.ts +26 -0
- package/package.json +1 -1
- package/proto/card.proto +13 -0
- package/proto/content.proto +2 -0
- package/proto/ledger.proto +17 -0
package/gen/card.ts
CHANGED
|
@@ -307,6 +307,18 @@ export interface GetCardTransactionsResponse {
|
|
|
307
307
|
edge: Edge | undefined;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
+
export interface SyncRecentUserCardHistoryRequest {
|
|
311
|
+
accountId: number;
|
|
312
|
+
size: number;
|
|
313
|
+
cooldownSeconds: number;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export interface SyncRecentUserCardHistoryResponse {
|
|
317
|
+
syncedCards: number;
|
|
318
|
+
skippedCards: number;
|
|
319
|
+
failedCards: number;
|
|
320
|
+
}
|
|
321
|
+
|
|
310
322
|
export interface GetCardAuthTransactionsRequest {
|
|
311
323
|
accountId: number;
|
|
312
324
|
cardId: number;
|
|
@@ -466,6 +478,8 @@ export interface CardServiceClient {
|
|
|
466
478
|
|
|
467
479
|
getCardTransactions(request: GetCardTransactionsRequest): Observable<GetCardTransactionsResponse>;
|
|
468
480
|
|
|
481
|
+
syncRecentUserCardHistory(request: SyncRecentUserCardHistoryRequest): Observable<SyncRecentUserCardHistoryResponse>;
|
|
482
|
+
|
|
469
483
|
getCardAuthTransactions(request: GetCardAuthTransactionsRequest): Observable<GetCardAuthTransactionsResponse>;
|
|
470
484
|
|
|
471
485
|
getCard3DsCodes(request: GetCard3dsCodesRequest): Observable<GetCard3dsCodesResponse>;
|
|
@@ -546,6 +560,13 @@ export interface CardServiceController {
|
|
|
546
560
|
request: GetCardTransactionsRequest,
|
|
547
561
|
): Promise<GetCardTransactionsResponse> | Observable<GetCardTransactionsResponse> | GetCardTransactionsResponse;
|
|
548
562
|
|
|
563
|
+
syncRecentUserCardHistory(
|
|
564
|
+
request: SyncRecentUserCardHistoryRequest,
|
|
565
|
+
):
|
|
566
|
+
| Promise<SyncRecentUserCardHistoryResponse>
|
|
567
|
+
| Observable<SyncRecentUserCardHistoryResponse>
|
|
568
|
+
| SyncRecentUserCardHistoryResponse;
|
|
569
|
+
|
|
549
570
|
getCardAuthTransactions(
|
|
550
571
|
request: GetCardAuthTransactionsRequest,
|
|
551
572
|
):
|
|
@@ -608,6 +629,7 @@ export function CardServiceControllerMethods() {
|
|
|
608
629
|
"getCard",
|
|
609
630
|
"getCardBalance",
|
|
610
631
|
"getCardTransactions",
|
|
632
|
+
"syncRecentUserCardHistory",
|
|
611
633
|
"getCardAuthTransactions",
|
|
612
634
|
"getCard3DsCodes",
|
|
613
635
|
"updateCardStatus",
|
package/gen/content.ts
CHANGED
|
@@ -57,6 +57,7 @@ export interface GetPublicStoriesResponse {
|
|
|
57
57
|
export interface CreateBannerRequest {
|
|
58
58
|
imageUrl: string;
|
|
59
59
|
order: number;
|
|
60
|
+
link?: string | undefined;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
export interface CreateBannerResponse {
|
|
@@ -363,6 +364,7 @@ export interface Banner {
|
|
|
363
364
|
id: number;
|
|
364
365
|
imageUrl: string;
|
|
365
366
|
order: number;
|
|
367
|
+
link?: string | undefined;
|
|
366
368
|
}
|
|
367
369
|
|
|
368
370
|
export interface FaqItem {
|
package/gen/ledger.ts
CHANGED
|
@@ -349,6 +349,7 @@ export interface GetTransactionFeedRequest {
|
|
|
349
349
|
| undefined;
|
|
350
350
|
/** true: все события по выводу (RESERVED, WITHDRAWAL_STATUS, FINALIZED, …). По умолчанию — одна строка на вывод (последнее событие). */
|
|
351
351
|
expandWithdrawalTimeline?: boolean | undefined;
|
|
352
|
+
referenceId?: string | undefined;
|
|
352
353
|
}
|
|
353
354
|
|
|
354
355
|
export interface GetTransactionFeedResponse {
|
|
@@ -360,6 +361,20 @@ export interface GetTransactionFeedResponse {
|
|
|
360
361
|
totalReturned: number;
|
|
361
362
|
}
|
|
362
363
|
|
|
364
|
+
export interface AppendTransactionFeedItemRequest {
|
|
365
|
+
userId: string;
|
|
366
|
+
type: string;
|
|
367
|
+
asset: string;
|
|
368
|
+
network: string;
|
|
369
|
+
amount?: string | undefined;
|
|
370
|
+
referenceType?: string | undefined;
|
|
371
|
+
referenceId?: string | undefined;
|
|
372
|
+
title?: string | undefined;
|
|
373
|
+
metadataJson?: string | undefined;
|
|
374
|
+
idempotencyKey: string;
|
|
375
|
+
createdAt?: string | undefined;
|
|
376
|
+
}
|
|
377
|
+
|
|
363
378
|
export interface ListTransactionsRequest {
|
|
364
379
|
page?: number | undefined;
|
|
365
380
|
limit?: number | undefined;
|
|
@@ -473,6 +488,10 @@ export interface LedgerServiceClient {
|
|
|
473
488
|
|
|
474
489
|
getTransactionFeed(request: GetTransactionFeedRequest): Observable<GetTransactionFeedResponse>;
|
|
475
490
|
|
|
491
|
+
/** Идемпотентное добавление внешнего события в UI-ленту (например card provider events). */
|
|
492
|
+
|
|
493
|
+
appendTransactionFeedItem(request: AppendTransactionFeedItemRequest): Observable<TransactionFeedItem>;
|
|
494
|
+
|
|
476
495
|
/** Админский список всех транзакций с пагинацией/фильтрами/поиском. */
|
|
477
496
|
|
|
478
497
|
listTransactions(request: ListTransactionsRequest): Observable<ListTransactionsResponse>;
|
|
@@ -579,6 +598,12 @@ export interface LedgerServiceController {
|
|
|
579
598
|
request: GetTransactionFeedRequest,
|
|
580
599
|
): Promise<GetTransactionFeedResponse> | Observable<GetTransactionFeedResponse> | GetTransactionFeedResponse;
|
|
581
600
|
|
|
601
|
+
/** Идемпотентное добавление внешнего события в UI-ленту (например card provider events). */
|
|
602
|
+
|
|
603
|
+
appendTransactionFeedItem(
|
|
604
|
+
request: AppendTransactionFeedItemRequest,
|
|
605
|
+
): Promise<TransactionFeedItem> | Observable<TransactionFeedItem> | TransactionFeedItem;
|
|
606
|
+
|
|
582
607
|
/** Админский список всех транзакций с пагинацией/фильтрами/поиском. */
|
|
583
608
|
|
|
584
609
|
listTransactions(
|
|
@@ -610,6 +635,7 @@ export function LedgerServiceControllerMethods() {
|
|
|
610
635
|
"getBalancesBatch",
|
|
611
636
|
"getFxRatesUsd",
|
|
612
637
|
"getTransactionFeed",
|
|
638
|
+
"appendTransactionFeedItem",
|
|
613
639
|
"listTransactions",
|
|
614
640
|
"internalTransfer",
|
|
615
641
|
];
|
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.122",
|
|
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
|
@@ -23,6 +23,7 @@ service CardService {
|
|
|
23
23
|
rpc GetCardBalance(GetCardBalanceRequest) returns (GetCardBalanceResponse);
|
|
24
24
|
|
|
25
25
|
rpc GetCardTransactions(GetCardTransactionsRequest) returns (GetCardTransactionsResponse);
|
|
26
|
+
rpc SyncRecentUserCardHistory(SyncRecentUserCardHistoryRequest) returns (SyncRecentUserCardHistoryResponse);
|
|
26
27
|
rpc GetCardAuthTransactions(GetCardAuthTransactionsRequest) returns (GetCardAuthTransactionsResponse);
|
|
27
28
|
rpc GetCard3dsCodes(GetCard3dsCodesRequest) returns (GetCard3dsCodesResponse);
|
|
28
29
|
|
|
@@ -337,6 +338,18 @@ message GetCardTransactionsResponse {
|
|
|
337
338
|
Edge edge = 2;
|
|
338
339
|
}
|
|
339
340
|
|
|
341
|
+
message SyncRecentUserCardHistoryRequest {
|
|
342
|
+
int64 account_id = 1;
|
|
343
|
+
int32 size = 2;
|
|
344
|
+
int32 cooldown_seconds = 3;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
message SyncRecentUserCardHistoryResponse {
|
|
348
|
+
int32 synced_cards = 1;
|
|
349
|
+
int32 skipped_cards = 2;
|
|
350
|
+
int32 failed_cards = 3;
|
|
351
|
+
}
|
|
352
|
+
|
|
340
353
|
message GetCardAuthTransactionsRequest {
|
|
341
354
|
int64 account_id = 1;
|
|
342
355
|
int64 card_id = 2;
|
package/proto/content.proto
CHANGED
|
@@ -117,6 +117,7 @@ message GetPublicStoriesResponse {
|
|
|
117
117
|
message CreateBannerRequest {
|
|
118
118
|
string image_url = 1;
|
|
119
119
|
int32 order = 2;
|
|
120
|
+
optional string link = 3;
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
message CreateBannerResponse {
|
|
@@ -413,6 +414,7 @@ message Banner {
|
|
|
413
414
|
int32 id = 1;
|
|
414
415
|
string image_url = 2;
|
|
415
416
|
int32 order = 3;
|
|
417
|
+
optional string link = 4;
|
|
416
418
|
}
|
|
417
419
|
|
|
418
420
|
message FaqItem {
|
package/proto/ledger.proto
CHANGED
|
@@ -39,6 +39,8 @@ service LedgerService {
|
|
|
39
39
|
rpc GetFxRatesUsd(GetFxRatesUsdRequest) returns (GetFxRatesUsdResponse);
|
|
40
40
|
// Постраничная лента операций пользователя (история для UI); курсор и offset — на усмотрение сервера.
|
|
41
41
|
rpc GetTransactionFeed(GetTransactionFeedRequest) returns (GetTransactionFeedResponse);
|
|
42
|
+
// Идемпотентное добавление внешнего события в UI-ленту (например card provider events).
|
|
43
|
+
rpc AppendTransactionFeedItem(AppendTransactionFeedItemRequest) returns (TransactionFeedItem);
|
|
42
44
|
// Админский список всех транзакций с пагинацией/фильтрами/поиском.
|
|
43
45
|
rpc ListTransactions(ListTransactionsRequest) returns (ListTransactionsResponse);
|
|
44
46
|
// Внутренний перевод между пользователями приложения (только ledger, без сетевой комиссии).
|
|
@@ -304,6 +306,7 @@ message GetTransactionFeedRequest {
|
|
|
304
306
|
optional string reference_kind = 7;
|
|
305
307
|
// true: все события по выводу (RESERVED, WITHDRAWAL_STATUS, FINALIZED, …). По умолчанию — одна строка на вывод (последнее событие).
|
|
306
308
|
optional bool expand_withdrawal_timeline = 8;
|
|
309
|
+
optional string reference_id = 9;
|
|
307
310
|
}
|
|
308
311
|
|
|
309
312
|
message GetTransactionFeedResponse {
|
|
@@ -312,6 +315,20 @@ message GetTransactionFeedResponse {
|
|
|
312
315
|
int32 total_returned = 3; // Число элементов в этом ответе.
|
|
313
316
|
}
|
|
314
317
|
|
|
318
|
+
message AppendTransactionFeedItemRequest {
|
|
319
|
+
string user_id = 1;
|
|
320
|
+
string type = 2;
|
|
321
|
+
string asset = 3;
|
|
322
|
+
string network = 4;
|
|
323
|
+
optional string amount = 5;
|
|
324
|
+
optional string reference_type = 6;
|
|
325
|
+
optional string reference_id = 7;
|
|
326
|
+
optional string title = 8;
|
|
327
|
+
optional string metadata_json = 9;
|
|
328
|
+
string idempotency_key = 10;
|
|
329
|
+
optional string created_at = 11;
|
|
330
|
+
}
|
|
331
|
+
|
|
315
332
|
enum TransactionSortBy {
|
|
316
333
|
TRANSACTION_SORT_BY_CREATED_AT = 0;
|
|
317
334
|
TRANSACTION_SORT_BY_TYPE = 1;
|