From b2ae786d5e847892ff71d338381d4cd9e5da9451 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 13:52:53 +0000 Subject: [PATCH] feat: add LabReportResult fields, MealInDbBase CalendarDate, and update default base URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expand the LabReportResult model with two new optional fields (SampleType and MeasurementKind) along with their associated enum types, getters, and setters. Add a required CalendarDate field to MealInDbBaseClientFacingSource. Update all default base URLs across every raw client from api.tryvital.io to api.us.junction.com, and update the Environments constants to reflect the new junction.com domain. Key changes: - Add `LabReportResultSampleType` and `LabReportResultMeasurementKind` enum types with constructors and constants - Add `SampleType` and `MeasurementKind` optional fields (with getters/setters) to `LabReportResult` - Add required `CalendarDate` field (with getter/setter) to `MealInDbBaseClientFacingSource` - Update `Environments` constants (Production, ProductionEu, Sandbox, SandboxEu) to junction.com domains - Update all raw client default base URLs from `https://api.tryvital.io` to `https://api.us.junction.com` 🌿 Generated with Fern --- .fern/metadata.json | 6 +- activity/raw_client.go | 4 +- aggregate/raw_client.go | 6 +- body/raw_client.go | 4 +- changelog.md | 9 ++ compendium/raw_client.go | 4 +- core/request_option.go | 4 +- devices/raw_client.go | 2 +- electrocardiogram/raw_client.go | 2 +- environments.go | 8 +- insurance/raw_client.go | 6 +- introspect/raw_client.go | 4 +- lab_report.go | 119 +++++++++++++-- lab_report_test.go | 251 ++++++++++++++++++++++++++++++++ labaccount/raw_client.go | 2 +- labreport/raw_client.go | 4 +- labtests/raw_client.go | 84 +++++------ link/raw_client.go | 26 ++-- meal.go | 41 ++++-- meal/raw_client.go | 2 +- meal_test.go | 62 ++++++++ menstrualcycle/raw_client.go | 2 +- order/raw_client.go | 2 +- ordertransaction/raw_client.go | 6 +- payor/raw_client.go | 2 +- profile/raw_client.go | 4 +- providers/raw_client.go | 2 +- sleep/raw_client.go | 6 +- sleepcycle/raw_client.go | 2 +- team/raw_client.go | 12 +- testkit/raw_client.go | 4 +- user/raw_client.go | 38 ++--- vitals/raw_client.go | 156 ++++++++++---------- workouts/raw_client.go | 6 +- 34 files changed, 666 insertions(+), 226 deletions(-) diff --git a/.fern/metadata.json b/.fern/metadata.json index e6e283b..69c2b3a 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,14 +1,14 @@ { - "cliVersion": "5.5.1", + "cliVersion": "5.10.2", "generatorName": "fernapi/fern-go-sdk", "generatorVersion": "1.38.1", "generatorConfig": { "enableWireTests": false }, - "originGitCommit": "05d79dd6ce370cbd029417f59eb71c056d94aa61", + "originGitCommit": "5f82089cf81f14dcaa4eabeffe1c781fb1679c6e", "originGitCommitIsDirty": true, "invokedBy": "ci", "requestedVersion": "AUTO", "ciProvider": "unknown", - "sdkVersion": "v0.0.1" + "sdkVersion": "v0.1.0" } \ No newline at end of file diff --git a/activity/raw_client.go b/activity/raw_client.go index bce28b7..5113428 100644 --- a/activity/raw_client.go +++ b/activity/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/activity/%v", @@ -91,7 +91,7 @@ func (r *RawClient) GetRaw( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/activity/%v/raw", diff --git a/aggregate/raw_client.go b/aggregate/raw_client.go index ca063ef..02e8302 100644 --- a/aggregate/raw_client.go +++ b/aggregate/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) QueryOne( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/aggregate/v1/user/%v/query", @@ -87,7 +87,7 @@ func (r *RawClient) GetResultTableForContinuousQuery( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/aggregate/v1/user/%v/continuous_query/%v/result_table", @@ -133,7 +133,7 @@ func (r *RawClient) GetTaskHistoryForContinuousQuery( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/aggregate/v1/user/%v/continuous_query/%v/task_history", diff --git a/body/raw_client.go b/body/raw_client.go index 9b0aafd..1d75935 100644 --- a/body/raw_client.go +++ b/body/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/body/%v", @@ -91,7 +91,7 @@ func (r *RawClient) GetRaw( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/body/%v/raw", diff --git a/changelog.md b/changelog.md index d377f62..f731931 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,12 @@ +## v0.1.0 - 2026-05-05 +### Added +* **`LabReportResultSampleType`** — new non-exhaustive enum representing the sample type of a lab result (e.g. `urine`, `serum_plasma_blood`, `capillary_blood`). +* **`LabReportResultMeasurementKind`** — new non-exhaustive enum representing how a lab result was measured (e.g. `direct`, `calculated`, `ratio`). +* **`LabReportResult.SampleType`** and **`LabReportResult.MeasurementKind`** — new optional fields on `LabReportResult` with corresponding getter and setter methods. +* **`MealInDbBaseClientFacingSource.CalendarDate`** — new required `string` field representing the meal date in `YYYY-mm-dd` format, with `GetCalendarDate` and `SetCalendarDate` methods. +### Changed +* **`Environments`** — all default base URLs updated from `tryvital.io` to `junction.com` domains (e.g. `Production` is now `https://api.us.junction.com`); consumers relying on the default URL without an explicit override will now target the new host. + ## v0.0.1 - 2026-05-01 * Initial SDK generation * 🌿 Generated with Fern diff --git a/compendium/raw_client.go b/compendium/raw_client.go index 27da7ad..60ec3c6 100644 --- a/compendium/raw_client.go +++ b/compendium/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Search( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/compendium/search" headers := internal.MergeHeaders( @@ -83,7 +83,7 @@ func (r *RawClient) Convert( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/compendium/convert" headers := internal.MergeHeaders( diff --git a/core/request_option.go b/core/request_option.go index 62b9f1e..7477bcb 100644 --- a/core/request_option.go +++ b/core/request_option.go @@ -58,8 +58,8 @@ func (r *RequestOptions) cloneHeader() http.Header { headers := r.HTTPHeader.Clone() headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/junction-api/junction-go") - headers.Set("X-Fern-SDK-Version", "v0.0.1") - headers.Set("User-Agent", "github.com/junction-api/junction-go/v0.0.1") + headers.Set("X-Fern-SDK-Version", "v0.1.0") + headers.Set("User-Agent", "github.com/junction-api/junction-go/v0.1.0") return headers } diff --git a/devices/raw_client.go b/devices/raw_client.go index 75fee66..a37dba1 100644 --- a/devices/raw_client.go +++ b/devices/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) GetRaw( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/devices/%v/raw", diff --git a/electrocardiogram/raw_client.go b/electrocardiogram/raw_client.go index 415ca8e..4964eeb 100644 --- a/electrocardiogram/raw_client.go +++ b/electrocardiogram/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/electrocardiogram/%v", diff --git a/environments.go b/environments.go index bcdab5e..77fe7fe 100644 --- a/environments.go +++ b/environments.go @@ -12,8 +12,8 @@ var Environments = struct { Sandbox string SandboxEu string }{ - Production: "https://api.tryvital.io", - ProductionEu: "https://api.eu.tryvital.io", - Sandbox: "https://api.sandbox.tryvital.io", - SandboxEu: "https://api.sandbox.eu.tryvital.io", + Production: "https://api.us.junction.com", + ProductionEu: "https://api.eu.junction.com", + Sandbox: "https://api.sandbox.us.junction.com", + SandboxEu: "https://api.sandbox.eu.junction.com", } diff --git a/insurance/raw_client.go b/insurance/raw_client.go index ec021e4..6080333 100644 --- a/insurance/raw_client.go +++ b/insurance/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) SearchGetPayorInfo( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/insurance/search/payor" queryParams, err := internal.QueryValues(request) @@ -88,7 +88,7 @@ func (r *RawClient) SearchPayorInfo( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/insurance/search/payor" headers := internal.MergeHeaders( @@ -131,7 +131,7 @@ func (r *RawClient) SearchDiagnosis( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/insurance/search/diagnosis" queryParams, err := internal.QueryValues(request) diff --git a/introspect/raw_client.go b/introspect/raw_client.go index d24e3c8..347ac74 100644 --- a/introspect/raw_client.go +++ b/introspect/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) GetUserResources( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/introspect/resources" queryParams, err := internal.QueryValues(request) @@ -88,7 +88,7 @@ func (r *RawClient) GetUserHistoricalPulls( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/introspect/historical_pull" queryParams, err := internal.QueryValues(request) diff --git a/lab_report.go b/lab_report.go index 4897d2e..4fa8bf4 100644 --- a/lab_report.go +++ b/lab_report.go @@ -54,21 +54,27 @@ func (p *ParserGetJobLabReportRequest) SetJobId(jobId string) { var ( labReportResultFieldTestName = big.NewInt(1 << 0) labReportResultFieldValue = big.NewInt(1 << 1) - labReportResultFieldType = big.NewInt(1 << 2) - labReportResultFieldUnits = big.NewInt(1 << 3) - labReportResultFieldMaxReferenceRange = big.NewInt(1 << 4) - labReportResultFieldMinReferenceRange = big.NewInt(1 << 5) - labReportResultFieldSourcePanelName = big.NewInt(1 << 6) - labReportResultFieldLoincMatches = big.NewInt(1 << 7) - labReportResultFieldInterpretation = big.NewInt(1 << 8) - labReportResultFieldIsAboveMaxRange = big.NewInt(1 << 9) - labReportResultFieldIsBelowMinRange = big.NewInt(1 << 10) + labReportResultFieldSampleType = big.NewInt(1 << 2) + labReportResultFieldMeasurementKind = big.NewInt(1 << 3) + labReportResultFieldType = big.NewInt(1 << 4) + labReportResultFieldUnits = big.NewInt(1 << 5) + labReportResultFieldMaxReferenceRange = big.NewInt(1 << 6) + labReportResultFieldMinReferenceRange = big.NewInt(1 << 7) + labReportResultFieldSourcePanelName = big.NewInt(1 << 8) + labReportResultFieldLoincMatches = big.NewInt(1 << 9) + labReportResultFieldInterpretation = big.NewInt(1 << 10) + labReportResultFieldIsAboveMaxRange = big.NewInt(1 << 11) + labReportResultFieldIsBelowMinRange = big.NewInt(1 << 12) ) type LabReportResult struct { TestName string `json:"test_name" url:"test_name"` Value string `json:"value" url:"value"` // ℹ️ This enum is non-exhaustive. + SampleType *LabReportResultSampleType `json:"sample_type,omitempty" url:"sample_type,omitempty"` + // ℹ️ This enum is non-exhaustive. + MeasurementKind *LabReportResultMeasurementKind `json:"measurement_kind,omitempty" url:"measurement_kind,omitempty"` + // ℹ️ This enum is non-exhaustive. Type *LabReportResultType `json:"type,omitempty" url:"type,omitempty"` Units *string `json:"units,omitempty" url:"units,omitempty"` MaxReferenceRange *float64 `json:"max_reference_range,omitempty" url:"max_reference_range,omitempty"` @@ -101,6 +107,20 @@ func (l *LabReportResult) GetValue() string { return l.Value } +func (l *LabReportResult) GetSampleType() *LabReportResultSampleType { + if l == nil { + return nil + } + return l.SampleType +} + +func (l *LabReportResult) GetMeasurementKind() *LabReportResultMeasurementKind { + if l == nil { + return nil + } + return l.MeasurementKind +} + func (l *LabReportResult) GetType() *LabReportResultType { if l == nil { return nil @@ -192,6 +212,20 @@ func (l *LabReportResult) SetValue(value string) { l.require(labReportResultFieldValue) } +// SetSampleType sets the SampleType field and marks it as non-optional; +// this prevents an empty or null value for this field from being omitted during serialization. +func (l *LabReportResult) SetSampleType(sampleType *LabReportResultSampleType) { + l.SampleType = sampleType + l.require(labReportResultFieldSampleType) +} + +// SetMeasurementKind sets the MeasurementKind field and marks it as non-optional; +// this prevents an empty or null value for this field from being omitted during serialization. +func (l *LabReportResult) SetMeasurementKind(measurementKind *LabReportResultMeasurementKind) { + l.MeasurementKind = measurementKind + l.require(labReportResultFieldMeasurementKind) +} + // SetType sets the Type field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. func (l *LabReportResult) SetType(type_ *LabReportResultType) { @@ -297,6 +331,73 @@ func (l *LabReportResult) String() string { return fmt.Sprintf("%#v", l) } +// ℹ️ This enum is non-exhaustive. +type LabReportResultMeasurementKind string + +const ( + LabReportResultMeasurementKindDirect LabReportResultMeasurementKind = "direct" + LabReportResultMeasurementKindCalculated LabReportResultMeasurementKind = "calculated" + LabReportResultMeasurementKindRatio LabReportResultMeasurementKind = "ratio" + LabReportResultMeasurementKindUnknown LabReportResultMeasurementKind = "unknown" +) + +func NewLabReportResultMeasurementKindFromString(s string) (LabReportResultMeasurementKind, error) { + switch s { + case "direct": + return LabReportResultMeasurementKindDirect, nil + case "calculated": + return LabReportResultMeasurementKindCalculated, nil + case "ratio": + return LabReportResultMeasurementKindRatio, nil + case "unknown": + return LabReportResultMeasurementKindUnknown, nil + } + var t LabReportResultMeasurementKind + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (l LabReportResultMeasurementKind) Ptr() *LabReportResultMeasurementKind { + return &l +} + +// ℹ️ This enum is non-exhaustive. +type LabReportResultSampleType string + +const ( + LabReportResultSampleTypeUrine LabReportResultSampleType = "urine" + LabReportResultSampleTypeSerumPlasmaBlood LabReportResultSampleType = "serum_plasma_blood" + LabReportResultSampleTypeCapillaryBlood LabReportResultSampleType = "capillary_blood" + LabReportResultSampleTypeStool LabReportResultSampleType = "stool" + LabReportResultSampleTypeSaliva LabReportResultSampleType = "saliva" + LabReportResultSampleTypeOther LabReportResultSampleType = "other" + LabReportResultSampleTypeUnknown LabReportResultSampleType = "unknown" +) + +func NewLabReportResultSampleTypeFromString(s string) (LabReportResultSampleType, error) { + switch s { + case "urine": + return LabReportResultSampleTypeUrine, nil + case "serum_plasma_blood": + return LabReportResultSampleTypeSerumPlasmaBlood, nil + case "capillary_blood": + return LabReportResultSampleTypeCapillaryBlood, nil + case "stool": + return LabReportResultSampleTypeStool, nil + case "saliva": + return LabReportResultSampleTypeSaliva, nil + case "other": + return LabReportResultSampleTypeOther, nil + case "unknown": + return LabReportResultSampleTypeUnknown, nil + } + var t LabReportResultSampleType + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (l LabReportResultSampleType) Ptr() *LabReportResultSampleType { + return &l +} + // ℹ️ This enum is non-exhaustive. type LabReportResultType string diff --git a/lab_report_test.go b/lab_report_test.go index d10790c..104c14e 100644 --- a/lab_report_test.go +++ b/lab_report_test.go @@ -71,6 +71,22 @@ func TestSettersLabReportResult(t *testing.T) { assert.NotNil(t, obj.explicitFields) }) + t.Run("SetSampleType", func(t *testing.T) { + obj := &LabReportResult{} + var fernTestValueSampleType *LabReportResultSampleType + obj.SetSampleType(fernTestValueSampleType) + assert.Equal(t, fernTestValueSampleType, obj.SampleType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMeasurementKind", func(t *testing.T) { + obj := &LabReportResult{} + var fernTestValueMeasurementKind *LabReportResultMeasurementKind + obj.SetMeasurementKind(fernTestValueMeasurementKind) + assert.Equal(t, fernTestValueMeasurementKind, obj.MeasurementKind) + assert.NotNil(t, obj.explicitFields) + }) + t.Run("SetType", func(t *testing.T) { obj := &LabReportResult{} var fernTestValueType *LabReportResultType @@ -192,6 +208,72 @@ func TestGettersLabReportResult(t *testing.T) { _ = obj.GetValue() // Should return zero value }) + t.Run("GetSampleType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LabReportResult{} + var expected *LabReportResultSampleType + obj.SampleType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSampleType(), "getter should return the property value") + }) + + t.Run("GetSampleType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LabReportResult{} + obj.SampleType = nil + + // Act & Assert + assert.Nil(t, obj.GetSampleType(), "getter should return nil when property is nil") + }) + + t.Run("GetSampleType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LabReportResult + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSampleType() // Should return zero value + }) + + t.Run("GetMeasurementKind", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LabReportResult{} + var expected *LabReportResultMeasurementKind + obj.MeasurementKind = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMeasurementKind(), "getter should return the property value") + }) + + t.Run("GetMeasurementKind_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LabReportResult{} + obj.MeasurementKind = nil + + // Act & Assert + assert.Nil(t, obj.GetMeasurementKind(), "getter should return nil when property is nil") + }) + + t.Run("GetMeasurementKind_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LabReportResult + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMeasurementKind() // Should return zero value + }) + t.Run("GetType", func(t *testing.T) { t.Parallel() // Arrange @@ -554,6 +636,68 @@ func TestSettersMarkExplicitLabReportResult(t *testing.T) { // It verifies that setting a field via setter allows successful JSON round-trip }) + t.Run("SetSampleType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LabReportResult{} + var fernTestValueSampleType *LabReportResultSampleType + + // Act + obj.SetSampleType(fernTestValueSampleType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMeasurementKind_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LabReportResult{} + var fernTestValueMeasurementKind *LabReportResultMeasurementKind + + // Act + obj.SetMeasurementKind(fernTestValueMeasurementKind) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + t.Run("SetType_MarksExplicit", func(t *testing.T) { t.Parallel() // Arrange @@ -2558,6 +2702,113 @@ func TestStringResultMetadata(t *testing.T) { }) } +func TestEnumLabReportResultMeasurementKind(t *testing.T) { + t.Run("NewFromString_direct", func(t *testing.T) { + t.Parallel() + val, err := NewLabReportResultMeasurementKindFromString("direct") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LabReportResultMeasurementKind("direct"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_calculated", func(t *testing.T) { + t.Parallel() + val, err := NewLabReportResultMeasurementKindFromString("calculated") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LabReportResultMeasurementKind("calculated"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ratio", func(t *testing.T) { + t.Parallel() + val, err := NewLabReportResultMeasurementKindFromString("ratio") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LabReportResultMeasurementKind("ratio"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_unknown", func(t *testing.T) { + t.Parallel() + val, err := NewLabReportResultMeasurementKindFromString("unknown") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LabReportResultMeasurementKind("unknown"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLabReportResultMeasurementKindFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLabReportResultMeasurementKindFromString("direct") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLabReportResultSampleType(t *testing.T) { + t.Run("NewFromString_urine", func(t *testing.T) { + t.Parallel() + val, err := NewLabReportResultSampleTypeFromString("urine") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LabReportResultSampleType("urine"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_serum_plasma_blood", func(t *testing.T) { + t.Parallel() + val, err := NewLabReportResultSampleTypeFromString("serum_plasma_blood") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LabReportResultSampleType("serum_plasma_blood"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_capillary_blood", func(t *testing.T) { + t.Parallel() + val, err := NewLabReportResultSampleTypeFromString("capillary_blood") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LabReportResultSampleType("capillary_blood"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_stool", func(t *testing.T) { + t.Parallel() + val, err := NewLabReportResultSampleTypeFromString("stool") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LabReportResultSampleType("stool"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_saliva", func(t *testing.T) { + t.Parallel() + val, err := NewLabReportResultSampleTypeFromString("saliva") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LabReportResultSampleType("saliva"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_other", func(t *testing.T) { + t.Parallel() + val, err := NewLabReportResultSampleTypeFromString("other") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LabReportResultSampleType("other"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_unknown", func(t *testing.T) { + t.Parallel() + val, err := NewLabReportResultSampleTypeFromString("unknown") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LabReportResultSampleType("unknown"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLabReportResultSampleTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLabReportResultSampleTypeFromString("urine") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + func TestEnumLabReportResultType(t *testing.T) { t.Run("NewFromString_numeric", func(t *testing.T) { t.Parallel() diff --git a/labaccount/raw_client.go b/labaccount/raw_client.go index 4945c81..6118a98 100644 --- a/labaccount/raw_client.go +++ b/labaccount/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) GetTeamLabAccounts( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/lab_test/lab_account" queryParams, err := internal.QueryValues(request) diff --git a/labreport/raw_client.go b/labreport/raw_client.go index 8065558..bb54321 100644 --- a/labreport/raw_client.go +++ b/labreport/raw_client.go @@ -41,7 +41,7 @@ func (r *RawClient) ParserCreateJob( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/lab_report/v1/parser/job" headers := internal.MergeHeaders( @@ -102,7 +102,7 @@ func (r *RawClient) ParserGetJob( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/lab_report/v1/parser/job/%v", diff --git a/labtests/raw_client.go b/labtests/raw_client.go index 997f8b4..56e0499 100644 --- a/labtests/raw_client.go +++ b/labtests/raw_client.go @@ -42,7 +42,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/lab_tests" queryParams, err := internal.QueryValues(request) @@ -90,7 +90,7 @@ func (r *RawClient) Create( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/lab_tests" headers := internal.MergeHeaders( @@ -133,7 +133,7 @@ func (r *RawClient) GetById( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/lab_tests/%v", @@ -184,7 +184,7 @@ func (r *RawClient) UpdateLabTest( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/lab_tests/%v", @@ -230,7 +230,7 @@ func (r *RawClient) GetMarkers( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/lab_tests/markers" queryParams, err := internal.QueryValues(request) @@ -278,7 +278,7 @@ func (r *RawClient) GetMarkersForOrderSet( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/lab_tests/list_order_set_markers" queryParams, err := internal.QueryValues(request) @@ -328,7 +328,7 @@ func (r *RawClient) GetMarkersForLabTest( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/lab_tests/%v/markers", @@ -379,7 +379,7 @@ func (r *RawClient) GetMarkersByLabAndProviderId( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/lab_tests/%v/markers/%v", @@ -430,7 +430,7 @@ func (r *RawClient) GetLabs( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/lab_tests/labs" headers := internal.MergeHeaders( @@ -470,7 +470,7 @@ func (r *RawClient) GetPaginated( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/lab_test" queryParams, err := internal.QueryValues(request) @@ -518,7 +518,7 @@ func (r *RawClient) GetLabTestCollectionInstructionPdf( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/lab_test/%v/collection_instruction_pdf", @@ -562,7 +562,7 @@ func (r *RawClient) GetOrders( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/orders" queryParams, err := internal.QueryValues(request) @@ -610,7 +610,7 @@ func (r *RawClient) GetPhlebotomyAppointmentAvailability( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/order/phlebotomy/appointment/availability" queryParams, err := internal.QueryValues(request) @@ -660,7 +660,7 @@ func (r *RawClient) BookPhlebotomyAppointment( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/phlebotomy/appointment/book", @@ -706,7 +706,7 @@ func (r *RawClient) RequestPhlebotomyAppointment( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/phlebotomy/appointment/request", @@ -752,7 +752,7 @@ func (r *RawClient) ReschedulePhlebotomyAppointment( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/phlebotomy/appointment/reschedule", @@ -798,7 +798,7 @@ func (r *RawClient) CancelPhlebotomyAppointment( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/phlebotomy/appointment/cancel", @@ -843,7 +843,7 @@ func (r *RawClient) GetPhlebotomyAppointmentCancellationReason( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/order/phlebotomy/appointment/cancellation-reasons" headers := internal.MergeHeaders( @@ -883,7 +883,7 @@ func (r *RawClient) GetPhlebotomyAppointment( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/phlebotomy/appointment", @@ -927,7 +927,7 @@ func (r *RawClient) GetAreaInfo( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/order/area/info" queryParams, err := internal.QueryValues(request) @@ -975,7 +975,7 @@ func (r *RawClient) GetPscInfo( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/order/psc/info" queryParams, err := internal.QueryValues(request) @@ -1023,7 +1023,7 @@ func (r *RawClient) GetOrderPscInfo( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/psc/info", @@ -1074,7 +1074,7 @@ func (r *RawClient) GetResultPdf( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/result/pdf", @@ -1118,7 +1118,7 @@ func (r *RawClient) GetResultMetadata( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/result/metadata", @@ -1162,7 +1162,7 @@ func (r *RawClient) GetResultRaw( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/result", @@ -1206,7 +1206,7 @@ func (r *RawClient) GetLabelsPdf( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/labels/pdf", @@ -1257,7 +1257,7 @@ func (r *RawClient) GetPscAppointmentAvailability( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/order/psc/appointment/availability" queryParams, err := internal.QueryValues(request) @@ -1305,7 +1305,7 @@ func (r *RawClient) BookPscAppointment( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/psc/appointment/book", @@ -1357,7 +1357,7 @@ func (r *RawClient) ReschedulePscAppointment( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/psc/appointment/reschedule", @@ -1403,7 +1403,7 @@ func (r *RawClient) CancelPscAppointment( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/psc/appointment/cancel", @@ -1448,7 +1448,7 @@ func (r *RawClient) GetPscAppointmentCancellationReason( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/order/psc/appointment/cancellation-reasons" headers := internal.MergeHeaders( @@ -1488,7 +1488,7 @@ func (r *RawClient) GetPscAppointment( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/psc/appointment", @@ -1532,7 +1532,7 @@ func (r *RawClient) GetOrderCollectionInstructionPdf( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/collection_instruction_pdf", @@ -1576,7 +1576,7 @@ func (r *RawClient) GetOrderRequistionPdf( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/requisition/pdf", @@ -1620,7 +1620,7 @@ func (r *RawClient) GetOrderAbnPdf( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/abn_pdf", @@ -1664,7 +1664,7 @@ func (r *RawClient) GetOrder( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v", @@ -1708,7 +1708,7 @@ func (r *RawClient) CreateOrder( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/order" headers := internal.MergeHeaders( @@ -1757,7 +1757,7 @@ func (r *RawClient) ImportOrder( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/order/import" headers := internal.MergeHeaders( @@ -1800,7 +1800,7 @@ func (r *RawClient) CancelOrder( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/cancel", @@ -1844,7 +1844,7 @@ func (r *RawClient) SimulateOrderProcess( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/test", @@ -1897,7 +1897,7 @@ func (r *RawClient) UpdateOnSiteCollectionOrderDrawCompleted( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order/%v/draw_completed", @@ -1941,7 +1941,7 @@ func (r *RawClient) ValidateIcdCodes( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/insurance/validate_icd_codes" headers := internal.MergeHeaders( diff --git a/link/raw_client.go b/link/raw_client.go index 112964c..92bb050 100644 --- a/link/raw_client.go +++ b/link/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) ListBulkOps( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/link/bulk_op" queryParams, err := internal.QueryValues(request) @@ -88,7 +88,7 @@ func (r *RawClient) BulkImport( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/link/bulk_import" headers := internal.MergeHeaders( @@ -131,7 +131,7 @@ func (r *RawClient) BulkTriggerHistoricalPull( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/link/bulk_trigger_historical_pull" headers := internal.MergeHeaders( @@ -174,7 +174,7 @@ func (r *RawClient) BulkExport( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/link/bulk_export" headers := internal.MergeHeaders( @@ -217,7 +217,7 @@ func (r *RawClient) BulkPause( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/link/bulk_pause" headers := internal.MergeHeaders( @@ -260,7 +260,7 @@ func (r *RawClient) Token( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/link/token" headers := internal.MergeHeaders( @@ -303,7 +303,7 @@ func (r *RawClient) CodeCreate( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/link/code/create" queryParams, err := internal.QueryValues(request) @@ -351,7 +351,7 @@ func (r *RawClient) GenerateOauthLink( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/link/provider/oauth/%v", @@ -399,7 +399,7 @@ func (r *RawClient) ConnectPasswordProvider( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/link/provider/password/%v", @@ -448,7 +448,7 @@ func (r *RawClient) CompletePasswordProviderMfa( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/link/provider/password/%v/complete_mfa", @@ -497,7 +497,7 @@ func (r *RawClient) ConnectEmailAuthProvider( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/link/provider/email/%v", @@ -546,7 +546,7 @@ func (r *RawClient) GetAllProviders( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/link/providers" headers := internal.MergeHeaders( @@ -591,7 +591,7 @@ func (r *RawClient) ConnectDemoProvider( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/link/connect/demo" headers := internal.MergeHeaders( diff --git a/meal.go b/meal.go index bcfe33f..5091618 100644 --- a/meal.go +++ b/meal.go @@ -746,16 +746,17 @@ var ( mealInDbBaseClientFacingSourceFieldSourceId = big.NewInt(1 << 3) mealInDbBaseClientFacingSourceFieldProviderId = big.NewInt(1 << 4) mealInDbBaseClientFacingSourceFieldTimestamp = big.NewInt(1 << 5) - mealInDbBaseClientFacingSourceFieldName = big.NewInt(1 << 6) - mealInDbBaseClientFacingSourceFieldEnergy = big.NewInt(1 << 7) - mealInDbBaseClientFacingSourceFieldMacros = big.NewInt(1 << 8) - mealInDbBaseClientFacingSourceFieldMicros = big.NewInt(1 << 9) - mealInDbBaseClientFacingSourceFieldData = big.NewInt(1 << 10) - mealInDbBaseClientFacingSourceFieldSource = big.NewInt(1 << 11) - mealInDbBaseClientFacingSourceFieldCreatedAt = big.NewInt(1 << 12) - mealInDbBaseClientFacingSourceFieldUpdatedAt = big.NewInt(1 << 13) - mealInDbBaseClientFacingSourceFieldSourceAppId = big.NewInt(1 << 14) - mealInDbBaseClientFacingSourceFieldSourceDeviceId = big.NewInt(1 << 15) + mealInDbBaseClientFacingSourceFieldCalendarDate = big.NewInt(1 << 6) + mealInDbBaseClientFacingSourceFieldName = big.NewInt(1 << 7) + mealInDbBaseClientFacingSourceFieldEnergy = big.NewInt(1 << 8) + mealInDbBaseClientFacingSourceFieldMacros = big.NewInt(1 << 9) + mealInDbBaseClientFacingSourceFieldMicros = big.NewInt(1 << 10) + mealInDbBaseClientFacingSourceFieldData = big.NewInt(1 << 11) + mealInDbBaseClientFacingSourceFieldSource = big.NewInt(1 << 12) + mealInDbBaseClientFacingSourceFieldCreatedAt = big.NewInt(1 << 13) + mealInDbBaseClientFacingSourceFieldUpdatedAt = big.NewInt(1 << 14) + mealInDbBaseClientFacingSourceFieldSourceAppId = big.NewInt(1 << 15) + mealInDbBaseClientFacingSourceFieldSourceDeviceId = big.NewInt(1 << 16) ) type MealInDbBaseClientFacingSource struct { @@ -766,8 +767,10 @@ type MealInDbBaseClientFacingSource struct { // This value has no meaning. SourceId int `json:"source_id" url:"source_id"` // This value is identical to `id`. - ProviderId string `json:"provider_id" url:"provider_id"` - Timestamp time.Time `json:"timestamp" url:"timestamp"` + ProviderId string `json:"provider_id" url:"provider_id"` + Timestamp time.Time `json:"timestamp" url:"timestamp"` + // 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 `json:"calendar_date" url:"calendar_date"` Name string `json:"name" url:"name"` Energy *Energy `json:"energy,omitempty" url:"energy,omitempty"` Macros *Macros `json:"macros,omitempty" url:"macros,omitempty"` @@ -828,6 +831,13 @@ func (m *MealInDbBaseClientFacingSource) GetTimestamp() time.Time { return m.Timestamp } +func (m *MealInDbBaseClientFacingSource) GetCalendarDate() string { + if m == nil { + return "" + } + return m.CalendarDate +} + func (m *MealInDbBaseClientFacingSource) GetName() string { if m == nil { return "" @@ -954,6 +964,13 @@ func (m *MealInDbBaseClientFacingSource) SetTimestamp(timestamp time.Time) { m.require(mealInDbBaseClientFacingSourceFieldTimestamp) } +// SetCalendarDate sets the CalendarDate field and marks it as non-optional; +// this prevents an empty or null value for this field from being omitted during serialization. +func (m *MealInDbBaseClientFacingSource) SetCalendarDate(calendarDate string) { + m.CalendarDate = calendarDate + m.require(mealInDbBaseClientFacingSourceFieldCalendarDate) +} + // SetName sets the Name field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. func (m *MealInDbBaseClientFacingSource) SetName(name string) { diff --git a/meal/raw_client.go b/meal/raw_client.go index e51d867..9425e10 100644 --- a/meal/raw_client.go +++ b/meal/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/meal/%v", diff --git a/meal_test.go b/meal_test.go index e2b3dcc..34323de 100644 --- a/meal_test.go +++ b/meal_test.go @@ -1624,6 +1624,14 @@ func TestSettersMealInDbBaseClientFacingSource(t *testing.T) { assert.NotNil(t, obj.explicitFields) }) + t.Run("SetCalendarDate", func(t *testing.T) { + obj := &MealInDbBaseClientFacingSource{} + var fernTestValueCalendarDate string + obj.SetCalendarDate(fernTestValueCalendarDate) + assert.Equal(t, fernTestValueCalendarDate, obj.CalendarDate) + assert.NotNil(t, obj.explicitFields) + }) + t.Run("SetName", func(t *testing.T) { obj := &MealInDbBaseClientFacingSource{} var fernTestValueName string @@ -1845,6 +1853,29 @@ func TestGettersMealInDbBaseClientFacingSource(t *testing.T) { _ = obj.GetTimestamp() // Should return zero value }) + t.Run("GetCalendarDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MealInDbBaseClientFacingSource{} + var expected string + obj.CalendarDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCalendarDate(), "getter should return the property value") + }) + + t.Run("GetCalendarDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MealInDbBaseClientFacingSource + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCalendarDate() // Should return zero value + }) + t.Run("GetName", func(t *testing.T) { t.Parallel() // Arrange @@ -2334,6 +2365,37 @@ func TestSettersMarkExplicitMealInDbBaseClientFacingSource(t *testing.T) { // It verifies that setting a field via setter allows successful JSON round-trip }) + t.Run("SetCalendarDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MealInDbBaseClientFacingSource{} + var fernTestValueCalendarDate string + + // Act + obj.SetCalendarDate(fernTestValueCalendarDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + t.Run("SetName_MarksExplicit", func(t *testing.T) { t.Parallel() // Arrange diff --git a/menstrualcycle/raw_client.go b/menstrualcycle/raw_client.go index 58c4e8c..2470a67 100644 --- a/menstrualcycle/raw_client.go +++ b/menstrualcycle/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/menstrual_cycle/%v", diff --git a/order/raw_client.go b/order/raw_client.go index b6518b2..3a7e1f3 100644 --- a/order/raw_client.go +++ b/order/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) ResendEvents( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/order/resend_events" headers := internal.MergeHeaders( diff --git a/ordertransaction/raw_client.go b/ordertransaction/raw_client.go index a05830d..2030b0a 100644 --- a/ordertransaction/raw_client.go +++ b/ordertransaction/raw_client.go @@ -42,7 +42,7 @@ func (r *RawClient) GetTransaction( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order_transaction/%v", @@ -86,7 +86,7 @@ func (r *RawClient) GetTransactionResult( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order_transaction/%v/result", @@ -130,7 +130,7 @@ func (r *RawClient) GetTransactionResultPdf( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v3/order_transaction/%v/result/pdf", diff --git a/payor/raw_client.go b/payor/raw_client.go index 5b82e83..c5d9b50 100644 --- a/payor/raw_client.go +++ b/payor/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) CreatePayor( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/payor" headers := internal.MergeHeaders( diff --git a/profile/raw_client.go b/profile/raw_client.go index 9fbc9e2..ef040a2 100644 --- a/profile/raw_client.go +++ b/profile/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/profile/%v", @@ -91,7 +91,7 @@ func (r *RawClient) GetRaw( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/profile/%v/raw", diff --git a/providers/raw_client.go b/providers/raw_client.go index 40ab547..fd48321 100644 --- a/providers/raw_client.go +++ b/providers/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) GetAll( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/providers" queryParams, err := internal.QueryValues(request) diff --git a/sleep/raw_client.go b/sleep/raw_client.go index 5695361..9272917 100644 --- a/sleep/raw_client.go +++ b/sleep/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/sleep/%v", @@ -91,7 +91,7 @@ func (r *RawClient) GetRaw( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/sleep/%v/raw", @@ -142,7 +142,7 @@ func (r *RawClient) GetStreamBySleepId( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/sleep/%v/stream", diff --git a/sleepcycle/raw_client.go b/sleepcycle/raw_client.go index 953e57f..f675c15 100644 --- a/sleepcycle/raw_client.go +++ b/sleepcycle/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/sleep_cycle/%v", diff --git a/team/raw_client.go b/team/raw_client.go index 3d95942..53812ac 100644 --- a/team/raw_client.go +++ b/team/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/team/%v", @@ -84,7 +84,7 @@ func (r *RawClient) GetUserById( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/team/users/search" queryParams, err := internal.QueryValues(request) @@ -131,7 +131,7 @@ func (r *RawClient) GetSvixUrl( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/team/svix/url" headers := internal.MergeHeaders( @@ -171,7 +171,7 @@ func (r *RawClient) GetSourcePriorities( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/team/source/priorities" queryParams, err := internal.QueryValues(request) @@ -218,7 +218,7 @@ func (r *RawClient) UpdateSourcePriorities( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/team/source/priorities" headers := internal.MergeHeaders( @@ -258,7 +258,7 @@ func (r *RawClient) GetPhysicians( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/team/%v/physicians", diff --git a/testkit/raw_client.go b/testkit/raw_client.go index 854581f..5581130 100644 --- a/testkit/raw_client.go +++ b/testkit/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Register( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/order/testkit/register" headers := internal.MergeHeaders( @@ -83,7 +83,7 @@ func (r *RawClient) CreateOrder( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v3/order/testkit" headers := internal.MergeHeaders( diff --git a/user/raw_client.go b/user/raw_client.go index 1be5ded..d2eb8ff 100644 --- a/user/raw_client.go +++ b/user/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) GetAll( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/user" queryParams, err := internal.QueryValues(request) @@ -88,7 +88,7 @@ func (r *RawClient) Create( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/user" headers := internal.MergeHeaders( @@ -130,7 +130,7 @@ func (r *RawClient) GetTeamMetrics( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/user/metrics" headers := internal.MergeHeaders( @@ -170,7 +170,7 @@ func (r *RawClient) GetConnectedProviders( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/providers/%v", @@ -214,7 +214,7 @@ func (r *RawClient) GetLatestUserInfo( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v/info/latest", @@ -258,7 +258,7 @@ func (r *RawClient) CreateInsurance( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v/insurance", @@ -304,7 +304,7 @@ func (r *RawClient) GetLatestInsurance( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v/insurance/latest", @@ -355,7 +355,7 @@ func (r *RawClient) UpsertUserInfo( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v/info", @@ -401,7 +401,7 @@ func (r *RawClient) GetByClientUserId( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/resolve/%v", @@ -445,7 +445,7 @@ func (r *RawClient) DeregisterProvider( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v/%v", @@ -490,7 +490,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v", @@ -534,7 +534,7 @@ func (r *RawClient) Delete( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v", @@ -578,7 +578,7 @@ func (r *RawClient) Patch( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v", @@ -622,7 +622,7 @@ func (r *RawClient) UndoDelete( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := baseURL + "/v2/user/undo_delete" queryParams, err := internal.QueryValues(request) @@ -670,7 +670,7 @@ func (r *RawClient) Refresh( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/refresh/%v", @@ -721,7 +721,7 @@ func (r *RawClient) GetDevices( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v/device", @@ -765,7 +765,7 @@ func (r *RawClient) GetDevice( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v/device/%v", @@ -810,7 +810,7 @@ func (r *RawClient) GetUserSignInToken( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v/sign_in_token", @@ -854,7 +854,7 @@ func (r *RawClient) CreatePortalUrl( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/user/%v/create_portal_url", diff --git a/vitals/raw_client.go b/vitals/raw_client.go index 796894b..9ef7c45 100644 --- a/vitals/raw_client.go +++ b/vitals/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) WorkoutSwimmingStrokeGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/workout_swimming_stroke/grouped", @@ -91,7 +91,7 @@ func (r *RawClient) WorkoutDistanceGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/workout_distance/grouped", @@ -142,7 +142,7 @@ func (r *RawClient) HeartRateRecoveryOneMinuteGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/heart_rate_recovery_one_minute/grouped", @@ -193,7 +193,7 @@ func (r *RawClient) WaistCircumferenceGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/waist_circumference/grouped", @@ -244,7 +244,7 @@ func (r *RawClient) LeanBodyMassGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/lean_body_mass/grouped", @@ -295,7 +295,7 @@ func (r *RawClient) BodyMassIndexGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/body_mass_index/grouped", @@ -346,7 +346,7 @@ func (r *RawClient) BasalBodyTemperatureGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/basal_body_temperature/grouped", @@ -397,7 +397,7 @@ func (r *RawClient) HandwashingGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/handwashing/grouped", @@ -448,7 +448,7 @@ func (r *RawClient) DaylightExposureGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/daylight_exposure/grouped", @@ -499,7 +499,7 @@ func (r *RawClient) UvExposureGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/uv_exposure/grouped", @@ -550,7 +550,7 @@ func (r *RawClient) FallGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/fall/grouped", @@ -601,7 +601,7 @@ func (r *RawClient) InhalerUsageGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/inhaler_usage/grouped", @@ -652,7 +652,7 @@ func (r *RawClient) PeakExpiratoryFlowRateGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/peak_expiratory_flow_rate/grouped", @@ -703,7 +703,7 @@ func (r *RawClient) ForcedVitalCapacityGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/forced_vital_capacity/grouped", @@ -754,7 +754,7 @@ func (r *RawClient) ForcedExpiratoryVolume1Grouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/forced_expiratory_volume_1/grouped", @@ -805,7 +805,7 @@ func (r *RawClient) WheelchairPushGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/wheelchair_push/grouped", @@ -856,7 +856,7 @@ func (r *RawClient) SleepBreathingDisturbanceGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/sleep_breathing_disturbance/grouped", @@ -907,7 +907,7 @@ func (r *RawClient) SleepApneaAlertGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/sleep_apnea_alert/grouped", @@ -958,7 +958,7 @@ func (r *RawClient) StandDurationGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/stand_duration/grouped", @@ -1009,7 +1009,7 @@ func (r *RawClient) StandHourGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/stand_hour/grouped", @@ -1060,7 +1060,7 @@ func (r *RawClient) HeartRateAlertGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/heart_rate_alert/grouped", @@ -1111,7 +1111,7 @@ func (r *RawClient) AfibBurdenGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/afib_burden/grouped", @@ -1162,7 +1162,7 @@ func (r *RawClient) WorkoutDurationGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/workout_duration/grouped", @@ -1213,7 +1213,7 @@ func (r *RawClient) Vo2MaxGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/vo2_max/grouped", @@ -1264,7 +1264,7 @@ func (r *RawClient) StressLevelGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/stress_level/grouped", @@ -1315,7 +1315,7 @@ func (r *RawClient) MindfulnessMinutesGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/mindfulness_minutes/grouped", @@ -1366,7 +1366,7 @@ func (r *RawClient) CaffeineGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/caffeine/grouped", @@ -1417,7 +1417,7 @@ func (r *RawClient) WaterGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/water/grouped", @@ -1468,7 +1468,7 @@ func (r *RawClient) StepsGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/steps/grouped", @@ -1519,7 +1519,7 @@ func (r *RawClient) FloorsClimbedGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/floors_climbed/grouped", @@ -1570,7 +1570,7 @@ func (r *RawClient) DistanceGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/distance/grouped", @@ -1621,7 +1621,7 @@ func (r *RawClient) CaloriesBasalGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/calories_basal/grouped", @@ -1672,7 +1672,7 @@ func (r *RawClient) CaloriesActiveGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/calories_active/grouped", @@ -1723,7 +1723,7 @@ func (r *RawClient) RespiratoryRateGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/respiratory_rate/grouped", @@ -1774,7 +1774,7 @@ func (r *RawClient) NoteGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/note/grouped", @@ -1825,7 +1825,7 @@ func (r *RawClient) InsulinInjectionGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/insulin_injection/grouped", @@ -1876,7 +1876,7 @@ func (r *RawClient) IgeGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/ige/grouped", @@ -1927,7 +1927,7 @@ func (r *RawClient) IggGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/igg/grouped", @@ -1978,7 +1978,7 @@ func (r *RawClient) HypnogramGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/hypnogram/grouped", @@ -2029,7 +2029,7 @@ func (r *RawClient) HrvGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/hrv/grouped", @@ -2080,7 +2080,7 @@ func (r *RawClient) HeartrateGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/heartrate/grouped", @@ -2131,7 +2131,7 @@ func (r *RawClient) GlucoseGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/glucose/grouped", @@ -2182,7 +2182,7 @@ func (r *RawClient) CholesterolGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/cholesterol/grouped", @@ -2233,7 +2233,7 @@ func (r *RawClient) CarbohydratesGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/carbohydrates/grouped", @@ -2284,7 +2284,7 @@ func (r *RawClient) BodyTemperatureDeltaGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/body_temperature_delta/grouped", @@ -2335,7 +2335,7 @@ func (r *RawClient) BodyTemperatureGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/body_temperature/grouped", @@ -2386,7 +2386,7 @@ func (r *RawClient) BodyWeightGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/body_weight/grouped", @@ -2437,7 +2437,7 @@ func (r *RawClient) BodyFatGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/body_fat/grouped", @@ -2488,7 +2488,7 @@ func (r *RawClient) BloodOxygenGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/blood_oxygen/grouped", @@ -2539,7 +2539,7 @@ func (r *RawClient) ElectrocardiogramVoltageGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/electrocardiogram_voltage/grouped", @@ -2590,7 +2590,7 @@ func (r *RawClient) BloodPressureGrouped( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/blood_pressure/grouped", @@ -2641,7 +2641,7 @@ func (r *RawClient) Vo2Max( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/vo2_max", @@ -2692,7 +2692,7 @@ func (r *RawClient) StressLevel( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/stress_level", @@ -2743,7 +2743,7 @@ func (r *RawClient) MindfulnessMinutes( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/mindfulness_minutes", @@ -2794,7 +2794,7 @@ func (r *RawClient) Caffeine( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/caffeine", @@ -2845,7 +2845,7 @@ func (r *RawClient) Water( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/water", @@ -2896,7 +2896,7 @@ func (r *RawClient) Steps( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/steps", @@ -2947,7 +2947,7 @@ func (r *RawClient) FloorsClimbed( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/floors_climbed", @@ -2998,7 +2998,7 @@ func (r *RawClient) Distance( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/distance", @@ -3049,7 +3049,7 @@ func (r *RawClient) CaloriesBasal( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/calories_basal", @@ -3100,7 +3100,7 @@ func (r *RawClient) CaloriesActive( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/calories_active", @@ -3151,7 +3151,7 @@ func (r *RawClient) RespiratoryRate( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/respiratory_rate", @@ -3202,7 +3202,7 @@ func (r *RawClient) Ige( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/ige", @@ -3253,7 +3253,7 @@ func (r *RawClient) Igg( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/igg", @@ -3304,7 +3304,7 @@ func (r *RawClient) Hypnogram( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/hypnogram", @@ -3355,7 +3355,7 @@ func (r *RawClient) Hrv( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/hrv", @@ -3406,7 +3406,7 @@ func (r *RawClient) Heartrate( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/heartrate", @@ -3457,7 +3457,7 @@ func (r *RawClient) Glucose( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/glucose", @@ -3508,7 +3508,7 @@ func (r *RawClient) CholesterolTriglycerides( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/cholesterol/triglycerides", @@ -3559,7 +3559,7 @@ func (r *RawClient) CholesterolTotal( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/cholesterol/total", @@ -3610,7 +3610,7 @@ func (r *RawClient) CholesterolLdl( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/cholesterol/ldl", @@ -3661,7 +3661,7 @@ func (r *RawClient) CholesterolHdl( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/cholesterol/hdl", @@ -3712,7 +3712,7 @@ func (r *RawClient) Cholesterol( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/cholesterol", @@ -3763,7 +3763,7 @@ func (r *RawClient) BodyWeight( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/body_weight", @@ -3814,7 +3814,7 @@ func (r *RawClient) BodyFat( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/body_fat", @@ -3865,7 +3865,7 @@ func (r *RawClient) BloodOxygen( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/blood_oxygen", @@ -3916,7 +3916,7 @@ func (r *RawClient) ElectrocardiogramVoltage( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/electrocardiogram_voltage", @@ -3967,7 +3967,7 @@ func (r *RawClient) BloodPressure( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/%v/blood_pressure", diff --git a/workouts/raw_client.go b/workouts/raw_client.go index 5d53555..bbf4755 100644 --- a/workouts/raw_client.go +++ b/workouts/raw_client.go @@ -40,7 +40,7 @@ func (r *RawClient) Get( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/workouts/%v", @@ -91,7 +91,7 @@ func (r *RawClient) GetRaw( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/summary/workouts/%v/raw", @@ -142,7 +142,7 @@ func (r *RawClient) GetByWorkoutId( baseURL := internal.ResolveBaseURL( options.BaseURL, r.baseURL, - "https://api.tryvital.io", + "https://api.us.junction.com", ) endpointURL := internal.EncodeURL( baseURL+"/v2/timeseries/workouts/%v/stream",