@reekon-tools/boldr-utils 1.0.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +120 -0
  2. package/package.json +21 -0
@@ -0,0 +1,120 @@
1
+ export type Organization = {
2
+ id: string;
3
+ name: string;
4
+ createdAt: Date;
5
+ };
6
+ export declare enum OrganizationRole {
7
+ Owner = "owner",
8
+ Editor = "editor"
9
+ }
10
+ export declare enum InvitationStatus {
11
+ Pending = "pending",
12
+ Accepted = "accepted"
13
+ }
14
+ export type OrganizationMember = {};
15
+ export type Notification = {
16
+ userId: string;
17
+ type: 'invitation';
18
+ organizationId: string;
19
+ senderId: string;
20
+ role: OrganizationRole;
21
+ message: string;
22
+ status: InvitationStatus;
23
+ createdAt: any;
24
+ };
25
+ export interface Project {
26
+ id: string;
27
+ name: string;
28
+ description: string;
29
+ imageUrl: string | null;
30
+ streetAddress: string;
31
+ city: string;
32
+ zipCode: string;
33
+ state: string;
34
+ createdAt: any;
35
+ }
36
+ export interface ProjectFolder {
37
+ id: string;
38
+ name: string;
39
+ createdAt: any;
40
+ }
41
+ export interface Job {
42
+ id: string;
43
+ name: string;
44
+ createdAt: any;
45
+ }
46
+ export interface Section {
47
+ id: string;
48
+ name: string;
49
+ tableConfig: ColumnConfig[];
50
+ measurements: string[];
51
+ }
52
+ export interface Group {
53
+ id: string;
54
+ sectionId: string;
55
+ columns: Record<string, any>;
56
+ }
57
+ export interface ColumnConfig {
58
+ id: string;
59
+ name: string;
60
+ type: ColumnType;
61
+ }
62
+ export declare enum ColumnType {
63
+ Text = "text",// Text input
64
+ Number = "number",// Numeric input
65
+ Measurement = "measurement",// Measurement input
66
+ Boolean = "boolean"
67
+ }
68
+ export interface Row {
69
+ [key: string]: any;
70
+ }
71
+ export declare enum MeasurementType {
72
+ }
73
+ export declare enum Units {
74
+ Centimeters = "cm",
75
+ Millimeters = "mm",
76
+ Meters = "m",
77
+ Inches = "in",
78
+ FractionalInches = "in_frac",
79
+ Feet = "ft",
80
+ FeetInchesDecimal = "ft_in_decimal",
81
+ FeetInchesFractional = "ft_in_frac"
82
+ }
83
+ export declare const convertUnitsToReadable: (targetUnit: Units) => "cm" | "mm" | "m" | "in" | "ft" | "in (fractional)" | "ft-in (decimal)" | "ft-in (fractional)";
84
+ export interface Measurement {
85
+ type: MeasurementType;
86
+ id: string;
87
+ value: number;
88
+ index: number;
89
+ label: string;
90
+ groupId: string;
91
+ projectId: string;
92
+ jobId: string;
93
+ sectionId: string;
94
+ }
95
+ export declare enum FractionalTolerance {
96
+ Fourth = "4",
97
+ Eighth = "8",
98
+ Sixteenth = "16",
99
+ ThirtySecond = "32",
100
+ SixtyFourth = "64",
101
+ OneTwentyEighth = "128"
102
+ }
103
+ export declare enum DecimalTolerance {
104
+ Half = "0.5",
105
+ Tenth = "0.1",
106
+ Hundredth = "0.01",
107
+ Thousandth = "0.001"
108
+ }
109
+ export type UserDocument = {
110
+ createdAt: any;
111
+ defaultOrganization: string;
112
+ displayName: string;
113
+ email: string;
114
+ imageUri: string;
115
+ firstName: string;
116
+ lastName: string;
117
+ defaultUnit: Units;
118
+ decimalTolerance: DecimalTolerance;
119
+ fractionalTolerance: FractionalTolerance;
120
+ };
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@reekon-tools/boldr-utils",
3
+ "version": "1.0.0",
4
+ "description": "Shared utilities for Boldr projects in Reekon Tools",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc"
12
+ },
13
+ "keywords": [],
14
+ "author": "",
15
+ "license": "ISC",
16
+ "repository": "https://gitlab.com/reekon-tools/software/rock-pro/boldr-types#",
17
+ "devDependencies": {
18
+ "typescript": "^5.7.3"
19
+ },
20
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
21
+ }