@lilaquadrat/interfaces 1.54.0 → 1.56.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 +14 -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/ShiftPlanSummary.d.ts +15 -0
- package/lib/cjs/ShiftScopeCoverage.d.ts +11 -0
- package/lib/cjs/index.d.ts +6 -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/ShiftPlanSummary.d.ts +15 -0
- package/lib/esm/ShiftPlanSummary.js +2 -0
- package/lib/esm/ShiftPlanSummary.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 +6 -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/ShiftPlanSummary.ts +13 -0
- package/src/ShiftScopeCoverage.ts +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.56.0](https://github.com/lilaquadrat/interfaces/compare/v1.55.0...v1.56.0) (2026-10-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **Shift:** add shift plan summary interface ([f3f8d91](https://github.com/lilaquadrat/interfaces/commit/f3f8d91f7527239a0cb55cd463757ebfb5c4d9ec))
|
|
11
|
+
|
|
12
|
+
## [1.55.0](https://github.com/lilaquadrat/interfaces/compare/v1.54.0...v1.55.0) (2026-10-19)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **Shift:** add planning scope and plan coverage interfaces ([c85f505](https://github.com/lilaquadrat/interfaces/commit/c85f5054eb3c002142f06aae0f780a4162a6ed6f))
|
|
18
|
+
|
|
5
19
|
## [1.54.0](https://github.com/lilaquadrat/interfaces/compare/v1.53.1...v1.54.0) (2026-10-13)
|
|
6
20
|
|
|
7
21
|
|
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,15 @@
|
|
|
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
|
+
/** Linked employee list identity, resolved to its name; null when the plan has no list. */
|
|
7
|
+
list: {
|
|
8
|
+
_id: ObjectId;
|
|
9
|
+
name: string;
|
|
10
|
+
} | null;
|
|
11
|
+
/** Total days of the plan; the list endpoint does not ship the day documents. */
|
|
12
|
+
dayCount: number;
|
|
13
|
+
/** Total shifts of the plan, independently of the list's date filter. */
|
|
14
|
+
shiftCount: number;
|
|
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,17 +232,20 @@ 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';
|
|
242
246
|
export * from './ShiftPlanFilters';
|
|
243
247
|
export * from './ShiftPlanResponse';
|
|
248
|
+
export * from './ShiftPlanSummary';
|
|
244
249
|
export * from './ShiftPlanWorkArea';
|
|
245
250
|
export * from './ShiftPlanWorkHours';
|
|
246
251
|
export * from './ShiftPlanningCompanyOptions';
|
|
@@ -254,6 +259,7 @@ export * from './ShiftPlanningSettingsInput';
|
|
|
254
259
|
export * from './ShiftPlanningViolation';
|
|
255
260
|
export * from './ShiftReportContext';
|
|
256
261
|
export * from './ShiftResponse';
|
|
262
|
+
export * from './ShiftScopeCoverage';
|
|
257
263
|
export * from './ShiftWorkingTime';
|
|
258
264
|
export * from './ShopifyProjectSettings';
|
|
259
265
|
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,15 @@
|
|
|
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
|
+
/** Linked employee list identity, resolved to its name; null when the plan has no list. */
|
|
7
|
+
list: {
|
|
8
|
+
_id: ObjectId;
|
|
9
|
+
name: string;
|
|
10
|
+
} | null;
|
|
11
|
+
/** Total days of the plan; the list endpoint does not ship the day documents. */
|
|
12
|
+
dayCount: number;
|
|
13
|
+
/** Total shifts of the plan, independently of the list's date filter. */
|
|
14
|
+
shiftCount: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShiftPlanSummary.js","sourceRoot":"","sources":["../../src/ShiftPlanSummary.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,17 +232,20 @@ 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';
|
|
242
246
|
export * from './ShiftPlanFilters';
|
|
243
247
|
export * from './ShiftPlanResponse';
|
|
248
|
+
export * from './ShiftPlanSummary';
|
|
244
249
|
export * from './ShiftPlanWorkArea';
|
|
245
250
|
export * from './ShiftPlanWorkHours';
|
|
246
251
|
export * from './ShiftPlanningCompanyOptions';
|
|
@@ -254,6 +259,7 @@ export * from './ShiftPlanningSettingsInput';
|
|
|
254
259
|
export * from './ShiftPlanningViolation';
|
|
255
260
|
export * from './ShiftReportContext';
|
|
256
261
|
export * from './ShiftResponse';
|
|
262
|
+
export * from './ShiftScopeCoverage';
|
|
257
263
|
export * from './ShiftWorkingTime';
|
|
258
264
|
export * from './ShopifyProjectSettings';
|
|
259
265
|
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,13 @@
|
|
|
1
|
+
import type { ObjectId } from 'mongodb';
|
|
2
|
+
|
|
3
|
+
/** Lightweight plan row for lists and pickers; the plan detail endpoint returns the full ShiftPlanResponse. */
|
|
4
|
+
export interface ShiftPlanSummary {
|
|
5
|
+
_id?: ObjectId;
|
|
6
|
+
name: string;
|
|
7
|
+
/** Linked employee list identity, resolved to its name; null when the plan has no list. */
|
|
8
|
+
list: { _id: ObjectId; name: string } | null;
|
|
9
|
+
/** Total days of the plan; the list endpoint does not ship the day documents. */
|
|
10
|
+
dayCount: number;
|
|
11
|
+
/** Total shifts of the plan, independently of the list's date filter. */
|
|
12
|
+
shiftCount: number;
|
|
13
|
+
}
|
|
@@ -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
|
+
}
|