UNPKG

@tmlmobilidade/types

Version:
575 lines (574 loc) • 19.7 kB
import { z } from 'zod'; export declare const ZoneSchema: 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>>; updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>; updated_by: z.ZodOptional<z.ZodString>; } & { agency_ids: z.ZodArray<z.ZodString, "many">; code: z.ZodString; geojson: z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodObject<{ geometry: z.ZodUnion<[z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">; type: z.ZodLiteral<"Polygon">; }, "strip", z.ZodTypeAny, { type: "Polygon"; coordinates: number[][][]; }, { type: "Polygon"; coordinates: number[][][]; }>, z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">; type: z.ZodLiteral<"MultiPolygon">; }, "strip", z.ZodTypeAny, { type: "MultiPolygon"; coordinates: number[][][][]; }, { type: "MultiPolygon"; coordinates: number[][][][]; }>]>; properties: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>; type: z.ZodLiteral<"Feature">; }, "strip", z.ZodTypeAny, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }>, z.ZodObject<{ features: z.ZodArray<z.ZodObject<{ geometry: z.ZodUnion<[z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">; type: z.ZodLiteral<"Polygon">; }, "strip", z.ZodTypeAny, { type: "Polygon"; coordinates: number[][][]; }, { type: "Polygon"; coordinates: number[][][]; }>, z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">; type: z.ZodLiteral<"MultiPolygon">; }, "strip", z.ZodTypeAny, { type: "MultiPolygon"; coordinates: number[][][][]; }, { type: "MultiPolygon"; coordinates: number[][][][]; }>]>; properties: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>; type: z.ZodLiteral<"Feature">; }, "strip", z.ZodTypeAny, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }>, "many">; type: z.ZodLiteral<"FeatureCollection">; }, "strip", z.ZodTypeAny, { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; }, { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; }>]>>>; is_locked: z.ZodDefault<z.ZodBoolean>; name: z.ZodString; }, "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; agency_ids: string[]; geojson: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; } | { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; } | null; updated_by?: string | undefined; }, { _id: string; created_at: number; updated_at: number; code: string; name: string; agency_ids: string[]; created_by?: string | null | undefined; is_locked?: boolean | undefined; updated_by?: string | undefined; geojson?: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; } | { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; } | null | undefined; }>; export declare const CreateZoneSchema: z.ZodObject<{ agency_ids: z.ZodArray<z.ZodString, "many">; code: z.ZodString; name: z.ZodString; } & { _id: z.ZodOptional<z.ZodString>; created_by: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>; is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>; geojson: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodObject<{ geometry: z.ZodUnion<[z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">; type: z.ZodLiteral<"Polygon">; }, "strip", z.ZodTypeAny, { type: "Polygon"; coordinates: number[][][]; }, { type: "Polygon"; coordinates: number[][][]; }>, z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">; type: z.ZodLiteral<"MultiPolygon">; }, "strip", z.ZodTypeAny, { type: "MultiPolygon"; coordinates: number[][][][]; }, { type: "MultiPolygon"; coordinates: number[][][][]; }>]>; properties: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>; type: z.ZodLiteral<"Feature">; }, "strip", z.ZodTypeAny, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }>, z.ZodObject<{ features: z.ZodArray<z.ZodObject<{ geometry: z.ZodUnion<[z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">; type: z.ZodLiteral<"Polygon">; }, "strip", z.ZodTypeAny, { type: "Polygon"; coordinates: number[][][]; }, { type: "Polygon"; coordinates: number[][][]; }>, z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">; type: z.ZodLiteral<"MultiPolygon">; }, "strip", z.ZodTypeAny, { type: "MultiPolygon"; coordinates: number[][][][]; }, { type: "MultiPolygon"; coordinates: number[][][][]; }>]>; properties: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>; type: z.ZodLiteral<"Feature">; }, "strip", z.ZodTypeAny, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }>, "many">; type: z.ZodLiteral<"FeatureCollection">; }, "strip", z.ZodTypeAny, { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; }, { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; }>]>>>>; }, "strip", z.ZodTypeAny, { code: string; name: string; agency_ids: string[]; _id?: string | undefined; created_by?: string | null | undefined; is_locked?: boolean | undefined; updated_by?: string | undefined; geojson?: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; } | { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; } | null | undefined; }, { code: string; name: string; agency_ids: string[]; _id?: string | undefined; created_by?: string | null | undefined; is_locked?: boolean | undefined; updated_by?: string | undefined; geojson?: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; } | { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; } | null | undefined; }>; export declare const UpdateZoneSchema: z.ZodObject<{ _id: z.ZodOptional<z.ZodOptional<z.ZodString>>; is_locked: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>; updated_by: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodString>>>; code: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; agency_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; geojson: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodObject<{ geometry: z.ZodUnion<[z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">; type: z.ZodLiteral<"Polygon">; }, "strip", z.ZodTypeAny, { type: "Polygon"; coordinates: number[][][]; }, { type: "Polygon"; coordinates: number[][][]; }>, z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">; type: z.ZodLiteral<"MultiPolygon">; }, "strip", z.ZodTypeAny, { type: "MultiPolygon"; coordinates: number[][][][]; }, { type: "MultiPolygon"; coordinates: number[][][][]; }>]>; properties: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>; type: z.ZodLiteral<"Feature">; }, "strip", z.ZodTypeAny, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }>, z.ZodObject<{ features: z.ZodArray<z.ZodObject<{ geometry: z.ZodUnion<[z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">; type: z.ZodLiteral<"Polygon">; }, "strip", z.ZodTypeAny, { type: "Polygon"; coordinates: number[][][]; }, { type: "Polygon"; coordinates: number[][][]; }>, z.ZodObject<{ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">, "many">; type: z.ZodLiteral<"MultiPolygon">; }, "strip", z.ZodTypeAny, { type: "MultiPolygon"; coordinates: number[][][][]; }, { type: "MultiPolygon"; coordinates: number[][][][]; }>]>; properties: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>; type: z.ZodLiteral<"Feature">; }, "strip", z.ZodTypeAny, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }, { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }>, "many">; type: z.ZodLiteral<"FeatureCollection">; }, "strip", z.ZodTypeAny, { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; }, { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; }>]>>>>>; }, "strip", z.ZodTypeAny, { _id?: string | undefined; is_locked?: boolean | undefined; updated_by?: string | undefined; code?: string | undefined; name?: string | undefined; agency_ids?: string[] | undefined; geojson?: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; } | { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; } | null | undefined; }, { _id?: string | undefined; is_locked?: boolean | undefined; updated_by?: string | undefined; code?: string | undefined; name?: string | undefined; agency_ids?: string[] | undefined; geojson?: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; } | { type: "FeatureCollection"; features: { type: "Feature"; geometry: { type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }; properties?: Record<string, any> | null | undefined; }[]; } | null | undefined; }>; export type Zone = z.infer<typeof ZoneSchema>; export type CreateZoneDto = z.infer<typeof CreateZoneSchema>; export type UpdateZoneDto = z.infer<typeof UpdateZoneSchema>;