@royalschedule/maps 4.0.15 → 4.0.17
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/Additio/from/courses.js.map +1 -1
- package/dist/Additio/from/events.js.map +1 -1
- package/dist/Additio/from/groups.js.map +1 -1
- package/dist/Additio/from/index.js.map +1 -1
- package/dist/Additio/from/locations.js.map +1 -1
- package/dist/Additio/from/persons.js.map +1 -1
- package/dist/Additio/from/schedules.d.ts +7 -6
- package/dist/Additio/from/schedules.js +2 -4
- package/dist/Additio/from/schedules.js.map +1 -1
- package/dist/Additio/from/teachers.js.map +1 -1
- package/dist/Additio/to/index.d.ts +13 -11
- package/dist/Additio/to/schedules.js +2 -4
- package/dist/Additio/to/schedules.js.map +1 -1
- package/dist/Admentum/from/courses.js.map +1 -1
- package/dist/Admentum/from/events.js.map +1 -1
- package/dist/Admentum/from/groups.js.map +1 -1
- package/dist/Admentum/from/index.js.map +1 -1
- package/dist/Admentum/from/locations.js.map +1 -1
- package/dist/Admentum/from/persons.js.map +1 -1
- package/dist/Admentum/from/schedules.d.ts +7 -6
- package/dist/Admentum/from/schedules.js +2 -4
- package/dist/Admentum/from/schedules.js.map +1 -1
- package/dist/Admentum/from/teachers.js.map +1 -1
- package/dist/Admentum/to/index.d.ts +9 -8
- package/dist/Admentum/to/schedules.js +4 -7
- package/dist/Admentum/to/schedules.js.map +1 -1
- package/dist/Excel/index.d.ts +263 -26
- package/dist/Excel/v1/from/index.js +2 -1
- package/dist/Excel/v1/from/index.js.map +1 -1
- package/dist/Excel/v1/index.d.ts +218 -20
- package/dist/Excel/v2/from/index.js +99 -94
- package/dist/Excel/v2/from/index.js.map +1 -1
- package/dist/Excel/v2/index.d.ts +263 -26
- package/dist/IdunSoft/from/courses.js.map +1 -1
- package/dist/IdunSoft/from/events.js +1 -2
- package/dist/IdunSoft/from/events.js.map +1 -1
- package/dist/IdunSoft/from/groups.js.map +1 -1
- package/dist/IdunSoft/from/index.js.map +1 -1
- package/dist/IdunSoft/from/locations.js.map +1 -1
- package/dist/IdunSoft/from/schedules.d.ts +6 -5
- package/dist/IdunSoft/from/schedules.js.map +1 -1
- package/dist/IdunSoft/from/teachers.js.map +1 -1
- package/dist/IdunSoft/to/index.d.ts +2 -1
- package/dist/IdunSoft/to/schedules.js +5 -8
- package/dist/IdunSoft/to/schedules.js.map +1 -1
- package/dist/InfoMentor/to/index.d.ts +2 -1
- package/dist/InfoMentor/to/schedules.js +3 -4
- package/dist/InfoMentor/to/schedules.js.map +1 -1
- package/dist/PlanDigital/from/index.js.map +1 -1
- package/dist/PlanDigital/from/schedules.js +9 -11
- package/dist/PlanDigital/from/schedules.js.map +1 -1
- package/dist/PlanDigital/index.d.ts +73 -58
- package/dist/Quiculum/file/to/index.d.ts +10 -9
- package/dist/Quiculum/file/to/schedules.js +5 -9
- package/dist/Quiculum/file/to/schedules.js.map +1 -1
- package/dist/RS/from/division.d.ts +2 -1
- package/dist/RS/from/division.js +9 -6
- package/dist/RS/from/division.js.map +1 -1
- package/dist/RS/from/index.js.map +1 -1
- package/dist/RS/from/schedules.d.ts +2 -1
- package/dist/RS/from/schedules.js.map +1 -1
- package/dist/RS/make-connected.d.ts +17 -16
- package/dist/RS/make-connected.js +63 -96
- package/dist/RS/make-connected.js.map +1 -1
- package/dist/RS/to/index.js.map +1 -1
- package/dist/RS/to/initial-configuration.js +4 -6
- package/dist/RS/to/initial-configuration.js.map +1 -1
- package/dist/RS/to/input/collections.js.map +1 -1
- package/dist/RS/to/input/default.js +1 -2
- package/dist/RS/to/input/default.js.map +1 -1
- package/dist/RS/to/input/dependencies.js +1 -3
- package/dist/RS/to/input/dependencies.js.map +1 -1
- package/dist/RS/to/input/dynamic-locked-times.js +1 -2
- package/dist/RS/to/input/dynamic-locked-times.js.map +1 -1
- package/dist/RS/to/input/events.js +5 -3
- package/dist/RS/to/input/events.js.map +1 -1
- package/dist/RS/to/input/groups.js.map +1 -1
- package/dist/RS/to/input/individuals.js +2 -3
- package/dist/RS/to/input/individuals.js.map +1 -1
- package/dist/RS/to/input/input.js +1 -3
- package/dist/RS/to/input/input.js.map +1 -1
- package/dist/RS/to/input/intervals.js +2 -4
- package/dist/RS/to/input/intervals.js.map +1 -1
- package/dist/RS/to/input/periods.js +6 -8
- package/dist/RS/to/input/periods.js.map +1 -1
- package/dist/RS/to/input/settings.js.map +1 -1
- package/dist/RS/to/input/teachers.js.map +1 -1
- package/dist/RS/to/input/util/attach-locked-times.js.map +1 -1
- package/dist/RS/to/input/util/parse-days.js.map +1 -1
- package/dist/RS/to/input/util/parse-group-references.js.map +1 -1
- package/dist/RS/to/input/util/parse-intervals.js +2 -4
- package/dist/RS/to/input/util/parse-intervals.js.map +1 -1
- package/dist/RS/to/input/util/parse-location-references.js +1 -2
- package/dist/RS/to/input/util/parse-location-references.js.map +1 -1
- package/dist/RS/to/input/util/parse-max-working-hours.js.map +1 -1
- package/dist/RS/to/input/util/parse-minimum-break-length.js.map +1 -1
- package/dist/RS/to/input/util/util.js +1 -2
- package/dist/RS/to/input/util/util.js.map +1 -1
- package/dist/RS/to/schedules.js +1 -1
- package/dist/RS/to/schedules.js.map +1 -1
- package/dist/RS/types/to.d.ts +15 -5
- package/dist/RS/types/to.js +1 -1
- package/dist/RS/types/to.js.map +1 -1
- package/dist/SS12000/from/activities.js +1 -2
- package/dist/SS12000/from/activities.js.map +1 -1
- package/dist/SS12000/from/calendar-events.js.map +1 -1
- package/dist/SS12000/from/duties.js.map +1 -1
- package/dist/SS12000/from/groups.js.map +1 -1
- package/dist/SS12000/from/index.js.map +1 -1
- package/dist/SS12000/from/persons.js.map +1 -1
- package/dist/SS12000/from/resources.js.map +1 -1
- package/dist/SS12000/from/rooms.js.map +1 -1
- package/dist/SS12000/from/syllabuses.js.map +1 -1
- package/dist/SS12000/index.d.ts +12567 -9
- package/dist/SS12000/to/activities.js.map +1 -1
- package/dist/SS12000/to/calendar-events.js.map +1 -1
- package/dist/SS12000/to/common.js.map +1 -1
- package/dist/SS12000/to/duties.js.map +1 -1
- package/dist/SS12000/to/groups.js.map +1 -1
- package/dist/SS12000/to/index.d.ts +17 -16
- package/dist/SS12000/to/persons.js.map +1 -1
- package/dist/SS12000/to/resources.js.map +1 -1
- package/dist/SS12000/to/rooms.js.map +1 -1
- package/dist/SS12000/to/syllabuses.js.map +1 -1
- package/dist/SchoolSoft/api/from/index.js.map +1 -1
- package/dist/SchoolSoft/api/from/schedules.js +8 -12
- package/dist/SchoolSoft/api/from/schedules.js.map +1 -1
- package/dist/SchoolSoft/api/index.d.ts +444 -9
- package/dist/SchoolSoft/file/from/index.js.map +1 -1
- package/dist/SchoolSoft/file/from/schedules.js +83 -87
- package/dist/SchoolSoft/file/from/schedules.js.map +1 -1
- package/dist/SchoolSoft/file/index.d.ts +2 -1
- package/dist/SchoolSoft/file/to/index.d.ts +5 -4
- package/dist/SchoolSoft/file/to/schedules.js +1 -2
- package/dist/SchoolSoft/file/to/schedules.js.map +1 -1
- package/dist/SchoolSoft/index.d.ts +2 -1
- package/dist/Schoolity/txt/to/index.d.ts +2 -1
- package/dist/Schoolity/txt/to/schedules.js +5 -12
- package/dist/Schoolity/txt/to/schedules.js.map +1 -1
- package/dist/Skola24/mdb/from/course-and-events.js +3 -5
- package/dist/Skola24/mdb/from/course-and-events.js.map +1 -1
- package/dist/Skola24/mdb/from/groups.js.map +1 -1
- package/dist/Skola24/mdb/from/index.js.map +1 -1
- package/dist/Skola24/mdb/from/locations.js.map +1 -1
- package/dist/Skola24/mdb/from/schedule.d.ts +6 -5
- package/dist/Skola24/mdb/from/schedule.js.map +1 -1
- package/dist/Skola24/mdb/from/teachers.js.map +1 -1
- package/dist/Skola24/txt/from/calendar-exceptions.js +1 -2
- package/dist/Skola24/txt/from/calendar-exceptions.js.map +1 -1
- package/dist/Skola24/txt/from/division.js.map +1 -1
- package/dist/Skola24/txt/from/index.js.map +1 -1
- package/dist/Skola24/txt/from/period.js +31 -34
- package/dist/Skola24/txt/from/period.js.map +1 -1
- package/dist/Skola24/txt/from/schedules.d.ts +9 -8
- package/dist/Skola24/txt/from/schedules.js +10 -12
- package/dist/Skola24/txt/from/schedules.js.map +1 -1
- package/dist/Skola24/txt/from/util.js.map +1 -1
- package/dist/Skola24/txt/index.d.ts +2 -1
- package/dist/Skola24/txt/to/index.d.ts +2 -1
- package/dist/Skola24/txt/to/schedules.js +5 -12
- package/dist/Skola24/txt/to/schedules.js.map +1 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/functions.js +46 -10
- package/dist/common/functions.js.map +1 -1
- package/dist/common/get-date.js.map +1 -1
- package/dist/common/make-chainable/index.js.map +1 -1
- package/dist/common/types.d.ts +3 -6
- package/dist/core/from/configurations.js.map +1 -1
- package/dist/core/from/courses.js.map +1 -1
- package/dist/core/from/events.js +1 -1
- package/dist/core/from/events.js.map +1 -1
- package/dist/core/from/exceptions.js.map +1 -1
- package/dist/core/from/groups.js.map +1 -1
- package/dist/core/from/index.js +9 -6
- package/dist/core/from/index.js.map +1 -1
- package/dist/core/from/locations.js.map +1 -1
- package/dist/core/from/locked-times.js.map +1 -1
- package/dist/core/from/overlap-groups.js.map +1 -1
- package/dist/core/from/periods.js.map +1 -1
- package/dist/core/from/persons.js.map +1 -1
- package/dist/core/from/root-intervals.js.map +1 -1
- package/dist/core/from/schedules.js.map +1 -1
- package/dist/core/from/syllabuses.js.map +1 -1
- package/dist/core/from/teachers.js.map +1 -1
- package/dist/core/index.d.ts +24 -1
- package/dist/core/index.js +4 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/interfaces/index.d.ts +23 -0
- package/dist/core/interfaces/index.js +6 -0
- package/dist/core/interfaces/other/companies.d.ts +132 -0
- package/dist/core/interfaces/other/companies.js +9 -0
- package/dist/core/interfaces/other/companies.js.map +1 -0
- package/dist/core/interfaces/other/etc.d.ts +19 -0
- package/dist/core/interfaces/other/index.d.ts +6 -0
- package/dist/core/interfaces/other/integrations.d.ts +17 -0
- package/dist/core/interfaces/other/operations.d.ts +36 -0
- package/dist/core/interfaces/other/policies.d.ts +31 -0
- package/dist/core/interfaces/other/sync-logs.d.ts +21 -0
- package/dist/core/interfaces/other/users.d.ts +35 -0
- package/dist/core/interfaces/vertices/companies.d.ts +8 -0
- package/dist/core/interfaces/vertices/configurations.d.ts +58 -0
- package/dist/core/interfaces/vertices/courses.d.ts +68 -0
- package/dist/core/{types → interfaces/vertices}/division-settings.d.ts +31 -29
- package/dist/core/interfaces/vertices/divisions.d.ts +31 -0
- package/dist/core/interfaces/vertices/events.d.ts +100 -0
- package/dist/core/interfaces/vertices/exceptions.d.ts +74 -0
- package/dist/core/interfaces/vertices/generations.d.ts +23 -0
- package/dist/core/interfaces/vertices/groups.d.ts +53 -0
- package/dist/core/interfaces/vertices/index.d.ts +209 -0
- package/dist/core/interfaces/vertices/index.js +3 -0
- package/dist/core/interfaces/vertices/locations.d.ts +22 -0
- package/dist/core/interfaces/vertices/locked-times.d.ts +37 -0
- package/dist/core/interfaces/vertices/overlap-groups.d.ts +17 -0
- package/dist/core/interfaces/vertices/periods.d.ts +15 -0
- package/dist/core/interfaces/vertices/persons.d.ts +32 -0
- package/dist/core/interfaces/vertices/properties/belongs-to.d.ts +11 -0
- package/dist/core/interfaces/vertices/properties/coalesced.d.ts +8 -0
- package/dist/core/interfaces/vertices/properties/days.d.ts +9 -0
- package/dist/core/interfaces/vertices/properties/index.d.ts +15 -0
- package/dist/core/interfaces/vertices/properties/intervals.d.ts +10 -0
- package/dist/core/{types/common → interfaces/vertices/properties}/maximum-schedule-span.d.ts +1 -1
- package/dist/core/interfaces/vertices/properties/min-break-length.d.ts +5 -0
- package/dist/core/{types/common/planned-schedule-duration.d.ts → interfaces/vertices/properties/planned-scheduled-duration.d.ts} +2 -2
- package/dist/core/interfaces/vertices/properties/species.d.ts +9 -0
- package/dist/core/interfaces/vertices/properties/tags.d.ts +9 -0
- package/dist/core/interfaces/vertices/properties/week.d.ts +22 -0
- package/dist/core/interfaces/vertices/properties/week.js +6 -0
- package/dist/core/interfaces/vertices/properties/week.js.map +1 -0
- package/dist/core/interfaces/vertices/root-intervals.d.ts +14 -0
- package/dist/core/interfaces/vertices/syllabuses.d.ts +18 -0
- package/dist/core/interfaces/vertices/teachers.d.ts +43 -0
- package/dist/core/interfaces/vertices/users.d.ts +8 -0
- package/dist/core/interfaces/vertices/util/common.d.ts +28 -0
- package/dist/core/interfaces/vertices/util/custom-vertex-export/index.d.ts +31 -0
- package/dist/core/interfaces/vertices/util/custom-vertex-export/util.d.ts +51 -0
- package/dist/core/interfaces/vertices/util/deep-vertex-export/index.d.ts +64 -0
- package/dist/core/interfaces/vertices/util/edges.d.ts +105 -0
- package/dist/core/interfaces/vertices/util/index.d.ts +5 -0
- package/dist/core/interfaces/vertices/util/keys-of.d.ts +27 -0
- package/dist/core/interfaces/vertices/util/serialized-vertex-export.d.ts +12 -0
- package/dist/core/interfaces/vertices/util/util.d.ts +76 -0
- package/dist/core/interfaces/vertices/util/vertex-query/index.d.ts +44 -0
- package/dist/core/interfaces/vertices/util/vertex-query/util.d.ts +13 -0
- package/dist/core/interfaces/vertices/util/vertex.d.ts +70 -0
- package/dist/core/interfaces/vertices/vertex-query.d.ts +102 -0
- package/dist/core/interfaces/vertices/vertex-query.js +94 -0
- package/dist/core/interfaces/vertices/vertex-query.js.map +1 -0
- package/dist/core/to/configurations.js +2 -3
- package/dist/core/to/configurations.js.map +1 -1
- package/dist/core/to/courses.js +2 -3
- package/dist/core/to/courses.js.map +1 -1
- package/dist/core/to/division.js.map +1 -1
- package/dist/core/to/events.js +2 -3
- package/dist/core/to/events.js.map +1 -1
- package/dist/core/to/exceptions.js +4 -4
- package/dist/core/to/exceptions.js.map +1 -1
- package/dist/core/to/groups.js +2 -3
- package/dist/core/to/groups.js.map +1 -1
- package/dist/core/to/locations.js +2 -3
- package/dist/core/to/locations.js.map +1 -1
- package/dist/core/to/locked-times.js +2 -3
- package/dist/core/to/locked-times.js.map +1 -1
- package/dist/core/to/overlap-groups.js +2 -3
- package/dist/core/to/overlap-groups.js.map +1 -1
- package/dist/core/to/periods.js +2 -3
- package/dist/core/to/periods.js.map +1 -1
- package/dist/core/to/persons.js +3 -9
- package/dist/core/to/persons.js.map +1 -1
- package/dist/core/to/root-intervals.js +2 -3
- package/dist/core/to/root-intervals.js.map +1 -1
- package/dist/core/to/schedules.d.ts +17 -18
- package/dist/core/to/schedules.js.map +1 -1
- package/dist/core/to/settings.js +2 -3
- package/dist/core/to/settings.js.map +1 -1
- package/dist/core/to/syllabuses.js +2 -3
- package/dist/core/to/syllabuses.js.map +1 -1
- package/dist/core/to/teachers.js +4 -4
- package/dist/core/to/teachers.js.map +1 -1
- package/dist/core/to/util.d.ts +4 -8
- package/dist/core/to/util.js +7 -5
- package/dist/core/to/util.js.map +1 -1
- package/dist/core/types/common/index.d.ts +4 -41
- package/dist/core/types/index.d.ts +108 -112
- package/dist/core/util.js +4 -5
- package/dist/core/util.js.map +1 -1
- package/dist/identify/constants/index.d.ts +1 -1
- package/dist/identify/constants/index.js.map +1 -1
- package/dist/identify/index.js +1 -2
- package/dist/identify/index.js.map +1 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +4 -1
- package/dist/sdui/from/classes.js.map +1 -1
- package/dist/sdui/from/courses.js.map +1 -1
- package/dist/sdui/from/holidays.js.map +1 -1
- package/dist/sdui/from/index.js.map +1 -1
- package/dist/sdui/from/lessons.js +4 -0
- package/dist/sdui/from/lessons.js.map +1 -1
- package/dist/sdui/from/rooms.js.map +1 -1
- package/dist/sdui/from/schedules.d.ts +10 -8
- package/dist/sdui/from/schedules.js.map +1 -1
- package/dist/sdui/from/school-years.js +0 -1
- package/dist/sdui/from/school-years.js.map +1 -1
- package/dist/sdui/from/substitution-plans.js.map +1 -1
- package/dist/sdui/from/teachers.js.map +1 -1
- package/dist/sdui/index.d.ts +1 -1
- package/dist/sdui/to/classes.js.map +1 -1
- package/dist/sdui/to/courses.js.map +1 -1
- package/dist/sdui/to/holidays.js.map +1 -1
- package/dist/sdui/to/hours.js.map +1 -1
- package/dist/sdui/to/index.d.ts +12 -10
- package/dist/sdui/to/lessons.js.map +1 -1
- package/dist/sdui/to/rooms.js.map +1 -1
- package/dist/sdui/to/schedules.js.map +1 -1
- package/dist/sdui/to/school-years.js.map +1 -1
- package/dist/sdui/to/substitution-plans.js +3 -6
- package/dist/sdui/to/substitution-plans.js.map +1 -1
- package/dist/sdui/to/teachers.js.map +1 -1
- package/dist/vKlass/from/index.js.map +1 -1
- package/dist/vKlass/from/schedule.d.ts +4 -3
- package/dist/vKlass/from/schedule.js +2 -2
- package/dist/vKlass/from/schedule.js.map +1 -1
- package/dist/vKlass/to/schedules.d.ts +4 -4
- package/dist/vKlass/to/schedules.js +6 -17
- package/dist/vKlass/to/schedules.js.map +1 -1
- package/package.json +24 -22
- package/dist/core/types/areas.d.ts +0 -10
- package/dist/core/types/common/break-lengths.d.ts +0 -5
- package/dist/core/types/common/days.d.ts +0 -8
- package/dist/core/types/common/intervals.d.ts +0 -20
- package/dist/core/types/common/tag.d.ts +0 -9
- package/dist/core/types/configurations.d.ts +0 -31
- package/dist/core/types/courses.d.ts +0 -60
- package/dist/core/types/divisions.d.ts +0 -24
- package/dist/core/types/events.d.ts +0 -56
- package/dist/core/types/exceptions.d.ts +0 -35
- package/dist/core/types/groups.d.ts +0 -44
- package/dist/core/types/locations.d.ts +0 -27
- package/dist/core/types/locked-times.d.ts +0 -33
- package/dist/core/types/overlap-groups.d.ts +0 -14
- package/dist/core/types/periods.d.ts +0 -14
- package/dist/core/types/persons.d.ts +0 -38
- package/dist/core/types/root-intervals.d.ts +0 -13
- package/dist/core/types/schedules.d.ts +0 -44
- package/dist/core/types/syllabus.d.ts +0 -18
- package/dist/core/types/teachers.d.ts +0 -44
- package/dist/core/vertex-mapping.d.ts +0 -69
package/dist/common/functions.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import moment from "moment";
|
|
2
|
+
import { Types } from "mongoose";
|
|
2
3
|
|
|
3
4
|
//#region src/common/functions.ts
|
|
4
5
|
function toISOString(date) {
|
|
@@ -8,18 +9,53 @@ function toISOString(date) {
|
|
|
8
9
|
return null;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
|
-
* Check if
|
|
12
|
+
* Check if value is a Mongoose ObjectId.
|
|
12
13
|
*/
|
|
13
|
-
function
|
|
14
|
-
return
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* True if at least one date range from each array overlap.
|
|
18
|
-
*/
|
|
19
|
-
function anyRangesOverlap(a, b) {
|
|
20
|
-
return a.some((a$1) => b.some((b$1) => rangesOverlap(a$1, b$1)));
|
|
14
|
+
function isMongooseObjectId(value) {
|
|
15
|
+
return value instanceof Types.ObjectId;
|
|
21
16
|
}
|
|
17
|
+
let range;
|
|
18
|
+
(function(_range) {
|
|
19
|
+
function create(start, end) {
|
|
20
|
+
return {
|
|
21
|
+
start: moment(start),
|
|
22
|
+
end: moment(end)
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
_range.create = create;
|
|
26
|
+
function clone(range$1) {
|
|
27
|
+
return {
|
|
28
|
+
start: range$1.start.clone(),
|
|
29
|
+
end: range$1.end.clone()
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
_range.clone = clone;
|
|
33
|
+
function contains(range$1, date) {
|
|
34
|
+
return !date.isBefore(range$1.start) && !date.isAfter(range$1.end);
|
|
35
|
+
}
|
|
36
|
+
_range.contains = contains;
|
|
37
|
+
function overlaps(a, b) {
|
|
38
|
+
if (Array.isArray(a) && Array.isArray(b)) return a.some((x) => b.some((y) => overlaps(x, y)));
|
|
39
|
+
if (!Array.isArray(a) && !Array.isArray(b)) return !(a.end.isBefore(b.start) || a.start.isAfter(b.end));
|
|
40
|
+
throw new Error("Invalid arguments for range.overlaps");
|
|
41
|
+
}
|
|
42
|
+
_range.overlaps = overlaps;
|
|
43
|
+
function isEqual(a, b) {
|
|
44
|
+
return a.start.isSame(b.start) && a.end.isSame(b.end);
|
|
45
|
+
}
|
|
46
|
+
_range.isEqual = isEqual;
|
|
47
|
+
function intersect(a, b) {
|
|
48
|
+
const start = moment.max(a.start, b.start);
|
|
49
|
+
const end = moment.min(a.end, b.end);
|
|
50
|
+
if (start.isAfter(end)) return null;
|
|
51
|
+
return {
|
|
52
|
+
start,
|
|
53
|
+
end
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
_range.intersect = intersect;
|
|
57
|
+
})(range || (range = {}));
|
|
22
58
|
|
|
23
59
|
//#endregion
|
|
24
|
-
export {
|
|
60
|
+
export { isMongooseObjectId, range, toISOString };
|
|
25
61
|
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","names":["
|
|
1
|
+
{"version":3,"file":"functions.js","names":["MongooseTypes","range"],"sources":["../../src/common/functions.ts"],"sourcesContent":["import moment from 'moment';\nimport type { DateType } from './types';\nimport { Types as MongooseTypes } from 'mongoose';\n\nexport function toISOString (\n date: DateType | null | undefined\n): string | null {\n if (typeof date === 'string') return date;\n if (date instanceof Date ) return date.toISOString();\n if (moment.isMoment(date) ) return date.toISOString();\n return null;\n}\n\n\n/**\n * Check if value is a Mongoose ObjectId.\n */\nexport function isMongooseObjectId (value: unknown): value is MongooseTypes.ObjectId {\n return value instanceof MongooseTypes.ObjectId;\n}\n\nexport type Range = {\n start: moment.Moment;\n end: moment.Moment;\n};\n\nexport namespace range {\n export type Type = Range;\n\n /**\n * Create a date range.\n */\n export function create (start: DateType, end: DateType): Range {\n return {\n start: moment(start),\n end: moment(end ),\n };\n }\n\n /**\n * Clone a date range.\n */\n export function clone (range: Range): Range {\n return {\n start: range.start.clone(),\n end: range.end .clone(),\n };\n }\n\n /**\n * Check if a date is contained within a date range.\n */\n export function contains (range: Range, date: moment.Moment) {\n return !date.isBefore(range.start) && !date.isAfter(range.end);\n }\n\n /**\n * Check if two date ranges overlap.\n */\n export function overlaps (a: Range, b: Range): boolean;\n /**\n * Checks if there is any overlap between two arrays of date ranges.\n */\n export function overlaps (a: Range[], b: Range[]): boolean;\n export function overlaps (a: Range | Range[], b: Range | Range[]) {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.some(x => b.some(y => overlaps(x, y)));\n }\n if (!Array.isArray(a) && !Array.isArray(b)) {\n return !(a.end.isBefore(b.start) || a.start.isAfter(b.end));\n }\n throw new Error('Invalid arguments for range.overlaps');\n }\n\n\n\n /**\n * Check if two date ranges are equal.\n */\n export function isEqual (a: Range, b: Range) {\n return a.start.isSame(b.start) && a.end.isSame(b.end);\n }\n\n /**\n * Get intersection of two ranges, or null if they do not overlap.\n */\n export function intersect (a: Range, b: Range): Range | null {\n const start = moment.max(a.start, b.start);\n const end = moment.min(a.end, b.end );\n if (start.isAfter(end)) return null;\n return { start, end };\n }\n}"],"mappings":";;;;AAIA,SAAgB,YACd,MACe;AACf,KAAI,OAAO,SAAS,SAAU,QAAO;AACrC,KAAI,gBAAgB,KAAU,QAAO,KAAK,aAAa;AACvD,KAAI,OAAO,SAAS,KAAK,CAAK,QAAO,KAAK,aAAa;AACvD,QAAO;;;;;AAOT,SAAgB,mBAAoB,OAAiD;AACnF,QAAO,iBAAiBA,MAAc;;;;CAc/B,SAAS,OAAQ,OAAiB,KAAsB;AAC7D,SAAO;GACL,OAAO,OAAO,MAAM;GACpB,KAAO,OAAO,IAAM;GACrB;;;CAMI,SAAS,MAAO,SAAqB;AAC1C,SAAO;GACL,OAAOC,QAAM,MAAM,OAAO;GAC1B,KAAOA,QAAM,IAAM,OAAO;GAC3B;;;CAMI,SAAS,SAAU,SAAc,MAAqB;AAC3D,SAAO,CAAC,KAAK,SAASA,QAAM,MAAM,IAAI,CAAC,KAAK,QAAQA,QAAM,IAAI;;;CAWzD,SAAS,SAAU,GAAoB,GAAoB;AAChE,MAAI,MAAM,QAAQ,EAAE,IAAI,MAAM,QAAQ,EAAE,CACtC,QAAO,EAAE,MAAK,MAAK,EAAE,MAAK,MAAK,SAAS,GAAG,EAAE,CAAC,CAAC;AAEjD,MAAI,CAAC,MAAM,QAAQ,EAAE,IAAI,CAAC,MAAM,QAAQ,EAAE,CACxC,QAAO,EAAE,EAAE,IAAI,SAAS,EAAE,MAAM,IAAI,EAAE,MAAM,QAAQ,EAAE,IAAI;AAE5D,QAAM,IAAI,MAAM,uCAAuC;;;CAQlD,SAAS,QAAS,GAAU,GAAU;AAC3C,SAAO,EAAE,MAAM,OAAO,EAAE,MAAM,IAAI,EAAE,IAAI,OAAO,EAAE,IAAI;;;CAMhD,SAAS,UAAW,GAAU,GAAwB;EAC3D,MAAM,QAAQ,OAAO,IAAI,EAAE,OAAO,EAAE,MAAM;EAC1C,MAAM,MAAQ,OAAO,IAAI,EAAE,KAAO,EAAE,IAAM;AAC1C,MAAI,MAAM,QAAQ,IAAI,CAAE,QAAO;AAC/B,SAAO;GAAE;GAAO;GAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-date.js","names":[],"sources":["../../src/common/get-date.ts"],"sourcesContent":["import type { Moment } from 'moment';\nimport type { CoreTypes } from '../core';\nimport { Constants } from './constants';\n\nexport default (day: number | CoreTypes.day, time: string): Moment => {\n if (day == null) throw new Error('Day is null or undefined');\n\n const _day = typeof day == 'number' ? day : day.day;\n const [hours, minutes] = time.split(':').map(x => parseInt(x));\n\n const date = Constants.FIRST_DAY.clone()\n .add(_day, 'day')\n .set('hour', hours)\n .set('minute', minutes);\n\n if (!date.isValid()) throw new Error(`Day ${ _day } and time ${ time } is not a valid date`);\n\n return date;\n};"],"mappings":";;;AAIA,wBAAgB,KAA6B,SAAyB;AACpE,KAAI,OAAO,KAAM,OAAM,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"get-date.js","names":[],"sources":["../../src/common/get-date.ts"],"sourcesContent":["import type { Moment } from 'moment';\nimport type { CoreTypes } from '../core';\nimport { Constants } from './constants';\n\nexport default (day: number | CoreTypes.day, time: string): Moment => {\n if (day == null) throw new Error('Day is null or undefined');\n\n const _day = typeof day == 'number' ? day : day.day;\n const [hours, minutes] = time.split(':').map(x => parseInt(x));\n\n const date = Constants.FIRST_DAY.clone()\n .add(_day, 'day')\n .set('hour', hours)\n .set('minute', minutes);\n\n if (!date.isValid()) throw new Error(`Day ${ _day } and time ${ time } is not a valid date`);\n\n return date;\n};"],"mappings":";;;AAIA,wBAAgB,KAA6B,SAAyB;AACpE,KAAI,OAAO,KAAM,OAAM,IAAI,MAAM,2BAA2B;CAE5D,MAAM,OAAO,OAAO,OAAO,WAAW,MAAM,IAAI;CAChD,MAAM,CAAC,OAAO,WAAW,KAAK,MAAM,IAAI,CAAC,KAAI,MAAK,SAAS,EAAE,CAAC;CAE9D,MAAM,OAAO,UAAU,UAAU,OAAO,CACrC,IAAI,MAAM,MAAM,CAChB,IAAI,QAAQ,MAAM,CAClB,IAAI,UAAU,QAAQ;AAEzB,KAAI,CAAC,KAAK,SAAS,CAAE,OAAM,IAAI,MAAM,OAAQ,KAAM,YAAa,KAAM,sBAAsB;AAE5F,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_value: T"],"sources":["../../../src/common/make-chainable/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-explicit-any */\ntype Fn<In, Out> = (x: In) => Out;\n\nclass Chainable<T> {\n constructor (private _value: T) {}\n\n get value () { return this._value }\n\n chain (): Chainable<T>;\n chain<A1>(fn1: Fn<T, A1>): Chainable<A1>;\n chain<A1, A2>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>): Chainable<A2>;\n chain<A1, A2, A3>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>): Chainable<A3>;\n chain<A1, A2, A3, A4>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>): Chainable<A4>;\n chain<A1, A2, A3, A4, A5>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>): Chainable<A5>;\n chain<A1, A2, A3, A4, A5, A6>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>): Chainable<A6>;\n chain<A1, A2, A3, A4, A5, A6, A7>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>): Chainable<A7>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>): Chainable<A8>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8, A9>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>, fn9: Fn<A8, A9>): Chainable<A9>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8, A9>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>, fn9: Fn<A8, A9>, ...fns: Fn<any, any>[]): Chainable<unknown>;\n chain (...fns: Fn<any, any>[]): Chainable<any> {\n if (fns.length === 0) return this;\n return new Chainable(fns.reduce((prev, fn) => fn(prev), this.value));\n }\n}\n\n/**\n * Wraps a value in a Chainable to build a strongly-typed function pipeline with .chain().\n * Each chained function is applied in order, and the final result is available via .value.\n *\n * @param x - The value to wrap.\n * @returns A Chainable<T> around the given value.\n *\n * @example\n * const result = makeChainable([1, 2, 3])\n * .chain(\n * xs => xs.map(x => x * 2)), // [2, 4, 6]\n * xs => xs.reduce((acc, x) => acc + x, 0) // 12\n * );\n *\n * console.log(result.value); // 12\n */\nexport function makeChainable<T> (x: T) { return new Chainable(x) }\n"],"mappings":";AAIA,IAAM,YAAN,MAAM,UAAa;CACjB,YAAa,AAAQA,QAAW;EAAX;;CAErB,IAAI,QAAS;AAAE,SAAO,KAAK;;CAa3B,MAAO,GAAG,KAAqC;AAC7C,MAAI,IAAI,WAAW,EAAG,QAAO;AAC7B,SAAO,IAAI,UAAU,IAAI,QAAQ,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_value: T"],"sources":["../../../src/common/make-chainable/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-explicit-any */\ntype Fn<In, Out> = (x: In) => Out;\n\nclass Chainable<T> {\n constructor (private _value: T) {}\n\n get value () { return this._value }\n\n chain (): Chainable<T>;\n chain<A1>(fn1: Fn<T, A1>): Chainable<A1>;\n chain<A1, A2>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>): Chainable<A2>;\n chain<A1, A2, A3>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>): Chainable<A3>;\n chain<A1, A2, A3, A4>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>): Chainable<A4>;\n chain<A1, A2, A3, A4, A5>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>): Chainable<A5>;\n chain<A1, A2, A3, A4, A5, A6>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>): Chainable<A6>;\n chain<A1, A2, A3, A4, A5, A6, A7>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>): Chainable<A7>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>): Chainable<A8>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8, A9>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>, fn9: Fn<A8, A9>): Chainable<A9>;\n chain<A1, A2, A3, A4, A5, A6, A7, A8, A9>(fn1: Fn<T, A1>, fn2: Fn<A1, A2>, fn3: Fn<A2, A3>, fn4: Fn<A3, A4>, fn5: Fn<A4, A5>, fn6: Fn<A5, A6>, fn7: Fn<A6, A7>, fn8: Fn<A7, A8>, fn9: Fn<A8, A9>, ...fns: Fn<any, any>[]): Chainable<unknown>;\n chain (...fns: Fn<any, any>[]): Chainable<any> {\n if (fns.length === 0) return this;\n return new Chainable(fns.reduce((prev, fn) => fn(prev), this.value));\n }\n}\n\n/**\n * Wraps a value in a Chainable to build a strongly-typed function pipeline with .chain().\n * Each chained function is applied in order, and the final result is available via .value.\n *\n * @param x - The value to wrap.\n * @returns A Chainable<T> around the given value.\n *\n * @example\n * const result = makeChainable([1, 2, 3])\n * .chain(\n * xs => xs.map(x => x * 2)), // [2, 4, 6]\n * xs => xs.reduce((acc, x) => acc + x, 0) // 12\n * );\n *\n * console.log(result.value); // 12\n */\nexport function makeChainable<T> (x: T) { return new Chainable(x) }\n"],"mappings":";AAIA,IAAM,YAAN,MAAM,UAAa;CACjB,YAAa,AAAQA,QAAW;EAAX;;CAErB,IAAI,QAAS;AAAE,SAAO,KAAK;;CAa3B,MAAO,GAAG,KAAqC;AAC7C,MAAI,IAAI,WAAW,EAAG,QAAO;AAC7B,SAAO,IAAI,UAAU,IAAI,QAAQ,MAAM,OAAO,GAAG,KAAK,EAAE,KAAK,MAAM,CAAC;;;;;;;;;;;;;;;;;;;AAoBxE,SAAgB,cAAkB,GAAM;AAAE,QAAO,IAAI,UAAU,EAAE"}
|
package/dist/common/types.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IdKey } from "../core/types/common/index.js";
|
|
2
|
+
import "../core/index.js";
|
|
2
3
|
import { Moment } from "moment";
|
|
3
4
|
|
|
4
5
|
//#region src/common/types.d.ts
|
|
5
|
-
|
|
6
|
+
|
|
6
7
|
/**
|
|
7
8
|
* T1 | T2 | ... => T1 & T2 & ...
|
|
8
9
|
*/
|
|
@@ -10,10 +11,6 @@ type Intersect<T> = (T extends any ? ((x: T) => 0) : never) extends ((x: infer R
|
|
|
10
11
|
type BaseOptions = {
|
|
11
12
|
idKey?: IdKey;
|
|
12
13
|
};
|
|
13
|
-
/**
|
|
14
|
-
* The interface required for the "from" mapping functions.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
14
|
//#endregion
|
|
18
|
-
export { BaseOptions,
|
|
15
|
+
export { BaseOptions, Intersect };
|
|
19
16
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurations.js","names":[],"sources":["../../../src/core/from/configurations.ts"],"sourcesContent":["import type transform from '../to/configurations';\n\nexport default (configurations: ReturnType<typeof transform>) => {\n if (configurations.length != new Set(configurations.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Configurations) Configuration array have two or more configurations with the same ID');\n\n return configurations\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Configurations) Configuration id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,mBAAiD;AAC/D,KAAI,eAAe,UAAU,IAAI,IAAI,eAAe,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"configurations.js","names":[],"sources":["../../../src/core/from/configurations.ts"],"sourcesContent":["import type transform from '../to/configurations';\n\nexport default (configurations: ReturnType<typeof transform>) => {\n if (configurations.length != new Set(configurations.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Configurations) Configuration array have two or more configurations with the same ID');\n\n return configurations\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Configurations) Configuration id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,mBAAiD;AAC/D,KAAI,eAAe,UAAU,IAAI,IAAI,eAAe,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAClE,OAAM,IAAI,MAAM,wGAAwG;AAE1H,QAAO,eACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,iEAAiE;AAEnF,SAAO,EAAE,GAAG,GAAG;GACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"courses.js","names":[],"sources":["../../../src/core/from/courses.ts"],"sourcesContent":["import type transform from '../to/courses';\n\nexport default (courses: ReturnType<typeof transform>) => {\n if (courses.length != new Set(courses.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Courses) Course array have two or more courses with the same ID');\n\n return courses\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Courses) Course id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"courses.js","names":[],"sources":["../../../src/core/from/courses.ts"],"sourcesContent":["import type transform from '../to/courses';\n\nexport default (courses: ReturnType<typeof transform>) => {\n if (courses.length != new Set(courses.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Courses) Course array have two or more courses with the same ID');\n\n return courses\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Courses) Course id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KACpD,OAAM,IAAI,MAAM,mFAAmF;AAErG,QAAO,QACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,mDAAmD;AAErE,SAAO,EAAE,GAAG,GAAG;GACf"}
|
package/dist/core/from/events.js
CHANGED
|
@@ -3,7 +3,7 @@ var events_default = (events) => {
|
|
|
3
3
|
if (events.length != new Set(events.map((x) => x.id)).size) throw new Error("(Core::From::V2::Events) Events array have two or more events with the same ID");
|
|
4
4
|
return events.map((x) => {
|
|
5
5
|
if (!x.id) throw new Error("(Core::From::V2::Events) Event id is undefined");
|
|
6
|
-
x.preferredDuration ??= x.duration;
|
|
6
|
+
if (x.duration) x.preferredDuration ??= x.duration;
|
|
7
7
|
return { ...x };
|
|
8
8
|
});
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","names":[],"sources":["../../../src/core/from/events.ts"],"sourcesContent":["import type transform from '../to/events';\n\nexport default (events: ReturnType<typeof transform>) => {\n if (events.length != new Set(events.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Events) Events array have two or more events with the same ID');\n\n return events\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Events) Event id is undefined');\n\n // backwards compatibility for file upload: use duration if preferredDuration does not exist\n x.preferredDuration ??= x.duration;\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,sBAAgB,WAAyC;AACvD,KAAI,OAAO,UAAU,IAAI,IAAI,OAAO,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"events.js","names":[],"sources":["../../../src/core/from/events.ts"],"sourcesContent":["import type transform from '../to/events';\n\nexport default (events: ReturnType<typeof transform>) => {\n if (events.length != new Set(events.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Events) Events array have two or more events with the same ID');\n\n return events\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Events) Event id is undefined');\n\n // backwards compatibility for file upload: use duration if preferredDuration does not exist\n if (x.duration) x.preferredDuration ??= x.duration;\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,sBAAgB,WAAyC;AACvD,KAAI,OAAO,UAAU,IAAI,IAAI,OAAO,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAClD,OAAM,IAAI,MAAM,iFAAiF;AAEnG,QAAO,OACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,iDAAiD;AAGnE,MAAI,EAAE,SAAU,GAAE,sBAAsB,EAAE;AAE1C,SAAO,EAAE,GAAG,GAAG;GACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exceptions.js","names":[],"sources":["../../../src/core/from/exceptions.ts"],"sourcesContent":["import type transform from '../to/exceptions';\n\nexport default (exceptions: ReturnType<typeof transform>) => {\n if (exceptions.length != new Set(exceptions.map(x => x.id)).size)\n throw new Error('(Core::From::V2::exceptions) exceptions array have two or more exceptions with the same ID');\n\n return exceptions\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::exceptions) Calendar exceptions id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,0BAAgB,eAA6C;AAC3D,KAAI,WAAW,UAAU,IAAI,IAAI,WAAW,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"exceptions.js","names":[],"sources":["../../../src/core/from/exceptions.ts"],"sourcesContent":["import type transform from '../to/exceptions';\n\nexport default (exceptions: ReturnType<typeof transform>) => {\n if (exceptions.length != new Set(exceptions.map(x => x.id)).size)\n throw new Error('(Core::From::V2::exceptions) exceptions array have two or more exceptions with the same ID');\n\n return exceptions\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::exceptions) Calendar exceptions id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,0BAAgB,eAA6C;AAC3D,KAAI,WAAW,UAAU,IAAI,IAAI,WAAW,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAC1D,OAAM,IAAI,MAAM,6FAA6F;AAE/G,QAAO,WACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,mEAAmE;AAErF,SAAO,EAAE,GAAG,GAAG;GACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups.js","names":[],"sources":["../../../src/core/from/groups.ts"],"sourcesContent":["import type transform from '../to/groups';\n\nexport default (groups: ReturnType<typeof transform>) => {\n if (groups.length != new Set(groups.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Groups) Groups array have two or more groups with the same ID');\n\n return groups\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Groups) Group id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,sBAAgB,WAAyC;AACvD,KAAI,OAAO,UAAU,IAAI,IAAI,OAAO,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"groups.js","names":[],"sources":["../../../src/core/from/groups.ts"],"sourcesContent":["import type transform from '../to/groups';\n\nexport default (groups: ReturnType<typeof transform>) => {\n if (groups.length != new Set(groups.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Groups) Groups array have two or more groups with the same ID');\n\n return groups\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Groups) Group id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,sBAAgB,WAAyC;AACvD,KAAI,OAAO,UAAU,IAAI,IAAI,OAAO,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAClD,OAAM,IAAI,MAAM,iFAAiF;AAEnG,QAAO,OACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,iDAAiD;AAEnE,SAAO,EAAE,GAAG,GAAG;GACf"}
|
package/dist/core/from/index.js
CHANGED
|
@@ -2,13 +2,16 @@ import schedules_default from "./schedules.js";
|
|
|
2
2
|
|
|
3
3
|
//#region src/core/from/index.ts
|
|
4
4
|
function division(data) {
|
|
5
|
-
|
|
6
|
-
if (!data || typeof data !== "object" || !("division" in data) || !data.division || typeof data.division !== "object") return division$1;
|
|
5
|
+
if (!data || typeof data !== "object" || !("division" in data) || !data.division || typeof data.division !== "object") return;
|
|
7
6
|
const d = data.division;
|
|
8
|
-
if ("displayName" in d && typeof d.displayName == "string")
|
|
9
|
-
if ("start" in d && typeof d.start == "string")
|
|
10
|
-
if ("end" in d && typeof d.end == "string")
|
|
11
|
-
return
|
|
7
|
+
if (!("displayName" in d && typeof d.displayName == "string")) return;
|
|
8
|
+
if (!("start" in d && typeof d.start == "string")) return;
|
|
9
|
+
if (!("end" in d && typeof d.end == "string")) return;
|
|
10
|
+
return {
|
|
11
|
+
displayName: d.displayName,
|
|
12
|
+
start: d.start,
|
|
13
|
+
end: d.end
|
|
14
|
+
};
|
|
12
15
|
}
|
|
13
16
|
var from_default = {
|
|
14
17
|
division,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_schedules"],"sources":["../../../src/core/from/index.ts"],"sourcesContent":["import type { FromInterface } from '../../common/types';\nimport type { Types } from '../types';\nimport _schedules from './schedules';\n\n\nfunction division (data: unknown): Pick<Types.Serialized.Division, 'displayName' | 'start' | 'end'> | undefined {\n\n if ( !data || typeof data !== 'object'\n || !('division' in data) || !data.division || typeof data.division !== 'object'\n ) return;\n\n const d = data.division;\n if (!('displayName' in d && typeof d.displayName == 'string')) return;\n if (!('start' in d && typeof d.start == 'string')) return;\n if (!('end' in d && typeof d.end == 'string')) return;\n\n return {\n displayName: d.displayName,\n start: d.start,\n end: d.end\n };\n}\n\nexport default {\n division: division,\n schedules: _schedules\n} satisfies FromInterface;"],"mappings":";;;AAKA,SAAS,SAAU,MAA6F;AAE9G,KAA8B,CAAC,QAAiB,OAAO,SAAkB,YACpE,EAAE,cAAc,SAAS,CAAC,KAAK,YAAY,OAAO,KAAK,aAAa,SACvE;CAEF,MAAM,IAAI,KAAK;AACf,KAAI,EAAE,iBAAiB,KAAK,OAAO,EAAE,eAAe,UAAW;AAC/D,KAAI,EAAE,WAAiB,KAAK,OAAO,EAAE,SAAe,UAAW;AAC/D,KAAI,EAAE,SAAiB,KAAK,OAAO,EAAE,OAAe,UAAW;AAE/D,QAAO;EACL,aAAa,EAAE;EACf,OAAa,EAAE;EACf,KAAa,EAAE;EAChB;;AAGH,mBAAe;CACF;CACX,WAAWA;CACZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locations.js","names":[],"sources":["../../../src/core/from/locations.ts"],"sourcesContent":["import type transform from '../to/locations';\n\nexport default (locations: ReturnType<typeof transform>) => {\n if (locations.length != new Set(locations.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Locations) Location array have two or more locations with the same ID');\n\n return locations\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Locations) Location id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,yBAAgB,cAA4C;AAC1D,KAAI,UAAU,UAAU,IAAI,IAAI,UAAU,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"locations.js","names":[],"sources":["../../../src/core/from/locations.ts"],"sourcesContent":["import type transform from '../to/locations';\n\nexport default (locations: ReturnType<typeof transform>) => {\n if (locations.length != new Set(locations.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Locations) Location array have two or more locations with the same ID');\n\n return locations\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Locations) Location id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,yBAAgB,cAA4C;AAC1D,KAAI,UAAU,UAAU,IAAI,IAAI,UAAU,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KACxD,OAAM,IAAI,MAAM,yFAAyF;AAE3G,QAAO,UACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,uDAAuD;AAEzE,SAAO,EAAE,GAAG,GAAG;GACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locked-times.js","names":[],"sources":["../../../src/core/from/locked-times.ts"],"sourcesContent":["import type transform from '../to/locked-times';\n\nexport default (LockedTimes: ReturnType<typeof transform>) => {\n if (LockedTimes.length != new Set(LockedTimes.map(x => x.id)).size)\n throw new Error('(Core::From::V2::LockedTimes) LockedTimes array have two or more LockedTimes with the same ID');\n\n return LockedTimes\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::LockedTimes) Locked time id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,4BAAgB,gBAA8C;AAC5D,KAAI,YAAY,UAAU,IAAI,IAAI,YAAY,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"locked-times.js","names":[],"sources":["../../../src/core/from/locked-times.ts"],"sourcesContent":["import type transform from '../to/locked-times';\n\nexport default (LockedTimes: ReturnType<typeof transform>) => {\n if (LockedTimes.length != new Set(LockedTimes.map(x => x.id)).size)\n throw new Error('(Core::From::V2::LockedTimes) LockedTimes array have two or more LockedTimes with the same ID');\n\n return LockedTimes\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::LockedTimes) Locked time id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,4BAAgB,gBAA8C;AAC5D,KAAI,YAAY,UAAU,IAAI,IAAI,YAAY,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAC5D,OAAM,IAAI,MAAM,gGAAgG;AAElH,QAAO,YACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,4DAA4D;AAE9E,SAAO,EAAE,GAAG,GAAG;GACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlap-groups.js","names":[],"sources":["../../../src/core/from/overlap-groups.ts"],"sourcesContent":["import type transform from '../to/overlap-groups';\n\nexport default (overlapGroups: ReturnType<typeof transform>) => {\n if (overlapGroups.length != new Set(overlapGroups.map(x => x.id)).size)\n throw new Error('(Core::From::V2::OverlapGroup) overlapGroups array have two or more overlapGroups with the same ID');\n\n return overlapGroups\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::OverlapGroup) Overlap group id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,kBAAgD;AAC9D,KAAI,cAAc,UAAU,IAAI,IAAI,cAAc,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"overlap-groups.js","names":[],"sources":["../../../src/core/from/overlap-groups.ts"],"sourcesContent":["import type transform from '../to/overlap-groups';\n\nexport default (overlapGroups: ReturnType<typeof transform>) => {\n if (overlapGroups.length != new Set(overlapGroups.map(x => x.id)).size)\n throw new Error('(Core::From::V2::OverlapGroup) overlapGroups array have two or more overlapGroups with the same ID');\n\n return overlapGroups\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::OverlapGroup) Overlap group id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,kBAAgD;AAC9D,KAAI,cAAc,UAAU,IAAI,IAAI,cAAc,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAChE,OAAM,IAAI,MAAM,qGAAqG;AAEvH,QAAO,cACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,+DAA+D;AAEjF,SAAO,EAAE,GAAG,GAAG;GACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"periods.js","names":[],"sources":["../../../src/core/from/periods.ts"],"sourcesContent":["import type transform from '../to/periods';\n\nexport default (periods: ReturnType<typeof transform>) => {\n if (periods.length != new Set(periods.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Periods) Periods array have two or more periods with the same ID');\n\n return periods\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Periods) Period id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"periods.js","names":[],"sources":["../../../src/core/from/periods.ts"],"sourcesContent":["import type transform from '../to/periods';\n\nexport default (periods: ReturnType<typeof transform>) => {\n if (periods.length != new Set(periods.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Periods) Periods array have two or more periods with the same ID');\n\n return periods\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Periods) Period id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KACpD,OAAM,IAAI,MAAM,oFAAoF;AAEtG,QAAO,QACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,mDAAmD;AAErE,SAAO,EAAE,GAAG,GAAG;GACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persons.js","names":[],"sources":["../../../src/core/from/persons.ts"],"sourcesContent":["import type transform from '../to/persons';\n\nexport default (persons: ReturnType<typeof transform>) => {\n if (persons.length != new Set(persons.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Persons) Persons array have two or more persons with the same ID');\n\n return persons\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Persons) Person id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"persons.js","names":[],"sources":["../../../src/core/from/persons.ts"],"sourcesContent":["import type transform from '../to/persons';\n\nexport default (persons: ReturnType<typeof transform>) => {\n if (persons.length != new Set(persons.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Persons) Persons array have two or more persons with the same ID');\n\n return persons\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Persons) Person id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,uBAAgB,YAA0C;AACxD,KAAI,QAAQ,UAAU,IAAI,IAAI,QAAQ,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KACpD,OAAM,IAAI,MAAM,oFAAoF;AAEtG,QAAO,QACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,mDAAmD;AAErE,SAAO,EAAE,GAAG,GAAG;GACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-intervals.js","names":[],"sources":["../../../src/core/from/root-intervals.ts"],"sourcesContent":["import type transform from '../to/root-intervals';\n\nexport default (rootIntervals: ReturnType<typeof transform>) => {\n if (rootIntervals.length != new Set(rootIntervals.map(x => x.id)).size)\n throw new Error('(Core::From::V2::RootIntervals) RootInterval array have two or more root intervals with the same ID');\n\n return rootIntervals\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::RootIntervals) RootInterval id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,kBAAgD;AAC9D,KAAI,cAAc,UAAU,IAAI,IAAI,cAAc,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"root-intervals.js","names":[],"sources":["../../../src/core/from/root-intervals.ts"],"sourcesContent":["import type transform from '../to/root-intervals';\n\nexport default (rootIntervals: ReturnType<typeof transform>) => {\n if (rootIntervals.length != new Set(rootIntervals.map(x => x.id)).size)\n throw new Error('(Core::From::V2::RootIntervals) RootInterval array have two or more root intervals with the same ID');\n\n return rootIntervals\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::RootIntervals) RootInterval id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,8BAAgB,kBAAgD;AAC9D,KAAI,cAAc,UAAU,IAAI,IAAI,cAAc,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KAChE,OAAM,IAAI,MAAM,sGAAsG;AAExH,QAAO,cACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,+DAA+D;AAEjF,SAAO,EAAE,GAAG,GAAG;GACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedules.js","names":["_periods","_groups","_teachers","_persons","_locations","_courses","_events","_overlapGroups","_lockedTimes","_rootIntervals","_exceptions","_syllabuses","_configurations"],"sources":["../../../src/core/from/schedules.ts"],"sourcesContent":["import _exceptions from './exceptions';\nimport _periods from './periods';\nimport _locations from './locations';\nimport _teachers from './teachers';\nimport _groups from './groups';\nimport _persons from './persons';\nimport _courses from './courses';\nimport _overlapGroups from './overlap-groups';\nimport _lockedTimes from './locked-times';\nimport _rootIntervals from './root-intervals';\nimport _events from './events';\nimport _syllabuses from './syllabuses';\nimport _configurations from './configurations';\nimport type transform from '../to/schedules';\n\nexport default function (schedule: ReturnType<typeof transform>): Omit<ReturnType<typeof transform>, 'meta'> {\n return {\n ...schedule.settings && { settings: schedule.settings },\n ...schedule.periods && { periods: _periods (schedule.periods ) },\n ...schedule.groups && { groups: _groups (schedule.groups ) },\n ...schedule.teachers && { teachers: _teachers (schedule.teachers ) },\n ...schedule.persons && { persons: _persons (schedule.persons ) },\n ...schedule.locations && { locations: _locations (schedule.locations ) },\n ...schedule.courses && { courses: _courses (schedule.courses ) },\n ...schedule.events && { events: _events (schedule.events ) },\n ...schedule.overlapGroups && { overlapGroups: _overlapGroups (schedule.overlapGroups ) },\n ...schedule.lockedTimes && { lockedTimes: _lockedTimes (schedule.lockedTimes ) },\n ...schedule.rootIntervals && { rootIntervals: _rootIntervals (schedule.rootIntervals ) },\n ...schedule.exceptions && { exceptions: _exceptions (schedule.exceptions ) },\n ...schedule.syllabuses && { syllabuses: _syllabuses (schedule.syllabuses ) },\n ...schedule.configurations && { configurations: _configurations(schedule.configurations) }\n };\n}"],"mappings":";;;;;;;;;;;;;;;AAeA,2BAAyB,UAAoF;AAC3G,QAAO;EACL,GAAG,SAAS,YAAkB,EAAE,UAA+B,SAAS;
|
|
1
|
+
{"version":3,"file":"schedules.js","names":["_periods","_groups","_teachers","_persons","_locations","_courses","_events","_overlapGroups","_lockedTimes","_rootIntervals","_exceptions","_syllabuses","_configurations"],"sources":["../../../src/core/from/schedules.ts"],"sourcesContent":["import _exceptions from './exceptions';\nimport _periods from './periods';\nimport _locations from './locations';\nimport _teachers from './teachers';\nimport _groups from './groups';\nimport _persons from './persons';\nimport _courses from './courses';\nimport _overlapGroups from './overlap-groups';\nimport _lockedTimes from './locked-times';\nimport _rootIntervals from './root-intervals';\nimport _events from './events';\nimport _syllabuses from './syllabuses';\nimport _configurations from './configurations';\nimport type transform from '../to/schedules';\n\nexport default function (schedule: ReturnType<typeof transform>): Omit<ReturnType<typeof transform>, 'meta'> {\n return {\n ...schedule.settings && { settings: schedule.settings },\n ...schedule.periods && { periods: _periods (schedule.periods ) },\n ...schedule.groups && { groups: _groups (schedule.groups ) },\n ...schedule.teachers && { teachers: _teachers (schedule.teachers ) },\n ...schedule.persons && { persons: _persons (schedule.persons ) },\n ...schedule.locations && { locations: _locations (schedule.locations ) },\n ...schedule.courses && { courses: _courses (schedule.courses ) },\n ...schedule.events && { events: _events (schedule.events ) },\n ...schedule.overlapGroups && { overlapGroups: _overlapGroups (schedule.overlapGroups ) },\n ...schedule.lockedTimes && { lockedTimes: _lockedTimes (schedule.lockedTimes ) },\n ...schedule.rootIntervals && { rootIntervals: _rootIntervals (schedule.rootIntervals ) },\n ...schedule.exceptions && { exceptions: _exceptions (schedule.exceptions ) },\n ...schedule.syllabuses && { syllabuses: _syllabuses (schedule.syllabuses ) },\n ...schedule.configurations && { configurations: _configurations(schedule.configurations) }\n };\n}"],"mappings":";;;;;;;;;;;;;;;AAeA,2BAAyB,UAAoF;AAC3G,QAAO;EACL,GAAG,SAAS,YAAkB,EAAE,UAA+B,SAAS,UAAkB;EAC1F,GAAG,SAAS,WAAkB,EAAE,SAAgBA,gBAAgB,SAAS,QAAe,EAAE;EAC1F,GAAG,SAAS,UAAkB,EAAE,QAAgBC,eAAgB,SAAS,OAAe,EAAE;EAC1F,GAAG,SAAS,YAAkB,EAAE,UAAgBC,iBAAgB,SAAS,SAAe,EAAE;EAC1F,GAAG,SAAS,WAAkB,EAAE,SAAgBC,gBAAgB,SAAS,QAAe,EAAE;EAC1F,GAAG,SAAS,aAAkB,EAAE,WAAgBC,kBAAgB,SAAS,UAAe,EAAE;EAC1F,GAAG,SAAS,WAAkB,EAAE,SAAgBC,gBAAgB,SAAS,QAAe,EAAE;EAC1F,GAAG,SAAS,UAAkB,EAAE,QAAgBC,eAAgB,SAAS,OAAe,EAAE;EAC1F,GAAG,SAAS,iBAAkB,EAAE,eAAgBC,uBAAgB,SAAS,cAAe,EAAE;EAC1F,GAAG,SAAS,eAAkB,EAAE,aAAgBC,qBAAgB,SAAS,YAAe,EAAE;EAC1F,GAAG,SAAS,iBAAkB,EAAE,eAAgBC,uBAAgB,SAAS,cAAe,EAAE;EAC1F,GAAG,SAAS,cAAkB,EAAE,YAAgBC,mBAAgB,SAAS,WAAe,EAAE;EAC1F,GAAG,SAAS,cAAkB,EAAE,YAAgBC,mBAAgB,SAAS,WAAe,EAAE;EAC1F,GAAG,SAAS,kBAAkB,EAAE,gBAAgBC,uBAAgB,SAAS,eAAe,EAAE;EAC3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syllabuses.js","names":[],"sources":["../../../src/core/from/syllabuses.ts"],"sourcesContent":["import type transform from '../to/syllabuses';\n\nexport default (syllabuses: ReturnType<typeof transform>) => {\n syllabuses = syllabuses.filter(({ id }) => id != undefined);\n\n if (syllabuses.length != Array.from(new Set(syllabuses.map(({ id }) => id))).length)\n throw new Error('(Core::From::V2::Syllabuses) Syllabuses array have two or more syllabuses with the same ID');\n\n return syllabuses.map(syllabus => {\n if (!syllabus.id)\n throw new Error('(Core::From::V2::Syllabuses) Syllabus id is undefined');\n\n return { ...syllabus };\n }, []) satisfies ReturnType<typeof transform>;\n};"],"mappings":";AAEA,0BAAgB,eAA6C;AAC3D,cAAa,WAAW,QAAQ,EAAE,SAAS,MAAM;
|
|
1
|
+
{"version":3,"file":"syllabuses.js","names":[],"sources":["../../../src/core/from/syllabuses.ts"],"sourcesContent":["import type transform from '../to/syllabuses';\n\nexport default (syllabuses: ReturnType<typeof transform>) => {\n syllabuses = syllabuses.filter(({ id }) => id != undefined);\n\n if (syllabuses.length != Array.from(new Set(syllabuses.map(({ id }) => id))).length)\n throw new Error('(Core::From::V2::Syllabuses) Syllabuses array have two or more syllabuses with the same ID');\n\n return syllabuses.map(syllabus => {\n if (!syllabus.id)\n throw new Error('(Core::From::V2::Syllabuses) Syllabus id is undefined');\n\n return { ...syllabus };\n }, []) satisfies ReturnType<typeof transform>;\n};"],"mappings":";AAEA,0BAAgB,eAA6C;AAC3D,cAAa,WAAW,QAAQ,EAAE,SAAS,MAAM,OAAU;AAE3D,KAAI,WAAW,UAAU,MAAM,KAAK,IAAI,IAAI,WAAW,KAAK,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC,OAC3E,OAAM,IAAI,MAAM,6FAA6F;AAE/G,QAAO,WAAW,KAAI,aAAY;AAChC,MAAI,CAAC,SAAS,GACZ,OAAM,IAAI,MAAM,wDAAwD;AAE1E,SAAO,EAAE,GAAG,UAAU;IACrB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teachers.js","names":[],"sources":["../../../src/core/from/teachers.ts"],"sourcesContent":["import type transform from '../to/teachers';\n\nexport default (teachers: ReturnType<typeof transform>) => {\n if (teachers.length != new Set(teachers.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Teachers) Teachers array have two or more teachers with the same ID');\n\n return teachers\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Teachers) Teacher id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,wBAAgB,aAA2C;AACzD,KAAI,SAAS,UAAU,IAAI,IAAI,SAAS,KAAI,MAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"teachers.js","names":[],"sources":["../../../src/core/from/teachers.ts"],"sourcesContent":["import type transform from '../to/teachers';\n\nexport default (teachers: ReturnType<typeof transform>) => {\n if (teachers.length != new Set(teachers.map(x => x.id)).size)\n throw new Error('(Core::From::V2::Teachers) Teachers array have two or more teachers with the same ID');\n\n return teachers\n .map(x => {\n if (!x.id)\n throw new Error('(Core::From::V2::Teachers) Teacher id is undefined');\n\n return { ...x };\n });\n};\n"],"mappings":";AAEA,wBAAgB,aAA2C;AACzD,KAAI,SAAS,UAAU,IAAI,IAAI,SAAS,KAAI,MAAK,EAAE,GAAG,CAAC,CAAC,KACtD,OAAM,IAAI,MAAM,uFAAuF;AAEzG,QAAO,SACJ,KAAI,MAAK;AACR,MAAI,CAAC,EAAE,GACL,OAAM,IAAI,MAAM,qDAAqD;AAEvE,SAAO,EAAE,GAAG,GAAG;GACf"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
import { export_default as export_default$1 } from "./from/schedules.js";
|
|
2
2
|
import { export_default } from "./to/index.js";
|
|
3
|
+
import { Coalesced } from "./interfaces/vertices/properties/coalesced.js";
|
|
4
|
+
import { Species } from "./interfaces/vertices/properties/species.js";
|
|
5
|
+
import { AllWeeks, Week, allWeeks } from "./interfaces/vertices/properties/week.js";
|
|
6
|
+
import { Day } from "./interfaces/vertices/properties/days.js";
|
|
7
|
+
import { Interval } from "./interfaces/vertices/properties/intervals.js";
|
|
8
|
+
import { Tag, TagType } from "./interfaces/vertices/properties/tags.js";
|
|
9
|
+
import { MaximumScheduleSpan } from "./interfaces/vertices/properties/maximum-schedule-span.js";
|
|
10
|
+
import { PlannedScheduledDuration } from "./interfaces/vertices/properties/planned-scheduled-duration.js";
|
|
11
|
+
import { MinBreakLength } from "./interfaces/vertices/properties/min-break-length.js";
|
|
12
|
+
import { PublicId } from "./interfaces/vertices/properties/index.js";
|
|
13
|
+
import { CalendarException } from "./interfaces/vertices/division-settings.js";
|
|
14
|
+
import { Address, AutoSyncConfig, Company, GlobalDefaultValues, INACTIVITY_ACTIONS, InactivityAction, InactivitySettings, PublicConfig, TimeRosterSection } from "./interfaces/other/companies.js";
|
|
15
|
+
import { Integration } from "./interfaces/other/integrations.js";
|
|
16
|
+
import { User } from "./interfaces/other/users.js";
|
|
17
|
+
import { Action, Policy, Statement } from "./interfaces/other/policies.js";
|
|
18
|
+
import { Operation, OperationType, operationType } from "./interfaces/other/operations.js";
|
|
19
|
+
import { ErrorCode, SyncLog } from "./interfaces/other/sync-logs.js";
|
|
20
|
+
import { StepGuideProgress } from "./interfaces/vertices/divisions.js";
|
|
21
|
+
import { CalendarExceptionAction, ExceptionStatus } from "./interfaces/vertices/exceptions.js";
|
|
22
|
+
import { LockedTimeType } from "./interfaces/vertices/locked-times.js";
|
|
23
|
+
import { Infer, VertexQuery, createVertexQuery } from "./interfaces/vertices/vertex-query.js";
|
|
24
|
+
import { Deep, DeepWithoutPrivateId, Mixed, MixedWithOptionalId, Serialized, SerializedWithOptionalId } from "./interfaces/vertices/index.js";
|
|
25
|
+
import "./interfaces/index.js";
|
|
3
26
|
import { Types } from "./types/index.js";
|
|
4
27
|
|
|
5
28
|
//#region src/core/index.d.ts
|
|
6
29
|
declare class CoreMap {
|
|
7
30
|
static to: typeof export_default;
|
|
8
31
|
static from: {
|
|
9
|
-
division: (data: unknown) => Pick<Types.
|
|
32
|
+
division: (data: unknown) => Pick<Types.Serialized.Division, "displayName" | "start" | "end"> | undefined;
|
|
10
33
|
schedules: typeof export_default$1;
|
|
11
34
|
};
|
|
12
35
|
}
|
package/dist/core/index.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import from_default from "./from/index.js";
|
|
2
2
|
import to_default from "./to/index.js";
|
|
3
|
+
import { createVertexQuery } from "./interfaces/vertices/vertex-query.js";
|
|
4
|
+
import { allWeeks } from "./interfaces/vertices/properties/week.js";
|
|
5
|
+
import { INACTIVITY_ACTIONS } from "./interfaces/other/companies.js";
|
|
6
|
+
import "./interfaces/index.js";
|
|
3
7
|
|
|
4
8
|
//#region src/core/index.ts
|
|
5
9
|
var CoreMap = class {
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_to","_from"],"sources":["../../src/core/index.ts"],"sourcesContent":["import _from from './from';\nimport _to from './to';\nimport type { Types } from './types';\n\nexport class CoreMap {\n static to = _to;\n static from = _from;\n}\n\nexport { Types as CoreTypes };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_to","_from"],"sources":["../../src/core/index.ts"],"sourcesContent":["import _from from './from';\nimport _to from './to';\nimport type { Types } from './types';\n\nexport class CoreMap {\n static to = _to;\n static from = _from;\n}\n\nexport { Types as CoreTypes };\n\nexport * from './interfaces';"],"mappings":";;;;;;;;AAIA,IAAa,UAAb,MAAqB;CACnB,OAAO,KAAOA;CACd,OAAO,OAAOC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Coalesced } from "./vertices/properties/coalesced.js";
|
|
2
|
+
import { Species } from "./vertices/properties/species.js";
|
|
3
|
+
import { AllWeeks, Week, allWeeks } from "./vertices/properties/week.js";
|
|
4
|
+
import { Day } from "./vertices/properties/days.js";
|
|
5
|
+
import { Interval } from "./vertices/properties/intervals.js";
|
|
6
|
+
import { Tag, TagType } from "./vertices/properties/tags.js";
|
|
7
|
+
import { MaximumScheduleSpan } from "./vertices/properties/maximum-schedule-span.js";
|
|
8
|
+
import { PlannedScheduledDuration } from "./vertices/properties/planned-scheduled-duration.js";
|
|
9
|
+
import { MinBreakLength } from "./vertices/properties/min-break-length.js";
|
|
10
|
+
import { PublicId } from "./vertices/properties/index.js";
|
|
11
|
+
import { CalendarException } from "./vertices/division-settings.js";
|
|
12
|
+
import { Address, AutoSyncConfig, Company, GlobalDefaultValues, INACTIVITY_ACTIONS, InactivityAction, InactivitySettings, PublicConfig, TimeRosterSection } from "./other/companies.js";
|
|
13
|
+
import { Integration } from "./other/integrations.js";
|
|
14
|
+
import { User } from "./other/users.js";
|
|
15
|
+
import { Action, Policy, Statement } from "./other/policies.js";
|
|
16
|
+
import { Operation, OperationType, operationType } from "./other/operations.js";
|
|
17
|
+
import { ErrorCode, SyncLog } from "./other/sync-logs.js";
|
|
18
|
+
import "./other/index.js";
|
|
19
|
+
import { StepGuideProgress } from "./vertices/divisions.js";
|
|
20
|
+
import { CalendarExceptionAction, ExceptionStatus } from "./vertices/exceptions.js";
|
|
21
|
+
import { LockedTimeType } from "./vertices/locked-times.js";
|
|
22
|
+
import { Infer, VertexQuery, createVertexQuery } from "./vertices/vertex-query.js";
|
|
23
|
+
import { Deep, DeepWithoutPrivateId, Mixed, MixedWithOptionalId, Serialized, SerializedWithOptionalId } from "./vertices/index.js";
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { IntegrationTypes, OrganizationType, Partner, SamlProvider, Theme } from "./etc.js";
|
|
2
|
+
import { MaximumScheduleSpan } from "../vertices/properties/maximum-schedule-span.js";
|
|
3
|
+
import { PlannedScheduledDuration } from "../vertices/properties/planned-scheduled-duration.js";
|
|
4
|
+
import { PublicId } from "../vertices/properties/index.js";
|
|
5
|
+
|
|
6
|
+
//#region src/core/interfaces/other/companies.d.ts
|
|
7
|
+
type Identifier = {
|
|
8
|
+
value: string;
|
|
9
|
+
type: 'VAT' | 'SchoolCode' | 'MunicipalityCode' | 'SchoolSoft' | 'Sdui' | 'Edlevo' | 'Edaktus';
|
|
10
|
+
country: string;
|
|
11
|
+
};
|
|
12
|
+
type AppFeature = {
|
|
13
|
+
substitutionPlanner?: {
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
};
|
|
16
|
+
statisticsModule?: {
|
|
17
|
+
/**
|
|
18
|
+
* Enables the whole statistics module.
|
|
19
|
+
*/
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
scb?: boolean;
|
|
22
|
+
lunchCongestion?: boolean;
|
|
23
|
+
};
|
|
24
|
+
includeStepGuide?: boolean;
|
|
25
|
+
};
|
|
26
|
+
type Address = {
|
|
27
|
+
type: string;
|
|
28
|
+
streetAddress: string;
|
|
29
|
+
addressLine2?: string;
|
|
30
|
+
addressLine3?: string;
|
|
31
|
+
postalCode: string;
|
|
32
|
+
locality: string;
|
|
33
|
+
state?: string;
|
|
34
|
+
region?: string;
|
|
35
|
+
country: string;
|
|
36
|
+
geoCoordinates: {
|
|
37
|
+
latitude: string;
|
|
38
|
+
longitude: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
type TimeRosterSection = {
|
|
42
|
+
start: string;
|
|
43
|
+
end: string;
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
};
|
|
47
|
+
type PublicConfig = {
|
|
48
|
+
filters: {
|
|
49
|
+
groups: boolean;
|
|
50
|
+
teachers: boolean;
|
|
51
|
+
inLocations: boolean;
|
|
52
|
+
tags: boolean;
|
|
53
|
+
subjects: boolean;
|
|
54
|
+
subGroups: boolean;
|
|
55
|
+
};
|
|
56
|
+
showTeacherWorkingHours: boolean;
|
|
57
|
+
multipleSelection: boolean;
|
|
58
|
+
timeFilters: {
|
|
59
|
+
all: boolean;
|
|
60
|
+
periods: boolean;
|
|
61
|
+
};
|
|
62
|
+
lockedTimes: boolean;
|
|
63
|
+
};
|
|
64
|
+
type AutoSyncConfig = {
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
integration?: IntegrationTypes;
|
|
67
|
+
weekdaysOnly?: boolean;
|
|
68
|
+
time?: string;
|
|
69
|
+
};
|
|
70
|
+
declare const INACTIVITY_ACTIONS: {
|
|
71
|
+
readonly REFRESH: "refresh";
|
|
72
|
+
readonly LOGOUT: "logout";
|
|
73
|
+
};
|
|
74
|
+
type InactivityAction = (typeof INACTIVITY_ACTIONS)[keyof typeof INACTIVITY_ACTIONS];
|
|
75
|
+
type InactivitySettings = {
|
|
76
|
+
/**
|
|
77
|
+
* In units of minutes
|
|
78
|
+
*/
|
|
79
|
+
time: number;
|
|
80
|
+
action: InactivityAction;
|
|
81
|
+
};
|
|
82
|
+
type GlobalDefaultValues = {
|
|
83
|
+
dayStart: string;
|
|
84
|
+
dayEnd: string;
|
|
85
|
+
numDays: number;
|
|
86
|
+
potentialCenter?: string;
|
|
87
|
+
defaultGroupMinimumBreakLength?: number;
|
|
88
|
+
defaultEventMinimumBreakLength?: number;
|
|
89
|
+
defaultDependencyMinimumBreakLength?: number;
|
|
90
|
+
defaultPlannedScheduledDuration?: PlannedScheduledDuration;
|
|
91
|
+
defaultMaximumScheduleSpan?: MaximumScheduleSpan;
|
|
92
|
+
defaultEventDurationVariance?: number;
|
|
93
|
+
};
|
|
94
|
+
declare namespace Company {
|
|
95
|
+
export type core = {
|
|
96
|
+
readonly id: PublicId;
|
|
97
|
+
associatedPartner?: Partner | null;
|
|
98
|
+
createdAt?: string;
|
|
99
|
+
};
|
|
100
|
+
type optionals = {
|
|
101
|
+
name?: string;
|
|
102
|
+
logo?: string;
|
|
103
|
+
timezone?: string;
|
|
104
|
+
environment: {
|
|
105
|
+
theme?: Theme;
|
|
106
|
+
organizationType?: OrganizationType;
|
|
107
|
+
appFeatures?: AppFeature;
|
|
108
|
+
canCreateCompanies?: boolean;
|
|
109
|
+
};
|
|
110
|
+
identifiers: Identifier[];
|
|
111
|
+
addresses: Address[];
|
|
112
|
+
constituentTypes: string[];
|
|
113
|
+
samlProviders?: SamlProvider[];
|
|
114
|
+
publicSettings?: PublicConfig;
|
|
115
|
+
autoSync?: AutoSyncConfig;
|
|
116
|
+
organization?: {
|
|
117
|
+
name?: string;
|
|
118
|
+
logo?: string;
|
|
119
|
+
inactivitySettings?: InactivitySettings;
|
|
120
|
+
constituentTypes?: string[];
|
|
121
|
+
environment?: Company.complete['environment'];
|
|
122
|
+
};
|
|
123
|
+
inactivitySettings?: InactivitySettings;
|
|
124
|
+
timeRoster?: TimeRosterSection[];
|
|
125
|
+
globalDefaultValues?: GlobalDefaultValues;
|
|
126
|
+
};
|
|
127
|
+
export type complete = core & optionals;
|
|
128
|
+
export {};
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
export { Address, AutoSyncConfig, Company, GlobalDefaultValues, INACTIVITY_ACTIONS, InactivityAction, InactivitySettings, PublicConfig, TimeRosterSection };
|
|
132
|
+
//# sourceMappingURL=companies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"companies.js","names":[],"sources":["../../../../src/core/interfaces/other/companies.ts"],"sourcesContent":["import type { Partner, IntegrationTypes, OrganizationType, Theme, SamlProvider } from './etc';\nimport type { PlannedScheduledDuration } from '../vertices/properties/planned-scheduled-duration';\nimport type { MaximumScheduleSpan } from '../vertices/properties/maximum-schedule-span';\nimport type { PublicId } from '../vertices/properties';\n\n\ntype Identifier = {\n value: string;\n type: 'VAT' | 'SchoolCode' | 'MunicipalityCode' | 'SchoolSoft' | 'Sdui' | 'Edlevo' | 'Edaktus';\n country: string;\n};\n\ntype AppFeature = {\n substitutionPlanner?: {\n enabled: boolean;\n };\n statisticsModule?: {\n /**\n * Enables the whole statistics module.\n */\n enabled?: boolean;\n\n scb?: boolean;\n lunchCongestion?: boolean;\n };\n includeStepGuide?: boolean;\n};\n\nexport type Address = {\n type: string; // Type of address (e.g., home, work, etc.)\n streetAddress: string; // Street address (e.g., 123 Main St)\n addressLine2?: string; // Optional second line of the address (e.g., Apt 4B)sss\n addressLine3?: string; // Optional third line of the address\n postalCode: string; // Postal code (e.g., 12345)\n locality: string; // City or locality (e.g., New York)\n state?: string; // Optional state or province (e.g., NY)\n region?: string; // Optional region (e.g., Northeast)\n country: string; // Country (e.g., USA)\n geoCoordinates: {\n latitude: string;\n longitude: string;\n };\n};\n\nexport type TimeRosterSection = {\n start: string; // In HH:mm format\n end: string; // In HH:mm format\n id: string;\n name: string;\n};\n\nexport type PublicConfig = {\n filters: {\n groups: boolean;\n teachers: boolean;\n inLocations: boolean;\n tags: boolean;\n subjects: boolean;\n subGroups: boolean;\n };\n showTeacherWorkingHours: boolean;\n multipleSelection: boolean;\n timeFilters: {\n all: boolean;\n periods: boolean;\n };\n lockedTimes: boolean;\n};\n\nexport type AutoSyncConfig = {\n enabled: boolean;\n integration?: IntegrationTypes;\n weekdaysOnly?: boolean;\n time?: string;\n};\n\nexport const INACTIVITY_ACTIONS = {\n REFRESH: 'refresh',\n LOGOUT: 'logout',\n} as const;\nexport type InactivityAction =\n (typeof INACTIVITY_ACTIONS)[keyof typeof INACTIVITY_ACTIONS];\n\nexport type InactivitySettings = {\n /**\n * In units of minutes\n */\n time: number;\n action: InactivityAction;\n};\n\nexport type GlobalDefaultValues = {\n dayStart: string;\n dayEnd: string;\n numDays: number;\n potentialCenter?: string;\n defaultGroupMinimumBreakLength?: number;\n defaultEventMinimumBreakLength?: number;\n defaultDependencyMinimumBreakLength?: number;\n defaultPlannedScheduledDuration?: PlannedScheduledDuration;\n defaultMaximumScheduleSpan?: MaximumScheduleSpan;\n defaultEventDurationVariance?: number;\n};\n\nexport namespace Company {\n export type core = {\n readonly id: PublicId;\n associatedPartner?: Partner | null;\n createdAt?: string;\n };\n\n type optionals = {\n name?: string;\n logo?: string; // URL to the company's logo\n timezone?: string;\n environment: {\n theme?: Theme;\n organizationType?: OrganizationType;\n appFeatures?: AppFeature;\n canCreateCompanies?: boolean;\n };\n identifiers: Identifier[];\n addresses: Address[];\n constituentTypes: string[];\n samlProviders?: SamlProvider[];\n publicSettings?: PublicConfig;\n autoSync?: AutoSyncConfig;\n organization?: {\n name?: string;\n logo?: string;\n inactivitySettings?: InactivitySettings;\n constituentTypes?: string[];\n environment?: Company.complete['environment'];\n };\n inactivitySettings?: InactivitySettings;\n timeRoster?: TimeRosterSection[];\n globalDefaultValues?: GlobalDefaultValues;\n };\n\n export type complete = core & optionals;\n}\n"],"mappings":";AA4EA,MAAa,qBAAqB;CAChC,SAAS;CACT,QAAS;CACV"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Moment } from "moment";
|
|
2
|
+
|
|
3
|
+
//#region src/core/interfaces/other/etc.d.ts
|
|
4
|
+
type DateType = Moment | string | Date;
|
|
5
|
+
type Partner = 'schoolsoft' | 'sdui' | 'additio' | 'pupil' | 'konecto';
|
|
6
|
+
type OrganizationType = 'school' | 'sports_facility';
|
|
7
|
+
type Theme = 'royal_schedule' | 'schoolsoft' | 'sdui' | 'additio' | 'pupil' | 'konecto';
|
|
8
|
+
type IntegrationTypes = 'Admentum' | 'Gotit' | 'Infomentor' | 'Adelaskola' | 'SchoolSoft' | 'vKlass' | 'IST' | 'Quiculum' | 'Meitner' | 'Sdui' | 'Additio' | 'Pupil' | 'Konecto' | 'Edlevo' | 'Unikum' | 'Edaktus';
|
|
9
|
+
type SamlProvider = 'microsoft';
|
|
10
|
+
type Access = {
|
|
11
|
+
CREATE: 'create';
|
|
12
|
+
READ: 'read';
|
|
13
|
+
UPDATE: 'update';
|
|
14
|
+
DELETE: 'delete';
|
|
15
|
+
};
|
|
16
|
+
type Role = 'admin' | 'partner' | 'administrator' | 'unrestricted' | 'restricted' | 'demo';
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Access, DateType, IntegrationTypes, OrganizationType, Partner, Role, SamlProvider, Theme };
|
|
19
|
+
//# sourceMappingURL=etc.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Address, AutoSyncConfig, Company, GlobalDefaultValues, INACTIVITY_ACTIONS, InactivityAction, InactivitySettings, PublicConfig, TimeRosterSection } from "./companies.js";
|
|
2
|
+
import { Integration } from "./integrations.js";
|
|
3
|
+
import { User } from "./users.js";
|
|
4
|
+
import { Action, Policy, Statement } from "./policies.js";
|
|
5
|
+
import { Operation, OperationType, operationType } from "./operations.js";
|
|
6
|
+
import { ErrorCode, SyncLog } from "./sync-logs.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IntegrationTypes } from "./etc.js";
|
|
2
|
+
import { PublicId } from "../vertices/properties/index.js";
|
|
3
|
+
import { Moment } from "moment";
|
|
4
|
+
|
|
5
|
+
//#region src/core/interfaces/other/integrations.d.ts
|
|
6
|
+
interface Integration {
|
|
7
|
+
id: PublicId;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
key?: string | string[] | any;
|
|
10
|
+
integrationType?: IntegrationTypes;
|
|
11
|
+
description?: string;
|
|
12
|
+
usedAt?: Moment | Date | string;
|
|
13
|
+
status?: 'PENDING' | 'APPROVED' | 'REJECTED';
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Integration };
|
|
17
|
+
//# sourceMappingURL=integrations.d.ts.map
|