@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 +7 -0
- package/lib/cjs/List.d.ts +5 -0
- package/lib/cjs/PlanningScope.d.ts +13 -0
- package/lib/cjs/PlanningShiftMembership.d.ts +5 -0
- package/lib/cjs/ShiftCoverage.d.ts +15 -0
- package/lib/cjs/ShiftPlanCoverageSummary.d.ts +7 -0
- package/lib/cjs/ShiftScopeCoverage.d.ts +11 -0
- package/lib/cjs/index.d.ts +5 -0
- package/lib/esm/List.d.ts +5 -0
- package/lib/esm/PlanningScope.d.ts +13 -0
- package/lib/esm/PlanningScope.js +2 -0
- package/lib/esm/PlanningScope.js.map +1 -0
- package/lib/esm/PlanningShiftMembership.d.ts +5 -0
- package/lib/esm/PlanningShiftMembership.js +2 -0
- package/lib/esm/PlanningShiftMembership.js.map +1 -0
- package/lib/esm/ShiftCoverage.d.ts +15 -0
- package/lib/esm/ShiftCoverage.js +2 -0
- package/lib/esm/ShiftCoverage.js.map +1 -0
- package/lib/esm/ShiftPlanCoverageSummary.d.ts +7 -0
- package/lib/esm/ShiftPlanCoverageSummary.js +2 -0
- package/lib/esm/ShiftPlanCoverageSummary.js.map +1 -0
- package/lib/esm/ShiftScopeCoverage.d.ts +11 -0
- package/lib/esm/ShiftScopeCoverage.js +2 -0
- package/lib/esm/ShiftScopeCoverage.js.map +1 -0
- package/lib/esm/index.d.ts +5 -0
- package/package.json +1 -1
- package/src/List.ts +6 -0
- package/src/PlanningScope.ts +14 -0
- package/src/PlanningShiftMembership.ts +5 -0
- package/src/ShiftCoverage.ts +16 -0
- package/src/ShiftPlanCoverageSummary.ts +7 -0
- package/src/ShiftScopeCoverage.ts +12 -0
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,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
|
+
}
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"ShiftCoverage.js","sourceRoot":"","sources":["../../src/ShiftCoverage.ts"],"names":[],"mappings":""}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"ShiftScopeCoverage.js","sourceRoot":"","sources":["../../src/ShiftScopeCoverage.ts"],"names":[],"mappings":""}
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -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
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,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
|
+
}
|