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

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,19 @@
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 = "BOOLEAN" | "DATE" | "DATETIME" | "LINK" | "NUMBER" | "TAG" | "TEXT" | "TIME";
4
6
  export type StructuredContentTableSortType = "date" | "number" | "string";
7
+ export type StructuredContentTableToolbarFilterType = "DATE_RANGE" | "SELECT";
5
8
  export type StructuredContentLayoutWidth = "auto" | "full" | "half" | "third";
6
9
  export type StructuredContentLayoutAlign = "center" | "end" | "start";
7
10
  export type StructuredContentLayoutSpacing = "lg" | "md" | "none" | "sm";
11
+ export type StructuredContentTagTone = "danger" | "default" | "info" | "success" | "warning";
12
+
13
+ export interface IStructuredContentTagValue {
14
+ label: string;
15
+ tone?: StructuredContentTagTone;
16
+ }
8
17
 
9
18
  export interface IStructuredContentNodeLayout {
10
19
  align?: StructuredContentLayoutAlign;
@@ -19,6 +28,7 @@ export interface IStructuredContentNodeLayout {
19
28
 
20
29
  export interface IStructuredContentTableToolbarFilter {
21
30
  columnKey: string;
31
+ type?: StructuredContentTableToolbarFilterType;
22
32
  }
23
33
 
24
34
  export interface IStructuredContentTableToolbar {
@@ -26,6 +36,10 @@ export interface IStructuredContentTableToolbar {
26
36
  search?: boolean;
27
37
  }
28
38
 
39
+ export interface IStructuredContentTablePagination {
40
+ pageSize?: number;
41
+ }
42
+
29
43
  export interface IStructuredContentTableColumn {
30
44
  id: string;
31
45
  name: string;
@@ -37,7 +51,7 @@ export interface IStructuredContentTableColumn {
37
51
  export interface IStructuredContentNodeBase {
38
52
  id: string;
39
53
  layout?: IStructuredContentNodeLayout;
40
- type: "COLLAPSE" | "FILES" | "LINK" | "SPACE" | "TABLE" | "TEXT";
54
+ type: "COLLAPSE" | "FILES" | "LINK" | "SPACE" | "TABLE" | "TAG" | "TEXT";
41
55
  }
42
56
 
43
57
  export interface IStructuredContentCollapseNode extends IStructuredContentNodeBase {
@@ -67,6 +81,13 @@ export interface IStructuredContentTextNode extends IStructuredContentNodeBase {
67
81
  type: "TEXT";
68
82
  }
69
83
 
84
+ export interface IStructuredContentTagNode extends IStructuredContentNodeBase {
85
+ config?: {
86
+ tone?: StructuredContentTagTone;
87
+ };
88
+ type: "TAG";
89
+ }
90
+
70
91
  export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
71
92
  config?: {
72
93
  variant?: StructuredContentLinkVariant;
@@ -77,6 +98,7 @@ export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
77
98
  export interface IStructuredContentTableNode extends IStructuredContentNodeBase {
78
99
  config?: {
79
100
  columns?: IStructuredContentTableColumn[];
101
+ pagination?: IStructuredContentTablePagination;
80
102
  toolbar?: IStructuredContentTableToolbar;
81
103
  };
82
104
  type: "TABLE";
@@ -87,6 +109,7 @@ export type IStructuredContentNode =
87
109
  | IStructuredContentFilesNode
88
110
  | IStructuredContentLinkNode
89
111
  | IStructuredContentSpaceNode
112
+ | IStructuredContentTagNode
90
113
  | IStructuredContentTableNode
91
114
  | IStructuredContentTextNode;
92
115
 
@@ -97,9 +120,11 @@ export interface IStructuredContentLinkValue {
97
120
  }
98
121
 
99
122
  export type StructuredContentPrimitiveValue = boolean | number | string | null;
100
- export type IStructuredContentTableRow = Record<string, IStructuredContentLinkValue | StructuredContentPrimitiveValue>;
123
+ export type StructuredContentTaggableValue = IStructuredContentTagValue | StructuredContentPrimitiveValue;
124
+ export type IStructuredContentTableRow = Record<string, IStructuredContentLinkValue | StructuredContentTaggableValue>;
101
125
  export type StructuredContentDataValue =
102
126
  | IStructuredContentLinkValue
127
+ | IStructuredContentTagValue
103
128
  | IStructuredContentTableRow[]
104
129
  | StructuredContentPrimitiveValue;
105
130
  export type IStructuredContentData = Record<string, StructuredContentDataValue>;
@@ -108,9 +133,11 @@ export interface IStructuredContent {
108
133
  createdAt: string;
109
134
  data: IStructuredContentData;
110
135
  id: string;
136
+ key: string;
111
137
  metadata?: unknown;
112
- relation: string;
113
- relationId: number | string;
138
+ rawData: unknown;
139
+ relation: IModel;
140
+ relationId: string;
114
141
  structure: IStructuredContentNode[];
115
142
  updatedAt?: string;
116
143
  }
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.afb87fa"
56
56
  }