@payabli/sdk-node 0.0.136 → 0.0.138
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/LICENSE.md +5 -6
- package/README.md +12 -0
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/ghostCard/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/ghostCard/client/Client.js +3 -0
- package/dist/cjs/api/resources/ghostCard/client/requests/CreateGhostCardRequestBody.d.ts +16 -15
- 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/ghostCard/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/ghostCard/client/Client.mjs +3 -0
- package/dist/esm/api/resources/ghostCard/client/requests/CreateGhostCardRequestBody.d.mts +16 -15
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +3 -0
package/LICENSE.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
Copyright (c) 2026 Payabli
|
|
1
|
+
Copyright (c) 2026 Payabli Inc.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
distribute, or create derivative works from this source code.
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ The Payabli TypeScript library provides convenient access to the Payabli APIs fr
|
|
|
10
10
|
- [Documentation](#documentation)
|
|
11
11
|
- [Installation](#installation)
|
|
12
12
|
- [Reference](#reference)
|
|
13
|
+
- [Changelog](#changelog)
|
|
14
|
+
- [Getting Started](#getting-started)
|
|
13
15
|
- [Usage](#usage)
|
|
14
16
|
- [Environments](#environments)
|
|
15
17
|
- [Request and Response Types](#request-and-response-types)
|
|
@@ -42,6 +44,16 @@ npm i -s @payabli/sdk-node
|
|
|
42
44
|
|
|
43
45
|
A full reference for this library is available [here](https://github.com/payabli/sdk-node/blob/HEAD/./reference.md).
|
|
44
46
|
|
|
47
|
+
## Changelog
|
|
48
|
+
|
|
49
|
+
The changelog for the official Payabli TypeScript SDK is available on the Payabli Docs site. See [TypeScript SDK Changelog](https://docs.payabli.com/changelog/typescript-sdk) for more information.
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## Getting Started
|
|
53
|
+
|
|
54
|
+
Visit the Payabli Docs site to get started with the official Payabli TypeScript SDK. See [Use the TypeScript SDK](https://docs.payabli.com/developers/platform-sdk-typescript-guide) for more information.
|
|
55
|
+
|
|
56
|
+
|
|
45
57
|
## Usage
|
|
46
58
|
|
|
47
59
|
Instantiate and use the client with the following:
|
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.138",
|
|
47
|
+
"User-Agent": "@payabli/sdk-node/0.0.138",
|
|
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);
|
|
@@ -15,6 +15,8 @@ export declare class GhostCardClient {
|
|
|
15
15
|
*
|
|
16
16
|
* Unlike single-use virtual cards issued as part of a payout transaction, ghost cards aren't tied to a specific payout. They're issued directly to a vendor and can be reused up to a configurable number of times within the card's spending limits.
|
|
17
17
|
*
|
|
18
|
+
* Only one ghost card can exist per vendor per paypoint. To issue a new card to the same vendor, cancel the existing card first.
|
|
19
|
+
*
|
|
18
20
|
* @param {Payabli.Entry} entry
|
|
19
21
|
* @param {Payabli.CreateGhostCardRequestBody} request
|
|
20
22
|
* @param {GhostCardClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -28,6 +30,7 @@ export declare class GhostCardClient {
|
|
|
28
30
|
* await client.ghostCard.createGhostCard("8cfec2e0fa", {
|
|
29
31
|
* vendorId: 42,
|
|
30
32
|
* expenseLimit: 500,
|
|
33
|
+
* amount: 500,
|
|
31
34
|
* maxNumberOfUses: 3,
|
|
32
35
|
* exactAmount: false,
|
|
33
36
|
* expenseLimitPeriod: "monthly",
|
|
@@ -60,6 +60,8 @@ class GhostCardClient {
|
|
|
60
60
|
*
|
|
61
61
|
* Unlike single-use virtual cards issued as part of a payout transaction, ghost cards aren't tied to a specific payout. They're issued directly to a vendor and can be reused up to a configurable number of times within the card's spending limits.
|
|
62
62
|
*
|
|
63
|
+
* Only one ghost card can exist per vendor per paypoint. To issue a new card to the same vendor, cancel the existing card first.
|
|
64
|
+
*
|
|
63
65
|
* @param {Payabli.Entry} entry
|
|
64
66
|
* @param {Payabli.CreateGhostCardRequestBody} request
|
|
65
67
|
* @param {GhostCardClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -73,6 +75,7 @@ class GhostCardClient {
|
|
|
73
75
|
* await client.ghostCard.createGhostCard("8cfec2e0fa", {
|
|
74
76
|
* vendorId: 42,
|
|
75
77
|
* expenseLimit: 500,
|
|
78
|
+
* amount: 500,
|
|
76
79
|
* maxNumberOfUses: 3,
|
|
77
80
|
* exactAmount: false,
|
|
78
81
|
* expenseLimitPeriod: "monthly",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* {
|
|
4
4
|
* vendorId: 42,
|
|
5
5
|
* expenseLimit: 500,
|
|
6
|
+
* amount: 500,
|
|
6
7
|
* maxNumberOfUses: 3,
|
|
7
8
|
* exactAmount: false,
|
|
8
9
|
* expenseLimitPeriod: "monthly",
|
|
@@ -24,24 +25,24 @@ export interface CreateGhostCardRequestBody {
|
|
|
24
25
|
expenseLimit: number;
|
|
25
26
|
/** Requested expiration date for the card. If not provided, defaults to 30 days from creation. */
|
|
26
27
|
expirationDate?: string;
|
|
27
|
-
/** Initial load amount for the card.
|
|
28
|
-
amount
|
|
29
|
-
/** Maximum number of times the card can be used.
|
|
30
|
-
maxNumberOfUses
|
|
28
|
+
/** Initial load amount for the card. */
|
|
29
|
+
amount: number;
|
|
30
|
+
/** Maximum number of times the card can be used. Ignored and set to `1` when `exactAmount` is `true`. */
|
|
31
|
+
maxNumberOfUses: number;
|
|
31
32
|
/** When `true`, restricts the card to a single use. `maxNumberOfUses` is automatically set to `1` regardless of any other value provided. */
|
|
32
|
-
exactAmount
|
|
33
|
-
/** Time period over which `expenseLimit` applies (for example, `monthly` or `weekly`).
|
|
34
|
-
expenseLimitPeriod
|
|
33
|
+
exactAmount: boolean;
|
|
34
|
+
/** Time period over which `expenseLimit` applies (for example, `monthly` or `weekly`). */
|
|
35
|
+
expenseLimitPeriod: string;
|
|
35
36
|
/** Billing cycle identifier. */
|
|
36
|
-
billingCycle
|
|
37
|
+
billingCycle: string;
|
|
37
38
|
/** Day within the billing cycle. */
|
|
38
|
-
billingCycleDay
|
|
39
|
-
/** Maximum number of transactions allowed per day.
|
|
40
|
-
dailyTransactionCount
|
|
41
|
-
/** Maximum total spend allowed per day.
|
|
42
|
-
dailyAmountLimit
|
|
43
|
-
/** Maximum spend allowed per single transaction.
|
|
44
|
-
transactionAmountLimit
|
|
39
|
+
billingCycleDay: string;
|
|
40
|
+
/** Maximum number of transactions allowed per day. */
|
|
41
|
+
dailyTransactionCount: number;
|
|
42
|
+
/** Maximum total spend allowed per day. */
|
|
43
|
+
dailyAmountLimit: number;
|
|
44
|
+
/** Maximum spend allowed per single transaction. */
|
|
45
|
+
transactionAmountLimit: number;
|
|
45
46
|
/** Merchant Category Code to restrict where the card can be used. Must be a valid MCC if provided. */
|
|
46
47
|
mcc?: string;
|
|
47
48
|
/** Transaction Category Code to restrict where the card can be used. Must be a valid TCC if provided. */
|
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.138";
|
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.138",
|
|
10
|
+
"User-Agent": "@payabli/sdk-node/0.0.138",
|
|
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);
|
|
@@ -15,6 +15,8 @@ export declare class GhostCardClient {
|
|
|
15
15
|
*
|
|
16
16
|
* Unlike single-use virtual cards issued as part of a payout transaction, ghost cards aren't tied to a specific payout. They're issued directly to a vendor and can be reused up to a configurable number of times within the card's spending limits.
|
|
17
17
|
*
|
|
18
|
+
* Only one ghost card can exist per vendor per paypoint. To issue a new card to the same vendor, cancel the existing card first.
|
|
19
|
+
*
|
|
18
20
|
* @param {Payabli.Entry} entry
|
|
19
21
|
* @param {Payabli.CreateGhostCardRequestBody} request
|
|
20
22
|
* @param {GhostCardClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -28,6 +30,7 @@ export declare class GhostCardClient {
|
|
|
28
30
|
* await client.ghostCard.createGhostCard("8cfec2e0fa", {
|
|
29
31
|
* vendorId: 42,
|
|
30
32
|
* expenseLimit: 500,
|
|
33
|
+
* amount: 500,
|
|
31
34
|
* maxNumberOfUses: 3,
|
|
32
35
|
* exactAmount: false,
|
|
33
36
|
* expenseLimitPeriod: "monthly",
|
|
@@ -24,6 +24,8 @@ export class GhostCardClient {
|
|
|
24
24
|
*
|
|
25
25
|
* Unlike single-use virtual cards issued as part of a payout transaction, ghost cards aren't tied to a specific payout. They're issued directly to a vendor and can be reused up to a configurable number of times within the card's spending limits.
|
|
26
26
|
*
|
|
27
|
+
* Only one ghost card can exist per vendor per paypoint. To issue a new card to the same vendor, cancel the existing card first.
|
|
28
|
+
*
|
|
27
29
|
* @param {Payabli.Entry} entry
|
|
28
30
|
* @param {Payabli.CreateGhostCardRequestBody} request
|
|
29
31
|
* @param {GhostCardClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -37,6 +39,7 @@ export class GhostCardClient {
|
|
|
37
39
|
* await client.ghostCard.createGhostCard("8cfec2e0fa", {
|
|
38
40
|
* vendorId: 42,
|
|
39
41
|
* expenseLimit: 500,
|
|
42
|
+
* amount: 500,
|
|
40
43
|
* maxNumberOfUses: 3,
|
|
41
44
|
* exactAmount: false,
|
|
42
45
|
* expenseLimitPeriod: "monthly",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* {
|
|
4
4
|
* vendorId: 42,
|
|
5
5
|
* expenseLimit: 500,
|
|
6
|
+
* amount: 500,
|
|
6
7
|
* maxNumberOfUses: 3,
|
|
7
8
|
* exactAmount: false,
|
|
8
9
|
* expenseLimitPeriod: "monthly",
|
|
@@ -24,24 +25,24 @@ export interface CreateGhostCardRequestBody {
|
|
|
24
25
|
expenseLimit: number;
|
|
25
26
|
/** Requested expiration date for the card. If not provided, defaults to 30 days from creation. */
|
|
26
27
|
expirationDate?: string;
|
|
27
|
-
/** Initial load amount for the card.
|
|
28
|
-
amount
|
|
29
|
-
/** Maximum number of times the card can be used.
|
|
30
|
-
maxNumberOfUses
|
|
28
|
+
/** Initial load amount for the card. */
|
|
29
|
+
amount: number;
|
|
30
|
+
/** Maximum number of times the card can be used. Ignored and set to `1` when `exactAmount` is `true`. */
|
|
31
|
+
maxNumberOfUses: number;
|
|
31
32
|
/** When `true`, restricts the card to a single use. `maxNumberOfUses` is automatically set to `1` regardless of any other value provided. */
|
|
32
|
-
exactAmount
|
|
33
|
-
/** Time period over which `expenseLimit` applies (for example, `monthly` or `weekly`).
|
|
34
|
-
expenseLimitPeriod
|
|
33
|
+
exactAmount: boolean;
|
|
34
|
+
/** Time period over which `expenseLimit` applies (for example, `monthly` or `weekly`). */
|
|
35
|
+
expenseLimitPeriod: string;
|
|
35
36
|
/** Billing cycle identifier. */
|
|
36
|
-
billingCycle
|
|
37
|
+
billingCycle: string;
|
|
37
38
|
/** Day within the billing cycle. */
|
|
38
|
-
billingCycleDay
|
|
39
|
-
/** Maximum number of transactions allowed per day.
|
|
40
|
-
dailyTransactionCount
|
|
41
|
-
/** Maximum total spend allowed per day.
|
|
42
|
-
dailyAmountLimit
|
|
43
|
-
/** Maximum spend allowed per single transaction.
|
|
44
|
-
transactionAmountLimit
|
|
39
|
+
billingCycleDay: string;
|
|
40
|
+
/** Maximum number of transactions allowed per day. */
|
|
41
|
+
dailyTransactionCount: number;
|
|
42
|
+
/** Maximum total spend allowed per day. */
|
|
43
|
+
dailyAmountLimit: number;
|
|
44
|
+
/** Maximum spend allowed per single transaction. */
|
|
45
|
+
transactionAmountLimit: number;
|
|
45
46
|
/** Merchant Category Code to restrict where the card can be used. Must be a valid MCC if provided. */
|
|
46
47
|
mcc?: string;
|
|
47
48
|
/** Transaction Category Code to restrict where the card can be used. Must be a valid TCC if provided. */
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.138";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.138";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -5161,6 +5161,8 @@ await client.export.exportVendorsOrg("csv", 123, {
|
|
|
5161
5161
|
Creates a ghost card, a multi-use virtual debit card issued to a vendor for recurring or discretionary spend.
|
|
5162
5162
|
|
|
5163
5163
|
Unlike single-use virtual cards issued as part of a payout transaction, ghost cards aren't tied to a specific payout. They're issued directly to a vendor and can be reused up to a configurable number of times within the card's spending limits.
|
|
5164
|
+
|
|
5165
|
+
Only one ghost card can exist per vendor per paypoint. To issue a new card to the same vendor, cancel the existing card first.
|
|
5164
5166
|
</dd>
|
|
5165
5167
|
</dl>
|
|
5166
5168
|
</dd>
|
|
@@ -5178,6 +5180,7 @@ Unlike single-use virtual cards issued as part of a payout transaction, ghost ca
|
|
|
5178
5180
|
await client.ghostCard.createGhostCard("8cfec2e0fa", {
|
|
5179
5181
|
vendorId: 42,
|
|
5180
5182
|
expenseLimit: 500,
|
|
5183
|
+
amount: 500,
|
|
5181
5184
|
maxNumberOfUses: 3,
|
|
5182
5185
|
exactAmount: false,
|
|
5183
5186
|
expenseLimitPeriod: "monthly",
|