3.42.6

(fix): Fix wire test generation for OAuth endpoints with reference request bodies.

3.42.5

(fix): Add fallback OAuth credentials for wire tests when examples don’t include explicit auth values.


3.42.4

(fix): Fix bug where request wrapper was set as body when the body property inside the request wrapper should’ve been used. This only affects a specific combination of feature flags:

  • inline-path-parameters: true on the API spec settings
  • inlinePathParameters: false on the generator config

3.42.3

(fix): Fix wire test generation: filter out headers with null/undefined values to prevent invalid assertions, and allow empty form body in mock server when expected body is empty.

3.42.2

(fix): Fix property access for file upload request parameters with hyphenated or special character names by using bracket notation instead of dot notation.

3.42.1

(fix): Fix OAuth token handling for optional expires_in field with default fallback.

3.42.0

(feat): Add normalized client options and request options as a parameter to custom pagination. This allows SDK authors to access the client options (including auth provider) when implementing custom pagination logic.



3.40.0

(feat): Run npm pkg fix after saving package.json to disk to normalize the package.json file. This is enabled by default and can be disabled by setting skipNpmPkgFix: true in the generator config.

3.39.3

(fix): Fix missing information in generated package.json.


3.39.2

(fix): Fix reference.md generation for APIs with multiple root-level endpoints. Previously, only the last root endpoint appeared in the reference documentation because addRootSection() was called inside the endpoint loop, replacing the root section each time. The fix moves section creation before the endpoint loop, ensuring all root endpoints are included and removing the empty ## section header that was being generated.

3.39.1

(fix): Fix wire tests for paginated endpoints to expect an empty array [] instead of undefined when response.data is not present. This aligns with the paginator’s behavior which uses ?? [] to return an empty array when the data property is undefined.


3.39.0

(feat): Add support for custom pagination with a dedicated CustomPager class, similar to the C# SDK generator. The CustomPager class provides:

  • A CustomPagerParser callback type that SDK authors implement to define pagination logic
  • Support for both forward (getNextPage) and backward (getPreviousPage) pagination
  • AsyncIterable implementation for ergonomic consumption with for await...of
  • Access to raw response data via response and rawResponse properties

The generated endpoint returns a CustomPager with a default parser that extracts items from the configured results property and sets hasNextPage/hasPreviousPage to false. SDK authors who need custom pagination logic can create their own wrapper/factory that calls CustomPager.create() with their own CustomPagerParser implementation.

3.38.3

(chore): Sort imports and exports in generated TypeScript SDK files for consistent, deterministic output. This eliminates the need to rely on formatters like prettier, biome, or oxfmt to order imports and exports.

3.38.2

(chore): Pre format and lint as is files and core utilities.

3.38.1

(fix): hasNextPage employs the default for the step attribute on offset-based pagination endpoints if it’s set.

3.38.0

(feat): The oauthTokenOverride feature flag has been removed and is now always enabled. OAuth token override allows users to skip the OAuth flow by providing a pre-generated bearer token directly. This feature is now the default behavior and no longer requires configuration.


3.37.4

(chore): The README now demonstrates how to pass custom headers to both the client constructor and individual endpoint invocations.

3.37.3

(chore): Update generator-cli to 0.5.0.

3.37.2

(chore): Update oxfmt to 0.17.0, oxlint to 1.32.0, and oxlint-tsgolint to 0.8.4.

3.37.1

(fix): Fixed a possible type issue in Fetcher.test.ts.


3.36.0

(feat): Refactor auth options to be defined in individual AuthProvider classes instead of directly in BaseClientOptions. BaseClientOptions is now a type alias that intersects with the auth provider’s AuthOptions interface. This improves code organization and makes auth options more discoverable.


3.37.0

(feat): Add support for OAuth token override, allowing users to skip the OAuth flow by providing a pre-generated bearer token directly. This is useful when users already have a valid token and don’t need to go through the OAuth client credentials flow.

To enable this feature, add the oauthTokenOverride configuration to your generators.yml file:

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

Users can then instantiate the client with either OAuth credentials or a pre-generated token:

1// Option 1: OAuth flow (existing behavior)
2const client = new Client({
3 clientId: "YOUR_CLIENT_ID",
4 clientSecret: "YOUR_CLIENT_SECRET",
5 ...
6});
7
8// Option 2: Direct bearer token override (new capability)
9const client = new Client({
10 token: "my-pre-generated-bearer-token",
11 ...
12});

3.35.9

(fix): Fix generated error classes to correctly set the prototype chain, capture stack traces, and set the error name so instanceof checks behave as expected. Error classes now use new.target.prototype instead of the static class name for Object.setPrototypeOf, conditionally call Error.captureStackTrace for V8 environments, and set this.name dynamically.