@lilaquadrat/interfaces 1.54.0 → 1.55.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
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.55.0](https://github.com/lilaquadrat/interfaces/compare/v1.54.0...v1.55.0) (2026-10-19)
6
+
7
+
8
+ ### Features
9
+
10
+ * **Shift:** add planning scope and plan coverage interfaces ([c85f505](https://github.com/lilaquadrat/interfaces/commit/c85f5054eb3c002142f06aae0f780a4162a6ed6f))
11
+
5
12
  ## [1.54.0](https://github.com/lilaquadrat/interfaces/compare/v1.53.1...v1.54.0) (2026-10-13)
6
13
 
7
14
 
package/lib/cjs/List.d.ts CHANGED
@@ -30,6 +30,11 @@ export interface List {
30
30
  state: 'open' | 'closed' | 'waiting';
31
31
  agreements: Agreement[];
32
32
  categories?: ListCategory[];
33
+ /**
34
+ * Shift plan linked to this list for planning its participants; the referenced
35
+ * plan must belong to the same company and project.
36
+ */
37
+ shiftPlan?: ObjectId;
33
38
  content?: ListContent;
34
39
  emails?: EmailsContent[];
35
40
  }
@@ -0,0 +1,13 @@
1
+ import type { ObjectId } from 'mongodb';
2
+ /**
3
+ * The entity a planning query resolves its requirements for. `shift` and `workArea` score one
4
+ * condition set; `day` and `plan` cover every shift in that scope.
5
+ */
6
+ export interface PlanningScope {
7
+ level: 'shift' | 'workArea' | 'day' | 'plan';
8
+ /** shift level only; absent means the work area's conditions are used. */
9
+ shift?: ObjectId;
10
+ workArea?: ObjectId;
11
+ day?: ObjectId;
12
+ plan?: ObjectId;
13
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Narrows a planning candidate pool by the plan's existing assignments: `all` keeps the whole list,
3
+ * `assigned` keeps people already holding a place, `unassigned` keeps people holding none.
4
+ */
5
+ export type PlanningShiftMembership = 'all' | 'assigned' | 'unassigned';
@@ -0,0 +1,15 @@
1
+ import type { ObjectId } from 'mongodb';
2
+ /** Whether the linked employee list can staff one shift, respecting the plan's rules. */
3
+ export interface ShiftCoverage {
4
+ shift: ObjectId;
5
+ title: string;
6
+ start: string;
7
+ end: string;
8
+ requiredPeople: number;
9
+ matchingPeople: number;
10
+ /** People assigned after the coverage allocation, including existing assignments. */
11
+ assigned: number;
12
+ /** Matching people after the read-only allocation; omitted by older servers and staffing coverage. */
13
+ matching?: number;
14
+ fillable: boolean;
15
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Cheap coverage answer: whether every shift in scope can be staffed. Allocation stops at the
3
+ * first shift that cannot be filled, so no per-shift detail is produced.
4
+ */
5
+ export interface ShiftPlanCoverageSummary {
6
+ fillable: boolean;
7
+ }
@@ -0,0 +1,11 @@
1
+ import type { ObjectId } from 'mongodb';
2
+ import type { ShiftCoverage } from './ShiftCoverage';
3
+ /** Coverage of a day or a whole plan; only the plan's own shifts are compared. */
4
+ export interface ShiftScopeCoverage {
5
+ level: 'day' | 'plan';
6
+ plan: ObjectId;
7
+ shifts: ShiftCoverage[];
8
+ totalShifts: number;
9
+ fillableShifts: number;
10
+ fillable: boolean;
11
+ }
@@ -198,6 +198,8 @@ export * from './PictureSource';
198
198
  export * from './PicturegroupElement';
199
199
  export * from './PicturegroupModule';
200
200
  export * from './PlaeceholderModule';
201
+ export * from './PlanningScope';
202
+ export * from './PlanningShiftMembership';
201
203
  export * from './Price';
202
204
  export * from './PricesElement';
203
205
  export * from './PricesModule';
@@ -230,12 +232,14 @@ export * from './ShiftAssignment';
230
232
  export * from './ShiftAssignmentBreak';
231
233
  export * from './ShiftAssignmentInput';
232
234
  export * from './ShiftAssignmentsInput';
235
+ export * from './ShiftCoverage';
233
236
  export * from './ShiftCreateInput';
234
237
  export * from './ShiftInput';
235
238
  export * from './ShiftParticipant';
236
239
  export * from './ShiftPlan';
237
240
  export * from './ShiftPlanArea';
238
241
  export * from './ShiftPlanChangeInput';
242
+ export * from './ShiftPlanCoverageSummary';
239
243
  export * from './ShiftPlanCreateInput';
240
244
  export * from './ShiftPlanDay';
241
245
  export * from './ShiftPlanDayInput';
@@ -254,6 +258,7 @@ export * from './ShiftPlanningSettingsInput';
254
258
  export * from './ShiftPlanningViolation';
255
259
  export * from './ShiftReportContext';
256
260
  export * from './ShiftResponse';
261
+ export * from './ShiftScopeCoverage';
257
262
  export * from './ShiftWorkingTime';
258
263
  export * from './ShopifyProjectSettings';
259
264
  export * from './ShoppingCartModule';
package/lib/esm/List.d.ts CHANGED
@@ -30,6 +30,11 @@ export interface List {
30
30
  state: 'open' | 'closed' | 'waiting';
31
31
  agreements: Agreement[];
32
32
  categories?: ListCategory[];
33
+ /**
34
+ * Shift plan linked to this list for planning its participants; the referenced
35
+ * plan must belong to the same company and project.
36
+ */
37
+ shiftPlan?: ObjectId;
33
38
  content?: ListContent;
34
39
  emails?: EmailsContent[];
35
40
  }
@@ -0,0 +1,13 @@
1
+ import type { ObjectId } from 'mongodb';
2
+ /**
3
+ * The entity a planning query resolves its requirements for. `shift` and `workArea` score one
4
+ * condition set; `day` and `plan` cover every shift in that scope.
5
+ */
6
+ export interface PlanningScope {
7
+ level: 'shift' | 'workArea' | 'day' | 'plan';
8
+ /** shift level only; absent means the work area's conditions are used. */
9
+ shift?: ObjectId;
10
+ workArea?: ObjectId;
11
+ day?: ObjectId;
12
+ plan?: ObjectId;
13
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PlanningScope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlanningScope.js","sourceRoot":"","sources":["../../src/PlanningScope.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Narrows a planning candidate pool by the plan's existing assignments: `all` keeps the whole list,
3
+ * `assigned` keeps people already holding a place, `unassigned` keeps people holding none.
4
+ */
5
+ export type PlanningShiftMembership = 'all' | 'assigned' | 'unassigned';
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PlanningShiftMembership.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlanningShiftMembership.js","sourceRoot":"","sources":["../../src/PlanningShiftMembership.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import type { ObjectId } from 'mongodb';
2
+ /** Whether the linked employee list can staff one shift, respecting the plan's rules. */
3
+ export interface ShiftCoverage {
4
+ shift: ObjectId;
5
+ title: string;
6
+ start: string;
7
+ end: string;
8
+ requiredPeople: number;
9
+ matchingPeople: number;
10
+ /** People assigned after the coverage allocation, including existing assignments. */
11
+ assigned: number;
12
+ /** Matching people after the read-only allocation; omitted by older servers and staffing coverage. */
13
+ matching?: number;
14
+ fillable: boolean;
15
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ShiftCoverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShiftCoverage.js","sourceRoot":"","sources":["../../src/ShiftCoverage.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Cheap coverage answer: whether every shift in scope can be staffed. Allocation stops at the
3
+ * first shift that cannot be filled, so no per-shift detail is produced.
4
+ */
5
+ export interface ShiftPlanCoverageSummary {
6
+ fillable: boolean;
7
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ShiftPlanCoverageSummary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShiftPlanCoverageSummary.js","sourceRoot":"","sources":["../../src/ShiftPlanCoverageSummary.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { ObjectId } from 'mongodb';
2
+ import type { ShiftCoverage } from './ShiftCoverage';
3
+ /** Coverage of a day or a whole plan; only the plan's own shifts are compared. */
4
+ export interface ShiftScopeCoverage {
5
+ level: 'day' | 'plan';
6
+ plan: ObjectId;
7
+ shifts: ShiftCoverage[];
8
+ totalShifts: number;
9
+ fillableShifts: number;
10
+ fillable: boolean;
11
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ShiftScopeCoverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShiftScopeCoverage.js","sourceRoot":"","sources":["../../src/ShiftScopeCoverage.ts"],"names":[],"mappings":""}
@@ -198,6 +198,8 @@ export * from './PictureSource';
198
198
  export * from './PicturegroupElement';
199
199
  export * from './PicturegroupModule';
200
200
  export * from './PlaeceholderModule';
201
+ export * from './PlanningScope';
202
+ export * from './PlanningShiftMembership';
201
203
  export * from './Price';
202
204
  export * from './PricesElement';
203
205
  export * from './PricesModule';
@@ -230,12 +232,14 @@ export * from './ShiftAssignment';
230
232
  export * from './ShiftAssignmentBreak';
231
233
  export * from './ShiftAssignmentInput';
232
234
  export * from './ShiftAssignmentsInput';
235
+ export * from './ShiftCoverage';
233
236
  export * from './ShiftCreateInput';
234
237
  export * from './ShiftInput';
235
238
  export * from './ShiftParticipant';
236
239
  export * from './ShiftPlan';
237
240
  export * from './ShiftPlanArea';
238
241
  export * from './ShiftPlanChangeInput';
242
+ export * from './ShiftPlanCoverageSummary';
239
243
  export * from './ShiftPlanCreateInput';
240
244
  export * from './ShiftPlanDay';
241
245
  export * from './ShiftPlanDayInput';
@@ -254,6 +258,7 @@ export * from './ShiftPlanningSettingsInput';
254
258
  export * from './ShiftPlanningViolation';
255
259
  export * from './ShiftReportContext';
256
260
  export * from './ShiftResponse';
261
+ export * from './ShiftScopeCoverage';
257
262
  export * from './ShiftWorkingTime';
258
263
  export * from './ShopifyProjectSettings';
259
264
  export * from './ShoppingCartModule';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilaquadrat/interfaces",
3
- "version": "1.54.0",
3
+ "version": "1.55.0",
4
4
  "description": "interfaces in context of lilaquadrat STUDIO",
5
5
  "author": {
6
6
  "email": "m.schuebel@lila2.de",
package/src/List.ts CHANGED
@@ -40,6 +40,12 @@ export interface List {
40
40
 
41
41
  categories?: ListCategory[]
42
42
 
43
+ /**
44
+ * Shift plan linked to this list for planning its participants; the referenced
45
+ * plan must belong to the same company and project.
46
+ */
47
+ shiftPlan?: ObjectId
48
+
43
49
  content?: ListContent
44
50
 
45
51
  emails?: EmailsContent[]
@@ -0,0 +1,14 @@
1
+ import type { ObjectId } from 'mongodb';
2
+
3
+ /**
4
+ * The entity a planning query resolves its requirements for. `shift` and `workArea` score one
5
+ * condition set; `day` and `plan` cover every shift in that scope.
6
+ */
7
+ export interface PlanningScope {
8
+ level: 'shift' | 'workArea' | 'day' | 'plan';
9
+ /** shift level only; absent means the work area's conditions are used. */
10
+ shift?: ObjectId;
11
+ workArea?: ObjectId;
12
+ day?: ObjectId;
13
+ plan?: ObjectId;
14
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Narrows a planning candidate pool by the plan's existing assignments: `all` keeps the whole list,
3
+ * `assigned` keeps people already holding a place, `unassigned` keeps people holding none.
4
+ */
5
+ export type PlanningShiftMembership = 'all' | 'assigned' | 'unassigned';
@@ -0,0 +1,16 @@
1
+ import type { ObjectId } from 'mongodb';
2
+
3
+ /** Whether the linked employee list can staff one shift, respecting the plan's rules. */
4
+ export interface ShiftCoverage {
5
+ shift: ObjectId;
6
+ title: string;
7
+ start: string;
8
+ end: string;
9
+ requiredPeople: number;
10
+ matchingPeople: number;
11
+ /** People assigned after the coverage allocation, including existing assignments. */
12
+ assigned: number;
13
+ /** Matching people after the read-only allocation; omitted by older servers and staffing coverage. */
14
+ matching?: number;
15
+ fillable: boolean;
16
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Cheap coverage answer: whether every shift in scope can be staffed. Allocation stops at the
3
+ * first shift that cannot be filled, so no per-shift detail is produced.
4
+ */
5
+ export interface ShiftPlanCoverageSummary {
6
+ fillable: boolean;
7
+ }
@@ -0,0 +1,12 @@
1
+ import type { ObjectId } from 'mongodb';
2
+ import type { ShiftCoverage } from './ShiftCoverage';
3
+
4
+ /** Coverage of a day or a whole plan; only the plan's own shifts are compared. */
5
+ export interface ShiftScopeCoverage {
6
+ level: 'day' | 'plan';
7
+ plan: ObjectId;
8
+ shifts: ShiftCoverage[];
9
+ totalShifts: number;
10
+ fillableShifts: number;
11
+ fillable: boolean;
12
+ }