Skip to content

Commit 0d77e4f

Browse files
committed
Add optional path param in processProtectedData
1 parent 63da37f commit 0d77e4f

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

packages/sdk/CHANGELOG.md

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

33
All notable changes to this project will be documented in this file.
44

5+
## Next
6+
7+
### Changed
8+
9+
- Add optional `path` param in `processProtectedData`
10+
511
## [2.0.0-beta.11] (2025-01-29)
612

713
### Added

packages/sdk/src/lib/dataProtectorCore/processProtectedData.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const processProtectedData = async ({
4141
app,
4242
userWhitelist,
4343
maxPrice = DEFAULT_MAX_PRICE,
44+
path,
4445
args,
4546
inputFiles,
4647
secrets,
@@ -62,6 +63,7 @@ export const processProtectedData = async ({
6263
const vMaxPrice = positiveNumberSchema()
6364
.label('maxPrice')
6465
.validateSync(maxPrice);
66+
const vPath = stringSchema().label('path').validateSync(path);
6567
const vInputFiles = urlArraySchema()
6668
.label('inputFiles')
6769
.validateSync(inputFiles);
@@ -236,6 +238,7 @@ export const processProtectedData = async ({
236238
const { result } = await getResultFromCompletedTask({
237239
iexec,
238240
taskId,
241+
path: vPath,
239242
onStatusUpdate: vOnStatusUpdate,
240243
});
241244

packages/sdk/src/lib/types/coreTypes.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,11 @@ export type ProcessProtectedDataParams = {
291291
*/
292292
maxPrice?: number;
293293

294+
/**
295+
* The file name of the desired file in the returned ZIP file.
296+
*/
297+
path?: string;
298+
294299
/**
295300
* Arguments to pass to the application during execution.
296301
*/

0 commit comments

Comments
 (0)