import { Action, RequestedCorrectionAction } from '../ActionDocument'; import { Flag, CustomFlag } from '../Flag'; import { EventConfig } from '../EventConfig'; import { EventDocument } from '../EventDocument'; export declare function findPendingCorrectionAction(writeActions: Action[]): RequestedCorrectionAction | undefined; export declare function isPotentialDuplicate(actions: Action[]): boolean; /** * This function resolves custom flags for an event based on its actions. * Flags are not stored to the event state or any database directly, instead they are always computed/evaluated from the event actions. * * Processes accepted actions in chronological order, evaluating flag conditions * at each action step. Flags can be added or removed based on action configurations * and conditional logic. Duplicate flags are filtered out. * * @param event - The event document containing actions and metadata * @param eventConfiguration - The configuration object for the event type defining action rules and flag behaviors * @returns An array of unique custom flag IDs that apply to the event after processing all non-meta actions * * @example * const flags = resolveEventCustomFlags(eventDoc, config); * // Returns: ['flag-1', 'flag-3'] */ export declare function resolveEventCustomFlags(event: EventDocument, eventConfiguration: EventConfig): CustomFlag[]; /** * Computes all flags (inherent, action status, and custom) that should be attached to the given event, * based on its actions and event-specific configuration. * * Flags are determined by combining: * - Action status flags (format 'ActionType:ActionStatus') * - Inherent flags (e.g. incomplete, rejected, correction requested, potential duplicate, edit in progress) * - Event type-specific custom flags defined in the event configuration * * @param event - The EventDocument containing the action history and payload * @param config - The EventConfig providing rules for custom flag evaluation * @returns An array of flags currently relevant/applicable to the event */ export declare function getEventFlags(event: EventDocument, config: EventConfig): Flag[]; //# sourceMappingURL=flags.d.ts.map