UNPKG

@tmlmobilidade/types

Version:
166 lines (165 loc) • 5.24 kB
import { z } from 'zod'; import { RoutePathType } from './route-path-type.js'; export declare const pathTypeOptions: { label: string; value: RoutePathType; }[]; export declare const RouteSchema: z.ZodObject<{ _id: z.ZodString; created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>; created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>; is_locked: z.ZodDefault<z.ZodBoolean>; updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>; updated_by: z.ZodOptional<z.ZodString>; } & { code: z.ZodString; line_id: z.ZodString; name: z.ZodString; path_type: z.ZodDefault<z.ZodEnum<["base", "partial", "variant"]>>; patterns: z.ZodOptional<z.ZodArray<z.ZodObject<{ _id: z.ZodString; code: z.ZodString; headsign: z.ZodString; line_id: z.ZodString; route_id: z.ZodString; }, "strip", z.ZodTypeAny, { _id: string; code: string; headsign: string; line_id: string; route_id: string; }, { _id: string; code: string; headsign: string; line_id: string; route_id: string; }>, "many">>; }, "strip", z.ZodTypeAny, { _id: string; created_at: number & { __brand: "UnixTimestamp"; }; created_by: string | null; is_locked: boolean; updated_at: number & { __brand: "UnixTimestamp"; }; code: string; name: string; line_id: string; path_type: "partial" | "base" | "variant"; updated_by?: string | undefined; patterns?: { _id: string; code: string; headsign: string; line_id: string; route_id: string; }[] | undefined; }, { _id: string; created_at: number; updated_at: number; code: string; name: string; line_id: string; created_by?: string | null | undefined; is_locked?: boolean | undefined; updated_by?: string | undefined; path_type?: "partial" | "base" | "variant" | undefined; patterns?: { _id: string; code: string; headsign: string; line_id: string; route_id: string; }[] | undefined; }>; export declare const RouteSimplifiedSchema: z.ZodObject<{ _id: z.ZodString; code: z.ZodString; name: z.ZodString; }, "strip", z.ZodTypeAny, { _id: string; code: string; name: string; }, { _id: string; code: string; name: string; }>; export declare const CreateRouteSchema: z.ZodObject<Omit<{ _id: z.ZodString; created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>; created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>; is_locked: z.ZodDefault<z.ZodBoolean>; updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>; updated_by: z.ZodOptional<z.ZodString>; } & { code: z.ZodString; line_id: z.ZodString; name: z.ZodString; path_type: z.ZodDefault<z.ZodEnum<["base", "partial", "variant"]>>; patterns: z.ZodOptional<z.ZodArray<z.ZodObject<{ _id: z.ZodString; code: z.ZodString; headsign: z.ZodString; line_id: z.ZodString; route_id: z.ZodString; }, "strip", z.ZodTypeAny, { _id: string; code: string; headsign: string; line_id: string; route_id: string; }, { _id: string; code: string; headsign: string; line_id: string; route_id: string; }>, "many">>; }, "_id" | "created_at" | "updated_at" | "patterns">, "strip", z.ZodTypeAny, { created_by: string | null; is_locked: boolean; code: string; name: string; line_id: string; path_type: "partial" | "base" | "variant"; updated_by?: string | undefined; }, { code: string; name: string; line_id: string; created_by?: string | null | undefined; is_locked?: boolean | undefined; updated_by?: string | undefined; path_type?: "partial" | "base" | "variant" | undefined; }>; export declare const UpdateRouteSchema: z.ZodObject<{ is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>; code: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; line_id: z.ZodOptional<z.ZodString>; path_type: z.ZodOptional<z.ZodDefault<z.ZodEnum<["base", "partial", "variant"]>>>; }, "strip", z.ZodTypeAny, { is_locked?: boolean | undefined; updated_by?: string | undefined; code?: string | undefined; name?: string | undefined; line_id?: string | undefined; path_type?: "partial" | "base" | "variant" | undefined; }, { is_locked?: boolean | undefined; updated_by?: string | undefined; code?: string | undefined; name?: string | undefined; line_id?: string | undefined; path_type?: "partial" | "base" | "variant" | undefined; }>; export type Route = z.infer<typeof RouteSchema>; export type CreateRouteDto = z.infer<typeof CreateRouteSchema>; export type UpdateRouteDto = z.infer<typeof UpdateRouteSchema>; export type RouteSimplified = z.infer<typeof RouteSimplifiedSchema>;