@signatu/policy
Version:
signatu policy components
99 lines (98 loc) • 2.98 kB
TypeScript
import { Language, LegalBasis } from "@signatu/common-lib";
import { PolicyElement, PolicyElementJSON } from './policyElement';
import { TextTranslation } from '../..';
export declare enum DataProcessingAction {
COLLECT = "COLLECT",
STORE = "STORE",
USE = "USE",
TRANSFER = "TRANSFER",
PROCESS = "PROCESS",
RECORD = "RECORD",
ORGANIZE = "ORGANIZE",
STRUCTURE = "STRUCTURE",
ADAPT = "ADAPT",
ALTER = "ALTER",
RETRIEVE = "RETRIEVE",
CONSULT = "CONSULT",
DISCLOSE = "DISCLOSE",
ALIGN = "ALIGN",
COMBINE = "COMBINE",
RESTRICT = "RESTRICT",
ERASE = "ERASE",
DESTRUCT = "DESTRUCT",
PROFILE = "PROFILE"
}
export interface TranslationType {
controller: string;
subject: string;
in: string;
to: string;
actions: {
COLLECT: string;
STORE: string;
USE: string;
TRANSFER: string;
PROCESS: string;
RECORD: string;
ORGANIZE: string;
STRUCTURE: string;
ADAPT: string;
ALTER: string;
RETRIEVE: string;
CONSULT: string;
DISCLOSE: string;
ALIGN: string;
COMBINE: string;
RESTRICT: string;
ERASE: string;
DESTRUCT: string;
PROFILE: string;
};
}
export declare const TRANSLATIONS: {
[language: string]: TranslationType;
};
export interface DataProcessingSpec {
id?: string;
action: DataProcessingAction;
data: string;
purpose: string;
location?: string;
sensitive?: boolean;
consentTarget?: boolean;
legalBasis?: LegalBasis;
texts?: TextTranslation[];
}
export interface DataProcessingGroup {
id?: string;
name: string;
description?: string;
/** The specs belonging to this group */
specs?: DataProcessingSpec[];
}
export interface PolicyDataProcessingJSON extends DataProcessingSpec, PolicyElementJSON {
}
export declare class PolicyDataProcessing extends PolicyElement {
action: DataProcessingAction;
data: string;
purpose: string;
location?: any;
sensitive?: any;
consentTarget?: any;
legalBasis?: LegalBasis;
static readonly supportedActions: DataProcessingAction[];
/** masterText is in English */
readonly masterText: string;
static supportsLanguage(language: Language): boolean;
static supportsIsoLanguage(isoLanguage: string): boolean;
static fromJSON(json: PolicyDataProcessingJSON): PolicyDataProcessing;
constructor(action: DataProcessingAction, data: string, purpose: string, location?: any, sensitive?: any, consentTarget?: any, legalBasis?: LegalBasis);
controllerText(lang: Language | string): string;
subjectText(lang: Language | string): string;
purposeText(lang: Language | string): string;
actionText(lang: Language | string): string;
locationText(lang: Language | string): string;
createText(lang: string | Language): string;
toJSON(): PolicyDataProcessingJSON;
private toLanguage;
}