0.36.1

(fix): Now, there are generated unit tests for the auth and fetcher core directory which makes sure that Fern’s fetcher and authorization helpers work as expected!

0.36.0

(fix): Now, there are generated unit tests for the schemas core directory which makes sure that Fern’s request + response validation will work as expected!

0.35.0

(fix): Support Multipart Form uploads where fs.createReadStream is passed. This requires coercing the stream into a File.

0.34.0

(internal): Upgrade to IRv50.

(feat): Add support for generating an API version scheme in version.ts. Consider the following api.yml configuration:

1version:
2 header: X-API-Version
3 default: "1.0.0"
4 values:
5 - "1.0.0-alpha"
6 - "1.0.0-beta"
7 - "1.0.0"

The following version.ts file is generated:

1/**
2* This file was auto-generated by Fern from our API Definition.
3*/
4
5/** The version of the API, sent as the X-API-Version header. */
6export type AcmeVersion = "1.0.0" | "2.0.0" | "latest";

If a default value is specified, it is set on every request but can be overridden in either the client-level Options or call-specific RequestOptions. If a default value is not specified, the value of the header is required on the generated Options.

An example call is shown below:

1import { AcmeClient } from "acme";
2
3const client = new AcmeClient({ apiKey: "YOUR_API_KEY", xApiVersion: "2.0.0" });
4await client.users.create({
5 firstName: "john",
6 lastName: "doe"
7});

0.33.0

(fix): This release comes with numerous improvements to multipart uploads:

  1. Fetcher.ts no longer depends on form-data and formdata-node which reduces the size of the SDK for all consumers that are not leveraging multipart form data uploads.
  2. The SDK now accepts fs.ReadStream, Blob and File as inputs and handles parsing them appropriately.
  3. By accepting a Blob as a file parameter, the SDK now supports sending the filename when making a request.