import { Viewer, ID, Ent, LoadEntOptions, PrivacyError, PrivacyPolicy, PrivacyPolicyRule, PrivacyResult } from "./base"; export declare class EntPrivacyError extends Error implements PrivacyError { privacyPolicy: PrivacyPolicy; privacyRule: PrivacyPolicyRule; ent?: Ent; constructor(privacyPolicy: PrivacyPolicy, rule: PrivacyPolicyRule, ent?: Ent); } export declare const AlwaysAllowRule: { apply(_v: Viewer, _ent?: Ent | undefined): Promise; }; export declare const AlwaysDenyRule: { apply(_v: Viewer, _ent?: Ent | undefined): Promise; }; export declare const DenyIfLoggedOutRule: { apply(v: Viewer, _ent?: Ent | undefined): Promise; }; export declare const DenyIfLoggedInRule: { apply(v: Viewer, _ent?: Ent | undefined): Promise; }; export declare const AllowIfHasIdentity: { apply(v: Viewer, _ent?: Ent | undefined): Promise; }; export declare const AllowIfViewerRule: { apply(v: Viewer, ent?: Ent | undefined): Promise; }; export declare class AllowIfViewerEqualsRule { private id; constructor(id: any); apply(v: Viewer, _ent?: Ent): Promise; } export declare class DenyIfViewerEqualsRule { private id; constructor(id: ID); apply(v: Viewer, _ent?: Ent): Promise; } interface FuncRule { (v: Viewer, ent?: Ent): boolean | Promise; } export declare class AllowIfFuncRule implements PrivacyPolicyRule { private fn; constructor(fn: FuncRule); apply(v: Viewer, ent?: Ent): Promise; } export declare class DenyIfFuncRule implements PrivacyPolicyRule { private fn; constructor(fn: FuncRule); apply(v: Viewer, ent?: Ent): Promise; } export declare class AllowIfViewerIsRule implements PrivacyPolicyRule { private property; constructor(property: string); apply(v: Viewer, ent?: Ent): Promise; } export declare class AllowIfEntIsVisibleRule implements PrivacyPolicyRule { private id; private options; constructor(id: ID, options: LoadEntOptions); apply(v: Viewer, _ent?: Ent): Promise; } export declare class AllowIfEntIsNotVisibleRule implements PrivacyPolicyRule { private id; private options; constructor(id: ID, options: LoadEntOptions); apply(v: Viewer, _ent?: Ent): Promise; } export declare class AllowIfEntIsVisiblePolicy implements PrivacyPolicy { private id; private options; constructor(id: ID, options: LoadEntOptions); rules: { apply(_v: Viewer, _ent?: Ent | undefined): Promise; }[]; } export declare class DenyIfEntIsVisiblePolicy implements PrivacyPolicy { private id; private options; constructor(id: ID, options: LoadEntOptions); rules: { apply(_v: Viewer, _ent?: Ent | undefined): Promise; }[]; } export declare class DenyIfEntIsVisibleRule implements PrivacyPolicyRule { private id; private options; constructor(id: ID, options: LoadEntOptions); apply(v: Viewer, _ent?: Ent): Promise; } export declare class DenyIfEntIsNotVisibleRule implements PrivacyPolicyRule { private id; private options; constructor(id: ID, options: LoadEntOptions); apply(v: Viewer, _ent?: Ent): Promise; } export declare class AllowIfEdgeExistsRule implements PrivacyPolicyRule { private id1; private id2; private edgeType; constructor(id1: ID, id2: ID, edgeType: string); apply(v: Viewer, _ent?: Ent): Promise; } export declare class AllowIfViewerInboundEdgeExistsRule implements PrivacyPolicyRule { private edgeType; constructor(edgeType: string); apply(v: Viewer, ent: Ent): Promise; } export declare class AllowIfViewerOutboundEdgeExistsRule implements PrivacyPolicyRule { private edgeType; constructor(edgeType: string); apply(v: Viewer, ent?: Ent): Promise; } export declare class DenyIfEdgeExistsRule implements PrivacyPolicyRule { private id1; private id2; private edgeType; constructor(id1: ID, id2: ID, edgeType: string); apply(v: Viewer, _ent?: Ent): Promise; } export declare class DenyIfViewerInboundEdgeExistsRule implements PrivacyPolicyRule { private edgeType; constructor(edgeType: string); apply(v: Viewer, ent?: Ent): Promise; } export declare class DenyIfViewerOutboundEdgeExistsRule implements PrivacyPolicyRule { private edgeType; constructor(edgeType: string); apply(v: Viewer, ent?: Ent): Promise; } export declare class DenyIfEdgeDoesNotExistRule implements PrivacyPolicyRule { private id1; private id2; private edgeType; constructor(id1: ID, id2: ID, edgeType: string); apply(v: Viewer, _ent?: Ent): Promise; } export declare class DenyIfViewerInboundEdgeDoesNotExistRule implements PrivacyPolicyRule { private edgeType; constructor(edgeType: string); apply(v: Viewer, ent?: Ent): Promise; } export declare class DenyIfViewerOutboundEdgeDoesNotExistRule implements PrivacyPolicyRule { private edgeType; constructor(edgeType: string); apply(v: Viewer, ent?: Ent): Promise; } export declare class AllowIfConditionAppliesRule implements PrivacyPolicyRule { private fn; private rule; constructor(fn: FuncRule, rule: PrivacyPolicyRule); apply(v: Viewer, ent?: Ent): Promise; } interface DelayedFuncRule { (v: Viewer, ent?: Ent): null | PrivacyPolicyRule | Promise; } export declare class DelayedResultRule implements PrivacyPolicyRule { private fn; constructor(fn: DelayedFuncRule); apply(v: Viewer, ent?: Ent): Promise; } export declare class AllowIfSubPolicyAllowsRule implements PrivacyPolicyRule { private policy; constructor(policy: PrivacyPolicy); apply(v: Viewer, ent?: Ent): Promise; } export declare function applyPrivacyPolicy(v: Viewer, policy: PrivacyPolicy, ent: Ent | undefined): Promise; export declare function applyPrivacyPolicyX(v: Viewer, policy: PrivacyPolicy, ent: Ent | undefined, throwErr?: () => Error): Promise; export declare const AlwaysAllowPrivacyPolicy: PrivacyPolicy; export declare const AlwaysDenyPrivacyPolicy: PrivacyPolicy; export declare const AllowIfViewerPrivacyPolicy: PrivacyPolicy; export declare const AllowIfViewerHasIdentityPrivacyPolicy: PrivacyPolicy; export {};