import { Equatable, Serializable } from "./../../utilities"; import { GrantType } from "./grant-type.type"; /** * GrantSet * * A set of grants for each action type (create, read, update, and delete). * Each grant in a Grant Set has three possible values. * "any" means any entity can perform the action. * "own" means only the resource owner can perform the action. * "none" means the action is completely restricted. */ export declare class GrantSet implements Equatable, Serializable { readonly create: GrantType; readonly read: GrantType; readonly update: GrantType; readonly delete: GrantType; /** * Creates a Grant Set * @param createGrant the create grant * @param readGrant the view (read) grant. * @param updateGrant the update grant. * @param deleteGrant the destroy (delete) grant. */ constructor(createGrant: GrantType, readGrant: GrantType, updateGrant: GrantType, deleteGrant: GrantType); /** * All() * * Creates a GrantSet instance that grants access to all actions. * @returns the created grant set */ static All(): GrantSet; /** * None() * * Creates a GrantSet instance that grants no actions. * @returns the created grant type */ static None(): GrantSet; /** * Private() * * creates a GrantSet instance that only allows the owner to perform access or modify actions. * @returns the created instance */ static Private(): GrantSet; /** * Protected() * * Creates a GrantSet instance where anyone can create and view. However, only the owner of the resource can update and delete. * @returns The created instance */ static Protected(): GrantSet; /** * Public() * * Creates a GrantSet where all actions are permitted except the destroy action. * @returns The created instance. */ static Public(): GrantSet; /** * ViewOnly() * * Creates a GrantSet where the view action is the only allowed action. * @returns the created instance. */ static ViewOnly(): GrantSet; equals(suspect: any): boolean; serialize(): string; }