Skip to content

Commit 82c83dc

Browse files
Merge pull request #651 from orbcorp/release-please--branches--main--changes--next--components--orb-billing
release: 5.45.0
2 parents 1436780 + 1ab3585 commit 82c83dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+29298
-602
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,18 @@ jobs:
5555
run: ./scripts/build
5656

5757
- name: Get GitHub OIDC Token
58-
if: github.repository == 'stainless-sdks/orb-node'
58+
if: |-
59+
github.repository == 'stainless-sdks/orb-node' &&
60+
!startsWith(github.ref, 'refs/heads/stl/')
5961
id: github-oidc
6062
uses: actions/github-script@v8
6163
with:
6264
script: core.setOutput('github_token', await core.getIDToken());
6365

6466
- name: Upload tarball
65-
if: github.repository == 'stainless-sdks/orb-node'
67+
if: |-
68+
github.repository == 'stainless-sdks/orb-node' &&
69+
!startsWith(github.ref, 'refs/heads/stl/')
6670
env:
6771
URL: https://pkg.stainless.com/s
6872
AUTH: ${{ steps.github-oidc.outputs.github_token }}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "5.44.0"
2+
".": "5.45.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 126
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-931771ff4ab183044ee50ce43ea794ac0a15bfafbaf7df61ac0344af3ff08944.yml
3-
openapi_spec_hash: 71371804e373f662585284bf5d93cc62
4-
config_hash: bcf82bddb691f6be773ac6cae8c03b9a
1+
configured_endpoints: 139
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-6b1440d47f0b1b1b92f2e40f9ad5efd301d90f66e2e05c5a932902608935aa64.yml
3+
openapi_spec_hash: 14f386604d0d87d9459352b8a7b84eff
4+
config_hash: c01c1191b1cd696c7ca855ff6d28a8df

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
# Changelog
22

3+
## 5.45.0 (2026-03-13)
4+
5+
Full Changelog: [v5.44.0...v5.45.0](https://github.com/orbcorp/orb-node/compare/v5.44.0...v5.45.0)
6+
7+
### Features
8+
9+
* **api:** api update ([9594849](https://github.com/orbcorp/orb-node/commit/9594849e01bee424c4577c188d3a9ea05e213244))
10+
* **api:** api update ([fc0292b](https://github.com/orbcorp/orb-node/commit/fc0292bb065e65eba0010879df704f97b422ca41))
11+
* **api:** api update ([295182a](https://github.com/orbcorp/orb-node/commit/295182a5de863633a751117d261047c830bc499d))
12+
* **api:** api update ([4e98ace](https://github.com/orbcorp/orb-node/commit/4e98ace57d456ad4e77421ae74eab18ade208ce7))
13+
* **api:** api update ([bfe8270](https://github.com/orbcorp/orb-node/commit/bfe8270c1e7aaa297e8dc5258f0e9bc905f3a88a))
14+
* **api:** api update ([57b665f](https://github.com/orbcorp/orb-node/commit/57b665f8d62be71de028d9d2944cacabb41edfc8))
15+
* **api:** api update ([a8fe88d](https://github.com/orbcorp/orb-node/commit/a8fe88da2c64e76c8bff26161dc97a29f8110909))
16+
* **api:** api update ([c76b284](https://github.com/orbcorp/orb-node/commit/c76b2844ff044681670d98568efd179058783f6f))
17+
* **api:** api update ([720c5a3](https://github.com/orbcorp/orb-node/commit/720c5a3e0989b93ee36734ef09e7d3795fe3a2dc))
18+
* **api:** api update ([1ddb26c](https://github.com/orbcorp/orb-node/commit/1ddb26ca1c2f60891ef1a11a7a1182a8ea4483d3))
19+
* **api:** api update ([5476617](https://github.com/orbcorp/orb-node/commit/5476617ca804ee1de20da3f084b8d9d02ad7e361))
20+
* **api:** manual updates ([d6168c3](https://github.com/orbcorp/orb-node/commit/d6168c30d48d79be48dc074b8c61350354cdbe69))
21+
22+
23+
### Bug Fixes
24+
25+
* **client:** preserve URL params already embedded in path ([ff159b3](https://github.com/orbcorp/orb-node/commit/ff159b3a11672e6cf9a9bd37df098b5373e7dd97))
26+
* **docs/contributing:** correct pnpm link command ([69cfdec](https://github.com/orbcorp/orb-node/commit/69cfdec7ae1c862e6430fedba7a1534257153054))
27+
* fix request delays for retrying to be more respectful of high requested delays ([e28e89e](https://github.com/orbcorp/orb-node/commit/e28e89e3828daee3333582f654b9811611027357))
28+
29+
30+
### Chores
31+
32+
* **ci:** skip uploading artifacts on stainless-internal branches ([c0dc840](https://github.com/orbcorp/orb-node/commit/c0dc84020c1a346e76d23f474f847485c818a016))
33+
* **docs:** add missing descriptions ([bb3d420](https://github.com/orbcorp/orb-node/commit/bb3d420ec711c7783d7ebf84a3fc3188dafc65e2))
34+
* **docs:** remove www prefix ([37e00fc](https://github.com/orbcorp/orb-node/commit/37e00fc4e60ac1107d74b83a1d2057aad91d13b5))
35+
* **internal:** codegen related update ([43c7ba8](https://github.com/orbcorp/orb-node/commit/43c7ba830b0546c01132ae9a333f631186706ff7))
36+
* **internal:** codegen related update ([8128355](https://github.com/orbcorp/orb-node/commit/8128355f63538b59a5be56e67397b65a1ca560f9))
37+
* **internal:** move stringifyQuery implementation to internal function ([cd14352](https://github.com/orbcorp/orb-node/commit/cd1435211504da9a1c270636477b1dd60904d522))
38+
* **test:** do not count install time for mock server timeout ([352ee5f](https://github.com/orbcorp/orb-node/commit/352ee5fcb680e65bf7a5f65182f9ade565a45f4e))
39+
* **tests:** update mock server to steady ([413ace9](https://github.com/orbcorp/orb-node/commit/413ace90a673b6a7d75d1803433710b9b1c1e802))
40+
* update mock server docs ([7186ac0](https://github.com/orbcorp/orb-node/commit/7186ac06f4803670d98bc10c97ee5bfce1a0b7f3))
41+
342
## 5.44.0 (2026-02-03)
443

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

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ $ yarn link orb-billing
6060
# With pnpm
6161
$ pnpm link --global
6262
$ cd ../my-package
63-
$ pnpm link -global orb-billing
63+
$ pnpm link --global orb-billing
6464
```
6565

6666
## Running tests
6767

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

7070
```sh
71-
$ npx prism mock path/to/your/openapi.yml
71+
$ ./scripts/mock
7272
```
7373

7474
```sh

api.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ Methods:
355355
Types:
356356

357357
- <code><a href="./src/resources/invoices.ts">InvoiceFetchUpcomingResponse</a></code>
358+
- <code><a href="./src/resources/invoices.ts">InvoiceIssueSummaryResponse</a></code>
358359
- <code><a href="./src/resources/invoices.ts">InvoiceListSummaryResponse</a></code>
359360

360361
Methods:
@@ -366,6 +367,7 @@ Methods:
366367
- <code title="get /invoices/{invoice_id}">client.invoices.<a href="./src/resources/invoices.ts">fetch</a>(invoiceId) -> Invoice</code>
367368
- <code title="get /invoices/upcoming">client.invoices.<a href="./src/resources/invoices.ts">fetchUpcoming</a>({ ...params }) -> InvoiceFetchUpcomingResponse</code>
368369
- <code title="post /invoices/{invoice_id}/issue">client.invoices.<a href="./src/resources/invoices.ts">issue</a>(invoiceId, { ...params }) -> Invoice</code>
370+
- <code title="post /invoices/summary/{invoice_id}/issue">client.invoices.<a href="./src/resources/invoices.ts">issueSummary</a>(invoiceId, { ...params }) -> InvoiceIssueSummaryResponse</code>
369371
- <code title="get /invoices/summary">client.invoices.<a href="./src/resources/invoices.ts">listSummary</a>({ ...params }) -> InvoiceListSummaryResponsesPage</code>
370372
- <code title="post /invoices/{invoice_id}/mark_paid">client.invoices.<a href="./src/resources/invoices.ts">markPaid</a>(invoiceId, { ...params }) -> Invoice</code>
371373
- <code title="post /invoices/{invoice_id}/pay">client.invoices.<a href="./src/resources/invoices.ts">pay</a>(invoiceId) -> Invoice</code>
@@ -575,8 +577,64 @@ Methods:
575577
Types:
576578

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

579582
Methods:
580583

581584
- <code title="get /credit_blocks/{block_id}">client.creditBlocks.<a href="./src/resources/credit-blocks.ts">retrieve</a>(blockId) -> CreditBlockRetrieveResponse</code>
582585
- <code title="delete /credit_blocks/{block_id}">client.creditBlocks.<a href="./src/resources/credit-blocks.ts">delete</a>(blockId) -> void</code>
586+
- <code title="get /credit_blocks/{block_id}/invoices">client.creditBlocks.<a href="./src/resources/credit-blocks.ts">listInvoices</a>(blockId) -> CreditBlockListInvoicesResponse</code>
587+
588+
# LicenseTypes
589+
590+
Types:
591+
592+
- <code><a href="./src/resources/license-types.ts">LicenseTypeCreateResponse</a></code>
593+
- <code><a href="./src/resources/license-types.ts">LicenseTypeRetrieveResponse</a></code>
594+
- <code><a href="./src/resources/license-types.ts">LicenseTypeListResponse</a></code>
595+
596+
Methods:
597+
598+
- <code title="post /license_types">client.licenseTypes.<a href="./src/resources/license-types.ts">create</a>({ ...params }) -> LicenseTypeCreateResponse</code>
599+
- <code title="get /license_types/{license_type_id}">client.licenseTypes.<a href="./src/resources/license-types.ts">retrieve</a>(licenseTypeId) -> LicenseTypeRetrieveResponse</code>
600+
- <code title="get /license_types">client.licenseTypes.<a href="./src/resources/license-types.ts">list</a>({ ...params }) -> LicenseTypeListResponsesPage</code>
601+
602+
# Licenses
603+
604+
Types:
605+
606+
- <code><a href="./src/resources/licenses/licenses.ts">LicenseCreateResponse</a></code>
607+
- <code><a href="./src/resources/licenses/licenses.ts">LicenseRetrieveResponse</a></code>
608+
- <code><a href="./src/resources/licenses/licenses.ts">LicenseListResponse</a></code>
609+
- <code><a href="./src/resources/licenses/licenses.ts">LicenseDeactivateResponse</a></code>
610+
- <code><a href="./src/resources/licenses/licenses.ts">LicenseRetrieveByExternalIDResponse</a></code>
611+
612+
Methods:
613+
614+
- <code title="post /licenses">client.licenses.<a href="./src/resources/licenses/licenses.ts">create</a>({ ...params }) -> LicenseCreateResponse</code>
615+
- <code title="get /licenses/{license_id}">client.licenses.<a href="./src/resources/licenses/licenses.ts">retrieve</a>(licenseId) -> LicenseRetrieveResponse</code>
616+
- <code title="get /licenses">client.licenses.<a href="./src/resources/licenses/licenses.ts">list</a>({ ...params }) -> LicenseListResponsesPage</code>
617+
- <code title="post /licenses/{license_id}/deactivate">client.licenses.<a href="./src/resources/licenses/licenses.ts">deactivate</a>(licenseId, { ...params }) -> LicenseDeactivateResponse</code>
618+
- <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>
619+
620+
## ExternalLicenses
621+
622+
Types:
623+
624+
- <code><a href="./src/resources/licenses/external-licenses.ts">ExternalLicenseGetUsageResponse</a></code>
625+
626+
Methods:
627+
628+
- <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>
629+
630+
## Usage
631+
632+
Types:
633+
634+
- <code><a href="./src/resources/licenses/usage.ts">UsageGetAllUsageResponse</a></code>
635+
- <code><a href="./src/resources/licenses/usage.ts">UsageGetUsageResponse</a></code>
636+
637+
Methods:
638+
639+
- <code title="get /licenses/usage">client.licenses.usage.<a href="./src/resources/licenses/usage.ts">getAllUsage</a>({ ...params }) -> UsageGetAllUsageResponse</code>
640+
- <code title="get /licenses/{license_id}/usage">client.licenses.usage.<a href="./src/resources/licenses/usage.ts">getUsage</a>(licenseId, { ...params }) -> UsageGetUsageResponse</code>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "orb-billing",
3-
"version": "5.44.0",
3+
"version": "5.45.0",
44
"description": "The official TypeScript library for the Orb API",
55
"author": "Orb <team@withorb.com>",
66
"types": "dist/index.d.ts",

scripts/mock

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,34 @@ fi
1919

2020
echo "==> Starting mock server with URL ${URL}"
2121

22-
# Run prism mock on the given spec
22+
# Run steady mock on the given spec
2323
if [ "$1" == "--daemon" ]; then
24-
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
24+
# Pre-install the package so the download doesn't eat into the startup timeout
25+
npm exec --package=@stdy/cli@0.19.3 -- steady --version
2526

26-
# Wait for server to come online
27+
npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log &
28+
29+
# Wait for server to come online via health endpoint (max 30s)
2730
echo -n "Waiting for server"
28-
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
31+
attempts=0
32+
while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do
33+
if ! kill -0 $! 2>/dev/null; then
34+
echo
35+
cat .stdy.log
36+
exit 1
37+
fi
38+
attempts=$((attempts + 1))
39+
if [ "$attempts" -ge 300 ]; then
40+
echo
41+
echo "Timed out waiting for Steady server to start"
42+
cat .stdy.log
43+
exit 1
44+
fi
2945
echo -n "."
3046
sleep 0.1
3147
done
3248

33-
if grep -q "✖ fatal" ".prism.log"; then
34-
cat .prism.log
35-
exit 1
36-
fi
37-
3849
echo
3950
else
40-
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
51+
npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets "$URL"
4152
fi

scripts/test

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ GREEN='\033[0;32m'
99
YELLOW='\033[0;33m'
1010
NC='\033[0m' # No Color
1111

12-
function prism_is_running() {
13-
curl --silent "http://localhost:4010" >/dev/null 2>&1
12+
function steady_is_running() {
13+
curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1
1414
}
1515

1616
kill_server_on_port() {
@@ -25,7 +25,7 @@ function is_overriding_api_base_url() {
2525
[ -n "$TEST_API_BASE_URL" ]
2626
}
2727

28-
if ! is_overriding_api_base_url && ! prism_is_running ; then
28+
if ! is_overriding_api_base_url && ! steady_is_running ; then
2929
# When we exit this script, make sure to kill the background mock server process
3030
trap 'kill_server_on_port 4010' EXIT
3131

@@ -36,19 +36,19 @@ fi
3636
if is_overriding_api_base_url ; then
3737
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
3838
echo
39-
elif ! prism_is_running ; then
40-
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
39+
elif ! steady_is_running ; then
40+
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server"
4141
echo -e "running against your OpenAPI spec."
4242
echo
4343
echo -e "To run the server, pass in the path or url of your OpenAPI"
44-
echo -e "spec to the prism command:"
44+
echo -e "spec to the steady command:"
4545
echo
46-
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
46+
echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets${NC}"
4747
echo
4848

4949
exit 1
5050
else
51-
echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
51+
echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}"
5252
echo
5353
fi
5454

src/core.ts

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
APIConnectionTimeoutError,
77
APIUserAbortError,
88
} from './error';
9+
import { stringifyQuery } from './internal/utils/query';
910
import {
1011
kind as shimsKind,
1112
type Readable,
@@ -523,32 +524,20 @@ export abstract class APIClient {
523524
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
524525

525526
const defaultQuery = this.defaultQuery();
526-
if (!isEmptyObj(defaultQuery)) {
527-
query = { ...defaultQuery, ...query } as Req;
527+
const pathQuery = Object.fromEntries(url.searchParams);
528+
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
529+
query = { ...pathQuery, ...defaultQuery, ...query } as Req;
528530
}
529531

530532
if (typeof query === 'object' && query && !Array.isArray(query)) {
531-
url.search = this.stringifyQuery(query as Record<string, unknown>);
533+
url.search = this.stringifyQuery(query);
532534
}
533535

534536
return url.toString();
535537
}
536538

537-
protected stringifyQuery(query: Record<string, unknown>): string {
538-
return Object.entries(query)
539-
.filter(([_, value]) => typeof value !== 'undefined')
540-
.map(([key, value]) => {
541-
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
542-
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
543-
}
544-
if (value === null) {
545-
return `${encodeURIComponent(key)}=`;
546-
}
547-
throw new OrbError(
548-
`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.`,
549-
);
550-
})
551-
.join('&');
539+
protected stringifyQuery(query: object | Record<string, unknown>): string {
540+
return stringifyQuery(query);
552541
}
553542

554543
async fetchWithTimeout(
@@ -630,9 +619,9 @@ export abstract class APIClient {
630619
}
631620
}
632621

633-
// If the API asks us to wait a certain amount of time (and it's a reasonable amount),
634-
// just do what it says, but otherwise calculate a default
635-
if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
622+
// If the API asks us to wait a certain amount of time, do what it says.
623+
// Otherwise calculate a default.
624+
if (timeoutMillis === undefined) {
636625
const maxRetries = options.maxRetries ?? this.maxRetries;
637626
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
638627
}

0 commit comments

Comments
 (0)