Skip to content

Commit 13dee13

Browse files
authored
Merge pull request #93 from KnorpelSenf/get-export-urls
feat: add `jobs.getExportUrls` utility
2 parents c0755e2 + 53a275e commit 13dee13

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/JobsResource.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import CloudConvert from './CloudConvert';
22
import {
3+
type FileResult,
34
type Operation,
45
type Task,
56
type TaskEventData,
@@ -99,6 +100,10 @@ export default class JobsResource {
99100
callback
100101
);
101102
}
103+
104+
getExportUrls(job: Job): FileResult[] {
105+
return job.tasks.flatMap(task => task.result?.files ?? []);
106+
}
102107
}
103108

104109
// We need to map the types from the large Operation union type

0 commit comments

Comments
 (0)