@reekon-tools/boldr-utils 1.4.29 → 1.4.31
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.
- package/dist/types/firestore.d.ts +103 -24
- package/dist/types/firestore.js +8 -5
- package/package.json +1 -1
|
@@ -100,19 +100,57 @@ export interface SelectedTemplate extends FirestoreDoc {
|
|
|
100
100
|
}
|
|
101
101
|
export declare enum FileUploadType {
|
|
102
102
|
Annotation = "annotation",
|
|
103
|
-
Template = "template"
|
|
103
|
+
Template = "template",
|
|
104
|
+
Background = "background",
|
|
105
|
+
LayoutGroup = "layoutGroup",
|
|
106
|
+
Calculator = "calculator"
|
|
107
|
+
}
|
|
108
|
+
export interface AnnotationFileData {
|
|
109
|
+
fileType: 'sketch' | 'document';
|
|
110
|
+
isLabel?: boolean;
|
|
111
|
+
}
|
|
112
|
+
export interface CalculatorFileData {
|
|
113
|
+
templateId: string;
|
|
114
|
+
templateName: string;
|
|
115
|
+
templatePath: string;
|
|
116
|
+
tableConfig: ColumnConfig[];
|
|
117
|
+
diagramFileId: string | null;
|
|
118
|
+
columns: Record<string, any>;
|
|
119
|
+
isCompleted: boolean;
|
|
104
120
|
}
|
|
105
|
-
|
|
121
|
+
interface FileUploadBase {
|
|
106
122
|
id: string;
|
|
107
123
|
name: string;
|
|
108
124
|
projectId: string;
|
|
109
125
|
jobId: string;
|
|
110
126
|
groupId: string;
|
|
111
|
-
type: FileUploadType;
|
|
112
127
|
folderPath: string;
|
|
113
128
|
thumbnailUrl: string | null;
|
|
114
|
-
|
|
115
|
-
|
|
129
|
+
createdBy?: {
|
|
130
|
+
userId: string;
|
|
131
|
+
firstName?: string;
|
|
132
|
+
lastName?: string;
|
|
133
|
+
};
|
|
134
|
+
createdAt?: Date;
|
|
135
|
+
layoutGroupId?: string | null;
|
|
136
|
+
layoutId?: string | null;
|
|
137
|
+
}
|
|
138
|
+
export type FileUpload = FileUploadBase & ({
|
|
139
|
+
type: FileUploadType.Annotation;
|
|
140
|
+
fileData: AnnotationFileData;
|
|
141
|
+
} | {
|
|
142
|
+
type: FileUploadType.Calculator;
|
|
143
|
+
fileData: CalculatorFileData;
|
|
144
|
+
} | {
|
|
145
|
+
type: FileUploadType.LayoutGroup;
|
|
146
|
+
fileData?: undefined;
|
|
147
|
+
} | {
|
|
148
|
+
type: FileUploadType.Background;
|
|
149
|
+
fileData?: undefined;
|
|
150
|
+
} | {
|
|
151
|
+
type: FileUploadType.Template;
|
|
152
|
+
fileData?: undefined;
|
|
153
|
+
});
|
|
116
154
|
export declare enum FolderType {
|
|
117
155
|
Project = "project",
|
|
118
156
|
Job = "job",
|
|
@@ -131,16 +169,15 @@ export interface Folder extends FirestoreDoc, Timestamps {
|
|
|
131
169
|
type: FolderType;
|
|
132
170
|
isPublic?: boolean;
|
|
133
171
|
}
|
|
134
|
-
export declare enum
|
|
135
|
-
|
|
136
|
-
|
|
172
|
+
export declare enum GroupType {
|
|
173
|
+
LIST = "list",
|
|
174
|
+
FORM = "form"
|
|
137
175
|
}
|
|
138
176
|
export interface Job extends FirestoreDoc, Timestamps {
|
|
139
177
|
name: string;
|
|
140
178
|
folderId: string;
|
|
141
179
|
progress: number;
|
|
142
180
|
projectId: string;
|
|
143
|
-
totalTasks: number;
|
|
144
181
|
lastAccessed: Date;
|
|
145
182
|
toleranceConfig?: {
|
|
146
183
|
thresholds: {
|
|
@@ -151,7 +188,6 @@ export interface Job extends FirestoreDoc, Timestamps {
|
|
|
151
188
|
updatedAt: Date;
|
|
152
189
|
};
|
|
153
190
|
areaMapFileId?: string;
|
|
154
|
-
type?: JobType;
|
|
155
191
|
address?: string;
|
|
156
192
|
description?: string;
|
|
157
193
|
}
|
|
@@ -162,6 +198,7 @@ export interface Section extends Timestamps {
|
|
|
162
198
|
measurements: string[];
|
|
163
199
|
projectId: string;
|
|
164
200
|
jobId: string;
|
|
201
|
+
isTemplate?: boolean;
|
|
165
202
|
}
|
|
166
203
|
export interface Group extends FirestoreDoc, Timestamps {
|
|
167
204
|
projectId: string;
|
|
@@ -170,6 +207,7 @@ export interface Group extends FirestoreDoc, Timestamps {
|
|
|
170
207
|
name: string;
|
|
171
208
|
sortIndex: number;
|
|
172
209
|
columns: Record<string, any>;
|
|
210
|
+
type?: GroupType;
|
|
173
211
|
groupIndex: number;
|
|
174
212
|
descriptions?: Record<string, string>;
|
|
175
213
|
tolerances?: {
|
|
@@ -182,14 +220,11 @@ export interface Group extends FirestoreDoc, Timestamps {
|
|
|
182
220
|
};
|
|
183
221
|
diagramFileId?: string;
|
|
184
222
|
formula?: any;
|
|
185
|
-
isCompleted?: boolean;
|
|
186
|
-
type?: string;
|
|
187
223
|
details?: {
|
|
188
224
|
material: string;
|
|
189
225
|
finish: string;
|
|
190
226
|
finishDate: string;
|
|
191
227
|
};
|
|
192
|
-
path?: string;
|
|
193
228
|
groups?: Group[];
|
|
194
229
|
sections?: Section[];
|
|
195
230
|
}
|
|
@@ -210,21 +245,52 @@ export interface Formula extends FirestoreDoc, Timestamps {
|
|
|
210
245
|
variables: string[];
|
|
211
246
|
variableToColumnMap: Record<string, any>;
|
|
212
247
|
}
|
|
213
|
-
export interface ColumnConfig {
|
|
214
|
-
id: string;
|
|
215
|
-
name: string;
|
|
216
|
-
type: ColumnType;
|
|
217
|
-
formulaId?: string;
|
|
218
|
-
mappings?: Record<string, string>;
|
|
219
|
-
withTolerance?: boolean;
|
|
220
|
-
options?: string[];
|
|
221
|
-
conversions?: Conversion[];
|
|
222
|
-
size?: number;
|
|
223
|
-
}
|
|
224
248
|
export interface Conversion {
|
|
225
249
|
label: string;
|
|
226
250
|
value: string;
|
|
227
251
|
}
|
|
252
|
+
export interface FormulaColumnData {
|
|
253
|
+
formulaId: string;
|
|
254
|
+
mappings?: Record<string, string>;
|
|
255
|
+
}
|
|
256
|
+
export interface SelectColumnData {
|
|
257
|
+
options: string[];
|
|
258
|
+
}
|
|
259
|
+
export interface ConversionTableColumnData {
|
|
260
|
+
conversions: Conversion[];
|
|
261
|
+
}
|
|
262
|
+
interface ColumnConfigBase {
|
|
263
|
+
id: string;
|
|
264
|
+
name: string;
|
|
265
|
+
}
|
|
266
|
+
export type ColumnConfig = ColumnConfigBase & ({
|
|
267
|
+
type: ColumnType.Formula;
|
|
268
|
+
columnData: FormulaColumnData;
|
|
269
|
+
} | {
|
|
270
|
+
type: ColumnType.SingleSelect;
|
|
271
|
+
columnData: SelectColumnData;
|
|
272
|
+
} | {
|
|
273
|
+
type: ColumnType.MultiSelect;
|
|
274
|
+
columnData: SelectColumnData;
|
|
275
|
+
} | {
|
|
276
|
+
type: ColumnType.ConversionTable;
|
|
277
|
+
columnData: ConversionTableColumnData;
|
|
278
|
+
} | {
|
|
279
|
+
type: ColumnType.Text;
|
|
280
|
+
columnData?: undefined;
|
|
281
|
+
} | {
|
|
282
|
+
type: ColumnType.Number;
|
|
283
|
+
columnData?: undefined;
|
|
284
|
+
} | {
|
|
285
|
+
type: ColumnType.Measurement;
|
|
286
|
+
columnData?: undefined;
|
|
287
|
+
} | {
|
|
288
|
+
type: ColumnType.Boolean;
|
|
289
|
+
columnData?: undefined;
|
|
290
|
+
} | {
|
|
291
|
+
type: ColumnType.Angle;
|
|
292
|
+
columnData?: undefined;
|
|
293
|
+
});
|
|
228
294
|
export interface Row {
|
|
229
295
|
[key: string]: any;
|
|
230
296
|
}
|
|
@@ -343,4 +409,17 @@ export interface UserDocument extends FirestoreDoc, Timestamps {
|
|
|
343
409
|
printLogoFileId: string;
|
|
344
410
|
devices?: Record<string, string>;
|
|
345
411
|
}
|
|
412
|
+
export interface UserComment extends FirestoreDoc, Timestamps {
|
|
413
|
+
comment: string;
|
|
414
|
+
createdByProfileUri: string;
|
|
415
|
+
files: string[];
|
|
416
|
+
groupId: string;
|
|
417
|
+
jobId: string;
|
|
418
|
+
projectId: string;
|
|
419
|
+
createdBy: {
|
|
420
|
+
userId: string;
|
|
421
|
+
firstName: string;
|
|
422
|
+
lastName: string;
|
|
423
|
+
};
|
|
424
|
+
}
|
|
346
425
|
export {};
|
package/dist/types/firestore.js
CHANGED
|
@@ -19,6 +19,9 @@ export var FileUploadType;
|
|
|
19
19
|
(function (FileUploadType) {
|
|
20
20
|
FileUploadType["Annotation"] = "annotation";
|
|
21
21
|
FileUploadType["Template"] = "template";
|
|
22
|
+
FileUploadType["Background"] = "background";
|
|
23
|
+
FileUploadType["LayoutGroup"] = "layoutGroup";
|
|
24
|
+
FileUploadType["Calculator"] = "calculator";
|
|
22
25
|
})(FileUploadType || (FileUploadType = {}));
|
|
23
26
|
export var FolderType;
|
|
24
27
|
(function (FolderType) {
|
|
@@ -26,11 +29,11 @@ export var FolderType;
|
|
|
26
29
|
FolderType["Job"] = "job";
|
|
27
30
|
FolderType["Template"] = "template";
|
|
28
31
|
})(FolderType || (FolderType = {}));
|
|
29
|
-
export var
|
|
30
|
-
(function (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})(
|
|
32
|
+
export var GroupType;
|
|
33
|
+
(function (GroupType) {
|
|
34
|
+
GroupType["LIST"] = "list";
|
|
35
|
+
GroupType["FORM"] = "form";
|
|
36
|
+
})(GroupType || (GroupType = {}));
|
|
34
37
|
export var ColumnType;
|
|
35
38
|
(function (ColumnType) {
|
|
36
39
|
ColumnType["Text"] = "text";
|