Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ jobs:
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.LITHIC_NPM_TOKEN || secrets.NPM_TOKEN }}

2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.126.0"
".": "0.127.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 176
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-abe6a4f82f696099fa8ecb1cc44f08979e17d56578ae7ea68b0e9182e21df508.yml
openapi_spec_hash: d2ce51592a9a234c6f34a1168a31f91f
config_hash: 2b2786c821f62db49cc630ba45329336
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-854de7cc8f79e150ffe98f038ce9f39367010b2bdfffc9992be2738697dc4880.yml
openapi_spec_hash: fd471b20f3eda1e00cdebf028cbfe867
config_hash: 9dddee5f7af579864599849cb28a0770
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## 0.127.0 (2025-12-26)

Full Changelog: [v0.126.0...v0.127.0](https://github.com/lithic-com/lithic-node/compare/v0.126.0...v0.127.0)

### Features

* **api:** add external_id to payment_event ([538d96e](https://github.com/lithic-com/lithic-node/commit/538d96e5eba1b99e56839f5b0aac87496b681279))
* **api:** add get /v1/transfer_limits endpoint ([538d96e](https://github.com/lithic-com/lithic-node/commit/538d96e5eba1b99e56839f5b0aac87496b681279))
* **api:** add post /v1/book_transfers/{book_transfer_token}/retry endpoint ([538d96e](https://github.com/lithic-com/lithic-node/commit/538d96e5eba1b99e56839f5b0aac87496b681279))
* **api:** add WIRE_DRAWDOWN_REQUEST transfer type ([e7c375b](https://github.com/lithic-com/lithic-node/commit/e7c375bf328756a708d54e8a33e2ed154ebfeb93))
* **api:** remove unnecessary X-Lithic-Pagination header ([e7c375b](https://github.com/lithic-com/lithic-node/commit/e7c375bf328756a708d54e8a33e2ed154ebfeb93))
* **api:** remove v1/aggregate_balances and related models ([0078e74](https://github.com/lithic-com/lithic-node/commit/0078e74adc26ff15a7340684c1b07b662e500e01))


### Bug Fixes

* **docs:** remove extraneous example object fields ([3ba95e6](https://github.com/lithic-com/lithic-node/commit/3ba95e64b6eea6893359d17a21d66eab3a93219b))


### Chores

* formatting ([0b4c11e](https://github.com/lithic-com/lithic-node/commit/0b4c11edeffb476c403be5b84c1e310fd5dfc063))


### Documentation

* **api:** clarify description of token / retry_token when it serves as idempotency key ([e7c375b](https://github.com/lithic-com/lithic-node/commit/e7c375bf328756a708d54e8a33e2ed154ebfeb93))

## 0.126.0 (2025-12-11)

Full Changelog: [v0.125.0...v0.126.0](https://github.com/lithic-com/lithic-node/compare/v0.125.0...v0.126.0)
Expand Down
21 changes: 1 addition & 20 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@ client.example.list(undefined, { headers: { ... } });
- `client.tokenizations.resendActivationCode()`
- `client.tokenizations.updateDigitalCardArt()`
- `client.cards.list()`
- `client.cards.aggregateBalances.list()`
- `client.cards.balances.list()`
- `client.cards.financialTransactions.list()`
- `client.cardBulkOrders.list()`
- `client.balances.list()`
- `client.aggregateBalances.list()`
- `client.disputes.list()`
- `client.disputes.initiateEvidenceUpload()`
- `client.disputes.listEvidences()`
Expand Down Expand Up @@ -144,27 +142,10 @@ client.example.list(undefined, { headers: { ... } });
- `client.fundingEvents.list()`
- `client.networkPrograms.list()`
- `client.accountActivity.list()`
- `client.transferLimits.list()`

</details>

### HTTP method naming

Previously some methods could not be named intuitively due to an internal naming conflict. This has been fixed and the affected methods are now correctly named.

```ts
// Before
client.authRules.v2.del();
client.disputes.del();
client.events.subscriptions.del();
client.responderEndpoints.del();

// After
client.authRules.v2.delete();
client.disputes.delete();
client.events.subscriptions.delete();
client.responderEndpoints.delete();
```

### Removed `httpAgent` in favor of `fetchOptions`

The `httpAgent` client option has been removed in favor of a [platform-specific `fetchOptions` property](https://github.com/lithic-com/lithic-node#fetch-options).
Expand Down
20 changes: 1 addition & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,23 +156,6 @@ while (page.hasNextPage()) {
}
```

## Default Headers

We automatically send the `X-Lithic-Pagination` header set to `cursor`.

If you need to, you can override it by setting default headers on a per-request basis.

```ts
import Lithic from 'lithic';

const client = new Lithic();

const card = await client.cards.create(
{ type: 'SINGLE_USE' },
{ headers: { 'X-Lithic-Pagination': 'My-Custom-Value' } },
);
```

## Webhooks

Lithic uses webhooks to notify your application when events happen. The library provides signature verification via the `standardwebhooks` package.
Expand Down Expand Up @@ -201,7 +184,7 @@ switch (event.event_type) {

```ts
// Verify signature without parsing the event
lithic.webhooks.verifySignature(body, headers)
lithic.webhooks.verifySignature(body, headers);

// Parse only - skips signature verification
const event = lithic.webhooks.parseUnsafe(body);
Expand Down Expand Up @@ -231,7 +214,6 @@ export default async function POST(req: Request) {
> [!NOTE]
> If you're using the pages router, you will need [this trick](https://vancelucas.com/blog/how-to-access-raw-body-data-with-next-js/) to get the raw body.


## Advanced Usage

### Accessing raw Response data (e.g., headers)
Expand Down
31 changes: 11 additions & 20 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,6 @@ Methods:
- <code>client.cards.<a href="./src/resources/cards/cards.ts">getEmbedHTML</a>(...args) -> Promise&lt;string&gt;</code>
- <code>client.cards.<a href="./src/resources/cards/cards.ts">getEmbedURL</a>(...args) -> string</code>

## AggregateBalances

Types:

- <code><a href="./src/resources/cards/aggregate-balances.ts">AggregateBalanceListResponse</a></code>

Methods:

- <code title="get /v1/cards/aggregate_balances">client.cards.aggregateBalances.<a href="./src/resources/cards/aggregate-balances.ts">list</a>({ ...params }) -> AggregateBalanceListResponsesSinglePage</code>

## Balances

Methods:
Expand Down Expand Up @@ -235,16 +225,6 @@ Methods:

- <code title="get /v1/balances">client.balances.<a href="./src/resources/balances.ts">list</a>({ ...params }) -> BalancesSinglePage</code>

# AggregateBalances

Types:

- <code><a href="./src/resources/aggregate-balances.ts">AggregateBalance</a></code>

Methods:

- <code title="get /v1/aggregate_balances">client.aggregateBalances.<a href="./src/resources/aggregate-balances.ts">list</a>({ ...params }) -> AggregateBalancesSinglePage</code>

# Disputes

Types:
Expand Down Expand Up @@ -624,6 +604,7 @@ Methods:
- <code title="post /v1/book_transfers">client.bookTransfers.<a href="./src/resources/book-transfers.ts">create</a>({ ...params }) -> BookTransferResponse</code>
- <code title="get /v1/book_transfers/{book_transfer_token}">client.bookTransfers.<a href="./src/resources/book-transfers.ts">retrieve</a>(bookTransferToken) -> BookTransferResponse</code>
- <code title="get /v1/book_transfers">client.bookTransfers.<a href="./src/resources/book-transfers.ts">list</a>({ ...params }) -> BookTransferResponsesCursorPage</code>
- <code title="post /v1/book_transfers/{book_transfer_token}/retry">client.bookTransfers.<a href="./src/resources/book-transfers.ts">retry</a>(bookTransferToken, { ...params }) -> BookTransferResponse</code>
- <code title="post /v1/book_transfers/{book_transfer_token}/reverse">client.bookTransfers.<a href="./src/resources/book-transfers.ts">reverse</a>(bookTransferToken, { ...params }) -> BookTransferResponse</code>

# CreditProducts
Expand Down Expand Up @@ -737,6 +718,16 @@ Methods:
- <code title="get /v1/account_activity">client.accountActivity.<a href="./src/resources/account-activity.ts">list</a>({ ...params }) -> AccountActivityListResponsesCursorPage</code>
- <code title="get /v1/account_activity/{transaction_token}">client.accountActivity.<a href="./src/resources/account-activity.ts">retrieveTransaction</a>(transactionToken) -> AccountActivityRetrieveTransactionResponse</code>

# TransferLimits

Types:

- <code><a href="./src/resources/transfer-limits.ts">TransferLimitsResponse</a></code>

Methods:

- <code title="get /v1/transfer_limits">client.transferLimits.<a href="./src/resources/transfer-limits.ts">list</a>({ ...params }) -> TransferLimitsResponseDataSinglePage</code>

# Webhooks

Types:
Expand Down
14 changes: 10 additions & 4 deletions bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ const commands = {
fn: () => {
const result = spawnSync(
'npx',
['-y', 'https://github.com/stainless-api/migrate-ts/releases/download/0.0.2/stainless-api-migrate-0.0.2-6.tgz', '--migrationConfig', require.resolve('./migration-config.json'), ...process.argv.slice(3)],
[
'-y',
'https://github.com/stainless-api/migrate-ts/releases/download/0.0.2/stainless-api-migrate-0.0.2-6.tgz',
'--migrationConfig',
require.resolve('./migration-config.json'),
...process.argv.slice(3),
],
{ stdio: 'inherit' },
);
if (result.status !== 0) {
process.exit(result.status);
}
}
}
}
},
},
};

function exitWithHelp() {
console.log(`Usage: lithic <subcommand>`);
Expand Down
20 changes: 0 additions & 20 deletions bin/migration-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
}
]
},
{
"base": "authRules.v2",
"name": "delete",
"oldName": "del"
},
{
"base": "authRules.v2.backtests",
"name": "retrieve",
Expand Down Expand Up @@ -107,11 +102,6 @@
}
]
},
{
"base": "disputes",
"name": "delete",
"oldName": "del"
},
{
"base": "disputes",
"name": "deleteEvidence",
Expand Down Expand Up @@ -178,11 +168,6 @@
}
]
},
{
"base": "events.subscriptions",
"name": "delete",
"oldName": "del"
},
{
"base": "events.eventSubscriptions",
"name": "resend",
Expand Down Expand Up @@ -351,11 +336,6 @@
"type": "options"
}
]
},
{
"base": "responderEndpoints",
"name": "delete",
"oldName": "del"
}
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lithic",
"version": "0.126.0",
"version": "0.127.0",
"description": "The official TypeScript library for the Lithic API",
"author": "Lithic <sdk-feedback@lithic.com>",
"types": "dist/index.d.ts",
Expand Down
33 changes: 17 additions & 16 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,14 @@ import {
Accounts,
AccountsCursorPage,
} from './resources/accounts';
import {
AggregateBalance,
AggregateBalanceListParams,
AggregateBalances,
AggregateBalancesSinglePage,
} from './resources/aggregate-balances';
import { AuthStreamEnrollment, AuthStreamSecret } from './resources/auth-stream-enrollment';
import { Balance, BalanceListParams, Balances, BalancesSinglePage } from './resources/balances';
import {
BookTransferCreateParams,
BookTransferListParams,
BookTransferResponse,
BookTransferResponsesCursorPage,
BookTransferRetryParams,
BookTransferReverseParams,
BookTransfers,
} from './resources/book-transfers';
Expand Down Expand Up @@ -196,6 +191,12 @@ import {
TokenizationsCursorPage,
WalletDecisioningInfo,
} from './resources/tokenizations';
import {
TransferLimitListParams,
TransferLimits,
TransferLimitsResponse,
TransferLimitsResponseDataSinglePage,
} from './resources/transfer-limits';
import { Transfer, TransferCreateParams, Transfers } from './resources/transfers';
import {
AccountHolderCreatedWebhookEvent,
Expand Down Expand Up @@ -1028,7 +1029,6 @@ export class Lithic {
'X-Stainless-Retry-Count': String(retryCount),
...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
...getPlatformHeaders(),
'X-Lithic-Pagination': 'cursor',
},
await this.authHeaders(options),
this._options.defaultHeaders,
Expand Down Expand Up @@ -1106,7 +1106,6 @@ export class Lithic {
cards: API.Cards = new API.Cards(this);
cardBulkOrders: API.CardBulkOrders = new API.CardBulkOrders(this);
balances: API.Balances = new API.Balances(this);
aggregateBalances: API.AggregateBalances = new API.AggregateBalances(this);
disputes: API.Disputes = new API.Disputes(this);
disputesV2: API.DisputesV2 = new API.DisputesV2(this);
events: API.Events = new API.Events(this);
Expand All @@ -1129,6 +1128,7 @@ export class Lithic {
fraud: API.Fraud = new API.Fraud(this);
networkPrograms: API.NetworkPrograms = new API.NetworkPrograms(this);
accountActivity: API.AccountActivity = new API.AccountActivity(this);
transferLimits: API.TransferLimits = new API.TransferLimits(this);
webhooks: API.Webhooks = new API.Webhooks(this);
}

Expand All @@ -1141,7 +1141,6 @@ Lithic.Tokenizations = Tokenizations;
Lithic.Cards = Cards;
Lithic.CardBulkOrders = CardBulkOrders;
Lithic.Balances = Balances;
Lithic.AggregateBalances = AggregateBalances;
Lithic.Disputes = Disputes;
Lithic.DisputesV2 = DisputesV2;
Lithic.Events = Events;
Expand All @@ -1164,6 +1163,7 @@ Lithic.FundingEvents = FundingEvents;
Lithic.Fraud = Fraud;
Lithic.NetworkPrograms = NetworkPrograms;
Lithic.AccountActivity = AccountActivity;
Lithic.TransferLimits = TransferLimits;
Lithic.Webhooks = Webhooks;

export declare namespace Lithic {
Expand Down Expand Up @@ -1274,13 +1274,6 @@ export declare namespace Lithic {
type BalanceListParams as BalanceListParams,
};

export {
AggregateBalances as AggregateBalances,
type AggregateBalance as AggregateBalance,
type AggregateBalancesSinglePage as AggregateBalancesSinglePage,
type AggregateBalanceListParams as AggregateBalanceListParams,
};

export {
Disputes as Disputes,
type Dispute as Dispute,
Expand Down Expand Up @@ -1437,6 +1430,7 @@ export declare namespace Lithic {
type BookTransferResponsesCursorPage as BookTransferResponsesCursorPage,
type BookTransferCreateParams as BookTransferCreateParams,
type BookTransferListParams as BookTransferListParams,
type BookTransferRetryParams as BookTransferRetryParams,
type BookTransferReverseParams as BookTransferReverseParams,
};

Expand Down Expand Up @@ -1496,6 +1490,13 @@ export declare namespace Lithic {
type AccountActivityListParams as AccountActivityListParams,
};

export {
TransferLimits as TransferLimits,
type TransferLimitsResponse as TransferLimitsResponse,
type TransferLimitsResponseDataSinglePage as TransferLimitsResponseDataSinglePage,
type TransferLimitListParams as TransferLimitListParams,
};

export {
Webhooks as Webhooks,
type AccountHolderCreatedWebhookEvent as AccountHolderCreatedWebhookEvent,
Expand Down
1 change: 0 additions & 1 deletion src/resources/account-holders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export class AccountHolders extends APIResource {
* },
* control_person: {
* address: { ... },
* birthdate: '1980-04-12',
* dob: '1991-03-08T08:00:00Z',
* email: 'tom@middle-pluto.com',
* first_name: 'Tom',
Expand Down
Loading