UNPKG

@tmlmobilidade/types

Version:
105 lines (104 loc) 4.62 kB
import { z } from 'zod'; export declare const FileExportTypes: readonly ["ride"]; export declare const FileExportTypeSchema: z.ZodEnum<["ride"]>; export type FileExportType = z.infer<typeof FileExportTypeSchema>; export declare const FileExportBaseSchema: z.ZodObject<Omit<{ _id: z.ZodString; created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>; created_by: z.ZodOptional<z.ZodString>; is_locked: z.ZodDefault<z.ZodBoolean>; updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>; updated_by: z.ZodOptional<z.ZodString>; }, "is_locked"> & { file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>; file_name: z.ZodString; processing_status: z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>; properties: z.ZodRecord<z.ZodString, z.ZodAny>; type: z.ZodEnum<["ride"]>; }, "strip", z.ZodTypeAny, { _id: string; created_at: number & { __brand: "UnixTimestamp"; }; updated_at: number & { __brand: "UnixTimestamp"; }; type: "ride"; file_name: string; processing_status: "waiting" | "processing" | "complete" | "error" | "skipped"; properties: Record<string, any>; created_by?: string | undefined; updated_by?: string | undefined; file_id?: string | null | undefined; }, { _id: string; created_at: number; updated_at: number; type: "ride"; file_name: string; processing_status: "waiting" | "processing" | "complete" | "error" | "skipped"; properties: Record<string, any>; created_by?: string | undefined; updated_by?: string | undefined; file_id?: string | null | undefined; }>; export declare const CreateFileExportSchema: z.ZodObject<{ created_by: z.ZodOptional<z.ZodOptional<z.ZodString>>; updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>; type: z.ZodOptional<z.ZodEnum<["ride"]>>; file_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>; file_name: z.ZodOptional<z.ZodString>; processing_status: z.ZodOptional<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>; properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>; }, "strip", z.ZodTypeAny, { created_by?: string | undefined; updated_by?: string | undefined; type?: "ride" | undefined; file_id?: string | null | undefined; file_name?: string | undefined; processing_status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined; properties?: Record<string, any> | undefined; }, { created_by?: string | undefined; updated_by?: string | undefined; type?: "ride" | undefined; file_id?: string | null | undefined; file_name?: string | undefined; processing_status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined; properties?: Record<string, any> | undefined; }>; export declare const UpdateFileExportSchema: z.ZodObject<{ created_by: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodString>>>; updated_by: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodString>>>; type: z.ZodOptional<z.ZodOptional<z.ZodEnum<["ride"]>>>; file_id: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>>; file_name: z.ZodOptional<z.ZodOptional<z.ZodString>>; processing_status: z.ZodOptional<z.ZodOptional<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>>; properties: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>; }, "strip", z.ZodTypeAny, { created_by?: string | undefined; updated_by?: string | undefined; type?: "ride" | undefined; file_id?: string | null | undefined; file_name?: string | undefined; processing_status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined; properties?: Record<string, any> | undefined; }, { created_by?: string | undefined; updated_by?: string | undefined; type?: "ride" | undefined; file_id?: string | null | undefined; file_name?: string | undefined; processing_status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined; properties?: Record<string, any> | undefined; }>; export type UpdateFileExport = z.infer<typeof UpdateFileExportSchema>; export type CreateFileExportDto<T extends { properties: Record<string, unknown>; type: string; }> = Omit<z.infer<typeof FileExportBaseSchema>, '_id' | 'created_at' | 'file_id' | 'processing_status' | 'updated_at'> & { file_id: null; processing_status?: 'waiting'; properties: T['properties']; type: T['type']; };