File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export interface Job {
1616 tasks : JobTask [ ] ;
1717}
1818type NotPresentWhenInsideJob = 'job_id' | 'status'
19- interface JobTask extends Omit < Task , NotPresentWhenInsideJob > {
19+ export interface JobTask extends Omit < Task , NotPresentWhenInsideJob > {
2020 name : string ;
2121 status : JobTaskStatus ;
2222}
Original file line number Diff line number Diff line change 11import FormData , { Stream } from 'form-data' ;
22import CloudConvert from './CloudConvert' ;
3+ import { JobTask } from './JobsResource' ;
34
45export type TaskEvent = 'created' | 'updated' | 'finished' | 'failed' ;
56export type TaskStatus = 'waiting' | 'processing' | 'finished' | 'error' ;
@@ -359,7 +360,7 @@ export default class TasksResource {
359360 await this . cloudConvert . axios . delete ( 'tasks/' + id ) ;
360361 }
361362
362- async upload ( task : Task , stream : Stream ) : Promise < any > {
363+ async upload ( task : Task | JobTask , stream : Stream ) : Promise < any > {
363364
364365 if ( task . operation !== 'import/upload' ) {
365366 throw new Error ( 'The task operation is not import/upload' ) ;
You can’t perform that action at this time.
0 commit comments