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.

74 lines (73 loc) 3.36 kB
import { z } from 'zod'; import { OperationalDate } from './_common/operational-date.js'; export declare const GtfsFeedInfoSchema: z.ZodObject<{ default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>; feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>; feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>; feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, OperationalDate, string>, "OperationalDate">>>; feed_lang: z.ZodString; feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>; feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>; feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, OperationalDate, string>, "OperationalDate">>>; feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { feed_lang: string; default_lang?: string | null | undefined; feed_contact_email?: string | null | undefined; feed_contact_url?: string | null | undefined; feed_end_date?: (string & { __brand: "OperationalDate"; } & z.BRAND<"OperationalDate">) | null | undefined; feed_publisher_name?: string | null | undefined; feed_publisher_url?: string | null | undefined; feed_start_date?: (string & { __brand: "OperationalDate"; } & z.BRAND<"OperationalDate">) | null | undefined; feed_version?: string | null | undefined; }, { feed_lang: string; default_lang?: string | null | undefined; feed_contact_email?: string | null | undefined; feed_contact_url?: string | null | undefined; feed_end_date?: string | null | undefined; feed_publisher_name?: string | null | undefined; feed_publisher_url?: string | null | undefined; feed_start_date?: string | null | undefined; feed_version?: string | null | undefined; }>; export declare const GtfsAgencySchema: z.ZodObject<{ agency_email: z.ZodOptional<z.ZodNullable<z.ZodString>>; agency_fare_url: z.ZodOptional<z.ZodNullable<z.ZodString>>; agency_id: z.ZodString; agency_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>; agency_name: z.ZodString; agency_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>; agency_timezone: z.ZodString; agency_url: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { agency_id: string; agency_name: string; agency_timezone: string; agency_email?: string | null | undefined; agency_fare_url?: string | null | undefined; agency_lang?: string | null | undefined; agency_phone?: string | null | undefined; agency_url?: string | null | undefined; }, { agency_id: string; agency_name: string; agency_timezone: string; agency_email?: string | null | undefined; agency_fare_url?: string | null | undefined; agency_lang?: string | null | undefined; agency_phone?: string | null | undefined; agency_url?: string | null | undefined; }>; export type GtfsFeedInfo = Omit<z.infer<typeof GtfsFeedInfoSchema>, 'feed_end_date' | 'feed_start_date'> & { feed_end_date?: null | OperationalDate; feed_start_date?: null | OperationalDate; }; export type GtfsAgency = Omit<z.infer<typeof GtfsAgencySchema>, 'feed_end_date' | 'feed_start_date'> & { feed_end_date?: null | OperationalDate; feed_start_date?: null | OperationalDate; };