Evalkeeper
    Preparing search index...

    Type Alias ImportAnswers<Row>

    ImportAnswers:
        | { status: "PENDING" }
        | {
            allowedBy: string;
            at?: Date;
            rater: string;
            status: "PROVISIONAL";
            tag?: string;
        }
        | {
            at: (row: Row) => Date | string | null | undefined;
            confirmedBy: (row: Row) => string | null | undefined;
            status: "CONFIRMED";
        }

    How imported answers arrive. Pending (the default): a person confirms each one on the pages before tests use it. Provisional: tests use them now, every score says it rests on unreviewed answers, and the rows carry tag so the review queue is findable. Use provisional only when the owner said so; allowedBy and at record who and when. Confirmed: only for answers a person already reviewed in the system they come from; confirmedBy and at read who and when from each row, and the import is refused unless every row names both. Answers drafted by an agent or scraped from somewhere are never imported confirmed.

    Type Parameters

    • Row = never

    Type Declaration

    • { status: "PENDING" }
    • {
          allowedBy: string;
          at?: Date;
          rater: string;
          status: "PROVISIONAL";
          tag?: string;
      }
      • allowedBy: string

        The person who allowed using them before review.

      • Optionalat?: Date

        When they allowed it; default now.

      • rater: string

        Who drafted the answers: an agent's name, recorded as the rater.

      • status: "PROVISIONAL"
      • Optionaltag?: string

        Added to each row's tags; default "needs-review".

    • {
          at: (row: Row) => Date | string | null | undefined;
          confirmedBy: (row: Row) => string | null | undefined;
          status: "CONFIRMED";
      }
      • at: (row: Row) => Date | string | null | undefined

        When they confirmed it: a Date, or text Date can read. Never defaulted: a row without one, or with one in the future, stops the import.

      • confirmedBy: (row: Row) => string | null | undefined

        The person who confirmed this row's answer in the old system, recorded as the rater. Never defaulted: a row without one stops the import.

      • status: "CONFIRMED"