3.24.0

(feat): Add support for forward-compatible enums. To enable forward-compatible enums, add the following configuration to your generators.yml file:

1# In generators.yml
2groups:
3 generators:
4 - name: fernapi/fern-typescript-sdk
5 config:
6 enableForwardCompatibleEnums: true

3.23.0

(feat): Add support for bytes download responses.

3.22.0

(feat): Add support for oxfmt as the formatter. This is a beta feature and not officially supported yet.

3.21.0

(feat): Add support for oxlint as the linter. This is a beta feature and not officially supported yet.

3.20.0

(feat): Implement base and extend properties in discriminated union examples.

3.19.1

(fix): mergeHeaders() and mergeOnlyDefinedHeaders() are now case-insensitive.

3.19.0

(feat): Add support for application/x-www-form-urlencoded request bodies.

3.18.0

(feat): Users can now pass in a custom fetch function to the client options.


3.17.1

(fix): hasNextPage() now factors in offset.step if provided for offset-based pagination such that hasNextPage now returns false if the returned page was not as large as requested.


3.17.0

(feat): Add Page to the top-level exports.ts files, which allows for import { Page } from '...'; to work. Remove Pageable, and use only core.Page for pagination everywhere.

3.16.0

(feat): Generate a CONTRIBUTING.md file.

3.15.0

(feat): Export types for ReconnectingWebSocket, ReconnectingWebSocket.Event, ReconnectingWebSocket.CloseEvent, and ReconnectingWebSocket.ErrorEvent.

3.14.0

(feat): Expose the underlying response on the Page type.


3.13.0

(feat): Improve pnpm and yarn caching in generator Docker images.

3.12.3

(fix): Fix .github/workflows/ci.yml file when using OIDC for npm publishing.

3.12.2

(fix): Add streaming tests; fix custom message terminators in streams; fix multi-byte character handling across chunk breaks in streams.

3.12.1

(chore): Update Biome to 2.3.1


3.12.0

(feat): Add support for publishing to npmjs.org using OIDC from GitHub Actions.

To use OIDC for publishing to npmjs.org, you need to follow two steps:

  1. Follow the instructions in “Step 1: Add a trusted publisher on npmjs.com”.

  2. Set the output.token field to OIDC in generators.yml to enable this feature:

    1# In generators.yml
    2groups:
    3 ts-sdk:
    4 generators:
    5 - name: fernapi/fern-typescript-sdk
    6 output:
    7 location: npm
    8 package-name: your-package-name
    9 token: OIDC # previously this would be set to something like ${NPM_TOKEN}
    10 ...

    This will take care of “Step 2: Configure your CI/CD workflow”.

For local generation, you’ll need Fern CLI version 0.94.0 or later.

(feat): Update GitHub Actions setup-node action to v4 in the generated CI workflow.

3.11.1

(fix): Generate streaming response section in README.md for streaming response endpoints.

3.11.0

(feat): Add linter and formatter configuration options to configure code linters and formatters for the generated SDK.

  • linter:
    • biome: Use Biome as the code linter. This is the default.
    • none: Do not include a code linter.
  • formatter:
    • biome: Use Biome as the code formatter. This is the default.
    • prettier: Use Prettier as the code formatter.

For consistency, the package.json scripts will always include the following scripts:

  • lint: Run the configured linter.
  • lint:fix: Run the configured linter with auto-fix.
  • format: Run the configured formatter.
  • format:check: Run the configured formatter in check mode.
  • check: Run both the linter and formatter in check mode.
  • check:fix: Run both the linter and formatter with auto-fix. When the linter is set to none, lint and lint:fix scripts will echo a message indicating that no linter is configured.


3.9.3

(fix): Fix a compilation error when a path parameter is nullable or optional.

3.9.2

(fix): Match the logic in wire test generation where the static example generation omits the request parameter for empty objects when optional. This fixes some wire tests that were failing due to mismatched request bodies.

(fix): Return undefined when passing in undefined to toJson when useBigInt is enabled.



3.9.0

(feat): Add support for the Uploadable.FromPath and Uploadable.WithMetadata types to upload files with metadata to multipart-form endpoints.

Users can configure metadata when uploading a file to a multipart-form upload endpoint using the Uploadable.WithMetadata type:

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

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 file: {
3 path: "path/to/file",
4 filename: "my-file",
5 contentType: "audio/mpeg",
6 },
7 otherField: "other value",
8});

The metadata is used to set the Content-Type and Content-Disposition headers. If not provided, the client will attempt to determine them automatically.