@vfarcic/dot-ai
Version:
AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance
369 lines • 12.5 kB
TypeScript
/**
* Visualization Response Schemas
*
* Schemas for the /api/v1/visualize/:sessionId endpoint.
* PRD #354: REST API Route Registry with Auto-Generated OpenAPI and Test Fixtures
*/
import { z } from 'zod';
/**
* Visualization types supported by the API
* PRD #320: Added 'diff' type for before/after comparisons
* PRD #328: Added 'bar-chart' type for metrics visualization
*/
export declare const VisualizationTypeSchema: z.ZodEnum<{
code: "code";
mermaid: "mermaid";
cards: "cards";
table: "table";
diff: "diff";
"bar-chart": "bar-chart";
}>;
export type VisualizationType = z.infer<typeof VisualizationTypeSchema>;
/**
* Code visualization content
*/
export declare const CodeContentSchema: z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>;
export type CodeContent = z.infer<typeof CodeContentSchema>;
/**
* Table visualization content
*/
export declare const TableContentSchema: z.ZodObject<{
headers: z.ZodArray<z.ZodString>;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
export type TableContent = z.infer<typeof TableContentSchema>;
/**
* Card item in cards visualization
*/
export declare const CardItemSchema: z.ZodObject<{
id: z.ZodString;
title: z.ZodString;
description: z.ZodOptional<z.ZodString>;
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
export type CardItem = z.infer<typeof CardItemSchema>;
/**
* Cards visualization content
*/
export declare const CardsContentSchema: z.ZodArray<z.ZodObject<{
id: z.ZodString;
title: z.ZodString;
description: z.ZodOptional<z.ZodString>;
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
export type CardsContent = z.infer<typeof CardsContentSchema>;
/**
* Diff visualization content (PRD #320)
*/
export declare const DiffContentSchema: z.ZodObject<{
before: z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>;
after: z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>;
export type DiffContent = z.infer<typeof DiffContentSchema>;
/**
* Bar chart data item (PRD #328)
*/
export declare const BarChartDataItemSchema: z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
max: z.ZodOptional<z.ZodNumber>;
status: z.ZodOptional<z.ZodEnum<{
error: "error";
warning: "warning";
ok: "ok";
}>>;
}, z.core.$strip>;
export type BarChartDataItem = z.infer<typeof BarChartDataItemSchema>;
/**
* Bar chart visualization content (PRD #328)
*/
export declare const BarChartContentSchema: z.ZodObject<{
data: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
max: z.ZodOptional<z.ZodNumber>;
status: z.ZodOptional<z.ZodEnum<{
error: "error";
warning: "warning";
ok: "ok";
}>>;
}, z.core.$strip>>;
unit: z.ZodOptional<z.ZodString>;
orientation: z.ZodOptional<z.ZodEnum<{
horizontal: "horizontal";
vertical: "vertical";
}>>;
}, z.core.$strip>;
export type BarChartContent = z.infer<typeof BarChartContentSchema>;
/**
* Visualization content union type
* Content varies based on visualization type
*/
export declare const VisualizationContentSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
headers: z.ZodArray<z.ZodString>;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
id: z.ZodString;
title: z.ZodString;
description: z.ZodOptional<z.ZodString>;
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>, z.ZodObject<{
before: z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>;
after: z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
data: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
max: z.ZodOptional<z.ZodNumber>;
status: z.ZodOptional<z.ZodEnum<{
error: "error";
warning: "warning";
ok: "ok";
}>>;
}, z.core.$strip>>;
unit: z.ZodOptional<z.ZodString>;
orientation: z.ZodOptional<z.ZodEnum<{
horizontal: "horizontal";
vertical: "vertical";
}>>;
}, z.core.$strip>]>;
export type VisualizationContent = z.infer<typeof VisualizationContentSchema>;
/**
* Individual visualization item
*/
export declare const VisualizationSchema: z.ZodObject<{
id: z.ZodString;
label: z.ZodString;
type: z.ZodEnum<{
code: "code";
mermaid: "mermaid";
cards: "cards";
table: "table";
diff: "diff";
"bar-chart": "bar-chart";
}>;
content: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
headers: z.ZodArray<z.ZodString>;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
id: z.ZodString;
title: z.ZodString;
description: z.ZodOptional<z.ZodString>;
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>, z.ZodObject<{
before: z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>;
after: z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
data: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
max: z.ZodOptional<z.ZodNumber>;
status: z.ZodOptional<z.ZodEnum<{
error: "error";
warning: "warning";
ok: "ok";
}>>;
}, z.core.$strip>>;
unit: z.ZodOptional<z.ZodString>;
orientation: z.ZodOptional<z.ZodEnum<{
horizontal: "horizontal";
vertical: "vertical";
}>>;
}, z.core.$strip>]>;
}, z.core.$strip>;
export type Visualization = z.infer<typeof VisualizationSchema>;
/**
* Visualization endpoint response data
* PRD #320: Added toolsUsed for test validation
*/
export declare const VisualizationResponseDataSchema: z.ZodObject<{
title: z.ZodString;
visualizations: z.ZodArray<z.ZodObject<{
id: z.ZodString;
label: z.ZodString;
type: z.ZodEnum<{
code: "code";
mermaid: "mermaid";
cards: "cards";
table: "table";
diff: "diff";
"bar-chart": "bar-chart";
}>;
content: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
headers: z.ZodArray<z.ZodString>;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
id: z.ZodString;
title: z.ZodString;
description: z.ZodOptional<z.ZodString>;
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>, z.ZodObject<{
before: z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>;
after: z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
data: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
max: z.ZodOptional<z.ZodNumber>;
status: z.ZodOptional<z.ZodEnum<{
error: "error";
warning: "warning";
ok: "ok";
}>>;
}, z.core.$strip>>;
unit: z.ZodOptional<z.ZodString>;
orientation: z.ZodOptional<z.ZodEnum<{
horizontal: "horizontal";
vertical: "vertical";
}>>;
}, z.core.$strip>]>;
}, z.core.$strip>>;
insights: z.ZodArray<z.ZodString>;
toolsUsed: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
export type VisualizationResponseData = z.infer<typeof VisualizationResponseDataSchema>;
/**
* Full visualization endpoint response
*/
export declare const VisualizationResponseSchema: z.ZodObject<{
success: z.ZodLiteral<true>;
data: z.ZodObject<{
title: z.ZodString;
visualizations: z.ZodArray<z.ZodObject<{
id: z.ZodString;
label: z.ZodString;
type: z.ZodEnum<{
code: "code";
mermaid: "mermaid";
cards: "cards";
table: "table";
diff: "diff";
"bar-chart": "bar-chart";
}>;
content: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
headers: z.ZodArray<z.ZodString>;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
id: z.ZodString;
title: z.ZodString;
description: z.ZodOptional<z.ZodString>;
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>, z.ZodObject<{
before: z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>;
after: z.ZodObject<{
language: z.ZodString;
code: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
data: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
max: z.ZodOptional<z.ZodNumber>;
status: z.ZodOptional<z.ZodEnum<{
error: "error";
warning: "warning";
ok: "ok";
}>>;
}, z.core.$strip>>;
unit: z.ZodOptional<z.ZodString>;
orientation: z.ZodOptional<z.ZodEnum<{
horizontal: "horizontal";
vertical: "vertical";
}>>;
}, z.core.$strip>]>;
}, z.core.$strip>>;
insights: z.ZodArray<z.ZodString>;
toolsUsed: z.ZodOptional<z.ZodArray<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 VisualizationResponse = z.infer<typeof VisualizationResponseSchema>;
/**
* Visualization endpoint error responses
*/
export declare const VisualizationNotFoundErrorSchema: 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 VisualizationServiceUnavailableErrorSchema: 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<"AI_NOT_CONFIGURED">;
message: z.ZodString;
details: z.ZodOptional<z.ZodAny>;
}, z.core.$strip>;
}, z.core.$strip>;
export declare const VisualizationInternalErrorSchema: 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<"VISUALIZATION_ERROR">;
message: z.ZodString;
details: z.ZodOptional<z.ZodAny>;
}, z.core.$strip>;
}, z.core.$strip>;
//# sourceMappingURL=visualization.d.ts.map