@diister/quick-permission@0.7.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
A flexible and type-safe permission system for TypeScript/JavaScript applications.
default
Quick Permission Library
core/hierarchy
Hierarchy management for the permission system
Creates a state set with default values for all permissions in a hierarchy
Creates a flat representation of a permission hierarchy
Creates a permission hierarchy object
Finds all permissions that are satisfied by a given key in the hierarchy
core/permission
Core permission module for creating and configuring permissions
Creates a permission object with schemas, rules, optional children and default state
Creates a typed permission rule with the specified schemas and validation logic.
core/validation
Validation logic for the permission system
Converts a flat array of permission state tuples to a standard permission state set This allows using the tuple format for storage while keeping the internal validation logic unchanged
Validates a permission request against a set of permission states
Validates a permission request using a flat array of permission states This is an alternative to the standard validate function that accepts a more database-friendly format
Creates a rule that validates target-based permissions
Creates a rule that validates time constraints
Creates an owner schema for permission validation
Request type for ownership schema Requires both 'from' and 'owner' properties as strings
State type for ownership schema No specific state structure is required
Creates a target schema for permission validation
Request type for target schema Requires both 'from' and 'target' properties as strings
Utility type to extract all unique schemas from rules
Flattens a hierarchy into a structure with paths and values
Represents a flat array of permission state entries This is an alternative to PermissionStateSet that uses tuples instead of an object
Defines the structure of a permission hierarchy
Represents a specific permission element within a hierarchy
Represents a processed permission hierarchy with additional metadata
Represents the key of a permission within a hierarchy
Represents the requests associated with a permission
Combines explicit schemas with those extracted from rules
Represents the states associated with a permission
Represents a permission state set for a hierarchy
Represents a flat permission state entry using a tuple format This format is easier to store in databases as it avoids nested objects
Constants defining the possible outcomes of a validation operation
Describes an error that occurred during permission validation
The type of result returned by a rule validation
Represents a schema that defines and validates state and request structures
Utility type that merges the Request types from an array of schemas
Utility type that merges the State types from an array of schemas