@lilaquadrat/interfaces 1.56.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 (169) hide show
  1. package/CHANGELOG.md +9 -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 +2 -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 +27 -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 +2 -0
  72. package/lib/esm/TimeTrackingCategory.d.ts +6 -0
  73. package/lib/esm/TimeTrackingCategory.js +2 -0
  74. package/lib/esm/TimeTrackingCategory.js.map +1 -0
  75. package/lib/esm/TimeTrackingMode.d.ts +1 -0
  76. package/lib/esm/TimeTrackingMode.js +2 -0
  77. package/lib/esm/TimeTrackingMode.js.map +1 -0
  78. package/lib/esm/TimeTrackingProject.d.ts +15 -0
  79. package/lib/esm/TimeTrackingProject.js +2 -0
  80. package/lib/esm/TimeTrackingProject.js.map +1 -0
  81. package/lib/esm/TimeTrackingProjectAllocation.d.ts +8 -0
  82. package/lib/esm/TimeTrackingProjectAllocation.js +2 -0
  83. package/lib/esm/TimeTrackingProjectAllocation.js.map +1 -0
  84. package/lib/esm/TimeTrackingProjectAllocationInput.d.ts +2 -0
  85. package/lib/esm/TimeTrackingProjectAllocationInput.js +2 -0
  86. package/lib/esm/TimeTrackingProjectAllocationInput.js.map +1 -0
  87. package/lib/esm/TimeTrackingProjectAllocationUsage.d.ts +8 -0
  88. package/lib/esm/TimeTrackingProjectAllocationUsage.js +2 -0
  89. package/lib/esm/TimeTrackingProjectAllocationUsage.js.map +1 -0
  90. package/lib/esm/TimeTrackingProjectInput.d.ts +2 -0
  91. package/lib/esm/TimeTrackingProjectInput.js +2 -0
  92. package/lib/esm/TimeTrackingProjectInput.js.map +1 -0
  93. package/lib/esm/TimeTrackingProjectListQuery.d.ts +5 -0
  94. package/lib/esm/TimeTrackingProjectListQuery.js +2 -0
  95. package/lib/esm/TimeTrackingProjectListQuery.js.map +1 -0
  96. package/lib/esm/TimeTrackingProjectParams.d.ts +4 -0
  97. package/lib/esm/TimeTrackingProjectParams.js +2 -0
  98. package/lib/esm/TimeTrackingProjectParams.js.map +1 -0
  99. package/lib/esm/Tracker.d.ts +7 -2
  100. package/lib/esm/TrackerBooking.d.ts +25 -0
  101. package/lib/esm/TrackerBooking.js +2 -0
  102. package/lib/esm/TrackerBooking.js.map +1 -0
  103. package/lib/esm/TrackerBookingShift.d.ts +14 -0
  104. package/lib/esm/TrackerBookingShift.js +2 -0
  105. package/lib/esm/TrackerBookingShift.js.map +1 -0
  106. package/lib/esm/TrackerBookingsQuery.d.ts +4 -0
  107. package/lib/esm/TrackerBookingsQuery.js +2 -0
  108. package/lib/esm/TrackerBookingsQuery.js.map +1 -0
  109. package/lib/esm/TrackerCategoriesParams.d.ts +4 -0
  110. package/lib/esm/TrackerCategoriesParams.js +2 -0
  111. package/lib/esm/TrackerCategoriesParams.js.map +1 -0
  112. package/lib/esm/TrackerDayParams.d.ts +4 -0
  113. package/lib/esm/TrackerDayParams.js +2 -0
  114. package/lib/esm/TrackerDayParams.js.map +1 -0
  115. package/lib/esm/TrackerDayQuery.d.ts +4 -0
  116. package/lib/esm/TrackerDayQuery.js +2 -0
  117. package/lib/esm/TrackerDayQuery.js.map +1 -0
  118. package/lib/esm/TrackerListQuery.d.ts +5 -0
  119. package/lib/esm/TrackerListQuery.js +2 -0
  120. package/lib/esm/TrackerListQuery.js.map +1 -0
  121. package/lib/esm/TrackerShiftBooking.d.ts +18 -0
  122. package/lib/esm/TrackerShiftBooking.js +2 -0
  123. package/lib/esm/TrackerShiftBooking.js.map +1 -0
  124. package/lib/esm/TrackerStatistics.d.ts +10 -5
  125. package/lib/esm/TrackerStatisticsQuery.d.ts +7 -0
  126. package/lib/esm/TrackerStatisticsQuery.js +2 -0
  127. package/lib/esm/TrackerStatisticsQuery.js.map +1 -0
  128. package/lib/esm/TrackerUserQuery.d.ts +4 -0
  129. package/lib/esm/TrackerUserQuery.js +2 -0
  130. package/lib/esm/TrackerUserQuery.js.map +1 -0
  131. package/lib/esm/index.d.ts +27 -0
  132. package/package.json +1 -1
  133. package/src/AllocationHoursInput.ts +4 -0
  134. package/src/AllocationIdParams.ts +5 -0
  135. package/src/AllocationParams.ts +5 -0
  136. package/src/AllocationQuery.ts +3 -0
  137. package/src/BookingWindow.ts +4 -0
  138. package/src/GenericData.ts +3 -2
  139. package/src/GenericDataSingle.ts +1 -0
  140. package/src/List.ts +6 -0
  141. package/src/MemberShiftFilters.ts +1 -0
  142. package/src/ProjectIdParams.ts +5 -0
  143. package/src/ProjectParams.ts +4 -0
  144. package/src/ProjectSiteParams.ts +5 -0
  145. package/src/ShiftPlan.ts +2 -0
  146. package/src/ShiftPlanChangeInput.ts +1 -0
  147. package/src/ShiftPlanCreateInput.ts +1 -0
  148. package/src/ShiftPlanSummary.ts +2 -0
  149. package/src/TimeTrackingCategory.ts +8 -0
  150. package/src/TimeTrackingMode.ts +1 -0
  151. package/src/TimeTrackingProject.ts +18 -0
  152. package/src/TimeTrackingProjectAllocation.ts +10 -0
  153. package/src/TimeTrackingProjectAllocationInput.ts +3 -0
  154. package/src/TimeTrackingProjectAllocationUsage.ts +10 -0
  155. package/src/TimeTrackingProjectInput.ts +3 -0
  156. package/src/TimeTrackingProjectListQuery.ts +5 -0
  157. package/src/TimeTrackingProjectParams.ts +5 -0
  158. package/src/Tracker.ts +9 -3
  159. package/src/TrackerBooking.ts +25 -0
  160. package/src/TrackerBookingShift.ts +14 -0
  161. package/src/TrackerBookingsQuery.ts +4 -0
  162. package/src/TrackerCategoriesParams.ts +5 -0
  163. package/src/TrackerDayParams.ts +5 -0
  164. package/src/TrackerDayQuery.ts +5 -0
  165. package/src/TrackerListQuery.ts +6 -0
  166. package/src/TrackerShiftBooking.ts +18 -0
  167. package/src/TrackerStatistics.ts +10 -5
  168. package/src/TrackerStatisticsQuery.ts +8 -0
  169. package/src/TrackerUserQuery.ts +4 -0
@@ -3,6 +3,8 @@ import type { ObjectId } from 'mongodb';
3
3
  export interface ShiftPlanSummary {
4
4
  _id?: ObjectId;
5
5
  name: string;
6
+ /** Publication state, defaulted to `draft` for documents saved before the field existed. */
7
+ state: 'draft' | 'publish';
6
8
  /** Linked employee list identity, resolved to its name; null when the plan has no list. */
7
9
  list: {
8
10
  _id: ObjectId;
@@ -0,0 +1,6 @@
1
+ export interface TimeTrackingCategory {
2
+ id: string;
3
+ name: string;
4
+ maximumHours?: number;
5
+ costsPerHour?: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TimeTrackingCategory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeTrackingCategory.js","sourceRoot":"","sources":["../../src/TimeTrackingCategory.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type TimeTrackingMode = 'hours' | 'fromTo' | 'multiDay' | 'shifts';
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TimeTrackingMode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeTrackingMode.js","sourceRoot":"","sources":["../../src/TimeTrackingMode.ts"],"names":[],"mappings":""}
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TimeTrackingProject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeTrackingProject.js","sourceRoot":"","sources":["../../src/TimeTrackingProject.ts"],"names":[],"mappings":""}
@@ -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
+ export {};
2
+ //# sourceMappingURL=TimeTrackingProjectAllocation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeTrackingProjectAllocation.js","sourceRoot":"","sources":["../../src/TimeTrackingProjectAllocation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import type { TimeTrackingProjectAllocation } from './TimeTrackingProjectAllocation';
2
+ export type TimeTrackingProjectAllocationInput = Omit<TimeTrackingProjectAllocation, 'company' | 'project'>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TimeTrackingProjectAllocationInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeTrackingProjectAllocationInput.js","sourceRoot":"","sources":["../../src/TimeTrackingProjectAllocationInput.ts"],"names":[],"mappings":""}
@@ -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
+ export {};
2
+ //# sourceMappingURL=TimeTrackingProjectAllocationUsage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeTrackingProjectAllocationUsage.js","sourceRoot":"","sources":["../../src/TimeTrackingProjectAllocationUsage.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import type { TimeTrackingProject } from './TimeTrackingProject';
2
+ export type TimeTrackingProjectInput = Omit<TimeTrackingProject, 'company' | 'project'>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TimeTrackingProjectInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeTrackingProjectInput.js","sourceRoot":"","sources":["../../src/TimeTrackingProjectInput.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface TimeTrackingProjectListQuery {
2
+ search?: string;
3
+ sort?: string;
4
+ order?: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TimeTrackingProjectListQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeTrackingProjectListQuery.js","sourceRoot":"","sources":["../../src/TimeTrackingProjectListQuery.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface TimeTrackingProjectParams extends ProjectParams {
3
+ timeTrackingProject: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TimeTrackingProjectParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeTrackingProjectParams.js","sourceRoot":"","sources":["../../src/TimeTrackingProjectParams.ts"],"names":[],"mappings":""}
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TrackerBooking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrackerBooking.js","sourceRoot":"","sources":["../../src/TrackerBooking.ts"],"names":[],"mappings":""}
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TrackerBookingShift.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrackerBookingShift.js","sourceRoot":"","sources":["../../src/TrackerBookingShift.ts"],"names":[],"mappings":""}
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TrackerBookingsQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrackerBookingsQuery.js","sourceRoot":"","sources":["../../src/TrackerBookingsQuery.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface TrackerCategoriesParams extends ProjectParams {
3
+ search: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TrackerCategoriesParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrackerCategoriesParams.js","sourceRoot":"","sources":["../../src/TrackerCategoriesParams.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+ export interface TrackerDayParams extends ProjectParams {
3
+ day: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TrackerDayParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrackerDayParams.js","sourceRoot":"","sources":["../../src/TrackerDayParams.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { TrackerUserQuery } from './TrackerUserQuery';
2
+ export interface TrackerDayQuery extends TrackerUserQuery {
3
+ timeTrackingProject?: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TrackerDayQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrackerDayQuery.js","sourceRoot":"","sources":["../../src/TrackerDayQuery.ts"],"names":[],"mappings":""}
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TrackerListQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrackerListQuery.js","sourceRoot":"","sources":["../../src/TrackerListQuery.ts"],"names":[],"mappings":""}
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TrackerShiftBooking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrackerShiftBooking.js","sourceRoot":"","sources":["../../src/TrackerShiftBooking.ts"],"names":[],"mappings":""}
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TrackerStatisticsQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrackerStatisticsQuery.js","sourceRoot":"","sources":["../../src/TrackerStatisticsQuery.ts"],"names":[],"mappings":""}
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TrackerUserQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrackerUserQuery.js","sourceRoot":"","sources":["../../src/TrackerUserQuery.ts"],"names":[],"mappings":""}
@@ -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';
@@ -284,9 +292,28 @@ export * from './SupportDay';
284
292
  export * from './SystemDomain';
285
293
  export * from './TextModule';
286
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';
287
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';
288
311
  export * from './TrackerInput';
312
+ export * from './TrackerListQuery';
313
+ export * from './TrackerShiftBooking';
289
314
  export * from './TrackerStatistics';
315
+ export * from './TrackerStatisticsQuery';
316
+ export * from './TrackerUserQuery';
290
317
  export * from './TrainingMdule';
291
318
  export * from './Universal';
292
319
  export * from './Upload';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilaquadrat/interfaces",
3
- "version": "1.56.0",
3
+ "version": "1.57.0",
4
4
  "description": "interfaces in context of lilaquadrat STUDIO",
5
5
  "author": {
6
6
  "email": "m.schuebel@lila2.de",
@@ -0,0 +1,4 @@
1
+ export interface AllocationHoursInput {
2
+ /** `null` removes the personal limit */
3
+ hours: number | null;
4
+ }
@@ -0,0 +1,5 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+
3
+ export interface AllocationIdParams extends ProjectParams {
4
+ allocationId: string;
5
+ }
@@ -0,0 +1,5 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+
3
+ export interface AllocationParams extends ProjectParams {
4
+ projectId: string;
5
+ }
@@ -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,14 +3,15 @@ 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
8
 
8
- type CompatibleGenericDataType = 'editor' | 'lists' | 'customers' | 'media' | 'structures';
9
+ type CompatibleGenericDataType = 'editor' | 'lists' | 'customers' | 'media' | 'structures' | 'shiftPlans';
9
10
 
10
11
  type GenericData = {
11
12
  [key in CompatibleGenericDataType]: string[]
12
13
  } & {
13
- data: BasicData<Content | List | Customers | Media | Structure>[];
14
+ data: BasicData<Content | List | Customers | Media | Structure | ShiftPlan>[];
14
15
  }
15
16
 
16
17
 
@@ -5,5 +5,6 @@ export interface GenericDataSingle {
5
5
  lists?: string
6
6
  customers?: string
7
7
  media?: string
8
+ shiftPlans?: string
8
9
  data?: Record<string, Content>
9
10
  }
package/src/List.ts CHANGED
@@ -46,6 +46,12 @@ export interface List {
46
46
  */
47
47
  shiftPlan?: ObjectId
48
48
 
49
+ /**
50
+ * Name of the linked shift plan, resolved on read for display. Not persisted and
51
+ * never sent on create/change; writes still use `shiftPlan`.
52
+ */
53
+ shiftPlanName?: string
54
+
49
55
  content?: ListContent
50
56
 
51
57
  emails?: EmailsContent[]
@@ -3,4 +3,5 @@ import type { ShiftPlanningFilters } from './ShiftPlanningFilters';
3
3
 
4
4
  export interface MemberShiftFilters extends Omit<ShiftPlanningFilters, 'area'> {
5
5
  list?: ObjectId;
6
+ plan?: ObjectId;
6
7
  }
@@ -0,0 +1,5 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+
3
+ export interface ProjectIdParams extends ProjectParams {
4
+ id: string;
5
+ }
@@ -0,0 +1,4 @@
1
+ export interface ProjectParams {
2
+ company: string;
3
+ project: string;
4
+ }
@@ -0,0 +1,5 @@
1
+ import type { ProjectParams } from './ProjectParams';
2
+
3
+ export interface ProjectSiteParams extends ProjectParams {
4
+ site?: string;
5
+ }
package/src/ShiftPlan.ts CHANGED
@@ -11,6 +11,8 @@ export interface ShiftPlan {
11
11
  list?: ObjectId;
12
12
  name: string;
13
13
  timeZone: string;
14
+ /** Publication state; documents created before the field existed read as `draft`. */
15
+ state?: 'draft' | 'publish';
14
16
  settingsOverrides: ShiftPlanningPolicyOverrides;
15
17
  /** One entry per work area used by the plan; binds employee-list categories to that area's shifts. */
16
18
  workAreaCategories?: ShiftPlanWorkArea[];
@@ -8,6 +8,7 @@ export interface ShiftPlanChangeInput {
8
8
  list?: ObjectId;
9
9
  name: string;
10
10
  timeZone: string;
11
+ state?: 'draft' | 'publish';
11
12
  settingsOverrides: ShiftPlanningPolicyOverrides;
12
13
  workAreaCategories?: ShiftPlanWorkArea[];
13
14
  defaultParticipantState?: ListParticipants['state'] | null;
@@ -8,6 +8,7 @@ export interface ShiftPlanCreateInput {
8
8
  list?: ObjectId;
9
9
  name: string;
10
10
  timeZone: string;
11
+ state?: 'draft' | 'publish';
11
12
  settingsOverrides?: ShiftPlanningPolicyOverrides;
12
13
  workAreaCategories?: ShiftPlanWorkArea[];
13
14
  defaultParticipantState?: ListParticipants['state'] | null;
@@ -4,6 +4,8 @@ import type { ObjectId } from 'mongodb';
4
4
  export interface ShiftPlanSummary {
5
5
  _id?: ObjectId;
6
6
  name: string;
7
+ /** Publication state, defaulted to `draft` for documents saved before the field existed. */
8
+ state: 'draft' | 'publish';
7
9
  /** Linked employee list identity, resolved to its name; null when the plan has no list. */
8
10
  list: { _id: ObjectId; name: string } | null;
9
11
  /** Total days of the plan; the list endpoint does not ship the day documents. */
@@ -0,0 +1,8 @@
1
+ export interface TimeTrackingCategory {
2
+
3
+ id: string;
4
+ name: string;
5
+ maximumHours?: number;
6
+ costsPerHour?: number;
7
+
8
+ }
@@ -0,0 +1 @@
1
+ export type TimeTrackingMode = 'hours' | 'fromTo' | 'multiDay' | 'shifts';