export declare enum OperationType {
    RENAMED = "RENAMED",
    UPDATED = "UPDATED",
    CREATED = "CREATED",
    SYNC = "SYNC",
    MARKED_TO_DELETION = "MARKED_TO_DELETION",
    NOTHING = "NOTHING",
    RETRY = "RETRY"
}
export declare enum WorkStatus {
    PENDING = "PENDING",
    PROCESSING = "PROCESSING",
    FINISHED = "FINISHED"
}
import { Dependencies } from './resolver';
export type WorkItem = {
    item: any;
    getItem?: Function;
    operation: OperationType;
    handler?: WorkItemHandler;
    workStatus: WorkStatus;
    onDelete: Function;
    process?: Function;
    upsertTime?: number;
    isDeadLetter?: boolean;
};
type HandlerFinalizerFn = (kind: string, namespace: string, item: any | string, finalizer: string) => Promise<any>;
type HandlerInformPlanFn = (prUrl: string, planText: string) => Promise<void>;
type WriteTerraformOutputInTfResultFn = (item: any, output: string) => Promise<any>;
type WriteConnectionSecretFn = (item: any, outputsConnection: any, finalize?: boolean) => Promise<void>;
type ResolveReferencesFn = () => Promise<Dependencies>;
type DeleteSecretFn = () => Promise<null | undefined>;
type ItemPathFn = () => string;
type ErrorFn = () => Promise<void>;
type SuccessFn = () => Promise<void>;
export type WorkItemHandler = {
    finalize: HandlerFinalizerFn;
    pluralKind: string;
    informPlan: HandlerInformPlanFn;
    writeTerraformOutputInTfResult: WriteTerraformOutputInTfResultFn;
    writeConnectionSecret: WriteConnectionSecretFn;
    resolveReferences: ResolveReferencesFn;
    deleteSecret: DeleteSecretFn;
    itemPath: ItemPathFn;
    error: ErrorFn;
    success: SuccessFn;
};
/**
 * Observe whenever a new item is added, modified or deleted in a given kind
 * @param {string} pluralKind - Kind to observe
 * @param {string} namespace - Namespace to observe
 * @param {Function} queue - Callback to queue work items for processing
 * @param {Function} compute - Callback to process the work items
 * @returns {void}
 */
export declare function observeKind(pluralKind: string, namespace: string, queue: Function, compute: Function): Promise<void>;
export {};
