@leaddreamer/inventorylogic 0.0.3-beta.38 → 0.0.3-beta.4
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 +9 -852
- package/business/Commodities/index.js +1 -1
- package/business/LineItem/index.js +2 -2
- package/business/Markups/index.js +2 -2
- package/business/Payment/index.js +1 -1
- package/business/Product/index.js +17 -160
- package/business/User/index.js +2 -2
- package/business/Utilities/index.js +1 -1
- package/business/boilerplate/index.js +3 -26
- package/business/index.js +9 -12
- package/business/units/index.js +1 -1
- package/index.js +1 -1
- package/package.json +8 -25
- package/business/Addresses/index.js +0 -181
- package/business/BusinessData/index.js +0 -300
- package/business/Fundamentals/index.js +0 -184
- package/business/PrivateData/index.js +0 -176
- package/dist/InventoryLogic.09daaeaa.js +0 -2
- package/dist/InventoryLogic.0ba84fa7.js +0 -2
- package/dist/InventoryLogic.0d599c03.js +0 -2
- package/dist/InventoryLogic.137e5482.js +0 -2
- package/dist/InventoryLogic.14a7860a.js +0 -2
- package/dist/InventoryLogic.14b7f292.js +0 -2
- package/dist/InventoryLogic.188504b1.js +0 -2
- package/dist/InventoryLogic.196261df.js +0 -2
- package/dist/InventoryLogic.1aa3d0be.js +0 -2
- package/dist/InventoryLogic.205007e9.js +0 -2
- package/dist/InventoryLogic.22a36cc8.js +0 -2
- package/dist/InventoryLogic.2642cf62.js +0 -2
- package/dist/InventoryLogic.2e2dcd29.js +0 -2
- package/dist/InventoryLogic.34455124.js +0 -2
- package/dist/InventoryLogic.3675b133.js +0 -2
- package/dist/InventoryLogic.3b10ccc5.js +0 -2
- package/dist/InventoryLogic.3ccd3412.js +0 -2
- package/dist/InventoryLogic.3cd7da47.js +0 -2
- package/dist/InventoryLogic.415ac613.js +0 -2
- package/dist/InventoryLogic.421e1e7c.js +0 -9
- package/dist/InventoryLogic.457956a7.js +0 -2
- package/dist/InventoryLogic.48cfeaff.js +0 -2
- package/dist/InventoryLogic.4e7559ed.js +0 -2
- package/dist/InventoryLogic.50cb471b.js +0 -2
- package/dist/InventoryLogic.53279d78.js +0 -2
- package/dist/InventoryLogic.58dceea1.js +0 -2
- package/dist/InventoryLogic.5baab4fe.js +0 -2
- package/dist/InventoryLogic.5c08e39a.js +0 -2
- package/dist/InventoryLogic.5c885f7a.js +0 -2
- package/dist/InventoryLogic.648c0930.js +0 -2
- package/dist/InventoryLogic.67c1b155.js +0 -2
- package/dist/InventoryLogic.6f8b7ae0.js +0 -2
- package/dist/InventoryLogic.724cdb7a.js +0 -2
- package/dist/InventoryLogic.7407f5ab.js +0 -2
- package/dist/InventoryLogic.7559452d.js +0 -2
- package/dist/InventoryLogic.81d4c177.js +0 -2
- package/dist/InventoryLogic.86caed3d.js +0 -2
- package/dist/InventoryLogic.89bc98ac.js +0 -2
- package/dist/InventoryLogic.9899e841.js +0 -2
- package/dist/InventoryLogic.9a4b1e67.js +0 -2
- package/dist/InventoryLogic.9f07806b.js +0 -2
- package/dist/InventoryLogic.a08adebe.js +0 -2
- package/dist/InventoryLogic.a4e13ed0.js +0 -2
- package/dist/InventoryLogic.b6a32e7a.js +0 -2
- package/dist/InventoryLogic.bf7b624e.js +0 -2
- package/dist/InventoryLogic.c44fa152.js +0 -2
- package/dist/InventoryLogic.c5bdd6e0.js +0 -2
- package/dist/InventoryLogic.c72232ce.js +0 -2
- package/dist/InventoryLogic.c903d27c.js +0 -2
- package/dist/InventoryLogic.caf3c5cd.js +0 -2
- package/dist/InventoryLogic.d14897a2.js +0 -2
- package/dist/InventoryLogic.d678c3ae.js +0 -2
- package/dist/InventoryLogic.d76d5857.js +0 -2
- package/dist/InventoryLogic.dda8477e.js +0 -2
- package/dist/InventoryLogic.e02cbd0d.js +0 -2
- package/dist/InventoryLogic.e1a6db03.js +0 -2
- package/dist/InventoryLogic.e7e04396.js +0 -2
- package/dist/InventoryLogic.e92db878.js +0 -2
- package/dist/InventoryLogic.eaecbd8b.js +0 -2
- package/dist/InventoryLogic.eed8150d.js +0 -2
- package/dist/InventoryLogic.f27b4a7e.js +0 -2
- package/dist/InventoryLogic.f27e2dc7.js +0 -2
- package/dist/InventoryLogic.f29bd369.js +0 -2
- package/dist/InventoryLogic.f3361cdd.js +0 -2
- package/dist/InventoryLogic.fb851384.js +0 -2
- package/dist/InventoryLogic.fcbfca1e.js +0 -2
- package/dist/InventoryLogic.ff65d86c.js +0 -2
- package/dist/index.js +0 -2
package/README.md
CHANGED
|
@@ -19,21 +19,10 @@ services.</p>
|
|
|
19
19
|
<dd><p>A collection of Business logic and database functions. Shared between ReactJS
|
|
20
20
|
frontEnd and NodeJS BackEnd</p>
|
|
21
21
|
</dd>
|
|
22
|
-
<dt><a href="#module_Addresses">Addresses</a></dt>
|
|
23
|
-
<dd><p>Types and functins for handling addresses</p>
|
|
24
|
-
</dd>
|
|
25
|
-
<dt><a href="#module_BusinessData">BusinessData</a></dt>
|
|
26
|
-
<dd><p>Functions for managing (potentially)private data for an organization.
|
|
27
|
-
Unified structure as a sub-record of organization, or CityManager accounts</p>
|
|
28
|
-
</dd>
|
|
29
22
|
<dt><a href="#module_Commodities">Commodities</a></dt>
|
|
30
23
|
<dd><p>Typedefs, constants, support functions and database operations related to Commodity Matrials
|
|
31
24
|
users</p>
|
|
32
25
|
</dd>
|
|
33
|
-
<dt><a href="#module_Fundamentals">Fundamentals</a></dt>
|
|
34
|
-
<dd><p>Typedefs, constants, support functions and database operations related to Fundamental
|
|
35
|
-
setting from the Database *</p>
|
|
36
|
-
</dd>
|
|
37
26
|
<dt><a href="#module_LineItem">LineItem</a></dt>
|
|
38
27
|
<dd><p>Typedefs, constants, support functions and database operations related to LineItem Matrials
|
|
39
28
|
users</p>
|
|
@@ -47,10 +36,6 @@ users</p>
|
|
|
47
36
|
to an individual user. These do not <em>particularly</em> represent a paymentProvider - they are meant
|
|
48
37
|
as an abstraction above a specific payment processor.</p>
|
|
49
38
|
</dd>
|
|
50
|
-
<dt><a href="#module_PrivateData">PrivateData</a></dt>
|
|
51
|
-
<dd><p>Functions for managing (potentially)private data for a user or organization.
|
|
52
|
-
Unified structure as a sub-record of fan, organization, or CityManager accounts</p>
|
|
53
|
-
</dd>
|
|
54
39
|
<dt><a href="#module_Product">Product</a></dt>
|
|
55
40
|
<dd><p>Typedefs, constants, support functions and database operations related to Products</p>
|
|
56
41
|
</dd>
|
|
@@ -193,343 +178,6 @@ called from a cloud environment
|
|
|
193
178
|
| measurementId: | <code>string</code> | (optional) Analytics/Measurement ID from Firebase Console |
|
|
194
179
|
| mapsAPIKey | <code>string</code> | (optional) App ID for Google Maps API, from Google |
|
|
195
180
|
|
|
196
|
-
<a name="module_Addresses"></a>
|
|
197
|
-
|
|
198
|
-
## Addresses
|
|
199
|
-
Types and functins for handling addresses
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
* [Addresses](#module_Addresses)
|
|
203
|
-
* _static_
|
|
204
|
-
* [.AddressDefault](#module_Addresses.AddressDefault) : <code>AddressType</code>
|
|
205
|
-
* [.AddressForm](#module_Addresses.AddressForm) : <code>AddressType</code>
|
|
206
|
-
* [.maplink](#module_Addresses.maplink) : <code>MapLink</code>
|
|
207
|
-
* [.deleteAddress(address)](#module_Addresses.deleteAddress) ⇒ <code>Promise.<void></code>
|
|
208
|
-
* [.deleteAddressByIdAndParent(addressId, parent, batch)](#module_Addresses.deleteAddressByIdAndParent) ⇒ <code>Promise.ChainType</code>
|
|
209
|
-
* [.formatAddress(address)](#module_Addresses.formatAddress) ⇒ <code>string</code>
|
|
210
|
-
* [.saveAddress(address, paraentRefPath)](#module_Addresses.saveAddress) ⇒ <code>Promise.<AddressType></code>
|
|
211
|
-
* [.fetchAddresses(account)](#module_Addresses.fetchAddresses) ⇒ <code>Promise.<Array.AddressType></code>
|
|
212
|
-
* _inner_
|
|
213
|
-
* [~AddressType](#module_Addresses..AddressType) : <code>object</code>
|
|
214
|
-
* [~MapLink](#module_Addresses..MapLink) : <code>object</code>
|
|
215
|
-
* [~ChainType](#module_Addresses..ChainType) : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
|
|
216
|
-
|
|
217
|
-
<a name="module_Addresses.AddressDefault"></a>
|
|
218
|
-
|
|
219
|
-
### Addresses.AddressDefault : <code>AddressType</code>
|
|
220
|
-
**Kind**: static constant of [<code>Addresses</code>](#module_Addresses)
|
|
221
|
-
<a name="module_Addresses.AddressForm"></a>
|
|
222
|
-
|
|
223
|
-
### Addresses.AddressForm : <code>AddressType</code>
|
|
224
|
-
**Kind**: static constant of [<code>Addresses</code>](#module_Addresses)
|
|
225
|
-
<a name="module_Addresses.maplink"></a>
|
|
226
|
-
|
|
227
|
-
### Addresses.maplink : <code>MapLink</code>
|
|
228
|
-
**Kind**: static constant of [<code>Addresses</code>](#module_Addresses)
|
|
229
|
-
**Read only**: true
|
|
230
|
-
<a name="module_Addresses.deleteAddress"></a>
|
|
231
|
-
|
|
232
|
-
### Addresses.deleteAddress(address) ⇒ <code>Promise.<void></code>
|
|
233
|
-
Deletes an existing address record from the database, based on it's own refPath
|
|
234
|
-
|
|
235
|
-
**Kind**: static method of [<code>Addresses</code>](#module_Addresses)
|
|
236
|
-
|
|
237
|
-
| Param | Type |
|
|
238
|
-
| --- | --- |
|
|
239
|
-
| address | <code>AddressType</code> |
|
|
240
|
-
| address.refPath | <code>string</code> |
|
|
241
|
-
|
|
242
|
-
<a name="module_Addresses.deleteAddressByIdAndParent"></a>
|
|
243
|
-
|
|
244
|
-
### Addresses.deleteAddressByIdAndParent(addressId, parent, batch) ⇒ <code>Promise.ChainType</code>
|
|
245
|
-
Deletes an existing address record from the database, based on it's parent
|
|
246
|
-
record and Id
|
|
247
|
-
|
|
248
|
-
**Kind**: static method of [<code>Addresses</code>](#module_Addresses)
|
|
249
|
-
|
|
250
|
-
| Param | Type |
|
|
251
|
-
| --- | --- |
|
|
252
|
-
| addressId | <code>string</code> |
|
|
253
|
-
| parent | <code>OrganizationType</code> |
|
|
254
|
-
| parent.refPath | <code>string</code> |
|
|
255
|
-
| batch | <code>ChainType</code> |
|
|
256
|
-
|
|
257
|
-
<a name="module_Addresses.formatAddress"></a>
|
|
258
|
-
|
|
259
|
-
### Addresses.formatAddress(address) ⇒ <code>string</code>
|
|
260
|
-
Builds a formatted string from a provided address record
|
|
261
|
-
|
|
262
|
-
**Kind**: static method of [<code>Addresses</code>](#module_Addresses)
|
|
263
|
-
|
|
264
|
-
| Param | Type |
|
|
265
|
-
| --- | --- |
|
|
266
|
-
| address | <code>AddressType</code> |
|
|
267
|
-
|
|
268
|
-
<a name="module_Addresses.saveAddress"></a>
|
|
269
|
-
|
|
270
|
-
### Addresses.saveAddress(address, paraentRefPath) ⇒ <code>Promise.<AddressType></code>
|
|
271
|
-
Saves an address record to the database below the provided parentRefPath,
|
|
272
|
-
whether exsiting or not
|
|
273
|
-
|
|
274
|
-
**Kind**: static method of [<code>Addresses</code>](#module_Addresses)
|
|
275
|
-
|
|
276
|
-
| Param | Type | Description |
|
|
277
|
-
| --- | --- | --- |
|
|
278
|
-
| address | <code>AddressType</code> | |
|
|
279
|
-
| address.refPath | <code>string</code> | if present, writes back |
|
|
280
|
-
| paraentRefPath | <code>string</code> | required if new record |
|
|
281
|
-
|
|
282
|
-
<a name="module_Addresses.fetchAddresses"></a>
|
|
283
|
-
|
|
284
|
-
### Addresses.fetchAddresses(account) ⇒ <code>Promise.<Array.AddressType></code>
|
|
285
|
-
Fetches all address records for an account
|
|
286
|
-
|
|
287
|
-
**Kind**: static method of [<code>Addresses</code>](#module_Addresses)
|
|
288
|
-
|
|
289
|
-
| Param | Type |
|
|
290
|
-
| --- | --- |
|
|
291
|
-
| account | <code>Record</code> |
|
|
292
|
-
| account.refPath | <code>string</code> |
|
|
293
|
-
|
|
294
|
-
<a name="module_Addresses..AddressType"></a>
|
|
295
|
-
|
|
296
|
-
### Addresses~AddressType : <code>object</code>
|
|
297
|
-
**Kind**: inner typedef of [<code>Addresses</code>](#module_Addresses)
|
|
298
|
-
**Properties**
|
|
299
|
-
|
|
300
|
-
| Name | Type | Description |
|
|
301
|
-
| --- | --- | --- |
|
|
302
|
-
| Id | <code>string</code> | will be populated for existing record; null or missing for new/minimal object |
|
|
303
|
-
| refPath | <code>string</code> | will be populated for existing record; null or missing for new/minimal object |
|
|
304
|
-
| address_line_1 | <code>string</code> | |
|
|
305
|
-
| address_line_2 | <code>string</code> | |
|
|
306
|
-
| city | <code>string</code> | |
|
|
307
|
-
| region | <code>string</code> | selected from a list of supported Cities/Regions |
|
|
308
|
-
| state | <code>string</code> | |
|
|
309
|
-
| zip | <code>zip</code> | |
|
|
310
|
-
| mapLink | <code>maplink</code> | link to Google map location |
|
|
311
|
-
|
|
312
|
-
<a name="module_Addresses..MapLink"></a>
|
|
313
|
-
|
|
314
|
-
### Addresses~MapLink : <code>object</code>
|
|
315
|
-
**Kind**: inner typedef of [<code>Addresses</code>](#module_Addresses)
|
|
316
|
-
**Properties**
|
|
317
|
-
|
|
318
|
-
| Name | Type | Description |
|
|
319
|
-
| --- | --- | --- |
|
|
320
|
-
| placeId | <code>string</code> | as defined by Google |
|
|
321
|
-
| latlng | <code>object</code> | coordinates tuple |
|
|
322
|
-
| latlng.lat | <code>string</code> | lattitude |
|
|
323
|
-
| latlng.lng | <code>string</code> | longitude |
|
|
324
|
-
| url | <code>string</code> | link to place/map entry |
|
|
325
|
-
| formatted_address | <code>string</code> | printable string of address |
|
|
326
|
-
|
|
327
|
-
<a name="module_Addresses..ChainType"></a>
|
|
328
|
-
|
|
329
|
-
### Addresses~ChainType : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
|
|
330
|
-
**Kind**: inner typedef of [<code>Addresses</code>](#module_Addresses)
|
|
331
|
-
<a name="module_BusinessData"></a>
|
|
332
|
-
|
|
333
|
-
## BusinessData
|
|
334
|
-
Functions for managing (potentially)private data for an organization.
|
|
335
|
-
Unified structure as a sub-record of organization, or CityManager accounts
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
* [BusinessData](#module_BusinessData)
|
|
339
|
-
* _static_
|
|
340
|
-
* [.fetchFullAccount(account)](#module_BusinessData.fetchFullAccount) ⇒ <code>Promise.AccountType</code>
|
|
341
|
-
* [.fetchBusinessData(account)](#module_BusinessData.fetchBusinessData) ⇒ <code>Promise.BusinessData</code>
|
|
342
|
-
* [.accountPage(account, origin)](#module_BusinessData.accountPage) ⇒ <code>string</code>
|
|
343
|
-
* [.createBusinessData(account, batch)](#module_BusinessData.createBusinessData) ⇒ <code>Promise.<ChainType></code>
|
|
344
|
-
* [.saveBusinessData(businessData)](#module_BusinessData.saveBusinessData) ⇒ <code>Promise.<BusinessData></code>
|
|
345
|
-
* [.deleteBusinessData(businessData)](#module_BusinessData.deleteBusinessData) ⇒ <code>Promise.<void></code>
|
|
346
|
-
* [.businessDataPath(account)](#module_BusinessData.businessDataPath) ⇒ <code>string</code>
|
|
347
|
-
* [.profileComplete(account, businessData)](#module_BusinessData.profileComplete) ⇒ <code>Boolean</code>
|
|
348
|
-
* [.profileIncomplete(account, businessData)](#module_BusinessData.profileIncomplete) ⇒ <code>string</code> \| <code>null</code>
|
|
349
|
-
* [.setOpenIssues(businessData)](#module_BusinessData.setOpenIssues) ⇒ <code>Promise.boolean</code>
|
|
350
|
-
* [.clearOpenIssues(businessData)](#module_BusinessData.clearOpenIssues) ⇒ <code>Promise.boolean</code>
|
|
351
|
-
* _inner_
|
|
352
|
-
* [~BusinessDefault](#module_BusinessData..BusinessDefault) : <code>BusinessData</code>
|
|
353
|
-
* [~BusinessAccountForm](#module_BusinessData..BusinessAccountForm) : <code>BusinessData</code>
|
|
354
|
-
* [~contact](#module_BusinessData..contact) : <code>object</code>
|
|
355
|
-
* [~BusinessData](#module_BusinessData..BusinessData) : <code>object</code>
|
|
356
|
-
* [~ChainType](#module_BusinessData..ChainType) : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
|
|
357
|
-
|
|
358
|
-
<a name="module_BusinessData.fetchFullAccount"></a>
|
|
359
|
-
|
|
360
|
-
### BusinessData.fetchFullAccount(account) ⇒ <code>Promise.AccountType</code>
|
|
361
|
-
Fetches a fulll object representation of an account, including BusinessData
|
|
362
|
-
|
|
363
|
-
**Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
|
|
364
|
-
|
|
365
|
-
| Param | Type |
|
|
366
|
-
| --- | --- |
|
|
367
|
-
| account | <code>AccountType</code> |
|
|
368
|
-
|
|
369
|
-
<a name="module_BusinessData.fetchBusinessData"></a>
|
|
370
|
-
|
|
371
|
-
### BusinessData.fetchBusinessData(account) ⇒ <code>Promise.BusinessData</code>
|
|
372
|
-
Fetches the BusinessData (corporate, addresses, etc) for an account
|
|
373
|
-
|
|
374
|
-
**Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
|
|
375
|
-
|
|
376
|
-
| Param | Type |
|
|
377
|
-
| --- | --- |
|
|
378
|
-
| account | <code>AccountType</code> |
|
|
379
|
-
|
|
380
|
-
<a name="module_BusinessData.accountPage"></a>
|
|
381
|
-
|
|
382
|
-
### BusinessData.accountPage(account, origin) ⇒ <code>string</code>
|
|
383
|
-
Composes a URL for an "account page" from the account, and passed base URL
|
|
384
|
-
|
|
385
|
-
**Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
|
|
386
|
-
**Returns**: <code>string</code> - full URL for business accouont
|
|
387
|
-
|
|
388
|
-
| Param | Type | Description |
|
|
389
|
-
| --- | --- | --- |
|
|
390
|
-
| account | <code>AccountType</code> | |
|
|
391
|
-
| origin | <code>string</code> | base URL for the application |
|
|
392
|
-
|
|
393
|
-
<a name="module_BusinessData.createBusinessData"></a>
|
|
394
|
-
|
|
395
|
-
### BusinessData.createBusinessData(account, batch) ⇒ <code>Promise.<ChainType></code>
|
|
396
|
-
**Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
|
|
397
|
-
**Returns**: <code>Promise.<ChainType></code> - WriteBatch, Transaction or Void
|
|
398
|
-
|
|
399
|
-
| Param | Type | Description |
|
|
400
|
-
| --- | --- | --- |
|
|
401
|
-
| account | <code>AccountType</code> | |
|
|
402
|
-
| batch | <code>ChainType</code> | batching object. Transaction will be added to the batch |
|
|
403
|
-
|
|
404
|
-
<a name="module_BusinessData.saveBusinessData"></a>
|
|
405
|
-
|
|
406
|
-
### BusinessData.saveBusinessData(businessData) ⇒ <code>Promise.<BusinessData></code>
|
|
407
|
-
Writes the "Business" data to the database
|
|
408
|
-
|
|
409
|
-
**Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
|
|
410
|
-
|
|
411
|
-
| Param | Type |
|
|
412
|
-
| --- | --- |
|
|
413
|
-
| businessData | <code>BusinessData</code> |
|
|
414
|
-
|
|
415
|
-
<a name="module_BusinessData.deleteBusinessData"></a>
|
|
416
|
-
|
|
417
|
-
### BusinessData.deleteBusinessData(businessData) ⇒ <code>Promise.<void></code>
|
|
418
|
-
Deletes a BusinessData record (rarely used if ever)
|
|
419
|
-
|
|
420
|
-
**Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
|
|
421
|
-
|
|
422
|
-
| Param | Type |
|
|
423
|
-
| --- | --- |
|
|
424
|
-
| businessData | <code>BusinessData</code> |
|
|
425
|
-
| businessData.refPath | <code>string</code> |
|
|
426
|
-
|
|
427
|
-
<a name="module_BusinessData.businessDataPath"></a>
|
|
428
|
-
|
|
429
|
-
### BusinessData.businessDataPath(account) ⇒ <code>string</code>
|
|
430
|
-
creates the "base path" (refPath) to store addresses based on an account (refPath)
|
|
431
|
-
|
|
432
|
-
**Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
|
|
433
|
-
|
|
434
|
-
| Param | Type |
|
|
435
|
-
| --- | --- |
|
|
436
|
-
| account | <code>Record</code> |
|
|
437
|
-
| account.refPath | <code>string</code> |
|
|
438
|
-
|
|
439
|
-
<a name="module_BusinessData.profileComplete"></a>
|
|
440
|
-
|
|
441
|
-
### BusinessData.profileComplete(account, businessData) ⇒ <code>Boolean</code>
|
|
442
|
-
verifies that all needed information has been filled in
|
|
443
|
-
|
|
444
|
-
**Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
|
|
445
|
-
|
|
446
|
-
| Param | Type | Description |
|
|
447
|
-
| --- | --- | --- |
|
|
448
|
-
| account | <code>AccountType</code> | |
|
|
449
|
-
| businessData | <code>BusinessData</code> | record |
|
|
450
|
-
|
|
451
|
-
<a name="module_BusinessData.profileIncomplete"></a>
|
|
452
|
-
|
|
453
|
-
### BusinessData.profileIncomplete(account, businessData) ⇒ <code>string</code> \| <code>null</code>
|
|
454
|
-
verifies that all needed information has been filled in
|
|
455
|
-
|
|
456
|
-
**Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
|
|
457
|
-
|
|
458
|
-
| Param | Type | Description |
|
|
459
|
-
| --- | --- | --- |
|
|
460
|
-
| account | <code>AccountType</code> | |
|
|
461
|
-
| businessData | <code>BusinessData</code> | record |
|
|
462
|
-
|
|
463
|
-
<a name="module_BusinessData.setOpenIssues"></a>
|
|
464
|
-
|
|
465
|
-
### BusinessData.setOpenIssues(businessData) ⇒ <code>Promise.boolean</code>
|
|
466
|
-
Sets the "openIssues" flag in an account's BUSINESSDATA record
|
|
467
|
-
The account's refPath is attached to the Payment system's record, and
|
|
468
|
-
used here to find the Payment Account
|
|
469
|
-
|
|
470
|
-
**Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
|
|
471
|
-
|
|
472
|
-
| Param | Type |
|
|
473
|
-
| --- | --- |
|
|
474
|
-
| businessData | <code>BusinessData</code> |
|
|
475
|
-
|
|
476
|
-
<a name="module_BusinessData.clearOpenIssues"></a>
|
|
477
|
-
|
|
478
|
-
### BusinessData.clearOpenIssues(businessData) ⇒ <code>Promise.boolean</code>
|
|
479
|
-
Clears the "openIssues" flag in an account's BUSINESSDATA record
|
|
480
|
-
The account's refPath is attached to the Payment system's record, and
|
|
481
|
-
used here to find the Payment Account
|
|
482
|
-
|
|
483
|
-
**Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
|
|
484
|
-
|
|
485
|
-
| Param | Type |
|
|
486
|
-
| --- | --- |
|
|
487
|
-
| businessData | <code>BusinessData</code> |
|
|
488
|
-
|
|
489
|
-
<a name="module_BusinessData..BusinessDefault"></a>
|
|
490
|
-
|
|
491
|
-
### BusinessData~BusinessDefault : <code>BusinessData</code>
|
|
492
|
-
**Kind**: inner constant of [<code>BusinessData</code>](#module_BusinessData)
|
|
493
|
-
**Default**: <code>{"Id":null,"email":null,"business_type":null,"contact":null,"business_address":null,"mailing_address":null,"billing_address":null,"tel":null,"mcc":null,"tax_rate":null,"openIssues":false}</code>
|
|
494
|
-
<a name="module_BusinessData..BusinessAccountForm"></a>
|
|
495
|
-
|
|
496
|
-
### BusinessData~BusinessAccountForm : <code>BusinessData</code>
|
|
497
|
-
**Kind**: inner constant of [<code>BusinessData</code>](#module_BusinessData)
|
|
498
|
-
**Default**: <code>{"refPath":"hidden:text","email":"email","business_type":"","contact":"","business_address":"","mailing_address":"","billing_address":"","tel":"tel","mcc":""}</code>
|
|
499
|
-
<a name="module_BusinessData..contact"></a>
|
|
500
|
-
|
|
501
|
-
### BusinessData~contact : <code>object</code>
|
|
502
|
-
**Kind**: inner typedef of [<code>BusinessData</code>](#module_BusinessData)
|
|
503
|
-
**Properties**
|
|
504
|
-
|
|
505
|
-
| Name | Type | Description |
|
|
506
|
-
| --- | --- | --- |
|
|
507
|
-
| contact.Id | <code>string</code> | |
|
|
508
|
-
| contact.first_name | <code>string</code> | |
|
|
509
|
-
| contact.last_name | <code>string</code> | |
|
|
510
|
-
| contact.tel | <code>string</code> | |
|
|
511
|
-
| contact.email | <code>string</code> | must be filled in to make profile public |
|
|
512
|
-
|
|
513
|
-
<a name="module_BusinessData..BusinessData"></a>
|
|
514
|
-
|
|
515
|
-
### BusinessData~BusinessData : <code>object</code>
|
|
516
|
-
**Kind**: inner typedef of [<code>BusinessData</code>](#module_BusinessData)
|
|
517
|
-
**Properties**
|
|
518
|
-
|
|
519
|
-
| Name | Type | Description |
|
|
520
|
-
| --- | --- | --- |
|
|
521
|
-
| email | <code>string</code> | must be filled in to make profile public |
|
|
522
|
-
| contact | <code>contact</code> | |
|
|
523
|
-
| tel | <code>string</code> | |
|
|
524
|
-
| business_type | <code>string</code> | |
|
|
525
|
-
| business_address | <code>AddressType</code> | |
|
|
526
|
-
| mailing_address | <code>AddressType</code> | |
|
|
527
|
-
| billing_address | <code>AddressType</code> | |
|
|
528
|
-
|
|
529
|
-
<a name="module_BusinessData..ChainType"></a>
|
|
530
|
-
|
|
531
|
-
### BusinessData~ChainType : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
|
|
532
|
-
**Kind**: inner typedef of [<code>BusinessData</code>](#module_BusinessData)
|
|
533
181
|
<a name="module_Commodities"></a>
|
|
534
182
|
|
|
535
183
|
## Commodities
|
|
@@ -741,166 +389,6 @@ An object to allow for paginating a table read from Firestore. REQUIRES a sortin
|
|
|
741
389
|
| PageForward | <code>method</code> | pages the fetch forward |
|
|
742
390
|
| PageBack | <code>method</code> | pages the fetch backward |
|
|
743
391
|
|
|
744
|
-
<a name="module_Fundamentals"></a>
|
|
745
|
-
|
|
746
|
-
## Fundamentals
|
|
747
|
-
Typedefs, constants, support functions and database operations related to Fundamental
|
|
748
|
-
setting from the Database *
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
* [Fundamentals](#module_Fundamentals)
|
|
752
|
-
* _static_
|
|
753
|
-
* [.fetchFundamentals()](#module_Fundamentals.fetchFundamentals) ⇒ <code>Promise.<Fundamentals></code>
|
|
754
|
-
* [.fetchRates()](#module_Fundamentals.fetchRates) ⇒ <code>Promise.<Rates></code>
|
|
755
|
-
* [.fetchPayoutRates()](#module_Fundamentals.fetchPayoutRates) ⇒ <code>Promise.<PaymentProcessor></code>
|
|
756
|
-
* [.fetchMCCs()](#module_Fundamentals.fetchMCCs) ⇒ <code>Promise.<Array.MCCType></code>
|
|
757
|
-
* [.fetchBusinessTypes()](#module_Fundamentals.fetchBusinessTypes) ⇒ <code>Promise.<Array.BusinessType></code>
|
|
758
|
-
* _inner_
|
|
759
|
-
* [~Rates](#module_Fundamentals..Rates) : <code>Rates</code>
|
|
760
|
-
* [~paymentProcessor](#module_Fundamentals..paymentProcessor) : <code>PaymentProcessor</code>
|
|
761
|
-
* [~MCCDefault](#module_Fundamentals..MCCDefault) : <code>MCCType</code>
|
|
762
|
-
* [~BusinessTypeDefault](#module_Fundamentals..BusinessTypeDefault) : <code>BusinessType</code>
|
|
763
|
-
* [~OrganizationFundamentals](#module_Fundamentals..OrganizationFundamentals) : <code>object</code>
|
|
764
|
-
* [~Rates](#module_Fundamentals..Rates) : <code>object</code>
|
|
765
|
-
* [~PaymentProcessor](#module_Fundamentals..PaymentProcessor) : <code>object</code>
|
|
766
|
-
* [~MCCType](#module_Fundamentals..MCCType) : <code>object</code>
|
|
767
|
-
* [~BusinessType](#module_Fundamentals..BusinessType) : <code>object</code>
|
|
768
|
-
* [~Fundamentals](#module_Fundamentals..Fundamentals) : <code>object</code>
|
|
769
|
-
|
|
770
|
-
<a name="module_Fundamentals.fetchFundamentals"></a>
|
|
771
|
-
|
|
772
|
-
### Fundamentals.fetchFundamentals() ⇒ <code>Promise.<Fundamentals></code>
|
|
773
|
-
returns a Promise which resolves with an
|
|
774
|
-
array of all Fundamentals Objects (or err)
|
|
775
|
-
|
|
776
|
-
**Kind**: static method of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
777
|
-
<a name="module_Fundamentals.fetchRates"></a>
|
|
778
|
-
|
|
779
|
-
### Fundamentals.fetchRates() ⇒ <code>Promise.<Rates></code>
|
|
780
|
-
returns a Promise that resolves with the Rates record from the database
|
|
781
|
-
|
|
782
|
-
**Kind**: static method of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
783
|
-
<a name="module_Fundamentals.fetchPayoutRates"></a>
|
|
784
|
-
|
|
785
|
-
### Fundamentals.fetchPayoutRates() ⇒ <code>Promise.<PaymentProcessor></code>
|
|
786
|
-
returns a Promise that resolves with the Rates record from the database
|
|
787
|
-
|
|
788
|
-
**Kind**: static method of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
789
|
-
<a name="module_Fundamentals.fetchMCCs"></a>
|
|
790
|
-
|
|
791
|
-
### Fundamentals.fetchMCCs() ⇒ <code>Promise.<Array.MCCType></code>
|
|
792
|
-
returns an array of all MCC (Merchant Commerce Code) available
|
|
793
|
-
|
|
794
|
-
**Kind**: static method of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
795
|
-
<a name="module_Fundamentals.fetchBusinessTypes"></a>
|
|
796
|
-
|
|
797
|
-
### Fundamentals.fetchBusinessTypes() ⇒ <code>Promise.<Array.BusinessType></code>
|
|
798
|
-
returns an array of all MCC (Merchant Commerce Code) available
|
|
799
|
-
|
|
800
|
-
**Kind**: static method of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
801
|
-
<a name="module_Fundamentals..Rates"></a>
|
|
802
|
-
|
|
803
|
-
### Fundamentals~Rates : <code>Rates</code>
|
|
804
|
-
**Kind**: inner constant of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
805
|
-
**Default**: <code>{"Id":null,"service_charge":""}</code>
|
|
806
|
-
<a name="module_Fundamentals..paymentProcessor"></a>
|
|
807
|
-
|
|
808
|
-
### Fundamentals~paymentProcessor : <code>PaymentProcessor</code>
|
|
809
|
-
**Kind**: inner constant of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
810
|
-
**Default**: <code>{"connected_active":200,"processing_concurrency":10,"processing_rate":25,"processing_time_window":1000,"per_payout":25,"rate_payout":25,"rate_payout_scale":10000}</code>
|
|
811
|
-
<a name="module_Fundamentals..MCCDefault"></a>
|
|
812
|
-
|
|
813
|
-
### Fundamentals~MCCDefault : <code>MCCType</code>
|
|
814
|
-
**Kind**: inner constant of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
815
|
-
**Default**: <code>{"Id":null,"MCC":null,"name":null,"description":null,"long":null,"type":null}</code>
|
|
816
|
-
<a name="module_Fundamentals..BusinessTypeDefault"></a>
|
|
817
|
-
|
|
818
|
-
### Fundamentals~BusinessTypeDefault : <code>BusinessType</code>
|
|
819
|
-
**Kind**: inner constant of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
820
|
-
**Default**: <code>{"Id":null,"business_type":null,"name":null,"description":null}</code>
|
|
821
|
-
<a name="module_Fundamentals..OrganizationFundamentals"></a>
|
|
822
|
-
|
|
823
|
-
### Fundamentals~OrganizationFundamentals : <code>object</code>
|
|
824
|
-
**Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
825
|
-
**Properties**
|
|
826
|
-
|
|
827
|
-
| Name | Type | Description |
|
|
828
|
-
| --- | --- | --- |
|
|
829
|
-
| Types | <code>Array.string</code> | Allowed organization types |
|
|
830
|
-
|
|
831
|
-
<a name="module_Fundamentals..Rates"></a>
|
|
832
|
-
|
|
833
|
-
### Fundamentals~Rates : <code>object</code>
|
|
834
|
-
**Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
835
|
-
**Properties**
|
|
836
|
-
|
|
837
|
-
| Name | Type | Description |
|
|
838
|
-
| --- | --- | --- |
|
|
839
|
-
| Id | <code>string</code> | |
|
|
840
|
-
| service_charge | <code>object</code> | |
|
|
841
|
-
| service_charge.minimum | <code>number</code> | |
|
|
842
|
-
| service_charge.rate | <code>number</code> | percentage |
|
|
843
|
-
| service_charge.rounding_factor | <code>number</code> | |
|
|
844
|
-
|
|
845
|
-
<a name="module_Fundamentals..PaymentProcessor"></a>
|
|
846
|
-
|
|
847
|
-
### Fundamentals~PaymentProcessor : <code>object</code>
|
|
848
|
-
**Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
849
|
-
**Properties**
|
|
850
|
-
|
|
851
|
-
| Name | Type | Description |
|
|
852
|
-
| --- | --- | --- |
|
|
853
|
-
| connected_active | <code>number</code> | allowed active connections |
|
|
854
|
-
| processing_concurrency | <code>number</code> | |
|
|
855
|
-
| processing_rate | <code>number</code> | |
|
|
856
|
-
| processing_time_window | <code>number</code> | |
|
|
857
|
-
| per_payout | <code>number</code> | |
|
|
858
|
-
| rate_payout | <code>number</code> | |
|
|
859
|
-
| rate_payout_scale | <code>number</code> | |
|
|
860
|
-
|
|
861
|
-
<a name="module_Fundamentals..MCCType"></a>
|
|
862
|
-
|
|
863
|
-
### Fundamentals~MCCType : <code>object</code>
|
|
864
|
-
**Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
865
|
-
**Properties**
|
|
866
|
-
|
|
867
|
-
| Name | Type | Description |
|
|
868
|
-
| --- | --- | --- |
|
|
869
|
-
| Id | <code>string</code> | |
|
|
870
|
-
| MCC | <code>string</code> | Merchant Class Code |
|
|
871
|
-
| name | <code>string</code> | Merchant Class Code |
|
|
872
|
-
| description | <code>string</code> | description of Merchant Class Code |
|
|
873
|
-
| long | <code>string</code> | long description of Merchant Class Code |
|
|
874
|
-
| type | <code>string</code> | Applicable business model - "Artists", "Venues" or "Brands" |
|
|
875
|
-
|
|
876
|
-
<a name="module_Fundamentals..BusinessType"></a>
|
|
877
|
-
|
|
878
|
-
### Fundamentals~BusinessType : <code>object</code>
|
|
879
|
-
**Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
880
|
-
**Properties**
|
|
881
|
-
|
|
882
|
-
| Name | Type | Description |
|
|
883
|
-
| --- | --- | --- |
|
|
884
|
-
| Id | <code>string</code> | |
|
|
885
|
-
| business_type | <code>string</code> | allowed business type value |
|
|
886
|
-
| name | <code>string</code> | business type value |
|
|
887
|
-
| description | <code>string</code> | description ofbusiness type value |
|
|
888
|
-
|
|
889
|
-
<a name="module_Fundamentals..Fundamentals"></a>
|
|
890
|
-
|
|
891
|
-
### Fundamentals~Fundamentals : <code>object</code>
|
|
892
|
-
**Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
|
|
893
|
-
**Properties**
|
|
894
|
-
|
|
895
|
-
| Name | Type | Description |
|
|
896
|
-
| --- | --- | --- |
|
|
897
|
-
| Rates | <code>Rates</code> | |
|
|
898
|
-
| PaymentProcessor | <code>PaymentProcessor</code> | |
|
|
899
|
-
| Defaults | <code>object</code> | |
|
|
900
|
-
| Defaults.MCC | <code>MCCType</code> | |
|
|
901
|
-
| Organizations | <code>OrganizationFundamentals</code> | |
|
|
902
|
-
| Organizations.Types | <code>Array.string</code> | Allowed organization types |
|
|
903
|
-
|
|
904
392
|
<a name="module_LineItem"></a>
|
|
905
393
|
|
|
906
394
|
## LineItem
|
|
@@ -1648,127 +1136,6 @@ Changes the paidQ label on a receipt associated with a pledgeTicket
|
|
|
1648
1136
|
|
|
1649
1137
|
### Payment~AccountObject : <code>UserObject</code>
|
|
1650
1138
|
**Kind**: inner typedef of [<code>Payment</code>](#module_Payment)
|
|
1651
|
-
<a name="module_PrivateData"></a>
|
|
1652
|
-
|
|
1653
|
-
## PrivateData
|
|
1654
|
-
Functions for managing (potentially)private data for a user or organization.
|
|
1655
|
-
Unified structure as a sub-record of fan, organization, or CityManager accounts
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
* [PrivateData](#module_PrivateData)
|
|
1659
|
-
* _static_
|
|
1660
|
-
* [.fetchPrivateData(account)](#module_PrivateData.fetchPrivateData) ⇒ <code>Promise.PrivateData</code>
|
|
1661
|
-
* [.createPrivateData(account, batch)](#module_PrivateData.createPrivateData) ⇒ <code>Promise.<ChainType></code>
|
|
1662
|
-
* [.savePrivateData(privateData)](#module_PrivateData.savePrivateData) ⇒ <code>Promise.<PrivateData></code>
|
|
1663
|
-
* [.deletePrivateData(privateData)](#module_PrivateData.deletePrivateData) ⇒ <code>Promise.<void></code>
|
|
1664
|
-
* [.privateDataPath(account)](#module_PrivateData.privateDataPath) ⇒ <code>string</code>
|
|
1665
|
-
* _inner_
|
|
1666
|
-
* [~PrivateDefault](#module_PrivateData..PrivateDefault) : <code>PrivateData</code>
|
|
1667
|
-
* [~PrivateAccountForm](#module_PrivateData..PrivateAccountForm) : <code>PrivateData</code>
|
|
1668
|
-
* [~contact](#module_PrivateData..contact) : <code>object</code>
|
|
1669
|
-
* [~PrivateData](#module_PrivateData..PrivateData) : <code>object</code>
|
|
1670
|
-
* [~ChainType](#module_PrivateData..ChainType) : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
|
|
1671
|
-
|
|
1672
|
-
<a name="module_PrivateData.fetchPrivateData"></a>
|
|
1673
|
-
|
|
1674
|
-
### PrivateData.fetchPrivateData(account) ⇒ <code>Promise.PrivateData</code>
|
|
1675
|
-
Fecthes the PrivateData (email, tel, addresses, etc) for a Fan account
|
|
1676
|
-
|
|
1677
|
-
**Kind**: static method of [<code>PrivateData</code>](#module_PrivateData)
|
|
1678
|
-
|
|
1679
|
-
| Param | Type |
|
|
1680
|
-
| --- | --- |
|
|
1681
|
-
| account | <code>AccountType</code> |
|
|
1682
|
-
|
|
1683
|
-
<a name="module_PrivateData.createPrivateData"></a>
|
|
1684
|
-
|
|
1685
|
-
### PrivateData.createPrivateData(account, batch) ⇒ <code>Promise.<ChainType></code>
|
|
1686
|
-
**Kind**: static method of [<code>PrivateData</code>](#module_PrivateData)
|
|
1687
|
-
**Returns**: <code>Promise.<ChainType></code> - WriteBatch, Transaction or Void
|
|
1688
|
-
|
|
1689
|
-
| Param | Type | Description |
|
|
1690
|
-
| --- | --- | --- |
|
|
1691
|
-
| account | <code>AccountType</code> | |
|
|
1692
|
-
| batch | <code>ChainType</code> | batching object. Transaction will be added to the batch |
|
|
1693
|
-
|
|
1694
|
-
<a name="module_PrivateData.savePrivateData"></a>
|
|
1695
|
-
|
|
1696
|
-
### PrivateData.savePrivateData(privateData) ⇒ <code>Promise.<PrivateData></code>
|
|
1697
|
-
Writes the "private" data to the database
|
|
1698
|
-
|
|
1699
|
-
**Kind**: static method of [<code>PrivateData</code>](#module_PrivateData)
|
|
1700
|
-
|
|
1701
|
-
| Param | Type |
|
|
1702
|
-
| --- | --- |
|
|
1703
|
-
| privateData | <code>PrivateData</code> |
|
|
1704
|
-
|
|
1705
|
-
<a name="module_PrivateData.deletePrivateData"></a>
|
|
1706
|
-
|
|
1707
|
-
### PrivateData.deletePrivateData(privateData) ⇒ <code>Promise.<void></code>
|
|
1708
|
-
Deletes a PrivateData record (rarely used if ever)
|
|
1709
|
-
|
|
1710
|
-
**Kind**: static method of [<code>PrivateData</code>](#module_PrivateData)
|
|
1711
|
-
|
|
1712
|
-
| Param | Type |
|
|
1713
|
-
| --- | --- |
|
|
1714
|
-
| privateData | <code>PrivateData</code> |
|
|
1715
|
-
| privateData.refPath | <code>string</code> |
|
|
1716
|
-
|
|
1717
|
-
<a name="module_PrivateData.privateDataPath"></a>
|
|
1718
|
-
|
|
1719
|
-
### PrivateData.privateDataPath(account) ⇒ <code>string</code>
|
|
1720
|
-
creates the "base path" (refPath) to store addresses based on an account (refPath)
|
|
1721
|
-
|
|
1722
|
-
**Kind**: static method of [<code>PrivateData</code>](#module_PrivateData)
|
|
1723
|
-
|
|
1724
|
-
| Param | Type |
|
|
1725
|
-
| --- | --- |
|
|
1726
|
-
| account | <code>Record</code> |
|
|
1727
|
-
| account.refPath | <code>string</code> |
|
|
1728
|
-
|
|
1729
|
-
<a name="module_PrivateData..PrivateDefault"></a>
|
|
1730
|
-
|
|
1731
|
-
### PrivateData~PrivateDefault : <code>PrivateData</code>
|
|
1732
|
-
**Kind**: inner constant of [<code>PrivateData</code>](#module_PrivateData)
|
|
1733
|
-
**Default**: <code>{"Id":null,"email":null,"contact":null,"business_address":null,"mailing_address":null,"billing_address":null,"tel":null,"tax_rate":null,"openIssues":false}</code>
|
|
1734
|
-
<a name="module_PrivateData..PrivateAccountForm"></a>
|
|
1735
|
-
|
|
1736
|
-
### PrivateData~PrivateAccountForm : <code>PrivateData</code>
|
|
1737
|
-
**Kind**: inner constant of [<code>PrivateData</code>](#module_PrivateData)
|
|
1738
|
-
**Default**: <code>{"refPath":"hidden:text","email":"email","contact":"","business_address":"","mailing_address":"","billing_address":"","tel":"tel"}</code>
|
|
1739
|
-
<a name="module_PrivateData..contact"></a>
|
|
1740
|
-
|
|
1741
|
-
### PrivateData~contact : <code>object</code>
|
|
1742
|
-
**Kind**: inner typedef of [<code>PrivateData</code>](#module_PrivateData)
|
|
1743
|
-
**Properties**
|
|
1744
|
-
|
|
1745
|
-
| Name | Type | Description |
|
|
1746
|
-
| --- | --- | --- |
|
|
1747
|
-
| contact.Id | <code>string</code> | |
|
|
1748
|
-
| contact.first_name | <code>string</code> | |
|
|
1749
|
-
| contact.last_name | <code>string</code> | |
|
|
1750
|
-
| contact.tel | <code>string</code> | |
|
|
1751
|
-
| contact.email | <code>string</code> | must be filled in to make profile public |
|
|
1752
|
-
|
|
1753
|
-
<a name="module_PrivateData..PrivateData"></a>
|
|
1754
|
-
|
|
1755
|
-
### PrivateData~PrivateData : <code>object</code>
|
|
1756
|
-
**Kind**: inner typedef of [<code>PrivateData</code>](#module_PrivateData)
|
|
1757
|
-
**Properties**
|
|
1758
|
-
|
|
1759
|
-
| Name | Type | Description |
|
|
1760
|
-
| --- | --- | --- |
|
|
1761
|
-
| email | <code>string</code> | must be filled in to make profile public |
|
|
1762
|
-
| contact | <code>contact</code> | |
|
|
1763
|
-
| tel | <code>string</code> | |
|
|
1764
|
-
| business_address | <code>AddressType</code> | |
|
|
1765
|
-
| mailing_address | <code>AddressType</code> | |
|
|
1766
|
-
| billing_address | <code>AddressType</code> | |
|
|
1767
|
-
|
|
1768
|
-
<a name="module_PrivateData..ChainType"></a>
|
|
1769
|
-
|
|
1770
|
-
### PrivateData~ChainType : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
|
|
1771
|
-
**Kind**: inner typedef of [<code>PrivateData</code>](#module_PrivateData)
|
|
1772
1139
|
<a name="module_Product"></a>
|
|
1773
1140
|
|
|
1774
1141
|
## Product
|
|
@@ -1785,20 +1152,6 @@ Typedefs, constants, support functions and database operations related to Produc
|
|
|
1785
1152
|
* [~ProductDefaultForm](#module_Product..ProductDefaultForm) : <code>Product</code>
|
|
1786
1153
|
* [~updateProduct(product, user)](#module_Product..updateProduct) ⇒ <code>promise.LineItem</code>
|
|
1787
1154
|
* [~summarizeProduct(product)](#module_Product..summarizeProduct) ⇒ <code>string</code>
|
|
1788
|
-
* [~Recipe_Data](#module_Product..Recipe_Data) : <code>object</code>
|
|
1789
|
-
* [~AttributeList](#module_Product..AttributeList) : <code>Array.String</code>
|
|
1790
|
-
* [~AttributeValue](#module_Product..AttributeValue) : <code>object</code>
|
|
1791
|
-
* [~ProductImage](#module_Product..ProductImage) : <code>object</code>
|
|
1792
|
-
* [~CurrencyDescription](#module_Product..CurrencyDescription) : <code>object</code>
|
|
1793
|
-
* [~MonetaryValue](#module_Product..MonetaryValue) : <code>object</code>
|
|
1794
|
-
* [~FullProductPricing](#module_Product..FullProductPricing) : <code>object</code>
|
|
1795
|
-
* [~ProductDimensions](#module_Product..ProductDimensions) : <code>object</code>
|
|
1796
|
-
* [~PriceObject](#module_Product..PriceObject) : <code>object</code>
|
|
1797
|
-
* [~ProductWeight](#module_Product..ProductWeight) : <code>object</code>
|
|
1798
|
-
* [~ProductMeasurements](#module_Product..ProductMeasurements) : <code>object</code>
|
|
1799
|
-
* [~ProductStock](#module_Product..ProductStock) : <code>object</code>
|
|
1800
|
-
* [~PhysicalProductVariant](#module_Product..PhysicalProductVariant) : <code>object</code>
|
|
1801
|
-
* [~MetaData](#module_Product..MetaData) : <code>object</code>
|
|
1802
1155
|
* [~Product](#module_Product..Product) : <code>object</code>
|
|
1803
1156
|
|
|
1804
1157
|
<a name="module_Product.createProduct"></a>
|
|
@@ -1825,7 +1178,7 @@ Creates a new Blank Product
|
|
|
1825
1178
|
|
|
1826
1179
|
### Product~ProductDefault : <code>Product</code>
|
|
1827
1180
|
**Kind**: inner constant of [<code>Product</code>](#module_Product)
|
|
1828
|
-
**Default**: <code>{"
|
|
1181
|
+
**Default**: <code>{"Id":null,"refPath":null,"name":"","description":null,"sku":null,"markups":null,"projectQ":false,"created":null,"modified":null}</code>
|
|
1829
1182
|
**Read only**: true
|
|
1830
1183
|
<a name="module_Product..ProductDataForm"></a>
|
|
1831
1184
|
|
|
@@ -1864,221 +1217,25 @@ Returns a standardized formatted name string
|
|
|
1864
1217
|
| --- | --- |
|
|
1865
1218
|
| product | <code>Unit</code> |
|
|
1866
1219
|
|
|
1867
|
-
<a name="module_Product..Recipe_Data"></a>
|
|
1868
|
-
|
|
1869
|
-
### Product~Recipe\_Data : <code>object</code>
|
|
1870
|
-
"recipe" related values - build-stage markups, product/project Flag, created/modified dates
|
|
1871
|
-
|
|
1872
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
1873
|
-
**Properties**
|
|
1874
|
-
|
|
1875
|
-
| Name | Type | Description |
|
|
1876
|
-
| --- | --- | --- |
|
|
1877
|
-
| markups | <code>module:Markups~Stage</code> | |
|
|
1878
|
-
| projectQ | <code>boolean</code> | flag for product/project |
|
|
1879
|
-
| created | <code>dateTime</code> | |
|
|
1880
|
-
| modified | <code>dateTime</code> | |
|
|
1881
|
-
|
|
1882
|
-
<a name="module_Product..AttributeList"></a>
|
|
1883
|
-
|
|
1884
|
-
### Product~AttributeList : <code>Array.String</code>
|
|
1885
|
-
A list of attributes for a product
|
|
1886
|
-
|
|
1887
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
1888
|
-
<a name="module_Product..AttributeValue"></a>
|
|
1889
|
-
|
|
1890
|
-
### Product~AttributeValue : <code>object</code>
|
|
1891
|
-
Array of attribute name/value pairs
|
|
1892
|
-
|
|
1893
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
1894
|
-
**Properties**
|
|
1895
|
-
|
|
1896
|
-
| Name | Type | Description |
|
|
1897
|
-
| --- | --- | --- |
|
|
1898
|
-
| attibuteName | <code>string</code> | attribute name from attribute list |
|
|
1899
|
-
| value | <code>string</code> | value for the particular attribute |
|
|
1900
|
-
|
|
1901
|
-
<a name="module_Product..ProductImage"></a>
|
|
1902
|
-
|
|
1903
|
-
### Product~ProductImage : <code>object</code>
|
|
1904
|
-
Image Descriptor
|
|
1905
|
-
|
|
1906
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
1907
|
-
**Properties**
|
|
1908
|
-
|
|
1909
|
-
| Name | Type | Description |
|
|
1910
|
-
| --- | --- | --- |
|
|
1911
|
-
| altText | <code>string</code> | alt text for the image - SEO etc |
|
|
1912
|
-
| availableFormats | <code>Array.string</code> | Available image sizes. |
|
|
1913
|
-
| id | <code>string</code> | unique id for this productImage |
|
|
1914
|
-
| orderIndex | <code>integer</code> | Position of the image in the product's image list. |
|
|
1915
|
-
| originalSize | <code>object</code> | Image size when first uploaded. |
|
|
1916
|
-
| seoOptions | <code>MetaData</code> | |
|
|
1917
|
-
| URL | <code>string</code> | Absolute URL of the hosted image. |
|
|
1918
|
-
|
|
1919
|
-
<a name="module_Product..CurrencyDescription"></a>
|
|
1920
|
-
|
|
1921
|
-
### Product~CurrencyDescription : <code>object</code>
|
|
1922
|
-
Currency Description ISO 4217 currency code
|
|
1923
|
-
|
|
1924
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
1925
|
-
**Properties**
|
|
1926
|
-
|
|
1927
|
-
| Name | Type |
|
|
1928
|
-
| --- | --- |
|
|
1929
|
-
| currencyCode | <code>string</code> |
|
|
1930
|
-
| defaultFractionDigits | <code>integer</code> |
|
|
1931
|
-
| displayName | <code>string</code> |
|
|
1932
|
-
| numericCodeAsString | <code>string</code> |
|
|
1933
|
-
| symbol | <code>string</code> |
|
|
1934
|
-
|
|
1935
|
-
<a name="module_Product..MonetaryValue"></a>
|
|
1936
|
-
|
|
1937
|
-
### Product~MonetaryValue : <code>object</code>
|
|
1938
|
-
Monetary Value Specification
|
|
1939
|
-
|
|
1940
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
1941
|
-
**Properties**
|
|
1942
|
-
|
|
1943
|
-
| Name | Type | Description |
|
|
1944
|
-
| --- | --- | --- |
|
|
1945
|
-
| | <code>CurrencyDescription</code> | |
|
|
1946
|
-
| value | <code>decimal</code> | Decimal monetary value |
|
|
1947
|
-
|
|
1948
|
-
<a name="module_Product..FullProductPricing"></a>
|
|
1949
|
-
|
|
1950
|
-
### Product~FullProductPricing : <code>object</code>
|
|
1951
|
-
Pricing Object
|
|
1952
|
-
|
|
1953
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
1954
|
-
**Properties**
|
|
1955
|
-
|
|
1956
|
-
| Name | Type |
|
|
1957
|
-
| --- | --- |
|
|
1958
|
-
| basePrice | <code>MonetaryValue</code> |
|
|
1959
|
-
| onSale | <code>boolean</code> |
|
|
1960
|
-
| salePrice | <code>MonetaryValue</code> |
|
|
1961
|
-
|
|
1962
|
-
<a name="module_Product..ProductDimensions"></a>
|
|
1963
|
-
|
|
1964
|
-
### Product~ProductDimensions : <code>object</code>
|
|
1965
|
-
Dimensions Object
|
|
1966
|
-
|
|
1967
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
1968
|
-
**Properties**
|
|
1969
|
-
|
|
1970
|
-
| Name | Type | Description |
|
|
1971
|
-
| --- | --- | --- |
|
|
1972
|
-
| height | <code>float</code> | |
|
|
1973
|
-
| width | <code>float</code> | |
|
|
1974
|
-
| length | <code>float</code> | |
|
|
1975
|
-
| unit | <code>text</code> | //ProductDimensionsUnit |
|
|
1976
|
-
|
|
1977
|
-
<a name="module_Product..PriceObject"></a>
|
|
1978
|
-
|
|
1979
|
-
### Product~PriceObject : <code>object</code>
|
|
1980
|
-
Price Object
|
|
1981
|
-
|
|
1982
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
1983
|
-
<a name="module_Product..ProductWeight"></a>
|
|
1984
|
-
|
|
1985
|
-
### Product~ProductWeight : <code>object</code>
|
|
1986
|
-
Weight Object
|
|
1987
|
-
|
|
1988
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
1989
|
-
**Properties**
|
|
1990
|
-
|
|
1991
|
-
| Name | Type | Description |
|
|
1992
|
-
| --- | --- | --- |
|
|
1993
|
-
| unit | <code>text</code> | //ProductWeightUnitEnum |
|
|
1994
|
-
| value | <code>float</code> | |
|
|
1995
|
-
|
|
1996
|
-
<a name="module_Product..ProductMeasurements"></a>
|
|
1997
|
-
|
|
1998
|
-
### Product~ProductMeasurements : <code>object</code>
|
|
1999
|
-
Measurements of the variant when it's shipped. Present for PHYSICAL products only.
|
|
2000
|
-
|
|
2001
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
2002
|
-
**Properties**
|
|
2003
|
-
|
|
2004
|
-
| Name | Type |
|
|
2005
|
-
| --- | --- |
|
|
2006
|
-
| dimensions | <code>ProductDimensions</code> |
|
|
2007
|
-
| weight | <code>ProductWeight</code> |
|
|
2008
|
-
|
|
2009
|
-
<a name="module_Product..ProductStock"></a>
|
|
2010
|
-
|
|
2011
|
-
### Product~ProductStock : <code>object</code>
|
|
2012
|
-
Available stock for the variant. Present for PHYSICAL products only.
|
|
2013
|
-
|
|
2014
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
2015
|
-
**Properties**
|
|
2016
|
-
|
|
2017
|
-
| Name | Type |
|
|
2018
|
-
| --- | --- |
|
|
2019
|
-
| quantity | <code>integer</code> |
|
|
2020
|
-
| unlimited | <code>boolean</code> |
|
|
2021
|
-
|
|
2022
|
-
<a name="module_Product..PhysicalProductVariant"></a>
|
|
2023
|
-
|
|
2024
|
-
### Product~PhysicalProductVariant : <code>object</code>
|
|
2025
|
-
variant record (including inventory and pricing)
|
|
2026
|
-
|
|
2027
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
2028
|
-
**Properties**
|
|
2029
|
-
|
|
2030
|
-
| Name | Type | Description |
|
|
2031
|
-
| --- | --- | --- |
|
|
2032
|
-
| attributes | <code>Array.AttributeValue</code> | array of attribute/value pairs for a variant |
|
|
2033
|
-
| sku | <code>string</code> | |
|
|
2034
|
-
| mpn | <code>string</code> | manufacturer part number |
|
|
2035
|
-
| gtin | <code>string</code> | Global Trade Item Number |
|
|
2036
|
-
| id | <code>string</code> | unique ID for product variant |
|
|
2037
|
-
| image | <code>ProductImage</code> | Image associated with this variant |
|
|
2038
|
-
| shippingMeasurements | <code>ProductMeasurements</code> | |
|
|
2039
|
-
| stock | <code>ProductStock</code> | |
|
|
2040
|
-
|
|
2041
|
-
<a name="module_Product..MetaData"></a>
|
|
2042
|
-
|
|
2043
|
-
### Product~MetaData : <code>object</code>
|
|
2044
|
-
Meta Information for SEO
|
|
2045
|
-
|
|
2046
|
-
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
2047
|
-
**Properties**
|
|
2048
|
-
|
|
2049
|
-
| Name | Type |
|
|
2050
|
-
| --- | --- |
|
|
2051
|
-
| title | <code>string</code> |
|
|
2052
|
-
| description | <code>string</code> |
|
|
2053
|
-
|
|
2054
1220
|
<a name="module_Product..Product"></a>
|
|
2055
1221
|
|
|
2056
1222
|
### Product~Product : <code>object</code>
|
|
2057
|
-
a
|
|
1223
|
+
a record
|
|
2058
1224
|
|
|
2059
1225
|
**Kind**: inner typedef of [<code>Product</code>](#module_Product)
|
|
2060
1226
|
**Properties**
|
|
2061
1227
|
|
|
2062
1228
|
| Name | Type | Description |
|
|
2063
1229
|
| --- | --- | --- |
|
|
2064
|
-
| Id | <code>string</code> |
|
|
1230
|
+
| Id | <code>string</code> | Id of document (redundant for convenience) |
|
|
2065
1231
|
| refPath | <code>string</code> | if from database, full path to document |
|
|
2066
1232
|
| name | <code>string</code> | name for the Product |
|
|
2067
|
-
| description | <code>string</code> |
|
|
2068
|
-
|
|
|
2069
|
-
|
|
|
2070
|
-
|
|
|
2071
|
-
|
|
|
2072
|
-
|
|
|
2073
|
-
| name | <code>string</code> | name for the Product |
|
|
2074
|
-
| seoOptions | <code>MetaData</code> | |
|
|
2075
|
-
| tags | <code>Array.string</code> | |
|
|
2076
|
-
| materials | <code>Array.string</code> | |
|
|
2077
|
-
| patterns | <code>Array.string</code> | |
|
|
2078
|
-
| URL | <code>string</code> | |
|
|
2079
|
-
| urlSlug | <code>string</code> | |
|
|
2080
|
-
| variantAttributes | <code>Array.string</code> | |
|
|
2081
|
-
| variants | <code>Array.PhysicalProductVariant</code> | |
|
|
1233
|
+
| description | <code>string</code> | |
|
|
1234
|
+
| sku | <code>string</code> | |
|
|
1235
|
+
| markups | <code>module:Markups~Stage</code> | |
|
|
1236
|
+
| projectQ | <code>boolean</code> | flag for product/project |
|
|
1237
|
+
| created | <code>dateTime</code> | |
|
|
1238
|
+
| modified | <code>dateTime</code> | |
|
|
2082
1239
|
|
|
2083
1240
|
<a name="module_User"></a>
|
|
2084
1241
|
|