/** Find all documents that reference a target document via relationship fields. */
export async function getReverseRelationships(targetDocumentId, _db) {
    // TODO: query content_graph edges where `to` matches targetDocumentId
    void targetDocumentId;
    throw new Error('Not implemented');
}
/** Check if deleting a document would orphan any references. */
export async function checkOrphanedReferences(documentId, _db) {
    const references = await getReverseRelationships(documentId, _db);
    return { hasReferences: references.length > 0, references };
}
//# sourceMappingURL=index.js.map