/// <reference types="react" />
import { collectionMetricsFromAiModelTestResultCSVApiResponse } from "../../../../../service/DataService";
import { FileMetaData } from "./common";
import { ICommonQueryParams, ICommonResponse, ICommonState } from "./common";
import { DataSetSortField, ResourceImageAnnotation, SortOrder, ResourceStatus, TrimmedText, ResourceImageGroupAnnotation, WordMetadata } from './data';
import { IModel, IModelType } from "./models";
export interface InputFieldState<ValueType> {
    isPlanogram?: boolean;
    value: ValueType;
    isDirty?: boolean;
    isTouched?: boolean;
    errorMessage?: string;
    canShowErrorToUser?: boolean;
    inProgress?: boolean[];
}
/**
 * Collection
 */
export type IParentDataSetCollection = {
    _id: string;
    name: string;
};
export interface ICollection extends IParentDataSetCollection {
    name: string;
    tags: {
        value: string;
    }[];
    image_data: string[];
    _id: string;
    model: string;
    path_to_csv: string;
    max_models?: string;
    resources?: string[];
    totalNoOfResources?: number;
    max_runtime_secs_per_model?: string;
    response_variable?: string;
    created_at: string;
    updated_at: string;
    description: string;
    isResourcesFileDownloadLinkBeingFetched?: boolean;
    parentCollections?: IParentDataSetCollection[];
    isDeleteHappening?: boolean;
    created_by?: string;
    dataBoost: number;
    dataSetResourcesLabelCount?: IDatasetResourcesLabelCount[];
    remarks?: {
        text: string;
        updated_at: string;
    };
    version?: string;
}
export interface IDatasetResourcesLabelCount {
    label: string;
    count: number;
}
export interface IResourceAnalyticsCollection {
    predictionStatus: "CORRECT" | "INCORRECT";
    label: string;
    _id: string;
    resourceUrl: string;
    referenceResourceId?: string;
    spectrogram?: string;
    annotations?: string;
    prediction: string;
    /** used only for resources which are part of bookTranslation Models */
    originalLanguageParagraph?: string;
    /** used only for resources which are part of imageAnnotation Models */
    imageAnnotations?: ResourceImageAnnotation[];
    /** applicable for audio model type */
    startTime: number;
    /** applicable for audio model type */
    endTime: number;
    /** applicable for audio model type */
    status?: ResourceStatus;
    /** applicable for audio / image / imageAnnotation / imageAnnotationGroup model types */
    fileName?: string;
    originalResource?: [];
    confidence_score: number;
    statusLastModifiedAt: string;
    labels: ILabelConfidenceScore[];
    dataSetCollections?: {
        _id: string;
        name: string;
    }[];
    modelCollectionSpecificData?: {
        [modelCollectionId: string]: {
            confidenceScore: string;
        };
    };
    /** applicable for DLP, bookTranslation model type */
    resource?: string;
    /** applicable for DLP model type */
    trimmedTexts?: TrimmedText[];
    resourceMetaData?: FileMetaData;
    resource500WMetaData?: FileMetaData;
    resource500WUrl?: string;
    groundTruthAnnotations?: ResourceImageAnnotation[];
    groundTruthImageAnnotationGroups?: ResourceImageGroupAnnotation[];
    predictedImageAnnotationGroups?: ResourceImageGroupAnnotation[];
    predictedAnnotations?: ResourceImageAnnotation[];
    /** applicable for segmentation analytics */
    groundTruthAnnotation?: ResourceImageAnnotation;
    predictedAnnotation?: ResourceImageAnnotation;
    /** applicable for segmentation analytics end */
    iouScore?: number;
    metadata?: string;
    wordErrorRate?: number;
    audioTranscriptionWordsMetadatas?: WordMetadata[];
    analyticsPurposeModelData?: {
        model?: {
            name: string;
            _id: string;
            project: string;
            type: IModelType;
        };
        isSegmentationModelAnalyticsEnabled?: boolean;
    };
}
export interface IAnalyticsModelData {
    analyticsAiAssistantDescription: string;
    analyticsAiAssistantEnabled: JSX.Element;
    status: IStatus;
    testDatasetCollection: {
        name: string;
    };
    trainingDatasetCollection: string[];
    version: string;
    modelType: IModelType;
    model: IModel;
}
export interface IAnalyticsResourcesResponse {
    modelCollection: IAnalyticsModelData;
    resourcesData: {
        resources: IResourceAnalyticsCollection[];
        totalCount: number;
    };
}
/**
 * Action Payloads
 */
export type setIsDataSetCollectionResourcesFileDownloadLinkBeingFetchedActionPayload = {
    dataSetCollectionId: string;
    isDownloadLinkBeingFetched: boolean;
};
/** Model Collection Fields */
type IBackgroundFrequency = number;
type IBackgroundVolume = number;
type IBatchSize = number;
type IClipDuration = number;
type IDctCoefficientCount = number;
type IEvaluationStepInterval = number;
type ILearningRate = string;
export type IStatus = 'Queued' | 'Trained' | 'Failed' | 'Live' | "Training" | "Preparing Request" | "Re-Trained" | "Tested";
export type IAnalyticsScenario = "integrity" | "classAccuracy";
export type ITrainingDataDirectory = string;
export type ITestDataSet = string;
type ITrainingDataDirectories = ITrainingDataDirectory[];
type ITestDataSets = ITestDataSet[];
type ITestModelVersions = string[];
type IModelArchitecture = string;
type IModelDescription = string;
type IModelSizeInfo = string;
type ISampleRate = number;
type ISaveStepInterval = number;
type ISilencePercentage = number;
type IStartCheckpoint = string;
type ITestingPercentage = number;
type ITimeShift = number;
type ITrainingSteps = string;
type IUnknownPercentage = number;
type IValidationPercentage = number;
export type IModelCollectionVersion = string;
type IWindowSize = number;
type IWindowStride = number;
export type AnalyticsResourceView = "grid-view" | "list-view";
/** Model Collection Fields End */
export interface IModelCollectionAdditionalFile {
    description: string;
    name: string[];
    _id: string;
    fileObjects: {
        fileName: string;
        gcsFileName: string;
    }[];
}
export interface ICachedMetrics {
    accuracy: IAccuracy;
    integrity: IIntegrity;
}
export interface IAccuracy {
    accuracy: number;
    iouThreshold: number;
}
export interface IIntegrity {
    dataSetCollectionId?: string;
    integrity: number;
    confidenceScoreThreshold: number;
    iouThreshold: number;
}
export interface IModelCollectionAnalysisFile {
    accuracy: number;
    description: string;
    name: string[];
    _id: string;
    defaultDataSetCollectionName?: string;
    defaultDataSetResourcesGcsFileName?: string;
    fileObjects: {
        fileName: string;
        gcsFileName: string;
    }[];
    cachedMetrics: ICachedMetrics;
    dataSetCollection: {
        resources: string[];
    };
    segmentationStatistics?: {
        F1: number;
        IntegrityAccuracy: number;
        Precision: number;
        Recall: number;
        integrityFrequency: number;
        "Mean Average Precision": number;
        "Average IoU": number;
        Labels: {
            [label: string]: {
                F1: number;
                IntegrityAccuracy: number;
                "Mean Average Precision": number;
                Precision: number;
                Recall: number;
                integrityFrequency: number;
                "Average IoU": number;
            };
        };
    };
}
export interface IModelCollectionCheckpointFile {
    description: string;
    name: string;
    isDefaultCheckpoint: boolean;
    files: {
        models: {
            description: string;
            name: string[];
            _id: string;
            fileObjects: {
                fileName: string;
                gcsFileName: string;
            }[];
        };
        additionalFiles: IModelCollectionAdditionalFile[];
        analysis: IModelCollectionAnalysisFile[];
    };
    _id: string;
    gcsFileName?: string;
    jsonFileData?: any;
}
export type reTestingStatusType = "preparingRequest" | "queued" | "failed";
export interface ITestCollectionAnalysisFile {
    accuracy: number;
    description: string;
    name: string[];
    _id: string;
    defaultDataSetCollectionName?: string;
    defaultDataSetResourcesGcsFileName?: string;
    fileObjects: {
        fileName: string;
        gcsFileName: string;
    }[];
}
export interface ITestCollectionCheckpointFile {
    name?: string;
    files: {
        analysis: ITestCollectionAnalysisFile[];
    };
    _id: string;
    gcsFileName?: string;
    jsonFileData?: any;
}
export interface IReTestingDetails {
    defaultDataSetCollectionId: string;
    defaultDataSetCollectionName: string;
    created_at: string;
    status: reTestingStatusType;
}
export interface IReTestApiResponse {
    reTestingDetails: IReTestingDetails;
    AlreadyInProgress: boolean;
}
export interface IReTestingRequestPayload {
    modelCollectionId: string;
    forceReTest: boolean;
}
export interface IReTestingDetailsUpdate {
    id: string;
    reTestingDetail: IReTestingDetails;
}
export interface IModelCollection {
    testDataSet: ITestDataSets;
    accuracy?: number;
    defaultDataSetCollectionName?: string;
    defaultDataSetCollectionId?: string;
    defaultDataSetGcsFileName?: string;
    jsonFileDataForAccuracy?: Object;
    _id: string;
    status: IStatus;
    model: {
        _id: string;
        type: IModelType;
        segmentationModelAnalyticsAccuracyMetric: string;
        isSegmentationModelAnalytics: boolean;
        project: {
            _id: string;
        };
    };
    trainingDataDirectory: ITrainingDataDirectories;
    modelArchitecture: IModelArchitecture;
    hyperParameter: string;
    modelDescription: IModelDescription;
    startCheckpoint: IStartCheckpoint;
    startCheckpointFileName?: string;
    startCheckpointFileGCSName?: string;
    startCheckpointFileModelCollectionVersion?: string;
    version: IModelCollectionVersion;
    checkpointFiles: IModelCollectionCheckpointFile[];
    resourcesFileName: string;
    resourcesGcsFileName: string;
    populatedDefaultDataSetCollection?: {
        name?: string;
    };
    numberOfLayersToFreeze?: number;
    created_at: string;
    created_by?: string;
    updated_at: string;
    last_deployed_at?: string;
    reTestingDetail?: IReTestingDetails;
    remarks?: {
        text: string;
        updated_at: string;
    };
    projectName?: string;
    modelName?: string;
    resourceFileDownloadURL?: string;
    defaultDatasetCollectionFileDownloadURL?: string;
    modelCollections: any[];
    trainedModelCollectionPopupQnA?: trainedModelCollectionPopupQnA;
    QnAPopupLastSnoozedAt?: string;
    resourcesFileUrl?: string;
    tags: {
        value: string;
    }[];
    trainingCompletionPercentages?: {
        completionPercentage: Number;
        testDataSetCollectionId: string;
    }[];
}
export interface trainedModelCollectionPopupQnA {
    [name: string]: {
        question: string;
        answer: string;
    };
}
export interface ParentCollection {
    _id: string;
    name: string;
}
export interface TestDataSetCollection {
    _id: string;
    resources?: string[];
    resourcesFileName?: string;
    description?: string;
    name?: string;
    model?: string;
    parentCollections?: ParentCollection[];
    created_at?: Date;
    updated_at: Date;
}
export interface TestFile {
    isDefaultCheckpoint?: boolean;
    description?: string;
    name: string;
    _id: string;
    url: string;
}
export interface PopulatedModelCollection {
    _id: string;
    status?: string;
    trainingDataDirectory?: string[];
    startCheckpoint?: string;
    model?: string;
    modelArchitecture?: string;
    modelDescription?: string;
    version: number;
    checkpointFiles: TestFile[];
    created_at?: Date | string;
    updated_at?: Date | string;
}
export interface ITestCollection {
    _id: string;
    status: IStatus;
    model?: {
        _id: string;
        project: string;
    };
    version: number;
    files?: TestFile[];
    modelCollections?: TestModelCollectionPayload[];
    description?: string;
    created_at?: string;
    updated_at?: string;
    dataSetCollection?: TestDataSetCollection;
    resourcesFileName?: string;
    checkpointFiles: ITestCollectionCheckpointFile[];
    populatedModelCollections: PopulatedModelCollection[];
    resourcesFileUrl?: string;
    created_by?: string;
    remarks?: {
        text: string;
        updated_at: string;
    };
    testDataSet?: ITestDataSets | undefined;
    trainingDataDirectory?: ITrainingDataDirectories;
    modelArchitecture?: IModelArchitecture;
    hyperParameter?: string;
    modelDescription?: IModelDescription;
    startCheckpoint?: IStartCheckpoint;
    resourcesGcsFileName?: string;
    projectName?: string;
    modelName?: string;
    testedCollectionPopupQnA?: trainedModelCollectionPopupQnA;
    QnAPopupLastSnoozedAt?: string;
}
export interface TestModelCollectionPayload {
    modelCollection: string;
    modelCollectionCheckpointFile: string;
}
export interface ITestCollectionRequestPayload {
    model: string;
    version: string;
    dataSetCollectionIds: string[];
    modelCollections: TestModelCollectionPayload[];
    description: string;
}
export interface IAddCollection {
    title: string;
}
export interface IAddCollectionPayload {
    name: string;
    model: string;
    project?: string;
    tags?: string[];
    description: string;
    remarks?: {
        text: string;
    };
    copyResourceLabelsFrom?: {
        dataSetCollectionId: string;
        labelsToNotIncludeInResources: string[];
        labelsCountToSetInRandomOrder: {
            label: string;
            count: number;
        }[];
    };
}
export interface IDatasetCollectionPayload {
    id: string;
    description?: string;
    tags?: string[];
    remarks?: string;
}
export interface IModelCollectionPayload {
    id: string;
    modelDescription?: string;
    remarks?: string;
    tags?: string[];
    trainedModelCollectionPopupQnA?: trainedModelCollectionPopupQnA;
    QnAPopupLastSnoozedAt?: string;
    hasUserSeenIncorrectPrediction?: boolean;
    trainingCompletionPercentages?: {
        completionPercentage: Number;
        testDataSetCollectionId: string;
    }[];
}
export interface ITestCollectionPayload {
    id: string;
    remarks?: string;
    hasUserSeenIncorrectPrediction?: boolean;
    testedCollectionPopupQnA?: trainedModelCollectionPopupQnA;
    QnAPopupLastSnoozedAt?: string;
}
export type ModelCollectionDeployApiRequestPayload = {
    modelCollectionId: string;
    modelCollectionParentCheckpointFileId: string;
    modelCollectionModelFileName: string;
    trainingDataSetCollection: {
        name: string;
    };
    testDataSetCollection: {
        name: string;
    };
    architecture: {
        label: string;
    };
    modelCollectionDescription: string;
};
export interface IMergeCollectionPayload {
    name: string;
    model: string;
    description: string;
    parentCollections: {
        _id: string;
    }[];
}
export interface IDeleteCollectionPayload {
    collections: string[];
    iterateResource?: () => any;
}
export interface IDeleteCollectionConfirmPayload {
    showConfirmDeleteModal: boolean;
    collectionToDelete: ICollection | IModelCollection | ITestCollection | null;
    multiDelete: boolean;
    selectedCollectionIds: string[];
    collectionType: collectionType;
    deletedCollectionFromPopup?: boolean;
}
export type accuracyLive = {
    _id: string;
    name: string;
};
export interface IIntegrity {
    _id: string;
    isLive?: boolean;
    matchesSuccessCriteria?: string;
    totalDataSetsCount: number;
    version: string;
    accuracy: {
        type: accuracyType;
        value: number;
    };
    bands: IntegrityBand[];
    wordErrorRateBands?: IWordErrorRateBand[];
    model: IModel;
}
export interface IIndividualClassAccuracy {
    _id: string;
    status: string;
    totalDataSetsCount: number;
    version: string;
    accuracy: {
        type: accuracyType;
        value: number;
    };
    classes: IIndividualClass[];
    created_at: string;
}
export interface IntegrityBand {
    band: string;
    goodConfidenceScore: number;
    noOfDataPoints: number;
    totalGoodDataPointsCount?: number;
    totalDataPointsCount?: number;
}
export interface IWordErrorRateBand {
    band: string;
    totalDataPointsCount: number;
}
export interface IIndividualClass {
    class: string;
    goodConfidenceScore: number;
    noOfTrainingDataPoints: number;
    totalTestDataSets: number;
}
export interface IDefaultDataSetCollection {
    id: string;
    name: string;
}
export interface IDeleteModelCollectionPayload {
    collections: string[];
}
export type accuracyStatus = "preparingRequest" | "queued" | "failed" | "";
export interface IModelCollectionFetchApiQueryParams {
    limit?: number;
    model: string;
    ids?: string[];
    offset?: number;
    shouldFetchLiveModelCollection?: boolean;
    shouldCheckBestModelCollection?: boolean;
    sortOrder?: string;
    sortField?: string;
    versions?: string[];
    statuses?: string[];
    trainingDataSetCollectionNames?: string[];
    accuracyStatus?: accuracyStatus[];
    accuracyMinValue?: string;
    accuracyMaxValue?: string;
    architectures?: string[];
    createdAtMinValue?: string;
    createdAtMaxValue?: string;
    jsonFileData: "true";
    shouldFetchModelName?: boolean;
    shouldFetchProjectName?: boolean;
}
export interface IModelCollectionToCompareFetchApiQueryParams {
    modelId: string;
}
export interface IBestModelCollectionPageQueryParams {
    model: string;
    sortField?: string;
    sortOrder?: string;
    limit?: number;
}
export interface IGetAnalyticsResourcesQueryParams {
    offset?: number;
    limit?: number;
    modelId?: string;
    label?: string;
    modelCollectionId?: string;
    bandsRange?: string;
    sortBy?: string;
    sortField?: string;
    sortOrder?: string;
    labelRegex?: string;
    resourceConfidenceScoreMinValue?: string;
    resourceConfidenceScoreMaxValue?: string;
    wordErrorRateMax?: string;
    wordErrorRateMin?: string;
    resourceIouScoreMinValue?: string;
    resourceIouScoreMaxValue?: string;
    getSameHandFeedbackNotYetGiven?: string;
    getSameHandWithMultipleIds?: string;
    getSameHandWithNoMultipleIds?: string;
    predictionStatusFilter?: string;
    predictionRegex?: string;
    /**
     * only for test collection analysis scenario
     */
    testCollectionId?: string;
    /**
     * used for segmentation analytics scenario
     */
    iouThreshold?: string;
    purposeModelId?: string;
    /**
     * Used for wordErrorRate Analytics
     */
    wordErrorRateThreshold?: string;
}
export type GetIntegrityAPIModelCollectionsAdditionalDataQueryParamType = {
    modelCollectionId: string;
    iouThreshold?: number;
};
export interface IGetIntegrity {
    modelId?: string;
    modelVersions?: string;
    pageClasses?: boolean;
    modelCollectionIds?: string;
    dataSetCollectionId?: string;
    /**
     * only for test collection analytics scenario
     */
    testCollectionId?: string;
    modelCollectionsAdditionalData?: GetIntegrityAPIModelCollectionsAdditionalDataQueryParamType[] | string;
    purposeModelId?: string;
    purposeModelAdditionalData?: string;
    fetchWordErrorRateBands?: boolean;
}
export type modelCollectionAdditionalDataRequestPayloadForIndividualClassAccuracy = {
    modelCollectionId: string;
    labels: {
        label: string;
        confidenceScoreThreshold: number;
    }[];
};
export type modelCollectionAdditionalDataRequestPayloadForIntegrity = {
    modelCollectionId: string;
    confidenceScoreThreshold: number;
};
export type modelCollectionAdditionalDataRequestPayloadForTopPerforming = {
    modelCollectionId: string;
    confidenceScoreThreshold: number;
};
export interface IndividualClassAccuracyAPIRequestPayload {
    modelId: string;
    modelVersions?: string;
    pageClasses?: boolean;
    modelCollectionIds: string;
    modelCollectionsAdditionalData?: modelCollectionAdditionalDataRequestPayloadForIndividualClassAccuracy[];
    /**
     * only for test collection analytics scenario
     */
    testCollectionId: string;
}
export interface IntegrityAPIRequestPayload {
    modelId: string;
    modelCollectionIds: string;
    getTestAccuracy: boolean;
    getTestAccuracyComparisonWithLiveCollection: boolean;
    modelCollectionsAdditionalData?: modelCollectionAdditionalDataRequestPayloadForIntegrity[];
}
export interface IGetPredictionValuesQuery {
    modelId: string;
    modelCollectionId: string;
    testCollectionId?: string;
}
export interface IDatasetCollectionPageNumberQuery {
    pageRowsLimit: number;
    sortField: string;
    sortOrder: string;
}
export interface IDatasetCollectionPageNumberQueryWithModel extends IDatasetCollectionPageNumberQuery {
    modelId: string;
    dataSetCollectionName: string;
}
export interface IDatasetCollectionPageNumberQueryWithDataSet extends IDatasetCollectionPageNumberQuery {
    dataSetCollectionId: string;
}
export interface IDatasetCollectionPageNumberResponse {
    pageNumber: number;
    dataSetCollectionId: string;
}
export interface IResponseUniquePredictionValues {
    uniquePredictionsOfResources: Array<string>;
}
export interface ITestCollectionFetchQueryParams {
    limit: number;
    model: string;
    offset: number;
    populateDataSetCollection: boolean;
    populateModelCollection: boolean;
    versions?: string[];
    statuses?: string[];
    datasetIds?: string[];
    modelCollectionIds?: string[];
    sortField?: string;
    sortOrder?: string;
    projectionQuery?: unknown;
}
export interface IDeleteTestCollectionPayload {
    collections: string[];
}
export interface IModelCollectionFetchBiggestVersionOutOfAllDocumentsQueryParams {
    modelId: string;
    modelArchitecture: string;
}
export type accuracyType = "greaterThanLive" | "lessThanLive" | "equalToLive" | "noLiveExists" | "isLive";
export interface IModelAnalyticsTopPerformingModel {
    modelVersion: string;
    accuracy: {
        value: number;
        type: accuracyType;
    };
}
export interface IAnalyticsLabelConfidenceScoreQueryParams {
    modelId: string;
    modelCollectionId: string;
    resourceId: string;
    /**
     * only for test collection analytics scenario
     */
    testCollectionId: string;
    /**
     * applicable for DLP model type
     */
    receiveTrimmedTexts: "true" | "false";
    /**
     * applicable for DLP model type
     */
    receiveResourceText: "true" | "false";
}
export interface IUniqueNameCollectionQueryParams {
    modelId: string;
    datasetCollectionName: string;
}
export interface IUniqueNameCollectionResponse {
    unique: boolean;
}
export interface ICopyCollectionResponse {
    _id: string;
}
export interface ICopyCollectionPayload {
    dataSetCollectionIdToCopyFrom: string;
    dataSetCollectionIdToCopyIn: string;
    isImageAnnotationsToBeCopied: boolean;
}
export interface ILabelConfidenceScore {
    name: string;
    confidenceScore: number;
}
export interface ILabelConfidenceScoreResponse {
    /**
     * applicable for DLP model type
     */
    resource?: string;
    created_at: string;
    labels: Array<ILabelConfidenceScore>;
    /**
     * applicable for DLP model type
     */
    trimmedTexts?: TrimmedText[];
    prediction?: string;
}
export interface ILabelConfidenceScoreObject {
    [name: string]: ILabelConfidenceScoreResponse;
}
export interface IResourceLabels {
    resourceId: string;
    labels: ILabelConfidenceScoreObject;
}
export interface IModelAnalyticsTestStatisticalData {
    modelCollectionId: string;
    version: string;
    status: string;
    integrityFrequency: number;
    integrityFrequencyAccuracy: {
        value: number;
        type: accuracyType;
    };
    testAccuracy: {
        value: number;
        type: accuracyType;
    };
    created_at: string;
}
export interface IAnalyticsTableFiltersQueryParam {
    sortField: string;
    sortOrder: string;
    labelRegex: string[];
    resourceConfidenceScoreMinValue: string;
    resourceConfidenceScoreMaxValue: string;
    resourceIouScoreMinValue: string;
    resourceIouScoreMaxValue: string;
    resourceWordErrorRateMinValue?: string;
    resourceWordErrorRateMaxValue?: string;
    predictionStatusFilter: string;
    predictedStatusRegex: string[];
    getSameHandFeedbackNotYetGiven: string;
    getSameHandWithMultipleIds: string;
    getSameHandWithNoMultipleIds: string;
}
export type ResourceLabelFilterOperator = "contains" | "equals" | "starts with" | "ends with";
export interface IAnalyticsTableFilterObject extends IAnalyticsTableFiltersQueryParam {
    labelFilterOperator: ResourceLabelFilterOperator;
    statusFilterOperator: ResourceLabelFilterOperator;
}
export interface IModelAnalyticsIntegrity {
    modelVersion: string;
    integrityFrquency?: string;
    totalAccuracy?: string;
}
export interface IModelAnalyticsTestDataSet {
    label: string;
    totalLabelCount: number;
}
export interface IModelAnalyticsTrainDataSetForEachModelVersion {
    label: string;
    totalLabelCount: number;
}
export interface IModelAnalyticsTrainDataSet {
    modelCollectionId: string;
    labels: IModelAnalyticsTrainDataSetForEachModelVersion[];
}
export interface IModelAnalyticsAccuracy {
    modelCollectionId?: string;
    modelVersion: string;
    accuracy: {
        accuracyJsonData?: {
            [key: string]: any;
        };
        type: accuracyType;
        value: number;
    } | null;
    status?: string;
    created_at?: string;
    totalTrainedDataSetsCount?: number;
}
export type IUniqueTestCollectionDataSet = {
    _id: string;
    name: string;
};
export type IUniqueTestCollectionDataSets = {
    uniqueTestCollectionDatasets: IUniqueTestCollectionDataSet[];
};
export type IUniqueTestCollectionModel = {
    version: string;
    _id: string;
};
export type IUniqueTestCollectionModels = {
    uniqueModelCollections: IUniqueTestCollectionModel[];
};
export interface ITestCollectionUniqueDataPayload {
    modelId: string;
}
/**
 * Params
 */
export interface ICollectionQueryParams extends ICommonQueryParams {
    model?: string;
    sortOrder?: SortOrder;
    sortField?: DataSetSortField;
    nameRegex?: string;
    descriptionRegex?: string;
    collectionCreatedDateMinValue?: string;
    collectionCreatedDateMaxValue?: string;
    projectionQuery?: string;
    collectionIds?: Array<string>;
    limit?: string;
}
export type Navigation = "moveToLeft" | "moveToRight";
export interface IModelAnalyticsFetchAccuracyQueryParams {
    modelId: string;
    modelCollectionIds?: string;
    accuracyJsonData?: boolean;
    getStatus?: boolean;
    getCreatedTime?: boolean;
    getTotalTrainedDataSetsCount?: boolean;
    testCollectionId?: string;
}
export interface IModelAnalyticsFetchTestStatisticalDataQueryParams {
    modelId?: string;
    modelCollectionIds?: string;
    getIntegrityFrequency?: boolean;
    getIntegrityFrequencyAccuracyPercent?: boolean;
    getIntegrityFrequencyAccuracyPercentComparisonWithLiveCollection?: boolean;
    getTestAccuracy?: boolean;
    getTestAccuracyComparisonWithLiveCollection?: boolean;
    getModelCollectionCreatedTime?: boolean;
    testCollectionId?: string;
    modelCollectionsAdditionalData?: string;
    purposeModelId?: string;
}
export interface IModelCollectionsAdditionalData {
    modelCollectionId: string;
    confidenceScoreThreshold: number;
    iouThreshold?: number;
}
export interface IDataSetModelCollectionDataBoostUpdate {
    id: string;
    dataBoost: number;
}
export interface IModelAnalyticsFetchTestDatSetQueryParams {
    modelId: string;
    modelCollectionId?: string;
}
export interface IModelAnalyticsFetchTestDatSetForTestCollectionScenarioQueryParams {
    modelId: string;
    testCollectionId: string;
}
export interface IModelAnalyticsFetchTrainDataSetQueryParams {
    modelId: string;
    modelCollectionId?: string;
}
export interface IModelAnalyticsFetchIntegrityQueryParams {
    modelId: string;
    modelVersions?: string[];
}
export interface IModelAnalyticsFetchTopPerformingModelQueryParams {
    modelId: string;
    modelVersions?: string[];
}
/**
 * Responses
 */
export type GetDataSetCollectionUniqueNamesApiResponse = ITrainingDataDirectories;
export interface ICollectionsResponse extends ICommonResponse {
    collections: ICollection[];
}
export interface IModelCollectionsResponse extends ICommonResponse {
    collections: IModelCollection[];
}
export interface IModelCollectionsToCompare {
    modelCollection: string;
    modelVersion: string;
}
export interface ITestCollectionsResponse extends ICommonResponse {
    collections: ITestCollection[];
    totalCount: number;
}
export interface ITestUniqueVersions {
    uniqueTestCollectionVersions: string[];
}
export interface ITestUniqueStatuses {
    uniqueTestCollectionStatuses: string[];
}
export interface ITestUniqueModels {
    uniqueModelCollections: IUniqueTestCollectionModel[];
}
export interface ITestUniqueDataSets {
    uniqueTestCollectionDatasets: IUniqueTestCollectionDataSet[];
}
export type UniqueTestCollectionVersionsApiResponse = ITestUniqueVersions;
export type UniqueTestCollectionStatusesApiResponse = ITestUniqueStatuses;
export type UniqueTestCollectionModelsApiResponse = ITestUniqueModels;
export type UniqueTestCollectionDataSetsApiResponse = ITestUniqueDataSets;
export interface IModelAnalyticsAccuracyResponse {
    modelAnalyticsAccuracy: IModelAnalyticsAccuracy[];
}
export interface IModelAnalyticsTestDataSetResponse {
    modelAnalyticsTestDataSet: IModelAnalyticsTestDataSet[];
}
export interface IModelAnalyticsTrainDataSetResponse {
    modelAnalyticsTrainDataSet: IModelAnalyticsTrainDataSetForEachModelVersion[];
}
export interface IModelAnalyticsIntegrityResponse {
    modelAnalyticsIntegrity: IModelAnalyticsIntegrity[];
}
export interface IModelAnalyticsTopPerformingModelResponse {
    modelAnalalyticsTopPerformingModel: IModelAnalyticsTopPerformingModel[];
}
export interface IDeleteCollectionErrors {
    dataSetCollection: string;
    linkedToCollections: {
        modelCollection?: string[] | number[];
        testCollection?: string[] | number[];
    };
}
export interface ICollectionDeleteResponse {
    ok?: number;
    n?: number;
    deletedCount: number;
    deletedDataSetCount: number;
    errorMessagesDueToDataSetLinkedSomewhereElse?: IDeleteCollectionErrors[];
}
export interface IDeleteModelCollectionErrors {
    modelCollection: string;
    linkedToCollections: {
        testCollection?: string[] | number[];
        modelCollection?: string[] | number[];
    };
}
export interface ICollectionMetrics extends collectionMetricsFromAiModelTestResultCSVApiResponse {
    modelCollectionId?: string;
    testCollectionId?: string;
    modelCollectionVersion?: string;
}
export interface IModelCollectionDeleteResponse {
    deletedModelCollectionCount: number;
    ok: number;
    n: number;
    deletedCount: number;
    errorMessagesDueToDataSetLinkedSomewhereElse?: IDeleteModelCollectionErrors[];
}
export interface ITestCollectionDeleteResponse extends IModelCollectionDeleteResponse {
}
export interface IAddModelCollectionJsonFieldData {
    backgroundFrequency: IBackgroundFrequency;
    backgroundVolume: IBackgroundVolume;
    batchSize: IBatchSize;
    clipDuration: IClipDuration;
    dctCoefficientCount: IDctCoefficientCount;
    evaluationStepInterval: IEvaluationStepInterval;
    learningRate: ILearningRate;
    modelArchitecture: IModelArchitecture;
    modelDescription: IModelDescription;
    modelSizeInfo: IModelSizeInfo;
    sampleRate: ISampleRate;
    saveStepInterval: ISaveStepInterval;
    silencePercentage: ISilencePercentage;
    testingPercentage: ITestingPercentage;
    timeShift: ITimeShift;
    trainingSteps: ITrainingSteps;
    unknownPercentage: IUnknownPercentage;
    validationPercentage: IValidationPercentage;
    windowSize: IWindowSize;
    windowStride: IWindowStride;
}
export type ITrainingDataDirectoriesSelectedStateForAddModelCollection = InputFieldState<ITrainingDataDirectories>;
export type ITestVersionSelectedStateForTestModelCollection = InputFieldState<ITestModelVersions>;
export type collectionType = "dataSet" | "model" | "test" | undefined;
/**
 * Redux
 */
export interface ICollectionState extends ICommonState {
    collections: ICollectionsResponse;
    shouldFetchLatestDataSetCollectionResourceLabelsIfCurrentlyShowingInScreen: boolean;
    selected?: ICollection | null;
    addErrorMessage: string;
    dataSetCollectionsSelected: ICollection[];
    ConfirmDeleteModal: {
        showConfirmDeleteModal: boolean;
        collectionToDelete: ICollection | IModelCollection | ITestCollection | null;
        multiDelete: boolean;
        selectedCollectionIds: string[];
        collectionType: collectionType;
        deletedCollectionFromPopup: boolean;
    };
    errorMessagesDueToDataSetLinkedSomewhereElse: IDeleteCollectionErrors[] | [];
    modelCollection: {
        shouldFetchModelCollections: boolean;
        modelCollectionSelected: string;
        modelCollectionsSelected: IModelCollection[];
        modelCollectionsSelectedToCompare: string[];
        trainingDataDirectoriesSelectedStateForAddModelCollection: ITrainingDataDirectoriesSelectedStateForAddModelCollection;
        modelCollections: IModelCollection[] | null;
        totalModelCollectionsTableCount: number;
        biggestTestModelVersion: ITestVersionSelectedStateForTestModelCollection;
        errorMessagesDueToModelCollectionLinkedSomewhereElse: IDeleteModelCollectionErrors[] | [];
        deletedModelCollectionCount: number;
    };
    testCollection: {
        shouldFetchTestCollections: boolean;
        testCollectionSelected: ITestCollection | null;
        testCollectionsSelected: ITestCollection[];
        testCollectionIdSelectedByUser: string | null;
        testCollections: ITestCollectionsResponse | null;
    };
    defaultDataSetCollection: IDefaultDataSetCollection | null;
}
export {};
//# sourceMappingURL=collections.d.ts.map