@automateinc/fleet-types 1.0.81-dev.08bae97 → 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,16 +1,97 @@
|
|
|
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 =
|
|
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
|
-
|
|
71
|
+
layout?: IStructuredContentNodeLayout;
|
|
72
|
+
type: "COLLAPSE" | "DEFAULT_AVATAR" | "FILES" | "LINK" | "SPACE" | "TABLE" | "TAG" | "TEXT";
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface IStructuredContentCollapseNode extends IStructuredContentNodeBase {
|
|
76
|
+
children?: IStructuredContentNode[];
|
|
77
|
+
config?: {
|
|
78
|
+
title?: string;
|
|
79
|
+
};
|
|
80
|
+
type: "COLLAPSE";
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface IStructuredContentFilesNode extends IStructuredContentNodeBase {
|
|
84
|
+
config?: {
|
|
85
|
+
source?: "HISTORY";
|
|
86
|
+
};
|
|
87
|
+
type: "FILES";
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface IStructuredContentDefaultAvatarNode extends IStructuredContentNodeBase {
|
|
91
|
+
config?: {
|
|
92
|
+
size?: number;
|
|
93
|
+
};
|
|
94
|
+
type: "DEFAULT_AVATAR";
|
|
14
95
|
}
|
|
15
96
|
|
|
16
97
|
export interface IStructuredContentSpaceNode extends IStructuredContentNodeBase {
|
|
@@ -25,6 +106,13 @@ export interface IStructuredContentTextNode extends IStructuredContentNodeBase {
|
|
|
25
106
|
type: "TEXT";
|
|
26
107
|
}
|
|
27
108
|
|
|
109
|
+
export interface IStructuredContentTagNode extends IStructuredContentNodeBase {
|
|
110
|
+
config?: {
|
|
111
|
+
tone?: StructuredContentTagTone;
|
|
112
|
+
};
|
|
113
|
+
type: "TAG";
|
|
114
|
+
}
|
|
115
|
+
|
|
28
116
|
export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
|
|
29
117
|
config?: {
|
|
30
118
|
variant?: StructuredContentLinkVariant;
|
|
@@ -35,13 +123,19 @@ export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
|
|
|
35
123
|
export interface IStructuredContentTableNode extends IStructuredContentNodeBase {
|
|
36
124
|
config?: {
|
|
37
125
|
columns?: IStructuredContentTableColumn[];
|
|
126
|
+
pagination?: IStructuredContentTablePagination;
|
|
127
|
+
toolbar?: IStructuredContentTableToolbar;
|
|
38
128
|
};
|
|
39
129
|
type: "TABLE";
|
|
40
130
|
}
|
|
41
131
|
|
|
42
132
|
export type IStructuredContentNode =
|
|
133
|
+
| IStructuredContentCollapseNode
|
|
134
|
+
| IStructuredContentDefaultAvatarNode
|
|
135
|
+
| IStructuredContentFilesNode
|
|
43
136
|
| IStructuredContentLinkNode
|
|
44
137
|
| IStructuredContentSpaceNode
|
|
138
|
+
| IStructuredContentTagNode
|
|
45
139
|
| IStructuredContentTableNode
|
|
46
140
|
| IStructuredContentTextNode;
|
|
47
141
|
|
|
@@ -52,9 +146,16 @@ export interface IStructuredContentLinkValue {
|
|
|
52
146
|
}
|
|
53
147
|
|
|
54
148
|
export type StructuredContentPrimitiveValue = boolean | number | string | null;
|
|
55
|
-
export type
|
|
149
|
+
export type StructuredContentAvatarValue = IStructuredContentDefaultAvatarValue;
|
|
150
|
+
export type StructuredContentTaggableValue = IStructuredContentTagValue | StructuredContentPrimitiveValue;
|
|
151
|
+
export type IStructuredContentTableRow = Record<
|
|
152
|
+
string,
|
|
153
|
+
IStructuredContentLinkValue | StructuredContentAvatarValue | StructuredContentTaggableValue
|
|
154
|
+
>;
|
|
56
155
|
export type StructuredContentDataValue =
|
|
156
|
+
| IStructuredContentDefaultAvatarValue
|
|
57
157
|
| IStructuredContentLinkValue
|
|
158
|
+
| IStructuredContentTagValue
|
|
58
159
|
| IStructuredContentTableRow[]
|
|
59
160
|
| StructuredContentPrimitiveValue;
|
|
60
161
|
export type IStructuredContentData = Record<string, StructuredContentDataValue>;
|
|
@@ -63,9 +164,11 @@ export interface IStructuredContent {
|
|
|
63
164
|
createdAt: string;
|
|
64
165
|
data: IStructuredContentData;
|
|
65
166
|
id: string;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
167
|
+
key: string;
|
|
168
|
+
metadata?: Record<string, any>;
|
|
169
|
+
rawData: unknown;
|
|
170
|
+
relation: IModel;
|
|
171
|
+
relationId: string;
|
|
69
172
|
structure: IStructuredContentNode[];
|
|
70
173
|
updatedAt?: string;
|
|
71
174
|
}
|
package/package.json
CHANGED