From e11cd2315a1c1a84c2896ac5cf3b584f6a6d2303 Mon Sep 17 00:00:00 2001 From: Narendranath Gogineni Date: Wed, 4 Sep 2024 12:44:20 +0530 Subject: [PATCH] fix: Type response in PortkeyClient because of issues with inferred type --- src/client.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client.ts b/src/client.ts index 37bf3aa..dc49f0b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,8 +1,9 @@ import { ApiClientInterface } from "./_types/generalTypes"; import * as API from "./apis"; -import { PostBodyParams } from "./apis/postMethod"; -import { ApiClient, RequestOptions } from "./baseClient"; +import { PostBodyParams, PostResponse } from "./apis/postMethod"; +import { ApiClient, APIPromise, RequestOptions } from "./baseClient"; import { MISSING_API_KEY_ERROR_MESSAGE, PORTKEY_BASE_URL } from "./constants"; +import { Stream } from "./streaming"; import { castToError, readEnv } from "./utils"; export class Portkey extends ApiClient { @@ -140,7 +141,7 @@ export class Portkey extends ApiClient { _body: PostBodyParams, params?: ApiClientInterface, opts?: RequestOptions - ) => { + ): APIPromise> | APIPromise => { return new API.postMethod(this).create(url, _body, params, opts) };