Releases: junction-api/junction-java
1.0.1
1.0.0 → 1.0.1
Previously, required fields like start_date, zip_code, lab_id,
user_id, collection_date, and lab were annotated with @JsonIgnore,
causing them to be omitted from serialized request bodies. Optional fields
(end_date, provider, cursor, next_cursor, etc.) also lacked proper
@JsonProperty bindings and NullableNonemptyFilter handling.
This fix ensures all request fields are correctly serialized when making
API calls, resolving silent data-loss bugs where required parameters were
never sent to the server.
Key changes:
- Replace
@JsonIgnorewith@JsonPropertyon required fields across all request classes (activity, body, sleep, vitals, lab tests, link, meal, menstrual cycle, etc.) - Add private
@JsonProperty-annotated accessors withNullableNonemptyFilterfor all optional (Optional<T>) fields to ensure correct conditional serialization - Import
NullableNonemptyFilterandJsonPropertyin all affected request classes
1.0.0
Changelog
Major release. Baseline: tryVital/vital-java@1.2.588.
Breaking changes
-
Maven coordinate renamed — migration steps
The Java SDK is published under a new Maven coordinate:io.tryvital:vital-java→com.junction:junction-java
The old artifact will not receive further releases — replace your dependency declaration and re-resolve. This is a coordinate replacement, not a version bump: it ships alongside the package-prefix and class renames, so an in-place version update will not compile.
-
Environment URLs moved to junction.com hosts — migration steps
Every base URL exposed by the SDK has been replaced as part of the rebrand:https://api.tryvital.io→https://api.us.junction.comhttps://api.eu.tryvital.io→https://api.eu.junction.comhttps://api.sandbox.tryvital.io→https://api.sandbox.us.junction.comhttps://api.sandbox.eu.tryvital.io→https://api.sandbox.eu.junction.com
Callers that pass
Environment.PRODUCTION(or the other constants) pick up the new URL automatically because the constant value changed; callers that pass a literal URL string — or that compare against the old URL — must update those references. TheEnvironmentclass name itself is unchanged. -
Exception and HTTP-response types renamed — migration steps
Two SDK-level types have been renamed:VitalException→JunctionException(the top-level exception thrown by every SDK call)VitalHttpResponse→JunctionHttpResponse(the wrapper returned by raw-response variants)
Update
catchclauses and any helper signatures that mention these types. -
Java package path moved to
com.junction.api— migration steps
Every generated type now lives under thecom.junction.apipackage tree instead ofcom.vital.api. Everyimport com.vital...statement in your codebase needs to becomeimport com.junction...— this affects models, request/response types, errors, and the client itself. -
Top-level client class renamed — migration steps
The entry-point client classes have been renamed across the SDK:Vital→JunctionVitalBuilder→JunctionBuilderAsyncVital→AsyncJunctionAsyncVitalBuilder→AsyncJunctionBuilder
Update construction sites and any helper methods or fields that hold a typed client reference.
-
Path parameters are now positional arguments — migration steps
Every endpoint that takes a path parameter accepts it as a positional argument on the method instead of nested inside a request-object builder. For example,client.user().get(userId)replaces the old pattern that built aUserGetRequestto hold theuserId. Body and query parameters are unchanged: pass them as the second argument when present. -
Per-endpoint request types renamed verb-first — migration steps
Auto-generated request types now read fluently from the verb. For example:LabTestsGetMarkersRequest→GetMarkersLabTestsRequestLinkListBulkOpsRequest→ListBulkOpsLinkRequest
The same rule applies to every per-endpoint request class. If you import these types directly (for type annotations on helper methods, custom wiring, or builder reuse), update each import and reference. Most callers that just inline-build the request at the call site are unaffected.
-
Nullable model fields now surface as
Optional— migration steps
Model getters for fields that the API documents as nullable now returnOptional<T>(and the matching builder setters acceptnullor an emptyOptional). Code that previously dereferenced these getters directly will not compile until you unwrap with.orElse(...),.isPresent(), or.get(). The change is an accuracy fix — the API was always free to returnnullfor these fields — so unwrap with a default that matches your previous expectation.
New & improved
-
New top-level resources
The SDK now exposes thecompendium,labaccount,ordertransactionresource clients on the root client. See the API reference for the full endpoint list. -
Pluggable logging and SSE parsing in core
The core package now exposes a pluggableLoggerinterface (with a defaultConsoleLogger), aLogConfigyou can wire via the client builder, and a built-inLoggingInterceptorfor request/response logging. Server-sent-events responses can be parsed with the newSseEventParser/SseEventhelpers. RFC-2822 timestamps deserialise correctly through the newRfc2822DateTimeDeserializer. -
List physicians on a team
TeamClientnow exposesgetPhysicians(GetPhysiciansTeamRequest)for listing physicians associated with a team — see the API reference for filter details. -
Raw response shapes formalized —
*V2InDBtypes are now*Raw
Endpoints whose responses were previously typed as*V2InDBnow use*Rawtypes. The values are unchanged; only the type names differ:ActivityV2InDB→RawActivityBodyV2InDB→RawBodyDeviceV2InDB→RawDevicesSleepV2InDB→RawSleepWorkoutV2InDB→RawWorkout
If you imported one of the old names directly, switch to the new
Raw*type. -
Enums tolerate unknown values via a sentinel — migration steps
Every generated enum is now forward-compatible. Deserialising a wire value the SDK doesn't recognise no longer throws — it produces an enum instance whose internal value is the sentinel_UNKNOWN. This means future server-side enum additions stop being a hard break for older client versions. For example, an unknownProvidersvalue now yields aProvidersinstance whosegetEnumValue()returnsProviders.Value._UNKNOWN, whiletoString()preserves the raw wire string.If your code uses a
switchstatement on an enum'sgetEnumValue(), add adefault(or explicit_UNKNOWN) arm so unrecognised values are handled. Equality checks now compare against the sentinel rather than throwing.
Removed
-
Legacy link methods removed — migration steps
These methods have been deprecated for over two years and were never part of the documented Junction Link integration path; they should not have been in the SDK in the first place. They are removed in this release:link.tokenState(...)link.isTokenValid(...)link.startConnect(...)link.emailAuth(...)link.passwordAuth(...)link.connectManualProvider(...)team.getLinkConfig(...)
The supporting request/body classes that backed these methods are removed alongside them:
BeginLinkTokenRequestEmailAuthLinkPasswordAuthLinkLinkTokenStateRequestLinkTokenValidationRequestManualConnectionData
If you have call sites referencing these methods, see the Junction Link API reference for the documented integration path.
-
Public types removed — migration steps
Three top-level public types were removed from the SDK with no equivalent. If you imported any of these, drop the import:AuthType— was used by the legacyemail_authflow only.ManualProviders— was the parameter type for the now-removedconnectManualProvidermethod (one of the legacy link methods, see above). With that method gone, this enum is removed too.ClientFacingUserKey— the endpoint that used to return this model now returnsClientFacingUserinstead. If you depended on the user-key shape, switch to reading the user fields offClientFacingUserdirectly.