diff --git a/.fern/metadata.json b/.fern/metadata.json index e3b2a98..f1c7f07 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,5 +1,5 @@ { - "cliVersion": "5.5.1", + "cliVersion": "5.7.7", "generatorName": "fernapi/fern-java-sdk", "generatorVersion": "4.6.1", "generatorConfig": { @@ -9,10 +9,10 @@ "client-class-name": "Junction", "enable-forward-compatible-enums": true }, - "originGitCommit": "05d79dd6ce370cbd029417f59eb71c056d94aa61", + "originGitCommit": "ec33b15e9d0ad30bc16f88a10d2500f900182d1e", "originGitCommitIsDirty": true, "invokedBy": "ci", "requestedVersion": "AUTO", "ciProvider": "unknown", - "sdkVersion": "0.0.1" + "sdkVersion": "1.0.0" } \ No newline at end of file diff --git a/README.md b/README.md index 94eb4cd..52fcf13 100644 --- a/README.md +++ b/README.md @@ -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' } ``` @@ -41,7 +41,7 @@ Add the dependency in your `pom.xml` file: com.junction junction-java - 0.0.1 + 1.0.0 ``` diff --git a/build.gradle b/build.gradle index 1797e49..31b2970 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ java { group = 'com.junction' -version = '0.0.1' +version = '1.0.0' jar { dependsOn(":generatePomFileForMavenPublication") @@ -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' diff --git a/changelog.md b/changelog.md index 9f803cf..4b39066 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,9 @@ +## 1.0.0 - 2026-05-04 +### Breaking Changes +* **`MealInDbBaseClientFacingSource` builder** — the `TimestampStage.timestamp()` method now returns `CalendarDateStage` instead of `NameStage`; existing builder chains must insert a `.calendarDate(...)` call between `.timestamp(...)` and `.name(...)`. +### Added +* **`MealInDbBaseClientFacingSource.getCalendarDate()`** — new required field exposing the meal date in `YYYY-MM-dd` format, sourced from the `calendar_date` JSON property. + ## 0.0.1 - 2026-05-01 * Initial SDK generation * 🌿 Generated with Fern diff --git a/src/main/java/com/junction/api/core/ClientOptions.java b/src/main/java/com/junction/api/core/ClientOptions.java index 8626ce6..d699afb 100644 --- a/src/main/java/com/junction/api/core/ClientOptions.java +++ b/src/main/java/com/junction/api/core/ClientOptions.java @@ -38,10 +38,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - 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; diff --git a/src/main/java/com/junction/api/types/MealInDbBaseClientFacingSource.java b/src/main/java/com/junction/api/types/MealInDbBaseClientFacingSource.java index 7d46cdd..25a5f1f 100644 --- a/src/main/java/com/junction/api/types/MealInDbBaseClientFacingSource.java +++ b/src/main/java/com/junction/api/types/MealInDbBaseClientFacingSource.java @@ -37,6 +37,8 @@ public final class MealInDbBaseClientFacingSource { private final OffsetDateTime timestamp; + private final String calendarDate; + private final String name; private final Optional energy; @@ -66,6 +68,7 @@ private MealInDbBaseClientFacingSource( int sourceId, String providerId, OffsetDateTime timestamp, + String calendarDate, String name, Optional energy, Optional macros, @@ -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; @@ -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; @@ -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) @@ -269,6 +282,7 @@ public int hashCode() { this.sourceId, this.providerId, this.timestamp, + this.calendarDate, this.name, this.energy, this.macros, @@ -322,7 +336,14 @@ public interface ProviderIdStage { } public interface TimestampStage { - NameStage timestamp(@NotNull OffsetDateTime timestamp); + CalendarDateStage timestamp(@NotNull OffsetDateTime timestamp); + } + + public interface CalendarDateStage { + /** + *

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.

+ */ + NameStage calendarDate(@NotNull String calendarDate); } public interface NameStage { @@ -391,6 +412,7 @@ public static final class Builder SourceIdStage, ProviderIdStage, TimestampStage, + CalendarDateStage, NameStage, SourceStage, CreatedAtStage, @@ -408,6 +430,8 @@ public static final class Builder private OffsetDateTime timestamp; + private String calendarDate; + private String name; private ClientFacingSource source; @@ -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()); @@ -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; } + /** + *

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.

+ *

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.

+ * @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) { @@ -686,6 +723,7 @@ public MealInDbBaseClientFacingSource build() { sourceId, providerId, timestamp, + calendarDate, name, energy, macros,