@reekon-tools/boldr-utils 1.4.30 → 1.4.32
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 +121 -25
- package/dist/types/firestore.js +9 -5
- package/package.json +1 -1
|
@@ -100,20 +100,75 @@ 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
|
+
Layout = "layout",
|
|
107
|
+
Calculator = "calculator"
|
|
108
|
+
}
|
|
109
|
+
export interface AnnotationFileData {
|
|
110
|
+
fileType: 'sketch' | 'document';
|
|
111
|
+
isLabel?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface CalculatorFileData {
|
|
114
|
+
templateId: string;
|
|
115
|
+
templateName: string;
|
|
116
|
+
templatePath: string;
|
|
117
|
+
tableConfig: ColumnConfig[];
|
|
118
|
+
diagramFileId: string | null;
|
|
119
|
+
columns: Record<string, any>;
|
|
120
|
+
isCompleted: boolean;
|
|
121
|
+
}
|
|
122
|
+
export interface LayoutFileData {
|
|
123
|
+
points: Record<string, any>;
|
|
124
|
+
edges: Record<string, any>;
|
|
125
|
+
faces: Record<string, any>;
|
|
126
|
+
floorLevel?: number;
|
|
127
|
+
labelScale?: number;
|
|
128
|
+
lastModified?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface LayoutGroupFileData {
|
|
131
|
+
layoutCount?: number;
|
|
132
|
+
thumbnailBase64?: string;
|
|
104
133
|
}
|
|
105
|
-
|
|
134
|
+
interface FileUploadBase {
|
|
106
135
|
id: string;
|
|
107
136
|
name: string;
|
|
108
137
|
projectId: string;
|
|
109
138
|
jobId: string;
|
|
110
139
|
groupId: string;
|
|
111
|
-
type: FileUploadType;
|
|
112
140
|
folderPath: string;
|
|
113
141
|
thumbnailUrl: string | null;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
142
|
+
createdBy?: {
|
|
143
|
+
userId: string;
|
|
144
|
+
firstName?: string;
|
|
145
|
+
lastName?: string;
|
|
146
|
+
};
|
|
147
|
+
createdAt?: Date;
|
|
148
|
+
layoutGroupId?: string | null;
|
|
149
|
+
layoutId?: string | null;
|
|
150
|
+
measurementRefs?: string[];
|
|
151
|
+
parentLayoutGroupId?: string | null;
|
|
152
|
+
}
|
|
153
|
+
export type FileUpload = FileUploadBase & ({
|
|
154
|
+
type: FileUploadType.Annotation;
|
|
155
|
+
fileData: AnnotationFileData;
|
|
156
|
+
} | {
|
|
157
|
+
type: FileUploadType.Calculator;
|
|
158
|
+
fileData: CalculatorFileData;
|
|
159
|
+
} | {
|
|
160
|
+
type: FileUploadType.Layout;
|
|
161
|
+
fileData: LayoutFileData;
|
|
162
|
+
} | {
|
|
163
|
+
type: FileUploadType.LayoutGroup;
|
|
164
|
+
fileData?: LayoutGroupFileData;
|
|
165
|
+
} | {
|
|
166
|
+
type: FileUploadType.Background;
|
|
167
|
+
fileData?: undefined;
|
|
168
|
+
} | {
|
|
169
|
+
type: FileUploadType.Template;
|
|
170
|
+
fileData?: undefined;
|
|
171
|
+
});
|
|
117
172
|
export declare enum FolderType {
|
|
118
173
|
Project = "project",
|
|
119
174
|
Job = "job",
|
|
@@ -132,16 +187,15 @@ export interface Folder extends FirestoreDoc, Timestamps {
|
|
|
132
187
|
type: FolderType;
|
|
133
188
|
isPublic?: boolean;
|
|
134
189
|
}
|
|
135
|
-
export declare enum
|
|
136
|
-
|
|
137
|
-
|
|
190
|
+
export declare enum GroupType {
|
|
191
|
+
LIST = "list",
|
|
192
|
+
FORM = "form"
|
|
138
193
|
}
|
|
139
194
|
export interface Job extends FirestoreDoc, Timestamps {
|
|
140
195
|
name: string;
|
|
141
196
|
folderId: string;
|
|
142
197
|
progress: number;
|
|
143
198
|
projectId: string;
|
|
144
|
-
totalTasks: number;
|
|
145
199
|
lastAccessed: Date;
|
|
146
200
|
toleranceConfig?: {
|
|
147
201
|
thresholds: {
|
|
@@ -152,7 +206,6 @@ export interface Job extends FirestoreDoc, Timestamps {
|
|
|
152
206
|
updatedAt: Date;
|
|
153
207
|
};
|
|
154
208
|
areaMapFileId?: string;
|
|
155
|
-
type?: JobType;
|
|
156
209
|
address?: string;
|
|
157
210
|
description?: string;
|
|
158
211
|
}
|
|
@@ -172,6 +225,7 @@ export interface Group extends FirestoreDoc, Timestamps {
|
|
|
172
225
|
name: string;
|
|
173
226
|
sortIndex: number;
|
|
174
227
|
columns: Record<string, any>;
|
|
228
|
+
type?: GroupType;
|
|
175
229
|
groupIndex: number;
|
|
176
230
|
descriptions?: Record<string, string>;
|
|
177
231
|
tolerances?: {
|
|
@@ -184,14 +238,11 @@ export interface Group extends FirestoreDoc, Timestamps {
|
|
|
184
238
|
};
|
|
185
239
|
diagramFileId?: string;
|
|
186
240
|
formula?: any;
|
|
187
|
-
isCompleted?: boolean;
|
|
188
|
-
type?: string;
|
|
189
241
|
details?: {
|
|
190
242
|
material: string;
|
|
191
243
|
finish: string;
|
|
192
244
|
finishDate: string;
|
|
193
245
|
};
|
|
194
|
-
path?: string;
|
|
195
246
|
groups?: Group[];
|
|
196
247
|
sections?: Section[];
|
|
197
248
|
}
|
|
@@ -212,21 +263,52 @@ export interface Formula extends FirestoreDoc, Timestamps {
|
|
|
212
263
|
variables: string[];
|
|
213
264
|
variableToColumnMap: Record<string, any>;
|
|
214
265
|
}
|
|
215
|
-
export interface ColumnConfig {
|
|
216
|
-
id: string;
|
|
217
|
-
name: string;
|
|
218
|
-
type: ColumnType;
|
|
219
|
-
formulaId?: string;
|
|
220
|
-
mappings?: Record<string, string>;
|
|
221
|
-
withTolerance?: boolean;
|
|
222
|
-
options?: string[];
|
|
223
|
-
conversions?: Conversion[];
|
|
224
|
-
size?: number;
|
|
225
|
-
}
|
|
226
266
|
export interface Conversion {
|
|
227
267
|
label: string;
|
|
228
268
|
value: string;
|
|
229
269
|
}
|
|
270
|
+
export interface FormulaColumnData {
|
|
271
|
+
formulaId: string;
|
|
272
|
+
mappings?: Record<string, string>;
|
|
273
|
+
}
|
|
274
|
+
export interface SelectColumnData {
|
|
275
|
+
options: string[];
|
|
276
|
+
}
|
|
277
|
+
export interface ConversionTableColumnData {
|
|
278
|
+
conversions: Conversion[];
|
|
279
|
+
}
|
|
280
|
+
interface ColumnConfigBase {
|
|
281
|
+
id: string;
|
|
282
|
+
name: string;
|
|
283
|
+
}
|
|
284
|
+
export type ColumnConfig = ColumnConfigBase & ({
|
|
285
|
+
type: ColumnType.Formula;
|
|
286
|
+
columnData: FormulaColumnData;
|
|
287
|
+
} | {
|
|
288
|
+
type: ColumnType.SingleSelect;
|
|
289
|
+
columnData: SelectColumnData;
|
|
290
|
+
} | {
|
|
291
|
+
type: ColumnType.MultiSelect;
|
|
292
|
+
columnData: SelectColumnData;
|
|
293
|
+
} | {
|
|
294
|
+
type: ColumnType.ConversionTable;
|
|
295
|
+
columnData: ConversionTableColumnData;
|
|
296
|
+
} | {
|
|
297
|
+
type: ColumnType.Text;
|
|
298
|
+
columnData?: undefined;
|
|
299
|
+
} | {
|
|
300
|
+
type: ColumnType.Number;
|
|
301
|
+
columnData?: undefined;
|
|
302
|
+
} | {
|
|
303
|
+
type: ColumnType.Measurement;
|
|
304
|
+
columnData?: undefined;
|
|
305
|
+
} | {
|
|
306
|
+
type: ColumnType.Boolean;
|
|
307
|
+
columnData?: undefined;
|
|
308
|
+
} | {
|
|
309
|
+
type: ColumnType.Angle;
|
|
310
|
+
columnData?: undefined;
|
|
311
|
+
});
|
|
230
312
|
export interface Row {
|
|
231
313
|
[key: string]: any;
|
|
232
314
|
}
|
|
@@ -251,6 +333,7 @@ export interface Measurement extends FirestoreDoc, Timestamps, CreatedBy {
|
|
|
251
333
|
isCompleted?: boolean;
|
|
252
334
|
type?: MeasurementType;
|
|
253
335
|
note?: string;
|
|
336
|
+
fileId?: string | null;
|
|
254
337
|
}
|
|
255
338
|
export interface Label extends FirestoreDoc, Timestamps {
|
|
256
339
|
name: string;
|
|
@@ -345,4 +428,17 @@ export interface UserDocument extends FirestoreDoc, Timestamps {
|
|
|
345
428
|
printLogoFileId: string;
|
|
346
429
|
devices?: Record<string, string>;
|
|
347
430
|
}
|
|
431
|
+
export interface UserComment extends FirestoreDoc, Timestamps {
|
|
432
|
+
comment: string;
|
|
433
|
+
createdByProfileUri: string;
|
|
434
|
+
files: string[];
|
|
435
|
+
groupId: string;
|
|
436
|
+
jobId: string;
|
|
437
|
+
projectId: string;
|
|
438
|
+
createdBy: {
|
|
439
|
+
userId: string;
|
|
440
|
+
firstName: string;
|
|
441
|
+
lastName: string;
|
|
442
|
+
};
|
|
443
|
+
}
|
|
348
444
|
export {};
|
package/dist/types/firestore.js
CHANGED
|
@@ -19,6 +19,10 @@ 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["Layout"] = "layout";
|
|
25
|
+
FileUploadType["Calculator"] = "calculator";
|
|
22
26
|
})(FileUploadType || (FileUploadType = {}));
|
|
23
27
|
export var FolderType;
|
|
24
28
|
(function (FolderType) {
|
|
@@ -26,11 +30,11 @@ export var FolderType;
|
|
|
26
30
|
FolderType["Job"] = "job";
|
|
27
31
|
FolderType["Template"] = "template";
|
|
28
32
|
})(FolderType || (FolderType = {}));
|
|
29
|
-
export var
|
|
30
|
-
(function (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})(
|
|
33
|
+
export var GroupType;
|
|
34
|
+
(function (GroupType) {
|
|
35
|
+
GroupType["LIST"] = "list";
|
|
36
|
+
GroupType["FORM"] = "form";
|
|
37
|
+
})(GroupType || (GroupType = {}));
|
|
34
38
|
export var ColumnType;
|
|
35
39
|
(function (ColumnType) {
|
|
36
40
|
ColumnType["Text"] = "text";
|