@@ -93,7 +93,7 @@ fn api_err(status: StatusCode, msg: impl Into<String>) -> Response {
9393
9494/// Query parameters for `GET /api/v1/events`.
9595#[ derive( Debug , Deserialize ) ]
96- struct EventsParams {
96+ pub struct EventsParams {
9797 event_type : Option < String > ,
9898 from : Option < String > ,
9999 to : Option < String > ,
@@ -152,7 +152,7 @@ pub async fn get_event(
152152
153153/// Request body for `POST /api/v1/events/query`.
154154#[ derive( Debug , Deserialize ) ]
155- struct CustomQueryRequest {
155+ pub struct CustomQueryRequest {
156156 /// SQL SELECT statement — runs against `deduped` CTE (auto-scoped to tenant).
157157 sql : String ,
158158 from : Option < String > ,
@@ -204,7 +204,7 @@ async fn proxy_to_polars_query(state: &AppState, body: &serde_json::Value) -> Re
204204
205205/// Query parameters for analytics endpoints.
206206#[ derive( Debug , Deserialize ) ]
207- struct AnalyticsParams {
207+ pub struct AnalyticsParams {
208208 event_type : Option < String > ,
209209 from : Option < String > ,
210210 to : Option < String > ,
@@ -235,7 +235,7 @@ pub async fn analytics_summary(
235235
236236/// Query parameters for timeseries endpoint.
237237#[ derive( Debug , Deserialize ) ]
238- struct TimeseriesParams {
238+ pub struct TimeseriesParams {
239239 event_type : Option < String > ,
240240 from : Option < String > ,
241241 to : Option < String > ,
@@ -314,10 +314,10 @@ async fn proxy_to_polars_lite(state: &AppState, body: &serde_json::Value) -> Res
314314
315315/// Request body for `POST /api/v1/query/nl`.
316316#[ derive( Debug , Deserialize ) ]
317- struct NlQueryRequest {
317+ pub struct NlQueryRequest {
318318 /// Natural language question.
319- prompt : String ,
320- limit : Option < u32 > ,
319+ pub prompt : String ,
320+ pub limit : Option < u32 > ,
321321}
322322
323323/// `POST /api/v1/query/nl` — natural language → SQL → results.
@@ -352,12 +352,12 @@ pub async fn query_nl(
352352
353353/// Request body for `POST /api/v1/query/similar`.
354354#[ derive( Debug , Deserialize ) ]
355- struct SimilarQueryRequest {
355+ pub struct SimilarQueryRequest {
356356 /// Event ID to find similar events for.
357- event_id : Option < String > ,
357+ pub event_id : Option < String > ,
358358 /// Or raw text to search for.
359- query : Option < String > ,
360- limit : Option < u32 > ,
359+ pub query : Option < String > ,
360+ pub limit : Option < u32 > ,
361361}
362362
363363/// `POST /api/v1/query/similar` — vector similarity search.
0 commit comments