update autogenerated client sdk (#2010)

This commit is contained in:
Shuchang Zheng 2025-03-27 22:54:35 -07:00 committed by GitHub
parent 13b0d314a8
commit 4e7dd87f99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
94 changed files with 3691 additions and 5149 deletions

View file

@ -7,7 +7,16 @@ from .http_client import AsyncHttpClient
class BaseClientWrapper:
def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None):
def __init__(
self,
*,
api_key: typing.Optional[str] = None,
authorization: typing.Optional[str] = None,
base_url: str,
timeout: typing.Optional[float] = None,
):
self._api_key = api_key
self._authorization = authorization
self._base_url = base_url
self._timeout = timeout
@ -15,8 +24,12 @@ class BaseClientWrapper:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "skyvern",
"X-Fern-SDK-Version": "0.1.56",
"X-Fern-SDK-Version": "0.1.65",
}
if self._api_key is not None:
headers["x-api-key"] = self._api_key
if self._authorization is not None:
headers["authorization"] = self._authorization
return headers
def get_base_url(self) -> str:
@ -27,8 +40,16 @@ class BaseClientWrapper:
class SyncClientWrapper(BaseClientWrapper):
def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.Client):
super().__init__(base_url=base_url, timeout=timeout)
def __init__(
self,
*,
api_key: typing.Optional[str] = None,
authorization: typing.Optional[str] = None,
base_url: str,
timeout: typing.Optional[float] = None,
httpx_client: httpx.Client,
):
super().__init__(api_key=api_key, authorization=authorization, base_url=base_url, timeout=timeout)
self.httpx_client = HttpClient(
httpx_client=httpx_client,
base_headers=self.get_headers,
@ -38,8 +59,16 @@ class SyncClientWrapper(BaseClientWrapper):
class AsyncClientWrapper(BaseClientWrapper):
def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient):
super().__init__(base_url=base_url, timeout=timeout)
def __init__(
self,
*,
api_key: typing.Optional[str] = None,
authorization: typing.Optional[str] = None,
base_url: str,
timeout: typing.Optional[float] = None,
httpx_client: httpx.AsyncClient,
):
super().__init__(api_key=api_key, authorization=authorization, base_url=base_url, timeout=timeout)
self.httpx_client = AsyncHttpClient(
httpx_client=httpx_client,
base_headers=self.get_headers,