Closed
Description
- I have checked that the [SDK documentation][sdk-docs] doesn't solve my issue.
- I have checked that the [API documentation][api-docs] doesn't solve my issue.
- I have searched the [Box Developer Forums][dev-forums] and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
- I have searched [Issues in this repo][github-repo] and my issue isn't already reported.
Description of the Issue
It seems there was an intentional change with 1.13.1 in commit bb5a857, it seems that ByteStream is no longer Readable and breaks piping into classes implementing stream.Transform.
Is there supposed to be another npm package for NodeJS? Behavior in 1.13.0 and prior is ByteStream was compatible with stream.Transform and was exported as a Readable.
Steps to Reproduce
- Pipe boxClient.downloads.downloadFile() into a Readable Stream.
- Compile
- See errors:
error TS2339: Property 'pipe' does not exist on type 'ByteStream'.
349 (await boxClient.downloads.downloadFile(item.id))?.pipe(parser);
~~~~
error TS2740: Type 'Stringifier' is missing the following properties from type 'ReadableStream<any>': locked, cancel, getReader, pipeThrough, and 3 more.
375 "file": stringifier
~~~~~~
node_modules/box-typescript-sdk-gen/lib/managers/uploads.generated.d.ts:210:14
210 readonly file: ByteStream;
~~~~
The expected type comes from property 'file' which is declared here on type 'UploadFileRequestBody'
Expected Behavior
Same behavior as 1.13.0 and earlier.
Versions Used
Typescript SDK: 1.13.1
Platform: Node.js
Node.js (if applicable): 22.10.0