b.well Kotlin SDK v1.19.0

b.well Kotlin SDK version 1.19.0 includes new features, breaking changes, and several enhancements.


New Additions

New SearchOrganization model

  • New com.bwell.common.models.domain.search.SearchOrganization data class with three properties:
    • name: String?
    • endpoint: List<Endpoint>? lists the technical endpoints that provide access to services operated for the organization
    • logoUrl: String? holds the URL of the organization's logo
  • SearchOrganization is now the element type of HealthResource.organization, replacing com.bwell.common.models.domain.common.Organization

Health Sync: connect and disconnect are now HealthSyncManager members

  • HealthSyncManager declares both operations directly, so they are reached through BWellSdk.healthSync like every other Health Sync primitive:
    • connect(sourceId: String? = null): BWellResult<Unit> provisions backend credentials for the source's connection via setupMobileSync, maps them into a vendor-neutral HealthSyncSession, and starts the on-device session
    • disconnect(sourceId: String? = null): BWellResult<Unit> ends the on-device session and deletes the backend connection
  • sourceId may be omitted when exactly one source is registered
  • On disconnect, both steps run even if the first fails. The endSession outcome takes priority when both fail
  • Credentials never reach the caller. A missing orgId is a hard failure, HealthSyncError.InvalidCredentials, not a silent default
  • NOTE: the BWellSdk.connect() and BWellSdk.disconnect() extension functions have been removed. Please update call sites from sdk.connect(sourceId) to sdk.healthSync.connect(sourceId), and from sdk.disconnect(sourceId) to sdk.healthSync.disconnect(sourceId). Signatures, return types, and error semantics are unchanged. Only the receiver changed

Updates

Search: HealthResource model updates

  • New logoUrl: String? field added, the URL of the health resource's logo. Resources without a logo return null
  • organization changed from List<Organization>? to List<SearchOrganization>?
  • name and endpoint are unchanged. Same property names, same types, and same values
  • The health resource search response has only ever supplied name and endpoint, so the remaining Organization fields were always null on a search result. SearchOrganization reflects what the response actually returns
  • NOTE: logoUrl is the fourth constructor parameter and has no default value, shifting component4() through component12() to component5() through component13(). Positional construction and destructuring will break. Please access HealthResource fields by name
  • NOTE: id, identifier, resourceType, telecom, address, active, and type are not present on SearchOrganization, so code reading those fields off a search result's organization will no longer compile. Please fetch the full Organization separately if you need them
  • NOTE: location remains deprecated in favor of providerLocation, unchanged from 1.18.0

Health Sync: BWellHealthSync.configure() now supports device and connections

  • configure() accepts optional device and connections parameters, defaulting to the real BWellSdk singleton, so tests can inject fakes without a fully initialized SDK

Notes

  • searchProviders() is unaffected. It still runs against the deprecated providers query, whose organization type has no logoUrl on the schema. Provider is unchanged in this release
  • If you are upgrading from 1.17.0 or earlier, the Health Sync module introduced in 1.18.0 is new to you. Register the on-device source once at startup with BWellHealthSync.configure(source) after BWellSdk.initialize(config). See the v1.18.0 change log
  • The 3-parameter location(latitude, longitude, zipCode) request builder remains deprecated in favor of location(latitude, longitude) and location(zipCode), unchanged since 1.13.0