Member Junction
    Preparing search index...

    Interface IEntityCloneConfiguration

    Configuration for record cloning at the entity level.

    plans/record-cloning/README.md §4.1

    interface IEntityCloneConfiguration {
        CloneableFromTemplate?: boolean;
        CreationPath?: ICloneCreationPath;
        Derivation?: { Description?: string; Field: string; Label?: string };
        Descendants?: Record<string, ICloneDescendantConfig>;
        Embeddings?: "copy" | "regenerate";
        Enabled?: boolean;
        Fields?: ICloneFieldRules;
        Hierarchy?: "subtree" | "node";
        Hooks?: ICloneHookConfig;
        MaxDepth?: number;
        MaxRecords?: number;
        Naming?: ICloneNamingConfig;
        NotCloneable?: boolean;
        NotCloneableReason?: string;
        Presets?: IClonePreset[];
        Relationships?: Record<string, ICloneRelationshipPolicy>;
        RequiredAuthorization?: string;
        RequiredUserType?: "Owner";
        SoftLinks?: "include" | "skip";
        Subtypes?: "include" | "exclude";
        UI?: {
            ConfirmationMessage?: string;
            DefaultPreset?: string;
            Icon?: string;
            Label?: string;
            RetargetFields?: string[];
        };
        UserEditable?: "all"
        | "none"
        | "fields"
        | "scope";
        Version?: 1;
    }
    Index

    Properties

    CloneableFromTemplate?: boolean

    Lets a NotCloneable entity's rows be copied after all, but only as children of a template copy: a clone run under a preset with TemplateSourceField whose source record has that flag set. Use for rows that are private to a person (conversations, dashboard preferences) and must never be copied from one user to another, yet belong in a template built to be copied.

    CreationPath?: ICloneCreationPath

    Route the ROOT through an existing creation path instead of a raw Save. Children still clone through the engine against the created root.

    Derivation?: { Description?: string; Field: string; Label?: string }

    Offer "create derived record" (BasedOnID-style inheritance) as an alternative to copying.

    Descendants?: Record<string, ICloneDescendantConfig>

    Rules applied to descendant rows cloned under THIS root, keyed by descendant entity name. Lets a root shape its children without editing the child entity's bag.

    Embeddings?: "copy" | "regenerate"

    Persisted embedding columns. Default 'copy' when EmbeddingModelID matches the configured model, else regenerate.

    Enabled?: boolean

    Master switch for cloning this entity as a ROOT. Default false.

    Hierarchy?: "subtree" | "node"

    Self-referencing IsHierarchy fields. Default 'subtree'.

    MaxDepth?: number

    Caps. Defaults 3 and 500. A plan that exceeds either is Blocked.

    MaxRecords?: number
    NotCloneable?: boolean

    Hard refusal: this entity's rows are never created by the clone engine, as root or as child. Overrides every relationship policy. Use for audit, run, credential and metadata entities.

    NotCloneableReason?: string

    Shown to users and returned in warnings when NotCloneable or Enabled=false.

    Presets?: IClonePreset[]
    Relationships?: Record<string, ICloneRelationshipPolicy>

    Per-relationship policy, keyed by "" or "." when an entity has two FKs to the same target. Overrides the relationship's own bag when Locked is false there.

    RequiredAuthorization?: string

    Authorization name checked with ancestors. Default 'Clone Records'; resolved per §9.1.

    RequiredUserType?: "Owner"

    The entity's own server class refuses creates by other user types (Users, Roles). The planner blocks early with the entity's reason.

    SoftLinks?: "include" | "skip"

    Inbound polymorphic EntityID/RecordID rows (tags, attachments, notes...). Default 'skip'.

    Subtypes?: "include" | "exclude"

    IS-A subtype rows. Default 'include'.

    UI?: {
        ConfirmationMessage?: string;
        DefaultPreset?: string;
        Icon?: string;
        Label?: string;
        RetargetFields?: string[];
    }

    Type Declaration

    • OptionalConfirmationMessage?: string
    • OptionalDefaultPreset?: string
    • OptionalIcon?: string
    • OptionalLabel?: string
    • OptionalRetargetFields?: string[]

      FK fields the panel offers as retarget pickers (CompanyID → another company).

    UserEditable?: "all" | "none" | "fields" | "scope"

    How much the UI may change. Default 'all'. 'none' = confirm only.

    Version?: 1

    Schema version of this section. Default 1.