Skip to content

Commit a45b6a4

Browse files
SDK regeneration
1 parent 0ff0d74 commit a45b6a4

23 files changed

+324
-83
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "pipedream"
33

44
[tool.poetry]
55
name = "pipedream"
6-
version = "1.0.10"
6+
version = "1.0.11"
77
description = ""
88
readme = "README.md"
99
authors = []

src/pipedream/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import typing
77

88
import httpx
9-
from .types.project_environment import ProjectEnvironment
9+
from ._.types.project_environment import ProjectEnvironment
1010
from .core.api_error import ApiError
1111
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
1212
from .core.oauth_token_provider import OAuthTokenProvider

src/pipedream/core/client_wrapper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import typing
44

55
import httpx
6-
from ..types.project_environment import ProjectEnvironment
6+
from .._.types.project_environment import ProjectEnvironment
77
from .http_client import AsyncHttpClient, HttpClient
88

99

@@ -27,10 +27,10 @@ def __init__(
2727

2828
def get_headers(self) -> typing.Dict[str, str]:
2929
headers: typing.Dict[str, str] = {
30-
"User-Agent": "pipedream/1.0.10",
30+
"User-Agent": "pipedream/1.0.11",
3131
"X-Fern-Language": "Python",
3232
"X-Fern-SDK-Name": "pipedream",
33-
"X-Fern-SDK-Version": "1.0.10",
33+
"X-Fern-SDK-Version": "1.0.11",
3434
**(self.get_custom_headers() or {}),
3535
}
3636
if self._project_environment is not None:

src/pipedream/deployed_triggers/__init__.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,33 @@
22

33
# isort: skip_file
44

5+
import typing
6+
from importlib import import_module
7+
8+
if typing.TYPE_CHECKING:
9+
from .types import DeployedTriggersListRequestEmitterType
10+
_dynamic_imports: typing.Dict[str, str] = {"DeployedTriggersListRequestEmitterType": ".types"}
11+
12+
13+
def __getattr__(attr_name: str) -> typing.Any:
14+
module_name = _dynamic_imports.get(attr_name)
15+
if module_name is None:
16+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
17+
try:
18+
module = import_module(module_name, __package__)
19+
if module_name == f".{attr_name}":
20+
return module
21+
else:
22+
return getattr(module, attr_name)
23+
except ImportError as e:
24+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
25+
except AttributeError as e:
26+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
27+
28+
29+
def __dir__():
30+
lazy_attrs = list(_dynamic_imports.keys())
31+
return sorted(lazy_attrs)
32+
33+
34+
__all__ = ["DeployedTriggersListRequestEmitterType"]

src/pipedream/deployed_triggers/client.py

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
from ..core.pagination import AsyncPager, SyncPager
77
from ..core.request_options import RequestOptions
88
from ..types.configured_props import ConfiguredProps
9-
from ..types.deployed_component import DeployedComponent
109
from ..types.emitted_event import EmittedEvent
11-
from ..types.get_trigger_response_data import GetTriggerResponseData
10+
from ..types.emitter import Emitter
1211
from ..types.get_trigger_webhooks_response import GetTriggerWebhooksResponse
1312
from ..types.get_trigger_workflows_response import GetTriggerWorkflowsResponse
1413
from .raw_client import AsyncRawDeployedTriggersClient, RawDeployedTriggersClient
14+
from .types.deployed_triggers_list_request_emitter_type import DeployedTriggersListRequestEmitterType
1515

1616
# this is used as the default value for optional parameters
1717
OMIT = typing.cast(typing.Any, ...)
@@ -39,8 +39,9 @@ def list(
3939
after: typing.Optional[str] = None,
4040
before: typing.Optional[str] = None,
4141
limit: typing.Optional[int] = None,
42+
emitter_type: typing.Optional[DeployedTriggersListRequestEmitterType] = None,
4243
request_options: typing.Optional[RequestOptions] = None,
43-
) -> SyncPager[DeployedComponent]:
44+
) -> SyncPager[Emitter]:
4445
"""
4546
Retrieve all deployed triggers for a specific external user
4647
@@ -58,12 +59,15 @@ def list(
5859
limit : typing.Optional[int]
5960
The maximum number of results to return
6061
62+
emitter_type : typing.Optional[DeployedTriggersListRequestEmitterType]
63+
Filter deployed triggers by emitter type (defaults to 'source' if not provided)
64+
6165
request_options : typing.Optional[RequestOptions]
6266
Request-specific configuration.
6367
6468
Returns
6569
-------
66-
SyncPager[DeployedComponent]
70+
SyncPager[Emitter]
6771
deployed triggers listed
6872
6973
Examples
@@ -81,6 +85,7 @@ def list(
8185
before="before",
8286
limit=1,
8387
external_user_id="external_user_id",
88+
emitter_type="source",
8489
)
8590
for item in response:
8691
yield item
@@ -89,12 +94,17 @@ def list(
8994
yield page
9095
"""
9196
return self._raw_client.list(
92-
external_user_id=external_user_id, after=after, before=before, limit=limit, request_options=request_options
97+
external_user_id=external_user_id,
98+
after=after,
99+
before=before,
100+
limit=limit,
101+
emitter_type=emitter_type,
102+
request_options=request_options,
93103
)
94104

95105
def retrieve(
96106
self, trigger_id: str, *, external_user_id: str, request_options: typing.Optional[RequestOptions] = None
97-
) -> GetTriggerResponseData:
107+
) -> Emitter:
98108
"""
99109
Get details of a specific deployed trigger by its ID
100110
@@ -110,7 +120,7 @@ def retrieve(
110120
111121
Returns
112122
-------
113-
GetTriggerResponseData
123+
Emitter
114124
deployed trigger retrieved
115125
116126
Examples
@@ -142,7 +152,7 @@ def update(
142152
configured_props: typing.Optional[ConfiguredProps] = OMIT,
143153
name: typing.Optional[str] = OMIT,
144154
request_options: typing.Optional[RequestOptions] = None,
145-
) -> GetTriggerResponseData:
155+
) -> Emitter:
146156
"""
147157
Modify the configuration of a deployed trigger, including active status
148158
@@ -166,7 +176,7 @@ def update(
166176
167177
Returns
168178
-------
169-
GetTriggerResponseData
179+
Emitter
170180
deployed trigger updated
171181
172182
Examples
@@ -501,8 +511,9 @@ async def list(
501511
after: typing.Optional[str] = None,
502512
before: typing.Optional[str] = None,
503513
limit: typing.Optional[int] = None,
514+
emitter_type: typing.Optional[DeployedTriggersListRequestEmitterType] = None,
504515
request_options: typing.Optional[RequestOptions] = None,
505-
) -> AsyncPager[DeployedComponent]:
516+
) -> AsyncPager[Emitter]:
506517
"""
507518
Retrieve all deployed triggers for a specific external user
508519
@@ -520,12 +531,15 @@ async def list(
520531
limit : typing.Optional[int]
521532
The maximum number of results to return
522533
534+
emitter_type : typing.Optional[DeployedTriggersListRequestEmitterType]
535+
Filter deployed triggers by emitter type (defaults to 'source' if not provided)
536+
523537
request_options : typing.Optional[RequestOptions]
524538
Request-specific configuration.
525539
526540
Returns
527541
-------
528-
AsyncPager[DeployedComponent]
542+
AsyncPager[Emitter]
529543
deployed triggers listed
530544
531545
Examples
@@ -548,6 +562,7 @@ async def main() -> None:
548562
before="before",
549563
limit=1,
550564
external_user_id="external_user_id",
565+
emitter_type="source",
551566
)
552567
async for item in response:
553568
yield item
@@ -560,12 +575,17 @@ async def main() -> None:
560575
asyncio.run(main())
561576
"""
562577
return await self._raw_client.list(
563-
external_user_id=external_user_id, after=after, before=before, limit=limit, request_options=request_options
578+
external_user_id=external_user_id,
579+
after=after,
580+
before=before,
581+
limit=limit,
582+
emitter_type=emitter_type,
583+
request_options=request_options,
564584
)
565585

566586
async def retrieve(
567587
self, trigger_id: str, *, external_user_id: str, request_options: typing.Optional[RequestOptions] = None
568-
) -> GetTriggerResponseData:
588+
) -> Emitter:
569589
"""
570590
Get details of a specific deployed trigger by its ID
571591
@@ -581,7 +601,7 @@ async def retrieve(
581601
582602
Returns
583603
-------
584-
GetTriggerResponseData
604+
Emitter
585605
deployed trigger retrieved
586606
587607
Examples
@@ -621,7 +641,7 @@ async def update(
621641
configured_props: typing.Optional[ConfiguredProps] = OMIT,
622642
name: typing.Optional[str] = OMIT,
623643
request_options: typing.Optional[RequestOptions] = None,
624-
) -> GetTriggerResponseData:
644+
) -> Emitter:
625645
"""
626646
Modify the configuration of a deployed trigger, including active status
627647
@@ -645,7 +665,7 @@ async def update(
645665
646666
Returns
647667
-------
648-
GetTriggerResponseData
668+
Emitter
649669
deployed trigger updated
650670
651671
Examples

0 commit comments

Comments
 (0)