@timeback/oneroster 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/errors.js +95 -8
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14781 -74
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/pagination.d.ts +3 -0
- package/dist/lib/pagination.d.ts.map +1 -1
- package/dist/lib/validation.d.ts +21 -0
- package/dist/lib/validation.d.ts.map +1 -0
- package/dist/resources/assessment/line-items.d.ts.map +1 -1
- package/dist/resources/assessment/results.d.ts +1 -0
- package/dist/resources/assessment/results.d.ts.map +1 -1
- package/dist/resources/base.d.ts +83 -7
- package/dist/resources/base.d.ts.map +1 -1
- package/dist/resources/gradebook/categories.d.ts +4 -1
- package/dist/resources/gradebook/categories.d.ts.map +1 -1
- package/dist/resources/gradebook/line-items.d.ts.map +1 -1
- package/dist/resources/gradebook/results.d.ts +7 -3
- package/dist/resources/gradebook/results.d.ts.map +1 -1
- package/dist/resources/gradebook/score-scales.d.ts +3 -0
- package/dist/resources/gradebook/score-scales.d.ts.map +1 -1
- package/dist/resources/resources/resources.d.ts.map +1 -1
- package/dist/resources/rostering/academic-sessions.d.ts +8 -1
- package/dist/resources/rostering/academic-sessions.d.ts.map +1 -1
- package/dist/resources/rostering/classes.d.ts +3 -1
- package/dist/resources/rostering/classes.d.ts.map +1 -1
- package/dist/resources/rostering/courses.d.ts +1 -1
- package/dist/resources/rostering/courses.d.ts.map +1 -1
- package/dist/resources/rostering/demographics.d.ts +5 -1
- package/dist/resources/rostering/demographics.d.ts.map +1 -1
- package/dist/resources/rostering/enrollments.d.ts +5 -1
- package/dist/resources/rostering/enrollments.d.ts.map +1 -1
- package/dist/resources/rostering/orgs.d.ts +5 -1
- package/dist/resources/rostering/orgs.d.ts.map +1 -1
- package/dist/resources/rostering/schools.d.ts +2 -1
- package/dist/resources/rostering/schools.d.ts.map +1 -1
- package/dist/resources/rostering/users.d.ts +6 -1
- package/dist/resources/rostering/users.d.ts.map +1 -1
- package/dist/types/callable.d.ts +14 -6
- package/dist/types/callable.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -10
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/streamable.d.ts +36 -0
- package/dist/types/streamable.d.ts.map +1 -0
- package/package.json +3 -2
- package/dist/types/base.d.ts +0 -127
- package/dist/types/base.d.ts.map +0 -1
- package/dist/types/filters.d.ts +0 -165
- package/dist/types/filters.d.ts.map +0 -1
- package/dist/types/gradebook.d.ts +0 -262
- package/dist/types/gradebook.d.ts.map +0 -1
- package/dist/types/resources.d.ts +0 -191
- package/dist/types/resources.d.ts.map +0 -1
- package/dist/types/rostering.d.ts +0 -732
- package/dist/types/rostering.d.ts.map +0 -1
|
@@ -1,732 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OneRoster Rostering Types
|
|
3
|
-
*
|
|
4
|
-
* Types for rostering entities: users, orgs, courses, classes, enrollments, terms.
|
|
5
|
-
*/
|
|
6
|
-
import type { OneRosterUserRole, OrganizationType, TimebackGrade, TimebackSubject } from '@timeback/types';
|
|
7
|
-
import type { Base, Ref, RefWithHref } from './base';
|
|
8
|
-
/**
|
|
9
|
-
* An organization such as a school, district, or department.
|
|
10
|
-
*
|
|
11
|
-
* Organizations form a hierarchy with parent/child relationships.
|
|
12
|
-
* Schools are a specific type of organization.
|
|
13
|
-
*/
|
|
14
|
-
export interface Organization extends Base {
|
|
15
|
-
/** Display name of the organization */
|
|
16
|
-
name: string;
|
|
17
|
-
/** Type of organization (school, district, department, etc.) */
|
|
18
|
-
type: OrganizationType;
|
|
19
|
-
/** External identifier (e.g., state school ID) */
|
|
20
|
-
identifier?: string;
|
|
21
|
-
/** Reference to parent organization */
|
|
22
|
-
parent?: RefWithHref | null;
|
|
23
|
-
/** References to child organizations */
|
|
24
|
-
children?: RefWithHref[] | null;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Input for creating/updating an organization.
|
|
28
|
-
* Uses simple Ref (just sourcedId) for references.
|
|
29
|
-
*/
|
|
30
|
-
export interface OrgCreateInput {
|
|
31
|
-
/** Client-supplied sourcedId (optional, server generates if omitted) */
|
|
32
|
-
sourcedId?: string;
|
|
33
|
-
/** Status */
|
|
34
|
-
status?: 'active' | 'tobedeleted';
|
|
35
|
-
/** Metadata */
|
|
36
|
-
metadata?: Record<string, unknown>;
|
|
37
|
-
/** Display name of the organization */
|
|
38
|
-
name: string;
|
|
39
|
-
/** Type of organization */
|
|
40
|
-
type: OrganizationType;
|
|
41
|
-
/** External identifier */
|
|
42
|
-
identifier?: string | null;
|
|
43
|
-
/** Parent organization reference */
|
|
44
|
-
parent?: Ref | null;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Input for creating/updating a school (org with type='school').
|
|
48
|
-
*/
|
|
49
|
-
export type SchoolCreateInput = Omit<OrgCreateInput, 'type'> & {
|
|
50
|
-
type?: 'school';
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* An external user identifier from another system.
|
|
54
|
-
*/
|
|
55
|
-
export interface UserId {
|
|
56
|
-
/** Type of identifier (e.g., "SIS", "LDAP") */
|
|
57
|
-
type: string;
|
|
58
|
-
/** The identifier value */
|
|
59
|
-
identifier: string;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* A role assignment for a user at a specific organization.
|
|
63
|
-
*/
|
|
64
|
-
export interface UserRole {
|
|
65
|
-
/** Whether this is the user's primary or secondary role */
|
|
66
|
-
roleType: 'primary' | 'secondary';
|
|
67
|
-
/** The role type (student, teacher, administrator, etc.) */
|
|
68
|
-
role: OneRosterUserRole;
|
|
69
|
-
/** The organization where this role applies */
|
|
70
|
-
org: RefWithHref;
|
|
71
|
-
/** Associated user profile identifier */
|
|
72
|
-
userProfile?: string;
|
|
73
|
-
/** Role-specific metadata */
|
|
74
|
-
metadata?: Record<string, unknown> | null;
|
|
75
|
-
/** When this role assignment begins */
|
|
76
|
-
beginDate?: string | null;
|
|
77
|
-
/** When this role assignment ends */
|
|
78
|
-
endDate?: string | null;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Role assignment input for user creation/update.
|
|
82
|
-
* Uses simple Ref (just sourcedId) for org reference.
|
|
83
|
-
*/
|
|
84
|
-
export interface UserRoleInput {
|
|
85
|
-
/** Whether this is the user's primary or secondary role */
|
|
86
|
-
roleType: 'primary' | 'secondary';
|
|
87
|
-
/** The role type */
|
|
88
|
-
role: OneRosterUserRole;
|
|
89
|
-
/** The organization where this role applies (simple ref) */
|
|
90
|
-
org: Ref;
|
|
91
|
-
/** Associated user profile identifier */
|
|
92
|
-
userProfile?: string;
|
|
93
|
-
/** Role-specific metadata */
|
|
94
|
-
metadata?: Record<string, unknown> | null;
|
|
95
|
-
/** When this role assignment begins */
|
|
96
|
-
beginDate?: string | null;
|
|
97
|
-
/** When this role assignment ends */
|
|
98
|
-
endDate?: string | null;
|
|
99
|
-
}
|
|
100
|
-
/** @internal */
|
|
101
|
-
export interface UserProfileCredential {
|
|
102
|
-
id: string;
|
|
103
|
-
type: string;
|
|
104
|
-
username: string;
|
|
105
|
-
password?: string | null;
|
|
106
|
-
}
|
|
107
|
-
/** @internal */
|
|
108
|
-
export interface UserProfileApp {
|
|
109
|
-
sourcedId: string;
|
|
110
|
-
name: string;
|
|
111
|
-
description?: string | null;
|
|
112
|
-
domain: string[];
|
|
113
|
-
metadata?: Record<string, unknown> | null;
|
|
114
|
-
}
|
|
115
|
-
/** @internal */
|
|
116
|
-
export interface UserProfile {
|
|
117
|
-
profileId: string;
|
|
118
|
-
profileType: string;
|
|
119
|
-
vendorId: string;
|
|
120
|
-
applicationId: string;
|
|
121
|
-
description?: string | null;
|
|
122
|
-
app: UserProfileApp;
|
|
123
|
-
credentials: UserProfileCredential[];
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* A user in the OneRoster system.
|
|
127
|
-
*
|
|
128
|
-
* Users can be students, teachers, parents, administrators, or other roles.
|
|
129
|
-
* A user may have multiple roles at different organizations.
|
|
130
|
-
*/
|
|
131
|
-
export interface User extends Base {
|
|
132
|
-
/** Master identifier for cross-system user matching */
|
|
133
|
-
userMasterIdentifier?: string | null;
|
|
134
|
-
/** Login username */
|
|
135
|
-
username?: string | null;
|
|
136
|
-
/** External identifiers from other systems */
|
|
137
|
-
userIds?: UserId[];
|
|
138
|
-
/** Whether the user account is enabled */
|
|
139
|
-
enabledUser: boolean;
|
|
140
|
-
/** User's first name */
|
|
141
|
-
givenName: string;
|
|
142
|
-
/** User's last name */
|
|
143
|
-
familyName: string;
|
|
144
|
-
/** User's middle name */
|
|
145
|
-
middleName?: string | null;
|
|
146
|
-
/** External identifier */
|
|
147
|
-
identifier?: string | null;
|
|
148
|
-
/** User's email address */
|
|
149
|
-
email?: string;
|
|
150
|
-
/** Role assignments at organizations */
|
|
151
|
-
roles: UserRole[];
|
|
152
|
-
/** References to related users (e.g., parents for students) */
|
|
153
|
-
agents?: RefWithHref[];
|
|
154
|
-
/** Application-specific profiles */
|
|
155
|
-
userProfiles?: UserProfile[];
|
|
156
|
-
/** User's primary organization */
|
|
157
|
-
primaryOrg?: RefWithHref & {
|
|
158
|
-
name?: string | null;
|
|
159
|
-
};
|
|
160
|
-
/** Preferred first name */
|
|
161
|
-
preferredFirstName?: string | null;
|
|
162
|
-
/** Preferred middle name */
|
|
163
|
-
preferredMiddleName?: string | null;
|
|
164
|
-
/** Preferred last name */
|
|
165
|
-
preferredLastName?: string | null;
|
|
166
|
-
/** User's pronouns */
|
|
167
|
-
pronouns?: string | null;
|
|
168
|
-
/** Grade levels associated with the user */
|
|
169
|
-
grades?: TimebackGrade[];
|
|
170
|
-
/** Password (write-only, not returned in responses) */
|
|
171
|
-
password?: string | null;
|
|
172
|
-
/** SMS phone number */
|
|
173
|
-
sms?: string | null;
|
|
174
|
-
/** Phone number */
|
|
175
|
-
phone?: string | null;
|
|
176
|
-
/** Demographic information */
|
|
177
|
-
demographics?: Demographics | null;
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Input for creating/updating a user.
|
|
181
|
-
* Uses simple Ref (just sourcedId) for references.
|
|
182
|
-
*/
|
|
183
|
-
export interface UserCreateInput {
|
|
184
|
-
/** Client-supplied sourcedId (optional) */
|
|
185
|
-
sourcedId?: string;
|
|
186
|
-
/** Status */
|
|
187
|
-
status?: 'active' | 'tobedeleted';
|
|
188
|
-
/** Metadata */
|
|
189
|
-
metadata?: Record<string, unknown>;
|
|
190
|
-
/** Master identifier for cross-system matching */
|
|
191
|
-
userMasterIdentifier?: string | null;
|
|
192
|
-
/** Login username */
|
|
193
|
-
username?: string | null;
|
|
194
|
-
/** External identifiers */
|
|
195
|
-
userIds?: UserId[];
|
|
196
|
-
/** Whether the user account is enabled */
|
|
197
|
-
enabledUser: boolean;
|
|
198
|
-
/** User's first name */
|
|
199
|
-
givenName: string;
|
|
200
|
-
/** User's last name */
|
|
201
|
-
familyName: string;
|
|
202
|
-
/** User's middle name */
|
|
203
|
-
middleName?: string | null;
|
|
204
|
-
/** User's email address */
|
|
205
|
-
email: string;
|
|
206
|
-
/** Role assignments (uses simple Ref for org) */
|
|
207
|
-
roles: UserRoleInput[];
|
|
208
|
-
/** Agent references (simple refs) */
|
|
209
|
-
agents?: Ref[];
|
|
210
|
-
/** Primary organization (simple ref) */
|
|
211
|
-
primaryOrg?: Ref;
|
|
212
|
-
/** Preferred first name */
|
|
213
|
-
preferredFirstName?: string | null;
|
|
214
|
-
/** Preferred middle name */
|
|
215
|
-
preferredMiddleName?: string | null;
|
|
216
|
-
/** Preferred last name */
|
|
217
|
-
preferredLastName?: string | null;
|
|
218
|
-
/** User's pronouns */
|
|
219
|
-
pronouns?: string | null;
|
|
220
|
-
/** Grade levels */
|
|
221
|
-
grades?: TimebackGrade[];
|
|
222
|
-
/** Password (write-only) */
|
|
223
|
-
password?: string | null;
|
|
224
|
-
/** SMS phone number */
|
|
225
|
-
sms?: string | null;
|
|
226
|
-
/** Phone number */
|
|
227
|
-
phone?: string | null;
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Demographic information for a user.
|
|
231
|
-
*
|
|
232
|
-
* Contains sensitive PII data including birth date, race, and ethnicity.
|
|
233
|
-
*/
|
|
234
|
-
export interface Demographics extends Base {
|
|
235
|
-
/** Birth date in YYYY-MM-DD format */
|
|
236
|
-
birthDate?: string | null;
|
|
237
|
-
/** Biological sex */
|
|
238
|
-
sex?: 'male' | 'female' | 'other' | 'unspecified' | null;
|
|
239
|
-
americanIndianOrAlaskaNative?: string | null;
|
|
240
|
-
asian?: string | null;
|
|
241
|
-
blackOrAfricanAmerican?: string | null;
|
|
242
|
-
nativeHawaiianOrOtherPacificIslander?: string | null;
|
|
243
|
-
white?: string | null;
|
|
244
|
-
demographicRaceTwoOrMoreRaces?: string | null;
|
|
245
|
-
hispanicOrLatinoEthnicity?: string | null;
|
|
246
|
-
countryOfBirthCode?: string | null;
|
|
247
|
-
stateOfBirthAbbreviation?: string | null;
|
|
248
|
-
cityOfBirth?: string | null;
|
|
249
|
-
publicSchoolResidenceStatus?: string | null;
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Input for creating/updating demographics.
|
|
253
|
-
* sourcedId must match an existing user's sourcedId.
|
|
254
|
-
*/
|
|
255
|
-
export interface DemographicsCreateInput {
|
|
256
|
-
/** Must match an existing user's sourcedId */
|
|
257
|
-
sourcedId: string;
|
|
258
|
-
/** Status */
|
|
259
|
-
status?: 'active' | 'tobedeleted';
|
|
260
|
-
/** Metadata */
|
|
261
|
-
metadata?: Record<string, unknown>;
|
|
262
|
-
/** Birth date in YYYY-MM-DD format */
|
|
263
|
-
birthDate?: string | null;
|
|
264
|
-
/** Biological sex */
|
|
265
|
-
sex?: 'male' | 'female' | null;
|
|
266
|
-
americanIndianOrAlaskaNative?: boolean | null;
|
|
267
|
-
asian?: boolean | null;
|
|
268
|
-
blackOrAfricanAmerican?: boolean | null;
|
|
269
|
-
nativeHawaiianOrOtherPacificIslander?: boolean | null;
|
|
270
|
-
white?: boolean | null;
|
|
271
|
-
demographicRaceTwoOrMoreRaces?: boolean | null;
|
|
272
|
-
hispanicOrLatinoEthnicity?: boolean | null;
|
|
273
|
-
countryOfBirthCode?: string | null;
|
|
274
|
-
stateOfBirthAbbreviation?: string | null;
|
|
275
|
-
cityOfBirth?: string | null;
|
|
276
|
-
publicSchoolResidenceStatus?: string | null;
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Daily learning goals for a course or enrollment.
|
|
280
|
-
*/
|
|
281
|
-
export interface CourseGoals {
|
|
282
|
-
/** Target XP to earn per day */
|
|
283
|
-
dailyXp?: number;
|
|
284
|
-
/** Target lessons to complete per day */
|
|
285
|
-
dailyLessons?: number;
|
|
286
|
-
/** Target active learning minutes per day */
|
|
287
|
-
dailyActiveMinutes?: number;
|
|
288
|
-
/** Target accuracy percentage */
|
|
289
|
-
dailyAccuracy?: number;
|
|
290
|
-
/** Target mastered units per day */
|
|
291
|
-
dailyMasteredUnits?: number;
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Aggregate metrics for a course.
|
|
295
|
-
*/
|
|
296
|
-
export interface CourseMetrics {
|
|
297
|
-
/** Total XP available in the course */
|
|
298
|
-
totalXp?: number;
|
|
299
|
-
/** Total number of lessons/activities */
|
|
300
|
-
totalLessons?: number;
|
|
301
|
-
/** Total grade levels covered */
|
|
302
|
-
totalGrades?: number;
|
|
303
|
-
/** Course classification type */
|
|
304
|
-
courseType?: 'base' | 'hole-filling' | 'optional' | 'Base' | 'Hole-Filling' | 'Optional';
|
|
305
|
-
/** Whether this is supplemental content */
|
|
306
|
-
isSupplemental?: boolean;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* Extended metadata for courses.
|
|
310
|
-
*/
|
|
311
|
-
export interface CourseMetadata extends Record<string, unknown> {
|
|
312
|
-
/** Course classification (base, hole-filling, optional) */
|
|
313
|
-
courseType?: 'base' | 'hole-filling' | 'optional';
|
|
314
|
-
/** Whether this is supplemental content */
|
|
315
|
-
isSupplemental?: boolean;
|
|
316
|
-
/** Whether this is a custom course for a specific student */
|
|
317
|
-
isCustom?: boolean;
|
|
318
|
-
/** Publication status of the course */
|
|
319
|
-
publishStatus?: 'draft' | 'testing' | 'published' | 'deactivated';
|
|
320
|
-
/** Contact email for course issues */
|
|
321
|
-
contactEmail?: string;
|
|
322
|
-
/** Primary application identifier */
|
|
323
|
-
primaryApp?: string;
|
|
324
|
-
/** Daily learning goals */
|
|
325
|
-
goals?: CourseGoals;
|
|
326
|
-
/** Aggregate metrics */
|
|
327
|
-
metrics?: CourseMetrics;
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* A course in the curriculum.
|
|
331
|
-
*
|
|
332
|
-
* Courses define the content to be taught and can have multiple classes
|
|
333
|
-
* (sections) associated with them.
|
|
334
|
-
*/
|
|
335
|
-
export interface Course extends Omit<Base, 'metadata'> {
|
|
336
|
-
/** Course-specific metadata */
|
|
337
|
-
metadata?: CourseMetadata | null;
|
|
338
|
-
/** Course title */
|
|
339
|
-
title: string;
|
|
340
|
-
/** Course code (e.g., "MATH101") */
|
|
341
|
-
courseCode?: string;
|
|
342
|
-
/** Grade levels for this course */
|
|
343
|
-
grades?: TimebackGrade[];
|
|
344
|
-
/** Subject areas */
|
|
345
|
-
subjects?: TimebackSubject[];
|
|
346
|
-
/** Subject codes */
|
|
347
|
-
subjectCodes?: string[];
|
|
348
|
-
/** Organization offering this course */
|
|
349
|
-
org: Ref;
|
|
350
|
-
/** Course level (e.g., "AP", "Honors") */
|
|
351
|
-
level?: string;
|
|
352
|
-
/** Grading scheme identifier */
|
|
353
|
-
gradingScheme?: string;
|
|
354
|
-
/** Associated academic session */
|
|
355
|
-
academicSession?: Ref;
|
|
356
|
-
/** School year reference */
|
|
357
|
-
schoolYear?: RefWithHref;
|
|
358
|
-
/** Learning resources for this course */
|
|
359
|
-
resources?: RefWithHref[];
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Input for creating a new course.
|
|
363
|
-
*
|
|
364
|
-
* Required fields: title, org, status
|
|
365
|
-
*/
|
|
366
|
-
export interface CourseCreateInput {
|
|
367
|
-
/** Client-supplied sourcedId (optional) */
|
|
368
|
-
sourcedId?: string;
|
|
369
|
-
/** Course title */
|
|
370
|
-
title: string;
|
|
371
|
-
/** Organization offering this course */
|
|
372
|
-
org: Ref;
|
|
373
|
-
/** Status (required for creation) */
|
|
374
|
-
status: 'active' | 'tobedeleted';
|
|
375
|
-
/** Course code (e.g., "MATH101") */
|
|
376
|
-
courseCode?: string;
|
|
377
|
-
/** Grade levels for this course */
|
|
378
|
-
grades?: TimebackGrade[];
|
|
379
|
-
/** Subject areas */
|
|
380
|
-
subjects?: TimebackSubject[];
|
|
381
|
-
/** Subject codes */
|
|
382
|
-
subjectCodes?: string[];
|
|
383
|
-
/** Course level (e.g., "AP", "Honors") */
|
|
384
|
-
level?: string;
|
|
385
|
-
/** Course-specific metadata */
|
|
386
|
-
metadata?: CourseMetadata | null;
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* A single item in a QTI-derived course structure.
|
|
390
|
-
*
|
|
391
|
-
* Represents metadata about a lesson/skill from QTI test content.
|
|
392
|
-
*/
|
|
393
|
-
export interface CourseStructureItem {
|
|
394
|
-
/** URL to the QTI content */
|
|
395
|
-
url: string;
|
|
396
|
-
/** Skill code identifier */
|
|
397
|
-
skillCode: string;
|
|
398
|
-
/** Lesson code identifier */
|
|
399
|
-
lessonCode: string;
|
|
400
|
-
/** Title of the lesson/skill */
|
|
401
|
-
title: string;
|
|
402
|
-
/** Title of the containing unit */
|
|
403
|
-
'unit-title': string;
|
|
404
|
-
/** Status of the content */
|
|
405
|
-
status: string;
|
|
406
|
-
/** Experience points value */
|
|
407
|
-
xp: number;
|
|
408
|
-
/** Optional stimulus content */
|
|
409
|
-
stimulus?: {
|
|
410
|
-
title: string;
|
|
411
|
-
identifier: string;
|
|
412
|
-
};
|
|
413
|
-
/** Optional video content */
|
|
414
|
-
video?: {
|
|
415
|
-
url: string;
|
|
416
|
-
title: string;
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
/**
|
|
420
|
-
* Input for creating a course structure from QTI tests.
|
|
421
|
-
*
|
|
422
|
-
* Contains both the course to create and the QTI-derived structure.
|
|
423
|
-
*/
|
|
424
|
-
export interface CourseStructureInput {
|
|
425
|
-
/** The course to create */
|
|
426
|
-
course: CourseCreateInput;
|
|
427
|
-
/** Map of property names to course structure items */
|
|
428
|
-
courseStructure: Record<string, CourseStructureItem>;
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* A component or module within a course.
|
|
432
|
-
*/
|
|
433
|
-
export interface CourseComponent extends Base {
|
|
434
|
-
/** Display title */
|
|
435
|
-
title: string;
|
|
436
|
-
/** Parent course reference */
|
|
437
|
-
course: Ref;
|
|
438
|
-
/** Nested course component reference */
|
|
439
|
-
courseComponent?: Ref | null;
|
|
440
|
-
/** Parent component reference */
|
|
441
|
-
parent?: Ref | null;
|
|
442
|
-
/** Display order */
|
|
443
|
-
sortOrder?: number;
|
|
444
|
-
/** Prerequisite component IDs */
|
|
445
|
-
prerequisites?: string[];
|
|
446
|
-
/** Whether all or any prerequisites are required */
|
|
447
|
-
prerequisiteCriteria?: 'ALL' | 'ANY';
|
|
448
|
-
/** Date when component becomes available */
|
|
449
|
-
unlockDate?: string;
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* Input for creating a new course component.
|
|
453
|
-
*/
|
|
454
|
-
export interface CourseComponentCreateInput {
|
|
455
|
-
/** Component title */
|
|
456
|
-
title: string;
|
|
457
|
-
/** Parent course reference */
|
|
458
|
-
course: Ref;
|
|
459
|
-
/** Status */
|
|
460
|
-
status: 'active' | 'tobedeleted';
|
|
461
|
-
/** Client-supplied sourcedId (optional) */
|
|
462
|
-
sourcedId?: string;
|
|
463
|
-
/** Parent component reference (for nesting) */
|
|
464
|
-
parent?: Ref | null;
|
|
465
|
-
/** Display order */
|
|
466
|
-
sortOrder?: number;
|
|
467
|
-
/** Prerequisite component IDs */
|
|
468
|
-
prerequisites?: string[] | null;
|
|
469
|
-
/** Whether all or any prerequisites are required */
|
|
470
|
-
prerequisiteCriteria?: string | null;
|
|
471
|
-
/** Date when component becomes available */
|
|
472
|
-
unlockDate?: string;
|
|
473
|
-
}
|
|
474
|
-
/**
|
|
475
|
-
* A class (section) where students and teachers meet.
|
|
476
|
-
*
|
|
477
|
-
* Classes are instances of courses for specific terms and locations.
|
|
478
|
-
*/
|
|
479
|
-
export interface Class extends Base {
|
|
480
|
-
/** Class title */
|
|
481
|
-
title: string;
|
|
482
|
-
/** Class code/section identifier */
|
|
483
|
-
classCode?: string | null;
|
|
484
|
-
/** Type of class */
|
|
485
|
-
classType?: 'homeroom' | 'scheduled';
|
|
486
|
-
/** Physical location */
|
|
487
|
-
location?: string | null;
|
|
488
|
-
/** Grade levels */
|
|
489
|
-
grades?: TimebackGrade[];
|
|
490
|
-
/** Subject areas */
|
|
491
|
-
subjects?: TimebackSubject[];
|
|
492
|
-
/** Subject codes */
|
|
493
|
-
subjectCodes?: string[];
|
|
494
|
-
/** Period/time slot identifiers */
|
|
495
|
-
periods?: string[];
|
|
496
|
-
/** Associated terms */
|
|
497
|
-
terms?: RefWithHref[];
|
|
498
|
-
/** Course this class is a section of */
|
|
499
|
-
course?: RefWithHref | null;
|
|
500
|
-
/** School where this class is held */
|
|
501
|
-
school?: RefWithHref | null;
|
|
502
|
-
/** Learning resources for this class */
|
|
503
|
-
resources?: RefWithHref[];
|
|
504
|
-
}
|
|
505
|
-
/**
|
|
506
|
-
* Input for creating a new class.
|
|
507
|
-
*
|
|
508
|
-
* Uses simple Ref (just sourcedId) for references since href/type are not needed for creation.
|
|
509
|
-
*/
|
|
510
|
-
export interface ClassCreateInput {
|
|
511
|
-
/** Client-supplied sourcedId (optional) */
|
|
512
|
-
sourcedId?: string;
|
|
513
|
-
/** Class title */
|
|
514
|
-
title: string;
|
|
515
|
-
/** Status */
|
|
516
|
-
status?: 'active' | 'tobedeleted';
|
|
517
|
-
/** Type of class */
|
|
518
|
-
classType?: 'homeroom' | 'scheduled';
|
|
519
|
-
/** Class code/section identifier */
|
|
520
|
-
classCode?: string | null;
|
|
521
|
-
/** Physical location */
|
|
522
|
-
location?: string | null;
|
|
523
|
-
/** Grade levels */
|
|
524
|
-
grades?: TimebackGrade[];
|
|
525
|
-
/** Subject areas */
|
|
526
|
-
subjects?: TimebackSubject[];
|
|
527
|
-
/** Subject codes */
|
|
528
|
-
subjectCodes?: string[];
|
|
529
|
-
/** Period/time slot identifiers */
|
|
530
|
-
periods?: string[];
|
|
531
|
-
/** Associated terms (required - at least one term reference) */
|
|
532
|
-
terms: Ref[];
|
|
533
|
-
/** Course this class is a section of */
|
|
534
|
-
course: Ref;
|
|
535
|
-
/** Organization (school) where this class is held */
|
|
536
|
-
org: Ref;
|
|
537
|
-
/** Learning resources for this class */
|
|
538
|
-
resources?: Ref[];
|
|
539
|
-
}
|
|
540
|
-
/**
|
|
541
|
-
* Goals for an individual enrollment.
|
|
542
|
-
*/
|
|
543
|
-
export interface EnrollmentGoals {
|
|
544
|
-
dailyXp?: number;
|
|
545
|
-
dailyLessons?: number;
|
|
546
|
-
dailyActiveMinutes?: number;
|
|
547
|
-
dailyAccuracy?: number;
|
|
548
|
-
dailyMasteredUnits?: number;
|
|
549
|
-
}
|
|
550
|
-
/**
|
|
551
|
-
* Metrics for an enrollment.
|
|
552
|
-
*/
|
|
553
|
-
export interface EnrollmentMetrics {
|
|
554
|
-
totalXp?: number;
|
|
555
|
-
totalLessons?: number;
|
|
556
|
-
totalGrades?: number;
|
|
557
|
-
courseType?: string;
|
|
558
|
-
isSupplemental?: boolean;
|
|
559
|
-
}
|
|
560
|
-
/**
|
|
561
|
-
* Extended metadata for enrollments.
|
|
562
|
-
*/
|
|
563
|
-
export interface EnrollmentMetadata extends Record<string, unknown> {
|
|
564
|
-
/** Individual learning goals */
|
|
565
|
-
goals?: EnrollmentGoals;
|
|
566
|
-
/** Progress metrics */
|
|
567
|
-
metrics?: EnrollmentMetrics;
|
|
568
|
-
}
|
|
569
|
-
/**
|
|
570
|
-
* An enrollment linking a user to a class.
|
|
571
|
-
*
|
|
572
|
-
* Enrollments define the relationship between users and classes,
|
|
573
|
-
* including their role (student, teacher) and the time period.
|
|
574
|
-
*/
|
|
575
|
-
export interface Enrollment extends Omit<Base, 'metadata'> {
|
|
576
|
-
/** Enrollment-specific metadata with goals and metrics */
|
|
577
|
-
metadata?: EnrollmentMetadata | null;
|
|
578
|
-
/** The enrolled user */
|
|
579
|
-
user: RefWithHref & {
|
|
580
|
-
name?: string;
|
|
581
|
-
};
|
|
582
|
-
/** The class the user is enrolled in */
|
|
583
|
-
class: RefWithHref & {
|
|
584
|
-
name?: string;
|
|
585
|
-
};
|
|
586
|
-
/** The school */
|
|
587
|
-
school: RefWithHref & {
|
|
588
|
-
name?: string;
|
|
589
|
-
};
|
|
590
|
-
/** The course */
|
|
591
|
-
course: RefWithHref & {
|
|
592
|
-
name?: string;
|
|
593
|
-
};
|
|
594
|
-
/** Role in this enrollment (student, teacher, etc.) */
|
|
595
|
-
role: OneRosterUserRole;
|
|
596
|
-
/** Whether this is the user's primary class ("true"/"false") */
|
|
597
|
-
primary?: string | null;
|
|
598
|
-
/** Start date of enrollment */
|
|
599
|
-
beginDate?: string | null;
|
|
600
|
-
/** End date of enrollment */
|
|
601
|
-
endDate?: string | null;
|
|
602
|
-
}
|
|
603
|
-
/**
|
|
604
|
-
* Input for creating or updating an enrollment.
|
|
605
|
-
*
|
|
606
|
-
* Uses simple refs (just sourcedId) instead of full RefWithHref.
|
|
607
|
-
*/
|
|
608
|
-
export interface EnrollmentCreateInput {
|
|
609
|
-
/** Optional sourcedId (auto-generated if not provided) */
|
|
610
|
-
sourcedId?: string;
|
|
611
|
-
/** Status of the enrollment */
|
|
612
|
-
status?: 'active' | 'tobedeleted';
|
|
613
|
-
/** Enrollment metadata */
|
|
614
|
-
metadata?: EnrollmentMetadata | null;
|
|
615
|
-
/** The user to enroll */
|
|
616
|
-
user: Ref;
|
|
617
|
-
/** The class to enroll in */
|
|
618
|
-
class: Ref;
|
|
619
|
-
/** The school (optional) */
|
|
620
|
-
school?: Ref;
|
|
621
|
-
/** Role in this enrollment */
|
|
622
|
-
role: OneRosterUserRole;
|
|
623
|
-
/** Whether this is the user's primary class */
|
|
624
|
-
primary?: string | boolean;
|
|
625
|
-
/** Start date in YYYY-MM-DD format */
|
|
626
|
-
beginDate?: string;
|
|
627
|
-
/** End date in YYYY-MM-DD format */
|
|
628
|
-
endDate?: string;
|
|
629
|
-
}
|
|
630
|
-
/**
|
|
631
|
-
* Input for enrolling a user in a class.
|
|
632
|
-
*/
|
|
633
|
-
export interface EnrollInput {
|
|
634
|
-
/** User sourcedId to enroll */
|
|
635
|
-
sourcedId: string;
|
|
636
|
-
/** Role for this enrollment */
|
|
637
|
-
role: 'student' | 'teacher';
|
|
638
|
-
/** Whether this is the user's primary class */
|
|
639
|
-
primary?: boolean;
|
|
640
|
-
/** Start date in YYYY-MM-DD format */
|
|
641
|
-
beginDate?: string;
|
|
642
|
-
/** End date in YYYY-MM-DD format */
|
|
643
|
-
endDate?: string;
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* An academic session such as a term, semester, or school year.
|
|
647
|
-
*
|
|
648
|
-
* Academic sessions define time periods for scheduling and can be
|
|
649
|
-
* nested (e.g., terms within a school year).
|
|
650
|
-
*/
|
|
651
|
-
export interface AcademicSession extends Base {
|
|
652
|
-
/** Session title (e.g., "Fall 2024") */
|
|
653
|
-
title: string;
|
|
654
|
-
/** Start date in YYYY-MM-DD format */
|
|
655
|
-
startDate: string;
|
|
656
|
-
/** End date in YYYY-MM-DD format */
|
|
657
|
-
endDate: string;
|
|
658
|
-
/** Type of session */
|
|
659
|
-
type: 'gradingPeriod' | 'semester' | 'schoolYear' | 'term';
|
|
660
|
-
/** Parent session reference */
|
|
661
|
-
parent?: RefWithHref | null;
|
|
662
|
-
/** School year as a number (e.g., 2024) */
|
|
663
|
-
schoolYear: number;
|
|
664
|
-
/** Organization this session belongs to */
|
|
665
|
-
org: RefWithHref;
|
|
666
|
-
/** Child sessions */
|
|
667
|
-
children?: RefWithHref[] | null;
|
|
668
|
-
}
|
|
669
|
-
/**
|
|
670
|
-
* A term within an academic year.
|
|
671
|
-
* Alias for AcademicSession with type 'term'.
|
|
672
|
-
*/
|
|
673
|
-
export type Term = AcademicSession;
|
|
674
|
-
/**
|
|
675
|
-
* A grading period within a term or semester.
|
|
676
|
-
* Alias for AcademicSession with type 'gradingPeriod'.
|
|
677
|
-
*/
|
|
678
|
-
export type GradingPeriod = AcademicSession;
|
|
679
|
-
/**
|
|
680
|
-
* Input for creating/updating an academic session.
|
|
681
|
-
* Uses simple Ref (just sourcedId) for references.
|
|
682
|
-
*/
|
|
683
|
-
export interface AcademicSessionCreateInput {
|
|
684
|
-
/** Client-supplied sourcedId (required for academic sessions) */
|
|
685
|
-
sourcedId: string;
|
|
686
|
-
/** Status */
|
|
687
|
-
status: 'active' | 'tobedeleted';
|
|
688
|
-
/** Metadata */
|
|
689
|
-
metadata?: Record<string, unknown>;
|
|
690
|
-
/** Session title */
|
|
691
|
-
title: string;
|
|
692
|
-
/** Start date in YYYY-MM-DD format */
|
|
693
|
-
startDate: string;
|
|
694
|
-
/** End date in YYYY-MM-DD format */
|
|
695
|
-
endDate: string;
|
|
696
|
-
/** Type of session */
|
|
697
|
-
type: 'gradingPeriod' | 'semester' | 'schoolYear' | 'term';
|
|
698
|
-
/** Parent session reference (simple ref) */
|
|
699
|
-
parent?: Ref | null;
|
|
700
|
-
/** School year as string (e.g., "2024") */
|
|
701
|
-
schoolYear: string;
|
|
702
|
-
/** Organization reference (simple ref) */
|
|
703
|
-
org: Ref;
|
|
704
|
-
/** Child session references (these do require href/type per API) */
|
|
705
|
-
children?: RefWithHref[];
|
|
706
|
-
}
|
|
707
|
-
/**
|
|
708
|
-
* Input for adding an agent (parent/guardian) relationship.
|
|
709
|
-
*/
|
|
710
|
-
export interface AgentInput {
|
|
711
|
-
/** The sourcedId of the agent user (e.g., parent) */
|
|
712
|
-
agentSourcedId: string;
|
|
713
|
-
}
|
|
714
|
-
/**
|
|
715
|
-
* Response from creating user credentials.
|
|
716
|
-
*/
|
|
717
|
-
export interface CredentialCreateResponse {
|
|
718
|
-
/** The user profile ID */
|
|
719
|
-
userProfileId: string;
|
|
720
|
-
/** The created credential ID */
|
|
721
|
-
credentialId: string;
|
|
722
|
-
/** Status message */
|
|
723
|
-
message: string;
|
|
724
|
-
}
|
|
725
|
-
/**
|
|
726
|
-
* Response from decrypting user credentials.
|
|
727
|
-
*/
|
|
728
|
-
export interface DecryptedCredential {
|
|
729
|
-
/** The decrypted password */
|
|
730
|
-
password: string;
|
|
731
|
-
}
|
|
732
|
-
//# sourceMappingURL=rostering.d.ts.map
|