UNPKG

@tmlmobilidade/types

Version:
134 lines (133 loc) 4.23 kB
import { type GeoJSON } from 'geojson'; import { z } from 'zod'; export declare const ZoneSchema: z.ZodObject<{ _id: z.ZodString; created_by: z.ZodOptional<z.ZodString>; updated_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>; updated_by: z.ZodOptional<z.ZodString>; } & { border_color: z.ZodString; border_opacity: z.ZodNumber; border_width: z.ZodNumber; code: z.ZodString; created_at: z.ZodDate; fill_color: z.ZodString; fill_opacity: z.ZodNumber; geojson: z.ZodRecord<z.ZodString, z.ZodAny>; is_locked: z.ZodBoolean; name: z.ZodString; }, "strip", z.ZodTypeAny, { _id: string; created_at: Date; is_locked: boolean; updated_at: number & { __brand: "UnixTimestamp"; }; code: string; name: string; geojson: Record<string, any>; border_color: string; border_opacity: number; border_width: number; fill_color: string; fill_opacity: number; created_by?: string | undefined; updated_by?: string | undefined; }, { _id: string; created_at: Date; is_locked: boolean; updated_at: number; code: string; name: string; geojson: Record<string, any>; border_color: string; border_opacity: number; border_width: number; fill_color: string; fill_opacity: number; created_by?: string | undefined; updated_by?: string | undefined; }>; export declare const CreateZoneSchema: z.ZodObject<Omit<{ _id: z.ZodString; created_by: z.ZodOptional<z.ZodString>; updated_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>; updated_by: z.ZodOptional<z.ZodString>; } & { border_color: z.ZodString; border_opacity: z.ZodNumber; border_width: z.ZodNumber; code: z.ZodString; created_at: z.ZodDate; fill_color: z.ZodString; fill_opacity: z.ZodNumber; geojson: z.ZodRecord<z.ZodString, z.ZodAny>; is_locked: z.ZodBoolean; name: z.ZodString; }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, { is_locked: boolean; code: string; name: string; geojson: Record<string, any>; border_color: string; border_opacity: number; border_width: number; fill_color: string; fill_opacity: number; created_by?: string | undefined; updated_by?: string | undefined; }, { is_locked: boolean; code: string; name: string; geojson: Record<string, any>; border_color: string; border_opacity: number; border_width: number; fill_color: string; fill_opacity: number; created_by?: string | undefined; updated_by?: string | undefined; }>; export declare const UpdateZoneSchema: z.ZodObject<{ is_locked: z.ZodOptional<z.ZodBoolean>; updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>; code: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; geojson: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>; border_color: z.ZodOptional<z.ZodString>; border_opacity: z.ZodOptional<z.ZodNumber>; border_width: z.ZodOptional<z.ZodNumber>; fill_color: z.ZodOptional<z.ZodString>; fill_opacity: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { is_locked?: boolean | undefined; updated_by?: string | undefined; code?: string | undefined; name?: string | undefined; geojson?: Record<string, any> | undefined; border_color?: string | undefined; border_opacity?: number | undefined; border_width?: number | undefined; fill_color?: string | undefined; fill_opacity?: number | undefined; }, { is_locked?: boolean | undefined; updated_by?: string | undefined; code?: string | undefined; name?: string | undefined; geojson?: Record<string, any> | undefined; border_color?: string | undefined; border_opacity?: number | undefined; border_width?: number | undefined; fill_color?: string | undefined; fill_opacity?: number | undefined; }>; export type Zone = Omit<z.infer<typeof ZoneSchema>, 'geojson'> & { geojson: GeoJSON; }; export type CreateZoneDto = Omit<z.infer<typeof CreateZoneSchema>, 'geojson'> & { geojson: GeoJSON; }; export type UpdateZoneDto = Partial<CreateZoneDto>;