2017-08-24 00:23:48 -07:00
|
|
|
import { ApiStatus } from 'wherehows-web/utils/api/shared';
|
2017-10-16 11:35:13 -07:00
|
|
|
import {
|
|
|
|
FieldIdValues,
|
|
|
|
Classification,
|
|
|
|
IdLogicalType,
|
|
|
|
CustomIdLogicalType,
|
|
|
|
NonIdLogicalType,
|
|
|
|
DatasetClassifiers
|
|
|
|
} from 'wherehows-web/constants';
|
2017-08-16 13:28:13 -07:00
|
|
|
|
|
|
|
/**
|
2017-10-16 11:35:13 -07:00
|
|
|
* Describes the interface for a dataset's compliance suggestion
|
|
|
|
* @export
|
|
|
|
* @interface IComplianceSuggestion
|
2017-08-16 13:28:13 -07:00
|
|
|
*/
|
2017-10-16 11:35:13 -07:00
|
|
|
export interface IComplianceSuggestion {
|
|
|
|
// The urn for the dataset
|
|
|
|
urn: string;
|
|
|
|
// A list of suggested values for each field
|
|
|
|
suggestedFieldClassification: Array<ISuggestedFieldClassification>;
|
|
|
|
// A key value pair for dataset classification keys to suggested boolean values
|
|
|
|
suggestedDatasetClassification: ISuggestedDatasetClassification;
|
|
|
|
// the last modified date for the suggestion
|
|
|
|
lastModified: number;
|
2017-10-03 18:07:38 -07:00
|
|
|
}
|
|
|
|
|
2017-08-16 13:28:13 -07:00
|
|
|
/**
|
2017-10-16 11:35:13 -07:00
|
|
|
* Describes the interface for an object containing suggested compliance metadata field values
|
|
|
|
* @export
|
|
|
|
* @interface ISuggestedFieldClassification
|
2017-08-16 13:28:13 -07:00
|
|
|
*/
|
2017-10-16 11:35:13 -07:00
|
|
|
export interface ISuggestedFieldClassification {
|
|
|
|
confidenceLevel: number;
|
|
|
|
suggestion: {
|
|
|
|
identifierType: FieldIdValues;
|
|
|
|
identifierField: string;
|
|
|
|
logicalType: IdLogicalType | CustomIdLogicalType | NonIdLogicalType;
|
|
|
|
securityClassification: Classification;
|
|
|
|
};
|
2017-08-16 13:28:13 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-10-16 11:35:13 -07:00
|
|
|
* Describes the interface for an object containing suggested compluabce metadata for a dataset
|
|
|
|
* @export
|
|
|
|
* @interface ISuggestedDatasetClassification
|
2017-08-16 13:28:13 -07:00
|
|
|
*/
|
2017-10-16 11:35:13 -07:00
|
|
|
export type ISuggestedDatasetClassification = {
|
|
|
|
[K in DatasetClassifiers]: {
|
|
|
|
contain: boolean;
|
|
|
|
confidenceLevel: number;
|
|
|
|
}
|
|
|
|
};
|
2017-08-16 13:28:13 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Describes the expected affirmative API response for a the compliance suggestion
|
2017-10-16 11:35:13 -07:00
|
|
|
* @export
|
|
|
|
* @interface IComplianceSuggestionResponse
|
2017-08-16 13:28:13 -07:00
|
|
|
*/
|
|
|
|
export interface IComplianceSuggestionResponse {
|
|
|
|
status: ApiStatus;
|
2017-10-16 11:35:13 -07:00
|
|
|
complianceSuggestion?: IComplianceSuggestion;
|
2017-08-16 13:28:13 -07:00
|
|
|
}
|