1.8.0

(feat): You can now specify whether to return the BinaryResponse type for binary response endpoints. Change the response type by setting fileResponseType to stream or binary-response in the config of your generator configuration. The default is stream for backwards compatibility, but we recommend using binary-response.

Here’s how you users can interact with the BinaryResponse:

1const response = await client.getFile(...);
2const stream = response.stream();
3// const arrayBuffer = await response.arrayBuffer();
4// const blob = await response.blob();
5// const bytes = await response.bytes();
6const bodyUsed = response.bodyUsed;

The user can choose how to consume the binary data.

1.7.2

(fix): Fix bug where duplicate file generation was silently allowed instead of failing. The withSourceFile method now properly handles the overwrite option to prevent unintended file overwrites.