UNPKG

@tmlmobilidade/types

Version:

This package provides shared Zod validation schemas and their corresponding TypeScript types for use across projects. All types are automatically inferred from the schemas to ensure full type safety and reduce maintenance overhead.

53 lines (52 loc) 2.08 kB
import { z } from 'zod'; export declare const OrganizationSchema: z.ZodObject<{ _id: z.ZodString; created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>; updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>; } & { code: z.ZodString; name: z.ZodString; }, "strict", z.ZodTypeAny, { _id: string; code: string; name: string; created_at?: (number & { __brand: "UnixTimestamp"; } & z.BRAND<"UnixTimestamp">) | null | undefined; updated_at?: (number & { __brand: "UnixTimestamp"; } & z.BRAND<"UnixTimestamp">) | null | undefined; }, { _id: string; code: string; name: string; created_at?: number | null | undefined; updated_at?: number | null | undefined; }>; export declare const CreateOrganizationSchema: z.ZodObject<Omit<{ _id: z.ZodString; created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>; updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>; } & { code: z.ZodString; name: z.ZodString; }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, { code: string; name: string; }, { code: string; name: string; }>; export declare const UpdateOrganizationSchema: z.ZodObject<{ code: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { code?: string | undefined; name?: string | undefined; }, { code?: string | undefined; name?: string | undefined; }>; export type Organization = z.infer<typeof OrganizationSchema>; export type CreateOrganizationDto = z.infer<typeof CreateOrganizationSchema>; export type UpdateOrganizationDto = Partial<CreateOrganizationDto>;