Skip to content

Commit a020c14

Browse files
committed
feat(sdk): add stashId to runAction
1 parent ff5e01a commit a020c14

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

packages/sdk/CHANGELOG.md

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

33
# Changelog
44

5+
## [1.6.7] - 2025-06-06
6+
7+
### Added
8+
9+
- Added `stashId` option to the `runAction` method, which allows files to be
10+
persisted between action runs.
11+
512
## [1.6.6] - 2025-06-05
613

714
### Added

packages/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@pipedream/sdk",
33
"type": "module",
4-
"version": "1.6.6",
4+
"version": "1.6.7",
55
"description": "Pipedream SDK",
66
"main": "./dist/server.js",
77
"module": "./dist/server.js",

packages/sdk/src/shared/index.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,15 @@ export type RunActionOpts = ExternalUserId & {
567567
* The ID of the last prop reconfiguration (if any).
568568
*/
569569
dynamicPropsId?: string;
570+
571+
/**
572+
* The ID of the File Stash to sync the action's /tmp directory with. This
573+
* allows you to persist files across action runs for up to 1 day. If set to
574+
* `true` or "", a unique stash ID will be generated for you and returned in
575+
* the response. If not set, the action will not sync its /tmp directory with
576+
* a File Stash.
577+
*/
578+
stashId?: string | boolean;
570579
};
571580

572581
/**
@@ -589,6 +598,11 @@ export type RunActionResponse = {
589598
* The value returned by the action
590599
*/
591600
ret: unknown;
601+
602+
/**
603+
* The ID of the File Stash that was used to sync the action's /tmp directory
604+
*/
605+
stashId?: string;
592606
};
593607

594608
/**
@@ -1428,6 +1442,7 @@ export abstract class BaseClient {
14281442
id,
14291443
configured_props: opts.configuredProps,
14301444
dynamic_props_id: opts.dynamicPropsId,
1445+
stash_id: opts.stashId,
14311446
};
14321447
return this.makeConnectRequest<RunActionResponse>("/actions/run", {
14331448
method: "POST",

0 commit comments

Comments
 (0)