feat: add flexible auth override, calendarDate field, and updated environment URLs#3
Closed
fern-api[bot] wants to merge 1 commit into
Closed
feat: add flexible auth override, calendarDate field, and updated environment URLs#3fern-api[bot] wants to merge 1 commit into
fern-api[bot] wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking: Adding the required
calendarDatefield toMealInDbBaseClientFacingSourceis a breaking change — existing callers constructing or consuming this type will get TypeScript compile errors for the missing required property.Breaking Changes
MealInDbBaseClientFacingSourcenow includes a requiredcalendarDate: stringfield (YYYY-mm-dd format). Existing code that constructs or destructures this type must be updated to handle the new field.JunctionEnvironmentURLs have changed fromtryvital.iotojunction.comfor all four environments (Production,ProductionEu,Sandbox,SandboxEu). If you hard-coded or compared against the old URLs, update accordingly.Added
AuthOptionunion type andauthproperty onBaseClientOptionsallow per-client authentication overrides: passfalseto disable auth, a function returning auth headers, anAuthProviderinstance, or rawHeaderAuthProvider.AuthOptions.isAuthProvidertype-guard helper is now exported from the core auth module.forwardCompatibleEnum_schema builder added for forward-compatible enum deserialization.Fixed
Micros,SampleData, andLabResultsRawserializers now correctly allownullvalues inside record fields, matching the actual API contract.See full changelog