import { TypeDBTransaction } from "../connection/TypeDBTransaction";
/**
* Rules are a part of schema and define embedded logic.
* The reasoning engine uses rules as a set of logic to infer new data.
* A rule consists of a condition and a conclusion, and is uniquely identified by a label.
*/
export interface Rule {
/** The unique label of the rule. */
readonly label: string;
/** The statements that constitute the ‘when’ of the rule. */
readonly when: string;
/** The single statement that constitutes the ‘then’ of the rule. */
readonly then: string;
/**
* Renames the label of the rule. The new label must remain unique.
*
* ### Examples
*
* ```ts
* rule.setLabel(transaction, newLabel)
* ```
*
* @param transaction - The current Transaction
* @param newLabel - The new label to be given to the rule
*/
setLabel(transaction: TypeDBTransaction, label: string): Promise;
/**
* Deletes this rule.
*
* ### Examples
*
* ```ts
* rule.delete(transaction)
* ```
*
* @param transaction - The current Transaction
*/
delete(transaction: TypeDBTransaction): Promise;
/**
* Check if this rule has been deleted.
*
* ### Examples
*
* ```ts
* rule.isDeleted(transaction)
* ```
*
* @param transaction - The current Transaction
*/
isDeleted(transaction: TypeDBTransaction): Promise;
}