@reekon-tools/boldr-utils 1.4.34 → 1.5.0

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.
@@ -103,7 +103,8 @@ export declare enum FileUploadType {
103
103
  Template = "template",
104
104
  Background = "background",
105
105
  LayoutGroup = "layoutGroup",
106
- Calculator = "calculator"
106
+ Calculator = "calculator",
107
+ Conversion = "conversion"
107
108
  }
108
109
  export interface AnnotationFileData {
109
110
  fileType: 'sketch' | 'document';
@@ -122,12 +123,22 @@ export interface LayoutGroupFileData {
122
123
  layoutCount?: number;
123
124
  thumbnailBase64?: string;
124
125
  }
126
+ export interface ConversionUnitRef {
127
+ name: string;
128
+ base: string;
129
+ symbol: string;
130
+ displayType?: 'decimal' | 'fractional' | 'lbs/oz';
131
+ }
132
+ export interface ConversionFileData {
133
+ unitBase: string;
134
+ inputUnit: ConversionUnitRef;
135
+ outputUnit: ConversionUnitRef;
136
+ inputValue: string;
137
+ outputValue: number;
138
+ }
125
139
  interface FileUploadBase {
126
140
  id: string;
127
141
  name: string;
128
- projectId: string;
129
- jobId: string;
130
- groupId: string;
131
142
  folderPath: string;
132
143
  thumbnailUrl: string | null;
133
144
  createdBy?: {
@@ -148,6 +159,9 @@ export type FileUpload = FileUploadBase & ({
148
159
  } | {
149
160
  type: FileUploadType.LayoutGroup;
150
161
  fileData?: LayoutGroupFileData;
162
+ } | {
163
+ type: FileUploadType.Conversion;
164
+ fileData: ConversionFileData;
151
165
  } | {
152
166
  type: FileUploadType.Background;
153
167
  fileData?: undefined;
@@ -182,7 +196,6 @@ export interface Job extends FirestoreDoc, Timestamps {
182
196
  name: string;
183
197
  folderId: string;
184
198
  progress: number;
185
- projectId: string;
186
199
  lastAccessed: Date;
187
200
  toleranceConfig?: {
188
201
  thresholds: {
@@ -202,13 +215,9 @@ export interface Section extends Timestamps {
202
215
  name: string;
203
216
  tableConfig: ColumnConfig[];
204
217
  measurements: string[];
205
- projectId: string;
206
- jobId: string;
207
218
  isTemplate?: boolean;
208
219
  }
209
220
  export interface Group extends FirestoreDoc, Timestamps {
210
- projectId: string;
211
- jobId: string;
212
221
  sectionId: string;
213
222
  name: string;
214
223
  sortIndex: number;
@@ -305,9 +314,6 @@ export declare enum MeasurementType {
305
314
  Length = "length"
306
315
  }
307
316
  export interface Measurement extends FirestoreDoc, Timestamps, CreatedBy {
308
- projectId: string;
309
- jobId: string;
310
- groupId: string;
311
317
  sectionId: string;
312
318
  value: number;
313
319
  index: number;
@@ -321,6 +327,7 @@ export interface Measurement extends FirestoreDoc, Timestamps, CreatedBy {
321
327
  isCompleted?: boolean;
322
328
  type?: MeasurementType;
323
329
  note?: string;
330
+ deviceMeasurementNumber?: number;
324
331
  fileId?: string | null;
325
332
  }
326
333
  export interface Label extends FirestoreDoc, Timestamps {
@@ -22,6 +22,7 @@ export var FileUploadType;
22
22
  FileUploadType["Background"] = "background";
23
23
  FileUploadType["LayoutGroup"] = "layoutGroup";
24
24
  FileUploadType["Calculator"] = "calculator";
25
+ FileUploadType["Conversion"] = "conversion";
25
26
  })(FileUploadType || (FileUploadType = {}));
26
27
  export var FolderType;
27
28
  (function (FolderType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reekon-tools/boldr-utils",
3
- "version": "1.4.34",
3
+ "version": "1.5.0",
4
4
  "description": "Shared utilities for formulas and measurement conversion used in Reekon apps",
5
5
  "author": "REEKON Tools",
6
6
  "license": "MIT",