import { createWrapper } from "./wrapper"; export type SuccessStatus = "passed" | "failed" | "unknown"; export type CompletionStatus = "completed" | "incomplete" | "not attempted" | "unknown"; export type MergedStatus = "passed" | "completed" | "failed" | "incomplete" | "browsed" | "not attempted" | "unknown"; export type SCORMStorageType = "1.2" | "2004" | "local"; export type NormalizeRWKeyValue = { successStatus: V extends "1.2" ? MergedStatus : SuccessStatus; completeStatus: V extends "1.2" ? MergedStatus : CompletionStatus; suspendData: string; language: string; scoreScaled: number; scoreRaw: number; scoreMin: number; scoreMax: number; location: string; objectiveList: string[]; progressMeasure: V extends "2004" ? number : null; }; export type NormalizeROKeyValue = { studentName: string; launchData: string; entry: "ab-initio" | "resume" | ""; interactionsCount: number; objectivesCount: number; }; export type NormalizeWOKeyValue = { sessionTime: string; exit: V extends "1.2" ? "time-out" | "suspend" | "logout" | "" : "timeout" | "suspend" | "logout" | "normal" | ""; }; export type NormalizeObjectiveKeyValue = { id: string; scoreRaw: number; scoreMax: number; scoreMin: number; successStatus: V extends "1.2" ? MergedStatus : SuccessStatus; completionStatus: V extends "1.2" ? MergedStatus : CompletionStatus; description: string; }; export type NormalizeInteractionKeyValue = { id: string; weight: number; learnerResponse: string; result: V extends "1.2" ? "correct" | "wrong" | "unanticipated" | "neutral" | number : "correct" | "incorrect" | "unanticipated" | "neutral" | number; objectiveIdList: string[]; timestamp: number; latency: string; type: V extends "1.2" ? "true-false" | "choice" | "fill-in" | "matching" | "performance" | "sequencing" | "likert" | "numeric" : "true-false" | "choice" | "fill-in" | "long-fill-in" | "matching" | "performance" | "sequencing" | "likert" | "numeric" | "other"; description: string; }; export type FilterScormPresets = "STORYLINE_completed_incomplete" | "STORYLINE_completed_failed" | "STORYLINE_passed_incomplete" | "STORYLINE_passed_failed"; export type FilterScormKeyValue = ScormKeyFilter & SuccesAndCompleteScormFilter; export type ScormKeyFilter = { [key in keyof Omit, "completeStatus" | "successStatus">]: "blockAll"; }; export type SuccesAndCompleteScormFilter = { [key in keyof Pick, "completeStatus" | "successStatus">]: NormalizeWriteKeyValue[key][]; }; export type NormalizeWriteKeyValue = NormalizeRWKeyValue & NormalizeWOKeyValue; export type NormalizeReadKeyValue = NormalizeRWKeyValue & NormalizeROKeyValue; export type NormalizeKeyValue = NormalizeReadKeyValue & NormalizeWriteKeyValue; export type SCORMWrapper = ReturnType;