UNPKG

@tmlmobilidade/types

Version:
1,070 lines (1,069 loc) • 42.3 kB
import { z } from 'zod'; export declare const RoleSchema: z.ZodObject<{ _id: z.ZodString; created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>; created_by: z.ZodOptional<z.ZodString>; is_locked: z.ZodDefault<z.ZodBoolean>; updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").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" | "update" | "delete" | "read" | "lock"; }, { scope: "agencies"; action: "create" | "update" | "delete" | "read" | "lock"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; scope: z.ZodLiteral<"alerts_scheduled">; }, "strip", z.ZodTypeAny, { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; }, { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; }>, 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<"alerts_realtime">; }, "strip", z.ZodTypeAny, { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; resources: { agency_ids: string[]; }; }, { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; resources?: { agency_ids?: 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"]>; 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"; 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"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["read"]>; scope: z.ZodLiteral<"sams">; }, "strip", z.ZodTypeAny, { scope: "sams"; action: "read"; }, { scope: "sams"; action: "read"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "read", "lock", "request_approval"]>; 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"; resources: { agency_ids: string[]; }; }, { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval"; 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" | "update" | "delete" | "read" | "lock"; }, { scope: "organizations"; action: "create" | "update" | "delete" | "read" | "lock"; }>, 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"]>; 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" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; resources: { agency_ids: string[]; }; }, { scope: "plans"; action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; 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" | "update" | "delete" | "read" | "lock"; }, { scope: "roles"; action: "create" | "update" | "delete" | "read" | "lock"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; 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" | "update" | "delete" | "read" | "lock"; resources: { municipality_ids: string[]; agency_ids: string[]; }; }, { scope: "stops"; action: "create" | "update" | "delete" | "read" | "lock"; 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" | "update" | "delete" | "read" | "lock"; }, { scope: "users"; action: "create" | "update" | "delete" | "read" | "lock"; }>, z.ZodObject<{ action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>; 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<"dates">; }, "strip", z.ZodTypeAny, { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources: { agency_ids: string[]; }; }, { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>]>, "many">>; }, "strip", z.ZodTypeAny, { _id: string; created_at: number & { __brand: "UnixTimestamp"; }; is_locked: boolean; updated_at: number & { __brand: "UnixTimestamp"; }; name: string; permissions: ({ scope: "agencies"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; 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"; resources: { agency_ids: string[]; }; } | { scope: "sams"; action: "read"; } | { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources: { agency_ids: string[]; }; } | { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval"; resources: { agency_ids: string[]; }; } | { scope: "home"; action: "read_links" | "read_wiki"; } | { scope: "organizations"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "performance"; action: "read"; } | { scope: "plans"; action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; resources: { agency_ids: string[]; }; } | { scope: "roles"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "stops"; action: "create" | "update" | "delete" | "read" | "lock"; resources: { municipality_ids: string[]; agency_ids: string[]; }; } | { scope: "users"; action: "create" | "update" | "delete" | "read" | "lock"; })[]; created_by?: string | undefined; updated_by?: string | undefined; }, { _id: string; created_at: number; updated_at: number; name: string; created_by?: string | undefined; is_locked?: boolean | undefined; updated_by?: string | undefined; permissions?: ({ scope: "agencies"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; resources?: { agency_ids?: 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"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "sams"; action: "read"; } | { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "home"; action: "read_links" | "read_wiki"; } | { scope: "organizations"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "performance"; action: "read"; } | { scope: "plans"; action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "roles"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "stops"; action: "create" | "update" | "delete" | "read" | "lock"; resources?: { municipality_ids?: string[] | undefined; agency_ids?: string[] | undefined; } | undefined; } | { scope: "users"; action: "create" | "update" | "delete" | "read" | "lock"; })[] | undefined; }>; export declare const CreateRoleSchema: z.ZodObject<Omit<{ _id: z.ZodString; created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>; created_by: z.ZodOptional<z.ZodString>; is_locked: z.ZodDefault<z.ZodBoolean>; updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").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" | "update" | "delete" | "read" | "lock"; }, { scope: "agencies"; action: "create" | "update" | "delete" | "read" | "lock"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; scope: z.ZodLiteral<"alerts_scheduled">; }, "strip", z.ZodTypeAny, { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; }, { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; }>, 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<"alerts_realtime">; }, "strip", z.ZodTypeAny, { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; resources: { agency_ids: string[]; }; }, { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; resources?: { agency_ids?: 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"]>; 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"; 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"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["read"]>; scope: z.ZodLiteral<"sams">; }, "strip", z.ZodTypeAny, { scope: "sams"; action: "read"; }, { scope: "sams"; action: "read"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "read", "lock", "request_approval"]>; 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"; resources: { agency_ids: string[]; }; }, { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval"; 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" | "update" | "delete" | "read" | "lock"; }, { scope: "organizations"; action: "create" | "update" | "delete" | "read" | "lock"; }>, 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"]>; 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" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; resources: { agency_ids: string[]; }; }, { scope: "plans"; action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; 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" | "update" | "delete" | "read" | "lock"; }, { scope: "roles"; action: "create" | "update" | "delete" | "read" | "lock"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; 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" | "update" | "delete" | "read" | "lock"; resources: { municipality_ids: string[]; agency_ids: string[]; }; }, { scope: "stops"; action: "create" | "update" | "delete" | "read" | "lock"; 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" | "update" | "delete" | "read" | "lock"; }, { scope: "users"; action: "create" | "update" | "delete" | "read" | "lock"; }>, z.ZodObject<{ action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>; 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<"dates">; }, "strip", z.ZodTypeAny, { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources: { agency_ids: string[]; }; }, { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>]>, "many">>; }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, { is_locked: boolean; name: string; permissions: ({ scope: "agencies"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; 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"; resources: { agency_ids: string[]; }; } | { scope: "sams"; action: "read"; } | { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources: { agency_ids: string[]; }; } | { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval"; resources: { agency_ids: string[]; }; } | { scope: "home"; action: "read_links" | "read_wiki"; } | { scope: "organizations"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "performance"; action: "read"; } | { scope: "plans"; action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; resources: { agency_ids: string[]; }; } | { scope: "roles"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "stops"; action: "create" | "update" | "delete" | "read" | "lock"; resources: { municipality_ids: string[]; agency_ids: string[]; }; } | { scope: "users"; action: "create" | "update" | "delete" | "read" | "lock"; })[]; created_by?: string | undefined; updated_by?: string | undefined; }, { name: string; created_by?: string | undefined; is_locked?: boolean | undefined; updated_by?: string | undefined; permissions?: ({ scope: "agencies"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; resources?: { agency_ids?: 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"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "sams"; action: "read"; } | { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "home"; action: "read_links" | "read_wiki"; } | { scope: "organizations"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "performance"; action: "read"; } | { scope: "plans"; action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "roles"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "stops"; action: "create" | "update" | "delete" | "read" | "lock"; resources?: { municipality_ids?: string[] | undefined; agency_ids?: string[] | undefined; } | undefined; } | { scope: "users"; action: "create" | "update" | "delete" | "read" | "lock"; })[] | 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" | "update" | "delete" | "read" | "lock"; }, { scope: "agencies"; action: "create" | "update" | "delete" | "read" | "lock"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; scope: z.ZodLiteral<"alerts_scheduled">; }, "strip", z.ZodTypeAny, { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; }, { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; }>, 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<"alerts_realtime">; }, "strip", z.ZodTypeAny, { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; resources: { agency_ids: string[]; }; }, { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; resources?: { agency_ids?: 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"]>; 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"; 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"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>, z.ZodObject<{ action: z.ZodEnum<["read"]>; scope: z.ZodLiteral<"sams">; }, "strip", z.ZodTypeAny, { scope: "sams"; action: "read"; }, { scope: "sams"; action: "read"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "read", "lock", "request_approval"]>; 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"; resources: { agency_ids: string[]; }; }, { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval"; 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" | "update" | "delete" | "read" | "lock"; }, { scope: "organizations"; action: "create" | "update" | "delete" | "read" | "lock"; }>, 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"]>; 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" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; resources: { agency_ids: string[]; }; }, { scope: "plans"; action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; 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" | "update" | "delete" | "read" | "lock"; }, { scope: "roles"; action: "create" | "update" | "delete" | "read" | "lock"; }>, z.ZodObject<{ action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>; 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" | "update" | "delete" | "read" | "lock"; resources: { municipality_ids: string[]; agency_ids: string[]; }; }, { scope: "stops"; action: "create" | "update" | "delete" | "read" | "lock"; 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" | "update" | "delete" | "read" | "lock"; }, { scope: "users"; action: "create" | "update" | "delete" | "read" | "lock"; }>, z.ZodObject<{ action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>; 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<"dates">; }, "strip", z.ZodTypeAny, { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources: { agency_ids: string[]; }; }, { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources?: { agency_ids?: string[] | undefined; } | undefined; }>]>, "many">>>; }, "strip", z.ZodTypeAny, { is_locked?: boolean | undefined; updated_by?: string | undefined; name?: string | undefined; permissions?: ({ scope: "agencies"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; 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"; resources: { agency_ids: string[]; }; } | { scope: "sams"; action: "read"; } | { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources: { agency_ids: string[]; }; } | { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval"; resources: { agency_ids: string[]; }; } | { scope: "home"; action: "read_links" | "read_wiki"; } | { scope: "organizations"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "performance"; action: "read"; } | { scope: "plans"; action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; resources: { agency_ids: string[]; }; } | { scope: "roles"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "stops"; action: "create" | "update" | "delete" | "read" | "lock"; resources: { municipality_ids: string[]; agency_ids: string[]; }; } | { scope: "users"; action: "create" | "update" | "delete" | "read" | "lock"; })[] | undefined; }, { is_locked?: boolean | undefined; updated_by?: string | undefined; name?: string | undefined; permissions?: ({ scope: "agencies"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_scheduled"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "alerts_realtime"; action: "create" | "update" | "delete" | "read" | "lock"; resources?: { agency_ids?: 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"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "sams"; action: "read"; } | { scope: "dates"; action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "gtfs_validations"; action: "create" | "read" | "lock" | "request_approval"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "home"; action: "read_links" | "read_wiki"; } | { scope: "organizations"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "performance"; action: "read"; } | { scope: "plans"; action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy"; resources?: { agency_ids?: string[] | undefined; } | undefined; } | { scope: "roles"; action: "create" | "update" | "delete" | "read" | "lock"; } | { scope: "stops"; action: "create" | "update" | "delete" | "read" | "lock"; resources?: { municipality_ids?: string[] | undefined; agency_ids?: string[] | undefined; } | undefined; } | { scope: "users"; action: "create" | "update" | "delete" | "read" | "lock"; })[] | undefined; }>; export type Role = z.infer<typeof RoleSchema>; export type CreateRoleDto = z.infer<typeof CreateRoleSchema>; export type UpdateRoleDto = z.infer<typeof UpdateRoleSchema>;