@royalschedule/maps 2.2.89 → 2.2.92

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 (87) hide show
  1. package/dist/Admentum/from/courses.js +1 -1
  2. package/dist/Admentum/from/courses.js.map +1 -1
  3. package/dist/Admentum/from/schedules.js +1 -1
  4. package/dist/Admentum/from/schedules.js.map +1 -1
  5. package/dist/Admentum/to/schedules.d.ts +1 -1
  6. package/dist/Admentum/types/course-sections.d.ts +1 -1
  7. package/dist/Admentum/types/courses.d.ts +1 -1
  8. package/dist/Admentum/types/lessons.d.ts +2 -2
  9. package/dist/Admentum/types/primary-groups.d.ts +1 -1
  10. package/dist/Admentum/types/rooms.d.ts +1 -1
  11. package/dist/Admentum/types/schedule-groups.d.ts +2 -2
  12. package/dist/Admentum/types/schedules.d.ts +1 -1
  13. package/dist/Admentum/types/schools.d.ts +1 -1
  14. package/dist/Admentum/types/users.d.ts +1 -1
  15. package/dist/PlanDigital/types/index.d.ts +4 -4
  16. package/dist/RS/v0/from/placements.d.ts +1 -1
  17. package/dist/RS/v0/to/course-events/days.d.ts +1 -1
  18. package/dist/RS/v0/to/course-events/dependencies.d.ts +1 -1
  19. package/dist/RS/v0/to/course-events/groups.d.ts +2 -2
  20. package/dist/RS/v0/to/course-events/intervals.d.ts +1 -1
  21. package/dist/RS/v0/to/course-events/meta.d.ts +1 -1
  22. package/dist/RS/v0/types/break-lengths.d.ts +2 -2
  23. package/dist/RS/v0/types/configurations.d.ts +1 -1
  24. package/dist/RS/v0/types/groups.d.ts +1 -1
  25. package/dist/RS/v0/types/out-options.d.ts +1 -1
  26. package/dist/RS/v0/types/schedules.d.ts +1 -1
  27. package/dist/RS/v1/from/placements.d.ts +1 -1
  28. package/dist/RS/v1/to/course-events/days.d.ts +1 -1
  29. package/dist/RS/v1/to/course-events/dependencies.d.ts +1 -1
  30. package/dist/RS/v1/to/course-events/groups.d.ts +1 -1
  31. package/dist/RS/v1/to/course-events/intervals.d.ts +1 -1
  32. package/dist/RS/v1/to/course-events/meta.d.ts +1 -1
  33. package/dist/RS/v1/types/break-lengths.d.ts +2 -2
  34. package/dist/RS/v1/types/configurations.d.ts +1 -1
  35. package/dist/RS/v1/types/groups.d.ts +1 -1
  36. package/dist/RS/v1/types/out-options.d.ts +1 -1
  37. package/dist/RS/v1/types/schedules.d.ts +1 -1
  38. package/dist/RS/v2/from/collections.js.map +1 -1
  39. package/dist/RS/v2/from/course-events.d.ts +1 -1
  40. package/dist/RS/v2/from/index.d.ts +1 -1
  41. package/dist/RS/v2/from/placements.d.ts +1 -1
  42. package/dist/RS/v2/from/settings.d.ts +2 -1
  43. package/dist/RS/v2/from/settings.js.map +1 -1
  44. package/dist/RS/v2/to/course-events/days.d.ts +1 -1
  45. package/dist/RS/v2/to/course-events/dependencies.d.ts +1 -1
  46. package/dist/RS/v2/to/course-events/groups.d.ts +1 -1
  47. package/dist/RS/v2/to/course-events/intervals.d.ts +1 -1
  48. package/dist/RS/v2/to/course-events/meta.d.ts +1 -1
  49. package/dist/RS/v2/types/break-lengths.d.ts +2 -2
  50. package/dist/RS/v2/types/configurations.d.ts +1 -1
  51. package/dist/RS/v2/types/groups.d.ts +1 -1
  52. package/dist/RS/v2/types/out-options.d.ts +1 -1
  53. package/dist/RS/v2/types/schedules.d.ts +1 -1
  54. package/dist/SS12000/to/activities.d.ts +1 -1
  55. package/dist/SS12000/to/calendar-events.d.ts +1 -1
  56. package/dist/SS12000/types/activities.d.ts +1 -1
  57. package/dist/SS12000/types/calendar-events.d.ts +1 -1
  58. package/dist/SS12000/types/codes.d.ts +7 -7
  59. package/dist/SS12000/types/duties.d.ts +1 -1
  60. package/dist/SS12000/types/duty-assignments.d.ts +1 -1
  61. package/dist/SS12000/types/groups.d.ts +1 -1
  62. package/dist/SS12000/types/organisation.d.ts +1 -1
  63. package/dist/SS12000/types/persons.d.ts +1 -1
  64. package/dist/SS12000/types/resources.d.ts +1 -1
  65. package/dist/SS12000/types/rooms.d.ts +1 -1
  66. package/dist/SchoolSoft/api/types/group.d.ts +1 -1
  67. package/dist/SchoolSoft/api/types/lesson.d.ts +1 -1
  68. package/dist/SchoolSoft/api/types/location.d.ts +1 -1
  69. package/dist/SchoolSoft/api/types/schedule.d.ts +1 -1
  70. package/dist/SchoolSoft/api/types/teacher.d.ts +1 -1
  71. package/dist/SchoolSoft/file/types/events.d.ts +2 -2
  72. package/dist/SchoolSoft/file/types/index.d.ts +1 -1
  73. package/dist/core/types/available-locations.d.ts +1 -1
  74. package/dist/core/types/break-lengths.d.ts +1 -1
  75. package/dist/core/types/common/index.d.ts +10 -10
  76. package/dist/core/types/course-events.d.ts +2 -0
  77. package/dist/core/types/courses.d.ts +2 -0
  78. package/dist/core/types/division-settings.d.ts +2 -0
  79. package/dist/core/types/index.d.ts +2 -0
  80. package/dist/core/types/periods.d.ts +17 -0
  81. package/dist/core/types/{students.js → periods.js} +1 -1
  82. package/dist/core/types/periods.js.map +1 -0
  83. package/dist/identify/types/index.d.ts +3 -3
  84. package/dist/vKlass/types/index.d.ts +8 -8
  85. package/package.json +2 -2
  86. package/dist/core/types/students.d.ts +0 -8
  87. package/dist/core/types/students.js.map +0 -1
@@ -20,7 +20,7 @@ function _default(scheduledGroups, school, importErrors, importWarnings) {
20
20
  courses.push({
21
21
  ids: scheduledGroup.id.toString(),
22
22
  displayName: scheduledGroup.name,
23
- subject: subjects[0].name,
23
+ subject: subjects.map(x => x.name).join(', '),
24
24
  groups: scheduledGroup.users_primary_groups.map(x => x.toString()),
25
25
  teachers: scheduledGroup.teachers.map(x => x.id.toString())
26
26
  });
@@ -1 +1 @@
1
- {"version":3,"file":"courses.js","mappings":";;;;;;AAIc,kBACZA,eAAgC,EAChCC,MAAuB,EACvBC,YAAyB,EACzBC,cAAyB;EAGzB,IAAIC,OAAO,GAAmB,EAAE;EAEhCJ,eAAe,CAACK,OAAO,CAACC,cAAc,IAAG;IAKvC,IAAIC,QAAQ,GAAGN,MAAM,CAACO,WAAW,IAAI,IAAI,GAAGF,cAAc,CAACC,QAAQ,GAAGD,cAAc,CAACF,OAAO;IAC5F,IAAIG,QAAQ,CAACE,MAAM,IAAI,CAAC,EAAE;MACxB,IAAIC,IAAI,kCAA0BJ,cAAc,CAACK,IAAI,0BAAcL,cAAc,CAACM,EAAE,0BAAeL,QAAQ,CAACE,MAAM,wBAAcR,MAAM,CAACO,WAAW,IAAI,IAAI,GAAG,UAAU,GAAG,SAAS,sFAA4EP,MAAM,CAACO,WAAW,IAAI,IAAI,GAAG,SAAS,GAAG,QAAQ,MAAG;MACnTL,cAAc,CAACU,IAAI,CAACH,IAAI,CAAC;MACzB;;IAOF,IAAIJ,cAAc,CAACQ,QAAQ,CAACL,MAAM,IAAI,CAAC,EAAE;MACvC,IAAIC,KAAI,kCAA0BJ,cAAc,CAACK,IAAI,0BAAcL,cAAc,CAACM,EAAE,qCAAiC;MACrHT,cAAc,CAACU,IAAI,CAACH,KAAI,CAAC;;IAI3BN,OAAO,CAACS,IAAI,CAAC;MACXE,GAAG,EAAUT,cAAc,CAACM,EAAE,CAACI,QAAQ,EAAE;MACzCC,WAAW,EAAEX,cAAc,CAACK,IAAI;MAChCO,OAAO,EAAMX,QAAQ,CAAC,CAAC,CAAC,CAACI,IAAI;MAC7BQ,MAAM,EAAOb,cAAc,CAACc,oBAAoB,CAACC,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACN,QAAQ,EAAE,CAAC;MACvEF,QAAQ,EAAKR,cAAc,CAACQ,QAAQ,CAACO,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACV,EAAE,CAACI,QAAQ,EAAE;KAC9D,CAAC;EAEJ,CAAC,CAAC;EAEF,OAAOZ,OAAO;AAChB","names":["scheduledGroups","school","importErrors","importWarnings","courses","forEach","scheduledGroup","subjects","school_type","length","warn","name","id","push","teachers","ids","toString","displayName","subject","groups","users_primary_groups","map","x"],"sourceRoot":"","sources":["../../../src/Admentum/from/courses.ts"],"sourcesContent":[null]}
1
+ {"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A,CAAC,CAACR,EAAE,CAACI,QAAQ,EAAE;KAC9D,CAAC;EAEJ,CAAC,CAAC;EAEF,OAAOZ,OAAO;AAChB","names":["scheduledGroups","school","importErrors","importWarnings","courses","forEach","scheduledGroup","subjects","school_type","length","warn","name","id","push","teachers","ids","toString","displayName","subject","map","x","join","groups","users_primary_groups"],"sourceRoot":"","sources":["../../../src/Admentum/from/courses.ts"],"sourcesContent":[null]}
@@ -17,7 +17,7 @@ function _default(schedule) {
17
17
  if (schedule.schools.length != 1) {
18
18
  return {
19
19
  meta: {
20
- errors: ["Recieved ".concat(schedule.schools.length, " number of schools: only a single school is allowed.")]
20
+ errors: ["Received ".concat(schedule.schools.length, " number of schools: only a single school is allowed.")]
21
21
  }
22
22
  };
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"schedules.js","mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AAAkC;AAAA;AAAA;AAAA;AAKpB,kBACZA,QAAgF;EAMhF,IAAIA,QAAQ,CAACC,OAAO,CAACC,MAAM,IAAI,CAAC,EAAE;IAChC,OAAO;MAAEC,IAAI,EAAE;QAAEC,MAAM,EAAE,oBAAaJ,QAAQ,CAACC,OAAO,CAACC,MAAM;MAAuD;IAAE,CAAE;;EAE1H,IAAIG,MAAM,GAAGL,QAAQ,CAACC,OAAO,CAAC,CAAC,CAAC;EAGhC,IAAIG,MAAM,GAAe,EAAE;EAC3B,IAAIE,QAAQ,GAAa,EAAE;EAE3B,IAAMC,SAAS,GAA4B,uBAAU,EAACP,QAAQ,CAACQ,KAAK,EAA6BJ,MAAM,EAAEE,QAAQ,CAAC;EAClH,IAAMG,QAAQ,GAA6B,sBAAS,EAACT,QAAQ,CAACU,eAAe,EAAEV,QAAQ,CAACW,OAAO,EAAEP,MAAM,EAAEE,QAAQ,CAAC;EAClH,IAAMM,MAAM,GAA+B,oBAAO,EAACZ,QAAQ,CAACa,cAAc,EAAuBT,MAAM,EAAEE,QAAQ,CAAC;EAClH,IAAMQ,OAAO,GAA8B,qBAAQ,EAACd,QAAQ,CAACU,eAAe,EAAEL,MAAM,EAAaD,MAAM,EAAEE,QAAQ,CAAC;EAClH,IAAMS,MAAM,GAA+B,oBAAO,EAACf,QAAQ,CAACW,OAAO,EAAEG,OAAO,EAAEL,QAAQ,EAAWL,MAAM,EAAEE,QAAQ,CAAC;EAElH,OAAO;IAAEC,SAAS;IAAEE,QAAQ;IAAEG,MAAM;IAAEE,OAAO;IAAEC,MAAM;IAC5CZ,IAAI,kCACGC,MAAM,CAACF,MAAM,GAAK;MAAEE,MAAM,EAAIA;IAAM,CAAI,GAAG,EAAG,GAC9CE,QAAQ,CAACJ,MAAM,GAAG;MAAEI,QAAQ,EAAEA;IAAQ,CAAE,GAAG,EAAG;GAEtD;AACV","names":["schedule","schools","length","meta","errors","school","warnings","locations","rooms","teachers","schedule_groups","lessons","groups","primary_groups","courses","events"],"sourceRoot":"","sources":["../../../src/Admentum/from/schedules.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"schedules.js","mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AAAkC;AAAA;AAAA;AAAA;AAKpB,kBACZA,QAAgF;EAMhF,IAAIA,QAAQ,CAACC,OAAO,CAACC,MAAM,IAAI,CAAC,EAAE;IAChC,OAAO;MAAEC,IAAI,EAAE;QAAEC,MAAM,EAAE,oBAAaJ,QAAQ,CAACC,OAAO,CAACC,MAAM;MAAuD;IAAE,CAAE;;EAE1H,IAAIG,MAAM,GAAGL,QAAQ,CAACC,OAAO,CAAC,CAAC,CAAC;EAGhC,IAAIG,MAAM,GAAe,EAAE;EAC3B,IAAIE,QAAQ,GAAa,EAAE;EAE3B,IAAMC,SAAS,GAA4B,uBAAU,EAACP,QAAQ,CAACQ,KAAK,EAA8BJ,MAAM,EAAEE,QAAQ,CAAC;EACnH,IAAMG,QAAQ,GAA6B,sBAAS,EAAET,QAAQ,CAACU,eAAe,EAAEV,QAAQ,CAACW,OAAO,EAAEP,MAAM,EAAEE,QAAQ,CAAC;EACnH,IAAMM,MAAM,GAA+B,oBAAO,EAAIZ,QAAQ,CAACa,cAAc,EAAqBT,MAAM,EAAEE,QAAQ,CAAC;EACnH,IAAMQ,OAAO,GAA8B,qBAAQ,EAAGd,QAAQ,CAACU,eAAe,EAAEL,MAAM,EAAYD,MAAM,EAAEE,QAAQ,CAAC;EACnH,IAAMS,MAAM,GAA+B,oBAAO,EAAIf,QAAQ,CAACW,OAAO,EAAEG,OAAO,EAAEL,QAAQ,EAASL,MAAM,EAAEE,QAAQ,CAAC;EAEnH,OAAO;IAAEC,SAAS;IAAEE,QAAQ;IAAEG,MAAM;IAAEE,OAAO;IAAEC,MAAM;IAC5CZ,IAAI,kCACGC,MAAM,CAACF,MAAM,GAAK;MAAEE,MAAM,EAAIA;IAAM,CAAI,GAAG,EAAG,GAC9CE,QAAQ,CAACJ,MAAM,GAAG;MAAEI,QAAQ,EAAEA;IAAQ,CAAE,GAAG,EAAG;GAEtD;AACV","names":["schedule","schools","length","meta","errors","school","warnings","locations","rooms","teachers","schedule_groups","lessons","groups","primary_groups","courses","events"],"sourceRoot":"","sources":["../../../src/Admentum/from/schedules.ts"],"sourcesContent":[null]}
@@ -1,7 +1,7 @@
1
1
  import XLSX from 'xlsx';
2
2
  import { CourseEvent } from '../../core/types/course-events';
3
3
  import { Deserialized } from '../../core/types/common';
4
- declare type Options = {
4
+ type Options = {
5
5
  inWeek: string;
6
6
  };
7
7
  declare const _default: (courseEvents: Deserialized<CourseEvent>[], options?: Options) => XLSX.WorkBook;
@@ -1,6 +1,6 @@
1
1
  import { Course } from './courses';
2
2
  import { ScheduleGroup } from './schedule-groups';
3
- export declare type CourseSection = {
3
+ export type CourseSection = {
4
4
  id: number;
5
5
  school_id: number;
6
6
  course: Partial<Course>;
@@ -1,5 +1,5 @@
1
1
  import { User } from './users';
2
- export declare type Course = {
2
+ export type Course = {
3
3
  url: string;
4
4
  id: number;
5
5
  school_id: number;
@@ -1,5 +1,5 @@
1
1
  import { User } from './users';
2
- export declare type LessonInfo = {
2
+ export type LessonInfo = {
3
3
  start: string;
4
4
  end: string;
5
5
  duration: number;
@@ -13,7 +13,7 @@ export declare type LessonInfo = {
13
13
  id: number;
14
14
  }[];
15
15
  };
16
- export declare type Lesson = {
16
+ export type Lesson = {
17
17
  id: number;
18
18
  weekday: number;
19
19
  date: string;
@@ -1,4 +1,4 @@
1
- export declare type PrimaryGroup = {
1
+ export type PrimaryGroup = {
2
2
  url: string;
3
3
  id: number;
4
4
  eid: null;
@@ -1,4 +1,4 @@
1
- export declare type Room = {
1
+ export type Room = {
2
2
  url: string;
3
3
  id: number;
4
4
  school_id: number;
@@ -1,11 +1,11 @@
1
1
  import { User } from "./users";
2
2
  import { Course } from "./courses";
3
3
  import { Schedule } from "./schedules";
4
- declare type Subject = {
4
+ type Subject = {
5
5
  id: number;
6
6
  name: string;
7
7
  };
8
- export declare type ScheduleGroup = {
8
+ export type ScheduleGroup = {
9
9
  id: number;
10
10
  eid: number | null;
11
11
  school_id: number;
@@ -3,7 +3,7 @@ import { Room } from './rooms';
3
3
  import { PrimaryGroup } from './primary-groups';
4
4
  import { ScheduleGroup } from './schedule-groups';
5
5
  import { Lesson } from './lessons';
6
- export declare type Schedule = {
6
+ export type Schedule = {
7
7
  start_date: Date;
8
8
  end_date: Date;
9
9
  school_year: {
@@ -1,4 +1,4 @@
1
- export declare type School = {
1
+ export type School = {
2
2
  url: string;
3
3
  id: number;
4
4
  school_type: 'GR' | 'GY';
@@ -1,4 +1,4 @@
1
- export declare type User = {
1
+ export type User = {
2
2
  url: string;
3
3
  id: number;
4
4
  school_id: number;
@@ -1,12 +1,12 @@
1
- export declare type Options = {
1
+ export type Options = {
2
2
  selectedPeriods?: string[];
3
3
  displayName?: 'Gruppnamn' | 'Kursnamn';
4
4
  };
5
- declare type Period = {
5
+ type Period = {
6
6
  Namn: string;
7
7
  Tidsenhet: 'Timmar/Period' | 'Minuter/Vecka';
8
8
  };
9
- declare type Course = {
9
+ type Course = {
10
10
  Gruppnamn: string;
11
11
  Klass: string;
12
12
  Kurskod: string;
@@ -18,7 +18,7 @@ declare type Course = {
18
18
  Ämne: string;
19
19
  Kursnamn: string;
20
20
  };
21
- declare type Schedule = {
21
+ type Schedule = {
22
22
  'Perioder': Period[];
23
23
  'Tabell Tjänstefördelning': Course[];
24
24
  };
@@ -1,6 +1,6 @@
1
1
  import { Placement } from '../types/placements';
2
2
  import { CourseEvent } from '../../../core/types/course-events';
3
- declare type Options = {
3
+ type Options = {
4
4
  idKey?: '_id' | 'id' | 'ids';
5
5
  };
6
6
  declare const _default: (events: Placement[], options?: Options) => CourseEvent[];
@@ -2,7 +2,7 @@ import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-
2
2
  import { DivisionSettings } from '../../../../core/types/division-settings';
3
3
  import { OutOptions } from '../../types/out-options';
4
4
  import { Day } from '../../types/days';
5
- declare type Output = {
5
+ type Output = {
6
6
  days: Day[] | null;
7
7
  };
8
8
  export default function (event: SourceCourseEvent, settings: DivisionSettings, options: OutOptions): Output | undefined;
@@ -1,7 +1,7 @@
1
1
  import { AvailableLocation } from '../../../../core/types/available-locations';
2
2
  import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
3
3
  import { OutOptions } from '../../types/out-options';
4
- declare type Output = {
4
+ type Output = {
5
5
  dependencies: AvailableLocation[] | AvailableLocation[][] | null;
6
6
  };
7
7
  export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
@@ -2,10 +2,10 @@ import { Group as SourceGroup } from '../../../../core/types/groups';
2
2
  import { Teacher as SourceTeacher } from '../../../../core/types/teachers';
3
3
  import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
4
4
  import { OutOptions } from '../../types/out-options';
5
- declare type MergedOutput = {
5
+ type MergedOutput = {
6
6
  groups: (SourceGroup | SourceTeacher)[] | null;
7
7
  };
8
- declare type SeparatedOutput = {
8
+ type SeparatedOutput = {
9
9
  groups?: SourceGroup[] | null;
10
10
  teachers?: SourceTeacher[] | null;
11
11
  };
@@ -1,7 +1,7 @@
1
1
  import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
2
2
  import { OutOptions } from '../../types/out-options';
3
3
  import { Interval } from '../../types/intervals';
4
- declare type Output = {
4
+ type Output = {
5
5
  intervals: Interval[] | null;
6
6
  };
7
7
  export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
@@ -2,7 +2,7 @@ import moment from 'moment';
2
2
  import { CourseEvent } from '../../../../core/types/course-events';
3
3
  import { BreakLength } from '../../types/break-lengths';
4
4
  import { OutOptions } from '../../types/out-options';
5
- declare type Meta = {
5
+ type Meta = {
6
6
  minBreakLength?: BreakLength;
7
7
  course?: string;
8
8
  name?: string;
@@ -1,6 +1,6 @@
1
- declare type AsymType = {
1
+ type AsymType = {
2
2
  bef: number;
3
3
  aft: number;
4
4
  };
5
- export declare type BreakLength = boolean | number | AsymType;
5
+ export type BreakLength = boolean | number | AsymType;
6
6
  export {};
@@ -1,2 +1,2 @@
1
1
  import { Placement } from './placements';
2
- export declare type Configuration = Placement[];
2
+ export type Configuration = Placement[];
@@ -2,7 +2,7 @@ import { BreakLength } from './break-lengths';
2
2
  import { Day } from './days';
3
3
  import { LockedTime } from './locked-times';
4
4
  import { Interval } from './intervals';
5
- declare type GroupType = 'personal' | 'classes';
5
+ type GroupType = 'personal' | 'classes';
6
6
  export interface Group {
7
7
  id: string;
8
8
  group_type: GroupType;
@@ -1,4 +1,4 @@
1
- export declare type Id = 'id' | '_id' | 'ids';
1
+ export type Id = 'id' | '_id' | 'ids';
2
2
  export interface OutOptions {
3
3
  idKey?: Id;
4
4
  meta?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { Configuration } from './configurations';
2
2
  import { Constraint } from './constraints';
3
- declare type Structure = 'RS/algorithm-0.1.3';
3
+ type Structure = 'RS/algorithm-0.1.3';
4
4
  export interface Schedule {
5
5
  meta?: {
6
6
  structure?: Structure;
@@ -1,6 +1,6 @@
1
1
  import { Configuration } from '../types/configurations';
2
2
  import { CourseEvent } from '../../../core/types/course-events';
3
- declare type Options = {
3
+ type Options = {
4
4
  idKey?: '_id' | 'id' | 'ids';
5
5
  };
6
6
  declare const _default: (configuration: Configuration, options?: Options) => CourseEvent[];
@@ -2,7 +2,7 @@ import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-
2
2
  import { DivisionSettings } from '../../../../core/types/division-settings';
3
3
  import { OutOptions } from '../../types/out-options';
4
4
  import { Day } from '../../types/days';
5
- declare type Output = {
5
+ type Output = {
6
6
  days: Day[] | null;
7
7
  };
8
8
  export default function (event: SourceCourseEvent, settings: DivisionSettings, options: OutOptions): Output | undefined;
@@ -1,7 +1,7 @@
1
1
  import { AvailableLocation } from '../../../../core/types/available-locations';
2
2
  import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
3
3
  import { OutOptions } from '../../types/out-options';
4
- declare type Output = {
4
+ type Output = {
5
5
  dependencies: AvailableLocation[] | AvailableLocation[][] | null;
6
6
  };
7
7
  export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
@@ -2,7 +2,7 @@ import { Group as SourceGroup } from '../../../../core/types/groups';
2
2
  import { Teacher as SourceTeacher } from '../../../../core/types/teachers';
3
3
  import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
4
4
  import { OutOptions } from '../../types/out-options';
5
- declare type MergedOutput = {
5
+ type MergedOutput = {
6
6
  groups: (SourceGroup | SourceTeacher)[][] | null;
7
7
  };
8
8
  export default function (event: SourceCourseEvent, options: OutOptions): MergedOutput | undefined;
@@ -1,7 +1,7 @@
1
1
  import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
2
2
  import { OutOptions } from '../../types/out-options';
3
3
  import { Interval } from '../../types/intervals';
4
- declare type Output = {
4
+ type Output = {
5
5
  intervals: Interval[] | null;
6
6
  };
7
7
  export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
@@ -1,7 +1,7 @@
1
1
  import moment from 'moment';
2
2
  import { CourseEvent } from '../../../../core/types/course-events';
3
3
  import { OutOptions } from '../../types/out-options';
4
- declare type Meta = {
4
+ type Meta = {
5
5
  course?: string;
6
6
  name?: string;
7
7
  ids?: string;
@@ -1,6 +1,6 @@
1
- declare type AsymType = {
1
+ type AsymType = {
2
2
  bef: number;
3
3
  aft: number;
4
4
  };
5
- export declare type BreakLength = boolean | number | AsymType;
5
+ export type BreakLength = boolean | number | AsymType;
6
6
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Placement } from './placements';
2
- export declare type Configuration = {
2
+ export type Configuration = {
3
3
  score?: [number, number, number, number];
4
4
  events: Placement[];
5
5
  };
@@ -2,7 +2,7 @@ import { Day } from './days';
2
2
  import { LockedTime } from './locked-times';
3
3
  import { Interval } from './intervals';
4
4
  import { BreakLength } from './break-lengths';
5
- declare type GroupType = 'personal' | 'classes';
5
+ type GroupType = 'personal' | 'classes';
6
6
  export interface Group {
7
7
  id: string;
8
8
  group_type: GroupType;
@@ -1,4 +1,4 @@
1
- export declare type Id = 'id' | '_id' | 'ids';
1
+ export type Id = 'id' | '_id' | 'ids';
2
2
  export interface OutOptions {
3
3
  idKey?: Id;
4
4
  meta?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { Configuration } from './configurations';
2
2
  import { Constraint } from './constraints';
3
- declare type Structure = 'RS/algorithm-1.0.0';
3
+ type Structure = 'RS/algorithm-1.0.0';
4
4
  export interface Schedule {
5
5
  meta?: {
6
6
  structure?: Structure;
@@ -1 +1 @@
1
- {"version":3,"file":"collections.js","mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AAAkE;AAAA;AAAA;AAAA;AAWlE,SAASA,OAAO,CAACC,MAAwB,EACxBC,YAAsB,EACtBC,UAAsB,EACtBC,QAAsB,EACY;EAAA;EAAA,IAAlCC,mFAA8B,IAAI;EAEjD,IAAMC,KAAK,GAAqBF,QAAQ,CAACG,eAAe;EAExD,IAAI,CAAED,KAAK,EACT,MAAM,IAAIE,KAAK,CAAC,iFAAiF,CAAC;EAEp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B,EACtBC,QAAsB,EACM;EAAA,IAA5BC,mFAAuB,CAAC;EAE3C,OAAO+B,OAAO,CAACR,MAAM,CAAC,CAACC,GAAiC,EAAE5B,MAAM,KAAI;IAElE,IAAIoC,KAAK,CAACC,OAAO,CAACrC,MAAM,CAAC,EAAE;MACzB,IAAIsC,aAAa,GAAGlC,YAAY,EAAE;MAClC,OAAOwB,GAAG,CAACG,MAAM,CAAC/B,MAAM,CAAC2B,MAAM,CAAC,CAACC,GAAiC,EAAEW,WAAW,KAAI;QACjF,IAAI,EAAG,QAAQ,IAAIA,WAAW,CAAC,EAC7B,OAAOX,GAAG;QACZ,OAAOA,GAAG,CAACG,MAAM,CAAChC,OAAO,CAACwC,WAAW,EAAEtC,YAAY,EAAEC,UAAU,EAAEC,QAAQ,EAAEmC,aAAa,CAAC,CAAC;MAC5F,CAAC,EAAE,EAAE,CAAC,CACP;;IAGD,IAAI,EAAG,QAAQ,IAAItC,MAAM,CAAC,EACxB,OAAO4B,GAAG;IAEZ,OAAOA,GAAG,CAACG,MAAM,CAAChC,OAAO,CAACC,MAAM,EAAEC,YAAY,EAAEC,UAAU,EAAEC,QAAQ,CAAC,CAAC;EACxE,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAAA,eAEc+B,aAAa;AAAA","names":["_course","course","teachersList","groupsList","settings","overlapGroup","idKey","collectionIdKey","Error","doc","ids","toString","name","displayName","subject","color","minBreakLength","density","weight","potentialCenter","dependencies","locations","intervals","lockedTimes","days","teachers","groups","flat","reduce","acc","gId","indexOf","concat","length","events","reduceCourses","courses","Array","isArray","_overlapGroup","innerCourse"],"sourceRoot":"","sources":["../../../../src/RS/v2/from/collections.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"collections.js","mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AAAkE;AAAA;AAAA;AAAA;AAWlE,SAASA,OAAO,CAACC,MAAwB,EACxBC,YAAsB,EACtBC,UAAsB,EACtBC,QAAsB,EACY;EAAA;EA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,YAAY,EAAEC,UAAU,EAAEC,QAAQ,CAAC;EAEvF,OAAOK,GAAG;AACd;AAEA,IAAI0B,aAAa,GAAG,SAAhBA,aAAa,CAAIC,OAA+C,EAC/ClC,YAAsB,EACtBC,UAAsB,EACtBC,QAAsB,EACM;EAAA,IAA5BC,mFAAuB,CAAC;EAE3C,OAAO+B,OAAO,CAACR,MAAM,CAAC,CAACC,GAAiC,EAAE5B,MAAM,KAAI;IAElE,IAAIoC,KAAK,CAACC,OAAO,CAACrC,MAAM,CAAC,EAAE;MACzB,IAAIsC,aAAa,GAAGlC,YAAY,EAAE;MAClC,OAAOwB,GAAG,CAACG,MAAM,CAAC/B,MAAM,CAAC2B,MAAM,CAAC,CAACC,GAAiC,EAAEW,WAAW,KAAI;QACjF,IAAI,EAAG,QAAQ,IAAIA,WAAW,CAAC,EAC7B,OAAOX,GAAG;QACZ,OAAOA,GAAG,CAACG,MAAM,CAAChC,OAAO,CAACwC,WAAW,EAAEtC,YAAY,EAAEC,UAAU,EAAEC,QAAQ,EAAEmC,aAAa,CAAC,CAAC;MAC5F,CAAC,EAAE,EAAE,CAAC,CACP;;IAGD,IAAI,EAAG,QAAQ,IAAItC,MAAM,CAAC,EACxB,OAAO4B,GAAG;IAEZ,OAAOA,GAAG,CAACG,MAAM,CAAChC,OAAO,CAACC,MAAM,EAAEC,YAAY,EAAEC,UAAU,EAAEC,QAAQ,CAAC,CAAC;EACxE,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAAA,eAEc+B,aAAa;AAAA","names":["_course","course","teachersList","groupsList","settings","overlapGroup","idKey","collectionIdKey","Error","doc","ids","toString","name","displayName","subject","color","minBreakLength","density","weight","potentialCenter","dependencies","locations","intervals","lockedTimes","days","teachers","groups","flat","reduce","acc","gId","indexOf","concat","length","events","reduceCourses","courses","Array","isArray","_overlapGroup","innerCourse"],"sourceRoot":"","sources":["../../../../src/RS/v2/from/collections.ts"],"sourcesContent":[null]}
@@ -3,6 +3,6 @@ import { CourseEvent } from '../types/course-events';
3
3
  import { Collection } from '../types/collections';
4
4
  import { Types as CoreTypes } from '../../../core/types';
5
5
  import { Serialized, Deserialized } from '../../../core/types/common';
6
- declare type RetrunType = Deserialized<CoreTypes.courseEvent> & Serialized<Pick<CoreTypes.courseEvent, 'teachers' | 'groups'>>;
6
+ type RetrunType = Deserialized<CoreTypes.courseEvent> & Serialized<Pick<CoreTypes.courseEvent, 'teachers' | 'groups'>>;
7
7
  declare const _default: (courseEvents: (CourseEvent | number)[], course: Collection, teachersList: string[], groupsList: string[], settings: Settings) => RetrunType[];
8
8
  export default _default;
@@ -11,6 +11,6 @@ export default class {
11
11
  idKey?: "id" | "_id" | "ids" | undefined;
12
12
  }) => [Omit<import("../../../core/types/course-events").CourseEvent, "preferredDuration">[], import("../../../core/types/locked-times").LockedTime[]];
13
13
  static schedules: (schedule: import("../types/schedules").Schedule) => import("../../../core/types/common").Deserialized<import("../../../core/types/divisions").Division>;
14
- static setting: (settings: import("../types/settings").Settings, _default: import("../types/default").Default) => Omit<import("../../../core/types/division-settings").DivisionSettings, "belongsTo" | "defaultLunch">;
14
+ static setting: (settings: import("../types/settings").Settings, _default: import("../types/default").Default) => import("../../../core/types/common").Deserialized<Omit<import("../../../core/types/division-settings").DivisionSettings, "belongsTo" | "defaultLunch">>;
15
15
  static teacher: (teachers: import("../types/groups").Group[], settings: import("../types/settings").Settings) => import("../../../core/types/common").Deserialized<import("../../../core/types/teachers").Teacher>[];
16
16
  }
@@ -1,7 +1,7 @@
1
1
  import { Configuration } from '../types/configurations';
2
2
  import { CourseEvent } from '../../../core/types/course-events';
3
3
  import { LockedTime } from '../../../core/types/locked-times';
4
- declare type Options = {
4
+ type Options = {
5
5
  idKey?: '_id' | 'id' | 'ids';
6
6
  };
7
7
  declare const _default: (configuration: Configuration, options?: Options) => [Omit<CourseEvent, 'preferredDuration'>[], LockedTime[]];
@@ -1,5 +1,6 @@
1
1
  import { Settings } from '../types/settings';
2
2
  import { Default } from '../types/default';
3
3
  import { DivisionSettings } from '../../../core/types/division-settings';
4
- declare const _default_1: (settings: Settings, _default: Default) => Omit<DivisionSettings, 'belongsTo' | 'defaultLunch'>;
4
+ import { Deserialized } from '../../../core/types/common';
5
+ declare const _default_1: (settings: Settings, _default: Default) => Deserialized<Omit<DivisionSettings, 'belongsTo' | 'defaultLunch'>>;
5
6
  export default _default_1;
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","mappings":";;;;;;AAAA;AAAyD;AAAA,gBAO1C,CAACA,QAAkB,EAAEC,QAAiB,KAA0D;EAAA;EAE7G,IAAIC,IAAI,GAAID,QAAQ,CAACE,mBAAmB;EACxC,IAAIC,KAAK,GAAGH,QAAQ,CAACI,uBAAuB;EAE5C,OAAO;IACLC,OAAO,EAA8BN,QAAQ,CAACM,OAAO;IACrDC,cAAc,EAAuBP,QAAQ,CAACO,cAAc;IAE5DC,QAAQ,2BAA6BP,QAAQ,CAACQ,SAAS,CAAC,CAAC,CAAC,CAACC,GAAG,0DAAzB,sBAA2BC,OAAO,CAAC,CAAC,CAAC,CAACC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAE;IAC7FC,MAAM,4BAA+BZ,QAAQ,CAACQ,SAAS,CAAC,CAAC,CAAC,CAACK,GAAG,2DAAzB,uBAA2BH,OAAO,CAAC,CAAC,CAAC,CAACC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAE;IAE7FG,mCAAmC,EAAEd,QAAQ,CAACe,wBAAwB;IACtEC,8BAA8B,EAAOhB,QAAQ,CAACiB,mBAAmB;IACjEC,8BAA8B,EAAOC,eAAC,CAACC,QAAQ,CAACnB,IAAI,CAAC,GAAG,GAAG,IAAEA,IAAI,CAACoB,GAAG,GAAGpB,IAAI,CAACqB,GAAG,CAAC,GAAGH,eAAC,CAACI,QAAQ,CAACtB,IAAI,CAAC,GAAGA,IAAI,GAAG,CAAC;IAE/GuB,eAAe,2BAAsBxB,QAAQ,CAACwB,eAAe,0DAAxB,sBAA0Bd,OAAO,CAAC,CAAC,CAAC,CAACC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;IAC3Fc,mBAAmB,EAAkBzB,QAAQ,CAAC0B,YAAY;IAE1DC,yBAAyB,EAAY3B,QAAQ,CAAC4B,kBAAkB;IAChEC,8BAA8B,EAAOV,eAAC,CAACW,OAAO,CAAC3B,KAAK,CAAC,GAAGA,KAAK,CAAC,CAAC,CAAC,GAAGA,KAAK;IAExE4B,qBAAqB,EAAgB/B,QAAQ,CAACgC,cAAc;IAC5DC,gBAAgB,EAAqBjC,QAAQ,CAACkC,SAAS;IACvDC,cAAc,EAAuBnC,QAAQ,CAACoC,OAAO;IAErDC,kBAAkB,EAAmBrC,QAAQ,CAACsC,WAAW;IACzDC,kBAAkB,EAAmBvC,QAAQ,CAACwC,WAAW;IACzDC,mBAAmB,EAAkBzC,QAAQ,CAAC0C;GAC/C;AACH,CAAC;AAAA","names":["settings","_default","EMBL","eventMinBreakLength","MNDWH","maxNumDailyWorkingHours","numDays","discretization","dayStart","intervals","beg","toFixed","replace","dayEnd","end","defaultDependencyMinimumBreakLength","dependencyMinBreakLength","defaultGroupMinimumBreakLength","groupMinBreakLength","defaultEventMinimumBreakLength","_","isObject","bef","aft","isNumber","potentialCenter","defaultEventDensity","eventDensity","defaultMaxNumWorkingHours","maxNumWorkingHours","defaultMaxNumDailyWorkingHours","isArray","defaultDependencyRank","dependencyRank","defaultGroupRank","groupRank","defaultDayRank","dayRank","defaultEventWeight","eventWeight","defaultGroupWeight","groupWeight","defaultCourseWeight","collectionWeight"],"sourceRoot":"","sources":["../../../../src/RS/v2/from/settings.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"settings.js","mappings":";;;;;;AAAA;AAAyD;AAAA,gBAQ1C,CAACA,QAAkB,EAAEC,QAAiB,KAAwE;EAAA;EAE3H,IAAIC,IAAI,GAAID,QAAQ,CAACE,mBAAmB;EACxC,IAAIC,KAAK,GAAGH,QAAQ,CAACI,uBAAuB;EAE5C,OAAO;IACLC,OAAO,EA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Q,CAACwC,WAAW;IACzDC,mBAAmB,EAAkBzC,QAAQ,CAAC0C;GAC/C;AACH,CAAC;AAAA","names":["settings","_default","EMBL","eventMinBreakLength","MNDWH","maxNumDailyWorkingHours","numDays","discretization","dayStart","intervals","beg","toFixed","replace","dayEnd","end","defaultDependencyMinimumBreakLength","dependencyMinBreakLength","defaultGroupMinimumBreakLength","groupMinBreakLength","defaultEventMinimumBreakLength","_","isObject","bef","aft","isNumber","potentialCenter","defaultEventDensity","eventDensity","defaultMaxNumWorkingHours","maxNumWorkingHours","defaultMaxNumDailyWorkingHours","isArray","defaultDependencyRank","dependencyRank","defaultGroupRank","groupRank","defaultDayRank","dayRank","defaultEventWeight","eventWeight","defaultGroupWeight","groupWeight","defaultCourseWeight","collectionWeight"],"sourceRoot":"","sources":["../../../../src/RS/v2/from/settings.ts"],"sourcesContent":[null]}
@@ -2,7 +2,7 @@ import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-
2
2
  import { DivisionSettings } from '../../../../core/types/division-settings';
3
3
  import { OutOptions } from '../../types/out-options';
4
4
  import { Day } from '../../types/days';
5
- declare type Output = {
5
+ type Output = {
6
6
  days: Day[] | null;
7
7
  };
8
8
  export default function (event: SourceCourseEvent, settings: DivisionSettings, options: OutOptions): Output | undefined;
@@ -1,7 +1,7 @@
1
1
  import { AvailableLocation } from '../../../../core/types/available-locations';
2
2
  import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
3
3
  import { OutOptions } from '../../types/out-options';
4
- declare type Output = {
4
+ type Output = {
5
5
  dependencies: AvailableLocation[] | AvailableLocation[][] | null;
6
6
  };
7
7
  export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
@@ -2,7 +2,7 @@ import { Group as SourceGroup } from '../../../../core/types/groups';
2
2
  import { Teacher as SourceTeacher } from '../../../../core/types/teachers';
3
3
  import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
4
4
  import { OutOptions } from '../../types/out-options';
5
- declare type MergedOutput = {
5
+ type MergedOutput = {
6
6
  groups: (SourceGroup | SourceTeacher)[][] | null;
7
7
  };
8
8
  export default function (event: SourceCourseEvent, options: OutOptions): MergedOutput | undefined;
@@ -1,7 +1,7 @@
1
1
  import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
2
2
  import { OutOptions } from '../../types/out-options';
3
3
  import { Interval } from '../../types/intervals';
4
- declare type Output = {
4
+ type Output = {
5
5
  intervals: Interval[] | null;
6
6
  };
7
7
  export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
@@ -1,7 +1,7 @@
1
1
  import moment from 'moment';
2
2
  import { CourseEvent } from '../../../../core/types/course-events';
3
3
  import { OutOptions } from '../../types/out-options';
4
- declare type Meta = {
4
+ type Meta = {
5
5
  course?: string;
6
6
  name?: string;
7
7
  ids?: string;
@@ -1,6 +1,6 @@
1
- declare type AsymType = {
1
+ type AsymType = {
2
2
  bef: number;
3
3
  aft: number;
4
4
  };
5
- export declare type BreakLength = boolean | number | AsymType;
5
+ export type BreakLength = boolean | number | AsymType;
6
6
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Placement } from './placements';
2
- export declare type Configuration = {
2
+ export type Configuration = {
3
3
  score?: [number, number, number, number];
4
4
  events: Placement[];
5
5
  };
@@ -2,7 +2,7 @@ import { Day } from './days';
2
2
  import { LockedTime } from './locked-times';
3
3
  import { Interval } from './intervals';
4
4
  import { BreakLength } from './break-lengths';
5
- declare type GroupType = 'personal' | 'classes';
5
+ type GroupType = 'personal' | 'classes';
6
6
  export interface Group {
7
7
  id: string;
8
8
  group_type: GroupType;
@@ -1,4 +1,4 @@
1
- export declare type Id = 'id' | '_id';
1
+ export type Id = 'id' | '_id';
2
2
  export interface OutOptions {
3
3
  idKey?: Id;
4
4
  meta?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { Configuration } from './configurations';
2
2
  import { Constraint } from './constraints';
3
- declare type Structure = 'RS/algorithm-2.0.0';
3
+ type Structure = 'RS/algorithm-2.0.0';
4
4
  export interface Schedule {
5
5
  meta?: {
6
6
  structure?: Structure;
@@ -1,6 +1,6 @@
1
1
  import { Types as CoreTypes } from '../../core/types';
2
2
  import { Deserialized } from '../../core/types/common';
3
3
  import { Activity } from '../types/activities';
4
- declare type Expand = ('referenceNames' | 'teachers' | 'syllabus' | 'groups')[];
4
+ type Expand = ('referenceNames' | 'teachers' | 'syllabus' | 'groups')[];
5
5
  declare const _default: (activities: Deserialized<CoreTypes.course>[], belongsTo?: CoreTypes.division, expand?: Expand) => Activity[];
6
6
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { Types as CoreTypes } from '../../core/types';
2
2
  import { Deserialized } from '../../core/types/common';
3
3
  import { CalendarEvent } from '../types/calendar-events';
4
- declare type Expand = ('referenceNames' | 'teachers' | 'activity' | 'groups')[];
4
+ type Expand = ('referenceNames' | 'teachers' | 'activity' | 'groups')[];
5
5
  declare const _default: (events: Deserialized<CoreTypes.courseEvent>[], belongsTo?: CoreTypes.division, expand?: Expand) => Partial<CalendarEvent>[];
6
6
  export default _default;
@@ -2,7 +2,7 @@ import { Group } from './groups';
2
2
  import { Organisation } from './organisation';
3
3
  import { ActivityType } from './codes';
4
4
  import { DutyAssignment } from './duty-assignments';
5
- export declare type Activity = {
5
+ export type Activity = {
6
6
  id: string;
7
7
  organisation?: Organisation;
8
8
  meta?: {
@@ -1,7 +1,7 @@
1
1
  import { Activity } from './activities';
2
2
  import { Resource } from './resources';
3
3
  import { Room } from './rooms';
4
- export declare type CalendarEvent = {
4
+ export type CalendarEvent = {
5
5
  id: string;
6
6
  meta?: {
7
7
  created?: string;
@@ -1,7 +1,7 @@
1
- export declare type OrganisationType = 'Huvudman' | 'Verksamhetsområde' | 'Förvaltning' | 'Rektorsområde' | 'Skola' | 'Skolenhet' | 'Varumärke' | 'Bolag' | 'Övrigt';
2
- export declare type SchoolType = 'FS' | 'FKLASS' | 'FTH' | 'OPPFTH' | 'GR' | 'GRS' | 'TR' | 'SP' | 'SAM' | 'GY' | 'GYS' | 'SFI' | 'SARVUX' | 'SARVUXGR' | 'SARVUXGY' | 'VUX' | 'VUXSFI' | 'VUXGR' | 'VUXGY' | 'VUXSARTR' | 'VUXSARGR' | 'VUXSARGY' | 'KU' | 'YH' | 'FHS' | 'STF' | 'KKU' | 'HS' | 'ABU' | 'AU';
3
- export declare type DutyRole = 'Rektor' | 'Lärare' | 'Förskollärare' | 'Barnskötare' | 'Bibliotekarie' | 'Lärarassistent' | 'Fritidspedagog' | 'Annan personal' | 'Studie- och yrkesvägledare' | 'Förstelärare' | 'Kurator' | 'Skolsköterska' | 'Skolläkare' | 'Skolpsykolog' | 'Speciallärare/specialpedagog' | 'Skoladministratör' | 'Övrig arbetsledning';
4
- export declare type GroupType = 'Undervisning' | 'Klass' | 'Mentor' | 'Provgrupp' | 'Schema' | 'Avdelning' | 'Övrigt';
5
- export declare type ProgrammeType = 'Yrkesprogram' | 'Högskoleförberedande program' | 'Introduktionsprogram' | 'Nationellt yrkespaket' | 'Regionalt yrkespaket' | 'Fjärde tekniskt år' | 'Programinriktning' | 'Utgång';
6
- export declare type ProgrammeContentType = 'Gymnasiegemensamma' | 'Programgemensamma' | 'Inriktning' | 'Programfärdjupning' | 'Gymnasiearbete' | 'Individuellt val';
7
- export declare type ActivityType = 'Undervisning' | 'Elevaktivitet' | 'Provaktivitet' | 'Läraraktivitet' | 'Övrigt';
1
+ export type OrganisationType = 'Huvudman' | 'Verksamhetsområde' | 'Förvaltning' | 'Rektorsområde' | 'Skola' | 'Skolenhet' | 'Varumärke' | 'Bolag' | 'Övrigt';
2
+ export type SchoolType = 'FS' | 'FKLASS' | 'FTH' | 'OPPFTH' | 'GR' | 'GRS' | 'TR' | 'SP' | 'SAM' | 'GY' | 'GYS' | 'SFI' | 'SARVUX' | 'SARVUXGR' | 'SARVUXGY' | 'VUX' | 'VUXSFI' | 'VUXGR' | 'VUXGY' | 'VUXSARTR' | 'VUXSARGR' | 'VUXSARGY' | 'KU' | 'YH' | 'FHS' | 'STF' | 'KKU' | 'HS' | 'ABU' | 'AU';
3
+ export type DutyRole = 'Rektor' | 'Lärare' | 'Förskollärare' | 'Barnskötare' | 'Bibliotekarie' | 'Lärarassistent' | 'Fritidspedagog' | 'Annan personal' | 'Studie- och yrkesvägledare' | 'Förstelärare' | 'Kurator' | 'Skolsköterska' | 'Skolläkare' | 'Skolpsykolog' | 'Speciallärare/specialpedagog' | 'Skoladministratör' | 'Övrig arbetsledning';
4
+ export type GroupType = 'Undervisning' | 'Klass' | 'Mentor' | 'Provgrupp' | 'Schema' | 'Avdelning' | 'Övrigt';
5
+ export type ProgrammeType = 'Yrkesprogram' | 'Högskoleförberedande program' | 'Introduktionsprogram' | 'Nationellt yrkespaket' | 'Regionalt yrkespaket' | 'Fjärde tekniskt år' | 'Programinriktning' | 'Utgång';
6
+ export type ProgrammeContentType = 'Gymnasiegemensamma' | 'Programgemensamma' | 'Inriktning' | 'Programfärdjupning' | 'Gymnasiearbete' | 'Individuellt val';
7
+ export type ActivityType = 'Undervisning' | 'Elevaktivitet' | 'Provaktivitet' | 'Läraraktivitet' | 'Övrigt';
@@ -1,6 +1,6 @@
1
1
  import { Organisation } from './organisation';
2
2
  import { DutyRole } from './codes';
3
- export declare type Duty = {
3
+ export type Duty = {
4
4
  id: string;
5
5
  organisation?: Organisation;
6
6
  dutyRole: DutyRole;
@@ -1,5 +1,5 @@
1
1
  import { Duty } from './duties';
2
- export declare type DutyAssignment = {
2
+ export type DutyAssignment = {
3
3
  duty: Duty;
4
4
  minutesPlanned?: number;
5
5
  startDate?: Date | string;
@@ -1,6 +1,6 @@
1
1
  import { GroupType, SchoolType } from './codes';
2
2
  import { Person } from './persons';
3
- export declare type Group = {
3
+ export type Group = {
4
4
  id: string;
5
5
  meta?: {
6
6
  created: string | Date;
@@ -1,5 +1,5 @@
1
1
  import { SchoolType, OrganisationType } from './codes';
2
- export declare type Organisation = {
2
+ export type Organisation = {
3
3
  id: string;
4
4
  displayName?: string;
5
5
  organisationType: OrganisationType;
@@ -1,4 +1,4 @@
1
- export declare type Person = {
1
+ export type Person = {
2
2
  id: string;
3
3
  meta?: {
4
4
  created: string | Date;
@@ -1,4 +1,4 @@
1
- export declare type Resource = {
1
+ export type Resource = {
2
2
  id: string;
3
3
  meta?: {
4
4
  created: string | Date;
@@ -1,4 +1,4 @@
1
- export declare type Room = {
1
+ export type Room = {
2
2
  id: string;
3
3
  meta?: {
4
4
  created: string | Date;
@@ -1,4 +1,4 @@
1
- export declare type Group = {
1
+ export type Group = {
2
2
  id: string;
3
3
  name: string;
4
4
  active: '0' | '1';
@@ -1,4 +1,4 @@
1
- export declare type Lesson = {
1
+ export type Lesson = {
2
2
  subject: string;
3
3
  group: string;
4
4
  teacher: string;
@@ -1,4 +1,4 @@
1
- export declare type Location = {
1
+ export type Location = {
2
2
  id: string;
3
3
  name: string;
4
4
  };
@@ -2,7 +2,7 @@ import { Location } from "./location";
2
2
  import { Teacher } from "./teacher";
3
3
  import { Group } from "./group";
4
4
  import { Lesson } from "./lesson";
5
- export declare type Schedule = {
5
+ export type Schedule = {
6
6
  locations: Location[];
7
7
  teachers: Teacher[];
8
8
  groups: Group[];
@@ -1,4 +1,4 @@
1
- export declare type Teacher = {
1
+ export type Teacher = {
2
2
  id: string;
3
3
  fname: string;
4
4
  lname: string;
@@ -1,5 +1,5 @@
1
- export declare type Time = `${number}${number}${number}${number}`;
2
- export declare type Day = 'Mån' | 'Tis' | 'Ons' | 'Tor' | 'Fre' | 'Lör' | 'Sön';
1
+ export type Time = `${number}${number}${number}${number}`;
2
+ export type Day = 'Mån' | 'Tis' | 'Ons' | 'Tor' | 'Fre' | 'Lör' | 'Sön';
3
3
  export interface Event {
4
4
  id?: string;
5
5
  group?: string;
@@ -2,7 +2,7 @@ import { Event } from './events';
2
2
  export declare module Types {
3
3
  type event = Event;
4
4
  }
5
- export declare type Options = {
5
+ export type Options = {
6
6
  interval?: {
7
7
  start: number;
8
8
  end: number;
@@ -5,4 +5,4 @@ export interface AvailableLocationBare {
5
5
  rank?: number;
6
6
  groupIndex?: number;
7
7
  }
8
- export declare type AvailableLocation = AvailableLocationBare;
8
+ export type AvailableLocation = AvailableLocationBare;
@@ -1 +1 @@
1
- export declare type BreakLength = boolean | number | number[];
1
+ export type BreakLength = boolean | number | number[];
@@ -1,25 +1,25 @@
1
1
  import { Types } from 'mongoose';
2
- declare type Vertex = {
2
+ type Vertex = {
3
3
  _id?: Types.ObjectId;
4
4
  id?: string;
5
5
  };
6
- export declare type Edge<T> = T extends Vertex[] ? T | Types.ObjectId[] | string[] : (T extends Vertex ? T | Types.ObjectId | string : never);
7
- export declare type ExtractEdge<T> = T extends Vertex[] ? Exclude<T, Types.ObjectId[] | string[]> : (T extends Vertex ? Exclude<T, Types.ObjectId | string> : never);
8
- export declare type NestedKeyOf<ObjectType extends object | object[]> = {
6
+ export type Edge<T> = T extends Vertex[] ? T | Types.ObjectId[] | string[] : (T extends Vertex ? T | Types.ObjectId | string : never);
7
+ export type ExtractEdge<T> = T extends Vertex[] ? Exclude<T, Types.ObjectId[] | string[]> : (T extends Vertex ? Exclude<T, Types.ObjectId | string> : never);
8
+ export type NestedKeyOf<ObjectType extends object | object[]> = {
9
9
  [Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object | object[] ? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}` : `${Key}`;
10
10
  }[keyof ObjectType & (string | number)];
11
- export declare type Join<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
12
- export declare type firstChild<ObjectType extends object> = {
11
+ export type Join<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
12
+ export type firstChild<ObjectType extends object> = {
13
13
  [Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? ObjectType[Key] : (ObjectType[Key] extends any ? ObjectType[Key] : never);
14
14
  }[keyof ObjectType & (string | number)];
15
- export declare type DeserializedOld<ObjectType> = {
15
+ export type DeserializedOld<ObjectType> = {
16
16
  [Key in keyof ObjectType]: (ObjectType[Key] extends Types.ObjectId | Types.ObjectId[] ? ObjectType[Key] : (Edge<Vertex> extends ObjectType[Key] ? Extract<Exclude<ObjectType[Key], Types.ObjectId>, Vertex> : (Edge<Vertex[]> extends ObjectType[Key] ? Extract<Exclude<ObjectType[Key], Types.ObjectId[]>, Vertex[]> : (Exclude<object, Types.ObjectId | Types.ObjectId[]> extends ObjectType[Key] ? Deserialized<ObjectType[Key]> : (Exclude<any[], string[] | number[] | boolean[] | Types.ObjectId | Types.ObjectId[]>[] extends ObjectType[Key] ? Deserialized<ObjectType[Key]> : ObjectType[Key])))));
17
17
  };
18
- declare type ArrayType<T> = T extends object[] ? T[0] : never;
19
- export declare type Deserialized<ObjectType> = {
18
+ type ArrayType<T> = T extends object[] ? T[0] : never;
19
+ export type Deserialized<ObjectType> = {
20
20
  [Key in keyof ObjectType]: (ExtractEdge<ObjectType[Key]> extends never ? (ArrayType<ObjectType[Key]> extends never ? ObjectType[Key] : (ArrayType<ObjectType[Key]> extends object ? Deserialized<ArrayType<ObjectType[Key]>>[] : ObjectType[Key])) : Deserialized<ExtractEdge<ObjectType[Key]>>);
21
21
  };
22
- export declare type Serialized<ObjectType> = {
22
+ export type Serialized<ObjectType> = {
23
23
  [Key in keyof ObjectType]: (Edge<Vertex> extends ObjectType[Key] ? Extract<ObjectType[Key], string> : (Edge<Vertex[]> extends ObjectType[Key] ? Extract<ObjectType[Key], string[]> : (ObjectType[Key] extends Exclude<{}, Types.ObjectId | Types.ObjectId[]> ? Serialized<ObjectType[Key]> : ObjectType[Key])));
24
24
  };
25
25
  export {};
@@ -12,6 +12,7 @@ import { Teacher } from './teachers';
12
12
  import { Location } from './locations';
13
13
  import { AvailableLocation } from './available-locations';
14
14
  import { OverlapGroup } from './overlap-groups';
15
+ import { Period } from './periods';
15
16
  import { Person } from './persons';
16
17
  export interface CourseEventBare {
17
18
  belongsTo?: Edge<Division>;
@@ -19,6 +20,7 @@ export interface CourseEventBare {
19
20
  groups?: Edge<Group[]> | null;
20
21
  teachers?: Edge<Teacher[]> | null;
21
22
  participants?: Edge<Person[]> | null;
23
+ period?: Edge<Period> | null;
22
24
  locations?: AvailableLocation[] | null;
23
25
  inLocations?: Edge<Location[]>;
24
26
  density?: number;
@@ -10,6 +10,7 @@ import { Teacher } from './teachers';
10
10
  import { AvailableLocation } from './available-locations';
11
11
  import { CourseEvent } from './course-events';
12
12
  import { OverlapGroup } from './overlap-groups';
13
+ import { Period } from './periods';
13
14
  import { Person } from './persons';
14
15
  export interface CourseBare {
15
16
  belongsTo?: Edge<Division>;
@@ -17,6 +18,7 @@ export interface CourseBare {
17
18
  groups?: Edge<Group[]>;
18
19
  teachers?: Edge<Teacher[]>;
19
20
  participants?: Edge<Person[]>;
21
+ period?: Edge<Period>;
20
22
  locations?: AvailableLocation[];
21
23
  density?: number;
22
24
  weight?: number;
@@ -2,6 +2,7 @@ import { Types } from 'mongoose';
2
2
  import { Edge } from './common';
3
3
  import { Division } from './divisions';
4
4
  import { LockedTime } from './locked-times';
5
+ import { Period } from './periods';
5
6
  export interface DivisionSettingsBare {
6
7
  belongsTo?: Edge<Division>;
7
8
  createdAt?: string;
@@ -25,6 +26,7 @@ export interface DivisionSettingsBare {
25
26
  defaultEventDurationVariance?: number;
26
27
  requireForcedOverlappingEventsSets?: boolean;
27
28
  defaultLunch?: Edge<LockedTime[]>;
29
+ period?: Edge<Period>;
28
30
  }
29
31
  export interface DivisionSettings extends DivisionSettingsBare {
30
32
  _id?: Types.ObjectId;
@@ -11,6 +11,7 @@ import { LockedTime } from './locked-times';
11
11
  import { Division } from './divisions';
12
12
  import { DivisionSettings } from './division-settings';
13
13
  import { OverlapGroup } from './overlap-groups';
14
+ import { Period } from './periods';
14
15
  import { Person } from './persons';
15
16
  import { Teacher } from './teachers';
16
17
  import { Meta } from './meta';
@@ -28,6 +29,7 @@ export declare module Types {
28
29
  type division = Division;
29
30
  type divisionSettings = DivisionSettings;
30
31
  type overlapGroup = OverlapGroup;
32
+ type period = Period;
31
33
  type person = Person;
32
34
  type teacher = Teacher;
33
35
  type meta = Meta;
@@ -0,0 +1,17 @@
1
+ import { Types } from 'mongoose';
2
+ import { Edge } from './common';
3
+ import { Division } from './divisions';
4
+ export interface PeriodBare {
5
+ belongsTo?: Edge<Division>;
6
+ displayIndex?: number;
7
+ displayName?: string;
8
+ ranges: {
9
+ start?: moment.Moment | string | Date;
10
+ end?: moment.Moment | string | Date;
11
+ }[];
12
+ lastModifiedBy?: unknown;
13
+ }
14
+ export interface Period extends PeriodBare {
15
+ _id?: Types.ObjectId;
16
+ id?: string;
17
+ }
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- //# sourceMappingURL=students.js.map
6
+ //# sourceMappingURL=periods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"periods.js","mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
@@ -1,7 +1,7 @@
1
1
  import { maps } from '../constants';
2
- export declare type MapInstance = typeof maps[number];
3
- export declare type MapName = MapInstance['name'];
4
- export declare type IdentifiedMaps = {
2
+ export type MapInstance = typeof maps[number];
3
+ export type MapName = MapInstance['name'];
4
+ export type IdentifiedMaps = {
5
5
  none: MapInstance[];
6
6
  weak: MapInstance[];
7
7
  strong: MapInstance[];
@@ -1,32 +1,32 @@
1
- declare type Staff = {
1
+ type Staff = {
2
2
  ID: number;
3
3
  Firstname: string;
4
4
  Lastname: string;
5
5
  };
6
- declare type Group = {
6
+ type Group = {
7
7
  ID: number;
8
8
  Name: string;
9
9
  FriendlyName: string;
10
10
  StartDate: string;
11
11
  EndDate: string;
12
12
  };
13
- declare type Class = {
13
+ type Class = {
14
14
  ID: number;
15
15
  Name: string;
16
16
  };
17
- declare type GroupStaffReference = {
17
+ type GroupStaffReference = {
18
18
  groupId: number;
19
19
  userId: number;
20
20
  };
21
- declare type GroupStudentReference = {
21
+ type GroupStudentReference = {
22
22
  groupId: number;
23
23
  userId: number;
24
24
  };
25
- declare type ClassStudentReference = {
25
+ type ClassStudentReference = {
26
26
  classId: number;
27
27
  userId: number;
28
28
  };
29
- declare type Schedule = {
29
+ type Schedule = {
30
30
  staff: Staff[];
31
31
  groups: Group[];
32
32
  classes: Class[];
@@ -43,7 +43,7 @@ export declare module Types {
43
43
  type classStudentReference = ClassStudentReference;
44
44
  type schedule = Schedule;
45
45
  }
46
- export declare type Options = {
46
+ export type Options = {
47
47
  beg: string;
48
48
  end: string;
49
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royalschedule/maps",
3
- "version": "2.2.89",
3
+ "version": "2.2.92",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  "nodemon": "^2.0.20",
48
48
  "ts-node": "^10.9.1",
49
49
  "tslib": "^2.4.1",
50
- "typescript": "^4.8.4"
50
+ "typescript": "^4.9.4"
51
51
  },
52
52
  "dependencies": {
53
53
  "app-module-path": "^2.2.0",
@@ -1,8 +0,0 @@
1
- import { Types } from 'mongoose';
2
- export interface StudentBare {
3
- createdAt?: string;
4
- }
5
- export interface Student extends StudentBare {
6
- _id?: Types.ObjectId;
7
- id?: string;
8
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"students.js","mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}