UNPKG

@vfarcic/dot-ai

Version:

AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance

187 lines 6.38 kB
/** * Sessions Endpoint Schemas * * Schemas for the /api/v1/sessions/:sessionId endpoint. * PRD #354: REST API Route Registry with Auto-Generated OpenAPI and Test Fixtures */ import { z } from 'zod'; /** * Session metadata */ export declare const SessionMetadataSchema: z.ZodObject<{ id: z.ZodString; createdAt: z.ZodString; expiresAt: z.ZodOptional<z.ZodString>; }, z.core.$strip>; export type SessionMetadata = z.infer<typeof SessionMetadataSchema>; /** * Generic session data * Sessions can contain different data based on the tool that created them */ export declare const SessionDataSchema: z.ZodObject<{ toolName: z.ZodOptional<z.ZodString>; intent: z.ZodOptional<z.ZodString>; }, z.core.$loose>; export type SessionData = z.infer<typeof SessionDataSchema>; /** * Session response data * GET /api/v1/sessions/:sessionId */ export declare const SessionResponseDataSchema: z.ZodObject<{ id: z.ZodString; data: z.ZodObject<{ toolName: z.ZodOptional<z.ZodString>; intent: z.ZodOptional<z.ZodString>; }, z.core.$loose>; createdAt: z.ZodOptional<z.ZodString>; expiresAt: z.ZodOptional<z.ZodString>; }, z.core.$strip>; export type SessionResponseData = z.infer<typeof SessionResponseDataSchema>; export declare const SessionResponseSchema: z.ZodObject<{ success: z.ZodLiteral<true>; data: z.ZodObject<{ id: z.ZodString; data: z.ZodObject<{ toolName: z.ZodOptional<z.ZodString>; intent: z.ZodOptional<z.ZodString>; }, z.core.$loose>; createdAt: z.ZodOptional<z.ZodString>; expiresAt: z.ZodOptional<z.ZodString>; }, z.core.$strip>; meta: z.ZodOptional<z.ZodObject<{ timestamp: z.ZodString; requestId: z.ZodOptional<z.ZodString>; version: z.ZodString; }, z.core.$strip>>; }, z.core.$strip>; export type SessionResponse = z.infer<typeof SessionResponseSchema>; /** * Session endpoint error schemas */ export declare const SessionNotFoundErrorSchema: z.ZodObject<{ success: z.ZodLiteral<false>; meta: z.ZodOptional<z.ZodObject<{ timestamp: z.ZodString; requestId: z.ZodOptional<z.ZodString>; version: z.ZodString; }, z.core.$strip>>; error: z.ZodObject<{ code: z.ZodLiteral<"SESSION_NOT_FOUND">; message: z.ZodString; details: z.ZodOptional<z.ZodAny>; }, z.core.$strip>; }, z.core.$strip>; export declare const SessionRetrievalErrorSchema: z.ZodObject<{ success: z.ZodLiteral<false>; meta: z.ZodOptional<z.ZodObject<{ timestamp: z.ZodString; requestId: z.ZodOptional<z.ZodString>; version: z.ZodString; }, z.core.$strip>>; error: z.ZodObject<{ code: z.ZodLiteral<"SESSION_RETRIEVAL_ERROR">; message: z.ZodString; details: z.ZodOptional<z.ZodAny>; }, z.core.$strip>; }, z.core.$strip>; /** * Session List Endpoint Schemas * GET /api/v1/sessions * PRD #425: Session List API and SSE Streaming */ /** * Query parameters for listing sessions */ export declare const SessionListQuerySchema: z.ZodObject<{ status: z.ZodOptional<z.ZodString>; limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>; offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>; }, z.core.$strip>; export type SessionListQuery = z.infer<typeof SessionListQuerySchema>; /** * Session summary (no finalAnalysis to keep responses lean) */ export declare const SessionSummarySchema: z.ZodObject<{ sessionId: z.ZodString; status: z.ZodOptional<z.ZodString>; issue: z.ZodOptional<z.ZodString>; mode: z.ZodOptional<z.ZodString>; toolName: z.ZodOptional<z.ZodString>; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; export type SessionSummary = z.infer<typeof SessionSummarySchema>; /** * Session list response data */ export declare const SessionListDataSchema: z.ZodObject<{ sessions: z.ZodArray<z.ZodObject<{ sessionId: z.ZodString; status: z.ZodOptional<z.ZodString>; issue: z.ZodOptional<z.ZodString>; mode: z.ZodOptional<z.ZodString>; toolName: z.ZodOptional<z.ZodString>; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>>; total: z.ZodNumber; limit: z.ZodNumber; offset: z.ZodNumber; }, z.core.$strip>; export type SessionListData = z.infer<typeof SessionListDataSchema>; export declare const SessionListResponseSchema: z.ZodObject<{ success: z.ZodLiteral<true>; data: z.ZodObject<{ sessions: z.ZodArray<z.ZodObject<{ sessionId: z.ZodString; status: z.ZodOptional<z.ZodString>; issue: z.ZodOptional<z.ZodString>; mode: z.ZodOptional<z.ZodString>; toolName: z.ZodOptional<z.ZodString>; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>>; total: z.ZodNumber; limit: z.ZodNumber; offset: z.ZodNumber; }, z.core.$strip>; meta: z.ZodOptional<z.ZodObject<{ timestamp: z.ZodString; requestId: z.ZodOptional<z.ZodString>; version: z.ZodString; }, z.core.$strip>>; }, z.core.$strip>; export type SessionListResponse = z.infer<typeof SessionListResponseSchema>; export declare const SessionListErrorSchema: z.ZodObject<{ success: z.ZodLiteral<false>; meta: z.ZodOptional<z.ZodObject<{ timestamp: z.ZodString; requestId: z.ZodOptional<z.ZodString>; version: z.ZodString; }, z.core.$strip>>; error: z.ZodObject<{ code: z.ZodLiteral<"SESSION_LIST_ERROR">; message: z.ZodString; details: z.ZodOptional<z.ZodAny>; }, z.core.$strip>; }, z.core.$strip>; /** * SSE Streaming Endpoint Schema * GET /api/v1/events/remediations * PRD #425: Real-time remediation session events via Server-Sent Events */ export declare const RemediationSSEEventSchema: z.ZodObject<{ event: z.ZodEnum<{ "session-created": "session-created"; "session-updated": "session-updated"; }>; data: z.ZodObject<{ sessionId: z.ZodString; toolName: z.ZodString; status: z.ZodString; issue: z.ZodString; timestamp: z.ZodString; }, z.core.$strip>; }, z.core.$strip>; export type RemediationSSEEvent = z.infer<typeof RemediationSSEEventSchema>; //# sourceMappingURL=sessions.d.ts.map