diff --git a/poetry.lock b/poetry.lock index a10276d..c1c2313 100644 --- a/poetry.lock +++ b/poetry.lock @@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"] [[package]] name = "certifi" -version = "2025.7.9" +version = "2025.7.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" files = [ - {file = "certifi-2025.7.9-py3-none-any.whl", hash = "sha256:d842783a14f8fdd646895ac26f719a061408834473cfc10203f6a575beb15d39"}, - {file = "certifi-2025.7.9.tar.gz", hash = "sha256:c1d2ec05395148ee10cf672ffc28cd37ea0ab0d99f9cc74c43e588cbd111b079"}, + {file = "certifi-2025.7.14-py3-none-any.whl", hash = "sha256:6b31f564a415d79ee77df69d757bb49a5bb53bd9f756cbbe24394ffd6fc1f4b2"}, + {file = "certifi-2025.7.14.tar.gz", hash = "sha256:8ea99dbdfaaf2ba2f9bac77b9249ef62ec5218e7c2b2e903378ed5fccf765995"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 820197e..61726ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "pipedream" [tool.poetry] name = "pipedream" -version = "0.3.1" +version = "0.3.2" description = "" readme = "README.md" authors = [] diff --git a/src/pipedream/core/client_wrapper.py b/src/pipedream/core/client_wrapper.py index 1dcf256..6527915 100644 --- a/src/pipedream/core/client_wrapper.py +++ b/src/pipedream/core/client_wrapper.py @@ -12,38 +12,38 @@ def __init__( *, project_id: str, x_pd_environment: typing.Optional[str] = None, - token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + access_token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, headers: typing.Optional[typing.Dict[str, str]] = None, base_url: str, timeout: typing.Optional[float] = None, ): self._project_id = project_id self._x_pd_environment = x_pd_environment - self._token = token + self._access_token = access_token self._headers = headers self._base_url = base_url self._timeout = timeout def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "pipedream/0.3.1", + "User-Agent": "pipedream/0.3.2", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "pipedream", - "X-Fern-SDK-Version": "0.3.1", + "X-Fern-SDK-Version": "0.3.2", **(self.get_custom_headers() or {}), } if self._x_pd_environment is not None: headers["x-pd-environment"] = self._x_pd_environment - token = self._get_token() - if token is not None: - headers["Authorization"] = f"Bearer {token}" + access_token = self._get_access_token() + if access_token is not None: + headers["Authorization"] = f"Bearer {access_token}" return headers - def _get_token(self) -> typing.Optional[str]: - if isinstance(self._token, str) or self._token is None: - return self._token + def _get_access_token(self) -> typing.Optional[str]: + if isinstance(self._access_token, str) or self._access_token is None: + return self._access_token else: - return self._token() + return self._access_token() def get_custom_headers(self) -> typing.Optional[typing.Dict[str, str]]: return self._headers @@ -61,7 +61,7 @@ def __init__( *, project_id: str, x_pd_environment: typing.Optional[str] = None, - token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + access_token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, headers: typing.Optional[typing.Dict[str, str]] = None, base_url: str, timeout: typing.Optional[float] = None, @@ -70,7 +70,7 @@ def __init__( super().__init__( project_id=project_id, x_pd_environment=x_pd_environment, - token=token, + access_token=access_token, headers=headers, base_url=base_url, timeout=timeout, @@ -89,7 +89,7 @@ def __init__( *, project_id: str, x_pd_environment: typing.Optional[str] = None, - token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + access_token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, headers: typing.Optional[typing.Dict[str, str]] = None, base_url: str, timeout: typing.Optional[float] = None, @@ -98,7 +98,7 @@ def __init__( super().__init__( project_id=project_id, x_pd_environment=x_pd_environment, - token=token, + access_token=access_token, headers=headers, base_url=base_url, timeout=timeout,