@commercetools/sync-actions 7.1.3 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -651,7 +651,7 @@ function buildReferenceActions(_ref4) {
|
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
-
var baseActionsList$
|
|
654
|
+
var baseActionsList$o = [{
|
|
655
655
|
action: 'changeName',
|
|
656
656
|
key: 'name'
|
|
657
657
|
}, {
|
|
@@ -689,10 +689,10 @@ var referenceActionsList$3 = [{
|
|
|
689
689
|
* SYNC FUNCTIONS
|
|
690
690
|
*/
|
|
691
691
|
|
|
692
|
-
function actionsMapBase$
|
|
692
|
+
function actionsMapBase$o(diff, oldObj, newObj) {
|
|
693
693
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
694
694
|
return buildBaseAttributesActions({
|
|
695
|
-
actions: baseActionsList$
|
|
695
|
+
actions: baseActionsList$o,
|
|
696
696
|
diff: diff,
|
|
697
697
|
oldObj: oldObj,
|
|
698
698
|
newObj: newObj,
|
|
@@ -789,7 +789,7 @@ function createCategoryMapActions(mapActionGroup, syncActionConfig) {
|
|
|
789
789
|
return function doMapActions(diff, newObj, oldObj) {
|
|
790
790
|
var allActions = [];
|
|
791
791
|
allActions.push(mapActionGroup('base', function () {
|
|
792
|
-
return actionsMapBase$
|
|
792
|
+
return actionsMapBase$o(diff, oldObj, newObj, syncActionConfig);
|
|
793
793
|
}));
|
|
794
794
|
allActions.push(mapActionGroup('references', function () {
|
|
795
795
|
return actionsMapReferences$3(diff, oldObj, newObj);
|
|
@@ -827,7 +827,7 @@ var categories = (function (actionGroupList, syncActionConfig) {
|
|
|
827
827
|
});
|
|
828
828
|
|
|
829
829
|
var isEmptyValue = createIsEmptyValue([undefined, null, '']);
|
|
830
|
-
var baseActionsList$
|
|
830
|
+
var baseActionsList$n = [{
|
|
831
831
|
action: 'setSalutation',
|
|
832
832
|
key: 'salutation'
|
|
833
833
|
}, {
|
|
@@ -893,10 +893,10 @@ var authenticationModeActionsList = [{
|
|
|
893
893
|
* SYNC FUNCTIONS
|
|
894
894
|
*/
|
|
895
895
|
|
|
896
|
-
function actionsMapBase$
|
|
896
|
+
function actionsMapBase$n(diff, oldObj, newObj) {
|
|
897
897
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
898
898
|
return buildBaseAttributesActions({
|
|
899
|
-
actions: baseActionsList$
|
|
899
|
+
actions: baseActionsList$n,
|
|
900
900
|
diff: diff,
|
|
901
901
|
oldObj: oldObj,
|
|
902
902
|
newObj: newObj,
|
|
@@ -1033,11 +1033,11 @@ function buildAuthenticationModeActions(_ref) {
|
|
|
1033
1033
|
});
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
1036
|
-
function createCustomerMapActions(mapActionGroup, syncActionConfig) {
|
|
1036
|
+
function createCustomerMapActions$1(mapActionGroup, syncActionConfig) {
|
|
1037
1037
|
return function doMapActions(diff, newObj, oldObj) {
|
|
1038
1038
|
var allActions = [];
|
|
1039
1039
|
allActions.push(mapActionGroup('base', function () {
|
|
1040
|
-
return actionsMapBase$
|
|
1040
|
+
return actionsMapBase$n(diff, oldObj, newObj, syncActionConfig);
|
|
1041
1041
|
}));
|
|
1042
1042
|
allActions.push(mapActionGroup('references', function () {
|
|
1043
1043
|
return actionsMapReferences$2(diff, oldObj, newObj);
|
|
@@ -1076,14 +1076,14 @@ var customers = (function (actionGroupList, syncActionConfig) {
|
|
|
1076
1076
|
// for allowed action groups and return the return value of the callback
|
|
1077
1077
|
// It will return an empty array for ignored action groups
|
|
1078
1078
|
var mapActionGroup = createMapActionGroup(actionGroupList);
|
|
1079
|
-
var doMapActions = createCustomerMapActions(mapActionGroup, syncActionConfig);
|
|
1079
|
+
var doMapActions = createCustomerMapActions$1(mapActionGroup, syncActionConfig);
|
|
1080
1080
|
var buildActions = createBuildActions(diff, doMapActions, copyEmptyArrayProps);
|
|
1081
1081
|
return {
|
|
1082
1082
|
buildActions: buildActions
|
|
1083
1083
|
};
|
|
1084
1084
|
});
|
|
1085
1085
|
|
|
1086
|
-
var baseActionsList$
|
|
1086
|
+
var baseActionsList$m = [{
|
|
1087
1087
|
action: 'changeQuantity',
|
|
1088
1088
|
key: 'quantityOnStock',
|
|
1089
1089
|
actionKey: 'quantity'
|
|
@@ -1103,10 +1103,10 @@ var referenceActionsList$1 = [{
|
|
|
1103
1103
|
* SYNC FUNCTIONS
|
|
1104
1104
|
*/
|
|
1105
1105
|
|
|
1106
|
-
function actionsMapBase$
|
|
1106
|
+
function actionsMapBase$m(diff, oldObj, newObj) {
|
|
1107
1107
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
1108
1108
|
return buildBaseAttributesActions({
|
|
1109
|
-
actions: baseActionsList$
|
|
1109
|
+
actions: baseActionsList$m,
|
|
1110
1110
|
diff: diff,
|
|
1111
1111
|
oldObj: oldObj,
|
|
1112
1112
|
newObj: newObj,
|
|
@@ -1128,7 +1128,7 @@ function createInventoryMapActions(mapActionGroup, syncActionConfig) {
|
|
|
1128
1128
|
return function doMapActions(diff, newObj, oldObj) {
|
|
1129
1129
|
var allActions = [];
|
|
1130
1130
|
allActions.push(mapActionGroup('base', function () {
|
|
1131
|
-
return actionsMapBase$
|
|
1131
|
+
return actionsMapBase$m(diff, oldObj, newObj, syncActionConfig);
|
|
1132
1132
|
}));
|
|
1133
1133
|
allActions.push(mapActionGroup('references', function () {
|
|
1134
1134
|
return actionsMapReferences$1(diff, oldObj, newObj);
|
|
@@ -1218,7 +1218,7 @@ function findMatchingPairs(diff) {
|
|
|
1218
1218
|
|
|
1219
1219
|
var REGEX_NUMBER$2 = new RegExp(/^\d+$/);
|
|
1220
1220
|
var REGEX_UNDERSCORE_NUMBER$2 = new RegExp(/^_\d+$/);
|
|
1221
|
-
var baseActionsList$
|
|
1221
|
+
var baseActionsList$l = [{
|
|
1222
1222
|
action: 'changeName',
|
|
1223
1223
|
key: 'name'
|
|
1224
1224
|
}, {
|
|
@@ -1312,14 +1312,45 @@ function _buildKeyActions(variantDiff, oldVariant) {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
return null;
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1316
|
-
var
|
|
1315
|
+
function _buildAttributeValue(diffedValue, oldAttributeValue, newAttributeValue) {
|
|
1316
|
+
var value;
|
|
1317
|
+
if (Array.isArray(diffedValue)) value = getDeltaValue(diffedValue, oldAttributeValue);else if (typeof diffedValue === 'string')
|
|
1318
|
+
// LText: value: {en: "", de: ""}
|
|
1319
|
+
// Enum: value: {key: "foo", label: "Foo"}
|
|
1320
|
+
// LEnum: value: {key: "foo", label: {en: "Foo", de: "Foo"}}
|
|
1321
|
+
// Money: value: {centAmount: 123, currencyCode: ""}
|
|
1322
|
+
// *: value: ""
|
|
1323
|
+
|
|
1324
|
+
// normal
|
|
1325
|
+
value = getDeltaValue(diffedValue, oldAttributeValue);else if (diffedValue.centAmount || diffedValue.currencyCode)
|
|
1326
|
+
// Money
|
|
1327
|
+
value = {
|
|
1328
|
+
centAmount: diffedValue.centAmount ? getDeltaValue(diffedValue.centAmount) : newAttributeValue.centAmount,
|
|
1329
|
+
currencyCode: diffedValue.currencyCode ? getDeltaValue(diffedValue.currencyCode) : newAttributeValue.currencyCode
|
|
1330
|
+
};else if (diffedValue.key)
|
|
1331
|
+
// Enum / LEnum (use only the key)
|
|
1332
|
+
value = getDeltaValue(diffedValue.key);else if (_typeof(diffedValue) === 'object') if ({}.hasOwnProperty.call(diffedValue, '_t') && diffedValue._t === 'a') {
|
|
1333
|
+
// set-typed attribute
|
|
1334
|
+
value = newAttributeValue;
|
|
1335
|
+
} else {
|
|
1336
|
+
// LText
|
|
1337
|
+
|
|
1338
|
+
var updatedValue = Object.keys(diffedValue).reduce(function (acc, lang) {
|
|
1339
|
+
var patchedValue = getDeltaValue(diffedValue[lang], acc[lang]);
|
|
1340
|
+
return Object.assign(acc, _defineProperty({}, lang, patchedValue));
|
|
1341
|
+
}, _objectSpread2({}, oldAttributeValue));
|
|
1342
|
+
value = updatedValue;
|
|
1343
|
+
}
|
|
1344
|
+
return value;
|
|
1345
|
+
}
|
|
1346
|
+
function _buildNewSetAttributeAction(variantId, attr, sameForAllAttributeNames) {
|
|
1347
|
+
var attributeName = attr && attr.name;
|
|
1317
1348
|
if (!attributeName) return undefined;
|
|
1318
1349
|
var action = {
|
|
1319
1350
|
action: 'setAttribute',
|
|
1320
|
-
variantId:
|
|
1351
|
+
variantId: variantId,
|
|
1321
1352
|
name: attributeName,
|
|
1322
|
-
value:
|
|
1353
|
+
value: attr.value
|
|
1323
1354
|
};
|
|
1324
1355
|
if (sameForAllAttributeNames.indexOf(attributeName) !== -1) {
|
|
1325
1356
|
action = _objectSpread2(_objectSpread2({}, action), {}, {
|
|
@@ -1347,35 +1378,31 @@ function _buildSetAttributeAction(diffedValue, oldVariant, attribute, sameForAll
|
|
|
1347
1378
|
});
|
|
1348
1379
|
delete action.variantId;
|
|
1349
1380
|
}
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
});
|
|
1370
|
-
} else {
|
|
1371
|
-
// LText
|
|
1381
|
+
action.value = _buildAttributeValue(diffedValue, oldAttribute.value, attribute.value);
|
|
1382
|
+
return action;
|
|
1383
|
+
}
|
|
1384
|
+
function _buildNewSetProductAttributeAction(attr) {
|
|
1385
|
+
var attributeName = attr && attr.name;
|
|
1386
|
+
if (!attributeName) return undefined;
|
|
1387
|
+
var action = {
|
|
1388
|
+
action: 'setProductAttribute',
|
|
1389
|
+
name: attributeName,
|
|
1390
|
+
value: attr.value
|
|
1391
|
+
};
|
|
1392
|
+
return action;
|
|
1393
|
+
}
|
|
1394
|
+
function _buildSetProductAttributeAction(diffedValue, oldProductData, newAttribute) {
|
|
1395
|
+
if (!newAttribute) return undefined;
|
|
1396
|
+
var action = {
|
|
1397
|
+
action: 'setProductAttribute',
|
|
1398
|
+
name: newAttribute.name
|
|
1399
|
+
};
|
|
1372
1400
|
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
}
|
|
1401
|
+
// Used as original object for patching long diff text
|
|
1402
|
+
var oldAttribute = oldProductData.attributes.find(function (a) {
|
|
1403
|
+
return a.name === newAttribute.name;
|
|
1404
|
+
}) || {};
|
|
1405
|
+
action.value = _buildAttributeValue(diffedValue, oldAttribute.value, newAttribute.value);
|
|
1379
1406
|
return action;
|
|
1380
1407
|
}
|
|
1381
1408
|
function _buildVariantImagesAction(diffedImages) {
|
|
@@ -1486,6 +1513,41 @@ function _buildVariantPricesAction(diffedPrices) {
|
|
|
1486
1513
|
});
|
|
1487
1514
|
return [addPriceActions, changePriceActions, removePriceActions];
|
|
1488
1515
|
}
|
|
1516
|
+
function _buildProductAttributesActions(diffedAttributes, oldProductData, newProductData) {
|
|
1517
|
+
var actions = [];
|
|
1518
|
+
if (!diffedAttributes) return actions;
|
|
1519
|
+
forEach__default["default"](diffedAttributes, function (value, key) {
|
|
1520
|
+
if (REGEX_NUMBER$2.test(key)) {
|
|
1521
|
+
if (Array.isArray(value)) {
|
|
1522
|
+
var setAction = _buildNewSetProductAttributeAction(getDeltaValue(value));
|
|
1523
|
+
if (setAction) actions.push(setAction);
|
|
1524
|
+
} else if (newProductData.attributes) {
|
|
1525
|
+
var _setAction = _buildSetProductAttributeAction(value.value, oldProductData, newProductData.attributes[key]);
|
|
1526
|
+
if (_setAction) actions.push(_setAction);
|
|
1527
|
+
}
|
|
1528
|
+
} else if (REGEX_UNDERSCORE_NUMBER$2.test(key)) {
|
|
1529
|
+
if (Array.isArray(value)) {
|
|
1530
|
+
// Ignore pure array moves!
|
|
1531
|
+
if (value.length === 3 && value[2] === 3) return;
|
|
1532
|
+
var deltaValue = getDeltaValue(value);
|
|
1533
|
+
if (!deltaValue) if (value[0] && value[0].name)
|
|
1534
|
+
// unset attribute if
|
|
1535
|
+
deltaValue = {
|
|
1536
|
+
name: value[0].name
|
|
1537
|
+
};else deltaValue = undefined;
|
|
1538
|
+
var _setAction2 = _buildNewSetProductAttributeAction(deltaValue);
|
|
1539
|
+
if (_setAction2) actions.push(_setAction2);
|
|
1540
|
+
} else {
|
|
1541
|
+
var index = key.substring(1);
|
|
1542
|
+
if (newProductData.attributes) {
|
|
1543
|
+
var _setAction3 = _buildSetProductAttributeAction(value.value, oldProductData, newProductData.attributes[index]);
|
|
1544
|
+
if (_setAction3) actions.push(_setAction3);
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
});
|
|
1549
|
+
return actions;
|
|
1550
|
+
}
|
|
1489
1551
|
function _buildVariantAttributesActions(attributes, oldVariant, newVariant, sameForAllAttributeNames) {
|
|
1490
1552
|
var actions = [];
|
|
1491
1553
|
if (!attributes) return actions;
|
|
@@ -1497,8 +1559,8 @@ function _buildVariantAttributesActions(attributes, oldVariant, newVariant, same
|
|
|
1497
1559
|
var setAction = _buildNewSetAttributeAction(id, deltaValue, sameForAllAttributeNames);
|
|
1498
1560
|
if (setAction) actions.push(setAction);
|
|
1499
1561
|
} else if (newVariant.attributes) {
|
|
1500
|
-
var
|
|
1501
|
-
if (
|
|
1562
|
+
var _setAction4 = _buildSetAttributeAction(value.value, oldVariant, newVariant.attributes[key], sameForAllAttributeNames);
|
|
1563
|
+
if (_setAction4) actions.push(_setAction4);
|
|
1502
1564
|
}
|
|
1503
1565
|
} else if (REGEX_UNDERSCORE_NUMBER$2.test(key)) if (Array.isArray(value)) {
|
|
1504
1566
|
// Ignore pure array moves!
|
|
@@ -1510,13 +1572,13 @@ function _buildVariantAttributesActions(attributes, oldVariant, newVariant, same
|
|
|
1510
1572
|
_deltaValue = {
|
|
1511
1573
|
name: value[0].name
|
|
1512
1574
|
};else _deltaValue = undefined;
|
|
1513
|
-
var
|
|
1514
|
-
if (
|
|
1575
|
+
var _setAction5 = _buildNewSetAttributeAction(_id, _deltaValue, sameForAllAttributeNames);
|
|
1576
|
+
if (_setAction5) actions.push(_setAction5);
|
|
1515
1577
|
} else {
|
|
1516
1578
|
var index = key.substring(1);
|
|
1517
1579
|
if (newVariant.attributes) {
|
|
1518
|
-
var
|
|
1519
|
-
if (
|
|
1580
|
+
var _setAction6 = _buildSetAttributeAction(value.value, oldVariant, newVariant.attributes[index], sameForAllAttributeNames);
|
|
1581
|
+
if (_setAction6) actions.push(_setAction6);
|
|
1520
1582
|
}
|
|
1521
1583
|
}
|
|
1522
1584
|
});
|
|
@@ -1622,10 +1684,10 @@ function _buildVariantAssetsActions(diffAssets, oldVariant, newVariant) {
|
|
|
1622
1684
|
* SYNC FUNCTIONS
|
|
1623
1685
|
*/
|
|
1624
1686
|
|
|
1625
|
-
function actionsMapBase$
|
|
1687
|
+
function actionsMapBase$l(diff, oldObj, newObj) {
|
|
1626
1688
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
1627
1689
|
return buildBaseAttributesActions({
|
|
1628
|
-
actions: baseActionsList$
|
|
1690
|
+
actions: baseActionsList$l,
|
|
1629
1691
|
diff: diff,
|
|
1630
1692
|
oldObj: oldObj,
|
|
1631
1693
|
newObj: newObj,
|
|
@@ -1731,6 +1793,9 @@ function actionsMapAssets(diff, oldObj, newObj, variantHashMap) {
|
|
|
1731
1793
|
});
|
|
1732
1794
|
return allAssetsActions;
|
|
1733
1795
|
}
|
|
1796
|
+
function actionsMapProductAttributes(diffedProductData, oldProductData, newProductData) {
|
|
1797
|
+
return _buildProductAttributesActions(diffedProductData.attributes, oldProductData, newProductData);
|
|
1798
|
+
}
|
|
1734
1799
|
function actionsMapAttributes$1(diff, oldObj, newObj) {
|
|
1735
1800
|
var sameForAllAttributeNames = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
1736
1801
|
var variantHashMap = arguments.length > 4 ? arguments[4] : undefined;
|
|
@@ -1851,6 +1916,9 @@ function createProductMapActions(mapActionGroup, syncActionConfig) {
|
|
|
1851
1916
|
var publish = newObj.publish,
|
|
1852
1917
|
staged = newObj.staged;
|
|
1853
1918
|
var variantHashMap = findMatchingPairs(diff.variants, oldObj.variants, newObj.variants);
|
|
1919
|
+
allActions.push(mapActionGroup('productAttributes', function () {
|
|
1920
|
+
return actionsMapProductAttributes(diff, oldObj, newObj);
|
|
1921
|
+
}));
|
|
1854
1922
|
allActions.push(mapActionGroup('attributes', function () {
|
|
1855
1923
|
return actionsMapAttributes$1(diff, oldObj, newObj, sameForAllAttributeNames || [], variantHashMap);
|
|
1856
1924
|
}));
|
|
@@ -1862,7 +1930,7 @@ function createProductMapActions(mapActionGroup, syncActionConfig) {
|
|
|
1862
1930
|
return actionsMapRemoveVariants(diff, oldObj, newObj);
|
|
1863
1931
|
}));
|
|
1864
1932
|
allActions.push(mapActionGroup('base', function () {
|
|
1865
|
-
return actionsMapBase$
|
|
1933
|
+
return actionsMapBase$l(diff, oldObj, newObj, syncActionConfig);
|
|
1866
1934
|
}));
|
|
1867
1935
|
allActions.push(mapActionGroup('meta', function () {
|
|
1868
1936
|
return actionsMapMeta(diff, oldObj, newObj);
|
|
@@ -1929,7 +1997,7 @@ var isAddAction = function isAddAction(key, resource) {
|
|
|
1929
1997
|
var isRemoveAction = function isRemoveAction(key, resource) {
|
|
1930
1998
|
return REGEX_UNDERSCORE_NUMBER$1.test(key) && Number(resource[2]) === 0;
|
|
1931
1999
|
};
|
|
1932
|
-
var baseActionsList$
|
|
2000
|
+
var baseActionsList$k = [{
|
|
1933
2001
|
action: 'changeOrderState',
|
|
1934
2002
|
key: 'orderState'
|
|
1935
2003
|
}, {
|
|
@@ -1944,10 +2012,10 @@ var baseActionsList$h = [{
|
|
|
1944
2012
|
* SYNC FUNCTIONS
|
|
1945
2013
|
*/
|
|
1946
2014
|
|
|
1947
|
-
function actionsMapBase$
|
|
2015
|
+
function actionsMapBase$k(diff, oldObj, newObj) {
|
|
1948
2016
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
1949
2017
|
return buildBaseAttributesActions({
|
|
1950
|
-
actions: baseActionsList$
|
|
2018
|
+
actions: baseActionsList$k,
|
|
1951
2019
|
diff: diff,
|
|
1952
2020
|
oldObj: oldObj,
|
|
1953
2021
|
newObj: newObj,
|
|
@@ -2097,7 +2165,7 @@ function createOrderMapActions(mapActionGroup, syncActionConfig) {
|
|
|
2097
2165
|
deliveryHashMap = findMatchingPairs(diff.shippingInfo.deliveries, oldObj.shippingInfo.deliveries, newObj.shippingInfo.deliveries);
|
|
2098
2166
|
}
|
|
2099
2167
|
allActions.push(mapActionGroup('base', function () {
|
|
2100
|
-
return actionsMapBase$
|
|
2168
|
+
return actionsMapBase$k(diff, oldObj, newObj, syncActionConfig);
|
|
2101
2169
|
}));
|
|
2102
2170
|
allActions.push(mapActionGroup('deliveries', function () {
|
|
2103
2171
|
return actionsMapDeliveries(diff, oldObj, newObj);
|
|
@@ -2137,7 +2205,7 @@ var orders = (function (actionGroupList, syncActionConfig) {
|
|
|
2137
2205
|
};
|
|
2138
2206
|
});
|
|
2139
2207
|
|
|
2140
|
-
var baseActionsList$
|
|
2208
|
+
var baseActionsList$j = [{
|
|
2141
2209
|
action: 'setKey',
|
|
2142
2210
|
key: 'key'
|
|
2143
2211
|
}, {
|
|
@@ -2147,10 +2215,10 @@ var baseActionsList$g = [{
|
|
|
2147
2215
|
action: 'transitionState',
|
|
2148
2216
|
key: 'state'
|
|
2149
2217
|
}];
|
|
2150
|
-
function actionsMapBase$
|
|
2218
|
+
function actionsMapBase$j(diff, oldObj, newObj) {
|
|
2151
2219
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2152
2220
|
return buildBaseAttributesActions({
|
|
2153
|
-
actions: baseActionsList$
|
|
2221
|
+
actions: baseActionsList$j,
|
|
2154
2222
|
diff: diff,
|
|
2155
2223
|
oldObj: oldObj,
|
|
2156
2224
|
newObj: newObj,
|
|
@@ -2164,7 +2232,7 @@ function createRecurringOrdersMapActions(mapActionGroup, syncActionConfig) {
|
|
|
2164
2232
|
return function doMapActions(diff, newObj, oldObj) {
|
|
2165
2233
|
var allActions = [];
|
|
2166
2234
|
allActions.push(mapActionGroup('base', function () {
|
|
2167
|
-
return actionsMapBase$
|
|
2235
|
+
return actionsMapBase$j(diff, oldObj, newObj, syncActionConfig);
|
|
2168
2236
|
}));
|
|
2169
2237
|
allActions.push(mapActionGroup('custom', function () {
|
|
2170
2238
|
return actionsMapCustom(diff, newObj, oldObj);
|
|
@@ -2181,7 +2249,7 @@ var recurringOrders = (function (actionGroupList, syncActionConfig) {
|
|
|
2181
2249
|
};
|
|
2182
2250
|
});
|
|
2183
2251
|
|
|
2184
|
-
var baseActionsList$
|
|
2252
|
+
var baseActionsList$i = [{
|
|
2185
2253
|
action: 'changeIsActive',
|
|
2186
2254
|
key: 'isActive'
|
|
2187
2255
|
}, {
|
|
@@ -2209,10 +2277,10 @@ var baseActionsList$f = [{
|
|
|
2209
2277
|
action: 'setKey',
|
|
2210
2278
|
key: 'key'
|
|
2211
2279
|
}];
|
|
2212
|
-
function actionsMapBase$
|
|
2280
|
+
function actionsMapBase$i(diff, oldObj, newObj) {
|
|
2213
2281
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2214
2282
|
return buildBaseAttributesActions({
|
|
2215
|
-
actions: baseActionsList$
|
|
2283
|
+
actions: baseActionsList$i,
|
|
2216
2284
|
diff: diff,
|
|
2217
2285
|
oldObj: oldObj,
|
|
2218
2286
|
newObj: newObj,
|
|
@@ -2250,7 +2318,7 @@ function createProductDiscountsMapActions(mapActionGroup, syncActionConfig) {
|
|
|
2250
2318
|
return function doMapActions(diff, newObj, oldObj) {
|
|
2251
2319
|
var allActions = [];
|
|
2252
2320
|
allActions.push(mapActionGroup('base', function () {
|
|
2253
|
-
return actionsMapBase$
|
|
2321
|
+
return actionsMapBase$i(diff, oldObj, newObj, syncActionConfig);
|
|
2254
2322
|
}));
|
|
2255
2323
|
return combineValidityActions(flatten__default["default"](allActions));
|
|
2256
2324
|
};
|
|
@@ -2265,7 +2333,7 @@ var productDiscounts = (function (actionGroupList) {
|
|
|
2265
2333
|
};
|
|
2266
2334
|
});
|
|
2267
2335
|
|
|
2268
|
-
var baseActionsList$
|
|
2336
|
+
var baseActionsList$h = [{
|
|
2269
2337
|
action: 'changeIsActive',
|
|
2270
2338
|
key: 'isActive'
|
|
2271
2339
|
}, {
|
|
@@ -2299,10 +2367,10 @@ var baseActionsList$e = [{
|
|
|
2299
2367
|
action: 'changeGroups',
|
|
2300
2368
|
key: 'groups'
|
|
2301
2369
|
}];
|
|
2302
|
-
function actionsMapBase$
|
|
2370
|
+
function actionsMapBase$h(diff, oldObj, newObj) {
|
|
2303
2371
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2304
2372
|
return buildBaseAttributesActions({
|
|
2305
|
-
actions: baseActionsList$
|
|
2373
|
+
actions: baseActionsList$h,
|
|
2306
2374
|
diff: diff,
|
|
2307
2375
|
oldObj: oldObj,
|
|
2308
2376
|
newObj: newObj,
|
|
@@ -2316,7 +2384,7 @@ function createDiscountCodesMapActions(mapActionGroup, syncActionConfig) {
|
|
|
2316
2384
|
return function doMapActions(diff, newObj, oldObj) {
|
|
2317
2385
|
var allActions = [];
|
|
2318
2386
|
allActions.push(mapActionGroup('base', function () {
|
|
2319
|
-
return actionsMapBase$
|
|
2387
|
+
return actionsMapBase$h(diff, oldObj, newObj, syncActionConfig);
|
|
2320
2388
|
}));
|
|
2321
2389
|
allActions.push(mapActionGroup('custom', function () {
|
|
2322
2390
|
return actionsMapCustom(diff, newObj, oldObj);
|
|
@@ -2345,17 +2413,17 @@ var discountCodes = (function (actionGroupList) {
|
|
|
2345
2413
|
};
|
|
2346
2414
|
});
|
|
2347
2415
|
|
|
2348
|
-
var baseActionsList$
|
|
2416
|
+
var baseActionsList$g = [{
|
|
2349
2417
|
action: 'changeName',
|
|
2350
2418
|
key: 'name'
|
|
2351
2419
|
}, {
|
|
2352
2420
|
action: 'setKey',
|
|
2353
2421
|
key: 'key'
|
|
2354
2422
|
}];
|
|
2355
|
-
function actionsMapBase$
|
|
2423
|
+
function actionsMapBase$g(diff, oldObj, newObj) {
|
|
2356
2424
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2357
2425
|
return buildBaseAttributesActions({
|
|
2358
|
-
actions: baseActionsList$
|
|
2426
|
+
actions: baseActionsList$g,
|
|
2359
2427
|
diff: diff,
|
|
2360
2428
|
oldObj: oldObj,
|
|
2361
2429
|
newObj: newObj,
|
|
@@ -2369,7 +2437,7 @@ function createCustomerGroupMapActions(mapActionGroup, syncActionConfig) {
|
|
|
2369
2437
|
return function doMapActions(diff, newObj, oldObj) {
|
|
2370
2438
|
var allActions = [];
|
|
2371
2439
|
allActions.push(mapActionGroup('base', function () {
|
|
2372
|
-
return actionsMapBase$
|
|
2440
|
+
return actionsMapBase$g(diff, oldObj, newObj, syncActionConfig);
|
|
2373
2441
|
}));
|
|
2374
2442
|
allActions.push(mapActionGroup('custom', function () {
|
|
2375
2443
|
return actionsMapCustom(diff, newObj, oldObj);
|
|
@@ -2387,7 +2455,7 @@ var customerGroup = (function (actionGroupList) {
|
|
|
2387
2455
|
};
|
|
2388
2456
|
});
|
|
2389
2457
|
|
|
2390
|
-
var baseActionsList$
|
|
2458
|
+
var baseActionsList$f = [{
|
|
2391
2459
|
action: 'changeIsActive',
|
|
2392
2460
|
key: 'isActive'
|
|
2393
2461
|
}, {
|
|
@@ -2424,10 +2492,10 @@ var baseActionsList$c = [{
|
|
|
2424
2492
|
action: 'setKey',
|
|
2425
2493
|
key: 'key'
|
|
2426
2494
|
}];
|
|
2427
|
-
function actionsMapBase$
|
|
2495
|
+
function actionsMapBase$f(diff, oldObj, newObj) {
|
|
2428
2496
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2429
2497
|
return buildBaseAttributesActions({
|
|
2430
|
-
actions: baseActionsList$
|
|
2498
|
+
actions: baseActionsList$f,
|
|
2431
2499
|
diff: diff,
|
|
2432
2500
|
oldObj: oldObj,
|
|
2433
2501
|
newObj: newObj,
|
|
@@ -2441,7 +2509,7 @@ function createCartDiscountsMapActions(mapActionGroup, syncActionConfig) {
|
|
|
2441
2509
|
return function doMapActions(diff, newObj, oldObj) {
|
|
2442
2510
|
var allActions = [];
|
|
2443
2511
|
allActions.push(mapActionGroup('base', function () {
|
|
2444
|
-
return actionsMapBase$
|
|
2512
|
+
return actionsMapBase$f(diff, oldObj, newObj, syncActionConfig);
|
|
2445
2513
|
}));
|
|
2446
2514
|
allActions.push(mapActionGroup('custom', function () {
|
|
2447
2515
|
return actionsMapCustom(diff, newObj, oldObj);
|
|
@@ -2466,7 +2534,7 @@ function removeTypename(obj) {
|
|
|
2466
2534
|
return objWithoutTypename;
|
|
2467
2535
|
}
|
|
2468
2536
|
|
|
2469
|
-
var baseActionsList$
|
|
2537
|
+
var baseActionsList$e = [{
|
|
2470
2538
|
action: 'changeName',
|
|
2471
2539
|
key: 'name'
|
|
2472
2540
|
}, {
|
|
@@ -2476,10 +2544,10 @@ var baseActionsList$b = [{
|
|
|
2476
2544
|
action: 'setDescription',
|
|
2477
2545
|
key: 'description'
|
|
2478
2546
|
}];
|
|
2479
|
-
function actionsMapBase$
|
|
2547
|
+
function actionsMapBase$e(diff, oldObj, newObj) {
|
|
2480
2548
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2481
2549
|
return buildBaseAttributesActions({
|
|
2482
|
-
actions: baseActionsList$
|
|
2550
|
+
actions: baseActionsList$e,
|
|
2483
2551
|
diff: diff,
|
|
2484
2552
|
oldObj: oldObj,
|
|
2485
2553
|
newObj: newObj,
|
|
@@ -2523,7 +2591,7 @@ function createTaxCategoriesMapActions(mapActionGroup, syncActionConfig) {
|
|
|
2523
2591
|
return function doMapActions(diff, newObj, oldObj) {
|
|
2524
2592
|
var allActions = [];
|
|
2525
2593
|
allActions.push(mapActionGroup('base', function () {
|
|
2526
|
-
return actionsMapBase$
|
|
2594
|
+
return actionsMapBase$e(diff, oldObj, newObj, syncActionConfig);
|
|
2527
2595
|
}));
|
|
2528
2596
|
allActions.push(mapActionGroup('rates', function () {
|
|
2529
2597
|
return actionsMapRates(diff, oldObj, newObj);
|
|
@@ -2551,7 +2619,7 @@ var taxCategories = (function (actionGroupList, syncActionConfig) {
|
|
|
2551
2619
|
};
|
|
2552
2620
|
});
|
|
2553
2621
|
|
|
2554
|
-
var baseActionsList$
|
|
2622
|
+
var baseActionsList$d = [{
|
|
2555
2623
|
action: 'changeName',
|
|
2556
2624
|
key: 'name'
|
|
2557
2625
|
}, {
|
|
@@ -2566,10 +2634,10 @@ var hasLocation = function hasLocation(locations, otherLocation) {
|
|
|
2566
2634
|
return location.country === otherLocation.country;
|
|
2567
2635
|
});
|
|
2568
2636
|
};
|
|
2569
|
-
function actionsMapBase$
|
|
2637
|
+
function actionsMapBase$d(diff, oldObj, newObj) {
|
|
2570
2638
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2571
2639
|
return buildBaseAttributesActions({
|
|
2572
|
-
actions: baseActionsList$
|
|
2640
|
+
actions: baseActionsList$d,
|
|
2573
2641
|
diff: diff,
|
|
2574
2642
|
oldObj: oldObj,
|
|
2575
2643
|
newObj: newObj,
|
|
@@ -2617,7 +2685,7 @@ function createZonesMapActions(mapActionGroup, syncActionConfig) {
|
|
|
2617
2685
|
return function doMapActions(diff, newObj, oldObj) {
|
|
2618
2686
|
var allActions = [];
|
|
2619
2687
|
allActions.push(mapActionGroup('base', function () {
|
|
2620
|
-
return actionsMapBase$
|
|
2688
|
+
return actionsMapBase$d(diff, oldObj, newObj, syncActionConfig);
|
|
2621
2689
|
}));
|
|
2622
2690
|
allActions.push(flatten__default["default"](mapActionGroup('locations', function () {
|
|
2623
2691
|
return actionsMapLocations(diff, oldObj, newObj);
|
|
@@ -2645,7 +2713,7 @@ var zones = (function (actionGroupList, syncActionConfig) {
|
|
|
2645
2713
|
};
|
|
2646
2714
|
});
|
|
2647
2715
|
|
|
2648
|
-
var baseActionsList$
|
|
2716
|
+
var baseActionsList$c = [{
|
|
2649
2717
|
action: 'setKey',
|
|
2650
2718
|
key: 'key'
|
|
2651
2719
|
}, {
|
|
@@ -2673,10 +2741,10 @@ var baseActionsList$9 = [{
|
|
|
2673
2741
|
action: 'changeActive',
|
|
2674
2742
|
key: 'active'
|
|
2675
2743
|
}];
|
|
2676
|
-
function actionsMapBase$
|
|
2744
|
+
function actionsMapBase$c(diff, oldObj, newObj) {
|
|
2677
2745
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2678
2746
|
return buildBaseAttributesActions({
|
|
2679
|
-
actions: baseActionsList$
|
|
2747
|
+
actions: baseActionsList$c,
|
|
2680
2748
|
diff: diff,
|
|
2681
2749
|
oldObj: oldObj,
|
|
2682
2750
|
newObj: newObj,
|
|
@@ -2753,7 +2821,7 @@ function createShippingMethodsMapActions(mapActionGroup, syncActionConfig) {
|
|
|
2753
2821
|
return function doMapActions(diff, newObj, oldObj) {
|
|
2754
2822
|
var allActions = [];
|
|
2755
2823
|
allActions.push(mapActionGroup('base', function () {
|
|
2756
|
-
return actionsMapBase$
|
|
2824
|
+
return actionsMapBase$c(diff, oldObj, newObj, syncActionConfig);
|
|
2757
2825
|
}));
|
|
2758
2826
|
allActions.push(flatten__default["default"](mapActionGroup('zoneRates', function () {
|
|
2759
2827
|
return actionsMapZoneRates(diff, oldObj, newObj);
|
|
@@ -2784,7 +2852,7 @@ var shippingMethods = (function (actionGroupList, syncActionConfig) {
|
|
|
2784
2852
|
};
|
|
2785
2853
|
});
|
|
2786
2854
|
|
|
2787
|
-
var baseActionsList$
|
|
2855
|
+
var baseActionsList$b = [{
|
|
2788
2856
|
action: 'changeName',
|
|
2789
2857
|
key: 'name'
|
|
2790
2858
|
}, {
|
|
@@ -2794,7 +2862,7 @@ var baseActionsList$8 = [{
|
|
|
2794
2862
|
action: 'changeDescription',
|
|
2795
2863
|
key: 'description'
|
|
2796
2864
|
}];
|
|
2797
|
-
function actionsMapBase$
|
|
2865
|
+
function actionsMapBase$b(diff, previous, next) {
|
|
2798
2866
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2799
2867
|
// when `diff` is undefined, then the underlying `buildActions` has returned any diff
|
|
2800
2868
|
// which given in product-types would mean that `buildActions` has run with `nestedValuesChanges` applied
|
|
@@ -2802,7 +2870,7 @@ function actionsMapBase$8(diff, previous, next) {
|
|
|
2802
2870
|
if (!diff) return [];
|
|
2803
2871
|
return buildBaseAttributesActions({
|
|
2804
2872
|
diff: diff,
|
|
2805
|
-
actions: baseActionsList$
|
|
2873
|
+
actions: baseActionsList$b,
|
|
2806
2874
|
oldObj: previous,
|
|
2807
2875
|
newObj: next,
|
|
2808
2876
|
shouldOmitEmptyString: config.shouldOmitEmptyString,
|
|
@@ -3021,7 +3089,7 @@ function createProductTypeMapActions(mapActionGroup, syncActionConfig) {
|
|
|
3021
3089
|
// we support only base fields for the product type,
|
|
3022
3090
|
// for attributes, applying hints would be recommended
|
|
3023
3091
|
mapActionGroup('base', function () {
|
|
3024
|
-
return actionsMapBase$
|
|
3092
|
+
return actionsMapBase$b(diff, previous, next, syncActionConfig);
|
|
3025
3093
|
}), actionsMapForHints(options.nestedValuesChanges, previous, next)]);
|
|
3026
3094
|
};
|
|
3027
3095
|
}
|
|
@@ -3037,7 +3105,7 @@ var productTypes = (function (actionGroupList, syncActionConfig) {
|
|
|
3037
3105
|
};
|
|
3038
3106
|
});
|
|
3039
3107
|
|
|
3040
|
-
var baseActionsList$
|
|
3108
|
+
var baseActionsList$a = [{
|
|
3041
3109
|
action: 'changeKey',
|
|
3042
3110
|
key: 'key'
|
|
3043
3111
|
}, {
|
|
@@ -3056,10 +3124,10 @@ var baseActionsList$7 = [{
|
|
|
3056
3124
|
action: 'setTransitions',
|
|
3057
3125
|
key: 'transitions'
|
|
3058
3126
|
}];
|
|
3059
|
-
function actionsMapBase$
|
|
3127
|
+
function actionsMapBase$a(diff, oldObj, newObj) {
|
|
3060
3128
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
3061
3129
|
return buildBaseAttributesActions({
|
|
3062
|
-
actions: baseActionsList$
|
|
3130
|
+
actions: baseActionsList$a,
|
|
3063
3131
|
diff: diff,
|
|
3064
3132
|
oldObj: oldObj,
|
|
3065
3133
|
newObj: newObj,
|
|
@@ -3108,7 +3176,7 @@ function createStatesMapActions(mapActionGroup, syncActionConfig) {
|
|
|
3108
3176
|
var baseActions = [];
|
|
3109
3177
|
var roleActions = [];
|
|
3110
3178
|
baseActions.push(mapActionGroup('base', function () {
|
|
3111
|
-
return actionsMapBase$
|
|
3179
|
+
return actionsMapBase$a(diff, oldObj, newObj, syncActionConfig);
|
|
3112
3180
|
}));
|
|
3113
3181
|
roleActions.push(mapActionGroup('roles', function () {
|
|
3114
3182
|
return actionsMapRoles(diff, oldObj, newObj);
|
|
@@ -3125,7 +3193,7 @@ var states = (function (actionGroupList, syncActionConfig) {
|
|
|
3125
3193
|
};
|
|
3126
3194
|
});
|
|
3127
3195
|
|
|
3128
|
-
var baseActionsList$
|
|
3196
|
+
var baseActionsList$9 = [{
|
|
3129
3197
|
action: 'changeKey',
|
|
3130
3198
|
key: 'key'
|
|
3131
3199
|
}, {
|
|
@@ -3144,10 +3212,10 @@ var baseActionsList$6 = [{
|
|
|
3144
3212
|
action: 'setRoles',
|
|
3145
3213
|
key: 'roles'
|
|
3146
3214
|
}];
|
|
3147
|
-
function actionsMapBase$
|
|
3215
|
+
function actionsMapBase$9(diff, oldObj, newObj) {
|
|
3148
3216
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
3149
3217
|
return buildBaseAttributesActions({
|
|
3150
|
-
actions: baseActionsList$
|
|
3218
|
+
actions: baseActionsList$9,
|
|
3151
3219
|
diff: diff,
|
|
3152
3220
|
oldObj: oldObj,
|
|
3153
3221
|
newObj: newObj,
|
|
@@ -3161,7 +3229,7 @@ function createChannelsMapActions$1(mapActionGroup, syncActionConfig) {
|
|
|
3161
3229
|
return function doMapActions(diff, newObj, oldObj) {
|
|
3162
3230
|
var allActions = [];
|
|
3163
3231
|
allActions.push(mapActionGroup('base', function () {
|
|
3164
|
-
return actionsMapBase$
|
|
3232
|
+
return actionsMapBase$9(diff, oldObj, newObj, syncActionConfig);
|
|
3165
3233
|
}));
|
|
3166
3234
|
allActions.push(mapActionGroup('custom', function () {
|
|
3167
3235
|
return actionsMapCustom(diff, newObj, oldObj);
|
|
@@ -3187,7 +3255,7 @@ var getIsChangedOperation = function getIsChangedOperation(key) {
|
|
|
3187
3255
|
var getIsRemovedOperation = function getIsRemovedOperation(key) {
|
|
3188
3256
|
return REGEX_UNDERSCORE_NUMBER.test(key);
|
|
3189
3257
|
};
|
|
3190
|
-
var baseActionsList$
|
|
3258
|
+
var baseActionsList$8 = [{
|
|
3191
3259
|
action: 'changeKey',
|
|
3192
3260
|
key: 'key'
|
|
3193
3261
|
}, {
|
|
@@ -3197,10 +3265,10 @@ var baseActionsList$5 = [{
|
|
|
3197
3265
|
action: 'setDescription',
|
|
3198
3266
|
key: 'description'
|
|
3199
3267
|
}];
|
|
3200
|
-
function actionsMapBase$
|
|
3268
|
+
function actionsMapBase$8(diff, oldObj, newObj) {
|
|
3201
3269
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
3202
3270
|
return buildBaseAttributesActions({
|
|
3203
|
-
actions: baseActionsList$
|
|
3271
|
+
actions: baseActionsList$8,
|
|
3204
3272
|
diff: diff,
|
|
3205
3273
|
oldObj: oldObj,
|
|
3206
3274
|
newObj: newObj,
|
|
@@ -3342,7 +3410,7 @@ function createTypeMapActions(mapActionGroup, syncActionConfig) {
|
|
|
3342
3410
|
return function doMapActions(diff, next, previous) {
|
|
3343
3411
|
var allActions = [];
|
|
3344
3412
|
allActions.push(mapActionGroup('base', function () {
|
|
3345
|
-
return actionsMapBase$
|
|
3413
|
+
return actionsMapBase$8(diff, previous, next, syncActionConfig);
|
|
3346
3414
|
}), mapActionGroup('fieldDefinitions', function () {
|
|
3347
3415
|
return actionsMapFieldDefinitions(diff.fieldDefinitions, previous.fieldDefinitions, next.fieldDefinitions, findMatchingPairs(diff.fieldDefinitions, previous.fieldDefinitions, next.fieldDefinitions, 'name'));
|
|
3348
3416
|
}));
|
|
@@ -3358,7 +3426,7 @@ var types = (function (actionGroupList, syncActionConfig) {
|
|
|
3358
3426
|
};
|
|
3359
3427
|
});
|
|
3360
3428
|
|
|
3361
|
-
var baseActionsList$
|
|
3429
|
+
var baseActionsList$7 = [{
|
|
3362
3430
|
action: 'changeName',
|
|
3363
3431
|
key: 'name'
|
|
3364
3432
|
}, {
|
|
@@ -3394,10 +3462,10 @@ var businessUnitSearchActionsList = [{
|
|
|
3394
3462
|
action: 'changeBusinessUnitSearchStatus',
|
|
3395
3463
|
key: 'status'
|
|
3396
3464
|
}];
|
|
3397
|
-
function actionsMapBase$
|
|
3465
|
+
function actionsMapBase$7(diff, oldObj, newObj) {
|
|
3398
3466
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
3399
3467
|
return buildBaseAttributesActions({
|
|
3400
|
-
actions: baseActionsList$
|
|
3468
|
+
actions: baseActionsList$7,
|
|
3401
3469
|
diff: diff,
|
|
3402
3470
|
oldObj: oldObj,
|
|
3403
3471
|
newObj: newObj,
|
|
@@ -3455,7 +3523,7 @@ function createChannelsMapActions(mapActionGroup, syncActionConfig) {
|
|
|
3455
3523
|
return function doMapActions(diff, newObj, oldObj) {
|
|
3456
3524
|
var allActions = [];
|
|
3457
3525
|
allActions.push(mapActionGroup('base', function () {
|
|
3458
|
-
return actionsMapBase$
|
|
3526
|
+
return actionsMapBase$7(diff, oldObj, newObj, syncActionConfig);
|
|
3459
3527
|
}));
|
|
3460
3528
|
allActions.push(mapActionGroup('businessUnit', function () {
|
|
3461
3529
|
return actionsMapBusinessUnit(diff, oldObj, newObj);
|
|
@@ -3476,7 +3544,7 @@ var projects = (function (actionGroupList) {
|
|
|
3476
3544
|
};
|
|
3477
3545
|
});
|
|
3478
3546
|
|
|
3479
|
-
var baseActionsList$
|
|
3547
|
+
var baseActionsList$6 = [{
|
|
3480
3548
|
action: 'setName',
|
|
3481
3549
|
key: 'name'
|
|
3482
3550
|
}, {
|
|
@@ -3489,10 +3557,10 @@ var baseActionsList$3 = [{
|
|
|
3489
3557
|
action: 'setSupplyChannels',
|
|
3490
3558
|
key: 'supplyChannels'
|
|
3491
3559
|
}];
|
|
3492
|
-
function actionsMapBase$
|
|
3560
|
+
function actionsMapBase$6(diff, oldObj, newObj) {
|
|
3493
3561
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
3494
3562
|
return buildBaseAttributesActions({
|
|
3495
|
-
actions: baseActionsList$
|
|
3563
|
+
actions: baseActionsList$6,
|
|
3496
3564
|
diff: diff,
|
|
3497
3565
|
oldObj: oldObj,
|
|
3498
3566
|
newObj: newObj,
|
|
@@ -3506,7 +3574,7 @@ function createStoresMapActions(mapActionGroup) {
|
|
|
3506
3574
|
return function doMapActions(diff, next, previous) {
|
|
3507
3575
|
var allActions = [];
|
|
3508
3576
|
allActions.push(mapActionGroup('base', function () {
|
|
3509
|
-
return actionsMapBase$
|
|
3577
|
+
return actionsMapBase$6(diff, previous, next);
|
|
3510
3578
|
}));
|
|
3511
3579
|
allActions.push(mapActionGroup('custom', function () {
|
|
3512
3580
|
return actionsMapCustom(diff, next, previous);
|
|
@@ -3525,17 +3593,17 @@ var stores = (function (actionGroupList) {
|
|
|
3525
3593
|
};
|
|
3526
3594
|
});
|
|
3527
3595
|
|
|
3528
|
-
var baseActionsList$
|
|
3596
|
+
var baseActionsList$5 = [{
|
|
3529
3597
|
action: 'changeName',
|
|
3530
3598
|
key: 'name'
|
|
3531
3599
|
}, {
|
|
3532
3600
|
action: 'setKey',
|
|
3533
3601
|
key: 'key'
|
|
3534
3602
|
}];
|
|
3535
|
-
function actionsMapBase$
|
|
3603
|
+
function actionsMapBase$5(diff, oldObj, newObj) {
|
|
3536
3604
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
3537
3605
|
return buildBaseAttributesActions({
|
|
3538
|
-
actions: baseActionsList$
|
|
3606
|
+
actions: baseActionsList$5,
|
|
3539
3607
|
diff: diff,
|
|
3540
3608
|
oldObj: oldObj,
|
|
3541
3609
|
newObj: newObj,
|
|
@@ -3549,7 +3617,7 @@ function createProductSelectionsMapActions(mapActionGroup) {
|
|
|
3549
3617
|
return function doMapActions(diff, next, previous) {
|
|
3550
3618
|
var allActions = [];
|
|
3551
3619
|
allActions.push(mapActionGroup('base', function () {
|
|
3552
|
-
return actionsMapBase$
|
|
3620
|
+
return actionsMapBase$5(diff, previous, next);
|
|
3553
3621
|
}));
|
|
3554
3622
|
allActions.push(mapActionGroup('custom', function () {
|
|
3555
3623
|
return actionsMapCustom(diff, next, previous);
|
|
@@ -3567,7 +3635,7 @@ var productSelections = (function (actionGroupList) {
|
|
|
3567
3635
|
};
|
|
3568
3636
|
});
|
|
3569
3637
|
|
|
3570
|
-
var baseActionsList$
|
|
3638
|
+
var baseActionsList$4 = [{
|
|
3571
3639
|
action: 'changeValue',
|
|
3572
3640
|
key: 'value'
|
|
3573
3641
|
}, {
|
|
@@ -3591,10 +3659,10 @@ var baseActionsList$1 = [{
|
|
|
3591
3659
|
action: 'changeActive',
|
|
3592
3660
|
key: 'active'
|
|
3593
3661
|
}];
|
|
3594
|
-
function actionsMapBase$
|
|
3662
|
+
function actionsMapBase$4(diff, oldObj, newObj) {
|
|
3595
3663
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
3596
3664
|
return buildBaseAttributesActions({
|
|
3597
|
-
actions: baseActionsList$
|
|
3665
|
+
actions: baseActionsList$4,
|
|
3598
3666
|
diff: diff,
|
|
3599
3667
|
oldObj: oldObj,
|
|
3600
3668
|
newObj: newObj,
|
|
@@ -3607,7 +3675,7 @@ function actionsMapBase$1(diff, oldObj, newObj) {
|
|
|
3607
3675
|
function createPriceMapActions(mapActionGroup, syncActionConfig) {
|
|
3608
3676
|
return function doMapActions(diff, newObj, oldObj) {
|
|
3609
3677
|
var baseActions = mapActionGroup('base', function () {
|
|
3610
|
-
return actionsMapBase$
|
|
3678
|
+
return actionsMapBase$4(diff, oldObj, newObj, syncActionConfig);
|
|
3611
3679
|
});
|
|
3612
3680
|
var customActions = mapActionGroup('custom', function () {
|
|
3613
3681
|
return actionsMapCustom(diff, newObj, oldObj);
|
|
@@ -3629,7 +3697,7 @@ var hasAttribute = function hasAttribute(attributes, newValue) {
|
|
|
3629
3697
|
return attribute.key === newValue.key;
|
|
3630
3698
|
});
|
|
3631
3699
|
};
|
|
3632
|
-
var baseActionsList = [{
|
|
3700
|
+
var baseActionsList$3 = [{
|
|
3633
3701
|
action: 'changeName',
|
|
3634
3702
|
key: 'name'
|
|
3635
3703
|
}, {
|
|
@@ -3639,10 +3707,10 @@ var baseActionsList = [{
|
|
|
3639
3707
|
action: 'setDescription',
|
|
3640
3708
|
key: 'description'
|
|
3641
3709
|
}];
|
|
3642
|
-
function actionsMapBase(diff, oldObj, newObj) {
|
|
3710
|
+
function actionsMapBase$3(diff, oldObj, newObj) {
|
|
3643
3711
|
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
3644
3712
|
return buildBaseAttributesActions({
|
|
3645
|
-
actions: baseActionsList,
|
|
3713
|
+
actions: baseActionsList$3,
|
|
3646
3714
|
diff: diff,
|
|
3647
3715
|
oldObj: oldObj,
|
|
3648
3716
|
newObj: newObj,
|
|
@@ -3687,7 +3755,7 @@ function createAttributeGroupsMapActions(mapActionGroup, syncActionConfig) {
|
|
|
3687
3755
|
return function doMapActions(diff, newObj, oldObj) {
|
|
3688
3756
|
var allActions = [];
|
|
3689
3757
|
allActions.push(mapActionGroup('base', function () {
|
|
3690
|
-
return actionsMapBase(diff, oldObj, newObj, syncActionConfig);
|
|
3758
|
+
return actionsMapBase$3(diff, oldObj, newObj, syncActionConfig);
|
|
3691
3759
|
}));
|
|
3692
3760
|
allActions.push(flatten__default["default"](mapActionGroup('attributes', function () {
|
|
3693
3761
|
return actionsMapAttributes(diff, oldObj, newObj);
|
|
@@ -3704,7 +3772,187 @@ var attributeGroups = (function (actionGroupList, syncActionConfig) {
|
|
|
3704
3772
|
};
|
|
3705
3773
|
});
|
|
3706
3774
|
|
|
3775
|
+
var baseActionsList$2 = [{
|
|
3776
|
+
action: 'setKey',
|
|
3777
|
+
key: 'key'
|
|
3778
|
+
}, {
|
|
3779
|
+
action: 'changeTriggers',
|
|
3780
|
+
key: 'triggers'
|
|
3781
|
+
}, {
|
|
3782
|
+
action: 'setTimeoutInMs',
|
|
3783
|
+
key: 'timeoutInMs'
|
|
3784
|
+
}, {
|
|
3785
|
+
action: 'changeDestination',
|
|
3786
|
+
key: 'destination'
|
|
3787
|
+
}];
|
|
3788
|
+
var actionsMapBase$2 = function actionsMapBase(diff, oldObj, newObj, config) {
|
|
3789
|
+
return buildBaseAttributesActions({
|
|
3790
|
+
actions: baseActionsList$2,
|
|
3791
|
+
diff: diff,
|
|
3792
|
+
oldObj: oldObj,
|
|
3793
|
+
newObj: newObj,
|
|
3794
|
+
shouldOmitEmptyString: config === null || config === void 0 ? void 0 : config.shouldOmitEmptyString
|
|
3795
|
+
});
|
|
3796
|
+
};
|
|
3797
|
+
|
|
3798
|
+
var createApiExtensionsMapActions = function createApiExtensionsMapActions(mapActionGroup, syncActionConfig) {
|
|
3799
|
+
return function doMapActions(diff, newObj, oldObj) {
|
|
3800
|
+
var allActions = [];
|
|
3801
|
+
allActions.push(mapActionGroup('base', function () {
|
|
3802
|
+
return actionsMapBase$2(diff, oldObj, newObj, syncActionConfig);
|
|
3803
|
+
}));
|
|
3804
|
+
return flatten__default["default"](allActions);
|
|
3805
|
+
};
|
|
3806
|
+
};
|
|
3807
|
+
var apiExtensions = (function (actionGroupList, syncActionConfig) {
|
|
3808
|
+
var mapActionGroup = createMapActionGroup(actionGroupList);
|
|
3809
|
+
var doMapActions = createApiExtensionsMapActions(mapActionGroup, syncActionConfig);
|
|
3810
|
+
var buildActions = createBuildActions(diff, doMapActions);
|
|
3811
|
+
return {
|
|
3812
|
+
buildActions: buildActions
|
|
3813
|
+
};
|
|
3814
|
+
});
|
|
3815
|
+
|
|
3816
|
+
var baseActionsList$1 = [{
|
|
3817
|
+
action: 'setStores',
|
|
3818
|
+
key: 'stores'
|
|
3819
|
+
}, {
|
|
3820
|
+
action: 'changeAssociateMode',
|
|
3821
|
+
key: 'associateMode'
|
|
3822
|
+
}, {
|
|
3823
|
+
action: 'changeApprovalRuleMode',
|
|
3824
|
+
key: 'approvalRuleMode'
|
|
3825
|
+
}, {
|
|
3826
|
+
action: 'changeName',
|
|
3827
|
+
key: 'name'
|
|
3828
|
+
}, {
|
|
3829
|
+
action: 'changeParentUnit',
|
|
3830
|
+
key: 'parentUnit'
|
|
3831
|
+
}, {
|
|
3832
|
+
action: 'changeStatus',
|
|
3833
|
+
key: 'status'
|
|
3834
|
+
}, {
|
|
3835
|
+
action: 'setContactEmail',
|
|
3836
|
+
key: 'contactEmail'
|
|
3837
|
+
}, {
|
|
3838
|
+
action: 'setStoreMode',
|
|
3839
|
+
key: 'storeMode'
|
|
3840
|
+
}];
|
|
3841
|
+
var actionsMapAssociates = function actionsMapAssociates(diff, oldObj, newObj) {
|
|
3842
|
+
var handler = createBuildArrayActions('associates', _defineProperty(_defineProperty(_defineProperty({}, ADD_ACTIONS, function (newObject) {
|
|
3843
|
+
return {
|
|
3844
|
+
action: 'addAssociate',
|
|
3845
|
+
associate: newObject
|
|
3846
|
+
};
|
|
3847
|
+
}), REMOVE_ACTIONS, function (objectToRemove) {
|
|
3848
|
+
return {
|
|
3849
|
+
action: 'removeAssociate',
|
|
3850
|
+
customer: {
|
|
3851
|
+
typeId: 'customer',
|
|
3852
|
+
id: objectToRemove.customer.id
|
|
3853
|
+
}
|
|
3854
|
+
};
|
|
3855
|
+
}), CHANGE_ACTIONS, function (oldObject, updatedObject) {
|
|
3856
|
+
return {
|
|
3857
|
+
action: 'changeAssociate',
|
|
3858
|
+
associate: updatedObject
|
|
3859
|
+
};
|
|
3860
|
+
}));
|
|
3861
|
+
return handler(diff, oldObj, newObj);
|
|
3862
|
+
};
|
|
3863
|
+
var actionsMapBase$1 = function actionsMapBase(diff, oldObj, newObj, config) {
|
|
3864
|
+
return buildBaseAttributesActions({
|
|
3865
|
+
actions: baseActionsList$1,
|
|
3866
|
+
diff: diff,
|
|
3867
|
+
oldObj: oldObj,
|
|
3868
|
+
newObj: newObj,
|
|
3869
|
+
shouldOmitEmptyString: config === null || config === void 0 ? void 0 : config.shouldOmitEmptyString
|
|
3870
|
+
});
|
|
3871
|
+
};
|
|
3872
|
+
|
|
3873
|
+
var createCustomerMapActions = function createCustomerMapActions(mapActionGroup, syncActionConfig) {
|
|
3874
|
+
return function doMapActions(diff, newObj, oldObj) {
|
|
3875
|
+
var allActions = [];
|
|
3876
|
+
allActions.push(mapActionGroup('base', function () {
|
|
3877
|
+
return actionsMapBase$1(diff, oldObj, newObj, syncActionConfig);
|
|
3878
|
+
}));
|
|
3879
|
+
allActions.push(mapActionGroup('addresses', function () {
|
|
3880
|
+
return actionsMapAddresses(diff, oldObj, newObj);
|
|
3881
|
+
}));
|
|
3882
|
+
allActions.push(mapActionGroup('base', function () {
|
|
3883
|
+
return actionsMapSetDefaultBase(diff, oldObj, newObj, syncActionConfig);
|
|
3884
|
+
}));
|
|
3885
|
+
allActions.push(mapActionGroup('billingAddressIds', function () {
|
|
3886
|
+
return actionsMapBillingAddresses(diff, oldObj, newObj);
|
|
3887
|
+
}));
|
|
3888
|
+
allActions.push(mapActionGroup('shippingAddressIds', function () {
|
|
3889
|
+
return actionsMapShippingAddresses(diff, oldObj, newObj);
|
|
3890
|
+
}));
|
|
3891
|
+
allActions.push(mapActionGroup('associates', function () {
|
|
3892
|
+
return actionsMapAssociates(diff, oldObj, newObj);
|
|
3893
|
+
}));
|
|
3894
|
+
allActions.push(mapActionGroup('custom', function () {
|
|
3895
|
+
return actionsMapCustom(diff, newObj, oldObj);
|
|
3896
|
+
}));
|
|
3897
|
+
return flatten__default["default"](allActions);
|
|
3898
|
+
};
|
|
3899
|
+
};
|
|
3900
|
+
var businessUnits = (function (actionGroupList, syncActionConfig) {
|
|
3901
|
+
var mapActionGroup = createMapActionGroup(actionGroupList);
|
|
3902
|
+
var doMapActions = createCustomerMapActions(mapActionGroup, syncActionConfig);
|
|
3903
|
+
var buildActions = createBuildActions(diff, doMapActions);
|
|
3904
|
+
return {
|
|
3905
|
+
buildActions: buildActions
|
|
3906
|
+
};
|
|
3907
|
+
});
|
|
3908
|
+
|
|
3909
|
+
var baseActionsList = [{
|
|
3910
|
+
action: 'setKey',
|
|
3911
|
+
key: 'key'
|
|
3912
|
+
}, {
|
|
3913
|
+
action: 'setMessages',
|
|
3914
|
+
key: 'messages'
|
|
3915
|
+
}, {
|
|
3916
|
+
action: 'setChanges',
|
|
3917
|
+
key: 'changes'
|
|
3918
|
+
}, {
|
|
3919
|
+
action: 'changeDestination',
|
|
3920
|
+
key: 'destination'
|
|
3921
|
+
}];
|
|
3922
|
+
var actionsMapBase = function actionsMapBase(diff, oldObj, newObj, config) {
|
|
3923
|
+
return buildBaseAttributesActions({
|
|
3924
|
+
actions: baseActionsList,
|
|
3925
|
+
diff: diff,
|
|
3926
|
+
oldObj: oldObj,
|
|
3927
|
+
newObj: newObj,
|
|
3928
|
+
shouldOmitEmptyString: config === null || config === void 0 ? void 0 : config.shouldOmitEmptyString
|
|
3929
|
+
});
|
|
3930
|
+
};
|
|
3931
|
+
|
|
3932
|
+
var createSubscriptionsMapActions = function createSubscriptionsMapActions(mapActionGroup, syncActionConfig) {
|
|
3933
|
+
return function doMapActions(diff, newObj, oldObj) {
|
|
3934
|
+
var allActions = [];
|
|
3935
|
+
allActions.push(mapActionGroup('base', function () {
|
|
3936
|
+
return actionsMapBase(diff, oldObj, newObj, syncActionConfig);
|
|
3937
|
+
}));
|
|
3938
|
+
allActions.push(mapActionGroup('custom', function () {
|
|
3939
|
+
return actionsMapCustom(diff, newObj, oldObj);
|
|
3940
|
+
}));
|
|
3941
|
+
return allActions.flat();
|
|
3942
|
+
};
|
|
3943
|
+
};
|
|
3944
|
+
var subscriptions = (function (actionGroupList, syncActionConfig) {
|
|
3945
|
+
var mapActionGroup = createMapActionGroup(actionGroupList);
|
|
3946
|
+
var doMapActions = createSubscriptionsMapActions(mapActionGroup, syncActionConfig);
|
|
3947
|
+
var buildActions = createBuildActions(diff, doMapActions);
|
|
3948
|
+
return {
|
|
3949
|
+
buildActions: buildActions
|
|
3950
|
+
};
|
|
3951
|
+
});
|
|
3952
|
+
|
|
3953
|
+
exports.createSyncApiExtensions = apiExtensions;
|
|
3707
3954
|
exports.createSyncAttributeGroups = attributeGroups;
|
|
3955
|
+
exports.createSyncBusinessUnits = businessUnits;
|
|
3708
3956
|
exports.createSyncCartDiscounts = cartDiscounts;
|
|
3709
3957
|
exports.createSyncCategories = categories;
|
|
3710
3958
|
exports.createSyncChannels = channels;
|
|
@@ -3723,6 +3971,7 @@ exports.createSyncShippingMethods = shippingMethods;
|
|
|
3723
3971
|
exports.createSyncStandalonePrices = prices;
|
|
3724
3972
|
exports.createSyncStates = states;
|
|
3725
3973
|
exports.createSyncStores = stores;
|
|
3974
|
+
exports.createSyncSubscriptions = subscriptions;
|
|
3726
3975
|
exports.createSyncTaxCategories = taxCategories;
|
|
3727
3976
|
exports.createSyncTypes = types;
|
|
3728
3977
|
exports.createSyncZones = zones;
|