declare const SAFETY_CONTEXT: {
    readonly safety: "https://safety.ratelworks.org/ontology/v1/";
    readonly cc: "https://construction.ratelworks.org/ontology/v1/";
    readonly schema: "https://schema.org/";
    readonly prov: "http://www.w3.org/ns/prov#";
};
export type CorrectiveActionStatus = "requested" | "in_progress" | "resolved";
export type ReferenceStatus = "found" | "pending";
export interface GraphTriple {
    subject: string;
    predicate: string;
    object: string;
}
export interface ActionAssignee {
    name: string;
    organization?: string;
}
export interface SafetyIssueReference {
    issueId: string;
    iri: string;
    referenceStatus: ReferenceStatus;
    siteId?: string;
    severity?: string;
    title?: string;
    status?: string;
    recordedAt?: string;
    photoEvidenceIds: string[];
    legalReferences: string[];
    sourcePath?: string;
}
export interface CorrectiveActionRecord {
    "@context": typeof SAFETY_CONTEXT;
    "@id": string;
    "@type": "safety:CorrectiveAction";
    actionId: string;
    iri: string;
    relatedIssue: string;
    relatedIssueIri: string;
    relatedIssueState: ReferenceStatus;
    action: string;
    assignee: ActionAssignee;
    dueBy: string;
    recommendedMeasure?: string;
    status: CorrectiveActionStatus;
    siteId?: string;
    createdAt: string;
    updatedAt: string;
    completedAt?: string;
    completionNote?: string;
    afterActionPhotoEvidence?: string;
    issueSnapshot: SafetyIssueReference;
    graphChain: GraphTriple[];
}
export interface CorrectiveActionWithEvidence extends CorrectiveActionRecord {
    photos: {
        before: string[];
        after: string[];
    };
}
export interface RecordCorrectiveActionInput {
    relatedIssue: string;
    action: string;
    assignee: ActionAssignee;
    dueBy: string;
    recommendedMeasure?: string;
}
export interface CompleteCorrectiveActionInput {
    actionId: string;
    completionNote: string;
    photoEvidence?: string;
}
export interface PendingActionFilter {
    siteId?: string;
    dueWithin?: number;
}
export declare function getSafetyLocalDir(): string;
export declare function getActionsDir(): string;
export declare function getIssuesDir(): string;
export declare function getPhotosDir(): string;
export declare function getCorrectiveActionPath(actionId: string): string;
export declare function toCorrectiveActionIri(actionId: string): string;
export declare function toIssueIri(issueId: string): string;
export declare function toPhotoEvidenceIri(photoId: string): string;
export declare function recordCorrectiveAction(input: RecordCorrectiveActionInput): Promise<CorrectiveActionRecord>;
export declare function completeCorrectiveAction(input: CompleteCorrectiveActionInput): Promise<CorrectiveActionRecord | null>;
export declare function loadCorrectiveAction(actionId: string): Promise<CorrectiveActionRecord | null>;
export declare function getCorrectiveActionWithEvidence(actionId: string): Promise<CorrectiveActionWithEvidence | null>;
export declare function listCorrectiveActions(): Promise<CorrectiveActionRecord[]>;
export declare function listPendingCorrectiveActions(filter?: PendingActionFilter): Promise<CorrectiveActionRecord[]>;
export declare function loadSafetyIssueReference(issueId: string): Promise<SafetyIssueReference | null>;
export declare function listSafetyIssueReferences(): Promise<SafetyIssueReference[]>;
export declare function buildCorrectiveActionGraphChain(action: CorrectiveActionRecord): GraphTriple[];
export declare function makePendingIssueReference(issueId: string): SafetyIssueReference;
export declare function extractPhotoEvidenceIds(value: unknown): string[];
export declare function extractLegalReferences(value: unknown): string[];
export {};
//# sourceMappingURL=corrective-action-storage.d.ts.map