import type { MetaTable, TableInterface } from '../model/index.js'; import type { NodeInterface } from './NodeInterface.js'; import type { DataGeneratorRegistry } from '../data-generator/index.js'; /** * Options for initializing a Reference. */ export interface ReferenceOptions { /** * The instanceId of the current test case. */ instanceId?: string; /** * Indicates whether this Reference is a self-reference. */ selfReference?: boolean; /** * An array of all available tables. */ tables: TableInterface[]; /** * The parent node of this Reference. */ parentNode: NodeInterface; /** * The suffix for the test case instance id of this Reference. */ instanceIdSuffix: string; /** * The name of the current table. */ tableName: string; /** * The name of the target table. */ targetTableName: string; /** * The type of the current table. */ tableType: string; /** * The type of the target table. */ targetTableType: string; /** * The name of the current test case. */ testcaseName: string; /** * The name of the target test case. */ targetTestcaseName: string; /** * The field name where the reference is defined. */ fieldName: string; /** * The field name that the reference points to. */ targetFieldName: string; /** * The meta information of the table. */ tableMeta: MetaTable; /** * The data generator registry. */ generatorRegistry: DataGeneratorRegistry; } /** * Represents a reference between test cases in different tables. * * A Reference is used in data generation to link a test case to a target test case, * enabling the reuse of generated data. It stores identifiers and meta information * that help in determining whether two references point to the same target. */ export declare class Reference { /** * A unique identifier for this Reference. */ id: string; /** * The instanceId of the current test case. Defaults to a new UUID if not provided. */ instanceId: string; /** * Indicates whether this Reference is a self-reference. */ selfReference: boolean; /** * Flag used to indicate if this Reference points to the same target as another reference. */ isSameReffalse: boolean; /** * An array of all available tables. */ tables: TableInterface[]; /** * The parent node that owns this Reference. */ parentNode: NodeInterface; /** * The target node that this Reference points to (if any). */ targetNode?: NodeInterface; /** * The suffix for the test case instance id of this Reference. */ instanceIdSuffix: string; /** * The name of the current table. */ tableName: string; /** * The name of the target table. */ targetTableName: string; /** * The type of the current table. */ tableType: string; /** * The type of the target table. */ targetTableType: string; /** * The name of the current test case. */ testcaseName: string; /** * The name of the target test case. */ targetTestcaseName: string; /** * The field name where the reference is defined. */ fieldName: string; /** * The field name that the reference points to. */ targetFieldName: string; /** * Meta information for the table. */ tableMeta: MetaTable; /** * The data generator registry. */ generatorRegistry: DataGeneratorRegistry; /** * Constructs a new Reference instance. * * @param opts - Options for initializing the Reference, including meta information, * instance identifiers, table and test case names, field names, and generator registry. */ constructor(opts: ReferenceOptions); /** * Computes the target identity string for this Reference. * * The target identity uniquely identifies the target test case by combining * the target table name, target test case name, and the instanceIdSuffix. * * @returns A string representing the target identity. */ get targetIdentity(): string; /** * Clones the current Reference. * * If recursive cloning is enabled, the method also clones the target node recursively. * * @param recursiv - If true, clones the target node recursively; otherwise, clones only this Reference. * @returns A new Reference instance that is a clone of the current one. */ clone(recursiv?: boolean): Reference; } //# sourceMappingURL=Reference.d.ts.map