|
| 1 | +import { Readable, Writable } from "stream"; |
| 2 | + |
1 | 3 | /* eslint-disable @typescript-eslint/no-explicit-any */ |
2 | 4 | export type JSONValue = |
3 | 5 | | string |
@@ -69,7 +71,7 @@ export interface HTTPResponse { |
69 | 71 | /** |
70 | 72 | * Http Body |
71 | 73 | */ |
72 | | - body: string | Buffer | ReadableStream; |
| 74 | + body: string | Buffer | Readable; |
73 | 75 | /** |
74 | 76 | * If true, issue the response when the promise returned is resolved, otherwise issue |
75 | 77 | * the response at the end of the workflow execution |
@@ -114,13 +116,13 @@ export interface IApi { |
114 | 116 |
|
115 | 117 | export interface IFile { |
116 | 118 | delete(): Promise<void>; |
117 | | - createReadStream(): Promise<ReadableStream>; |
118 | | - createWriteStream(contentType?: string, contentLength?: number): Promise<WritableStream>; |
| 119 | + createReadStream(): Promise<Readable>; |
| 120 | + createWriteStream(contentType?: string, contentLength?: number): Promise<Writable>; |
119 | 121 | toEncodedString(encoding?: string, start?: number, end?: number): Promise<string>; |
120 | 122 | toUrl(): Promise<string>; |
121 | 123 | toFile(localFilePath: string): Promise<void>; |
122 | 124 | toBuffer(): Promise<Buffer>; |
123 | | - fromReadableStream(readableStream: ReadableStream, contentType?: string, contentSize?: number): Promise<IFile>; |
| 125 | + fromReadableStream(readableStream: Readable, contentType?: string, contentSize?: number): Promise<IFile>; |
124 | 126 | fromFile(localFilePath: string, contentType?: string): Promise<IFile>; |
125 | 127 | fromUrl(url: string, options?: any): Promise<IFile>; |
126 | 128 | toJSON(): any; |
|
0 commit comments