2017-08-16 13:28:13 -07:00
|
|
|
import { ApiStatus } from 'wherehows-web/utils/api';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Describes the prediction property in a compliance suggestion
|
|
|
|
*/
|
|
|
|
interface IPrediction {
|
|
|
|
// Percentage confidence level for this prediction
|
|
|
|
confidence: number;
|
|
|
|
// The predicted value
|
|
|
|
value: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Describes shape of a compliance auto suggestion
|
|
|
|
*/
|
|
|
|
export interface IComplianceSuggestion {
|
|
|
|
// The name of the field
|
|
|
|
fieldName: string;
|
|
|
|
// Prediction for the identifierType
|
|
|
|
identifierTypePrediction: IPrediction | null;
|
|
|
|
// Prediction for the logicalType
|
|
|
|
logicalTypePrediction: IPrediction | null;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Describes the expected properties for the autoClassification on a compliance suggestions api response
|
|
|
|
*/
|
|
|
|
interface IAutoClassification {
|
|
|
|
// The urn for the dataset
|
|
|
|
urn: string;
|
2017-08-18 03:42:40 -07:00
|
|
|
// a JSON string: array of suggestions available for fields on this dataset
|
2017-08-16 13:28:13 -07:00
|
|
|
classificationResult: string;
|
|
|
|
// the last modified date for the suggestion
|
|
|
|
lastModified: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Describes the expected affirmative API response for a the compliance suggestion
|
|
|
|
*/
|
|
|
|
export interface IComplianceSuggestionResponse {
|
|
|
|
status: ApiStatus;
|
|
|
|
autoClassification?: IAutoClassification;
|
|
|
|
}
|