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.6.1",
"generatorName": "fernapi/fern-typescript-sdk",
"generatorVersion": "3.66.1",
"generatorConfig": {
Expand All @@ -13,10 +13,10 @@
"packageManager": "pnpm",
"testFramework": "vitest"
},
"originGitCommit": "05d79dd6ce370cbd029417f59eb71c056d94aa61",
"originGitCommit": "e1c3ceef9f4e6957d1a38d66920fdb58ec00c6d5",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "AUTO",
"ciProvider": "unknown",
"sdkVersion": "0.0.1"
"sdkVersion": "1.0.0"
}
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.0 - 2026-05-01
### Breaking Changes
* **`MealInDbBaseClientFacingSource`** — a new required `calendarDate` field (`string`, mapped from `calendar_date`) has been added to the interface. Any code that constructs this type without providing `calendarDate` will fail to compile. Add `calendarDate: "YYYY-mm-dd"` to all object literals or construction sites for this type.

## 0.0.1 - 2026-05-01
* Initial SDK generation
* 🌿 Generated with Fern
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@junction-api/sdk",
"version": "0.0.1",
"version": "1.0.0",
"private": false,
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export function normalizeClientOptions<T extends BaseClientOptions = BaseClientO
{
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@junction-api/sdk",
"X-Fern-SDK-Version": "0.0.1",
"User-Agent": "@junction-api/sdk/0.0.1",
"X-Fern-SDK-Version": "1.0.0",
"User-Agent": "@junction-api/sdk/1.0.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
2 changes: 2 additions & 0 deletions src/api/types/MealInDbBaseClientFacingSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export interface MealInDbBaseClientFacingSource {
/** This value is identical to `id`. */
providerId: string;
timestamp: Date;
/** 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. */
calendarDate: string;
name: string;
energy?: Junction.Energy | null;
macros?: Junction.Macros | null;
Expand Down
2 changes: 2 additions & 0 deletions src/serialization/types/MealInDbBaseClientFacingSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const MealInDbBaseClientFacingSource: core.serialization.ObjectSchema<
sourceId: core.serialization.property("source_id", core.serialization.number()),
providerId: core.serialization.property("provider_id", core.serialization.string()),
timestamp: core.serialization.date(),
calendarDate: core.serialization.property("calendar_date", core.serialization.string()),
name: core.serialization.string(),
energy: Energy.optionalNullable(),
macros: Macros.optionalNullable(),
Expand All @@ -39,6 +40,7 @@ export declare namespace MealInDbBaseClientFacingSource {
source_id: number;
provider_id: string;
timestamp: string;
calendar_date: string;
name: string;
energy?: (Energy.Raw | null | undefined) | null;
macros?: (Macros.Raw | null | undefined) | null;
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SDK_VERSION = "0.0.1";
export const SDK_VERSION = "1.0.0";
272 changes: 136 additions & 136 deletions tests/wire/labTests.test.ts

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions tests/wire/meal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ describe("MealClient", () => {
priority_id: 42,
source_id: 10,
provider_id: "123456",
timestamp: "2019-08-24T14:15:22Z",
timestamp: "2019-08-24T00:00:00Z",
calendar_date: "2019-08-24",
name: "Dinner",
energy: { unit: "kcal", value: 1.1 },
macros: {},
Expand Down Expand Up @@ -82,7 +83,8 @@ describe("MealClient", () => {
priorityId: 42,
sourceId: 10,
providerId: "123456",
timestamp: new Date("2019-08-24T14:15:22.000Z"),
timestamp: new Date("2019-08-24T00:00:00.000Z"),
calendarDate: "2019-08-24",
name: "Dinner",
energy: {
unit: "kcal",
Expand Down
266 changes: 133 additions & 133 deletions tests/wire/sleep.test.ts

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions tests/wire/team.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ describe("TeamClient", () => {
user_id: "56bd81c9-6219-4000-a775-ae85526eba18",
team_id: "56bd81c9-6219-4000-a775-ae85526eba18",
client_user_id: "ZTEwZjNjMjctOTI2ZS00M2Vm",
created_on: "2026-04-30T17:37:45Z",
created_on: "2026-05-01T17:50:11Z",
connected_sources: [
{
provider: { name: "Oura", slug: "oura", logo: "https://logo_url.com" },
created_on: "2026-04-30T17:37:45Z",
created_on: "2026-05-01T17:50:11Z",
source: { name: "Oura", slug: "oura", logo: "logo_url" },
},
],
fallback_time_zone: { id: "Europe/London", source_slug: "manual", updated_at: "2026-04-30T17:37:45Z" },
fallback_birth_date: { value: "1989-09-12", source_slug: "manual", updated_at: "2026-04-30T17:37:45Z" },
fallback_time_zone: { id: "Europe/London", source_slug: "manual", updated_at: "2026-05-01T17:50:11Z" },
fallback_birth_date: { value: "1989-09-12", source_slug: "manual", updated_at: "2026-05-01T17:50:11Z" },
ingestion_start: "ingestion_start",
ingestion_end: "ingestion_end",
},
Expand All @@ -162,15 +162,15 @@ describe("TeamClient", () => {
userId: "56bd81c9-6219-4000-a775-ae85526eba18",
teamId: "56bd81c9-6219-4000-a775-ae85526eba18",
clientUserId: "ZTEwZjNjMjctOTI2ZS00M2Vm",
createdOn: new Date("2026-04-30T17:37:45.000Z"),
createdOn: new Date("2026-05-01T17:50:11.000Z"),
connectedSources: [
{
provider: {
name: "Oura",
slug: "oura",
logo: "https://logo_url.com",
},
createdOn: new Date("2026-04-30T17:37:45.000Z"),
createdOn: new Date("2026-05-01T17:50:11.000Z"),
source: {
name: "Oura",
slug: "oura",
Expand All @@ -181,12 +181,12 @@ describe("TeamClient", () => {
fallbackTimeZone: {
id: "Europe/London",
sourceSlug: "manual",
updatedAt: new Date("2026-04-30T17:37:45.000Z"),
updatedAt: new Date("2026-05-01T17:50:11.000Z"),
},
fallbackBirthDate: {
value: "1989-09-12",
sourceSlug: "manual",
updatedAt: new Date("2026-04-30T17:37:45.000Z"),
updatedAt: new Date("2026-05-01T17:50:11.000Z"),
},
ingestionStart: "ingestion_start",
ingestionEnd: "ingestion_end",
Expand Down
40 changes: 20 additions & 20 deletions tests/wire/testkit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ describe("TestkitClient", () => {
};
const rawResponseBody = {
order: {
user_id: "cd6eb651-2f81-4a96-8065-e5deea3f25d8",
id: "31d02d72-8751-4349-ace5-a61c84712706",
team_id: "e3b407cc-8648-48a8-bd51-957735a01cf0",
user_id: "7e7791a6-7fb6-4977-be02-99a3c961733c",
id: "5e23dadd-8c9c-4ffa-bf93-fd7797d3a86d",
team_id: "6ca3a9e9-fdb4-4235-b022-861a23d095dd",
patient_details: {
first_name: "first_name",
last_name: "last_name",
Expand Down Expand Up @@ -118,9 +118,9 @@ describe("TestkitClient", () => {
details: {
type: "testkit",
data: {
id: "0efd410c-9980-4e90-be2a-34432bf12dd2",
id: "62fae40b-744f-482c-a444-5c77699e3bcc",
shipment: {
id: "e6770ba4-b52b-4089-adbd-84d1f6ca6005",
id: "44f915bb-8474-4021-aa53-4fb804328758",
outbound_tracking_number: "<outbound_tracking_number>",
outbound_tracking_url: "<outbound_tracking_url>",
inbound_tracking_number: "<inbound_tracking_number>",
Expand Down Expand Up @@ -230,9 +230,9 @@ describe("TestkitClient", () => {
});
expect(response).toEqual({
order: {
userId: "cd6eb651-2f81-4a96-8065-e5deea3f25d8",
id: "31d02d72-8751-4349-ace5-a61c84712706",
teamId: "e3b407cc-8648-48a8-bd51-957735a01cf0",
userId: "7e7791a6-7fb6-4977-be02-99a3c961733c",
id: "5e23dadd-8c9c-4ffa-bf93-fd7797d3a86d",
teamId: "6ca3a9e9-fdb4-4235-b022-861a23d095dd",
patientDetails: {
firstName: "first_name",
lastName: "last_name",
Expand Down Expand Up @@ -332,9 +332,9 @@ describe("TestkitClient", () => {
details: {
type: "testkit",
data: {
id: "0efd410c-9980-4e90-be2a-34432bf12dd2",
id: "62fae40b-744f-482c-a444-5c77699e3bcc",
shipment: {
id: "e6770ba4-b52b-4089-adbd-84d1f6ca6005",
id: "44f915bb-8474-4021-aa53-4fb804328758",
outboundTrackingNumber: "<outbound_tracking_number>",
outboundTrackingUrl: "<outbound_tracking_url>",
inboundTrackingNumber: "<inbound_tracking_number>",
Expand Down Expand Up @@ -498,9 +498,9 @@ describe("TestkitClient", () => {
};
const rawResponseBody = {
order: {
user_id: "cd6eb651-2f81-4a96-8065-e5deea3f25d8",
id: "31d02d72-8751-4349-ace5-a61c84712706",
team_id: "e3b407cc-8648-48a8-bd51-957735a01cf0",
user_id: "7e7791a6-7fb6-4977-be02-99a3c961733c",
id: "5e23dadd-8c9c-4ffa-bf93-fd7797d3a86d",
team_id: "6ca3a9e9-fdb4-4235-b022-861a23d095dd",
patient_details: {
first_name: "first_name",
last_name: "last_name",
Expand Down Expand Up @@ -594,9 +594,9 @@ describe("TestkitClient", () => {
details: {
type: "testkit",
data: {
id: "0efd410c-9980-4e90-be2a-34432bf12dd2",
id: "62fae40b-744f-482c-a444-5c77699e3bcc",
shipment: {
id: "e6770ba4-b52b-4089-adbd-84d1f6ca6005",
id: "44f915bb-8474-4021-aa53-4fb804328758",
outbound_tracking_number: "<outbound_tracking_number>",
outbound_tracking_url: "<outbound_tracking_url>",
inbound_tracking_number: "<inbound_tracking_number>",
Expand Down Expand Up @@ -701,9 +701,9 @@ describe("TestkitClient", () => {
});
expect(response).toEqual({
order: {
userId: "cd6eb651-2f81-4a96-8065-e5deea3f25d8",
id: "31d02d72-8751-4349-ace5-a61c84712706",
teamId: "e3b407cc-8648-48a8-bd51-957735a01cf0",
userId: "7e7791a6-7fb6-4977-be02-99a3c961733c",
id: "5e23dadd-8c9c-4ffa-bf93-fd7797d3a86d",
teamId: "6ca3a9e9-fdb4-4235-b022-861a23d095dd",
patientDetails: {
firstName: "first_name",
lastName: "last_name",
Expand Down Expand Up @@ -803,9 +803,9 @@ describe("TestkitClient", () => {
details: {
type: "testkit",
data: {
id: "0efd410c-9980-4e90-be2a-34432bf12dd2",
id: "62fae40b-744f-482c-a444-5c77699e3bcc",
shipment: {
id: "e6770ba4-b52b-4089-adbd-84d1f6ca6005",
id: "44f915bb-8474-4021-aa53-4fb804328758",
outboundTrackingNumber: "<outbound_tracking_number>",
outboundTrackingUrl: "<outbound_tracking_url>",
inboundTrackingNumber: "<inbound_tracking_number>",
Expand Down
Loading
Loading