11from ..controllers import full as controllers
22from ..models import response as res
3+ from ..models .response import UUID
34from fastapi import Request
45from fastapi import Path , Query , Body
56
67
78async def get_user_events (
89 request : Request ,
9- user_id : str = Path (..., description = "The ID of the user" ),
10+ user_id : UUID = Path (..., description = "The ID of the user" ),
1011 topk : int = Query (10 , description = "Number of events to retrieve, default is 10" ),
1112 max_token_size : int = Query (
1213 None ,
@@ -29,8 +30,8 @@ async def get_user_events(
2930
3031async def delete_user_event (
3132 request : Request ,
32- user_id : str = Path (..., description = "The ID of the user" ),
33- event_id : str = Path (..., description = "The ID of the event" ),
33+ user_id : UUID = Path (..., description = "The ID of the user" ),
34+ event_id : UUID = Path (..., description = "The ID of the event" ),
3435) -> res .BaseResponse :
3536 project_id = request .state .memobase_project_id
3637 p = await controllers .event .delete_user_event (user_id , project_id , event_id )
@@ -39,8 +40,8 @@ async def delete_user_event(
3940
4041async def update_user_event (
4142 request : Request ,
42- user_id : str = Path (..., description = "The ID of the user" ),
43- event_id : str = Path (..., description = "The ID of the event" ),
43+ user_id : UUID = Path (..., description = "The ID of the user" ),
44+ event_id : UUID = Path (..., description = "The ID of the event" ),
4445 event_data : res .EventData = Body (..., description = "Event data to update" ),
4546) -> res .BaseResponse :
4647 project_id = request .state .memobase_project_id
@@ -52,7 +53,7 @@ async def update_user_event(
5253
5354async def search_user_events (
5455 request : Request ,
55- user_id : str = Path (..., description = "The ID of the user" ),
56+ user_id : UUID = Path (..., description = "The ID of the user" ),
5657 query : str = Query (..., description = "The query to search for" ),
5758 topk : int = Query (10 , description = "Number of events to retrieve, default is 10" ),
5859 similarity_threshold : float = Query (
@@ -71,7 +72,7 @@ async def search_user_events(
7172
7273async def search_user_event_gists (
7374 request : Request ,
74- user_id : str = Path (..., description = "The ID of the user" ),
75+ user_id : UUID = Path (..., description = "The ID of the user" ),
7576 query : str = Query (..., description = "The query to search for" ),
7677 topk : int = Query (10 , description = "Number of events to retrieve, default is 10" ),
7778 similarity_threshold : float = Query (
0 commit comments