Skip to content
Merged
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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,18 @@ jobs:
run: ./scripts/build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/runloop-node'
if: |-
github.repository == 'stainless-sdks/runloop-node' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/runloop-node'
if: |-
github.repository == 'stainless-sdks/runloop-node' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.10.3"
".": "1.11.0"
}
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## 1.11.0 (2026-03-10)

Full Changelog: [v1.10.3...v1.11.0](https://github.com/runloopai/api-client-ts/compare/v1.10.3...v1.11.0)

### Features

* **documentation:** added self-documenting examples ([#733](https://github.com/runloopai/api-client-ts/issues/733)) ([c11402d](https://github.com/runloopai/api-client-ts/commit/c11402d2c8e8493dd05dad63316280921429ee94))
* replace polling with long-poll loop for wait endpoints ([#745](https://github.com/runloopai/api-client-ts/issues/745)) ([9c81c01](https://github.com/runloopai/api-client-ts/commit/9c81c0127354cbabd210a06e556ee52d6ce055b5))
* **sdk:** added secrets as first class concepts and examples ([#739](https://github.com/runloopai/api-client-ts/issues/739)) ([c82944a](https://github.com/runloopai/api-client-ts/commit/c82944a8ffd5342073c247edad72a7ddf69490b7))


### Bug Fixes

* add logs to devboxes, smoke tests & examples ([#742](https://github.com/runloopai/api-client-ts/issues/742)) ([0462122](https://github.com/runloopai/api-client-ts/commit/04621224e5dde6fef942da969fbed84f19053066))
* **client:** preserve URL params already embedded in path ([1a4be5a](https://github.com/runloopai/api-client-ts/commit/1a4be5aaf6597727628db2ebd953f332f0d6fbd4))
* default initial timeout delay for polling reduced to 0 seconds ([#744](https://github.com/runloopai/api-client-ts/issues/744)) ([8694d51](https://github.com/runloopai/api-client-ts/commit/8694d51658fbca53e90f0fa8826eee600768292f))


### Chores

* **ci:** skip uploading artifacts on stainless-internal branches ([7a33109](https://github.com/runloopai/api-client-ts/commit/7a33109ddeb30309f25065b9465045f6d9655da2))
* **documentation:** correct exec advice ([#738](https://github.com/runloopai/api-client-ts/issues/738)) ([4d9624c](https://github.com/runloopai/api-client-ts/commit/4d9624c80bfa4ab1f8490ca093307c0d961a930d))
* **documentation:** fix some broken links and bad example code ([#736](https://github.com/runloopai/api-client-ts/issues/736)) ([842c9bc](https://github.com/runloopai/api-client-ts/commit/842c9bc2ec33aba85ec4b943ebfe86527ec49d05))
* fix smoketest tunnel removal ([#735](https://github.com/runloopai/api-client-ts/issues/735)) ([2b15fa6](https://github.com/runloopai/api-client-ts/commit/2b15fa6f9ea185256d8a2b25008643b12dd6b732))
* **internal:** codegen related update ([7fd0cfd](https://github.com/runloopai/api-client-ts/commit/7fd0cfdf43c2136e019799622cdc514711cb8aaa))
* shard smoketests in workflow ([#743](https://github.com/runloopai/api-client-ts/issues/743)) ([ea55929](https://github.com/runloopai/api-client-ts/commit/ea5592921982a98baaf6766d934f0a2cec079178))
* **test:** do not count install time for mock server timeout ([d0cdc76](https://github.com/runloopai/api-client-ts/commit/d0cdc76bab4382caa170a51e405b7e79c7c13ab4))
* update placeholder string ([77a7e9a](https://github.com/runloopai/api-client-ts/commit/77a7e9aadcd9d470dd059cf6ecd2f76eb3ada470))

## 1.10.3 (2026-02-27)

Full Changelog: [v1.10.2...v1.10.3](https://github.com/runloopai/api-client-ts/compare/v1.10.2...v1.10.3)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@runloop/api-client",
"version": "1.10.3",
"version": "1.11.0",
"description": "The official TypeScript library for the Runloop API",
"author": "Runloop <support@runloop.ai>",
"types": "dist/sdk.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
11 changes: 6 additions & 5 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,9 @@ export abstract class APIClient {
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));

const defaultQuery = this.defaultQuery();
if (!isEmptyObj(defaultQuery)) {
query = { ...defaultQuery, ...query } as Req;
const pathQuery = Object.fromEntries(url.searchParams);
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
query = { ...pathQuery, ...defaultQuery, ...query } as Req;
}

if (typeof query === 'object' && query && !Array.isArray(query)) {
Expand Down Expand Up @@ -632,9 +633,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
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '1.10.3'; // x-release-please-version
export const VERSION = '1.11.0'; // x-release-please-version
2 changes: 1 addition & 1 deletion tests/api-resources/devboxes/devboxes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ describe('resource devboxes', () => {
test('uploadFile: required and optional params', async () => {
const response = await client.devboxes.uploadFile('id', {
path: 'path',
file: await toFile(Buffer.from('# my file contents'), 'README.md'),
file: await toFile(Buffer.from('Example data'), 'README.md'),
});
});

Expand Down
Loading