@leaddreamer/inventorylogic 0.0.3-beta.89 → 0.0.3-beta.91
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 +10 -10
- package/business/Product/googleMerchantAPI.js +88 -89
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1843,9 +1843,9 @@ Typedefs, constants, support functions and database operations related to Produc
|
|
|
1843
1843
|
|
|
1844
1844
|
* [GoogleProduct](#module_GoogleProduct)
|
|
1845
1845
|
* _static_
|
|
1846
|
+
* [.ggProductAttributeMap](#module_GoogleProduct.ggProductAttributeMap) : <code>GoogleProductAttributes</code>
|
|
1846
1847
|
* [.ggProductMap](#module_GoogleProduct.ggProductMap) : <code>GoogleProductAPI</code>
|
|
1847
1848
|
* [.ggProductInputMap](#module_GoogleProduct.ggProductInputMap) : <code>GoogleProductAPI</code>
|
|
1848
|
-
* [.ggProductAttributeMap](#module_GoogleProduct.ggProductAttributeMap) : <code>GoogleProductAttributes</code>
|
|
1849
1849
|
* [.ggProductFeedToProducts(feedJSON)](#module_GoogleProduct.ggProductFeedToProducts) ⇒ <code>Array.Products</code>
|
|
1850
1850
|
* [.productsToGgProductFeed(productsArray)](#module_GoogleProduct.productsToGgProductFeed)
|
|
1851
1851
|
* _inner_
|
|
@@ -1878,6 +1878,10 @@ Typedefs, constants, support functions and database operations related to Produc
|
|
|
1878
1878
|
* [~CustomAttribute](#module_GoogleProduct..CustomAttribute) : <code>object</code>
|
|
1879
1879
|
* [~GoogleProductAPI](#module_GoogleProduct..GoogleProductAPI) : <code>object</code>
|
|
1880
1880
|
|
|
1881
|
+
<a name="module_GoogleProduct.ggProductAttributeMap"></a>
|
|
1882
|
+
|
|
1883
|
+
### GoogleProduct.ggProductAttributeMap : <code>GoogleProductAttributes</code>
|
|
1884
|
+
**Kind**: static constant of [<code>GoogleProduct</code>](#module_GoogleProduct)
|
|
1881
1885
|
<a name="module_GoogleProduct.ggProductMap"></a>
|
|
1882
1886
|
|
|
1883
1887
|
### GoogleProduct.ggProductMap : <code>GoogleProductAPI</code>
|
|
@@ -1894,10 +1898,6 @@ found add a new top-level product.
|
|
|
1894
1898
|
Then look within varinats for a matching SKU; if found, use that
|
|
1895
1899
|
value for the index; if *not* found add the variant.
|
|
1896
1900
|
|
|
1897
|
-
**Kind**: static constant of [<code>GoogleProduct</code>](#module_GoogleProduct)
|
|
1898
|
-
<a name="module_GoogleProduct.ggProductAttributeMap"></a>
|
|
1899
|
-
|
|
1900
|
-
### GoogleProduct.ggProductAttributeMap : <code>GoogleProductAttributes</code>
|
|
1901
1901
|
**Kind**: static constant of [<code>GoogleProduct</code>](#module_GoogleProduct)
|
|
1902
1902
|
<a name="module_GoogleProduct.ggProductFeedToProducts"></a>
|
|
1903
1903
|
|
|
@@ -2346,9 +2346,9 @@ Typedefs, constants, support functions and database operations related to Produc
|
|
|
2346
2346
|
|
|
2347
2347
|
* [GoogleProduct](#module_GoogleProduct)
|
|
2348
2348
|
* _static_
|
|
2349
|
+
* [.ggProductAttributeMap](#module_GoogleProduct.ggProductAttributeMap) : <code>GoogleProductAttributes</code>
|
|
2349
2350
|
* [.ggProductMap](#module_GoogleProduct.ggProductMap) : <code>GoogleProductAPI</code>
|
|
2350
2351
|
* [.ggProductInputMap](#module_GoogleProduct.ggProductInputMap) : <code>GoogleProductAPI</code>
|
|
2351
|
-
* [.ggProductAttributeMap](#module_GoogleProduct.ggProductAttributeMap) : <code>GoogleProductAttributes</code>
|
|
2352
2352
|
* [.ggProductFeedToProducts(feedJSON)](#module_GoogleProduct.ggProductFeedToProducts) ⇒ <code>Array.Products</code>
|
|
2353
2353
|
* [.productsToGgProductFeed(productsArray)](#module_GoogleProduct.productsToGgProductFeed)
|
|
2354
2354
|
* _inner_
|
|
@@ -2381,6 +2381,10 @@ Typedefs, constants, support functions and database operations related to Produc
|
|
|
2381
2381
|
* [~CustomAttribute](#module_GoogleProduct..CustomAttribute) : <code>object</code>
|
|
2382
2382
|
* [~GoogleProductAPI](#module_GoogleProduct..GoogleProductAPI) : <code>object</code>
|
|
2383
2383
|
|
|
2384
|
+
<a name="module_GoogleProduct.ggProductAttributeMap"></a>
|
|
2385
|
+
|
|
2386
|
+
### GoogleProduct.ggProductAttributeMap : <code>GoogleProductAttributes</code>
|
|
2387
|
+
**Kind**: static constant of [<code>GoogleProduct</code>](#module_GoogleProduct)
|
|
2384
2388
|
<a name="module_GoogleProduct.ggProductMap"></a>
|
|
2385
2389
|
|
|
2386
2390
|
### GoogleProduct.ggProductMap : <code>GoogleProductAPI</code>
|
|
@@ -2397,10 +2401,6 @@ found add a new top-level product.
|
|
|
2397
2401
|
Then look within varinats for a matching SKU; if found, use that
|
|
2398
2402
|
value for the index; if *not* found add the variant.
|
|
2399
2403
|
|
|
2400
|
-
**Kind**: static constant of [<code>GoogleProduct</code>](#module_GoogleProduct)
|
|
2401
|
-
<a name="module_GoogleProduct.ggProductAttributeMap"></a>
|
|
2402
|
-
|
|
2403
|
-
### GoogleProduct.ggProductAttributeMap : <code>GoogleProductAttributes</code>
|
|
2404
2404
|
**Kind**: static constant of [<code>GoogleProduct</code>](#module_GoogleProduct)
|
|
2405
2405
|
<a name="module_GoogleProduct.ggProductFeedToProducts"></a>
|
|
2406
2406
|
|
|
@@ -243,95 +243,6 @@
|
|
|
243
243
|
* If the operation is prevented, the aborted exception will be thrown.
|
|
244
244
|
*/
|
|
245
245
|
|
|
246
|
-
/**
|
|
247
|
-
* A Map between GoogleProductAPI and Pricing Internal API
|
|
248
|
-
* @type {GoogleProductAPI}
|
|
249
|
-
* @const
|
|
250
|
-
*/
|
|
251
|
-
export const ggProductMap = {
|
|
252
|
-
//all assume variants.index. prefix
|
|
253
|
-
"name": {
|
|
254
|
-
target: "variants.index.platformData.googleData.name",
|
|
255
|
-
//formula: "accounts/{$account}/productInputs/{$productinput}",
|
|
256
|
-
//productInput = '${contentLanguage}~${feedLabel}~${sku}'
|
|
257
|
-
},
|
|
258
|
-
"base64EncodedName": {
|
|
259
|
-
target: "variants.index.platformData.googleData.base64EncodedName"
|
|
260
|
-
},
|
|
261
|
-
"product": {
|
|
262
|
-
target: "variants.index.platformData.googleData.product"
|
|
263
|
-
},
|
|
264
|
-
"base64EncodedProduct": {
|
|
265
|
-
target: "variants.index.platformData.googleData.base64EncodedProduct"
|
|
266
|
-
},
|
|
267
|
-
"legacyLocal": {
|
|
268
|
-
target: "variants.index.platformData.googleData.legacyLocal"
|
|
269
|
-
},
|
|
270
|
-
"offerId": {
|
|
271
|
-
//immutable. Used to create.
|
|
272
|
-
target: "variants.index.sku",
|
|
273
|
-
},
|
|
274
|
-
"contentLanguage": {
|
|
275
|
-
//immutable. Used to create.
|
|
276
|
-
target: "variants.index.platformData.googleData.contentLanguage",
|
|
277
|
-
},
|
|
278
|
-
"feedLabel": {
|
|
279
|
-
//immutable. Used to create.
|
|
280
|
-
target: "variants.index.platformData.googleData.feedLabel",
|
|
281
|
-
},
|
|
282
|
-
"productAttributes": {
|
|
283
|
-
target: "",
|
|
284
|
-
formatter: ggProductAttributeMap,
|
|
285
|
-
},
|
|
286
|
-
"customAttributes": {
|
|
287
|
-
target: "variants.index.platformData.googleData.customAttributes",
|
|
288
|
-
formatter: ggcustomAttributes,
|
|
289
|
-
},
|
|
290
|
-
"versionNumber": {
|
|
291
|
-
target: "variants.index.versionNumber",
|
|
292
|
-
},
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Map between GoogleProductAPI and internal Product Data
|
|
297
|
-
* Note that when gg >> internal, index is *discovered* by searching
|
|
298
|
-
* for a matching item_group_id <<>> id. if item_group_id is *not*
|
|
299
|
-
* found add a new top-level product.
|
|
300
|
-
* Then look within varinats for a matching SKU; if found, use that
|
|
301
|
-
* value for the index; if *not* found add the variant.
|
|
302
|
-
* @type {GoogleProductAPI}
|
|
303
|
-
* @const
|
|
304
|
-
*/
|
|
305
|
-
export const ggProductInputMap = {
|
|
306
|
-
//all assume variants.index prefix
|
|
307
|
-
"legacyLocal": {
|
|
308
|
-
target: "variants.index.platformData.googleData.legacyLocal"
|
|
309
|
-
},
|
|
310
|
-
"offerId": {
|
|
311
|
-
//immutable. Used to create.
|
|
312
|
-
target: "variants.index.sku",
|
|
313
|
-
},
|
|
314
|
-
"contentLanguage": {
|
|
315
|
-
//immutable. Used to create.
|
|
316
|
-
target: "variants.index.platformData.googleData.contentLanguage",
|
|
317
|
-
},
|
|
318
|
-
"feedLabel": {
|
|
319
|
-
//immutable. Used to create.
|
|
320
|
-
target: "variants.index.platformData.googleData.feedLabel",
|
|
321
|
-
},
|
|
322
|
-
"productAttributes": {
|
|
323
|
-
target: "",
|
|
324
|
-
formatter: "ggProductAttributeMap"
|
|
325
|
-
},
|
|
326
|
-
"customAttributes": {
|
|
327
|
-
target: "variants.index.platformData.googleData.customAttributes",
|
|
328
|
-
formatter: ggcustomAttributes,
|
|
329
|
-
},
|
|
330
|
-
"versionNumber": {
|
|
331
|
-
target: "variants.index.versionNumber",
|
|
332
|
-
},
|
|
333
|
-
}
|
|
334
|
-
|
|
335
246
|
/**
|
|
336
247
|
* @type {GoogleProductAttributes}
|
|
337
248
|
*/
|
|
@@ -426,6 +337,94 @@ export const ggProductAttributeMap = {
|
|
|
426
337
|
//shipping_label: null,
|
|
427
338
|
};
|
|
428
339
|
|
|
340
|
+
/**
|
|
341
|
+
* A Map between GoogleProductAPI and Pricing Internal API
|
|
342
|
+
* @type {GoogleProductAPI}
|
|
343
|
+
* @const
|
|
344
|
+
*/
|
|
345
|
+
export const ggProductMap = {
|
|
346
|
+
//all assume variants.index. prefix
|
|
347
|
+
"name": {
|
|
348
|
+
target: "variants.index.platformData.googleData.name",
|
|
349
|
+
//formula: "accounts/{$account}/productInputs/{$productinput}",
|
|
350
|
+
//productInput = '${contentLanguage}~${feedLabel}~${sku}'
|
|
351
|
+
},
|
|
352
|
+
"base64EncodedName": {
|
|
353
|
+
target: "variants.index.platformData.googleData.base64EncodedName"
|
|
354
|
+
},
|
|
355
|
+
"product": {
|
|
356
|
+
target: "variants.index.platformData.googleData.product"
|
|
357
|
+
},
|
|
358
|
+
"base64EncodedProduct": {
|
|
359
|
+
target: "variants.index.platformData.googleData.base64EncodedProduct"
|
|
360
|
+
},
|
|
361
|
+
"legacyLocal": {
|
|
362
|
+
target: "variants.index.platformData.googleData.legacyLocal"
|
|
363
|
+
},
|
|
364
|
+
"offerId": {
|
|
365
|
+
//immutable. Used to create.
|
|
366
|
+
target: "variants.index.sku",
|
|
367
|
+
},
|
|
368
|
+
"contentLanguage": {
|
|
369
|
+
//immutable. Used to create.
|
|
370
|
+
target: "variants.index.platformData.googleData.contentLanguage",
|
|
371
|
+
},
|
|
372
|
+
"feedLabel": {
|
|
373
|
+
//immutable. Used to create.
|
|
374
|
+
target: "variants.index.platformData.googleData.feedLabel",
|
|
375
|
+
},
|
|
376
|
+
"productAttributes": {
|
|
377
|
+
target: "",
|
|
378
|
+
formatter: ggProductAttributeMap,
|
|
379
|
+
},
|
|
380
|
+
"customAttributes": {
|
|
381
|
+
target: "variants.index.platformData.googleData.customAttributes",
|
|
382
|
+
formatter: ggcustomAttributes,
|
|
383
|
+
},
|
|
384
|
+
"versionNumber": {
|
|
385
|
+
target: "variants.index.versionNumber",
|
|
386
|
+
},
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Map between GoogleProductAPI and internal Product Data
|
|
391
|
+
* Note that when gg >> internal, index is *discovered* by searching
|
|
392
|
+
* for a matching item_group_id <<>> id. if item_group_id is *not*
|
|
393
|
+
* found add a new top-level product.
|
|
394
|
+
* Then look within varinats for a matching SKU; if found, use that
|
|
395
|
+
* value for the index; if *not* found add the variant.
|
|
396
|
+
* @type {GoogleProductAPI}
|
|
397
|
+
* @const
|
|
398
|
+
*/
|
|
399
|
+
export const ggProductInputMap = {
|
|
400
|
+
//all assume variants.index prefix
|
|
401
|
+
"legacyLocal": {
|
|
402
|
+
target: "variants.index.platformData.googleData.legacyLocal"
|
|
403
|
+
},
|
|
404
|
+
"offerId": {
|
|
405
|
+
//immutable. Used to create.
|
|
406
|
+
target: "variants.index.sku",
|
|
407
|
+
},
|
|
408
|
+
"contentLanguage": {
|
|
409
|
+
//immutable. Used to create.
|
|
410
|
+
target: "variants.index.platformData.googleData.contentLanguage",
|
|
411
|
+
},
|
|
412
|
+
"feedLabel": {
|
|
413
|
+
//immutable. Used to create.
|
|
414
|
+
target: "variants.index.platformData.googleData.feedLabel",
|
|
415
|
+
},
|
|
416
|
+
"productAttributes": {
|
|
417
|
+
target: "",
|
|
418
|
+
formatter: "ggProductAttributeMap"
|
|
419
|
+
},
|
|
420
|
+
"customAttributes": {
|
|
421
|
+
target: "variants.index.platformData.googleData.customAttributes",
|
|
422
|
+
formatter: ggcustomAttributes,
|
|
423
|
+
},
|
|
424
|
+
"versionNumber": {
|
|
425
|
+
target: "variants.index.versionNumber",
|
|
426
|
+
},
|
|
427
|
+
}
|
|
429
428
|
|
|
430
429
|
/**
|
|
431
430
|
* Because Google Merchants uses a NON-hierarchical variants listing
|