import { Allocation, Variation, VariationType } from './interfaces'; import { Rule } from './rules'; export declare const flagEvaluationCodes: readonly ["MATCH", "FLAG_UNRECOGNIZED_OR_DISABLED", "TYPE_MISMATCH", "ASSIGNMENT_ERROR", "DEFAULT_ALLOCATION_NULL", "NO_ACTIONS_SUPPLIED_FOR_BANDIT", "BANDIT_ERROR"]; export type FlagEvaluationCode = (typeof flagEvaluationCodes)[number]; export declare enum AllocationEvaluationCode { UNEVALUATED = "UNEVALUATED", MATCH = "MATCH", BEFORE_START_TIME = "BEFORE_START_TIME", TRAFFIC_EXPOSURE_MISS = "TRAFFIC_EXPOSURE_MISS", AFTER_END_TIME = "AFTER_END_TIME", FAILING_RULE = "FAILING_RULE" } export interface AllocationEvaluation { key: string; allocationEvaluationCode: AllocationEvaluationCode; orderPosition: number; } export interface IFlagEvaluationDetails { environmentName: string; flagEvaluationCode: FlagEvaluationCode; flagEvaluationDescription: string; variationKey: string | null; variationValue: Variation['value'] | null; banditKey: string | null; banditAction: string | null; configFetchedAt: string; configPublishedAt: string; matchedRule: Rule | null; matchedAllocation: AllocationEvaluation | null; unmatchedAllocations: Array; unevaluatedAllocations: Array; } export declare class FlagEvaluationDetailsBuilder { private readonly environmentName; private readonly allocations; private readonly configFetchedAt; private readonly configPublishedAt; private variationKey; private variationValue; private matchedRule; private matchedAllocation; private readonly unmatchedAllocations; constructor(environmentName: string, allocations: Allocation[], configFetchedAt: string, configPublishedAt: string); addUnmatchedAllocation: (allocationEvaluation: AllocationEvaluation) => void; setNone: () => FlagEvaluationDetailsBuilder; setMatch: (indexPosition: number, variation: Variation, allocation: Allocation, matchedRule: Rule | null, expectedVariationType: VariationType | undefined) => FlagEvaluationDetailsBuilder; buildForNoneResult: (flagEvaluationCode: FlagEvaluationCode, flagEvaluationDescription: string) => IFlagEvaluationDetails; build: (flagEvaluationCode: FlagEvaluationCode, flagEvaluationDescription: string) => IFlagEvaluationDetails; gracefulBuild: (flagEvaluationCode: FlagEvaluationCode, flagEvaluationDescription: string) => IFlagEvaluationDetails | null; private calculateUnevaluatedAllocations; } //# sourceMappingURL=flag-evaluation-details-builder.d.ts.map