@tmlmobilidade/types
Version:
272 lines (271 loc) • 16.8 kB
TypeScript
import { z } from 'zod';
export declare const AlertSchema: 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>;
} & {
active_period_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>;
active_period_start_date: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
agency_id: z.ZodString;
auto_texts: z.ZodDefault<z.ZodBoolean>;
cause: z.ZodEnum<["ACCIDENT", "CONSTRUCTION", "DEMONSTRATION", "MEDICAL_EMERGENCY", "POLICE_ACTIVITY", "STRIKE", "TECHNICAL_ISSUE", "WEATHER", "ABUSIVE_PARKING", "DRIVER_ABSENCE", "DRIVER_ISSUE", "HIGH_PASSENGER_LOAD", "NETWORK_UPDATE", "ROAD_ISSUE", "TRAFFIC_JAM", "PUBLIC_DISORDER", "VEHICLE_ISSUE"]>;
coordinates: z.ZodDefault<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
description: z.ZodString;
effect: z.ZodEnum<["ACCESSIBILITY_ISSUE", "ADDITIONAL_SERVICE", "DETOUR", "MODIFIED_SERVICE", "NO_SERVICE", "REDUCED_SERVICE", "SIGNIFICANT_DELAYS", "STOP_MOVED", "REALTIME_INFO_ISSUE", "ON_BOARD_SALE_ISSUE"]>;
external_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
file_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
info_url: z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>>;
municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
publish_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>;
publish_start_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>;
publish_status: z.ZodDefault<z.ZodEnum<["published", "archived", "draft"]>>;
reference_type: z.ZodEnum<["agency", "lines", "stops", "rides"]>;
references: z.ZodDefault<z.ZodArray<z.ZodObject<{
child_ids: z.ZodArray<z.ZodString, "many">;
parent_id: z.ZodString;
}, "strip", z.ZodTypeAny, {
child_ids: string[];
parent_id: string;
}, {
child_ids: string[];
parent_id: string;
}>, "many">>;
title: z.ZodString;
user_instructions: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
_id: string;
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
is_locked: boolean;
updated_at: number & {
__brand: "UnixTimestamp";
};
description: string;
active_period_end_date: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null;
active_period_start_date: number & {
__brand: "UnixTimestamp";
};
agency_id: string;
auto_texts: boolean;
cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_ISSUE" | "WEATHER" | "ABUSIVE_PARKING" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "NETWORK_UPDATE" | "ROAD_ISSUE" | "TRAFFIC_JAM" | "PUBLIC_DISORDER" | "VEHICLE_ISSUE";
coordinates: [number, number] | null;
effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_SERVICE" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "REALTIME_INFO_ISSUE" | "ON_BOARD_SALE_ISSUE";
external_id: string | null;
file_id: string | null;
info_url: string | null;
municipality_ids: string[];
publish_end_date: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null;
publish_start_date: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null;
publish_status: "published" | "archived" | "draft";
reference_type: "agency" | "lines" | "stops" | "rides";
references: {
child_ids: string[];
parent_id: string;
}[];
title: string;
user_instructions: string;
updated_by?: string | undefined;
}, {
_id: string;
created_at: number;
updated_at: number;
description: string;
active_period_start_date: number;
agency_id: string;
cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_ISSUE" | "WEATHER" | "ABUSIVE_PARKING" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "NETWORK_UPDATE" | "ROAD_ISSUE" | "TRAFFIC_JAM" | "PUBLIC_DISORDER" | "VEHICLE_ISSUE";
effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_SERVICE" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "REALTIME_INFO_ISSUE" | "ON_BOARD_SALE_ISSUE";
reference_type: "agency" | "lines" | "stops" | "rides";
title: string;
created_by?: string | null | undefined;
is_locked?: boolean | undefined;
updated_by?: string | undefined;
active_period_end_date?: number | null | undefined;
auto_texts?: boolean | undefined;
coordinates?: [number, number] | null | undefined;
external_id?: string | null | undefined;
file_id?: string | null | undefined;
info_url?: string | null | undefined;
municipality_ids?: string[] | undefined;
publish_end_date?: number | null | undefined;
publish_start_date?: number | null | undefined;
publish_status?: "published" | "archived" | "draft" | undefined;
references?: {
child_ids: string[];
parent_id: string;
}[] | undefined;
user_instructions?: string | undefined;
}>;
export declare const CreateAlertSchema: 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>;
} & {
active_period_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>;
active_period_start_date: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
agency_id: z.ZodString;
auto_texts: z.ZodDefault<z.ZodBoolean>;
cause: z.ZodEnum<["ACCIDENT", "CONSTRUCTION", "DEMONSTRATION", "MEDICAL_EMERGENCY", "POLICE_ACTIVITY", "STRIKE", "TECHNICAL_ISSUE", "WEATHER", "ABUSIVE_PARKING", "DRIVER_ABSENCE", "DRIVER_ISSUE", "HIGH_PASSENGER_LOAD", "NETWORK_UPDATE", "ROAD_ISSUE", "TRAFFIC_JAM", "PUBLIC_DISORDER", "VEHICLE_ISSUE"]>;
coordinates: z.ZodDefault<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
description: z.ZodString;
effect: z.ZodEnum<["ACCESSIBILITY_ISSUE", "ADDITIONAL_SERVICE", "DETOUR", "MODIFIED_SERVICE", "NO_SERVICE", "REDUCED_SERVICE", "SIGNIFICANT_DELAYS", "STOP_MOVED", "REALTIME_INFO_ISSUE", "ON_BOARD_SALE_ISSUE"]>;
external_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
file_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
info_url: z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>>;
municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
publish_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>;
publish_start_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>;
publish_status: z.ZodDefault<z.ZodEnum<["published", "archived", "draft"]>>;
reference_type: z.ZodEnum<["agency", "lines", "stops", "rides"]>;
references: z.ZodDefault<z.ZodArray<z.ZodObject<{
child_ids: z.ZodArray<z.ZodString, "many">;
parent_id: z.ZodString;
}, "strip", z.ZodTypeAny, {
child_ids: string[];
parent_id: string;
}, {
child_ids: string[];
parent_id: string;
}>, "many">>;
title: z.ZodString;
user_instructions: z.ZodDefault<z.ZodString>;
}, "_id" | "created_at" | "created_by" | "updated_at" | "updated_by">, "strip", z.ZodTypeAny, {
is_locked: boolean;
description: string;
active_period_end_date: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null;
active_period_start_date: number & {
__brand: "UnixTimestamp";
};
agency_id: string;
auto_texts: boolean;
cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_ISSUE" | "WEATHER" | "ABUSIVE_PARKING" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "NETWORK_UPDATE" | "ROAD_ISSUE" | "TRAFFIC_JAM" | "PUBLIC_DISORDER" | "VEHICLE_ISSUE";
coordinates: [number, number] | null;
effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_SERVICE" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "REALTIME_INFO_ISSUE" | "ON_BOARD_SALE_ISSUE";
external_id: string | null;
file_id: string | null;
info_url: string | null;
municipality_ids: string[];
publish_end_date: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null;
publish_start_date: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null;
publish_status: "published" | "archived" | "draft";
reference_type: "agency" | "lines" | "stops" | "rides";
references: {
child_ids: string[];
parent_id: string;
}[];
title: string;
user_instructions: string;
}, {
description: string;
active_period_start_date: number;
agency_id: string;
cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_ISSUE" | "WEATHER" | "ABUSIVE_PARKING" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "NETWORK_UPDATE" | "ROAD_ISSUE" | "TRAFFIC_JAM" | "PUBLIC_DISORDER" | "VEHICLE_ISSUE";
effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_SERVICE" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "REALTIME_INFO_ISSUE" | "ON_BOARD_SALE_ISSUE";
reference_type: "agency" | "lines" | "stops" | "rides";
title: string;
is_locked?: boolean | undefined;
active_period_end_date?: number | null | undefined;
auto_texts?: boolean | undefined;
coordinates?: [number, number] | null | undefined;
external_id?: string | null | undefined;
file_id?: string | null | undefined;
info_url?: string | null | undefined;
municipality_ids?: string[] | undefined;
publish_end_date?: number | null | undefined;
publish_start_date?: number | null | undefined;
publish_status?: "published" | "archived" | "draft" | undefined;
references?: {
child_ids: string[];
parent_id: string;
}[] | undefined;
user_instructions?: string | undefined;
}>;
export declare const UpdateAlertSchema: z.ZodObject<{
is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
description: z.ZodOptional<z.ZodString>;
active_period_end_date: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>>;
active_period_start_date: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>;
agency_id: z.ZodOptional<z.ZodString>;
auto_texts: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
cause: z.ZodOptional<z.ZodEnum<["ACCIDENT", "CONSTRUCTION", "DEMONSTRATION", "MEDICAL_EMERGENCY", "POLICE_ACTIVITY", "STRIKE", "TECHNICAL_ISSUE", "WEATHER", "ABUSIVE_PARKING", "DRIVER_ABSENCE", "DRIVER_ISSUE", "HIGH_PASSENGER_LOAD", "NETWORK_UPDATE", "ROAD_ISSUE", "TRAFFIC_JAM", "PUBLIC_DISORDER", "VEHICLE_ISSUE"]>>;
coordinates: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>>;
effect: z.ZodOptional<z.ZodEnum<["ACCESSIBILITY_ISSUE", "ADDITIONAL_SERVICE", "DETOUR", "MODIFIED_SERVICE", "NO_SERVICE", "REDUCED_SERVICE", "SIGNIFICANT_DELAYS", "STOP_MOVED", "REALTIME_INFO_ISSUE", "ON_BOARD_SALE_ISSUE"]>>;
external_id: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
file_id: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
info_url: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>>>;
municipality_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
publish_end_date: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>>;
publish_start_date: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>>;
publish_status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["published", "archived", "draft"]>>>;
reference_type: z.ZodOptional<z.ZodEnum<["agency", "lines", "stops", "rides"]>>;
references: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
child_ids: z.ZodArray<z.ZodString, "many">;
parent_id: z.ZodString;
}, "strip", z.ZodTypeAny, {
child_ids: string[];
parent_id: string;
}, {
child_ids: string[];
parent_id: string;
}>, "many">>>;
title: z.ZodOptional<z.ZodString>;
user_instructions: z.ZodOptional<z.ZodDefault<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
is_locked?: boolean | undefined;
description?: string | undefined;
active_period_end_date?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null | undefined;
active_period_start_date?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | undefined;
agency_id?: string | undefined;
auto_texts?: boolean | undefined;
cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_ISSUE" | "WEATHER" | "ABUSIVE_PARKING" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "NETWORK_UPDATE" | "ROAD_ISSUE" | "TRAFFIC_JAM" | "PUBLIC_DISORDER" | "VEHICLE_ISSUE" | undefined;
coordinates?: [number, number] | null | undefined;
effect?: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_SERVICE" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "REALTIME_INFO_ISSUE" | "ON_BOARD_SALE_ISSUE" | undefined;
external_id?: string | null | undefined;
file_id?: string | null | undefined;
info_url?: string | null | undefined;
municipality_ids?: string[] | undefined;
publish_end_date?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null | undefined;
publish_start_date?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null | undefined;
publish_status?: "published" | "archived" | "draft" | undefined;
reference_type?: "agency" | "lines" | "stops" | "rides" | undefined;
references?: {
child_ids: string[];
parent_id: string;
}[] | undefined;
title?: string | undefined;
user_instructions?: string | undefined;
}, {
is_locked?: boolean | undefined;
description?: string | undefined;
active_period_end_date?: number | null | undefined;
active_period_start_date?: number | undefined;
agency_id?: string | undefined;
auto_texts?: boolean | undefined;
cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_ISSUE" | "WEATHER" | "ABUSIVE_PARKING" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "NETWORK_UPDATE" | "ROAD_ISSUE" | "TRAFFIC_JAM" | "PUBLIC_DISORDER" | "VEHICLE_ISSUE" | undefined;
coordinates?: [number, number] | null | undefined;
effect?: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_SERVICE" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "REALTIME_INFO_ISSUE" | "ON_BOARD_SALE_ISSUE" | undefined;
external_id?: string | null | undefined;
file_id?: string | null | undefined;
info_url?: string | null | undefined;
municipality_ids?: string[] | undefined;
publish_end_date?: number | null | undefined;
publish_start_date?: number | null | undefined;
publish_status?: "published" | "archived" | "draft" | undefined;
reference_type?: "agency" | "lines" | "stops" | "rides" | undefined;
references?: {
child_ids: string[];
parent_id: string;
}[] | undefined;
title?: string | undefined;
user_instructions?: string | undefined;
}>;
export type Alert = z.infer<typeof AlertSchema>;
export type CreateAlertDto = z.infer<typeof CreateAlertSchema>;
export type UpdateAlertDto = z.infer<typeof UpdateAlertSchema>;