@@ -34,36 +34,6 @@ export const CreateDevlogBodySchema = z.object({
3434 technicalContext : z . string ( ) . optional ( ) ,
3535} ) ;
3636
37- /**
38- * Devlog entry update request body schema
39- */
40- export const UpdateDevlogBodySchema = CreateDevlogBodySchema . partial ( ) ;
41-
42- /**
43- * Batch operations schemas
44- */
45- export const BatchUpdateDevlogBodySchema = z . object ( {
46- devlogIds : z . array ( z . number ( ) . int ( ) . positive ( ) ) ,
47- updates : z . object ( {
48- status : z
49- . enum ( [ 'new' , 'in-progress' , 'blocked' , 'in-review' , 'testing' , 'done' , 'cancelled' ] )
50- . optional ( ) ,
51- priority : z . enum ( [ 'low' , 'medium' , 'high' , 'critical' ] ) . optional ( ) ,
52- assignee : z . string ( ) . optional ( ) ,
53- } ) ,
54- } ) ;
55-
56- export const BatchDeleteDevlogBodySchema = z . object ( {
57- devlogIds : z . array ( z . number ( ) . int ( ) . positive ( ) ) ,
58- } ) ;
59-
60- export const BatchNoteBodySchema = z . object ( {
61- devlogIds : z . array ( z . number ( ) . int ( ) . positive ( ) ) ,
62- note : z . object ( {
63- content : z . string ( ) . min ( 1 , 'Note content is required' ) ,
64- } ) ,
65- } ) ;
66-
6737/**
6838 * Query parameter schemas for devlog endpoints
6939 */
@@ -95,23 +65,6 @@ export const DevlogListQuerySchema = z.object({
9565 sortOrder : z . enum ( [ 'asc' , 'desc' ] ) . optional ( ) ,
9666} ) ;
9767
98- /**
99- * Stats query schemas
100- */
101- export const StatsTimeseriesQuerySchema = z . object ( {
102- startDate : z . string ( ) . datetime ( ) . optional ( ) ,
103- endDate : z . string ( ) . datetime ( ) . optional ( ) ,
104- interval : z . enum ( [ 'day' , 'week' , 'month' ] ) . default ( 'day' ) ,
68+ export const DevlogSearchQuerySchema = DevlogListQuerySchema . extend ( {
69+ q : z . string ( ) . min ( 1 , 'Search query is required' ) ,
10570} ) ;
106-
107- /**
108- * Type exports for TypeScript usage
109- */
110- export type DevlogIdParam = z . infer < typeof DevlogIdParamSchema > ;
111- export type CreateDevlogBody = z . infer < typeof CreateDevlogBodySchema > ;
112- export type UpdateDevlogBody = z . infer < typeof UpdateDevlogBodySchema > ;
113- export type BatchUpdateDevlogBody = z . infer < typeof BatchUpdateDevlogBodySchema > ;
114- export type BatchDeleteDevlogBody = z . infer < typeof BatchDeleteDevlogBodySchema > ;
115- export type BatchNoteBody = z . infer < typeof BatchNoteBodySchema > ;
116- export type DevlogListQuery = z . infer < typeof DevlogListQuerySchema > ;
117- export type StatsTimeseriesQuery = z . infer < typeof StatsTimeseriesQuerySchema > ;
0 commit comments