UNPKG

@tmlmobilidade/types

Version:
1,289 lines • 71.6 kB
import { z } from 'zod'; export declare const RoleSchema: 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>; } & { name: 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">>; }, "strip", z.ZodTypeAny, { _id: string; created_at: number & { __brand: "UnixTimestamp"; }; created_by: string | null; is_locked: boolean; updated_at: number & { __brand: "UnixTimestamp"; }; name: 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[]; }; })[]; updated_by?: string | undefined; }, { _id: string; created_at: number; updated_at: number; name: string; created_by?: string | null | undefined; is_locked?: boolean | undefined; updated_by?: string | 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; }>; export declare const CreateRoleSchema: 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>; } & { name: 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">>; }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, { created_by: string | null; is_locked: boolean; name: 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[]; }; })[]; updated_by?: string | undefined; }, { name: string; created_by?: string | null | undefined; is_locked?: boolean | undefined; updated_by?: string | 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; }>; export declare const UpdateRoleSchema: z.ZodObject<{ is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>; name: z.ZodOptional<z.ZodString>; permissions: z.ZodOptional<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",