UNPKG

@tmlmobilidade/types

Version:
1,266 lines • 121 kB
import { z } from 'zod'; export declare const UserPreferenceValueSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>; export type UserPreferenceValue = z.infer<typeof UserPreferenceValueSchema>; export declare const UserSchema_UNSAFE: 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>; } & { email: z.ZodString; email_verified: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>; first_name: z.ZodString; last_name: z.ZodString; organization_id: z.ZodString; password_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>; permissions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; scope: z.ZodLiteral<"agencies">; }, "strip", z.ZodTypeAny, { scope: "agencies"; action: "create" | "delete" | "read" | "lock" | "update"; }, { scope: "agencies"; action: "create" | "delete" | "read" | "lock" | "update"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update", "update_texts", "update_dates", "update_publish_status"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; reference_types: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; reference_types: string[]; }, { agency_ids?: string[] | undefined; reference_types?: string[] | undefined; }>>; scope: z.ZodLiteral<"alerts">; }, "strip", z.ZodTypeAny, { scope: "alerts"; action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status"; resources: { agency_ids: string[]; reference_types: string[]; }; }, { scope: "alerts"; action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status"; resources?: { agency_ids?: string[] | undefined; reference_types?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["acceptance_change_status", "acceptance_justify", "acceptance_lock", "acceptance_read", "analsys_lock", "analysis_lock", "analysis_read", "analysis_reprocess", "analysis_update", "audit_lock", "audit_read", "audit_update", "acceptance_comment_activity"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"rides">; }, "strip", z.ZodTypeAny, { scope: "rides"; action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity"; resources: { agency_ids: string[]; }; }, { scope: "rides"; action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["read", "export"]>; scope: z.ZodLiteral<"sams">; }, "strip", z.ZodTypeAny, { scope: "sams"; action: "read" | "export"; }, { scope: "sams"; action: "read" | "export"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "read", "lock", "request_approval", "update_processing_status"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"gtfs_validations">; }, "strip", z.ZodTypeAny, { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval" | "update_processing_status"; resources: { agency_ids: string[]; }; }, { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval" | "update_processing_status"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["read_links", "read_wiki"]>; scope: z.ZodLiteral<"home">; }, "strip", z.ZodTypeAny, { scope: "home"; action: "read_links" | "read_wiki"; }, { scope: "home"; action: "read_links" | "read_wiki"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; scope: z.ZodLiteral<"organizations">; }, "strip", z.ZodTypeAny, { scope: "organizations"; action: "create" | "delete" | "read" | "lock" | "update"; }, { scope: "organizations"; action: "create" | "delete" | "read" | "lock" | "update"; }>, z.ZodObject<{ action: z.ZodEnum<["read"]>; scope: z.ZodLiteral<"performance">; }, "strip", z.ZodTypeAny, { scope: "performance"; action: "read"; }, { scope: "performance"; action: "read"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy", "read_apex_file", "update_apex_file", "delete_apex_file"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"plans">; }, "strip", z.ZodTypeAny, { scope: "plans"; action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file"; resources: { agency_ids: string[]; }; }, { scope: "plans"; action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; scope: z.ZodLiteral<"roles">; }, "strip", z.ZodTypeAny, { scope: "roles"; action: "create" | "delete" | "read" | "lock" | "update"; }, { scope: "roles"; action: "create" | "delete" | "read" | "lock" | "update"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update", "export", "edit_coordinates", "edit_name"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { municipality_ids: string[]; agency_ids: string[]; }, { municipality_ids?: string[] | undefined; agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"stops">; }, "strip", z.ZodTypeAny, { scope: "stops"; action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name"; resources: { municipality_ids: string[]; agency_ids: string[]; }; }, { scope: "stops"; action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name"; resources?: { municipality_ids?: string[] | undefined; agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; scope: z.ZodLiteral<"users">; }, "strip", z.ZodTypeAny, { scope: "users"; action: "create" | "delete" | "read" | "lock" | "update"; }, { scope: "users"; action: "create" | "delete" | "read" | "lock" | "update"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"vehicles">; }, "strip", z.ZodTypeAny, { scope: "vehicles"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "vehicles"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "lock", "nav", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"fares">; }, "strip", z.ZodTypeAny, { scope: "fares"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; }, { scope: "fares"; action: "create" | "delete" | "lock" | "update" | "nav"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"annotations">; }, "strip", z.ZodTypeAny, { scope: "annotations"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "annotations"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"year_periods">; }, "strip", z.ZodTypeAny, { scope: "year_periods"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "year_periods"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"holidays">; }, "strip", z.ZodTypeAny, { scope: "holidays"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "holidays"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"events">; }, "strip", z.ZodTypeAny, { scope: "events"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "events"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "lock", "nav", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"zones">; }, "strip", z.ZodTypeAny, { scope: "zones"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; }, { scope: "zones"; action: "create" | "delete" | "lock" | "update" | "nav"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "lock", "nav", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"typologies">; }, "strip", z.ZodTypeAny, { scope: "typologies"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; }, { scope: "typologies"; action: "create" | "delete" | "lock" | "update" | "nav"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"lines">; }, "strip", z.ZodTypeAny, { scope: "lines"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "lines"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>]>, "many">>; phone: z.ZodDefault<z.ZodNullable<z.ZodString>>; preferences: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>>; role_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; seen_last_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>; session_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { _id: string; created_at: number & { __brand: "UnixTimestamp"; }; created_by: string | null; is_locked: boolean; updated_at: number & { __brand: "UnixTimestamp"; }; phone: string | null; email: string; permissions: ({ scope: "agencies"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "alerts"; action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status"; resources: { agency_ids: string[]; reference_types: string[]; }; } | { scope: "rides"; action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity"; resources: { agency_ids: string[]; }; } | { scope: "sams"; action: "read" | "export"; } | { scope: "annotations"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "events"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "holidays"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "year_periods"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "fares"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; } | { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval" | "update_processing_status"; resources: { agency_ids: string[]; }; } | { scope: "home"; action: "read_links" | "read_wiki"; } | { scope: "lines"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "organizations"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "performance"; action: "read"; } | { scope: "plans"; action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file"; resources: { agency_ids: string[]; }; } | { scope: "roles"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "stops"; action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name"; resources: { municipality_ids: string[]; agency_ids: string[]; }; } | { scope: "typologies"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; } | { scope: "users"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "vehicles"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "zones"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; })[]; email_verified: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null; first_name: string; last_name: string; organization_id: string; password_hash: string | null; preferences: Record<string, Record<string, string | number | boolean | number[] | string[]>> | null; role_ids: string[]; seen_last_at: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null; session_ids: string[]; verification_token_ids: string[]; updated_by?: string | undefined; }, { _id: string; created_at: number; updated_at: number; email: string; first_name: string; last_name: string; organization_id: string; created_by?: string | null | undefined; is_locked?: boolean | undefined; updated_by?: string | undefined; phone?: string | null | undefined; permissions?: ({ scope: "agencies"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "alerts"; action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status"; resources?: { agency_ids?: string[] | undefined; reference_types?: string[] | undefined; } | undefined; } | { scope: "rides"; action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "sams"; action: "read" | "export"; } | { scope: "annotations"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "events"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "holidays"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "year_periods"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "fares"; action: "create" | "delete" | "lock" | "update" | "nav"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval" | "update_processing_status"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "home"; action: "read_links" | "read_wiki"; } | { scope: "lines"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "organizations"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "performance"; action: "read"; } | { scope: "plans"; action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "roles"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "stops"; action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name"; resources?: { municipality_ids?: string[] | undefined; agency_ids?: string[] | undefined; } | undefined; } | { scope: "typologies"; action: "create" | "delete" | "lock" | "update" | "nav"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "users"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "vehicles"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "zones"; action: "create" | "delete" | "lock" | "update" | "nav"; resources?: { agency_ids?: string[] | undefined; } | undefined; })[] | undefined; email_verified?: number | null | undefined; password_hash?: string | null | undefined; preferences?: Record<string, Record<string, string | number | boolean | number[] | string[]>> | null | undefined; role_ids?: string[] | undefined; seen_last_at?: number | null | undefined; session_ids?: string[] | undefined; verification_token_ids?: string[] | undefined; }>; export declare const CreateUserSchema: 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>; } & { email: z.ZodString; email_verified: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>; first_name: z.ZodString; last_name: z.ZodString; organization_id: z.ZodString; password_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>; permissions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; scope: z.ZodLiteral<"agencies">; }, "strip", z.ZodTypeAny, { scope: "agencies"; action: "create" | "delete" | "read" | "lock" | "update"; }, { scope: "agencies"; action: "create" | "delete" | "read" | "lock" | "update"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update", "update_texts", "update_dates", "update_publish_status"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; reference_types: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; reference_types: string[]; }, { agency_ids?: string[] | undefined; reference_types?: string[] | undefined; }>>; scope: z.ZodLiteral<"alerts">; }, "strip", z.ZodTypeAny, { scope: "alerts"; action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status"; resources: { agency_ids: string[]; reference_types: string[]; }; }, { scope: "alerts"; action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status"; resources?: { agency_ids?: string[] | undefined; reference_types?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["acceptance_change_status", "acceptance_justify", "acceptance_lock", "acceptance_read", "analsys_lock", "analysis_lock", "analysis_read", "analysis_reprocess", "analysis_update", "audit_lock", "audit_read", "audit_update", "acceptance_comment_activity"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"rides">; }, "strip", z.ZodTypeAny, { scope: "rides"; action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity"; resources: { agency_ids: string[]; }; }, { scope: "rides"; action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["read", "export"]>; scope: z.ZodLiteral<"sams">; }, "strip", z.ZodTypeAny, { scope: "sams"; action: "read" | "export"; }, { scope: "sams"; action: "read" | "export"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "read", "lock", "request_approval", "update_processing_status"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"gtfs_validations">; }, "strip", z.ZodTypeAny, { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval" | "update_processing_status"; resources: { agency_ids: string[]; }; }, { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval" | "update_processing_status"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["read_links", "read_wiki"]>; scope: z.ZodLiteral<"home">; }, "strip", z.ZodTypeAny, { scope: "home"; action: "read_links" | "read_wiki"; }, { scope: "home"; action: "read_links" | "read_wiki"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; scope: z.ZodLiteral<"organizations">; }, "strip", z.ZodTypeAny, { scope: "organizations"; action: "create" | "delete" | "read" | "lock" | "update"; }, { scope: "organizations"; action: "create" | "delete" | "read" | "lock" | "update"; }>, z.ZodObject<{ action: z.ZodEnum<["read"]>; scope: z.ZodLiteral<"performance">; }, "strip", z.ZodTypeAny, { scope: "performance"; action: "read"; }, { scope: "performance"; action: "read"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy", "read_apex_file", "update_apex_file", "delete_apex_file"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"plans">; }, "strip", z.ZodTypeAny, { scope: "plans"; action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file"; resources: { agency_ids: string[]; }; }, { scope: "plans"; action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; scope: z.ZodLiteral<"roles">; }, "strip", z.ZodTypeAny, { scope: "roles"; action: "create" | "delete" | "read" | "lock" | "update"; }, { scope: "roles"; action: "create" | "delete" | "read" | "lock" | "update"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update", "export", "edit_coordinates", "edit_name"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { municipality_ids: string[]; agency_ids: string[]; }, { municipality_ids?: string[] | undefined; agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"stops">; }, "strip", z.ZodTypeAny, { scope: "stops"; action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name"; resources: { municipality_ids: string[]; agency_ids: string[]; }; }, { scope: "stops"; action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name"; resources?: { municipality_ids?: string[] | undefined; agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; scope: z.ZodLiteral<"users">; }, "strip", z.ZodTypeAny, { scope: "users"; action: "create" | "delete" | "read" | "lock" | "update"; }, { scope: "users"; action: "create" | "delete" | "read" | "lock" | "update"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"vehicles">; }, "strip", z.ZodTypeAny, { scope: "vehicles"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "vehicles"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "lock", "nav", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"fares">; }, "strip", z.ZodTypeAny, { scope: "fares"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; }, { scope: "fares"; action: "create" | "delete" | "lock" | "update" | "nav"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"annotations">; }, "strip", z.ZodTypeAny, { scope: "annotations"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "annotations"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"year_periods">; }, "strip", z.ZodTypeAny, { scope: "year_periods"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "year_periods"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"holidays">; }, "strip", z.ZodTypeAny, { scope: "holidays"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "holidays"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"events">; }, "strip", z.ZodTypeAny, { scope: "events"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "events"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "lock", "nav", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"zones">; }, "strip", z.ZodTypeAny, { scope: "zones"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; }, { scope: "zones"; action: "create" | "delete" | "lock" | "update" | "nav"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "lock", "nav", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"typologies">; }, "strip", z.ZodTypeAny, { scope: "typologies"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; }, { scope: "typologies"; action: "create" | "delete" | "lock" | "update" | "nav"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; resources: z.ZodDefault<z.ZodObject<{ agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { agency_ids: string[]; }, { agency_ids?: string[] | undefined; }>>; scope: z.ZodLiteral<"lines">; }, "strip", z.ZodTypeAny, { scope: "lines"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; }, { scope: "lines"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>]>, "many">>; phone: z.ZodDefault<z.ZodNullable<z.ZodString>>; preferences: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>>; role_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; seen_last_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>>; session_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>; }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, { created_by: string | null; is_locked: boolean; phone: string | null; email: string; permissions: ({ scope: "agencies"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "alerts"; action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status"; resources: { agency_ids: string[]; reference_types: string[]; }; } | { scope: "rides"; action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity"; resources: { agency_ids: string[]; }; } | { scope: "sams"; action: "read" | "export"; } | { scope: "annotations"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "events"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "holidays"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "year_periods"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "fares"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; } | { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval" | "update_processing_status"; resources: { agency_ids: string[]; }; } | { scope: "home"; action: "read_links" | "read_wiki"; } | { scope: "lines"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "organizations"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "performance"; action: "read"; } | { scope: "plans"; action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file"; resources: { agency_ids: string[]; }; } | { scope: "roles"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "stops"; action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name"; resources: { municipality_ids: string[]; agency_ids: string[]; }; } | { scope: "typologies"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; } | { scope: "users"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "vehicles"; action: "create" | "delete" | "read" | "lock" | "update"; resources: { agency_ids: string[]; }; } | { scope: "zones"; action: "create" | "delete" | "lock" | "update" | "nav"; resources: { agency_ids: string[]; }; })[]; email_verified: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null; first_name: string; last_name: string; organization_id: string; password_hash: string | null; preferences: Record<string, Record<string, string | number | boolean | number[] | string[]>> | null; role_ids: string[]; seen_last_at: import("@tmlmobilidade/go-types-shared").UnixTimestamp | null; session_ids: string[]; verification_token_ids: string[]; updated_by?: string | undefined; }, { email: string; first_name: string; last_name: string; organization_id: string; created_by?: string | null | undefined; is_locked?: boolean | undefined; updated_by?: string | undefined; phone?: string | null | undefined; permissions?: ({ scope: "agencies"; action: "create" | "delete" | "read" | "lock" | "update"; } | { scope: "alerts"; action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status"; resources?: { agency_ids?: string[] | undefined; reference_types?: string[] | undefined; } | undefined; } | { scope: "rides"; action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update" | "acceptance_comment_activity"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "sams"; action: "read" | "export"; } | { scope: "annotations"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "events"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "holidays"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "year_periods"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "fares"; action: "create" | "delete" | "lock" | "update" | "nav"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval" | "update_processing_status"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "home"; action: "read_links" | "read_wiki"; } | { scope: "lines"; action: "create" | "delete" | "read" | "lock" | "update"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "organizations"; action: "create" | "delete" | "read"