/**
 * `typescript-decorators` adapter — generic decorator/annotation analysis on
 * TypeScript class bodies. Designed as the FALLBACK adapter when no
 * framework-specific one (typescript-prisma, etc.) applies.
 *
 * Recognises the common patterns shared by the decorator-driven ORM family:
 *
 *   Sequelize  → @Table / @Column / @PrimaryKey / @BelongsTo / @HasMany / extends Model
 *   TypeORM    → @Entity  / @Column / @PrimaryGeneratedColumn / @ManyToOne / @OneToMany
 *   NestJS     → @Entity  / @Column (TypeORM-style)
 *   Mongoose   → @Schema  / @Prop   (with NestJS) / Schema().add()
 *   Spring/JPA → @Entity / @Column / @ManyToOne (when the source is Java)
 *
 * The strategy is intentionally lossy: we recognize the common shapes
 * without trying to be perfect. A framework-specific adapter (when written)
 * registers ahead of this one and produces higher-precision output.
 *
 * Detection: a class is a candidate entity if it
 *   - is decorated with `@Entity`, `@Table`, `@Schema`, OR
 *   - extends `Model` (Sequelize default)
 *
 * Properties: scan the class body for `@Column(...)`, `@PrimaryKey`,
 * `@PrimaryGeneratedColumn`, `@Id` decorators on the next line that follow
 * a property declaration.
 *
 * Relationships: regex for the family of relationship decorators —
 *   @OneToMany / @HasMany / @ManyToOne / @BelongsTo / @OneToOne / @HasOne /
 *   @ManyToMany. The decorator argument referencing another class via
 *   `() => Foo` or `'Foo'` gives the related entity name.
 */
import type { StructuralPrepass } from '../interface.js';
export interface DecoratorEntity {
    name: string;
    filePath: string;
    startLine: number;
    endLine: number;
    /** The framework hint we extracted from class markers — best-effort only. */
    framework: 'sequelize' | 'typeorm' | 'nestjs' | 'mongoose' | 'jpa' | 'unknown';
    attributes: Array<{
        name: string;
        declaredType?: string;
        isPrimary?: boolean;
        isUnique?: boolean;
    }>;
    isExported: boolean;
}
export interface DecoratorRelationship {
    from: string;
    to: string;
    type: 'belongsTo' | 'hasMany' | 'hasOne' | 'manyToMany';
    fieldName?: string;
}
/**
 * Inferred lifecycle: a status-shaped column whose declared type is a
 * TS enum, paired with the enum's member values. Detected by walking
 * the entity's file for `export enum X { ... }` declarations and
 * matching attribute `declaredType` against them. Only same-file
 * enums today (cross-file lookup deferred until a fixture demands it).
 *
 * `transitions` are populated by the method-body walker (#27-A) — each
 * entry is one instance method that mutates `this.<field>` to a new
 * state, optionally guarded by a precondition `if (this.<field> op X)`.
 */
export interface DecoratorLifecycle {
    model: string;
    field: string;
    states: string[];
    transitions?: Array<{
        action: string;
        from: string[];
        to: string;
    }>;
}
export interface DecoratorFacts {
    entities: DecoratorEntity[];
    relationships: DecoratorRelationship[];
    lifecycles: DecoratorLifecycle[];
    /** Frameworks the adapter detected (lowercase). */
    frameworks: string[];
}
/**
 * Run the generic decorator adapter against a structural backend.
 * Caller is expected to have run `prepass.init(...)` and `prepass.index()`
 * already (the standard runPrepass flow).
 */
export declare function extractTypeScriptDecorators(prepass: StructuralPrepass): Promise<DecoratorFacts>;
//# sourceMappingURL=typescript-decorators.d.ts.map