@automateinc/fleet-types 1.0.81-dev.c188413 → 1.0.81-dev.e0e9a5b

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,16 +1,75 @@
1
+ import { IModel } from "./models";
2
+
1
3
  export type StructuredContentTextVariant = "H1" | "H2" | "H3" | "H4" | "H5" | "H6" | "PARAGRAPH" | "TEXT";
2
4
  export type StructuredContentLinkVariant = "BUTTON" | "LINK";
3
- export type StructuredContentTableColumnType = "BOOLEAN" | "DATE" | "DATETIME" | "LINK" | "NUMBER" | "TEXT" | "TIME";
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
+ }
4
57
 
5
58
  export interface IStructuredContentTableColumn {
59
+ config?: {
60
+ size?: number;
61
+ };
6
62
  id: string;
7
63
  name: string;
64
+ sortType?: StructuredContentTableSortType;
65
+ sortable?: boolean;
8
66
  type: StructuredContentTableColumnType;
9
67
  }
10
68
 
11
69
  export interface IStructuredContentNodeBase {
12
70
  id: string;
13
- type: "COLLAPSE" | "FILES" | "LINK" | "SPACE" | "TABLE" | "TEXT";
71
+ layout?: IStructuredContentNodeLayout;
72
+ type: "COLLAPSE" | "DEFAULT_AVATAR" | "FILES" | "LINK" | "SPACE" | "TABLE" | "TAG" | "TEXT";
14
73
  }
15
74
 
16
75
  export interface IStructuredContentCollapseNode extends IStructuredContentNodeBase {
@@ -28,6 +87,13 @@ export interface IStructuredContentFilesNode extends IStructuredContentNodeBase
28
87
  type: "FILES";
29
88
  }
30
89
 
90
+ export interface IStructuredContentDefaultAvatarNode extends IStructuredContentNodeBase {
91
+ config?: {
92
+ size?: number;
93
+ };
94
+ type: "DEFAULT_AVATAR";
95
+ }
96
+
31
97
  export interface IStructuredContentSpaceNode extends IStructuredContentNodeBase {
32
98
  children?: IStructuredContentNode[];
33
99
  type: "SPACE";
@@ -40,6 +106,13 @@ export interface IStructuredContentTextNode extends IStructuredContentNodeBase {
40
106
  type: "TEXT";
41
107
  }
42
108
 
109
+ export interface IStructuredContentTagNode extends IStructuredContentNodeBase {
110
+ config?: {
111
+ tone?: StructuredContentTagTone;
112
+ };
113
+ type: "TAG";
114
+ }
115
+
43
116
  export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
44
117
  config?: {
45
118
  variant?: StructuredContentLinkVariant;
@@ -50,15 +123,19 @@ export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
50
123
  export interface IStructuredContentTableNode extends IStructuredContentNodeBase {
51
124
  config?: {
52
125
  columns?: IStructuredContentTableColumn[];
126
+ pagination?: IStructuredContentTablePagination;
127
+ toolbar?: IStructuredContentTableToolbar;
53
128
  };
54
129
  type: "TABLE";
55
130
  }
56
131
 
57
132
  export type IStructuredContentNode =
58
133
  | IStructuredContentCollapseNode
134
+ | IStructuredContentDefaultAvatarNode
59
135
  | IStructuredContentFilesNode
60
136
  | IStructuredContentLinkNode
61
137
  | IStructuredContentSpaceNode
138
+ | IStructuredContentTagNode
62
139
  | IStructuredContentTableNode
63
140
  | IStructuredContentTextNode;
64
141
 
@@ -69,9 +146,16 @@ export interface IStructuredContentLinkValue {
69
146
  }
70
147
 
71
148
  export type StructuredContentPrimitiveValue = boolean | number | string | null;
72
- export type IStructuredContentTableRow = Record<string, IStructuredContentLinkValue | StructuredContentPrimitiveValue>;
149
+ export type StructuredContentAvatarValue = IStructuredContentDefaultAvatarValue;
150
+ export type StructuredContentTaggableValue = IStructuredContentTagValue | StructuredContentPrimitiveValue;
151
+ export type IStructuredContentTableRow = Record<
152
+ string,
153
+ IStructuredContentLinkValue | StructuredContentAvatarValue | StructuredContentTaggableValue
154
+ >;
73
155
  export type StructuredContentDataValue =
156
+ | IStructuredContentDefaultAvatarValue
74
157
  | IStructuredContentLinkValue
158
+ | IStructuredContentTagValue
75
159
  | IStructuredContentTableRow[]
76
160
  | StructuredContentPrimitiveValue;
77
161
  export type IStructuredContentData = Record<string, StructuredContentDataValue>;
@@ -80,9 +164,11 @@ export interface IStructuredContent {
80
164
  createdAt: string;
81
165
  data: IStructuredContentData;
82
166
  id: string;
167
+ key: string;
83
168
  metadata?: unknown;
84
- relation: string;
85
- relationId: number | string;
169
+ rawData: unknown;
170
+ relation: IModel;
171
+ relationId: string;
86
172
  structure: IStructuredContentNode[];
87
173
  updatedAt?: string;
88
174
  }
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-dev.c188413"
55
+ "version": "1.0.81-dev.e0e9a5b"
56
56
  }