Skip to content

Releases: junction-api/junction-java

1.0.1

07 May 15:05
ead1f9a

Choose a tag to compare

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 @JsonIgnore with @JsonProperty on required fields across all request classes (activity, body, sleep, vitals, lab tests, link, meal, menstrual cycle, etc.)
  • Add private @JsonProperty-annotated accessors with NullableNonemptyFilter for all optional (Optional<T>) fields to ensure correct conditional serialization
  • Import NullableNonemptyFilter and JsonProperty in all affected request classes

1.0.0

07 May 13:08
6613d0f

Choose a tag to compare

Changelog

Major release. Baseline: tryVital/vital-java@1.2.588.

Breaking changes

  • Maven coordinate renamedmigration steps
    The Java SDK is published under a new Maven coordinate:

    • io.tryvital:vital-javacom.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 hostsmigration steps
    Every base URL exposed by the SDK has been replaced as part of the rebrand:

    • https://api.tryvital.iohttps://api.us.junction.com
    • https://api.eu.tryvital.iohttps://api.eu.junction.com
    • https://api.sandbox.tryvital.iohttps://api.sandbox.us.junction.com
    • https://api.sandbox.eu.tryvital.iohttps://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. The Environment class name itself is unchanged.

  • Exception and HTTP-response types renamedmigration steps
    Two SDK-level types have been renamed:

    • VitalExceptionJunctionException (the top-level exception thrown by every SDK call)
    • VitalHttpResponseJunctionHttpResponse (the wrapper returned by raw-response variants)

    Update catch clauses and any helper signatures that mention these types.

  • Java package path moved to com.junction.apimigration steps
    Every generated type now lives under the com.junction.api package tree instead of com.vital.api. Every import com.vital... statement in your codebase needs to become import com.junction... — this affects models, request/response types, errors, and the client itself.

  • Top-level client class renamedmigration steps
    The entry-point client classes have been renamed across the SDK:

    • VitalJunction
    • VitalBuilderJunctionBuilder
    • AsyncVitalAsyncJunction
    • AsyncVitalBuilderAsyncJunctionBuilder

    Update construction sites and any helper methods or fields that hold a typed client reference.

  • Path parameters are now positional argumentsmigration 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 a UserGetRequest to hold the userId. Body and query parameters are unchanged: pass them as the second argument when present.

  • Per-endpoint request types renamed verb-firstmigration steps
    Auto-generated request types now read fluently from the verb. For example:

    • LabTestsGetMarkersRequestGetMarkersLabTestsRequest
    • LinkListBulkOpsRequestListBulkOpsLinkRequest

    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 Optionalmigration steps
    Model getters for fields that the API documents as nullable now return Optional<T> (and the matching builder setters accept null or an empty Optional). 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 return null for these fields — so unwrap with a default that matches your previous expectation.

New & improved

  • New top-level resources
    The SDK now exposes the compendium, labaccount, ordertransaction resource 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 pluggable Logger interface (with a default ConsoleLogger), a LogConfig you can wire via the client builder, and a built-in LoggingInterceptor for request/response logging. Server-sent-events responses can be parsed with the new SseEventParser / SseEvent helpers. RFC-2822 timestamps deserialise correctly through the new Rfc2822DateTimeDeserializer.

  • List physicians on a team
    TeamClient now exposes getPhysicians(GetPhysiciansTeamRequest) for listing physicians associated with a team — see the API reference for filter details.

  • Raw response shapes formalized — *V2InDB types are now *Raw
    Endpoints whose responses were previously typed as *V2InDB now use *Raw types. The values are unchanged; only the type names differ:

    • ActivityV2InDBRawActivity
    • BodyV2InDBRawBody
    • DeviceV2InDBRawDevices
    • SleepV2InDBRawSleep
    • WorkoutV2InDBRawWorkout

    If you imported one of the old names directly, switch to the new Raw* type.

  • Enums tolerate unknown values via a sentinelmigration 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 unknown Providers value now yields a Providers instance whose getEnumValue() returns Providers.Value._UNKNOWN, while toString() preserves the raw wire string.

    If your code uses a switch statement on an enum's getEnumValue(), add a default (or explicit _UNKNOWN) arm so unrecognised values are handled. Equality checks now compare against the sentinel rather than throwing.

Removed

  • Legacy link methods removedmigration 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:

    • BeginLinkTokenRequest
    • EmailAuthLink
    • PasswordAuthLink
    • LinkTokenStateRequest
    • LinkTokenValidationRequest
    • ManualConnectionData

    If you have call sites referencing these methods, see the Junction Link API reference for the documented integration path.

  • Public types removedmigration 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 legacy email_auth flow only.
    • ManualProviders — was the parameter type for the now-removed connectManualProvider method (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 returns ClientFacingUser instead. If you depended on the user-key shape, switch to reading the user fields off ClientFacingUser directly.