/**
 * Deletion Service for GDPR Compliance (Phase 1: Soft Deletion)
 *
 * Implements immutable soft deletion via deletion observations.
 * Deletion observations mark entities/relationships as deleted while maintaining
 * full audit trail and immutability guarantees.
 */
export interface DeletionObservation extends Record<string, unknown> {
    id: string;
    entity_id: string;
    entity_type: string;
    schema_version: string;
    source_id: string | null;
    observed_at: string;
    source_priority: number;
    fields: {
        _deleted: true;
        deleted_at: string;
        deleted_by: string;
        deletion_reason?: string;
    };
    user_id: string;
}
export interface RestorationObservation extends Record<string, unknown> {
    id: string;
    entity_id: string;
    entity_type: string;
    schema_version: string;
    source_id: string | null;
    observed_at: string;
    source_priority: number;
    fields: {
        _deleted: false;
        restored_at: string;
        restored_by: string;
        restoration_reason?: string;
    };
    user_id: string;
}
export interface DeletionResult {
    success: boolean;
    observation_id?: string;
    entity_id: string;
    error?: string;
}
/**
 * Soft delete an entity by creating a deletion observation
 *
 * @param entityId - Entity ID to delete
 * @param entityType - Entity type (e.g., "company", "person")
 * @param userId - User ID performing the deletion
 * @param reason - Optional reason for deletion
 * @param timestamp - Timestamp for deletion (defaults to now)
 * @returns Deletion result with observation ID
 */
export declare function softDeleteEntity(entityId: string, entityType: string, userId: string, reason?: string, timestamp?: string): Promise<DeletionResult>;
/**
 * Soft delete a relationship by creating a deletion observation
 *
 * @param relationshipKey - Relationship key (format: type:source:target)
 * @param relationshipType - Relationship type
 * @param sourceEntityId - Source entity ID
 * @param targetEntityId - Target entity ID
 * @param userId - User ID performing the deletion
 * @param reason - Optional reason for deletion
 * @param timestamp - Timestamp for deletion (defaults to now)
 * @returns Deletion result with observation ID
 */
export declare function softDeleteRelationship(relationshipKey: string, relationshipType: string, sourceEntityId: string, targetEntityId: string, userId: string, reason?: string, timestamp?: string): Promise<DeletionResult>;
/**
 * Restore a deleted entity by creating a restoration observation
 *
 * @param entityId - Entity ID to restore
 * @param entityType - Entity type
 * @param userId - User ID performing the restoration
 * @param reason - Optional reason for restoration
 * @param timestamp - Timestamp for restoration (defaults to now)
 * @returns Deletion result with observation ID
 */
export declare function restoreEntity(entityId: string, entityType: string, userId: string, reason?: string, timestamp?: string): Promise<DeletionResult>;
/**
 * Restore a deleted relationship by creating a restoration observation
 *
 * @param relationshipKey - Relationship key (format: type:source:target)
 * @param relationshipType - Relationship type
 * @param sourceEntityId - Source entity ID
 * @param targetEntityId - Target entity ID
 * @param userId - User ID performing the restoration
 * @param reason - Optional reason for restoration
 * @param timestamp - Timestamp for restoration (defaults to now)
 * @returns Deletion result with observation ID
 */
export declare function restoreRelationship(relationshipKey: string, relationshipType: string, sourceEntityId: string, targetEntityId: string, userId: string, reason?: string, timestamp?: string): Promise<DeletionResult>;
/**
 * Check if an entity has a deletion observation
 *
 * @param entityId - Entity ID to check
 * @param userId - User ID (for RLS)
 * @returns True if entity is deleted
 */
export declare function isEntityDeleted(entityId: string, userId: string): Promise<boolean>;
/**
 * Check if a relationship has a deletion observation
 *
 * @param relationshipKey - Relationship key to check
 * @param userId - User ID (for RLS)
 * @returns True if relationship is deleted
 */
export declare function isRelationshipDeleted(relationshipKey: string, userId: string): Promise<boolean>;
/**
 * Batch soft delete multiple entities
 *
 * @param entityIds - Array of entity IDs to delete
 * @param entityType - Entity type
 * @param userId - User ID performing the deletion
 * @param reason - Optional reason for deletion
 * @param timestamp - Timestamp for deletion (defaults to now)
 * @returns Array of deletion results
 */
export declare function batchSoftDeleteEntities(entityIds: string[], entityType: string, userId: string, reason?: string, timestamp?: string): Promise<DeletionResult[]>;
//# sourceMappingURL=deletion.d.ts.map