@arbiwallet/contracts 1.0.62 → 1.0.65

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/payout.ts CHANGED
@@ -18,96 +18,45 @@ export interface ParsePromptPayQrRequest {
18
18
 
19
19
  export interface ParsePromptPayQrResponse {
20
20
  scanId: number;
21
- quoteId: string;
22
- status: string;
23
- payloadJson: string;
24
- }
25
-
26
- export interface ConfirmPayoutPaymentRequest {
27
- scanId: number;
28
- quoteId: string;
29
- userId: string;
30
- }
31
-
32
- export interface ConfirmPayoutPaymentResponse {
33
- payoutId: number;
34
- status: string;
35
- payloadJson: string;
36
- }
37
-
38
- export interface HandlePayoutWebhookRequest {
39
- payloadJson: string;
40
- }
41
-
42
- export interface HandlePayoutWebhookResponse {
43
- ok: boolean;
44
- }
45
-
46
- export interface ParseMusePayPromptPayQrTestRequest {
47
- qrString: string;
48
- userId: string;
49
- amount: number;
50
- }
51
-
52
- export interface ParseMusePayPromptPayQrTestResponse {
53
- scanId: number;
54
- quoteId: string;
55
- status: string;
56
- payloadJson: string;
57
21
  inputAmountToPay: string;
58
22
  inputCurrencyToPay: string;
59
23
  convertedAmountToPay: string;
60
24
  convertedCurrencyToPay: string;
25
+ feePercent: number;
26
+ feeOnConverted: string;
27
+ convertedAmountWithFee: string;
61
28
  }
62
29
 
63
- export interface ParseMusePayPromptPayQrRequest {
64
- qrString: string;
65
- userId: string;
66
- amount: number;
67
- }
68
-
69
- export interface ParseMusePayPromptPayQrResponse {
70
- scanId: number;
71
- quoteId: string;
72
- status: string;
73
- payloadJson: string;
74
- inputAmountToPay: string;
75
- inputCurrencyToPay: string;
76
- convertedAmountToPay: string;
77
- convertedCurrencyToPay: string;
78
- }
79
-
80
- export interface ConfirmMusePayPayoutPaymentRequest {
30
+ export interface ConfirmPayoutPaymentRequest {
81
31
  scanId: number;
82
- quoteId: string;
83
32
  userId: string;
84
33
  }
85
34
 
86
- export interface ConfirmMusePayPayoutPaymentResponse {
35
+ export interface ConfirmPayoutPaymentResponse {
87
36
  payoutId: number;
88
37
  status: string;
89
- payloadJson: string;
90
38
  }
91
39
 
92
- export interface HandleMusePayWebhookRequest {
40
+ export interface HandlePayoutWebhookRequest {
93
41
  rawBody: Uint8Array;
94
42
  }
95
43
 
96
- export interface HandleMusePayWebhookResponse {
97
- payoutId: number;
98
- status: string;
99
- handled: boolean;
44
+ export interface HandlePayoutWebhookResponse {
45
+ ok: boolean;
100
46
  }
101
47
 
102
48
  export interface GetPayoutRequest {
103
49
  payoutId: number;
104
- userId: string;
105
50
  }
106
51
 
107
52
  export interface GetPayoutResponse {
108
53
  payoutId: number;
54
+ scanId: number;
109
55
  status: string;
110
- payloadJson: string;
56
+ finalConvertedAmount?: string | undefined;
57
+ finalConvertedCurrency?: string | undefined;
58
+ createdAt: string;
59
+ completedAt?: string | undefined;
111
60
  }
112
61
 
113
62
  export const PAYOUT_V1_PACKAGE_NAME = "payout.v1";
@@ -119,18 +68,6 @@ export interface PayoutServiceClient {
119
68
 
120
69
  handlePayoutWebhook(request: HandlePayoutWebhookRequest): Observable<HandlePayoutWebhookResponse>;
121
70
 
122
- parseMusePayPromptPayQrTest(
123
- request: ParseMusePayPromptPayQrTestRequest,
124
- ): Observable<ParseMusePayPromptPayQrTestResponse>;
125
-
126
- parseMusePayPromptPayQr(request: ParseMusePayPromptPayQrRequest): Observable<ParseMusePayPromptPayQrResponse>;
127
-
128
- confirmMusePayPayoutPayment(
129
- request: ConfirmMusePayPayoutPaymentRequest,
130
- ): Observable<ConfirmMusePayPayoutPaymentResponse>;
131
-
132
- handleMusePayWebhook(request: HandleMusePayWebhookRequest): Observable<HandleMusePayWebhookResponse>;
133
-
134
71
  getPayout(request: GetPayoutRequest): Observable<GetPayoutResponse>;
135
72
  }
136
73
 
@@ -147,46 +84,12 @@ export interface PayoutServiceController {
147
84
  request: HandlePayoutWebhookRequest,
148
85
  ): Promise<HandlePayoutWebhookResponse> | Observable<HandlePayoutWebhookResponse> | HandlePayoutWebhookResponse;
149
86
 
150
- parseMusePayPromptPayQrTest(
151
- request: ParseMusePayPromptPayQrTestRequest,
152
- ):
153
- | Promise<ParseMusePayPromptPayQrTestResponse>
154
- | Observable<ParseMusePayPromptPayQrTestResponse>
155
- | ParseMusePayPromptPayQrTestResponse;
156
-
157
- parseMusePayPromptPayQr(
158
- request: ParseMusePayPromptPayQrRequest,
159
- ):
160
- | Promise<ParseMusePayPromptPayQrResponse>
161
- | Observable<ParseMusePayPromptPayQrResponse>
162
- | ParseMusePayPromptPayQrResponse;
163
-
164
- confirmMusePayPayoutPayment(
165
- request: ConfirmMusePayPayoutPaymentRequest,
166
- ):
167
- | Promise<ConfirmMusePayPayoutPaymentResponse>
168
- | Observable<ConfirmMusePayPayoutPaymentResponse>
169
- | ConfirmMusePayPayoutPaymentResponse;
170
-
171
- handleMusePayWebhook(
172
- request: HandleMusePayWebhookRequest,
173
- ): Promise<HandleMusePayWebhookResponse> | Observable<HandleMusePayWebhookResponse> | HandleMusePayWebhookResponse;
174
-
175
87
  getPayout(request: GetPayoutRequest): Promise<GetPayoutResponse> | Observable<GetPayoutResponse> | GetPayoutResponse;
176
88
  }
177
89
 
178
90
  export function PayoutServiceControllerMethods() {
179
91
  return function (constructor: Function) {
180
- const grpcMethods: string[] = [
181
- "parsePromptPayQr",
182
- "confirmPayoutPayment",
183
- "handlePayoutWebhook",
184
- "parseMusePayPromptPayQrTest",
185
- "parseMusePayPromptPayQr",
186
- "confirmMusePayPayoutPayment",
187
- "handleMusePayWebhook",
188
- "getPayout",
189
- ];
92
+ const grpcMethods: string[] = ["parsePromptPayQr", "confirmPayoutPayment", "handlePayoutWebhook", "getPayout"];
190
93
  for (const method of grpcMethods) {
191
94
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
192
95
  GrpcMethod("PayoutService", method)(constructor.prototype[method], method, descriptor);
package/gen/user.ts CHANGED
@@ -162,6 +162,25 @@ export interface ListWalletExchangeRecentPairsResponse {
162
162
  pairs: WalletExchangeRecentPairItem[];
163
163
  }
164
164
 
165
+ export interface ForwardManagerChatMessageRequest {
166
+ forwardSecret: string;
167
+ text: string;
168
+ isEcho: boolean;
169
+ walletClientId: string;
170
+ walletManagerId?: string | undefined;
171
+ datetime?: string | undefined;
172
+ content?: string | undefined;
173
+ messageId?:
174
+ | string
175
+ | undefined;
176
+ /** JSON для reply_to: отсутствие поля — нет ответа; строка "null" — null; иначе JSON-значение. */
177
+ replyToJson?: string | undefined;
178
+ }
179
+
180
+ export interface ForwardManagerChatMessageResponse {
181
+ ok: boolean;
182
+ }
183
+
165
184
  export interface UserBalance {
166
185
  asset: string;
167
186
  network: string;
@@ -215,6 +234,10 @@ export interface UserServiceClient {
215
234
  listWalletExchangeRecentPairs(
216
235
  request: ListWalletExchangeRecentPairsRequest,
217
236
  ): Observable<ListWalletExchangeRecentPairsResponse>;
237
+
238
+ /** Сообщение менеджера клиенту: публикация в Rabbit app.notification → gateway → Socket.IO `notification`. */
239
+
240
+ forwardManagerChatMessage(request: ForwardManagerChatMessageRequest): Observable<ForwardManagerChatMessageResponse>;
218
241
  }
219
242
 
220
243
  export interface UserServiceController {
@@ -264,6 +287,15 @@ export interface UserServiceController {
264
287
  | Promise<ListWalletExchangeRecentPairsResponse>
265
288
  | Observable<ListWalletExchangeRecentPairsResponse>
266
289
  | ListWalletExchangeRecentPairsResponse;
290
+
291
+ /** Сообщение менеджера клиенту: публикация в Rabbit app.notification → gateway → Socket.IO `notification`. */
292
+
293
+ forwardManagerChatMessage(
294
+ request: ForwardManagerChatMessageRequest,
295
+ ):
296
+ | Promise<ForwardManagerChatMessageResponse>
297
+ | Observable<ForwardManagerChatMessageResponse>
298
+ | ForwardManagerChatMessageResponse;
267
299
  }
268
300
 
269
301
  export function UserServiceControllerMethods() {
@@ -278,6 +310,7 @@ export function UserServiceControllerMethods() {
278
310
  "crmExchangeHttp",
279
311
  "submitWalletCrmExchangeOrder",
280
312
  "listWalletExchangeRecentPairs",
313
+ "forwardManagerChatMessage",
281
314
  ];
282
315
  for (const method of grpcMethods) {
283
316
  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.62",
4
+ "version": "1.0.65",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -10,10 +10,6 @@ service PayoutService {
10
10
  rpc ParsePromptPayQr(ParsePromptPayQrRequest) returns (ParsePromptPayQrResponse);
11
11
  rpc ConfirmPayoutPayment(ConfirmPayoutPaymentRequest) returns (ConfirmPayoutPaymentResponse);
12
12
  rpc HandlePayoutWebhook(HandlePayoutWebhookRequest) returns (HandlePayoutWebhookResponse);
13
- rpc ParseMusePayPromptPayQrTest(ParseMusePayPromptPayQrTestRequest) returns (ParseMusePayPromptPayQrTestResponse);
14
- rpc ParseMusePayPromptPayQr(ParseMusePayPromptPayQrRequest) returns (ParseMusePayPromptPayQrResponse);
15
- rpc ConfirmMusePayPayoutPayment(ConfirmMusePayPayoutPaymentRequest) returns (ConfirmMusePayPayoutPaymentResponse);
16
- rpc HandleMusePayWebhook(HandleMusePayWebhookRequest) returns (HandleMusePayWebhookResponse);
17
13
  rpc GetPayout(GetPayoutRequest) returns (GetPayoutResponse);
18
14
  }
19
15
 
@@ -25,94 +21,43 @@ message ParsePromptPayQrRequest {
25
21
 
26
22
  message ParsePromptPayQrResponse {
27
23
  int64 scan_id = 1;
28
- string quote_id = 2;
29
- string status = 3;
30
- string payload_json = 4;
24
+ string input_amount_to_pay = 2;
25
+ string input_currency_to_pay = 3;
26
+ string converted_amount_to_pay = 4;
27
+ string converted_currency_to_pay = 5;
28
+ double fee_percent = 6;
29
+ string fee_on_converted = 7;
30
+ string converted_amount_with_fee = 8;
31
31
  }
32
32
 
33
33
  message ConfirmPayoutPaymentRequest {
34
34
  int64 scan_id = 1;
35
- string quote_id = 2;
36
35
  string user_id = 3;
37
36
  }
38
37
 
39
38
  message ConfirmPayoutPaymentResponse {
40
39
  int64 payout_id = 1;
41
40
  string status = 2;
42
- string payload_json = 3;
43
41
  }
44
42
 
45
43
  message HandlePayoutWebhookRequest {
46
- string payload_json = 1;
44
+ bytes rawBody = 1;
47
45
  }
48
46
 
49
47
  message HandlePayoutWebhookResponse {
50
48
  bool ok = 1;
51
49
  }
52
50
 
53
- message ParseMusePayPromptPayQrTestRequest {
54
- string qr_string = 1;
55
- string user_id = 2;
56
- double amount = 3;
57
- }
58
-
59
- message ParseMusePayPromptPayQrTestResponse {
60
- int64 scan_id = 1;
61
- string quote_id = 2;
62
- string status = 3;
63
- string payload_json = 4;
64
- string input_amount_to_pay = 5;
65
- string input_currency_to_pay = 6;
66
- string converted_amount_to_pay = 7;
67
- string converted_currency_to_pay = 8;
68
- }
69
-
70
- message ParseMusePayPromptPayQrRequest {
71
- string qr_string = 1;
72
- string user_id = 2;
73
- double amount = 3;
74
- }
75
-
76
- message ParseMusePayPromptPayQrResponse {
77
- int64 scan_id = 1;
78
- string quote_id = 2;
79
- string status = 3;
80
- string payload_json = 4;
81
- string input_amount_to_pay = 5;
82
- string input_currency_to_pay = 6;
83
- string converted_amount_to_pay = 7;
84
- string converted_currency_to_pay = 8;
85
- }
86
-
87
- message ConfirmMusePayPayoutPaymentRequest {
88
- int64 scan_id = 1;
89
- string quote_id = 2;
90
- string user_id = 3;
91
- }
92
-
93
- message ConfirmMusePayPayoutPaymentResponse {
94
- int64 payout_id = 1;
95
- string status = 2;
96
- string payload_json = 3;
97
- }
98
-
99
- message HandleMusePayWebhookRequest {
100
- bytes rawBody = 1;
101
- }
102
-
103
- message HandleMusePayWebhookResponse {
104
- int64 payout_id = 1;
105
- string status = 2;
106
- bool handled = 3;
107
- }
108
-
109
51
  message GetPayoutRequest {
110
52
  int64 payout_id = 1;
111
- string user_id = 2;
112
53
  }
113
54
 
114
55
  message GetPayoutResponse {
115
56
  int64 payout_id = 1;
116
- string status = 2;
117
- string payload_json = 3;
57
+ int64 scan_id = 2;
58
+ string status = 3;
59
+ optional string final_converted_amount = 4;
60
+ optional string final_converted_currency = 5;
61
+ string created_at = 6;
62
+ optional string completed_at = 7;
118
63
  }
package/proto/user.proto CHANGED
@@ -16,6 +16,8 @@ service UserService {
16
16
  rpc SubmitWalletCrmExchangeOrder (SubmitWalletCrmExchangeOrderRequest) returns (SubmitWalletCrmExchangeOrderResponse);
17
17
  // Уникальные валютные пары из последних заявок на обмен (по БД user-service), без дубликатов пар.
18
18
  rpc ListWalletExchangeRecentPairs (ListWalletExchangeRecentPairsRequest) returns (ListWalletExchangeRecentPairsResponse);
19
+ // Сообщение менеджера клиенту: публикация в Rabbit app.notification → gateway → Socket.IO `notification`.
20
+ rpc ForwardManagerChatMessage (ForwardManagerChatMessageRequest) returns (ForwardManagerChatMessageResponse);
19
21
  }
20
22
 
21
23
  enum UserStatus {
@@ -166,6 +168,23 @@ message ListWalletExchangeRecentPairsResponse {
166
168
  repeated WalletExchangeRecentPairItem pairs = 1;
167
169
  }
168
170
 
171
+ message ForwardManagerChatMessageRequest {
172
+ string forward_secret = 1;
173
+ string text = 2;
174
+ bool is_echo = 3;
175
+ string wallet_client_id = 4;
176
+ optional string wallet_manager_id = 5;
177
+ optional string datetime = 6;
178
+ optional string content = 7;
179
+ optional string message_id = 8;
180
+ // JSON для reply_to: отсутствие поля — нет ответа; строка "null" — null; иначе JSON-значение.
181
+ optional string reply_to_json = 9;
182
+ }
183
+
184
+ message ForwardManagerChatMessageResponse {
185
+ bool ok = 1;
186
+ }
187
+
169
188
  message UserBalance {
170
189
  string asset = 1;
171
190
  string network = 2;