export interface ApiConfig { host: string; endpoint: string; headers?: Record; listApiEndpoint?: string; submitApiEndpoint?: string; } export interface UploadProvider { s3?: { bucket: string; path: string; region?: string; baseUrl?: string; accessKeyId?: string; secretAccessKey?: string; uploadMethod?: "backend" | "direct"; backendUploadUrl?: string; }; local?: { path: string; }; custom?: { apiUrl: string; headers?: Record; }; sunbird?: { apiEndpoint: string; multipartApiEndpoint?: string; framework?: string; primaryCategory?: string; s3BaseUrl?: string; contentType?: string; resourceType?: string; }; } export interface UploadConfig { enabled: boolean; activeProvider: "s3" | "local" | "custom" | "sunbird"; uploadAllowForQuestionTypes: ("sa" | "la" | "mcq" | "mmcq" | "mtf" | "asq")[]; providers: UploadProvider; maxFileSize?: number; maxFiles?: number; allowedFileTypes?: string[]; } export interface QumlConfig { context: { env?: string; mode?: "play" | "edit" | "review"; partner?: string[]; headers?: Record; pdata?: { id: string; ver: string; pid: string; }; contentId?: string; timeDiff?: number; channel?: string; tags?: string[]; contextRollup?: { l1?: string; l2?: string; l3?: string; l4?: string; }; objectRollup?: Record; userData?: { firstName?: string; lastName?: string; }; host?: string; endpoint?: string; userName?: string; accToken?: string; sid?: string; uid?: string; tenantId?: string; tenantCode?: string; did?: string; credentials?: RequestCredentials; }; config: { showEndPage?: boolean; endpoint?: string; listApiEndpoint?: string; submitApiEndpoint?: string; headers?: Record; timeout?: number; retryAttempts?: number; endPage?: Array<{ template: string; contentType: string[]; }>; showStartPage?: boolean; showAssessmentInfo?: boolean; showSectionDetail?: boolean; host?: string; overlay?: { showUser?: boolean; }; splash?: { text?: string; icon?: string; bgImage?: string; webLink?: string; }; apislug?: string; repos?: string[]; plugins?: Array<{ id: string; ver: number; type: string; }>; sideMenu?: { showShare?: boolean; showDownload?: boolean; showExit?: boolean; showPrint?: boolean; showReplay?: boolean; }; showProgress?: boolean; maxQuestions?: number; uploadConfig?: UploadConfig; }; data?: Record; metadata?: QuestionSet; } export interface QuestionOption { id?: string; label: string; value: number | string; hint?: string; correct?: boolean; } export interface ResponseDeclaration { cardinality: "single" | "multiple"; type: "integer" | "string" | "text" | "map"; correctResponse?: { value: number | number[] | string | string[] | Array<{ source: string; target: string; }>; }; mapping?: Array<{ value: number | string; score: number; }>; } export interface Question { identifier: string; name: string; qType: "MCQ" | "MMCQ" | "MTF" | "SA" | "LA" | "ASQ"; primaryCategory: string; body: string; maxScore: number; timeLimit?: number; showTimer?: boolean; showHints?: boolean; showSolutions?: boolean; options?: { left: QuestionOption[]; right: QuestionOption[]; } | QuestionOption[]; leftColumn?: QuestionOption[]; rightColumn?: QuestionOption[]; responseDeclaration: Record; interactions?: { response1: { type: string; options?: QuestionOption[]; validation?: { required: "Yes" | "No"; }; }; }; editorState?: { question: string; options?: Array<{ value: { body: string; value: number; }; answer: boolean; }>; }; hints?: Record; solutions?: Record; media?: Array<{ id: string; type: string; src: string; baseUrl?: string; }>; assertion?: string; reason?: string; showEvidence?: 'Yes' | 'No'; evidence?: { mimeType: string[]; sizeLimit: string; required: 'Yes' | 'No'; minCount: number; maxCount: number; }; } export interface QuestionSet { identifier: string; name: string; description?: string; children: Array; timeLimits?: { questionSet?: { max: number; min: number; }; }; shuffle?: boolean; showStartPage?: boolean; showSectionInfo?: boolean; showAssessmentInfo?: boolean; showSectionDetail?: boolean; maxQuestions?: number; requiresSubmit?: boolean; allowSkip?: boolean; primaryCategory: "Practice Question Set" | "Question Set"; mimeType: "application/vnd.sunbird.questionset"; instructions?: string; channel?: string; } export interface SectionHierarchy { name: string; description?: string; questionIds: string[]; children: Array; identifier: string; primaryCategory: string; mimeType: string; instructions?: string; shuffle?: boolean; allowSkip?: boolean; } export interface PlayerState { currentQuestionIndex: number; responses: Record; startTime: number; endTime?: number; duration: number; score: number; maxScore: number; status: "not_started" | "in_progress" | "completed" | "submitted"; visitedQuestions: string[]; skippedQuestions: string[]; } export interface UploadData { provider: "s3" | "local" | "custom" | "sunbird"; url: string; fileName: string; fileSize: number; fileType: string; status: "uploading" | "success" | "failed"; error?: string; } export interface QuestionResponse { questionId: string; qType: string; values: Array<{ option?: { label: string; value: number; selected: boolean; }; body?: string; source?: string; target?: string; position?: number; }>; score?: number; maxScore: number; timeSpent: number; isCorrect?: boolean; isSkipped: boolean; timeStamp: number; uploads?: UploadData[]; } export interface TelemetryEvent { eid: "START" | "IMPRESSION" | "INTERACT" | "RESPONSE" | "ASSESS" | "END" | "SUMMARY" | "LOG" | "ERROR"; ets: number; ver: string; mid: string; actor: { id: string; type: "User"; }; context: { channel: string; pdata: { id: string; ver: string; pid: string; }; env: string; sid?: string; did?: string; cdata?: Array<{ id: string; type: string; }>; rollup?: { l1: string; }; uid?: string; }; object: { id: string; ver: string; type: string; rollup?: { l1?: string; l2?: string; l3?: string; l4?: string; }; }; tags: string[]; edata: StartEventData | ResponseEventData | AssessEventData | EndEventData | InteractEventData | LogEventData | ErrorEventData | Record; file?: { name: string; url?: string; size?: number; }; } export interface StartEventData { type: "content"; mode: "play"; pageid: string; duration: number; } export interface ResponseEventData { target: { id: string; type: string; }; type: "CHOOSE" | "MATCH" | "TEXT" | "SELECT"; values: Array<{ option?: { label: string; value: number; selected: boolean; }; body?: string; source?: string; target?: string; }>; } export interface AssessEventData { item: { id: string; title?: string; type: string; maxscore: number; }; score: number; maxscore: number; pass: "Yes" | "No"; rating?: number; resvalues: Array<{ [key: string]: string | number | boolean | null; }>; duration: number; } export interface EndEventData { type: "content"; mode: "play"; pageid: string; summary: Array<{ progress?: number; totalNoofQuestions?: number; visitedQuestions?: number; endpageseen?: boolean; score?: number; }>; duration: number; } export interface InteractEventData { type: "TOUCH"; subtype: "ACTIVATE"; id: string; pageid?: string; } export interface LogEventData { type: "UPLOAD" | "UPLOAD_PROGRESS"; level: "INFO" | "WARN" | "ERROR"; message?: string; progress?: number; } export interface ErrorEventData { err: string; errtype: "NETWORK" | "VALIDATION" | "SYSTEM"; stacktrace?: string; } export interface HierarchyResponse { id: string; ver: string; ts: string; params: { resmsgid: string; msgid: string | null; err: string | null; status: string; errmsg: string | null; }; responseCode: string; result: { questionset?: QuestionSet; content?: QuestionSet; }; } export interface QuestionListResponse { id: string; ver: string; ts: string; params: { resmsgid: string; msgid: string | null; err: string | null; status: string; errmsg: string | null; }; responseCode: string; result: { questions: Question[]; count: number; }; } export interface TelemetryResponse { id: string; ver: string; ets: number; params: { resmsgid?: string; msgid?: string | null; err?: string | null; status?: string; errmsg?: string | null; }; responseCode: string; } //# sourceMappingURL=quml.d.ts.map