@naturalpay/sdk 0.5.0 → 0.8.0

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agents.d.mts +106 -217
  12. package/resources/agents.d.mts.map +1 -1
  13. package/resources/agents.d.ts +106 -217
  14. package/resources/agents.d.ts.map +1 -1
  15. package/resources/approvals.d.mts +414 -0
  16. package/resources/approvals.d.mts.map +1 -0
  17. package/resources/approvals.d.ts +414 -0
  18. package/resources/approvals.d.ts.map +1 -0
  19. package/resources/approvals.js +79 -0
  20. package/resources/approvals.js.map +1 -0
  21. package/resources/approvals.mjs +75 -0
  22. package/resources/approvals.mjs.map +1 -0
  23. package/resources/customers.d.mts +2 -2
  24. package/resources/customers.d.ts +2 -2
  25. package/resources/index.d.mts +1 -0
  26. package/resources/index.d.mts.map +1 -1
  27. package/resources/index.d.ts +1 -0
  28. package/resources/index.d.ts.map +1 -1
  29. package/resources/index.js +3 -1
  30. package/resources/index.js.map +1 -1
  31. package/resources/index.mjs +1 -0
  32. package/resources/index.mjs.map +1 -1
  33. package/resources/transfers.d.mts +1 -1
  34. package/resources/transfers.d.ts +1 -1
  35. package/resources/transfers.js +1 -1
  36. package/resources/transfers.mjs +1 -1
  37. package/src/client.ts +28 -0
  38. package/src/resources/agents.ts +118 -247
  39. package/src/resources/approvals.ts +577 -0
  40. package/src/resources/customers.ts +2 -2
  41. package/src/resources/index.ts +11 -0
  42. package/src/resources/transfers.ts +1 -1
  43. package/src/version.ts +1 -1
  44. package/version.d.mts +1 -1
  45. package/version.d.ts +1 -1
  46. package/version.js +1 -1
  47. package/version.mjs +1 -1
@@ -376,7 +376,7 @@ export namespace AgentCreateResponse {
376
376
  */
377
377
  export interface Limits {
378
378
  /**
379
- * Positive per-transaction limit in cents. null means no per-payment limit.
379
+ * Positive per-transaction limit in cents. null means no per-transaction limit.
380
380
  */
381
381
  perTransaction?: number | null;
382
382
  }
@@ -491,7 +491,7 @@ export namespace AgentUpdateResponse {
491
491
  */
492
492
  export interface Limits {
493
493
  /**
494
- * Positive per-transaction limit in cents. null means no per-payment limit.
494
+ * Positive per-transaction limit in cents. null means no per-transaction limit.
495
495
  */
496
496
  perTransaction?: number | null;
497
497
  }
@@ -608,7 +608,7 @@ export namespace AgentListResponse {
608
608
  */
609
609
  export interface Limits {
610
610
  /**
611
- * Positive per-transaction limit in cents. null means no per-payment limit.
611
+ * Positive per-transaction limit in cents. null means no per-transaction limit.
612
612
  */
613
613
  perTransaction?: number | null;
614
614
  }
@@ -954,7 +954,7 @@ export namespace AgentGetResponse {
954
954
  */
955
955
  export interface Limits {
956
956
  /**
957
- * Positive per-transaction limit in cents. null means no per-payment limit.
957
+ * Positive per-transaction limit in cents. null means no per-transaction limit.
958
958
  */
959
959
  perTransaction?: number | null;
960
960
  }
@@ -1010,12 +1010,12 @@ export namespace AgentGetCustomerResponse {
1010
1010
  id: string;
1011
1011
 
1012
1012
  /**
1013
- * Customer party attributes
1013
+ * Customer party and invitation attributes
1014
1014
  */
1015
1015
  attributes: Data.Attributes;
1016
1016
 
1017
1017
  /**
1018
- * Related agent and access details
1018
+ * Related agent details
1019
1019
  */
1020
1020
  relationships: Data.Relationships;
1021
1021
 
@@ -1027,111 +1027,68 @@ export namespace AgentGetCustomerResponse {
1027
1027
 
1028
1028
  export namespace Data {
1029
1029
  /**
1030
- * Customer party attributes
1030
+ * Customer party and invitation attributes
1031
1031
  */
1032
1032
  export interface Attributes {
1033
+ /**
1034
+ * When this agent-customer relationship was created
1035
+ */
1036
+ createdAt: string;
1037
+
1033
1038
  /**
1034
1039
  * Customer email, when known
1035
1040
  */
1036
1041
  email: string | null;
1037
1042
 
1043
+ /**
1044
+ * Per-agent customer transaction limits
1045
+ */
1046
+ limits: Attributes.Limits | null;
1047
+
1038
1048
  /**
1039
1049
  * Customer party display name, when known
1040
1050
  */
1041
1051
  name: string | null;
1042
1052
 
1043
1053
  /**
1044
- * The customer is represented by a party
1054
+ * Permissions granted or requested for this agent
1045
1055
  */
1046
- type: string;
1047
- }
1056
+ permissions: Array<string>;
1048
1057
 
1049
- /**
1050
- * Related agent and access details
1051
- */
1052
- export interface Relationships {
1053
1058
  /**
1054
- * This agent's access state for the customer
1059
+ * Current agent-customer relationship status
1055
1060
  */
1056
- access: Relationships.Access;
1061
+ status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
1057
1062
 
1058
1063
  /**
1059
- * Agent attached to this customer
1064
+ * When this agent-customer relationship was last updated
1060
1065
  */
1061
- agent: Relationships.Agent;
1066
+ updatedAt: string | null;
1062
1067
  }
1063
1068
 
1064
- export namespace Relationships {
1069
+ export namespace Attributes {
1065
1070
  /**
1066
- * This agent's access state for the customer
1071
+ * Per-agent customer transaction limits
1067
1072
  */
1068
- export interface Access {
1069
- data: Access.Data;
1073
+ export interface Limits {
1074
+ /**
1075
+ * Per-transaction cap, integer cents (USD).
1076
+ */
1077
+ perTransaction?: number | null;
1070
1078
  }
1079
+ }
1071
1080
 
1072
- export namespace Access {
1073
- export interface Data {
1074
- /**
1075
- * Underlying access record ID
1076
- */
1077
- id: string;
1078
-
1079
- /**
1080
- * Access attributes
1081
- */
1082
- attributes: Data.Attributes;
1083
-
1084
- /**
1085
- * Resource type
1086
- */
1087
- type: string;
1088
- }
1089
-
1090
- export namespace Data {
1091
- /**
1092
- * Access attributes
1093
- */
1094
- export interface Attributes {
1095
- /**
1096
- * When this agent-customer relationship was created
1097
- */
1098
- createdAt: string;
1099
-
1100
- /**
1101
- * Per-agent customer transaction limits
1102
- */
1103
- limits: Attributes.Limits | null;
1104
-
1105
- /**
1106
- * Permissions granted or requested for this agent
1107
- */
1108
- permissions: Array<string>;
1109
-
1110
- /**
1111
- * Current agent-customer relationship status
1112
- */
1113
- status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
1114
-
1115
- /**
1116
- * When this agent-customer relationship was last updated
1117
- */
1118
- updatedAt: string | null;
1119
- }
1120
-
1121
- export namespace Attributes {
1122
- /**
1123
- * Per-agent customer transaction limits
1124
- */
1125
- export interface Limits {
1126
- /**
1127
- * Per-transaction cap, integer cents (USD).
1128
- */
1129
- perTransaction?: number | null;
1130
- }
1131
- }
1132
- }
1133
- }
1081
+ /**
1082
+ * Related agent details
1083
+ */
1084
+ export interface Relationships {
1085
+ /**
1086
+ * Agent attached to this customer
1087
+ */
1088
+ agent: Relationships.Agent;
1089
+ }
1134
1090
 
1091
+ export namespace Relationships {
1135
1092
  /**
1136
1093
  * Agent attached to this customer
1137
1094
  */
@@ -1187,12 +1144,12 @@ export namespace AgentListCustomersResponse {
1187
1144
  id: string;
1188
1145
 
1189
1146
  /**
1190
- * Customer party attributes
1147
+ * Customer party and invitation attributes
1191
1148
  */
1192
1149
  attributes: Data.Attributes;
1193
1150
 
1194
1151
  /**
1195
- * Related agent and access details
1152
+ * Related agent details
1196
1153
  */
1197
1154
  relationships: Data.Relationships;
1198
1155
 
@@ -1204,111 +1161,68 @@ export namespace AgentListCustomersResponse {
1204
1161
 
1205
1162
  export namespace Data {
1206
1163
  /**
1207
- * Customer party attributes
1164
+ * Customer party and invitation attributes
1208
1165
  */
1209
1166
  export interface Attributes {
1167
+ /**
1168
+ * When this agent-customer relationship was created
1169
+ */
1170
+ createdAt: string;
1171
+
1210
1172
  /**
1211
1173
  * Customer email, when known
1212
1174
  */
1213
1175
  email: string | null;
1214
1176
 
1177
+ /**
1178
+ * Per-agent customer transaction limits
1179
+ */
1180
+ limits: Attributes.Limits | null;
1181
+
1215
1182
  /**
1216
1183
  * Customer party display name, when known
1217
1184
  */
1218
1185
  name: string | null;
1219
1186
 
1220
1187
  /**
1221
- * The customer is represented by a party
1188
+ * Permissions granted or requested for this agent
1222
1189
  */
1223
- type: string;
1224
- }
1190
+ permissions: Array<string>;
1225
1191
 
1226
- /**
1227
- * Related agent and access details
1228
- */
1229
- export interface Relationships {
1230
1192
  /**
1231
- * This agent's access state for the customer
1193
+ * Current agent-customer relationship status
1232
1194
  */
1233
- access: Relationships.Access;
1195
+ status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
1234
1196
 
1235
1197
  /**
1236
- * Agent attached to this customer
1198
+ * When this agent-customer relationship was last updated
1237
1199
  */
1238
- agent: Relationships.Agent;
1200
+ updatedAt: string | null;
1239
1201
  }
1240
1202
 
1241
- export namespace Relationships {
1203
+ export namespace Attributes {
1242
1204
  /**
1243
- * This agent's access state for the customer
1205
+ * Per-agent customer transaction limits
1244
1206
  */
1245
- export interface Access {
1246
- data: Access.Data;
1207
+ export interface Limits {
1208
+ /**
1209
+ * Per-transaction cap, integer cents (USD).
1210
+ */
1211
+ perTransaction?: number | null;
1247
1212
  }
1213
+ }
1248
1214
 
1249
- export namespace Access {
1250
- export interface Data {
1251
- /**
1252
- * Underlying access record ID
1253
- */
1254
- id: string;
1255
-
1256
- /**
1257
- * Access attributes
1258
- */
1259
- attributes: Data.Attributes;
1260
-
1261
- /**
1262
- * Resource type
1263
- */
1264
- type: string;
1265
- }
1266
-
1267
- export namespace Data {
1268
- /**
1269
- * Access attributes
1270
- */
1271
- export interface Attributes {
1272
- /**
1273
- * When this agent-customer relationship was created
1274
- */
1275
- createdAt: string;
1276
-
1277
- /**
1278
- * Per-agent customer transaction limits
1279
- */
1280
- limits: Attributes.Limits | null;
1281
-
1282
- /**
1283
- * Permissions granted or requested for this agent
1284
- */
1285
- permissions: Array<string>;
1286
-
1287
- /**
1288
- * Current agent-customer relationship status
1289
- */
1290
- status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
1291
-
1292
- /**
1293
- * When this agent-customer relationship was last updated
1294
- */
1295
- updatedAt: string | null;
1296
- }
1297
-
1298
- export namespace Attributes {
1299
- /**
1300
- * Per-agent customer transaction limits
1301
- */
1302
- export interface Limits {
1303
- /**
1304
- * Per-transaction cap, integer cents (USD).
1305
- */
1306
- perTransaction?: number | null;
1307
- }
1308
- }
1309
- }
1310
- }
1215
+ /**
1216
+ * Related agent details
1217
+ */
1218
+ export interface Relationships {
1219
+ /**
1220
+ * Agent attached to this customer
1221
+ */
1222
+ agent: Relationships.Agent;
1223
+ }
1311
1224
 
1225
+ export namespace Relationships {
1312
1226
  /**
1313
1227
  * Agent attached to this customer
1314
1228
  */
@@ -1435,7 +1349,7 @@ export namespace AgentRemoveResponse {
1435
1349
  */
1436
1350
  export interface Limits {
1437
1351
  /**
1438
- * Positive per-transaction limit in cents. null means no per-payment limit.
1352
+ * Positive per-transaction limit in cents. null means no per-transaction limit.
1439
1353
  */
1440
1354
  perTransaction?: number | null;
1441
1355
  }
@@ -1500,12 +1414,12 @@ export namespace AgentRemoveCustomerResponse {
1500
1414
  id: string;
1501
1415
 
1502
1416
  /**
1503
- * Customer party attributes
1417
+ * Customer party and invitation attributes
1504
1418
  */
1505
1419
  attributes: Data.Attributes;
1506
1420
 
1507
1421
  /**
1508
- * Related agent and access details
1422
+ * Related agent details
1509
1423
  */
1510
1424
  relationships: Data.Relationships;
1511
1425
 
@@ -1517,111 +1431,68 @@ export namespace AgentRemoveCustomerResponse {
1517
1431
 
1518
1432
  export namespace Data {
1519
1433
  /**
1520
- * Customer party attributes
1434
+ * Customer party and invitation attributes
1521
1435
  */
1522
1436
  export interface Attributes {
1437
+ /**
1438
+ * When this agent-customer relationship was created
1439
+ */
1440
+ createdAt: string;
1441
+
1523
1442
  /**
1524
1443
  * Customer email, when known
1525
1444
  */
1526
1445
  email: string | null;
1527
1446
 
1447
+ /**
1448
+ * Per-agent customer transaction limits
1449
+ */
1450
+ limits: Attributes.Limits | null;
1451
+
1528
1452
  /**
1529
1453
  * Customer party display name, when known
1530
1454
  */
1531
1455
  name: string | null;
1532
1456
 
1533
1457
  /**
1534
- * The customer is represented by a party
1458
+ * Permissions granted or requested for this agent
1535
1459
  */
1536
- type: string;
1537
- }
1460
+ permissions: Array<string>;
1538
1461
 
1539
- /**
1540
- * Related agent and access details
1541
- */
1542
- export interface Relationships {
1543
1462
  /**
1544
- * This agent's access state for the customer
1463
+ * Current agent-customer relationship status
1545
1464
  */
1546
- access: Relationships.Access;
1465
+ status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
1547
1466
 
1548
1467
  /**
1549
- * Agent attached to this customer
1468
+ * When this agent-customer relationship was last updated
1550
1469
  */
1551
- agent: Relationships.Agent;
1470
+ updatedAt: string | null;
1552
1471
  }
1553
1472
 
1554
- export namespace Relationships {
1473
+ export namespace Attributes {
1555
1474
  /**
1556
- * This agent's access state for the customer
1475
+ * Per-agent customer transaction limits
1557
1476
  */
1558
- export interface Access {
1559
- data: Access.Data;
1477
+ export interface Limits {
1478
+ /**
1479
+ * Per-transaction cap, integer cents (USD).
1480
+ */
1481
+ perTransaction?: number | null;
1560
1482
  }
1483
+ }
1561
1484
 
1562
- export namespace Access {
1563
- export interface Data {
1564
- /**
1565
- * Underlying access record ID
1566
- */
1567
- id: string;
1568
-
1569
- /**
1570
- * Access attributes
1571
- */
1572
- attributes: Data.Attributes;
1573
-
1574
- /**
1575
- * Resource type
1576
- */
1577
- type: string;
1578
- }
1579
-
1580
- export namespace Data {
1581
- /**
1582
- * Access attributes
1583
- */
1584
- export interface Attributes {
1585
- /**
1586
- * When this agent-customer relationship was created
1587
- */
1588
- createdAt: string;
1589
-
1590
- /**
1591
- * Per-agent customer transaction limits
1592
- */
1593
- limits: Attributes.Limits | null;
1594
-
1595
- /**
1596
- * Permissions granted or requested for this agent
1597
- */
1598
- permissions: Array<string>;
1599
-
1600
- /**
1601
- * Current agent-customer relationship status
1602
- */
1603
- status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
1604
-
1605
- /**
1606
- * When this agent-customer relationship was last updated
1607
- */
1608
- updatedAt: string | null;
1609
- }
1610
-
1611
- export namespace Attributes {
1612
- /**
1613
- * Per-agent customer transaction limits
1614
- */
1615
- export interface Limits {
1616
- /**
1617
- * Per-transaction cap, integer cents (USD).
1618
- */
1619
- perTransaction?: number | null;
1620
- }
1621
- }
1622
- }
1623
- }
1485
+ /**
1486
+ * Related agent details
1487
+ */
1488
+ export interface Relationships {
1489
+ /**
1490
+ * Agent attached to this customer
1491
+ */
1492
+ agent: Relationships.Agent;
1493
+ }
1624
1494
 
1495
+ export namespace Relationships {
1625
1496
  /**
1626
1497
  * Agent attached to this customer
1627
1498
  */
@@ -1710,7 +1581,7 @@ export namespace AgentCreateParams {
1710
1581
  */
1711
1582
  export interface Limits {
1712
1583
  /**
1713
- * Positive per-transaction limit in cents. null means no per-payment limit.
1584
+ * Positive per-transaction limit in cents. null means no per-transaction limit.
1714
1585
  */
1715
1586
  perTransaction?: number | null;
1716
1587
  }
@@ -1757,7 +1628,7 @@ export namespace AgentUpdateParams {
1757
1628
  */
1758
1629
  export interface Limits {
1759
1630
  /**
1760
- * Positive per-transaction limit in cents. null means no per-payment limit.
1631
+ * Positive per-transaction limit in cents. null means no per-transaction limit.
1761
1632
  */
1762
1633
  perTransaction?: number | null;
1763
1634
  }