2.6.1

(chore): Add additional query string parameters section to the generated README.md file.

2.6.0

(feat): Users can now pass in queryParams as part of the request options.

1await client.foo.bar(..., {
2 queryParams: {
3 foo: "bar"
4 }
5});

2.5.0

(feat): Support uploading file-like types for binary upload endpoints (not multipart-form):

  • Buffered types: Buffer, Blob, File, ArrayBuffer, ArrayBufferView, and Uint8Array
  • Stream types: fs.ReadStream, stream.Readable, and ReadableStream

(feat): Users can configure metadata when uploading a file to a binary upload endpoint using the Uploadable.WithMetadata type:

1import { createReadStream } from "fs";
2
3await client.upload({
4 data: createReadStream("path/to/file"),
5 filename: "my-file",
6 contentType: "audio/mpeg",
7 contentLength: 1949,
8});

The filename, contentType, and contentLength properties are optional.

Alternatively, users can use the Uploadable.FromPath type to upload directly from a file path:

1await client.upload({
2 path: "path/to/file",
3 filename: "my-file",
4 contentType: "audio/mpeg",
5 contentLength: 1949,
6});

The metadata is used to set the Content-Length, Content-Type, and Content-Disposition headers. If not provided, the client will attempt to determine them automatically. For example, fs.ReadStream has a path property which the SDK uses to retrieve the file size from the filesystem without loading it into memory:

1import { createReadStream } from "fs";
2
3await client.upload(createReadStream("path/to/file"));

2.4.10

(fix): Escape strings containing */ inside of JSDoc comments to avoid premature JSDoc block ending.

2.4.9

(fix): Preserve trailing slash of URL and path if present

2.4.8

(fix): Fix ts readme snippet where const was reassigned. Changed to let.

2.4.7

(fix): Make sure extraDependencies, extraPeerDependencies, extraPeerDependenciesMeta, and extraDevDependencies are always merged into package.json. This was previously fixed for shouldBundle: true, but not for shouldBundle: false (default). All dependencies should now come through.

2.4.6

(fix): Parse HTTP error bodies as JSON if the response content-type header is JSON, otherwise fallback to text.

(fix): Fix bytes fetcher test.

(fix): Fix Jest configuration when a packagePath is specified in generators.yml config.

2.4.5

(fix): Make sure extraDependencies, extraPeerDependencies, extraPeerDependenciesMeta, and extraDevDependencies are always merged into package.json.

2.4.4

(fix): Make the BinaryResponse.bytes function optional because some versions of runtimes do not support the function on fetch Response.

2.4.3

(fix): Fix an issue where a property set to undefined would not match with a property that is missing in the withJson MSW predicate.

2.4.2

(fix): Fixes a compile issue when WebSocket connect methods require query parameters with special characters. Fixes response deserialization in websockets to respect skipping validation.

2.4.1

(fix): When serde layer is enabled, WebSocket channels now pass through unrecognized properties instead of stripping them to preserve forwards compatibility.

2.4.0

(fix): Fixes bug with query parameter and path parameter serialization in URL for WebSocket channels.

2.3.3

(internal): Bump version to test Docker image rename to fernapi/fern-typescript-sdk

2.3.2

(fix): Remove “.js” extension from ESM imports in the source generator code. If useLegacyExports is true, you will not see “.js” extensions in ESM imports. If useLegacyExports is false (default), a post process step will add the .js extension, so you won’t see a difference.

We’re doing this because Jest has a bug where it doesn’t properly load TypeScript modules even though the TypeScript and imports are valid.

2.3.1

(fix): Fixes an issue where OAuth clients would not compile when variables were configured in the SDK. Now, the oauth client is instantiated with any global path parameters or headers.

2.3.0

(feat): Change the outputSourceFiles default from false to true. This will affect the output when you generate the SDK to the local file system.

2.2.1

(fix): Ensure tests/wire is generated even when there are no wire tests generated. Otherwise, Jest throws an error because the wire test project roots doesn’t exist.

2.2.0

(feat): Improve generated package.json files:

  • Add engines field to specify minimum Node.js version supported as Node.js 18.
  • Add sideEffects: false
  • Add README.md and LICENSE to files array
  • Use GitHub shorthand for repository field.

You can override these fields using the packageJson config:

1# In generators.yml
2groups:
3 ts-sdk:
4 generators:
5 - name: fernapi/fern-typescript-sdk
6 config:
7 packageJson:
8 engines:
9 node: ">=16.0.0"