@commercetools/sync-actions 4.10.0 → 4.10.1

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/CHANGELOG.md CHANGED
@@ -1,10 +1,16 @@
1
1
  # @commercetools/sync-actions
2
2
 
3
- ## 4.10.0
4
- ### Minor Changes
3
+ ## 4.10.1
5
4
 
5
+ ### Patch Changes
6
6
 
7
+ - [#1770](https://github.com/commercetools/nodejs/pull/1770) [`381d1e1f`](https://github.com/commercetools/nodejs/commit/381d1e1f07cc2705962973e3a48934bf7884e309) Thanks [@mohib0306](https://github.com/mohib0306)! - Fix product selection's name update action. `setName` => `changeName`
8
+ Expose `createSyncProductSelections` from `sync-actions` package
9
+
10
+ ## 4.10.0
11
+
12
+ ### Minor Changes
7
13
 
8
14
  - [#1767](https://github.com/commercetools/nodejs/pull/1767) [`1aef3423`](https://github.com/commercetools/nodejs/commit/1aef3423e96da7f5df20fd5f66ec29146cacee83) Thanks [@mohib0306](https://github.com/mohib0306)! - feat(sync-actions/product-selections): add sync action support for product selections
9
-
15
+
10
16
  As product selections are available via the API, the sync-actions package is updated to support generating update actions for product selections.
@@ -700,7 +700,7 @@ function buildReferenceActions(_ref4) {
700
700
  });
701
701
  }
702
702
 
703
- var baseActionsList$h = [{
703
+ var baseActionsList$i = [{
704
704
  action: 'changeName',
705
705
  key: 'name'
706
706
  }, {
@@ -737,10 +737,10 @@ var referenceActionsList$3 = [{
737
737
  * SYNC FUNCTIONS
738
738
  */
739
739
 
740
- function actionsMapBase$h(diff, oldObj, newObj) {
740
+ function actionsMapBase$i(diff, oldObj, newObj) {
741
741
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
742
742
  return buildBaseAttributesActions({
743
- actions: baseActionsList$h,
743
+ actions: baseActionsList$i,
744
744
  diff: diff,
745
745
  oldObj: oldObj,
746
746
  newObj: newObj,
@@ -844,7 +844,7 @@ function createCategoryMapActions(mapActionGroup, syncActionConfig) {
844
844
  return function doMapActions(diff, newObj, oldObj) {
845
845
  var allActions = [];
846
846
  allActions.push(mapActionGroup('base', function () {
847
- return actionsMapBase$h(diff, oldObj, newObj, syncActionConfig);
847
+ return actionsMapBase$i(diff, oldObj, newObj, syncActionConfig);
848
848
  }));
849
849
  allActions.push(mapActionGroup('references', function () {
850
850
  return actionsMapReferences$3(diff, oldObj, newObj);
@@ -880,7 +880,7 @@ var categories = (function (actionGroupList, syncActionConfig) {
880
880
  };
881
881
  });
882
882
 
883
- var baseActionsList$g = [{
883
+ var baseActionsList$h = [{
884
884
  action: 'setSalutation',
885
885
  key: 'salutation'
886
886
  }, {
@@ -940,10 +940,10 @@ var referenceActionsList$2 = [{
940
940
  * SYNC FUNCTIONS
941
941
  */
942
942
 
943
- function actionsMapBase$g(diff, oldObj, newObj) {
943
+ function actionsMapBase$h(diff, oldObj, newObj) {
944
944
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
945
945
  return buildBaseAttributesActions({
946
- actions: baseActionsList$g,
946
+ actions: baseActionsList$h,
947
947
  diff: diff,
948
948
  oldObj: oldObj,
949
949
  newObj: newObj,
@@ -1027,7 +1027,7 @@ function createCustomerMapActions(mapActionGroup, syncActionConfig) {
1027
1027
  return function doMapActions(diff, newObj, oldObj) {
1028
1028
  var allActions = [];
1029
1029
  allActions.push(mapActionGroup('base', function () {
1030
- return actionsMapBase$g(diff, oldObj, newObj, syncActionConfig);
1030
+ return actionsMapBase$h(diff, oldObj, newObj, syncActionConfig);
1031
1031
  }));
1032
1032
  allActions.push(mapActionGroup('references', function () {
1033
1033
  return actionsMapReferences$2(diff, oldObj, newObj);
@@ -1069,7 +1069,7 @@ var customers = (function (actionGroupList, syncActionConfig) {
1069
1069
  };
1070
1070
  });
1071
1071
 
1072
- var baseActionsList$f = [{
1072
+ var baseActionsList$g = [{
1073
1073
  action: 'changeQuantity',
1074
1074
  key: 'quantityOnStock',
1075
1075
  actionKey: 'quantity'
@@ -1088,10 +1088,10 @@ var referenceActionsList$1 = [{
1088
1088
  * SYNC FUNCTIONS
1089
1089
  */
1090
1090
 
1091
- function actionsMapBase$f(diff, oldObj, newObj) {
1091
+ function actionsMapBase$g(diff, oldObj, newObj) {
1092
1092
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1093
1093
  return buildBaseAttributesActions({
1094
- actions: baseActionsList$f,
1094
+ actions: baseActionsList$g,
1095
1095
  diff: diff,
1096
1096
  oldObj: oldObj,
1097
1097
  newObj: newObj,
@@ -1111,7 +1111,7 @@ function createInventoryMapActions(mapActionGroup, syncActionConfig) {
1111
1111
  return function doMapActions(diff, newObj, oldObj) {
1112
1112
  var allActions = [];
1113
1113
  allActions.push(mapActionGroup('base', function () {
1114
- return actionsMapBase$f(diff, oldObj, newObj, syncActionConfig);
1114
+ return actionsMapBase$g(diff, oldObj, newObj, syncActionConfig);
1115
1115
  }));
1116
1116
  allActions.push(mapActionGroup('references', function () {
1117
1117
  return actionsMapReferences$1(diff, oldObj, newObj);
@@ -1206,7 +1206,7 @@ function findMatchingPairs(diff) {
1206
1206
 
1207
1207
  var REGEX_NUMBER$2 = new RegExp(/^\d+$/);
1208
1208
  var REGEX_UNDERSCORE_NUMBER$2 = new RegExp(/^_\d+$/);
1209
- var baseActionsList$e = [{
1209
+ var baseActionsList$f = [{
1210
1210
  action: 'changeName',
1211
1211
  key: 'name'
1212
1212
  }, {
@@ -1610,10 +1610,10 @@ function _buildVariantAssetsActions(diffAssets, oldVariant, newVariant) {
1610
1610
  */
1611
1611
 
1612
1612
 
1613
- function actionsMapBase$e(diff, oldObj, newObj) {
1613
+ function actionsMapBase$f(diff, oldObj, newObj) {
1614
1614
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1615
1615
  return buildBaseAttributesActions({
1616
- actions: baseActionsList$e,
1616
+ actions: baseActionsList$f,
1617
1617
  diff: diff,
1618
1618
  oldObj: oldObj,
1619
1619
  newObj: newObj,
@@ -1854,7 +1854,7 @@ function createProductMapActions(mapActionGroup, syncActionConfig) {
1854
1854
  return actionsMapRemoveVariants(diff, oldObj, newObj);
1855
1855
  }));
1856
1856
  allActions.push(mapActionGroup('base', function () {
1857
- return actionsMapBase$e(diff, oldObj, newObj, syncActionConfig);
1857
+ return actionsMapBase$f(diff, oldObj, newObj, syncActionConfig);
1858
1858
  }));
1859
1859
  allActions.push(mapActionGroup('meta', function () {
1860
1860
  return actionsMapMeta(diff, oldObj, newObj);
@@ -1929,7 +1929,7 @@ var isRemoveAction = function isRemoveAction(key, resource) {
1929
1929
  return REGEX_UNDERSCORE_NUMBER$1.test(key) && Number(resource[2]) === 0;
1930
1930
  };
1931
1931
 
1932
- var baseActionsList$d = [{
1932
+ var baseActionsList$e = [{
1933
1933
  action: 'changeOrderState',
1934
1934
  key: 'orderState'
1935
1935
  }, {
@@ -1943,10 +1943,10 @@ var baseActionsList$d = [{
1943
1943
  * SYNC FUNCTIONS
1944
1944
  */
1945
1945
 
1946
- function actionsMapBase$d(diff, oldObj, newObj) {
1946
+ function actionsMapBase$e(diff, oldObj, newObj) {
1947
1947
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1948
1948
  return buildBaseAttributesActions({
1949
- actions: baseActionsList$d,
1949
+ actions: baseActionsList$e,
1950
1950
  diff: diff,
1951
1951
  oldObj: oldObj,
1952
1952
  newObj: newObj,
@@ -2079,7 +2079,7 @@ function createOrderMapActions(mapActionGroup, syncActionConfig) {
2079
2079
  }
2080
2080
 
2081
2081
  allActions.push(mapActionGroup('base', function () {
2082
- return actionsMapBase$d(diff, oldObj, newObj, syncActionConfig);
2082
+ return actionsMapBase$e(diff, oldObj, newObj, syncActionConfig);
2083
2083
  }));
2084
2084
  allActions.push(mapActionGroup('deliveries', function () {
2085
2085
  return actionsMapDeliveries(diff, oldObj, newObj);
@@ -2115,7 +2115,7 @@ var orders = (function (actionGroupList, syncActionConfig) {
2115
2115
  };
2116
2116
  });
2117
2117
 
2118
- var baseActionsList$c = [{
2118
+ var baseActionsList$d = [{
2119
2119
  action: 'changeIsActive',
2120
2120
  key: 'isActive'
2121
2121
  }, {
@@ -2143,10 +2143,10 @@ var baseActionsList$c = [{
2143
2143
  action: 'setKey',
2144
2144
  key: 'key'
2145
2145
  }];
2146
- function actionsMapBase$c(diff, oldObj, newObj) {
2146
+ function actionsMapBase$d(diff, oldObj, newObj) {
2147
2147
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2148
2148
  return buildBaseAttributesActions({
2149
- actions: baseActionsList$c,
2149
+ actions: baseActionsList$d,
2150
2150
  diff: diff,
2151
2151
  oldObj: oldObj,
2152
2152
  newObj: newObj,
@@ -2187,7 +2187,7 @@ function createProductDiscountsMapActions(mapActionGroup, syncActionConfig) {
2187
2187
  return function doMapActions(diff, newObj, oldObj) {
2188
2188
  var allActions = [];
2189
2189
  allActions.push(mapActionGroup('base', function () {
2190
- return actionsMapBase$c(diff, oldObj, newObj, syncActionConfig);
2190
+ return actionsMapBase$d(diff, oldObj, newObj, syncActionConfig);
2191
2191
  }));
2192
2192
  return combineValidityActions(flatten__default["default"](allActions));
2193
2193
  };
@@ -2203,7 +2203,7 @@ var productDiscounts = (function (actionGroupList) {
2203
2203
  };
2204
2204
  });
2205
2205
 
2206
- var baseActionsList$b = [{
2206
+ var baseActionsList$c = [{
2207
2207
  action: 'changeIsActive',
2208
2208
  key: 'isActive'
2209
2209
  }, {
@@ -2234,10 +2234,10 @@ var baseActionsList$b = [{
2234
2234
  action: 'changeGroups',
2235
2235
  key: 'groups'
2236
2236
  }];
2237
- function actionsMapBase$b(diff, oldObj, newObj) {
2237
+ function actionsMapBase$c(diff, oldObj, newObj) {
2238
2238
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2239
2239
  return buildBaseAttributesActions({
2240
- actions: baseActionsList$b,
2240
+ actions: baseActionsList$c,
2241
2241
  diff: diff,
2242
2242
  oldObj: oldObj,
2243
2243
  newObj: newObj,
@@ -2249,7 +2249,7 @@ function createDiscountCodesMapActions(mapActionGroup, syncActionConfig) {
2249
2249
  return function doMapActions(diff, newObj, oldObj) {
2250
2250
  var allActions = [];
2251
2251
  allActions.push(mapActionGroup('base', function () {
2252
- return actionsMapBase$b(diff, oldObj, newObj, syncActionConfig);
2252
+ return actionsMapBase$c(diff, oldObj, newObj, syncActionConfig);
2253
2253
  }));
2254
2254
  allActions.push(mapActionGroup('custom', function () {
2255
2255
  return actionsMapCustom(diff, newObj, oldObj);
@@ -2277,17 +2277,17 @@ var discountCodes = (function (actionGroupList) {
2277
2277
  };
2278
2278
  });
2279
2279
 
2280
- var baseActionsList$a = [{
2280
+ var baseActionsList$b = [{
2281
2281
  action: 'changeName',
2282
2282
  key: 'name'
2283
2283
  }, {
2284
2284
  action: 'setKey',
2285
2285
  key: 'key'
2286
2286
  }];
2287
- function actionsMapBase$a(diff, oldObj, newObj) {
2287
+ function actionsMapBase$b(diff, oldObj, newObj) {
2288
2288
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2289
2289
  return buildBaseAttributesActions({
2290
- actions: baseActionsList$a,
2290
+ actions: baseActionsList$b,
2291
2291
  diff: diff,
2292
2292
  oldObj: oldObj,
2293
2293
  newObj: newObj,
@@ -2299,7 +2299,7 @@ function createCustomerGroupMapActions(mapActionGroup, syncActionConfig) {
2299
2299
  return function doMapActions(diff, newObj, oldObj) {
2300
2300
  var allActions = [];
2301
2301
  allActions.push(mapActionGroup('base', function () {
2302
- return actionsMapBase$a(diff, oldObj, newObj, syncActionConfig);
2302
+ return actionsMapBase$b(diff, oldObj, newObj, syncActionConfig);
2303
2303
  }));
2304
2304
  allActions.push(mapActionGroup('custom', function () {
2305
2305
  return actionsMapCustom(diff, newObj, oldObj);
@@ -2318,7 +2318,7 @@ var customerGroup = (function (actionGroupList) {
2318
2318
  };
2319
2319
  });
2320
2320
 
2321
- var baseActionsList$9 = [{
2321
+ var baseActionsList$a = [{
2322
2322
  action: 'changeIsActive',
2323
2323
  key: 'isActive'
2324
2324
  }, {
@@ -2355,10 +2355,10 @@ var baseActionsList$9 = [{
2355
2355
  action: 'setKey',
2356
2356
  key: 'key'
2357
2357
  }];
2358
- function actionsMapBase$9(diff, oldObj, newObj) {
2358
+ function actionsMapBase$a(diff, oldObj, newObj) {
2359
2359
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2360
2360
  return buildBaseAttributesActions({
2361
- actions: baseActionsList$9,
2361
+ actions: baseActionsList$a,
2362
2362
  diff: diff,
2363
2363
  oldObj: oldObj,
2364
2364
  newObj: newObj,
@@ -2370,7 +2370,7 @@ function createCartDiscountsMapActions(mapActionGroup, syncActionConfig) {
2370
2370
  return function doMapActions(diff, newObj, oldObj) {
2371
2371
  var allActions = [];
2372
2372
  allActions.push(mapActionGroup('base', function () {
2373
- return actionsMapBase$9(diff, oldObj, newObj, syncActionConfig);
2373
+ return actionsMapBase$a(diff, oldObj, newObj, syncActionConfig);
2374
2374
  }));
2375
2375
  allActions.push(mapActionGroup('custom', function () {
2376
2376
  return actionsMapCustom(diff, newObj, oldObj);
@@ -2389,7 +2389,7 @@ var cartDiscounts = (function (actionGroupList) {
2389
2389
  };
2390
2390
  });
2391
2391
 
2392
- var baseActionsList$8 = [{
2392
+ var baseActionsList$9 = [{
2393
2393
  action: 'changeName',
2394
2394
  key: 'name'
2395
2395
  }, {
@@ -2399,10 +2399,10 @@ var baseActionsList$8 = [{
2399
2399
  action: 'setDescription',
2400
2400
  key: 'description'
2401
2401
  }];
2402
- function actionsMapBase$8(diff, oldObj, newObj) {
2402
+ function actionsMapBase$9(diff, oldObj, newObj) {
2403
2403
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2404
2404
  return buildBaseAttributesActions({
2405
- actions: baseActionsList$8,
2405
+ actions: baseActionsList$9,
2406
2406
  diff: diff,
2407
2407
  oldObj: oldObj,
2408
2408
  newObj: newObj,
@@ -2436,7 +2436,7 @@ function createTaxCategoriesMapActions(mapActionGroup, syncActionConfig) {
2436
2436
  return function doMapActions(diff, newObj, oldObj) {
2437
2437
  var allActions = [];
2438
2438
  allActions.push(mapActionGroup('base', function () {
2439
- return actionsMapBase$8(diff, oldObj, newObj, syncActionConfig);
2439
+ return actionsMapBase$9(diff, oldObj, newObj, syncActionConfig);
2440
2440
  }));
2441
2441
  allActions.push(mapActionGroup('rates', function () {
2442
2442
  return actionsMapRates(diff, oldObj, newObj);
@@ -2463,7 +2463,7 @@ var taxCategories = (function (actionGroupList, syncActionConfig) {
2463
2463
  };
2464
2464
  });
2465
2465
 
2466
- var baseActionsList$7 = [{
2466
+ var baseActionsList$8 = [{
2467
2467
  action: 'changeName',
2468
2468
  key: 'name'
2469
2469
  }, {
@@ -2480,10 +2480,10 @@ var hasLocation = function hasLocation(locations, otherLocation) {
2480
2480
  });
2481
2481
  };
2482
2482
 
2483
- function actionsMapBase$7(diff, oldObj, newObj) {
2483
+ function actionsMapBase$8(diff, oldObj, newObj) {
2484
2484
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2485
2485
  return buildBaseAttributesActions({
2486
- actions: baseActionsList$7,
2486
+ actions: baseActionsList$8,
2487
2487
  diff: diff,
2488
2488
  oldObj: oldObj,
2489
2489
  newObj: newObj,
@@ -2528,7 +2528,7 @@ function createZonesMapActions(mapActionGroup, syncActionConfig) {
2528
2528
  return function doMapActions(diff, newObj, oldObj) {
2529
2529
  var allActions = [];
2530
2530
  allActions.push(mapActionGroup('base', function () {
2531
- return actionsMapBase$7(diff, oldObj, newObj, syncActionConfig);
2531
+ return actionsMapBase$8(diff, oldObj, newObj, syncActionConfig);
2532
2532
  }));
2533
2533
  allActions.push(flatten__default["default"](mapActionGroup('locations', function () {
2534
2534
  return actionsMapLocations(diff, oldObj, newObj);
@@ -2555,7 +2555,7 @@ var zones = (function (actionGroupList, syncActionConfig) {
2555
2555
  };
2556
2556
  });
2557
2557
 
2558
- var baseActionsList$6 = [{
2558
+ var baseActionsList$7 = [{
2559
2559
  action: 'setKey',
2560
2560
  key: 'key'
2561
2561
  }, {
@@ -2577,10 +2577,10 @@ var baseActionsList$6 = [{
2577
2577
  action: 'changeTaxCategory',
2578
2578
  key: 'taxCategory'
2579
2579
  }];
2580
- function actionsMapBase$6(diff, oldObj, newObj) {
2580
+ function actionsMapBase$7(diff, oldObj, newObj) {
2581
2581
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2582
2582
  return buildBaseAttributesActions({
2583
- actions: baseActionsList$6,
2583
+ actions: baseActionsList$7,
2584
2584
  diff: diff,
2585
2585
  oldObj: oldObj,
2586
2586
  newObj: newObj,
@@ -2662,7 +2662,7 @@ function createShippingMethodsMapActions(mapActionGroup, syncActionConfig) {
2662
2662
  return function doMapActions(diff, newObj, oldObj) {
2663
2663
  var allActions = [];
2664
2664
  allActions.push(mapActionGroup('base', function () {
2665
- return actionsMapBase$6(diff, oldObj, newObj, syncActionConfig);
2665
+ return actionsMapBase$7(diff, oldObj, newObj, syncActionConfig);
2666
2666
  }));
2667
2667
  allActions.push(flatten__default["default"](mapActionGroup('zoneRates', function () {
2668
2668
  return actionsMapZoneRates(diff, oldObj, newObj);
@@ -3173,7 +3173,7 @@ createComparator(function () {
3173
3173
  createComparator(createCircularEqualCreator());
3174
3174
  createComparator(createCircularEqualCreator(sameValueZeroEqual));
3175
3175
 
3176
- var baseActionsList$5 = [{
3176
+ var baseActionsList$6 = [{
3177
3177
  action: 'changeName',
3178
3178
  key: 'name'
3179
3179
  }, {
@@ -3183,7 +3183,7 @@ var baseActionsList$5 = [{
3183
3183
  action: 'changeDescription',
3184
3184
  key: 'description'
3185
3185
  }];
3186
- function actionsMapBase$5(diff, previous, next) {
3186
+ function actionsMapBase$6(diff, previous, next) {
3187
3187
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3188
3188
  // when `diff` is undefined, then the underlying `buildActions` has returned any diff
3189
3189
  // which given in product-types would mean that `buildActions` has run with `nestedValuesChanges` applied
@@ -3191,7 +3191,7 @@ function actionsMapBase$5(diff, previous, next) {
3191
3191
  if (!diff) return [];
3192
3192
  return buildBaseAttributesActions({
3193
3193
  diff: diff,
3194
- actions: baseActionsList$5,
3194
+ actions: baseActionsList$6,
3195
3195
  oldObj: previous,
3196
3196
  newObj: next,
3197
3197
  shouldOmitEmptyString: config.shouldOmitEmptyString
@@ -3417,7 +3417,7 @@ function createProductTypeMapActions(mapActionGroup, syncActionConfig) {
3417
3417
  return flatten__default["default"]([// we support only base fields for the product type,
3418
3418
  // for attributes, applying hints would be recommended
3419
3419
  mapActionGroup('base', function () {
3420
- return actionsMapBase$5(diff, previous, next, syncActionConfig);
3420
+ return actionsMapBase$6(diff, previous, next, syncActionConfig);
3421
3421
  }), actionsMapForHints(options.nestedValuesChanges, previous, next)]);
3422
3422
  };
3423
3423
  }
@@ -3434,7 +3434,7 @@ var productTypes = (function (actionGroupList, syncActionConfig) {
3434
3434
  };
3435
3435
  });
3436
3436
 
3437
- var baseActionsList$4 = [{
3437
+ var baseActionsList$5 = [{
3438
3438
  action: 'changeKey',
3439
3439
  key: 'key'
3440
3440
  }, {
@@ -3453,10 +3453,10 @@ var baseActionsList$4 = [{
3453
3453
  action: 'setTransitions',
3454
3454
  key: 'transitions'
3455
3455
  }];
3456
- function actionsMapBase$4(diff, oldObj, newObj) {
3456
+ function actionsMapBase$5(diff, oldObj, newObj) {
3457
3457
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3458
3458
  return buildBaseAttributesActions({
3459
- actions: baseActionsList$4,
3459
+ actions: baseActionsList$5,
3460
3460
  diff: diff,
3461
3461
  oldObj: oldObj,
3462
3462
  newObj: newObj,
@@ -3506,7 +3506,7 @@ function createStatesMapActions(mapActionGroup, syncActionConfig) {
3506
3506
  var baseActions = [];
3507
3507
  var roleActions = [];
3508
3508
  baseActions.push(mapActionGroup('base', function () {
3509
- return actionsMapBase$4(diff, oldObj, newObj, syncActionConfig);
3509
+ return actionsMapBase$5(diff, oldObj, newObj, syncActionConfig);
3510
3510
  }));
3511
3511
  roleActions.push(mapActionGroup('roles', function () {
3512
3512
  return actionsMapRoles(diff, oldObj, newObj);
@@ -3524,7 +3524,7 @@ var states = (function (actionGroupList, syncActionConfig) {
3524
3524
  };
3525
3525
  });
3526
3526
 
3527
- var baseActionsList$3 = [{
3527
+ var baseActionsList$4 = [{
3528
3528
  action: 'changeKey',
3529
3529
  key: 'key'
3530
3530
  }, {
@@ -3543,10 +3543,10 @@ var baseActionsList$3 = [{
3543
3543
  action: 'setRoles',
3544
3544
  key: 'roles'
3545
3545
  }];
3546
- function actionsMapBase$3(diff, oldObj, newObj) {
3546
+ function actionsMapBase$4(diff, oldObj, newObj) {
3547
3547
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3548
3548
  return buildBaseAttributesActions({
3549
- actions: baseActionsList$3,
3549
+ actions: baseActionsList$4,
3550
3550
  diff: diff,
3551
3551
  oldObj: oldObj,
3552
3552
  newObj: newObj,
@@ -3558,7 +3558,7 @@ function createChannelsMapActions$1(mapActionGroup, syncActionConfig) {
3558
3558
  return function doMapActions(diff, newObj, oldObj) {
3559
3559
  var allActions = [];
3560
3560
  allActions.push(mapActionGroup('base', function () {
3561
- return actionsMapBase$3(diff, oldObj, newObj, syncActionConfig);
3561
+ return actionsMapBase$4(diff, oldObj, newObj, syncActionConfig);
3562
3562
  }));
3563
3563
  allActions.push(mapActionGroup('custom', function () {
3564
3564
  return actionsMapCustom(diff, newObj, oldObj);
@@ -3588,7 +3588,7 @@ var getIsRemovedOperation = function getIsRemovedOperation(key) {
3588
3588
  return REGEX_UNDERSCORE_NUMBER.test(key);
3589
3589
  };
3590
3590
 
3591
- var baseActionsList$2 = [{
3591
+ var baseActionsList$3 = [{
3592
3592
  action: 'changeKey',
3593
3593
  key: 'key'
3594
3594
  }, {
@@ -3598,10 +3598,10 @@ var baseActionsList$2 = [{
3598
3598
  action: 'setDescription',
3599
3599
  key: 'description'
3600
3600
  }];
3601
- function actionsMapBase$2(diff, oldObj, newObj) {
3601
+ function actionsMapBase$3(diff, oldObj, newObj) {
3602
3602
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3603
3603
  return buildBaseAttributesActions({
3604
- actions: baseActionsList$2,
3604
+ actions: baseActionsList$3,
3605
3605
  diff: diff,
3606
3606
  oldObj: oldObj,
3607
3607
  newObj: newObj,
@@ -3718,7 +3718,7 @@ function createTypeMapActions(mapActionGroup, syncActionConfig) {
3718
3718
  return function doMapActions(diff, next, previous) {
3719
3719
  var allActions = [];
3720
3720
  allActions.push(mapActionGroup('base', function () {
3721
- return actionsMapBase$2(diff, previous, next, syncActionConfig);
3721
+ return actionsMapBase$3(diff, previous, next, syncActionConfig);
3722
3722
  }), mapActionGroup('fieldDefinitions', function () {
3723
3723
  return actionsMapFieldDefinitions(diff.fieldDefinitions, previous.fieldDefinitions, next.fieldDefinitions, findMatchingPairs(diff.fieldDefinitions, previous.fieldDefinitions, next.fieldDefinitions, 'name'));
3724
3724
  }));
@@ -3735,7 +3735,7 @@ var types = (function (actionGroupList, syncActionConfig) {
3735
3735
  };
3736
3736
  });
3737
3737
 
3738
- var baseActionsList$1 = [{
3738
+ var baseActionsList$2 = [{
3739
3739
  action: 'changeName',
3740
3740
  key: 'name'
3741
3741
  }, {
@@ -3754,10 +3754,10 @@ var baseActionsList$1 = [{
3754
3754
  action: 'setShippingRateInputType',
3755
3755
  key: 'shippingRateInputType'
3756
3756
  }];
3757
- function actionsMapBase$1(diff, oldObj, newObj) {
3757
+ function actionsMapBase$2(diff, oldObj, newObj) {
3758
3758
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3759
3759
  return buildBaseAttributesActions({
3760
- actions: baseActionsList$1,
3760
+ actions: baseActionsList$2,
3761
3761
  diff: diff,
3762
3762
  oldObj: oldObj,
3763
3763
  newObj: newObj,
@@ -3769,7 +3769,7 @@ function createChannelsMapActions(mapActionGroup, syncActionConfig) {
3769
3769
  return function doMapActions(diff, newObj, oldObj) {
3770
3770
  var allActions = [];
3771
3771
  allActions.push(mapActionGroup('base', function () {
3772
- return actionsMapBase$1(diff, oldObj, newObj, syncActionConfig);
3772
+ return actionsMapBase$2(diff, oldObj, newObj, syncActionConfig);
3773
3773
  }));
3774
3774
  return flatten__default["default"](allActions);
3775
3775
  };
@@ -3785,7 +3785,7 @@ var projects = (function (actionGroupList) {
3785
3785
  };
3786
3786
  });
3787
3787
 
3788
- var baseActionsList = [{
3788
+ var baseActionsList$1 = [{
3789
3789
  action: 'setName',
3790
3790
  key: 'name'
3791
3791
  }, {
@@ -3798,9 +3798,9 @@ var baseActionsList = [{
3798
3798
  action: 'setSupplyChannels',
3799
3799
  key: 'supplyChannels'
3800
3800
  }];
3801
- function actionsMapBase(diff, oldObj, newObj) {
3801
+ function actionsMapBase$1(diff, oldObj, newObj) {
3802
3802
  return buildBaseAttributesActions({
3803
- actions: baseActionsList,
3803
+ actions: baseActionsList$1,
3804
3804
  diff: diff,
3805
3805
  oldObj: oldObj,
3806
3806
  newObj: newObj
@@ -3811,7 +3811,7 @@ function createStoresMapActions(mapActionGroup) {
3811
3811
  return function doMapActions(diff, next, previous) {
3812
3812
  var allActions = [];
3813
3813
  allActions.push(mapActionGroup('base', function () {
3814
- return actionsMapBase(diff, previous, next);
3814
+ return actionsMapBase$1(diff, previous, next);
3815
3815
  }));
3816
3816
  allActions.push(mapActionGroup('custom', function () {
3817
3817
  return actionsMapCustom(diff, next, previous);
@@ -3830,6 +3830,45 @@ var stores = (function (actionGroupList) {
3830
3830
  };
3831
3831
  });
3832
3832
 
3833
+ var baseActionsList = [{
3834
+ action: 'changeName',
3835
+ key: 'name'
3836
+ }, {
3837
+ action: 'setKey',
3838
+ key: 'key'
3839
+ }];
3840
+ function actionsMapBase(diff, oldObj, newObj) {
3841
+ return buildBaseAttributesActions({
3842
+ actions: baseActionsList,
3843
+ diff: diff,
3844
+ oldObj: oldObj,
3845
+ newObj: newObj
3846
+ });
3847
+ }
3848
+
3849
+ function createProductSelectionsMapActions(mapActionGroup) {
3850
+ return function doMapActions(diff, next, previous) {
3851
+ var allActions = [];
3852
+ allActions.push(mapActionGroup('base', function () {
3853
+ return actionsMapBase(diff, previous, next);
3854
+ }));
3855
+ allActions.push(mapActionGroup('custom', function () {
3856
+ return actionsMapCustom(diff, next, previous);
3857
+ }));
3858
+ return flatten__default["default"](allActions);
3859
+ };
3860
+ }
3861
+
3862
+ var productSelections = (function (actionGroupList) {
3863
+ var mapActionGroup = createMapActionGroup(actionGroupList);
3864
+ var doMapActions = createProductSelectionsMapActions(mapActionGroup);
3865
+ var onBeforeApplyingDiff = null;
3866
+ var buildActions = createBuildActions(diff, doMapActions, onBeforeApplyingDiff);
3867
+ return {
3868
+ buildActions: buildActions
3869
+ };
3870
+ });
3871
+
3833
3872
  exports.createSyncCartDiscounts = cartDiscounts;
3834
3873
  exports.createSyncCategories = categories;
3835
3874
  exports.createSyncChannels = channels;
@@ -3839,6 +3878,7 @@ exports.createSyncDiscountCodes = discountCodes;
3839
3878
  exports.createSyncInventories = inventories;
3840
3879
  exports.createSyncOrders = orders;
3841
3880
  exports.createSyncProductDiscounts = productDiscounts;
3881
+ exports.createSyncProductSelections = productSelections;
3842
3882
  exports.createSyncProductTypes = productTypes;
3843
3883
  exports.createSyncProducts = products;
3844
3884
  exports.createSyncProjects = projects;