@automateinc/fleet-types 1.0.83 → 1.0.84-dev.f9924e0

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.
@@ -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";
@@ -3,7 +3,6 @@ export interface IRecruitmentPersonalInformation {
3
3
  createdAt: string;
4
4
  updatedAt: string;
5
5
 
6
- educationLevel?: string;
7
6
  firstName?: string;
8
7
  middleNames?: string;
9
8
  fatherName?: string;
@@ -0,0 +1,261 @@
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 IStructuredContentTableToolbarFilterBase {
45
+ columnKey: string;
46
+ }
47
+
48
+ export interface IStructuredContentTableSelectFilter extends IStructuredContentTableToolbarFilterBase {
49
+ config?: {
50
+ initialValue?: string;
51
+ };
52
+ type?: "SELECT";
53
+ }
54
+
55
+ export interface IStructuredContentDateRangeFilterConstraints {
56
+ disableFuture?: boolean;
57
+ disablePast?: boolean;
58
+ disabledDates?: string[];
59
+ disabledWeekdays?: number[];
60
+ maxDate?: string;
61
+ minDate?: string;
62
+ }
63
+
64
+ export interface IStructuredContentDateRangeFilterInitialValue {
65
+ endDate?: string;
66
+ startDate?: string;
67
+ }
68
+
69
+ export interface IStructuredContentTableDateRangeFilter extends IStructuredContentTableToolbarFilterBase {
70
+ config?: {
71
+ constraints?: IStructuredContentDateRangeFilterConstraints;
72
+ initialValue?: IStructuredContentDateRangeFilterInitialValue;
73
+ };
74
+ type: "DATE_RANGE";
75
+ }
76
+
77
+ export type IStructuredContentTableToolbarFilter =
78
+ | IStructuredContentTableDateRangeFilter
79
+ | IStructuredContentTableSelectFilter;
80
+
81
+ export interface IStructuredContentTableToolbar {
82
+ advancedFilters?: boolean;
83
+ exportCsv?: boolean;
84
+ filters?: IStructuredContentTableToolbarFilter[];
85
+ search?: boolean;
86
+ }
87
+
88
+ export interface IStructuredContentTablePagination {
89
+ pageSize?: number;
90
+ }
91
+
92
+ export interface IStructuredContentTableColumnSortConfig {
93
+ sortType?: StructuredContentTableSortType;
94
+ sortable?: boolean;
95
+ }
96
+
97
+ export interface IStructuredContentTableColumnBase {
98
+ id: string;
99
+ type: StructuredContentTableColumnType;
100
+ }
101
+
102
+ export interface IStructuredContentTableNamedColumnBase extends IStructuredContentTableColumnBase {
103
+ name: string;
104
+ }
105
+
106
+ export interface IStructuredContentTableDefaultAvatarColumn extends IStructuredContentTableColumnBase {
107
+ config?: {
108
+ size?: number;
109
+ };
110
+ type: "DEFAULT_AVATAR";
111
+ }
112
+
113
+ export interface IStructuredContentTableBooleanColumn extends IStructuredContentTableNamedColumnBase {
114
+ config?: IStructuredContentTableColumnSortConfig;
115
+ type: "BOOLEAN";
116
+ }
117
+
118
+ export interface IStructuredContentTableDateColumn extends IStructuredContentTableNamedColumnBase {
119
+ config?: IStructuredContentTableColumnSortConfig;
120
+ type: "DATE";
121
+ }
122
+
123
+ export interface IStructuredContentTableDateTimeColumn extends IStructuredContentTableNamedColumnBase {
124
+ config?: IStructuredContentTableColumnSortConfig;
125
+ type: "DATETIME";
126
+ }
127
+
128
+ export interface IStructuredContentTableLinkColumn extends IStructuredContentTableNamedColumnBase {
129
+ config?: IStructuredContentTableColumnSortConfig;
130
+ type: "LINK";
131
+ }
132
+
133
+ export interface IStructuredContentTableNumberColumn extends IStructuredContentTableNamedColumnBase {
134
+ config?: IStructuredContentTableColumnSortConfig;
135
+ type: "NUMBER";
136
+ }
137
+
138
+ export interface IStructuredContentTableTagColumn extends IStructuredContentTableNamedColumnBase {
139
+ config?: IStructuredContentTableColumnSortConfig;
140
+ type: "TAG";
141
+ }
142
+
143
+ export interface IStructuredContentTableTextColumn extends IStructuredContentTableNamedColumnBase {
144
+ config?: IStructuredContentTableColumnSortConfig;
145
+ type: "TEXT";
146
+ }
147
+
148
+ export interface IStructuredContentTableTimeColumn extends IStructuredContentTableNamedColumnBase {
149
+ config?: IStructuredContentTableColumnSortConfig;
150
+ type: "TIME";
151
+ }
152
+
153
+ export type IStructuredContentTableColumn =
154
+ | IStructuredContentTableBooleanColumn
155
+ | IStructuredContentTableDateColumn
156
+ | IStructuredContentTableDateTimeColumn
157
+ | IStructuredContentTableDefaultAvatarColumn
158
+ | IStructuredContentTableLinkColumn
159
+ | IStructuredContentTableNumberColumn
160
+ | IStructuredContentTableTagColumn
161
+ | IStructuredContentTableTextColumn
162
+ | IStructuredContentTableTimeColumn;
163
+
164
+ export interface IStructuredContentNodeBase {
165
+ id: string;
166
+ layout?: IStructuredContentNodeLayout;
167
+ type: "COLLAPSE" | "DEFAULT_AVATAR" | "LINK" | "SPACE" | "TABLE" | "TAG" | "TEXT";
168
+ }
169
+
170
+ export interface IStructuredContentCollapseNode extends IStructuredContentNodeBase {
171
+ children?: IStructuredContentNode[];
172
+ config?: {
173
+ title?: string;
174
+ };
175
+ type: "COLLAPSE";
176
+ }
177
+
178
+ export interface IStructuredContentDefaultAvatarNode extends IStructuredContentNodeBase {
179
+ config?: {
180
+ size?: number;
181
+ };
182
+ type: "DEFAULT_AVATAR";
183
+ }
184
+
185
+ export interface IStructuredContentSpaceNode extends IStructuredContentNodeBase {
186
+ children?: IStructuredContentNode[];
187
+ type: "SPACE";
188
+ }
189
+
190
+ export interface IStructuredContentTextNode extends IStructuredContentNodeBase {
191
+ config?: {
192
+ variant?: StructuredContentTextVariant;
193
+ };
194
+ type: "TEXT";
195
+ }
196
+
197
+ export interface IStructuredContentTagNode extends IStructuredContentNodeBase {
198
+ config?: {
199
+ tone?: StructuredContentTagTone;
200
+ };
201
+ type: "TAG";
202
+ }
203
+
204
+ export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
205
+ config?: {
206
+ variant?: StructuredContentLinkVariant;
207
+ };
208
+ type: "LINK";
209
+ }
210
+
211
+ export interface IStructuredContentTableNode extends IStructuredContentNodeBase {
212
+ config?: {
213
+ columns?: IStructuredContentTableColumn[];
214
+ pagination?: IStructuredContentTablePagination;
215
+ toolbar?: IStructuredContentTableToolbar;
216
+ };
217
+ type: "TABLE";
218
+ }
219
+
220
+ export type IStructuredContentNode =
221
+ | IStructuredContentCollapseNode
222
+ | IStructuredContentDefaultAvatarNode
223
+ | IStructuredContentLinkNode
224
+ | IStructuredContentSpaceNode
225
+ | IStructuredContentTagNode
226
+ | IStructuredContentTableNode
227
+ | IStructuredContentTextNode;
228
+
229
+ export interface IStructuredContentLinkValue {
230
+ href: string;
231
+ target?: string;
232
+ title: string;
233
+ }
234
+
235
+ export type StructuredContentPrimitiveValue = boolean | number | string | null;
236
+ export type StructuredContentAvatarValue = IStructuredContentDefaultAvatarValue;
237
+ export type StructuredContentTaggableValue = IStructuredContentTagValue | StructuredContentPrimitiveValue;
238
+ export type IStructuredContentTableRow = Record<
239
+ string,
240
+ IStructuredContentLinkValue | StructuredContentAvatarValue | StructuredContentTaggableValue
241
+ >;
242
+ export type StructuredContentDataValue =
243
+ | IStructuredContentDefaultAvatarValue
244
+ | IStructuredContentLinkValue
245
+ | IStructuredContentTagValue
246
+ | IStructuredContentTableRow[]
247
+ | StructuredContentPrimitiveValue;
248
+ export type IStructuredContentData = Record<string, StructuredContentDataValue>;
249
+
250
+ export interface IStructuredContent {
251
+ createdAt: string;
252
+ data: IStructuredContentData;
253
+ id: string;
254
+ key: string;
255
+ metadata?: Record<string, any>;
256
+ rawData: unknown;
257
+ relation: IModel;
258
+ relationId: string;
259
+ structure: IStructuredContentNode[];
260
+ updatedAt?: string;
261
+ }
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.83"
55
+ "version": "1.0.84-dev.f9924e0"
56
56
  }