@arbiwallet/contracts 1.0.244 → 1.0.246

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.
@@ -99,6 +99,65 @@ export interface GetExchangeDealsResponse {
99
99
  results: GetExchangeDealsItem[];
100
100
  }
101
101
 
102
+ export interface GetExchangeDealDetailsRequest {
103
+ authManagerContext: AuthManagerContext | undefined;
104
+ id: string;
105
+ }
106
+
107
+ export interface GetExchangeDealDetailsResult {
108
+ id: string;
109
+ userId: string;
110
+ customerId: string;
111
+ customerFullName: string;
112
+ customerChatLink?: string | undefined;
113
+ customerUrl?: string | undefined;
114
+ referrerId?: string | undefined;
115
+ referrerFullName?: string | undefined;
116
+ referrerUrl?: string | undefined;
117
+ referrerPercent?: number | undefined;
118
+ createdAt: string;
119
+ inputAmount: number;
120
+ inputCurrencyId: string;
121
+ inputCurrencyShortName?: string | undefined;
122
+ inputWalletId: string;
123
+ inputWalletName?: string | undefined;
124
+ methodId: string;
125
+ methodName?: string | undefined;
126
+ outputAmount: number;
127
+ outputCurrencyId: string;
128
+ outputCurrencyShortName?: string | undefined;
129
+ outputWalletId: string;
130
+ outputWalletName?: string | undefined;
131
+ oneCurrencyExchange: boolean;
132
+ receivedFromDealer: boolean;
133
+ receivedFromDealerWalletId?: string | undefined;
134
+ receivedFromDealerWalletName?: string | undefined;
135
+ exchangeStatusId?: string | undefined;
136
+ exchangeStatusName?: string | undefined;
137
+ payed: boolean;
138
+ buyPrice?: number | undefined;
139
+ sellPrice?: number | undefined;
140
+ profitPercent?: number | undefined;
141
+ profit?: number | undefined;
142
+ profitCurrencyId?: string | undefined;
143
+ profitCurrencyShortName?: string | undefined;
144
+ usdtRate?: number | undefined;
145
+ usdtProfit?: number | undefined;
146
+ profitAccounting: boolean;
147
+ profitDate?: string | undefined;
148
+ expensesCurrencyId?: string | undefined;
149
+ expensesCurrencyShortName?: string | undefined;
150
+ expensesForCourier?: number | undefined;
151
+ expensesForReferrer?: number | undefined;
152
+ }
153
+
154
+ export interface GetExchangeDealDetailsResponse {
155
+ ok: boolean;
156
+ result?: GetExchangeDealDetailsResult | undefined;
157
+ error?: string | undefined;
158
+ validationErrors?: { [key: string]: any } | undefined;
159
+ }
160
+
102
161
  export interface UpdateExchangeDealRequest {
103
162
  authManagerContext: AuthManagerContext | undefined;
104
163
  id: string;
@@ -348,6 +407,14 @@ export interface GetExchangePaymentsResponse {
348
407
  totalPages: number;
349
408
  }
350
409
 
410
+ export interface GetExchangePaymentRequest {
411
+ id: string;
412
+ }
413
+
414
+ export interface GetExchangePaymentResponse {
415
+ payment?: GetExchangePaymentsItem | undefined;
416
+ }
417
+
351
418
  export interface PaymentsSummaryItem {
352
419
  currency: string;
353
420
  total: number;
@@ -483,6 +550,8 @@ export interface ExchangeCoreServiceClient {
483
550
 
484
551
  getExchangeDeals(request: GetExchangeDealsRequest): Observable<GetExchangeDealsResponse>;
485
552
 
553
+ getExchangeDealDetails(request: GetExchangeDealDetailsRequest): Observable<GetExchangeDealDetailsResponse>;
554
+
486
555
  updateExchangeDeal(request: UpdateExchangeDealRequest): Observable<UpdateExchangeDealResponse>;
487
556
 
488
557
  completeExchangeDeal(request: CompleteExchangeDealRequest): Observable<CompleteExchangeDealResponse>;
@@ -499,6 +568,8 @@ export interface ExchangeCoreServiceClient {
499
568
 
500
569
  getExchangePayments(request: GetExchangePaymentsRequest): Observable<GetExchangePaymentsResponse>;
501
570
 
571
+ getExchangePayment(request: GetExchangePaymentRequest): Observable<GetExchangePaymentResponse>;
572
+
502
573
  getPaymentsSummary(request: ExchangeCalculationsFiltersRequest): Observable<GetPaymentsSummaryResponse>;
503
574
 
504
575
  getWallets(request: GetWalletsRequest): Observable<GetWalletsResponse>;
@@ -521,6 +592,13 @@ export interface ExchangeCoreServiceController {
521
592
  request: GetExchangeDealsRequest,
522
593
  ): Promise<GetExchangeDealsResponse> | Observable<GetExchangeDealsResponse> | GetExchangeDealsResponse;
523
594
 
595
+ getExchangeDealDetails(
596
+ request: GetExchangeDealDetailsRequest,
597
+ ):
598
+ | Promise<GetExchangeDealDetailsResponse>
599
+ | Observable<GetExchangeDealDetailsResponse>
600
+ | GetExchangeDealDetailsResponse;
601
+
524
602
  updateExchangeDeal(
525
603
  request: UpdateExchangeDealRequest,
526
604
  ): Promise<UpdateExchangeDealResponse> | Observable<UpdateExchangeDealResponse> | UpdateExchangeDealResponse;
@@ -556,6 +634,10 @@ export interface ExchangeCoreServiceController {
556
634
  request: GetExchangePaymentsRequest,
557
635
  ): Promise<GetExchangePaymentsResponse> | Observable<GetExchangePaymentsResponse> | GetExchangePaymentsResponse;
558
636
 
637
+ getExchangePayment(
638
+ request: GetExchangePaymentRequest,
639
+ ): Promise<GetExchangePaymentResponse> | Observable<GetExchangePaymentResponse> | GetExchangePaymentResponse;
640
+
559
641
  getPaymentsSummary(
560
642
  request: ExchangeCalculationsFiltersRequest,
561
643
  ): Promise<GetPaymentsSummaryResponse> | Observable<GetPaymentsSummaryResponse> | GetPaymentsSummaryResponse;
@@ -586,6 +668,7 @@ export function ExchangeCoreServiceControllerMethods() {
586
668
  const grpcMethods: string[] = [
587
669
  "createExchangeDeal",
588
670
  "getExchangeDeals",
671
+ "getExchangeDealDetails",
589
672
  "updateExchangeDeal",
590
673
  "completeExchangeDeal",
591
674
  "cancelExchangeDeal",
@@ -594,6 +677,7 @@ export function ExchangeCoreServiceControllerMethods() {
594
677
  "createExchangePayment",
595
678
  "handlePaymentWebhook",
596
679
  "getExchangePayments",
680
+ "getExchangePayment",
597
681
  "getPaymentsSummary",
598
682
  "getWallets",
599
683
  "getWalletsMonika",
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.244",
4
+ "version": "1.0.246",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -11,6 +11,7 @@ option java_package = "com.arbiwallet.exchange.core";
11
11
  service ExchangeCoreService {
12
12
  rpc CreateExchangeDeal(CreateExchangeDealRequest) returns (CreateExchangeDealResponse);
13
13
  rpc GetExchangeDeals(GetExchangeDealsRequest) returns (GetExchangeDealsResponse);
14
+ rpc GetExchangeDealDetails(GetExchangeDealDetailsRequest) returns (GetExchangeDealDetailsResponse);
14
15
  rpc UpdateExchangeDeal(UpdateExchangeDealRequest) returns (UpdateExchangeDealResponse);
15
16
  rpc CompleteExchangeDeal(CompleteExchangeDealRequest) returns (CompleteExchangeDealResponse);
16
17
  rpc CancelExchangeDeal(CancelExchangeDealRequest) returns (CancelExchangeDealResponse);
@@ -21,6 +22,7 @@ service ExchangeCoreService {
21
22
  rpc CreateExchangePayment(CreateExchangePaymentRequest) returns (CreateExchangePaymentResponse);
22
23
  rpc HandlePaymentWebhook(HandlePaymentWebhookRequest) returns (HandlePaymentWebhookResponse);
23
24
  rpc GetExchangePayments(GetExchangePaymentsRequest) returns (GetExchangePaymentsResponse);
25
+ rpc GetExchangePayment(GetExchangePaymentRequest) returns (GetExchangePaymentResponse);
24
26
  rpc GetPaymentsSummary(ExchangeCalculationsFiltersRequest) returns (GetPaymentsSummaryResponse);
25
27
 
26
28
  rpc GetWallets(GetWalletsRequest) returns (GetWalletsResponse);
@@ -126,6 +128,75 @@ message GetExchangeDealsResponse {
126
128
  repeated GetExchangeDealsItem results = 4;
127
129
  }
128
130
 
131
+ message GetExchangeDealDetailsRequest {
132
+ AuthManagerContext auth_manager_context = 1;
133
+ string id = 2;
134
+ }
135
+
136
+ message GetExchangeDealDetailsResult {
137
+ string id = 1;
138
+ string user_id = 2;
139
+
140
+ string customer_id = 3;
141
+ string customer_full_name = 4;
142
+ optional string customer_chat_link = 5;
143
+ optional string customer_url = 6;
144
+
145
+ optional string referrer_id = 7;
146
+ optional string referrer_full_name = 8;
147
+ optional string referrer_url = 9;
148
+ optional double referrer_percent = 10;
149
+
150
+ string created_at = 11;
151
+
152
+ double input_amount = 12;
153
+ string input_currency_id = 13;
154
+ optional string input_currency_short_name = 14;
155
+ string input_wallet_id = 15;
156
+ optional string input_wallet_name = 16;
157
+ string method_id = 17;
158
+ optional string method_name = 18;
159
+
160
+ double output_amount = 19;
161
+ string output_currency_id = 20;
162
+ optional string output_currency_short_name = 21;
163
+ string output_wallet_id = 22;
164
+ optional string output_wallet_name = 23;
165
+
166
+ bool one_currency_exchange = 24;
167
+ bool received_from_dealer = 25;
168
+ optional string received_from_dealer_wallet_id = 26;
169
+ optional string received_from_dealer_wallet_name = 27;
170
+
171
+ optional string exchange_status_id = 28;
172
+ optional string exchange_status_name = 29;
173
+ bool payed = 30;
174
+
175
+ optional double buy_price = 31;
176
+ optional double sell_price = 32;
177
+ optional double profit_percent = 33;
178
+ optional double profit = 34;
179
+
180
+ optional string profit_currency_id = 35;
181
+ optional string profit_currency_short_name = 36;
182
+ optional double usdt_rate = 37;
183
+ optional double usdt_profit = 38;
184
+ bool profit_accounting = 39;
185
+ optional string profit_date = 40;
186
+
187
+ optional string expenses_currency_id = 41;
188
+ optional string expenses_currency_short_name = 42;
189
+ optional double expenses_for_courier = 43;
190
+ optional double expenses_for_referrer = 44;
191
+ }
192
+
193
+ message GetExchangeDealDetailsResponse {
194
+ bool ok = 1;
195
+ optional GetExchangeDealDetailsResult result = 2;
196
+ optional string error = 3;
197
+ optional google.protobuf.Struct validationErrors = 4;
198
+ }
199
+
129
200
  message UpdateExchangeDealRequest {
130
201
  AuthManagerContext auth_manager_context = 1;
131
202
  string id = 2;
@@ -375,6 +446,14 @@ message GetExchangePaymentsResponse {
375
446
  int32 total_pages = 5;
376
447
  }
377
448
 
449
+ message GetExchangePaymentRequest {
450
+ string id = 1;
451
+ }
452
+
453
+ message GetExchangePaymentResponse {
454
+ optional GetExchangePaymentsItem payment = 1;
455
+ }
456
+
378
457
  message PaymentsSummaryItem {
379
458
  string currency = 1;
380
459
  double total = 2;