import { BaseEntity } from '../shared/BaseEntity'; import { ContractName } from '../value-objects/ContractName'; import { ContractCategory } from '../value-objects/ContractCategory'; import { ContractStatus } from '../value-objects/ContractStatus'; import { ContractSLA, SLAProps } from '../value-objects/ContractSLA'; import { ContractVariant } from './ContractVariant'; import { ContractProp } from './ContractProp'; import { ContractAccessibility } from './ContractAccessibility'; import { ContractValidation, ValidationRule } from './ContractValidation'; /** * Contract Entity - Pure Domain Entity * Represents a contract definition with business rules and invariants */ export declare class ContractEntity extends BaseEntity { private readonly _name; private readonly _category; private _status; private _contractVersion; private _description?; private readonly _variants; private readonly _props; private readonly _slots; private readonly _accessibility; private readonly _validation; private readonly _sla; private readonly _metadata; private constructor(); /** * Creates a new Contract Entity */ static create(params: { id?: string; name: string; category: ContractCategory; variants?: ContractVariant[]; props?: ContractProp[]; slots?: string[]; accessibility?: Partial; validation?: Partial | ValidationRule[]; sla?: SLAProps; metadata?: Record; description?: string; }): ContractEntity; /** * Creates a Contract Entity from JSON data */ static fromJSON(json: any): ContractEntity; /** * Generates a unique ID for the contract */ private static generateId; /** * Validates business invariants */ private validateBusinessInvariants; get id(): string; get name(): ContractName; get category(): ContractCategory; get status(): ContractStatus; get contractVersion(): string; get description(): string | undefined; get variants(): readonly ContractVariant[]; get props(): readonly ContractProp[]; get slots(): readonly string[]; get accessibility(): ContractAccessibility; get validation(): ContractValidation; get sla(): ContractSLA; get metadata(): Record; /** * Marks contract as validated */ markAsValidated(): void; /** * Approves the contract */ approve(approverId?: string): void; /** * Activates the contract */ activate(): void; /** * Deprecates the contract */ deprecate(reason?: string): void; /** * Archives the contract */ archive(reason?: string): void; /** * Checks if contract supports a specific variant value */ supportsVariant(variantName: string, value: any): boolean; /** * Gets a variant by name */ getVariant(name: string): ContractVariant | undefined; /** * Gets a prop by name */ getProp(name: string): ContractProp | undefined; /** * Converts the entity to a plain JSON object matching the Spec */ toJSON(): any; } //# sourceMappingURL=ContractEntity.d.ts.map