@automateinc/fleet-types 1.0.80 → 1.0.81-dev.08bae97

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.
@@ -189,6 +189,7 @@ export * from "./shift";
189
189
  export * from "./shift-type";
190
190
  export * from "./signing-mode";
191
191
  export * from "./standard-operating-procedure";
192
+ export * from "./structured-content";
192
193
  export * from "./tag";
193
194
  export * from "./tag-color";
194
195
  export * from "./team";
@@ -0,0 +1,71 @@
1
+ export type StructuredContentTextVariant = "H1" | "H2" | "H3" | "H4" | "H5" | "H6" | "PARAGRAPH" | "TEXT";
2
+ export type StructuredContentLinkVariant = "BUTTON" | "LINK";
3
+ export type StructuredContentTableColumnType = "BOOLEAN" | "DATE" | "DATETIME" | "LINK" | "NUMBER" | "TEXT" | "TIME";
4
+
5
+ export interface IStructuredContentTableColumn {
6
+ id: string;
7
+ name: string;
8
+ type: StructuredContentTableColumnType;
9
+ }
10
+
11
+ export interface IStructuredContentNodeBase {
12
+ id: string;
13
+ type: "LINK" | "SPACE" | "TABLE" | "TEXT";
14
+ }
15
+
16
+ export interface IStructuredContentSpaceNode extends IStructuredContentNodeBase {
17
+ children?: IStructuredContentNode[];
18
+ type: "SPACE";
19
+ }
20
+
21
+ export interface IStructuredContentTextNode extends IStructuredContentNodeBase {
22
+ config?: {
23
+ variant?: StructuredContentTextVariant;
24
+ };
25
+ type: "TEXT";
26
+ }
27
+
28
+ export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
29
+ config?: {
30
+ variant?: StructuredContentLinkVariant;
31
+ };
32
+ type: "LINK";
33
+ }
34
+
35
+ export interface IStructuredContentTableNode extends IStructuredContentNodeBase {
36
+ config?: {
37
+ columns?: IStructuredContentTableColumn[];
38
+ };
39
+ type: "TABLE";
40
+ }
41
+
42
+ export type IStructuredContentNode =
43
+ | IStructuredContentLinkNode
44
+ | IStructuredContentSpaceNode
45
+ | IStructuredContentTableNode
46
+ | IStructuredContentTextNode;
47
+
48
+ export interface IStructuredContentLinkValue {
49
+ href: string;
50
+ target?: string;
51
+ title: string;
52
+ }
53
+
54
+ export type StructuredContentPrimitiveValue = boolean | number | string | null;
55
+ export type IStructuredContentTableRow = Record<string, IStructuredContentLinkValue | StructuredContentPrimitiveValue>;
56
+ export type StructuredContentDataValue =
57
+ | IStructuredContentLinkValue
58
+ | IStructuredContentTableRow[]
59
+ | StructuredContentPrimitiveValue;
60
+ export type IStructuredContentData = Record<string, StructuredContentDataValue>;
61
+
62
+ export interface IStructuredContent {
63
+ createdAt: string;
64
+ data: IStructuredContentData;
65
+ id: string;
66
+ metadata?: unknown;
67
+ relation: string;
68
+ relationId: number | string;
69
+ structure: IStructuredContentNode[];
70
+ updatedAt?: string;
71
+ }
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.80"
55
+ "version": "1.0.81-dev.08bae97"
56
56
  }