/** * Permission types for @siesa/master-pattern-view * * Defines the permission model for the MasterPatternView component. * Follows the NEVER-HIDE invariant: permissions disable UI elements, * never remove them from the DOM. * * @module permissions.types * @see FR-006 — Permission system */ /** * Action types that can be permission-gated. * Used in onError callbacks and permission evaluation. * * @see FR-006 — MasterPatternViewActionType union */ export type MasterPatternViewActionType = 'create' | 'read' | 'update' | 'delete' | 'changeStatus' | 'companyEnable' | 'export' | 'import' | 'updateGlobal'; /** * Permission configuration for MasterPatternView. * All properties are optional and default to `true` when the prop is absent. * * NEVER-HIDE invariant: When a permission is `false`, the corresponding UI * element is rendered as `disabled` with a warning toast — never removed from DOM. * * @see FR-006 — Seven permission keys (all camelCase) * * @param canCreate - Enable the "+ Crear" button * @param canRead - Enable the "Ver/Visualizar" row action * @param canUpdate - Enable the "Editar" row action and form submit * @param canUpdateGlobal - Enable the "Global" context selector option (GLOBAL only) * @param canChangeStatus - Enable the "Cambiar estado" row action * @param canCompanyEnable - Enable the "Asignar empresa" toolbar button (GLOBAL only) * @param canDelete - Declared for future use; no UI in v1 */ export interface MasterPatternViewPermissions { canCreate?: boolean; canRead?: boolean; canUpdate?: boolean; canUpdateGlobal?: boolean; canChangeStatus?: boolean; canCompanyEnable?: boolean; canDelete?: boolean; } //# sourceMappingURL=permissions.types.d.ts.map