Skip to content

Commit 0e0d4ad

Browse files
release: 1.17.0 (#133)
* chore: do not install brew dependencies in ./scripts/bootstrap by default * codegen metadata * feat(api): set idempotency key header by default * release: 1.17.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent a7d1017 commit 0e0d4ad

File tree

8 files changed

+41
-9
lines changed

8 files changed

+41
-9
lines changed

.release-please-manifest.json

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

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 89
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-3f1e8172e76e9b64239788a7794aa29d1391e914ee3af7b596a5d1ea62555dd7.yml
3-
openapi_spec_hash: 9ad2e5c838b52d2b7f95bb834fef35c4
4-
config_hash: 5c872aa99cad9b9602e84668f5b38a8a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-136d5581336ab6045b79d359da71a5f87934d56224bdd0f87a7c1fd6b767f46e.yml
3+
openapi_spec_hash: 16d5e78a2ccf0aa2de3c83cfd4f60832
4+
config_hash: 9dc38647849223e579325a016fc5eeb4

CHANGELOG.md

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

3+
## 1.17.0 (2025-09-22)
4+
5+
Full Changelog: [v1.16.0...v1.17.0](https://github.com/knocklabs/knock-node/compare/v1.16.0...v1.17.0)
6+
7+
### Features
8+
9+
* **api:** set idempotency key header by default ([f19ec37](https://github.com/knocklabs/knock-node/commit/f19ec372180d04133b2f7657fe38a437519ca4b9))
10+
11+
12+
### Chores
13+
14+
* do not install brew dependencies in ./scripts/bootstrap by default ([1795340](https://github.com/knocklabs/knock-node/commit/1795340bdd014b2e2522f308bd640b508c47fb48))
15+
316
## 1.16.0 (2025-09-10)
417

518
Full Changelog: [v1.15.0...v1.16.0](https://github.com/knocklabs/knock-node/compare/v1.15.0...v1.16.0)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@knocklabs/node",
3-
"version": "1.16.0",
3+
"version": "1.17.0",
44
"description": "The official TypeScript library for the Knock API",
55
"author": "Knock <[email protected]>",
66
"types": "dist/index.d.ts",

scripts/bootstrap

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7-
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then
7+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
88
brew bundle check >/dev/null 2>&1 || {
9-
echo "==> Installing Homebrew dependencies…"
10-
brew bundle
9+
echo -n "==> Install Homebrew dependencies? (y/N): "
10+
read -r response
11+
case "$response" in
12+
[yY][eE][sS]|[yY])
13+
brew bundle
14+
;;
15+
*)
16+
;;
17+
esac
18+
echo
1119
}
1220
fi
1321

src/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ export class Knock {
286286
this.#encoder = Opts.FallbackEncoder;
287287

288288
this._options = options;
289+
this.idempotencyHeader = 'Idempotency-Key';
289290

290291
this.apiKey = apiKey;
291292
}

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '1.16.0'; // x-release-please-version
1+
export const VERSION = '1.17.0'; // x-release-please-version

tests/index.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,16 @@ describe('instantiate client', () => {
426426
});
427427
});
428428

429+
describe('idempotency', () => {
430+
test('key can be set per-request', async () => {
431+
const client = new Knock({
432+
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
433+
apiKey: 'My API Key',
434+
});
435+
await client.users.merge('user_id', { from_user_id: 'user_1' }, { idempotencyKey: 'my-idempotency-key' });
436+
});
437+
});
438+
429439
describe('request building', () => {
430440
const client = new Knock({ apiKey: 'My API Key' });
431441

0 commit comments

Comments
 (0)