@leaddreamer/inventorylogic 0.0.3-beta.0 → 0.0.3-beta.11

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/README.md CHANGED
@@ -9,17 +9,20 @@ business "logic" - not browser services.
9
9
  ## Modules
10
10
 
11
11
  <dl>
12
- <dt><a href="#module_Boilerplate">Boilerplate</a></dt>
13
- <dd><p>Shared constants and symbols</p>
14
- </dd>
15
- <dt><a href="#module_Commodities">Commodities</a></dt>
16
- <dd><p>Typedefs, constants, support functions and database operations related to Commodity Matrials
17
- users</p>
12
+ <dt><a href="#module_InventoryLogic">InventoryLogic</a></dt>
13
+ <dd><p>Business Logic for the PaaS, wrapped
14
+ around FirebaseWrapper, to be shared between Back and Front End.
15
+ This particular library only provides the business &quot;logic&quot; - not browser
16
+ services.</p>
18
17
  </dd>
19
18
  <dt><a href="#module_InventoryLogic">InventoryLogic</a></dt>
20
19
  <dd><p>A collection of Business logic and database functions. Shared between ReactJS
21
20
  frontEnd and NodeJS BackEnd</p>
22
21
  </dd>
22
+ <dt><a href="#module_Commodities">Commodities</a></dt>
23
+ <dd><p>Typedefs, constants, support functions and database operations related to Commodity Matrials
24
+ users</p>
25
+ </dd>
23
26
  <dt><a href="#module_LineItem">LineItem</a></dt>
24
27
  <dd><p>Typedefs, constants, support functions and database operations related to LineItem Matrials
25
28
  users</p>
@@ -36,10 +39,6 @@ as an abstraction above a specific payment processor.</p>
36
39
  <dt><a href="#module_Product">Product</a></dt>
37
40
  <dd><p>Typedefs, constants, support functions and database operations related to Products</p>
38
41
  </dd>
39
- <dt><a href="#module_Units">Units</a></dt>
40
- <dd><p>Typedefs, constants, support functions and database operations related to usage Units
41
- and conversions</p>
42
- </dd>
43
42
  <dt><a href="#module_User">User</a></dt>
44
43
  <dd><p>Typedefs, constants, support functions and database operations related to individual
45
44
  users</p>
@@ -48,18 +47,136 @@ users</p>
48
47
  <dd><p>Typedefs, constants, support functions and database operations related to usage Units
49
48
  and conversions</p>
50
49
  </dd>
51
- <dt><a href="#module_InventoryLogic">InventoryLogic</a></dt>
52
- <dd><p>Business Logic for the PaaS, wrapped
53
- around FirebaseWrapper, to be shared between Back and Front End.
54
- This particular library only provides the business &quot;logic&quot; - not browser
55
- services.</p>
50
+ <dt><a href="#module_Boilerplate">Boilerplate</a></dt>
51
+ <dd><p>Shared constants and symbols</p>
52
+ </dd>
53
+ <dt><a href="#module_Units">Units</a></dt>
54
+ <dd><p>Typedefs, constants, support functions and database operations related to usage Units
55
+ and conversions</p>
56
56
  </dd>
57
57
  </dl>
58
58
 
59
- <a name="module_Boilerplate"></a>
59
+ <a name="module_InventoryLogic"></a>
60
60
 
61
- ## Boilerplate
62
- Shared constants and symbols
61
+ ## InventoryLogic
62
+ Business Logic for the PaaS, wrapped
63
+ around FirebaseWrapper, to be shared between Back and Front End.
64
+ This particular library only provides the business "logic" - not browser
65
+ services.
66
+
67
+
68
+ * [InventoryLogic](#module_InventoryLogic)
69
+ * _static_
70
+ * [.databaseStart(firebase, config, thisLogger)](#module_InventoryLogic.databaseStart) ⇒ <code>Promise.Firebase.app</code>
71
+ * _inner_
72
+ * [~FirebaseConfigObject](#module_InventoryLogic..FirebaseConfigObject) : <code>object</code>
73
+
74
+ <a name="module_InventoryLogic.databaseStart"></a>
75
+
76
+ ### InventoryLogic.databaseStart(firebase, config, thisLogger) ⇒ <code>Promise.Firebase.app</code>
77
+ all-in-one wrapper for a solid subset of CLIENT-SIDE Firebase
78
+ functions, with a consistent interface. There is a parallel set for
79
+ ADMIN-SIDE functions as well.
80
+ Call/initialize with Firebase Configuration settings in an object as
81
+ described below
82
+
83
+ **Kind**: static method of [<code>InventoryLogic</code>](#module_InventoryLogic)
84
+
85
+ | Param | Type | Description |
86
+ | --- | --- | --- |
87
+ | firebase | <code>Firebase</code> | |
88
+ | config | <code>FirebaseConfigObject</code> | Firebase Admin object |
89
+ | thisLogger | <code>callback</code> | |
90
+
91
+ **Example**
92
+ ```
93
+ //this specifically loads ALL the subsections, specifically for
94
+ //the Browser. See later (tbd) notes for NodeJS
95
+
96
+ import FirebaseWrapper from "@leaddreamer/firebase-wrapper";
97
+ FirebaseWrapper(config); //see below
98
+ export * from "@leaddreamer/firebase-wrapper";
99
+ ```
100
+ <a name="module_InventoryLogic..FirebaseConfigObject"></a>
101
+
102
+ ### InventoryLogic~FirebaseConfigObject : <code>object</code>
103
+ only authDomain, databaseURL and storageBucket are present when
104
+ called from a cloud environment
105
+
106
+ **Kind**: inner typedef of [<code>InventoryLogic</code>](#module_InventoryLogic)
107
+ **Properties**
108
+
109
+ | Name | Type | Description |
110
+ | --- | --- | --- |
111
+ | apiKey | <code>string</code> | required api Key from Firebase Console, |
112
+ | appId | <code>string</code> | required app ID from Firebase Console |
113
+ | projectId | <code>string</code> | required Firebase projectID from Firebase console |
114
+ | authDomain | <code>string</code> | (optional) auth domain from Firebase Console |
115
+ | databaseURL | <code>string</code> | (optional) Firestore database URL from Firebase console |
116
+ | storageBucket: | <code>string</code> | (optional) URL of Firestore Storage Bucket |
117
+ | messagingSenderId: | <code>string</code> | (optional) ID for Messaing service from Firebase Console |
118
+ | measurementId: | <code>string</code> | (optional) Analytics/Measurement ID from Firebase Console |
119
+ | mapsAPIKey | <code>string</code> | (optional) App ID for Google Maps API, from Google |
120
+
121
+ <a name="module_InventoryLogic"></a>
122
+
123
+ ## InventoryLogic
124
+ A collection of Business logic and database functions. Shared between ReactJS
125
+ frontEnd and NodeJS BackEnd
126
+
127
+
128
+ * [InventoryLogic](#module_InventoryLogic)
129
+ * _static_
130
+ * [.databaseStart(firebase, config, thisLogger)](#module_InventoryLogic.databaseStart) ⇒ <code>Promise.Firebase.app</code>
131
+ * _inner_
132
+ * [~FirebaseConfigObject](#module_InventoryLogic..FirebaseConfigObject) : <code>object</code>
133
+
134
+ <a name="module_InventoryLogic.databaseStart"></a>
135
+
136
+ ### InventoryLogic.databaseStart(firebase, config, thisLogger) ⇒ <code>Promise.Firebase.app</code>
137
+ all-in-one wrapper for a solid subset of CLIENT-SIDE Firebase
138
+ functions, with a consistent interface. There is a parallel set for
139
+ ADMIN-SIDE functions as well.
140
+ Call/initialize with Firebase Configuration settings in an object as
141
+ described below
142
+
143
+ **Kind**: static method of [<code>InventoryLogic</code>](#module_InventoryLogic)
144
+
145
+ | Param | Type | Description |
146
+ | --- | --- | --- |
147
+ | firebase | <code>Firebase</code> | |
148
+ | config | <code>FirebaseConfigObject</code> | Firebase Admin object |
149
+ | thisLogger | <code>callback</code> | |
150
+
151
+ **Example**
152
+ ```
153
+ //this specifically loads ALL the subsections, specifically for
154
+ //the Browser. See later (tbd) notes for NodeJS
155
+
156
+ import FirebaseWrapper from "@leaddreamer/firebase-wrapper";
157
+ FirebaseWrapper(config); //see below
158
+ export * from "@leaddreamer/firebase-wrapper";
159
+ ```
160
+ <a name="module_InventoryLogic..FirebaseConfigObject"></a>
161
+
162
+ ### InventoryLogic~FirebaseConfigObject : <code>object</code>
163
+ only authDomain, databaseURL and storageBucket are present when
164
+ called from a cloud environment
165
+
166
+ **Kind**: inner typedef of [<code>InventoryLogic</code>](#module_InventoryLogic)
167
+ **Properties**
168
+
169
+ | Name | Type | Description |
170
+ | --- | --- | --- |
171
+ | apiKey | <code>string</code> | required api Key from Firebase Console, |
172
+ | appId | <code>string</code> | required app ID from Firebase Console |
173
+ | projectId | <code>string</code> | required Firebase projectID from Firebase console |
174
+ | authDomain | <code>string</code> | (optional) auth domain from Firebase Console |
175
+ | databaseURL | <code>string</code> | (optional) Firestore database URL from Firebase console |
176
+ | storageBucket: | <code>string</code> | (optional) URL of Firestore Storage Bucket |
177
+ | messagingSenderId: | <code>string</code> | (optional) ID for Messaing service from Firebase Console |
178
+ | measurementId: | <code>string</code> | (optional) Analytics/Measurement ID from Firebase Console |
179
+ | mapsAPIKey | <code>string</code> | (optional) App ID for Google Maps API, from Google |
63
180
 
64
181
  <a name="module_Commodities"></a>
65
182
 
@@ -272,66 +389,6 @@ An object to allow for paginating a table read from Firestore. REQUIRES a sortin
272
389
  | PageForward | <code>method</code> | pages the fetch forward |
273
390
  | PageBack | <code>method</code> | pages the fetch backward |
274
391
 
275
- <a name="module_InventoryLogic"></a>
276
-
277
- ## InventoryLogic
278
- A collection of Business logic and database functions. Shared between ReactJS
279
- frontEnd and NodeJS BackEnd
280
-
281
-
282
- * [InventoryLogic](#module_InventoryLogic)
283
- * _static_
284
- * [.databaseStart(firebase, config, thisLogger)](#module_InventoryLogic.databaseStart) ⇒ <code>Promise.Firebase.app</code>
285
- * _inner_
286
- * [~FirebaseConfigObject](#module_InventoryLogic..FirebaseConfigObject) : <code>object</code>
287
-
288
- <a name="module_InventoryLogic.databaseStart"></a>
289
-
290
- ### InventoryLogic.databaseStart(firebase, config, thisLogger) ⇒ <code>Promise.Firebase.app</code>
291
- all-in-one wrapper for a solid subset of CLIENT-SIDE Firebase
292
- functions, with a consistent interface. There is a parallel set for
293
- ADMIN-SIDE functions as well.
294
- Call/initialize with Firebase Configuration settings in an object as
295
- described below
296
-
297
- **Kind**: static method of [<code>InventoryLogic</code>](#module_InventoryLogic)
298
-
299
- | Param | Type | Description |
300
- | --- | --- | --- |
301
- | firebase | <code>Firebase</code> | |
302
- | config | <code>FirebaseConfigObject</code> | Firebase Admin object |
303
- | thisLogger | <code>callback</code> | |
304
-
305
- **Example**
306
- ```
307
- //this specifically loads ALL the subsections, specifically for
308
- //the Browser. See later (tbd) notes for NodeJS
309
-
310
- import FirebaseWrapper from "@leaddreamer/firebase-wrapper";
311
- FirebaseWrapper(config); //see below
312
- export * from "@leaddreamer/firebase-wrapper";
313
- ```
314
- <a name="module_InventoryLogic..FirebaseConfigObject"></a>
315
-
316
- ### InventoryLogic~FirebaseConfigObject : <code>object</code>
317
- only authDomain, databaseURL and storageBucket are present when
318
- called from a cloud environment
319
-
320
- **Kind**: inner typedef of [<code>InventoryLogic</code>](#module_InventoryLogic)
321
- **Properties**
322
-
323
- | Name | Type | Description |
324
- | --- | --- | --- |
325
- | apiKey | <code>string</code> | required api Key from Firebase Console, |
326
- | appId | <code>string</code> | required app ID from Firebase Console |
327
- | projectId | <code>string</code> | required Firebase projectID from Firebase console |
328
- | authDomain | <code>string</code> | (optional) auth domain from Firebase Console |
329
- | databaseURL | <code>string</code> | (optional) Firestore database URL from Firebase console |
330
- | storageBucket: | <code>string</code> | (optional) URL of Firestore Storage Bucket |
331
- | messagingSenderId: | <code>string</code> | (optional) ID for Messaing service from Firebase Console |
332
- | measurementId: | <code>string</code> | (optional) Analytics/Measurement ID from Firebase Console |
333
- | mapsAPIKey | <code>string</code> | (optional) App ID for Google Maps API, from Google |
334
-
335
392
  <a name="module_LineItem"></a>
336
393
 
337
394
  ## LineItem
@@ -1095,6 +1152,20 @@ Typedefs, constants, support functions and database operations related to Produc
1095
1152
  * [~ProductDefaultForm](#module_Product..ProductDefaultForm) : <code>Product</code>
1096
1153
  * [~updateProduct(product, user)](#module_Product..updateProduct) ⇒ <code>promise.LineItem</code>
1097
1154
  * [~summarizeProduct(product)](#module_Product..summarizeProduct) ⇒ <code>string</code>
1155
+ * [~Recipe_Data](#module_Product..Recipe_Data) : <code>object</code>
1156
+ * [~AttributeList](#module_Product..AttributeList) : <code>Array.String</code>
1157
+ * [~AttributeValue](#module_Product..AttributeValue) : <code>object</code>
1158
+ * [~ProductImage](#module_Product..ProductImage) : <code>object</code>
1159
+ * [~CurrencyDescription](#module_Product..CurrencyDescription) : <code>object</code>
1160
+ * [~MonetaryValue](#module_Product..MonetaryValue) : <code>object</code>
1161
+ * [~FullProductPricing](#module_Product..FullProductPricing) : <code>object</code>
1162
+ * [~ProductDimensions](#module_Product..ProductDimensions) : <code>object</code>
1163
+ * [~PriceObject](#module_Product..PriceObject) : <code>object</code>
1164
+ * [~ProductWeight](#module_Product..ProductWeight) : <code>object</code>
1165
+ * [~ProductMeasurements](#module_Product..ProductMeasurements) : <code>object</code>
1166
+ * [~ProductStock](#module_Product..ProductStock) : <code>object</code>
1167
+ * [~PhysicalProductVariant](#module_Product..PhysicalProductVariant) : <code>object</code>
1168
+ * [~MetaData](#module_Product..MetaData) : <code>object</code>
1098
1169
  * [~Product](#module_Product..Product) : <code>object</code>
1099
1170
 
1100
1171
  <a name="module_Product.createProduct"></a>
@@ -1121,7 +1192,7 @@ Creates a new Blank Product
1121
1192
 
1122
1193
  ### Product~ProductDefault : <code>Product</code>
1123
1194
  **Kind**: inner constant of [<code>Product</code>](#module_Product)
1124
- **Default**: <code>{&quot;Id&quot;:null,&quot;refPath&quot;:null,&quot;name&quot;:&quot;&quot;,&quot;description&quot;:null,&quot;sku&quot;:null,&quot;markups&quot;:null,&quot;projectQ&quot;:false,&quot;created&quot;:null,&quot;modified&quot;:null}</code>
1195
+ **Default**: <code>{&quot;name&quot;:&quot;&quot;,&quot;description&quot;:null,&quot;recipe&quot;:&quot;&quot;,&quot;image_links&quot;:&quot;&quot;,&quot;type&quot;:&quot;&quot;,&quot;google_product_type&quot;:&quot;&quot;,&quot;shipping_time&quot;:0,&quot;condition&quot;:&quot;&quot;,&quot;adultQ&quot;:false,&quot;age_group&quot;:&quot;adult&quot;,&quot;color&quot;:&quot;&quot;,&quot;material&quot;:&quot;&quot;,&quot;gender&quot;:&quot;unisex&quot;,&quot;attributes_gemstones&quot;:&quot;&quot;,&quot;pattern&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;,&quot;weight&quot;:0,&quot;shippingMeasurements&quot;:&quot;&quot;}</code>
1125
1196
  **Read only**: true
1126
1197
  <a name="module_Product..ProductDataForm"></a>
1127
1198
 
@@ -1160,102 +1231,221 @@ Returns a standardized formatted name string
1160
1231
  | --- | --- |
1161
1232
  | product | <code>Unit</code> |
1162
1233
 
1163
- <a name="module_Product..Product"></a>
1234
+ <a name="module_Product..Recipe_Data"></a>
1164
1235
 
1165
- ### Product~Product : <code>object</code>
1166
- a record
1236
+ ### Product~Recipe\_Data : <code>object</code>
1237
+ "recipe" related values - build-stage markups, product/project Flag, created/modified dates
1167
1238
 
1168
1239
  **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1169
1240
  **Properties**
1170
1241
 
1171
1242
  | Name | Type | Description |
1172
1243
  | --- | --- | --- |
1173
- | Id | <code>string</code> | Id of document (redundant for convenience) |
1174
- | refPath | <code>string</code> | if from database, full path to document |
1175
- | name | <code>string</code> | name for the Product |
1176
- | description | <code>string</code> | |
1177
- | sku | <code>string</code> | |
1178
1244
  | markups | <code>module:Markups~Stage</code> | |
1179
1245
  | projectQ | <code>boolean</code> | flag for product/project |
1180
1246
  | created | <code>dateTime</code> | |
1181
1247
  | modified | <code>dateTime</code> | |
1182
1248
 
1183
- <a name="module_Units"></a>
1249
+ <a name="module_Product..AttributeList"></a>
1184
1250
 
1185
- ## Units
1186
- Typedefs, constants, support functions and database operations related to usage Units
1187
- and conversions
1251
+ ### Product~AttributeList : <code>Array.String</code>
1252
+ A list of attributes for a product
1188
1253
 
1254
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1255
+ <a name="module_Product..AttributeValue"></a>
1189
1256
 
1190
- * [Units](#module_Units)
1191
- * _static_
1192
- * [.saveUnit()](#module_Units.saveUnit) ⇒ <code>Promise.&lt;void&gt;</code>
1193
- * _inner_
1194
- * [~UnitDefault](#module_Units..UnitDefault) : <code>Unit</code>
1195
- * [~UnitForm](#module_Units..UnitForm) : <code>Unit</code>
1196
- * [~UnitData](#module_Units..UnitData) : <code>Unit</code>
1197
- * [~summarizeUnit(unit)](#module_Units..summarizeUnit) ⇒ <code>string</code>
1198
- * [~Unit](#module_Units..Unit) : <code>object</code>
1257
+ ### Product~AttributeValue : <code>object</code>
1258
+ Array of attribute name/value pairs
1199
1259
 
1200
- <a name="module_Units.saveUnit"></a>
1260
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1261
+ **Properties**
1201
1262
 
1202
- ### Units.saveUnit() ⇒ <code>Promise.&lt;void&gt;</code>
1203
- Saves a default Stage Settings object to the database
1263
+ | Name | Type | Description |
1264
+ | --- | --- | --- |
1265
+ | attibuteName | <code>string</code> | attribute name from attribute list |
1266
+ | value | <code>string</code> | value for the particular attribute |
1204
1267
 
1205
- **Kind**: static method of [<code>Units</code>](#module_Units)
1268
+ <a name="module_Product..ProductImage"></a>
1269
+
1270
+ ### Product~ProductImage : <code>object</code>
1271
+ Image Descriptor
1272
+
1273
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1274
+ **Properties**
1275
+
1276
+ | Name | Type | Description |
1277
+ | --- | --- | --- |
1278
+ | altText | <code>string</code> | alt text for the image - SEO etc |
1279
+ | availableFormats | <code>Array.string</code> | Available image sizes. |
1280
+ | id | <code>string</code> | unique id for this productImage |
1281
+ | orderIndex | <code>integer</code> | Position of the image in the product's image list. |
1282
+ | originalSize | <code>object</code> | Image size when first uploaded. |
1283
+ | seoOptions | <code>MetaData</code> | |
1284
+ | URL | <code>string</code> | Absolute URL of the hosted image. |
1285
+
1286
+ <a name="module_Product..CurrencyDescription"></a>
1287
+
1288
+ ### Product~CurrencyDescription : <code>object</code>
1289
+ Currency Description ISO 4217 currency code
1290
+
1291
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1206
1292
  **Properties**
1207
1293
 
1208
1294
  | Name | Type |
1209
1295
  | --- | --- |
1210
- | unit | <code>Unit</code> |
1296
+ | currencyCode | <code>string</code> |
1297
+ | defaultFractionDigits | <code>integer</code> |
1298
+ | displayName | <code>string</code> |
1299
+ | numericCodeAsString | <code>string</code> |
1300
+ | symbol | <code>string</code> |
1211
1301
 
1212
- <a name="module_Units..UnitDefault"></a>
1302
+ <a name="module_Product..MonetaryValue"></a>
1213
1303
 
1214
- ### Units~UnitDefault : <code>Unit</code>
1215
- **Kind**: inner constant of [<code>Units</code>](#module_Units)
1216
- **Default**: <code>{&quot;Id&quot;:null,&quot;refPath&quot;:null,&quot;unit&quot;:null,&quot;ratio&quot;:1,&quot;otherUnit&quot;:null,&quot;system&quot;:null}</code>
1217
- **Read only**: true
1218
- <a name="module_Units..UnitForm"></a>
1304
+ ### Product~MonetaryValue : <code>object</code>
1305
+ Monetary Value Specification
1219
1306
 
1220
- ### Units~UnitForm : <code>Unit</code>
1221
- **Kind**: inner constant of [<code>Units</code>](#module_Units)
1222
- **Default**: <code>{&quot;unit&quot;:&quot;text&quot;,&quot;ratio&quot;:&quot;number&quot;,&quot;otherUnit&quot;:&quot;&quot;,&quot;system&quot;:&quot;string&quot;}</code>
1223
- **Read only**: true
1224
- <a name="module_Units..UnitData"></a>
1307
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1308
+ **Properties**
1225
1309
 
1226
- ### Units~UnitData : <code>Unit</code>
1227
- **Kind**: inner constant of [<code>Units</code>](#module_Units)
1228
- **Default**: <code>{&quot;unit&quot;:&quot;science.unit&quot;,&quot;otherUnit&quot;:&quot;science.unit&quot;,&quot;ratio&quot;:1}</code>
1229
- **Read only**: true
1230
- <a name="module_Units..summarizeUnit"></a>
1310
+ | Name | Type | Description |
1311
+ | --- | --- | --- |
1312
+ | | <code>CurrencyDescription</code> | |
1313
+ | value | <code>decimal</code> | Decimal monetary value |
1231
1314
 
1232
- ### Units~summarizeUnit(unit) ⇒ <code>string</code>
1233
- Returns a standardized formatted name string
1315
+ <a name="module_Product..FullProductPricing"></a>
1234
1316
 
1235
- **Kind**: inner method of [<code>Units</code>](#module_Units)
1236
- **Returns**: <code>string</code> - formatted name string
1317
+ ### Product~FullProductPricing : <code>object</code>
1318
+ Pricing Object
1237
1319
 
1238
- | Param | Type |
1320
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1321
+ **Properties**
1322
+
1323
+ | Name | Type |
1239
1324
  | --- | --- |
1240
- | unit | <code>Unit</code> |
1325
+ | basePrice | <code>MonetaryValue</code> |
1326
+ | onSale | <code>boolean</code> |
1327
+ | salePrice | <code>MonetaryValue</code> |
1241
1328
 
1242
- <a name="module_Units..Unit"></a>
1329
+ <a name="module_Product..ProductDimensions"></a>
1243
1330
 
1244
- ### Units~Unit : <code>object</code>
1245
- A structure to hold Unit name and conversion information
1246
- This does NOT deal with length/area/volume changes
1331
+ ### Product~ProductDimensions : <code>object</code>
1332
+ Dimensions Object
1247
1333
 
1248
- **Kind**: inner typedef of [<code>Units</code>](#module_Units)
1334
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1249
1335
  **Properties**
1250
1336
 
1251
1337
  | Name | Type | Description |
1252
1338
  | --- | --- | --- |
1253
- | Id | <code>string</code> | database record Id - random but unique |
1254
- | refPath | <code>string</code> | database record/document storage path |
1255
- | unit | <code>string</code> | text version of the unit name |
1256
- | ratio | <code>number</code> | numerical conversion highValue |
1257
- | otherUnit | <code>string</code> | other unit to reference against - "name" unit is "ratio" of "other" unit |
1258
- | system | <code>string</code> | measurement system - imperial, metric, time |
1339
+ | height | <code>float</code> | |
1340
+ | width | <code>float</code> | |
1341
+ | length | <code>float</code> | |
1342
+ | unit | <code>text</code> | //​ProductDimensionsUnit |
1343
+
1344
+ <a name="module_Product..PriceObject"></a>
1345
+
1346
+ ### Product~PriceObject : <code>object</code>
1347
+ Price Object
1348
+
1349
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1350
+ <a name="module_Product..ProductWeight"></a>
1351
+
1352
+ ### Product~ProductWeight : <code>object</code>
1353
+ Weight Object
1354
+
1355
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1356
+ **Properties**
1357
+
1358
+ | Name | Type | Description |
1359
+ | --- | --- | --- |
1360
+ | unit | <code>text</code> | //​ProductWeightUnitEnum |
1361
+ | value | <code>float</code> | |
1362
+
1363
+ <a name="module_Product..ProductMeasurements"></a>
1364
+
1365
+ ### Product~ProductMeasurements : <code>object</code>
1366
+ Measurements of the variant when it's shipped. Present for PHYSICAL products only.
1367
+
1368
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1369
+ **Properties**
1370
+
1371
+ | Name | Type |
1372
+ | --- | --- |
1373
+ | dimensions | <code>ProductDimensions</code> |
1374
+ | weight | <code>ProductWeight</code> |
1375
+
1376
+ <a name="module_Product..ProductStock"></a>
1377
+
1378
+ ### Product~ProductStock : <code>object</code>
1379
+ Available stock for the variant. Present for PHYSICAL products only.
1380
+
1381
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1382
+ **Properties**
1383
+
1384
+ | Name | Type |
1385
+ | --- | --- |
1386
+ | quantity | <code>integer</code> |
1387
+ | unlimited | <code>boolean</code> |
1388
+
1389
+ <a name="module_Product..PhysicalProductVariant"></a>
1390
+
1391
+ ### Product~PhysicalProductVariant : <code>object</code>
1392
+ variant record (including inventory and pricing)
1393
+
1394
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1395
+ **Properties**
1396
+
1397
+ | Name | Type | Description |
1398
+ | --- | --- | --- |
1399
+ | attributes | <code>Array.AttributeValue</code> | array of attribute/value pairs for a variant |
1400
+ | sku | <code>string</code> | |
1401
+ | mpn | <code>string</code> | manufacturer part number |
1402
+ | gtin | <code>string</code> | Global Trade Item Number |
1403
+ | id | <code>string</code> | unique ID for product variant |
1404
+ | image | <code>ProductImage</code> | Image associated with this variant |
1405
+ | shippingMeasurements | <code>ProductMeasurements</code> | |
1406
+ | stock | <code>ProductStock</code> | |
1407
+
1408
+ <a name="module_Product..MetaData"></a>
1409
+
1410
+ ### Product~MetaData : <code>object</code>
1411
+ Meta Information for SEO
1412
+
1413
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1414
+ **Properties**
1415
+
1416
+ | Name | Type |
1417
+ | --- | --- |
1418
+ | title | <code>string</code> |
1419
+ | description | <code>string</code> |
1420
+
1421
+ <a name="module_Product..Product"></a>
1422
+
1423
+ ### Product~Product : <code>object</code>
1424
+ a product record
1425
+
1426
+ **Kind**: inner typedef of [<code>Product</code>](#module_Product)
1427
+ **Properties**
1428
+
1429
+ | Name | Type | Description |
1430
+ | --- | --- | --- |
1431
+ | Id | <code>string</code> | Database Id of document (redundant for convenience) |
1432
+ | refPath | <code>string</code> | if from database, full path to document |
1433
+ | name | <code>string</code> | name for the Product |
1434
+ | description | <code>string</code> | Basic description of the product |
1435
+ | recipe | <code>Recipe\_Data</code> | pricing and fabrication data |
1436
+ | image_links | <code>Array:ImageLinks</code> | |
1437
+ | type | <code>text</code> | //​ProductTypeV2Enum |
1438
+ | isVisible | <code>boolean</code> | |
1439
+ | seoOptions | <code>MetaData</code> | |
1440
+ | name | <code>string</code> | name for the Product |
1441
+ | seoOptions | <code>MetaData</code> | |
1442
+ | tags | <code>Array.string</code> | |
1443
+ | materials | <code>Array.string</code> | |
1444
+ | patterns | <code>Array.string</code> | |
1445
+ | URL | <code>string</code> | |
1446
+ | urlSlug | <code>string</code> | |
1447
+ | variantAttributes | <code>Array.string</code> | |
1448
+ | variants | <code>Array.PhysicalProductVariant</code> | |
1259
1449
 
1260
1450
  <a name="module_User"></a>
1261
1451
 
@@ -1880,67 +2070,87 @@ Function Signature for UpdateChange functions(prev, value, itemFor, fullChoiceOb
1880
2070
  | itemFor | <code>string</code> |
1881
2071
  | fullChoiceObject | <code>object</code> |
1882
2072
 
1883
- <a name="module_InventoryLogic"></a>
2073
+ <a name="module_Boilerplate"></a>
1884
2074
 
1885
- ## InventoryLogic
1886
- Business Logic for the PaaS, wrapped
1887
- around FirebaseWrapper, to be shared between Back and Front End.
1888
- This particular library only provides the business "logic" - not browser
1889
- services.
2075
+ ## Boilerplate
2076
+ Shared constants and symbols
1890
2077
 
2078
+ <a name="module_Units"></a>
1891
2079
 
1892
- * [InventoryLogic](#module_InventoryLogic)
2080
+ ## Units
2081
+ Typedefs, constants, support functions and database operations related to usage Units
2082
+ and conversions
2083
+
2084
+
2085
+ * [Units](#module_Units)
1893
2086
  * _static_
1894
- * [.databaseStart(firebase, config, thisLogger)](#module_InventoryLogic.databaseStart) ⇒ <code>Promise.Firebase.app</code>
2087
+ * [.saveUnit()](#module_Units.saveUnit) ⇒ <code>Promise.&lt;void&gt;</code>
1895
2088
  * _inner_
1896
- * [~FirebaseConfigObject](#module_InventoryLogic..FirebaseConfigObject) : <code>object</code>
2089
+ * [~UnitDefault](#module_Units..UnitDefault) : <code>Unit</code>
2090
+ * [~UnitForm](#module_Units..UnitForm) : <code>Unit</code>
2091
+ * [~UnitData](#module_Units..UnitData) : <code>Unit</code>
2092
+ * [~summarizeUnit(unit)](#module_Units..summarizeUnit) ⇒ <code>string</code>
2093
+ * [~Unit](#module_Units..Unit) : <code>object</code>
1897
2094
 
1898
- <a name="module_InventoryLogic.databaseStart"></a>
2095
+ <a name="module_Units.saveUnit"></a>
1899
2096
 
1900
- ### InventoryLogic.databaseStart(firebase, config, thisLogger) ⇒ <code>Promise.Firebase.app</code>
1901
- all-in-one wrapper for a solid subset of CLIENT-SIDE Firebase
1902
- functions, with a consistent interface. There is a parallel set for
1903
- ADMIN-SIDE functions as well.
1904
- Call/initialize with Firebase Configuration settings in an object as
1905
- described below
2097
+ ### Units.saveUnit() ⇒ <code>Promise.&lt;void&gt;</code>
2098
+ Saves a default Stage Settings object to the database
1906
2099
 
1907
- **Kind**: static method of [<code>InventoryLogic</code>](#module_InventoryLogic)
2100
+ **Kind**: static method of [<code>Units</code>](#module_Units)
2101
+ **Properties**
1908
2102
 
1909
- | Param | Type | Description |
1910
- | --- | --- | --- |
1911
- | firebase | <code>Firebase</code> | |
1912
- | config | <code>FirebaseConfigObject</code> | Firebase Admin object |
1913
- | thisLogger | <code>callback</code> | |
2103
+ | Name | Type |
2104
+ | --- | --- |
2105
+ | unit | <code>Unit</code> |
1914
2106
 
1915
- **Example**
1916
- ```
1917
- //this specifically loads ALL the subsections, specifically for
1918
- //the Browser. See later (tbd) notes for NodeJS
2107
+ <a name="module_Units..UnitDefault"></a>
1919
2108
 
1920
- import FirebaseWrapper from "@leaddreamer/firebase-wrapper";
1921
- FirebaseWrapper(config); //see below
1922
- export * from "@leaddreamer/firebase-wrapper";
1923
- ```
1924
- <a name="module_InventoryLogic..FirebaseConfigObject"></a>
2109
+ ### Units~UnitDefault : <code>Unit</code>
2110
+ **Kind**: inner constant of [<code>Units</code>](#module_Units)
2111
+ **Default**: <code>{&quot;Id&quot;:null,&quot;refPath&quot;:null,&quot;unit&quot;:null,&quot;ratio&quot;:1,&quot;otherUnit&quot;:null,&quot;system&quot;:null}</code>
2112
+ **Read only**: true
2113
+ <a name="module_Units..UnitForm"></a>
1925
2114
 
1926
- ### InventoryLogic~FirebaseConfigObject : <code>object</code>
1927
- only authDomain, databaseURL and storageBucket are present when
1928
- called from a cloud environment
2115
+ ### Units~UnitForm : <code>Unit</code>
2116
+ **Kind**: inner constant of [<code>Units</code>](#module_Units)
2117
+ **Default**: <code>{&quot;unit&quot;:&quot;text&quot;,&quot;ratio&quot;:&quot;number&quot;,&quot;otherUnit&quot;:&quot;&quot;,&quot;system&quot;:&quot;string&quot;}</code>
2118
+ **Read only**: true
2119
+ <a name="module_Units..UnitData"></a>
1929
2120
 
1930
- **Kind**: inner typedef of [<code>InventoryLogic</code>](#module_InventoryLogic)
2121
+ ### Units~UnitData : <code>Unit</code>
2122
+ **Kind**: inner constant of [<code>Units</code>](#module_Units)
2123
+ **Default**: <code>{&quot;unit&quot;:&quot;science.unit&quot;,&quot;otherUnit&quot;:&quot;science.unit&quot;,&quot;ratio&quot;:1}</code>
2124
+ **Read only**: true
2125
+ <a name="module_Units..summarizeUnit"></a>
2126
+
2127
+ ### Units~summarizeUnit(unit) ⇒ <code>string</code>
2128
+ Returns a standardized formatted name string
2129
+
2130
+ **Kind**: inner method of [<code>Units</code>](#module_Units)
2131
+ **Returns**: <code>string</code> - formatted name string
2132
+
2133
+ | Param | Type |
2134
+ | --- | --- |
2135
+ | unit | <code>Unit</code> |
2136
+
2137
+ <a name="module_Units..Unit"></a>
2138
+
2139
+ ### Units~Unit : <code>object</code>
2140
+ A structure to hold Unit name and conversion information
2141
+ This does NOT deal with length/area/volume changes
2142
+
2143
+ **Kind**: inner typedef of [<code>Units</code>](#module_Units)
1931
2144
  **Properties**
1932
2145
 
1933
2146
  | Name | Type | Description |
1934
2147
  | --- | --- | --- |
1935
- | apiKey | <code>string</code> | required api Key from Firebase Console, |
1936
- | appId | <code>string</code> | required app ID from Firebase Console |
1937
- | projectId | <code>string</code> | required Firebase projectID from Firebase console |
1938
- | authDomain | <code>string</code> | (optional) auth domain from Firebase Console |
1939
- | databaseURL | <code>string</code> | (optional) Firestore database URL from Firebase console |
1940
- | storageBucket: | <code>string</code> | (optional) URL of Firestore Storage Bucket |
1941
- | messagingSenderId: | <code>string</code> | (optional) ID for Messaing service from Firebase Console |
1942
- | measurementId: | <code>string</code> | (optional) Analytics/Measurement ID from Firebase Console |
1943
- | mapsAPIKey | <code>string</code> | (optional) App ID for Google Maps API, from Google |
2148
+ | Id | <code>string</code> | database record Id - random but unique |
2149
+ | refPath | <code>string</code> | database record/document storage path |
2150
+ | unit | <code>string</code> | text version of the unit name |
2151
+ | ratio | <code>number</code> | numerical conversion highValue |
2152
+ | otherUnit | <code>string</code> | other unit to reference against - "name" unit is "ratio" of "other" unit |
2153
+ | system | <code>string</code> | measurement system - imperial, metric, time |
1944
2154
 
1945
2155
 
1946
2156
  * * *
@@ -14,7 +14,7 @@ import {
14
14
  } from "@leaddreamer/firebase-wrapper";
15
15
  import { Forms, fillForm } from "@leaddreamer/staticforms";
16
16
 
17
- import { UNITS, MATERIAL, COMMODITIES, COMMODITY, COMPONENT_RANGE } from "../boilerplate";
17
+ import { UNITS, MATERIAL, COMMODITIES, COMMODITY, COMPONENT_RANGE } from "../boilerplate/index.js";
18
18
 
19
19
  //////////////////////////////////////////////////////////////////////
20
20
  // Constants
@@ -21,8 +21,8 @@ import {
21
21
  UNITS,
22
22
  COMPONENT_RANGE,
23
23
  COMPONENT_COUNT_RANGE,
24
- } from "../boilerplate";
25
- import {StageLevels, MaterialLevels} from "../Markups";
24
+ } from "../boilerplate/index.js";
25
+ import {StageLevels, MaterialLevels} from "../Markups/index.js";
26
26
 
27
27
  //////////////////////////////////////////////////////////////////////
28
28
  // Constants
@@ -6,7 +6,7 @@
6
6
  import { updateRecord } from "@leaddreamer/firebase-wrapper";
7
7
  import { Forms, fillForm } from "@leaddreamer/staticforms";
8
8
 
9
- import { MARKUPS, STAGE, FABRICATION, WHOLESALE, RETAIL, BASE, HIGHVALUE, SERVICE, MATERIAL } from "../boilerplate";
9
+ import { MARKUPS, STAGE, FABRICATION, WHOLESALE, RETAIL, BASE, HIGHVALUE, SERVICE, MATERIAL } from "../boilerplate/index.js";
10
10
 
11
11
  //////////////////////////////////////////////////////////////////////
12
12
  // Constants
@@ -17,7 +17,7 @@ import {
17
17
  } from "@leaddreamer/firebase-wrapper";
18
18
 
19
19
  import { Forms, cleanType } from "@leaddreamer/staticforms";
20
- import { PAYMENT, RECEIPTS, CARDS } from "../boilerplate";
20
+ import { PAYMENT, RECEIPTS, CARDS } from "../boilerplate/index.js";
21
21
 
22
22
  //////////////////////////////////////////////////////////////////////
23
23
  // definitions
@@ -5,23 +5,148 @@
5
5
  import { updateRecord} from "@leaddreamer/firebase-wrapper";
6
6
  import { Forms, fillForm } from "@leaddreamer/staticforms";
7
7
 
8
- import { PRODUCT, MARKUPS, ISBN_LENGTH } from "../boilerplate";
9
- import { typedRecordFromChild } from "../Utilities"
8
+ import { PRODUCT, MARKUPS, ISBN_LENGTH } from "../boilerplate/index.js";
9
+ import { typedRecordFromChild } from "../Utilities/index.js"
10
10
 
11
11
  //////////////////////////////////////////////////////////////////////
12
12
  // Constants
13
+
14
+ /**
15
+ * "recipe" related values - build-stage markups, product/project Flag, created/modified dates
16
+ * @typedef {object} Recipe_Data
17
+ * @property {module:Markups~Stage} markups
18
+ * @property {boolean} projectQ flag for product/project
19
+ * @property {dateTime} created
20
+ * @property {dateTime} modified
21
+ */
22
+
23
+ /**
24
+ * A list of attributes for a product
25
+ * @typedef {Array.String} AttributeList
26
+ */
27
+
28
+ /**
29
+ * Array of attribute name/value pairs
30
+ * @typedef {object} AttributeValue
31
+ * @property {string} attibuteName attribute name from attribute list
32
+ * @property {string} value value for the particular attribute
33
+ */
34
+
35
+ /**
36
+ * Image Descriptor
37
+ * @typedef {object} ProductImage
38
+ * @property {string} altText alt text for the image - SEO etc
39
+ * @property {Array.string} availableFormats Available image sizes.
40
+ * @property {string} id unique id for this productImage
41
+ * @property {integer} orderIndex Position of the image in the product's image list.
42
+ * @property {object} originalSize Image size when first uploaded.
43
+ * @property {MetaData} seoOptions
44
+ * @property {string} URL Absolute URL of the hosted image.
45
+ */
46
+
47
+ /**
48
+ * Currency Description ISO 4217 currency code
49
+ * @typedef {object} CurrencyDescription
50
+ * @property {string} currencyCode
51
+ * @property {integer} defaultFractionDigits
52
+ * @property {string} displayName
53
+ * @property {string} numericCodeAsString
54
+ * @property {string} symbol
55
+ */
56
+
57
+ /**
58
+ * Monetary Value Specification
59
+ * @typedef {object} MonetaryValue
60
+ * @property {CurrencyDescription}
61
+ * @property {decimal} value Decimal monetary value
62
+ */
63
+
64
+ /**
65
+ * Pricing Object
66
+ * @typedef {object} FullProductPricing
67
+ * @property {MonetaryValue} basePrice
68
+ * @property {boolean} onSale
69
+ * @property {MonetaryValue} salePrice
70
+ */
71
+
72
+ /**
73
+ * Dimensions Object
74
+ * @typedef {object} ProductDimensions
75
+ * @property {float} height
76
+ * @property {float} width
77
+ * @property {float} length
78
+ * @property {text} unit //​ProductDimensionsUnit
79
+ */
80
+
13
81
  /**
14
- * a record
82
+ * Price Object
83
+ * @typedef {object} PriceObject
84
+ *
85
+ */
86
+
87
+ /**
88
+ * Weight Object
89
+ * @typedef {object} ProductWeight
90
+ * @property {text} unit //​ProductWeightUnitEnum
91
+ * @property {float} value
92
+ */
93
+
94
+ /**
95
+ * Measurements of the variant when it's shipped. Present for PHYSICAL products only.
96
+ * @typedef {object} ProductMeasurements
97
+ * @property {ProductDimensions} dimensions
98
+ * @property {ProductWeight} weight
99
+ */
100
+
101
+ /**
102
+ * Available stock for the variant. Present for PHYSICAL products only.
103
+ * @typedef {object} ProductStock
104
+ * @property {integer} quantity
105
+ * @property {boolean} unlimited
106
+ */
107
+
108
+
109
+ /**
110
+ * variant record (including inventory and pricing)
111
+ * @typedef {object} PhysicalProductVariant
112
+ * @property {Array.AttributeValue} attributes array of attribute/value pairs for a variant
113
+ * @property {string} sku
114
+ * @property {string} mpn manufacturer part number
115
+ * @property {string} gtin Global Trade Item Number
116
+ * @property {string} id unique ID for product variant
117
+ * @property {ProductImage} image Image associated with this variant
118
+ * @property {ProductMeasurements} shippingMeasurements
119
+ * @property {ProductStock} stock
120
+ */
121
+
122
+ /**
123
+ * Meta Information for SEO
124
+ * @typedef {object} MetaData
125
+ * @property {string} title
126
+ * @property {string} description
127
+ */
128
+
129
+ /**
130
+ * a product record
15
131
  * @typedef {object} Product
16
- * @property {?string} Id Id of document (redundant for convenience)
132
+ * @property {?string} Id Database Id of document (redundant for convenience)
17
133
  * @property {?string} refPath if from database, full path to document
18
134
  * @property {string} name name for the Product
19
- * @property {string} description
20
- * @property {string} sku
21
- * @property {module:Markups~Stage} markups
22
- * @property {boolean} projectQ flag for product/project
23
- * @property {dateTime} created
24
- * @property {dateTime} modified
135
+ * @property {string} description Basic description of the product
136
+ * @property {Recipe_Data} recipe pricing and fabrication data
137
+ * @property {Array:ImageLinks} image_links
138
+ * @property {text} type //​ProductTypeV2Enum
139
+ * @property {boolean} isVisible
140
+ * @property {MetaData} seoOptions
141
+ * @property {string} name name for the Product
142
+ * @property {MetaData} seoOptions
143
+ * @property {Array.string} tags
144
+ * @property {Array.string} materials
145
+ * @property {Array.string} patterns
146
+ * @property {string} URL
147
+ * @property {string} urlSlug
148
+ * @property {Array.string} variantAttributes
149
+ * @property {Array.PhysicalProductVariant} variants
25
150
  */
26
151
 
27
152
  /**
@@ -31,15 +156,33 @@ import { typedRecordFromChild } from "../Utilities"
31
156
  * @default
32
157
  */
33
158
  const ProductDefault = {
34
- Id: null,
35
- refPath: null,
36
159
  name: `A Product`,
37
160
  description: null,
38
- sku: null,
39
- markups: null,
40
- projectQ: false,
41
- created: null,
42
- modified: null,
161
+ recipe: {
162
+ markups: null,
163
+ projectQ: false,
164
+ created: null,
165
+ modified: null,
166
+ },
167
+ image_links: [],
168
+ type: "",
169
+ google_product_type: "",
170
+ shipping_time: 0,
171
+ condition: "",
172
+ adultQ: false,
173
+ age_group: "adult",
174
+ color: [""],
175
+ material: [""],
176
+ gender: "unisex",
177
+ attributes_gemstones: [""],
178
+ pattern: "",
179
+ size: "",
180
+ weight: 0,
181
+ shippingMeasurements: {
182
+ shipping_length: 0,
183
+ shippin_width: 0,
184
+ shipping_height: 0
185
+ }
43
186
  };
44
187
 
45
188
  /**
@@ -17,8 +17,8 @@ import {
17
17
  } from "@leaddreamer/firebase-wrapper";
18
18
  import { Forms } from "@leaddreamer/staticforms";
19
19
 
20
- import { USER, USERS } from "../boilerplate";
21
- import { typedRecordFromChild } from "../Utilities"
20
+ import { USER, USERS } from "../boilerplate/index.js";
21
+ import { typedRecordFromChild } from "../Utilities/index.js"
22
22
 
23
23
  //////////////////////////////////////////////////////////////////////
24
24
  // Constants
@@ -13,7 +13,7 @@ import {
13
13
  writeRecord,
14
14
  } from "@leaddreamer/firebase-wrapper";
15
15
  import { Forms } from "@leaddreamer/staticforms";
16
- import { ADDRESSES } from "../boilerplate";
16
+ import { ADDRESSES } from "../boilerplate/index.js";
17
17
 
18
18
  //////////////////////////////////////////////////////////////////////
19
19
 
package/business/index.js CHANGED
@@ -3,12 +3,12 @@
3
3
  * frontEnd and NodeJS BackEnd
4
4
  * @module InventoryLogic
5
5
  */
6
- export * from "./boilerplate";
7
- export * from "./Commodities";
8
- export * from "./LineItem";
9
- export * from "./Payment";
10
- export * from "./User";
11
- export * from "./Product";
12
- export * from "./Markups";
13
- export * from "./units";
14
- export * from "./Utilities";
6
+ export * from "./boilerplate/index.js/index.js";
7
+ export * from "./Commodities/index.js";
8
+ export * from "./LineItem/index.js/index.js";
9
+ export * from "./Payment/index.js/index.js";
10
+ export * from "./User/index.js/index.js";
11
+ export * from "./Product/index.js/index.js";
12
+ export * from "./Markups/index.js";
13
+ export * from "./units/index.js";
14
+ export * from "./Utilities/index.js";
@@ -6,7 +6,7 @@
6
6
  import { writeRecord, writeBack } from "@leaddreamer/firebase-wrapper";
7
7
  import { Forms } from "@leaddreamer/staticforms";
8
8
 
9
- import { UNITS } from "../boilerplate";
9
+ import { UNITS } from "../boilerplate/index.js";
10
10
 
11
11
  //////////////////////////////////////////////////////////////////////
12
12
  // Constants
package/index.js CHANGED
@@ -54,7 +54,7 @@ export function databaseStart(firebase, config, thisLogger = null) {
54
54
  return FirebaseWrapper(firebase, config, thisLogger);
55
55
  }
56
56
 
57
- export * from "./business";
57
+ export * from "./business/index.js";
58
58
  export * from "@leaddreamer/firebase-wrapper";
59
59
  export * from "@leaddreamer/genericutilities";
60
60
  export * from "@leaddreamer/staticforms";
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=22"
5
5
  },
6
- "version": "0.0.3-beta.0",
6
+ "version": "0.0.3-beta.11",
7
7
  "description": "Business & Database Logic for Inventory Services",
8
8
  "repository": {
9
9
  "type": "git",
@@ -29,14 +29,14 @@
29
29
  "module": "index.js",
30
30
  "scripts": {
31
31
  "reinstall": "rm -rf node_modules && npm install",
32
- "mybuild": "parcel build",
33
- "rebuild": "$npm_execpath version patch --git-tag-version && $npm_execpath run docs",
34
- "beta:rebuild": "$npm_execpath version prerelease --git-tag-version --preid=beta && $npm_execpath run docs",
32
+ "mybuild": "parcel build --dist-dir './dist'",
35
33
  "release:rebuild": "$npm_execpath version minor --git-tag-version && $npm_execpath run docs",
36
34
  "myprepublishOnly": "$npm_execpath run build",
37
35
  "make_docs": "jsdoc2md -c jsdoc.conf.json --template README.hbs --files *.js ./business/*.js ./business/*/*.js > README.md",
38
36
  "docs": "$npm_execpath run make_docs",
37
+ "beta:rebuild": "$npm_execpath version prerelease --git-tag-version --preid=beta && $npm_execpath run docs",
39
38
  "beta:publish": "$npm_execpath publish --tag=beta --access=restricted",
39
+ "package:rebuild": "$npm_execpath version patch --git-tag-version && $npm_execpath run docs",
40
40
  "package:publish": "$npm_execpath publish --access=restricted",
41
41
  "dry:publish": "$npm_execpath publish --dry-run"
42
42
  },
@@ -44,16 +44,16 @@
44
44
  "access": "public"
45
45
  },
46
46
  "dependencies": {
47
- "@leaddreamer/firebase-wrapper": "^2.1.1-beta.11",
47
+ "@leaddreamer/firebase-wrapper": "^2.1.2-beta.0",
48
48
  "@leaddreamer/genericutilities": "^0.1.6",
49
49
  "@leaddreamer/staticforms": "^1.0.2-beta.0",
50
50
  "lodash.clonedeep": "4.5.0",
51
- "mathjs": "13.2.3",
52
- "uuid": "8.3.2"
51
+ "mathjs": "15.2.0",
52
+ "uuid": "14.0.1"
53
53
  },
54
54
  "peerDependencies": {
55
- "firebase": "11.10.0",
56
- "firebase-admin": "13.4.0"
55
+ "firebase": "12.16.0",
56
+ "firebase-admin": "14.1.0"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "firebase-admin": {
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "devDependencies": {
67
67
  "accounting-js": "2.0.3",
68
- "jsdoc-to-markdown": "9.1.1",
68
+ "jsdoc-to-markdown": "9.1.3",
69
69
  "parcel": "latest"
70
70
  },
71
71
  "keywords": []