@automateinc/fleet-types 1.0.81 → 1.0.83-dev.5e169bc

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/AGENTS.md ADDED
@@ -0,0 +1,13 @@
1
+ # Repository Agent Instructions (`fleet-types`)
2
+
3
+ ## Purpose
4
+
5
+ This package defines reusable base Fleet TypeScript types.
6
+
7
+ ## Rules
8
+
9
+ 1. Base types in `fleet-types` must only include scalar/model-owned fields.
10
+ 2. Do not add relation fields to base types.
11
+ 3. Do not add nested related model shapes such as `history?: IFile[]` to base types.
12
+ 4. If a frontend or endpoint needs enriched relation data, define that as a local response type in the consuming app instead of expanding the shared base type.
13
+ 5. Follow the nearest existing declaration pattern in `dist/types` for naming and field shape.
@@ -10,12 +10,7 @@ export interface IClientQuotationPositionVersion {
10
10
  positionVersionId?: string | null;
11
11
 
12
12
  name: string;
13
- status:
14
- | "UNVERIFIED"
15
- | "PENDING_VERIFICATION"
16
- | "VERIFIED"
17
- | "REJECTED"
18
- | "CHANGES_NEEDED";
13
+ status: "UNVERIFIED" | "PENDING_VERIFICATION" | "VERIFIED" | "REJECTED" | "CHANGES_NEEDED";
19
14
  reason?: string | null;
20
15
 
21
16
  coversSaturday: boolean;
@@ -31,4 +26,4 @@ export interface IClientQuotationPositionVersion {
31
26
  gender?: IGender | null;
32
27
 
33
28
  metadata?: any;
34
- }
29
+ }
@@ -10,4 +10,4 @@ export interface IClientQuotationSiteDraft {
10
10
  name: string;
11
11
 
12
12
  metadata?: any;
13
- }
13
+ }
@@ -8,4 +8,4 @@ export interface IClientStatusCheckRequirementConditionGroup {
8
8
  operator?: string;
9
9
  conditions?: IClientStatusCheckRequirementCondition[];
10
10
  metadata?: any;
11
- }
11
+ }
@@ -12,4 +12,4 @@ export interface IClientStatusCheckRequirementCondition {
12
12
  compareValueNumber?: number;
13
13
  compareValueString?: string;
14
14
  metadata?: any;
15
- }
15
+ }
@@ -3,15 +3,15 @@ export interface IContractCost {
3
3
  createdAt: string;
4
4
  updatedAt: string;
5
5
 
6
- name: string;
7
- value: number;
6
+ name: string;
7
+ value: number;
8
8
 
9
- recurrence: "ONE_TIME" | "RECURRING";
9
+ recurrence: "ONE_TIME" | "RECURRING";
10
10
 
11
- duration?: number;
12
- durationType?: "DAY" | "WEEK" | "MONTH" | "YEAR";
11
+ duration?: number;
12
+ durationType?: "DAY" | "WEEK" | "MONTH" | "YEAR";
13
13
 
14
- contractId: string;
14
+ contractId: string;
15
15
 
16
- metadata?: any;
16
+ metadata?: any;
17
17
  }
@@ -21,4 +21,4 @@ export interface IContractSnapshotAllowance {
21
21
  companyId?: string;
22
22
 
23
23
  metadata?: any;
24
- }
24
+ }
@@ -12,4 +12,4 @@ export interface IContractSnapshotBenefit {
12
12
  companyId?: string;
13
13
 
14
14
  metadata?: any;
15
- }
15
+ }
@@ -15,4 +15,4 @@ export interface IContractSnapshotCost {
15
15
  durationType?: "DAY" | "WEEK" | "MONTH" | "YEAR";
16
16
 
17
17
  metadata?: any;
18
- }
18
+ }
@@ -16,4 +16,4 @@ export interface IContractSnapshotDeduction {
16
16
  companyId?: string;
17
17
 
18
18
  metadata?: any;
19
- }
19
+ }
@@ -23,4 +23,4 @@ export interface IContractSnapshot {
23
23
  contractualAllowancesProvided: boolean;
24
24
 
25
25
  metadata?: any;
26
- }
26
+ }
@@ -14,4 +14,4 @@ export interface IEmployeeGroupCost {
14
14
  employeeGroupId: string;
15
15
 
16
16
  metadata?: any;
17
- }
17
+ }
@@ -15,4 +15,4 @@ export interface IEmployeeGroupSnapshotCost {
15
15
  durationType?: "DAY" | "WEEK" | "MONTH" | "YEAR";
16
16
 
17
17
  metadata?: any;
18
- }
18
+ }
@@ -8,4 +8,4 @@ export interface IEmployeeGroupSnapshot {
8
8
  regionId: string;
9
9
 
10
10
  metadata?: any;
11
- }
11
+ }
@@ -190,6 +190,7 @@ export * from "./shift";
190
190
  export * from "./shift-type";
191
191
  export * from "./signing-mode";
192
192
  export * from "./standard-operating-procedure";
193
+ export * from "./structured-content";
193
194
  export * from "./tag";
194
195
  export * from "./tag-color";
195
196
  export * from "./team";
@@ -5,7 +5,7 @@ export interface IShift {
5
5
  updatedAt: Date;
6
6
  createdAt: Date;
7
7
 
8
- class: "MAIN" | "OVERTIME";
8
+ class: "MAIN" | "OVERTIME" | "FLEXIBLE";
9
9
 
10
10
  startTime: number;
11
11
 
@@ -0,0 +1,166 @@
1
+ import { IModel } from "./models";
2
+
3
+ export type StructuredContentTextVariant = "H1" | "H2" | "H3" | "H4" | "H5" | "H6" | "PARAGRAPH" | "TEXT";
4
+ export type StructuredContentLinkVariant = "BUTTON" | "LINK";
5
+ export type StructuredContentTableColumnType =
6
+ | "BOOLEAN"
7
+ | "DATE"
8
+ | "DATETIME"
9
+ | "DEFAULT_AVATAR"
10
+ | "LINK"
11
+ | "NUMBER"
12
+ | "TAG"
13
+ | "TEXT"
14
+ | "TIME";
15
+ export type StructuredContentTableSortType = "date" | "number" | "string";
16
+ export type StructuredContentTableToolbarFilterType = "DATE_RANGE" | "SELECT";
17
+ export type StructuredContentLayoutWidth = "auto" | "full" | "half" | "third";
18
+ export type StructuredContentLayoutAlign = "center" | "end" | "start";
19
+ export type StructuredContentLayoutSpacing = "lg" | "md" | "none" | "sm";
20
+ export type StructuredContentTagTone = "danger" | "default" | "info" | "success" | "warning";
21
+
22
+ export interface IStructuredContentTagValue {
23
+ label: string;
24
+ tone?: StructuredContentTagTone;
25
+ }
26
+
27
+ export interface IStructuredContentDefaultAvatarValue {
28
+ inactive?: boolean;
29
+ onLeave?: boolean;
30
+ src: string;
31
+ }
32
+
33
+ export interface IStructuredContentNodeLayout {
34
+ align?: StructuredContentLayoutAlign;
35
+ gap?: StructuredContentLayoutSpacing;
36
+ hidden?: boolean;
37
+ marginBottom?: StructuredContentLayoutSpacing;
38
+ marginTop?: StructuredContentLayoutSpacing;
39
+ paddingX?: StructuredContentLayoutSpacing;
40
+ paddingY?: StructuredContentLayoutSpacing;
41
+ width?: StructuredContentLayoutWidth;
42
+ }
43
+
44
+ export interface IStructuredContentTableToolbarFilter {
45
+ columnKey: string;
46
+ type?: StructuredContentTableToolbarFilterType;
47
+ }
48
+
49
+ export interface IStructuredContentTableToolbar {
50
+ filters?: IStructuredContentTableToolbarFilter[];
51
+ search?: boolean;
52
+ }
53
+
54
+ export interface IStructuredContentTablePagination {
55
+ pageSize?: number;
56
+ }
57
+
58
+ export interface IStructuredContentTableColumn {
59
+ config?: {
60
+ size?: number;
61
+ };
62
+ id: string;
63
+ name?: string;
64
+ sortType?: StructuredContentTableSortType;
65
+ sortable?: boolean;
66
+ type: StructuredContentTableColumnType;
67
+ }
68
+
69
+ export interface IStructuredContentNodeBase {
70
+ id: string;
71
+ layout?: IStructuredContentNodeLayout;
72
+ type: "COLLAPSE" | "DEFAULT_AVATAR" | "LINK" | "SPACE" | "TABLE" | "TAG" | "TEXT";
73
+ }
74
+
75
+ export interface IStructuredContentCollapseNode extends IStructuredContentNodeBase {
76
+ children?: IStructuredContentNode[];
77
+ config?: {
78
+ title?: string;
79
+ };
80
+ type: "COLLAPSE";
81
+ }
82
+
83
+ export interface IStructuredContentDefaultAvatarNode extends IStructuredContentNodeBase {
84
+ config?: {
85
+ size?: number;
86
+ };
87
+ type: "DEFAULT_AVATAR";
88
+ }
89
+
90
+ export interface IStructuredContentSpaceNode extends IStructuredContentNodeBase {
91
+ children?: IStructuredContentNode[];
92
+ type: "SPACE";
93
+ }
94
+
95
+ export interface IStructuredContentTextNode extends IStructuredContentNodeBase {
96
+ config?: {
97
+ variant?: StructuredContentTextVariant;
98
+ };
99
+ type: "TEXT";
100
+ }
101
+
102
+ export interface IStructuredContentTagNode extends IStructuredContentNodeBase {
103
+ config?: {
104
+ tone?: StructuredContentTagTone;
105
+ };
106
+ type: "TAG";
107
+ }
108
+
109
+ export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
110
+ config?: {
111
+ variant?: StructuredContentLinkVariant;
112
+ };
113
+ type: "LINK";
114
+ }
115
+
116
+ export interface IStructuredContentTableNode extends IStructuredContentNodeBase {
117
+ config?: {
118
+ columns?: IStructuredContentTableColumn[];
119
+ pagination?: IStructuredContentTablePagination;
120
+ toolbar?: IStructuredContentTableToolbar;
121
+ };
122
+ type: "TABLE";
123
+ }
124
+
125
+ export type IStructuredContentNode =
126
+ | IStructuredContentCollapseNode
127
+ | IStructuredContentDefaultAvatarNode
128
+ | IStructuredContentLinkNode
129
+ | IStructuredContentSpaceNode
130
+ | IStructuredContentTagNode
131
+ | IStructuredContentTableNode
132
+ | IStructuredContentTextNode;
133
+
134
+ export interface IStructuredContentLinkValue {
135
+ href: string;
136
+ target?: string;
137
+ title: string;
138
+ }
139
+
140
+ export type StructuredContentPrimitiveValue = boolean | number | string | null;
141
+ export type StructuredContentAvatarValue = IStructuredContentDefaultAvatarValue;
142
+ export type StructuredContentTaggableValue = IStructuredContentTagValue | StructuredContentPrimitiveValue;
143
+ export type IStructuredContentTableRow = Record<
144
+ string,
145
+ IStructuredContentLinkValue | StructuredContentAvatarValue | StructuredContentTaggableValue
146
+ >;
147
+ export type StructuredContentDataValue =
148
+ | IStructuredContentDefaultAvatarValue
149
+ | IStructuredContentLinkValue
150
+ | IStructuredContentTagValue
151
+ | IStructuredContentTableRow[]
152
+ | StructuredContentPrimitiveValue;
153
+ export type IStructuredContentData = Record<string, StructuredContentDataValue>;
154
+
155
+ export interface IStructuredContent {
156
+ createdAt: string;
157
+ data: IStructuredContentData;
158
+ id: string;
159
+ key: string;
160
+ metadata?: Record<string, any>;
161
+ rawData: unknown;
162
+ relation: IModel;
163
+ relationId: string;
164
+ structure: IStructuredContentNode[];
165
+ updatedAt?: string;
166
+ }
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.81"
55
+ "version": "1.0.83-dev.5e169bc"
56
56
  }