Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "pipedream"
version = "1.1.11"
version = "1.1.12"
description = ""
readme = "README.md"
authors = []
Expand Down
10 changes: 10 additions & 0 deletions src/pipedream/accounts/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def create(
external_user_id: typing.Optional[str] = None,
oauth_app_id: typing.Optional[str] = None,
name: typing.Optional[str] = OMIT,
account_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Account:
"""
Expand All @@ -142,6 +143,9 @@ def create(
name : typing.Optional[str]
Optional name for the account

account_id : typing.Optional[str]
An existing account ID to reconnect. When provided, the account's credentials are updated instead of creating a new account. Must belong to the same external user and project environment as the connect token, and match the app identified by app_slug.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -175,6 +179,7 @@ def create(
external_user_id=external_user_id,
oauth_app_id=oauth_app_id,
name=name,
account_id=account_id,
request_options=request_options,
)
return _response.data
Expand Down Expand Up @@ -403,6 +408,7 @@ async def create(
external_user_id: typing.Optional[str] = None,
oauth_app_id: typing.Optional[str] = None,
name: typing.Optional[str] = OMIT,
account_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Account:
"""
Expand All @@ -427,6 +433,9 @@ async def create(
name : typing.Optional[str]
Optional name for the account

account_id : typing.Optional[str]
An existing account ID to reconnect. When provided, the account's credentials are updated instead of creating a new account. Must belong to the same external user and project environment as the connect token, and match the app identified by app_slug.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -468,6 +477,7 @@ async def main() -> None:
external_user_id=external_user_id,
oauth_app_id=oauth_app_id,
name=name,
account_id=account_id,
request_options=request_options,
)
return _response.data
Expand Down
10 changes: 10 additions & 0 deletions src/pipedream/accounts/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def create(
external_user_id: typing.Optional[str] = None,
oauth_app_id: typing.Optional[str] = None,
name: typing.Optional[str] = OMIT,
account_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[Account]:
"""
Expand All @@ -156,6 +157,9 @@ def create(
name : typing.Optional[str]
Optional name for the account

account_id : typing.Optional[str]
An existing account ID to reconnect. When provided, the account's credentials are updated instead of creating a new account. Must belong to the same external user and project environment as the connect token, and match the app identified by app_slug.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -176,6 +180,7 @@ def create(
"cfmap_json": cfmap_json,
"connect_token": connect_token,
"name": name,
"account_id": account_id,
},
headers={
"content-type": "application/json",
Expand Down Expand Up @@ -466,6 +471,7 @@ async def create(
external_user_id: typing.Optional[str] = None,
oauth_app_id: typing.Optional[str] = None,
name: typing.Optional[str] = OMIT,
account_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[Account]:
"""
Expand All @@ -490,6 +496,9 @@ async def create(
name : typing.Optional[str]
Optional name for the account

account_id : typing.Optional[str]
An existing account ID to reconnect. When provided, the account's credentials are updated instead of creating a new account. Must belong to the same external user and project environment as the connect token, and match the app identified by app_slug.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -510,6 +519,7 @@ async def create(
"cfmap_json": cfmap_json,
"connect_token": connect_token,
"name": name,
"account_id": account_id,
},
headers={
"content-type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion src/pipedream/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import typing

import httpx
from .types.project_environment import ProjectEnvironment
from ._.types.project_environment import ProjectEnvironment
from .core.api_error import ApiError
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .core.oauth_token_provider import AsyncOAuthTokenProvider, OAuthTokenProvider
Expand Down
6 changes: 3 additions & 3 deletions src/pipedream/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import typing

import httpx
from ..types.project_environment import ProjectEnvironment
from .._.types.project_environment import ProjectEnvironment
from .http_client import AsyncHttpClient, HttpClient


Expand All @@ -27,10 +27,10 @@ def __init__(

def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"User-Agent": "pipedream/1.1.11",
"User-Agent": "pipedream/1.1.12",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "pipedream",
"X-Fern-SDK-Version": "1.1.11",
"X-Fern-SDK-Version": "1.1.12",
**(self.get_custom_headers() or {}),
}
if self._project_environment is not None:
Expand Down
14 changes: 12 additions & 2 deletions src/pipedream/tokens/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def validate(
ctok: ConnectToken,
*,
app_id: str,
account_id: typing.Optional[str] = None,
oauth_app_id: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> ValidateTokenResponse:
Expand All @@ -123,6 +124,9 @@ def validate(
app_id : str
The app ID to validate against

account_id : typing.Optional[str]
An existing account ID to reconnect. Must belong to the app identified by app_id.

oauth_app_id : typing.Optional[str]
The OAuth app ID to validate against (if the token is for an OAuth app)

Expand All @@ -147,11 +151,12 @@ def validate(
client.tokens.validate(
ctok="ctok",
app_id="app_id",
account_id="account_id",
oauth_app_id="oauth_app_id",
)
"""
_response = self._raw_client.validate(
ctok, app_id=app_id, oauth_app_id=oauth_app_id, request_options=request_options
ctok, app_id=app_id, account_id=account_id, oauth_app_id=oauth_app_id, request_options=request_options
)
return _response.data

Expand Down Expand Up @@ -261,6 +266,7 @@ async def validate(
ctok: ConnectToken,
*,
app_id: str,
account_id: typing.Optional[str] = None,
oauth_app_id: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> ValidateTokenResponse:
Expand All @@ -274,6 +280,9 @@ async def validate(
app_id : str
The app ID to validate against

account_id : typing.Optional[str]
An existing account ID to reconnect. Must belong to the app identified by app_id.

oauth_app_id : typing.Optional[str]
The OAuth app ID to validate against (if the token is for an OAuth app)

Expand Down Expand Up @@ -303,13 +312,14 @@ async def main() -> None:
await client.tokens.validate(
ctok="ctok",
app_id="app_id",
account_id="account_id",
oauth_app_id="oauth_app_id",
)


asyncio.run(main())
"""
_response = await self._raw_client.validate(
ctok, app_id=app_id, oauth_app_id=oauth_app_id, request_options=request_options
ctok, app_id=app_id, account_id=account_id, oauth_app_id=oauth_app_id, request_options=request_options
)
return _response.data
10 changes: 10 additions & 0 deletions src/pipedream/tokens/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def validate(
ctok: ConnectToken,
*,
app_id: str,
account_id: typing.Optional[str] = None,
oauth_app_id: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[ValidateTokenResponse]:
Expand All @@ -135,6 +136,9 @@ def validate(
app_id : str
The app ID to validate against

account_id : typing.Optional[str]
An existing account ID to reconnect. Must belong to the app identified by app_id.

oauth_app_id : typing.Optional[str]
The OAuth app ID to validate against (if the token is for an OAuth app)

Expand All @@ -151,6 +155,7 @@ def validate(
method="GET",
params={
"app_id": app_id,
"account_id": account_id,
"oauth_app_id": oauth_app_id,
},
request_options=request_options,
Expand Down Expand Up @@ -286,6 +291,7 @@ async def validate(
ctok: ConnectToken,
*,
app_id: str,
account_id: typing.Optional[str] = None,
oauth_app_id: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[ValidateTokenResponse]:
Expand All @@ -299,6 +305,9 @@ async def validate(
app_id : str
The app ID to validate against

account_id : typing.Optional[str]
An existing account ID to reconnect. Must belong to the app identified by app_id.

oauth_app_id : typing.Optional[str]
The OAuth app ID to validate against (if the token is for an OAuth app)

Expand All @@ -315,6 +324,7 @@ async def validate(
method="GET",
params={
"app_id": app_id,
"account_id": account_id,
"oauth_app_id": oauth_app_id,
},
request_options=request_options,
Expand Down
Loading