/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/schemaoptions" />
/// <reference types="mongoose/types/utility" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/aggregate" />
/// <reference types="mongoose/types/callback" />
/// <reference types="mongoose/types/collection" />
/// <reference types="mongoose/types/connection" />
/// <reference types="mongoose/types/cursor" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/error" />
/// <reference types="mongoose/types/expressions" />
/// <reference types="mongoose/types/helpers" />
/// <reference types="mongoose/types/middlewares" />
/// <reference types="mongoose/types/indexes" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/mongooseoptions" />
/// <reference types="mongoose/types/pipelinestage" />
/// <reference types="mongoose/types/populate" />
/// <reference types="mongoose/types/query" />
/// <reference types="mongoose/types/schemaoptions" />
/// <reference types="mongoose/types/schematypes" />
/// <reference types="mongoose/types/session" />
/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/utility" />
/// <reference types="mongoose/types/validation" />
/// <reference types="mongoose/types/virtuals" />
/// <reference types="mongoose/types/inferschematype" />
import Joi from 'joi';
import mongoose, { Model } from 'mongoose';
export interface IScoringRule {
    score: number;
    equals?: string | number | boolean;
    lt?: number;
    lte?: number;
    gt?: number;
    gte?: number;
    between?: [number, number];
}
export type TScorecardVersionCriterionTypes = typeof SCORECARD_CRITERION_TYPES[number];
export declare const SCORECARD_CRITERION_TYPES: readonly ["boolean", "enum", "number", "range", "rating"];
export declare const SCORECARD_CRITERION_TYPE: {
    readonly BOOLEAN: "boolean";
    readonly ENUM: "enum";
    readonly NUMBER: "number";
    readonly RANGE: "range";
    readonly RATING: "rating";
};
export interface IScorecardDefinition {
    sections: {
        key: string;
        label: string;
        order: number;
        maxScore: number;
        criteria: {
            key: string;
            label: string;
            type: TScorecardVersionCriterionTypes;
            options?: {
                value: string;
                label: string;
            }[];
            min?: number;
            max?: number;
            step?: number;
            prefix?: string;
            suffix?: string;
            rules: IScoringRule[];
        }[];
    }[];
}
export type TScorecardVersionStatus = typeof SCORECARD_VERSION_STATUSES[number];
export declare const SCORECARD_VERSION_STATUSES: readonly ["draft", "active", "archived"];
export declare const SCORECARD_VERSION_STATUS: {
    readonly DRAFT: "draft";
    readonly ACTIVE: "active";
    readonly ARCHIVED: "archived";
};
export declare const RISK_RATINGS: readonly ["PASS", "SPECIAL_MENTION", "SUBSTANDARD", "DOUBTFUL"];
export type TRiskRating = typeof RISK_RATINGS[number];
export interface IDecisionRule {
    when: {
        key: string;
        equals: string | number | boolean;
    };
    result: TRiskRating;
    priority: number;
}
export interface IScoreBand {
    min: number;
    max?: number;
    result: TRiskRating;
}
export interface IScorecardVersion {
    scorecardId: mongoose.Types.ObjectId;
    version: string;
    status: TScorecardVersionStatus;
    validFrom: Date;
    validTo?: Date;
    definition: IScorecardDefinition;
    decisionRules: IDecisionRule[];
    scoreBands: IScoreBand[];
}
export interface IScorecardVersionDoc extends IScorecardVersion, Document {
    _id: mongoose.Types.ObjectId;
    createdAt: Date;
    updatedAt: Date;
}
export interface IScorecardVersionLean extends IScorecardVersion {
    _id: mongoose.Types.ObjectId;
    createdAt: Date;
    updatedAt: Date;
}
export interface IScorecardVersionPlain extends IScorecardVersion {
    _id: string;
}
export type TScorecardVersionModel = Model<IScorecardVersion>;
export declare const ScorecardDefinitionJoiSchema: Joi.ObjectSchema<any>;
export declare const DecisionRulesJoiSchema: Joi.ArraySchema<any[]>;
export declare const ScoreBandsJoiSchema: Joi.ArraySchema<any[]>;
export declare const ScorecardVersionSchema: mongoose.Schema<IScorecardVersion, TScorecardVersionModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IScorecardVersion, mongoose.Document<unknown, {}, mongoose.FlatRecord<IScorecardVersion>> & mongoose.FlatRecord<IScorecardVersion> & {
    _id: mongoose.Types.ObjectId;
}>;
export declare const ScorecardVersion: TScorecardVersionModel;
