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
84 changes: 47 additions & 37 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "pipedream"

[tool.poetry]
name = "pipedream"
version = "1.0.9"
version = "1.0.10"
description = ""
readme = "README.md"
authors = []
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 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.0.9",
"User-Agent": "pipedream/1.0.10",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "pipedream",
"X-Fern-SDK-Version": "1.0.9",
"X-Fern-SDK-Version": "1.0.10",
**(self.get_custom_headers() or {}),
}
if self._project_environment is not None:
Expand Down
24 changes: 20 additions & 4 deletions src/pipedream/oauth_tokens/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ def with_raw_response(self) -> RawOauthTokensClient:
return self._raw_client

def create(
self, *, client_id: str, client_secret: str, request_options: typing.Optional[RequestOptions] = None
self,
*,
client_id: str,
client_secret: str,
scope: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CreateOAuthTokenResponse:
"""
Exchange OAuth credentials for an access token
Expand All @@ -38,6 +43,9 @@ def create(

client_secret : str

scope : typing.Optional[str]
Optional space-separated scopes for the access token. Defaults to '*'.

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

Expand All @@ -62,7 +70,7 @@ def create(
)
"""
_response = self._raw_client.create(
client_id=client_id, client_secret=client_secret, request_options=request_options
client_id=client_id, client_secret=client_secret, scope=scope, request_options=request_options
)
return _response.data

Expand All @@ -83,7 +91,12 @@ def with_raw_response(self) -> AsyncRawOauthTokensClient:
return self._raw_client

async def create(
self, *, client_id: str, client_secret: str, request_options: typing.Optional[RequestOptions] = None
self,
*,
client_id: str,
client_secret: str,
scope: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CreateOAuthTokenResponse:
"""
Exchange OAuth credentials for an access token
Expand All @@ -94,6 +107,9 @@ async def create(

client_secret : str

scope : typing.Optional[str]
Optional space-separated scopes for the access token. Defaults to '*'.

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

Expand Down Expand Up @@ -126,6 +142,6 @@ async def main() -> None:
asyncio.run(main())
"""
_response = await self._raw_client.create(
client_id=client_id, client_secret=client_secret, request_options=request_options
client_id=client_id, client_secret=client_secret, scope=scope, request_options=request_options
)
return _response.data
22 changes: 20 additions & 2 deletions src/pipedream/oauth_tokens/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper

def create(
self, *, client_id: str, client_secret: str, request_options: typing.Optional[RequestOptions] = None
self,
*,
client_id: str,
client_secret: str,
scope: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[CreateOAuthTokenResponse]:
"""
Exchange OAuth credentials for an access token
Expand All @@ -30,6 +35,9 @@ def create(

client_secret : str

scope : typing.Optional[str]
Optional space-separated scopes for the access token. Defaults to '*'.

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

Expand All @@ -44,6 +52,7 @@ def create(
json={
"client_id": client_id,
"client_secret": client_secret,
"scope": scope,
"grant_type": "client_credentials",
},
headers={
Expand Down Expand Up @@ -73,7 +82,12 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper

async def create(
self, *, client_id: str, client_secret: str, request_options: typing.Optional[RequestOptions] = None
self,
*,
client_id: str,
client_secret: str,
scope: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[CreateOAuthTokenResponse]:
"""
Exchange OAuth credentials for an access token
Expand All @@ -84,6 +98,9 @@ async def create(

client_secret : str

scope : typing.Optional[str]
Optional space-separated scopes for the access token. Defaults to '*'.

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

Expand All @@ -98,6 +115,7 @@ async def create(
json={
"client_id": client_id,
"client_secret": client_secret,
"scope": scope,
"grant_type": "client_credentials",
},
headers={
Expand Down
10 changes: 10 additions & 0 deletions src/pipedream/triggers/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def deploy(
external_user_id: str,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
workflow_id: typing.Optional[str] = OMIT,
webhook_url: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> DeployTriggerResponseData:
Expand All @@ -301,6 +302,9 @@ def deploy(
dynamic_props_id : typing.Optional[str]
The ID for dynamic props

workflow_id : typing.Optional[str]
Optional ID of a workflow to receive trigger events

webhook_url : typing.Optional[str]
Optional webhook URL to receive trigger events

Expand Down Expand Up @@ -332,6 +336,7 @@ def deploy(
external_user_id=external_user_id,
configured_props=configured_props,
dynamic_props_id=dynamic_props_id,
workflow_id=workflow_id,
webhook_url=webhook_url,
request_options=request_options,
)
Expand Down Expand Up @@ -639,6 +644,7 @@ async def deploy(
external_user_id: str,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
workflow_id: typing.Optional[str] = OMIT,
webhook_url: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> DeployTriggerResponseData:
Expand All @@ -658,6 +664,9 @@ async def deploy(
dynamic_props_id : typing.Optional[str]
The ID for dynamic props

workflow_id : typing.Optional[str]
Optional ID of a workflow to receive trigger events

webhook_url : typing.Optional[str]
Optional webhook URL to receive trigger events

Expand Down Expand Up @@ -697,6 +706,7 @@ async def main() -> None:
external_user_id=external_user_id,
configured_props=configured_props,
dynamic_props_id=dynamic_props_id,
workflow_id=workflow_id,
webhook_url=webhook_url,
request_options=request_options,
)
Expand Down
Loading
Loading