diff --git a/sdk/src/opendecree/async_client.py b/sdk/src/opendecree/async_client.py index 7f123ef..a80f7ae 100644 --- a/sdk/src/opendecree/async_client.py +++ b/sdk/src/opendecree/async_client.py @@ -161,23 +161,25 @@ def _metadata(self) -> list[tuple[str, str]]: async def get(self, tenant_id: str, field_path: str) -> str: ... @overload - async def get(self, tenant_id: str, field_path: str, type: type[bool]) -> bool: ... + async def get(self, tenant_id: str, field_path: str, value_type: type[bool]) -> bool: ... @overload - async def get(self, tenant_id: str, field_path: str, type: type[int]) -> int: ... + async def get(self, tenant_id: str, field_path: str, value_type: type[int]) -> int: ... @overload - async def get(self, tenant_id: str, field_path: str, type: type[float]) -> float: ... + async def get(self, tenant_id: str, field_path: str, value_type: type[float]) -> float: ... @overload - async def get(self, tenant_id: str, field_path: str, type: type[timedelta]) -> timedelta: ... + async def get( + self, tenant_id: str, field_path: str, value_type: type[timedelta] + ) -> timedelta: ... @overload async def get( self, tenant_id: str, field_path: str, - type: type[str], + value_type: type[str], *, nullable: bool, ) -> str | None: ... @@ -186,7 +188,7 @@ async def get( self, tenant_id: str, field_path: str, - type: type | None = None, + value_type: type | None = None, *, nullable: bool = False, ) -> object: @@ -198,7 +200,7 @@ async def get( Args: tenant_id: Tenant UUID. field_path: Dot-separated field path (e.g., "payments.fee"). - type: Target type (str, int, float, bool, timedelta). Defaults to str. + value_type: Target type (str, int, float, bool, timedelta). Defaults to str. nullable: If True, return None for null/unset values instead of raising. Returns: @@ -208,7 +210,7 @@ async def get( NotFoundError: If the field has no value (and nullable is False). TypeMismatchError: If the value cannot be converted to the requested type. """ - target_type = type or str + target_type = value_type or str async def _call() -> object: resp = await self._stub.GetField( diff --git a/sdk/src/opendecree/client.py b/sdk/src/opendecree/client.py index 057838f..9a614b1 100644 --- a/sdk/src/opendecree/client.py +++ b/sdk/src/opendecree/client.py @@ -176,23 +176,23 @@ def check_compatibility(self) -> None: def get(self, tenant_id: str, field_path: str) -> str: ... @overload - def get(self, tenant_id: str, field_path: str, type: type[bool]) -> bool: ... + def get(self, tenant_id: str, field_path: str, value_type: type[bool]) -> bool: ... @overload - def get(self, tenant_id: str, field_path: str, type: type[int]) -> int: ... + def get(self, tenant_id: str, field_path: str, value_type: type[int]) -> int: ... @overload - def get(self, tenant_id: str, field_path: str, type: type[float]) -> float: ... + def get(self, tenant_id: str, field_path: str, value_type: type[float]) -> float: ... @overload - def get(self, tenant_id: str, field_path: str, type: type[timedelta]) -> timedelta: ... + def get(self, tenant_id: str, field_path: str, value_type: type[timedelta]) -> timedelta: ... @overload def get( self, tenant_id: str, field_path: str, - type: type[str], + value_type: type[str], *, nullable: bool, ) -> str | None: ... @@ -201,7 +201,7 @@ def get( self, tenant_id: str, field_path: str, - type: type | None = None, + value_type: type | None = None, *, nullable: bool = False, ) -> object: @@ -213,7 +213,7 @@ def get( Args: tenant_id: Tenant UUID. field_path: Dot-separated field path (e.g., "payments.fee"). - type: Target type (str, int, float, bool, timedelta). Defaults to str. + value_type: Target type (str, int, float, bool, timedelta). Defaults to str. nullable: If True, return None for null/unset values instead of raising. Returns: @@ -223,7 +223,7 @@ def get( NotFoundError: If the field has no value (and nullable is False). TypeMismatchError: If the value cannot be converted to the requested type. """ - target_type = type or str + target_type = value_type or str def _call() -> object: resp = self._stub.GetField(