UNPKG

@battle-racing/br-common-lib

Version:

Common library for all Battle Racing Repositorios

23 lines (22 loc) 801 B
import { z } from 'zod'; export declare const errorResponseSchema: z.ZodObject<{ status: z.ZodLiteral<"error">; code: z.ZodNumber; errorType: z.ZodString; message: z.ZodString; }, z.core.$strip>; export declare const successResponseSchema: <T extends z.ZodTypeAny>(itemSchema: T) => z.ZodObject<{ status: z.ZodLiteral<"success">; code: z.ZodLiteral<200>; data: z.ZodOptional<T>; }, z.core.$strip>; export declare const responseSchema: <T extends z.ZodTypeAny>(itemSchema: T) => z.ZodUnion<readonly [z.ZodObject<{ status: z.ZodLiteral<"success">; code: z.ZodLiteral<200>; data: z.ZodOptional<T>; }, z.core.$strip>, z.ZodObject<{ status: z.ZodLiteral<"error">; code: z.ZodNumber; errorType: z.ZodString; message: z.ZodString; }, z.core.$strip>]>;