@automateinc/fleet-types 1.0.81-dev.3bc0cf4 → 1.0.81-dev.3caba50

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 {
@@ -26,7 +51,14 @@ export interface IStructuredContentTableToolbar {
26
51
  search?: boolean;
27
52
  }
28
53
 
54
+ export interface IStructuredContentTablePagination {
55
+ pageSize?: number;
56
+ }
57
+
29
58
  export interface IStructuredContentTableColumn {
59
+ config?: {
60
+ size?: number;
61
+ };
30
62
  id: string;
31
63
  name: string;
32
64
  sortType?: StructuredContentTableSortType;
@@ -37,7 +69,7 @@ export interface IStructuredContentTableColumn {
37
69
  export interface IStructuredContentNodeBase {
38
70
  id: string;
39
71
  layout?: IStructuredContentNodeLayout;
40
- type: "COLLAPSE" | "FILES" | "LINK" | "SPACE" | "TABLE" | "TEXT";
72
+ type: "COLLAPSE" | "DEFAULT_AVATAR" | "FILES" | "LINK" | "SPACE" | "TABLE" | "TAG" | "TEXT";
41
73
  }
42
74
 
43
75
  export interface IStructuredContentCollapseNode extends IStructuredContentNodeBase {
@@ -55,6 +87,13 @@ export interface IStructuredContentFilesNode extends IStructuredContentNodeBase
55
87
  type: "FILES";
56
88
  }
57
89
 
90
+ export interface IStructuredContentDefaultAvatarNode extends IStructuredContentNodeBase {
91
+ config?: {
92
+ size?: number;
93
+ };
94
+ type: "DEFAULT_AVATAR";
95
+ }
96
+
58
97
  export interface IStructuredContentSpaceNode extends IStructuredContentNodeBase {
59
98
  children?: IStructuredContentNode[];
60
99
  type: "SPACE";
@@ -67,6 +106,13 @@ export interface IStructuredContentTextNode extends IStructuredContentNodeBase {
67
106
  type: "TEXT";
68
107
  }
69
108
 
109
+ export interface IStructuredContentTagNode extends IStructuredContentNodeBase {
110
+ config?: {
111
+ tone?: StructuredContentTagTone;
112
+ };
113
+ type: "TAG";
114
+ }
115
+
70
116
  export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
71
117
  config?: {
72
118
  variant?: StructuredContentLinkVariant;
@@ -77,6 +123,7 @@ export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
77
123
  export interface IStructuredContentTableNode extends IStructuredContentNodeBase {
78
124
  config?: {
79
125
  columns?: IStructuredContentTableColumn[];
126
+ pagination?: IStructuredContentTablePagination;
80
127
  toolbar?: IStructuredContentTableToolbar;
81
128
  };
82
129
  type: "TABLE";
@@ -84,9 +131,11 @@ export interface IStructuredContentTableNode extends IStructuredContentNodeBase
84
131
 
85
132
  export type IStructuredContentNode =
86
133
  | IStructuredContentCollapseNode
134
+ | IStructuredContentDefaultAvatarNode
87
135
  | IStructuredContentFilesNode
88
136
  | IStructuredContentLinkNode
89
137
  | IStructuredContentSpaceNode
138
+ | IStructuredContentTagNode
90
139
  | IStructuredContentTableNode
91
140
  | IStructuredContentTextNode;
92
141
 
@@ -97,9 +146,16 @@ export interface IStructuredContentLinkValue {
97
146
  }
98
147
 
99
148
  export type StructuredContentPrimitiveValue = boolean | number | string | null;
100
- 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
+ >;
101
155
  export type StructuredContentDataValue =
156
+ | IStructuredContentDefaultAvatarValue
102
157
  | IStructuredContentLinkValue
158
+ | IStructuredContentTagValue
103
159
  | IStructuredContentTableRow[]
104
160
  | StructuredContentPrimitiveValue;
105
161
  export type IStructuredContentData = Record<string, StructuredContentDataValue>;
@@ -108,9 +164,11 @@ export interface IStructuredContent {
108
164
  createdAt: string;
109
165
  data: IStructuredContentData;
110
166
  id: string;
111
- metadata?: unknown;
112
- relation: string;
113
- relationId: number | string;
167
+ key: string;
168
+ metadata?: Record<string, any>;
169
+ rawData: unknown;
170
+ relation: IModel;
171
+ relationId: string;
114
172
  structure: IStructuredContentNode[];
115
173
  updatedAt?: string;
116
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.3bc0cf4"
55
+ "version": "1.0.81-dev.3caba50"
56
56
  }