@arbiwallet/contracts 1.0.237 → 1.0.239

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