import type { TDefinitionObject } from '@neon.id/core'; import type { TFilterRaw } from '@neon.id/query'; import type { NActionDef, NObjectDef } from '@neon.id/types'; import type { TPermitEffect, TPermitPayload, TPermitResult } from '../types'; import type { TRuleCanOptions, TRuleContextQuery, TRuleDefinition, TRuleIdentitasQuery, TRuleInstance, TRuleKokpitQuery } from './rule.types'; export declare class Rule> implements TRuleInstance { effect: TPermitEffect; actions: TAction[]; objects: TObject[]; kokpit?: TRuleKokpitQuery; identitas?: TRuleIdentitasQuery; context?: TRuleContextQuery; data?: TFilterRaw; details: Record; private constructor(); /** * Define a new rule. */ static define = Record>(def: TRuleDefinition): Rule; /** * Clone to a new rule instance. */ clone(): Rule; /** * Check if an action is relevant to rule. */ isRelevant(action: NActionDef): boolean; /** * Check action, data, and payload against rule. */ can(action: NActionDef, data?: Record, payload?: TPermitPayload, opts?: TRuleCanOptions): TPermitResult; private checkIdentitas; private checkObject; private checkData; private parseCriteria; private log; }