Skip to content

Commit 1e4556c

Browse files
Accept "stash ID" when running actions (#52)
* Add the `stash_id` field to the "run action" opts * Update dependencies * Bump version --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Jay Vercellone <[email protected]>
1 parent ab20ab0 commit 1e4556c

File tree

8 files changed

+48
-6
lines changed

8 files changed

+48
-6
lines changed

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.2"
6+
version = "1.0.3"
77
description = ""
88
readme = "README.md"
99
authors = []

src/pipedream/actions/__init__.py

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

33
# isort: skip_file
44

5+
from .types import RunActionOptsStashId
6+
7+
__all__ = ["RunActionOptsStashId"]

src/pipedream/actions/client.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from ..types.reload_props_response import ReloadPropsResponse
1111
from ..types.run_action_response import RunActionResponse
1212
from .raw_client import AsyncRawActionsClient, RawActionsClient
13+
from .types.run_action_opts_stash_id import RunActionOptsStashId
1314

1415
# this is used as the default value for optional parameters
1516
OMIT = typing.cast(typing.Any, ...)
@@ -288,6 +289,7 @@ def run(
288289
async_handle: typing.Optional[str] = None,
289290
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
290291
dynamic_props_id: typing.Optional[str] = OMIT,
292+
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
291293
request_options: typing.Optional[RequestOptions] = None,
292294
) -> RunActionResponse:
293295
"""
@@ -307,6 +309,9 @@ def run(
307309
dynamic_props_id : typing.Optional[str]
308310
The ID for dynamic props
309311
312+
stash_id : typing.Optional[RunActionOptsStashId]
313+
The ID of the File Stash to use for syncing the action's /tmp directory
314+
310315
request_options : typing.Optional[RequestOptions]
311316
Request-specific configuration.
312317
@@ -336,6 +341,7 @@ def run(
336341
async_handle=async_handle,
337342
configured_props=configured_props,
338343
dynamic_props_id=dynamic_props_id,
344+
stash_id=stash_id,
339345
request_options=request_options,
340346
)
341347
return _response.data
@@ -649,6 +655,7 @@ async def run(
649655
async_handle: typing.Optional[str] = None,
650656
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
651657
dynamic_props_id: typing.Optional[str] = OMIT,
658+
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
652659
request_options: typing.Optional[RequestOptions] = None,
653660
) -> RunActionResponse:
654661
"""
@@ -668,6 +675,9 @@ async def run(
668675
dynamic_props_id : typing.Optional[str]
669676
The ID for dynamic props
670677
678+
stash_id : typing.Optional[RunActionOptsStashId]
679+
The ID of the File Stash to use for syncing the action's /tmp directory
680+
671681
request_options : typing.Optional[RequestOptions]
672682
Request-specific configuration.
673683
@@ -705,6 +715,7 @@ async def main() -> None:
705715
async_handle=async_handle,
706716
configured_props=configured_props,
707717
dynamic_props_id=dynamic_props_id,
718+
stash_id=stash_id,
708719
request_options=request_options,
709720
)
710721
return _response.data

src/pipedream/actions/raw_client.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
from ..core.pagination import AsyncPager, BaseHttpResponse, SyncPager
1111
from ..core.pydantic_utilities import parse_obj_as
1212
from ..core.request_options import RequestOptions
13+
from ..core.serialization import convert_and_respect_annotation_metadata
1314
from ..types.component import Component
1415
from ..types.configure_prop_response import ConfigurePropResponse
1516
from ..types.get_component_response import GetComponentResponse
1617
from ..types.get_components_response import GetComponentsResponse
1718
from ..types.reload_props_response import ReloadPropsResponse
1819
from ..types.run_action_response import RunActionResponse
20+
from .types.run_action_opts_stash_id import RunActionOptsStashId
1921

2022
# this is used as the default value for optional parameters
2123
OMIT = typing.cast(typing.Any, ...)
@@ -322,6 +324,7 @@ def run(
322324
async_handle: typing.Optional[str] = None,
323325
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
324326
dynamic_props_id: typing.Optional[str] = OMIT,
327+
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
325328
request_options: typing.Optional[RequestOptions] = None,
326329
) -> HttpResponse[RunActionResponse]:
327330
"""
@@ -341,6 +344,9 @@ def run(
341344
dynamic_props_id : typing.Optional[str]
342345
The ID for dynamic props
343346
347+
stash_id : typing.Optional[RunActionOptsStashId]
348+
The ID of the File Stash to use for syncing the action's /tmp directory
349+
344350
request_options : typing.Optional[RequestOptions]
345351
Request-specific configuration.
346352
@@ -357,6 +363,9 @@ def run(
357363
"external_user_id": external_user_id,
358364
"configured_props": configured_props,
359365
"dynamic_props_id": dynamic_props_id,
366+
"stash_id": convert_and_respect_annotation_metadata(
367+
object_=stash_id, annotation=RunActionOptsStashId, direction="write"
368+
),
360369
},
361370
headers={
362371
"content-type": "application/json",
@@ -685,6 +694,7 @@ async def run(
685694
async_handle: typing.Optional[str] = None,
686695
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
687696
dynamic_props_id: typing.Optional[str] = OMIT,
697+
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
688698
request_options: typing.Optional[RequestOptions] = None,
689699
) -> AsyncHttpResponse[RunActionResponse]:
690700
"""
@@ -704,6 +714,9 @@ async def run(
704714
dynamic_props_id : typing.Optional[str]
705715
The ID for dynamic props
706716
717+
stash_id : typing.Optional[RunActionOptsStashId]
718+
The ID of the File Stash to use for syncing the action's /tmp directory
719+
707720
request_options : typing.Optional[RequestOptions]
708721
Request-specific configuration.
709722
@@ -720,6 +733,9 @@ async def run(
720733
"external_user_id": external_user_id,
721734
"configured_props": configured_props,
722735
"dynamic_props_id": dynamic_props_id,
736+
"stash_id": convert_and_respect_annotation_metadata(
737+
object_=stash_id, annotation=RunActionOptsStashId, direction="write"
738+
),
723739
},
724740
headers={
725741
"content-type": "application/json",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
# isort: skip_file
4+
5+
from .run_action_opts_stash_id import RunActionOptsStashId
6+
7+
__all__ = ["RunActionOptsStashId"]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
RunActionOptsStashId = typing.Union[str, bool]

src/pipedream/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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.2",
30+
"User-Agent": "pipedream/1.0.3",
3131
"X-Fern-Language": "Python",
3232
"X-Fern-SDK-Name": "pipedream",
33-
"X-Fern-SDK-Version": "1.0.2",
33+
"X-Fern-SDK-Version": "1.0.3",
3434
**(self.get_custom_headers() or {}),
3535
}
3636
if self._project_environment is not None:

0 commit comments

Comments
 (0)