Recapp Code Reference
    Preparing search index...

    Actor representing the comments of a single quiz. This will be started as a child of the corresponding quiz actor

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    collectionName: string
    connector: DbClient = ...
    state: State = ...

    Methods

    • Parameters

      • from: ActorRef

      Returns Promise<
          [
              UserRole: AccessRole,
              UserID: string & BRAND<"UID">,
              IsTemporaryAccount: boolean,
          ],
      >

    • Parameters

      • uid: string & BRAND<"UID">

      Returns Promise<
          MaybeBase<
              {
                  answers: (string | (boolean | null | undefined)[])[];
                  archived?: Timestamp;
                  correct: boolean[];
                  counter: number;
                  created: Timestamp;
                  questions: (string & BRAND<"UID">)[];
                  quizId: string & BRAND<"UID">;
                  studentId: string & BRAND<"UID">;
                  uid: string & BRAND<"UID">;
                  updated: Timestamp;
                  wrong: boolean[];
              },
          >,
      >

    • Abstract method that handles all incoming messages

      Parameters

      • from: ActorRef

        actor that has send the message

      • message:
            | { QuizRunActorMessage: "Update" } & {
                value: Partial<
                    {
                        answers: (string | (boolean | null | undefined)[])[];
                        archived?: Timestamp;
                        correct: boolean[];
                        counter: number;
                        created: Timestamp;
                        questions: (string & BRAND<"UID">)[];
                        quizId: string & BRAND<"UID">;
                        studentId: string & BRAND<"UID">;
                        uid: string & BRAND<"UID">;
                        updated: Timestamp;
                        wrong: boolean[];
                    },
                > & { uid: string & BRAND<"UID"> };
            }
            | { QuizRunActorMessage: "SubscribeToCollection" } & { value: {} }
            | { QuizRunActorMessage: "UnsubscribeFromCollection" } & { value: {} }
            | { QuizRunActorMessage: "GetForUser" } & {
                value: {
                    questions: (string & BRAND<"UID">)[];
                    studentId: string & BRAND<"UID">;
                };
            }
            | { QuizRunActorMessage: "Clear" } & { value: {} }

        message type

      Returns Promise<ResultType>

      promised return value. If the caller used ask, this value will be returned to the calling actor

    • Parameters

      • entity: {
            answers: (string | (boolean | null | undefined)[])[];
            archived?: Timestamp;
            correct: boolean[];
            counter: number;
            created: Timestamp;
            questions: (string & BRAND<"UID">)[];
            quizId: string & BRAND<"UID">;
            studentId: string & BRAND<"UID">;
            uid: string & BRAND<"UID">;
            updated: Timestamp;
            wrong: boolean[];
        }

      Returns Promise<
          {
              answers: (string | (boolean | null | undefined)[])[];
              archived?: Timestamp;
              correct: boolean[];
              counter: number;
              created: Timestamp;
              questions: (string & BRAND<"UID">)[];
              quizId: string & BRAND<"UID">;
              studentId: string & BRAND<"UID">;
              uid: string & BRAND<"UID">;
              updated: Timestamp;
              wrong: boolean[];
          },
      >

    • Parameters

      • _draft: State
      • _quiz: {
            answers: (string | (boolean | null | undefined)[])[];
            archived?: Timestamp;
            correct: boolean[];
            counter: number;
            created: Timestamp;
            questions: (string & BRAND<"UID">)[];
            quizId: string & BRAND<"UID">;
            studentId: string & BRAND<"UID">;
            uid: string & BRAND<"UID">;
            updated: Timestamp;
            wrong: boolean[];
        }

      Returns void