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

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/courier-typescript'
if: |-
github.repository == 'stainless-sdks/courier-typescript' &&
!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/courier-typescript'
if: |-
github.repository == 'stainless-sdks/courier-typescript' &&
!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 @@
{
".": "7.7.1"
".": "7.7.2"
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 7.7.2 (2026-03-07)

Full Changelog: [v7.7.1...v7.7.2](https://github.com/trycourier/courier-node/compare/v7.7.1...v7.7.2)

### Bug Fixes

* **client:** preserve URL params already embedded in path ([4a5307f](https://github.com/trycourier/courier-node/commit/4a5307f2571ffebd68ee7fb92f776887cbb2f801))


### Chores

* **ci:** skip uploading artifacts on stainless-internal branches ([982eea2](https://github.com/trycourier/courier-node/commit/982eea2623aed2b3f0657ddab135b5528361164e))
* **internal:** codegen related update ([4549f6e](https://github.com/trycourier/courier-node/commit/4549f6e148d525bf189113c50c840484e6718d62))

## 7.7.1 (2026-03-03)

Full Changelog: [v7.7.0...v7.7.1](https://github.com/trycourier/courier-node/compare/v7.7.0...v7.7.1)
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": "@trycourier/courier",
"version": "7.7.1",
"version": "7.7.2",
"description": "The official TypeScript library for the Courier API",
"author": "Courier <support@courier.com>",
"types": "dist/index.d.ts",
Expand Down
11 changes: 6 additions & 5 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,9 @@ export class Courier {
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));

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

if (typeof query === 'object' && query && !Array.isArray(query)) {
Expand Down Expand Up @@ -674,9 +675,9 @@ export class Courier {
}
}

// 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, just do what it
// says, but 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 = '7.7.1'; // x-release-please-version
export const VERSION = '7.7.2'; // x-release-please-version