@commercetools/sync-actions 7.1.3 → 7.2.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$l = [{
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$l(diff, oldObj, newObj) {
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$l,
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$l(diff, oldObj, newObj, syncActionConfig);
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$k = [{
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$k(diff, oldObj, newObj) {
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$k,
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$k(diff, oldObj, newObj, syncActionConfig);
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$j = [{
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$j(diff, oldObj, newObj) {
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$j,
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$j(diff, oldObj, newObj, syncActionConfig);
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$i = [{
1221
+ var baseActionsList$l = [{
1222
1222
  action: 'changeName',
1223
1223
  key: 'name'
1224
1224
  }, {
@@ -1622,10 +1622,10 @@ function _buildVariantAssetsActions(diffAssets, oldVariant, newVariant) {
1622
1622
  * SYNC FUNCTIONS
1623
1623
  */
1624
1624
 
1625
- function actionsMapBase$i(diff, oldObj, newObj) {
1625
+ function actionsMapBase$l(diff, oldObj, newObj) {
1626
1626
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1627
1627
  return buildBaseAttributesActions({
1628
- actions: baseActionsList$i,
1628
+ actions: baseActionsList$l,
1629
1629
  diff: diff,
1630
1630
  oldObj: oldObj,
1631
1631
  newObj: newObj,
@@ -1862,7 +1862,7 @@ function createProductMapActions(mapActionGroup, syncActionConfig) {
1862
1862
  return actionsMapRemoveVariants(diff, oldObj, newObj);
1863
1863
  }));
1864
1864
  allActions.push(mapActionGroup('base', function () {
1865
- return actionsMapBase$i(diff, oldObj, newObj, syncActionConfig);
1865
+ return actionsMapBase$l(diff, oldObj, newObj, syncActionConfig);
1866
1866
  }));
1867
1867
  allActions.push(mapActionGroup('meta', function () {
1868
1868
  return actionsMapMeta(diff, oldObj, newObj);
@@ -1929,7 +1929,7 @@ var isAddAction = function isAddAction(key, resource) {
1929
1929
  var isRemoveAction = function isRemoveAction(key, resource) {
1930
1930
  return REGEX_UNDERSCORE_NUMBER$1.test(key) && Number(resource[2]) === 0;
1931
1931
  };
1932
- var baseActionsList$h = [{
1932
+ var baseActionsList$k = [{
1933
1933
  action: 'changeOrderState',
1934
1934
  key: 'orderState'
1935
1935
  }, {
@@ -1944,10 +1944,10 @@ var baseActionsList$h = [{
1944
1944
  * SYNC FUNCTIONS
1945
1945
  */
1946
1946
 
1947
- function actionsMapBase$h(diff, oldObj, newObj) {
1947
+ function actionsMapBase$k(diff, oldObj, newObj) {
1948
1948
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1949
1949
  return buildBaseAttributesActions({
1950
- actions: baseActionsList$h,
1950
+ actions: baseActionsList$k,
1951
1951
  diff: diff,
1952
1952
  oldObj: oldObj,
1953
1953
  newObj: newObj,
@@ -2097,7 +2097,7 @@ function createOrderMapActions(mapActionGroup, syncActionConfig) {
2097
2097
  deliveryHashMap = findMatchingPairs(diff.shippingInfo.deliveries, oldObj.shippingInfo.deliveries, newObj.shippingInfo.deliveries);
2098
2098
  }
2099
2099
  allActions.push(mapActionGroup('base', function () {
2100
- return actionsMapBase$h(diff, oldObj, newObj, syncActionConfig);
2100
+ return actionsMapBase$k(diff, oldObj, newObj, syncActionConfig);
2101
2101
  }));
2102
2102
  allActions.push(mapActionGroup('deliveries', function () {
2103
2103
  return actionsMapDeliveries(diff, oldObj, newObj);
@@ -2137,7 +2137,7 @@ var orders = (function (actionGroupList, syncActionConfig) {
2137
2137
  };
2138
2138
  });
2139
2139
 
2140
- var baseActionsList$g = [{
2140
+ var baseActionsList$j = [{
2141
2141
  action: 'setKey',
2142
2142
  key: 'key'
2143
2143
  }, {
@@ -2147,10 +2147,10 @@ var baseActionsList$g = [{
2147
2147
  action: 'transitionState',
2148
2148
  key: 'state'
2149
2149
  }];
2150
- function actionsMapBase$g(diff, oldObj, newObj) {
2150
+ function actionsMapBase$j(diff, oldObj, newObj) {
2151
2151
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2152
2152
  return buildBaseAttributesActions({
2153
- actions: baseActionsList$g,
2153
+ actions: baseActionsList$j,
2154
2154
  diff: diff,
2155
2155
  oldObj: oldObj,
2156
2156
  newObj: newObj,
@@ -2164,7 +2164,7 @@ function createRecurringOrdersMapActions(mapActionGroup, syncActionConfig) {
2164
2164
  return function doMapActions(diff, newObj, oldObj) {
2165
2165
  var allActions = [];
2166
2166
  allActions.push(mapActionGroup('base', function () {
2167
- return actionsMapBase$g(diff, oldObj, newObj, syncActionConfig);
2167
+ return actionsMapBase$j(diff, oldObj, newObj, syncActionConfig);
2168
2168
  }));
2169
2169
  allActions.push(mapActionGroup('custom', function () {
2170
2170
  return actionsMapCustom(diff, newObj, oldObj);
@@ -2181,7 +2181,7 @@ var recurringOrders = (function (actionGroupList, syncActionConfig) {
2181
2181
  };
2182
2182
  });
2183
2183
 
2184
- var baseActionsList$f = [{
2184
+ var baseActionsList$i = [{
2185
2185
  action: 'changeIsActive',
2186
2186
  key: 'isActive'
2187
2187
  }, {
@@ -2209,10 +2209,10 @@ var baseActionsList$f = [{
2209
2209
  action: 'setKey',
2210
2210
  key: 'key'
2211
2211
  }];
2212
- function actionsMapBase$f(diff, oldObj, newObj) {
2212
+ function actionsMapBase$i(diff, oldObj, newObj) {
2213
2213
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2214
2214
  return buildBaseAttributesActions({
2215
- actions: baseActionsList$f,
2215
+ actions: baseActionsList$i,
2216
2216
  diff: diff,
2217
2217
  oldObj: oldObj,
2218
2218
  newObj: newObj,
@@ -2250,7 +2250,7 @@ function createProductDiscountsMapActions(mapActionGroup, syncActionConfig) {
2250
2250
  return function doMapActions(diff, newObj, oldObj) {
2251
2251
  var allActions = [];
2252
2252
  allActions.push(mapActionGroup('base', function () {
2253
- return actionsMapBase$f(diff, oldObj, newObj, syncActionConfig);
2253
+ return actionsMapBase$i(diff, oldObj, newObj, syncActionConfig);
2254
2254
  }));
2255
2255
  return combineValidityActions(flatten__default["default"](allActions));
2256
2256
  };
@@ -2265,7 +2265,7 @@ var productDiscounts = (function (actionGroupList) {
2265
2265
  };
2266
2266
  });
2267
2267
 
2268
- var baseActionsList$e = [{
2268
+ var baseActionsList$h = [{
2269
2269
  action: 'changeIsActive',
2270
2270
  key: 'isActive'
2271
2271
  }, {
@@ -2299,10 +2299,10 @@ var baseActionsList$e = [{
2299
2299
  action: 'changeGroups',
2300
2300
  key: 'groups'
2301
2301
  }];
2302
- function actionsMapBase$e(diff, oldObj, newObj) {
2302
+ function actionsMapBase$h(diff, oldObj, newObj) {
2303
2303
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2304
2304
  return buildBaseAttributesActions({
2305
- actions: baseActionsList$e,
2305
+ actions: baseActionsList$h,
2306
2306
  diff: diff,
2307
2307
  oldObj: oldObj,
2308
2308
  newObj: newObj,
@@ -2316,7 +2316,7 @@ function createDiscountCodesMapActions(mapActionGroup, syncActionConfig) {
2316
2316
  return function doMapActions(diff, newObj, oldObj) {
2317
2317
  var allActions = [];
2318
2318
  allActions.push(mapActionGroup('base', function () {
2319
- return actionsMapBase$e(diff, oldObj, newObj, syncActionConfig);
2319
+ return actionsMapBase$h(diff, oldObj, newObj, syncActionConfig);
2320
2320
  }));
2321
2321
  allActions.push(mapActionGroup('custom', function () {
2322
2322
  return actionsMapCustom(diff, newObj, oldObj);
@@ -2345,17 +2345,17 @@ var discountCodes = (function (actionGroupList) {
2345
2345
  };
2346
2346
  });
2347
2347
 
2348
- var baseActionsList$d = [{
2348
+ var baseActionsList$g = [{
2349
2349
  action: 'changeName',
2350
2350
  key: 'name'
2351
2351
  }, {
2352
2352
  action: 'setKey',
2353
2353
  key: 'key'
2354
2354
  }];
2355
- function actionsMapBase$d(diff, oldObj, newObj) {
2355
+ function actionsMapBase$g(diff, oldObj, newObj) {
2356
2356
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2357
2357
  return buildBaseAttributesActions({
2358
- actions: baseActionsList$d,
2358
+ actions: baseActionsList$g,
2359
2359
  diff: diff,
2360
2360
  oldObj: oldObj,
2361
2361
  newObj: newObj,
@@ -2369,7 +2369,7 @@ function createCustomerGroupMapActions(mapActionGroup, syncActionConfig) {
2369
2369
  return function doMapActions(diff, newObj, oldObj) {
2370
2370
  var allActions = [];
2371
2371
  allActions.push(mapActionGroup('base', function () {
2372
- return actionsMapBase$d(diff, oldObj, newObj, syncActionConfig);
2372
+ return actionsMapBase$g(diff, oldObj, newObj, syncActionConfig);
2373
2373
  }));
2374
2374
  allActions.push(mapActionGroup('custom', function () {
2375
2375
  return actionsMapCustom(diff, newObj, oldObj);
@@ -2387,7 +2387,7 @@ var customerGroup = (function (actionGroupList) {
2387
2387
  };
2388
2388
  });
2389
2389
 
2390
- var baseActionsList$c = [{
2390
+ var baseActionsList$f = [{
2391
2391
  action: 'changeIsActive',
2392
2392
  key: 'isActive'
2393
2393
  }, {
@@ -2424,10 +2424,10 @@ var baseActionsList$c = [{
2424
2424
  action: 'setKey',
2425
2425
  key: 'key'
2426
2426
  }];
2427
- function actionsMapBase$c(diff, oldObj, newObj) {
2427
+ function actionsMapBase$f(diff, oldObj, newObj) {
2428
2428
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2429
2429
  return buildBaseAttributesActions({
2430
- actions: baseActionsList$c,
2430
+ actions: baseActionsList$f,
2431
2431
  diff: diff,
2432
2432
  oldObj: oldObj,
2433
2433
  newObj: newObj,
@@ -2441,7 +2441,7 @@ function createCartDiscountsMapActions(mapActionGroup, syncActionConfig) {
2441
2441
  return function doMapActions(diff, newObj, oldObj) {
2442
2442
  var allActions = [];
2443
2443
  allActions.push(mapActionGroup('base', function () {
2444
- return actionsMapBase$c(diff, oldObj, newObj, syncActionConfig);
2444
+ return actionsMapBase$f(diff, oldObj, newObj, syncActionConfig);
2445
2445
  }));
2446
2446
  allActions.push(mapActionGroup('custom', function () {
2447
2447
  return actionsMapCustom(diff, newObj, oldObj);
@@ -2466,7 +2466,7 @@ function removeTypename(obj) {
2466
2466
  return objWithoutTypename;
2467
2467
  }
2468
2468
 
2469
- var baseActionsList$b = [{
2469
+ var baseActionsList$e = [{
2470
2470
  action: 'changeName',
2471
2471
  key: 'name'
2472
2472
  }, {
@@ -2476,10 +2476,10 @@ var baseActionsList$b = [{
2476
2476
  action: 'setDescription',
2477
2477
  key: 'description'
2478
2478
  }];
2479
- function actionsMapBase$b(diff, oldObj, newObj) {
2479
+ function actionsMapBase$e(diff, oldObj, newObj) {
2480
2480
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2481
2481
  return buildBaseAttributesActions({
2482
- actions: baseActionsList$b,
2482
+ actions: baseActionsList$e,
2483
2483
  diff: diff,
2484
2484
  oldObj: oldObj,
2485
2485
  newObj: newObj,
@@ -2523,7 +2523,7 @@ function createTaxCategoriesMapActions(mapActionGroup, syncActionConfig) {
2523
2523
  return function doMapActions(diff, newObj, oldObj) {
2524
2524
  var allActions = [];
2525
2525
  allActions.push(mapActionGroup('base', function () {
2526
- return actionsMapBase$b(diff, oldObj, newObj, syncActionConfig);
2526
+ return actionsMapBase$e(diff, oldObj, newObj, syncActionConfig);
2527
2527
  }));
2528
2528
  allActions.push(mapActionGroup('rates', function () {
2529
2529
  return actionsMapRates(diff, oldObj, newObj);
@@ -2551,7 +2551,7 @@ var taxCategories = (function (actionGroupList, syncActionConfig) {
2551
2551
  };
2552
2552
  });
2553
2553
 
2554
- var baseActionsList$a = [{
2554
+ var baseActionsList$d = [{
2555
2555
  action: 'changeName',
2556
2556
  key: 'name'
2557
2557
  }, {
@@ -2566,10 +2566,10 @@ var hasLocation = function hasLocation(locations, otherLocation) {
2566
2566
  return location.country === otherLocation.country;
2567
2567
  });
2568
2568
  };
2569
- function actionsMapBase$a(diff, oldObj, newObj) {
2569
+ function actionsMapBase$d(diff, oldObj, newObj) {
2570
2570
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2571
2571
  return buildBaseAttributesActions({
2572
- actions: baseActionsList$a,
2572
+ actions: baseActionsList$d,
2573
2573
  diff: diff,
2574
2574
  oldObj: oldObj,
2575
2575
  newObj: newObj,
@@ -2617,7 +2617,7 @@ function createZonesMapActions(mapActionGroup, syncActionConfig) {
2617
2617
  return function doMapActions(diff, newObj, oldObj) {
2618
2618
  var allActions = [];
2619
2619
  allActions.push(mapActionGroup('base', function () {
2620
- return actionsMapBase$a(diff, oldObj, newObj, syncActionConfig);
2620
+ return actionsMapBase$d(diff, oldObj, newObj, syncActionConfig);
2621
2621
  }));
2622
2622
  allActions.push(flatten__default["default"](mapActionGroup('locations', function () {
2623
2623
  return actionsMapLocations(diff, oldObj, newObj);
@@ -2645,7 +2645,7 @@ var zones = (function (actionGroupList, syncActionConfig) {
2645
2645
  };
2646
2646
  });
2647
2647
 
2648
- var baseActionsList$9 = [{
2648
+ var baseActionsList$c = [{
2649
2649
  action: 'setKey',
2650
2650
  key: 'key'
2651
2651
  }, {
@@ -2673,10 +2673,10 @@ var baseActionsList$9 = [{
2673
2673
  action: 'changeActive',
2674
2674
  key: 'active'
2675
2675
  }];
2676
- function actionsMapBase$9(diff, oldObj, newObj) {
2676
+ function actionsMapBase$c(diff, oldObj, newObj) {
2677
2677
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2678
2678
  return buildBaseAttributesActions({
2679
- actions: baseActionsList$9,
2679
+ actions: baseActionsList$c,
2680
2680
  diff: diff,
2681
2681
  oldObj: oldObj,
2682
2682
  newObj: newObj,
@@ -2753,7 +2753,7 @@ function createShippingMethodsMapActions(mapActionGroup, syncActionConfig) {
2753
2753
  return function doMapActions(diff, newObj, oldObj) {
2754
2754
  var allActions = [];
2755
2755
  allActions.push(mapActionGroup('base', function () {
2756
- return actionsMapBase$9(diff, oldObj, newObj, syncActionConfig);
2756
+ return actionsMapBase$c(diff, oldObj, newObj, syncActionConfig);
2757
2757
  }));
2758
2758
  allActions.push(flatten__default["default"](mapActionGroup('zoneRates', function () {
2759
2759
  return actionsMapZoneRates(diff, oldObj, newObj);
@@ -2784,7 +2784,7 @@ var shippingMethods = (function (actionGroupList, syncActionConfig) {
2784
2784
  };
2785
2785
  });
2786
2786
 
2787
- var baseActionsList$8 = [{
2787
+ var baseActionsList$b = [{
2788
2788
  action: 'changeName',
2789
2789
  key: 'name'
2790
2790
  }, {
@@ -2794,7 +2794,7 @@ var baseActionsList$8 = [{
2794
2794
  action: 'changeDescription',
2795
2795
  key: 'description'
2796
2796
  }];
2797
- function actionsMapBase$8(diff, previous, next) {
2797
+ function actionsMapBase$b(diff, previous, next) {
2798
2798
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2799
2799
  // when `diff` is undefined, then the underlying `buildActions` has returned any diff
2800
2800
  // which given in product-types would mean that `buildActions` has run with `nestedValuesChanges` applied
@@ -2802,7 +2802,7 @@ function actionsMapBase$8(diff, previous, next) {
2802
2802
  if (!diff) return [];
2803
2803
  return buildBaseAttributesActions({
2804
2804
  diff: diff,
2805
- actions: baseActionsList$8,
2805
+ actions: baseActionsList$b,
2806
2806
  oldObj: previous,
2807
2807
  newObj: next,
2808
2808
  shouldOmitEmptyString: config.shouldOmitEmptyString,
@@ -3021,7 +3021,7 @@ function createProductTypeMapActions(mapActionGroup, syncActionConfig) {
3021
3021
  // we support only base fields for the product type,
3022
3022
  // for attributes, applying hints would be recommended
3023
3023
  mapActionGroup('base', function () {
3024
- return actionsMapBase$8(diff, previous, next, syncActionConfig);
3024
+ return actionsMapBase$b(diff, previous, next, syncActionConfig);
3025
3025
  }), actionsMapForHints(options.nestedValuesChanges, previous, next)]);
3026
3026
  };
3027
3027
  }
@@ -3037,7 +3037,7 @@ var productTypes = (function (actionGroupList, syncActionConfig) {
3037
3037
  };
3038
3038
  });
3039
3039
 
3040
- var baseActionsList$7 = [{
3040
+ var baseActionsList$a = [{
3041
3041
  action: 'changeKey',
3042
3042
  key: 'key'
3043
3043
  }, {
@@ -3056,10 +3056,10 @@ var baseActionsList$7 = [{
3056
3056
  action: 'setTransitions',
3057
3057
  key: 'transitions'
3058
3058
  }];
3059
- function actionsMapBase$7(diff, oldObj, newObj) {
3059
+ function actionsMapBase$a(diff, oldObj, newObj) {
3060
3060
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3061
3061
  return buildBaseAttributesActions({
3062
- actions: baseActionsList$7,
3062
+ actions: baseActionsList$a,
3063
3063
  diff: diff,
3064
3064
  oldObj: oldObj,
3065
3065
  newObj: newObj,
@@ -3108,7 +3108,7 @@ function createStatesMapActions(mapActionGroup, syncActionConfig) {
3108
3108
  var baseActions = [];
3109
3109
  var roleActions = [];
3110
3110
  baseActions.push(mapActionGroup('base', function () {
3111
- return actionsMapBase$7(diff, oldObj, newObj, syncActionConfig);
3111
+ return actionsMapBase$a(diff, oldObj, newObj, syncActionConfig);
3112
3112
  }));
3113
3113
  roleActions.push(mapActionGroup('roles', function () {
3114
3114
  return actionsMapRoles(diff, oldObj, newObj);
@@ -3125,7 +3125,7 @@ var states = (function (actionGroupList, syncActionConfig) {
3125
3125
  };
3126
3126
  });
3127
3127
 
3128
- var baseActionsList$6 = [{
3128
+ var baseActionsList$9 = [{
3129
3129
  action: 'changeKey',
3130
3130
  key: 'key'
3131
3131
  }, {
@@ -3144,10 +3144,10 @@ var baseActionsList$6 = [{
3144
3144
  action: 'setRoles',
3145
3145
  key: 'roles'
3146
3146
  }];
3147
- function actionsMapBase$6(diff, oldObj, newObj) {
3147
+ function actionsMapBase$9(diff, oldObj, newObj) {
3148
3148
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3149
3149
  return buildBaseAttributesActions({
3150
- actions: baseActionsList$6,
3150
+ actions: baseActionsList$9,
3151
3151
  diff: diff,
3152
3152
  oldObj: oldObj,
3153
3153
  newObj: newObj,
@@ -3161,7 +3161,7 @@ function createChannelsMapActions$1(mapActionGroup, syncActionConfig) {
3161
3161
  return function doMapActions(diff, newObj, oldObj) {
3162
3162
  var allActions = [];
3163
3163
  allActions.push(mapActionGroup('base', function () {
3164
- return actionsMapBase$6(diff, oldObj, newObj, syncActionConfig);
3164
+ return actionsMapBase$9(diff, oldObj, newObj, syncActionConfig);
3165
3165
  }));
3166
3166
  allActions.push(mapActionGroup('custom', function () {
3167
3167
  return actionsMapCustom(diff, newObj, oldObj);
@@ -3187,7 +3187,7 @@ var getIsChangedOperation = function getIsChangedOperation(key) {
3187
3187
  var getIsRemovedOperation = function getIsRemovedOperation(key) {
3188
3188
  return REGEX_UNDERSCORE_NUMBER.test(key);
3189
3189
  };
3190
- var baseActionsList$5 = [{
3190
+ var baseActionsList$8 = [{
3191
3191
  action: 'changeKey',
3192
3192
  key: 'key'
3193
3193
  }, {
@@ -3197,10 +3197,10 @@ var baseActionsList$5 = [{
3197
3197
  action: 'setDescription',
3198
3198
  key: 'description'
3199
3199
  }];
3200
- function actionsMapBase$5(diff, oldObj, newObj) {
3200
+ function actionsMapBase$8(diff, oldObj, newObj) {
3201
3201
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3202
3202
  return buildBaseAttributesActions({
3203
- actions: baseActionsList$5,
3203
+ actions: baseActionsList$8,
3204
3204
  diff: diff,
3205
3205
  oldObj: oldObj,
3206
3206
  newObj: newObj,
@@ -3342,7 +3342,7 @@ function createTypeMapActions(mapActionGroup, syncActionConfig) {
3342
3342
  return function doMapActions(diff, next, previous) {
3343
3343
  var allActions = [];
3344
3344
  allActions.push(mapActionGroup('base', function () {
3345
- return actionsMapBase$5(diff, previous, next, syncActionConfig);
3345
+ return actionsMapBase$8(diff, previous, next, syncActionConfig);
3346
3346
  }), mapActionGroup('fieldDefinitions', function () {
3347
3347
  return actionsMapFieldDefinitions(diff.fieldDefinitions, previous.fieldDefinitions, next.fieldDefinitions, findMatchingPairs(diff.fieldDefinitions, previous.fieldDefinitions, next.fieldDefinitions, 'name'));
3348
3348
  }));
@@ -3358,7 +3358,7 @@ var types = (function (actionGroupList, syncActionConfig) {
3358
3358
  };
3359
3359
  });
3360
3360
 
3361
- var baseActionsList$4 = [{
3361
+ var baseActionsList$7 = [{
3362
3362
  action: 'changeName',
3363
3363
  key: 'name'
3364
3364
  }, {
@@ -3394,10 +3394,10 @@ var businessUnitSearchActionsList = [{
3394
3394
  action: 'changeBusinessUnitSearchStatus',
3395
3395
  key: 'status'
3396
3396
  }];
3397
- function actionsMapBase$4(diff, oldObj, newObj) {
3397
+ function actionsMapBase$7(diff, oldObj, newObj) {
3398
3398
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3399
3399
  return buildBaseAttributesActions({
3400
- actions: baseActionsList$4,
3400
+ actions: baseActionsList$7,
3401
3401
  diff: diff,
3402
3402
  oldObj: oldObj,
3403
3403
  newObj: newObj,
@@ -3455,7 +3455,7 @@ function createChannelsMapActions(mapActionGroup, syncActionConfig) {
3455
3455
  return function doMapActions(diff, newObj, oldObj) {
3456
3456
  var allActions = [];
3457
3457
  allActions.push(mapActionGroup('base', function () {
3458
- return actionsMapBase$4(diff, oldObj, newObj, syncActionConfig);
3458
+ return actionsMapBase$7(diff, oldObj, newObj, syncActionConfig);
3459
3459
  }));
3460
3460
  allActions.push(mapActionGroup('businessUnit', function () {
3461
3461
  return actionsMapBusinessUnit(diff, oldObj, newObj);
@@ -3476,7 +3476,7 @@ var projects = (function (actionGroupList) {
3476
3476
  };
3477
3477
  });
3478
3478
 
3479
- var baseActionsList$3 = [{
3479
+ var baseActionsList$6 = [{
3480
3480
  action: 'setName',
3481
3481
  key: 'name'
3482
3482
  }, {
@@ -3489,10 +3489,10 @@ var baseActionsList$3 = [{
3489
3489
  action: 'setSupplyChannels',
3490
3490
  key: 'supplyChannels'
3491
3491
  }];
3492
- function actionsMapBase$3(diff, oldObj, newObj) {
3492
+ function actionsMapBase$6(diff, oldObj, newObj) {
3493
3493
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3494
3494
  return buildBaseAttributesActions({
3495
- actions: baseActionsList$3,
3495
+ actions: baseActionsList$6,
3496
3496
  diff: diff,
3497
3497
  oldObj: oldObj,
3498
3498
  newObj: newObj,
@@ -3506,7 +3506,7 @@ function createStoresMapActions(mapActionGroup) {
3506
3506
  return function doMapActions(diff, next, previous) {
3507
3507
  var allActions = [];
3508
3508
  allActions.push(mapActionGroup('base', function () {
3509
- return actionsMapBase$3(diff, previous, next);
3509
+ return actionsMapBase$6(diff, previous, next);
3510
3510
  }));
3511
3511
  allActions.push(mapActionGroup('custom', function () {
3512
3512
  return actionsMapCustom(diff, next, previous);
@@ -3525,17 +3525,17 @@ var stores = (function (actionGroupList) {
3525
3525
  };
3526
3526
  });
3527
3527
 
3528
- var baseActionsList$2 = [{
3528
+ var baseActionsList$5 = [{
3529
3529
  action: 'changeName',
3530
3530
  key: 'name'
3531
3531
  }, {
3532
3532
  action: 'setKey',
3533
3533
  key: 'key'
3534
3534
  }];
3535
- function actionsMapBase$2(diff, oldObj, newObj) {
3535
+ function actionsMapBase$5(diff, oldObj, newObj) {
3536
3536
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3537
3537
  return buildBaseAttributesActions({
3538
- actions: baseActionsList$2,
3538
+ actions: baseActionsList$5,
3539
3539
  diff: diff,
3540
3540
  oldObj: oldObj,
3541
3541
  newObj: newObj,
@@ -3549,7 +3549,7 @@ function createProductSelectionsMapActions(mapActionGroup) {
3549
3549
  return function doMapActions(diff, next, previous) {
3550
3550
  var allActions = [];
3551
3551
  allActions.push(mapActionGroup('base', function () {
3552
- return actionsMapBase$2(diff, previous, next);
3552
+ return actionsMapBase$5(diff, previous, next);
3553
3553
  }));
3554
3554
  allActions.push(mapActionGroup('custom', function () {
3555
3555
  return actionsMapCustom(diff, next, previous);
@@ -3567,7 +3567,7 @@ var productSelections = (function (actionGroupList) {
3567
3567
  };
3568
3568
  });
3569
3569
 
3570
- var baseActionsList$1 = [{
3570
+ var baseActionsList$4 = [{
3571
3571
  action: 'changeValue',
3572
3572
  key: 'value'
3573
3573
  }, {
@@ -3591,10 +3591,10 @@ var baseActionsList$1 = [{
3591
3591
  action: 'changeActive',
3592
3592
  key: 'active'
3593
3593
  }];
3594
- function actionsMapBase$1(diff, oldObj, newObj) {
3594
+ function actionsMapBase$4(diff, oldObj, newObj) {
3595
3595
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3596
3596
  return buildBaseAttributesActions({
3597
- actions: baseActionsList$1,
3597
+ actions: baseActionsList$4,
3598
3598
  diff: diff,
3599
3599
  oldObj: oldObj,
3600
3600
  newObj: newObj,
@@ -3607,7 +3607,7 @@ function actionsMapBase$1(diff, oldObj, newObj) {
3607
3607
  function createPriceMapActions(mapActionGroup, syncActionConfig) {
3608
3608
  return function doMapActions(diff, newObj, oldObj) {
3609
3609
  var baseActions = mapActionGroup('base', function () {
3610
- return actionsMapBase$1(diff, oldObj, newObj, syncActionConfig);
3610
+ return actionsMapBase$4(diff, oldObj, newObj, syncActionConfig);
3611
3611
  });
3612
3612
  var customActions = mapActionGroup('custom', function () {
3613
3613
  return actionsMapCustom(diff, newObj, oldObj);
@@ -3629,7 +3629,7 @@ var hasAttribute = function hasAttribute(attributes, newValue) {
3629
3629
  return attribute.key === newValue.key;
3630
3630
  });
3631
3631
  };
3632
- var baseActionsList = [{
3632
+ var baseActionsList$3 = [{
3633
3633
  action: 'changeName',
3634
3634
  key: 'name'
3635
3635
  }, {
@@ -3639,10 +3639,10 @@ var baseActionsList = [{
3639
3639
  action: 'setDescription',
3640
3640
  key: 'description'
3641
3641
  }];
3642
- function actionsMapBase(diff, oldObj, newObj) {
3642
+ function actionsMapBase$3(diff, oldObj, newObj) {
3643
3643
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3644
3644
  return buildBaseAttributesActions({
3645
- actions: baseActionsList,
3645
+ actions: baseActionsList$3,
3646
3646
  diff: diff,
3647
3647
  oldObj: oldObj,
3648
3648
  newObj: newObj,
@@ -3687,7 +3687,7 @@ function createAttributeGroupsMapActions(mapActionGroup, syncActionConfig) {
3687
3687
  return function doMapActions(diff, newObj, oldObj) {
3688
3688
  var allActions = [];
3689
3689
  allActions.push(mapActionGroup('base', function () {
3690
- return actionsMapBase(diff, oldObj, newObj, syncActionConfig);
3690
+ return actionsMapBase$3(diff, oldObj, newObj, syncActionConfig);
3691
3691
  }));
3692
3692
  allActions.push(flatten__default["default"](mapActionGroup('attributes', function () {
3693
3693
  return actionsMapAttributes(diff, oldObj, newObj);
@@ -3704,7 +3704,187 @@ var attributeGroups = (function (actionGroupList, syncActionConfig) {
3704
3704
  };
3705
3705
  });
3706
3706
 
3707
+ var baseActionsList$2 = [{
3708
+ action: 'setKey',
3709
+ key: 'key'
3710
+ }, {
3711
+ action: 'changeTriggers',
3712
+ key: 'triggers'
3713
+ }, {
3714
+ action: 'setTimeoutInMs',
3715
+ key: 'timeoutInMs'
3716
+ }, {
3717
+ action: 'changeDestination',
3718
+ key: 'destination'
3719
+ }];
3720
+ var actionsMapBase$2 = function actionsMapBase(diff, oldObj, newObj, config) {
3721
+ return buildBaseAttributesActions({
3722
+ actions: baseActionsList$2,
3723
+ diff: diff,
3724
+ oldObj: oldObj,
3725
+ newObj: newObj,
3726
+ shouldOmitEmptyString: config === null || config === void 0 ? void 0 : config.shouldOmitEmptyString
3727
+ });
3728
+ };
3729
+
3730
+ var createApiExtensionsMapActions = function createApiExtensionsMapActions(mapActionGroup, syncActionConfig) {
3731
+ return function doMapActions(diff, newObj, oldObj) {
3732
+ var allActions = [];
3733
+ allActions.push(mapActionGroup('base', function () {
3734
+ return actionsMapBase$2(diff, oldObj, newObj, syncActionConfig);
3735
+ }));
3736
+ return flatten__default["default"](allActions);
3737
+ };
3738
+ };
3739
+ var apiExtensions = (function (actionGroupList, syncActionConfig) {
3740
+ var mapActionGroup = createMapActionGroup(actionGroupList);
3741
+ var doMapActions = createApiExtensionsMapActions(mapActionGroup, syncActionConfig);
3742
+ var buildActions = createBuildActions(diff, doMapActions);
3743
+ return {
3744
+ buildActions: buildActions
3745
+ };
3746
+ });
3747
+
3748
+ var baseActionsList$1 = [{
3749
+ action: 'setStores',
3750
+ key: 'stores'
3751
+ }, {
3752
+ action: 'changeAssociateMode',
3753
+ key: 'associateMode'
3754
+ }, {
3755
+ action: 'changeApprovalRuleMode',
3756
+ key: 'approvalRuleMode'
3757
+ }, {
3758
+ action: 'changeName',
3759
+ key: 'name'
3760
+ }, {
3761
+ action: 'changeParentUnit',
3762
+ key: 'parentUnit'
3763
+ }, {
3764
+ action: 'changeStatus',
3765
+ key: 'status'
3766
+ }, {
3767
+ action: 'setContactEmail',
3768
+ key: 'contactEmail'
3769
+ }, {
3770
+ action: 'setStoreMode',
3771
+ key: 'storeMode'
3772
+ }];
3773
+ var actionsMapAssociates = function actionsMapAssociates(diff, oldObj, newObj) {
3774
+ var handler = createBuildArrayActions('associates', _defineProperty(_defineProperty(_defineProperty({}, ADD_ACTIONS, function (newObject) {
3775
+ return {
3776
+ action: 'addAssociate',
3777
+ associate: newObject
3778
+ };
3779
+ }), REMOVE_ACTIONS, function (objectToRemove) {
3780
+ return {
3781
+ action: 'removeAssociate',
3782
+ customer: {
3783
+ typeId: 'customer',
3784
+ id: objectToRemove.customer.id
3785
+ }
3786
+ };
3787
+ }), CHANGE_ACTIONS, function (oldObject, updatedObject) {
3788
+ return {
3789
+ action: 'changeAssociate',
3790
+ associate: updatedObject
3791
+ };
3792
+ }));
3793
+ return handler(diff, oldObj, newObj);
3794
+ };
3795
+ var actionsMapBase$1 = function actionsMapBase(diff, oldObj, newObj, config) {
3796
+ return buildBaseAttributesActions({
3797
+ actions: baseActionsList$1,
3798
+ diff: diff,
3799
+ oldObj: oldObj,
3800
+ newObj: newObj,
3801
+ shouldOmitEmptyString: config === null || config === void 0 ? void 0 : config.shouldOmitEmptyString
3802
+ });
3803
+ };
3804
+
3805
+ var createCustomerMapActions = function createCustomerMapActions(mapActionGroup, syncActionConfig) {
3806
+ return function doMapActions(diff, newObj, oldObj) {
3807
+ var allActions = [];
3808
+ allActions.push(mapActionGroup('base', function () {
3809
+ return actionsMapBase$1(diff, oldObj, newObj, syncActionConfig);
3810
+ }));
3811
+ allActions.push(mapActionGroup('addresses', function () {
3812
+ return actionsMapAddresses(diff, oldObj, newObj);
3813
+ }));
3814
+ allActions.push(mapActionGroup('base', function () {
3815
+ return actionsMapSetDefaultBase(diff, oldObj, newObj, syncActionConfig);
3816
+ }));
3817
+ allActions.push(mapActionGroup('billingAddressIds', function () {
3818
+ return actionsMapBillingAddresses(diff, oldObj, newObj);
3819
+ }));
3820
+ allActions.push(mapActionGroup('shippingAddressIds', function () {
3821
+ return actionsMapShippingAddresses(diff, oldObj, newObj);
3822
+ }));
3823
+ allActions.push(mapActionGroup('associates', function () {
3824
+ return actionsMapAssociates(diff, oldObj, newObj);
3825
+ }));
3826
+ allActions.push(mapActionGroup('custom', function () {
3827
+ return actionsMapCustom(diff, newObj, oldObj);
3828
+ }));
3829
+ return flatten__default["default"](allActions);
3830
+ };
3831
+ };
3832
+ var businessUnits = (function (actionGroupList, syncActionConfig) {
3833
+ var mapActionGroup = createMapActionGroup(actionGroupList);
3834
+ var doMapActions = createCustomerMapActions(mapActionGroup, syncActionConfig);
3835
+ var buildActions = createBuildActions(diff, doMapActions);
3836
+ return {
3837
+ buildActions: buildActions
3838
+ };
3839
+ });
3840
+
3841
+ var baseActionsList = [{
3842
+ action: 'setKey',
3843
+ key: 'key'
3844
+ }, {
3845
+ action: 'setMessages',
3846
+ key: 'messages'
3847
+ }, {
3848
+ action: 'setChanges',
3849
+ key: 'changes'
3850
+ }, {
3851
+ action: 'changeDestination',
3852
+ key: 'destination'
3853
+ }];
3854
+ var actionsMapBase = function actionsMapBase(diff, oldObj, newObj, config) {
3855
+ return buildBaseAttributesActions({
3856
+ actions: baseActionsList,
3857
+ diff: diff,
3858
+ oldObj: oldObj,
3859
+ newObj: newObj,
3860
+ shouldOmitEmptyString: config === null || config === void 0 ? void 0 : config.shouldOmitEmptyString
3861
+ });
3862
+ };
3863
+
3864
+ var createSubscriptionsMapActions = function createSubscriptionsMapActions(mapActionGroup, syncActionConfig) {
3865
+ return function doMapActions(diff, newObj, oldObj) {
3866
+ var allActions = [];
3867
+ allActions.push(mapActionGroup('base', function () {
3868
+ return actionsMapBase(diff, oldObj, newObj, syncActionConfig);
3869
+ }));
3870
+ allActions.push(mapActionGroup('custom', function () {
3871
+ return actionsMapCustom(diff, newObj, oldObj);
3872
+ }));
3873
+ return allActions.flat();
3874
+ };
3875
+ };
3876
+ var subscriptions = (function (actionGroupList, syncActionConfig) {
3877
+ var mapActionGroup = createMapActionGroup(actionGroupList);
3878
+ var doMapActions = createSubscriptionsMapActions(mapActionGroup, syncActionConfig);
3879
+ var buildActions = createBuildActions(diff, doMapActions);
3880
+ return {
3881
+ buildActions: buildActions
3882
+ };
3883
+ });
3884
+
3885
+ exports.createSyncApiExtensions = apiExtensions;
3707
3886
  exports.createSyncAttributeGroups = attributeGroups;
3887
+ exports.createSyncBusinessUnits = businessUnits;
3708
3888
  exports.createSyncCartDiscounts = cartDiscounts;
3709
3889
  exports.createSyncCategories = categories;
3710
3890
  exports.createSyncChannels = channels;
@@ -3723,6 +3903,7 @@ exports.createSyncShippingMethods = shippingMethods;
3723
3903
  exports.createSyncStandalonePrices = prices;
3724
3904
  exports.createSyncStates = states;
3725
3905
  exports.createSyncStores = stores;
3906
+ exports.createSyncSubscriptions = subscriptions;
3726
3907
  exports.createSyncTaxCategories = taxCategories;
3727
3908
  exports.createSyncTypes = types;
3728
3909
  exports.createSyncZones = zones;