Skip to content

Commit 13a533c

Browse files
SDK regeneration
1 parent ea8ce7c commit 13a533c

21 files changed

+1593
-33
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dynamic = ["version"]
44

55
[tool.poetry]
66
name = "pipedream"
7-
version = "1.1.6"
7+
version = "1.1.7"
88
description = ""
99
readme = "README.md"
1010
authors = []

src/pipedream/client.py

Lines changed: 20 additions & 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 AsyncOAuthTokenProvider, OAuthTokenProvider
@@ -21,6 +21,7 @@
2121
from .deployed_triggers.client import AsyncDeployedTriggersClient, DeployedTriggersClient
2222
from .file_stash.client import AsyncFileStashClient, FileStashClient
2323
from .oauth_tokens.client import AsyncOauthTokensClient, OauthTokensClient
24+
from .project_environment.client import AsyncProjectEnvironmentClient, ProjectEnvironmentClient
2425
from .projects.client import AsyncProjectsClient, ProjectsClient
2526
from .proxy.client import AsyncProxyClient, ProxyClient
2627
from .tokens.client import AsyncTokensClient, TokensClient
@@ -188,6 +189,7 @@ def __init__(
188189
self._actions: typing.Optional[ActionsClient] = None
189190
self._triggers: typing.Optional[TriggersClient] = None
190191
self._deployed_triggers: typing.Optional[DeployedTriggersClient] = None
192+
self._project_environment: typing.Optional[ProjectEnvironmentClient] = None
191193
self._projects: typing.Optional[ProjectsClient] = None
192194
self._file_stash: typing.Optional[FileStashClient] = None
193195
self._proxy: typing.Optional[ProxyClient] = None
@@ -259,6 +261,14 @@ def deployed_triggers(self):
259261
self._deployed_triggers = DeployedTriggersClient(client_wrapper=self._client_wrapper)
260262
return self._deployed_triggers
261263

264+
@property
265+
def project_environment(self):
266+
if self._project_environment is None:
267+
from .project_environment.client import ProjectEnvironmentClient # noqa: E402
268+
269+
self._project_environment = ProjectEnvironmentClient(client_wrapper=self._client_wrapper)
270+
return self._project_environment
271+
262272
@property
263273
def projects(self):
264274
if self._projects is None:
@@ -468,6 +478,7 @@ def __init__(
468478
self._actions: typing.Optional[AsyncActionsClient] = None
469479
self._triggers: typing.Optional[AsyncTriggersClient] = None
470480
self._deployed_triggers: typing.Optional[AsyncDeployedTriggersClient] = None
481+
self._project_environment: typing.Optional[AsyncProjectEnvironmentClient] = None
471482
self._projects: typing.Optional[AsyncProjectsClient] = None
472483
self._file_stash: typing.Optional[AsyncFileStashClient] = None
473484
self._proxy: typing.Optional[AsyncProxyClient] = None
@@ -539,6 +550,14 @@ def deployed_triggers(self):
539550
self._deployed_triggers = AsyncDeployedTriggersClient(client_wrapper=self._client_wrapper)
540551
return self._deployed_triggers
541552

553+
@property
554+
def project_environment(self):
555+
if self._project_environment is None:
556+
from .project_environment.client import AsyncProjectEnvironmentClient # noqa: E402
557+
558+
self._project_environment = AsyncProjectEnvironmentClient(client_wrapper=self._client_wrapper)
559+
return self._project_environment
560+
542561
@property
543562
def projects(self):
544563
if self._projects is None:

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.1.6",
30+
"User-Agent": "pipedream/1.1.7",
3131
"X-Fern-Language": "Python",
3232
"X-Fern-SDK-Name": "pipedream",
33-
"X-Fern-SDK-Version": "1.1.6",
33+
"X-Fern-SDK-Version": "1.1.7",
3434
**(self.get_custom_headers() or {}),
3535
}
3636
if self._project_environment is not None:

src/pipedream/deployed_triggers/client.py

Lines changed: 220 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
from ..types.get_trigger_webhooks_response import GetTriggerWebhooksResponse
1313
from ..types.get_trigger_workflows_response import GetTriggerWorkflowsResponse
1414
from ..types.get_triggers_response import GetTriggersResponse
15+
from ..types.get_webhook_with_signing_key_response import GetWebhookWithSigningKeyResponse
16+
from ..types.update_trigger_webhooks_response import UpdateTriggerWebhooksResponse
1517
from .raw_client import AsyncRawDeployedTriggersClient, RawDeployedTriggersClient
1618

1719
# this is used as the default value for optional parameters
@@ -451,9 +453,9 @@ def update_webhooks(
451453
external_user_id: str,
452454
webhook_urls: typing.Sequence[str],
453455
request_options: typing.Optional[RequestOptions] = None,
454-
) -> GetTriggerWebhooksResponse:
456+
) -> UpdateTriggerWebhooksResponse:
455457
"""
456-
Configure webhook URLs to receive trigger events
458+
Configure webhook URLs to receive trigger events. `signing_key` is only returned for OAuth-authenticated requests.
457459
458460
Parameters
459461
----------
@@ -470,7 +472,7 @@ def update_webhooks(
470472
471473
Returns
472474
-------
473-
GetTriggerWebhooksResponse
475+
UpdateTriggerWebhooksResponse
474476
trigger webhooks updated
475477
476478
Examples
@@ -494,6 +496,104 @@ def update_webhooks(
494496
)
495497
return _response.data
496498

499+
def retrieve_webhook(
500+
self,
501+
trigger_id: str,
502+
webhook_id: str,
503+
*,
504+
external_user_id: str,
505+
request_options: typing.Optional[RequestOptions] = None,
506+
) -> GetWebhookWithSigningKeyResponse:
507+
"""
508+
Retrieve a specific webhook for a deployed trigger, including its signing key
509+
510+
Parameters
511+
----------
512+
trigger_id : str
513+
514+
webhook_id : str
515+
516+
external_user_id : str
517+
The external user ID who owns the trigger
518+
519+
request_options : typing.Optional[RequestOptions]
520+
Request-specific configuration.
521+
522+
Returns
523+
-------
524+
GetWebhookWithSigningKeyResponse
525+
trigger webhook retrieved
526+
527+
Examples
528+
--------
529+
from pipedream import Pipedream
530+
531+
client = Pipedream(
532+
project_id="YOUR_PROJECT_ID",
533+
project_environment="YOUR_PROJECT_ENVIRONMENT",
534+
client_id="YOUR_CLIENT_ID",
535+
client_secret="YOUR_CLIENT_SECRET",
536+
)
537+
client.deployed_triggers.retrieve_webhook(
538+
trigger_id="trigger_id",
539+
webhook_id="webhook_id",
540+
external_user_id="external_user_id",
541+
)
542+
"""
543+
_response = self._raw_client.retrieve_webhook(
544+
trigger_id, webhook_id, external_user_id=external_user_id, request_options=request_options
545+
)
546+
return _response.data
547+
548+
def regenerate_webhook_signing_key(
549+
self,
550+
trigger_id: str,
551+
webhook_id: str,
552+
*,
553+
external_user_id: str,
554+
request_options: typing.Optional[RequestOptions] = None,
555+
) -> GetWebhookWithSigningKeyResponse:
556+
"""
557+
Regenerate the signing key for a specific webhook on a deployed trigger
558+
559+
Parameters
560+
----------
561+
trigger_id : str
562+
563+
webhook_id : str
564+
565+
external_user_id : str
566+
The external user ID who owns the trigger
567+
568+
request_options : typing.Optional[RequestOptions]
569+
Request-specific configuration.
570+
571+
Returns
572+
-------
573+
GetWebhookWithSigningKeyResponse
574+
signing key regenerated
575+
576+
Examples
577+
--------
578+
from pipedream import Pipedream
579+
580+
client = Pipedream(
581+
project_id="YOUR_PROJECT_ID",
582+
project_environment="YOUR_PROJECT_ENVIRONMENT",
583+
client_id="YOUR_CLIENT_ID",
584+
client_secret="YOUR_CLIENT_SECRET",
585+
)
586+
client.deployed_triggers.regenerate_webhook_signing_key(
587+
trigger_id="trigger_id",
588+
webhook_id="webhook_id",
589+
external_user_id="external_user_id",
590+
)
591+
"""
592+
_response = self._raw_client.regenerate_webhook_signing_key(
593+
trigger_id, webhook_id, external_user_id=external_user_id, request_options=request_options
594+
)
595+
return _response.data
596+
497597

498598
class AsyncDeployedTriggersClient:
499599
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -993,9 +1093,9 @@ async def update_webhooks(
9931093
external_user_id: str,
9941094
webhook_urls: typing.Sequence[str],
9951095
request_options: typing.Optional[RequestOptions] = None,
996-
) -> GetTriggerWebhooksResponse:
1096+
) -> UpdateTriggerWebhooksResponse:
9971097
"""
998-
Configure webhook URLs to receive trigger events
1098+
Configure webhook URLs to receive trigger events. `signing_key` is only returned for OAuth-authenticated requests.
9991099
10001100
Parameters
10011101
----------
@@ -1012,7 +1112,7 @@ async def update_webhooks(
10121112
10131113
Returns
10141114
-------
1015-
GetTriggerWebhooksResponse
1115+
UpdateTriggerWebhooksResponse
10161116
trigger webhooks updated
10171117
10181118
Examples
@@ -1043,3 +1143,117 @@ async def main() -> None:
10431143
trigger_id, external_user_id=external_user_id, webhook_urls=webhook_urls, request_options=request_options
10441144
)
10451145
return _response.data
1146+
1147+
async def retrieve_webhook(
1148+
self,
1149+
trigger_id: str,
1150+
webhook_id: str,
1151+
*,
1152+
external_user_id: str,
1153+
request_options: typing.Optional[RequestOptions] = None,
1154+
) -> GetWebhookWithSigningKeyResponse:
1155+
"""
1156+
Retrieve a specific webhook for a deployed trigger, including its signing key
1157+
1158+
Parameters
1159+
----------
1160+
trigger_id : str
1161+
1162+
webhook_id : str
1163+
1164+
external_user_id : str
1165+
The external user ID who owns the trigger
1166+
1167+
request_options : typing.Optional[RequestOptions]
1168+
Request-specific configuration.
1169+
1170+
Returns
1171+
-------
1172+
GetWebhookWithSigningKeyResponse
1173+
trigger webhook retrieved
1174+
1175+
Examples
1176+
--------
1177+
import asyncio
1178+
1179+
from pipedream import AsyncPipedream
1180+
1181+
client = AsyncPipedream(
1182+
project_id="YOUR_PROJECT_ID",
1183+
project_environment="YOUR_PROJECT_ENVIRONMENT",
1184+
client_id="YOUR_CLIENT_ID",
1185+
client_secret="YOUR_CLIENT_SECRET",
1186+
)
1187+
1188+
1189+
async def main() -> None:
1190+
await client.deployed_triggers.retrieve_webhook(
1191+
trigger_id="trigger_id",
1192+
webhook_id="webhook_id",
1193+
external_user_id="external_user_id",
1194+
)
1195+
1196+
1197+
asyncio.run(main())
1198+
"""
1199+
_response = await self._raw_client.retrieve_webhook(
1200+
trigger_id, webhook_id, external_user_id=external_user_id, request_options=request_options
1201+
)
1202+
return _response.data
1203+
1204+
async def regenerate_webhook_signing_key(
1205+
self,
1206+
trigger_id: str,
1207+
webhook_id: str,
1208+
*,
1209+
external_user_id: str,
1210+
request_options: typing.Optional[RequestOptions] = None,
1211+
) -> GetWebhookWithSigningKeyResponse:
1212+
"""
1213+
Regenerate the signing key for a specific webhook on a deployed trigger
1214+
1215+
Parameters
1216+
----------
1217+
trigger_id : str
1218+
1219+
webhook_id : str
1220+
1221+
external_user_id : str
1222+
The external user ID who owns the trigger
1223+
1224+
request_options : typing.Optional[RequestOptions]
1225+
Request-specific configuration.
1226+
1227+
Returns
1228+
-------
1229+
GetWebhookWithSigningKeyResponse
1230+
signing key regenerated
1231+
1232+
Examples
1233+
--------
1234+
import asyncio
1235+
1236+
from pipedream import AsyncPipedream
1237+
1238+
client = AsyncPipedream(
1239+
project_id="YOUR_PROJECT_ID",
1240+
project_environment="YOUR_PROJECT_ENVIRONMENT",
1241+
client_id="YOUR_CLIENT_ID",
1242+
client_secret="YOUR_CLIENT_SECRET",
1243+
)
1244+
1245+
1246+
async def main() -> None:
1247+
await client.deployed_triggers.regenerate_webhook_signing_key(
1248+
trigger_id="trigger_id",
1249+
webhook_id="webhook_id",
1250+
external_user_id="external_user_id",
1251+
)
1252+
1253+
1254+
asyncio.run(main())
1255+
"""
1256+
_response = await self._raw_client.regenerate_webhook_signing_key(
1257+
trigger_id, webhook_id, external_user_id=external_user_id, request_options=request_options
1258+
)
1259+
return _response.data

0 commit comments

Comments
 (0)