@tmlmobilidade/types
Version:
1,230 lines (1,229 loc) • 48.5 kB
TypeScript
import { z } from 'zod';
export declare const RIDE_ACCEPTANCE_STATUS_OPTIONS: readonly ["justification_required", "under_review", "accepted", "rejected"];
export declare const RideAcceptanceStatusSchema: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
export type RideAcceptanceStatus = z.infer<typeof RideAcceptanceStatusSchema>;
export declare const RIDE_JUSTIFICATION_SOURCE_OPTIONS: readonly ["MANUAL", "ALERT"];
export declare const RideJustificationSourceSchema: z.ZodEnum<["MANUAL", "ALERT"]>;
export type RideJustificationSource = z.infer<typeof RideJustificationSourceSchema>;
export declare const RIDE_JUSTIFICATION_STATUS_TYPE_OPTIONS: readonly ["locked_status", "acceptance_status", "pto_message"];
export declare const RideJustificationStatusTypeSchema: z.ZodEnum<["locked_status", "acceptance_status", "pto_message"]>;
export type RideJustificationStatusType = z.infer<typeof RideJustificationStatusTypeSchema>;
export declare const RideJustificationSchema: 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>;
}, "_id" | "is_locked"> & {
justification_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"]>;
justification_source: z.ZodEnum<["MANUAL", "ALERT"]>;
manual_trip_id: z.ZodOptional<z.ZodString>;
pto_message: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
pto_message: string;
justification_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";
justification_source: "MANUAL" | "ALERT";
updated_by?: string | undefined;
manual_trip_id?: string | undefined;
}, {
created_at: number;
updated_at: number;
justification_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";
justification_source: "MANUAL" | "ALERT";
created_by?: string | null | undefined;
updated_by?: string | undefined;
pto_message?: string | undefined;
manual_trip_id?: string | undefined;
}>;
export type RideJustification = z.infer<typeof RideJustificationSchema>;
export declare const RideAcceptanceSchema: 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>>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
} & {
acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
analysis_summary: z.ZodRecord<z.ZodString, z.ZodObject<{
grade: z.ZodEnum<["pass", "fail", "skip", "error"]>;
reason: z.ZodString;
}, "strip", z.ZodTypeAny, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}>>;
comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
message: z.ZodString;
type: z.ZodLiteral<"note">;
_id: z.ZodOptional<z.ZodString>;
created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
message: string;
type: "note";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
_id?: string | undefined;
updated_by?: string | undefined;
}, {
message: string;
type: "note";
created_at: number;
updated_at: number;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"field_changed">;
_id: z.ZodOptional<z.ZodString>;
created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
curr_value: z.ZodAny;
field: z.ZodString;
prev_value: z.ZodAny;
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
curr_value: z.ZodAny;
field: z.ZodString;
prev_value: z.ZodAny;
}, "strip", z.ZodTypeAny, {
field: string;
curr_value?: any;
prev_value?: any;
}, {
field: string;
curr_value?: any;
prev_value?: any;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
}, {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
type: "field_changed";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
field: string;
_id?: string | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
}, {
type: "field_changed";
created_at: number;
updated_at: number;
field: string;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"crud">;
_id: z.ZodOptional<z.ZodString>;
created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
action: z.ZodEnum<["create", "update", "delete", "archive", "restore"]>;
}, "strip", z.ZodTypeAny, {
type: "crud";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
updated_by?: string | undefined;
}, {
type: "crud";
created_at: number;
updated_at: number;
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
}>]>, {
message: string;
type: "note";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
_id?: string | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
field: string;
_id?: string | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
updated_by?: string | undefined;
}, {
message: string;
type: "note";
created_at: number;
updated_at: number;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number;
updated_at: number;
field: string;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number;
updated_at: number;
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
}>, "many">>;
is_locked: z.ZodDefault<z.ZodBoolean>;
justification: z.ZodNullable<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>;
}, "_id" | "is_locked"> & {
justification_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"]>;
justification_source: z.ZodEnum<["MANUAL", "ALERT"]>;
manual_trip_id: z.ZodOptional<z.ZodString>;
pto_message: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
pto_message: string;
justification_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";
justification_source: "MANUAL" | "ALERT";
updated_by?: string | undefined;
manual_trip_id?: string | undefined;
}, {
created_at: number;
updated_at: number;
justification_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";
justification_source: "MANUAL" | "ALERT";
created_by?: string | null | undefined;
updated_by?: string | undefined;
pto_message?: string | undefined;
manual_trip_id?: string | undefined;
}>>;
ride_id: z.ZodString;
}, "strip", z.ZodTypeAny, {
_id: string;
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
is_locked: boolean;
updated_at: number & {
__brand: "UnixTimestamp";
};
acceptance_status: "justification_required" | "under_review" | "accepted" | "rejected";
analysis_summary: Record<string, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}>;
comments: ({
message: string;
type: "note";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
_id?: string | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
field: string;
_id?: string | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
updated_by?: string | undefined;
})[];
justification: {
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
pto_message: string;
justification_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";
justification_source: "MANUAL" | "ALERT";
updated_by?: string | undefined;
manual_trip_id?: string | undefined;
} | null;
ride_id: string;
updated_by?: string | undefined;
}, {
_id: string;
created_at: number;
updated_at: number;
acceptance_status: "justification_required" | "under_review" | "accepted" | "rejected";
analysis_summary: Record<string, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}>;
justification: {
created_at: number;
updated_at: number;
justification_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";
justification_source: "MANUAL" | "ALERT";
created_by?: string | null | undefined;
updated_by?: string | undefined;
pto_message?: string | undefined;
manual_trip_id?: string | undefined;
} | null;
ride_id: string;
created_by?: string | null | undefined;
is_locked?: boolean | undefined;
updated_by?: string | undefined;
comments?: ({
message: string;
type: "note";
created_at: number;
updated_at: number;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number;
updated_at: number;
field: string;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number;
updated_at: number;
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
})[] | undefined;
}>;
export declare const CreateRideAcceptanceSchema: z.ZodObject<Omit<{
_id: z.ZodOptional<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>;
acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
analysis_summary: z.ZodRecord<z.ZodString, z.ZodObject<{
grade: z.ZodEnum<["pass", "fail", "skip", "error"]>;
reason: z.ZodString;
}, "strip", z.ZodTypeAny, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}>>;
comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
message: z.ZodString;
type: z.ZodLiteral<"note">;
_id: z.ZodOptional<z.ZodString>;
created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
message: string;
type: "note";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
_id?: string | undefined;
updated_by?: string | undefined;
}, {
message: string;
type: "note";
created_at: number;
updated_at: number;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"field_changed">;
_id: z.ZodOptional<z.ZodString>;
created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
curr_value: z.ZodAny;
field: z.ZodString;
prev_value: z.ZodAny;
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
curr_value: z.ZodAny;
field: z.ZodString;
prev_value: z.ZodAny;
}, "strip", z.ZodTypeAny, {
field: string;
curr_value?: any;
prev_value?: any;
}, {
field: string;
curr_value?: any;
prev_value?: any;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
}, {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
type: "field_changed";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
field: string;
_id?: string | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
}, {
type: "field_changed";
created_at: number;
updated_at: number;
field: string;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"crud">;
_id: z.ZodOptional<z.ZodString>;
created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
action: z.ZodEnum<["create", "update", "delete", "archive", "restore"]>;
}, "strip", z.ZodTypeAny, {
type: "crud";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
updated_by?: string | undefined;
}, {
type: "crud";
created_at: number;
updated_at: number;
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
}>]>, {
message: string;
type: "note";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
_id?: string | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
field: string;
_id?: string | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
updated_by?: string | undefined;
}, {
message: string;
type: "note";
created_at: number;
updated_at: number;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number;
updated_at: number;
field: string;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number;
updated_at: number;
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
}>, "many">>;
justification: z.ZodNullable<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>;
}, "_id" | "is_locked"> & {
justification_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"]>;
justification_source: z.ZodEnum<["MANUAL", "ALERT"]>;
manual_trip_id: z.ZodOptional<z.ZodString>;
pto_message: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
pto_message: string;
justification_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";
justification_source: "MANUAL" | "ALERT";
updated_by?: string | undefined;
manual_trip_id?: string | undefined;
}, {
created_at: number;
updated_at: number;
justification_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";
justification_source: "MANUAL" | "ALERT";
created_by?: string | null | undefined;
updated_by?: string | undefined;
pto_message?: string | undefined;
manual_trip_id?: string | undefined;
}>>;
ride_id: z.ZodString;
}, "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
created_by: string | null;
is_locked: boolean;
acceptance_status: "justification_required" | "under_review" | "accepted" | "rejected";
analysis_summary: Record<string, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}>;
comments: ({
message: string;
type: "note";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
_id?: string | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
field: string;
_id?: string | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
updated_by?: string | undefined;
})[];
justification: {
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
pto_message: string;
justification_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";
justification_source: "MANUAL" | "ALERT";
updated_by?: string | undefined;
manual_trip_id?: string | undefined;
} | null;
ride_id: string;
_id?: string | undefined;
updated_by?: string | undefined;
}, {
acceptance_status: "justification_required" | "under_review" | "accepted" | "rejected";
analysis_summary: Record<string, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}>;
justification: {
created_at: number;
updated_at: number;
justification_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";
justification_source: "MANUAL" | "ALERT";
created_by?: string | null | undefined;
updated_by?: string | undefined;
pto_message?: string | undefined;
manual_trip_id?: string | undefined;
} | null;
ride_id: string;
_id?: string | undefined;
created_by?: string | null | undefined;
is_locked?: boolean | undefined;
updated_by?: string | undefined;
comments?: ({
message: string;
type: "note";
created_at: number;
updated_at: number;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number;
updated_at: number;
field: string;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number;
updated_at: number;
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
})[] | undefined;
}>;
export declare const UpdateRideAcceptanceSchema: z.ZodObject<{
_id: z.ZodOptional<z.ZodString>;
is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
updated_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>;
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
acceptance_status: z.ZodOptional<z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>>;
analysis_summary: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
grade: z.ZodEnum<["pass", "fail", "skip", "error"]>;
reason: z.ZodString;
}, "strip", z.ZodTypeAny, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}>>>;
comments: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
message: z.ZodString;
type: z.ZodLiteral<"note">;
_id: z.ZodOptional<z.ZodString>;
created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
message: string;
type: "note";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
_id?: string | undefined;
updated_by?: string | undefined;
}, {
message: string;
type: "note";
created_at: number;
updated_at: number;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"field_changed">;
_id: z.ZodOptional<z.ZodString>;
created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
curr_value: z.ZodAny;
field: z.ZodString;
prev_value: z.ZodAny;
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
curr_value: z.ZodAny;
field: z.ZodString;
prev_value: z.ZodAny;
}, "strip", z.ZodTypeAny, {
field: string;
curr_value?: any;
prev_value?: any;
}, {
field: string;
curr_value?: any;
prev_value?: any;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
}, {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
type: "field_changed";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
field: string;
_id?: string | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
}, {
type: "field_changed";
created_at: number;
updated_at: number;
field: string;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"crud">;
_id: z.ZodOptional<z.ZodString>;
created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
action: z.ZodEnum<["create", "update", "delete", "archive", "restore"]>;
}, "strip", z.ZodTypeAny, {
type: "crud";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
updated_by?: string | undefined;
}, {
type: "crud";
created_at: number;
updated_at: number;
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
}>]>, {
message: string;
type: "note";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
_id?: string | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
field: string;
_id?: string | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
updated_by?: string | undefined;
}, {
message: string;
type: "note";
created_at: number;
updated_at: number;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number;
updated_at: number;
field: string;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number;
updated_at: number;
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
}>, "many">>>;
justification: z.ZodOptional<z.ZodNullable<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>;
}, "_id" | "is_locked"> & {
justification_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"]>;
justification_source: z.ZodEnum<["MANUAL", "ALERT"]>;
manual_trip_id: z.ZodOptional<z.ZodString>;
pto_message: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
pto_message: string;
justification_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";
justification_source: "MANUAL" | "ALERT";
updated_by?: string | undefined;
manual_trip_id?: string | undefined;
}, {
created_at: number;
updated_at: number;
justification_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";
justification_source: "MANUAL" | "ALERT";
created_by?: string | null | undefined;
updated_by?: string | undefined;
pto_message?: string | undefined;
manual_trip_id?: string | undefined;
}>>>;
ride_id: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
_id?: string | undefined;
is_locked?: boolean | undefined;
updated_at?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | undefined;
updated_by?: string | undefined;
acceptance_status?: "justification_required" | "under_review" | "accepted" | "rejected" | undefined;
analysis_summary?: Record<string, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}> | undefined;
comments?: ({
message: string;
type: "note";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
_id?: string | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
field: string;
_id?: string | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
updated_by?: string | undefined;
})[] | undefined;
justification?: {
created_at: number & {
__brand: "UnixTimestamp";
};
created_by: string | null;
updated_at: number & {
__brand: "UnixTimestamp";
};
pto_message: string;
justification_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";
justification_source: "MANUAL" | "ALERT";
updated_by?: string | undefined;
manual_trip_id?: string | undefined;
} | null | undefined;
ride_id?: string | undefined;
}, {
_id?: string | undefined;
is_locked?: boolean | undefined;
updated_at?: number | undefined;
updated_by?: string | undefined;
acceptance_status?: "justification_required" | "under_review" | "accepted" | "rejected" | undefined;
analysis_summary?: Record<string, {
grade: "error" | "pass" | "fail" | "skip";
reason: string;
}> | undefined;
comments?: ({
message: string;
type: "note";
created_at: number;
updated_at: number;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
} | {
type: "field_changed";
created_at: number;
updated_at: number;
field: string;
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
curr_value?: any;
prev_value?: any;
metadata?: {
changes?: {
field: string;
curr_value?: any;
prev_value?: any;
}[] | undefined;
} | null | undefined;
} | {
type: "crud";
created_at: number;
updated_at: number;
action: "create" | "update" | "delete" | "archive" | "restore";
_id?: string | undefined;
created_by?: string | null | undefined;
updated_by?: string | undefined;
})[] | undefined;
justification?: {
created_at: number;
updated_at: number;
justification_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";
justification_source: "MANUAL" | "ALERT";
created_by?: string | null | undefined;
updated_by?: string | undefined;
pto_message?: string | undefined;
manual_trip_id?: string | undefined;
} | null | undefined;
ride_id?: string | undefined;
}>;
export type RideAcceptance = z.infer<typeof RideAcceptanceSchema>;
export type CreateRideAcceptanceDto = z.infer<typeof CreateRideAcceptanceSchema>;
export type UpdateRideAcceptanceDto = z.infer<typeof UpdateRideAcceptanceSchema>;