@naturalpay/sdk 1.6.49 → 1.6.51

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 (112) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/cardSessions/client/Client.d.ts +3 -1
  3. package/dist/cjs/api/resources/cardSessions/client/Client.js +3 -1
  4. package/dist/cjs/api/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.ts +8 -4
  5. package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsRequestPurchase.d.ts +5 -3
  6. package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponse.d.ts +5 -1
  7. package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponsePurchase.d.ts +8 -0
  8. package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponsePurchase.js +3 -0
  9. package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponse.d.ts +5 -1
  10. package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponsePurchase.d.ts +8 -0
  11. package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponsePurchase.js +3 -0
  12. package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.ts +5 -1
  13. package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemPurchase.d.ts +8 -0
  14. package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemPurchase.js +3 -0
  15. package/dist/cjs/api/resources/cardSessions/types/index.d.ts +3 -0
  16. package/dist/cjs/api/resources/cardSessions/types/index.js +3 -0
  17. package/dist/cjs/api/types/CardPaymentRelationships.d.ts +2 -0
  18. package/dist/cjs/api/types/CardPaymentRelationshipsTransaction.d.ts +8 -0
  19. package/dist/cjs/api/types/CardPaymentRelationshipsTransaction.js +3 -0
  20. package/dist/cjs/api/types/CardPaymentRelationshipsTransactionData.d.ts +10 -0
  21. package/dist/cjs/api/types/CardPaymentRelationshipsTransactionData.js +3 -0
  22. package/dist/cjs/api/types/CardPaymentRelationshipsTransactionDataType.d.ts +5 -0
  23. package/dist/cjs/api/types/CardPaymentRelationshipsTransactionDataType.js +8 -0
  24. package/dist/cjs/api/types/index.d.ts +3 -0
  25. package/dist/cjs/api/types/index.js +3 -0
  26. package/dist/cjs/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.ts +1 -0
  27. package/dist/cjs/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.js +1 -0
  28. package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsRequestPurchase.d.ts +1 -0
  29. package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsRequestPurchase.js +1 -0
  30. package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponse.d.ts +3 -0
  31. package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponse.js +3 -0
  32. package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponsePurchase.d.ts +12 -0
  33. package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponsePurchase.js +44 -0
  34. package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponse.d.ts +3 -0
  35. package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponse.js +3 -0
  36. package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponsePurchase.d.ts +12 -0
  37. package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponsePurchase.js +44 -0
  38. package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.ts +3 -0
  39. package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.js +3 -0
  40. package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemPurchase.d.ts +12 -0
  41. package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemPurchase.js +44 -0
  42. package/dist/cjs/serialization/resources/cardSessions/types/index.d.ts +3 -0
  43. package/dist/cjs/serialization/resources/cardSessions/types/index.js +3 -0
  44. package/dist/cjs/serialization/types/CardPaymentRelationships.d.ts +2 -0
  45. package/dist/cjs/serialization/types/CardPaymentRelationships.js +2 -0
  46. package/dist/cjs/serialization/types/CardPaymentRelationshipsTransaction.d.ts +10 -0
  47. package/dist/cjs/serialization/types/CardPaymentRelationshipsTransaction.js +42 -0
  48. package/dist/cjs/serialization/types/CardPaymentRelationshipsTransactionData.d.ts +11 -0
  49. package/dist/cjs/serialization/types/CardPaymentRelationshipsTransactionData.js +43 -0
  50. package/dist/cjs/serialization/types/CardPaymentRelationshipsTransactionDataType.d.ts +7 -0
  51. package/dist/cjs/serialization/types/CardPaymentRelationshipsTransactionDataType.js +39 -0
  52. package/dist/cjs/serialization/types/index.d.ts +3 -0
  53. package/dist/cjs/serialization/types/index.js +3 -0
  54. package/dist/cjs/version.d.ts +1 -1
  55. package/dist/cjs/version.js +1 -1
  56. package/dist/esm/BaseClient.mjs +2 -2
  57. package/dist/esm/api/resources/cardSessions/client/Client.d.mts +3 -1
  58. package/dist/esm/api/resources/cardSessions/client/Client.mjs +3 -1
  59. package/dist/esm/api/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.mts +8 -4
  60. package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsRequestPurchase.d.mts +5 -3
  61. package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponse.d.mts +5 -1
  62. package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponsePurchase.d.mts +8 -0
  63. package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponsePurchase.mjs +2 -0
  64. package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponse.d.mts +5 -1
  65. package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponsePurchase.d.mts +8 -0
  66. package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponsePurchase.mjs +2 -0
  67. package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.mts +5 -1
  68. package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItemPurchase.d.mts +8 -0
  69. package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItemPurchase.mjs +2 -0
  70. package/dist/esm/api/resources/cardSessions/types/index.d.mts +3 -0
  71. package/dist/esm/api/resources/cardSessions/types/index.mjs +3 -0
  72. package/dist/esm/api/types/CardPaymentRelationships.d.mts +2 -0
  73. package/dist/esm/api/types/CardPaymentRelationshipsTransaction.d.mts +8 -0
  74. package/dist/esm/api/types/CardPaymentRelationshipsTransaction.mjs +2 -0
  75. package/dist/esm/api/types/CardPaymentRelationshipsTransactionData.d.mts +10 -0
  76. package/dist/esm/api/types/CardPaymentRelationshipsTransactionData.mjs +2 -0
  77. package/dist/esm/api/types/CardPaymentRelationshipsTransactionDataType.d.mts +5 -0
  78. package/dist/esm/api/types/CardPaymentRelationshipsTransactionDataType.mjs +5 -0
  79. package/dist/esm/api/types/index.d.mts +3 -0
  80. package/dist/esm/api/types/index.mjs +3 -0
  81. package/dist/esm/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.mts +1 -0
  82. package/dist/esm/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.mjs +1 -0
  83. package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsRequestPurchase.d.mts +1 -0
  84. package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsRequestPurchase.mjs +1 -0
  85. package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponse.d.mts +3 -0
  86. package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponse.mjs +3 -0
  87. package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponsePurchase.d.mts +12 -0
  88. package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponsePurchase.mjs +8 -0
  89. package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponse.d.mts +3 -0
  90. package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponse.mjs +3 -0
  91. package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponsePurchase.d.mts +12 -0
  92. package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponsePurchase.mjs +8 -0
  93. package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.mts +3 -0
  94. package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.mjs +3 -0
  95. package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemPurchase.d.mts +12 -0
  96. package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemPurchase.mjs +8 -0
  97. package/dist/esm/serialization/resources/cardSessions/types/index.d.mts +3 -0
  98. package/dist/esm/serialization/resources/cardSessions/types/index.mjs +3 -0
  99. package/dist/esm/serialization/types/CardPaymentRelationships.d.mts +2 -0
  100. package/dist/esm/serialization/types/CardPaymentRelationships.mjs +2 -0
  101. package/dist/esm/serialization/types/CardPaymentRelationshipsTransaction.d.mts +10 -0
  102. package/dist/esm/serialization/types/CardPaymentRelationshipsTransaction.mjs +6 -0
  103. package/dist/esm/serialization/types/CardPaymentRelationshipsTransactionData.d.mts +11 -0
  104. package/dist/esm/serialization/types/CardPaymentRelationshipsTransactionData.mjs +7 -0
  105. package/dist/esm/serialization/types/CardPaymentRelationshipsTransactionDataType.d.mts +7 -0
  106. package/dist/esm/serialization/types/CardPaymentRelationshipsTransactionDataType.mjs +3 -0
  107. package/dist/esm/serialization/types/index.d.mts +3 -0
  108. package/dist/esm/serialization/types/index.mjs +3 -0
  109. package/dist/esm/version.d.mts +1 -1
  110. package/dist/esm/version.mjs +1 -1
  111. package/package.json +1 -1
  112. package/reference.md +3 -1
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ListCardSessionsResponseDataItemPurchase = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ exports.ListCardSessionsResponseDataItemPurchase = core.serialization.object({
40
+ merchantName: core.serialization.string(),
41
+ amount: core.serialization.number(),
42
+ currency: core.serialization.string(),
43
+ description: core.serialization.string().nullable(),
44
+ });
@@ -8,11 +8,13 @@ export * from "./CreateCardSessionsResponse.js";
8
8
  export * from "./CreateCardSessionsResponseAgentToken.js";
9
9
  export * from "./CreateCardSessionsResponseCardSource.js";
10
10
  export * from "./CreateCardSessionsResponseNote.js";
11
+ export * from "./CreateCardSessionsResponsePurchase.js";
11
12
  export * from "./CreateCardSessionsResponseStatus.js";
12
13
  export * from "./GetCardSessionsResponse.js";
13
14
  export * from "./GetCardSessionsResponseAgentToken.js";
14
15
  export * from "./GetCardSessionsResponseCardSource.js";
15
16
  export * from "./GetCardSessionsResponseNote.js";
17
+ export * from "./GetCardSessionsResponsePurchase.js";
16
18
  export * from "./GetCardSessionsResponseStatus.js";
17
19
  export * from "./ListCardSessionsRequestStatus.js";
18
20
  export * from "./ListCardSessionsResponse.js";
@@ -20,6 +22,7 @@ export * from "./ListCardSessionsResponseDataItem.js";
20
22
  export * from "./ListCardSessionsResponseDataItemAgentToken.js";
21
23
  export * from "./ListCardSessionsResponseDataItemCardSource.js";
22
24
  export * from "./ListCardSessionsResponseDataItemNote.js";
25
+ export * from "./ListCardSessionsResponseDataItemPurchase.js";
23
26
  export * from "./ListCardSessionsResponseDataItemStatus.js";
24
27
  export * from "./ListCardSessionsResponseMeta.js";
25
28
  export * from "./ListCardSessionsResponseMetaPagination.js";
@@ -24,11 +24,13 @@ __exportStar(require("./CreateCardSessionsResponse.js"), exports);
24
24
  __exportStar(require("./CreateCardSessionsResponseAgentToken.js"), exports);
25
25
  __exportStar(require("./CreateCardSessionsResponseCardSource.js"), exports);
26
26
  __exportStar(require("./CreateCardSessionsResponseNote.js"), exports);
27
+ __exportStar(require("./CreateCardSessionsResponsePurchase.js"), exports);
27
28
  __exportStar(require("./CreateCardSessionsResponseStatus.js"), exports);
28
29
  __exportStar(require("./GetCardSessionsResponse.js"), exports);
29
30
  __exportStar(require("./GetCardSessionsResponseAgentToken.js"), exports);
30
31
  __exportStar(require("./GetCardSessionsResponseCardSource.js"), exports);
31
32
  __exportStar(require("./GetCardSessionsResponseNote.js"), exports);
33
+ __exportStar(require("./GetCardSessionsResponsePurchase.js"), exports);
32
34
  __exportStar(require("./GetCardSessionsResponseStatus.js"), exports);
33
35
  __exportStar(require("./ListCardSessionsRequestStatus.js"), exports);
34
36
  __exportStar(require("./ListCardSessionsResponse.js"), exports);
@@ -36,6 +38,7 @@ __exportStar(require("./ListCardSessionsResponseDataItem.js"), exports);
36
38
  __exportStar(require("./ListCardSessionsResponseDataItemAgentToken.js"), exports);
37
39
  __exportStar(require("./ListCardSessionsResponseDataItemCardSource.js"), exports);
38
40
  __exportStar(require("./ListCardSessionsResponseDataItemNote.js"), exports);
41
+ __exportStar(require("./ListCardSessionsResponseDataItemPurchase.js"), exports);
39
42
  __exportStar(require("./ListCardSessionsResponseDataItemStatus.js"), exports);
40
43
  __exportStar(require("./ListCardSessionsResponseMeta.js"), exports);
41
44
  __exportStar(require("./ListCardSessionsResponseMetaPagination.js"), exports);
@@ -3,10 +3,12 @@ import * as core from "../../core/index.js";
3
3
  import type * as serializers from "../index.js";
4
4
  import { CardPaymentRelationshipsPaymentIntent } from "./CardPaymentRelationshipsPaymentIntent.js";
5
5
  import { CardPaymentRelationshipsRefunds } from "./CardPaymentRelationshipsRefunds.js";
6
+ import { CardPaymentRelationshipsTransaction } from "./CardPaymentRelationshipsTransaction.js";
6
7
  export declare const CardPaymentRelationships: core.serialization.ObjectSchema<serializers.CardPaymentRelationships.Raw, Natural.CardPaymentRelationships>;
7
8
  export declare namespace CardPaymentRelationships {
8
9
  interface Raw {
9
10
  paymentIntent: CardPaymentRelationshipsPaymentIntent.Raw;
10
11
  refunds: CardPaymentRelationshipsRefunds.Raw;
12
+ transaction: CardPaymentRelationshipsTransaction.Raw;
11
13
  }
12
14
  }
@@ -38,7 +38,9 @@ exports.CardPaymentRelationships = void 0;
38
38
  const core = __importStar(require("../../core/index.js"));
39
39
  const CardPaymentRelationshipsPaymentIntent_js_1 = require("./CardPaymentRelationshipsPaymentIntent.js");
40
40
  const CardPaymentRelationshipsRefunds_js_1 = require("./CardPaymentRelationshipsRefunds.js");
41
+ const CardPaymentRelationshipsTransaction_js_1 = require("./CardPaymentRelationshipsTransaction.js");
41
42
  exports.CardPaymentRelationships = core.serialization.object({
42
43
  paymentIntent: CardPaymentRelationshipsPaymentIntent_js_1.CardPaymentRelationshipsPaymentIntent,
43
44
  refunds: CardPaymentRelationshipsRefunds_js_1.CardPaymentRelationshipsRefunds,
45
+ transaction: CardPaymentRelationshipsTransaction_js_1.CardPaymentRelationshipsTransaction,
44
46
  });
@@ -0,0 +1,10 @@
1
+ import type * as Natural from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ import { CardPaymentRelationshipsTransactionData } from "./CardPaymentRelationshipsTransactionData.js";
5
+ export declare const CardPaymentRelationshipsTransaction: core.serialization.ObjectSchema<serializers.CardPaymentRelationshipsTransaction.Raw, Natural.CardPaymentRelationshipsTransaction>;
6
+ export declare namespace CardPaymentRelationshipsTransaction {
7
+ interface Raw {
8
+ data?: CardPaymentRelationshipsTransactionData.Raw | null;
9
+ }
10
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.CardPaymentRelationshipsTransaction = void 0;
38
+ const core = __importStar(require("../../core/index.js"));
39
+ const CardPaymentRelationshipsTransactionData_js_1 = require("./CardPaymentRelationshipsTransactionData.js");
40
+ exports.CardPaymentRelationshipsTransaction = core.serialization.object({
41
+ data: CardPaymentRelationshipsTransactionData_js_1.CardPaymentRelationshipsTransactionData.nullable(),
42
+ });
@@ -0,0 +1,11 @@
1
+ import type * as Natural from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ import { CardPaymentRelationshipsTransactionDataType } from "./CardPaymentRelationshipsTransactionDataType.js";
5
+ export declare const CardPaymentRelationshipsTransactionData: core.serialization.ObjectSchema<serializers.CardPaymentRelationshipsTransactionData.Raw, Natural.CardPaymentRelationshipsTransactionData>;
6
+ export declare namespace CardPaymentRelationshipsTransactionData {
7
+ interface Raw {
8
+ type: CardPaymentRelationshipsTransactionDataType.Raw;
9
+ id: string;
10
+ }
11
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.CardPaymentRelationshipsTransactionData = void 0;
38
+ const core = __importStar(require("../../core/index.js"));
39
+ const CardPaymentRelationshipsTransactionDataType_js_1 = require("./CardPaymentRelationshipsTransactionDataType.js");
40
+ exports.CardPaymentRelationshipsTransactionData = core.serialization.object({
41
+ type: CardPaymentRelationshipsTransactionDataType_js_1.CardPaymentRelationshipsTransactionDataType,
42
+ id: core.serialization.string(),
43
+ });
@@ -0,0 +1,7 @@
1
+ import type * as Natural from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const CardPaymentRelationshipsTransactionDataType: core.serialization.Schema<serializers.CardPaymentRelationshipsTransactionDataType.Raw, Natural.CardPaymentRelationshipsTransactionDataType>;
5
+ export declare namespace CardPaymentRelationshipsTransactionDataType {
6
+ type Raw = "transaction";
7
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.CardPaymentRelationshipsTransactionDataType = void 0;
38
+ const core = __importStar(require("../../core/index.js"));
39
+ exports.CardPaymentRelationshipsTransactionDataType = core.serialization.enum_(["transaction"]);
@@ -32,6 +32,9 @@ export * from "./CardPaymentRelationshipsPaymentIntentDataType.js";
32
32
  export * from "./CardPaymentRelationshipsRefunds.js";
33
33
  export * from "./CardPaymentRelationshipsRefundsDataItem.js";
34
34
  export * from "./CardPaymentRelationshipsRefundsDataItemType.js";
35
+ export * from "./CardPaymentRelationshipsTransaction.js";
36
+ export * from "./CardPaymentRelationshipsTransactionData.js";
37
+ export * from "./CardPaymentRelationshipsTransactionDataType.js";
35
38
  export * from "./CardPaymentType.js";
36
39
  export * from "./ComplianceSessionStatusResponse.js";
37
40
  export * from "./ComplianceSessionStatusResponseData.js";
@@ -48,6 +48,9 @@ __exportStar(require("./CardPaymentRelationshipsPaymentIntentDataType.js"), expo
48
48
  __exportStar(require("./CardPaymentRelationshipsRefunds.js"), exports);
49
49
  __exportStar(require("./CardPaymentRelationshipsRefundsDataItem.js"), exports);
50
50
  __exportStar(require("./CardPaymentRelationshipsRefundsDataItemType.js"), exports);
51
+ __exportStar(require("./CardPaymentRelationshipsTransaction.js"), exports);
52
+ __exportStar(require("./CardPaymentRelationshipsTransactionData.js"), exports);
53
+ __exportStar(require("./CardPaymentRelationshipsTransactionDataType.js"), exports);
51
54
  __exportStar(require("./CardPaymentType.js"), exports);
52
55
  __exportStar(require("./ComplianceSessionStatusResponse.js"), exports);
53
56
  __exportStar(require("./ComplianceSessionStatusResponseData.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.6.49";
1
+ export declare const SDK_VERSION = "1.6.51";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.6.49";
4
+ exports.SDK_VERSION = "1.6.51";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@naturalpay/sdk",
9
- "X-Fern-SDK-Version": "1.6.49",
10
- "User-Agent": "@naturalpay/sdk/1.6.49",
9
+ "X-Fern-SDK-Version": "1.6.51",
10
+ "User-Agent": "@naturalpay/sdk/1.6.51",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  "X-Instance-ID": options === null || options === void 0 ? void 0 : options.instanceId,
@@ -65,10 +65,12 @@ export declare class CardSessionsClient {
65
65
  * cardId: "eac_01a0e642ed4873d685273ce0e7d1ccab",
66
66
  * allowedHosts: ["api.stripe.com"],
67
67
  * ttlSeconds: 600,
68
+ * claimWindowSeconds: 3600,
68
69
  * purchase: {
69
70
  * merchantName: "Blue Bottle Coffee",
70
71
  * amount: 2450,
71
- * currency: "USD"
72
+ * currency: "USD",
73
+ * description: "Two bags of whole bean coffee"
72
74
  * },
73
75
  * reference: "checkout_7f3a",
74
76
  * returnUrl: "sms:+15551234567",
@@ -170,10 +170,12 @@ export class CardSessionsClient {
170
170
  * cardId: "eac_01a0e642ed4873d685273ce0e7d1ccab",
171
171
  * allowedHosts: ["api.stripe.com"],
172
172
  * ttlSeconds: 600,
173
+ * claimWindowSeconds: 3600,
173
174
  * purchase: {
174
175
  * merchantName: "Blue Bottle Coffee",
175
176
  * amount: 2450,
176
- * currency: "USD"
177
+ * currency: "USD",
178
+ * description: "Two bags of whole bean coffee"
177
179
  * },
178
180
  * reference: "checkout_7f3a",
179
181
  * returnUrl: "sms:+15551234567",
@@ -5,10 +5,12 @@ import type * as Natural from "../../../../index.mjs";
5
5
  * cardId: "eac_01a0e642ed4873d685273ce0e7d1ccab",
6
6
  * allowedHosts: ["api.stripe.com"],
7
7
  * ttlSeconds: 600,
8
+ * claimWindowSeconds: 3600,
8
9
  * purchase: {
9
10
  * merchantName: "Blue Bottle Coffee",
10
11
  * amount: 2450,
11
- * currency: "USD"
12
+ * currency: "USD",
13
+ * description: "Two bags of whole bean coffee"
12
14
  * },
13
15
  * reference: "checkout_7f3a",
14
16
  * returnUrl: "sms:+15551234567",
@@ -21,16 +23,18 @@ export interface CreateCardSessionsRequest {
21
23
  cardId: string;
22
24
  /** Customer party to act for (pty_*). Omit to act as your own party. To act for another party, pass the ID of a party that has authorized you to act on its behalf. */
23
25
  customerPartyId?: string;
24
- /** Exact hostnames allowed to receive the real card, such as the payment processor's API host the merchant's checkout sends the card to. Required: there is no default. */
26
+ /** Exact hostnames allowed to receive the real card, such as the payment processor's API host the merchant's checkout sends the card to. Required: there is no default. When the card fields are an iframe from checkoutshopper-live.adyen.com or flex.cybersource.com, list that host, and for CyberSource also the merchant host that serves the payment page. */
25
27
  allowedHosts: string[];
26
28
  /** How long the stand-in card and proxy login stay valid once claimed. Defaults to 600. */
27
29
  ttlSeconds?: number;
28
- /** What the agent is buying. Required for a card the user added (eac_): the user approves this exact purchase. */
30
+ /** How long after creation you can claim the session, from 600 (10 minutes) to 86400 (24 hours). Defaults to 600. The user still has to approve within 10 minutes; a longer window only gives you more time to claim and pay after they do. Sets claimExpiresAt. */
31
+ claimWindowSeconds?: number;
32
+ /** What the agent will do with the card, shown to the user on the approval page. Required for a card the user added (eac_). The user approves what you describe here; merchantName, amount and description aren't enforced, while allowedHosts is. */
29
33
  purchase?: Natural.CreateCardSessionsRequestPurchase;
30
34
  /** Your own reference for the session, such as your checkout or task ID. Not unique: filter GET /card-sessions by it to find the session again. */
31
35
  reference?: string;
32
36
  /** Where to send the user once they approve or decline: an https page in your product, or sms:+15551234567 to reopen your Messages thread. It's added to approvalUrl as returnTo. The approval page opens https pages on its own after the user answers, and offers a button for sms: links. */
33
37
  returnUrl?: string;
34
- /** Cards the user added only, for a USD purchase of at most $999,999.99. A backup for checkouts that don't send the raw card number in the HTTP request, for example ones that encrypt it in the browser, so the proxy can't swap it in. Paying through the proxy stays the default. On approval, Natural also tries to set up agent payments on the card. Most cards don't support them yet, so agentToken.mandateId is often null: then claim this session and try the proxy. Defaults to false. */
38
+ /** Cards the user added only, for a USD purchase from $0.01 to $999,999.99. A backup for checkouts that don't send the raw card number in the HTTP request, for example ones that encrypt it in the browser, so the proxy can't swap it in. Paying through the proxy stays the default. On approval, Natural also tries to set up agent payments on the card. Most cards don't support them yet, so agentToken.mandateId is often null: then claim this session and try the proxy. Defaults to false. */
35
39
  requestAgentToken?: boolean;
36
40
  }
@@ -1,11 +1,13 @@
1
1
  /**
2
- * What the agent is buying. Required for a card the user added (eac_): the user approves this exact purchase.
2
+ * What the agent will do with the card, shown to the user on the approval page. Required for a card the user added (eac_). The user approves what you describe here; merchantName, amount and description aren't enforced, while allowedHosts is.
3
3
  */
4
4
  export interface CreateCardSessionsRequestPurchase {
5
- /** Merchant name as the user will recognize it. */
5
+ /** Merchant name as the user will recognize it. Shown to the user, not enforced: the proxy doesn't check which merchant the card goes to. */
6
6
  merchantName: string;
7
- /** Total in minor units (cents) of `currency`. */
7
+ /** Total in minor units (cents) of `currency`. Use 0 for a card action with no purchase, such as saving the card on file at the merchant. Shown to the user, not enforced as a cap. */
8
8
  amount: number;
9
9
  /** ISO 4217 currency code, e.g. USD. */
10
10
  currency: string;
11
+ /** A short plain-text line for the user saying what the agent will do or buy, such as `Save this card on file at Amazon` or `Flowers for tomorrow morning, up to $200`. The approval page shows it prominently. Shown, not enforced. */
12
+ description?: string;
11
13
  }
@@ -9,7 +9,11 @@ export interface CreateCardSessionsResponse {
9
9
  allowedHosts: string[];
10
10
  /** The reference you created the session with. Null when you didn't set one. */
11
11
  reference: string | null;
12
- /** A pending session must be approved, and an approved one claimed, before this. */
12
+ /** The purchase you created the session with, as the user saw it. Null for an agent card session opened without one. */
13
+ purchase: Natural.CreateCardSessionsResponsePurchase | null;
14
+ /** A pending session must be approved before this, 10 minutes after creation. After it, an unapproved session is expired. */
15
+ approvalExpiresAt: string;
16
+ /** An approved session must be claimed before this: creation plus claimWindowSeconds. After it, an unclaimed session is expired. */
13
17
  claimExpiresAt: string;
14
18
  claimedAt: string | null;
15
19
  /** When the claimed proxy login stops working. */
@@ -0,0 +1,8 @@
1
+ export interface CreateCardSessionsResponsePurchase {
2
+ merchantName: string;
3
+ /** Minor units (cents) of `currency`. 0 means no purchase. */
4
+ amount: number;
5
+ currency: string;
6
+ /** The description you set. Null when you didn't. */
7
+ description: string | null;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -9,7 +9,11 @@ export interface GetCardSessionsResponse {
9
9
  allowedHosts: string[];
10
10
  /** The reference you created the session with. Null when you didn't set one. */
11
11
  reference: string | null;
12
- /** A pending session must be approved, and an approved one claimed, before this. */
12
+ /** The purchase you created the session with, as the user saw it. Null for an agent card session opened without one. */
13
+ purchase: Natural.GetCardSessionsResponsePurchase | null;
14
+ /** A pending session must be approved before this, 10 minutes after creation. After it, an unapproved session is expired. */
15
+ approvalExpiresAt: string;
16
+ /** An approved session must be claimed before this: creation plus claimWindowSeconds. After it, an unclaimed session is expired. */
13
17
  claimExpiresAt: string;
14
18
  claimedAt: string | null;
15
19
  /** When the claimed proxy login stops working. */
@@ -0,0 +1,8 @@
1
+ export interface GetCardSessionsResponsePurchase {
2
+ merchantName: string;
3
+ /** Minor units (cents) of `currency`. 0 means no purchase. */
4
+ amount: number;
5
+ currency: string;
6
+ /** The description you set. Null when you didn't. */
7
+ description: string | null;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -9,7 +9,11 @@ export interface ListCardSessionsResponseDataItem {
9
9
  allowedHosts: string[];
10
10
  /** The reference you created the session with. Null when you didn't set one. */
11
11
  reference: string | null;
12
- /** A pending session must be approved, and an approved one claimed, before this. */
12
+ /** The purchase you created the session with, as the user saw it. Null for an agent card session opened without one. */
13
+ purchase: Natural.ListCardSessionsResponseDataItemPurchase | null;
14
+ /** A pending session must be approved before this, 10 minutes after creation. After it, an unapproved session is expired. */
15
+ approvalExpiresAt: string;
16
+ /** An approved session must be claimed before this: creation plus claimWindowSeconds. After it, an unclaimed session is expired. */
13
17
  claimExpiresAt: string;
14
18
  claimedAt: string | null;
15
19
  /** When the claimed proxy login stops working. */
@@ -0,0 +1,8 @@
1
+ export interface ListCardSessionsResponseDataItemPurchase {
2
+ merchantName: string;
3
+ /** Minor units (cents) of `currency`. 0 means no purchase. */
4
+ amount: number;
5
+ currency: string;
6
+ /** The description you set. Null when you didn't. */
7
+ description: string | null;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -8,11 +8,13 @@ export * from "./CreateCardSessionsResponse.mjs";
8
8
  export * from "./CreateCardSessionsResponseAgentToken.mjs";
9
9
  export * from "./CreateCardSessionsResponseCardSource.mjs";
10
10
  export * from "./CreateCardSessionsResponseNote.mjs";
11
+ export * from "./CreateCardSessionsResponsePurchase.mjs";
11
12
  export * from "./CreateCardSessionsResponseStatus.mjs";
12
13
  export * from "./GetCardSessionsResponse.mjs";
13
14
  export * from "./GetCardSessionsResponseAgentToken.mjs";
14
15
  export * from "./GetCardSessionsResponseCardSource.mjs";
15
16
  export * from "./GetCardSessionsResponseNote.mjs";
17
+ export * from "./GetCardSessionsResponsePurchase.mjs";
16
18
  export * from "./GetCardSessionsResponseStatus.mjs";
17
19
  export * from "./ListCardSessionsRequestStatus.mjs";
18
20
  export * from "./ListCardSessionsResponse.mjs";
@@ -20,6 +22,7 @@ export * from "./ListCardSessionsResponseDataItem.mjs";
20
22
  export * from "./ListCardSessionsResponseDataItemAgentToken.mjs";
21
23
  export * from "./ListCardSessionsResponseDataItemCardSource.mjs";
22
24
  export * from "./ListCardSessionsResponseDataItemNote.mjs";
25
+ export * from "./ListCardSessionsResponseDataItemPurchase.mjs";
23
26
  export * from "./ListCardSessionsResponseDataItemStatus.mjs";
24
27
  export * from "./ListCardSessionsResponseMeta.mjs";
25
28
  export * from "./ListCardSessionsResponseMetaPagination.mjs";
@@ -8,11 +8,13 @@ export * from "./CreateCardSessionsResponse.mjs";
8
8
  export * from "./CreateCardSessionsResponseAgentToken.mjs";
9
9
  export * from "./CreateCardSessionsResponseCardSource.mjs";
10
10
  export * from "./CreateCardSessionsResponseNote.mjs";
11
+ export * from "./CreateCardSessionsResponsePurchase.mjs";
11
12
  export * from "./CreateCardSessionsResponseStatus.mjs";
12
13
  export * from "./GetCardSessionsResponse.mjs";
13
14
  export * from "./GetCardSessionsResponseAgentToken.mjs";
14
15
  export * from "./GetCardSessionsResponseCardSource.mjs";
15
16
  export * from "./GetCardSessionsResponseNote.mjs";
17
+ export * from "./GetCardSessionsResponsePurchase.mjs";
16
18
  export * from "./GetCardSessionsResponseStatus.mjs";
17
19
  export * from "./ListCardSessionsRequestStatus.mjs";
18
20
  export * from "./ListCardSessionsResponse.mjs";
@@ -20,6 +22,7 @@ export * from "./ListCardSessionsResponseDataItem.mjs";
20
22
  export * from "./ListCardSessionsResponseDataItemAgentToken.mjs";
21
23
  export * from "./ListCardSessionsResponseDataItemCardSource.mjs";
22
24
  export * from "./ListCardSessionsResponseDataItemNote.mjs";
25
+ export * from "./ListCardSessionsResponseDataItemPurchase.mjs";
23
26
  export * from "./ListCardSessionsResponseDataItemStatus.mjs";
24
27
  export * from "./ListCardSessionsResponseMeta.mjs";
25
28
  export * from "./ListCardSessionsResponseMetaPagination.mjs";
@@ -4,4 +4,6 @@ export interface CardPaymentRelationships {
4
4
  paymentIntent: Natural.CardPaymentRelationshipsPaymentIntent;
5
5
  /** Up to 25 newest refund references, including pending and failed refunds. List refunds by cardPaymentId for the full history. */
6
6
  refunds: Natural.CardPaymentRelationshipsRefunds;
7
+ /** The same payment in GET /transactions. Null until the payment first changes status. */
8
+ transaction: Natural.CardPaymentRelationshipsTransaction;
7
9
  }
@@ -0,0 +1,8 @@
1
+ import type * as Natural from "../index.mjs";
2
+ /**
3
+ * The same payment in GET /transactions. Null until the payment first changes status.
4
+ */
5
+ export interface CardPaymentRelationshipsTransaction {
6
+ /** Related resource identifier. */
7
+ data: Natural.CardPaymentRelationshipsTransactionData | null;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ import type * as Natural from "../index.mjs";
2
+ /**
3
+ * Related resource identifier.
4
+ */
5
+ export interface CardPaymentRelationshipsTransactionData {
6
+ /** Resource type. Always `transaction`. */
7
+ type: Natural.CardPaymentRelationshipsTransactionDataType;
8
+ /** Transaction ID (txn_*). */
9
+ id: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ /** Resource type. Always `transaction`. */
2
+ export declare const CardPaymentRelationshipsTransactionDataType: {
3
+ readonly Transaction: "transaction";
4
+ };
5
+ export type CardPaymentRelationshipsTransactionDataType = (typeof CardPaymentRelationshipsTransactionDataType)[keyof typeof CardPaymentRelationshipsTransactionDataType];
@@ -0,0 +1,5 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Resource type. Always `transaction`. */
3
+ export const CardPaymentRelationshipsTransactionDataType = {
4
+ Transaction: "transaction",
5
+ };
@@ -32,6 +32,9 @@ export * from "./CardPaymentRelationshipsPaymentIntentDataType.mjs";
32
32
  export * from "./CardPaymentRelationshipsRefunds.mjs";
33
33
  export * from "./CardPaymentRelationshipsRefundsDataItem.mjs";
34
34
  export * from "./CardPaymentRelationshipsRefundsDataItemType.mjs";
35
+ export * from "./CardPaymentRelationshipsTransaction.mjs";
36
+ export * from "./CardPaymentRelationshipsTransactionData.mjs";
37
+ export * from "./CardPaymentRelationshipsTransactionDataType.mjs";
35
38
  export * from "./CardPaymentType.mjs";
36
39
  export * from "./ComplianceSessionStatusResponse.mjs";
37
40
  export * from "./ComplianceSessionStatusResponseData.mjs";
@@ -32,6 +32,9 @@ export * from "./CardPaymentRelationshipsPaymentIntentDataType.mjs";
32
32
  export * from "./CardPaymentRelationshipsRefunds.mjs";
33
33
  export * from "./CardPaymentRelationshipsRefundsDataItem.mjs";
34
34
  export * from "./CardPaymentRelationshipsRefundsDataItemType.mjs";
35
+ export * from "./CardPaymentRelationshipsTransaction.mjs";
36
+ export * from "./CardPaymentRelationshipsTransactionData.mjs";
37
+ export * from "./CardPaymentRelationshipsTransactionDataType.mjs";
35
38
  export * from "./CardPaymentType.mjs";
36
39
  export * from "./ComplianceSessionStatusResponse.mjs";
37
40
  export * from "./ComplianceSessionStatusResponseData.mjs";