From b013f25e7057674daf2038a6b7b66c1dd69ad54b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 09:29:10 +0000 Subject: [PATCH 1/3] chore(internal): codegen related update (#43) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e5fc48..91adb48 100644 --- a/README.md +++ b/README.md @@ -293,7 +293,7 @@ await client.sessions.create({ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions: 1. Changes that only affect static types, without breaking runtime behavior. -2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_. +2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_ 3. Changes that we do not expect to impact the vast majority of users in practice. We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. From 3d524a7feb97babfe7a0c1d9b3dcde49a3eff91b Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Wed, 15 Jan 2025 17:08:27 +0000 Subject: [PATCH 2/3] fix(sessions): remove conditional request options causing incorrect params --- src/resources/sessions.ts | 10 +--------- tests/api-resources/sessions.test.ts | 7 ------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/resources/sessions.ts b/src/resources/sessions.ts index 8b7aca5..3f97778 100644 --- a/src/resources/sessions.ts +++ b/src/resources/sessions.ts @@ -9,15 +9,7 @@ export class Sessions extends APIResource { /** * Creates a new session with the provided configuration. */ - create(body?: SessionCreateParams, options?: Core.RequestOptions): Core.APIPromise; - create(options?: Core.RequestOptions): Core.APIPromise; - create( - body: SessionCreateParams | Core.RequestOptions = {}, - options?: Core.RequestOptions, - ): Core.APIPromise { - if (isRequestOptions(body)) { - return this.create({}, body); - } + create(body: SessionCreateParams = {}, options?: Core.RequestOptions): Core.APIPromise { return this._client.post('/v1/sessions', { body, ...options }); } diff --git a/tests/api-resources/sessions.test.ts b/tests/api-resources/sessions.test.ts index 0f9058e..af5242c 100644 --- a/tests/api-resources/sessions.test.ts +++ b/tests/api-resources/sessions.test.ts @@ -20,13 +20,6 @@ describe('resource sessions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('create: request options instead of params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect(client.sessions.create({ path: '/_stainless_unknown_path' })).rejects.toThrow( - Steel.NotFoundError, - ); - }); - test('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( From 3cd17bd7370ad365a9d3e839b6615a0a4886f3d9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 17:10:51 +0000 Subject: [PATCH 3/3] release: 0.1.0-beta.8 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fdf47e7..a8f6822 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-beta.7" + ".": "0.1.0-beta.8" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fbeac6..004c3a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.1.0-beta.8 (2025-01-15) + +Full Changelog: [v0.1.0-beta.7...v0.1.0-beta.8](https://github.com/steel-dev/steel-node/compare/v0.1.0-beta.7...v0.1.0-beta.8) + +### Bug Fixes + +* **sessions:** remove conditional request options causing incorrect params ([3d524a7](https://github.com/steel-dev/steel-node/commit/3d524a7feb97babfe7a0c1d9b3dcde49a3eff91b)) + + +### Chores + +* **internal:** codegen related update ([#43](https://github.com/steel-dev/steel-node/issues/43)) ([b013f25](https://github.com/steel-dev/steel-node/commit/b013f25e7057674daf2038a6b7b66c1dd69ad54b)) + ## 0.1.0-beta.7 (2025-01-08) Full Changelog: [v0.1.0-beta.6...v0.1.0-beta.7](https://github.com/steel-dev/steel-node/compare/v0.1.0-beta.6...v0.1.0-beta.7) diff --git a/package.json b/package.json index 518966a..24aef3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "steel-sdk", - "version": "0.1.0-beta.7", + "version": "0.1.0-beta.8", "description": "The official TypeScript library for the Steel API", "author": "Steel ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index f23d1e5..ea9231a 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.1.0-beta.7'; // x-release-please-version +export const VERSION = '0.1.0-beta.8'; // x-release-please-version