@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.
- 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/{query/types/Entry.js → vendor/types/VendorEnrichRequest.js} +1 -3
- 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/core/auth/BasicAuth.d.ts +2 -2
- package/dist/cjs/core/auth/BasicAuth.js +7 -1
- package/dist/cjs/core/fetcher/Fetcher.d.ts +2 -0
- package/dist/cjs/core/fetcher/Fetcher.js +4 -0
- package/dist/cjs/errors/PayabliError.d.ts +3 -1
- package/dist/cjs/errors/PayabliError.js +4 -1
- package/dist/cjs/errors/PayabliTimeoutError.d.ts +4 -1
- package/dist/cjs/errors/PayabliTimeoutError.js +4 -1
- package/dist/cjs/errors/handleNonStatusCodeError.js +4 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/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/core/auth/BasicAuth.d.mts +2 -2
- package/dist/esm/core/auth/BasicAuth.mjs +7 -1
- package/dist/esm/core/fetcher/Fetcher.d.mts +2 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +4 -0
- package/dist/esm/errors/PayabliError.d.mts +3 -1
- package/dist/esm/errors/PayabliError.mjs +4 -1
- package/dist/esm/errors/PayabliTimeoutError.d.mts +4 -1
- package/dist/esm/errors/PayabliTimeoutError.mjs +4 -1
- package/dist/esm/errors/handleNonStatusCodeError.mjs +4 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +85 -3
- package/dist/cjs/api/resources/query/types/Entry.d.ts +0 -7
- package/dist/esm/api/resources/query/types/Entry.d.mts +0 -7
- package/dist/esm/api/resources/query/types/Entry.mjs +0 -7
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@payabli/sdk-node",
|
|
46
|
-
"X-Fern-SDK-Version": "0.0.
|
|
47
|
-
"User-Agent": "@payabli/sdk-node/0.0.
|
|
46
|
+
"X-Fern-SDK-Version": "0.0.141",
|
|
47
|
+
"User-Agent": "@payabli/sdk-node/0.0.141",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, 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.js";
|
|
|
83
83
|
export * as v2MoneyInTypes from "./v2MoneyInTypes/index.js";
|
|
84
84
|
export * from "./v2MoneyInTypes/types/index.js";
|
|
85
85
|
export * as vendor from "./vendor/index.js";
|
|
86
|
+
export * from "./vendor/types/index.js";
|
|
86
87
|
export * from "./wallet/client/requests/index.js";
|
|
87
88
|
export * as wallet from "./wallet/index.js";
|
|
@@ -122,5 +122,6 @@ __exportStar(require("./v2MoneyInTypes/errors/index.js"), exports);
|
|
|
122
122
|
exports.v2MoneyInTypes = __importStar(require("./v2MoneyInTypes/index.js"));
|
|
123
123
|
__exportStar(require("./v2MoneyInTypes/types/index.js"), exports);
|
|
124
124
|
exports.vendor = __importStar(require("./vendor/index.js"));
|
|
125
|
+
__exportStar(require("./vendor/types/index.js"), exports);
|
|
125
126
|
__exportStar(require("./wallet/client/requests/index.js"), exports);
|
|
126
127
|
exports.wallet = __importStar(require("./wallet/index.js"));
|
|
@@ -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
|
|
@@ -56,7 +56,7 @@ class MoneyOutClient {
|
|
|
56
56
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Authorizes transaction for payout.
|
|
59
|
+
* 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.
|
|
60
60
|
*
|
|
61
61
|
* @param {Payabli.MoneyOutTypesRequestOutAuthorize} request
|
|
62
62
|
* @param {MoneyOutClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -70,6 +70,7 @@ class MoneyOutClient {
|
|
|
70
70
|
* await client.moneyOut.authorizeOut({
|
|
71
71
|
* body: {
|
|
72
72
|
* entryPoint: "48acde49",
|
|
73
|
+
* autoCapture: true,
|
|
73
74
|
* invoiceData: [{
|
|
74
75
|
* billId: 54323
|
|
75
76
|
* }],
|
|
@@ -91,6 +92,7 @@ class MoneyOutClient {
|
|
|
91
92
|
* await client.moneyOut.authorizeOut({
|
|
92
93
|
* body: {
|
|
93
94
|
* entryPoint: "48acde49",
|
|
95
|
+
* autoCapture: true,
|
|
94
96
|
* invoiceData: [{
|
|
95
97
|
* billId: 123,
|
|
96
98
|
* attachments: [{
|
|
@@ -116,6 +118,7 @@ class MoneyOutClient {
|
|
|
116
118
|
* await client.moneyOut.authorizeOut({
|
|
117
119
|
* body: {
|
|
118
120
|
* entryPoint: "48acde49",
|
|
121
|
+
* autoCapture: true,
|
|
119
122
|
* source: "api",
|
|
120
123
|
* invoiceData: [{
|
|
121
124
|
* billId: 54323
|
|
@@ -499,7 +502,7 @@ class MoneyOutClient {
|
|
|
499
502
|
});
|
|
500
503
|
}
|
|
501
504
|
/**
|
|
502
|
-
* Captures a single authorized payout transaction by ID.
|
|
505
|
+
* 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.
|
|
503
506
|
*
|
|
504
507
|
* @param {string} referenceId - The ID for the payout transaction.
|
|
505
508
|
* @param {Payabli.CaptureOutRequest} request
|
package/dist/cjs/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type * as Payabli from "../../../../index.js";
|
|
|
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.js";
|
|
|
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.js";
|
|
|
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.js";
|
|
|
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.js";
|
|
|
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/cjs/api/resources/payoutSubscription/types/PayoutSubscriptionQueryRecordPascal.d.ts
CHANGED
|
@@ -89,6 +89,13 @@ import type * as Payabli from "../../../index.js";
|
|
|
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/cjs/api/resources/payoutSubscription/types/QueryPayoutSubscriptionResponse.d.ts
CHANGED
|
@@ -100,6 +100,13 @@ import type * as Payabli from "../../../index.js";
|
|
|
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
|
}
|
|
@@ -280,7 +280,7 @@ class VendorClient {
|
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
|
-
* Retrieves a vendor's details.
|
|
283
|
+
* Retrieves a vendor's details, including enrichment status and payment acceptance info when available.
|
|
284
284
|
*
|
|
285
285
|
* @param {number} idVendor - Vendor ID.
|
|
286
286
|
* @param {VendorClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -320,5 +320,92 @@ class VendorClient {
|
|
|
320
320
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/Vendor/{idVendor}");
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* 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.
|
|
325
|
+
*
|
|
326
|
+
* @param {string} entry - Entrypoint identifier.
|
|
327
|
+
* @param {Payabli.VendorEnrichRequest} request
|
|
328
|
+
* @param {VendorClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
329
|
+
*
|
|
330
|
+
* @throws {@link Payabli.BadRequestError}
|
|
331
|
+
* @throws {@link Payabli.UnauthorizedError}
|
|
332
|
+
* @throws {@link Payabli.InternalServerError}
|
|
333
|
+
* @throws {@link Payabli.ServiceUnavailableError}
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* await client.vendor.enrichVendor("8cfec329267", {
|
|
337
|
+
* vendorId: 3890,
|
|
338
|
+
* scope: ["invoice_scan"],
|
|
339
|
+
* applyEnrichmentData: false,
|
|
340
|
+
* fallbackMethod: "check",
|
|
341
|
+
* invoiceFile: {
|
|
342
|
+
* ftype: "pdf",
|
|
343
|
+
* filename: "invoice-2026-001.pdf",
|
|
344
|
+
* fContent: "<base64-encoded-pdf>"
|
|
345
|
+
* }
|
|
346
|
+
* })
|
|
347
|
+
*
|
|
348
|
+
* @example
|
|
349
|
+
* await client.vendor.enrichVendor("8cfec329267", {
|
|
350
|
+
* vendorId: 3891,
|
|
351
|
+
* scope: ["web_search"],
|
|
352
|
+
* applyEnrichmentData: false,
|
|
353
|
+
* fallbackMethod: "check"
|
|
354
|
+
* })
|
|
355
|
+
*
|
|
356
|
+
* @example
|
|
357
|
+
* await client.vendor.enrichVendor("8cfec329267", {
|
|
358
|
+
* vendorId: 3891,
|
|
359
|
+
* scope: ["web_search"],
|
|
360
|
+
* applyEnrichmentData: true,
|
|
361
|
+
* fallbackMethod: "check"
|
|
362
|
+
* })
|
|
363
|
+
*/
|
|
364
|
+
enrichVendor(entry, request, requestOptions) {
|
|
365
|
+
return core.HttpResponsePromise.fromPromise(this.__enrichVendor(entry, request, requestOptions));
|
|
366
|
+
}
|
|
367
|
+
__enrichVendor(entry, request, requestOptions) {
|
|
368
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
369
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
370
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
371
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
372
|
+
const _response = yield core.fetcher({
|
|
373
|
+
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)}`),
|
|
374
|
+
method: "POST",
|
|
375
|
+
headers: _headers,
|
|
376
|
+
contentType: "application/json",
|
|
377
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
378
|
+
requestType: "json",
|
|
379
|
+
body: request,
|
|
380
|
+
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,
|
|
381
|
+
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,
|
|
382
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
383
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
384
|
+
logging: this._options.logging,
|
|
385
|
+
});
|
|
386
|
+
if (_response.ok) {
|
|
387
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
388
|
+
}
|
|
389
|
+
if (_response.error.reason === "status-code") {
|
|
390
|
+
switch (_response.error.statusCode) {
|
|
391
|
+
case 400:
|
|
392
|
+
throw new Payabli.BadRequestError(_response.error.body, _response.rawResponse);
|
|
393
|
+
case 401:
|
|
394
|
+
throw new Payabli.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
395
|
+
case 500:
|
|
396
|
+
throw new Payabli.InternalServerError(_response.error.body, _response.rawResponse);
|
|
397
|
+
case 503:
|
|
398
|
+
throw new Payabli.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
399
|
+
default:
|
|
400
|
+
throw new errors.PayabliError({
|
|
401
|
+
statusCode: _response.error.statusCode,
|
|
402
|
+
body: _response.error.body,
|
|
403
|
+
rawResponse: _response.rawResponse,
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/Vendor/enrich/{entry}");
|
|
408
|
+
});
|
|
409
|
+
}
|
|
323
410
|
}
|
|
324
411
|
exports.VendorClient = VendorClient;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type * as Payabli from "../../../index.js";
|
|
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.js";
|
|
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.js";
|
|
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.js";
|
|
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
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./VendorEnrichmentData.js";
|
|
2
|
+
export * from "./VendorEnrichmentInvoiceScan.js";
|
|
3
|
+
export * from "./VendorEnrichmentWebSearch.js";
|
|
4
|
+
export * from "./VendorEnrichRequest.js";
|
|
5
|
+
export * from "./VendorEnrichResponse.js";
|
|
6
|
+
export * from "./VendorEnrichResponseData.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./VendorEnrichmentData.js"), exports);
|
|
18
|
+
__exportStar(require("./VendorEnrichmentInvoiceScan.js"), exports);
|
|
19
|
+
__exportStar(require("./VendorEnrichmentWebSearch.js"), exports);
|
|
20
|
+
__exportStar(require("./VendorEnrichRequest.js"), exports);
|
|
21
|
+
__exportStar(require("./VendorEnrichResponse.js"), exports);
|
|
22
|
+
__exportStar(require("./VendorEnrichResponseData.js"), exports);
|
|
@@ -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;
|
|
@@ -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";
|
|
@@ -35,7 +35,6 @@ var NotificationContent;
|
|
|
35
35
|
ApprovedApplication: "ApprovedApplication",
|
|
36
36
|
FailedBoardingApplication: "FailedBoardingApplication",
|
|
37
37
|
SubmittedApplication: "SubmittedApplication",
|
|
38
|
-
UnderWritingApplication: "UnderWritingApplication",
|
|
39
38
|
ActivatedMerchant: "ActivatedMerchant",
|
|
40
39
|
ReceivedChargeBack: "ReceivedChargeBack",
|
|
41
40
|
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";
|