Recapp Code Reference
    Preparing search index...
    • Returns {
          isQuizActorSucceeded: boolean;
          quizActorSend: (
              message:
                  | { tag: "Update" } & {
                      value: Partial<
                          {
                              allowedQuestionTypesSettings: Partial<
                                  Record<"SINGLE" | "MULTIPLE" | "TEXT", boolean>,
                              >;
                              archived?: Timestamp;
                              comments: (string & BRAND<"UID">)[];
                              created: Timestamp;
                              createdBy?: string & BRAND<"UID">;
                              description: string;
                              groups: {
                                  name: string;
                                  questions: ((...) & (...))[];
                                  statistics?: {
                                      answers: ...;
                                      correctAnswers: ...;
                                      groupName: ...;
                                      maximumParticipants: ...;
                                      questionIds: ...;
                                      quizId: ...;
                                      wrongAnswers: ...;
                                  };
                              }[];
                              hideComments: boolean;
                              lastExport?: Timestamp;
                              previewers?: (string & BRAND<(...)>)[];
                              runOptions?: { runningEntity?: (...) & (...) };
                              shuffleAnswers: boolean;
                              shuffleQuestions: boolean;
                              state: "EDITING" | "ACTIVE" | "STARTED" | "STOPPED";
                              statistics?: {
                                  answers: number[];
                                  correctAnswers: number[];
                                  groupName: string;
                                  maximumParticipants: number;
                                  questionIds: ((...) & (...))[];
                                  quizId: string & BRAND<(...)>;
                                  wrongAnswers: number[];
                              };
                              studentComments: boolean;
                              studentParticipationSettings: Partial<
                                  Record<"NAME" | "NICKNAME" | "ANONYMOUS", boolean>,
                              >;
                              studentQuestions: boolean;
                              students: (string & BRAND<"UID">)[];
                              studentsCanSeeStatistics?: boolean;
                              teachers: (string & BRAND<"UID">)[];
                              title: string;
                              uid: string & BRAND<"UID">;
                              uniqueLink: string;
                              updated: Timestamp;
                          },
                      >;
                  }
                  | { tag: "Export" } & { value: {} }
                  | { tag: "Duplicate" } & { value: {} }
                  | { tag: "ExportQuizStats" } & { value: {} }
                  | { tag: "ExportQuestionStats" } & { value: {} }
                  | { tag: "CreateQuiz" } & { value: string & BRAND<"UID"> }
                  | { tag: "SetUser" } & {
                      value: {
                          active: boolean;
                          archived?: Timestamp;
                          created: Timestamp;
                          email?: string;
                          fingerprint?: string;
                          initialQuiz?: string;
                          isTemporary: boolean;
                          lastLogin: Timestamp;
                          nickname?: string;
                          quizUsage: Map<
                              string & BRAND<"UID">,
                              { name?: string; type: "NAME" | "NICKNAME" | "ANONYMOUS" },
                          >;
                          role: "STUDENT" | "TEACHER" | "ADMIN";
                          uid: string & BRAND<"UID">;
                          updated: Timestamp;
                          username: string;
                      };
                  }
                  | { tag: "SetQuiz" } & { value: string & BRAND<"UID"> }
                  | { tag: "Activate" } & {
                      value: {
                          quizId: string & BRAND<"UID">;
                          userId: string & BRAND<"UID">;
                      };
                  }
                  | { tag: "UpvoteComment" } & { value: string & BRAND<"UID"> }
                  | { tag: "FinishComment" } & { value: string & BRAND<"UID"> }
                  | { tag: "AddComment" } & {
                      value: Omit<
                          {
                              answered: boolean;
                              archived?: Timestamp;
                              authorId: string & BRAND<"UID">;
                              authorName: string;
                              created: Timestamp;
                              relatedQuestion?: string & BRAND<"UID">;
                              relatedQuiz: string & BRAND<"UID">;
                              text: string;
                              uid: string & BRAND<"UID">;
                              updated: Timestamp;
                              upvoters: (string & BRAND<"UID">)[];
                          },
                          "uid"
                          | "authorId",
                      >;
                  }
                  | { tag: "AddQuestion" } & {
                      value: {
                          group: string;
                          question: Omit<
                              Question,
                              "uid"
                              | "authorName"
                              | "authorId"
                              | "created"
                              | "updated",
                          >;
                      };
                  }
                  | { tag: "DeleteQuestion" } & { value: string & BRAND<"UID"> }
                  | { tag: "DeleteComment" } & { value: string & BRAND<"UID"> }
                  | { tag: "GetTeacherNames" } & { value: {} }
                  | { tag: "UpdateQuestion" } & {
                      value: {
                          group: string;
                          question: Partial<
                              {
                                  answerOrderFixed: boolean;
                                  answers: { correct: ...; text: ... }[];
                                  approved: boolean;
                                  archived?: Timestamp;
                                  authorFingerprint?: string;
                                  authorId: string & BRAND<(...)>;
                                  authorName?: string;
                                  created: Timestamp;
                                  editMode: boolean;
                                  hint?: string;
                                  quiz: string & BRAND<(...)>;
                                  statistics?:
                                      | {
                                          answers: ...;
                                          archived?: ...;
                                          created: ...;
                                          groupName: ...;
                                          maximumParticipants: ...;
                                          participants: ...;
                                          questionId: ...;
                                          quizId: ...;
                                          tag: ...;
                                          uid: ...;
                                          updated: ...;
                                          wrong: ...;
                                      }
                                      | {
                                          answers: ...;
                                          archived?: ...;
                                          created: ...;
                                          groupName: ...;
                                          maximumParticipants: ...;
                                          participants: ...;
                                          passed: ...;
                                          questionId: ...;
                                          quizId: ...;
                                          tag: ...;
                                          uid: ...;
                                          updated: ...;
                                          wrong: ...;
                                      };
                                  text: string;
                                  type: "SINGLE"
                                  | "MULTIPLE"
                                  | "TEXT";
                                  uid: string & BRAND<(...)>;
                                  updated: Timestamp;
                              },
                          > & { uid: string & BRAND<"UID"> };
                      };
                  }
                  | { tag: "setIsCommentSectionVisible" } & { value: boolean }
                  | { tag: "setIsPresentationModeActive" } & { value: boolean }
                  | { tag: "ChangeState" } & {
                      value: "EDITING" | "STARTED" | "STOPPED" | "RESETSTATS";
                  }
                  | { tag: "StartQuiz" } & { value: {} }
                  | { tag: "LogAnswer" } & {
                      value: {
                          answer: string | boolean[];
                          questionId: string & BRAND<"UID">;
                      };
                  }
                  | { tag: "ActivateQuestionStats" } & { value: string & BRAND<"UID"> }
                  | { tag: "ActivateGroupStats" } & { value: string }
                  | { tag: "ActivateQuizStats" } & { value: {} }
                  | { tag: "ExportDone" } & { value: {} }
                  | { tag: "LeaveQuiz" } & { value: {} }
                  | { tag: "GetRun" } & { value: {} }
                  | { tag: "Reset" } & { value: {} },
          ) => void;
          quizData: CurrentQuizState | null;
      }