@signatu/policy
Version:
signatu policy components
21 lines (20 loc) • 766 B
TypeScript
import { Metadata, Node, Tree } from '@signatu/common-lib';
import { PolicyElementJSON } from '..';
import { PolicyElement } from './elements/policyElement';
export interface PolicyJSON extends PolicyElementJSON {
metadata: any;
languages: string[];
}
export declare class Policy extends PolicyElement {
languages: string[];
static loadPolicy(url: string, accessToken?: string): Promise<Policy>;
static fromJSON(json: PolicyJSON): Policy;
static reviver(key: string, value: any): any;
tree: Tree;
metadata: Metadata;
constructor(masterText: string, languages?: string[]);
addElement(element: PolicyElement, parent?: PolicyElement): Node;
merge(otherPolicy: Policy): Policy;
number(): void;
toJSON(): PolicyJSON;
}