@payabli/sdk-node 0.0.140 → 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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/bill/types/BillOutData.d.ts +5 -1
- package/dist/cjs/api/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.js +1 -0
- package/dist/cjs/api/resources/moneyOut/client/Client.d.ts +5 -2
- package/dist/cjs/api/resources/moneyOut/client/Client.js +5 -2
- package/dist/cjs/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.ts +3 -0
- package/dist/cjs/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.ts +1 -0
- package/dist/cjs/api/resources/payoutSubscription/types/GetPayoutSubscriptionResponse.d.ts +7 -0
- package/dist/cjs/api/resources/payoutSubscription/types/PayoutSubscriptionQueryRecord.d.ts +7 -0
- package/dist/cjs/api/resources/payoutSubscription/types/PayoutSubscriptionQueryRecordPascal.d.ts +7 -0
- package/dist/cjs/api/resources/payoutSubscription/types/QueryPayoutSubscriptionResponse.d.ts +7 -0
- package/dist/cjs/api/resources/vendor/client/Client.d.ts +44 -1
- package/dist/cjs/api/resources/vendor/client/Client.js +88 -1
- package/dist/cjs/api/resources/vendor/index.d.ts +1 -0
- package/dist/cjs/api/resources/vendor/index.js +1 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichRequest.d.ts +20 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichRequest.js +3 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichResponse.d.ts +12 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichResponse.js +3 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichResponseData.d.ts +16 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichResponseData.js +3 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichmentData.d.ts +10 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichmentData.js +3 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichmentInvoiceScan.d.ts +35 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichmentInvoiceScan.js +3 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichmentWebSearch.d.ts +35 -0
- package/dist/cjs/api/resources/vendor/types/VendorEnrichmentWebSearch.js +3 -0
- package/dist/cjs/api/resources/vendor/types/index.d.ts +6 -0
- package/dist/cjs/api/resources/vendor/types/index.js +22 -0
- package/dist/cjs/api/types/AutoCapture.d.ts +4 -0
- package/dist/cjs/api/types/AutoCapture.js +3 -0
- package/dist/cjs/api/types/NotificationContent.d.ts +0 -1
- package/dist/cjs/api/types/NotificationContent.js +0 -1
- package/dist/cjs/api/types/NotificationStandardRequest.d.ts +0 -1
- package/dist/cjs/api/types/NotificationStandardRequest.js +0 -1
- package/dist/cjs/api/types/VendorData.d.ts +12 -0
- package/dist/cjs/api/types/VendorQueryRecord.d.ts +21 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/bill/types/BillOutData.d.mts +5 -1
- package/dist/esm/api/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/index.mjs +1 -0
- package/dist/esm/api/resources/moneyOut/client/Client.d.mts +5 -2
- package/dist/esm/api/resources/moneyOut/client/Client.mjs +5 -2
- package/dist/esm/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.mts +3 -0
- package/dist/esm/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.mts +1 -0
- package/dist/esm/api/resources/payoutSubscription/types/GetPayoutSubscriptionResponse.d.mts +7 -0
- package/dist/esm/api/resources/payoutSubscription/types/PayoutSubscriptionQueryRecord.d.mts +7 -0
- package/dist/esm/api/resources/payoutSubscription/types/PayoutSubscriptionQueryRecordPascal.d.mts +7 -0
- package/dist/esm/api/resources/payoutSubscription/types/QueryPayoutSubscriptionResponse.d.mts +7 -0
- package/dist/esm/api/resources/vendor/client/Client.d.mts +44 -1
- package/dist/esm/api/resources/vendor/client/Client.mjs +88 -1
- package/dist/esm/api/resources/vendor/index.d.mts +1 -0
- package/dist/esm/api/resources/vendor/index.mjs +1 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichRequest.d.mts +20 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichRequest.mjs +2 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichResponse.d.mts +12 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichResponse.mjs +2 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichResponseData.d.mts +16 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichResponseData.mjs +2 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichmentData.d.mts +10 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichmentData.mjs +2 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichmentInvoiceScan.d.mts +35 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichmentInvoiceScan.mjs +2 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichmentWebSearch.d.mts +35 -0
- package/dist/esm/api/resources/vendor/types/VendorEnrichmentWebSearch.mjs +2 -0
- package/dist/esm/api/resources/vendor/types/index.d.mts +6 -0
- package/dist/esm/api/resources/vendor/types/index.mjs +6 -0
- package/dist/esm/api/types/AutoCapture.d.mts +4 -0
- package/dist/esm/api/types/AutoCapture.mjs +2 -0
- package/dist/esm/api/types/NotificationContent.d.mts +0 -1
- package/dist/esm/api/types/NotificationContent.mjs +0 -1
- package/dist/esm/api/types/NotificationStandardRequest.d.mts +0 -1
- package/dist/esm/api/types/NotificationStandardRequest.mjs +0 -1
- package/dist/esm/api/types/VendorData.d.mts +12 -0
- package/dist/esm/api/types/VendorQueryRecord.d.mts +21 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +85 -3
|
@@ -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);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.141";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@payabli/sdk-node",
|
|
9
|
-
"X-Fern-SDK-Version": "0.0.
|
|
10
|
-
"User-Agent": "@payabli/sdk-node/0.0.
|
|
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
|
-
/**
|
|
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.
|
|
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.
|
|
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
|
package/dist/esm/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.mts
CHANGED
|
@@ -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
|
* },
|
package/dist/esm/api/resources/payoutSubscription/types/PayoutSubscriptionQueryRecordPascal.d.mts
CHANGED
|
@@ -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
|
* },
|
package/dist/esm/api/resources/payoutSubscription/types/QueryPayoutSubscriptionResponse.d.mts
CHANGED
|
@@ -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
|
}
|
|
@@ -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,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,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,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,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,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
|
+
}
|