Skip to content

feat: add flexible auth override, calendarDate field, and updated environment URLs#3

Closed
fern-api[bot] wants to merge 1 commit into
mainfrom
fern-bot/2026-05-04T11-26Z
Closed

feat: add flexible auth override, calendarDate field, and updated environment URLs#3
fern-api[bot] wants to merge 1 commit into
mainfrom
fern-bot/2026-05-04T11-26Z

Conversation

@fern-api
Copy link
Copy Markdown
Contributor

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

⚠️ 0.0.1 → 1.0.0

Breaking: Adding the required calendarDate field to MealInDbBaseClientFacingSource is a breaking change — existing callers constructing or consuming this type will get TypeScript compile errors for the missing required property.

Breaking Changes

  • MealInDbBaseClientFacingSource now includes a required calendarDate: string field (YYYY-mm-dd format). Existing code that constructs or destructures this type must be updated to handle the new field.
  • JunctionEnvironment URLs have changed from tryvital.io to junction.com for all four environments (Production, ProductionEu, Sandbox, SandboxEu). If you hard-coded or compared against the old URLs, update accordingly.

Added

  • AuthOption union type and auth property on BaseClientOptions allow per-client authentication overrides: pass false to disable auth, a function returning auth headers, an AuthProvider instance, or raw HeaderAuthProvider.AuthOptions.
  • isAuthProvider type-guard helper is now exported from the core auth module.
  • forwardCompatibleEnum_ schema builder added for forward-compatible enum deserialization.

Fixed

  • Micros, SampleData, and LabResultsRaw serializers now correctly allow null values inside record fields, matching the actual API contract.

See full changelog

…ironment URLs

Introduce several new capabilities and behavioral improvements across the SDK:

- A new `AuthOption` type and `auth` property on `BaseClientOptions` allow callers
  to override authentication per-client by passing `false` (disable auth), a function,
  an `AuthProvider` instance, or raw `HeaderAuthProvider.AuthOptions`.
- `MealInDbBaseClientFacingSource` gains a required `calendarDate` field (YYYY-mm-dd)
  for providers that only expose a date rather than a full timestamp.
- Environment base URLs updated from `tryvital.io` to `junction.com` across all four
  environments (Production, ProductionEu, Sandbox, SandboxEu).
- Serialization for `Micros` record values and `SampleData`/`LabResultsRaw` record
  values now correctly allows `null` entries, matching the actual API contract.
- `isAuthProvider` type-guard helper exported from `core/auth`.
- `forwardCompatibleEnum_` schema builder added for forward-compatible enum handling.

Key changes:
- Add `AuthOption` union type and `auth?: AuthOption` to `BaseClientOptions`
- Add required `calendarDate: string` to `MealInDbBaseClientFacingSource`
- Update all `JunctionEnvironment` URLs to `junction.com` domain
- Fix nullable record values in `Micros`, `SampleData`, and `LabResultsRaw` serializers
- Export `isAuthProvider` guard and `forwardCompatibleEnum_` builder

🌿 Generated with Fern
@ItachiEU ItachiEU closed this May 6, 2026
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