@confed/db-types 0.5.0 → 0.6.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +27 -0
  2. 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
  }
@@ -500,6 +506,27 @@ export interface NewMcSectionFee {
500
506
  creditType?: string | null;
501
507
  amountCents: number;
502
508
  }
509
+ /**
510
+ * A frozen URL: one per course code (`kind` "course", `key` = `McCourse.codeKey`) and per program
511
+ * area (`kind` "area", `key` = area code). Written once, never changed by the sync. `retiredAt` is
512
+ * set by hand for a course that left the feed long ago: its page goes and its URL redirects.
513
+ */
514
+ export interface McSlug {
515
+ kind: string;
516
+ key: string;
517
+ slug: string;
518
+ objectId: string;
519
+ createdAt: string;
520
+ retiredAt: string | null;
521
+ }
522
+ export interface NewMcSlug {
523
+ kind: string;
524
+ key: string;
525
+ slug: string;
526
+ objectId: string;
527
+ createdAt: string;
528
+ retiredAt?: string | null;
529
+ }
503
530
  export interface OlTextbook {
504
531
  id: number;
505
532
  courseId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@confed/db-types",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "TypeScript types for the CC Courses Sync D1 database",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",