From 030d5b2831a79139e9c71bd7f62653d12a02b01f Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Wed, 15 Jan 2025 17:08:27 +0000 Subject: [PATCH] fix(sessions): remove conditional request options causing incorrect params --- src/resources/sessions.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 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 }); }