@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
@@ -83,7 +83,6 @@ var NotificationStandardRequest;
83
83
  ApprovedApplication: "ApprovedApplication",
84
84
  FailedBoardingApplication: "FailedBoardingApplication",
85
85
  SubmittedApplication: "SubmittedApplication",
86
- UnderWritingApplication: "UnderWritingApplication",
87
86
  ActivatedMerchant: "ActivatedMerchant",
88
87
  ReceivedChargeBack: "ReceivedChargeBack",
89
88
  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.js";
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.js";
55
55
  export * from "./Attachments.js";
56
56
  export * from "./AttestationDate.js";
57
57
  export * from "./Authcode.js";
58
+ export * from "./AutoCapture.js";
58
59
  export * from "./AutoElement.js";
59
60
  export * from "./Avgmonthly.js";
60
61
  export * from "./Avgticketamt.js";
@@ -71,6 +71,7 @@ __exportStar(require("./AssociatedVendor.js"), exports);
71
71
  __exportStar(require("./Attachments.js"), exports);
72
72
  __exportStar(require("./AttestationDate.js"), exports);
73
73
  __exportStar(require("./Authcode.js"), exports);
74
+ __exportStar(require("./AutoCapture.js"), exports);
74
75
  __exportStar(require("./AutoElement.js"), exports);
75
76
  __exportStar(require("./Avgmonthly.js"), exports);
76
77
  __exportStar(require("./Avgticketamt.js"), exports);
@@ -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;
@@ -5,10 +5,16 @@ const base64_js_1 = require("../base64.js");
5
5
  const BASIC_AUTH_HEADER_PREFIX = /^Basic /i;
6
6
  exports.BasicAuth = {
7
7
  toAuthorizationHeader: (basicAuth) => {
8
+ var _a, _b;
8
9
  if (basicAuth == null) {
9
10
  return undefined;
10
11
  }
11
- const token = (0, base64_js_1.base64Encode)(`${basicAuth.username}:${basicAuth.password}`);
12
+ const username = (_a = basicAuth.username) !== null && _a !== void 0 ? _a : "";
13
+ const password = (_b = basicAuth.password) !== null && _b !== void 0 ? _b : "";
14
+ if (username === "" && password === "") {
15
+ return undefined;
16
+ }
17
+ const token = (0, base64_js_1.base64Encode)(`${username}:${password}`);
12
18
  return `Basic ${token}`;
13
19
  },
14
20
  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>>;
@@ -261,6 +261,7 @@ function fetcherImpl(args) {
261
261
  error: {
262
262
  reason: "unknown",
263
263
  errorMessage: "The user aborted a request",
264
+ cause: error,
264
265
  },
265
266
  rawResponse: RawResponse_js_1.abortRawResponse,
266
267
  };
@@ -278,6 +279,7 @@ function fetcherImpl(args) {
278
279
  ok: false,
279
280
  error: {
280
281
  reason: "timeout",
282
+ cause: error,
281
283
  },
282
284
  rawResponse: RawResponse_js_1.abortRawResponse,
283
285
  };
@@ -296,6 +298,7 @@ function fetcherImpl(args) {
296
298
  error: {
297
299
  reason: "unknown",
298
300
  errorMessage: error.message,
301
+ cause: error,
299
302
  },
300
303
  rawResponse: RawResponse_js_1.unknownRawResponse,
301
304
  };
@@ -313,6 +316,7 @@ function fetcherImpl(args) {
313
316
  error: {
314
317
  reason: "unknown",
315
318
  errorMessage: (0, json_js_1.toJson)(error),
319
+ cause: error,
316
320
  },
317
321
  rawResponse: RawResponse_js_1.unknownRawResponse,
318
322
  };
@@ -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
  }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.PayabliError = void 0;
5
5
  const json_js_1 = require("../core/json.js");
6
6
  class PayabliError extends Error {
7
- constructor({ message, statusCode, body, rawResponse, }) {
7
+ constructor({ message, statusCode, body, rawResponse, cause, }) {
8
8
  super(buildMessage({ message, statusCode, body }));
9
9
  Object.setPrototypeOf(this, new.target.prototype);
10
10
  if (Error.captureStackTrace) {
@@ -14,6 +14,9 @@ class PayabliError extends Error {
14
14
  this.statusCode = statusCode;
15
15
  this.body = body;
16
16
  this.rawResponse = rawResponse;
17
+ if (cause != null) {
18
+ this.cause = cause;
19
+ }
17
20
  }
18
21
  }
19
22
  exports.PayabliError = PayabliError;
@@ -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
  }
@@ -3,13 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.PayabliTimeoutError = void 0;
5
5
  class PayabliTimeoutError extends Error {
6
- constructor(message) {
6
+ constructor(message, opts) {
7
7
  super(message);
8
8
  Object.setPrototypeOf(this, new.target.prototype);
9
9
  if (Error.captureStackTrace) {
10
10
  Error.captureStackTrace(this, this.constructor);
11
11
  }
12
12
  this.name = this.constructor.name;
13
+ if ((opts === null || opts === void 0 ? void 0 : opts.cause) != null) {
14
+ this.cause = opts.cause;
15
+ }
13
16
  }
14
17
  }
15
18
  exports.PayabliTimeoutError = PayabliTimeoutError;
@@ -50,11 +50,14 @@ function handleNonStatusCodeError(error, rawResponse, method, path) {
50
50
  rawResponse: rawResponse,
51
51
  });
52
52
  case "timeout":
53
- throw new errors.PayabliTimeoutError(`Timeout exceeded when calling ${method} ${path}.`);
53
+ throw new errors.PayabliTimeoutError(`Timeout exceeded when calling ${method} ${path}.`, {
54
+ cause: error.cause,
55
+ });
54
56
  case "unknown":
55
57
  throw new errors.PayabliError({
56
58
  message: error.errorMessage,
57
59
  rawResponse: rawResponse,
60
+ cause: error.cause,
58
61
  });
59
62
  default:
60
63
  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,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 = "0.0.138";
4
+ exports.SDK_VERSION = "0.0.141";
@@ -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": "@payabli/sdk-node",
9
- "X-Fern-SDK-Version": "0.0.138",
10
- "User-Agent": "@payabli/sdk-node/0.0.138",
9
+ "X-Fern-SDK-Version": "0.0.141",
10
+ "User-Agent": "@payabli/sdk-node/0.0.141",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -3,7 +3,11 @@ export interface BillOutData {
3
3
  accountingField1?: Payabli.AccountingField | undefined;
4
4
  accountingField2?: Payabli.AccountingField | undefined;
5
5
  additionalData?: Payabli.AdditionalDataString | undefined;
6
- /** An array of bill images. Attachments aren't required, but we strongly recommend including them. Including a bill image can make payouts smoother and prevent delays. You can include either the Base64-encoded file content, or you can include an fURL to a public file. The maximum file size for image uploads is 30 MB. */
6
+ /**
7
+ * An array of bill images. Attachments aren't required, but we strongly recommend including them. Including a bill image can make payouts smoother and prevent delays. You can include either the Base64-encoded file content, or you can include an fURL to a public file. The maximum file size for image uploads is 30 MB.
8
+ *
9
+ * When vendor enrichment is enabled and the first attachment is a PDF, the invoice is scanned and extracted vendor contact information and bill details (invoice number, amount due, due date) are merged into the request. Fields in the request body take precedence over extracted data. If the scan fails, bill creation proceeds with the original request data. See the [vendor enrichment guide](/guides/pay-out-vendor-enrichment-overview) for details. Contact Payabli to enable this feature.
10
+ */
7
11
  attachments?: Payabli.Attachments | undefined;
8
12
  /** Date of bill. Accepted formats: YYYY-MM-DD, MM/DD/YYYY. */
9
13
  billDate?: string | undefined;
@@ -83,5 +83,6 @@ export * from "./v2MoneyInTypes/errors/index.mjs";
83
83
  export * as v2MoneyInTypes from "./v2MoneyInTypes/index.mjs";
84
84
  export * from "./v2MoneyInTypes/types/index.mjs";
85
85
  export * as vendor from "./vendor/index.mjs";
86
+ export * from "./vendor/types/index.mjs";
86
87
  export * from "./wallet/client/requests/index.mjs";
87
88
  export * as wallet from "./wallet/index.mjs";
@@ -83,5 +83,6 @@ export * from "./v2MoneyInTypes/errors/index.mjs";
83
83
  export * as v2MoneyInTypes from "./v2MoneyInTypes/index.mjs";
84
84
  export * from "./v2MoneyInTypes/types/index.mjs";
85
85
  export * as vendor from "./vendor/index.mjs";
86
+ export * from "./vendor/types/index.mjs";
86
87
  export * from "./wallet/client/requests/index.mjs";
87
88
  export * as wallet from "./wallet/index.mjs";
@@ -11,7 +11,7 @@ export declare class MoneyOutClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<MoneyOutClient.Options>;
12
12
  constructor(options?: MoneyOutClient.Options);
13
13
  /**
14
- * Authorizes transaction for payout. Authorized transactions aren't flagged for settlement until captured. Use `referenceId` returned in the response to capture the transaction.
14
+ * 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.
15
15
  *
16
16
  * @param {Payabli.MoneyOutTypesRequestOutAuthorize} request
17
17
  * @param {MoneyOutClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -25,6 +25,7 @@ export declare class MoneyOutClient {
25
25
  * await client.moneyOut.authorizeOut({
26
26
  * body: {
27
27
  * entryPoint: "48acde49",
28
+ * autoCapture: true,
28
29
  * invoiceData: [{
29
30
  * billId: 54323
30
31
  * }],
@@ -46,6 +47,7 @@ export declare class MoneyOutClient {
46
47
  * await client.moneyOut.authorizeOut({
47
48
  * body: {
48
49
  * entryPoint: "48acde49",
50
+ * autoCapture: true,
49
51
  * invoiceData: [{
50
52
  * billId: 123,
51
53
  * attachments: [{
@@ -71,6 +73,7 @@ export declare class MoneyOutClient {
71
73
  * await client.moneyOut.authorizeOut({
72
74
  * body: {
73
75
  * entryPoint: "48acde49",
76
+ * autoCapture: true,
74
77
  * source: "api",
75
78
  * invoiceData: [{
76
79
  * billId: 54323
@@ -233,7 +236,7 @@ export declare class MoneyOutClient {
233
236
  captureAllOut(request: Payabli.CaptureAllOutRequest, requestOptions?: MoneyOutClient.RequestOptions): core.HttpResponsePromise<Payabli.CaptureAllOutResponse>;
234
237
  private __captureAllOut;
235
238
  /**
236
- * Captures a single authorized payout transaction by ID.
239
+ * 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.
237
240
  *
238
241
  * @param {string} referenceId - The ID for the payout transaction.
239
242
  * @param {Payabli.CaptureOutRequest} request
@@ -20,7 +20,7 @@ export class MoneyOutClient {
20
20
  this._options = normalizeClientOptionsWithAuth(options);
21
21
  }
22
22
  /**
23
- * Authorizes transaction for payout. Authorized transactions aren't flagged for settlement until captured. Use `referenceId` returned in the response to capture the transaction.
23
+ * 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.
24
24
  *
25
25
  * @param {Payabli.MoneyOutTypesRequestOutAuthorize} request
26
26
  * @param {MoneyOutClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -34,6 +34,7 @@ export class MoneyOutClient {
34
34
  * await client.moneyOut.authorizeOut({
35
35
  * body: {
36
36
  * entryPoint: "48acde49",
37
+ * autoCapture: true,
37
38
  * invoiceData: [{
38
39
  * billId: 54323
39
40
  * }],
@@ -55,6 +56,7 @@ export class MoneyOutClient {
55
56
  * await client.moneyOut.authorizeOut({
56
57
  * body: {
57
58
  * entryPoint: "48acde49",
59
+ * autoCapture: true,
58
60
  * invoiceData: [{
59
61
  * billId: 123,
60
62
  * attachments: [{
@@ -80,6 +82,7 @@ export class MoneyOutClient {
80
82
  * await client.moneyOut.authorizeOut({
81
83
  * body: {
82
84
  * entryPoint: "48acde49",
85
+ * autoCapture: true,
83
86
  * source: "api",
84
87
  * invoiceData: [{
85
88
  * billId: 54323
@@ -463,7 +466,7 @@ export class MoneyOutClient {
463
466
  });
464
467
  }
465
468
  /**
466
- * Captures a single authorized payout transaction by ID.
469
+ * 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.
467
470
  *
468
471
  * @param {string} referenceId - The ID for the payout transaction.
469
472
  * @param {Payabli.CaptureOutRequest} request
@@ -4,6 +4,7 @@ import type * as Payabli from "../../../../index.mjs";
4
4
  * {
5
5
  * body: {
6
6
  * entryPoint: "48acde49",
7
+ * autoCapture: true,
7
8
  * invoiceData: [{
8
9
  * billId: 54323
9
10
  * }],
@@ -25,6 +26,7 @@ import type * as Payabli from "../../../../index.mjs";
25
26
  * {
26
27
  * body: {
27
28
  * entryPoint: "48acde49",
29
+ * autoCapture: true,
28
30
  * invoiceData: [{
29
31
  * billId: 123,
30
32
  * attachments: [{
@@ -50,6 +52,7 @@ import type * as Payabli from "../../../../index.mjs";
50
52
  * {
51
53
  * body: {
52
54
  * entryPoint: "48acde49",
55
+ * autoCapture: true,
53
56
  * source: "api",
54
57
  * invoiceData: [{
55
58
  * billId: 54323
@@ -14,6 +14,7 @@ export interface AuthorizePayoutBody {
14
14
  accountId?: Payabli.AccountId | undefined;
15
15
  subdomain?: Payabli.Subdomain | undefined;
16
16
  subscriptionId?: Payabli.Subscriptionid | undefined;
17
+ autoCapture?: Payabli.AutoCapture | undefined;
17
18
  }
18
19
  export declare namespace AuthorizePayoutBody {
19
20
  /**
@@ -94,6 +94,13 @@ import type * as Payabli from "../../../index.mjs";
94
94
  * customField2: "",
95
95
  * customerVendorAccount: "123-456",
96
96
  * InternalReferenceId: 1000000,
97
+ * PaymentPortalUrl: "https://greenfield-landscaping.com/pay",
98
+ * CardAccepted: "yes",
99
+ * AchAccepted: "unable to determine",
100
+ * EnrichmentStatus: "fully_enriched",
101
+ * EnrichedBy: "web_search",
102
+ * EnrichedAt: "2026-03-05T14:22:10Z",
103
+ * EnrichmentId: "enrich-3890-a1b2c3d4",
97
104
  * externalPaypointID: "Paypoint-100",
98
105
  * StoredMethods: []
99
106
  * },
@@ -89,6 +89,13 @@ import type * as Payabli from "../../../index.mjs";
89
89
  * customField2: "",
90
90
  * customerVendorAccount: "123-456",
91
91
  * InternalReferenceId: 1000000,
92
+ * PaymentPortalUrl: "https://greenfield-landscaping.com/pay",
93
+ * CardAccepted: "yes",
94
+ * AchAccepted: "unable to determine",
95
+ * EnrichmentStatus: "fully_enriched",
96
+ * EnrichedBy: "web_search",
97
+ * EnrichedAt: "2026-03-05T14:22:10Z",
98
+ * EnrichmentId: "enrich-3890-a1b2c3d4",
92
99
  * externalPaypointID: "Paypoint-100",
93
100
  * StoredMethods: []
94
101
  * },
@@ -89,6 +89,13 @@ import type * as Payabli from "../../../index.mjs";
89
89
  * customField2: "",
90
90
  * customerVendorAccount: "123-456",
91
91
  * InternalReferenceId: 1000000,
92
+ * PaymentPortalUrl: "https://greenfield-landscaping.com/pay",
93
+ * CardAccepted: "yes",
94
+ * AchAccepted: "unable to determine",
95
+ * EnrichmentStatus: "fully_enriched",
96
+ * EnrichedBy: "web_search",
97
+ * EnrichedAt: "2026-03-05T14:22:10Z",
98
+ * EnrichmentId: "enrich-3890-a1b2c3d4",
92
99
  * externalPaypointID: "Paypoint-100",
93
100
  * StoredMethods: []
94
101
  * },
@@ -100,6 +100,13 @@ import type * as Payabli from "../../../index.mjs";
100
100
  * customField2: "",
101
101
  * customerVendorAccount: "123-456",
102
102
  * InternalReferenceId: 1000000,
103
+ * PaymentPortalUrl: "https://greenfield-landscaping.com/pay",
104
+ * CardAccepted: "yes",
105
+ * AchAccepted: "unable to determine",
106
+ * EnrichmentStatus: "fully_enriched",
107
+ * EnrichedBy: "web_search",
108
+ * EnrichedAt: "2026-03-05T14:22:10Z",
109
+ * EnrichmentId: "enrich-3890-a1b2c3d4",
103
110
  * externalPaypointID: "Paypoint-100",
104
111
  * StoredMethods: []
105
112
  * },
@@ -106,7 +106,7 @@ export declare class VendorClient {
106
106
  editVendor(idVendor: number, request: Payabli.VendorData, requestOptions?: VendorClient.RequestOptions): core.HttpResponsePromise<Payabli.PayabliApiResponseVendors>;
107
107
  private __editVendor;
108
108
  /**
109
- * Retrieves a vendor's details.
109
+ * Retrieves a vendor's details, including enrichment status and payment acceptance info when available.
110
110
  *
111
111
  * @param {number} idVendor - Vendor ID.
112
112
  * @param {VendorClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -116,4 +116,47 @@ export declare class VendorClient {
116
116
  */
117
117
  getVendor(idVendor: number, requestOptions?: VendorClient.RequestOptions): core.HttpResponsePromise<Payabli.VendorQueryRecord>;
118
118
  private __getVendor;
119
+ /**
120
+ * 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.
121
+ *
122
+ * @param {string} entry - Entrypoint identifier.
123
+ * @param {Payabli.VendorEnrichRequest} request
124
+ * @param {VendorClient.RequestOptions} requestOptions - Request-specific configuration.
125
+ *
126
+ * @throws {@link Payabli.BadRequestError}
127
+ * @throws {@link Payabli.UnauthorizedError}
128
+ * @throws {@link Payabli.InternalServerError}
129
+ * @throws {@link Payabli.ServiceUnavailableError}
130
+ *
131
+ * @example
132
+ * await client.vendor.enrichVendor("8cfec329267", {
133
+ * vendorId: 3890,
134
+ * scope: ["invoice_scan"],
135
+ * applyEnrichmentData: false,
136
+ * fallbackMethod: "check",
137
+ * invoiceFile: {
138
+ * ftype: "pdf",
139
+ * filename: "invoice-2026-001.pdf",
140
+ * fContent: "<base64-encoded-pdf>"
141
+ * }
142
+ * })
143
+ *
144
+ * @example
145
+ * await client.vendor.enrichVendor("8cfec329267", {
146
+ * vendorId: 3891,
147
+ * scope: ["web_search"],
148
+ * applyEnrichmentData: false,
149
+ * fallbackMethod: "check"
150
+ * })
151
+ *
152
+ * @example
153
+ * await client.vendor.enrichVendor("8cfec329267", {
154
+ * vendorId: 3891,
155
+ * scope: ["web_search"],
156
+ * applyEnrichmentData: true,
157
+ * fallbackMethod: "check"
158
+ * })
159
+ */
160
+ enrichVendor(entry: string, request: Payabli.VendorEnrichRequest, requestOptions?: VendorClient.RequestOptions): core.HttpResponsePromise<Payabli.VendorEnrichResponse>;
161
+ private __enrichVendor;
119
162
  }
@@ -244,7 +244,7 @@ export class VendorClient {
244
244
  });
245
245
  }
246
246
  /**
247
- * Retrieves a vendor's details.
247
+ * Retrieves a vendor's details, including enrichment status and payment acceptance info when available.
248
248
  *
249
249
  * @param {number} idVendor - Vendor ID.
250
250
  * @param {VendorClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -284,4 +284,91 @@ export class VendorClient {
284
284
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/Vendor/{idVendor}");
285
285
  });
286
286
  }
287
+ /**
288
+ * 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.
289
+ *
290
+ * @param {string} entry - Entrypoint identifier.
291
+ * @param {Payabli.VendorEnrichRequest} request
292
+ * @param {VendorClient.RequestOptions} requestOptions - Request-specific configuration.
293
+ *
294
+ * @throws {@link Payabli.BadRequestError}
295
+ * @throws {@link Payabli.UnauthorizedError}
296
+ * @throws {@link Payabli.InternalServerError}
297
+ * @throws {@link Payabli.ServiceUnavailableError}
298
+ *
299
+ * @example
300
+ * await client.vendor.enrichVendor("8cfec329267", {
301
+ * vendorId: 3890,
302
+ * scope: ["invoice_scan"],
303
+ * applyEnrichmentData: false,
304
+ * fallbackMethod: "check",
305
+ * invoiceFile: {
306
+ * ftype: "pdf",
307
+ * filename: "invoice-2026-001.pdf",
308
+ * fContent: "<base64-encoded-pdf>"
309
+ * }
310
+ * })
311
+ *
312
+ * @example
313
+ * await client.vendor.enrichVendor("8cfec329267", {
314
+ * vendorId: 3891,
315
+ * scope: ["web_search"],
316
+ * applyEnrichmentData: false,
317
+ * fallbackMethod: "check"
318
+ * })
319
+ *
320
+ * @example
321
+ * await client.vendor.enrichVendor("8cfec329267", {
322
+ * vendorId: 3891,
323
+ * scope: ["web_search"],
324
+ * applyEnrichmentData: true,
325
+ * fallbackMethod: "check"
326
+ * })
327
+ */
328
+ enrichVendor(entry, request, requestOptions) {
329
+ return core.HttpResponsePromise.fromPromise(this.__enrichVendor(entry, request, requestOptions));
330
+ }
331
+ __enrichVendor(entry, request, requestOptions) {
332
+ return __awaiter(this, void 0, void 0, function* () {
333
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
334
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
335
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
336
+ const _response = yield core.fetcher({
337
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `Vendor/enrich/${core.url.encodePathParam(entry)}`),
338
+ method: "POST",
339
+ headers: _headers,
340
+ contentType: "application/json",
341
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
342
+ requestType: "json",
343
+ body: request,
344
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
345
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
346
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
347
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
348
+ logging: this._options.logging,
349
+ });
350
+ if (_response.ok) {
351
+ return { data: _response.body, rawResponse: _response.rawResponse };
352
+ }
353
+ if (_response.error.reason === "status-code") {
354
+ switch (_response.error.statusCode) {
355
+ case 400:
356
+ throw new Payabli.BadRequestError(_response.error.body, _response.rawResponse);
357
+ case 401:
358
+ throw new Payabli.UnauthorizedError(_response.error.body, _response.rawResponse);
359
+ case 500:
360
+ throw new Payabli.InternalServerError(_response.error.body, _response.rawResponse);
361
+ case 503:
362
+ throw new Payabli.ServiceUnavailableError(_response.error.body, _response.rawResponse);
363
+ default:
364
+ throw new errors.PayabliError({
365
+ statusCode: _response.error.statusCode,
366
+ body: _response.error.body,
367
+ rawResponse: _response.rawResponse,
368
+ });
369
+ }
370
+ }
371
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/Vendor/enrich/{entry}");
372
+ });
373
+ }
287
374
  }
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";