Evalkeeper
    Preparing search index...

    Type Alias PrismaSettingsMap

    How Evalkeeper's settings tables map onto an app's own versions tables, so Evalkeeper's rollback and history pages read the same history as the app's own model admin page. Leave out anything named the same.

    type PrismaSettingsMap = {
        by?: {
            fromColumn(stored: string): string | Promise<string | null> | null;
            toColumn(by: string): string | Promise<string | null> | null;
        };
        fields?: {
            evalSettingsChange?: ColumnMap<EvalSettingsChangeRow>;
            evalSettingsLive?: ColumnMap<EvalSettingsLiveRow>;
            evalSettingsVersion?: ColumnMap<EvalSettingsVersionRow>;
        };
        kinds?: readonly ChangeKind[];
        models?: Partial<Record<SettingsTable, string>>;
    }
    Index
    by?: {
        fromColumn(stored: string): string | Promise<string | null> | null;
        toColumn(by: string): string | Promise<string | null> | null;
    }

    For a table that keeps who made a change as something other than the by your pages pass (a user id with a foreign key, say). Each is called only for a value that isn't null.

    Type Declaration

    • fromColumn: function
      • What to show for a stored value (e.g. the name for a user id).

        Parameters

        • stored: string

        Returns string | Promise<string | null> | null

    • toColumn: function
      • What to store for by (e.g. the user id for a name).

        Parameters

        • by: string

        Returns string | Promise<string | null> | null

    fields?: {
        evalSettingsChange?: ColumnMap<EvalSettingsChangeRow>;
        evalSettingsLive?: ColumnMap<EvalSettingsLiveRow>;
        evalSettingsVersion?: ColumnMap<EvalSettingsVersionRow>;
    }

    Column names per table, keyed by Evalkeeper's field name. null says the table has no such column (for nullable fields only): reads give null, and saving a version that sets it fails rather than losing the setting.

    kinds?: readonly ChangeKind[]

    The kinds your change log's kind column can hold, when it's an enum made before some kinds existed (OUTSIDE and INSTRUCTIONS came later). A kind not listed is stored as CHANGE, with the real kind and the evidence kept in the evidence column (as { evalkeeperKind, evidence }), and read back as itself. Leave it out for a text column or an enum with every kind.

    models?: Partial<Record<SettingsTable, string>>

    Each table's model on the Prisma client, as the client spells it.