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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "5.5.1",
"cliVersion": "5.10.2",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "5.8.1",
"generatorConfig": {
Expand All @@ -10,10 +10,10 @@
"use_pydantic_field_aliases": true
}
},
"originGitCommit": "05d79dd6ce370cbd029417f59eb71c056d94aa61",
"originGitCommit": "5f82089cf81f14dcaa4eabeffe1c781fb1679c6e",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "AUTO",
"ciProvider": "unknown",
"sdkVersion": "0.0.1"
"sdkVersion": "1.0.0"
}
3 changes: 1 addition & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
## 0.0.1 - 2026-05-01
## 1.0.0 - 2026-05-06
* Initial SDK generation
* 🌿 Generated with Fern

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "junction-api-sdk"
version = "0.0.1"
version = "1.0.0"
description = ""
readme = "README.md"
authors = []
Expand Down
6 changes: 6 additions & 0 deletions src/junction/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@
LabLocationCapability,
LabLocationMetadata,
LabReportResult,
LabReportResultMeasurementKind,
LabReportResultSampleType,
LabReportResultType,
LabResultsMetadata,
LabResultsRaw,
Expand Down Expand Up @@ -1428,6 +1430,8 @@
"LabLocationCapability": ".types",
"LabLocationMetadata": ".types",
"LabReportResult": ".types",
"LabReportResultMeasurementKind": ".types",
"LabReportResultSampleType": ".types",
"LabReportResultType": ".types",
"LabResultsMetadata": ".types",
"LabResultsRaw": ".types",
Expand Down Expand Up @@ -2278,6 +2282,8 @@ def __dir__():
"LabLocationCapability",
"LabLocationMetadata",
"LabReportResult",
"LabReportResultMeasurementKind",
"LabReportResultSampleType",
"LabReportResultType",
"LabResultsMetadata",
"LabResultsRaw",
Expand Down
4 changes: 2 additions & 2 deletions src/junction/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "junction-api-sdk/0.0.1",
"User-Agent": "junction-api-sdk/1.0.0",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "junction-api-sdk",
"X-Fern-SDK-Version": "0.0.1",
"X-Fern-SDK-Version": "1.0.0",
**(self.get_custom_headers() or {}),
}
headers["x-vital-api-key"] = self.api_key
Expand Down
8 changes: 4 additions & 4 deletions src/junction/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class JunctionEnvironment(enum.Enum):
PRODUCTION = "https://api.tryvital.io"
PRODUCTION_EU = "https://api.eu.tryvital.io"
SANDBOX = "https://api.sandbox.tryvital.io"
SANDBOX_EU = "https://api.sandbox.eu.tryvital.io"
PRODUCTION = "https://api.us.junction.com"
PRODUCTION_EU = "https://api.eu.junction.com"
SANDBOX = "https://api.sandbox.us.junction.com"
SANDBOX_EU = "https://api.sandbox.eu.junction.com"
6 changes: 6 additions & 0 deletions src/junction/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,8 @@
from .lab_location_capability import LabLocationCapability
from .lab_location_metadata import LabLocationMetadata
from .lab_report_result import LabReportResult
from .lab_report_result_measurement_kind import LabReportResultMeasurementKind
from .lab_report_result_sample_type import LabReportResultSampleType
from .lab_report_result_type import LabReportResultType
from .lab_results_metadata import LabResultsMetadata
from .lab_results_raw import LabResultsRaw
Expand Down Expand Up @@ -1448,6 +1450,8 @@
"LabLocationCapability": ".lab_location_capability",
"LabLocationMetadata": ".lab_location_metadata",
"LabReportResult": ".lab_report_result",
"LabReportResultMeasurementKind": ".lab_report_result_measurement_kind",
"LabReportResultSampleType": ".lab_report_result_sample_type",
"LabReportResultType": ".lab_report_result_type",
"LabResultsMetadata": ".lab_results_metadata",
"LabResultsRaw": ".lab_results_raw",
Expand Down Expand Up @@ -2255,6 +2259,8 @@ def __dir__():
"LabLocationCapability",
"LabLocationMetadata",
"LabReportResult",
"LabReportResultMeasurementKind",
"LabReportResultSampleType",
"LabReportResultType",
"LabResultsMetadata",
"LabResultsRaw",
Expand Down
12 changes: 12 additions & 0 deletions src/junction/types/lab_report_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,25 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .interpretation import Interpretation
from .lab_report_result_measurement_kind import LabReportResultMeasurementKind
from .lab_report_result_sample_type import LabReportResultSampleType
from .lab_report_result_type import LabReportResultType
from .loinc_match import LoincMatch


class LabReportResult(UniversalBaseModel):
test_name: str
value: str
sample_type: typing.Optional[LabReportResultSampleType] = pydantic.Field(default=None)
"""
ℹ️ This enum is non-exhaustive.
"""

measurement_kind: typing.Optional[LabReportResultMeasurementKind] = pydantic.Field(default=None)
"""
ℹ️ This enum is non-exhaustive.
"""

type: typing.Optional[LabReportResultType] = pydantic.Field(default=None)
"""
ℹ️ This enum is non-exhaustive.
Expand Down
46 changes: 46 additions & 0 deletions src/junction/types/lab_report_result_measurement_kind.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This file was auto-generated by Fern from our API Definition.

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class LabReportResultMeasurementKind(enum.StrEnum):
"""
ℹ️ This enum is non-exhaustive.
"""

DIRECT = "direct"
CALCULATED = "calculated"
RATIO = "ratio"
UNKNOWN = "unknown"
_UNKNOWN = "__LABREPORTRESULTMEASUREMENTKIND_UNKNOWN__"
"""
This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
"""

@classmethod
def _missing_(cls, value: typing.Any) -> "LabReportResultMeasurementKind":
unknown = cls._UNKNOWN
unknown._value_ = value
return unknown

def visit(
self,
direct: typing.Callable[[], T_Result],
calculated: typing.Callable[[], T_Result],
ratio: typing.Callable[[], T_Result],
unknown: typing.Callable[[], T_Result],
_unknown_member: typing.Callable[[str], T_Result],
) -> T_Result:
if self is LabReportResultMeasurementKind.DIRECT:
return direct()
if self is LabReportResultMeasurementKind.CALCULATED:
return calculated()
if self is LabReportResultMeasurementKind.RATIO:
return ratio()
if self is LabReportResultMeasurementKind.UNKNOWN:
return unknown()
return _unknown_member(self._value_)
58 changes: 58 additions & 0 deletions src/junction/types/lab_report_result_sample_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This file was auto-generated by Fern from our API Definition.

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class LabReportResultSampleType(enum.StrEnum):
"""
ℹ️ This enum is non-exhaustive.
"""

URINE = "urine"
SERUM_PLASMA_BLOOD = "serum_plasma_blood"
CAPILLARY_BLOOD = "capillary_blood"
STOOL = "stool"
SALIVA = "saliva"
OTHER = "other"
UNKNOWN = "unknown"
_UNKNOWN = "__LABREPORTRESULTSAMPLETYPE_UNKNOWN__"
"""
This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
"""

@classmethod
def _missing_(cls, value: typing.Any) -> "LabReportResultSampleType":
unknown = cls._UNKNOWN
unknown._value_ = value
return unknown

def visit(
self,
urine: typing.Callable[[], T_Result],
serum_plasma_blood: typing.Callable[[], T_Result],
capillary_blood: typing.Callable[[], T_Result],
stool: typing.Callable[[], T_Result],
saliva: typing.Callable[[], T_Result],
other: typing.Callable[[], T_Result],
unknown: typing.Callable[[], T_Result],
_unknown_member: typing.Callable[[str], T_Result],
) -> T_Result:
if self is LabReportResultSampleType.URINE:
return urine()
if self is LabReportResultSampleType.SERUM_PLASMA_BLOOD:
return serum_plasma_blood()
if self is LabReportResultSampleType.CAPILLARY_BLOOD:
return capillary_blood()
if self is LabReportResultSampleType.STOOL:
return stool()
if self is LabReportResultSampleType.SALIVA:
return saliva()
if self is LabReportResultSampleType.OTHER:
return other()
if self is LabReportResultSampleType.UNKNOWN:
return unknown()
return _unknown_member(self._value_)
5 changes: 5 additions & 0 deletions src/junction/types/meal_in_db_base_client_facing_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ class MealInDbBaseClientFacingSource(UniversalBaseModel):
"""

timestamp: dt.datetime
calendar_date: str = pydantic.Field()
"""
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.
"""

name: str
energy: typing.Optional[Energy] = None
macros: typing.Optional[Macros] = None
Expand Down
Loading