diff --git a/types/package.json b/types/package.json index f5c5c5248739e..cc65acab7acb0 100644 --- a/types/package.json +++ b/types/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/types", - "version": "0.3.3", + "version": "0.3.4", "description": "Pipedream TypeScript types", "keywords": [ "pipedream", diff --git a/types/src/index.ts b/types/src/index.ts index 6ea9aa5cf0c4b..51ecafd1f74ad 100644 --- a/types/src/index.ts +++ b/types/src/index.ts @@ -1,3 +1,7 @@ +import { + Readable, Writable, +} from "stream"; + /* eslint-disable @typescript-eslint/no-explicit-any */ export type JSONValue = | string @@ -69,7 +73,7 @@ export interface HTTPResponse { /** * Http Body */ - body: string | Buffer | ReadableStream; + body: string | Buffer | Readable; /** * If true, issue the response when the promise returned is resolved, otherwise issue * the response at the end of the workflow execution @@ -114,13 +118,13 @@ export interface IApi { export interface IFile { delete(): Promise; - createReadStream(): Promise; - createWriteStream(contentType?: string, contentLength?: number): Promise; + createReadStream(): Promise; + createWriteStream(contentType?: string, contentLength?: number): Promise; toEncodedString(encoding?: string, start?: number, end?: number): Promise; toUrl(): Promise; toFile(localFilePath: string): Promise; toBuffer(): Promise; - fromReadableStream(readableStream: ReadableStream, contentType?: string, contentSize?: number): Promise; + fromReadableStream(readableStream: Readable, contentType?: string, contentSize?: number): Promise; fromFile(localFilePath: string, contentType?: string): Promise; fromUrl(url: string, options?: any): Promise; toJSON(): any;