Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
37e00fc
chore(docs): remove www prefix
stainless-app[bot] Feb 4, 2026
5476617
feat(api): api update
stainless-app[bot] Feb 10, 2026
8d354da
codegen metadata
stainless-app[bot] Feb 11, 2026
8128355
chore(internal): codegen related update
stainless-app[bot] Feb 11, 2026
1ddb26c
feat(api): api update
stainless-app[bot] Feb 12, 2026
d6168c3
feat(api): manual updates
stainless-app[bot] Feb 12, 2026
720c5a3
feat(api): api update
stainless-app[bot] Feb 16, 2026
c76b284
feat(api): api update
stainless-app[bot] Feb 18, 2026
a8fe88d
feat(api): api update
stainless-app[bot] Feb 19, 2026
7186ac0
chore: update mock server docs
stainless-app[bot] Feb 19, 2026
57b665f
feat(api): api update
stainless-app[bot] Feb 21, 2026
69cfdec
fix(docs/contributing): correct pnpm link command
stainless-app[bot] Feb 23, 2026
cd14352
chore(internal): move stringifyQuery implementation to internal function
stainless-app[bot] Feb 26, 2026
bb3d420
chore(docs): add missing descriptions
stainless-app[bot] Mar 5, 2026
bfe8270
feat(api): api update
stainless-app[bot] Feb 27, 2026
4e98ace
feat(api): api update
stainless-app[bot] Mar 4, 2026
e28e89e
fix: fix request delays for retrying to be more respectful of high re…
stainless-app[bot] Mar 5, 2026
352ee5f
chore(test): do not count install time for mock server timeout
stainless-app[bot] Mar 5, 2026
295182a
feat(api): api update
stainless-app[bot] Mar 5, 2026
43c7ba8
chore(internal): codegen related update
stainless-app[bot] Mar 5, 2026
fc0292b
feat(api): api update
stainless-app[bot] Mar 7, 2026
67b93c5
release: 5.45.0
stainless-app[bot] Mar 7, 2026
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "5.44.0"
".": "5.45.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 126
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-931771ff4ab183044ee50ce43ea794ac0a15bfafbaf7df61ac0344af3ff08944.yml
openapi_spec_hash: 71371804e373f662585284bf5d93cc62
config_hash: bcf82bddb691f6be773ac6cae8c03b9a
configured_endpoints: 139
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d6a851f21804170f796637f1911c3382f1c57f5ed6b9b77cd7d0c6f74c06e174.yml
openapi_spec_hash: 82df33badf54d0c7087a61145d379f58
config_hash: 3279841440b02d4e8303c961d6983492
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Changelog

## 5.45.0 (2026-03-07)

Full Changelog: [v5.44.0...v5.45.0](https://github.com/orbcorp/orb-node/compare/v5.44.0...v5.45.0)

### Features

* **api:** api update ([fc0292b](https://github.com/orbcorp/orb-node/commit/fc0292bb065e65eba0010879df704f97b422ca41))
* **api:** api update ([295182a](https://github.com/orbcorp/orb-node/commit/295182a5de863633a751117d261047c830bc499d))
* **api:** api update ([4e98ace](https://github.com/orbcorp/orb-node/commit/4e98ace57d456ad4e77421ae74eab18ade208ce7))
* **api:** api update ([bfe8270](https://github.com/orbcorp/orb-node/commit/bfe8270c1e7aaa297e8dc5258f0e9bc905f3a88a))
* **api:** api update ([57b665f](https://github.com/orbcorp/orb-node/commit/57b665f8d62be71de028d9d2944cacabb41edfc8))
* **api:** api update ([a8fe88d](https://github.com/orbcorp/orb-node/commit/a8fe88da2c64e76c8bff26161dc97a29f8110909))
* **api:** api update ([c76b284](https://github.com/orbcorp/orb-node/commit/c76b2844ff044681670d98568efd179058783f6f))
* **api:** api update ([720c5a3](https://github.com/orbcorp/orb-node/commit/720c5a3e0989b93ee36734ef09e7d3795fe3a2dc))
* **api:** api update ([1ddb26c](https://github.com/orbcorp/orb-node/commit/1ddb26ca1c2f60891ef1a11a7a1182a8ea4483d3))
* **api:** api update ([5476617](https://github.com/orbcorp/orb-node/commit/5476617ca804ee1de20da3f084b8d9d02ad7e361))
* **api:** manual updates ([d6168c3](https://github.com/orbcorp/orb-node/commit/d6168c30d48d79be48dc074b8c61350354cdbe69))


### Bug Fixes

* **docs/contributing:** correct pnpm link command ([69cfdec](https://github.com/orbcorp/orb-node/commit/69cfdec7ae1c862e6430fedba7a1534257153054))
* fix request delays for retrying to be more respectful of high requested delays ([e28e89e](https://github.com/orbcorp/orb-node/commit/e28e89e3828daee3333582f654b9811611027357))


### Chores

* **docs:** add missing descriptions ([bb3d420](https://github.com/orbcorp/orb-node/commit/bb3d420ec711c7783d7ebf84a3fc3188dafc65e2))
* **docs:** remove www prefix ([37e00fc](https://github.com/orbcorp/orb-node/commit/37e00fc4e60ac1107d74b83a1d2057aad91d13b5))
* **internal:** codegen related update ([43c7ba8](https://github.com/orbcorp/orb-node/commit/43c7ba830b0546c01132ae9a333f631186706ff7))
* **internal:** codegen related update ([8128355](https://github.com/orbcorp/orb-node/commit/8128355f63538b59a5be56e67397b65a1ca560f9))
* **internal:** move stringifyQuery implementation to internal function ([cd14352](https://github.com/orbcorp/orb-node/commit/cd1435211504da9a1c270636477b1dd60904d522))
* **test:** do not count install time for mock server timeout ([352ee5f](https://github.com/orbcorp/orb-node/commit/352ee5fcb680e65bf7a5f65182f9ade565a45f4e))
* update mock server docs ([7186ac0](https://github.com/orbcorp/orb-node/commit/7186ac06f4803670d98bc10c97ee5bfce1a0b7f3))

## 5.44.0 (2026-02-03)

Full Changelog: [v5.43.0...v5.44.0](https://github.com/orbcorp/orb-node/compare/v5.43.0...v5.44.0)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ $ yarn link orb-billing
# With pnpm
$ pnpm link --global
$ cd ../my-package
$ pnpm link -global orb-billing
$ pnpm link --global orb-billing
```

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```sh
$ npx prism mock path/to/your/openapi.yml
$ ./scripts/mock
```

```sh
Expand Down
58 changes: 58 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ Methods:
Types:

- <code><a href="./src/resources/invoices.ts">InvoiceFetchUpcomingResponse</a></code>
- <code><a href="./src/resources/invoices.ts">InvoiceIssueSummaryResponse</a></code>
- <code><a href="./src/resources/invoices.ts">InvoiceListSummaryResponse</a></code>

Methods:
Expand All @@ -366,6 +367,7 @@ Methods:
- <code title="get /invoices/{invoice_id}">client.invoices.<a href="./src/resources/invoices.ts">fetch</a>(invoiceId) -> Invoice</code>
- <code title="get /invoices/upcoming">client.invoices.<a href="./src/resources/invoices.ts">fetchUpcoming</a>({ ...params }) -> InvoiceFetchUpcomingResponse</code>
- <code title="post /invoices/{invoice_id}/issue">client.invoices.<a href="./src/resources/invoices.ts">issue</a>(invoiceId, { ...params }) -> Invoice</code>
- <code title="post /invoices/summary/{invoice_id}/issue">client.invoices.<a href="./src/resources/invoices.ts">issueSummary</a>(invoiceId, { ...params }) -> InvoiceIssueSummaryResponse</code>
- <code title="get /invoices/summary">client.invoices.<a href="./src/resources/invoices.ts">listSummary</a>({ ...params }) -> InvoiceListSummaryResponsesPage</code>
- <code title="post /invoices/{invoice_id}/mark_paid">client.invoices.<a href="./src/resources/invoices.ts">markPaid</a>(invoiceId, { ...params }) -> Invoice</code>
- <code title="post /invoices/{invoice_id}/pay">client.invoices.<a href="./src/resources/invoices.ts">pay</a>(invoiceId) -> Invoice</code>
Expand Down Expand Up @@ -575,8 +577,64 @@ Methods:
Types:

- <code><a href="./src/resources/credit-blocks.ts">CreditBlockRetrieveResponse</a></code>
- <code><a href="./src/resources/credit-blocks.ts">CreditBlockListInvoicesResponse</a></code>

Methods:

- <code title="get /credit_blocks/{block_id}">client.creditBlocks.<a href="./src/resources/credit-blocks.ts">retrieve</a>(blockId) -> CreditBlockRetrieveResponse</code>
- <code title="delete /credit_blocks/{block_id}">client.creditBlocks.<a href="./src/resources/credit-blocks.ts">delete</a>(blockId) -> void</code>
- <code title="get /credit_blocks/{block_id}/invoices">client.creditBlocks.<a href="./src/resources/credit-blocks.ts">listInvoices</a>(blockId) -> CreditBlockListInvoicesResponse</code>

# LicenseTypes

Types:

- <code><a href="./src/resources/license-types.ts">LicenseTypeCreateResponse</a></code>
- <code><a href="./src/resources/license-types.ts">LicenseTypeRetrieveResponse</a></code>
- <code><a href="./src/resources/license-types.ts">LicenseTypeListResponse</a></code>

Methods:

- <code title="post /license_types">client.licenseTypes.<a href="./src/resources/license-types.ts">create</a>({ ...params }) -> LicenseTypeCreateResponse</code>
- <code title="get /license_types/{license_type_id}">client.licenseTypes.<a href="./src/resources/license-types.ts">retrieve</a>(licenseTypeId) -> LicenseTypeRetrieveResponse</code>
- <code title="get /license_types">client.licenseTypes.<a href="./src/resources/license-types.ts">list</a>({ ...params }) -> LicenseTypeListResponsesPage</code>

# Licenses

Types:

- <code><a href="./src/resources/licenses/licenses.ts">LicenseCreateResponse</a></code>
- <code><a href="./src/resources/licenses/licenses.ts">LicenseRetrieveResponse</a></code>
- <code><a href="./src/resources/licenses/licenses.ts">LicenseListResponse</a></code>
- <code><a href="./src/resources/licenses/licenses.ts">LicenseDeactivateResponse</a></code>
- <code><a href="./src/resources/licenses/licenses.ts">LicenseRetrieveByExternalIDResponse</a></code>

Methods:

- <code title="post /licenses">client.licenses.<a href="./src/resources/licenses/licenses.ts">create</a>({ ...params }) -> LicenseCreateResponse</code>
- <code title="get /licenses/{license_id}">client.licenses.<a href="./src/resources/licenses/licenses.ts">retrieve</a>(licenseId) -> LicenseRetrieveResponse</code>
- <code title="get /licenses">client.licenses.<a href="./src/resources/licenses/licenses.ts">list</a>({ ...params }) -> LicenseListResponsesPage</code>
- <code title="post /licenses/{license_id}/deactivate">client.licenses.<a href="./src/resources/licenses/licenses.ts">deactivate</a>(licenseId, { ...params }) -> LicenseDeactivateResponse</code>
- <code title="get /licenses/external_license_id/{external_license_id}">client.licenses.<a href="./src/resources/licenses/licenses.ts">retrieveByExternalId</a>(externalLicenseId, { ...params }) -> LicenseRetrieveByExternalIDResponse</code>

## ExternalLicenses

Types:

- <code><a href="./src/resources/licenses/external-licenses.ts">ExternalLicenseGetUsageResponse</a></code>

Methods:

- <code title="get /licenses/external_licenses/{external_license_id}/usage">client.licenses.externalLicenses.<a href="./src/resources/licenses/external-licenses.ts">getUsage</a>(externalLicenseId, { ...params }) -> ExternalLicenseGetUsageResponse</code>

## Usage

Types:

- <code><a href="./src/resources/licenses/usage.ts">UsageGetAllUsageResponse</a></code>
- <code><a href="./src/resources/licenses/usage.ts">UsageGetUsageResponse</a></code>

Methods:

- <code title="get /licenses/usage">client.licenses.usage.<a href="./src/resources/licenses/usage.ts">getAllUsage</a>({ ...params }) -> UsageGetAllUsageResponse</code>
- <code title="get /licenses/{license_id}/usage">client.licenses.usage.<a href="./src/resources/licenses/usage.ts">getUsage</a>(licenseId, { ...params }) -> UsageGetUsageResponse</code>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orb-billing",
"version": "5.44.0",
"version": "5.45.0",
"description": "The official TypeScript library for the Orb API",
"author": "Orb <team@withorb.com>",
"types": "dist/index.d.ts",
Expand Down
13 changes: 12 additions & 1 deletion scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version

npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
# Wait for server to come online (max 30s)
echo -n "Waiting for server"
attempts=0
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
attempts=$((attempts + 1))
if [ "$attempts" -ge 300 ]; then
echo
echo "Timed out waiting for Prism server to start"
cat .prism.log
exit 1
fi
echo -n "."
sleep 0.1
done
Expand Down
26 changes: 7 additions & 19 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
APIConnectionTimeoutError,
APIUserAbortError,
} from './error';
import { stringifyQuery } from './internal/utils/query';
import {
kind as shimsKind,
type Readable,
Expand Down Expand Up @@ -528,27 +529,14 @@ export abstract class APIClient {
}

if (typeof query === 'object' && query && !Array.isArray(query)) {
url.search = this.stringifyQuery(query as Record<string, unknown>);
url.search = this.stringifyQuery(query);
}

return url.toString();
}

protected stringifyQuery(query: Record<string, unknown>): string {
return Object.entries(query)
.filter(([_, value]) => typeof value !== 'undefined')
.map(([key, value]) => {
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
}
if (value === null) {
return `${encodeURIComponent(key)}=`;
}
throw new OrbError(
`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
);
})
.join('&');
protected stringifyQuery(query: object | Record<string, unknown>): string {
return stringifyQuery(query);
}

async fetchWithTimeout(
Expand Down Expand Up @@ -630,9 +618,9 @@ export abstract class APIClient {
}
}

// If the API asks us to wait a certain amount of time (and it's a reasonable amount),
// just do what it says, but otherwise calculate a default
if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
// If the API asks us to wait a certain amount of time, do what it says.
// Otherwise calculate a default.
if (timeoutMillis === undefined) {
const maxRetries = options.maxRetries ?? this.maxRetries;
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
}
Expand Down
Loading
Loading