@naturalpay/sdk 1.6.52 → 1.6.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/ach/client/requests/NewAchParams.d.ts +2 -4
  3. package/dist/cjs/api/resources/ach/types/NewAchParamsDirection.d.ts +1 -2
  4. package/dist/cjs/api/resources/ach/types/NewAchParamsDirection.js +1 -2
  5. package/dist/cjs/api/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.d.ts +2 -0
  6. package/dist/cjs/api/resources/externalAccounts/types/RemoveCardExternalAccountsResponseDataAttributes.d.ts +2 -0
  7. package/dist/cjs/api/resources/paymentIntents/client/Client.d.ts +3 -3
  8. package/dist/cjs/api/resources/paymentIntents/client/Client.js +3 -3
  9. package/dist/cjs/api/resources/voiceSessions/client/requests/CreateVoiceSessionsRequest.d.ts +1 -1
  10. package/dist/cjs/api/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.d.ts +0 -1
  11. package/dist/cjs/api/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.js +0 -1
  12. package/dist/cjs/api/resources/wallets/client/Client.d.ts +1 -1
  13. package/dist/cjs/api/resources/wallets/client/Client.js +1 -1
  14. package/dist/cjs/api/resources/wallets/client/requests/ListAgentsWalletsRequest.d.ts +1 -1
  15. package/dist/cjs/api/types/PaymentIntentRelationships.d.ts +1 -1
  16. package/dist/cjs/api/types/PaymentIntentRelationshipsCardPayment.d.ts +1 -1
  17. package/dist/cjs/api/types/VoiceSessionAttributes.d.ts +2 -2
  18. package/dist/cjs/api/types/VoiceSessionAttributesStatus.d.ts +0 -1
  19. package/dist/cjs/api/types/VoiceSessionAttributesStatus.js +0 -1
  20. package/dist/cjs/serialization/resources/ach/client/requests/NewAchParams.d.ts +0 -1
  21. package/dist/cjs/serialization/resources/ach/client/requests/NewAchParams.js +0 -1
  22. package/dist/cjs/serialization/resources/ach/types/NewAchParamsDirection.d.ts +1 -1
  23. package/dist/cjs/serialization/resources/ach/types/NewAchParamsDirection.js +1 -1
  24. package/dist/cjs/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.d.ts +1 -0
  25. package/dist/cjs/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.js +1 -0
  26. package/dist/cjs/serialization/resources/externalAccounts/types/RemoveCardExternalAccountsResponseDataAttributes.d.ts +1 -0
  27. package/dist/cjs/serialization/resources/externalAccounts/types/RemoveCardExternalAccountsResponseDataAttributes.js +1 -0
  28. package/dist/cjs/serialization/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.d.ts +1 -1
  29. package/dist/cjs/serialization/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.js +1 -1
  30. package/dist/cjs/serialization/types/VoiceSessionAttributesStatus.d.ts +1 -1
  31. package/dist/cjs/serialization/types/VoiceSessionAttributesStatus.js +1 -1
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/BaseClient.mjs +2 -2
  35. package/dist/esm/api/resources/ach/client/requests/NewAchParams.d.mts +2 -4
  36. package/dist/esm/api/resources/ach/types/NewAchParamsDirection.d.mts +1 -2
  37. package/dist/esm/api/resources/ach/types/NewAchParamsDirection.mjs +1 -2
  38. package/dist/esm/api/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.d.mts +2 -0
  39. package/dist/esm/api/resources/externalAccounts/types/RemoveCardExternalAccountsResponseDataAttributes.d.mts +2 -0
  40. package/dist/esm/api/resources/paymentIntents/client/Client.d.mts +3 -3
  41. package/dist/esm/api/resources/paymentIntents/client/Client.mjs +3 -3
  42. package/dist/esm/api/resources/voiceSessions/client/requests/CreateVoiceSessionsRequest.d.mts +1 -1
  43. package/dist/esm/api/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.d.mts +0 -1
  44. package/dist/esm/api/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.mjs +0 -1
  45. package/dist/esm/api/resources/wallets/client/Client.d.mts +1 -1
  46. package/dist/esm/api/resources/wallets/client/Client.mjs +1 -1
  47. package/dist/esm/api/resources/wallets/client/requests/ListAgentsWalletsRequest.d.mts +1 -1
  48. package/dist/esm/api/types/PaymentIntentRelationships.d.mts +1 -1
  49. package/dist/esm/api/types/PaymentIntentRelationshipsCardPayment.d.mts +1 -1
  50. package/dist/esm/api/types/VoiceSessionAttributes.d.mts +2 -2
  51. package/dist/esm/api/types/VoiceSessionAttributesStatus.d.mts +0 -1
  52. package/dist/esm/api/types/VoiceSessionAttributesStatus.mjs +0 -1
  53. package/dist/esm/serialization/resources/ach/client/requests/NewAchParams.d.mts +0 -1
  54. package/dist/esm/serialization/resources/ach/client/requests/NewAchParams.mjs +0 -1
  55. package/dist/esm/serialization/resources/ach/types/NewAchParamsDirection.d.mts +1 -1
  56. package/dist/esm/serialization/resources/ach/types/NewAchParamsDirection.mjs +1 -1
  57. package/dist/esm/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.d.mts +1 -0
  58. package/dist/esm/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.mjs +1 -0
  59. package/dist/esm/serialization/resources/externalAccounts/types/RemoveCardExternalAccountsResponseDataAttributes.d.mts +1 -0
  60. package/dist/esm/serialization/resources/externalAccounts/types/RemoveCardExternalAccountsResponseDataAttributes.mjs +1 -0
  61. package/dist/esm/serialization/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.d.mts +1 -1
  62. package/dist/esm/serialization/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.mjs +1 -1
  63. package/dist/esm/serialization/types/VoiceSessionAttributesStatus.d.mts +1 -1
  64. package/dist/esm/serialization/types/VoiceSessionAttributesStatus.mjs +1 -1
  65. package/dist/esm/version.d.mts +1 -1
  66. package/dist/esm/version.mjs +1 -1
  67. package/package.json +1 -1
  68. package/reference.md +3 -3
@@ -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.52",
47
- "User-Agent": "@naturalpay/sdk/1.6.52",
46
+ "X-Fern-SDK-Version": "1.6.54",
47
+ "User-Agent": "@naturalpay/sdk/1.6.54",
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,
@@ -17,18 +17,16 @@ export interface NewAchParams {
17
17
  idempotencyKey: string;
18
18
  /** 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. */
19
19
  customerPartyId?: string;
20
- /** Direction of the payment. */
20
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
21
21
  direction: Natural.NewAchParamsDirection;
22
22
  /** Amount in cents. */
23
23
  amount: number;
24
24
  /** Currency code. Defaults to USD. */
25
25
  currency?: Natural.NewAchParamsCurrency;
26
- /** Wallet (wal_*) that funds an ACH credit or receives an ACH debit. Omit to use the party default for user or party API calls, or the agent default for the current customer connection when acting through a connected agent. Owned agents use their own agent default. */
26
+ /** Wallet (wal_*) that funds the ACH credit. Omit to use the party default for user or party API calls, or the agent default for the current customer connection when acting through a connected agent. Owned agents use their own agent default. */
27
27
  walletId?: string;
28
28
  /** External party account (epa_*) to pay. */
29
29
  externalPartyAccountId: string;
30
- /** Mandate (mdt_*) authorizing the debit. Required for debits; not allowed for credits. */
31
- mandateId?: string;
32
30
  /** ACH company entry description. Delivered to the receiving bank on the entry. Maximum 10 characters. */
33
31
  companyEntryDescription: string;
34
32
  /** Description for your internal reference. Never shared with the counterparty or the banking network. Maximum 255 characters. */
@@ -1,6 +1,5 @@
1
- /** Direction of the payment. */
1
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
2
2
  export declare const NewAchParamsDirection: {
3
- readonly Debit: "debit";
4
3
  readonly Credit: "credit";
5
4
  };
6
5
  export type NewAchParamsDirection = (typeof NewAchParamsDirection)[keyof typeof NewAchParamsDirection];
@@ -2,8 +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.NewAchParamsDirection = void 0;
5
- /** Direction of the payment. */
5
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
6
6
  exports.NewAchParamsDirection = {
7
- Debit: "debit",
8
7
  Credit: "credit",
9
8
  };
@@ -4,6 +4,8 @@ export interface ListCardsExternalAccountsResponseDataItemAttributes {
4
4
  brand: Natural.ListCardsExternalAccountsResponseDataItemAttributesBrand;
5
5
  /** Last four digits of the card number. */
6
6
  lastFour: string;
7
+ /** Name the customer gave the card, e.g. "Work Amex". Defaults to "<Brand> card ending <last4>". */
8
+ nickname: string;
7
9
  /** The card's billing address on file, for filling a merchant's checkout (the ZIP drives the bank's AVS check). */
8
10
  billingAddress: Natural.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress | null;
9
11
  /** Lifecycle status of the external account. */
@@ -4,6 +4,8 @@ export interface RemoveCardExternalAccountsResponseDataAttributes {
4
4
  brand: Natural.RemoveCardExternalAccountsResponseDataAttributesBrand;
5
5
  /** Last four digits of the card number. */
6
6
  lastFour: string;
7
+ /** Name the customer gave the card, e.g. "Work Amex". Defaults to "<Brand> card ending <last4>". */
8
+ nickname: string;
7
9
  /** The card's billing address on file, for filling a merchant's checkout (the ZIP drives the bank's AVS check). */
8
10
  billingAddress: Natural.RemoveCardExternalAccountsResponseDataAttributesBillingAddress | null;
9
11
  /** Lifecycle status of the external account. */
@@ -8,7 +8,7 @@ export declare namespace PaymentIntentsClient {
8
8
  }
9
9
  }
10
10
  /**
11
- * Accept card payments by link or voice
11
+ * Accept card payments by link or voice, or charge a saved card
12
12
  */
13
13
  export declare class PaymentIntentsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<PaymentIntentsClient.Options>;
@@ -39,7 +39,7 @@ export declare class PaymentIntentsClient {
39
39
  */
40
40
  list(request?: Natural.ListPaymentIntentsRequest, requestOptions?: PaymentIntentsClient.RequestOptions): Promise<core.Page<Natural.PaymentIntent, Natural.ListPaymentIntentsResponse>>;
41
41
  /**
42
- * Create a payment intent with a hosted checkout link
42
+ * Create a payment intent to collect a payment
43
43
  *
44
44
  * @param {Natural.CreatePaymentIntentsRequest} request
45
45
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -150,7 +150,7 @@ export declare class PaymentIntentsClient {
150
150
  update(request: Natural.UpdatePaymentIntentsRequest, requestOptions?: PaymentIntentsClient.RequestOptions): core.HttpResponsePromise<Natural.UpdatePaymentIntentsResponse>;
151
151
  private __update;
152
152
  /**
153
- * Cancel an open payment intent
153
+ * Cancel a payment intent that isn't paid yet
154
154
  *
155
155
  * @param {Natural.CancelPaymentIntentsRequest} request
156
156
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -65,7 +65,7 @@ const errors = __importStar(require("../../../../errors/index.js"));
65
65
  const serializers = __importStar(require("../../../../serialization/index.js"));
66
66
  const Natural = __importStar(require("../../../index.js"));
67
67
  /**
68
- * Accept card payments by link or voice
68
+ * Accept card payments by link or voice, or charge a saved card
69
69
  */
70
70
  class PaymentIntentsClient {
71
71
  constructor(options = {}) {
@@ -195,7 +195,7 @@ class PaymentIntentsClient {
195
195
  });
196
196
  }
197
197
  /**
198
- * Create a payment intent with a hosted checkout link
198
+ * Create a payment intent to collect a payment
199
199
  *
200
200
  * @param {Natural.CreatePaymentIntentsRequest} request
201
201
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -532,7 +532,7 @@ class PaymentIntentsClient {
532
532
  });
533
533
  }
534
534
  /**
535
- * Cancel an open payment intent
535
+ * Cancel a payment intent that isn't paid yet
536
536
  *
537
537
  * @param {Natural.CancelPaymentIntentsRequest} request
538
538
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -23,6 +23,6 @@ export interface CreateVoiceSessionsRequest {
23
23
  callerPhone: string;
24
24
  /** Your reference for this voice session. */
25
25
  referenceId?: string;
26
- /** SIP URI to request a return transfer to when the payment call finishes. */
26
+ /** SIP URI with a public host to request a return transfer to when the payment call finishes. */
27
27
  returnTarget?: string;
28
28
  }
@@ -3,7 +3,6 @@ export declare const ListVoiceSessionsRequestStatus: {
3
3
  readonly AwaitingCall: "awaitingCall";
4
4
  readonly InProgress: "inProgress";
5
5
  readonly Ended: "ended";
6
- readonly Failed: "failed";
7
6
  readonly Canceled: "canceled";
8
7
  readonly Expired: "expired";
9
8
  };
@@ -7,7 +7,6 @@ exports.ListVoiceSessionsRequestStatus = {
7
7
  AwaitingCall: "awaitingCall",
8
8
  InProgress: "inProgress",
9
9
  Ended: "ended",
10
- Failed: "failed",
11
10
  Canceled: "canceled",
12
11
  Expired: "expired",
13
12
  };
@@ -221,7 +221,7 @@ export declare class WalletsClient {
221
221
  unfreeze(request: Natural.UnfreezeWalletsRequest, requestOptions?: WalletsClient.RequestOptions): core.HttpResponsePromise<Natural.UnfreezeWalletsResponse>;
222
222
  private __unfreeze;
223
223
  /**
224
- * List owned and customer-connected agents granted access to a wallet. Connected agents include customer connection limits and omit private metadata from the agent owner.
224
+ * List owned and customer-connected agents granted access to one of your wallets. Connected agents include customer connection limits and omit private metadata from the agent owner.
225
225
  *
226
226
  * @param {Natural.ListAgentsWalletsRequest} request
227
227
  * @param {WalletsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -785,7 +785,7 @@ class WalletsClient {
785
785
  });
786
786
  }
787
787
  /**
788
- * List owned and customer-connected agents granted access to a wallet. Connected agents include customer connection limits and omit private metadata from the agent owner.
788
+ * List owned and customer-connected agents granted access to one of your wallets. Connected agents include customer connection limits and omit private metadata from the agent owner.
789
789
  *
790
790
  * @param {Natural.ListAgentsWalletsRequest} request
791
791
  * @param {WalletsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -5,7 +5,7 @@
5
5
  * }
6
6
  */
7
7
  export interface ListAgentsWalletsRequest {
8
- /** Wallet ID (wal_*). */
8
+ /** Wallet ID (wal_*) of a wallet your party owns. Any other wallet, including a connected customer's, returns 404. */
9
9
  walletId: string;
10
10
  /** Maximum results per page. */
11
11
  limit?: number;
@@ -2,7 +2,7 @@ import type * as Natural from "../index.js";
2
2
  export interface PaymentIntentRelationships {
3
3
  /** The party being paid. */
4
4
  customerParty: Natural.PaymentIntentRelationshipsCustomerParty;
5
- /** Successful card payment. Null until a payment succeeds. */
5
+ /** The card payment the issuer approved. Null until one is approved. */
6
6
  cardPayment: Natural.PaymentIntentRelationshipsCardPayment;
7
7
  /** Latest voice session for this intent. Null when no session has been created. */
8
8
  voiceSession: Natural.PaymentIntentRelationshipsVoiceSession;
@@ -1,6 +1,6 @@
1
1
  import type * as Natural from "../index.js";
2
2
  /**
3
- * Successful card payment. Null until a payment succeeds.
3
+ * The card payment the issuer approved. Null until one is approved.
4
4
  */
5
5
  export interface PaymentIntentRelationshipsCardPayment {
6
6
  /** Related resource identifier. */
@@ -8,14 +8,14 @@ export interface VoiceSessionAttributes {
8
8
  referenceId: string | null;
9
9
  /** Supplied caller phone number, or null for a session without one. */
10
10
  callerPhone: string | null;
11
- /** Dial destination while the session accepts a call and you have permission to create payment voice sessions. Otherwise null. */
11
+ /** Dial destination while the session accepts a call and you have permission to create payment voice sessions. Otherwise null. Treat it as opaque: store it from the create response and never build it from the session ID. */
12
12
  dialUri: string | null;
13
13
  /** RFC 3339 deadline for starting the session's one permitted call. */
14
14
  dialExpiresAt: string;
15
15
  /** Requested return destination, or null. This does not confirm the destination answered. */
16
16
  returnTarget: string | null;
17
17
  call: Natural.VoiceSessionAttributesCall;
18
- /** RFC 3339 time the session completed, or null. Set once the call has ended and the kind's block holds its result. `voiceSession.completed` fires then. */
18
+ /** RFC 3339 time the session closed, or null. Set once the call has ended and its result is known, or the session expired or was canceled. `voiceSession.completed` fires once then. */
19
19
  completedAt: string | null;
20
20
  /** RFC 3339 time the session was created. */
21
21
  createdAt: string;
@@ -3,7 +3,6 @@ export declare const VoiceSessionAttributesStatus: {
3
3
  readonly AwaitingCall: "awaitingCall";
4
4
  readonly InProgress: "inProgress";
5
5
  readonly Ended: "ended";
6
- readonly Failed: "failed";
7
6
  readonly Canceled: "canceled";
8
7
  readonly Expired: "expired";
9
8
  };
@@ -7,7 +7,6 @@ exports.VoiceSessionAttributesStatus = {
7
7
  AwaitingCall: "awaitingCall",
8
8
  InProgress: "inProgress",
9
9
  Ended: "ended",
10
- Failed: "failed",
11
10
  Canceled: "canceled",
12
11
  Expired: "expired",
13
12
  };
@@ -12,7 +12,6 @@ export declare namespace NewAchParams {
12
12
  currency?: NewAchParamsCurrency.Raw | null;
13
13
  walletId?: string | null;
14
14
  externalPartyAccountId: string;
15
- mandateId?: string | null;
16
15
  companyEntryDescription: string;
17
16
  internalDescription?: string | null;
18
17
  addenda?: string | null;
@@ -45,7 +45,6 @@ exports.NewAchParams = core.serialization.object({
45
45
  currency: NewAchParamsCurrency_js_1.NewAchParamsCurrency.optional(),
46
46
  walletId: core.serialization.string().optional(),
47
47
  externalPartyAccountId: core.serialization.string(),
48
- mandateId: core.serialization.string().optional(),
49
48
  companyEntryDescription: core.serialization.string(),
50
49
  internalDescription: core.serialization.string().optional(),
51
50
  addenda: core.serialization.string().optional(),
@@ -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 NewAchParamsDirection: core.serialization.Schema<serializers.NewAchParamsDirection.Raw, Natural.NewAchParamsDirection>;
5
5
  export declare namespace NewAchParamsDirection {
6
- type Raw = "debit" | "credit";
6
+ type Raw = "credit";
7
7
  }
@@ -36,4 +36,4 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.NewAchParamsDirection = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
- exports.NewAchParamsDirection = core.serialization.enum_(["debit", "credit"]);
39
+ exports.NewAchParamsDirection = core.serialization.enum_(["credit"]);
@@ -9,6 +9,7 @@ export declare namespace ListCardsExternalAccountsResponseDataItemAttributes {
9
9
  interface Raw {
10
10
  brand: ListCardsExternalAccountsResponseDataItemAttributesBrand.Raw;
11
11
  lastFour: string;
12
+ nickname: string;
12
13
  billingAddress?: ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.Raw | null;
13
14
  status: ListCardsExternalAccountsResponseDataItemAttributesStatus.Raw;
14
15
  createdAt: string;
@@ -42,6 +42,7 @@ const ListCardsExternalAccountsResponseDataItemAttributesStatus_js_1 = require("
42
42
  exports.ListCardsExternalAccountsResponseDataItemAttributes = core.serialization.object({
43
43
  brand: ListCardsExternalAccountsResponseDataItemAttributesBrand_js_1.ListCardsExternalAccountsResponseDataItemAttributesBrand,
44
44
  lastFour: core.serialization.string(),
45
+ nickname: core.serialization.string(),
45
46
  billingAddress: ListCardsExternalAccountsResponseDataItemAttributesBillingAddress_js_1.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.nullable(),
46
47
  status: ListCardsExternalAccountsResponseDataItemAttributesStatus_js_1.ListCardsExternalAccountsResponseDataItemAttributesStatus,
47
48
  createdAt: core.serialization.date(),
@@ -9,6 +9,7 @@ export declare namespace RemoveCardExternalAccountsResponseDataAttributes {
9
9
  interface Raw {
10
10
  brand: RemoveCardExternalAccountsResponseDataAttributesBrand.Raw;
11
11
  lastFour: string;
12
+ nickname: string;
12
13
  billingAddress?: RemoveCardExternalAccountsResponseDataAttributesBillingAddress.Raw | null;
13
14
  status: RemoveCardExternalAccountsResponseDataAttributesStatus.Raw;
14
15
  createdAt: string;
@@ -42,6 +42,7 @@ const RemoveCardExternalAccountsResponseDataAttributesStatus_js_1 = require("./R
42
42
  exports.RemoveCardExternalAccountsResponseDataAttributes = core.serialization.object({
43
43
  brand: RemoveCardExternalAccountsResponseDataAttributesBrand_js_1.RemoveCardExternalAccountsResponseDataAttributesBrand,
44
44
  lastFour: core.serialization.string(),
45
+ nickname: core.serialization.string(),
45
46
  billingAddress: RemoveCardExternalAccountsResponseDataAttributesBillingAddress_js_1.RemoveCardExternalAccountsResponseDataAttributesBillingAddress.nullable(),
46
47
  status: RemoveCardExternalAccountsResponseDataAttributesStatus_js_1.RemoveCardExternalAccountsResponseDataAttributesStatus,
47
48
  createdAt: core.serialization.date(),
@@ -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 ListVoiceSessionsRequestStatus: core.serialization.Schema<serializers.ListVoiceSessionsRequestStatus.Raw, Natural.ListVoiceSessionsRequestStatus>;
5
5
  export declare namespace ListVoiceSessionsRequestStatus {
6
- type Raw = "awaitingCall" | "inProgress" | "ended" | "failed" | "canceled" | "expired";
6
+ type Raw = "awaitingCall" | "inProgress" | "ended" | "canceled" | "expired";
7
7
  }
@@ -36,4 +36,4 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.ListVoiceSessionsRequestStatus = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
- exports.ListVoiceSessionsRequestStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "failed", "canceled", "expired"]);
39
+ exports.ListVoiceSessionsRequestStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "canceled", "expired"]);
@@ -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 VoiceSessionAttributesStatus: core.serialization.Schema<serializers.VoiceSessionAttributesStatus.Raw, Natural.VoiceSessionAttributesStatus>;
5
5
  export declare namespace VoiceSessionAttributesStatus {
6
- type Raw = "awaitingCall" | "inProgress" | "ended" | "failed" | "canceled" | "expired";
6
+ type Raw = "awaitingCall" | "inProgress" | "ended" | "canceled" | "expired";
7
7
  }
@@ -36,4 +36,4 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.VoiceSessionAttributesStatus = void 0;
38
38
  const core = __importStar(require("../../core/index.js"));
39
- exports.VoiceSessionAttributesStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "failed", "canceled", "expired"]);
39
+ exports.VoiceSessionAttributesStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "canceled", "expired"]);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.6.52";
1
+ export declare const SDK_VERSION = "1.6.54";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.6.52";
4
+ exports.SDK_VERSION = "1.6.54";
@@ -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.52",
10
- "User-Agent": "@naturalpay/sdk/1.6.52",
9
+ "X-Fern-SDK-Version": "1.6.54",
10
+ "User-Agent": "@naturalpay/sdk/1.6.54",
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,
@@ -17,18 +17,16 @@ export interface NewAchParams {
17
17
  idempotencyKey: string;
18
18
  /** 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. */
19
19
  customerPartyId?: string;
20
- /** Direction of the payment. */
20
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
21
21
  direction: Natural.NewAchParamsDirection;
22
22
  /** Amount in cents. */
23
23
  amount: number;
24
24
  /** Currency code. Defaults to USD. */
25
25
  currency?: Natural.NewAchParamsCurrency;
26
- /** Wallet (wal_*) that funds an ACH credit or receives an ACH debit. Omit to use the party default for user or party API calls, or the agent default for the current customer connection when acting through a connected agent. Owned agents use their own agent default. */
26
+ /** Wallet (wal_*) that funds the ACH credit. Omit to use the party default for user or party API calls, or the agent default for the current customer connection when acting through a connected agent. Owned agents use their own agent default. */
27
27
  walletId?: string;
28
28
  /** External party account (epa_*) to pay. */
29
29
  externalPartyAccountId: string;
30
- /** Mandate (mdt_*) authorizing the debit. Required for debits; not allowed for credits. */
31
- mandateId?: string;
32
30
  /** ACH company entry description. Delivered to the receiving bank on the entry. Maximum 10 characters. */
33
31
  companyEntryDescription: string;
34
32
  /** Description for your internal reference. Never shared with the counterparty or the banking network. Maximum 255 characters. */
@@ -1,6 +1,5 @@
1
- /** Direction of the payment. */
1
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
2
2
  export declare const NewAchParamsDirection: {
3
- readonly Debit: "debit";
4
3
  readonly Credit: "credit";
5
4
  };
6
5
  export type NewAchParamsDirection = (typeof NewAchParamsDirection)[keyof typeof NewAchParamsDirection];
@@ -1,6 +1,5 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- /** Direction of the payment. */
2
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
3
3
  export const NewAchParamsDirection = {
4
- Debit: "debit",
5
4
  Credit: "credit",
6
5
  };
@@ -4,6 +4,8 @@ export interface ListCardsExternalAccountsResponseDataItemAttributes {
4
4
  brand: Natural.ListCardsExternalAccountsResponseDataItemAttributesBrand;
5
5
  /** Last four digits of the card number. */
6
6
  lastFour: string;
7
+ /** Name the customer gave the card, e.g. "Work Amex". Defaults to "<Brand> card ending <last4>". */
8
+ nickname: string;
7
9
  /** The card's billing address on file, for filling a merchant's checkout (the ZIP drives the bank's AVS check). */
8
10
  billingAddress: Natural.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress | null;
9
11
  /** Lifecycle status of the external account. */
@@ -4,6 +4,8 @@ export interface RemoveCardExternalAccountsResponseDataAttributes {
4
4
  brand: Natural.RemoveCardExternalAccountsResponseDataAttributesBrand;
5
5
  /** Last four digits of the card number. */
6
6
  lastFour: string;
7
+ /** Name the customer gave the card, e.g. "Work Amex". Defaults to "<Brand> card ending <last4>". */
8
+ nickname: string;
7
9
  /** The card's billing address on file, for filling a merchant's checkout (the ZIP drives the bank's AVS check). */
8
10
  billingAddress: Natural.RemoveCardExternalAccountsResponseDataAttributesBillingAddress | null;
9
11
  /** Lifecycle status of the external account. */
@@ -8,7 +8,7 @@ export declare namespace PaymentIntentsClient {
8
8
  }
9
9
  }
10
10
  /**
11
- * Accept card payments by link or voice
11
+ * Accept card payments by link or voice, or charge a saved card
12
12
  */
13
13
  export declare class PaymentIntentsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<PaymentIntentsClient.Options>;
@@ -39,7 +39,7 @@ export declare class PaymentIntentsClient {
39
39
  */
40
40
  list(request?: Natural.ListPaymentIntentsRequest, requestOptions?: PaymentIntentsClient.RequestOptions): Promise<core.Page<Natural.PaymentIntent, Natural.ListPaymentIntentsResponse>>;
41
41
  /**
42
- * Create a payment intent with a hosted checkout link
42
+ * Create a payment intent to collect a payment
43
43
  *
44
44
  * @param {Natural.CreatePaymentIntentsRequest} request
45
45
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -150,7 +150,7 @@ export declare class PaymentIntentsClient {
150
150
  update(request: Natural.UpdatePaymentIntentsRequest, requestOptions?: PaymentIntentsClient.RequestOptions): core.HttpResponsePromise<Natural.UpdatePaymentIntentsResponse>;
151
151
  private __update;
152
152
  /**
153
- * Cancel an open payment intent
153
+ * Cancel a payment intent that isn't paid yet
154
154
  *
155
155
  * @param {Natural.CancelPaymentIntentsRequest} request
156
156
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -29,7 +29,7 @@ import * as errors from "../../../../errors/index.mjs";
29
29
  import * as serializers from "../../../../serialization/index.mjs";
30
30
  import * as Natural from "../../../index.mjs";
31
31
  /**
32
- * Accept card payments by link or voice
32
+ * Accept card payments by link or voice, or charge a saved card
33
33
  */
34
34
  export class PaymentIntentsClient {
35
35
  constructor(options = {}) {
@@ -159,7 +159,7 @@ export class PaymentIntentsClient {
159
159
  });
160
160
  }
161
161
  /**
162
- * Create a payment intent with a hosted checkout link
162
+ * Create a payment intent to collect a payment
163
163
  *
164
164
  * @param {Natural.CreatePaymentIntentsRequest} request
165
165
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -496,7 +496,7 @@ export class PaymentIntentsClient {
496
496
  });
497
497
  }
498
498
  /**
499
- * Cancel an open payment intent
499
+ * Cancel a payment intent that isn't paid yet
500
500
  *
501
501
  * @param {Natural.CancelPaymentIntentsRequest} request
502
502
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -23,6 +23,6 @@ export interface CreateVoiceSessionsRequest {
23
23
  callerPhone: string;
24
24
  /** Your reference for this voice session. */
25
25
  referenceId?: string;
26
- /** SIP URI to request a return transfer to when the payment call finishes. */
26
+ /** SIP URI with a public host to request a return transfer to when the payment call finishes. */
27
27
  returnTarget?: string;
28
28
  }
@@ -3,7 +3,6 @@ export declare const ListVoiceSessionsRequestStatus: {
3
3
  readonly AwaitingCall: "awaitingCall";
4
4
  readonly InProgress: "inProgress";
5
5
  readonly Ended: "ended";
6
- readonly Failed: "failed";
7
6
  readonly Canceled: "canceled";
8
7
  readonly Expired: "expired";
9
8
  };
@@ -4,7 +4,6 @@ export const ListVoiceSessionsRequestStatus = {
4
4
  AwaitingCall: "awaitingCall",
5
5
  InProgress: "inProgress",
6
6
  Ended: "ended",
7
- Failed: "failed",
8
7
  Canceled: "canceled",
9
8
  Expired: "expired",
10
9
  };
@@ -221,7 +221,7 @@ export declare class WalletsClient {
221
221
  unfreeze(request: Natural.UnfreezeWalletsRequest, requestOptions?: WalletsClient.RequestOptions): core.HttpResponsePromise<Natural.UnfreezeWalletsResponse>;
222
222
  private __unfreeze;
223
223
  /**
224
- * List owned and customer-connected agents granted access to a wallet. Connected agents include customer connection limits and omit private metadata from the agent owner.
224
+ * List owned and customer-connected agents granted access to one of your wallets. Connected agents include customer connection limits and omit private metadata from the agent owner.
225
225
  *
226
226
  * @param {Natural.ListAgentsWalletsRequest} request
227
227
  * @param {WalletsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -749,7 +749,7 @@ export class WalletsClient {
749
749
  });
750
750
  }
751
751
  /**
752
- * List owned and customer-connected agents granted access to a wallet. Connected agents include customer connection limits and omit private metadata from the agent owner.
752
+ * List owned and customer-connected agents granted access to one of your wallets. Connected agents include customer connection limits and omit private metadata from the agent owner.
753
753
  *
754
754
  * @param {Natural.ListAgentsWalletsRequest} request
755
755
  * @param {WalletsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -5,7 +5,7 @@
5
5
  * }
6
6
  */
7
7
  export interface ListAgentsWalletsRequest {
8
- /** Wallet ID (wal_*). */
8
+ /** Wallet ID (wal_*) of a wallet your party owns. Any other wallet, including a connected customer's, returns 404. */
9
9
  walletId: string;
10
10
  /** Maximum results per page. */
11
11
  limit?: number;
@@ -2,7 +2,7 @@ import type * as Natural from "../index.mjs";
2
2
  export interface PaymentIntentRelationships {
3
3
  /** The party being paid. */
4
4
  customerParty: Natural.PaymentIntentRelationshipsCustomerParty;
5
- /** Successful card payment. Null until a payment succeeds. */
5
+ /** The card payment the issuer approved. Null until one is approved. */
6
6
  cardPayment: Natural.PaymentIntentRelationshipsCardPayment;
7
7
  /** Latest voice session for this intent. Null when no session has been created. */
8
8
  voiceSession: Natural.PaymentIntentRelationshipsVoiceSession;
@@ -1,6 +1,6 @@
1
1
  import type * as Natural from "../index.mjs";
2
2
  /**
3
- * Successful card payment. Null until a payment succeeds.
3
+ * The card payment the issuer approved. Null until one is approved.
4
4
  */
5
5
  export interface PaymentIntentRelationshipsCardPayment {
6
6
  /** Related resource identifier. */
@@ -8,14 +8,14 @@ export interface VoiceSessionAttributes {
8
8
  referenceId: string | null;
9
9
  /** Supplied caller phone number, or null for a session without one. */
10
10
  callerPhone: string | null;
11
- /** Dial destination while the session accepts a call and you have permission to create payment voice sessions. Otherwise null. */
11
+ /** Dial destination while the session accepts a call and you have permission to create payment voice sessions. Otherwise null. Treat it as opaque: store it from the create response and never build it from the session ID. */
12
12
  dialUri: string | null;
13
13
  /** RFC 3339 deadline for starting the session's one permitted call. */
14
14
  dialExpiresAt: string;
15
15
  /** Requested return destination, or null. This does not confirm the destination answered. */
16
16
  returnTarget: string | null;
17
17
  call: Natural.VoiceSessionAttributesCall;
18
- /** RFC 3339 time the session completed, or null. Set once the call has ended and the kind's block holds its result. `voiceSession.completed` fires then. */
18
+ /** RFC 3339 time the session closed, or null. Set once the call has ended and its result is known, or the session expired or was canceled. `voiceSession.completed` fires once then. */
19
19
  completedAt: string | null;
20
20
  /** RFC 3339 time the session was created. */
21
21
  createdAt: string;
@@ -3,7 +3,6 @@ export declare const VoiceSessionAttributesStatus: {
3
3
  readonly AwaitingCall: "awaitingCall";
4
4
  readonly InProgress: "inProgress";
5
5
  readonly Ended: "ended";
6
- readonly Failed: "failed";
7
6
  readonly Canceled: "canceled";
8
7
  readonly Expired: "expired";
9
8
  };
@@ -4,7 +4,6 @@ export const VoiceSessionAttributesStatus = {
4
4
  AwaitingCall: "awaitingCall",
5
5
  InProgress: "inProgress",
6
6
  Ended: "ended",
7
- Failed: "failed",
8
7
  Canceled: "canceled",
9
8
  Expired: "expired",
10
9
  };
@@ -12,7 +12,6 @@ export declare namespace NewAchParams {
12
12
  currency?: NewAchParamsCurrency.Raw | null;
13
13
  walletId?: string | null;
14
14
  externalPartyAccountId: string;
15
- mandateId?: string | null;
16
15
  companyEntryDescription: string;
17
16
  internalDescription?: string | null;
18
17
  addenda?: string | null;
@@ -9,7 +9,6 @@ export const NewAchParams = core.serialization.object({
9
9
  currency: NewAchParamsCurrency.optional(),
10
10
  walletId: core.serialization.string().optional(),
11
11
  externalPartyAccountId: core.serialization.string(),
12
- mandateId: core.serialization.string().optional(),
13
12
  companyEntryDescription: core.serialization.string(),
14
13
  internalDescription: core.serialization.string().optional(),
15
14
  addenda: core.serialization.string().optional(),
@@ -3,5 +3,5 @@ import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  export declare const NewAchParamsDirection: core.serialization.Schema<serializers.NewAchParamsDirection.Raw, Natural.NewAchParamsDirection>;
5
5
  export declare namespace NewAchParamsDirection {
6
- type Raw = "debit" | "credit";
6
+ type Raw = "credit";
7
7
  }
@@ -1,3 +1,3 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
- export const NewAchParamsDirection = core.serialization.enum_(["debit", "credit"]);
3
+ export const NewAchParamsDirection = core.serialization.enum_(["credit"]);
@@ -9,6 +9,7 @@ export declare namespace ListCardsExternalAccountsResponseDataItemAttributes {
9
9
  interface Raw {
10
10
  brand: ListCardsExternalAccountsResponseDataItemAttributesBrand.Raw;
11
11
  lastFour: string;
12
+ nickname: string;
12
13
  billingAddress?: ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.Raw | null;
13
14
  status: ListCardsExternalAccountsResponseDataItemAttributesStatus.Raw;
14
15
  createdAt: string;
@@ -6,6 +6,7 @@ import { ListCardsExternalAccountsResponseDataItemAttributesStatus } from "./Lis
6
6
  export const ListCardsExternalAccountsResponseDataItemAttributes = core.serialization.object({
7
7
  brand: ListCardsExternalAccountsResponseDataItemAttributesBrand,
8
8
  lastFour: core.serialization.string(),
9
+ nickname: core.serialization.string(),
9
10
  billingAddress: ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.nullable(),
10
11
  status: ListCardsExternalAccountsResponseDataItemAttributesStatus,
11
12
  createdAt: core.serialization.date(),
@@ -9,6 +9,7 @@ export declare namespace RemoveCardExternalAccountsResponseDataAttributes {
9
9
  interface Raw {
10
10
  brand: RemoveCardExternalAccountsResponseDataAttributesBrand.Raw;
11
11
  lastFour: string;
12
+ nickname: string;
12
13
  billingAddress?: RemoveCardExternalAccountsResponseDataAttributesBillingAddress.Raw | null;
13
14
  status: RemoveCardExternalAccountsResponseDataAttributesStatus.Raw;
14
15
  createdAt: string;
@@ -6,6 +6,7 @@ import { RemoveCardExternalAccountsResponseDataAttributesStatus } from "./Remove
6
6
  export const RemoveCardExternalAccountsResponseDataAttributes = core.serialization.object({
7
7
  brand: RemoveCardExternalAccountsResponseDataAttributesBrand,
8
8
  lastFour: core.serialization.string(),
9
+ nickname: core.serialization.string(),
9
10
  billingAddress: RemoveCardExternalAccountsResponseDataAttributesBillingAddress.nullable(),
10
11
  status: RemoveCardExternalAccountsResponseDataAttributesStatus,
11
12
  createdAt: core.serialization.date(),
@@ -3,5 +3,5 @@ import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  export declare const ListVoiceSessionsRequestStatus: core.serialization.Schema<serializers.ListVoiceSessionsRequestStatus.Raw, Natural.ListVoiceSessionsRequestStatus>;
5
5
  export declare namespace ListVoiceSessionsRequestStatus {
6
- type Raw = "awaitingCall" | "inProgress" | "ended" | "failed" | "canceled" | "expired";
6
+ type Raw = "awaitingCall" | "inProgress" | "ended" | "canceled" | "expired";
7
7
  }
@@ -1,3 +1,3 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
- export const ListVoiceSessionsRequestStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "failed", "canceled", "expired"]);
3
+ export const ListVoiceSessionsRequestStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "canceled", "expired"]);
@@ -3,5 +3,5 @@ import * as core from "../../core/index.mjs";
3
3
  import type * as serializers from "../index.mjs";
4
4
  export declare const VoiceSessionAttributesStatus: core.serialization.Schema<serializers.VoiceSessionAttributesStatus.Raw, Natural.VoiceSessionAttributesStatus>;
5
5
  export declare namespace VoiceSessionAttributesStatus {
6
- type Raw = "awaitingCall" | "inProgress" | "ended" | "failed" | "canceled" | "expired";
6
+ type Raw = "awaitingCall" | "inProgress" | "ended" | "canceled" | "expired";
7
7
  }
@@ -1,3 +1,3 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.mjs";
3
- export const VoiceSessionAttributesStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "failed", "canceled", "expired"]);
3
+ export const VoiceSessionAttributesStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "canceled", "expired"]);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.6.52";
1
+ export declare const SDK_VERSION = "1.6.54";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.6.52";
1
+ export const SDK_VERSION = "1.6.54";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalpay/sdk",
3
- "version": "1.6.52",
3
+ "version": "1.6.54",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -3405,7 +3405,7 @@ const response = page.response;
3405
3405
  <dl>
3406
3406
  <dd>
3407
3407
 
3408
- Create a payment intent with a hosted checkout link
3408
+ Create a payment intent to collect a payment
3409
3409
  </dd>
3410
3410
  </dl>
3411
3411
  </dd>
@@ -3627,7 +3627,7 @@ await client.paymentIntents.update({
3627
3627
  <dl>
3628
3628
  <dd>
3629
3629
 
3630
- Cancel an open payment intent
3630
+ Cancel a payment intent that isn't paid yet
3631
3631
  </dd>
3632
3632
  </dl>
3633
3633
  </dd>
@@ -7559,7 +7559,7 @@ await client.wallets.unfreeze({
7559
7559
  <dl>
7560
7560
  <dd>
7561
7561
 
7562
- List owned and customer-connected agents granted access to a wallet. Connected agents include customer connection limits and omit private metadata from the agent owner.
7562
+ List owned and customer-connected agents granted access to one of your wallets. Connected agents include customer connection limits and omit private metadata from the agent owner.
7563
7563
  </dd>
7564
7564
  </dl>
7565
7565
  </dd>