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.7.7",
"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": "013d384eb55b3bae6134a907ce4c7f11837ba7d9",
"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
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.0.0 - 2026-05-04
### Breaking Changes
* **`MealInDbBaseClientFacingSource` builder** — a new required `calendarDate` step has been inserted into the staged builder chain; `TimestampStage.timestamp()` now returns `CalendarDateStage` instead of `NameStage`, so existing builder call chains will fail to compile. Add a `.calendarDate(...)` call after `.timestamp(...)` to migrate.
* **`Environment` URLs** — the base URLs for all four environment constants (`PRODUCTION`, `PRODUCTION_EU`, `SANDBOX`, `SANDBOX_EU`) have changed from `tryvital.io` domains to `junction.com` domains. No code change is required, but any hardcoded URL overrides should be updated accordingly.
### Added
* **`MealInDbBaseClientFacingSource.getCalendarDate()`** — returns the date of the meal in `YYYY-MM-DD` format, supporting providers that only expose a calendar date.

## 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
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public final class MealInDbBaseClientFacingSource {

private final OffsetDateTime timestamp;

private final String calendarDate;

private final String name;

private final Optional<Energy> energy;
Expand Down Expand Up @@ -66,6 +68,7 @@ private MealInDbBaseClientFacingSource(
int sourceId,
String providerId,
OffsetDateTime timestamp,
String calendarDate,
String name,
Optional<Energy> energy,
Optional<Macros> macros,
Expand All @@ -83,6 +86,7 @@ private MealInDbBaseClientFacingSource(
this.sourceId = sourceId;
this.providerId = providerId;
this.timestamp = timestamp;
this.calendarDate = calendarDate;
this.name = name;
this.energy = energy;
this.macros = macros;
Expand Down Expand Up @@ -135,6 +139,14 @@ public OffsetDateTime getTimestamp() {
return timestamp;
}

/**
* @return Date of the meal in the YYYY-mm-dd format. For providers that only expose a date, this is the calendar date as recorded by the user.
*/
@JsonProperty("calendar_date")
public String getCalendarDate() {
return calendarDate;
}

@JsonProperty("name")
public String getName() {
return name;
Expand Down Expand Up @@ -248,6 +260,7 @@ private boolean equalTo(MealInDbBaseClientFacingSource other) {
&& sourceId == other.sourceId
&& providerId.equals(other.providerId)
&& timestamp.equals(other.timestamp)
&& calendarDate.equals(other.calendarDate)
&& name.equals(other.name)
&& energy.equals(other.energy)
&& macros.equals(other.macros)
Expand All @@ -269,6 +282,7 @@ public int hashCode() {
this.sourceId,
this.providerId,
this.timestamp,
this.calendarDate,
this.name,
this.energy,
this.macros,
Expand Down Expand Up @@ -322,7 +336,14 @@ public interface ProviderIdStage {
}

public interface TimestampStage {
NameStage timestamp(@NotNull OffsetDateTime timestamp);
CalendarDateStage timestamp(@NotNull OffsetDateTime timestamp);
}

public interface CalendarDateStage {
/**
* <p>Date of the meal in the YYYY-mm-dd format. For providers that only expose a date, this is the calendar date as recorded by the user.</p>
*/
NameStage calendarDate(@NotNull String calendarDate);
}

public interface NameStage {
Expand Down Expand Up @@ -391,6 +412,7 @@ public static final class Builder
SourceIdStage,
ProviderIdStage,
TimestampStage,
CalendarDateStage,
NameStage,
SourceStage,
CreatedAtStage,
Expand All @@ -408,6 +430,8 @@ public static final class Builder

private OffsetDateTime timestamp;

private String calendarDate;

private String name;

private ClientFacingSource source;
Expand Down Expand Up @@ -441,6 +465,7 @@ public Builder from(MealInDbBaseClientFacingSource other) {
sourceId(other.getSourceId());
providerId(other.getProviderId());
timestamp(other.getTimestamp());
calendarDate(other.getCalendarDate());
name(other.getName());
energy(other.getEnergy());
macros(other.getMacros());
Expand Down Expand Up @@ -506,11 +531,23 @@ public TimestampStage providerId(@NotNull String providerId) {

@java.lang.Override
@JsonSetter("timestamp")
public NameStage timestamp(@NotNull OffsetDateTime timestamp) {
public CalendarDateStage timestamp(@NotNull OffsetDateTime timestamp) {
this.timestamp = Objects.requireNonNull(timestamp, "timestamp must not be null");
return this;
}

/**
* <p>Date of the meal in the YYYY-mm-dd format. For providers that only expose a date, this is the calendar date as recorded by the user.</p>
* <p>Date of the meal in the YYYY-mm-dd format. For providers that only expose a date, this is the calendar date as recorded by the user.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
@JsonSetter("calendar_date")
public NameStage calendarDate(@NotNull String calendarDate) {
this.calendarDate = Objects.requireNonNull(calendarDate, "calendarDate must not be null");
return this;
}

@java.lang.Override
@JsonSetter("name")
public SourceStage name(@NotNull String name) {
Expand Down Expand Up @@ -686,6 +723,7 @@ public MealInDbBaseClientFacingSource build() {
sourceId,
providerId,
timestamp,
calendarDate,
name,
energy,
macros,
Expand Down
Loading