@payabli/sdk-node 0.0.138 → 0.0.141

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 (107) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/bill/types/BillOutData.d.ts +5 -1
  3. package/dist/cjs/api/resources/index.d.ts +1 -0
  4. package/dist/cjs/api/resources/index.js +1 -0
  5. package/dist/cjs/api/resources/moneyOut/client/Client.d.ts +5 -2
  6. package/dist/cjs/api/resources/moneyOut/client/Client.js +5 -2
  7. package/dist/cjs/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.ts +3 -0
  8. package/dist/cjs/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.ts +1 -0
  9. package/dist/cjs/api/resources/payoutSubscription/types/GetPayoutSubscriptionResponse.d.ts +7 -0
  10. package/dist/cjs/api/resources/payoutSubscription/types/PayoutSubscriptionQueryRecord.d.ts +7 -0
  11. package/dist/cjs/api/resources/payoutSubscription/types/PayoutSubscriptionQueryRecordPascal.d.ts +7 -0
  12. package/dist/cjs/api/resources/payoutSubscription/types/QueryPayoutSubscriptionResponse.d.ts +7 -0
  13. package/dist/cjs/api/resources/vendor/client/Client.d.ts +44 -1
  14. package/dist/cjs/api/resources/vendor/client/Client.js +88 -1
  15. package/dist/cjs/api/resources/vendor/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/vendor/index.js +1 -0
  17. package/dist/cjs/api/resources/vendor/types/VendorEnrichRequest.d.ts +20 -0
  18. package/dist/cjs/api/resources/{query/types/Entry.js → vendor/types/VendorEnrichRequest.js} +1 -3
  19. package/dist/cjs/api/resources/vendor/types/VendorEnrichResponse.d.ts +12 -0
  20. package/dist/cjs/api/resources/vendor/types/VendorEnrichResponse.js +3 -0
  21. package/dist/cjs/api/resources/vendor/types/VendorEnrichResponseData.d.ts +16 -0
  22. package/dist/cjs/api/resources/vendor/types/VendorEnrichResponseData.js +3 -0
  23. package/dist/cjs/api/resources/vendor/types/VendorEnrichmentData.d.ts +10 -0
  24. package/dist/cjs/api/resources/vendor/types/VendorEnrichmentData.js +3 -0
  25. package/dist/cjs/api/resources/vendor/types/VendorEnrichmentInvoiceScan.d.ts +35 -0
  26. package/dist/cjs/api/resources/vendor/types/VendorEnrichmentInvoiceScan.js +3 -0
  27. package/dist/cjs/api/resources/vendor/types/VendorEnrichmentWebSearch.d.ts +35 -0
  28. package/dist/cjs/api/resources/vendor/types/VendorEnrichmentWebSearch.js +3 -0
  29. package/dist/cjs/api/resources/vendor/types/index.d.ts +6 -0
  30. package/dist/cjs/api/resources/vendor/types/index.js +22 -0
  31. package/dist/cjs/api/types/AutoCapture.d.ts +4 -0
  32. package/dist/cjs/api/types/AutoCapture.js +3 -0
  33. package/dist/cjs/api/types/NotificationContent.d.ts +0 -1
  34. package/dist/cjs/api/types/NotificationContent.js +0 -1
  35. package/dist/cjs/api/types/NotificationStandardRequest.d.ts +0 -1
  36. package/dist/cjs/api/types/NotificationStandardRequest.js +0 -1
  37. package/dist/cjs/api/types/VendorData.d.ts +12 -0
  38. package/dist/cjs/api/types/VendorQueryRecord.d.ts +21 -0
  39. package/dist/cjs/api/types/index.d.ts +1 -0
  40. package/dist/cjs/api/types/index.js +1 -0
  41. package/dist/cjs/core/auth/BasicAuth.d.ts +2 -2
  42. package/dist/cjs/core/auth/BasicAuth.js +7 -1
  43. package/dist/cjs/core/fetcher/Fetcher.d.ts +2 -0
  44. package/dist/cjs/core/fetcher/Fetcher.js +4 -0
  45. package/dist/cjs/errors/PayabliError.d.ts +3 -1
  46. package/dist/cjs/errors/PayabliError.js +4 -1
  47. package/dist/cjs/errors/PayabliTimeoutError.d.ts +4 -1
  48. package/dist/cjs/errors/PayabliTimeoutError.js +4 -1
  49. package/dist/cjs/errors/handleNonStatusCodeError.js +4 -1
  50. package/dist/cjs/version.d.ts +1 -1
  51. package/dist/cjs/version.js +1 -1
  52. package/dist/esm/BaseClient.mjs +2 -2
  53. package/dist/esm/api/resources/bill/types/BillOutData.d.mts +5 -1
  54. package/dist/esm/api/resources/index.d.mts +1 -0
  55. package/dist/esm/api/resources/index.mjs +1 -0
  56. package/dist/esm/api/resources/moneyOut/client/Client.d.mts +5 -2
  57. package/dist/esm/api/resources/moneyOut/client/Client.mjs +5 -2
  58. package/dist/esm/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.mts +3 -0
  59. package/dist/esm/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.mts +1 -0
  60. package/dist/esm/api/resources/payoutSubscription/types/GetPayoutSubscriptionResponse.d.mts +7 -0
  61. package/dist/esm/api/resources/payoutSubscription/types/PayoutSubscriptionQueryRecord.d.mts +7 -0
  62. package/dist/esm/api/resources/payoutSubscription/types/PayoutSubscriptionQueryRecordPascal.d.mts +7 -0
  63. package/dist/esm/api/resources/payoutSubscription/types/QueryPayoutSubscriptionResponse.d.mts +7 -0
  64. package/dist/esm/api/resources/vendor/client/Client.d.mts +44 -1
  65. package/dist/esm/api/resources/vendor/client/Client.mjs +88 -1
  66. package/dist/esm/api/resources/vendor/index.d.mts +1 -0
  67. package/dist/esm/api/resources/vendor/index.mjs +1 -0
  68. package/dist/esm/api/resources/vendor/types/VendorEnrichRequest.d.mts +20 -0
  69. package/dist/esm/api/resources/vendor/types/VendorEnrichRequest.mjs +2 -0
  70. package/dist/esm/api/resources/vendor/types/VendorEnrichResponse.d.mts +12 -0
  71. package/dist/esm/api/resources/vendor/types/VendorEnrichResponse.mjs +2 -0
  72. package/dist/esm/api/resources/vendor/types/VendorEnrichResponseData.d.mts +16 -0
  73. package/dist/esm/api/resources/vendor/types/VendorEnrichResponseData.mjs +2 -0
  74. package/dist/esm/api/resources/vendor/types/VendorEnrichmentData.d.mts +10 -0
  75. package/dist/esm/api/resources/vendor/types/VendorEnrichmentData.mjs +2 -0
  76. package/dist/esm/api/resources/vendor/types/VendorEnrichmentInvoiceScan.d.mts +35 -0
  77. package/dist/esm/api/resources/vendor/types/VendorEnrichmentInvoiceScan.mjs +2 -0
  78. package/dist/esm/api/resources/vendor/types/VendorEnrichmentWebSearch.d.mts +35 -0
  79. package/dist/esm/api/resources/vendor/types/VendorEnrichmentWebSearch.mjs +2 -0
  80. package/dist/esm/api/resources/vendor/types/index.d.mts +6 -0
  81. package/dist/esm/api/resources/vendor/types/index.mjs +6 -0
  82. package/dist/esm/api/types/AutoCapture.d.mts +4 -0
  83. package/dist/esm/api/types/AutoCapture.mjs +2 -0
  84. package/dist/esm/api/types/NotificationContent.d.mts +0 -1
  85. package/dist/esm/api/types/NotificationContent.mjs +0 -1
  86. package/dist/esm/api/types/NotificationStandardRequest.d.mts +0 -1
  87. package/dist/esm/api/types/NotificationStandardRequest.mjs +0 -1
  88. package/dist/esm/api/types/VendorData.d.mts +12 -0
  89. package/dist/esm/api/types/VendorQueryRecord.d.mts +21 -0
  90. package/dist/esm/api/types/index.d.mts +1 -0
  91. package/dist/esm/api/types/index.mjs +1 -0
  92. package/dist/esm/core/auth/BasicAuth.d.mts +2 -2
  93. package/dist/esm/core/auth/BasicAuth.mjs +7 -1
  94. package/dist/esm/core/fetcher/Fetcher.d.mts +2 -0
  95. package/dist/esm/core/fetcher/Fetcher.mjs +4 -0
  96. package/dist/esm/errors/PayabliError.d.mts +3 -1
  97. package/dist/esm/errors/PayabliError.mjs +4 -1
  98. package/dist/esm/errors/PayabliTimeoutError.d.mts +4 -1
  99. package/dist/esm/errors/PayabliTimeoutError.mjs +4 -1
  100. package/dist/esm/errors/handleNonStatusCodeError.mjs +4 -1
  101. package/dist/esm/version.d.mts +1 -1
  102. package/dist/esm/version.mjs +1 -1
  103. package/package.json +2 -2
  104. package/reference.md +85 -3
  105. package/dist/cjs/api/resources/query/types/Entry.d.ts +0 -7
  106. package/dist/esm/api/resources/query/types/Entry.d.mts +0 -7
  107. package/dist/esm/api/resources/query/types/Entry.mjs +0 -7
@@ -0,0 +1,20 @@
1
+ import type * as Payabli from "../../../index.mjs";
2
+ /**
3
+ * Request body for the vendor enrichment endpoint.
4
+ */
5
+ export interface VendorEnrichRequest {
6
+ /** ID of the vendor to enrich. Must be active and belong to the given entrypoint. */
7
+ vendorId: number;
8
+ /** Enrichment stages to run. Valid values are `invoice_scan` and `web_search`. Stages run in order: invoice scan first, then web search. If the vendor becomes payout-ready after invoice scan, web search is skipped. */
9
+ scope?: string[] | undefined;
10
+ /** When `true` (the default), extracted data is automatically written to the vendor record. Only empty fields are populated, existing values are never overwritten. When `false`, the vendor record isn't modified. In both cases, `enrichmentData` in the response contains the extracted results. Use `false` for UI flows where users review and confirm changes before applying them with the update vendor endpoint. */
11
+ applyEnrichmentData?: boolean | undefined;
12
+ /** When `true`, triggers an AI outreach call if enrichment stages return insufficient payment acceptance info. This feature is currently in development. */
13
+ scheduleCallIfNeeded?: boolean | undefined;
14
+ /** PDF invoice file, Base64-encoded. Required when `scope` includes `invoice_scan`. */
15
+ invoiceFile?: Payabli.FileContent | undefined;
16
+ /** Bill ID to associate with this enrichment request. */
17
+ billId?: number | undefined;
18
+ /** Payment method to apply if enrichment can't find payment details. Values are `check`, `ach`, or `card`. */
19
+ fallbackMethod?: string | undefined;
20
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,12 @@
1
+ import type * as Payabli from "../../../index.mjs";
2
+ /**
3
+ * Response from the vendor enrichment endpoint.
4
+ */
5
+ export interface VendorEnrichResponse {
6
+ responseCode?: Payabli.Responsecode | undefined;
7
+ pageIdentifier?: Payabli.PageIdentifier | undefined;
8
+ roomId?: Payabli.RoomIdNotInUse | undefined;
9
+ isSuccess?: Payabli.IsSuccess | undefined;
10
+ responseText: Payabli.ResponseText;
11
+ responseData?: Payabli.VendorEnrichResponseData | undefined;
12
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,16 @@
1
+ import type * as Payabli from "../../../index.mjs";
2
+ /**
3
+ * Enrichment result details.
4
+ */
5
+ export interface VendorEnrichResponseData {
6
+ /** Unique identifier for this enrichment run. Format: `enrich-{vendorId}-{8-char hex}`. */
7
+ enrichmentId?: string | undefined;
8
+ /** Final enrichment status. Values are `completed` (vendor is payout-ready), `completed_from_network` (vendor was already enriched in the Payabli vendor network, no AI processing needed), or `insufficient` (all stages ran but the vendor still lacks sufficient payment data). */
9
+ status?: string | undefined;
10
+ /** Stages that ran successfully. A stage is only listed here if it returned a successful response. Failed stages are excluded. */
11
+ stagesTriggered?: string[] | undefined;
12
+ /** `true` if the vendor now has sufficient payment data to process a payout (ACH, card email, or check remit address). */
13
+ vendorPayoutReady?: boolean | undefined;
14
+ /** Raw extraction results from the enrichment stages that ran. */
15
+ enrichmentData?: Payabli.VendorEnrichmentData | undefined;
16
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ import type * as Payabli from "../../../index.mjs";
2
+ /**
3
+ * Container for enrichment stage results.
4
+ */
5
+ export interface VendorEnrichmentData {
6
+ /** Results from the invoice scan stage, if it ran. */
7
+ invoiceScan?: Payabli.VendorEnrichmentInvoiceScan | undefined;
8
+ /** Results from the web search stage, if it ran. */
9
+ webSearch?: Payabli.VendorEnrichmentWebSearch | undefined;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Vendor contact information and payment acceptance info extracted from an invoice.
3
+ */
4
+ export interface VendorEnrichmentInvoiceScan {
5
+ /** Vendor name extracted from the invoice. */
6
+ vendorName?: string | undefined;
7
+ /** Street address. */
8
+ street?: string | undefined;
9
+ /** City. */
10
+ city?: string | undefined;
11
+ /** State (two-letter abbreviation). */
12
+ state?: string | undefined;
13
+ /** ZIP code. */
14
+ zipCode?: string | undefined;
15
+ /** Country code. */
16
+ country?: string | undefined;
17
+ /** Phone number. Format isn't guaranteed and is extracted as-is from the invoice. */
18
+ phone?: string | undefined;
19
+ /** Email address. */
20
+ email?: string | undefined;
21
+ /** Payment portal URL, if found on the invoice. */
22
+ paymentLink?: string | undefined;
23
+ /** Whether the vendor accepts card payments. Values are `yes`, `no`, or `unable to determine`. */
24
+ cardAccepted?: string | undefined;
25
+ /** Whether the vendor accepts ACH payments. Values are `yes`, `no`, or `unable to determine`. */
26
+ achAccepted?: string | undefined;
27
+ /** Whether the vendor accepts check payments. Values are `yes`, `no`, or `unable to determine`. */
28
+ checkAccepted?: string | undefined;
29
+ /** Invoice number extracted from the document. */
30
+ invoiceNumber?: string | undefined;
31
+ /** Invoice amount due in USD. */
32
+ amountDue?: number | undefined;
33
+ /** Payment due date. Format is `YYYY-MM-DD`. */
34
+ dueDate?: string | undefined;
35
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Vendor contact information and payment acceptance info found through web search.
3
+ */
4
+ export interface VendorEnrichmentWebSearch {
5
+ /** Phone number found through web search. Format isn't guaranteed. */
6
+ phone?: string | undefined;
7
+ /** Phone classification. Values are `main`, `billing`, or `customer_service`. */
8
+ phoneType?: string | undefined;
9
+ /** Email address. */
10
+ email?: string | undefined;
11
+ /** Email classification. Values are `billing`, `general`, or `customer_service`. */
12
+ emailType?: string | undefined;
13
+ /** Street address. */
14
+ street?: string | undefined;
15
+ /** City. */
16
+ city?: string | undefined;
17
+ /** State (two-letter abbreviation). */
18
+ state?: string | undefined;
19
+ /** ZIP code. */
20
+ zipCode?: string | undefined;
21
+ /** Country code. */
22
+ country?: string | undefined;
23
+ /** Address classification. Values are `business`, `headquarters`, or `mailing`. */
24
+ addressType?: string | undefined;
25
+ /** Payment portal URL. */
26
+ paymentLink?: string | undefined;
27
+ /** Link classification. Values are `payment_portal`, `billing_page`, or `general_website`. */
28
+ paymentLinkType?: string | undefined;
29
+ /** Whether the vendor accepts card payments. Values are `yes`, `no`, or `unable to determine`. */
30
+ cardAccepted?: string | undefined;
31
+ /** Whether the vendor accepts ACH payments. Values are `yes`, `no`, or `unable to determine`. */
32
+ achAccepted?: string | undefined;
33
+ /** Whether the vendor accepts check payments. Values are `yes`, `no`, or `unable to determine`. */
34
+ checkAccepted?: string | undefined;
35
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from "./VendorEnrichmentData.mjs";
2
+ export * from "./VendorEnrichmentInvoiceScan.mjs";
3
+ export * from "./VendorEnrichmentWebSearch.mjs";
4
+ export * from "./VendorEnrichRequest.mjs";
5
+ export * from "./VendorEnrichResponse.mjs";
6
+ export * from "./VendorEnrichResponseData.mjs";
@@ -0,0 +1,6 @@
1
+ export * from "./VendorEnrichmentData.mjs";
2
+ export * from "./VendorEnrichmentInvoiceScan.mjs";
3
+ export * from "./VendorEnrichmentWebSearch.mjs";
4
+ export * from "./VendorEnrichRequest.mjs";
5
+ export * from "./VendorEnrichResponse.mjs";
6
+ export * from "./VendorEnrichResponseData.mjs";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * When `true`, the transaction is automatically captured after a successful authorization. When `false`, you must manually capture the transaction after a successful authorization. Defaults to `false`. See [Manage payouts with the API](/guides/pay-out-developer-payouts-manage) for more information.
3
+ */
4
+ export type AutoCapture = boolean;
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -49,7 +49,6 @@ export declare namespace NotificationContent {
49
49
  readonly ApprovedApplication: "ApprovedApplication";
50
50
  readonly FailedBoardingApplication: "FailedBoardingApplication";
51
51
  readonly SubmittedApplication: "SubmittedApplication";
52
- readonly UnderWritingApplication: "UnderWritingApplication";
53
52
  readonly ActivatedMerchant: "ActivatedMerchant";
54
53
  readonly ReceivedChargeBack: "ReceivedChargeBack";
55
54
  readonly ChargebackUpdated: "ChargebackUpdated";
@@ -32,7 +32,6 @@ export var NotificationContent;
32
32
  ApprovedApplication: "ApprovedApplication",
33
33
  FailedBoardingApplication: "FailedBoardingApplication",
34
34
  SubmittedApplication: "SubmittedApplication",
35
- UnderWritingApplication: "UnderWritingApplication",
36
35
  ActivatedMerchant: "ActivatedMerchant",
37
36
  ReceivedChargeBack: "ReceivedChargeBack",
38
37
  ChargebackUpdated: "ChargebackUpdated",
@@ -108,7 +108,6 @@ export declare namespace NotificationStandardRequest {
108
108
  readonly ApprovedApplication: "ApprovedApplication";
109
109
  readonly FailedBoardingApplication: "FailedBoardingApplication";
110
110
  readonly SubmittedApplication: "SubmittedApplication";
111
- readonly UnderWritingApplication: "UnderWritingApplication";
112
111
  readonly ActivatedMerchant: "ActivatedMerchant";
113
112
  readonly ReceivedChargeBack: "ReceivedChargeBack";
114
113
  readonly ChargebackUpdated: "ChargebackUpdated";
@@ -80,7 +80,6 @@ export var NotificationStandardRequest;
80
80
  ApprovedApplication: "ApprovedApplication",
81
81
  FailedBoardingApplication: "FailedBoardingApplication",
82
82
  SubmittedApplication: "SubmittedApplication",
83
- UnderWritingApplication: "UnderWritingApplication",
84
83
  ActivatedMerchant: "ActivatedMerchant",
85
84
  ReceivedChargeBack: "ReceivedChargeBack",
86
85
  ChargebackUpdated: "ChargebackUpdated",
@@ -45,4 +45,16 @@ export interface VendorData {
45
45
  vendorStatus?: Payabli.Vendorstatus | undefined;
46
46
  /** Vendor's ZIP or postal code. Required if any address field is provided. For US addresses, use five digits (`12345`) or ZIP+4 format (`12345-6789`). */
47
47
  zip?: string | undefined;
48
+ /** Identifier for the vendor's default stored payment method. */
49
+ defaultMethodId?: string | undefined;
50
+ /**
51
+ * PDF invoice attachment for AI-powered vendor enrichment.
52
+ * When this feature is enabled and you include an attachment, the invoice is scanned and extracted vendor information is merged into the request.
53
+ * Fields in the request body take precedence over extracted data.
54
+ * If the scan fails, vendor creation proceeds with the original request data.
55
+ *
56
+ * See the [vendor enrichment guide](/guides/pay-out-vendor-enrichment-overview) for details.
57
+ * Contact Payabli to enable this feature.
58
+ */
59
+ attachment?: Payabli.FileContent | undefined;
48
60
  }
@@ -77,6 +77,13 @@ import type * as Payabli from "../index.mjs";
77
77
  * customField2: "",
78
78
  * customerVendorAccount: "123-456",
79
79
  * InternalReferenceId: 1000000,
80
+ * PaymentPortalUrl: "https://greenfield-landscaping.com/pay",
81
+ * CardAccepted: "yes",
82
+ * AchAccepted: "unable to determine",
83
+ * EnrichmentStatus: "fully_enriched",
84
+ * EnrichedBy: "web_search",
85
+ * EnrichedAt: "2026-03-05T14:22:10Z",
86
+ * EnrichmentId: "enrich-3890-a1b2c3d4",
80
87
  * externalPaypointID: "Paypoint-100",
81
88
  * StoredMethods: []
82
89
  * }
@@ -126,4 +133,18 @@ export interface VendorQueryRecord {
126
133
  VendorNumber?: Payabli.VendorNumber | undefined;
127
134
  VendorStatus?: Payabli.Vendorstatus | undefined;
128
135
  Zip?: Payabli.Zip | undefined;
136
+ /** URL for the vendor's online payment portal, if known. Populated by the vendor enrichment pipeline. */
137
+ PaymentPortalUrl?: string | undefined;
138
+ /** Whether the vendor accepts card payments. Values are `yes`, `no`, or `unable to determine`. Populated by the vendor enrichment pipeline. */
139
+ CardAccepted?: string | undefined;
140
+ /** Whether the vendor accepts ACH payments. Values are `yes`, `no`, or `unable to determine`. Populated by the vendor enrichment pipeline. */
141
+ AchAccepted?: string | undefined;
142
+ /** Current enrichment state of the vendor. Values are `not_enriched`, `partially_enriched`, `fully_enriched`, or `fallback_applied`. */
143
+ EnrichmentStatus?: string | undefined;
144
+ /** Which enrichment method resolved the vendor's payment acceptance info. Values are `invoice_scan`, `web_search`, `vendor_network`, or `manual`. */
145
+ EnrichedBy?: string | undefined;
146
+ /** When the vendor was last enriched (UTC). */
147
+ EnrichedAt?: string | undefined;
148
+ /** Identifier for the enrichment request that last updated this vendor. */
149
+ EnrichmentId?: string | undefined;
129
150
  }
@@ -55,6 +55,7 @@ export * from "./AssociatedVendor.mjs";
55
55
  export * from "./Attachments.mjs";
56
56
  export * from "./AttestationDate.mjs";
57
57
  export * from "./Authcode.mjs";
58
+ export * from "./AutoCapture.mjs";
58
59
  export * from "./AutoElement.mjs";
59
60
  export * from "./Avgmonthly.mjs";
60
61
  export * from "./Avgticketamt.mjs";
@@ -55,6 +55,7 @@ export * from "./AssociatedVendor.mjs";
55
55
  export * from "./Attachments.mjs";
56
56
  export * from "./AttestationDate.mjs";
57
57
  export * from "./Authcode.mjs";
58
+ export * from "./AutoCapture.mjs";
58
59
  export * from "./AutoElement.mjs";
59
60
  export * from "./Avgmonthly.mjs";
60
61
  export * from "./Avgticketamt.mjs";
@@ -1,6 +1,6 @@
1
1
  export interface BasicAuth {
2
- username: string;
3
- password: string;
2
+ username?: string;
3
+ password?: string;
4
4
  }
5
5
  export declare const BasicAuth: {
6
6
  toAuthorizationHeader: (basicAuth: BasicAuth | undefined) => string | undefined;
@@ -2,10 +2,16 @@ import { base64Decode, base64Encode } from "../base64.mjs";
2
2
  const BASIC_AUTH_HEADER_PREFIX = /^Basic /i;
3
3
  export const BasicAuth = {
4
4
  toAuthorizationHeader: (basicAuth) => {
5
+ var _a, _b;
5
6
  if (basicAuth == null) {
6
7
  return undefined;
7
8
  }
8
- const token = base64Encode(`${basicAuth.username}:${basicAuth.password}`);
9
+ const username = (_a = basicAuth.username) !== null && _a !== void 0 ? _a : "";
10
+ const password = (_b = basicAuth.password) !== null && _b !== void 0 ? _b : "";
11
+ if (username === "" && password === "") {
12
+ return undefined;
13
+ }
14
+ const token = base64Encode(`${username}:${password}`);
9
15
  return `Basic ${token}`;
10
16
  },
11
17
  fromAuthorizationHeader: (header) => {
@@ -38,10 +38,12 @@ export declare namespace Fetcher {
38
38
  }
39
39
  interface TimeoutError {
40
40
  reason: "timeout";
41
+ cause?: unknown;
41
42
  }
42
43
  interface UnknownError {
43
44
  reason: "unknown";
44
45
  errorMessage: string;
46
+ cause?: unknown;
45
47
  }
46
48
  }
47
49
  export declare function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIResponse<R, Fetcher.Error>>;
@@ -257,6 +257,7 @@ export function fetcherImpl(args) {
257
257
  error: {
258
258
  reason: "unknown",
259
259
  errorMessage: "The user aborted a request",
260
+ cause: error,
260
261
  },
261
262
  rawResponse: abortRawResponse,
262
263
  };
@@ -274,6 +275,7 @@ export function fetcherImpl(args) {
274
275
  ok: false,
275
276
  error: {
276
277
  reason: "timeout",
278
+ cause: error,
277
279
  },
278
280
  rawResponse: abortRawResponse,
279
281
  };
@@ -292,6 +294,7 @@ export function fetcherImpl(args) {
292
294
  error: {
293
295
  reason: "unknown",
294
296
  errorMessage: error.message,
297
+ cause: error,
295
298
  },
296
299
  rawResponse: unknownRawResponse,
297
300
  };
@@ -309,6 +312,7 @@ export function fetcherImpl(args) {
309
312
  error: {
310
313
  reason: "unknown",
311
314
  errorMessage: toJson(error),
315
+ cause: error,
312
316
  },
313
317
  rawResponse: unknownRawResponse,
314
318
  };
@@ -3,10 +3,12 @@ export declare class PayabliError extends Error {
3
3
  readonly statusCode?: number;
4
4
  readonly body?: unknown;
5
5
  readonly rawResponse?: core.RawResponse;
6
- constructor({ message, statusCode, body, rawResponse, }: {
6
+ readonly cause?: unknown;
7
+ constructor({ message, statusCode, body, rawResponse, cause, }: {
7
8
  message?: string;
8
9
  statusCode?: number;
9
10
  body?: unknown;
10
11
  rawResponse?: core.RawResponse;
12
+ cause?: unknown;
11
13
  });
12
14
  }
@@ -1,7 +1,7 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import { toJson } from "../core/json.mjs";
3
3
  export class PayabliError extends Error {
4
- constructor({ message, statusCode, body, rawResponse, }) {
4
+ constructor({ message, statusCode, body, rawResponse, cause, }) {
5
5
  super(buildMessage({ message, statusCode, body }));
6
6
  Object.setPrototypeOf(this, new.target.prototype);
7
7
  if (Error.captureStackTrace) {
@@ -11,6 +11,9 @@ export class PayabliError extends Error {
11
11
  this.statusCode = statusCode;
12
12
  this.body = body;
13
13
  this.rawResponse = rawResponse;
14
+ if (cause != null) {
15
+ this.cause = cause;
16
+ }
14
17
  }
15
18
  }
16
19
  function buildMessage({ message, statusCode, body, }) {
@@ -1,3 +1,6 @@
1
1
  export declare class PayabliTimeoutError extends Error {
2
- constructor(message: string);
2
+ readonly cause?: unknown;
3
+ constructor(message: string, opts?: {
4
+ cause?: unknown;
5
+ });
3
6
  }
@@ -1,11 +1,14 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  export class PayabliTimeoutError extends Error {
3
- constructor(message) {
3
+ constructor(message, opts) {
4
4
  super(message);
5
5
  Object.setPrototypeOf(this, new.target.prototype);
6
6
  if (Error.captureStackTrace) {
7
7
  Error.captureStackTrace(this, this.constructor);
8
8
  }
9
9
  this.name = this.constructor.name;
10
+ if ((opts === null || opts === void 0 ? void 0 : opts.cause) != null) {
11
+ this.cause = opts.cause;
12
+ }
10
13
  }
11
14
  }
@@ -14,11 +14,14 @@ export function handleNonStatusCodeError(error, rawResponse, method, path) {
14
14
  rawResponse: rawResponse,
15
15
  });
16
16
  case "timeout":
17
- throw new errors.PayabliTimeoutError(`Timeout exceeded when calling ${method} ${path}.`);
17
+ throw new errors.PayabliTimeoutError(`Timeout exceeded when calling ${method} ${path}.`, {
18
+ cause: error.cause,
19
+ });
18
20
  case "unknown":
19
21
  throw new errors.PayabliError({
20
22
  message: error.errorMessage,
21
23
  rawResponse: rawResponse,
24
+ cause: error.cause,
22
25
  });
23
26
  default:
24
27
  throw new errors.PayabliError({
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.138";
1
+ export declare const SDK_VERSION = "0.0.141";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.0.138";
1
+ export const SDK_VERSION = "0.0.141";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payabli/sdk-node",
3
- "version": "0.0.138",
3
+ "version": "0.0.141",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -382,7 +382,7 @@
382
382
  "msw": "2.11.2",
383
383
  "@types/node": "^18.19.70",
384
384
  "typescript": "~5.9.3",
385
- "@biomejs/biome": "2.4.9"
385
+ "@biomejs/biome": "2.4.10"
386
386
  },
387
387
  "browser": {
388
388
  "fs": false,
package/reference.md CHANGED
@@ -8422,7 +8422,7 @@ await client.moneyIn.voidv2("10-3ffa27df-b171-44e0-b251-e95fbfc7a723");
8422
8422
  <dl>
8423
8423
  <dd>
8424
8424
 
8425
- Authorizes transaction for payout. Authorized transactions aren't flagged for settlement until captured. Use `referenceId` returned in the response to capture the transaction.
8425
+ Authorizes transaction for payout. If you don't pass the `autoCapture` field with a value of `true`, authorized transactions aren't flagged for settlement until captured. Use `referenceId` returned in the response to capture the transaction.
8426
8426
  </dd>
8427
8427
  </dl>
8428
8428
  </dd>
@@ -8440,6 +8440,7 @@ Authorizes transaction for payout. Authorized transactions aren't flagged for se
8440
8440
  await client.moneyOut.authorizeOut({
8441
8441
  body: {
8442
8442
  entryPoint: "48acde49",
8443
+ autoCapture: true,
8443
8444
  invoiceData: [{
8444
8445
  billId: 54323
8445
8446
  }],
@@ -8757,7 +8758,7 @@ await client.moneyOut.captureAllOut({
8757
8758
  <dl>
8758
8759
  <dd>
8759
8760
 
8760
- Captures a single authorized payout transaction by ID.
8761
+ Captures a single authorized payout transaction by ID. If the transaction was authorized with `autoCapture` set to `true`, you don't need to call this endpoint to capture the transaction for processing.
8761
8762
  </dd>
8762
8763
  </dl>
8763
8764
  </dd>
@@ -18141,7 +18142,7 @@ await client.vendor.editVendor(1, {
18141
18142
  <dl>
18142
18143
  <dd>
18143
18144
 
18144
- Retrieves a vendor's details.
18145
+ Retrieves a vendor's details, including enrichment status and payment acceptance info when available.
18145
18146
  </dd>
18146
18147
  </dl>
18147
18148
  </dd>
@@ -18188,6 +18189,87 @@ await client.vendor.getVendor(1);
18188
18189
  </dl>
18189
18190
 
18190
18191
 
18192
+ </dd>
18193
+ </dl>
18194
+ </details>
18195
+
18196
+ <details><summary><code>client.vendor.<a href="/src/api/resources/vendor/client/Client.ts">enrichVendor</a>(entry, { ...params }) -> Payabli.VendorEnrichResponse</code></summary>
18197
+ <dl>
18198
+ <dd>
18199
+
18200
+ #### 📝 Description
18201
+
18202
+ <dl>
18203
+ <dd>
18204
+
18205
+ <dl>
18206
+ <dd>
18207
+
18208
+ Triggers AI-powered vendor enrichment for an existing vendor. Runs one or more enrichment stages (invoice scan, web search) based on the `scope` parameter. Can automatically apply extracted payment acceptance info and vendor contact information to the vendor record, or return raw results for manual review. Contact Payabli to enable this feature.
18209
+ </dd>
18210
+ </dl>
18211
+ </dd>
18212
+ </dl>
18213
+
18214
+ #### 🔌 Usage
18215
+
18216
+ <dl>
18217
+ <dd>
18218
+
18219
+ <dl>
18220
+ <dd>
18221
+
18222
+ ```typescript
18223
+ await client.vendor.enrichVendor("8cfec329267", {
18224
+ vendorId: 3890,
18225
+ scope: ["invoice_scan"],
18226
+ applyEnrichmentData: false,
18227
+ fallbackMethod: "check",
18228
+ invoiceFile: {
18229
+ ftype: "pdf",
18230
+ filename: "invoice-2026-001.pdf",
18231
+ fContent: "<base64-encoded-pdf>"
18232
+ }
18233
+ });
18234
+
18235
+ ```
18236
+ </dd>
18237
+ </dl>
18238
+ </dd>
18239
+ </dl>
18240
+
18241
+ #### ⚙️ Parameters
18242
+
18243
+ <dl>
18244
+ <dd>
18245
+
18246
+ <dl>
18247
+ <dd>
18248
+
18249
+ **entry:** `string` — Entrypoint identifier.
18250
+
18251
+ </dd>
18252
+ </dl>
18253
+
18254
+ <dl>
18255
+ <dd>
18256
+
18257
+ **request:** `Payabli.VendorEnrichRequest`
18258
+
18259
+ </dd>
18260
+ </dl>
18261
+
18262
+ <dl>
18263
+ <dd>
18264
+
18265
+ **requestOptions:** `VendorClient.RequestOptions`
18266
+
18267
+ </dd>
18268
+ </dl>
18269
+ </dd>
18270
+ </dl>
18271
+
18272
+
18191
18273
  </dd>
18192
18274
  </dl>
18193
18275
  </details>
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
6
- */
7
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
6
- */
7
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
6
- */
7
- export {};