index.ts•1.34 kB
import { z } from 'zod';
// Main schema exports
export * from './dap-tools.schemas';
export * from './session.schemas';
export * from './adapter.schemas';
// .NET MVC Microservice Debugging Schemas exports
export * from './netmvc-tools.schemas';
// Common utility schemas
export const ErrorResponseSchema = z.object({
success: z.literal(false),
error: z.string(),
code: z.string(),
details: z.any().optional(),
});
export const SuccessResponseSchema = z.object({
success: z.literal(true),
data: z.any().optional(),
});
export const MetricsSchema = z.object({
timestamp: z.number(),
metric: z.string(),
value: z.number(),
tags: z.record(z.string()).optional(),
});
export const LogEntrySchema = z.object({
timestamp: z.number(),
level: z.enum(['debug', 'info', 'warn', 'error', 'fatal']),
message: z.string(),
data: z.any().optional(),
sessionId: z.string().optional(),
});
export const ValidationErrorSchema = z.object({
field: z.string(),
message: z.string(),
code: z.string(),
});
export type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
export type SuccessResponse = z.infer<typeof SuccessResponseSchema>;
export type Metrics = z.infer<typeof MetricsSchema>;
export type LogEntry = z.infer<typeof LogEntrySchema>;
export type ValidationError = z.infer<typeof ValidationErrorSchema>;