@naturalpay/sdk 1.6.36 → 1.6.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/agents/types/CreateCustomerAgentsRequestPermissionsItem.d.ts +0 -1
- package/dist/cjs/api/resources/agents/types/CreateCustomerAgentsRequestPermissionsItem.js +0 -1
- package/dist/cjs/api/resources/cardSessions/client/Client.d.ts +29 -2
- package/dist/cjs/api/resources/cardSessions/client/Client.js +134 -6
- package/dist/cjs/api/resources/cardSessions/client/requests/ClaimCardSessionsRequest.d.ts +2 -0
- package/dist/cjs/api/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.ts +6 -1
- package/dist/cjs/api/resources/cardSessions/client/requests/ListCardSessionsRequest.d.ts +17 -0
- package/dist/cjs/api/resources/cardSessions/client/requests/ListCardSessionsRequest.js +3 -0
- package/dist/cjs/api/resources/cardSessions/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/cardSessions/types/ClaimCardSessionsResponse.d.ts +1 -1
- package/dist/cjs/api/resources/cardSessions/types/ClaimCardSessionsResponseCard.d.ts +1 -1
- package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponse.d.ts +5 -1
- package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponseCardSource.d.ts +1 -1
- package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponseCardSource.js +1 -1
- package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponseNote.d.ts +6 -0
- package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponseNote.js +3 -0
- package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponse.d.ts +5 -1
- package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponseCardSource.d.ts +1 -1
- package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponseCardSource.js +1 -1
- package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponseNote.d.ts +6 -0
- package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponseNote.js +3 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsRequestStatus.d.ts +9 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsRequestStatus.js +12 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponse.d.ts +5 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponse.js +3 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.ts +20 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItem.js +3 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemCardSource.d.ts +6 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemCardSource.js +9 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemNote.d.ts +6 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemNote.js +3 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemStatus.d.ts +9 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemStatus.js +12 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseMeta.d.ts +4 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseMeta.js +3 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseMetaPagination.d.ts +6 -0
- package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseMetaPagination.js +3 -0
- package/dist/cjs/api/resources/cardSessions/types/index.d.ts +10 -0
- package/dist/cjs/api/resources/cardSessions/types/index.js +10 -0
- package/dist/cjs/api/resources/customers/types/CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem.d.ts +0 -1
- package/dist/cjs/api/resources/customers/types/CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem.js +0 -1
- package/dist/cjs/api/resources/invitationLinks/types/CreateInvitationLinksRequestProposedAgentsItemPermissionsItem.d.ts +0 -1
- package/dist/cjs/api/resources/invitationLinks/types/CreateInvitationLinksRequestProposedAgentsItemPermissionsItem.js +0 -1
- package/dist/cjs/api/resources/simulations/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/simulations/client/Client.js +1 -1
- package/dist/cjs/api/resources/simulations/client/requests/InviteCustomerSimulationsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/simulations/types/InviteCustomerSimulationsRequestPermissionsZeroItem.d.ts +0 -1
- package/dist/cjs/api/resources/simulations/types/InviteCustomerSimulationsRequestPermissionsZeroItem.js +0 -1
- package/dist/cjs/api/resources/transfers/client/requests/NewDepositParams.d.ts +2 -2
- package/dist/cjs/serialization/resources/agents/types/CreateCustomerAgentsRequestPermissionsItem.d.ts +1 -1
- package/dist/cjs/serialization/resources/agents/types/CreateCustomerAgentsRequestPermissionsItem.js +0 -1
- package/dist/cjs/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.ts +2 -1
- package/dist/cjs/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.js +1 -0
- package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponse.d.ts +3 -0
- package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponse.js +3 -0
- package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponseNote.d.ts +10 -0
- package/dist/cjs/serialization/resources/cardSessions/types/CreateCardSessionsResponseNote.js +42 -0
- package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponse.d.ts +3 -0
- package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponse.js +3 -0
- package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponseNote.d.ts +10 -0
- package/dist/cjs/serialization/resources/cardSessions/types/GetCardSessionsResponseNote.js +42 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsRequestStatus.d.ts +7 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsRequestStatus.js +39 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponse.d.ts +12 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponse.js +44 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.ts +22 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.js +54 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemCardSource.d.ts +7 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemCardSource.js +39 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemNote.d.ts +10 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemNote.js +42 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemStatus.d.ts +7 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemStatus.js +39 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseMeta.d.ts +10 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseMeta.js +42 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseMetaPagination.d.ts +10 -0
- package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseMetaPagination.js +42 -0
- package/dist/cjs/serialization/resources/cardSessions/types/index.d.ts +10 -0
- package/dist/cjs/serialization/resources/cardSessions/types/index.js +10 -0
- package/dist/cjs/serialization/resources/customers/types/CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem.d.ts +1 -1
- package/dist/cjs/serialization/resources/customers/types/CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem.js +0 -1
- package/dist/cjs/serialization/resources/invitationLinks/types/CreateInvitationLinksRequestProposedAgentsItemPermissionsItem.d.ts +1 -1
- package/dist/cjs/serialization/resources/invitationLinks/types/CreateInvitationLinksRequestProposedAgentsItemPermissionsItem.js +0 -1
- package/dist/cjs/serialization/resources/simulations/types/InviteCustomerSimulationsRequestPermissionsZeroItem.d.ts +1 -1
- package/dist/cjs/serialization/resources/simulations/types/InviteCustomerSimulationsRequestPermissionsZeroItem.js +0 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/agents/types/CreateCustomerAgentsRequestPermissionsItem.d.mts +0 -1
- package/dist/esm/api/resources/agents/types/CreateCustomerAgentsRequestPermissionsItem.mjs +0 -1
- package/dist/esm/api/resources/cardSessions/client/Client.d.mts +29 -2
- package/dist/esm/api/resources/cardSessions/client/Client.mjs +134 -6
- package/dist/esm/api/resources/cardSessions/client/requests/ClaimCardSessionsRequest.d.mts +2 -0
- package/dist/esm/api/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.mts +6 -1
- package/dist/esm/api/resources/cardSessions/client/requests/ListCardSessionsRequest.d.mts +17 -0
- package/dist/esm/api/resources/cardSessions/client/requests/ListCardSessionsRequest.mjs +2 -0
- package/dist/esm/api/resources/cardSessions/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/cardSessions/types/ClaimCardSessionsResponse.d.mts +1 -1
- package/dist/esm/api/resources/cardSessions/types/ClaimCardSessionsResponseCard.d.mts +1 -1
- package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponse.d.mts +5 -1
- package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponseCardSource.d.mts +1 -1
- package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponseCardSource.mjs +1 -1
- package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponseNote.d.mts +6 -0
- package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponseNote.mjs +2 -0
- package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponse.d.mts +5 -1
- package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponseCardSource.d.mts +1 -1
- package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponseCardSource.mjs +1 -1
- package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponseNote.d.mts +6 -0
- package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponseNote.mjs +2 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsRequestStatus.d.mts +9 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsRequestStatus.mjs +9 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponse.d.mts +5 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponse.mjs +2 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.mts +20 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItem.mjs +2 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItemCardSource.d.mts +6 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItemCardSource.mjs +6 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItemNote.d.mts +6 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItemNote.mjs +2 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItemStatus.d.mts +9 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItemStatus.mjs +9 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseMeta.d.mts +4 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseMeta.mjs +2 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseMetaPagination.d.mts +6 -0
- package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseMetaPagination.mjs +2 -0
- package/dist/esm/api/resources/cardSessions/types/index.d.mts +10 -0
- package/dist/esm/api/resources/cardSessions/types/index.mjs +10 -0
- package/dist/esm/api/resources/customers/types/CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem.d.mts +0 -1
- package/dist/esm/api/resources/customers/types/CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem.mjs +0 -1
- package/dist/esm/api/resources/invitationLinks/types/CreateInvitationLinksRequestProposedAgentsItemPermissionsItem.d.mts +0 -1
- package/dist/esm/api/resources/invitationLinks/types/CreateInvitationLinksRequestProposedAgentsItemPermissionsItem.mjs +0 -1
- package/dist/esm/api/resources/simulations/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/simulations/client/Client.mjs +1 -1
- package/dist/esm/api/resources/simulations/client/requests/InviteCustomerSimulationsRequest.d.mts +1 -1
- package/dist/esm/api/resources/simulations/types/InviteCustomerSimulationsRequestPermissionsZeroItem.d.mts +0 -1
- package/dist/esm/api/resources/simulations/types/InviteCustomerSimulationsRequestPermissionsZeroItem.mjs +0 -1
- package/dist/esm/api/resources/transfers/client/requests/NewDepositParams.d.mts +2 -2
- package/dist/esm/serialization/resources/agents/types/CreateCustomerAgentsRequestPermissionsItem.d.mts +1 -1
- package/dist/esm/serialization/resources/agents/types/CreateCustomerAgentsRequestPermissionsItem.mjs +0 -1
- package/dist/esm/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.mts +2 -1
- package/dist/esm/serialization/resources/cardSessions/client/requests/CreateCardSessionsRequest.mjs +1 -0
- package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponse.d.mts +3 -0
- package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponse.mjs +3 -0
- package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponseNote.d.mts +10 -0
- package/dist/esm/serialization/resources/cardSessions/types/CreateCardSessionsResponseNote.mjs +6 -0
- package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponse.d.mts +3 -0
- package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponse.mjs +3 -0
- package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponseNote.d.mts +10 -0
- package/dist/esm/serialization/resources/cardSessions/types/GetCardSessionsResponseNote.mjs +6 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsRequestStatus.d.mts +7 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsRequestStatus.mjs +3 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponse.d.mts +12 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponse.mjs +8 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.d.mts +22 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItem.mjs +18 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemCardSource.d.mts +7 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemCardSource.mjs +3 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemNote.d.mts +10 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemNote.mjs +6 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemStatus.d.mts +7 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemStatus.mjs +3 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseMeta.d.mts +10 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseMeta.mjs +6 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseMetaPagination.d.mts +10 -0
- package/dist/esm/serialization/resources/cardSessions/types/ListCardSessionsResponseMetaPagination.mjs +6 -0
- package/dist/esm/serialization/resources/cardSessions/types/index.d.mts +10 -0
- package/dist/esm/serialization/resources/cardSessions/types/index.mjs +10 -0
- package/dist/esm/serialization/resources/customers/types/CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem.d.mts +1 -1
- package/dist/esm/serialization/resources/customers/types/CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem.mjs +0 -1
- package/dist/esm/serialization/resources/invitationLinks/types/CreateInvitationLinksRequestProposedAgentsItemPermissionsItem.d.mts +1 -1
- package/dist/esm/serialization/resources/invitationLinks/types/CreateInvitationLinksRequestProposedAgentsItemPermissionsItem.mjs +0 -1
- package/dist/esm/serialization/resources/simulations/types/InviteCustomerSimulationsRequestPermissionsZeroItem.d.mts +1 -1
- package/dist/esm/serialization/resources/simulations/types/InviteCustomerSimulationsRequestPermissionsZeroItem.mjs +0 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +67 -3
package/dist/cjs/serialization/resources/cardSessions/types/ListCardSessionsResponseDataItemNote.js
ADDED
|
@@ -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.ListCardSessionsResponseDataItemNote = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
exports.ListCardSessionsResponseDataItemNote = core.serialization.object({
|
|
40
|
+
message: core.serialization.string(),
|
|
41
|
+
url: core.serialization.string().nullable(),
|
|
42
|
+
});
|
|
@@ -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 ListCardSessionsResponseDataItemStatus: core.serialization.Schema<serializers.ListCardSessionsResponseDataItemStatus.Raw, Natural.ListCardSessionsResponseDataItemStatus>;
|
|
5
|
+
export declare namespace ListCardSessionsResponseDataItemStatus {
|
|
6
|
+
type Raw = "pending_approval" | "approved" | "declined" | "claimed" | "expired";
|
|
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.ListCardSessionsResponseDataItemStatus = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
exports.ListCardSessionsResponseDataItemStatus = core.serialization.enum_(["pending_approval", "approved", "declined", "claimed", "expired"]);
|
|
@@ -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 { ListCardSessionsResponseMetaPagination } from "./ListCardSessionsResponseMetaPagination.js";
|
|
5
|
+
export declare const ListCardSessionsResponseMeta: core.serialization.ObjectSchema<serializers.ListCardSessionsResponseMeta.Raw, Natural.ListCardSessionsResponseMeta>;
|
|
6
|
+
export declare namespace ListCardSessionsResponseMeta {
|
|
7
|
+
interface Raw {
|
|
8
|
+
pagination: ListCardSessionsResponseMetaPagination.Raw;
|
|
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.ListCardSessionsResponseMeta = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
const ListCardSessionsResponseMetaPagination_js_1 = require("./ListCardSessionsResponseMetaPagination.js");
|
|
40
|
+
exports.ListCardSessionsResponseMeta = core.serialization.object({
|
|
41
|
+
pagination: ListCardSessionsResponseMetaPagination_js_1.ListCardSessionsResponseMetaPagination,
|
|
42
|
+
});
|
|
@@ -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 ListCardSessionsResponseMetaPagination: core.serialization.ObjectSchema<serializers.ListCardSessionsResponseMetaPagination.Raw, Natural.ListCardSessionsResponseMetaPagination>;
|
|
5
|
+
export declare namespace ListCardSessionsResponseMetaPagination {
|
|
6
|
+
interface Raw {
|
|
7
|
+
hasMore: boolean;
|
|
8
|
+
nextCursor?: 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.ListCardSessionsResponseMetaPagination = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
exports.ListCardSessionsResponseMetaPagination = core.serialization.object({
|
|
40
|
+
hasMore: core.serialization.boolean(),
|
|
41
|
+
nextCursor: core.serialization.string().nullable(),
|
|
42
|
+
});
|
|
@@ -6,7 +6,17 @@ export * from "./ClaimCardSessionsResponseProxyProtocol.js";
|
|
|
6
6
|
export * from "./CreateCardSessionsRequestPurchase.js";
|
|
7
7
|
export * from "./CreateCardSessionsResponse.js";
|
|
8
8
|
export * from "./CreateCardSessionsResponseCardSource.js";
|
|
9
|
+
export * from "./CreateCardSessionsResponseNote.js";
|
|
9
10
|
export * from "./CreateCardSessionsResponseStatus.js";
|
|
10
11
|
export * from "./GetCardSessionsResponse.js";
|
|
11
12
|
export * from "./GetCardSessionsResponseCardSource.js";
|
|
13
|
+
export * from "./GetCardSessionsResponseNote.js";
|
|
12
14
|
export * from "./GetCardSessionsResponseStatus.js";
|
|
15
|
+
export * from "./ListCardSessionsRequestStatus.js";
|
|
16
|
+
export * from "./ListCardSessionsResponse.js";
|
|
17
|
+
export * from "./ListCardSessionsResponseDataItem.js";
|
|
18
|
+
export * from "./ListCardSessionsResponseDataItemCardSource.js";
|
|
19
|
+
export * from "./ListCardSessionsResponseDataItemNote.js";
|
|
20
|
+
export * from "./ListCardSessionsResponseDataItemStatus.js";
|
|
21
|
+
export * from "./ListCardSessionsResponseMeta.js";
|
|
22
|
+
export * from "./ListCardSessionsResponseMetaPagination.js";
|
|
@@ -22,7 +22,17 @@ __exportStar(require("./ClaimCardSessionsResponseProxyProtocol.js"), exports);
|
|
|
22
22
|
__exportStar(require("./CreateCardSessionsRequestPurchase.js"), exports);
|
|
23
23
|
__exportStar(require("./CreateCardSessionsResponse.js"), exports);
|
|
24
24
|
__exportStar(require("./CreateCardSessionsResponseCardSource.js"), exports);
|
|
25
|
+
__exportStar(require("./CreateCardSessionsResponseNote.js"), exports);
|
|
25
26
|
__exportStar(require("./CreateCardSessionsResponseStatus.js"), exports);
|
|
26
27
|
__exportStar(require("./GetCardSessionsResponse.js"), exports);
|
|
27
28
|
__exportStar(require("./GetCardSessionsResponseCardSource.js"), exports);
|
|
29
|
+
__exportStar(require("./GetCardSessionsResponseNote.js"), exports);
|
|
28
30
|
__exportStar(require("./GetCardSessionsResponseStatus.js"), exports);
|
|
31
|
+
__exportStar(require("./ListCardSessionsRequestStatus.js"), exports);
|
|
32
|
+
__exportStar(require("./ListCardSessionsResponse.js"), exports);
|
|
33
|
+
__exportStar(require("./ListCardSessionsResponseDataItem.js"), exports);
|
|
34
|
+
__exportStar(require("./ListCardSessionsResponseDataItemCardSource.js"), exports);
|
|
35
|
+
__exportStar(require("./ListCardSessionsResponseDataItemNote.js"), exports);
|
|
36
|
+
__exportStar(require("./ListCardSessionsResponseDataItemStatus.js"), exports);
|
|
37
|
+
__exportStar(require("./ListCardSessionsResponseMeta.js"), exports);
|
|
38
|
+
__exportStar(require("./ListCardSessionsResponseMetaPagination.js"), exports);
|
|
@@ -3,5 +3,5 @@ import * as core from "../../../../core/index.js";
|
|
|
3
3
|
import type * as serializers from "../../../index.js";
|
|
4
4
|
export declare const CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem: core.serialization.Schema<serializers.CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem.Raw, Natural.CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem>;
|
|
5
5
|
export declare namespace CreateInvitationsCustomersRequestAgentsItemPermissionsZeroItem {
|
|
6
|
-
type Raw = "disputes.read" | "disputes.create" | "payments.read" | "payments.create" | "external_parties.read" | "external_parties.create" | "direct.read" | "direct.create" | "external_accounts.create" | "wallets.read" | "wallets.balance" | "wallets.create" | "wallets.update" | "wallets.fund" | "wallets.
|
|
6
|
+
type Raw = "disputes.read" | "disputes.create" | "payments.read" | "payments.create" | "external_parties.read" | "external_parties.create" | "direct.read" | "direct.create" | "external_accounts.create" | "wallets.read" | "wallets.balance" | "wallets.create" | "wallets.update" | "wallets.fund" | "wallets.transfer" | "wallets.withdraw" | "party.read" | "party.update" | "payment_intents.create" | "payment_intents.read" | "card_payments.read" | "refunds.read" | "refunds.create" | "voice_sessions.read" | "voice_sessions.create" | "chargebacks.read" | "chargebacks.respond" | "mandates.read" | "enrollment.read" | "cards.read" | "saved_cards.use";
|
|
7
7
|
}
|
|
@@ -3,5 +3,5 @@ import * as core from "../../../../core/index.js";
|
|
|
3
3
|
import type * as serializers from "../../../index.js";
|
|
4
4
|
export declare const CreateInvitationLinksRequestProposedAgentsItemPermissionsItem: core.serialization.Schema<serializers.CreateInvitationLinksRequestProposedAgentsItemPermissionsItem.Raw, Natural.CreateInvitationLinksRequestProposedAgentsItemPermissionsItem>;
|
|
5
5
|
export declare namespace CreateInvitationLinksRequestProposedAgentsItemPermissionsItem {
|
|
6
|
-
type Raw = "disputes.read" | "disputes.create" | "payments.read" | "payments.create" | "external_parties.read" | "external_parties.create" | "direct.read" | "direct.create" | "external_accounts.create" | "wallets.read" | "wallets.balance" | "wallets.create" | "wallets.update" | "wallets.fund" | "wallets.
|
|
6
|
+
type Raw = "disputes.read" | "disputes.create" | "payments.read" | "payments.create" | "external_parties.read" | "external_parties.create" | "direct.read" | "direct.create" | "external_accounts.create" | "wallets.read" | "wallets.balance" | "wallets.create" | "wallets.update" | "wallets.fund" | "wallets.transfer" | "wallets.withdraw" | "party.read" | "party.update" | "payment_intents.create" | "payment_intents.read" | "card_payments.read" | "refunds.read" | "refunds.create" | "voice_sessions.read" | "voice_sessions.create" | "chargebacks.read" | "chargebacks.respond" | "mandates.read" | "enrollment.read" | "cards.read" | "saved_cards.use";
|
|
7
7
|
}
|
|
@@ -3,5 +3,5 @@ import * as core from "../../../../core/index.js";
|
|
|
3
3
|
import type * as serializers from "../../../index.js";
|
|
4
4
|
export declare const InviteCustomerSimulationsRequestPermissionsZeroItem: core.serialization.Schema<serializers.InviteCustomerSimulationsRequestPermissionsZeroItem.Raw, Natural.InviteCustomerSimulationsRequestPermissionsZeroItem>;
|
|
5
5
|
export declare namespace InviteCustomerSimulationsRequestPermissionsZeroItem {
|
|
6
|
-
type Raw = "disputes.read" | "disputes.create" | "payments.read" | "payments.create" | "external_parties.read" | "external_parties.create" | "direct.read" | "direct.create" | "external_accounts.create" | "wallets.read" | "wallets.balance" | "wallets.create" | "wallets.update" | "wallets.fund" | "wallets.
|
|
6
|
+
type Raw = "disputes.read" | "disputes.create" | "payments.read" | "payments.create" | "external_parties.read" | "external_parties.create" | "direct.read" | "direct.create" | "external_accounts.create" | "wallets.read" | "wallets.balance" | "wallets.create" | "wallets.update" | "wallets.fund" | "wallets.transfer" | "wallets.withdraw" | "party.read" | "party.update" | "payment_intents.create" | "payment_intents.read" | "card_payments.read" | "refunds.read" | "refunds.create" | "voice_sessions.read" | "voice_sessions.create" | "chargebacks.read" | "chargebacks.respond" | "mandates.read" | "enrollment.read" | "cards.read" | "saved_cards.use";
|
|
7
7
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.6.
|
|
1
|
+
export declare const SDK_VERSION = "1.6.38";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -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.
|
|
10
|
-
"User-Agent": "@naturalpay/sdk/1.6.
|
|
9
|
+
"X-Fern-SDK-Version": "1.6.38",
|
|
10
|
+
"User-Agent": "@naturalpay/sdk/1.6.38",
|
|
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,
|
package/dist/esm/api/resources/agents/types/CreateCustomerAgentsRequestPermissionsItem.d.mts
CHANGED
|
@@ -13,7 +13,6 @@ export declare const CreateCustomerAgentsRequestPermissionsItem: {
|
|
|
13
13
|
readonly WalletsCreate: "wallets.create";
|
|
14
14
|
readonly WalletsUpdate: "wallets.update";
|
|
15
15
|
readonly WalletsFund: "wallets.fund";
|
|
16
|
-
readonly WalletsDeposit: "wallets.deposit";
|
|
17
16
|
readonly WalletsTransfer: "wallets.transfer";
|
|
18
17
|
readonly WalletsWithdraw: "wallets.withdraw";
|
|
19
18
|
readonly PartyRead: "party.read";
|
|
@@ -14,7 +14,6 @@ export const CreateCustomerAgentsRequestPermissionsItem = {
|
|
|
14
14
|
WalletsCreate: "wallets.create",
|
|
15
15
|
WalletsUpdate: "wallets.update",
|
|
16
16
|
WalletsFund: "wallets.fund",
|
|
17
|
-
WalletsDeposit: "wallets.deposit",
|
|
18
17
|
WalletsTransfer: "wallets.transfer",
|
|
19
18
|
WalletsWithdraw: "wallets.withdraw",
|
|
20
19
|
PartyRead: "party.read",
|
|
@@ -13,6 +13,32 @@ export declare namespace CardSessionsClient {
|
|
|
13
13
|
export declare class CardSessionsClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<CardSessionsClient.Options>;
|
|
15
15
|
constructor(options?: CardSessionsClient.Options);
|
|
16
|
+
/**
|
|
17
|
+
* List the card sessions you opened for the party you act for, newest first. It never includes card data.
|
|
18
|
+
*
|
|
19
|
+
* @param {Natural.ListCardSessionsRequest} request
|
|
20
|
+
* @param {CardSessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
21
|
+
*
|
|
22
|
+
* @throws {@link Natural.BadRequestError}
|
|
23
|
+
* @throws {@link Natural.UnauthorizedError}
|
|
24
|
+
* @throws {@link Natural.ForbiddenError}
|
|
25
|
+
* @throws {@link Natural.NotFoundError}
|
|
26
|
+
* @throws {@link Natural.ConflictError}
|
|
27
|
+
* @throws {@link Natural.UnprocessableEntityError}
|
|
28
|
+
* @throws {@link Natural.PreconditionError}
|
|
29
|
+
* @throws {@link Natural.TooManyRequestsError}
|
|
30
|
+
* @throws {@link Natural.InternalServerError}
|
|
31
|
+
* @throws {@link Natural.NotImplementedError}
|
|
32
|
+
* @throws {@link Natural.BadGatewayError}
|
|
33
|
+
* @throws {@link Natural.ServiceUnavailableError}
|
|
34
|
+
* @throws {@link errors.NaturalError}
|
|
35
|
+
* @throws {@link errors.NaturalTimeoutError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.cardSessions.list()
|
|
39
|
+
*/
|
|
40
|
+
list(request?: Natural.ListCardSessionsRequest, requestOptions?: CardSessionsClient.RequestOptions): core.HttpResponsePromise<Natural.ListCardSessionsResponse>;
|
|
41
|
+
private __list;
|
|
16
42
|
/**
|
|
17
43
|
* Open a session to pay for one purchase with one card. Poll it until the user approves, then claim it once for a stand-in card and proxy login.
|
|
18
44
|
*
|
|
@@ -43,7 +69,8 @@ export declare class CardSessionsClient {
|
|
|
43
69
|
* merchantName: "Blue Bottle Coffee",
|
|
44
70
|
* amount: 2450,
|
|
45
71
|
* currency: "USD"
|
|
46
|
-
* }
|
|
72
|
+
* },
|
|
73
|
+
* reference: "checkout_7f3a"
|
|
47
74
|
* })
|
|
48
75
|
*/
|
|
49
76
|
create(request: Natural.CreateCardSessionsRequest, requestOptions?: CardSessionsClient.RequestOptions): core.HttpResponsePromise<Natural.CreateCardSessionsResponse>;
|
|
@@ -77,7 +104,7 @@ export declare class CardSessionsClient {
|
|
|
77
104
|
get(request: Natural.GetCardSessionsRequest, requestOptions?: CardSessionsClient.RequestOptions): core.HttpResponsePromise<Natural.GetCardSessionsResponse>;
|
|
78
105
|
private __get;
|
|
79
106
|
/**
|
|
80
|
-
* Claim the stand-in card and proxy login for an approved session. It succeeds once,
|
|
107
|
+
* Claim the stand-in card and proxy login for an approved session. It succeeds once; with an Idempotency-Key, retrying with the same key returns a fresh login until expiresAt.
|
|
81
108
|
*
|
|
82
109
|
* @param {Natural.ClaimCardSessionsRequest} request
|
|
83
110
|
* @param {CardSessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -8,6 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
11
22
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
23
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
13
24
|
import * as core from "../../../../core/index.mjs";
|
|
@@ -24,6 +35,115 @@ export class CardSessionsClient {
|
|
|
24
35
|
constructor(options = {}) {
|
|
25
36
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
26
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* List the card sessions you opened for the party you act for, newest first. It never includes card data.
|
|
40
|
+
*
|
|
41
|
+
* @param {Natural.ListCardSessionsRequest} request
|
|
42
|
+
* @param {CardSessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
|
+
*
|
|
44
|
+
* @throws {@link Natural.BadRequestError}
|
|
45
|
+
* @throws {@link Natural.UnauthorizedError}
|
|
46
|
+
* @throws {@link Natural.ForbiddenError}
|
|
47
|
+
* @throws {@link Natural.NotFoundError}
|
|
48
|
+
* @throws {@link Natural.ConflictError}
|
|
49
|
+
* @throws {@link Natural.UnprocessableEntityError}
|
|
50
|
+
* @throws {@link Natural.PreconditionError}
|
|
51
|
+
* @throws {@link Natural.TooManyRequestsError}
|
|
52
|
+
* @throws {@link Natural.InternalServerError}
|
|
53
|
+
* @throws {@link Natural.NotImplementedError}
|
|
54
|
+
* @throws {@link Natural.BadGatewayError}
|
|
55
|
+
* @throws {@link Natural.ServiceUnavailableError}
|
|
56
|
+
* @throws {@link errors.NaturalError}
|
|
57
|
+
* @throws {@link errors.NaturalTimeoutError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.cardSessions.list()
|
|
61
|
+
*/
|
|
62
|
+
list(request = {}, requestOptions) {
|
|
63
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
64
|
+
}
|
|
65
|
+
__list() {
|
|
66
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
67
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
68
|
+
const { customerPartyId, status, reference, limit, cursor } = request;
|
|
69
|
+
const _queryParams = {
|
|
70
|
+
customerPartyId,
|
|
71
|
+
status: status != null
|
|
72
|
+
? serializers.ListCardSessionsRequestStatus.jsonOrThrow(status, {
|
|
73
|
+
unrecognizedObjectKeys: "strip",
|
|
74
|
+
omitUndefined: true,
|
|
75
|
+
})
|
|
76
|
+
: undefined,
|
|
77
|
+
reference,
|
|
78
|
+
limit,
|
|
79
|
+
cursor,
|
|
80
|
+
};
|
|
81
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
82
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Instance-ID": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.instanceId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.instanceId }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
83
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
84
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.NaturalEnvironment.Production, "card-sessions"),
|
|
85
|
+
method: "GET",
|
|
86
|
+
headers: _headers,
|
|
87
|
+
queryString: core.url
|
|
88
|
+
.queryBuilder()
|
|
89
|
+
.addMany(_queryParams)
|
|
90
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
91
|
+
.build(),
|
|
92
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
93
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
94
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
95
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
96
|
+
logging: this._options.logging,
|
|
97
|
+
});
|
|
98
|
+
if (_response.ok) {
|
|
99
|
+
return {
|
|
100
|
+
data: serializers.ListCardSessionsResponse.parseOrThrow(_response.body, {
|
|
101
|
+
unrecognizedObjectKeys: "passthrough",
|
|
102
|
+
allowUnrecognizedUnionMembers: true,
|
|
103
|
+
allowUnrecognizedEnumValues: true,
|
|
104
|
+
skipValidation: true,
|
|
105
|
+
breadcrumbsPrefix: ["response"],
|
|
106
|
+
}),
|
|
107
|
+
rawResponse: _response.rawResponse,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
if (_response.error.reason === "status-code") {
|
|
111
|
+
switch (_response.error.statusCode) {
|
|
112
|
+
case 400:
|
|
113
|
+
throw new Natural.BadRequestError(_response.error.body, _response.rawResponse);
|
|
114
|
+
case 401:
|
|
115
|
+
throw new Natural.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
116
|
+
case 403:
|
|
117
|
+
throw new Natural.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
118
|
+
case 404:
|
|
119
|
+
throw new Natural.NotFoundError(_response.error.body, _response.rawResponse);
|
|
120
|
+
case 409:
|
|
121
|
+
throw new Natural.ConflictError(_response.error.body, _response.rawResponse);
|
|
122
|
+
case 422:
|
|
123
|
+
throw new Natural.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
124
|
+
case 428:
|
|
125
|
+
throw new Natural.PreconditionError(_response.error.body, _response.rawResponse);
|
|
126
|
+
case 429:
|
|
127
|
+
throw new Natural.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
128
|
+
case 500:
|
|
129
|
+
throw new Natural.InternalServerError(_response.error.body, _response.rawResponse);
|
|
130
|
+
case 501:
|
|
131
|
+
throw new Natural.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
132
|
+
case 502:
|
|
133
|
+
throw new Natural.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
134
|
+
case 503:
|
|
135
|
+
throw new Natural.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
136
|
+
default:
|
|
137
|
+
throw new errors.NaturalError({
|
|
138
|
+
statusCode: _response.error.statusCode,
|
|
139
|
+
body: _response.error.body,
|
|
140
|
+
rawResponse: _response.rawResponse,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/card-sessions");
|
|
145
|
+
});
|
|
146
|
+
}
|
|
27
147
|
/**
|
|
28
148
|
* Open a session to pay for one purchase with one card. Poll it until the user approves, then claim it once for a stand-in card and proxy login.
|
|
29
149
|
*
|
|
@@ -54,7 +174,8 @@ export class CardSessionsClient {
|
|
|
54
174
|
* merchantName: "Blue Bottle Coffee",
|
|
55
175
|
* amount: 2450,
|
|
56
176
|
* currency: "USD"
|
|
57
|
-
* }
|
|
177
|
+
* },
|
|
178
|
+
* reference: "checkout_7f3a"
|
|
58
179
|
* })
|
|
59
180
|
*/
|
|
60
181
|
create(request, requestOptions) {
|
|
@@ -63,8 +184,12 @@ export class CardSessionsClient {
|
|
|
63
184
|
__create(request, requestOptions) {
|
|
64
185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
186
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
187
|
+
const { idempotencyKey } = request, _body = __rest(request, ["idempotencyKey"]);
|
|
66
188
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
67
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
189
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
190
|
+
"Idempotency-Key": idempotencyKey,
|
|
191
|
+
"X-Instance-ID": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.instanceId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.instanceId,
|
|
192
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
68
193
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
69
194
|
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.NaturalEnvironment.Production, "card-sessions"),
|
|
70
195
|
method: "POST",
|
|
@@ -72,7 +197,7 @@ export class CardSessionsClient {
|
|
|
72
197
|
contentType: "application/json",
|
|
73
198
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
74
199
|
requestType: "json",
|
|
75
|
-
body: mergeAdditionalBodyParameters(serializers.CreateCardSessionsRequest.jsonOrThrow(
|
|
200
|
+
body: mergeAdditionalBodyParameters(serializers.CreateCardSessionsRequest.jsonOrThrow(_body, {
|
|
76
201
|
unrecognizedObjectKeys: "strip",
|
|
77
202
|
omitUndefined: true,
|
|
78
203
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
@@ -234,7 +359,7 @@ export class CardSessionsClient {
|
|
|
234
359
|
});
|
|
235
360
|
}
|
|
236
361
|
/**
|
|
237
|
-
* Claim the stand-in card and proxy login for an approved session. It succeeds once,
|
|
362
|
+
* Claim the stand-in card and proxy login for an approved session. It succeeds once; with an Idempotency-Key, retrying with the same key returns a fresh login until expiresAt.
|
|
238
363
|
*
|
|
239
364
|
* @param {Natural.ClaimCardSessionsRequest} request
|
|
240
365
|
* @param {CardSessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -265,12 +390,15 @@ export class CardSessionsClient {
|
|
|
265
390
|
__claim(request, requestOptions) {
|
|
266
391
|
return __awaiter(this, void 0, void 0, function* () {
|
|
267
392
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
268
|
-
const { sessionId, customerPartyId } = request;
|
|
393
|
+
const { sessionId, customerPartyId, idempotencyKey } = request;
|
|
269
394
|
const _queryParams = {
|
|
270
395
|
customerPartyId,
|
|
271
396
|
};
|
|
272
397
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
273
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
398
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
399
|
+
"Idempotency-Key": idempotencyKey,
|
|
400
|
+
"X-Instance-ID": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.instanceId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.instanceId,
|
|
401
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
274
402
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
275
403
|
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.NaturalEnvironment.Production, `card-sessions/${core.url.encodePathParam(sessionId)}/claim`),
|
|
276
404
|
method: "POST",
|
|
@@ -9,4 +9,6 @@ export interface ClaimCardSessionsRequest {
|
|
|
9
9
|
sessionId: string;
|
|
10
10
|
/** 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. */
|
|
11
11
|
customerPartyId?: string;
|
|
12
|
+
/** Optional. Retrying the claim with the same key before expiresAt returns a new stand-in card and proxy login that expire at the same time as the first. Without a key, the credential can't be fetched again. */
|
|
13
|
+
idempotencyKey?: string;
|
|
12
14
|
}
|
|
@@ -9,10 +9,13 @@ import type * as Natural from "../../../../index.mjs";
|
|
|
9
9
|
* merchantName: "Blue Bottle Coffee",
|
|
10
10
|
* amount: 2450,
|
|
11
11
|
* currency: "USD"
|
|
12
|
-
* }
|
|
12
|
+
* },
|
|
13
|
+
* reference: "checkout_7f3a"
|
|
13
14
|
* }
|
|
14
15
|
*/
|
|
15
16
|
export interface CreateCardSessionsRequest {
|
|
17
|
+
/** Optional. Retrying with the same key and body returns the original session and approvalUrl instead of opening another one. */
|
|
18
|
+
idempotencyKey?: string;
|
|
16
19
|
cardId: string;
|
|
17
20
|
/** 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. */
|
|
18
21
|
customerPartyId?: string;
|
|
@@ -22,4 +25,6 @@ export interface CreateCardSessionsRequest {
|
|
|
22
25
|
ttlSeconds?: number;
|
|
23
26
|
/** What the agent is buying. Required for a card the user added (eac_): the user approves this exact purchase. */
|
|
24
27
|
purchase?: Natural.CreateCardSessionsRequestPurchase;
|
|
28
|
+
/** 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
|
+
reference?: string;
|
|
25
30
|
}
|