import { z } from 'zod'; export const xtextWebRequest = z.object({ id: z.string().min(1), request: z.unknown(), }); export type XtextWebRequest = z.infer; export const xtextWebOkResponse = z.object({ id: z.string().min(1), response: z.unknown(), }); export type XtextWebOkResponse = z.infer; export const xtextWebErrorKind = z.enum(['request', 'server']); export type XtextWebErrorKind = z.infer; export const xtextWebErrorResponse = z.object({ id: z.string().min(1), error: xtextWebErrorKind, message: z.string(), }); export type XtextWebErrorResponse = z.infer; export const xtextWebPushService = z.enum(['highlight', 'validate']); export type XtextWebPushService = z.infer; export const xtextWebPushMessage = z.object({ resource: z.string().min(1), stateId: z.string().min(1), service: xtextWebPushService, push: z.unknown(), }); export type XtextWebPushMessage = z.infer;