3.48.1
(fix): Fix _Unknown union variant discriminant type from void to string when
includeOtherInUnionTypes is enabled.
3.48.0
(feat): Set Accept: text/event-stream header for SSE streaming endpoints. The fetcher now
handles responseType: "sse" by setting the appropriate Accept header, matching the
behavior of the Go and Rust generators. Non-SSE streaming endpoints (JSON/text) continue
to use the default Accept header.
3.47.1
(fix): Fix SSE stream terminator to be optional instead of defaulting to "[DONE]". When no
terminator is specified in the Fern definition, the generated SDK no longer passes a
streamTerminator to the Stream constructor, allowing the stream to end only when the
connection closes.
3.47.0
(feat): Add support for TypeScript’s exactOptionalPropertyTypes compiler option when noSerdeLayer: true.
Optional properties are now generated as propName?: Type | undefined instead of propName?: Type,
allowing users to explicitly set properties to undefined (not just omit them). This prevents
double unions like (T | undefined) | undefined by stripping top-level undefined before adding
the union.
3.48.2
(fix): Fix file upload tests to be OS-agnostic by using dynamic file size calculation instead
of hardcoded values. Previously, tests expected a specific file size (21 bytes) which
differs between operating systems due to line ending differences (CRLF on Windows vs
LF on Unix). Now uses fs.statSync() to dynamically read the test file size at runtime.
3.46.3
(chore): Update oxfmt to 0.27.0, oxlint to 1.42.0, and oxlint-tsgolint to 0.11.4.
3.46.2
(fix): Fix TypeScript circular reference error (TS7022/TS2456) when generating enums with visitor utilities enabled.
The enum type alias now references an intermediate Values const instead of using Omit<typeof EnumName, "_visit">,
which avoids the circular reference in the type’s own initializer.
3.46.1
(fix): Fix outputSrcOnly not working with local-file-system output mode when the organization has
selfHostedSdKs enabled. The outputSrcOnly check now takes priority over shouldGenerateFullProject,
ensuring that when a user explicitly sets outputSrcOnly: true, only the src contents are output
without the full project structure.
3.46.0
(feat): Add outputSrcOnly configuration option that outputs only the contents of the src/ directory
directly to the destination path, without the src/ wrapper directory. This is useful when you
want to integrate the generated source files directly into another project without the extra
directory nesting. The option takes priority over outputSourceFiles when both are enabled.
3.45.1
(fix): Remove check if body is null or undefined. If null, it is valid JSON null, and if undefined, it handles correctly to not have a body.
3.45.0
(feat): Add support for additional query parameters in WebSocket connections. The ConnectArgs
interface now includes an optional queryParams property that allows users to pass
additional query parameters that get merged into the WebSocket URL alongside any
channel-defined query parameters.
3.44.2
(fix): Fix README pagination section being included even when the SDK has no autopaginated endpoints.
The pagination section is now only included in the README when there is at least one endpoint
with pagination defined.
3.44.1
(fix): Fix optional query parameters with date/datetime types throwing serialization errors when
undefined. Previously, optional query parameters that were named types aliasing Date (like
before?: Before where Before = Date) would call jsonOrThrow unconditionally, causing
“Expected Date object. Received undefined” errors when the parameter was omitted. Now the
generator adds a null check for optional date/datetime query parameters, matching the
behavior already used for object-type query parameters.
3.44.0
(feat): Enable forward compatible enums when the serde layer is enabled. Previously, the
enableForwardCompatibleEnums option only worked when noSerdeLayer was true.
Now enum types include | string regardless of the serde layer setting when
enableForwardCompatibleEnums is enabled, allowing TypeScript SDKs to accept
unrecognized enum values from APIs.
3.43.13
(fix): Fix nullable enum query parameters to be dropped when undefined is passed instead of being
sent as null. Previously, nullable query parameters like role: nullable<UserRole> would
generate code that converted undefined to null, causing the parameter to be included in the
request as an empty value. Now undefined values remain undefined and are properly dropped
from the query string.
3.43.12
(fix): Fix passthrough() function to only include truly unknown/extra properties in the result.
Previously, when a type had additionalProperties: true and used property name mapping
(e.g., snake_case to camelCase), the passthrough would spread both the original raw object
and the transformed value, resulting in duplicate properties with both naming conventions.
Now the passthrough correctly filters out known properties before spreading, ensuring only
extra properties that aren’t part of the schema definition are included.