@automateinc/fleet-types 1.0.81-dev.cc51323 → 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,10 +1,34 @@
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";
4
15
  export type StructuredContentTableSortType = "date" | "number" | "string";
16
+ export type StructuredContentTableToolbarFilterType = "DATE_RANGE" | "SELECT";
5
17
  export type StructuredContentLayoutWidth = "auto" | "full" | "half" | "third";
6
18
  export type StructuredContentLayoutAlign = "center" | "end" | "start";
7
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
+ }
8
32
 
9
33
  export interface IStructuredContentNodeLayout {
10
34
  align?: StructuredContentLayoutAlign;
@@ -19,6 +43,7 @@ export interface IStructuredContentNodeLayout {
19
43
 
20
44
  export interface IStructuredContentTableToolbarFilter {
21
45
  columnKey: string;
46
+ type?: StructuredContentTableToolbarFilterType;
22
47
  }
23
48
 
24
49
  export interface IStructuredContentTableToolbar {
@@ -31,6 +56,9 @@ export interface IStructuredContentTablePagination {
31
56
  }
32
57
 
33
58
  export interface IStructuredContentTableColumn {
59
+ config?: {
60
+ size?: number;
61
+ };
34
62
  id: string;
35
63
  name: string;
36
64
  sortType?: StructuredContentTableSortType;
@@ -41,7 +69,7 @@ export interface IStructuredContentTableColumn {
41
69
  export interface IStructuredContentNodeBase {
42
70
  id: string;
43
71
  layout?: IStructuredContentNodeLayout;
44
- type: "COLLAPSE" | "FILES" | "LINK" | "SPACE" | "TABLE" | "TEXT";
72
+ type: "COLLAPSE" | "DEFAULT_AVATAR" | "FILES" | "LINK" | "SPACE" | "TABLE" | "TAG" | "TEXT";
45
73
  }
46
74
 
47
75
  export interface IStructuredContentCollapseNode extends IStructuredContentNodeBase {
@@ -59,6 +87,13 @@ export interface IStructuredContentFilesNode extends IStructuredContentNodeBase
59
87
  type: "FILES";
60
88
  }
61
89
 
90
+ export interface IStructuredContentDefaultAvatarNode extends IStructuredContentNodeBase {
91
+ config?: {
92
+ size?: number;
93
+ };
94
+ type: "DEFAULT_AVATAR";
95
+ }
96
+
62
97
  export interface IStructuredContentSpaceNode extends IStructuredContentNodeBase {
63
98
  children?: IStructuredContentNode[];
64
99
  type: "SPACE";
@@ -71,6 +106,13 @@ export interface IStructuredContentTextNode extends IStructuredContentNodeBase {
71
106
  type: "TEXT";
72
107
  }
73
108
 
109
+ export interface IStructuredContentTagNode extends IStructuredContentNodeBase {
110
+ config?: {
111
+ tone?: StructuredContentTagTone;
112
+ };
113
+ type: "TAG";
114
+ }
115
+
74
116
  export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
75
117
  config?: {
76
118
  variant?: StructuredContentLinkVariant;
@@ -89,9 +131,11 @@ export interface IStructuredContentTableNode extends IStructuredContentNodeBase
89
131
 
90
132
  export type IStructuredContentNode =
91
133
  | IStructuredContentCollapseNode
134
+ | IStructuredContentDefaultAvatarNode
92
135
  | IStructuredContentFilesNode
93
136
  | IStructuredContentLinkNode
94
137
  | IStructuredContentSpaceNode
138
+ | IStructuredContentTagNode
95
139
  | IStructuredContentTableNode
96
140
  | IStructuredContentTextNode;
97
141
 
@@ -102,9 +146,16 @@ export interface IStructuredContentLinkValue {
102
146
  }
103
147
 
104
148
  export type StructuredContentPrimitiveValue = boolean | number | string | null;
105
- 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
+ >;
106
155
  export type StructuredContentDataValue =
156
+ | IStructuredContentDefaultAvatarValue
107
157
  | IStructuredContentLinkValue
158
+ | IStructuredContentTagValue
108
159
  | IStructuredContentTableRow[]
109
160
  | StructuredContentPrimitiveValue;
110
161
  export type IStructuredContentData = Record<string, StructuredContentDataValue>;
@@ -113,9 +164,11 @@ export interface IStructuredContent {
113
164
  createdAt: string;
114
165
  data: IStructuredContentData;
115
166
  id: string;
167
+ key: string;
116
168
  metadata?: unknown;
117
- relation: string;
118
- relationId: number | string;
169
+ rawData: unknown;
170
+ relation: IModel;
171
+ relationId: string;
119
172
  structure: IStructuredContentNode[];
120
173
  updatedAt?: string;
121
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.cc51323"
55
+ "version": "1.0.81-dev.e0e9a5b"
56
56
  }