/** * PowerPath Response Types * * Entity types returned by PowerPath API endpoints. */ import type { ExternalTestCapableLessonType, PaginationMeta, PowerPathLessonType, PowerPathQuestionDifficulty, QuizLikeLessonType, ScoreStatus, TestAssignmentStatus } from './base'; /** * A single test assignment entity. */ export interface TestAssignment { sourcedId: string; studentSourcedId: string; studentEmail: string; assignedByUserSourcedId: string | null; subject: string; grade: string; assignmentStatus: TestAssignmentStatus; testName?: string | null; assignedAt?: string | null; expiresAt?: string | null; completedAt?: string | null; resourceSourcedId?: string | null; componentResourceSourcedId?: string | null; } /** * List response for test assignments. */ export interface TestAssignmentsListResponse extends PaginationMeta { testAssignments: TestAssignment[]; } /** * Result from creating a test assignment. */ export interface AssignmentResult { assignmentId: string; lessonId: string; resourceId: string; } /** * Result from bulk operations. */ export interface BulkResult { success: boolean; results: AssignmentResult[]; errors: Array<{ row: number; message: string; }>; } /** * QTI content associated with a question. */ export interface PowerPathQuestionContent { /** The type of the question (e.g., choiceInteraction) */ type?: string; /** The raw XML question in QTI format */ rawXml: string; } /** * Result of evaluating a student's response to a question. */ export interface PowerPathQuestionResult { /** Score assigned considering the student's response */ score: number; /** Feedback — plain string from updateStudentQuestionResponse, structured object from progress/next-question responses */ feedback: string | { value: string; identifier: string; }; /** Outcome variables from response processing (values may be strings or numbers) */ outcomes?: Record; } /** * A question in a PowerPath test. * * Represents a question with its metadata, optional QTI content, * and (when answered) the student's response and result. */ export interface PowerPathTestQuestion { /** ID that represents the question in the test */ id: string; /** Index of the question in the test */ index: number; /** Title of the question */ title: string; /** URL of the QTI question */ url: string; /** Difficulty of the question */ difficulty: PowerPathQuestionDifficulty; /** Whether the question has been approved by a human */ humanApproved?: boolean | null; /** QTI content of the question */ content?: PowerPathQuestionContent; /** Student's response (single value or array) */ response?: string | string[]; /** Student's responses keyed by response identifier */ responses?: Record; /** Whether the student's response is correct */ correct?: boolean; /** Result of evaluating the response */ result?: PowerPathQuestionResult; /** sourcedId of the AssessmentResult for this question attempt */ resultId?: string; /** Learning objective IDs associated with the question */ learningObjectives?: string[]; } /** * Result from creating an external test (test-out or placement). */ export interface ExternalTestCreateResponse { /** Type of lesson created. */ lessonType: PowerPathLessonType; /** The sourcedId of the created lesson (ComponentResource). */ lessonId: string; /** The sourcedId of the component (unit) containing the test. */ courseComponentId: string; /** The sourcedId of the resource representing the external test. */ resourceId: string; /** URL to the external test system. */ launchUrl?: string; /** The tool provider identifier (e.g. 'edulastic', 'mastery-track'). */ toolProvider: string; /** The ID of the test in the vendor's system. */ vendorId?: string; /** The courseId to enroll the student in on failure (placement tests). */ courseIdOnFail?: string | null; /** Grade levels for the resource. */ grades?: Array; } /** * Result from creating an internal test (QTI or assessment-bank). */ export interface InternalTestCreateResponse { /** Type of lesson created. */ lessonType: PowerPathLessonType; /** The internal test type. */ testType: 'qti' | 'assessment-bank'; /** The sourcedId of the created lesson (ComponentResource). */ lessonId: string; /** The sourcedId of the component (unit) containing the test. */ courseComponentId: string; /** The sourcedId of the main resource (parent for assessment-bank). */ resourceId: string; /** Child resource IDs (only for assessment-bank type). */ childResourceIds?: string[]; /** The courseId to enroll the student in on failure (placement tests). */ courseIdOnFail?: string | null; /** Grade levels for the resource. */ grades?: Array; } /** * A single attempt record. * * Matches the backend `PowerPath100AttemptSchema` with full metadata * including XP, timestamps, and typed score status. */ export interface Attempt { /** Attempt number, or null if not yet started. */ attempt: number | null; /** Current score for this attempt. */ score: number; /** Grading status of this attempt. */ scoreStatus: ScoreStatus; /** XP earned in this attempt. */ xp: number | null; /** When this attempt was started. */ startedAt: string | null; /** When this attempt was completed. */ completedAt: string | null; } /** * Result from creating a new attempt. */ export interface CreateAttemptResponse { attempt: Attempt; } /** * Result from getting attempts for a lesson. */ export interface GetAttemptsResponse { attempts: Attempt[]; } /** * Result from resetting an attempt. */ export interface ResetAttemptResponse { success: boolean; score: number; } /** * Progress for a PowerPath 100 lesson. * * Uses `seenQuestions` (not `questions`) and includes remaining question counts * per difficulty level. */ export interface PowerPath100ProgressResponse { lessonType: 'powerpath-100'; /** Remaining question counts per difficulty level */ remainingQuestionsPerDifficulty: { easy: number; medium: number; hard: number; }; /** Current score for this attempt */ score: number; /** Questions the student has seen */ seenQuestions: PowerPathTestQuestion[]; /** sourcedId of the parent test AssessmentResult */ testResultId?: string; /** Attempt number */ attempt: number; /** XP earned in the lesson */ xp: number | null; /** Multiplier for XP */ multiplier: number | null; /** Accuracy of the student's attempted questions */ accuracy: number; /** Number of correct questions answered */ correctQuestions: number; /** Total number of questions in the lesson */ totalQuestions: number; } /** * Progress for quiz, test-out, placement, or unit-test lessons. * * Uses `questions` (not `seenQuestions`). Includes `finalized` to indicate * whether the lesson has been completed. */ export interface StandardProgressResponse { lessonType: 'quiz' | 'test-out' | 'placement' | 'unit-test'; /** Whether the lesson has been finalized in the current attempt */ finalized: boolean; /** Current score for this attempt */ score?: number; /** Questions in the test */ questions: PowerPathTestQuestion[]; /** Tool provider of the lesson if external */ toolProvider: string | null; /** Whether auto-enrollment failed (only for finalized external tests) */ enrollmentFailed?: boolean; /** sourcedId of the parent test AssessmentResult */ testResultId?: string; /** Attempt number */ attempt: number; /** XP earned in the lesson */ xp: number | null; /** Multiplier for XP */ multiplier: number | null; /** Accuracy of the student's attempted questions */ accuracy: number; /** Number of correct questions answered */ correctQuestions: number; /** Total number of questions in the lesson */ totalQuestions: number; } /** * Result from getting assessment progress. * * Discriminated union on `lessonType`: * - `'powerpath-100'` — uses `seenQuestions` and `remainingQuestionsPerDifficulty` * - `'quiz' | 'test-out' | 'placement' | 'unit-test'` — uses `questions` and `finalized` */ export type GetAssessmentProgressResponse = PowerPath100ProgressResponse | StandardProgressResponse; /** * Result from getting the next question in a PowerPath 100 lesson. */ export interface GetNextQuestionResponse { /** Current PowerPath score of the student in this lesson */ score: number; /** The next question to present */ question: PowerPathTestQuestion; } /** * Response feedback for a student's answer. */ export interface ResponseResultFeedback { identifier?: string; value?: string; } /** * Result of processing a student's response. */ export interface ResponseResult { /** Whether the student's response is correct */ isCorrect: boolean; /** Score for this specific response (0 or 1) */ score: number; /** Optional feedback */ feedback?: ResponseResultFeedback; } /** * Result from updating a student's response in a PowerPath 100 lesson. * * Includes the updated PowerPath score, response correctness, and accuracy stats. */ export interface PowerPath100UpdateResponseResult { lessonType: 'powerpath-100'; /** Updated PowerPath score */ powerpathScore: number; /** Result of processing the response */ responseResult: ResponseResult; /** Assessment result for the question (for debugging) */ questionResult?: unknown; /** Assessment result for the test (for debugging) */ testResult?: unknown; /** Accuracy of the student's attempted questions */ accuracy: number; /** Number of correct questions answered */ correctQuestions: number; /** Total number of questions */ totalQuestions: number; /** XP earned */ xp: number | null; /** XP multiplier */ multiplier: number | null; } /** * Result from updating a student's response in a quiz/test-out/placement/unit-test lesson. * * Minimal response — correctness is evaluated at finalization. */ export interface StandardUpdateResponseResult { lessonType: 'quiz' | 'test-out' | 'placement' | 'unit-test'; /** Assessment result for the question (for debugging) */ questionResult?: unknown; } /** * Result from updating a student question response. * * Discriminated union on `lessonType`: * - `'powerpath-100'` — includes score, accuracy, and response correctness * - Other lesson types — minimal, evaluated at finalization */ export type UpdateStudentQuestionResponseResult = PowerPath100UpdateResponseResult | StandardUpdateResponseResult; /** * Result from finalizing a test assessment. * * Returned after all questions have been answered and the lesson is * evaluated. Only applicable to quiz-like lesson types (quiz, test-out, * placement, unit-test). Not applicable to `powerpath-100`. */ export interface FinalizeAssessmentResponse { /** Type of the lesson that was finalized (quiz-like only). */ lessonType: QuizLikeLessonType; /** Whether the lesson has been finalized. */ finalized: boolean; /** The attempt number. */ attempt: number; } /** * Result from getting the test-out lesson for a student/course. * * Returns the test-out lesson reference, finalization status, * and optional external tool credentials. */ export interface TestOutResponse { lessonType: 'test-out'; /** ID of the test-out lesson, or null if none exists */ lessonId: string | null; /** Whether the test-out has been finalized in the current attempt */ finalized: boolean; /** Tool provider for the test-out lesson, or null if internal */ toolProvider: string | null; /** Attempt number */ attempt?: number; /** Credentials for accessing the assigned test on external tool */ credentials?: { email: string; password: string; }; /** Assignment ID on external tool for results retrieval */ assignmentId?: string; /** Class ID on external tool for results retrieval */ classId?: string; /** URL of the test on external tool */ testUrl?: string; /** ID of the test on external tool */ testId?: string; } /** * Result from importing external test assignment results. * * Contains the lesson reference, finalization status, and optional * external tool credentials/assignment data. */ export interface ImportExternalResultsResponse { /** Lesson type (external-capable types only). */ lessonType: ExternalTestCapableLessonType; /** The sourcedId of the lesson (ComponentResource). */ lessonId: string | null; /** The tool provider for the lesson. */ toolProvider: string | null; /** Whether the test has been finalized in the current attempt. */ finalized: boolean; /** Attempt number. */ attempt: number; /** Credentials for accessing the assigned test on external tool. */ credentials?: { email: string; password: string; }; /** Assignment ID on external tool for results retrieval. */ assignmentId?: string; /** Class ID on external tool for results retrieval. */ classId?: string; /** URL of the test on external tool. */ testUrl?: string; /** ID of the test on external tool. */ testId?: string; } /** * Result from assigning an external test to a student. * * Contains the tool provider, lesson type, attempt number, and optional * external tool credentials/assignment data. */ export interface MakeExternalTestAssignmentResponse { /** The tool provider (e.g. 'edulastic', 'mastery-track'). */ toolProvider: string; /** Lesson type (external-capable types only). */ lessonType: ExternalTestCapableLessonType; /** Attempt number. */ attempt: number; /** Credentials for accessing the assigned test on external tool. */ credentials?: { email: string; password: string; }; /** Assignment ID on external tool for results retrieval. */ assignmentId?: string; /** Class ID on external tool for results retrieval. */ classId?: string; /** URL of the test on external tool. */ testUrl?: string; /** ID of the test on external tool. */ testId?: string; } /** * Result from getting all placement tests. */ export interface GetAllPlacementTestsResponse { placementTests: unknown[]; } /** * Result from getting current placement level. */ export interface GetCurrentLevelResponse { gradeLevel?: unknown; onboarded?: boolean; availableTests: number; } /** * Result from getting the next placement test. */ export interface GetNextPlacementTestResponse { availableTests: number; lesson: string; } /** * Result from getting subject progress. */ export interface GetSubjectProgressResponse { progress: unknown[]; } /** * Result from resetting placement. */ export interface ResetPlacementResponse { success: boolean; placementResultsDeleted: number; onboardingReset: boolean; } /** * Result from screening getResults. * Response shape depends on MAP integration configuration. */ export interface ScreeningResultsResponse { [key: string]: unknown; } /** * Result from screening getSession. * Response shape depends on MAP integration configuration. */ export interface ScreeningSessionResponse { [key: string]: unknown; } /** * Result from resetting a screening session. */ export interface ScreeningResetSessionResponse { success?: boolean; [key: string]: unknown; } /** * Result from assigning a screening test. */ export interface ScreeningAssignTestResponse { success?: boolean; [key: string]: unknown; } /** * Result from creating a lesson plan. */ export interface LessonPlanCreateResponse { lessonPlanId: string; } /** * A lesson plan operation record. */ export interface LessonPlanOperation { id: string; type: string; payload?: unknown; reason?: string; createdAt: string; sequenceNumber: number; createdBy?: string; } /** * Response containing lesson plan operations. */ export interface LessonPlanOperationsResponse { operations: LessonPlanOperation[]; } /** * Result from a single lesson plan operation. */ export interface LessonPlanOperationResult { success: boolean; message?: string; operationId?: string; } /** * Result from syncing lesson plan operations. */ export interface LessonPlanSyncResult { success: boolean; message?: string; operationCount: number; operationResults: Array<{ success: boolean; errors?: Array<{ message: string; }>; }>; } /** * Result from syncing a course. */ export interface LessonPlanCourseSyncResult { lessonPlansAffected: string[]; } /** * Response containing a lesson plan. */ export interface LessonPlanResponse { lessonPlan: Record; } /** * Response containing course progress. */ export interface CourseProgressResponse { lineItems: Record[]; } /** * Result from updating student item response. */ export interface UpdateStudentItemResponseResult { success?: boolean; [key: string]: unknown; } /** * Result from checking test-out eligibility for a student/subject. */ export interface GetTestOutEligibilityResponse { eligible: boolean; reason?: string; } /** * Result from creating a self-elected test-out assignment. */ export interface MakeExternalStudentTestOutAssignmentResponse { success: boolean; data?: Record; } /** * Result from upserting render configs for one or more courses. */ export interface RenderConfigUpsertResponse { updated: string[]; } /** * Render config for a single course. */ export interface RenderConfigGetResponse { courseId: string; rendererId: string; rendererUrl: string; rendererVersion?: string | null; suppressFeedback: boolean; suppressCorrectResponse: boolean; } /** * Result from deleting a render config. */ export interface RenderConfigDeleteResponse { deleted: string; } /** * Response containing syllabus data. */ export interface SyllabusResponse { syllabus?: unknown; } //# sourceMappingURL=responses.d.ts.map