3.2.0

(feat): Add generateEndpointMetadata configuration to generate endpoint metadata for each endpoints. When you use a callback function to generate headers or auth tokens, the endpoint metadata will be passed to the callback.

1const client = new Foo({
2 ...,
3 token: ({ endpointMetadata }) => {
4 // generate token based on endpoint metadata
5 }
6});

To enable this, set generateEndpointMetadata to true in the config of your generator configuration.

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

3.1.2

(fix): Pin msw dependency to 2.11.2 because newer version introduces jest/vitest compatibility issues.

3.1.0

(feat): consolidateTypeFiles consolidates all folders of type files into a single file.

3.0.2

(fix): Update exportAllRequestsAtRoot to create an aggregate request file instead of adding imports.

3.0.1

(fix): Fix incorrect pnpm commands inside of ci.yml

(fix): Delete browser specific tests.

(fix): Make tests more robust across Jest and Vitest.

3.0.0

(feat): Change defaults configuration in generators.yml to use pnpm package manager and vitest test framework. To avoid breaking changes, explicitly set the options above with the Before values in the config of your generator in generators.yml.

OptionBeforeNow
packageManageryarnpnpm
testFrameworkjestvitest

testFramework: vitest is not supported alongside useBigInt: true, streamType: wrapper, or packagePath.

2.13.0

(feat): Use Vitest instead of Jest for running tests. Enable Vitest by setting testFramework to vitest in the config of your generator configuration.

2.12.3

(chore): Updated retry strategy; in particular, don’t jitter for retry-after header.

2.12.2

(fix): Generate correct types for pagination with inline types.

2.12.1

(fix): Generate property accessors for auth and pagination with ?. if the property is optional or nullable, and . if the property is required and non-nullable.

2.12.0

(feat): Add support for custom sections in the README.md via customSections config option.

2.11.2

(fix): Websocket client generation compiles when there are no query parameters and when the auth scheme has custom authentication headers.

2.11.1

(fix): The _getAuthorizationHeader method now returns Promise<string | undefined> when oauth is enabled. This prevents compilation errors in the TypeScript SDK.

2.11.0

(feat): Generate Request and Response types variations for types that have readonly and/or writeonly properties. For example, a type User will have a User.Request type that omits readonly properties and a User.Response type that omits writeonly properties.

Set experimentalGenerateReadWriteOnlyTypes to true in the config of your generator configuration to enable this feature.

1import { User, FooClient } from "foo";
2
3const client = new FooClient(...);
4const createUser: User.Request = {
5 name: "Jon",
6 // id: "123", // Error: id is read-only and thus omitted
7};
8const createdUser: User.Response = await client.createUser(createUser);
9// createdUser.id is available here

2.10.4

(feat): Use cached prettier to format project instead of yarn/pnpm installing all dependencies during generation.

(feat): Generate lockfile without installing dependencies and using --prefer-offline to avoid network requests.