@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/BaseClient.js
CHANGED
|
@@ -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.
|
|
47
|
-
"User-Agent": "@naturalpay/sdk/1.6.
|
|
46
|
+
"X-Fern-SDK-Version": "1.6.38",
|
|
47
|
+
"User-Agent": "@naturalpay/sdk/1.6.38",
|
|
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,
|
|
@@ -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";
|
|
@@ -17,7 +17,6 @@ exports.CreateCustomerAgentsRequestPermissionsItem = {
|
|
|
17
17
|
WalletsCreate: "wallets.create",
|
|
18
18
|
WalletsUpdate: "wallets.update",
|
|
19
19
|
WalletsFund: "wallets.fund",
|
|
20
|
-
WalletsDeposit: "wallets.deposit",
|
|
21
20
|
WalletsTransfer: "wallets.transfer",
|
|
22
21
|
WalletsWithdraw: "wallets.withdraw",
|
|
23
22
|
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.
|
|
@@ -42,6 +42,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
+
var t = {};
|
|
47
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
+
t[p] = s[p];
|
|
49
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
+
t[p[i]] = s[p[i]];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
45
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
57
|
exports.CardSessionsClient = void 0;
|
|
47
58
|
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
@@ -60,6 +71,115 @@ class CardSessionsClient {
|
|
|
60
71
|
constructor(options = {}) {
|
|
61
72
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
62
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* List the card sessions you opened for the party you act for, newest first. It never includes card data.
|
|
76
|
+
*
|
|
77
|
+
* @param {Natural.ListCardSessionsRequest} request
|
|
78
|
+
* @param {CardSessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link Natural.BadRequestError}
|
|
81
|
+
* @throws {@link Natural.UnauthorizedError}
|
|
82
|
+
* @throws {@link Natural.ForbiddenError}
|
|
83
|
+
* @throws {@link Natural.NotFoundError}
|
|
84
|
+
* @throws {@link Natural.ConflictError}
|
|
85
|
+
* @throws {@link Natural.UnprocessableEntityError}
|
|
86
|
+
* @throws {@link Natural.PreconditionError}
|
|
87
|
+
* @throws {@link Natural.TooManyRequestsError}
|
|
88
|
+
* @throws {@link Natural.InternalServerError}
|
|
89
|
+
* @throws {@link Natural.NotImplementedError}
|
|
90
|
+
* @throws {@link Natural.BadGatewayError}
|
|
91
|
+
* @throws {@link Natural.ServiceUnavailableError}
|
|
92
|
+
* @throws {@link errors.NaturalError}
|
|
93
|
+
* @throws {@link errors.NaturalTimeoutError}
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* await client.cardSessions.list()
|
|
97
|
+
*/
|
|
98
|
+
list(request = {}, requestOptions) {
|
|
99
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
100
|
+
}
|
|
101
|
+
__list() {
|
|
102
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
103
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
104
|
+
const { customerPartyId, status, reference, limit, cursor } = request;
|
|
105
|
+
const _queryParams = {
|
|
106
|
+
customerPartyId,
|
|
107
|
+
status: status != null
|
|
108
|
+
? serializers.ListCardSessionsRequestStatus.jsonOrThrow(status, {
|
|
109
|
+
unrecognizedObjectKeys: "strip",
|
|
110
|
+
omitUndefined: true,
|
|
111
|
+
})
|
|
112
|
+
: undefined,
|
|
113
|
+
reference,
|
|
114
|
+
limit,
|
|
115
|
+
cursor,
|
|
116
|
+
};
|
|
117
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
118
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
119
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
120
|
+
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"),
|
|
121
|
+
method: "GET",
|
|
122
|
+
headers: _headers,
|
|
123
|
+
queryString: core.url
|
|
124
|
+
.queryBuilder()
|
|
125
|
+
.addMany(_queryParams)
|
|
126
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
127
|
+
.build(),
|
|
128
|
+
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,
|
|
129
|
+
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,
|
|
130
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
131
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
132
|
+
logging: this._options.logging,
|
|
133
|
+
});
|
|
134
|
+
if (_response.ok) {
|
|
135
|
+
return {
|
|
136
|
+
data: serializers.ListCardSessionsResponse.parseOrThrow(_response.body, {
|
|
137
|
+
unrecognizedObjectKeys: "passthrough",
|
|
138
|
+
allowUnrecognizedUnionMembers: true,
|
|
139
|
+
allowUnrecognizedEnumValues: true,
|
|
140
|
+
skipValidation: true,
|
|
141
|
+
breadcrumbsPrefix: ["response"],
|
|
142
|
+
}),
|
|
143
|
+
rawResponse: _response.rawResponse,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
if (_response.error.reason === "status-code") {
|
|
147
|
+
switch (_response.error.statusCode) {
|
|
148
|
+
case 400:
|
|
149
|
+
throw new Natural.BadRequestError(_response.error.body, _response.rawResponse);
|
|
150
|
+
case 401:
|
|
151
|
+
throw new Natural.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
152
|
+
case 403:
|
|
153
|
+
throw new Natural.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
154
|
+
case 404:
|
|
155
|
+
throw new Natural.NotFoundError(_response.error.body, _response.rawResponse);
|
|
156
|
+
case 409:
|
|
157
|
+
throw new Natural.ConflictError(_response.error.body, _response.rawResponse);
|
|
158
|
+
case 422:
|
|
159
|
+
throw new Natural.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
160
|
+
case 428:
|
|
161
|
+
throw new Natural.PreconditionError(_response.error.body, _response.rawResponse);
|
|
162
|
+
case 429:
|
|
163
|
+
throw new Natural.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
164
|
+
case 500:
|
|
165
|
+
throw new Natural.InternalServerError(_response.error.body, _response.rawResponse);
|
|
166
|
+
case 501:
|
|
167
|
+
throw new Natural.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
168
|
+
case 502:
|
|
169
|
+
throw new Natural.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
170
|
+
case 503:
|
|
171
|
+
throw new Natural.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
172
|
+
default:
|
|
173
|
+
throw new errors.NaturalError({
|
|
174
|
+
statusCode: _response.error.statusCode,
|
|
175
|
+
body: _response.error.body,
|
|
176
|
+
rawResponse: _response.rawResponse,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/card-sessions");
|
|
181
|
+
});
|
|
182
|
+
}
|
|
63
183
|
/**
|
|
64
184
|
* 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.
|
|
65
185
|
*
|
|
@@ -90,7 +210,8 @@ class CardSessionsClient {
|
|
|
90
210
|
* merchantName: "Blue Bottle Coffee",
|
|
91
211
|
* amount: 2450,
|
|
92
212
|
* currency: "USD"
|
|
93
|
-
* }
|
|
213
|
+
* },
|
|
214
|
+
* reference: "checkout_7f3a"
|
|
94
215
|
* })
|
|
95
216
|
*/
|
|
96
217
|
create(request, requestOptions) {
|
|
@@ -99,8 +220,12 @@ class CardSessionsClient {
|
|
|
99
220
|
__create(request, requestOptions) {
|
|
100
221
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
222
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
223
|
+
const { idempotencyKey } = request, _body = __rest(request, ["idempotencyKey"]);
|
|
102
224
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
103
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
225
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
226
|
+
"Idempotency-Key": idempotencyKey,
|
|
227
|
+
"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,
|
|
228
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
104
229
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
105
230
|
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"),
|
|
106
231
|
method: "POST",
|
|
@@ -108,7 +233,7 @@ class CardSessionsClient {
|
|
|
108
233
|
contentType: "application/json",
|
|
109
234
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
110
235
|
requestType: "json",
|
|
111
|
-
body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.CreateCardSessionsRequest.jsonOrThrow(
|
|
236
|
+
body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.CreateCardSessionsRequest.jsonOrThrow(_body, {
|
|
112
237
|
unrecognizedObjectKeys: "strip",
|
|
113
238
|
omitUndefined: true,
|
|
114
239
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
@@ -270,7 +395,7 @@ class CardSessionsClient {
|
|
|
270
395
|
});
|
|
271
396
|
}
|
|
272
397
|
/**
|
|
273
|
-
* Claim the stand-in card and proxy login for an approved session. It succeeds once,
|
|
398
|
+
* 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.
|
|
274
399
|
*
|
|
275
400
|
* @param {Natural.ClaimCardSessionsRequest} request
|
|
276
401
|
* @param {CardSessionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -301,12 +426,15 @@ class CardSessionsClient {
|
|
|
301
426
|
__claim(request, requestOptions) {
|
|
302
427
|
return __awaiter(this, void 0, void 0, function* () {
|
|
303
428
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
304
|
-
const { sessionId, customerPartyId } = request;
|
|
429
|
+
const { sessionId, customerPartyId, idempotencyKey } = request;
|
|
305
430
|
const _queryParams = {
|
|
306
431
|
customerPartyId,
|
|
307
432
|
};
|
|
308
433
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
309
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
434
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
435
|
+
"Idempotency-Key": idempotencyKey,
|
|
436
|
+
"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,
|
|
437
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
310
438
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
311
439
|
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`),
|
|
312
440
|
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.js";
|
|
|
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
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as Natural from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {}
|
|
5
|
+
*/
|
|
6
|
+
export interface ListCardSessionsRequest {
|
|
7
|
+
/** 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. */
|
|
8
|
+
customerPartyId?: string;
|
|
9
|
+
/** Only sessions with this status. */
|
|
10
|
+
status?: Natural.ListCardSessionsRequestStatus;
|
|
11
|
+
/** Only sessions created with this reference. */
|
|
12
|
+
reference?: string;
|
|
13
|
+
/** Maximum results per page. */
|
|
14
|
+
limit?: number;
|
|
15
|
+
/** Cursor from the previous page. */
|
|
16
|
+
cursor?: string;
|
|
17
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export type { ClaimCardSessionsRequest } from "./ClaimCardSessionsRequest.js";
|
|
2
2
|
export type { CreateCardSessionsRequest } from "./CreateCardSessionsRequest.js";
|
|
3
3
|
export type { GetCardSessionsRequest } from "./GetCardSessionsRequest.js";
|
|
4
|
+
export type { ListCardSessionsRequest } from "./ListCardSessionsRequest.js";
|
|
@@ -3,7 +3,7 @@ export interface ClaimCardSessionsResponse {
|
|
|
3
3
|
sessionId: string;
|
|
4
4
|
cardId: string;
|
|
5
5
|
card: Natural.ClaimCardSessionsResponseCard;
|
|
6
|
-
/** The card's billing address on file, for filling the merchant's checkout (the ZIP drives the bank's AVS check). Null for
|
|
6
|
+
/** The card's billing address on file, for filling the merchant's checkout (the ZIP drives the bank's AVS check). Null for agent cards, which store none. */
|
|
7
7
|
billingAddress: Natural.ClaimCardSessionsResponseBillingAddress | null;
|
|
8
8
|
proxy: Natural.ClaimCardSessionsResponseProxy;
|
|
9
9
|
allowedHosts: string[];
|
|
@@ -5,6 +5,6 @@ export interface ClaimCardSessionsResponseCard {
|
|
|
5
5
|
cvc: string;
|
|
6
6
|
expirationMonth: number;
|
|
7
7
|
expirationYear: number;
|
|
8
|
-
/** Cardholder name as printed on the card, for the merchant's checkout name field. Null for
|
|
8
|
+
/** Cardholder name as printed on the card, for the merchant's checkout name field. Null for agent cards, which have none on file. */
|
|
9
9
|
holderName: string | null;
|
|
10
10
|
}
|
|
@@ -2,17 +2,21 @@ import type * as Natural from "../../../index.js";
|
|
|
2
2
|
export interface CreateCardSessionsResponse {
|
|
3
3
|
sessionId: string;
|
|
4
4
|
cardId: string;
|
|
5
|
-
/** natural_issued:
|
|
5
|
+
/** natural_issued: an agent card Natural issued to you. external: a card the user added on the dashboard. */
|
|
6
6
|
cardSource: Natural.CreateCardSessionsResponseCardSource;
|
|
7
7
|
/** pending_approval: waiting for the user; keep polling. approved: claim it now. declined: the user said no. claimed: already collected. expired: open a new session. */
|
|
8
8
|
status: Natural.CreateCardSessionsResponseStatus;
|
|
9
9
|
allowedHosts: string[];
|
|
10
|
+
/** The reference you created the session with. Null when you didn't set one. */
|
|
11
|
+
reference: string | null;
|
|
10
12
|
/** A pending session must be approved, and an approved one claimed, before this. */
|
|
11
13
|
claimExpiresAt: string;
|
|
12
14
|
claimedAt: string | null;
|
|
13
15
|
/** When the claimed proxy login stops working. */
|
|
14
16
|
credentialExpiresAt: string | null;
|
|
15
17
|
createdAt: string;
|
|
18
|
+
/** 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
|
+
note: Natural.CreateCardSessionsResponseNote | null;
|
|
16
20
|
/** Cards the user added only: send the user here to approve the purchase. Returned only in this response; it can't be fetched again. */
|
|
17
21
|
approvalUrl: string | null;
|
|
18
22
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** natural_issued:
|
|
1
|
+
/** natural_issued: an agent card Natural issued to you. external: a card the user added on the dashboard. */
|
|
2
2
|
export declare const CreateCardSessionsResponseCardSource: {
|
|
3
3
|
readonly NaturalIssued: "natural_issued";
|
|
4
4
|
readonly External: "external";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.CreateCardSessionsResponseCardSource = void 0;
|
|
5
|
-
/** natural_issued:
|
|
5
|
+
/** natural_issued: an agent card Natural issued to you. external: a card the user added on the dashboard. */
|
|
6
6
|
exports.CreateCardSessionsResponseCardSource = {
|
|
7
7
|
NaturalIssued: "natural_issued",
|
|
8
8
|
External: "external",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface CreateCardSessionsResponseNote {
|
|
2
|
+
/** What to tell the user: what would let them skip the security code next time, such as verifying their identity or adding money to Natural. */
|
|
3
|
+
message: string;
|
|
4
|
+
/** A page to send the user to for that step. Null when there's nothing to do yet. */
|
|
5
|
+
url: string | null;
|
|
6
|
+
}
|
|
@@ -2,15 +2,19 @@ import type * as Natural from "../../../index.js";
|
|
|
2
2
|
export interface GetCardSessionsResponse {
|
|
3
3
|
sessionId: string;
|
|
4
4
|
cardId: string;
|
|
5
|
-
/** natural_issued:
|
|
5
|
+
/** natural_issued: an agent card Natural issued to you. external: a card the user added on the dashboard. */
|
|
6
6
|
cardSource: Natural.GetCardSessionsResponseCardSource;
|
|
7
7
|
/** pending_approval: waiting for the user; keep polling. approved: claim it now. declined: the user said no. claimed: already collected. expired: open a new session. */
|
|
8
8
|
status: Natural.GetCardSessionsResponseStatus;
|
|
9
9
|
allowedHosts: string[];
|
|
10
|
+
/** The reference you created the session with. Null when you didn't set one. */
|
|
11
|
+
reference: string | null;
|
|
10
12
|
/** A pending session must be approved, and an approved one claimed, before this. */
|
|
11
13
|
claimExpiresAt: string;
|
|
12
14
|
claimedAt: string | null;
|
|
13
15
|
/** When the claimed proxy login stops working. */
|
|
14
16
|
credentialExpiresAt: string | null;
|
|
15
17
|
createdAt: string;
|
|
18
|
+
/** 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
|
+
note: Natural.GetCardSessionsResponseNote | null;
|
|
16
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** natural_issued:
|
|
1
|
+
/** natural_issued: an agent card Natural issued to you. external: a card the user added on the dashboard. */
|
|
2
2
|
export declare const GetCardSessionsResponseCardSource: {
|
|
3
3
|
readonly NaturalIssued: "natural_issued";
|
|
4
4
|
readonly External: "external";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.GetCardSessionsResponseCardSource = void 0;
|
|
5
|
-
/** natural_issued:
|
|
5
|
+
/** natural_issued: an agent card Natural issued to you. external: a card the user added on the dashboard. */
|
|
6
6
|
exports.GetCardSessionsResponseCardSource = {
|
|
7
7
|
NaturalIssued: "natural_issued",
|
|
8
8
|
External: "external",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface GetCardSessionsResponseNote {
|
|
2
|
+
/** What to tell the user: what would let them skip the security code next time, such as verifying their identity or adding money to Natural. */
|
|
3
|
+
message: string;
|
|
4
|
+
/** A page to send the user to for that step. Null when there's nothing to do yet. */
|
|
5
|
+
url: string | null;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Only sessions with this status. */
|
|
2
|
+
export declare const ListCardSessionsRequestStatus: {
|
|
3
|
+
readonly PendingApproval: "pending_approval";
|
|
4
|
+
readonly Approved: "approved";
|
|
5
|
+
readonly Declined: "declined";
|
|
6
|
+
readonly Claimed: "claimed";
|
|
7
|
+
readonly Expired: "expired";
|
|
8
|
+
};
|
|
9
|
+
export type ListCardSessionsRequestStatus = (typeof ListCardSessionsRequestStatus)[keyof typeof ListCardSessionsRequestStatus];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ListCardSessionsRequestStatus = void 0;
|
|
5
|
+
/** Only sessions with this status. */
|
|
6
|
+
exports.ListCardSessionsRequestStatus = {
|
|
7
|
+
PendingApproval: "pending_approval",
|
|
8
|
+
Approved: "approved",
|
|
9
|
+
Declined: "declined",
|
|
10
|
+
Claimed: "claimed",
|
|
11
|
+
Expired: "expired",
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type * as Natural from "../../../index.js";
|
|
2
|
+
export interface ListCardSessionsResponseDataItem {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
cardId: string;
|
|
5
|
+
/** natural_issued: an agent card Natural issued to you. external: a card the user added on the dashboard. */
|
|
6
|
+
cardSource: Natural.ListCardSessionsResponseDataItemCardSource;
|
|
7
|
+
/** pending_approval: waiting for the user; keep polling. approved: claim it now. declined: the user said no. claimed: already collected. expired: open a new session. */
|
|
8
|
+
status: Natural.ListCardSessionsResponseDataItemStatus;
|
|
9
|
+
allowedHosts: string[];
|
|
10
|
+
/** The reference you created the session with. Null when you didn't set one. */
|
|
11
|
+
reference: string | null;
|
|
12
|
+
/** A pending session must be approved, and an approved one claimed, before this. */
|
|
13
|
+
claimExpiresAt: string;
|
|
14
|
+
claimedAt: string | null;
|
|
15
|
+
/** When the claimed proxy login stops working. */
|
|
16
|
+
credentialExpiresAt: string | null;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
/** 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
|
+
note: Natural.ListCardSessionsResponseDataItemNote | null;
|
|
20
|
+
}
|
package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemCardSource.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** natural_issued: an agent card Natural issued to you. external: a card the user added on the dashboard. */
|
|
2
|
+
export declare const ListCardSessionsResponseDataItemCardSource: {
|
|
3
|
+
readonly NaturalIssued: "natural_issued";
|
|
4
|
+
readonly External: "external";
|
|
5
|
+
};
|
|
6
|
+
export type ListCardSessionsResponseDataItemCardSource = (typeof ListCardSessionsResponseDataItemCardSource)[keyof typeof ListCardSessionsResponseDataItemCardSource];
|
package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemCardSource.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ListCardSessionsResponseDataItemCardSource = void 0;
|
|
5
|
+
/** natural_issued: an agent card Natural issued to you. external: a card the user added on the dashboard. */
|
|
6
|
+
exports.ListCardSessionsResponseDataItemCardSource = {
|
|
7
|
+
NaturalIssued: "natural_issued",
|
|
8
|
+
External: "external",
|
|
9
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface ListCardSessionsResponseDataItemNote {
|
|
2
|
+
/** What to tell the user: what would let them skip the security code next time, such as verifying their identity or adding money to Natural. */
|
|
3
|
+
message: string;
|
|
4
|
+
/** A page to send the user to for that step. Null when there's nothing to do yet. */
|
|
5
|
+
url: string | null;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** pending_approval: waiting for the user; keep polling. approved: claim it now. declined: the user said no. claimed: already collected. expired: open a new session. */
|
|
2
|
+
export declare const ListCardSessionsResponseDataItemStatus: {
|
|
3
|
+
readonly PendingApproval: "pending_approval";
|
|
4
|
+
readonly Approved: "approved";
|
|
5
|
+
readonly Declined: "declined";
|
|
6
|
+
readonly Claimed: "claimed";
|
|
7
|
+
readonly Expired: "expired";
|
|
8
|
+
};
|
|
9
|
+
export type ListCardSessionsResponseDataItemStatus = (typeof ListCardSessionsResponseDataItemStatus)[keyof typeof ListCardSessionsResponseDataItemStatus];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ListCardSessionsResponseDataItemStatus = void 0;
|
|
5
|
+
/** pending_approval: waiting for the user; keep polling. approved: claim it now. declined: the user said no. claimed: already collected. expired: open a new session. */
|
|
6
|
+
exports.ListCardSessionsResponseDataItemStatus = {
|
|
7
|
+
PendingApproval: "pending_approval",
|
|
8
|
+
Approved: "approved",
|
|
9
|
+
Declined: "declined",
|
|
10
|
+
Claimed: "claimed",
|
|
11
|
+
Expired: "expired",
|
|
12
|
+
};
|