@marcohefti/request-network-api-client 0.5.10 → 0.5.12
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/README.md +4 -4
- package/dist/cjs/domains/client-ids/index.js +5 -5
- package/dist/cjs/domains/client-ids/index.js.map +1 -1
- package/dist/cjs/domains/currencies/index.js +15 -15
- package/dist/cjs/domains/currencies/index.js.map +1 -1
- package/dist/cjs/domains/payee-destination/index.js +276 -0
- package/dist/cjs/domains/payee-destination/index.js.map +1 -0
- package/dist/cjs/domains/payouts/index.js +2 -2
- package/dist/cjs/domains/payouts/index.js.map +1 -1
- package/dist/cjs/domains/requests/index.js +7 -5
- package/dist/cjs/domains/requests/index.js.map +1 -1
- package/dist/cjs/index.js +271 -112
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/domains/client-ids/index.d.mts +2 -2
- package/dist/esm/domains/client-ids/index.js +5 -5
- package/dist/esm/domains/client-ids/index.js.map +1 -1
- package/dist/esm/domains/currencies/index.d.mts +2 -2
- package/dist/esm/domains/currencies/index.js +15 -15
- package/dist/esm/domains/currencies/index.js.map +1 -1
- package/dist/esm/domains/payee-destination/index.d.mts +2 -0
- package/dist/esm/domains/payee-destination/index.js +274 -0
- package/dist/esm/domains/payee-destination/index.js.map +1 -0
- package/dist/esm/domains/payer/index.d.mts +2 -2
- package/dist/esm/domains/payouts/index.d.mts +2 -2
- package/dist/esm/domains/payouts/index.js +2 -2
- package/dist/esm/domains/payouts/index.js.map +1 -1
- package/dist/esm/domains/requests/index.d.mts +2 -2
- package/dist/esm/domains/requests/index.js +7 -5
- package/dist/esm/domains/requests/index.js.map +1 -1
- package/dist/esm/{index-Bum0bfZQ.d.mts → index-DJGHELE1.d.mts} +16 -16
- package/dist/esm/{index-Q2g0D7V8.d.mts → index-DJjp2Jbk.d.mts} +1 -1
- package/dist/esm/index-DQIf9k5x.d.mts +31 -0
- package/dist/esm/{index-BmWmfcnn.d.mts → index-DbnV_D6L.d.mts} +1 -1
- package/dist/esm/{index-CNK36ZX5.d.mts → index-hYoC2ndH.d.mts} +1 -1
- package/dist/esm/{index-Cd7x0Hv-.d.mts → index-y1nxa55y.d.mts} +1 -1
- package/dist/esm/index.d.mts +124 -120
- package/dist/esm/index.js +271 -113
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{openapi-types-CtUFCrk4.d.mts → openapi-types-CQ1z27_K.d.mts} +310 -51
- package/package.json +13 -7
|
@@ -386,11 +386,9 @@ interface operations {
|
|
|
386
386
|
ClientIdV2Controller_findAll_v2: {
|
|
387
387
|
parameters: {
|
|
388
388
|
query?: never;
|
|
389
|
-
header
|
|
390
|
-
/** @description API key for authentication
|
|
391
|
-
"x-api-key"
|
|
392
|
-
/** @description Bearer token for session authentication (optional if using API key) */
|
|
393
|
-
Authorization?: string;
|
|
389
|
+
header: {
|
|
390
|
+
/** @description API key for authentication */
|
|
391
|
+
"x-api-key": string;
|
|
394
392
|
};
|
|
395
393
|
path?: never;
|
|
396
394
|
cookie?: never;
|
|
@@ -414,7 +412,7 @@ interface operations {
|
|
|
414
412
|
}[];
|
|
415
413
|
};
|
|
416
414
|
};
|
|
417
|
-
/** @description Unauthorized
|
|
415
|
+
/** @description Unauthorized */
|
|
418
416
|
401: {
|
|
419
417
|
headers: {
|
|
420
418
|
[name: string]: unknown;
|
|
@@ -433,11 +431,9 @@ interface operations {
|
|
|
433
431
|
ClientIdV2Controller_create_v2: {
|
|
434
432
|
parameters: {
|
|
435
433
|
query?: never;
|
|
436
|
-
header
|
|
437
|
-
/** @description API key for authentication
|
|
438
|
-
"x-api-key"
|
|
439
|
-
/** @description Bearer token for session authentication (optional if using API key) */
|
|
440
|
-
Authorization?: string;
|
|
434
|
+
header: {
|
|
435
|
+
/** @description API key for authentication */
|
|
436
|
+
"x-api-key": string;
|
|
441
437
|
};
|
|
442
438
|
path?: never;
|
|
443
439
|
cookie?: never;
|
|
@@ -448,10 +444,16 @@ interface operations {
|
|
|
448
444
|
label: string;
|
|
449
445
|
/** @description List of allowed domain origins (normalized) */
|
|
450
446
|
allowedDomains: string[];
|
|
451
|
-
/** @description Fee percentage (e.g., '1' = 1%, '2.5' = 2.5%). If set to '0', allows API request fees to take precedence. If set to any other value, overrides any fee passed via API. */
|
|
447
|
+
/** @description Fee percentage (e.g., '1' = 1%, '2.5' = 2.5%, '2.55' = 2.55%). Maximum 2 decimal places. If set to '0', allows API request fees to take precedence. If set to any other value, overrides any fee passed via API. */
|
|
452
448
|
feePercentage?: string;
|
|
453
449
|
/** @description Wallet address to receive fees. Required if feePercentage is set. */
|
|
454
450
|
feeAddress?: string;
|
|
451
|
+
/** @description Wallet address that will act as operator for commerce payments. The API operator wallet will execute transactions on behalf of this address. Can be a smart wallet that has granted permissions to the API operator. */
|
|
452
|
+
operatorWalletAddress?: string;
|
|
453
|
+
/** @description Default pre-approval expiry duration in seconds for commerce transactions. If set, overrides the value passed in /v2/commerce-payments/authorize/calldata endpoint. */
|
|
454
|
+
defaultPreApprovalExpiry?: number;
|
|
455
|
+
/** @description Default authorization expiry duration in seconds for commerce transactions. If set, overrides the value passed in /v2/commerce-payments/authorize/calldata endpoint. */
|
|
456
|
+
defaultAuthorizationExpiry?: number;
|
|
455
457
|
};
|
|
456
458
|
};
|
|
457
459
|
};
|
|
@@ -469,6 +471,9 @@ interface operations {
|
|
|
469
471
|
allowedDomains?: string[];
|
|
470
472
|
feePercentage?: string | null;
|
|
471
473
|
feeAddress?: string | null;
|
|
474
|
+
operatorWalletAddress?: string | null;
|
|
475
|
+
defaultPreApprovalExpiry?: number | null;
|
|
476
|
+
defaultAuthorizationExpiry?: number | null;
|
|
472
477
|
status?: string;
|
|
473
478
|
createdAt?: string;
|
|
474
479
|
};
|
|
@@ -481,7 +486,7 @@ interface operations {
|
|
|
481
486
|
};
|
|
482
487
|
content?: never;
|
|
483
488
|
};
|
|
484
|
-
/** @description Unauthorized
|
|
489
|
+
/** @description Unauthorized */
|
|
485
490
|
401: {
|
|
486
491
|
headers: {
|
|
487
492
|
[name: string]: unknown;
|
|
@@ -500,11 +505,9 @@ interface operations {
|
|
|
500
505
|
ClientIdV2Controller_findOne_v2: {
|
|
501
506
|
parameters: {
|
|
502
507
|
query?: never;
|
|
503
|
-
header
|
|
504
|
-
/** @description API key for authentication
|
|
505
|
-
"x-api-key"
|
|
506
|
-
/** @description Bearer token for session authentication (optional if using API key) */
|
|
507
|
-
Authorization?: string;
|
|
508
|
+
header: {
|
|
509
|
+
/** @description API key for authentication */
|
|
510
|
+
"x-api-key": string;
|
|
508
511
|
};
|
|
509
512
|
path: {
|
|
510
513
|
/** @description Client ID internal identifier */
|
|
@@ -527,6 +530,9 @@ interface operations {
|
|
|
527
530
|
allowedDomains?: string[];
|
|
528
531
|
feePercentage?: string | null;
|
|
529
532
|
feeAddress?: string | null;
|
|
533
|
+
operatorWalletAddress?: string | null;
|
|
534
|
+
defaultPreApprovalExpiry?: number | null;
|
|
535
|
+
defaultAuthorizationExpiry?: number | null;
|
|
530
536
|
status?: string;
|
|
531
537
|
createdAt?: string;
|
|
532
538
|
updatedAt?: string;
|
|
@@ -534,7 +540,7 @@ interface operations {
|
|
|
534
540
|
};
|
|
535
541
|
};
|
|
536
542
|
};
|
|
537
|
-
/** @description Unauthorized
|
|
543
|
+
/** @description Unauthorized */
|
|
538
544
|
401: {
|
|
539
545
|
headers: {
|
|
540
546
|
[name: string]: unknown;
|
|
@@ -560,11 +566,9 @@ interface operations {
|
|
|
560
566
|
ClientIdV2Controller_update_v2: {
|
|
561
567
|
parameters: {
|
|
562
568
|
query?: never;
|
|
563
|
-
header
|
|
564
|
-
/** @description API key for authentication
|
|
565
|
-
"x-api-key"
|
|
566
|
-
/** @description Bearer token for session authentication (optional if using API key) */
|
|
567
|
-
Authorization?: string;
|
|
569
|
+
header: {
|
|
570
|
+
/** @description API key for authentication */
|
|
571
|
+
"x-api-key": string;
|
|
568
572
|
};
|
|
569
573
|
path: {
|
|
570
574
|
/** @description Client ID internal identifier */
|
|
@@ -578,10 +582,16 @@ interface operations {
|
|
|
578
582
|
label?: string;
|
|
579
583
|
/** @description List of allowed domain origins (normalized) */
|
|
580
584
|
allowedDomains?: string[];
|
|
581
|
-
/** @description Fee percentage (e.g., '1' = 1%, '2.5' = 2.5%). If set to '0', allows API request fees to take precedence. If set to any other value, overrides any fee passed via API. Set to null to unset. */
|
|
585
|
+
/** @description Fee percentage (e.g., '1' = 1%, '2.5' = 2.5%, '2.55' = 2.55%). Maximum 2 decimal places. If set to '0', allows API request fees to take precedence. If set to any other value, overrides any fee passed via API. Set to null to unset. */
|
|
582
586
|
feePercentage?: string | null;
|
|
583
587
|
/** @description Wallet address to receive fees. Required if feePercentage is set. Set to null to unset. */
|
|
584
588
|
feeAddress?: string | null;
|
|
589
|
+
/** @description Wallet address that will act as operator for commerce payments. The API operator wallet will execute transactions on behalf of this address. Can be a smart wallet that has granted permissions to the API operator. Set to null to unset. Note: Changing this will only affect new payments; existing payments will continue using their original operator address. */
|
|
590
|
+
operatorWalletAddress?: string | null;
|
|
591
|
+
/** @description Default pre-approval expiry duration in seconds for commerce transactions. If set, overrides the value passed in /v2/commerce-payments/authorize/calldata endpoint. Set to null to unset. */
|
|
592
|
+
defaultPreApprovalExpiry?: number | null;
|
|
593
|
+
/** @description Default authorization expiry duration in seconds for commerce transactions. If set, overrides the value passed in /v2/commerce-payments/authorize/calldata endpoint. Set to null to unset. */
|
|
594
|
+
defaultAuthorizationExpiry?: number | null;
|
|
585
595
|
/** @enum {string} */
|
|
586
596
|
status?: "active" | "inactive" | "revoked";
|
|
587
597
|
};
|
|
@@ -601,6 +611,9 @@ interface operations {
|
|
|
601
611
|
allowedDomains?: string[];
|
|
602
612
|
feePercentage?: string | null;
|
|
603
613
|
feeAddress?: string | null;
|
|
614
|
+
operatorWalletAddress?: string | null;
|
|
615
|
+
defaultPreApprovalExpiry?: number | null;
|
|
616
|
+
defaultAuthorizationExpiry?: number | null;
|
|
604
617
|
status?: string;
|
|
605
618
|
updatedAt?: string;
|
|
606
619
|
};
|
|
@@ -613,7 +626,7 @@ interface operations {
|
|
|
613
626
|
};
|
|
614
627
|
content?: never;
|
|
615
628
|
};
|
|
616
|
-
/** @description Unauthorized
|
|
629
|
+
/** @description Unauthorized */
|
|
617
630
|
401: {
|
|
618
631
|
headers: {
|
|
619
632
|
[name: string]: unknown;
|
|
@@ -639,11 +652,9 @@ interface operations {
|
|
|
639
652
|
ClientIdV2Controller_delete_v2: {
|
|
640
653
|
parameters: {
|
|
641
654
|
query?: never;
|
|
642
|
-
header
|
|
643
|
-
/** @description API key for authentication
|
|
644
|
-
"x-api-key"
|
|
645
|
-
/** @description Bearer token for session authentication (optional if using API key) */
|
|
646
|
-
Authorization?: string;
|
|
655
|
+
header: {
|
|
656
|
+
/** @description API key for authentication */
|
|
657
|
+
"x-api-key": string;
|
|
647
658
|
};
|
|
648
659
|
path: {
|
|
649
660
|
/** @description Client ID internal identifier */
|
|
@@ -660,7 +671,7 @@ interface operations {
|
|
|
660
671
|
};
|
|
661
672
|
content?: never;
|
|
662
673
|
};
|
|
663
|
-
/** @description Unauthorized
|
|
674
|
+
/** @description Unauthorized */
|
|
664
675
|
401: {
|
|
665
676
|
headers: {
|
|
666
677
|
[name: string]: unknown;
|
|
@@ -698,7 +709,7 @@ interface operations {
|
|
|
698
709
|
"application/json": {
|
|
699
710
|
/** @description The wallet address of the payer */
|
|
700
711
|
payer?: string;
|
|
701
|
-
/** @description The wallet address of the payee */
|
|
712
|
+
/** @description The wallet address of the payee (Ethereum 0x... or TRON T...) */
|
|
702
713
|
payee: string;
|
|
703
714
|
/** @description The payable amount of the invoice, in human readable format */
|
|
704
715
|
amount: string;
|
|
@@ -887,7 +898,7 @@ interface operations {
|
|
|
887
898
|
/** @description The source chain of the crosschain payment */
|
|
888
899
|
chain?: "BASE" | "OPTIMISM" | "ARBITRUM" | "ETHEREUM";
|
|
889
900
|
/** @description The source token of the crosschain payment */
|
|
890
|
-
token?: "USDC" | "USDT"
|
|
901
|
+
token?: "USDC" | "USDT";
|
|
891
902
|
/** @description The amount to pay, in human readable format */
|
|
892
903
|
amount?: string;
|
|
893
904
|
};
|
|
@@ -1036,7 +1047,7 @@ interface operations {
|
|
|
1036
1047
|
* @description Type of fee
|
|
1037
1048
|
* @enum {string}
|
|
1038
1049
|
*/
|
|
1039
|
-
type?: "gas" | "platform" | "crosschain" | "crypto-to-fiat" | "offramp";
|
|
1050
|
+
type?: "gas" | "platform" | "crosschain" | "crypto-to-fiat" | "offramp" | "protocol";
|
|
1040
1051
|
/**
|
|
1041
1052
|
* @description Stage when the fee is applied
|
|
1042
1053
|
* @enum {string}
|
|
@@ -1045,9 +1056,9 @@ interface operations {
|
|
|
1045
1056
|
/** @description Provider that charged the fee */
|
|
1046
1057
|
provider?: string;
|
|
1047
1058
|
/** @description Fee amount in human-readable format (formatted with token decimals) */
|
|
1048
|
-
amount?: string;
|
|
1059
|
+
amount?: string | null;
|
|
1049
1060
|
/** @description Fee amount in USD */
|
|
1050
|
-
amountInUSD?: string;
|
|
1061
|
+
amountInUSD?: string | null;
|
|
1051
1062
|
/** @description Fee currency */
|
|
1052
1063
|
currency?: string;
|
|
1053
1064
|
/** @description Address that received the fee */
|
|
@@ -1179,7 +1190,7 @@ interface operations {
|
|
|
1179
1190
|
"application/json": {
|
|
1180
1191
|
/** @description The wallet address of the payer */
|
|
1181
1192
|
payer?: string;
|
|
1182
|
-
/** @description The wallet address of the payee. Required for all requests except crypto-to-fiat */
|
|
1193
|
+
/** @description The wallet address of the payee (Ethereum 0x... or TRON T...). Required for all requests except crypto-to-fiat */
|
|
1183
1194
|
payee?: string;
|
|
1184
1195
|
/** @description The payable amount of the invoice, in human readable format */
|
|
1185
1196
|
amount: string;
|
|
@@ -1351,6 +1362,47 @@ interface operations {
|
|
|
1351
1362
|
} | null;
|
|
1352
1363
|
/** @description Merchant reference for receipt tracking and identification */
|
|
1353
1364
|
reference?: string | null;
|
|
1365
|
+
/** @description Request amount in USD (actual if paid, current market rate if unpaid) */
|
|
1366
|
+
amountInUsd?: string | null;
|
|
1367
|
+
/** @description Conversion rate. Available for: unpaid requests and fully paid requests with single payment. Null for: partially paid requests and fully paid requests with multiple payments. */
|
|
1368
|
+
conversionRate?: string | null;
|
|
1369
|
+
/**
|
|
1370
|
+
* @description Source of the conversion rate
|
|
1371
|
+
* @enum {string}
|
|
1372
|
+
*/
|
|
1373
|
+
rateSource?: "lifi" | "chainlink" | "coingecko" | "unknown" | "mixed";
|
|
1374
|
+
/** @description Detailed breakdown for partial payments or multiple payments. Provides individual payment rates when top-level rate is null. */
|
|
1375
|
+
conversionBreakdown?: {
|
|
1376
|
+
paidAmount?: string;
|
|
1377
|
+
paidAmountInUsd?: string;
|
|
1378
|
+
remainingAmount?: string;
|
|
1379
|
+
remainingAmountInUsd?: string;
|
|
1380
|
+
currentMarketRate?: string | null;
|
|
1381
|
+
/** @enum {string|null} */
|
|
1382
|
+
currentMarketRateSource?: "lifi" | "chainlink" | "coingecko" | "unknown" | null;
|
|
1383
|
+
payments?: {
|
|
1384
|
+
amount?: string;
|
|
1385
|
+
amountInUsd?: string;
|
|
1386
|
+
conversionRate?: string;
|
|
1387
|
+
/** @enum {string} */
|
|
1388
|
+
rateSource?: "lifi" | "chainlink" | "coingecko" | "unknown";
|
|
1389
|
+
timestamp?: string;
|
|
1390
|
+
}[];
|
|
1391
|
+
} | null;
|
|
1392
|
+
/** @description Associated fees (actual if paid, empty if unpaid) */
|
|
1393
|
+
fees?: {
|
|
1394
|
+
/**
|
|
1395
|
+
* @description Type of fee
|
|
1396
|
+
* @enum {string}
|
|
1397
|
+
*/
|
|
1398
|
+
type?: "gas" | "platform" | "crosschain" | "crypto-to-fiat" | "offramp" | "protocol";
|
|
1399
|
+
/** @description Fee provider */
|
|
1400
|
+
provider?: string;
|
|
1401
|
+
/** @description Fee amount in human-readable format (formatted with token decimals) */
|
|
1402
|
+
amount?: string | null;
|
|
1403
|
+
/** @description Fee currency */
|
|
1404
|
+
currency?: string;
|
|
1405
|
+
}[] | null;
|
|
1354
1406
|
};
|
|
1355
1407
|
};
|
|
1356
1408
|
};
|
|
@@ -1387,7 +1439,14 @@ interface operations {
|
|
|
1387
1439
|
};
|
|
1388
1440
|
cookie?: never;
|
|
1389
1441
|
};
|
|
1390
|
-
requestBody
|
|
1442
|
+
requestBody: {
|
|
1443
|
+
content: {
|
|
1444
|
+
"application/json": {
|
|
1445
|
+
/** @description Whether the recurrence is stopped */
|
|
1446
|
+
isRecurrenceStopped: boolean;
|
|
1447
|
+
};
|
|
1448
|
+
};
|
|
1449
|
+
};
|
|
1391
1450
|
responses: {
|
|
1392
1451
|
/** @description Recurrence updated successfully */
|
|
1393
1452
|
200: {
|
|
@@ -1420,7 +1479,7 @@ interface operations {
|
|
|
1420
1479
|
/** @description The source chain of the crosschain payment */
|
|
1421
1480
|
chain?: "BASE" | "OPTIMISM" | "ARBITRUM" | "ETHEREUM";
|
|
1422
1481
|
/** @description The source token of the crosschain payment */
|
|
1423
|
-
token?: "USDC" | "USDT"
|
|
1482
|
+
token?: "USDC" | "USDT";
|
|
1424
1483
|
/** @description The amount to pay, in human readable format */
|
|
1425
1484
|
amount?: string;
|
|
1426
1485
|
/** @description Optional client user ID for off-ramp payments */
|
|
@@ -1578,7 +1637,7 @@ interface operations {
|
|
|
1578
1637
|
* @description Type of fee
|
|
1579
1638
|
* @enum {string}
|
|
1580
1639
|
*/
|
|
1581
|
-
type?: "gas" | "platform" | "crosschain" | "crypto-to-fiat" | "offramp";
|
|
1640
|
+
type?: "gas" | "platform" | "crosschain" | "crypto-to-fiat" | "offramp" | "protocol";
|
|
1582
1641
|
/**
|
|
1583
1642
|
* @description Stage when the fee is applied
|
|
1584
1643
|
* @enum {string}
|
|
@@ -1587,9 +1646,9 @@ interface operations {
|
|
|
1587
1646
|
/** @description Provider that charged the fee */
|
|
1588
1647
|
provider?: string;
|
|
1589
1648
|
/** @description Fee amount in human-readable format (formatted with token decimals) */
|
|
1590
|
-
amount?: string;
|
|
1649
|
+
amount?: string | null;
|
|
1591
1650
|
/** @description Fee amount in USD */
|
|
1592
|
-
amountInUSD?: string;
|
|
1651
|
+
amountInUSD?: string | null;
|
|
1593
1652
|
/** @description Fee currency */
|
|
1594
1653
|
currency?: string;
|
|
1595
1654
|
/** @description Address that received the fee */
|
|
@@ -2734,7 +2793,7 @@ interface operations {
|
|
|
2734
2793
|
requestBody: {
|
|
2735
2794
|
content: {
|
|
2736
2795
|
"application/json": {
|
|
2737
|
-
/** @description The wallet address of the payee */
|
|
2796
|
+
/** @description The wallet address of the payee (Ethereum 0x... or TRON T...) */
|
|
2738
2797
|
payee: string;
|
|
2739
2798
|
/** @description The payable amount of the invoice, in human readable format */
|
|
2740
2799
|
amount: string;
|
|
@@ -2785,7 +2844,7 @@ interface operations {
|
|
|
2785
2844
|
query?: {
|
|
2786
2845
|
/** @description Search by blockchain transaction hash (source or destination). Returns ALL payments from the same transaction, including batch payments. Must be a valid 66-character hex string starting with '0x'. Example: '0x1234567890abcdef...' */
|
|
2787
2846
|
txHash?: string;
|
|
2788
|
-
/** @description Search by
|
|
2847
|
+
/** @description Search by wallet address (payer or payee). Supports Ethereum (0x...) and TRON (T...) addresses. Returns ALL payments involving this address, including batch payments where the address is either sender or recipient. */
|
|
2789
2848
|
walletAddress?: string;
|
|
2790
2849
|
/** @description Search by unique payment reference generated by the Request Network. This is the hex identifier used for on-chain payments. Example: '0xb3581f0b0f74cc61' */
|
|
2791
2850
|
paymentReference?: string;
|
|
@@ -2868,7 +2927,7 @@ interface operations {
|
|
|
2868
2927
|
* @description Type of fee
|
|
2869
2928
|
* @enum {string}
|
|
2870
2929
|
*/
|
|
2871
|
-
type?: "gas" | "platform" | "crosschain" | "crypto-to-fiat" | "offramp";
|
|
2930
|
+
type?: "gas" | "platform" | "crosschain" | "crypto-to-fiat" | "offramp" | "protocol";
|
|
2872
2931
|
/**
|
|
2873
2932
|
* @description Stage when the fee is applied
|
|
2874
2933
|
* @enum {string}
|
|
@@ -2877,9 +2936,9 @@ interface operations {
|
|
|
2877
2936
|
/** @description Provider that charged the fee */
|
|
2878
2937
|
provider?: string;
|
|
2879
2938
|
/** @description Fee amount in human-readable format (formatted with token decimals) */
|
|
2880
|
-
amount?: string;
|
|
2939
|
+
amount?: string | null;
|
|
2881
2940
|
/** @description Fee amount in USD */
|
|
2882
|
-
amountInUSD?: string;
|
|
2941
|
+
amountInUSD?: string | null;
|
|
2883
2942
|
/** @description Fee currency */
|
|
2884
2943
|
currency?: string;
|
|
2885
2944
|
/** @description Address that received the fee */
|
|
@@ -3009,7 +3068,7 @@ interface operations {
|
|
|
3009
3068
|
requestBody: {
|
|
3010
3069
|
content: {
|
|
3011
3070
|
"application/json": {
|
|
3012
|
-
/** @description The wallet address of the payee */
|
|
3071
|
+
/** @description The wallet address of the payee (Ethereum 0x... or TRON T...) */
|
|
3013
3072
|
payee: string;
|
|
3014
3073
|
/** @description The payable amount of the invoice, in human readable format */
|
|
3015
3074
|
amount: string;
|
|
@@ -3019,7 +3078,7 @@ interface operations {
|
|
|
3019
3078
|
paymentCurrency: string;
|
|
3020
3079
|
/** @description Fee percentage to apply at payment time (e.g., '2.5' for 2.5%) */
|
|
3021
3080
|
feePercentage?: string;
|
|
3022
|
-
/** @description Address to receive the fee */
|
|
3081
|
+
/** @description Address to receive the fee (Ethereum 0x... or TRON T...) */
|
|
3023
3082
|
feeAddress?: string;
|
|
3024
3083
|
/** @description Configuration details for recurring payments */
|
|
3025
3084
|
recurrence?: {
|
|
@@ -3037,6 +3096,8 @@ interface operations {
|
|
|
3037
3096
|
};
|
|
3038
3097
|
/** @description The wallet address of the payer, use to check if payer approval exists */
|
|
3039
3098
|
payerWallet?: string;
|
|
3099
|
+
/** @description The wallet address of the payer (alias for payerWallet) */
|
|
3100
|
+
payerAddress?: string;
|
|
3040
3101
|
/** @description Optional customer information for merchant receipt tracking */
|
|
3041
3102
|
customerInfo?: {
|
|
3042
3103
|
/** @description Customer's first name */
|
|
@@ -3114,7 +3175,7 @@ interface operations {
|
|
|
3114
3175
|
"application/json": {
|
|
3115
3176
|
/** @description A list of payment requests to be created andprocessed in batch. All requests must be on the same network and contain payment/invoice currency information. Either `requests` or `requestIds` must be provided, but not both. */
|
|
3116
3177
|
requests?: {
|
|
3117
|
-
/** @description The wallet address of the payee */
|
|
3178
|
+
/** @description The wallet address of the payee (Ethereum 0x... or TRON T...) */
|
|
3118
3179
|
payee: string;
|
|
3119
3180
|
/** @description The payable amount of the invoice, in human readable format */
|
|
3120
3181
|
amount: string;
|
|
@@ -3127,6 +3188,10 @@ interface operations {
|
|
|
3127
3188
|
requestIds?: string[];
|
|
3128
3189
|
/** @description The wallet address of the payer, user to check if approval is needed or not. */
|
|
3129
3190
|
payer?: string;
|
|
3191
|
+
/** @description Fee percentage to apply at payment time (e.g., '2.5' for 2.5%) */
|
|
3192
|
+
feePercentage?: string;
|
|
3193
|
+
/** @description Address to receive the fee */
|
|
3194
|
+
feeAddress?: string;
|
|
3130
3195
|
};
|
|
3131
3196
|
};
|
|
3132
3197
|
};
|
|
@@ -3363,6 +3428,200 @@ interface operations {
|
|
|
3363
3428
|
};
|
|
3364
3429
|
};
|
|
3365
3430
|
};
|
|
3431
|
+
PayeeDestinationController_getSigningData_v2: {
|
|
3432
|
+
parameters: {
|
|
3433
|
+
query: {
|
|
3434
|
+
/** @description The wallet address that will sign the message */
|
|
3435
|
+
walletAddress: string;
|
|
3436
|
+
/** @description The action to perform (add or deactivate) */
|
|
3437
|
+
action: "add" | "deactivate";
|
|
3438
|
+
/** @description The ERC20 token address for the payee destination */
|
|
3439
|
+
tokenAddress: string;
|
|
3440
|
+
/** @description The chain ID where the token is deployed */
|
|
3441
|
+
chainId: string;
|
|
3442
|
+
};
|
|
3443
|
+
header: {
|
|
3444
|
+
/** @description Client ID for frontend authentication */
|
|
3445
|
+
"x-client-id": string;
|
|
3446
|
+
/** @description Origin header (automatically set by browser) */
|
|
3447
|
+
Origin: string;
|
|
3448
|
+
};
|
|
3449
|
+
path?: never;
|
|
3450
|
+
cookie?: never;
|
|
3451
|
+
};
|
|
3452
|
+
requestBody?: never;
|
|
3453
|
+
responses: {
|
|
3454
|
+
/** @description EIP-712 signing data with nonce */
|
|
3455
|
+
200: {
|
|
3456
|
+
headers: {
|
|
3457
|
+
[name: string]: unknown;
|
|
3458
|
+
};
|
|
3459
|
+
content?: never;
|
|
3460
|
+
};
|
|
3461
|
+
/** @description Too Many Requests */
|
|
3462
|
+
429: {
|
|
3463
|
+
headers: {
|
|
3464
|
+
[name: string]: unknown;
|
|
3465
|
+
};
|
|
3466
|
+
content?: never;
|
|
3467
|
+
};
|
|
3468
|
+
};
|
|
3469
|
+
};
|
|
3470
|
+
PayeeDestinationController_getActivePayeeDestination_v2: {
|
|
3471
|
+
parameters: {
|
|
3472
|
+
query: {
|
|
3473
|
+
/** @description The wallet address to filter payee destinations */
|
|
3474
|
+
walletAddress: string;
|
|
3475
|
+
};
|
|
3476
|
+
header: {
|
|
3477
|
+
/** @description Client ID for frontend authentication */
|
|
3478
|
+
"x-client-id": string;
|
|
3479
|
+
/** @description Origin header (automatically set by browser) */
|
|
3480
|
+
Origin: string;
|
|
3481
|
+
};
|
|
3482
|
+
path?: never;
|
|
3483
|
+
cookie?: never;
|
|
3484
|
+
};
|
|
3485
|
+
requestBody?: never;
|
|
3486
|
+
responses: {
|
|
3487
|
+
/** @description Active payee destination retrieved successfully (or null if none exists) */
|
|
3488
|
+
200: {
|
|
3489
|
+
headers: {
|
|
3490
|
+
[name: string]: unknown;
|
|
3491
|
+
};
|
|
3492
|
+
content?: never;
|
|
3493
|
+
};
|
|
3494
|
+
/** @description Too Many Requests */
|
|
3495
|
+
429: {
|
|
3496
|
+
headers: {
|
|
3497
|
+
[name: string]: unknown;
|
|
3498
|
+
};
|
|
3499
|
+
content?: never;
|
|
3500
|
+
};
|
|
3501
|
+
};
|
|
3502
|
+
};
|
|
3503
|
+
PayeeDestinationController_createPayeeDestination_v2: {
|
|
3504
|
+
parameters: {
|
|
3505
|
+
query?: never;
|
|
3506
|
+
header: {
|
|
3507
|
+
/** @description Client ID for frontend authentication */
|
|
3508
|
+
"x-client-id": string;
|
|
3509
|
+
/** @description Origin header (automatically set by browser) */
|
|
3510
|
+
Origin: string;
|
|
3511
|
+
};
|
|
3512
|
+
path?: never;
|
|
3513
|
+
cookie?: never;
|
|
3514
|
+
};
|
|
3515
|
+
requestBody: {
|
|
3516
|
+
content: {
|
|
3517
|
+
"application/json": {
|
|
3518
|
+
/** @description The EIP-712 signature from the payee */
|
|
3519
|
+
signature: string;
|
|
3520
|
+
/** @description The signing session nonce from /signing-data endpoint */
|
|
3521
|
+
nonce: string;
|
|
3522
|
+
};
|
|
3523
|
+
};
|
|
3524
|
+
};
|
|
3525
|
+
responses: {
|
|
3526
|
+
/** @description Payee destination created successfully */
|
|
3527
|
+
201: {
|
|
3528
|
+
headers: {
|
|
3529
|
+
[name: string]: unknown;
|
|
3530
|
+
};
|
|
3531
|
+
content?: never;
|
|
3532
|
+
};
|
|
3533
|
+
/** @description Too Many Requests */
|
|
3534
|
+
429: {
|
|
3535
|
+
headers: {
|
|
3536
|
+
[name: string]: unknown;
|
|
3537
|
+
};
|
|
3538
|
+
content?: never;
|
|
3539
|
+
};
|
|
3540
|
+
};
|
|
3541
|
+
};
|
|
3542
|
+
PayeeDestinationController_getPayeeDestination_v2: {
|
|
3543
|
+
parameters: {
|
|
3544
|
+
query?: never;
|
|
3545
|
+
header: {
|
|
3546
|
+
/** @description Client ID for frontend authentication */
|
|
3547
|
+
"x-client-id": string;
|
|
3548
|
+
/** @description Origin header (automatically set by browser) */
|
|
3549
|
+
Origin: string;
|
|
3550
|
+
};
|
|
3551
|
+
path?: never;
|
|
3552
|
+
cookie?: never;
|
|
3553
|
+
};
|
|
3554
|
+
requestBody?: never;
|
|
3555
|
+
responses: {
|
|
3556
|
+
/** @description Payee destination retrieved successfully */
|
|
3557
|
+
200: {
|
|
3558
|
+
headers: {
|
|
3559
|
+
[name: string]: unknown;
|
|
3560
|
+
};
|
|
3561
|
+
content?: never;
|
|
3562
|
+
};
|
|
3563
|
+
/** @description Payee destination not found */
|
|
3564
|
+
404: {
|
|
3565
|
+
headers: {
|
|
3566
|
+
[name: string]: unknown;
|
|
3567
|
+
};
|
|
3568
|
+
content?: never;
|
|
3569
|
+
};
|
|
3570
|
+
/** @description Too Many Requests */
|
|
3571
|
+
429: {
|
|
3572
|
+
headers: {
|
|
3573
|
+
[name: string]: unknown;
|
|
3574
|
+
};
|
|
3575
|
+
content?: never;
|
|
3576
|
+
};
|
|
3577
|
+
};
|
|
3578
|
+
};
|
|
3579
|
+
PayeeDestinationController_deactivatePayeeDestination_v2: {
|
|
3580
|
+
parameters: {
|
|
3581
|
+
query?: never;
|
|
3582
|
+
header: {
|
|
3583
|
+
/** @description Client ID for frontend authentication */
|
|
3584
|
+
"x-client-id": string;
|
|
3585
|
+
/** @description Origin header (automatically set by browser) */
|
|
3586
|
+
Origin: string;
|
|
3587
|
+
};
|
|
3588
|
+
path?: never;
|
|
3589
|
+
cookie?: never;
|
|
3590
|
+
};
|
|
3591
|
+
requestBody: {
|
|
3592
|
+
content: {
|
|
3593
|
+
"application/json": {
|
|
3594
|
+
/** @description The EIP-712 signature from the payee */
|
|
3595
|
+
signature: string;
|
|
3596
|
+
/** @description The signing session nonce from /signing-data endpoint */
|
|
3597
|
+
nonce: string;
|
|
3598
|
+
};
|
|
3599
|
+
};
|
|
3600
|
+
};
|
|
3601
|
+
responses: {
|
|
3602
|
+
/** @description Payee destination deactivated successfully */
|
|
3603
|
+
200: {
|
|
3604
|
+
headers: {
|
|
3605
|
+
[name: string]: unknown;
|
|
3606
|
+
};
|
|
3607
|
+
content?: never;
|
|
3608
|
+
};
|
|
3609
|
+
/** @description Destination not found or validation failed */
|
|
3610
|
+
400: {
|
|
3611
|
+
headers: {
|
|
3612
|
+
[name: string]: unknown;
|
|
3613
|
+
};
|
|
3614
|
+
content?: never;
|
|
3615
|
+
};
|
|
3616
|
+
/** @description Too Many Requests */
|
|
3617
|
+
429: {
|
|
3618
|
+
headers: {
|
|
3619
|
+
[name: string]: unknown;
|
|
3620
|
+
};
|
|
3621
|
+
content?: never;
|
|
3622
|
+
};
|
|
3623
|
+
};
|
|
3624
|
+
};
|
|
3366
3625
|
}
|
|
3367
3626
|
|
|
3368
3627
|
export { DEFAULT_RETRY_CONFIG as D, type HttpAdapter as H, type Interceptor as I, type LogLevel as L, type QuerySerializer as Q, type RetryConfig as R, type RuntimeValidationOption as a, type HttpClient as b, type RequestOptions as c, type RetryDecision as d, type RetryDecisionInput as e, type RetryResponseLike as f, type RetryJitter as g, computeRetryDelay as h, type HttpMethod as i, type RuntimeValidationConfig as j, type operations as o, shouldRetryRequest as s };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marcohefti/request-network-api-client",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Request Network API client for Node and Browser.",
|
|
6
6
|
"publishConfig": {
|
|
@@ -81,6 +81,11 @@
|
|
|
81
81
|
"import": "./dist/esm/domains/payer/index.js",
|
|
82
82
|
"require": "./dist/cjs/domains/payer/index.js"
|
|
83
83
|
},
|
|
84
|
+
"./payee-destination": {
|
|
85
|
+
"types": "./dist/esm/domains/payee-destination/index.d.mts",
|
|
86
|
+
"import": "./dist/esm/domains/payee-destination/index.js",
|
|
87
|
+
"require": "./dist/cjs/domains/payee-destination/index.js"
|
|
88
|
+
},
|
|
84
89
|
"./v1/payer": {
|
|
85
90
|
"types": "./dist/esm/domains/payer/v1/index.d.mts",
|
|
86
91
|
"import": "./dist/esm/domains/payer/v1/index.js",
|
|
@@ -151,19 +156,20 @@
|
|
|
151
156
|
"dev:webhook": "tsx examples/webhooks/local-listener.ts",
|
|
152
157
|
"tunnel:webhook": "tsx scripts/run-cloudflared.ts",
|
|
153
158
|
"webhook:dev:all": "concurrently -k -n listener,tunnel \"pnpm run dev:webhook\" \"pnpm run tunnel:webhook\"",
|
|
154
|
-
"lint": "eslint ./src ./tests --ext .ts",
|
|
155
|
-
"lint:fix": "eslint ./src ./tests --ext .ts --fix",
|
|
156
|
-
"test": "vitest run --passWithNoTests",
|
|
157
|
-
"coverage": "vitest run --coverage --passWithNoTests",
|
|
159
|
+
"lint": "eslint ./src ./tests --ext .ts --cache --cache-strategy content --cache-location node_modules/.cache/eslint/.eslintcache",
|
|
160
|
+
"lint:fix": "eslint ./src ./tests --ext .ts --fix --cache --cache-strategy content --cache-location node_modules/.cache/eslint/.eslintcache",
|
|
161
|
+
"test": "node scripts/run-vitest.mjs run --passWithNoTests",
|
|
162
|
+
"coverage": "node scripts/run-vitest.mjs run --coverage --passWithNoTests",
|
|
158
163
|
"test:matrix": "bash scripts/test-matrix.sh test",
|
|
159
164
|
"coverage:matrix": "bash scripts/test-matrix.sh coverage",
|
|
160
|
-
"test:watch": "vitest --passWithNoTests",
|
|
165
|
+
"test:watch": "node scripts/run-vitest.mjs --passWithNoTests",
|
|
161
166
|
"test:live": "node scripts/run-integration-suite.mjs live",
|
|
162
167
|
"tsc": "tsc --project tsconfig.build.json --noEmit && tsc --project tsconfig.vitest.json --noEmit && tsc --project tsconfig.configs.json --noEmit",
|
|
163
168
|
"typecheck": "pnpm run tsc",
|
|
164
169
|
"fetch:openapi": "node scripts/fetch-openapi.mjs",
|
|
170
|
+
"patch:openapi": "node scripts/patch-openapi.mjs",
|
|
165
171
|
"generate:types": "node scripts/generate-types.mjs",
|
|
166
172
|
"generate:zod": "node scripts/generate-zod.mjs",
|
|
167
|
-
"prepare:spec": "pnpm run fetch:openapi && pnpm run generate:types && pnpm run generate:zod"
|
|
173
|
+
"prepare:spec": "pnpm run fetch:openapi && pnpm run patch:openapi && pnpm run generate:types && pnpm run generate:zod"
|
|
168
174
|
}
|
|
169
175
|
}
|