@automateinc/fleet-types 1.0.92 → 1.0.94-dev.40834d1

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.
@@ -1,4 +1,4 @@
1
- import { IGender } from "./gender";
1
+ import type { ISchedulingRequirement } from "./scheduling-requirement";
2
2
 
3
3
  export interface IClientQuotationPositionVersion {
4
4
  id: string;
@@ -23,7 +23,7 @@ export interface IClientQuotationPositionVersion {
23
23
 
24
24
  dailyHours: number;
25
25
  dailyCoverage: string;
26
- gender?: IGender | null;
26
+ schedulingRequirements?: ISchedulingRequirement[];
27
27
 
28
28
  metadata?: any;
29
29
  }
@@ -1,3 +1,5 @@
1
+ import type { ISchedulingRequirement } from "./scheduling-requirement";
2
+
1
3
  export interface IClient {
2
4
  id: string;
3
5
  createdAt: string;
@@ -12,5 +14,6 @@ export interface IClient {
12
14
  folderKey: string;
13
15
  classId?: string;
14
16
  statusId: string;
17
+ schedulingRequirements?: ISchedulingRequirement[];
15
18
  metadata?: any;
16
19
  }
@@ -5,6 +5,7 @@ export interface IEmployeeGroup {
5
5
  deletedAt?: string;
6
6
 
7
7
  title: string;
8
+ canBeScheduled: boolean;
8
9
 
9
10
  regionId: string;
10
11
  metadata?: any;
@@ -190,6 +190,7 @@ export * from "./request-type";
190
190
  export * from "./request-value";
191
191
  export * from "./request-verification";
192
192
  export * from "./restriction";
193
+ export * from "./scheduling-requirement";
193
194
  export * from "./role";
194
195
  export * from "./schedule";
195
196
  export * from "./schedule-attendance";
@@ -1,3 +1,5 @@
1
+ import type { ISchedulingRequirement } from "./scheduling-requirement";
2
+
1
3
  export interface IPositionVersion {
2
4
  id: string;
3
5
  updatedAt: Date;
@@ -18,5 +20,6 @@ export interface IPositionVersion {
18
20
 
19
21
  positionId: string;
20
22
  activePositionId: string;
23
+ schedulingRequirements?: ISchedulingRequirement[];
21
24
  metadata?: any;
22
25
  }
@@ -19,6 +19,7 @@ export interface IScheduleDraft {
19
19
  generatedById?: string;
20
20
 
21
21
  verified: boolean;
22
+ isOvertime: boolean;
22
23
 
23
24
  metadata?: any;
24
25
  }
@@ -0,0 +1,52 @@
1
+ import { IGender } from "./gender";
2
+ import type { IEmployeeGroup } from "./employee-group";
3
+ import type { IEmployeeLabel } from "./employee-label";
4
+ import type { IRole } from "./role";
5
+
6
+ export interface ISchedulingRequirement {
7
+ id: string;
8
+ createdAt: string;
9
+ updatedAt?: string;
10
+
11
+ strength: "HARD" | "SOFT";
12
+ gender?: IGender | null;
13
+
14
+ clientId?: string | null;
15
+ positionVersionId?: string | null;
16
+ shiftId?: string | null;
17
+ clientQuotationPositionVersionId?: string | null;
18
+
19
+ roles?: IRole[];
20
+ employeeGroups?: IEmployeeGroup[];
21
+ labels?: IEmployeeLabel[];
22
+ }
23
+
24
+ export interface ISchedulingRequirementSelection {
25
+ roleIds: string[];
26
+ employeeGroupIds: string[];
27
+ labelIds: string[];
28
+ gender?: IGender | null;
29
+ }
30
+
31
+ export interface ISchedulingRequirementsInput {
32
+ hard: ISchedulingRequirementSelection;
33
+ soft: ISchedulingRequirementSelection;
34
+ }
35
+
36
+ export type SchedulingRequirementScope = "CLIENT" | "POSITION" | "SHIFT";
37
+ export type SchedulingRequirementKind = "ROLE" | "EMPLOYEE_GROUP" | "GENDER" | "LABEL";
38
+
39
+ export interface ISchedulingRequirementFailure {
40
+ scope: SchedulingRequirementScope;
41
+ kind: SchedulingRequirementKind;
42
+ expected: string[];
43
+ }
44
+
45
+ export interface ISchedulingRequirementMatch {
46
+ eligible: boolean;
47
+ hardMatched: number;
48
+ hardTotal: number;
49
+ softMatched: number;
50
+ softTotal: number;
51
+ hardFailures: ISchedulingRequirementFailure[];
52
+ }
@@ -1,4 +1,4 @@
1
- import { IShiftType } from ".";
1
+ import { ISchedulingRequirement, IShiftType } from ".";
2
2
 
3
3
  export interface IShift {
4
4
  id: string;
@@ -21,5 +21,6 @@ export interface IShift {
21
21
  coversFriday: boolean;
22
22
 
23
23
  positionId: string;
24
+ schedulingRequirements?: ISchedulingRequirement[];
24
25
  metadata?: any;
25
26
  }
package/package.json CHANGED
@@ -52,5 +52,5 @@
52
52
  "test": "echo \"Error: no test specified\" && exit 1"
53
53
  },
54
54
  "types": "dist/types/index.d.ts",
55
- "version": "1.0.92"
55
+ "version": "1.0.94-dev.40834d1"
56
56
  }