From 710b04cb1b88899ce461737b6409bff03c45f366 Mon Sep 17 00:00:00 2001 From: langfuse-bot Date: Tue, 23 Dec 2025 12:09:17 +0000 Subject: [PATCH] feat(api): update API spec from langfuse/langfuse e10102e --- langfuse/api/__init__.py | 2 + langfuse/api/resources/__init__.py | 2 + langfuse/api/resources/projects/__init__.py | 2 + .../api/resources/projects/types/__init__.py | 2 + .../resources/projects/types/organization.py | 50 +++++++++++++++++++ .../api/resources/projects/types/project.py | 6 +++ 6 files changed, 64 insertions(+) create mode 100644 langfuse/api/resources/projects/types/organization.py diff --git a/langfuse/api/__init__.py b/langfuse/api/__init__.py index 9ec280087..eda68d855 100644 --- a/langfuse/api/__init__.py +++ b/langfuse/api/__init__.py @@ -137,6 +137,7 @@ OpenAiResponseUsageSchema, OpenAiUsage, OptionalObservationBody, + Organization, OrganizationApiKey, OrganizationApiKeysResponse, OrganizationProject, @@ -392,6 +393,7 @@ "OpenAiResponseUsageSchema", "OpenAiUsage", "OptionalObservationBody", + "Organization", "OrganizationApiKey", "OrganizationApiKeysResponse", "OrganizationProject", diff --git a/langfuse/api/resources/__init__.py b/langfuse/api/resources/__init__.py index 1095119a7..10c3c11fe 100644 --- a/langfuse/api/resources/__init__.py +++ b/langfuse/api/resources/__init__.py @@ -211,6 +211,7 @@ ApiKeyList, ApiKeyResponse, ApiKeySummary, + Organization, Project, ProjectDeletionResponse, Projects, @@ -412,6 +413,7 @@ "OpenAiResponseUsageSchema", "OpenAiUsage", "OptionalObservationBody", + "Organization", "OrganizationApiKey", "OrganizationApiKeysResponse", "OrganizationProject", diff --git a/langfuse/api/resources/projects/__init__.py b/langfuse/api/resources/projects/__init__.py index 26c74c1c7..7161cfff1 100644 --- a/langfuse/api/resources/projects/__init__.py +++ b/langfuse/api/resources/projects/__init__.py @@ -5,6 +5,7 @@ ApiKeyList, ApiKeyResponse, ApiKeySummary, + Organization, Project, ProjectDeletionResponse, Projects, @@ -15,6 +16,7 @@ "ApiKeyList", "ApiKeyResponse", "ApiKeySummary", + "Organization", "Project", "ProjectDeletionResponse", "Projects", diff --git a/langfuse/api/resources/projects/types/__init__.py b/langfuse/api/resources/projects/types/__init__.py index c59b62a62..6fd44aa52 100644 --- a/langfuse/api/resources/projects/types/__init__.py +++ b/langfuse/api/resources/projects/types/__init__.py @@ -4,6 +4,7 @@ from .api_key_list import ApiKeyList from .api_key_response import ApiKeyResponse from .api_key_summary import ApiKeySummary +from .organization import Organization from .project import Project from .project_deletion_response import ProjectDeletionResponse from .projects import Projects @@ -13,6 +14,7 @@ "ApiKeyList", "ApiKeyResponse", "ApiKeySummary", + "Organization", "Project", "ProjectDeletionResponse", "Projects", diff --git a/langfuse/api/resources/projects/types/organization.py b/langfuse/api/resources/projects/types/organization.py new file mode 100644 index 000000000..1a46b6f6c --- /dev/null +++ b/langfuse/api/resources/projects/types/organization.py @@ -0,0 +1,50 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ....core.datetime_utils import serialize_datetime +from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 + + +class Organization(pydantic_v1.BaseModel): + id: str = pydantic_v1.Field() + """ + The unique identifier of the organization + """ + + name: str = pydantic_v1.Field() + """ + The name of the organization + """ + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults_exclude_unset: typing.Any = { + "by_alias": True, + "exclude_unset": True, + **kwargs, + } + kwargs_with_defaults_exclude_none: typing.Any = { + "by_alias": True, + "exclude_none": True, + **kwargs, + } + + return deep_union_pydantic_dicts( + super().dict(**kwargs_with_defaults_exclude_unset), + super().dict(**kwargs_with_defaults_exclude_none), + ) + + class Config: + frozen = True + smart_union = True + extra = pydantic_v1.Extra.allow + json_encoders = {dt.datetime: serialize_datetime} diff --git a/langfuse/api/resources/projects/types/project.py b/langfuse/api/resources/projects/types/project.py index cf257d406..913dbb040 100644 --- a/langfuse/api/resources/projects/types/project.py +++ b/langfuse/api/resources/projects/types/project.py @@ -5,11 +5,17 @@ from ....core.datetime_utils import serialize_datetime from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 +from .organization import Organization class Project(pydantic_v1.BaseModel): id: str name: str + organization: Organization = pydantic_v1.Field() + """ + The organization this project belongs to + """ + metadata: typing.Dict[str, typing.Any] = pydantic_v1.Field() """ Metadata for the project