File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export interface Job {
1818 tasks : JobTask [ ] ;
1919}
2020type NotPresentWhenInsideJob = 'job_id' | 'status' ;
21- interface JobTask extends Omit < Task , NotPresentWhenInsideJob > {
21+ export interface JobTask extends Omit < Task , NotPresentWhenInsideJob > {
2222 name : string ;
2323 status : JobTaskStatus ;
2424}
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' ;
@@ -415,7 +416,7 @@ export default class TasksResource {
415416 await this . cloudConvert . axios . delete ( 'tasks/' + id ) ;
416417 }
417418
418- async upload ( task : Task , stream : Stream ) : Promise < any > {
419+ async upload ( task : Task | JobTask , stream : Stream ) : Promise < any > {
419420 if ( task . operation !== 'import/upload' ) {
420421 throw new Error ( 'The task operation is not import/upload' ) ;
421422 }
Original file line number Diff line number Diff line change 3737 "typescript" : " ^3.9.7"
3838 },
3939 "files" : [
40- " lib/" ,
4140 " built/"
4241 ],
4342 "scripts" : {
4746 "test-integration" : " mocha --require esm tests/integration" ,
4847 "lint" : " eslint --ext .ts --ext .js --ext .json ."
4948 }
50- }
49+ }
You can’t perform that action at this time.
0 commit comments