Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Oct 17, 2024
1 parent 361f93b commit d071330
Showing 1 changed file with 17 additions and 44 deletions.
61 changes: 17 additions & 44 deletions src/zep_cloud/group/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from ..errors.not_found_error import NotFoundError
from ..types.api_error import ApiError as types_api_error_ApiError
from ..types.group import Group
from ..types.success_response import SuccessResponse

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
Expand Down Expand Up @@ -79,33 +80,22 @@ def add(
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)

def update(
self,
group_id: str,
*,
description: typing.Optional[str] = OMIT,
name: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Group:
def delete(self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> SuccessResponse:
"""
Update group information
Delete group
Parameters
----------
group_id : str
Group ID
description : typing.Optional[str]
name : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
Group
The added group
SuccessResponse
Deleted
Examples
--------
Expand All @@ -114,19 +104,15 @@ def update(
client = Zep(
api_key="YOUR_API_KEY",
)
client.group.update(
client.group.delete(
group_id="groupId",
)
"""
_response = self._client_wrapper.httpx_client.request(
f"groups/{jsonable_encoder(group_id)}",
method="PATCH",
json={"description": description, "name": name},
request_options=request_options,
omit=OMIT,
f"groups/{jsonable_encoder(group_id)}", method="DELETE", request_options=request_options
)
if 200 <= _response.status_code < 300:
return pydantic_v1.parse_obj_as(Group, _response.json()) # type: ignore
return pydantic_v1.parse_obj_as(SuccessResponse, _response.json()) # type: ignore
if _response.status_code == 400:
raise BadRequestError(pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json())) # type: ignore
if _response.status_code == 404:
Expand Down Expand Up @@ -203,33 +189,24 @@ async def add(
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)

async def update(
self,
group_id: str,
*,
description: typing.Optional[str] = OMIT,
name: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Group:
async def delete(
self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> SuccessResponse:
"""
Update group information
Delete group
Parameters
----------
group_id : str
Group ID
description : typing.Optional[str]
name : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
Group
The added group
SuccessResponse
Deleted
Examples
--------
Expand All @@ -238,19 +215,15 @@ async def update(
client = AsyncZep(
api_key="YOUR_API_KEY",
)
await client.group.update(
await client.group.delete(
group_id="groupId",
)
"""
_response = await self._client_wrapper.httpx_client.request(
f"groups/{jsonable_encoder(group_id)}",
method="PATCH",
json={"description": description, "name": name},
request_options=request_options,
omit=OMIT,
f"groups/{jsonable_encoder(group_id)}", method="DELETE", request_options=request_options
)
if 200 <= _response.status_code < 300:
return pydantic_v1.parse_obj_as(Group, _response.json()) # type: ignore
return pydantic_v1.parse_obj_as(SuccessResponse, _response.json()) # type: ignore
if _response.status_code == 400:
raise BadRequestError(pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json())) # type: ignore
if _response.status_code == 404:
Expand Down

0 comments on commit d071330

Please sign in to comment.