@tmlmobilidade/types
Version:
623 lines (622 loc) • 26.3 kB
TypeScript
import { z } from 'zod';
export declare const GtfsValidationSchema: 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>>;
is_locked: z.ZodDefault<z.ZodBoolean>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
} & {
file_id: z.ZodString;
gtfs_agency: 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;
}>;
gtfs_feed_info: 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.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>>>;
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.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>>>;
feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
feed_lang: string;
feed_end_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
feed_start_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
}, {
feed_lang: string;
feed_end_date?: string | null | undefined;
feed_start_date?: string | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
}>;
notification_sent: z.ZodDefault<z.ZodBoolean>;
processing_status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>;
summary: z.ZodOptional<z.ZodNullable<z.ZodObject<{
messages: z.ZodArray<z.ZodObject<{
field: z.ZodString;
file_name: z.ZodString;
message: z.ZodString;
rows: z.ZodArray<z.ZodNumber, "many">;
rule_id: z.ZodString;
severity: z.ZodEnum<["error", "warning", "ignore", "forbidden"]>;
}, "strip", z.ZodTypeAny, {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}, {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}>, "many">;
total_errors: z.ZodNumber;
total_warnings: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
}, {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
}>>>;
validation_attempts: z.ZodDefault<z.ZodNumber>;
validity_status: z.ZodDefault<z.ZodEnum<["valid", "invalid", "unknown"]>>;
}, "strip", z.ZodTypeAny, {
_id: string;
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
is_locked: boolean;
updated_at: number & {
__brand: "UnixTimestamp";
};
file_id: string;
processing_status: "error" | "waiting" | "processing" | "complete" | "skipped";
gtfs_agency: {
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;
};
gtfs_feed_info: {
feed_lang: string;
feed_end_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
feed_start_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
};
notification_sent: boolean;
validation_attempts: number;
validity_status: "valid" | "unknown" | "invalid";
updated_by?: string | undefined;
summary?: {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
} | null | undefined;
}, {
_id: string;
created_at: number;
updated_at: number;
file_id: string;
gtfs_agency: {
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;
};
gtfs_feed_info: {
feed_lang: string;
feed_end_date?: string | null | undefined;
feed_start_date?: string | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
};
created_by?: string | null | undefined;
is_locked?: boolean | undefined;
updated_by?: string | undefined;
processing_status?: "error" | "waiting" | "processing" | "complete" | "skipped" | undefined;
notification_sent?: boolean | undefined;
summary?: {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
} | null | undefined;
validation_attempts?: number | undefined;
validity_status?: "valid" | "unknown" | "invalid" | undefined;
}>;
export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
_id: z.ZodString;
created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
is_locked: z.ZodDefault<z.ZodBoolean>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
} & {
file_id: z.ZodString;
gtfs_agency: 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;
}>;
gtfs_feed_info: 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.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>>>;
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.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>>>;
feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
feed_lang: string;
feed_end_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
feed_start_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
}, {
feed_lang: string;
feed_end_date?: string | null | undefined;
feed_start_date?: string | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
}>;
notification_sent: z.ZodDefault<z.ZodBoolean>;
processing_status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>;
summary: z.ZodOptional<z.ZodNullable<z.ZodObject<{
messages: z.ZodArray<z.ZodObject<{
field: z.ZodString;
file_name: z.ZodString;
message: z.ZodString;
rows: z.ZodArray<z.ZodNumber, "many">;
rule_id: z.ZodString;
severity: z.ZodEnum<["error", "warning", "ignore", "forbidden"]>;
}, "strip", z.ZodTypeAny, {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}, {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}>, "many">;
total_errors: z.ZodNumber;
total_warnings: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
}, {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
}>>>;
validation_attempts: z.ZodDefault<z.ZodNumber>;
validity_status: z.ZodDefault<z.ZodEnum<["valid", "invalid", "unknown"]>>;
}, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
created_by: string | null;
is_locked: boolean;
file_id: string;
processing_status: "error" | "waiting" | "processing" | "complete" | "skipped";
gtfs_agency: {
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;
};
gtfs_feed_info: {
feed_lang: string;
feed_end_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
feed_start_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
};
notification_sent: boolean;
validation_attempts: number;
validity_status: "valid" | "unknown" | "invalid";
updated_by?: string | undefined;
summary?: {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
} | null | undefined;
}, {
file_id: string;
gtfs_agency: {
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;
};
gtfs_feed_info: {
feed_lang: string;
feed_end_date?: string | null | undefined;
feed_start_date?: string | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
};
created_by?: string | null | undefined;
is_locked?: boolean | undefined;
updated_by?: string | undefined;
processing_status?: "error" | "waiting" | "processing" | "complete" | "skipped" | undefined;
notification_sent?: boolean | undefined;
summary?: {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
} | null | undefined;
validation_attempts?: number | undefined;
validity_status?: "valid" | "unknown" | "invalid" | undefined;
}>;
export declare const UpdateGtfsValidationSchema: z.ZodObject<{
is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
file_id: z.ZodOptional<z.ZodString>;
processing_status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>>;
gtfs_agency: z.ZodOptional<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;
}>>;
gtfs_feed_info: z.ZodOptional<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.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>>>;
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.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>>>;
feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
feed_lang: string;
feed_end_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
feed_start_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
}, {
feed_lang: string;
feed_end_date?: string | null | undefined;
feed_start_date?: string | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
}>>;
notification_sent: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
summary: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
messages: z.ZodArray<z.ZodObject<{
field: z.ZodString;
file_name: z.ZodString;
message: z.ZodString;
rows: z.ZodArray<z.ZodNumber, "many">;
rule_id: z.ZodString;
severity: z.ZodEnum<["error", "warning", "ignore", "forbidden"]>;
}, "strip", z.ZodTypeAny, {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}, {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}>, "many">;
total_errors: z.ZodNumber;
total_warnings: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
}, {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
}>>>>;
validation_attempts: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
validity_status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["valid", "invalid", "unknown"]>>>;
}, "strip", z.ZodTypeAny, {
is_locked?: boolean | undefined;
updated_by?: string | undefined;
file_id?: string | undefined;
processing_status?: "error" | "waiting" | "processing" | "complete" | "skipped" | undefined;
gtfs_agency?: {
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;
} | undefined;
gtfs_feed_info?: {
feed_lang: string;
feed_end_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
feed_start_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
} | undefined;
notification_sent?: boolean | undefined;
summary?: {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
} | null | undefined;
validation_attempts?: number | undefined;
validity_status?: "valid" | "unknown" | "invalid" | undefined;
}, {
is_locked?: boolean | undefined;
updated_by?: string | undefined;
file_id?: string | undefined;
processing_status?: "error" | "waiting" | "processing" | "complete" | "skipped" | undefined;
gtfs_agency?: {
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;
} | undefined;
gtfs_feed_info?: {
feed_lang: string;
feed_end_date?: string | null | undefined;
feed_start_date?: string | null | undefined;
default_lang?: string | null | undefined;
feed_contact_email?: string | null | undefined;
feed_contact_url?: string | null | undefined;
feed_publisher_name?: string | null | undefined;
feed_publisher_url?: string | null | undefined;
feed_version?: string | null | undefined;
} | undefined;
notification_sent?: boolean | undefined;
summary?: {
messages: {
message: string;
file_name: string;
field: string;
rows: number[];
rule_id: string;
severity: "error" | "warning" | "ignore" | "forbidden";
}[];
total_errors: number;
total_warnings: number;
} | null | undefined;
validation_attempts?: number | undefined;
validity_status?: "valid" | "unknown" | "invalid" | undefined;
}>;
export type GtfsValidation = z.infer<typeof GtfsValidationSchema>;
export type CreateGtfsValidationDto = z.infer<typeof CreateGtfsValidationSchema>;
export type UpdateGtfsValidationDto = z.infer<typeof UpdateGtfsValidationSchema>;