@confed/db-types 0.5.0 → 0.7.0
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 +121 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -315,6 +315,8 @@ export interface McCourse {
|
|
|
315
315
|
code: string;
|
|
316
316
|
subj: string | null;
|
|
317
317
|
courseNumber: string;
|
|
318
|
+
/** The code normalised ("ZC088" → "ZC 088"): the course's identity on the web, its mc_slugs key. */
|
|
319
|
+
codeKey: string | null;
|
|
318
320
|
title: string;
|
|
319
321
|
descriptionHtml: string | null;
|
|
320
322
|
learningGoalsHtml: string | null;
|
|
@@ -332,6 +334,8 @@ export interface McCourse {
|
|
|
332
334
|
notifyUrl: string | null;
|
|
333
335
|
contentHash: string;
|
|
334
336
|
isActive: number | null;
|
|
337
|
+
/** When the course left the feed; null while active. */
|
|
338
|
+
deactivatedAt: string | null;
|
|
335
339
|
createdAt: string | null;
|
|
336
340
|
updatedAt: string | null;
|
|
337
341
|
}
|
|
@@ -340,6 +344,7 @@ export interface NewMcCourse {
|
|
|
340
344
|
code: string;
|
|
341
345
|
subj?: string | null;
|
|
342
346
|
courseNumber: string;
|
|
347
|
+
codeKey?: string | null;
|
|
343
348
|
title: string;
|
|
344
349
|
descriptionHtml?: string | null;
|
|
345
350
|
learningGoalsHtml?: string | null;
|
|
@@ -357,6 +362,7 @@ export interface NewMcCourse {
|
|
|
357
362
|
notifyUrl?: string | null;
|
|
358
363
|
contentHash: string;
|
|
359
364
|
isActive?: number | null;
|
|
365
|
+
deactivatedAt?: string | null;
|
|
360
366
|
createdAt?: string | null;
|
|
361
367
|
updatedAt?: string | null;
|
|
362
368
|
}
|
|
@@ -393,6 +399,9 @@ export interface McSection {
|
|
|
393
399
|
waitlistCapacity: number | null;
|
|
394
400
|
enrollUrl: string | null;
|
|
395
401
|
contentHash: string;
|
|
402
|
+
/** "final_approval" or "cancelled". */
|
|
403
|
+
statusCode: string | null;
|
|
404
|
+
/** e.g. "available", "waitlist_available", "canceled", "no_longer_available" (past MC's listing window). */
|
|
396
405
|
availability: string | null;
|
|
397
406
|
availabilityText: string | null;
|
|
398
407
|
action: string | null;
|
|
@@ -420,6 +429,7 @@ export interface NewMcSection {
|
|
|
420
429
|
waitlistCapacity?: number | null;
|
|
421
430
|
enrollUrl?: string | null;
|
|
422
431
|
contentHash: string;
|
|
432
|
+
statusCode?: string | null;
|
|
423
433
|
availability?: string | null;
|
|
424
434
|
availabilityText?: string | null;
|
|
425
435
|
action?: string | null;
|
|
@@ -500,6 +510,117 @@ export interface NewMcSectionFee {
|
|
|
500
510
|
creditType?: string | null;
|
|
501
511
|
amountCents: number;
|
|
502
512
|
}
|
|
513
|
+
/**
|
|
514
|
+
* A frozen URL: one per course code (`kind` "course", `key` = `McCourse.codeKey`) and per program
|
|
515
|
+
* area (`kind` "area", `key` = area code). Written once, never changed by the sync. `retiredAt` is
|
|
516
|
+
* set by hand for a course that left the feed long ago: its page goes and its URL redirects.
|
|
517
|
+
*/
|
|
518
|
+
export interface McSlug {
|
|
519
|
+
kind: string;
|
|
520
|
+
key: string;
|
|
521
|
+
slug: string;
|
|
522
|
+
objectId: string;
|
|
523
|
+
createdAt: string;
|
|
524
|
+
retiredAt: string | null;
|
|
525
|
+
}
|
|
526
|
+
export interface NewMcSlug {
|
|
527
|
+
kind: string;
|
|
528
|
+
key: string;
|
|
529
|
+
slug: string;
|
|
530
|
+
objectId: string;
|
|
531
|
+
createdAt: string;
|
|
532
|
+
retiredAt?: string | null;
|
|
533
|
+
}
|
|
534
|
+
/** A program stream inside a program area, e.g. "Dental Radiography" (PS0001) in PA0005. */
|
|
535
|
+
export interface McProgramStream {
|
|
536
|
+
objectId: string;
|
|
537
|
+
code: string;
|
|
538
|
+
name: string | null;
|
|
539
|
+
descriptionHtml: string | null;
|
|
540
|
+
areaCode: string | null;
|
|
541
|
+
contentHash: string;
|
|
542
|
+
isActive: number | null;
|
|
543
|
+
createdAt: string | null;
|
|
544
|
+
updatedAt: string | null;
|
|
545
|
+
}
|
|
546
|
+
export interface NewMcProgramStream {
|
|
547
|
+
objectId: string;
|
|
548
|
+
code: string;
|
|
549
|
+
name?: string | null;
|
|
550
|
+
descriptionHtml?: string | null;
|
|
551
|
+
areaCode?: string | null;
|
|
552
|
+
contentHash: string;
|
|
553
|
+
isActive?: number | null;
|
|
554
|
+
createdAt?: string | null;
|
|
555
|
+
updatedAt?: string | null;
|
|
556
|
+
}
|
|
557
|
+
export interface McCourseStream {
|
|
558
|
+
courseObjectId: string;
|
|
559
|
+
streamCode: string;
|
|
560
|
+
}
|
|
561
|
+
export interface NewMcCourseStream {
|
|
562
|
+
courseObjectId: string;
|
|
563
|
+
streamCode: string;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* One member of a course's structured prerequisites, in MC's order (`seq` from 1). Members combine
|
|
567
|
+
* left to right with `logicOperator` ("AND" | "OR"; null on the first), grouped by the parentheses.
|
|
568
|
+
* `kind` "other" is a requirement that isn't a course result; `label` names its type.
|
|
569
|
+
*/
|
|
570
|
+
export interface McCourseRequirement {
|
|
571
|
+
courseObjectId: string;
|
|
572
|
+
seq: number;
|
|
573
|
+
leftParen: string | null;
|
|
574
|
+
logicOperator: string | null;
|
|
575
|
+
rightParen: string | null;
|
|
576
|
+
kind: string;
|
|
577
|
+
requiredCourseObjectId: string | null;
|
|
578
|
+
requiredCourseCode: string | null;
|
|
579
|
+
requiredCourseTitle: string | null;
|
|
580
|
+
resultType: string | null;
|
|
581
|
+
requirementType: string | null;
|
|
582
|
+
label: string | null;
|
|
583
|
+
}
|
|
584
|
+
export interface NewMcCourseRequirement {
|
|
585
|
+
courseObjectId: string;
|
|
586
|
+
seq: number;
|
|
587
|
+
leftParen?: string | null;
|
|
588
|
+
logicOperator?: string | null;
|
|
589
|
+
rightParen?: string | null;
|
|
590
|
+
kind: string;
|
|
591
|
+
requiredCourseObjectId?: string | null;
|
|
592
|
+
requiredCourseCode?: string | null;
|
|
593
|
+
requiredCourseTitle?: string | null;
|
|
594
|
+
resultType?: string | null;
|
|
595
|
+
requirementType?: string | null;
|
|
596
|
+
label?: string | null;
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* A course image copied from MC into R2 (the website's bucket, under `mc-images/`), one per MC image
|
|
600
|
+
* URL (`McCourse.imageUrl`). Objects are keyed by SHA-256, so identical uploads share one. Never
|
|
601
|
+
* deleted by the sync.
|
|
602
|
+
*/
|
|
603
|
+
export interface McImage {
|
|
604
|
+
sourceUrl: string;
|
|
605
|
+
sha256: string;
|
|
606
|
+
/** "mc-images/<sha256>.<ext>" */
|
|
607
|
+
r2Key: string;
|
|
608
|
+
contentType: string;
|
|
609
|
+
width: number | null;
|
|
610
|
+
height: number | null;
|
|
611
|
+
bytes: number;
|
|
612
|
+
fetchedAt: string;
|
|
613
|
+
}
|
|
614
|
+
export interface NewMcImage {
|
|
615
|
+
sourceUrl: string;
|
|
616
|
+
sha256: string;
|
|
617
|
+
r2Key: string;
|
|
618
|
+
contentType: string;
|
|
619
|
+
width?: number | null;
|
|
620
|
+
height?: number | null;
|
|
621
|
+
bytes: number;
|
|
622
|
+
fetchedAt: string;
|
|
623
|
+
}
|
|
503
624
|
export interface OlTextbook {
|
|
504
625
|
id: number;
|
|
505
626
|
courseId: string;
|