Skip to content

feat: add flexible auth override, calendarDate field, and nullable record values#2

Merged
ItachiEU merged 1 commit into
mainfrom
fern-bot/2026-05-04T08-02Z
May 4, 2026
Merged

feat: add flexible auth override, calendarDate field, and nullable record values#2
ItachiEU merged 1 commit into
mainfrom
fern-bot/2026-05-04T08-02Z

Conversation

@fern-api
Copy link
Copy Markdown
Contributor

@fern-api fern-api Bot commented May 4, 2026

⚠️ 0.0.1 → 1.0.0

Breaking: calendarDate: string is added as a required (non-optional) property to the MealInDbBaseClientFacingSource interface, breaking existing callers who construct or type-check that object without the new field.

Breaking Changes

  • MealInDbBaseClientFacingSource — new required field calendarDate: string added; existing code that constructs or assigns this type without calendarDate will fail to compile. Add calendarDate to all usages.

Added

  • AuthOption type and auth option on BaseClientOptions — pass false to disable authentication, a function returning auth headers, an AuthProvider instance, or HeaderAuthProvider.AuthOptions to override auth at the client level.
  • isAuthProvider — new exported type guard in core/auth for checking whether a value implements the AuthProvider interface.
  • forwardCompatibleEnum_ — new schema builder utility for forward-compatible enum deserialization that tolerates unknown values.

Changed

  • Micros, SampleData, and LabResultsRaw serialization — record values in minerals, traceElements, vitamins, performingLaboratories, and sampleInformation now accept null values in addition to their typed values, improving compatibility with API responses.

See full changelog

…cord values

Introduce several new capabilities across the SDK: a flexible `auth`
option on `BaseClientOptions` for overriding authentication at the
client level, a new `calendarDate` field on `MealInDbBaseClientFacingSource`,
nullable value support in serialized record types, and a
`forwardCompatibleEnum_` schema builder utility.

Key changes:
- Add `AuthOption` type and `auth` field to `BaseClientOptions`, supporting `false` (disable auth), a function, an `AuthProvider`, or `HeaderAuthProvider.AuthOptions`
- Add `isAuthProvider` type guard exported from `core/auth`
- Add required `calendarDate: string` field to `MealInDbBaseClientFacingSource`
- Allow nullable values in `Micros` mineral/traceElement/vitamin records and `SampleData`/`LabResultsRaw` record serialization
- Add `forwardCompatibleEnum_` schema builder for forward-compatible enum handling

🌿 Generated with Fern
@ItachiEU ItachiEU merged commit f7b5397 into main May 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant