@timeback/oneroster 0.2.1-beta.20260320221119 → 0.2.1-beta.20260330020222
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/index.d.ts +159 -63
- package/dist/index.js +208 -58
- package/dist/public-types.d.ts +158 -62
- package/dist/resources/resources/resources.type-test.d.ts.map +1 -1
- package/dist/resources/rostering/courses.d.ts.map +1 -1
- package/dist/types/callable.d.ts +2 -2
- package/dist/types/callable.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -165,15 +165,13 @@ interface LearningObjectiveResult {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
|
-
* A set of learning
|
|
168
|
+
* A set of learning objective IDs.
|
|
169
169
|
*/
|
|
170
170
|
interface LearningObjectiveSetItem {
|
|
171
171
|
/** Source system for these learning objectives */
|
|
172
172
|
source: string
|
|
173
|
-
/** Learning objective IDs (for line items) */
|
|
174
|
-
learningObjectiveIds
|
|
175
|
-
/** Learning objective results (for results) */
|
|
176
|
-
learningObjectiveResults?: LearningObjectiveResult[]
|
|
173
|
+
/** Learning objective IDs (for line items and resource metadata) */
|
|
174
|
+
learningObjectiveIds: string[]
|
|
177
175
|
}
|
|
178
176
|
|
|
179
177
|
/**
|
|
@@ -181,6 +179,21 @@ interface LearningObjectiveSetItem {
|
|
|
181
179
|
*/
|
|
182
180
|
type LearningObjectiveSet = LearningObjectiveSetItem[] | null
|
|
183
181
|
|
|
182
|
+
/**
|
|
183
|
+
* A set of learning objective scores.
|
|
184
|
+
*/
|
|
185
|
+
interface LearningObjectiveScoreSetItem {
|
|
186
|
+
/** Source system for these learning objectives */
|
|
187
|
+
source: string
|
|
188
|
+
/** Learning objective results (for results and assessment results) */
|
|
189
|
+
learningObjectiveResults: LearningObjectiveResult[]
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Array of learning objective score sets, or null if not applicable.
|
|
194
|
+
*/
|
|
195
|
+
type LearningObjectiveScoreSet = LearningObjectiveScoreSetItem[] | null
|
|
196
|
+
|
|
184
197
|
/**
|
|
185
198
|
* A reference to another OneRoster entity by sourcedId.
|
|
186
199
|
*/
|
|
@@ -509,10 +522,6 @@ interface ScoreScale extends Base {
|
|
|
509
522
|
course?: Ref | null
|
|
510
523
|
/** Values defining the scale */
|
|
511
524
|
scoreScaleValue?: ScoreScaleValue[]
|
|
512
|
-
/** Minimum possible score */
|
|
513
|
-
minScore?: number
|
|
514
|
-
/** Maximum possible score */
|
|
515
|
-
maxScore?: number
|
|
516
525
|
}
|
|
517
526
|
|
|
518
527
|
/**
|
|
@@ -584,7 +593,7 @@ interface Result extends Base {
|
|
|
584
593
|
/** Teacher comment */
|
|
585
594
|
comment?: string | null
|
|
586
595
|
/** Learning objective scores */
|
|
587
|
-
learningObjectiveSet?:
|
|
596
|
+
learningObjectiveSet?: LearningObjectiveScoreSet
|
|
588
597
|
/** Whether work is in progress */
|
|
589
598
|
inProgress?: string
|
|
590
599
|
/** Whether work is incomplete */
|
|
@@ -649,7 +658,7 @@ interface AssessmentResult extends Base {
|
|
|
649
658
|
/** Teacher/grader comment */
|
|
650
659
|
comment?: string | null
|
|
651
660
|
/** Learning objective scores */
|
|
652
|
-
learningObjectiveSet?:
|
|
661
|
+
learningObjectiveSet?: LearningObjectiveScoreSet
|
|
653
662
|
/** Whether assessment is in progress */
|
|
654
663
|
inProgress?: string | null
|
|
655
664
|
/** Whether assessment is incomplete */
|
|
@@ -1326,18 +1335,25 @@ type input$1<T> = T extends {
|
|
|
1326
1335
|
/**
|
|
1327
1336
|
* Input for creating a OneRoster user.
|
|
1328
1337
|
*
|
|
1329
|
-
*
|
|
1338
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1330
1339
|
*/
|
|
1331
1340
|
declare const OneRosterUserCreateInput = z
|
|
1332
1341
|
.object({
|
|
1333
1342
|
sourcedId: NonEmptyString.describe('sourcedId must be a non-empty string'),
|
|
1334
1343
|
status: Status.optional(),
|
|
1335
|
-
enabledUser: z.
|
|
1344
|
+
enabledUser: z.union([
|
|
1345
|
+
z.boolean(),
|
|
1346
|
+
z.enum(['true', 'false']).transform(value => value === 'true'),
|
|
1347
|
+
]),
|
|
1336
1348
|
givenName: NonEmptyString.describe('givenName must be a non-empty string'),
|
|
1337
1349
|
familyName: NonEmptyString.describe('familyName must be a non-empty string'),
|
|
1338
|
-
middleName: NonEmptyString.optional(),
|
|
1339
|
-
|
|
1350
|
+
middleName: NonEmptyString.nullable().optional(),
|
|
1351
|
+
preferredFirstName: NonEmptyString.nullable().optional(),
|
|
1352
|
+
preferredMiddleName: NonEmptyString.nullable().optional(),
|
|
1353
|
+
preferredLastName: NonEmptyString.nullable().optional(),
|
|
1354
|
+
username: NonEmptyString.nullable().optional(),
|
|
1340
1355
|
email: z.email(),
|
|
1356
|
+
userMasterIdentifier: z.string().nullable().optional(),
|
|
1341
1357
|
roles: z.array(OneRosterUserRoleInput).min(1, 'roles must include at least one role'),
|
|
1342
1358
|
userIds: z
|
|
1343
1359
|
.array(
|
|
@@ -1350,12 +1366,12 @@ declare const OneRosterUserCreateInput = z
|
|
|
1350
1366
|
)
|
|
1351
1367
|
.optional(),
|
|
1352
1368
|
agents: z.array(Ref).optional(),
|
|
1369
|
+
primaryOrg: Ref.optional(),
|
|
1353
1370
|
grades: z.array(TimebackGrade).optional(),
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
password: NonEmptyString.optional(),
|
|
1371
|
+
sms: NonEmptyString.nullable().optional(),
|
|
1372
|
+
phone: NonEmptyString.nullable().optional(),
|
|
1373
|
+
pronouns: NonEmptyString.nullable().optional(),
|
|
1374
|
+
password: NonEmptyString.nullable().optional(),
|
|
1359
1375
|
metadata: Metadata,
|
|
1360
1376
|
})
|
|
1361
1377
|
.strict()
|
|
@@ -1367,19 +1383,31 @@ declare const OneRosterUserCreateInput = z
|
|
|
1367
1383
|
/**
|
|
1368
1384
|
* Input for creating a OneRoster course.
|
|
1369
1385
|
*
|
|
1370
|
-
*
|
|
1386
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1371
1387
|
*/
|
|
1372
1388
|
declare const OneRosterCourseCreateInput = z
|
|
1373
1389
|
.object({
|
|
1374
1390
|
sourcedId: NonEmptyString.describe('sourcedId must be a non-empty string').optional(),
|
|
1375
|
-
status: Status
|
|
1391
|
+
status: Status,
|
|
1376
1392
|
title: NonEmptyString.describe('title must be a non-empty string'),
|
|
1377
1393
|
org: Ref,
|
|
1378
|
-
courseCode: NonEmptyString.optional(),
|
|
1379
|
-
subjects: z.array(TimebackSubject).optional(),
|
|
1380
|
-
|
|
1381
|
-
|
|
1394
|
+
courseCode: NonEmptyString.nullable().optional(),
|
|
1395
|
+
subjects: z.array(TimebackSubject).nullable().optional(),
|
|
1396
|
+
subjectCodes: z.array(z.string()).nullable().optional(),
|
|
1397
|
+
grades: z.array(TimebackGrade).nullable().optional(),
|
|
1398
|
+
level: NonEmptyString.nullable().optional(),
|
|
1399
|
+
academicSession: Ref.nullable().optional(),
|
|
1400
|
+
schoolYear: GuidRef.nullable().optional(),
|
|
1401
|
+
gradingScheme: NonEmptyString.nullable().optional(),
|
|
1382
1402
|
metadata: Metadata,
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* NOTE: `resources` is accepted by the upstream CourseSchema but the current
|
|
1406
|
+
* implementation of serializeCourse() drops it before writing to the database,
|
|
1407
|
+
* so the API silently ignores this field on create/update until the service is
|
|
1408
|
+
* extended to persist it.
|
|
1409
|
+
*/
|
|
1410
|
+
// resources: z.array(GuidRef).nullable().optional(),
|
|
1383
1411
|
})
|
|
1384
1412
|
.strict()
|
|
1385
1413
|
|
|
@@ -1390,7 +1418,7 @@ declare const OneRosterCourseCreateInput = z
|
|
|
1390
1418
|
/**
|
|
1391
1419
|
* Input for creating a OneRoster class.
|
|
1392
1420
|
*
|
|
1393
|
-
*
|
|
1421
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1394
1422
|
*/
|
|
1395
1423
|
declare const OneRosterClassCreateInput = z
|
|
1396
1424
|
.object({
|
|
@@ -1400,14 +1428,22 @@ declare const OneRosterClassCreateInput = z
|
|
|
1400
1428
|
terms: z.array(Ref).min(1, 'terms must have at least one item'),
|
|
1401
1429
|
course: Ref,
|
|
1402
1430
|
org: Ref,
|
|
1403
|
-
classCode: NonEmptyString.optional(),
|
|
1431
|
+
classCode: NonEmptyString.nullable().optional(),
|
|
1404
1432
|
classType: z.enum(['homeroom', 'scheduled']).optional(),
|
|
1405
|
-
location: NonEmptyString.optional(),
|
|
1433
|
+
location: NonEmptyString.nullable().optional(),
|
|
1406
1434
|
grades: z.array(TimebackGrade).optional(),
|
|
1407
1435
|
subjects: z.array(TimebackSubject).optional(),
|
|
1408
1436
|
subjectCodes: z.array(NonEmptyString).optional(),
|
|
1409
1437
|
periods: z.array(NonEmptyString).optional(),
|
|
1410
1438
|
metadata: Metadata,
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* NOTE: `resources` is accepted by the upstream CourseSchema but the current
|
|
1442
|
+
* implementation of serializeCourse() drops it before writing to the database,
|
|
1443
|
+
* so the API silently ignores this field on create/update until the service is
|
|
1444
|
+
* extended to persist it.
|
|
1445
|
+
*/
|
|
1446
|
+
// resources: z.array(GuidRef).nullable().optional(),
|
|
1411
1447
|
})
|
|
1412
1448
|
.strict()
|
|
1413
1449
|
|
|
@@ -1433,7 +1469,7 @@ declare const OneRosterEnrollmentCreateInput = z
|
|
|
1433
1469
|
/**
|
|
1434
1470
|
* Input for creating a OneRoster category.
|
|
1435
1471
|
*
|
|
1436
|
-
*
|
|
1472
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1437
1473
|
*/
|
|
1438
1474
|
declare const OneRosterCategoryCreateInput = z
|
|
1439
1475
|
.object({
|
|
@@ -1452,7 +1488,7 @@ declare const OneRosterCategoryCreateInput = z
|
|
|
1452
1488
|
/**
|
|
1453
1489
|
* Input for creating a OneRoster line item.
|
|
1454
1490
|
*
|
|
1455
|
-
*
|
|
1491
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1456
1492
|
*/
|
|
1457
1493
|
declare const OneRosterLineItemCreateInput = z
|
|
1458
1494
|
.object({
|
|
@@ -1463,11 +1499,14 @@ declare const OneRosterLineItemCreateInput = z
|
|
|
1463
1499
|
category: Ref,
|
|
1464
1500
|
assignDate: OneRosterDateString,
|
|
1465
1501
|
dueDate: OneRosterDateString,
|
|
1466
|
-
status: Status,
|
|
1467
|
-
description: z.string().optional(),
|
|
1502
|
+
status: Status.optional(),
|
|
1503
|
+
description: z.string().nullable().optional(),
|
|
1468
1504
|
resultValueMin: z.number().nullable().optional(),
|
|
1469
1505
|
resultValueMax: z.number().nullable().optional(),
|
|
1470
|
-
|
|
1506
|
+
gradingPeriod: Ref.nullable().optional(),
|
|
1507
|
+
academicSession: Ref.nullable().optional(),
|
|
1508
|
+
scoreScale: Ref.nullable().optional(),
|
|
1509
|
+
learningObjectiveSet: LearningObjectiveSetSchema.nullable().optional(),
|
|
1471
1510
|
metadata: Metadata,
|
|
1472
1511
|
})
|
|
1473
1512
|
.strict()
|
|
@@ -1479,14 +1518,14 @@ declare const OneRosterLineItemCreateInput = z
|
|
|
1479
1518
|
/**
|
|
1480
1519
|
* Input for creating a OneRoster result (grade).
|
|
1481
1520
|
*
|
|
1482
|
-
*
|
|
1521
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1483
1522
|
*/
|
|
1484
1523
|
declare const OneRosterResultCreateInput = z
|
|
1485
1524
|
.object({
|
|
1486
1525
|
sourcedId: NonEmptyString.optional(),
|
|
1487
1526
|
lineItem: Ref,
|
|
1488
1527
|
student: Ref,
|
|
1489
|
-
class: Ref.optional(),
|
|
1528
|
+
class: Ref.nullable().optional(),
|
|
1490
1529
|
scoreDate: OneRosterDateString,
|
|
1491
1530
|
scoreStatus: z.enum([
|
|
1492
1531
|
'exempt',
|
|
@@ -1498,7 +1537,13 @@ declare const OneRosterResultCreateInput = z
|
|
|
1498
1537
|
score: z.number().nullable().optional(),
|
|
1499
1538
|
textScore: z.string().nullable().optional(),
|
|
1500
1539
|
status: Status,
|
|
1540
|
+
scoreScale: Ref.nullable().optional(),
|
|
1501
1541
|
comment: z.string().nullable().optional(),
|
|
1542
|
+
learningObjectiveSet: LearningObjectiveScoreSetSchema.nullable().optional(),
|
|
1543
|
+
inProgress: z.string().optional(),
|
|
1544
|
+
incomplete: z.string().optional(),
|
|
1545
|
+
late: z.string().optional(),
|
|
1546
|
+
missing: z.string().optional(),
|
|
1502
1547
|
metadata: Metadata,
|
|
1503
1548
|
})
|
|
1504
1549
|
.strict()
|
|
@@ -1510,14 +1555,14 @@ declare const OneRosterResultCreateInput = z
|
|
|
1510
1555
|
/**
|
|
1511
1556
|
* Input for creating a OneRoster score scale.
|
|
1512
1557
|
*
|
|
1513
|
-
*
|
|
1558
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1514
1559
|
*/
|
|
1515
1560
|
declare const OneRosterScoreScaleCreateInput = z
|
|
1516
1561
|
.object({
|
|
1517
1562
|
sourcedId: NonEmptyString.optional(),
|
|
1518
1563
|
title: NonEmptyString.describe('title must be a non-empty string'),
|
|
1519
|
-
status: Status
|
|
1520
|
-
type:
|
|
1564
|
+
status: Status,
|
|
1565
|
+
type: NonEmptyString,
|
|
1521
1566
|
class: Ref,
|
|
1522
1567
|
course: Ref.nullable().optional(),
|
|
1523
1568
|
scoreScaleValue: z.array(
|
|
@@ -1530,8 +1575,6 @@ declare const OneRosterScoreScaleCreateInput = z
|
|
|
1530
1575
|
})
|
|
1531
1576
|
.strict(),
|
|
1532
1577
|
),
|
|
1533
|
-
minScore: z.number().optional(),
|
|
1534
|
-
maxScore: z.number().optional(),
|
|
1535
1578
|
metadata: Metadata,
|
|
1536
1579
|
})
|
|
1537
1580
|
.strict()
|
|
@@ -1542,12 +1585,13 @@ declare const OneRosterScoreScaleCreateInput = z
|
|
|
1542
1585
|
|
|
1543
1586
|
/**
|
|
1544
1587
|
* Input for creating a OneRoster assessment line item.
|
|
1545
|
-
*
|
|
1588
|
+
*
|
|
1589
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1546
1590
|
*/
|
|
1547
1591
|
declare const OneRosterAssessmentLineItemCreateInput = z
|
|
1548
1592
|
.object({
|
|
1549
1593
|
sourcedId: NonEmptyString.optional(),
|
|
1550
|
-
status: Status
|
|
1594
|
+
status: Status,
|
|
1551
1595
|
dateLastModified: IsoDateTimeString.optional(),
|
|
1552
1596
|
title: NonEmptyString.describe('title must be a non-empty string'),
|
|
1553
1597
|
description: z.string().nullable().optional(),
|
|
@@ -1573,14 +1617,19 @@ declare const OneRosterAssessmentLineItemCreateInput = z
|
|
|
1573
1617
|
})
|
|
1574
1618
|
.strict()
|
|
1575
1619
|
|
|
1620
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
1621
|
+
// ASSESSMENT RESULTS
|
|
1622
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
1623
|
+
|
|
1576
1624
|
/**
|
|
1577
1625
|
* Input for creating a OneRoster assessment result.
|
|
1578
|
-
*
|
|
1626
|
+
*
|
|
1627
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1579
1628
|
*/
|
|
1580
1629
|
declare const OneRosterAssessmentResultCreateInput = z
|
|
1581
1630
|
.object({
|
|
1582
1631
|
sourcedId: NonEmptyString.optional(),
|
|
1583
|
-
status: Status
|
|
1632
|
+
status: Status,
|
|
1584
1633
|
dateLastModified: IsoDateTimeString.optional(),
|
|
1585
1634
|
metadata: Metadata,
|
|
1586
1635
|
assessmentLineItem: Ref,
|
|
@@ -1613,7 +1662,7 @@ declare const OneRosterAssessmentResultCreateInput = z
|
|
|
1613
1662
|
/**
|
|
1614
1663
|
* Input for creating a OneRoster organization.
|
|
1615
1664
|
*
|
|
1616
|
-
*
|
|
1665
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1617
1666
|
*/
|
|
1618
1667
|
declare const OneRosterOrgCreateInput = z
|
|
1619
1668
|
.object({
|
|
@@ -1621,7 +1670,7 @@ declare const OneRosterOrgCreateInput = z
|
|
|
1621
1670
|
status: Status.optional(),
|
|
1622
1671
|
name: NonEmptyString.describe('name must be a non-empty string'),
|
|
1623
1672
|
type: OrganizationType,
|
|
1624
|
-
identifier:
|
|
1673
|
+
identifier: z.string().nullish(),
|
|
1625
1674
|
parent: Ref.optional(),
|
|
1626
1675
|
metadata: Metadata,
|
|
1627
1676
|
})
|
|
@@ -1630,15 +1679,15 @@ declare const OneRosterOrgCreateInput = z
|
|
|
1630
1679
|
/**
|
|
1631
1680
|
* Input for creating a OneRoster school (org with type='school').
|
|
1632
1681
|
*
|
|
1633
|
-
*
|
|
1682
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1634
1683
|
*/
|
|
1635
1684
|
declare const OneRosterSchoolCreateInput = z
|
|
1636
1685
|
.object({
|
|
1637
1686
|
sourcedId: NonEmptyString.optional(),
|
|
1638
1687
|
status: Status.optional(),
|
|
1639
1688
|
name: NonEmptyString.describe('name must be a non-empty string'),
|
|
1640
|
-
type: z.literal('school').
|
|
1641
|
-
identifier:
|
|
1689
|
+
type: z.literal('school').default('school'),
|
|
1690
|
+
identifier: z.string().nullish(),
|
|
1642
1691
|
parent: Ref.optional(),
|
|
1643
1692
|
metadata: Metadata,
|
|
1644
1693
|
})
|
|
@@ -1651,7 +1700,7 @@ declare const OneRosterSchoolCreateInput = z
|
|
|
1651
1700
|
/**
|
|
1652
1701
|
* Input for creating a OneRoster academic session.
|
|
1653
1702
|
*
|
|
1654
|
-
*
|
|
1703
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1655
1704
|
*/
|
|
1656
1705
|
declare const OneRosterAcademicSessionCreateInput = z
|
|
1657
1706
|
.object({
|
|
@@ -1676,15 +1725,17 @@ declare const OneRosterAcademicSessionCreateInput = z
|
|
|
1676
1725
|
/**
|
|
1677
1726
|
* Input for creating a OneRoster component resource.
|
|
1678
1727
|
*
|
|
1679
|
-
*
|
|
1728
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1680
1729
|
*/
|
|
1681
1730
|
declare const OneRosterComponentResourceCreateInput = z
|
|
1682
1731
|
.object({
|
|
1683
|
-
sourcedId: NonEmptyString
|
|
1732
|
+
sourcedId: NonEmptyString,
|
|
1684
1733
|
title: NonEmptyString.describe('title must be a non-empty string'),
|
|
1685
1734
|
courseComponent: Ref,
|
|
1686
1735
|
resource: Ref,
|
|
1687
1736
|
status: Status,
|
|
1737
|
+
sortOrder: z.number().optional(),
|
|
1738
|
+
lessonType: LessonType.optional(),
|
|
1688
1739
|
metadata: Metadata,
|
|
1689
1740
|
})
|
|
1690
1741
|
.strict()
|
|
@@ -1696,7 +1747,7 @@ declare const OneRosterComponentResourceCreateInput = z
|
|
|
1696
1747
|
/**
|
|
1697
1748
|
* Input for creating a OneRoster course component.
|
|
1698
1749
|
*
|
|
1699
|
-
*
|
|
1750
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1700
1751
|
*/
|
|
1701
1752
|
declare const OneRosterCourseComponentCreateInput = z
|
|
1702
1753
|
.object({
|
|
@@ -1704,9 +1755,19 @@ declare const OneRosterCourseComponentCreateInput = z
|
|
|
1704
1755
|
title: NonEmptyString.describe('title must be a non-empty string'),
|
|
1705
1756
|
course: Ref,
|
|
1706
1757
|
status: Status,
|
|
1758
|
+
sortOrder: z.number().optional(),
|
|
1759
|
+
parent: Ref.nullable().optional(),
|
|
1760
|
+
courseComponent: Ref.nullable().optional(),
|
|
1761
|
+
prerequisites: z.array(z.string()).nullable().optional(),
|
|
1762
|
+
prerequisiteCriteria: z.string().nullable().optional(),
|
|
1763
|
+
unlockDate: OneRosterDateString.nullable().optional(),
|
|
1707
1764
|
metadata: Metadata,
|
|
1708
1765
|
})
|
|
1709
1766
|
.strict()
|
|
1767
|
+
.transform(({ courseComponent, parent, ...rest }) => ({
|
|
1768
|
+
...rest,
|
|
1769
|
+
parent: parent === undefined ? (courseComponent ?? undefined) : parent,
|
|
1770
|
+
}))
|
|
1710
1771
|
|
|
1711
1772
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
1712
1773
|
// ENROLL INPUT (CONVENIENCE)
|
|
@@ -1715,7 +1776,7 @@ declare const OneRosterCourseComponentCreateInput = z
|
|
|
1715
1776
|
/**
|
|
1716
1777
|
* Input for enrolling a user in a class (convenience method).
|
|
1717
1778
|
*
|
|
1718
|
-
*
|
|
1779
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1719
1780
|
*/
|
|
1720
1781
|
declare const OneRosterEnrollInput = z
|
|
1721
1782
|
.object({
|
|
@@ -1767,13 +1828,32 @@ declare const OneRosterCredentialInput = z
|
|
|
1767
1828
|
/**
|
|
1768
1829
|
* Input for creating/updating demographics.
|
|
1769
1830
|
*
|
|
1770
|
-
*
|
|
1831
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1771
1832
|
*/
|
|
1772
1833
|
declare const OneRosterDemographicsCreateInput = z
|
|
1773
1834
|
.object({
|
|
1774
1835
|
sourcedId: NonEmptyString.describe('sourcedId must be a non-empty string'),
|
|
1836
|
+
status: Status.optional(),
|
|
1837
|
+
metadata: Metadata,
|
|
1838
|
+
birthDate: z
|
|
1839
|
+
.string()
|
|
1840
|
+
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
1841
|
+
.nullable()
|
|
1842
|
+
.optional(),
|
|
1843
|
+
sex: z.enum(['male', 'female']).nullable().optional(),
|
|
1844
|
+
americanIndianOrAlaskaNative: StringBoolean.nullable().optional(),
|
|
1845
|
+
asian: StringBoolean.nullable().optional(),
|
|
1846
|
+
blackOrAfricanAmerican: StringBoolean.nullable().optional(),
|
|
1847
|
+
nativeHawaiianOrOtherPacificIslander: StringBoolean.nullable().optional(),
|
|
1848
|
+
white: StringBoolean.nullable().optional(),
|
|
1849
|
+
demographicRaceTwoOrMoreRaces: StringBoolean.nullable().optional(),
|
|
1850
|
+
hispanicOrLatinoEthnicity: StringBoolean.nullable().optional(),
|
|
1851
|
+
countryOfBirthCode: z.string().nullable().optional(),
|
|
1852
|
+
stateOfBirthAbbreviation: z.string().nullable().optional(),
|
|
1853
|
+
cityOfBirth: z.string().nullable().optional(),
|
|
1854
|
+
publicSchoolResidenceStatus: z.string().nullable().optional(),
|
|
1775
1855
|
})
|
|
1776
|
-
.
|
|
1856
|
+
.strict()
|
|
1777
1857
|
|
|
1778
1858
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
1779
1859
|
// RESOURCE INPUT
|
|
@@ -1782,7 +1862,7 @@ declare const OneRosterDemographicsCreateInput = z
|
|
|
1782
1862
|
/**
|
|
1783
1863
|
* Input for creating/updating resources.
|
|
1784
1864
|
*
|
|
1785
|
-
*
|
|
1865
|
+
* Unknown keys are rejected intentionally; add supported fields here rather than relying on passthrough.
|
|
1786
1866
|
*/
|
|
1787
1867
|
declare const OneRosterResourceCreateInput = z
|
|
1788
1868
|
.object({
|
|
@@ -1791,10 +1871,26 @@ declare const OneRosterResourceCreateInput = z
|
|
|
1791
1871
|
vendorResourceId: NonEmptyString.describe('vendorResourceId must be a non-empty string'),
|
|
1792
1872
|
roles: z.array(z.enum(['primary', 'secondary'])).optional(),
|
|
1793
1873
|
importance: z.enum(['primary', 'secondary']).optional(),
|
|
1794
|
-
vendorId:
|
|
1795
|
-
applicationId:
|
|
1874
|
+
vendorId: NonEmptyString.nullable().optional(),
|
|
1875
|
+
applicationId: NonEmptyString.nullable().optional(),
|
|
1796
1876
|
status: Status.optional(),
|
|
1797
|
-
|
|
1877
|
+
|
|
1878
|
+
/**
|
|
1879
|
+
* Accepts typed metadata (discriminated by `type`) or truly custom metadata.
|
|
1880
|
+
*
|
|
1881
|
+
* NOTE: The server extracts any field whose name matches a known metadata
|
|
1882
|
+
* field (e.g., launchUrl, toolProvider, subType, …) and validates them against
|
|
1883
|
+
* the typed schemas. If any such field is present WITHOUT a `type` discriminator,
|
|
1884
|
+
* the server will reject the request. Keep untyped metadata to custom keys.
|
|
1885
|
+
* `fail_fast` remains valid without a discriminator, but it is still checked
|
|
1886
|
+
* against the upstream fast-fail schema before sending the request.
|
|
1887
|
+
*
|
|
1888
|
+
* Always include `type` when sending structured metadata keys.
|
|
1889
|
+
*/
|
|
1890
|
+
metadata: z
|
|
1891
|
+
.union([ResourceMetadataSchema, UntypedResourceMetadataSchema])
|
|
1892
|
+
.nullable()
|
|
1893
|
+
.optional(),
|
|
1798
1894
|
})
|
|
1799
1895
|
.strict()
|
|
1800
1896
|
|
|
@@ -4793,7 +4889,7 @@ interface CoursesCallable extends CallableResource<Course, CourseFilterFields, S
|
|
|
4793
4889
|
/** Create a new course component */
|
|
4794
4890
|
createComponent(data: CourseComponentCreateInput): Promise<CreateResponse>;
|
|
4795
4891
|
/** Update a course component */
|
|
4796
|
-
updateComponent(sourcedId: string, data:
|
|
4892
|
+
updateComponent(sourcedId: string, data: CourseComponentCreateInput): Promise<void>;
|
|
4797
4893
|
/** Delete a course component */
|
|
4798
4894
|
deleteComponent(sourcedId: string): Promise<void>;
|
|
4799
4895
|
/** List all component resources */
|
|
@@ -4805,7 +4901,7 @@ interface CoursesCallable extends CallableResource<Course, CourseFilterFields, S
|
|
|
4805
4901
|
/** Create a new component resource */
|
|
4806
4902
|
createComponentResource(data: ComponentResourceCreateInput): Promise<CreateResponse>;
|
|
4807
4903
|
/** Update a component resource */
|
|
4808
|
-
updateComponentResource(sourcedId: string, data:
|
|
4904
|
+
updateComponentResource(sourcedId: string, data: ComponentResourceCreateInput): Promise<void>;
|
|
4809
4905
|
/** Delete a component resource */
|
|
4810
4906
|
deleteComponentResource(sourcedId: string): Promise<void>;
|
|
4811
4907
|
/** Create a course structure from QTI tests */
|