/** * OneRoster Base Types * * Common types used across all OneRoster entities. * * - OneRoster-specific primitives: `./primitives.ts` * - Shared Timeback primitives: `@timeback/types` */ export type { OneRosterUserRole, OrganizationType, ScoreStatus } from './primitives'; export type { IMSErrorResponse, TimebackGrade, TimebackSubject } from '../../primitives'; export type { LessonType } from '../qti/primitives'; /** * Base interface for all OneRoster entities. * * All OneRoster resources share these common fields for identification, * status tracking, and extensibility. */ export interface Base { /** * Globally unique identifier for the entity. * Typically a UUID assigned by the source system. */ sourcedId?: string; /** * The status of the entity. * - `active`: Entity is current and valid * - `tobedeleted`: Entity is marked for deletion */ status?: 'active' | 'tobedeleted'; /** * ISO 8601 timestamp of the last modification. * @example * // "2024-01-15T10:30:00Z" */ dateLastModified?: string; /** * Extensible metadata object for custom properties. * Used for vendor-specific extensions. */ metadata?: Record | null; } /** * A score for a specific learning objective. */ export interface LearningObjectiveResult { /** Identifier of the learning objective */ learningObjectiveId: string; /** Numeric score */ score?: number; /** Text-based score (e.g., "Proficient") */ textScore?: string; } /** * A set of learning objective IDs. */ export interface LearningObjectiveSetItem { /** Source system for these learning objectives */ source: string; /** Learning objective IDs (for line items and resource metadata) */ learningObjectiveIds: string[]; } /** * Array of learning objective sets, or null if not applicable. */ export type LearningObjectiveSet = LearningObjectiveSetItem[] | null; /** * A set of learning objective scores. */ export interface LearningObjectiveScoreSetItem { /** Source system for these learning objectives */ source: string; /** Learning objective results (for results and assessment results) */ learningObjectiveResults: LearningObjectiveResult[]; } /** * Array of learning objective score sets, or null if not applicable. */ export type LearningObjectiveScoreSet = LearningObjectiveScoreSetItem[] | null; /** * A reference to another OneRoster entity by sourcedId. */ export interface Ref { /** The sourcedId of the referenced entity */ sourcedId: string; } /** * A reference with an optional type discriminator. */ export interface RefWithType extends Ref { /** The type of the referenced entity (e.g., "user", "class") */ type?: string; } /** * A fully-qualified reference with href and type. * Commonly returned in API responses for navigable links. */ export interface RefWithHref extends Ref { /** The URL to fetch the referenced entity */ href: string; /** The type of the referenced entity */ type: string; } /** * Response returned when creating a new entity. * Contains the mapping between supplied and allocated IDs. */ export interface CreateResponse { sourcedIdPairs: { /** The sourcedId provided in the create request */ suppliedSourcedId: string; /** The sourcedId allocated by the server (may differ) */ allocatedSourcedId: string; }; } //# sourceMappingURL=base.d.ts.map