@naturalpay/sdk 1.6.41 → 1.6.43

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 (68) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/cardSessions/client/Client.d.ts +2 -1
  3. package/dist/cjs/api/resources/cardSessions/client/Client.js +2 -1
  4. package/dist/cjs/api/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.ts +4 -1
  5. package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponse.d.ts +2 -0
  6. package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponseAgentToken.d.ts +9 -0
  7. package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponseAgentToken.js +3 -0
  8. package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponse.d.ts +2 -0
  9. package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponseAgentToken.d.ts +9 -0
  10. package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponseAgentToken.js +3 -0
  11. package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.ts +2 -0
  12. package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemAgentToken.d.ts +9 -0
  13. package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemAgentToken.js +3 -0
  14. package/dist/cjs/api/resources/cardSessions/types/index.d.ts +3 -0
  15. package/dist/cjs/api/resources/cardSessions/types/index.js +3 -0
  16. package/dist/cjs/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.ts +1 -0
  17. package/dist/cjs/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.js +1 -0
  18. package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponse.d.ts +2 -0
  19. package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponse.js +2 -0
  20. package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponseAgentToken.d.ts +10 -0
  21. package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponseAgentToken.js +42 -0
  22. package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponse.d.ts +2 -0
  23. package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponse.js +2 -0
  24. package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponseAgentToken.d.ts +10 -0
  25. package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponseAgentToken.js +42 -0
  26. package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.ts +2 -0
  27. package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.js +2 -0
  28. package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemAgentToken.d.ts +10 -0
  29. package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemAgentToken.js +42 -0
  30. package/dist/cjs/serialization/resources/cardSessions/types/index.d.ts +3 -0
  31. package/dist/cjs/serialization/resources/cardSessions/types/index.js +3 -0
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/BaseClient.mjs +2 -2
  35. package/dist/esm/api/resources/cardSessions/client/Client.d.mts +2 -1
  36. package/dist/esm/api/resources/cardSessions/client/Client.mjs +2 -1
  37. package/dist/esm/api/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.mts +4 -1
  38. package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponse.d.mts +2 -0
  39. package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponseAgentToken.d.mts +9 -0
  40. package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponseAgentToken.mjs +2 -0
  41. package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponse.d.mts +2 -0
  42. package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponseAgentToken.d.mts +9 -0
  43. package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponseAgentToken.mjs +2 -0
  44. package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.mts +2 -0
  45. package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItemAgentToken.d.mts +9 -0
  46. package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItemAgentToken.mjs +2 -0
  47. package/dist/esm/api/resources/cardSessions/types/index.d.mts +3 -0
  48. package/dist/esm/api/resources/cardSessions/types/index.mjs +3 -0
  49. package/dist/esm/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.mts +1 -0
  50. package/dist/esm/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.mjs +1 -0
  51. package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponse.d.mts +2 -0
  52. package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponse.mjs +2 -0
  53. package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponseAgentToken.d.mts +10 -0
  54. package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponseAgentToken.mjs +6 -0
  55. package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponse.d.mts +2 -0
  56. package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponse.mjs +2 -0
  57. package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponseAgentToken.d.mts +10 -0
  58. package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponseAgentToken.mjs +6 -0
  59. package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.mts +2 -0
  60. package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.mjs +2 -0
  61. package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemAgentToken.d.mts +10 -0
  62. package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemAgentToken.mjs +6 -0
  63. package/dist/esm/serialization/resources/cardSessions/types/index.d.mts +3 -0
  64. package/dist/esm/serialization/resources/cardSessions/types/index.mjs +3 -0
  65. package/dist/esm/version.d.mts +1 -1
  66. package/dist/esm/version.mjs +1 -1
  67. package/package.json +1 -1
  68. package/reference.md +2 -1
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@naturalpay/sdk",
46
- "X-Fern-SDK-Version": "1.6.41",
47
- "User-Agent": "@naturalpay/sdk/1.6.41",
46
+ "X-Fern-SDK-Version": "1.6.43",
47
+ "User-Agent": "@naturalpay/sdk/1.6.43",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  "X-Instance-ID": options === null || options === void 0 ? void 0 : options.instanceId,
@@ -70,7 +70,8 @@ export declare class CardSessionsClient {
70
70
  * amount: 2450,
71
71
  * currency: "USD"
72
72
  * },
73
- * reference: "checkout_7f3a"
73
+ * reference: "checkout_7f3a",
74
+ * requestAgentToken: true
74
75
  * })
75
76
  */
76
77
  create(request: Natural.CreateCardSessionsRequest, requestOptions?: CardSessionsClient.RequestOptions): core.HttpResponsePromise<Natural.CreateCardSessionsResponse>;
@@ -211,7 +211,8 @@ class CardSessionsClient {
211
211
  * amount: 2450,
212
212
  * currency: "USD"
213
213
  * },
214
- * reference: "checkout_7f3a"
214
+ * reference: "checkout_7f3a",
215
+ * requestAgentToken: true
215
216
  * })
216
217
  */
217
218
  create(request, requestOptions) {
@@ -10,7 +10,8 @@ import type * as Natural from "../../../../index.js";
10
10
  * amount: 2450,
11
11
  * currency: "USD"
12
12
  * },
13
- * reference: "checkout_7f3a"
13
+ * reference: "checkout_7f3a",
14
+ * requestAgentToken: true
14
15
  * }
15
16
  */
16
17
  export interface CreateCardSessionsRequest {
@@ -27,4 +28,6 @@ export interface CreateCardSessionsRequest {
27
28
  purchase?: Natural.CreateCardSessionsRequestPurchase;
28
29
  /** 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. */
29
30
  reference?: string;
31
+ /** Cards the user added only, for a USD purchase of at most $999,999.99. Set it when the checkout won't take the card through the proxy, for example when it collects the card in its own payment iframe. While approving, the user is also asked to approve agent payments on the card; agentToken.mandateId then says whether you can pay with an agent token. Defaults to false. */
32
+ requestAgentToken?: boolean;
30
33
  }
@@ -15,6 +15,8 @@ export interface CreateCardSessionsResponse {
15
15
  /** When the claimed proxy login stops working. */
16
16
  credentialExpiresAt: string | null;
17
17
  createdAt: string;
18
+ /** Agent token for this purchase, when you set requestAgentToken. */
19
+ agentToken: Natural.CreateCardSessionsResponseAgentToken;
18
20
  /** Cards the user added only, once the purchase is approved: a suggestion to pass on to the user. Null when there's nothing to suggest, and always null in list results: get the session for it. */
19
21
  note: Natural.CreateCardSessionsResponseNote | null;
20
22
  /** Cards the user added only: send the user here to approve the purchase. Returned only in this response; it can't be fetched again. */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Agent token for this purchase, when you set requestAgentToken.
3
+ */
4
+ export interface CreateCardSessionsResponseAgentToken {
5
+ /** You set requestAgentToken when creating the session. */
6
+ requested: boolean;
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
8
+ mandateId: string | null;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -15,6 +15,8 @@ export interface GetCardSessionsResponse {
15
15
  /** When the claimed proxy login stops working. */
16
16
  credentialExpiresAt: string | null;
17
17
  createdAt: string;
18
+ /** Agent token for this purchase, when you set requestAgentToken. */
19
+ agentToken: Natural.GetCardSessionsResponseAgentToken;
18
20
  /** Cards the user added only, once the purchase is approved: a suggestion to pass on to the user. Null when there's nothing to suggest, and always null in list results: get the session for it. */
19
21
  note: Natural.GetCardSessionsResponseNote | null;
20
22
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Agent token for this purchase, when you set requestAgentToken.
3
+ */
4
+ export interface GetCardSessionsResponseAgentToken {
5
+ /** You set requestAgentToken when creating the session. */
6
+ requested: boolean;
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
8
+ mandateId: string | null;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -15,6 +15,8 @@ export interface ListCardSessionsResponseDataItem {
15
15
  /** When the claimed proxy login stops working. */
16
16
  credentialExpiresAt: string | null;
17
17
  createdAt: string;
18
+ /** Agent token for this purchase, when you set requestAgentToken. */
19
+ agentToken: Natural.ListCardSessionsResponseDataItemAgentToken;
18
20
  /** Cards the user added only, once the purchase is approved: a suggestion to pass on to the user. Null when there's nothing to suggest, and always null in list results: get the session for it. */
19
21
  note: Natural.ListCardSessionsResponseDataItemNote | null;
20
22
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Agent token for this purchase, when you set requestAgentToken.
3
+ */
4
+ export interface ListCardSessionsResponseDataItemAgentToken {
5
+ /** You set requestAgentToken when creating the session. */
6
+ requested: boolean;
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
8
+ mandateId: string | null;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,16 +5,19 @@ export * from "./ClaimCardSessionsResponseProxy.js";
5
5
  export * from "./ClaimCardSessionsResponseProxyProtocol.js";
6
6
  export * from "./CreateCardSessionsRequestPurchase.js";
7
7
  export * from "./CreateCardSessionsResponse.js";
8
+ export * from "./CreateCardSessionsResponseAgentToken.js";
8
9
  export * from "./CreateCardSessionsResponseCardSource.js";
9
10
  export * from "./CreateCardSessionsResponseNote.js";
10
11
  export * from "./CreateCardSessionsResponseStatus.js";
11
12
  export * from "./GetCardSessionsResponse.js";
13
+ export * from "./GetCardSessionsResponseAgentToken.js";
12
14
  export * from "./GetCardSessionsResponseCardSource.js";
13
15
  export * from "./GetCardSessionsResponseNote.js";
14
16
  export * from "./GetCardSessionsResponseStatus.js";
15
17
  export * from "./ListCardSessionsRequestStatus.js";
16
18
  export * from "./ListCardSessionsResponse.js";
17
19
  export * from "./ListCardSessionsResponseDataItem.js";
20
+ export * from "./ListCardSessionsResponseDataItemAgentToken.js";
18
21
  export * from "./ListCardSessionsResponseDataItemCardSource.js";
19
22
  export * from "./ListCardSessionsResponseDataItemNote.js";
20
23
  export * from "./ListCardSessionsResponseDataItemStatus.js";
@@ -21,16 +21,19 @@ __exportStar(require("./ClaimCardSessionsResponseProxy.js"), exports);
21
21
  __exportStar(require("./ClaimCardSessionsResponseProxyProtocol.js"), exports);
22
22
  __exportStar(require("./CreateCardSessionsRequestPurchase.js"), exports);
23
23
  __exportStar(require("./CreateCardSessionsResponse.js"), exports);
24
+ __exportStar(require("./CreateCardSessionsResponseAgentToken.js"), exports);
24
25
  __exportStar(require("./CreateCardSessionsResponseCardSource.js"), exports);
25
26
  __exportStar(require("./CreateCardSessionsResponseNote.js"), exports);
26
27
  __exportStar(require("./CreateCardSessionsResponseStatus.js"), exports);
27
28
  __exportStar(require("./GetCardSessionsResponse.js"), exports);
29
+ __exportStar(require("./GetCardSessionsResponseAgentToken.js"), exports);
28
30
  __exportStar(require("./GetCardSessionsResponseCardSource.js"), exports);
29
31
  __exportStar(require("./GetCardSessionsResponseNote.js"), exports);
30
32
  __exportStar(require("./GetCardSessionsResponseStatus.js"), exports);
31
33
  __exportStar(require("./ListCardSessionsRequestStatus.js"), exports);
32
34
  __exportStar(require("./ListCardSessionsResponse.js"), exports);
33
35
  __exportStar(require("./ListCardSessionsResponseDataItem.js"), exports);
36
+ __exportStar(require("./ListCardSessionsResponseDataItemAgentToken.js"), exports);
34
37
  __exportStar(require("./ListCardSessionsResponseDataItemCardSource.js"), exports);
35
38
  __exportStar(require("./ListCardSessionsResponseDataItemNote.js"), exports);
36
39
  __exportStar(require("./ListCardSessionsResponseDataItemStatus.js"), exports);
@@ -11,5 +11,6 @@ export declare namespace CreateCardSessionsRequest {
11
11
  ttlSeconds?: number | null;
12
12
  purchase?: CreateCardSessionsRequestPurchase.Raw | null;
13
13
  reference?: string | null;
14
+ requestAgentToken?: boolean | null;
14
15
  }
15
16
  }
@@ -44,4 +44,5 @@ exports.CreateCardSessionsRequest = core.serialization.object({
44
44
  ttlSeconds: core.serialization.number().optional(),
45
45
  purchase: CreateCardSessionsRequestPurchase_js_1.CreateCardSessionsRequestPurchase.optional(),
46
46
  reference: core.serialization.string().optional(),
47
+ requestAgentToken: core.serialization.boolean().optional(),
47
48
  });
@@ -1,6 +1,7 @@
1
1
  import type * as Natural from "../../../../api/index.js";
2
2
  import * as core from "../../../../core/index.js";
3
3
  import type * as serializers from "../../../index.js";
4
+ import { CreateCardSessionsResponseAgentToken } from "./CreateCardSessionsResponseAgentToken.js";
4
5
  import { CreateCardSessionsResponseCardSource } from "./CreateCardSessionsResponseCardSource.js";
5
6
  import { CreateCardSessionsResponseNote } from "./CreateCardSessionsResponseNote.js";
6
7
  import { CreateCardSessionsResponseStatus } from "./CreateCardSessionsResponseStatus.js";
@@ -17,6 +18,7 @@ export declare namespace CreateCardSessionsResponse {
17
18
  claimedAt?: string | null;
18
19
  credentialExpiresAt?: string | null;
19
20
  createdAt: string;
21
+ agentToken: CreateCardSessionsResponseAgentToken.Raw;
20
22
  note?: CreateCardSessionsResponseNote.Raw | null;
21
23
  approvalUrl?: string | null;
22
24
  }
@@ -36,6 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.CreateCardSessionsResponse = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
+ const CreateCardSessionsResponseAgentToken_js_1 = require("./CreateCardSessionsResponseAgentToken.js");
39
40
  const CreateCardSessionsResponseCardSource_js_1 = require("./CreateCardSessionsResponseCardSource.js");
40
41
  const CreateCardSessionsResponseNote_js_1 = require("./CreateCardSessionsResponseNote.js");
41
42
  const CreateCardSessionsResponseStatus_js_1 = require("./CreateCardSessionsResponseStatus.js");
@@ -50,6 +51,7 @@ exports.CreateCardSessionsResponse = core.serialization.object({
50
51
  claimedAt: core.serialization.string().nullable(),
51
52
  credentialExpiresAt: core.serialization.string().nullable(),
52
53
  createdAt: core.serialization.string(),
54
+ agentToken: CreateCardSessionsResponseAgentToken_js_1.CreateCardSessionsResponseAgentToken,
53
55
  note: CreateCardSessionsResponseNote_js_1.CreateCardSessionsResponseNote.nullable(),
54
56
  approvalUrl: core.serialization.string().nullable(),
55
57
  });
@@ -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
+ export declare const CreateCardSessionsResponseAgentToken: core.serialization.ObjectSchema<serializers.CreateCardSessionsResponseAgentToken.Raw, Natural.CreateCardSessionsResponseAgentToken>;
5
+ export declare namespace CreateCardSessionsResponseAgentToken {
6
+ interface Raw {
7
+ requested: boolean;
8
+ mandateId?: string | 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.CreateCardSessionsResponseAgentToken = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ exports.CreateCardSessionsResponseAgentToken = core.serialization.object({
40
+ requested: core.serialization.boolean(),
41
+ mandateId: core.serialization.string().nullable(),
42
+ });
@@ -1,6 +1,7 @@
1
1
  import type * as Natural from "../../../../api/index.js";
2
2
  import * as core from "../../../../core/index.js";
3
3
  import type * as serializers from "../../../index.js";
4
+ import { GetCardSessionsResponseAgentToken } from "./GetCardSessionsResponseAgentToken.js";
4
5
  import { GetCardSessionsResponseCardSource } from "./GetCardSessionsResponseCardSource.js";
5
6
  import { GetCardSessionsResponseNote } from "./GetCardSessionsResponseNote.js";
6
7
  import { GetCardSessionsResponseStatus } from "./GetCardSessionsResponseStatus.js";
@@ -17,6 +18,7 @@ export declare namespace GetCardSessionsResponse {
17
18
  claimedAt?: string | null;
18
19
  credentialExpiresAt?: string | null;
19
20
  createdAt: string;
21
+ agentToken: GetCardSessionsResponseAgentToken.Raw;
20
22
  note?: GetCardSessionsResponseNote.Raw | null;
21
23
  }
22
24
  }
@@ -36,6 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.GetCardSessionsResponse = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
+ const GetCardSessionsResponseAgentToken_js_1 = require("./GetCardSessionsResponseAgentToken.js");
39
40
  const GetCardSessionsResponseCardSource_js_1 = require("./GetCardSessionsResponseCardSource.js");
40
41
  const GetCardSessionsResponseNote_js_1 = require("./GetCardSessionsResponseNote.js");
41
42
  const GetCardSessionsResponseStatus_js_1 = require("./GetCardSessionsResponseStatus.js");
@@ -50,5 +51,6 @@ exports.GetCardSessionsResponse = core.serialization.object({
50
51
  claimedAt: core.serialization.string().nullable(),
51
52
  credentialExpiresAt: core.serialization.string().nullable(),
52
53
  createdAt: core.serialization.string(),
54
+ agentToken: GetCardSessionsResponseAgentToken_js_1.GetCardSessionsResponseAgentToken,
53
55
  note: GetCardSessionsResponseNote_js_1.GetCardSessionsResponseNote.nullable(),
54
56
  });
@@ -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
+ export declare const GetCardSessionsResponseAgentToken: core.serialization.ObjectSchema<serializers.GetCardSessionsResponseAgentToken.Raw, Natural.GetCardSessionsResponseAgentToken>;
5
+ export declare namespace GetCardSessionsResponseAgentToken {
6
+ interface Raw {
7
+ requested: boolean;
8
+ mandateId?: string | 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.GetCardSessionsResponseAgentToken = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ exports.GetCardSessionsResponseAgentToken = core.serialization.object({
40
+ requested: core.serialization.boolean(),
41
+ mandateId: core.serialization.string().nullable(),
42
+ });
@@ -1,6 +1,7 @@
1
1
  import type * as Natural from "../../../../api/index.js";
2
2
  import * as core from "../../../../core/index.js";
3
3
  import type * as serializers from "../../../index.js";
4
+ import { ListCardSessionsResponseDataItemAgentToken } from "./ListCardSessionsResponseDataItemAgentToken.js";
4
5
  import { ListCardSessionsResponseDataItemCardSource } from "./ListCardSessionsResponseDataItemCardSource.js";
5
6
  import { ListCardSessionsResponseDataItemNote } from "./ListCardSessionsResponseDataItemNote.js";
6
7
  import { ListCardSessionsResponseDataItemStatus } from "./ListCardSessionsResponseDataItemStatus.js";
@@ -17,6 +18,7 @@ export declare namespace ListCardSessionsResponseDataItem {
17
18
  claimedAt?: string | null;
18
19
  credentialExpiresAt?: string | null;
19
20
  createdAt: string;
21
+ agentToken: ListCardSessionsResponseDataItemAgentToken.Raw;
20
22
  note?: ListCardSessionsResponseDataItemNote.Raw | null;
21
23
  }
22
24
  }
@@ -36,6 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.ListCardSessionsResponseDataItem = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
+ const ListCardSessionsResponseDataItemAgentToken_js_1 = require("./ListCardSessionsResponseDataItemAgentToken.js");
39
40
  const ListCardSessionsResponseDataItemCardSource_js_1 = require("./ListCardSessionsResponseDataItemCardSource.js");
40
41
  const ListCardSessionsResponseDataItemNote_js_1 = require("./ListCardSessionsResponseDataItemNote.js");
41
42
  const ListCardSessionsResponseDataItemStatus_js_1 = require("./ListCardSessionsResponseDataItemStatus.js");
@@ -50,5 +51,6 @@ exports.ListCardSessionsResponseDataItem = core.serialization.object({
50
51
  claimedAt: core.serialization.string().nullable(),
51
52
  credentialExpiresAt: core.serialization.string().nullable(),
52
53
  createdAt: core.serialization.string(),
54
+ agentToken: ListCardSessionsResponseDataItemAgentToken_js_1.ListCardSessionsResponseDataItemAgentToken,
53
55
  note: ListCardSessionsResponseDataItemNote_js_1.ListCardSessionsResponseDataItemNote.nullable(),
54
56
  });
@@ -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
+ export declare const ListCardSessionsResponseDataItemAgentToken: core.serialization.ObjectSchema<serializers.ListCardSessionsResponseDataItemAgentToken.Raw, Natural.ListCardSessionsResponseDataItemAgentToken>;
5
+ export declare namespace ListCardSessionsResponseDataItemAgentToken {
6
+ interface Raw {
7
+ requested: boolean;
8
+ mandateId?: string | 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.ListCardSessionsResponseDataItemAgentToken = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ exports.ListCardSessionsResponseDataItemAgentToken = core.serialization.object({
40
+ requested: core.serialization.boolean(),
41
+ mandateId: core.serialization.string().nullable(),
42
+ });
@@ -5,16 +5,19 @@ export * from "./ClaimCardSessionsResponseProxy.js";
5
5
  export * from "./ClaimCardSessionsResponseProxyProtocol.js";
6
6
  export * from "./CreateCardSessionsRequestPurchase.js";
7
7
  export * from "./CreateCardSessionsResponse.js";
8
+ export * from "./CreateCardSessionsResponseAgentToken.js";
8
9
  export * from "./CreateCardSessionsResponseCardSource.js";
9
10
  export * from "./CreateCardSessionsResponseNote.js";
10
11
  export * from "./CreateCardSessionsResponseStatus.js";
11
12
  export * from "./GetCardSessionsResponse.js";
13
+ export * from "./GetCardSessionsResponseAgentToken.js";
12
14
  export * from "./GetCardSessionsResponseCardSource.js";
13
15
  export * from "./GetCardSessionsResponseNote.js";
14
16
  export * from "./GetCardSessionsResponseStatus.js";
15
17
  export * from "./ListCardSessionsRequestStatus.js";
16
18
  export * from "./ListCardSessionsResponse.js";
17
19
  export * from "./ListCardSessionsResponseDataItem.js";
20
+ export * from "./ListCardSessionsResponseDataItemAgentToken.js";
18
21
  export * from "./ListCardSessionsResponseDataItemCardSource.js";
19
22
  export * from "./ListCardSessionsResponseDataItemNote.js";
20
23
  export * from "./ListCardSessionsResponseDataItemStatus.js";
@@ -21,16 +21,19 @@ __exportStar(require("./ClaimCardSessionsResponseProxy.js"), exports);
21
21
  __exportStar(require("./ClaimCardSessionsResponseProxyProtocol.js"), exports);
22
22
  __exportStar(require("./CreateCardSessionsRequestPurchase.js"), exports);
23
23
  __exportStar(require("./CreateCardSessionsResponse.js"), exports);
24
+ __exportStar(require("./CreateCardSessionsResponseAgentToken.js"), exports);
24
25
  __exportStar(require("./CreateCardSessionsResponseCardSource.js"), exports);
25
26
  __exportStar(require("./CreateCardSessionsResponseNote.js"), exports);
26
27
  __exportStar(require("./CreateCardSessionsResponseStatus.js"), exports);
27
28
  __exportStar(require("./GetCardSessionsResponse.js"), exports);
29
+ __exportStar(require("./GetCardSessionsResponseAgentToken.js"), exports);
28
30
  __exportStar(require("./GetCardSessionsResponseCardSource.js"), exports);
29
31
  __exportStar(require("./GetCardSessionsResponseNote.js"), exports);
30
32
  __exportStar(require("./GetCardSessionsResponseStatus.js"), exports);
31
33
  __exportStar(require("./ListCardSessionsRequestStatus.js"), exports);
32
34
  __exportStar(require("./ListCardSessionsResponse.js"), exports);
33
35
  __exportStar(require("./ListCardSessionsResponseDataItem.js"), exports);
36
+ __exportStar(require("./ListCardSessionsResponseDataItemAgentToken.js"), exports);
34
37
  __exportStar(require("./ListCardSessionsResponseDataItemCardSource.js"), exports);
35
38
  __exportStar(require("./ListCardSessionsResponseDataItemNote.js"), exports);
36
39
  __exportStar(require("./ListCardSessionsResponseDataItemStatus.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.6.41";
1
+ export declare const SDK_VERSION = "1.6.43";
@@ -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.41";
4
+ exports.SDK_VERSION = "1.6.43";
@@ -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.41",
10
- "User-Agent": "@naturalpay/sdk/1.6.41",
9
+ "X-Fern-SDK-Version": "1.6.43",
10
+ "User-Agent": "@naturalpay/sdk/1.6.43",
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,
@@ -70,7 +70,8 @@ export declare class CardSessionsClient {
70
70
  * amount: 2450,
71
71
  * currency: "USD"
72
72
  * },
73
- * reference: "checkout_7f3a"
73
+ * reference: "checkout_7f3a",
74
+ * requestAgentToken: true
74
75
  * })
75
76
  */
76
77
  create(request: Natural.CreateCardSessionsRequest, requestOptions?: CardSessionsClient.RequestOptions): core.HttpResponsePromise<Natural.CreateCardSessionsResponse>;
@@ -175,7 +175,8 @@ export class CardSessionsClient {
175
175
  * amount: 2450,
176
176
  * currency: "USD"
177
177
  * },
178
- * reference: "checkout_7f3a"
178
+ * reference: "checkout_7f3a",
179
+ * requestAgentToken: true
179
180
  * })
180
181
  */
181
182
  create(request, requestOptions) {
@@ -10,7 +10,8 @@ import type * as Natural from "../../../../index.mjs";
10
10
  * amount: 2450,
11
11
  * currency: "USD"
12
12
  * },
13
- * reference: "checkout_7f3a"
13
+ * reference: "checkout_7f3a",
14
+ * requestAgentToken: true
14
15
  * }
15
16
  */
16
17
  export interface CreateCardSessionsRequest {
@@ -27,4 +28,6 @@ export interface CreateCardSessionsRequest {
27
28
  purchase?: Natural.CreateCardSessionsRequestPurchase;
28
29
  /** 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. */
29
30
  reference?: string;
31
+ /** Cards the user added only, for a USD purchase of at most $999,999.99. Set it when the checkout won't take the card through the proxy, for example when it collects the card in its own payment iframe. While approving, the user is also asked to approve agent payments on the card; agentToken.mandateId then says whether you can pay with an agent token. Defaults to false. */
32
+ requestAgentToken?: boolean;
30
33
  }
@@ -15,6 +15,8 @@ export interface CreateCardSessionsResponse {
15
15
  /** When the claimed proxy login stops working. */
16
16
  credentialExpiresAt: string | null;
17
17
  createdAt: string;
18
+ /** Agent token for this purchase, when you set requestAgentToken. */
19
+ agentToken: Natural.CreateCardSessionsResponseAgentToken;
18
20
  /** Cards the user added only, once the purchase is approved: a suggestion to pass on to the user. Null when there's nothing to suggest, and always null in list results: get the session for it. */
19
21
  note: Natural.CreateCardSessionsResponseNote | null;
20
22
  /** Cards the user added only: send the user here to approve the purchase. Returned only in this response; it can't be fetched again. */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Agent token for this purchase, when you set requestAgentToken.
3
+ */
4
+ export interface CreateCardSessionsResponseAgentToken {
5
+ /** You set requestAgentToken when creating the session. */
6
+ requested: boolean;
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
8
+ mandateId: string | null;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -15,6 +15,8 @@ export interface GetCardSessionsResponse {
15
15
  /** When the claimed proxy login stops working. */
16
16
  credentialExpiresAt: string | null;
17
17
  createdAt: string;
18
+ /** Agent token for this purchase, when you set requestAgentToken. */
19
+ agentToken: Natural.GetCardSessionsResponseAgentToken;
18
20
  /** Cards the user added only, once the purchase is approved: a suggestion to pass on to the user. Null when there's nothing to suggest, and always null in list results: get the session for it. */
19
21
  note: Natural.GetCardSessionsResponseNote | null;
20
22
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Agent token for this purchase, when you set requestAgentToken.
3
+ */
4
+ export interface GetCardSessionsResponseAgentToken {
5
+ /** You set requestAgentToken when creating the session. */
6
+ requested: boolean;
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
8
+ mandateId: string | null;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -15,6 +15,8 @@ export interface ListCardSessionsResponseDataItem {
15
15
  /** When the claimed proxy login stops working. */
16
16
  credentialExpiresAt: string | null;
17
17
  createdAt: string;
18
+ /** Agent token for this purchase, when you set requestAgentToken. */
19
+ agentToken: Natural.ListCardSessionsResponseDataItemAgentToken;
18
20
  /** Cards the user added only, once the purchase is approved: a suggestion to pass on to the user. Null when there's nothing to suggest, and always null in list results: get the session for it. */
19
21
  note: Natural.ListCardSessionsResponseDataItemNote | null;
20
22
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Agent token for this purchase, when you set requestAgentToken.
3
+ */
4
+ export interface ListCardSessionsResponseDataItemAgentToken {
5
+ /** You set requestAgentToken when creating the session. */
6
+ requested: boolean;
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
8
+ mandateId: string | null;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -5,16 +5,19 @@ export * from "./ClaimCardSessionsResponseProxy.mjs";
5
5
  export * from "./ClaimCardSessionsResponseProxyProtocol.mjs";
6
6
  export * from "./CreateCardSessionsRequestPurchase.mjs";
7
7
  export * from "./CreateCardSessionsResponse.mjs";
8
+ export * from "./CreateCardSessionsResponseAgentToken.mjs";
8
9
  export * from "./CreateCardSessionsResponseCardSource.mjs";
9
10
  export * from "./CreateCardSessionsResponseNote.mjs";
10
11
  export * from "./CreateCardSessionsResponseStatus.mjs";
11
12
  export * from "./GetCardSessionsResponse.mjs";
13
+ export * from "./GetCardSessionsResponseAgentToken.mjs";
12
14
  export * from "./GetCardSessionsResponseCardSource.mjs";
13
15
  export * from "./GetCardSessionsResponseNote.mjs";
14
16
  export * from "./GetCardSessionsResponseStatus.mjs";
15
17
  export * from "./ListCardSessionsRequestStatus.mjs";
16
18
  export * from "./ListCardSessionsResponse.mjs";
17
19
  export * from "./ListCardSessionsResponseDataItem.mjs";
20
+ export * from "./ListCardSessionsResponseDataItemAgentToken.mjs";
18
21
  export * from "./ListCardSessionsResponseDataItemCardSource.mjs";
19
22
  export * from "./ListCardSessionsResponseDataItemNote.mjs";
20
23
  export * from "./ListCardSessionsResponseDataItemStatus.mjs";
@@ -5,16 +5,19 @@ export * from "./ClaimCardSessionsResponseProxy.mjs";
5
5
  export * from "./ClaimCardSessionsResponseProxyProtocol.mjs";
6
6
  export * from "./CreateCardSessionsRequestPurchase.mjs";
7
7
  export * from "./CreateCardSessionsResponse.mjs";
8
+ export * from "./CreateCardSessionsResponseAgentToken.mjs";
8
9
  export * from "./CreateCardSessionsResponseCardSource.mjs";
9
10
  export * from "./CreateCardSessionsResponseNote.mjs";
10
11
  export * from "./CreateCardSessionsResponseStatus.mjs";
11
12
  export * from "./GetCardSessionsResponse.mjs";
13
+ export * from "./GetCardSessionsResponseAgentToken.mjs";
12
14
  export * from "./GetCardSessionsResponseCardSource.mjs";
13
15
  export * from "./GetCardSessionsResponseNote.mjs";
14
16
  export * from "./GetCardSessionsResponseStatus.mjs";
15
17
  export * from "./ListCardSessionsRequestStatus.mjs";
16
18
  export * from "./ListCardSessionsResponse.mjs";
17
19
  export * from "./ListCardSessionsResponseDataItem.mjs";
20
+ export * from "./ListCardSessionsResponseDataItemAgentToken.mjs";
18
21
  export * from "./ListCardSessionsResponseDataItemCardSource.mjs";
19
22
  export * from "./ListCardSessionsResponseDataItemNote.mjs";
20
23
  export * from "./ListCardSessionsResponseDataItemStatus.mjs";
@@ -11,5 +11,6 @@ export declare namespace CreateCardSessionsRequest {
11
11
  ttlSeconds?: number | null;
12
12
  purchase?: CreateCardSessionsRequestPurchase.Raw | null;
13
13
  reference?: string | null;
14
+ requestAgentToken?: boolean | null;
14
15
  }
15
16
  }
@@ -8,4 +8,5 @@ export const CreateCardSessionsRequest = core.serialization.object({
8
8
  ttlSeconds: core.serialization.number().optional(),
9
9
  purchase: CreateCardSessionsRequestPurchase.optional(),
10
10
  reference: core.serialization.string().optional(),
11
+ requestAgentToken: core.serialization.boolean().optional(),
11
12
  });
@@ -1,6 +1,7 @@
1
1
  import type * as Natural from "../../../../api/index.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
+ import { CreateCardSessionsResponseAgentToken } from "./CreateCardSessionsResponseAgentToken.mjs";
4
5
  import { CreateCardSessionsResponseCardSource } from "./CreateCardSessionsResponseCardSource.mjs";
5
6
  import { CreateCardSessionsResponseNote } from "./CreateCardSessionsResponseNote.mjs";
6
7
  import { CreateCardSessionsResponseStatus } from "./CreateCardSessionsResponseStatus.mjs";
@@ -17,6 +18,7 @@ export declare namespace CreateCardSessionsResponse {
17
18
  claimedAt?: string | null;
18
19
  credentialExpiresAt?: string | null;
19
20
  createdAt: string;
21
+ agentToken: CreateCardSessionsResponseAgentToken.Raw;
20
22
  note?: CreateCardSessionsResponseNote.Raw | null;
21
23
  approvalUrl?: string | null;
22
24
  }
@@ -1,5 +1,6 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
+ import { CreateCardSessionsResponseAgentToken } from "./CreateCardSessionsResponseAgentToken.mjs";
3
4
  import { CreateCardSessionsResponseCardSource } from "./CreateCardSessionsResponseCardSource.mjs";
4
5
  import { CreateCardSessionsResponseNote } from "./CreateCardSessionsResponseNote.mjs";
5
6
  import { CreateCardSessionsResponseStatus } from "./CreateCardSessionsResponseStatus.mjs";
@@ -14,6 +15,7 @@ export const CreateCardSessionsResponse = core.serialization.object({
14
15
  claimedAt: core.serialization.string().nullable(),
15
16
  credentialExpiresAt: core.serialization.string().nullable(),
16
17
  createdAt: core.serialization.string(),
18
+ agentToken: CreateCardSessionsResponseAgentToken,
17
19
  note: CreateCardSessionsResponseNote.nullable(),
18
20
  approvalUrl: core.serialization.string().nullable(),
19
21
  });
@@ -0,0 +1,10 @@
1
+ import type * as Natural from "../../../../api/index.mjs";
2
+ import * as core from "../../../../core/index.mjs";
3
+ import type * as serializers from "../../../index.mjs";
4
+ export declare const CreateCardSessionsResponseAgentToken: core.serialization.ObjectSchema<serializers.CreateCardSessionsResponseAgentToken.Raw, Natural.CreateCardSessionsResponseAgentToken>;
5
+ export declare namespace CreateCardSessionsResponseAgentToken {
6
+ interface Raw {
7
+ requested: boolean;
8
+ mandateId?: string | null;
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../../../core/index.mjs";
3
+ export const CreateCardSessionsResponseAgentToken = core.serialization.object({
4
+ requested: core.serialization.boolean(),
5
+ mandateId: core.serialization.string().nullable(),
6
+ });
@@ -1,6 +1,7 @@
1
1
  import type * as Natural from "../../../../api/index.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
+ import { GetCardSessionsResponseAgentToken } from "./GetCardSessionsResponseAgentToken.mjs";
4
5
  import { GetCardSessionsResponseCardSource } from "./GetCardSessionsResponseCardSource.mjs";
5
6
  import { GetCardSessionsResponseNote } from "./GetCardSessionsResponseNote.mjs";
6
7
  import { GetCardSessionsResponseStatus } from "./GetCardSessionsResponseStatus.mjs";
@@ -17,6 +18,7 @@ export declare namespace GetCardSessionsResponse {
17
18
  claimedAt?: string | null;
18
19
  credentialExpiresAt?: string | null;
19
20
  createdAt: string;
21
+ agentToken: GetCardSessionsResponseAgentToken.Raw;
20
22
  note?: GetCardSessionsResponseNote.Raw | null;
21
23
  }
22
24
  }
@@ -1,5 +1,6 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
+ import { GetCardSessionsResponseAgentToken } from "./GetCardSessionsResponseAgentToken.mjs";
3
4
  import { GetCardSessionsResponseCardSource } from "./GetCardSessionsResponseCardSource.mjs";
4
5
  import { GetCardSessionsResponseNote } from "./GetCardSessionsResponseNote.mjs";
5
6
  import { GetCardSessionsResponseStatus } from "./GetCardSessionsResponseStatus.mjs";
@@ -14,5 +15,6 @@ export const GetCardSessionsResponse = core.serialization.object({
14
15
  claimedAt: core.serialization.string().nullable(),
15
16
  credentialExpiresAt: core.serialization.string().nullable(),
16
17
  createdAt: core.serialization.string(),
18
+ agentToken: GetCardSessionsResponseAgentToken,
17
19
  note: GetCardSessionsResponseNote.nullable(),
18
20
  });
@@ -0,0 +1,10 @@
1
+ import type * as Natural from "../../../../api/index.mjs";
2
+ import * as core from "../../../../core/index.mjs";
3
+ import type * as serializers from "../../../index.mjs";
4
+ export declare const GetCardSessionsResponseAgentToken: core.serialization.ObjectSchema<serializers.GetCardSessionsResponseAgentToken.Raw, Natural.GetCardSessionsResponseAgentToken>;
5
+ export declare namespace GetCardSessionsResponseAgentToken {
6
+ interface Raw {
7
+ requested: boolean;
8
+ mandateId?: string | null;
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../../../core/index.mjs";
3
+ export const GetCardSessionsResponseAgentToken = core.serialization.object({
4
+ requested: core.serialization.boolean(),
5
+ mandateId: core.serialization.string().nullable(),
6
+ });
@@ -1,6 +1,7 @@
1
1
  import type * as Natural from "../../../../api/index.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
+ import { ListCardSessionsResponseDataItemAgentToken } from "./ListCardSessionsResponseDataItemAgentToken.mjs";
4
5
  import { ListCardSessionsResponseDataItemCardSource } from "./ListCardSessionsResponseDataItemCardSource.mjs";
5
6
  import { ListCardSessionsResponseDataItemNote } from "./ListCardSessionsResponseDataItemNote.mjs";
6
7
  import { ListCardSessionsResponseDataItemStatus } from "./ListCardSessionsResponseDataItemStatus.mjs";
@@ -17,6 +18,7 @@ export declare namespace ListCardSessionsResponseDataItem {
17
18
  claimedAt?: string | null;
18
19
  credentialExpiresAt?: string | null;
19
20
  createdAt: string;
21
+ agentToken: ListCardSessionsResponseDataItemAgentToken.Raw;
20
22
  note?: ListCardSessionsResponseDataItemNote.Raw | null;
21
23
  }
22
24
  }
@@ -1,5 +1,6 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
+ import { ListCardSessionsResponseDataItemAgentToken } from "./ListCardSessionsResponseDataItemAgentToken.mjs";
3
4
  import { ListCardSessionsResponseDataItemCardSource } from "./ListCardSessionsResponseDataItemCardSource.mjs";
4
5
  import { ListCardSessionsResponseDataItemNote } from "./ListCardSessionsResponseDataItemNote.mjs";
5
6
  import { ListCardSessionsResponseDataItemStatus } from "./ListCardSessionsResponseDataItemStatus.mjs";
@@ -14,5 +15,6 @@ export const ListCardSessionsResponseDataItem = core.serialization.object({
14
15
  claimedAt: core.serialization.string().nullable(),
15
16
  credentialExpiresAt: core.serialization.string().nullable(),
16
17
  createdAt: core.serialization.string(),
18
+ agentToken: ListCardSessionsResponseDataItemAgentToken,
17
19
  note: ListCardSessionsResponseDataItemNote.nullable(),
18
20
  });
@@ -0,0 +1,10 @@
1
+ import type * as Natural from "../../../../api/index.mjs";
2
+ import * as core from "../../../../core/index.mjs";
3
+ import type * as serializers from "../../../index.mjs";
4
+ export declare const ListCardSessionsResponseDataItemAgentToken: core.serialization.ObjectSchema<serializers.ListCardSessionsResponseDataItemAgentToken.Raw, Natural.ListCardSessionsResponseDataItemAgentToken>;
5
+ export declare namespace ListCardSessionsResponseDataItemAgentToken {
6
+ interface Raw {
7
+ requested: boolean;
8
+ mandateId?: string | null;
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../../../core/index.mjs";
3
+ export const ListCardSessionsResponseDataItemAgentToken = core.serialization.object({
4
+ requested: core.serialization.boolean(),
5
+ mandateId: core.serialization.string().nullable(),
6
+ });
@@ -5,16 +5,19 @@ export * from "./ClaimCardSessionsResponseProxy.mjs";
5
5
  export * from "./ClaimCardSessionsResponseProxyProtocol.mjs";
6
6
  export * from "./CreateCardSessionsRequestPurchase.mjs";
7
7
  export * from "./CreateCardSessionsResponse.mjs";
8
+ export * from "./CreateCardSessionsResponseAgentToken.mjs";
8
9
  export * from "./CreateCardSessionsResponseCardSource.mjs";
9
10
  export * from "./CreateCardSessionsResponseNote.mjs";
10
11
  export * from "./CreateCardSessionsResponseStatus.mjs";
11
12
  export * from "./GetCardSessionsResponse.mjs";
13
+ export * from "./GetCardSessionsResponseAgentToken.mjs";
12
14
  export * from "./GetCardSessionsResponseCardSource.mjs";
13
15
  export * from "./GetCardSessionsResponseNote.mjs";
14
16
  export * from "./GetCardSessionsResponseStatus.mjs";
15
17
  export * from "./ListCardSessionsRequestStatus.mjs";
16
18
  export * from "./ListCardSessionsResponse.mjs";
17
19
  export * from "./ListCardSessionsResponseDataItem.mjs";
20
+ export * from "./ListCardSessionsResponseDataItemAgentToken.mjs";
18
21
  export * from "./ListCardSessionsResponseDataItemCardSource.mjs";
19
22
  export * from "./ListCardSessionsResponseDataItemNote.mjs";
20
23
  export * from "./ListCardSessionsResponseDataItemStatus.mjs";
@@ -5,16 +5,19 @@ export * from "./ClaimCardSessionsResponseProxy.mjs";
5
5
  export * from "./ClaimCardSessionsResponseProxyProtocol.mjs";
6
6
  export * from "./CreateCardSessionsRequestPurchase.mjs";
7
7
  export * from "./CreateCardSessionsResponse.mjs";
8
+ export * from "./CreateCardSessionsResponseAgentToken.mjs";
8
9
  export * from "./CreateCardSessionsResponseCardSource.mjs";
9
10
  export * from "./CreateCardSessionsResponseNote.mjs";
10
11
  export * from "./CreateCardSessionsResponseStatus.mjs";
11
12
  export * from "./GetCardSessionsResponse.mjs";
13
+ export * from "./GetCardSessionsResponseAgentToken.mjs";
12
14
  export * from "./GetCardSessionsResponseCardSource.mjs";
13
15
  export * from "./GetCardSessionsResponseNote.mjs";
14
16
  export * from "./GetCardSessionsResponseStatus.mjs";
15
17
  export * from "./ListCardSessionsRequestStatus.mjs";
16
18
  export * from "./ListCardSessionsResponse.mjs";
17
19
  export * from "./ListCardSessionsResponseDataItem.mjs";
20
+ export * from "./ListCardSessionsResponseDataItemAgentToken.mjs";
18
21
  export * from "./ListCardSessionsResponseDataItemCardSource.mjs";
19
22
  export * from "./ListCardSessionsResponseDataItemNote.mjs";
20
23
  export * from "./ListCardSessionsResponseDataItemStatus.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.6.41";
1
+ export declare const SDK_VERSION = "1.6.43";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.6.41";
1
+ export const SDK_VERSION = "1.6.43";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalpay/sdk",
3
- "version": "1.6.41",
3
+ "version": "1.6.43",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -8820,7 +8820,8 @@ await client.cardSessions.create({
8820
8820
  amount: 2450,
8821
8821
  currency: "USD"
8822
8822
  },
8823
- reference: "checkout_7f3a"
8823
+ reference: "checkout_7f3a",
8824
+ requestAgentToken: true
8824
8825
  });
8825
8826
 
8826
8827
  ```