@lilaquadrat/interfaces 1.55.0 → 1.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/lib/cjs/AllocationHoursInput.d.ts +4 -0
  3. package/lib/cjs/AllocationIdParams.d.ts +4 -0
  4. package/lib/cjs/AllocationParams.d.ts +4 -0
  5. package/lib/cjs/AllocationQuery.d.ts +3 -0
  6. package/lib/cjs/BookingWindow.d.ts +4 -0
  7. package/lib/cjs/GenericData.d.ts +3 -2
  8. package/lib/cjs/GenericDataSingle.d.ts +1 -0
  9. package/lib/cjs/List.d.ts +5 -0
  10. package/lib/cjs/MemberShiftFilters.d.ts +1 -0
  11. package/lib/cjs/ProjectIdParams.d.ts +4 -0
  12. package/lib/cjs/ProjectParams.d.ts +4 -0
  13. package/lib/cjs/ProjectSiteParams.d.ts +4 -0
  14. package/lib/cjs/ShiftPlan.d.ts +2 -0
  15. package/lib/cjs/ShiftPlanChangeInput.d.ts +1 -0
  16. package/lib/cjs/ShiftPlanCreateInput.d.ts +1 -0
  17. package/lib/cjs/ShiftPlanSummary.d.ts +17 -0
  18. package/lib/cjs/TimeTrackingCategory.d.ts +6 -0
  19. package/lib/cjs/TimeTrackingMode.d.ts +1 -0
  20. package/lib/cjs/TimeTrackingProject.d.ts +15 -0
  21. package/lib/cjs/TimeTrackingProjectAllocation.d.ts +8 -0
  22. package/lib/cjs/TimeTrackingProjectAllocationInput.d.ts +2 -0
  23. package/lib/cjs/TimeTrackingProjectAllocationUsage.d.ts +8 -0
  24. package/lib/cjs/TimeTrackingProjectInput.d.ts +2 -0
  25. package/lib/cjs/TimeTrackingProjectListQuery.d.ts +5 -0
  26. package/lib/cjs/TimeTrackingProjectParams.d.ts +4 -0
  27. package/lib/cjs/Tracker.d.ts +7 -2
  28. package/lib/cjs/TrackerBooking.d.ts +25 -0
  29. package/lib/cjs/TrackerBookingShift.d.ts +14 -0
  30. package/lib/cjs/TrackerBookingsQuery.d.ts +4 -0
  31. package/lib/cjs/TrackerCategoriesParams.d.ts +4 -0
  32. package/lib/cjs/TrackerDayParams.d.ts +4 -0
  33. package/lib/cjs/TrackerDayQuery.d.ts +4 -0
  34. package/lib/cjs/TrackerListQuery.d.ts +5 -0
  35. package/lib/cjs/TrackerShiftBooking.d.ts +18 -0
  36. package/lib/cjs/TrackerStatistics.d.ts +10 -5
  37. package/lib/cjs/TrackerStatisticsQuery.d.ts +7 -0
  38. package/lib/cjs/TrackerUserQuery.d.ts +4 -0
  39. package/lib/cjs/index.d.ts +28 -0
  40. package/lib/esm/AllocationHoursInput.d.ts +4 -0
  41. package/lib/esm/AllocationHoursInput.js +2 -0
  42. package/lib/esm/AllocationHoursInput.js.map +1 -0
  43. package/lib/esm/AllocationIdParams.d.ts +4 -0
  44. package/lib/esm/AllocationIdParams.js +2 -0
  45. package/lib/esm/AllocationIdParams.js.map +1 -0
  46. package/lib/esm/AllocationParams.d.ts +4 -0
  47. package/lib/esm/AllocationParams.js +2 -0
  48. package/lib/esm/AllocationParams.js.map +1 -0
  49. package/lib/esm/AllocationQuery.d.ts +3 -0
  50. package/lib/esm/AllocationQuery.js +2 -0
  51. package/lib/esm/AllocationQuery.js.map +1 -0
  52. package/lib/esm/BookingWindow.d.ts +4 -0
  53. package/lib/esm/BookingWindow.js +2 -0
  54. package/lib/esm/BookingWindow.js.map +1 -0
  55. package/lib/esm/GenericData.d.ts +3 -2
  56. package/lib/esm/GenericDataSingle.d.ts +1 -0
  57. package/lib/esm/List.d.ts +5 -0
  58. package/lib/esm/MemberShiftFilters.d.ts +1 -0
  59. package/lib/esm/ProjectIdParams.d.ts +4 -0
  60. package/lib/esm/ProjectIdParams.js +2 -0
  61. package/lib/esm/ProjectIdParams.js.map +1 -0
  62. package/lib/esm/ProjectParams.d.ts +4 -0
  63. package/lib/esm/ProjectParams.js +2 -0
  64. package/lib/esm/ProjectParams.js.map +1 -0
  65. package/lib/esm/ProjectSiteParams.d.ts +4 -0
  66. package/lib/esm/ProjectSiteParams.js +2 -0
  67. package/lib/esm/ProjectSiteParams.js.map +1 -0
  68. package/lib/esm/ShiftPlan.d.ts +2 -0
  69. package/lib/esm/ShiftPlanChangeInput.d.ts +1 -0
  70. package/lib/esm/ShiftPlanCreateInput.d.ts +1 -0
  71. package/lib/esm/ShiftPlanSummary.d.ts +17 -0
  72. package/lib/esm/ShiftPlanSummary.js +2 -0
  73. package/lib/esm/ShiftPlanSummary.js.map +1 -0
  74. package/lib/esm/TimeTrackingCategory.d.ts +6 -0
  75. package/lib/esm/TimeTrackingCategory.js +2 -0
  76. package/lib/esm/TimeTrackingCategory.js.map +1 -0
  77. package/lib/esm/TimeTrackingMode.d.ts +1 -0
  78. package/lib/esm/TimeTrackingMode.js +2 -0
  79. package/lib/esm/TimeTrackingMode.js.map +1 -0
  80. package/lib/esm/TimeTrackingProject.d.ts +15 -0
  81. package/lib/esm/TimeTrackingProject.js +2 -0
  82. package/lib/esm/TimeTrackingProject.js.map +1 -0
  83. package/lib/esm/TimeTrackingProjectAllocation.d.ts +8 -0
  84. package/lib/esm/TimeTrackingProjectAllocation.js +2 -0
  85. package/lib/esm/TimeTrackingProjectAllocation.js.map +1 -0
  86. package/lib/esm/TimeTrackingProjectAllocationInput.d.ts +2 -0
  87. package/lib/esm/TimeTrackingProjectAllocationInput.js +2 -0
  88. package/lib/esm/TimeTrackingProjectAllocationInput.js.map +1 -0
  89. package/lib/esm/TimeTrackingProjectAllocationUsage.d.ts +8 -0
  90. package/lib/esm/TimeTrackingProjectAllocationUsage.js +2 -0
  91. package/lib/esm/TimeTrackingProjectAllocationUsage.js.map +1 -0
  92. package/lib/esm/TimeTrackingProjectInput.d.ts +2 -0
  93. package/lib/esm/TimeTrackingProjectInput.js +2 -0
  94. package/lib/esm/TimeTrackingProjectInput.js.map +1 -0
  95. package/lib/esm/TimeTrackingProjectListQuery.d.ts +5 -0
  96. package/lib/esm/TimeTrackingProjectListQuery.js +2 -0
  97. package/lib/esm/TimeTrackingProjectListQuery.js.map +1 -0
  98. package/lib/esm/TimeTrackingProjectParams.d.ts +4 -0
  99. package/lib/esm/TimeTrackingProjectParams.js +2 -0
  100. package/lib/esm/TimeTrackingProjectParams.js.map +1 -0
  101. package/lib/esm/Tracker.d.ts +7 -2
  102. package/lib/esm/TrackerBooking.d.ts +25 -0
  103. package/lib/esm/TrackerBooking.js +2 -0
  104. package/lib/esm/TrackerBooking.js.map +1 -0
  105. package/lib/esm/TrackerBookingShift.d.ts +14 -0
  106. package/lib/esm/TrackerBookingShift.js +2 -0
  107. package/lib/esm/TrackerBookingShift.js.map +1 -0
  108. package/lib/esm/TrackerBookingsQuery.d.ts +4 -0
  109. package/lib/esm/TrackerBookingsQuery.js +2 -0
  110. package/lib/esm/TrackerBookingsQuery.js.map +1 -0
  111. package/lib/esm/TrackerCategoriesParams.d.ts +4 -0
  112. package/lib/esm/TrackerCategoriesParams.js +2 -0
  113. package/lib/esm/TrackerCategoriesParams.js.map +1 -0
  114. package/lib/esm/TrackerDayParams.d.ts +4 -0
  115. package/lib/esm/TrackerDayParams.js +2 -0
  116. package/lib/esm/TrackerDayParams.js.map +1 -0
  117. package/lib/esm/TrackerDayQuery.d.ts +4 -0
  118. package/lib/esm/TrackerDayQuery.js +2 -0
  119. package/lib/esm/TrackerDayQuery.js.map +1 -0
  120. package/lib/esm/TrackerListQuery.d.ts +5 -0
  121. package/lib/esm/TrackerListQuery.js +2 -0
  122. package/lib/esm/TrackerListQuery.js.map +1 -0
  123. package/lib/esm/TrackerShiftBooking.d.ts +18 -0
  124. package/lib/esm/TrackerShiftBooking.js +2 -0
  125. package/lib/esm/TrackerShiftBooking.js.map +1 -0
  126. package/lib/esm/TrackerStatistics.d.ts +10 -5
  127. package/lib/esm/TrackerStatisticsQuery.d.ts +7 -0
  128. package/lib/esm/TrackerStatisticsQuery.js +2 -0
  129. package/lib/esm/TrackerStatisticsQuery.js.map +1 -0
  130. package/lib/esm/TrackerUserQuery.d.ts +4 -0
  131. package/lib/esm/TrackerUserQuery.js +2 -0
  132. package/lib/esm/TrackerUserQuery.js.map +1 -0
  133. package/lib/esm/index.d.ts +28 -0
  134. package/package.json +1 -1
  135. package/src/AllocationHoursInput.ts +4 -0
  136. package/src/AllocationIdParams.ts +5 -0
  137. package/src/AllocationParams.ts +5 -0
  138. package/src/AllocationQuery.ts +3 -0
  139. package/src/BookingWindow.ts +4 -0
  140. package/src/GenericData.ts +3 -2
  141. package/src/GenericDataSingle.ts +1 -0
  142. package/src/List.ts +6 -0
  143. package/src/MemberShiftFilters.ts +1 -0
  144. package/src/ProjectIdParams.ts +5 -0
  145. package/src/ProjectParams.ts +4 -0
  146. package/src/ProjectSiteParams.ts +5 -0
  147. package/src/ShiftPlan.ts +2 -0
  148. package/src/ShiftPlanChangeInput.ts +1 -0
  149. package/src/ShiftPlanCreateInput.ts +1 -0
  150. package/src/ShiftPlanSummary.ts +15 -0
  151. package/src/TimeTrackingCategory.ts +8 -0
  152. package/src/TimeTrackingMode.ts +1 -0
  153. package/src/TimeTrackingProject.ts +18 -0
  154. package/src/TimeTrackingProjectAllocation.ts +10 -0
  155. package/src/TimeTrackingProjectAllocationInput.ts +3 -0
  156. package/src/TimeTrackingProjectAllocationUsage.ts +10 -0
  157. package/src/TimeTrackingProjectInput.ts +3 -0
  158. package/src/TimeTrackingProjectListQuery.ts +5 -0
  159. package/src/TimeTrackingProjectParams.ts +5 -0
  160. package/src/Tracker.ts +9 -3
  161. package/src/TrackerBooking.ts +25 -0
  162. package/src/TrackerBookingShift.ts +14 -0
  163. package/src/TrackerBookingsQuery.ts +4 -0
  164. package/src/TrackerCategoriesParams.ts +5 -0
  165. package/src/TrackerDayParams.ts +5 -0
  166. package/src/TrackerDayQuery.ts +5 -0
  167. package/src/TrackerListQuery.ts +6 -0
  168. package/src/TrackerShiftBooking.ts +18 -0
  169. package/src/TrackerStatistics.ts +10 -5
  170. package/src/TrackerStatisticsQuery.ts +8 -0
  171. package/src/TrackerUserQuery.ts +4 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [1.57.0](https://github.com/lilaquadrat/interfaces/compare/v1.56.0...v1.57.0) (2026-10-29)
6
+
7
+
8
+ ### Features
9
+
10
+ * **Shift:** add plan state and list plan name interfaces ([98e9446](https://github.com/lilaquadrat/interfaces/commit/98e9446858a1e9f8febdd0b371bb528f1ebf4122))
11
+ * **Tracker:** add time tracking project and shift booking interfaces ([dd93c2d](https://github.com/lilaquadrat/interfaces/commit/dd93c2d24aa671745bea7b74362d8bb3d8eefe24))
12
+ * **Tracker:** add tracker route params and query interfaces ([f48826a](https://github.com/lilaquadrat/interfaces/commit/f48826a761c7995258eb3aa2c70fdd921ee6af52))
13
+
14
+ ## [1.56.0](https://github.com/lilaquadrat/interfaces/compare/v1.55.0...v1.56.0) (2026-10-21)
15
+
16
+
17
+ ### Features
18
+
19
+ * **Shift:** add shift plan summary interface ([f3f8d91](https://github.com/lilaquadrat/interfaces/commit/f3f8d91f7527239a0cb55cd463757ebfb5c4d9ec))
20
+
5
21
  ## [1.55.0](https://github.com/lilaquadrat/interfaces/compare/v1.54.0...v1.55.0) (2026-10-19)
6
22
 
7
23
 
@@ -0,0 +1,4 @@
1
+ export interface AllocationHoursInput {
2
+ /** `null` removes the personal limit */
3
+ hours: number | null;
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface AllocationIdParams extends ProjectParams {
3
+ allocationId: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface AllocationParams extends ProjectParams {
3
+ projectId: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ export interface AllocationQuery {
2
+ category?: string;
3
+ }
@@ -0,0 +1,4 @@
1
+ export interface BookingWindow {
2
+ from?: string;
3
+ to?: string;
4
+ }
@@ -3,11 +3,12 @@ import { Content } from "./Content";
3
3
  import { Customers } from "./Customers";
4
4
  import { List } from "./List";
5
5
  import { Media } from "./Media";
6
+ import { ShiftPlan } from "./ShiftPlan";
6
7
  import { Structure } from "./Structure";
7
- type CompatibleGenericDataType = 'editor' | 'lists' | 'customers' | 'media' | 'structures';
8
+ type CompatibleGenericDataType = 'editor' | 'lists' | 'customers' | 'media' | 'structures' | 'shiftPlans';
8
9
  type GenericData = {
9
10
  [key in CompatibleGenericDataType]: string[];
10
11
  } & {
11
- data: BasicData<Content | List | Customers | Media | Structure>[];
12
+ data: BasicData<Content | List | Customers | Media | Structure | ShiftPlan>[];
12
13
  };
13
14
  export { GenericData, CompatibleGenericDataType };
@@ -4,5 +4,6 @@ export interface GenericDataSingle {
4
4
  lists?: string;
5
5
  customers?: string;
6
6
  media?: string;
7
+ shiftPlans?: string;
7
8
  data?: Record<string, Content>;
8
9
  }
package/lib/cjs/List.d.ts CHANGED
@@ -35,6 +35,11 @@ export interface List {
35
35
  * plan must belong to the same company and project.
36
36
  */
37
37
  shiftPlan?: ObjectId;
38
+ /**
39
+ * Name of the linked shift plan, resolved on read for display. Not persisted and
40
+ * never sent on create/change; writes still use `shiftPlan`.
41
+ */
42
+ shiftPlanName?: string;
38
43
  content?: ListContent;
39
44
  emails?: EmailsContent[];
40
45
  }
@@ -2,4 +2,5 @@ import type { ObjectId } from 'mongodb';
2
2
  import type { ShiftPlanningFilters } from './ShiftPlanningFilters';
3
3
  export interface MemberShiftFilters extends Omit<ShiftPlanningFilters, 'area'> {
4
4
  list?: ObjectId;
5
+ plan?: ObjectId;
5
6
  }
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface ProjectIdParams extends ProjectParams {
3
+ id: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface ProjectParams {
2
+ company: string;
3
+ project: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface ProjectSiteParams extends ProjectParams {
3
+ site?: string;
4
+ }
@@ -10,6 +10,8 @@ export interface ShiftPlan {
10
10
  list?: ObjectId;
11
11
  name: string;
12
12
  timeZone: string;
13
+ /** Publication state; documents created before the field existed read as `draft`. */
14
+ state?: 'draft' | 'publish';
13
15
  settingsOverrides: ShiftPlanningPolicyOverrides;
14
16
  /** One entry per work area used by the plan; binds employee-list categories to that area's shifts. */
15
17
  workAreaCategories?: ShiftPlanWorkArea[];
@@ -7,6 +7,7 @@ export interface ShiftPlanChangeInput {
7
7
  list?: ObjectId;
8
8
  name: string;
9
9
  timeZone: string;
10
+ state?: 'draft' | 'publish';
10
11
  settingsOverrides: ShiftPlanningPolicyOverrides;
11
12
  workAreaCategories?: ShiftPlanWorkArea[];
12
13
  defaultParticipantState?: ListParticipants['state'] | null;
@@ -7,6 +7,7 @@ export interface ShiftPlanCreateInput {
7
7
  list?: ObjectId;
8
8
  name: string;
9
9
  timeZone: string;
10
+ state?: 'draft' | 'publish';
10
11
  settingsOverrides?: ShiftPlanningPolicyOverrides;
11
12
  workAreaCategories?: ShiftPlanWorkArea[];
12
13
  defaultParticipantState?: ListParticipants['state'] | null;
@@ -0,0 +1,17 @@
1
+ import type { ObjectId } from 'mongodb';
2
+ /** Lightweight plan row for lists and pickers; the plan detail endpoint returns the full ShiftPlanResponse. */
3
+ export interface ShiftPlanSummary {
4
+ _id?: ObjectId;
5
+ name: string;
6
+ /** Publication state, defaulted to `draft` for documents saved before the field existed. */
7
+ state: 'draft' | 'publish';
8
+ /** Linked employee list identity, resolved to its name; null when the plan has no list. */
9
+ list: {
10
+ _id: ObjectId;
11
+ name: string;
12
+ } | null;
13
+ /** Total days of the plan; the list endpoint does not ship the day documents. */
14
+ dayCount: number;
15
+ /** Total shifts of the plan, independently of the list's date filter. */
16
+ shiftCount: number;
17
+ }
@@ -0,0 +1,6 @@
1
+ export interface TimeTrackingCategory {
2
+ id: string;
3
+ name: string;
4
+ maximumHours?: number;
5
+ costsPerHour?: number;
6
+ }
@@ -0,0 +1 @@
1
+ export type TimeTrackingMode = 'hours' | 'fromTo' | 'multiDay' | 'shifts';
@@ -0,0 +1,15 @@
1
+ import type { TimeTrackingCategory } from './TimeTrackingCategory';
2
+ import type { TimeTrackingMode } from './TimeTrackingMode';
3
+ export interface TimeTrackingProject {
4
+ id: string;
5
+ company: string;
6
+ project: string;
7
+ name: string;
8
+ description?: string;
9
+ maximumHours?: number;
10
+ maximumHoursPerDay?: number;
11
+ modes: TimeTrackingMode;
12
+ shiftPlan?: string;
13
+ /** categories partition the budget; a plan that links a shift plan books on shifts and needs none */
14
+ categories?: TimeTrackingCategory[];
15
+ }
@@ -0,0 +1,8 @@
1
+ export interface TimeTrackingProjectAllocation {
2
+ company: string;
3
+ project: string;
4
+ timeTrackingProject: string;
5
+ category: string;
6
+ user: string;
7
+ hours?: number;
8
+ }
@@ -0,0 +1,2 @@
1
+ import type { TimeTrackingProjectAllocation } from './TimeTrackingProjectAllocation';
2
+ export type TimeTrackingProjectAllocationInput = Omit<TimeTrackingProjectAllocation, 'company' | 'project'>;
@@ -0,0 +1,8 @@
1
+ /** how much of the hours allocated to a person in one category the person has booked so far */
2
+ export interface TimeTrackingProjectAllocationUsage {
3
+ category: string;
4
+ /** the allocated hours, missing when the person is allocated without a limit */
5
+ hours?: number;
6
+ /** everything the person booked on the category of the plan, in milliseconds */
7
+ bookedTime: number;
8
+ }
@@ -0,0 +1,2 @@
1
+ import type { TimeTrackingProject } from './TimeTrackingProject';
2
+ export type TimeTrackingProjectInput = Omit<TimeTrackingProject, 'company' | 'project'>;
@@ -0,0 +1,5 @@
1
+ export interface TimeTrackingProjectListQuery {
2
+ search?: string;
3
+ sort?: string;
4
+ order?: string;
5
+ }
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface TimeTrackingProjectParams extends ProjectParams {
3
+ timeTrackingProject: string;
4
+ }
@@ -1,9 +1,11 @@
1
1
  import { Me } from "./Me";
2
- import { TrackerCategories } from "./TrackerStatistics";
2
+ /** the grouping key of a time entry: a shift id for shift bookings, a category id otherwise */
3
+ export type TrackerGroup = string;
3
4
  export interface Tracker {
4
5
  indexedKey?: string;
5
6
  description?: string;
6
- category?: TrackerCategories;
7
+ /** legacy `worktime`|`call` or a plan category id; absent when the entry books on a shift */
8
+ category?: TrackerGroup;
7
9
  startTime?: Date;
8
10
  endTime?: Date;
9
11
  currentTime?: number;
@@ -11,4 +13,7 @@ export interface Tracker {
11
13
  user?: Pick<Me, 'lastname' | 'prename' | 'id' | 'email'> | string;
12
14
  company: string;
13
15
  project: string;
16
+ timeTrackingProject: string;
17
+ shift?: string;
18
+ customer?: string;
14
19
  }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * One time entry of a time tracking project as the plan view lists it. A booking carries either a
3
+ * category (plan categories, legacy `worktime`|`call`) or a shift, never both for new entries.
4
+ */
5
+ export interface TrackerBooking {
6
+ /** tracker entry ObjectId as hex string, the id the single entry screen edits and removes */
7
+ id: string;
8
+ /** plan category id or legacy `worktime`|`call`; absent when the entry books on a shift */
9
+ category?: string;
10
+ /** shift ObjectId as hex string; absent when the entry books on a category */
11
+ shift?: string;
12
+ description?: string;
13
+ /** the account that booked the entry; names are absent when the account has no profile */
14
+ user: {
15
+ id: string;
16
+ prename?: string;
17
+ lastname?: string;
18
+ };
19
+ /** ISO instant */
20
+ startTime?: string;
21
+ /** ISO instant */
22
+ endTime?: string;
23
+ /** milliseconds */
24
+ currentTime: number;
25
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A shift one person may book tracked time on. The tracker app owns this projection so a member
3
+ * does not need `shifts:read`: the server resolves the caller's customer and only returns the
4
+ * shifts that customer is assigned to.
5
+ */
6
+ export interface TrackerBookingShift {
7
+ /** shift ObjectId as hex string, the value a tracker entry stores as `shift` */
8
+ _id: string;
9
+ title: string;
10
+ /** ISO instant, the shift's planned start */
11
+ start: string;
12
+ /** ISO instant, the shift's planned end */
13
+ end: string;
14
+ }
@@ -0,0 +1,4 @@
1
+ import type { BookingWindow } from './BookingWindow';
2
+ import type { TrackerUserQuery } from './TrackerUserQuery';
3
+ export interface TrackerBookingsQuery extends BookingWindow, TrackerUserQuery {
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface TrackerCategoriesParams extends ProjectParams {
3
+ search: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface TrackerDayParams extends ProjectParams {
3
+ day: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { TrackerUserQuery } from './TrackerUserQuery';
2
+ export interface TrackerDayQuery extends TrackerUserQuery {
3
+ timeTrackingProject?: string;
4
+ }
@@ -0,0 +1,5 @@
1
+ import type { TrackerUserQuery } from './TrackerUserQuery';
2
+ /** every other key is passed on to the list filter */
3
+ export interface TrackerListQuery extends TrackerUserQuery {
4
+ [key: string]: string | undefined;
5
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * One time entry booked on a shift. The person is the shift assignment's customer, so it resolves
3
+ * against the shift's participants.
4
+ */
5
+ export interface TrackerShiftBooking {
6
+ /** tracker entry ObjectId as hex string, the id the single entry screen edits and removes */
7
+ id: string;
8
+ /** shift ObjectId as hex string */
9
+ shift: string;
10
+ /** customer ObjectId as hex string; absent when the entry's owner has no connected customer */
11
+ customer?: string;
12
+ /** ISO instant */
13
+ startTime?: string;
14
+ /** ISO instant */
15
+ endTime?: string;
16
+ /** milliseconds */
17
+ currentTime: number;
18
+ }
@@ -1,16 +1,21 @@
1
- import { Tracker } from "./Tracker";
1
+ import { Tracker, TrackerGroup } from "./Tracker";
2
+ /** the two category values plans created before categories existed recorded time under */
2
3
  export type TrackerCategories = 'call' | 'worktime' | 'all';
3
4
  export interface TrackerData {
4
5
  count: number;
5
6
  time: number;
6
7
  }
8
+ /**
9
+ * the `categories` maps are keyed by the grouping of an entry: a shift id for shift bookings,
10
+ * a category id (or the legacy `worktime`|`call`) otherwise
11
+ */
7
12
  export interface TrackerStatistics {
8
13
  count: number;
9
14
  all: TrackerData;
10
15
  categories: {
11
- all?: Partial<Record<TrackerCategories, TrackerData>>;
12
- byMonth?: Partial<Record<string, Partial<Record<TrackerCategories, TrackerData>>>>;
13
- byDay?: Partial<Record<string, Partial<Record<TrackerCategories, TrackerData>>>>;
16
+ all?: Partial<Record<TrackerGroup, TrackerData>>;
17
+ byMonth?: Partial<Record<string, Partial<Record<TrackerGroup, TrackerData>>>>;
18
+ byDay?: Partial<Record<string, Partial<Record<TrackerGroup, TrackerData>>>>;
14
19
  };
15
20
  start: Date;
16
21
  end: Date;
@@ -18,6 +23,6 @@ export interface TrackerStatistics {
18
23
  export interface TrackerStatisticsDay {
19
24
  data: Tracker[];
20
25
  count: number;
21
- statistics: Partial<Record<TrackerCategories, TrackerData>>;
26
+ statistics: Partial<Record<TrackerGroup, TrackerData>>;
22
27
  date: Date;
23
28
  }
@@ -0,0 +1,7 @@
1
+ import type { TrackerUserQuery } from './TrackerUserQuery';
2
+ export interface TrackerStatisticsQuery extends TrackerUserQuery {
3
+ month?: string;
4
+ year?: string;
5
+ timeTrackingProject?: string;
6
+ wholePlan?: string;
7
+ }
@@ -0,0 +1,4 @@
1
+ export interface TrackerUserQuery {
2
+ /** a person's account id or `all`; only honoured for `tracker:admin` */
3
+ user?: string;
4
+ }
@@ -6,6 +6,10 @@ export * from './AdditionalContentInformation';
6
6
  export * from './Address';
7
7
  export * from './Agreement';
8
8
  export * from './AgreementResponse';
9
+ export * from './AllocationHoursInput';
10
+ export * from './AllocationIdParams';
11
+ export * from './AllocationParams';
12
+ export * from './AllocationQuery';
9
13
  export * from './ApiResponses';
10
14
  export * from './App';
11
15
  export * from './AppEditorConfiguration';
@@ -20,6 +24,7 @@ export * from './BaseFilterOptions';
20
24
  export * from './BasicData';
21
25
  export * from './BasicDataDatabase';
22
26
  export * from './BlogIntroModule';
27
+ export * from './BookingWindow';
23
28
  export * from './CallResponse';
24
29
  export * from './CallToActionModule';
25
30
  export * from './Cart';
@@ -206,6 +211,9 @@ export * from './PricesModule';
206
211
  export * from './Project';
207
212
  export * from './ProjectDomain';
208
213
  export * from './ProjectDomainWithSecret';
214
+ export * from './ProjectIdParams';
215
+ export * from './ProjectParams';
216
+ export * from './ProjectSiteParams';
209
217
  export * from './ProjectWithCompany';
210
218
  export * from './Publish';
211
219
  export * from './PublishContentGroup';
@@ -245,6 +253,7 @@ export * from './ShiftPlanDay';
245
253
  export * from './ShiftPlanDayInput';
246
254
  export * from './ShiftPlanFilters';
247
255
  export * from './ShiftPlanResponse';
256
+ export * from './ShiftPlanSummary';
248
257
  export * from './ShiftPlanWorkArea';
249
258
  export * from './ShiftPlanWorkHours';
250
259
  export * from './ShiftPlanningCompanyOptions';
@@ -283,9 +292,28 @@ export * from './SupportDay';
283
292
  export * from './SystemDomain';
284
293
  export * from './TextModule';
285
294
  export * from './Textblock';
295
+ export * from './TimeTrackingCategory';
296
+ export * from './TimeTrackingMode';
297
+ export * from './TimeTrackingProject';
298
+ export * from './TimeTrackingProjectAllocation';
299
+ export * from './TimeTrackingProjectAllocationInput';
300
+ export * from './TimeTrackingProjectAllocationUsage';
301
+ export * from './TimeTrackingProjectInput';
302
+ export * from './TimeTrackingProjectListQuery';
303
+ export * from './TimeTrackingProjectParams';
286
304
  export * from './Tracker';
305
+ export * from './TrackerBooking';
306
+ export * from './TrackerBookingShift';
307
+ export * from './TrackerBookingsQuery';
308
+ export * from './TrackerCategoriesParams';
309
+ export * from './TrackerDayParams';
310
+ export * from './TrackerDayQuery';
287
311
  export * from './TrackerInput';
312
+ export * from './TrackerListQuery';
313
+ export * from './TrackerShiftBooking';
288
314
  export * from './TrackerStatistics';
315
+ export * from './TrackerStatisticsQuery';
316
+ export * from './TrackerUserQuery';
289
317
  export * from './TrainingMdule';
290
318
  export * from './Universal';
291
319
  export * from './Upload';
@@ -0,0 +1,4 @@
1
+ export interface AllocationHoursInput {
2
+ /** `null` removes the personal limit */
3
+ hours: number | null;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AllocationHoursInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AllocationHoursInput.js","sourceRoot":"","sources":["../../src/AllocationHoursInput.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface AllocationIdParams extends ProjectParams {
3
+ allocationId: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AllocationIdParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AllocationIdParams.js","sourceRoot":"","sources":["../../src/AllocationIdParams.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface AllocationParams extends ProjectParams {
3
+ projectId: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AllocationParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AllocationParams.js","sourceRoot":"","sources":["../../src/AllocationParams.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export interface AllocationQuery {
2
+ category?: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AllocationQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AllocationQuery.js","sourceRoot":"","sources":["../../src/AllocationQuery.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface BookingWindow {
2
+ from?: string;
3
+ to?: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BookingWindow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BookingWindow.js","sourceRoot":"","sources":["../../src/BookingWindow.ts"],"names":[],"mappings":""}
@@ -3,11 +3,12 @@ import { Content } from "./Content";
3
3
  import { Customers } from "./Customers";
4
4
  import { List } from "./List";
5
5
  import { Media } from "./Media";
6
+ import { ShiftPlan } from "./ShiftPlan";
6
7
  import { Structure } from "./Structure";
7
- type CompatibleGenericDataType = 'editor' | 'lists' | 'customers' | 'media' | 'structures';
8
+ type CompatibleGenericDataType = 'editor' | 'lists' | 'customers' | 'media' | 'structures' | 'shiftPlans';
8
9
  type GenericData = {
9
10
  [key in CompatibleGenericDataType]: string[];
10
11
  } & {
11
- data: BasicData<Content | List | Customers | Media | Structure>[];
12
+ data: BasicData<Content | List | Customers | Media | Structure | ShiftPlan>[];
12
13
  };
13
14
  export { GenericData, CompatibleGenericDataType };
@@ -4,5 +4,6 @@ export interface GenericDataSingle {
4
4
  lists?: string;
5
5
  customers?: string;
6
6
  media?: string;
7
+ shiftPlans?: string;
7
8
  data?: Record<string, Content>;
8
9
  }
package/lib/esm/List.d.ts CHANGED
@@ -35,6 +35,11 @@ export interface List {
35
35
  * plan must belong to the same company and project.
36
36
  */
37
37
  shiftPlan?: ObjectId;
38
+ /**
39
+ * Name of the linked shift plan, resolved on read for display. Not persisted and
40
+ * never sent on create/change; writes still use `shiftPlan`.
41
+ */
42
+ shiftPlanName?: string;
38
43
  content?: ListContent;
39
44
  emails?: EmailsContent[];
40
45
  }
@@ -2,4 +2,5 @@ import type { ObjectId } from 'mongodb';
2
2
  import type { ShiftPlanningFilters } from './ShiftPlanningFilters';
3
3
  export interface MemberShiftFilters extends Omit<ShiftPlanningFilters, 'area'> {
4
4
  list?: ObjectId;
5
+ plan?: ObjectId;
5
6
  }
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface ProjectIdParams extends ProjectParams {
3
+ id: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ProjectIdParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectIdParams.js","sourceRoot":"","sources":["../../src/ProjectIdParams.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface ProjectParams {
2
+ company: string;
3
+ project: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ProjectParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectParams.js","sourceRoot":"","sources":["../../src/ProjectParams.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface ProjectSiteParams extends ProjectParams {
3
+ site?: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ProjectSiteParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectSiteParams.js","sourceRoot":"","sources":["../../src/ProjectSiteParams.ts"],"names":[],"mappings":""}
@@ -10,6 +10,8 @@ export interface ShiftPlan {
10
10
  list?: ObjectId;
11
11
  name: string;
12
12
  timeZone: string;
13
+ /** Publication state; documents created before the field existed read as `draft`. */
14
+ state?: 'draft' | 'publish';
13
15
  settingsOverrides: ShiftPlanningPolicyOverrides;
14
16
  /** One entry per work area used by the plan; binds employee-list categories to that area's shifts. */
15
17
  workAreaCategories?: ShiftPlanWorkArea[];