@royalschedule/maps 4.0.35 → 4.0.37
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 +0 -1
- package/dist/Additio/from/schedules.js +4 -2
- 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 +2 -4
- package/dist/Additio/to/schedules.js +4 -2
- 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 +0 -1
- package/dist/Admentum/from/schedules.js +6 -3
- 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 +0 -1
- package/dist/Admentum/to/schedules.js +7 -4
- package/dist/Admentum/to/schedules.js.map +1 -1
- package/dist/Excel/index.d.ts +0 -1
- package/dist/Excel/v1/from/index.js +1 -1
- package/dist/Excel/v1/from/index.js.map +1 -1
- package/dist/Excel/v1/index.d.ts +0 -1
- package/dist/Excel/v2/from/index.js +54 -45
- package/dist/Excel/v2/from/index.js.map +1 -1
- package/dist/Excel/v2/index.d.ts +3 -4
- package/dist/IdunSoft/from/courses.js.map +1 -1
- package/dist/IdunSoft/from/events.js +2 -1
- 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 +0 -1
- 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 +0 -1
- package/dist/IdunSoft/to/schedules.js +6 -3
- package/dist/IdunSoft/to/schedules.js.map +1 -1
- package/dist/InfoMentor/to/index.d.ts +0 -1
- package/dist/InfoMentor/to/schedules.js +2 -1
- package/dist/InfoMentor/to/schedules.js.map +1 -1
- package/dist/PlanDigital/from/index.js.map +1 -1
- package/dist/PlanDigital/from/schedules.js +11 -9
- package/dist/PlanDigital/from/schedules.js.map +1 -1
- package/dist/PlanDigital/index.d.ts +0 -1
- package/dist/Quiculum/file/to/index.d.ts +0 -1
- package/dist/Quiculum/file/to/schedules.js +9 -5
- package/dist/Quiculum/file/to/schedules.js.map +1 -1
- package/dist/RS/from/division.d.ts +0 -1
- package/dist/RS/from/division.js +2 -1
- 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 +0 -1
- package/dist/RS/from/schedules.js.map +1 -1
- package/dist/RS/make-connected.d.ts +1 -3
- package/dist/RS/make-connected.js +42 -34
- 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 +6 -4
- 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 +2 -1
- package/dist/RS/to/input/default.js.map +1 -1
- package/dist/RS/to/input/dependencies.js +2 -1
- package/dist/RS/to/input/dependencies.js.map +1 -1
- package/dist/RS/to/input/dynamic-locked-times.js +2 -1
- package/dist/RS/to/input/dynamic-locked-times.js.map +1 -1
- 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 -1
- package/dist/RS/to/input/individuals.js.map +1 -1
- package/dist/RS/to/input/input.js +2 -1
- package/dist/RS/to/input/input.js.map +1 -1
- package/dist/RS/to/input/intervals.js +4 -2
- package/dist/RS/to/input/intervals.js.map +1 -1
- package/dist/RS/to/input/periods.js +4 -2
- 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 +4 -2
- package/dist/RS/to/input/util/parse-intervals.js.map +1 -1
- package/dist/RS/to/input/util/parse-location-references.js +2 -1
- 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 +2 -1
- package/dist/RS/to/input/util/util.js.map +1 -1
- package/dist/RS/to/schedules.js.map +1 -1
- package/dist/RS/types/to.d.ts +0 -1
- package/dist/SS12000/from/activities.js +2 -1
- 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 +0 -1
- 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 +0 -1
- 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 +12 -8
- package/dist/SchoolSoft/api/from/schedules.js.map +1 -1
- package/dist/SchoolSoft/api/index.d.ts +5 -6
- package/dist/SchoolSoft/file/from/index.js.map +1 -1
- package/dist/SchoolSoft/file/from/schedules.js +87 -83
- package/dist/SchoolSoft/file/from/schedules.js.map +1 -1
- package/dist/SchoolSoft/file/index.d.ts +0 -1
- package/dist/SchoolSoft/file/to/index.d.ts +2 -3
- package/dist/SchoolSoft/file/to/schedules.js +2 -1
- package/dist/SchoolSoft/file/to/schedules.js.map +1 -1
- package/dist/SchoolSoft/index.d.ts +0 -1
- package/dist/Schoolity/txt/to/index.d.ts +0 -1
- package/dist/Schoolity/txt/to/schedules.js +12 -5
- package/dist/Schoolity/txt/to/schedules.js.map +1 -1
- package/dist/Skola24/mdb/from/course-and-events.js +5 -3
- 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 +0 -1
- 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 +2 -1
- 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 +34 -31
- package/dist/Skola24/txt/from/period.js.map +1 -1
- package/dist/Skola24/txt/from/schedules.d.ts +0 -1
- package/dist/Skola24/txt/from/schedules.js +10 -6
- 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 +0 -1
- package/dist/Skola24/txt/to/index.d.ts +0 -1
- package/dist/Skola24/txt/to/schedules.js +12 -5
- package/dist/Skola24/txt/to/schedules.js.map +1 -1
- package/dist/common/constants.js.map +1 -1
- 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 -1
- package/dist/core/from/configurations.js.map +1 -1
- package/dist/core/from/courses.js.map +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.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/settings.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 +0 -1
- package/dist/core/interfaces/other/companies.js.map +1 -1
- package/dist/core/interfaces/other/operations.d.ts +0 -1
- package/dist/core/interfaces/vertices/companies.d.ts +0 -1
- package/dist/core/interfaces/vertices/configurations.d.ts +0 -1
- package/dist/core/interfaces/vertices/conversations.d.ts +24 -0
- package/dist/core/interfaces/vertices/courses.d.ts +0 -1
- package/dist/core/interfaces/vertices/division-settings.d.ts +0 -1
- package/dist/core/interfaces/vertices/divisions.d.ts +0 -1
- package/dist/core/interfaces/vertices/events.d.ts +0 -1
- package/dist/core/interfaces/vertices/exceptions.d.ts +0 -1
- package/dist/core/interfaces/vertices/generations.d.ts +0 -2
- package/dist/core/interfaces/vertices/groups.d.ts +0 -1
- package/dist/core/interfaces/vertices/index.d.ts +14 -1
- package/dist/core/interfaces/vertices/locations.d.ts +0 -1
- package/dist/core/interfaces/vertices/locked-times.d.ts +0 -2
- package/dist/core/interfaces/vertices/messages.d.ts +21 -0
- package/dist/core/interfaces/vertices/overlap-groups.d.ts +0 -1
- package/dist/core/interfaces/vertices/periods.d.ts +0 -2
- package/dist/core/interfaces/vertices/persons.d.ts +0 -1
- package/dist/core/interfaces/vertices/properties/belongs-to.d.ts +0 -1
- package/dist/core/interfaces/vertices/properties/coalesced.d.ts +0 -1
- package/dist/core/interfaces/vertices/root-intervals.d.ts +0 -2
- package/dist/core/interfaces/vertices/syllabuses.d.ts +0 -1
- package/dist/core/interfaces/vertices/teachers.d.ts +0 -1
- package/dist/core/interfaces/vertices/threads.d.ts +0 -1
- package/dist/core/interfaces/vertices/users.d.ts +0 -1
- package/dist/core/interfaces/vertices/util/custom-vertex-export/index.d.ts +6 -6
- package/dist/core/interfaces/vertices/util/custom-vertex-export/util.d.ts +4 -4
- package/dist/core/interfaces/vertices/util/deep-vertex-export/index.d.ts +9 -9
- package/dist/core/interfaces/vertices/util/edges.d.ts +7 -7
- package/dist/core/interfaces/vertices/util/util.d.ts +24 -20
- package/dist/core/interfaces/vertices/util/vertex-query/index.d.ts +11 -11
- package/dist/core/interfaces/vertices/util/vertex.d.ts +2 -2
- package/dist/core/interfaces/vertices/vertex-query.d.ts +32 -27
- package/dist/core/interfaces/vertices/vertex-query.js +8 -0
- package/dist/core/interfaces/vertices/vertex-query.js.map +1 -1
- package/dist/core/to/configurations.js +2 -1
- package/dist/core/to/configurations.js.map +1 -1
- package/dist/core/to/courses.js +2 -1
- 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 -1
- package/dist/core/to/events.js.map +1 -1
- package/dist/core/to/exceptions.js +2 -1
- package/dist/core/to/exceptions.js.map +1 -1
- package/dist/core/to/groups.js +2 -1
- package/dist/core/to/groups.js.map +1 -1
- package/dist/core/to/locations.js +2 -1
- package/dist/core/to/locations.js.map +1 -1
- package/dist/core/to/locked-times.js +2 -1
- package/dist/core/to/locked-times.js.map +1 -1
- package/dist/core/to/overlap-groups.js +2 -1
- package/dist/core/to/overlap-groups.js.map +1 -1
- package/dist/core/to/periods.js +2 -1
- package/dist/core/to/periods.js.map +1 -1
- package/dist/core/to/persons.js +2 -1
- package/dist/core/to/persons.js.map +1 -1
- package/dist/core/to/root-intervals.js +2 -1
- package/dist/core/to/root-intervals.js.map +1 -1
- package/dist/core/to/schedules.d.ts +0 -1
- package/dist/core/to/schedules.js.map +1 -1
- package/dist/core/to/settings.js +2 -1
- package/dist/core/to/settings.js.map +1 -1
- package/dist/core/to/syllabuses.js +2 -1
- package/dist/core/to/syllabuses.js.map +1 -1
- package/dist/core/to/teachers.js +2 -1
- package/dist/core/to/teachers.js.map +1 -1
- package/dist/core/to/util.d.ts +0 -2
- package/dist/core/to/util.js +2 -1
- package/dist/core/to/util.js.map +1 -1
- package/dist/core/types/index.d.ts +10 -1
- package/dist/core/util.js +2 -1
- package/dist/core/util.js.map +1 -1
- package/dist/identify/constants/index.js.map +1 -1
- package/dist/identify/index.js +2 -1
- package/dist/identify/index.js.map +1 -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.map +1 -1
- package/dist/sdui/from/rooms.js.map +1 -1
- package/dist/sdui/from/schedules.d.ts +0 -2
- package/dist/sdui/from/schedules.js.map +1 -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/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 +0 -2
- 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 +6 -3
- 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 +0 -1
- package/dist/vKlass/from/schedule.js.map +1 -1
- package/dist/vKlass/to/schedules.js +17 -6
- package/dist/vKlass/to/schedules.js.map +1 -1
- package/package.json +1 -1
- package/dist/core/interfaces/index.d.ts +0 -23
- package/dist/core/interfaces/other/index.d.ts +0 -6
- package/dist/core/interfaces/vertices/util/index.d.ts +0 -6
|
@@ -1 +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 minimizeTeacherGaps?: boolean;\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
|
|
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 minimizeTeacherGaps?: boolean;\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"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { Coalesced, EdgeWrapper } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { DivisionVertex } from "./divisions.js";
|
|
5
4
|
import { UserVertex } from "./users.js";
|
|
6
5
|
import { CompanyVertex } from "./companies.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VertexFactory } from "./util/vertex.js";
|
|
2
|
+
import { EdgeWrapper, Plain } from "./util/edges.js";
|
|
3
|
+
import { BelongsTo } from "./properties/belongs-to.js";
|
|
4
|
+
import { UserVertex } from "./users.js";
|
|
5
|
+
import { MessageVertex } from "./messages.js";
|
|
6
|
+
|
|
7
|
+
//#region src/core/interfaces/vertices/conversations.d.ts
|
|
8
|
+
type ConversationVertex = VertexFactory<'conversations', BelongsTo & {
|
|
9
|
+
user: EdgeWrapper<'single', Plain.Edge<UserVertex>>;
|
|
10
|
+
messages?: EdgeWrapper<'array', Plain.Edge<MessageVertex>>;
|
|
11
|
+
title?: string;
|
|
12
|
+
settings: {
|
|
13
|
+
model: string;
|
|
14
|
+
thinking: boolean;
|
|
15
|
+
};
|
|
16
|
+
tokenUsage?: {
|
|
17
|
+
promptTokens?: number;
|
|
18
|
+
completionTokens?: number;
|
|
19
|
+
};
|
|
20
|
+
active?: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { ConversationVertex };
|
|
24
|
+
//# sourceMappingURL=conversations.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { AvailableLocation, EdgeWrapper, GroupWithExclude, Plain, Wrapped } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { Day } from "./properties/days.js";
|
|
5
4
|
import { Interval } from "./properties/intervals.js";
|
|
6
5
|
import { Tag } from "./properties/tags.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { EdgeWrapper, Plain } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { MaximumScheduleSpan } from "./properties/maximum-schedule-span.js";
|
|
5
4
|
import { PlannedScheduledDuration } from "./properties/planned-scheduled-duration.js";
|
|
6
5
|
import { PeriodVertex } from "./periods.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { EdgeWrapper, Plain } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { DateType, Partner } from "../other/etc.js";
|
|
5
4
|
import { DivisionSettingsVertex } from "./division-settings.js";
|
|
6
5
|
import { GenerationVertex } from "./generations.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { AvailableLocation, EdgeWrapper, GroupWithExclude, Plain, Wrapped } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { Day } from "./properties/days.js";
|
|
5
4
|
import { Interval } from "./properties/intervals.js";
|
|
6
5
|
import { Tag } from "./properties/tags.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Collection, Vertex, VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { Coalesced, EdgeWrapper, Plain } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { PersonVertex } from "./persons.js";
|
|
5
4
|
import { LocationVertex } from "./locations.js";
|
|
6
5
|
import { EventVertex } from "./events.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { EdgeWrapper, Plain, Wrapped } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { Day } from "./properties/days.js";
|
|
5
4
|
import { Interval } from "./properties/intervals.js";
|
|
6
5
|
import { Tag } from "./properties/tags.js";
|
|
@@ -2,7 +2,6 @@ import { Collection, Vertex } from "./util/vertex.js";
|
|
|
2
2
|
import { IdKey, InternalIdKey } from "../../types/common/index.js";
|
|
3
3
|
import { DeepVertexExport, DeepVertexExportOmitPrivateId, MixedVertexExport, MixedWithOptionalIdVertexExport } from "./util/deep-vertex-export/index.js";
|
|
4
4
|
import { SerializedVertexExport } from "./util/serialized-vertex-export.js";
|
|
5
|
-
import "./util/index.js";
|
|
6
5
|
import { PeriodVertex } from "./periods.js";
|
|
7
6
|
import { RootIntervalVertex } from "./root-intervals.js";
|
|
8
7
|
import { CalendarException, DivisionSettingsVertex } from "./division-settings.js";
|
|
@@ -21,6 +20,8 @@ import { GroupVertex } from "./groups.js";
|
|
|
21
20
|
import { LockedTimeType, LockedTimeVertex } from "./locked-times.js";
|
|
22
21
|
import { TeacherVertex } from "./teachers.js";
|
|
23
22
|
import { ConfigurationFilterVertex, ConfigurationRuleVertex, ConfigurationTemplateVertex, ConfigurationVertex } from "./configurations.js";
|
|
23
|
+
import { MessageVertex } from "./messages.js";
|
|
24
|
+
import { ConversationVertex } from "./conversations.js";
|
|
24
25
|
import { Infer, VertexQuery, createVertexQuery } from "./vertex-query.js";
|
|
25
26
|
|
|
26
27
|
//#region src/core/interfaces/vertices/index.d.ts
|
|
@@ -61,6 +62,8 @@ declare namespace Serialized {
|
|
|
61
62
|
type RootInterval = SerializedVertexExport<RootIntervalVertex>;
|
|
62
63
|
type Syllabus = SerializedVertexExport<SyllabusVertex>;
|
|
63
64
|
type Thread = SerializedVertexExport<ThreadVertex>;
|
|
65
|
+
type Conversation = SerializedVertexExport<ConversationVertex>;
|
|
66
|
+
type Message = SerializedVertexExport<MessageVertex>;
|
|
64
67
|
type User = SerializedVertexExport<UserVertex>;
|
|
65
68
|
namespace Configuration {
|
|
66
69
|
type Base = SerializedVertexExport<ConfigurationVertex>;
|
|
@@ -90,6 +93,8 @@ declare namespace Deep {
|
|
|
90
93
|
type RootInterval = DeepVertexExport<RootIntervalVertex>;
|
|
91
94
|
type Syllabus = DeepVertexExport<SyllabusVertex>;
|
|
92
95
|
type Thread = DeepVertexExport<ThreadVertex>;
|
|
96
|
+
type Conversation = DeepVertexExport<ConversationVertex>;
|
|
97
|
+
type Message = DeepVertexExport<MessageVertex>;
|
|
93
98
|
type User = DeepVertexExport<UserVertex>;
|
|
94
99
|
namespace Configuration {
|
|
95
100
|
type Base = DeepVertexExport<ConfigurationVertex>;
|
|
@@ -119,6 +124,8 @@ declare namespace DeepWithoutPrivateId {
|
|
|
119
124
|
type RootInterval = DeepVertexExportOmitPrivateId<RootIntervalVertex>;
|
|
120
125
|
type Syllabus = DeepVertexExportOmitPrivateId<SyllabusVertex>;
|
|
121
126
|
type Thread = DeepVertexExportOmitPrivateId<ThreadVertex>;
|
|
127
|
+
type Conversation = DeepVertexExportOmitPrivateId<ConversationVertex>;
|
|
128
|
+
type Message = DeepVertexExportOmitPrivateId<MessageVertex>;
|
|
122
129
|
type User = DeepVertexExportOmitPrivateId<UserVertex>;
|
|
123
130
|
namespace Configuration {
|
|
124
131
|
type Base = DeepVertexExport<ConfigurationVertex>;
|
|
@@ -148,6 +155,8 @@ declare namespace Mixed {
|
|
|
148
155
|
type RootInterval = MixedVertexExport<RootIntervalVertex>;
|
|
149
156
|
type Syllabus = MixedVertexExport<SyllabusVertex>;
|
|
150
157
|
type Thread = MixedVertexExport<ThreadVertex>;
|
|
158
|
+
type Conversation = MixedVertexExport<ConversationVertex>;
|
|
159
|
+
type Message = MixedVertexExport<MessageVertex>;
|
|
151
160
|
type User = MixedVertexExport<UserVertex>;
|
|
152
161
|
namespace Configuration {
|
|
153
162
|
type Base = MixedVertexExport<ConfigurationVertex>;
|
|
@@ -177,6 +186,8 @@ declare namespace MixedWithOptionalId {
|
|
|
177
186
|
type RootInterval = MixedWithOptionalIdVertexExport<RootIntervalVertex>;
|
|
178
187
|
type Syllabus = MixedWithOptionalIdVertexExport<SyllabusVertex>;
|
|
179
188
|
type Thread = MixedWithOptionalIdVertexExport<ThreadVertex>;
|
|
189
|
+
type Conversation = MixedWithOptionalIdVertexExport<ConversationVertex>;
|
|
190
|
+
type Message = MixedWithOptionalIdVertexExport<MessageVertex>;
|
|
180
191
|
type User = MixedWithOptionalIdVertexExport<UserVertex>;
|
|
181
192
|
namespace Configuration {
|
|
182
193
|
type Base = MixedWithOptionalIdVertexExport<ConfigurationVertex>;
|
|
@@ -207,6 +218,8 @@ declare namespace SerializedWithOptionalId {
|
|
|
207
218
|
export type RootInterval = MakeIdsOptional<Serialized.RootInterval>;
|
|
208
219
|
export type Syllabus = MakeIdsOptional<Serialized.Syllabus>;
|
|
209
220
|
export type Thread = MakeIdsOptional<Serialized.Thread>;
|
|
221
|
+
export type Conversation = MakeIdsOptional<Serialized.Conversation>;
|
|
222
|
+
export type Message = MakeIdsOptional<Serialized.Message>;
|
|
210
223
|
export type User = MakeIdsOptional<Serialized.User>;
|
|
211
224
|
export namespace Configuration {
|
|
212
225
|
type Base = MakeIdsOptional<Serialized.Configuration.Base>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { EdgeWrapper, Plain } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { Day } from "./properties/days.js";
|
|
5
4
|
import { Tag } from "./properties/tags.js";
|
|
6
5
|
import { BelongsTo } from "./properties/belongs-to.js";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { Coalesced, EdgeWrapper } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { Interval } from "./properties/intervals.js";
|
|
5
4
|
import { Tag } from "./properties/tags.js";
|
|
6
|
-
import "./properties/index.js";
|
|
7
5
|
import { BelongsTo } from "./properties/belongs-to.js";
|
|
8
6
|
import { LocationVertex } from "./locations.js";
|
|
9
7
|
import { EventVertex } from "./events.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { VertexFactory } from "./util/vertex.js";
|
|
2
|
+
import { EdgeWrapper, Plain } from "./util/edges.js";
|
|
3
|
+
import { BelongsTo } from "./properties/belongs-to.js";
|
|
4
|
+
import { UserVertex } from "./users.js";
|
|
5
|
+
import { ConversationVertex } from "./conversations.js";
|
|
6
|
+
|
|
7
|
+
//#region src/core/interfaces/vertices/messages.d.ts
|
|
8
|
+
type MessageVertex = VertexFactory<'messages', BelongsTo & {
|
|
9
|
+
user: EdgeWrapper<'single', Plain.Edge<UserVertex>>;
|
|
10
|
+
conversation: EdgeWrapper<'single', Plain.Edge<ConversationVertex>>;
|
|
11
|
+
type: string;
|
|
12
|
+
content?: string;
|
|
13
|
+
status?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
args?: unknown;
|
|
16
|
+
response?: unknown;
|
|
17
|
+
error?: string;
|
|
18
|
+
}>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { MessageVertex };
|
|
21
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { Coalesced, EdgeWrapper } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { BelongsTo } from "./properties/belongs-to.js";
|
|
5
4
|
import { EventVertex } from "./events.js";
|
|
6
5
|
import { CourseVertex } from "./courses.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { EdgeWrapper, Plain } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { Tag } from "./properties/tags.js";
|
|
5
4
|
import { BelongsTo } from "./properties/belongs-to.js";
|
|
6
5
|
import { GroupVertex } from "./groups.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VertexFactory } from "./util/vertex.js";
|
|
2
2
|
import { EdgeWrapper, Plain } from "./util/edges.js";
|
|
3
|
-
import "./util/index.js";
|
|
4
3
|
import { Day } from "./properties/days.js";
|
|
5
4
|
import { Interval } from "./properties/intervals.js";
|
|
6
5
|
import { Tag } from "./properties/tags.js";
|
|
@@ -10,12 +10,12 @@ import { AssertNoInvalidExpandKeys } from "./assert-no-invalid-expand-keys.js";
|
|
|
10
10
|
//#region src/core/interfaces/vertices/util/custom-vertex-export/index.d.ts
|
|
11
11
|
declare namespace HandleEdge {
|
|
12
12
|
type Recursion<V extends Vertex<Collection>, Query> = [Query] extends [never] ? string : Query extends VertexQuery<V> ? _CustomVertexExport<V, Query> : never;
|
|
13
|
-
export type Plain<E
|
|
14
|
-
export type Wrapped<E
|
|
15
|
-
export type Coalesced<E
|
|
16
|
-
export type GroupWithExclude<E
|
|
17
|
-
export type AvailableLocation<E
|
|
18
|
-
export type ThreadMessage<E
|
|
13
|
+
export type Plain<E extends EdgeBase<any, any>, Query> = E extends Plain.Edge<infer V> ? Recursion<V, Query> : never;
|
|
14
|
+
export type Wrapped<E extends EdgeBase<any, any>, Query> = E extends Wrapped.Edge<infer K, infer V extends Vertex<Collection>, infer Extra extends object> ? Wrapped.Util.Value<K, Recursion<V, IntersectExpandSelectPath<Lookup<Query, K>, VertexQuery<V>>>, Extra> : never;
|
|
15
|
+
export type Coalesced<E extends EdgeBase<any, any>, Query> = E extends Coalesced.Edge<infer V, infer O, infer Extra extends object> ? V extends Vertex<Collection> ? Coalesced.Util.Value<Recursion<V, IntersectExpandSelectPath<Lookup<Query, Coalesced.Util.Keys.To>, VertexQuery<V>>>, Coalesced.Util.ToModel<V>, O, Extra> : never : never;
|
|
16
|
+
export type GroupWithExclude<E extends EdgeBase<any, any>, Query> = E extends GroupWithExclude.Edge<infer G extends Vertex<any>, infer P extends Vertex<any>, infer Extra extends object> ? GroupWithExclude.Util.Value<Recursion<G, IntersectExpandSelectPath<Lookup<Query, GroupWithExclude.Util.Keys.To>, VertexQuery<G>>>, Recursion<P, IntersectExpandSelectPath<Lookup<Query, GroupWithExclude.Util.Keys.Exclude>, VertexQuery<P>>>, Extra> : never;
|
|
17
|
+
export type AvailableLocation<E extends EdgeBase<any, any>, Query> = E extends AvailableLocation.Edge<infer L extends Vertex<any>, infer Extra extends object> ? AvailableLocation.Util.Value<Recursion<L, IntersectExpandSelectPath<Lookup<Query, AvailableLocation.Util.Keys.Locations>, VertexQuery<L>>>, Extra> : never;
|
|
18
|
+
export type ThreadMessage<E extends EdgeBase<any, any>, Query> = E extends ThreadMessage.Edge<infer U extends Vertex<Collection>, infer T extends Vertex<Collection>, infer Extra extends object> ? ThreadMessage.Util.Value<Recursion<U, IntersectExpandSelectPath<Lookup<Query, ThreadMessage.Util.Keys.User>, VertexQuery<U>>>, Recursion<T, IntersectExpandSelectPath<Lookup<Query, ThreadMessage.Util.Keys.TaggedPersons>, VertexQuery<T>>>, Extra> : never;
|
|
19
19
|
export {};
|
|
20
20
|
}
|
|
21
21
|
type _CustomVertexExport<V extends Vertex<Collection>, Q extends VertexQuery<V>> = Prettify<{ [K in keyof OmitEdges<V> as K extends KeysOf<V, Q> ? K : never]: V[K] } & { [K in keyof PickEdges<V> as K extends ExtractParentKeys<KeysOf<V, Q>> ? K : never]: [V[K]] extends [never] ? never : NonNullable<V[K]> extends EdgeWrapper<infer M, infer E extends EdgeBase<any, any> | null | undefined> ? (SetMultiplicity<Prettify<E extends EdgeBase<any, any> ? (HandleEdge.Plain<E, Lookup<Q[ExpandKey], K>> | RelaxedPick<HandleEdge.Wrapped<E, ExtractChildObject<Q[ExpandKey], K>> | HandleEdge.Coalesced<E, ExtractChildObject<Q[ExpandKey], K>> | HandleEdge.GroupWithExclude<E, ExtractChildObject<Q[ExpandKey], K>> | HandleEdge.AvailableLocation<E, ExtractChildObject<Q[ExpandKey], K>> | HandleEdge.ThreadMessage<E, ExtractChildObject<Q[ExpandKey], K>>, ExtractChildKeys<KeysOf<V, Q>, K>>) : E>, M> | ExtractNullish<V[K]>) : never }>;
|
|
@@ -6,7 +6,7 @@ import { ExpandKey, SelectKey } from "../common.js";
|
|
|
6
6
|
/**
|
|
7
7
|
* Lookup type that returns the value type for key K in object Obj,
|
|
8
8
|
*/
|
|
9
|
-
type Lookup<Obj, K
|
|
9
|
+
type Lookup<Obj, K, ELSE = never> = K extends keyof Obj ? Obj[K] : ELSE;
|
|
10
10
|
/**
|
|
11
11
|
* Intersect two expand/select specifications.
|
|
12
12
|
*
|
|
@@ -19,8 +19,8 @@ type Lookup<Obj, K$1, ELSE = never> = K$1 extends keyof Obj ? Obj[K$1] : ELSE;
|
|
|
19
19
|
* Useful to constrain a requested expand/select spec (A) by an allowed/spec (B),
|
|
20
20
|
* yielding only the common subset.
|
|
21
21
|
*/
|
|
22
|
-
type IntersectExpandSelectPath<A, B
|
|
23
|
-
type _IntersectExpandSelectPath<A, B
|
|
22
|
+
type IntersectExpandSelectPath<A, B> = _IntersectExpandSelectPath<DeepNonNullable<A>, DeepNonNullable<B>>;
|
|
23
|
+
type _IntersectExpandSelectPath<A, B> = [A] extends [never] ? never : { [K in keyof A & keyof B]: K extends SelectKey ? A[K] extends (infer V1)[] ? B[K] extends (infer V2)[] ? (V1 & V2)[] | Extract<A[K], null | undefined> : never : never : K extends ExpandKey ? { [S in keyof A[K] & keyof B[K]]: A[K][S] extends object ? B[K][S] extends object ? IntersectExpandSelectPath<A[K][S], B[K][S]> : never : never } : never };
|
|
24
24
|
/**
|
|
25
25
|
* Extracts the parent keys from a set of dot-notation keys.
|
|
26
26
|
*
|
|
@@ -43,7 +43,7 @@ type ExtractChildKeys<Keys extends keyof any, ParentKey extends string> = Keys e
|
|
|
43
43
|
* ParentKey: 'a'
|
|
44
44
|
* Object: { 'a': string; 'a.1': number; 'a.2': boolean; 'b.1': string; 'c': Date } => { '1': number; '2': boolean }
|
|
45
45
|
*/
|
|
46
|
-
type ExtractChildObject<Object
|
|
46
|
+
type ExtractChildObject<Object, ParentKey> = { [K in keyof Object as K extends `${ParentKey & string}.${infer S}` ? S : never]: Object[K] };
|
|
47
47
|
/**
|
|
48
48
|
* Does the same as the built-in Pick<T, Keys>, but does not restrict the Keys to keyof T. Nullish and undefined values are preserved.
|
|
49
49
|
*/
|
|
@@ -12,19 +12,19 @@ type ExportOptions = {
|
|
|
12
12
|
type IDTypes = IDType | PrivateIDType;
|
|
13
13
|
declare namespace HandleEdge {
|
|
14
14
|
type Recursion<V extends Vertex<Collection>, D extends SupportedDepths, Opts extends ExportOptions> = _DeepVertexExport<V, Decrement<D>, Opts> | (Opts['mixed'] extends true ? IDTypes : never);
|
|
15
|
-
export type Plain<E
|
|
16
|
-
export type Wrapped<E
|
|
17
|
-
export type Coalesced<E
|
|
18
|
-
export type GroupWithExclude<E
|
|
19
|
-
export type AvailableLocation<E
|
|
20
|
-
export type ThreadMessage<E
|
|
15
|
+
export type Plain<E extends EdgeBase<any, any>, D extends SupportedDepths, Opts extends ExportOptions> = E extends Plain.Edge<infer V> ? Recursion<V, D, Opts> : never;
|
|
16
|
+
export type Wrapped<E extends EdgeBase<any, any>, D extends SupportedDepths, Opts extends ExportOptions> = E extends Wrapped.Edge<infer K, infer V extends Vertex<any>, infer Extra extends object> ? Wrapped.Util.Value<K, Recursion<V, D, Opts>, Extra> : never;
|
|
17
|
+
export type Coalesced<E extends EdgeBase<any, any>, D extends SupportedDepths, Opts extends ExportOptions> = E extends Coalesced.Edge<infer V, infer O extends object, infer Extra extends object> ? V extends Vertex<Collection> ? Coalesced.Util.Value<Recursion<V, D, Opts>, Coalesced.Util.ToModel<V>, O, Extra> : never : never;
|
|
18
|
+
export type GroupWithExclude<E extends EdgeBase<any, any>, D extends SupportedDepths, Opts extends ExportOptions> = E extends GroupWithExclude.Edge<infer G extends Vertex<any>, infer P extends Vertex<any>, infer Extra extends object> ? GroupWithExclude.Util.Value<Recursion<G, D, Opts>, Recursion<P, D, Opts>, Extra> : never;
|
|
19
|
+
export type AvailableLocation<E extends EdgeBase<any, any>, D extends SupportedDepths, Opts extends ExportOptions> = E extends AvailableLocation.Edge<infer L extends Vertex<any>, infer Extra extends object> ? AvailableLocation.Util.Value<Recursion<L, D, Opts>, Extra> : never;
|
|
20
|
+
export type ThreadMessage<E extends EdgeBase<any, any>, D extends SupportedDepths, Opts extends ExportOptions> = E extends ThreadMessage.Edge<infer U extends Vertex<any>, infer T extends Vertex<any>, infer Extra extends object> ? ThreadMessage.Util.Value<Recursion<U, D, Opts>, Recursion<T, D, Opts>, Extra> : never;
|
|
21
21
|
export {};
|
|
22
22
|
}
|
|
23
23
|
type _MinDepthType = any;
|
|
24
|
-
type TryPrettify<T
|
|
24
|
+
type TryPrettify<T> = 0 extends (1 & T) ? _MinDepthType : Prettify<T>;
|
|
25
25
|
type InternalIdKeys = IDKey | PrivateIDKey;
|
|
26
|
-
type PartialIf<T
|
|
27
|
-
type OmitPrivateIdIf<T
|
|
26
|
+
type PartialIf<T extends object, Condition extends boolean | undefined> = Condition extends true ? Partial<T> : T;
|
|
27
|
+
type OmitPrivateIdIf<T extends object, Condition extends boolean | undefined> = Condition extends true ? Omit<T, PrivateIDKey> : T;
|
|
28
28
|
type _DeepVertexExport<V extends Vertex<Collection>, D extends SupportedDepths, Opts extends ExportOptions> = D extends MinDepth ? _MinDepthType : Prettify<OmitPrivateIdIf<PartialIf<{ [K in keyof Pick<V, InternalIdKeys>]: V[K] }, Opts['optionalId']>, Opts['omitPrivateId']> & { [K in keyof Omit<OmitInternalVertexKeys<OmitEdges<V>>, InternalIdKeys>]: V[K] } & { [K in keyof PickEdges<V>]: [V[K]] extends [never] ? never : NonNullable<V[K]> extends EdgeWrapper<infer M, infer E extends EdgeBase<any, any> | null | undefined> ? (SetMultiplicity<TryPrettify<E extends EdgeBase<any, any> ? (HandleEdge.Plain<E, D, Opts> | HandleEdge.Wrapped<E, D, Opts> | HandleEdge.Coalesced<E, D, Opts> | HandleEdge.GroupWithExclude<E, D, Opts> | HandleEdge.AvailableLocation<E, D, Opts> | HandleEdge.ThreadMessage<E, D, Opts>) : E>, M> | ExtractNullish<V[K]>) : never }>;
|
|
29
29
|
/**
|
|
30
30
|
* Recursively transforms a Vertex type into a deeply exported, plain object structure.
|
|
@@ -24,8 +24,8 @@ type EdgeIsValid<T extends EdgeBase<any, any>> = [T] extends [{
|
|
|
24
24
|
}] ? true : false;
|
|
25
25
|
declare namespace Plain {
|
|
26
26
|
namespace Util {}
|
|
27
|
-
type Edge<V
|
|
28
|
-
[EDGE_VALUE_KEY]: V
|
|
27
|
+
type Edge<V extends Vertex<Collection>> = EdgeBase<EdgeTypeIdValues['PLAIN'], NoneIsUnion<[V]> extends never ? true : false> & {
|
|
28
|
+
[EDGE_VALUE_KEY]: V;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
declare namespace Wrapped {
|
|
@@ -35,8 +35,8 @@ declare namespace Wrapped {
|
|
|
35
35
|
};
|
|
36
36
|
type Value<K extends string, To, Extra = object> = Extra & { [k in K]: To };
|
|
37
37
|
}
|
|
38
|
-
type Edge<K extends string, V
|
|
39
|
-
[EDGE_VALUE_KEY]: Util.Value<K, V
|
|
38
|
+
type Edge<K extends string, V extends Vertex<Collection>, E extends object = object> = EdgeBase<EdgeTypeIdValues['WRAPPED'], NoneIsUnion<[K, V]> extends never ? true : false> & {
|
|
39
|
+
[EDGE_VALUE_KEY]: Util.Value<K, V, E>;
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
declare namespace Coalesced {
|
|
@@ -53,15 +53,15 @@ declare namespace Coalesced {
|
|
|
53
53
|
type makePartial<T, O extends Options> = O extends {
|
|
54
54
|
optional: true;
|
|
55
55
|
} ? Partial<T> : T;
|
|
56
|
-
export type ToModel<V
|
|
56
|
+
export type ToModel<V extends Vertex<Collection>> = V extends Vertex<infer C> ? C extends 'events' ? C | 'courseevents' : C : never;
|
|
57
57
|
export type Value<To, ToModel, Opts extends Util.Options = object, Extra = object> = Extra & makePartial<{
|
|
58
58
|
[Keys.TO]: To;
|
|
59
59
|
[Keys.TO_MODEL]: ToModel;
|
|
60
60
|
}, Opts>;
|
|
61
61
|
export {};
|
|
62
62
|
}
|
|
63
|
-
type Edge<V
|
|
64
|
-
[EDGE_VALUE_KEY]: Util.Value<V
|
|
63
|
+
type Edge<V extends Vertex<Collection>, Opts extends Util.Options = object, E extends object = object> = EdgeBase<EdgeTypeIdValues['COALESCED'], NoneIsUnion<[V]> extends never ? true : false> & {
|
|
64
|
+
[EDGE_VALUE_KEY]: Util.Value<V, Util.ToModel<V>, Opts, E>;
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
declare namespace GroupWithExclude {
|
|
@@ -5,51 +5,55 @@ import { EdgeMultiplicity } from "./edges.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* Similar to O[K], but does not require K to be a key of O. Extracts the property K from each member of the possible union types in U.
|
|
7
7
|
*/
|
|
8
|
-
type GetByKey<O, K
|
|
8
|
+
type GetByKey<O, K extends keyof any> = O extends { [P in K]: infer T } ? T : O extends { [P in K]?: infer T } ? T | undefined : never;
|
|
9
9
|
/**
|
|
10
10
|
* keyof { a1: ..., a2: ..., ... } | { b1: ..., b2: ..., ... } | ... => 'a1' | 'a2' | ... | 'b1' | 'b2' | ...
|
|
11
11
|
*/
|
|
12
|
-
type AllKeys<U
|
|
12
|
+
type AllKeys<U> = U extends any ? keyof U : never;
|
|
13
13
|
declare namespace MakeMixedNs {
|
|
14
|
-
type ExtractArrayType<T
|
|
15
|
-
type ExtractObjectType<T
|
|
16
|
-
type _MakeMixedArray<T
|
|
17
|
-
type _MakeMixedObject<T
|
|
18
|
-
export type MakeMixed<T
|
|
14
|
+
type ExtractArrayType<T> = T extends Array<any> ? T : never;
|
|
15
|
+
type ExtractObjectType<T> = T extends Array<any> ? never : T extends object ? T : never;
|
|
16
|
+
type _MakeMixedArray<T extends any[]> = [T] extends [never] ? never : (T extends Array<infer U> ? U : never) extends infer U ? Array<MakeMixed<U>> : never;
|
|
17
|
+
type _MakeMixedObject<T extends object> = [T] extends [never] ? never : { [K in AllKeys<T>]: MakeMixed<GetByKey<T, K>> };
|
|
18
|
+
export type MakeMixed<T> = (ExtractArrayType<T> extends (infer V extends any[]) ? _MakeMixedArray<V> : never) | (ExtractObjectType<T> extends (infer V extends object) ? _MakeMixedObject<V> : never) | (T extends object ? never : T);
|
|
19
19
|
export {};
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Merges a union of types into a single type by combining properties of object types and merging array element types.
|
|
23
23
|
*/
|
|
24
|
-
type MakeMixed<T
|
|
24
|
+
type MakeMixed<T> = MakeMixedNs.MakeMixed<T>;
|
|
25
25
|
/**
|
|
26
26
|
* Deep partial type that allows for partial properties at any level of nesting.
|
|
27
27
|
*/
|
|
28
|
-
type DeepPartial<T
|
|
28
|
+
type DeepPartial<T> = T extends Array<infer U> ? Array<DeepPartial<U>> : T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T;
|
|
29
29
|
/**
|
|
30
30
|
* A deep version of NonNullable<T> that recursively removes null and undefined from all properties and nested properties.
|
|
31
31
|
*/
|
|
32
|
-
type DeepNonNullable<T
|
|
33
|
-
type _IsUnion<T
|
|
32
|
+
type DeepNonNullable<T> = T extends any ? T extends ((...args: any[]) => any) ? T : T extends Array<infer U> ? Array<DeepNonNullable<NonNullable<U>>> : T extends object ? { [K in keyof T]-?: DeepNonNullable<NonNullable<T[K]>> } : NonNullable<T> : never;
|
|
33
|
+
type _IsUnion<T, U = T> = T extends any ? [U] extends [T] ? false : true : never;
|
|
34
34
|
/**
|
|
35
35
|
* Lets a type pass if it is a union type, otherwise returns `never`.
|
|
36
36
|
*/
|
|
37
|
-
type IsUnion<T
|
|
37
|
+
type IsUnion<T> = _IsUnion<T> extends true ? T : never;
|
|
38
|
+
/**
|
|
39
|
+
* Lets a type pass if it is not a union type, otherwise returns `never`.
|
|
40
|
+
*/
|
|
41
|
+
|
|
38
42
|
/**
|
|
39
43
|
* Returns never if any type in the tuple is a union, otherwise returns the tuple.
|
|
40
44
|
*/
|
|
41
|
-
type NoneIsUnion<T
|
|
42
|
-
type AnyUnion<T
|
|
45
|
+
type NoneIsUnion<T extends any[]> = AnyUnion<T> extends true ? never : T;
|
|
46
|
+
type AnyUnion<T extends any[]> = T extends [infer Head, ...infer Tail] ? _IsUnion<Head> extends true ? true : AnyUnion<Tail extends any[] ? Tail : []> : false;
|
|
43
47
|
/**
|
|
44
48
|
* Returns `true` if every element in the tuple is `true`, otherwise returns `false`.
|
|
45
49
|
* Returns `never` for an empty tuple.
|
|
46
50
|
*/
|
|
47
|
-
type AllTrue<T
|
|
48
|
-
type _AllTrue<T
|
|
51
|
+
type AllTrue<T extends any[]> = T extends [] ? never : _AllTrue<T>;
|
|
52
|
+
type _AllTrue<T extends any[]> = T extends [infer Head, ...infer Tail] ? Head extends true ? Tail extends any[] ? _AllTrue<Tail> : never : false : true;
|
|
49
53
|
/**
|
|
50
54
|
* Returns the tail of a tuple, or `never` if the tuple is empty.
|
|
51
55
|
*/
|
|
52
|
-
type Tail<T
|
|
56
|
+
type Tail<T extends any[]> = T extends [any, ...infer V extends [any, ...any[]]] ? Tail<V> : T extends [infer U] ? U : never;
|
|
53
57
|
/**
|
|
54
58
|
* Prettify<T>
|
|
55
59
|
* Materializes T into a plain object type for clearer tooltips and stable structural equality.
|
|
@@ -66,15 +70,15 @@ type Tail<T$1 extends any[]> = T$1 extends [any, ...infer V extends [any, ...any
|
|
|
66
70
|
* - Inner unions remain unions; only the outer shape is normalized.
|
|
67
71
|
* - The `& {}` forces recomputation and a simpler displayed shape in editor/tooling.
|
|
68
72
|
*/
|
|
69
|
-
type Prettify<T
|
|
73
|
+
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
70
74
|
/**
|
|
71
75
|
* Wraps the given type T into an array if its multiplicity M is 'array'.
|
|
72
76
|
*/
|
|
73
|
-
type SetMultiplicity<T
|
|
77
|
+
type SetMultiplicity<T, M = EdgeMultiplicity> = M extends 'array' ? T[] : T;
|
|
74
78
|
/**
|
|
75
79
|
* Extracts null and undefined from a type T, resulting in `null | undefined` if both are present, otherwise `null`, `undefined`, or `never`.
|
|
76
80
|
*/
|
|
77
|
-
type ExtractNullish<T
|
|
81
|
+
type ExtractNullish<T> = Extract<T, null | undefined>;
|
|
78
82
|
//#endregion
|
|
79
83
|
export { AllKeys, AllTrue, DeepNonNullable, DeepPartial, ExtractNullish, IsUnion, MakeMixed, NoneIsUnion, Prettify, SetMultiplicity, Tail };
|
|
80
84
|
//# sourceMappingURL=util.d.ts.map
|