@arbiwallet/contracts 1.0.237 → 1.0.238

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.
@@ -259,6 +259,71 @@ export interface ExchangeCalculationsFiltersRequest {
259
259
  search?: string | undefined;
260
260
  }
261
261
 
262
+ export interface CreateExchangePaymentRequest {
263
+ managerUserId?: string | undefined;
264
+ managerId?: string | undefined;
265
+ calculationId?: string | undefined;
266
+ agentId: number;
267
+ amount?: number | undefined;
268
+ customerId?: string | undefined;
269
+ cryptoNetwork?: string | undefined;
270
+ customerSource?: string | undefined;
271
+ customerReferrer?: string | undefined;
272
+ }
273
+
274
+ export interface CreateExchangePaymentResult {
275
+ paymentId: string;
276
+ paymentUuid: string;
277
+ amount: number;
278
+ status: number;
279
+ agent: string;
280
+ walletId?: string | undefined;
281
+ cryptoNetwork?: string | undefined;
282
+ cryptoAddress?: string | undefined;
283
+ arbiLink?: string | undefined;
284
+ paymentLink?: string | undefined;
285
+ }
286
+
287
+ export interface CreateExchangePaymentResponse {
288
+ ok: boolean;
289
+ result?: CreateExchangePaymentResult | undefined;
290
+ error?: string | undefined;
291
+ validationErrors?: { [key: string]: any } | undefined;
292
+ }
293
+
294
+ export interface HandlePaymentWebhookRequest {
295
+ jsonPayload: string;
296
+ }
297
+
298
+ export interface HandlePaymentWebhookResponse {
299
+ ok: boolean;
300
+ status: string;
301
+ }
302
+
303
+ export interface GetExchangePaymentsRequest {
304
+ page?: number | undefined;
305
+ limit?: number | undefined;
306
+ }
307
+
308
+ export interface GetExchangePaymentsItem {
309
+ paymentId: string;
310
+ paymentUuid: string;
311
+ amount: number;
312
+ status: number;
313
+ paymentAgentStatus?: string | undefined;
314
+ paymentLink?: string | undefined;
315
+ qrLink?: string | undefined;
316
+ cryptoAddress?: string | undefined;
317
+ }
318
+
319
+ export interface GetExchangePaymentsResponse {
320
+ payments: GetExchangePaymentsItem[];
321
+ page: number;
322
+ limit: number;
323
+ total: number;
324
+ totalPages: number;
325
+ }
326
+
262
327
  export interface PaymentsSummaryItem {
263
328
  currency: string;
264
329
  total: number;
@@ -404,6 +469,12 @@ export interface ExchangeCoreServiceClient {
404
469
 
405
470
  getTransactionsSummary(request: GetTransactionsSummaryRequest): Observable<GetTransactionsSummaryResponse>;
406
471
 
472
+ createExchangePayment(request: CreateExchangePaymentRequest): Observable<CreateExchangePaymentResponse>;
473
+
474
+ handlePaymentWebhook(request: HandlePaymentWebhookRequest): Observable<HandlePaymentWebhookResponse>;
475
+
476
+ getExchangePayments(request: GetExchangePaymentsRequest): Observable<GetExchangePaymentsResponse>;
477
+
407
478
  getPaymentsSummary(request: ExchangeCalculationsFiltersRequest): Observable<GetPaymentsSummaryResponse>;
408
479
 
409
480
  getWallets(request: GetWalletsRequest): Observable<GetWalletsResponse>;
@@ -449,6 +520,18 @@ export interface ExchangeCoreServiceController {
449
520
  | Observable<GetTransactionsSummaryResponse>
450
521
  | GetTransactionsSummaryResponse;
451
522
 
523
+ createExchangePayment(
524
+ request: CreateExchangePaymentRequest,
525
+ ): Promise<CreateExchangePaymentResponse> | Observable<CreateExchangePaymentResponse> | CreateExchangePaymentResponse;
526
+
527
+ handlePaymentWebhook(
528
+ request: HandlePaymentWebhookRequest,
529
+ ): Promise<HandlePaymentWebhookResponse> | Observable<HandlePaymentWebhookResponse> | HandlePaymentWebhookResponse;
530
+
531
+ getExchangePayments(
532
+ request: GetExchangePaymentsRequest,
533
+ ): Promise<GetExchangePaymentsResponse> | Observable<GetExchangePaymentsResponse> | GetExchangePaymentsResponse;
534
+
452
535
  getPaymentsSummary(
453
536
  request: ExchangeCalculationsFiltersRequest,
454
537
  ): Promise<GetPaymentsSummaryResponse> | Observable<GetPaymentsSummaryResponse> | GetPaymentsSummaryResponse;
@@ -484,6 +567,9 @@ export function ExchangeCoreServiceControllerMethods() {
484
567
  "cancelExchangeDeal",
485
568
  "getTransactions",
486
569
  "getTransactionsSummary",
570
+ "createExchangePayment",
571
+ "handlePaymentWebhook",
572
+ "getExchangePayments",
487
573
  "getPaymentsSummary",
488
574
  "getWallets",
489
575
  "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.237",
4
+ "version": "1.0.238",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -18,6 +18,9 @@ service ExchangeCoreService {
18
18
  rpc GetTransactions(GetTransactionsRequest) returns (GetTransactionsResponse);
19
19
  rpc GetTransactionsSummary(GetTransactionsSummaryRequest) returns (GetTransactionsSummaryResponse);
20
20
 
21
+ rpc CreateExchangePayment(CreateExchangePaymentRequest) returns (CreateExchangePaymentResponse);
22
+ rpc HandlePaymentWebhook(HandlePaymentWebhookRequest) returns (HandlePaymentWebhookResponse);
23
+ rpc GetExchangePayments(GetExchangePaymentsRequest) returns (GetExchangePaymentsResponse);
21
24
  rpc GetPaymentsSummary(ExchangeCalculationsFiltersRequest) returns (GetPaymentsSummaryResponse);
22
25
 
23
26
  rpc GetWallets(GetWalletsRequest) returns (GetWalletsResponse);
@@ -282,6 +285,72 @@ message ExchangeCalculationsFiltersRequest {
282
285
  optional string search = 8;
283
286
  }
284
287
 
288
+ message CreateExchangePaymentRequest {
289
+ optional string manager_user_id = 1;
290
+ optional string manager_id = 2;
291
+
292
+ optional string calculation_id = 3;
293
+ int32 agent_id = 4;
294
+ optional double amount = 5;
295
+ optional string customer_id = 6;
296
+ optional string crypto_network = 7;
297
+ optional string customer_source = 8;
298
+ optional string customer_referrer = 9;
299
+ }
300
+
301
+ message CreateExchangePaymentResult {
302
+ string payment_id = 1;
303
+ string payment_uuid = 2;
304
+ double amount = 3;
305
+ int32 status = 4;
306
+ string agent = 5;
307
+ optional string wallet_id = 6;
308
+ optional string crypto_network = 7;
309
+ optional string crypto_address = 8;
310
+ optional string arbi_link = 9;
311
+ optional string payment_link = 10;
312
+ }
313
+
314
+ message CreateExchangePaymentResponse {
315
+ bool ok = 1;
316
+ optional CreateExchangePaymentResult result = 2;
317
+ optional string error = 3;
318
+ optional google.protobuf.Struct validationErrors = 4;
319
+ }
320
+
321
+ message HandlePaymentWebhookRequest {
322
+ string json_payload = 1;
323
+ }
324
+
325
+ message HandlePaymentWebhookResponse {
326
+ bool ok = 1;
327
+ string status = 2;
328
+ }
329
+
330
+ message GetExchangePaymentsRequest {
331
+ optional int32 page = 1;
332
+ optional int32 limit = 2;
333
+ }
334
+
335
+ message GetExchangePaymentsItem {
336
+ string payment_id = 1;
337
+ string payment_uuid = 2;
338
+ double amount = 3;
339
+ int32 status = 4;
340
+ optional string payment_agent_status = 5;
341
+ optional string payment_link = 6;
342
+ optional string qr_link = 7;
343
+ optional string crypto_address = 8;
344
+ }
345
+
346
+ message GetExchangePaymentsResponse {
347
+ repeated GetExchangePaymentsItem payments = 1;
348
+ int32 page = 2;
349
+ int32 limit = 3;
350
+ int32 total = 4;
351
+ int32 total_pages = 5;
352
+ }
353
+
285
354
  message PaymentsSummaryItem {
286
355
  string currency = 1;
287
356
  double total = 2;