Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "5.5.1",
"cliVersion": "5.10.2",
"generatorName": "fernapi/fern-java-sdk",
"generatorVersion": "4.6.1",
"generatorConfig": {
Expand All @@ -9,10 +9,10 @@
"client-class-name": "Junction",
"enable-forward-compatible-enums": true
},
"originGitCommit": "05d79dd6ce370cbd029417f59eb71c056d94aa61",
"originGitCommit": "5f82089cf81f14dcaa4eabeffe1c781fb1679c6e",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "AUTO",
"ciProvider": "unknown",
"sdkVersion": "0.0.1"
"sdkVersion": "1.0.0"
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Add the dependency in your `build.gradle` file:

```groovy
dependencies {
implementation 'com.junction:junction-java:0.0.1'
implementation 'com.junction:junction-java:1.0.0'
}
```

Expand All @@ -41,7 +41,7 @@ Add the dependency in your `pom.xml` file:
<dependency>
<groupId>com.junction</groupId>
<artifactId>junction-java</artifactId>
<version>0.0.1</version>
<version>1.0.0</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {

group = 'com.junction'

version = '0.0.1'
version = '1.0.0'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.junction'
artifactId = 'junction-java'
version = '0.0.1'
version = '1.0.0'
from components.java
pom {
name = 'vital'
Expand Down
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 1.0.0 - 2026-05-05
### Breaking Changes
* **`MealInDbBaseClientFacingSource.Builder`** — `timestamp()` now returns `CalendarDateStage` instead of `NameStage`, inserting a new required `calendarDate(String)` step in the builder chain. Migrate by adding `.calendarDate("YYYY-MM-DD")` between `.timestamp(...)` and `.name(...)`.
### Added
* **`LabReportResult`** — new optional `getSampleType()` (`LabReportResultSampleType`) and `getMeasurementKind()` (`LabReportResultMeasurementKind`) fields, with corresponding builder methods.
* **`LabReportResultSampleType`** — new non-exhaustive enum type representing the biological sample type (e.g. `URINE`, `SERUM_PLASMA_BLOOD`, `STOOL`, `SALIVA`).
* **`LabReportResultMeasurementKind`** — new non-exhaustive enum type representing how a lab value was derived (e.g. `DIRECT`, `CALCULATED`, `RATIO`).
### Changed
* **`Environment`** — all base URLs updated from `tryvital.io` to `junction.com` domains (`PRODUCTION`, `PRODUCTION_EU`, `SANDBOX`, `SANDBOX_EU`).

## 0.0.1 - 2026-05-01
* Initial SDK generation
* 🌿 Generated with Fern
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/junction/api/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
put("User-Agent", "com.junction:junction-java/0.0.1");
put("User-Agent", "com.junction:junction-java/1.0.0");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.vital.fern:api-sdk");
put("X-Fern-SDK-Version", "0.0.1");
put("X-Fern-SDK-Version", "1.0.0");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/junction/api/core/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
package com.junction.api.core;

public final class Environment {
public static final Environment PRODUCTION = new Environment("https://api.tryvital.io");
public static final Environment PRODUCTION = new Environment("https://api.us.junction.com");

public static final Environment PRODUCTION_EU = new Environment("https://api.eu.tryvital.io");
public static final Environment PRODUCTION_EU = new Environment("https://api.eu.junction.com");

public static final Environment SANDBOX = new Environment("https://api.sandbox.tryvital.io");
public static final Environment SANDBOX = new Environment("https://api.sandbox.us.junction.com");

public static final Environment SANDBOX_EU = new Environment("https://api.sandbox.eu.tryvital.io");
public static final Environment SANDBOX_EU = new Environment("https://api.sandbox.eu.junction.com");

private final String url;

Expand Down
90 changes: 90 additions & 0 deletions src/main/java/com/junction/api/types/LabReportResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public final class LabReportResult {

private final String value;

private final Optional<LabReportResultSampleType> sampleType;

private final Optional<LabReportResultMeasurementKind> measurementKind;

private final Optional<LabReportResultType> type;

private final Optional<String> units;
Expand All @@ -52,6 +56,8 @@ public final class LabReportResult {
private LabReportResult(
String testName,
String value,
Optional<LabReportResultSampleType> sampleType,
Optional<LabReportResultMeasurementKind> measurementKind,
Optional<LabReportResultType> type,
Optional<String> units,
Optional<Double> maxReferenceRange,
Expand All @@ -64,6 +70,8 @@ private LabReportResult(
Map<String, Object> additionalProperties) {
this.testName = testName;
this.value = value;
this.sampleType = sampleType;
this.measurementKind = measurementKind;
this.type = type;
this.units = units;
this.maxReferenceRange = maxReferenceRange;
Expand All @@ -86,6 +94,22 @@ public String getValue() {
return value;
}

/**
* @return ℹ️ This enum is non-exhaustive.
*/
@JsonProperty("sample_type")
public Optional<LabReportResultSampleType> getSampleType() {
return sampleType;
}

/**
* @return ℹ️ This enum is non-exhaustive.
*/
@JsonProperty("measurement_kind")
public Optional<LabReportResultMeasurementKind> getMeasurementKind() {
return measurementKind;
}

/**
* @return ℹ️ This enum is non-exhaustive.
*/
Expand Down Expand Up @@ -232,6 +256,8 @@ public Map<String, Object> getAdditionalProperties() {
private boolean equalTo(LabReportResult other) {
return testName.equals(other.testName)
&& value.equals(other.value)
&& sampleType.equals(other.sampleType)
&& measurementKind.equals(other.measurementKind)
&& type.equals(other.type)
&& units.equals(other.units)
&& maxReferenceRange.equals(other.maxReferenceRange)
Expand All @@ -248,6 +274,8 @@ public int hashCode() {
return Objects.hash(
this.testName,
this.value,
this.sampleType,
this.measurementKind,
this.type,
this.units,
this.maxReferenceRange,
Expand Down Expand Up @@ -285,6 +313,20 @@ public interface _FinalStage {

_FinalStage additionalProperties(Map<String, Object> additionalProperties);

/**
* <p>ℹ️ This enum is non-exhaustive.</p>
*/
_FinalStage sampleType(Optional<LabReportResultSampleType> sampleType);

_FinalStage sampleType(LabReportResultSampleType sampleType);

/**
* <p>ℹ️ This enum is non-exhaustive.</p>
*/
_FinalStage measurementKind(Optional<LabReportResultMeasurementKind> measurementKind);

_FinalStage measurementKind(LabReportResultMeasurementKind measurementKind);

/**
* <p>ℹ️ This enum is non-exhaustive.</p>
*/
Expand Down Expand Up @@ -370,6 +412,10 @@ public static final class Builder implements TestNameStage, ValueStage, _FinalSt

private Optional<LabReportResultType> type = Optional.empty();

private Optional<LabReportResultMeasurementKind> measurementKind = Optional.empty();

private Optional<LabReportResultSampleType> sampleType = Optional.empty();

@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();

Expand All @@ -379,6 +425,8 @@ private Builder() {}
public Builder from(LabReportResult other) {
testName(other.getTestName());
value(other.getValue());
sampleType(other.getSampleType());
measurementKind(other.getMeasurementKind());
type(other.getType());
units(other.getUnits());
maxReferenceRange(other.getMaxReferenceRange());
Expand Down Expand Up @@ -652,11 +700,53 @@ public _FinalStage type(Optional<LabReportResultType> type) {
return this;
}

/**
* <p>ℹ️ This enum is non-exhaustive.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage measurementKind(LabReportResultMeasurementKind measurementKind) {
this.measurementKind = Optional.ofNullable(measurementKind);
return this;
}

/**
* <p>ℹ️ This enum is non-exhaustive.</p>
*/
@java.lang.Override
@JsonSetter(value = "measurement_kind", nulls = Nulls.SKIP)
public _FinalStage measurementKind(Optional<LabReportResultMeasurementKind> measurementKind) {
this.measurementKind = measurementKind;
return this;
}

/**
* <p>ℹ️ This enum is non-exhaustive.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage sampleType(LabReportResultSampleType sampleType) {
this.sampleType = Optional.ofNullable(sampleType);
return this;
}

/**
* <p>ℹ️ This enum is non-exhaustive.</p>
*/
@java.lang.Override
@JsonSetter(value = "sample_type", nulls = Nulls.SKIP)
public _FinalStage sampleType(Optional<LabReportResultSampleType> sampleType) {
this.sampleType = sampleType;
return this;
}

@java.lang.Override
public LabReportResult build() {
return new LabReportResult(
testName,
value,
sampleType,
measurementKind,
type,
units,
maxReferenceRange,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.junction.api.types;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public final class LabReportResultMeasurementKind {
public static final LabReportResultMeasurementKind RATIO = new LabReportResultMeasurementKind(Value.RATIO, "ratio");

public static final LabReportResultMeasurementKind UNKNOWN =
new LabReportResultMeasurementKind(Value.UNKNOWN, "unknown");

public static final LabReportResultMeasurementKind DIRECT =
new LabReportResultMeasurementKind(Value.DIRECT, "direct");

public static final LabReportResultMeasurementKind CALCULATED =
new LabReportResultMeasurementKind(Value.CALCULATED, "calculated");

private final Value value;

private final String string;

LabReportResultMeasurementKind(Value value, String string) {
this.value = value;
this.string = string;
}

public Value getEnumValue() {
return value;
}

@java.lang.Override
@JsonValue
public String toString() {
return this.string;
}

@java.lang.Override
public boolean equals(Object other) {
return (this == other)
|| (other instanceof LabReportResultMeasurementKind
&& this.string.equals(((LabReportResultMeasurementKind) other).string));
}

@java.lang.Override
public int hashCode() {
return this.string.hashCode();
}

public <T> T visit(Visitor<T> visitor) {
switch (value) {
case RATIO:
return visitor.visitRatio();
case UNKNOWN:
return visitor.visitUnknown();
case DIRECT:
return visitor.visitDirect();
case CALCULATED:
return visitor.visitCalculated();
case _UNKNOWN:
default:
return visitor.visitUnknown(string);
}
}

@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static LabReportResultMeasurementKind valueOf(String value) {
switch (value) {
case "ratio":
return RATIO;
case "unknown":
return UNKNOWN;
case "direct":
return DIRECT;
case "calculated":
return CALCULATED;
default:
return new LabReportResultMeasurementKind(Value._UNKNOWN, value);
}
}

public enum Value {
DIRECT,

CALCULATED,

RATIO,

UNKNOWN,

_UNKNOWN
}

public interface Visitor<T> {
T visitDirect();

T visitCalculated();

T visitRatio();

T visitUnknown();

T visitUnknown(String unknownType);
}
}
Loading
Loading