Update API specifications with fern api update (#2951)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Shuchang Zheng
2025-07-15 02:01:23 -07:00
committed by GitHub
parent 3f21221b02
commit 01710a4c52
88 changed files with 1470 additions and 54 deletions

View File

@@ -7,8 +7,16 @@ from .http_client import AsyncHttpClient
class BaseClientWrapper:
def __init__(self, *, api_key: typing.Optional[str] = None, base_url: str, timeout: typing.Optional[float] = None):
def __init__(
self,
*,
api_key: typing.Optional[str] = None,
x_api_key: str,
base_url: str,
timeout: typing.Optional[float] = None,
):
self._api_key = api_key
self.x_api_key = x_api_key
self._base_url = base_url
self._timeout = timeout
@@ -16,10 +24,11 @@ class BaseClientWrapper:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "skyvern",
"X-Fern-SDK-Version": "0.1.86",
"X-Fern-SDK-Version": "0.2.2",
}
if self._api_key is not None:
headers["x-api-key"] = self._api_key
headers["x-api-key"] = self.x_api_key
return headers
def get_base_url(self) -> str:
@@ -34,11 +43,12 @@ class SyncClientWrapper(BaseClientWrapper):
self,
*,
api_key: typing.Optional[str] = None,
x_api_key: str,
base_url: str,
timeout: typing.Optional[float] = None,
httpx_client: httpx.Client,
):
super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
super().__init__(api_key=api_key, x_api_key=x_api_key, base_url=base_url, timeout=timeout)
self.httpx_client = HttpClient(
httpx_client=httpx_client,
base_headers=self.get_headers,
@@ -52,11 +62,12 @@ class AsyncClientWrapper(BaseClientWrapper):
self,
*,
api_key: typing.Optional[str] = None,
x_api_key: str,
base_url: str,
timeout: typing.Optional[float] = None,
httpx_client: httpx.AsyncClient,
):
super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
super().__init__(api_key=api_key, x_api_key=x_api_key, base_url=base_url, timeout=timeout)
self.httpx_client = AsyncHttpClient(
httpx_client=httpx_client,
base_headers=self.get_headers,