blob: 316c84fca8d464a9417aea774f9448156aea6cea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export interface IPropertyData {
classification: 'SystemMetaData' | 'CallstackOrException' | 'CustomerContent' | 'PublicNonPersonalData' | 'EndUserPseudonymizedInformation';
purpose: 'PerformanceAndHealth' | 'FeatureInsight' | 'BusinessInsight';
owner?: string;
comment?: string;
expiration?: string;
endpoint?: string;
isMeasurement?: boolean;
}
export interface IGDPRProperty {
readonly [name: string]: IPropertyData | undefined | IGDPRProperty;
}
export type ClassifiedEvent<T extends IGDPRProperty> = {
[k in keyof T]: any
};
export type StrictPropertyChecker<TEvent, TClassifiedEvent, TError> = keyof TEvent extends keyof TClassifiedEvent ? keyof TClassifiedEvent extends keyof TEvent ? TEvent : TError : TError;
export type StrictPropertyCheckError = 'Type of classified event does not match event properties';
export type StrictPropertyCheck<T extends IGDPRProperty, E> = StrictPropertyChecker<E, ClassifiedEvent<T>, StrictPropertyCheckError>;
export type GDPRClassification<T> = { [_ in keyof T]: IPropertyData | IGDPRProperty | undefined };
|