@commercetools/sync-actions 5.0.0 → 5.1.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.
@@ -677,7 +677,7 @@
677
677
  });
678
678
  }
679
679
 
680
- var baseActionsList$i = [{
680
+ var baseActionsList$j = [{
681
681
  action: 'changeName',
682
682
  key: 'name'
683
683
  }, {
@@ -714,10 +714,10 @@
714
714
  * SYNC FUNCTIONS
715
715
  */
716
716
 
717
- function actionsMapBase$i(diff, oldObj, newObj) {
717
+ function actionsMapBase$j(diff, oldObj, newObj) {
718
718
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
719
719
  return buildBaseAttributesActions({
720
- actions: baseActionsList$i,
720
+ actions: baseActionsList$j,
721
721
  diff: diff,
722
722
  oldObj: oldObj,
723
723
  newObj: newObj,
@@ -821,7 +821,7 @@
821
821
  return function doMapActions(diff, newObj, oldObj) {
822
822
  var allActions = [];
823
823
  allActions.push(mapActionGroup('base', function () {
824
- return actionsMapBase$i(diff, oldObj, newObj, syncActionConfig);
824
+ return actionsMapBase$j(diff, oldObj, newObj, syncActionConfig);
825
825
  }));
826
826
  allActions.push(mapActionGroup('references', function () {
827
827
  return actionsMapReferences$3(diff, oldObj, newObj);
@@ -857,7 +857,7 @@
857
857
  };
858
858
  });
859
859
 
860
- var baseActionsList$h = [{
860
+ var baseActionsList$i = [{
861
861
  action: 'setSalutation',
862
862
  key: 'salutation'
863
863
  }, {
@@ -917,10 +917,10 @@
917
917
  * SYNC FUNCTIONS
918
918
  */
919
919
 
920
- function actionsMapBase$h(diff, oldObj, newObj) {
920
+ function actionsMapBase$i(diff, oldObj, newObj) {
921
921
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
922
922
  return buildBaseAttributesActions({
923
- actions: baseActionsList$h,
923
+ actions: baseActionsList$i,
924
924
  diff: diff,
925
925
  oldObj: oldObj,
926
926
  newObj: newObj,
@@ -1004,7 +1004,7 @@
1004
1004
  return function doMapActions(diff, newObj, oldObj) {
1005
1005
  var allActions = [];
1006
1006
  allActions.push(mapActionGroup('base', function () {
1007
- return actionsMapBase$h(diff, oldObj, newObj, syncActionConfig);
1007
+ return actionsMapBase$i(diff, oldObj, newObj, syncActionConfig);
1008
1008
  }));
1009
1009
  allActions.push(mapActionGroup('references', function () {
1010
1010
  return actionsMapReferences$2(diff, oldObj, newObj);
@@ -1046,7 +1046,7 @@
1046
1046
  };
1047
1047
  });
1048
1048
 
1049
- var baseActionsList$g = [{
1049
+ var baseActionsList$h = [{
1050
1050
  action: 'changeQuantity',
1051
1051
  key: 'quantityOnStock',
1052
1052
  actionKey: 'quantity'
@@ -1065,10 +1065,10 @@
1065
1065
  * SYNC FUNCTIONS
1066
1066
  */
1067
1067
 
1068
- function actionsMapBase$g(diff, oldObj, newObj) {
1068
+ function actionsMapBase$h(diff, oldObj, newObj) {
1069
1069
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1070
1070
  return buildBaseAttributesActions({
1071
- actions: baseActionsList$g,
1071
+ actions: baseActionsList$h,
1072
1072
  diff: diff,
1073
1073
  oldObj: oldObj,
1074
1074
  newObj: newObj,
@@ -1088,7 +1088,7 @@
1088
1088
  return function doMapActions(diff, newObj, oldObj) {
1089
1089
  var allActions = [];
1090
1090
  allActions.push(mapActionGroup('base', function () {
1091
- return actionsMapBase$g(diff, oldObj, newObj, syncActionConfig);
1091
+ return actionsMapBase$h(diff, oldObj, newObj, syncActionConfig);
1092
1092
  }));
1093
1093
  allActions.push(mapActionGroup('references', function () {
1094
1094
  return actionsMapReferences$1(diff, oldObj, newObj);
@@ -1183,7 +1183,7 @@
1183
1183
 
1184
1184
  var REGEX_NUMBER$2 = new RegExp(/^\d+$/);
1185
1185
  var REGEX_UNDERSCORE_NUMBER$2 = new RegExp(/^_\d+$/);
1186
- var baseActionsList$f = [{
1186
+ var baseActionsList$g = [{
1187
1187
  action: 'changeName',
1188
1188
  key: 'name'
1189
1189
  }, {
@@ -1590,10 +1590,10 @@
1590
1590
  */
1591
1591
 
1592
1592
 
1593
- function actionsMapBase$f(diff, oldObj, newObj) {
1593
+ function actionsMapBase$g(diff, oldObj, newObj) {
1594
1594
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1595
1595
  return buildBaseAttributesActions({
1596
- actions: baseActionsList$f,
1596
+ actions: baseActionsList$g,
1597
1597
  diff: diff,
1598
1598
  oldObj: oldObj,
1599
1599
  newObj: newObj,
@@ -1834,7 +1834,7 @@
1834
1834
  return actionsMapRemoveVariants(diff, oldObj, newObj);
1835
1835
  }));
1836
1836
  allActions.push(mapActionGroup('base', function () {
1837
- return actionsMapBase$f(diff, oldObj, newObj, syncActionConfig);
1837
+ return actionsMapBase$g(diff, oldObj, newObj, syncActionConfig);
1838
1838
  }));
1839
1839
  allActions.push(mapActionGroup('meta', function () {
1840
1840
  return actionsMapMeta(diff, oldObj, newObj);
@@ -1909,7 +1909,7 @@
1909
1909
  return REGEX_UNDERSCORE_NUMBER$1.test(key) && Number(resource[2]) === 0;
1910
1910
  };
1911
1911
 
1912
- var baseActionsList$e = [{
1912
+ var baseActionsList$f = [{
1913
1913
  action: 'changeOrderState',
1914
1914
  key: 'orderState'
1915
1915
  }, {
@@ -1923,10 +1923,10 @@
1923
1923
  * SYNC FUNCTIONS
1924
1924
  */
1925
1925
 
1926
- function actionsMapBase$e(diff, oldObj, newObj) {
1926
+ function actionsMapBase$f(diff, oldObj, newObj) {
1927
1927
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1928
1928
  return buildBaseAttributesActions({
1929
- actions: baseActionsList$e,
1929
+ actions: baseActionsList$f,
1930
1930
  diff: diff,
1931
1931
  oldObj: oldObj,
1932
1932
  newObj: newObj,
@@ -2059,7 +2059,7 @@
2059
2059
  }
2060
2060
 
2061
2061
  allActions.push(mapActionGroup('base', function () {
2062
- return actionsMapBase$e(diff, oldObj, newObj, syncActionConfig);
2062
+ return actionsMapBase$f(diff, oldObj, newObj, syncActionConfig);
2063
2063
  }));
2064
2064
  allActions.push(mapActionGroup('deliveries', function () {
2065
2065
  return actionsMapDeliveries(diff, oldObj, newObj);
@@ -2095,7 +2095,7 @@
2095
2095
  };
2096
2096
  });
2097
2097
 
2098
- var baseActionsList$d = [{
2098
+ var baseActionsList$e = [{
2099
2099
  action: 'changeIsActive',
2100
2100
  key: 'isActive'
2101
2101
  }, {
@@ -2123,10 +2123,10 @@
2123
2123
  action: 'setKey',
2124
2124
  key: 'key'
2125
2125
  }];
2126
- function actionsMapBase$d(diff, oldObj, newObj) {
2126
+ function actionsMapBase$e(diff, oldObj, newObj) {
2127
2127
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2128
2128
  return buildBaseAttributesActions({
2129
- actions: baseActionsList$d,
2129
+ actions: baseActionsList$e,
2130
2130
  diff: diff,
2131
2131
  oldObj: oldObj,
2132
2132
  newObj: newObj,
@@ -2167,7 +2167,7 @@
2167
2167
  return function doMapActions(diff, newObj, oldObj) {
2168
2168
  var allActions = [];
2169
2169
  allActions.push(mapActionGroup('base', function () {
2170
- return actionsMapBase$d(diff, oldObj, newObj, syncActionConfig);
2170
+ return actionsMapBase$e(diff, oldObj, newObj, syncActionConfig);
2171
2171
  }));
2172
2172
  return combineValidityActions(flatten__default["default"](allActions));
2173
2173
  };
@@ -2183,7 +2183,7 @@
2183
2183
  };
2184
2184
  });
2185
2185
 
2186
- var baseActionsList$c = [{
2186
+ var baseActionsList$d = [{
2187
2187
  action: 'changeIsActive',
2188
2188
  key: 'isActive'
2189
2189
  }, {
@@ -2214,10 +2214,10 @@
2214
2214
  action: 'changeGroups',
2215
2215
  key: 'groups'
2216
2216
  }];
2217
- function actionsMapBase$c(diff, oldObj, newObj) {
2217
+ function actionsMapBase$d(diff, oldObj, newObj) {
2218
2218
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2219
2219
  return buildBaseAttributesActions({
2220
- actions: baseActionsList$c,
2220
+ actions: baseActionsList$d,
2221
2221
  diff: diff,
2222
2222
  oldObj: oldObj,
2223
2223
  newObj: newObj,
@@ -2229,7 +2229,7 @@
2229
2229
  return function doMapActions(diff, newObj, oldObj) {
2230
2230
  var allActions = [];
2231
2231
  allActions.push(mapActionGroup('base', function () {
2232
- return actionsMapBase$c(diff, oldObj, newObj, syncActionConfig);
2232
+ return actionsMapBase$d(diff, oldObj, newObj, syncActionConfig);
2233
2233
  }));
2234
2234
  allActions.push(mapActionGroup('custom', function () {
2235
2235
  return actionsMapCustom(diff, newObj, oldObj);
@@ -2257,17 +2257,17 @@
2257
2257
  };
2258
2258
  });
2259
2259
 
2260
- var baseActionsList$b = [{
2260
+ var baseActionsList$c = [{
2261
2261
  action: 'changeName',
2262
2262
  key: 'name'
2263
2263
  }, {
2264
2264
  action: 'setKey',
2265
2265
  key: 'key'
2266
2266
  }];
2267
- function actionsMapBase$b(diff, oldObj, newObj) {
2267
+ function actionsMapBase$c(diff, oldObj, newObj) {
2268
2268
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2269
2269
  return buildBaseAttributesActions({
2270
- actions: baseActionsList$b,
2270
+ actions: baseActionsList$c,
2271
2271
  diff: diff,
2272
2272
  oldObj: oldObj,
2273
2273
  newObj: newObj,
@@ -2279,7 +2279,7 @@
2279
2279
  return function doMapActions(diff, newObj, oldObj) {
2280
2280
  var allActions = [];
2281
2281
  allActions.push(mapActionGroup('base', function () {
2282
- return actionsMapBase$b(diff, oldObj, newObj, syncActionConfig);
2282
+ return actionsMapBase$c(diff, oldObj, newObj, syncActionConfig);
2283
2283
  }));
2284
2284
  allActions.push(mapActionGroup('custom', function () {
2285
2285
  return actionsMapCustom(diff, newObj, oldObj);
@@ -2298,7 +2298,7 @@
2298
2298
  };
2299
2299
  });
2300
2300
 
2301
- var baseActionsList$a = [{
2301
+ var baseActionsList$b = [{
2302
2302
  action: 'changeIsActive',
2303
2303
  key: 'isActive'
2304
2304
  }, {
@@ -2335,10 +2335,10 @@
2335
2335
  action: 'setKey',
2336
2336
  key: 'key'
2337
2337
  }];
2338
- function actionsMapBase$a(diff, oldObj, newObj) {
2338
+ function actionsMapBase$b(diff, oldObj, newObj) {
2339
2339
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2340
2340
  return buildBaseAttributesActions({
2341
- actions: baseActionsList$a,
2341
+ actions: baseActionsList$b,
2342
2342
  diff: diff,
2343
2343
  oldObj: oldObj,
2344
2344
  newObj: newObj,
@@ -2350,7 +2350,7 @@
2350
2350
  return function doMapActions(diff, newObj, oldObj) {
2351
2351
  var allActions = [];
2352
2352
  allActions.push(mapActionGroup('base', function () {
2353
- return actionsMapBase$a(diff, oldObj, newObj, syncActionConfig);
2353
+ return actionsMapBase$b(diff, oldObj, newObj, syncActionConfig);
2354
2354
  }));
2355
2355
  allActions.push(mapActionGroup('custom', function () {
2356
2356
  return actionsMapCustom(diff, newObj, oldObj);
@@ -2369,7 +2369,7 @@
2369
2369
  };
2370
2370
  });
2371
2371
 
2372
- var baseActionsList$9 = [{
2372
+ var baseActionsList$a = [{
2373
2373
  action: 'changeName',
2374
2374
  key: 'name'
2375
2375
  }, {
@@ -2379,10 +2379,10 @@
2379
2379
  action: 'setDescription',
2380
2380
  key: 'description'
2381
2381
  }];
2382
- function actionsMapBase$9(diff, oldObj, newObj) {
2382
+ function actionsMapBase$a(diff, oldObj, newObj) {
2383
2383
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2384
2384
  return buildBaseAttributesActions({
2385
- actions: baseActionsList$9,
2385
+ actions: baseActionsList$a,
2386
2386
  diff: diff,
2387
2387
  oldObj: oldObj,
2388
2388
  newObj: newObj,
@@ -2416,7 +2416,7 @@
2416
2416
  return function doMapActions(diff, newObj, oldObj) {
2417
2417
  var allActions = [];
2418
2418
  allActions.push(mapActionGroup('base', function () {
2419
- return actionsMapBase$9(diff, oldObj, newObj, syncActionConfig);
2419
+ return actionsMapBase$a(diff, oldObj, newObj, syncActionConfig);
2420
2420
  }));
2421
2421
  allActions.push(mapActionGroup('rates', function () {
2422
2422
  return actionsMapRates(diff, oldObj, newObj);
@@ -2443,7 +2443,7 @@
2443
2443
  };
2444
2444
  });
2445
2445
 
2446
- var baseActionsList$8 = [{
2446
+ var baseActionsList$9 = [{
2447
2447
  action: 'changeName',
2448
2448
  key: 'name'
2449
2449
  }, {
@@ -2460,10 +2460,10 @@
2460
2460
  });
2461
2461
  };
2462
2462
 
2463
- function actionsMapBase$8(diff, oldObj, newObj) {
2463
+ function actionsMapBase$9(diff, oldObj, newObj) {
2464
2464
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2465
2465
  return buildBaseAttributesActions({
2466
- actions: baseActionsList$8,
2466
+ actions: baseActionsList$9,
2467
2467
  diff: diff,
2468
2468
  oldObj: oldObj,
2469
2469
  newObj: newObj,
@@ -2508,7 +2508,7 @@
2508
2508
  return function doMapActions(diff, newObj, oldObj) {
2509
2509
  var allActions = [];
2510
2510
  allActions.push(mapActionGroup('base', function () {
2511
- return actionsMapBase$8(diff, oldObj, newObj, syncActionConfig);
2511
+ return actionsMapBase$9(diff, oldObj, newObj, syncActionConfig);
2512
2512
  }));
2513
2513
  allActions.push(flatten__default["default"](mapActionGroup('locations', function () {
2514
2514
  return actionsMapLocations(diff, oldObj, newObj);
@@ -2535,7 +2535,7 @@
2535
2535
  };
2536
2536
  });
2537
2537
 
2538
- var baseActionsList$7 = [{
2538
+ var baseActionsList$8 = [{
2539
2539
  action: 'setKey',
2540
2540
  key: 'key'
2541
2541
  }, {
@@ -2557,10 +2557,10 @@
2557
2557
  action: 'changeTaxCategory',
2558
2558
  key: 'taxCategory'
2559
2559
  }];
2560
- function actionsMapBase$7(diff, oldObj, newObj) {
2560
+ function actionsMapBase$8(diff, oldObj, newObj) {
2561
2561
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2562
2562
  return buildBaseAttributesActions({
2563
- actions: baseActionsList$7,
2563
+ actions: baseActionsList$8,
2564
2564
  diff: diff,
2565
2565
  oldObj: oldObj,
2566
2566
  newObj: newObj,
@@ -2642,7 +2642,7 @@
2642
2642
  return function doMapActions(diff, newObj, oldObj) {
2643
2643
  var allActions = [];
2644
2644
  allActions.push(mapActionGroup('base', function () {
2645
- return actionsMapBase$7(diff, oldObj, newObj, syncActionConfig);
2645
+ return actionsMapBase$8(diff, oldObj, newObj, syncActionConfig);
2646
2646
  }));
2647
2647
  allActions.push(flatten__default["default"](mapActionGroup('zoneRates', function () {
2648
2648
  return actionsMapZoneRates(diff, oldObj, newObj);
@@ -3037,7 +3037,7 @@
3037
3037
  createComparator(createCircularEqualCreator());
3038
3038
  createComparator(createCircularEqualCreator(sameValueZeroEqual));
3039
3039
 
3040
- var baseActionsList$6 = [{
3040
+ var baseActionsList$7 = [{
3041
3041
  action: 'changeName',
3042
3042
  key: 'name'
3043
3043
  }, {
@@ -3047,7 +3047,7 @@
3047
3047
  action: 'changeDescription',
3048
3048
  key: 'description'
3049
3049
  }];
3050
- function actionsMapBase$6(diff, previous, next) {
3050
+ function actionsMapBase$7(diff, previous, next) {
3051
3051
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3052
3052
  // when `diff` is undefined, then the underlying `buildActions` has returned any diff
3053
3053
  // which given in product-types would mean that `buildActions` has run with `nestedValuesChanges` applied
@@ -3055,7 +3055,7 @@
3055
3055
  if (!diff) return [];
3056
3056
  return buildBaseAttributesActions({
3057
3057
  diff: diff,
3058
- actions: baseActionsList$6,
3058
+ actions: baseActionsList$7,
3059
3059
  oldObj: previous,
3060
3060
  newObj: next,
3061
3061
  shouldOmitEmptyString: config.shouldOmitEmptyString
@@ -3281,7 +3281,7 @@
3281
3281
  return flatten__default["default"]([// we support only base fields for the product type,
3282
3282
  // for attributes, applying hints would be recommended
3283
3283
  mapActionGroup('base', function () {
3284
- return actionsMapBase$6(diff, previous, next, syncActionConfig);
3284
+ return actionsMapBase$7(diff, previous, next, syncActionConfig);
3285
3285
  }), actionsMapForHints(options.nestedValuesChanges, previous, next)]);
3286
3286
  };
3287
3287
  }
@@ -3298,7 +3298,7 @@
3298
3298
  };
3299
3299
  });
3300
3300
 
3301
- var baseActionsList$5 = [{
3301
+ var baseActionsList$6 = [{
3302
3302
  action: 'changeKey',
3303
3303
  key: 'key'
3304
3304
  }, {
@@ -3317,10 +3317,10 @@
3317
3317
  action: 'setTransitions',
3318
3318
  key: 'transitions'
3319
3319
  }];
3320
- function actionsMapBase$5(diff, oldObj, newObj) {
3320
+ function actionsMapBase$6(diff, oldObj, newObj) {
3321
3321
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3322
3322
  return buildBaseAttributesActions({
3323
- actions: baseActionsList$5,
3323
+ actions: baseActionsList$6,
3324
3324
  diff: diff,
3325
3325
  oldObj: oldObj,
3326
3326
  newObj: newObj,
@@ -3370,7 +3370,7 @@
3370
3370
  var baseActions = [];
3371
3371
  var roleActions = [];
3372
3372
  baseActions.push(mapActionGroup('base', function () {
3373
- return actionsMapBase$5(diff, oldObj, newObj, syncActionConfig);
3373
+ return actionsMapBase$6(diff, oldObj, newObj, syncActionConfig);
3374
3374
  }));
3375
3375
  roleActions.push(mapActionGroup('roles', function () {
3376
3376
  return actionsMapRoles(diff, oldObj, newObj);
@@ -3388,7 +3388,7 @@
3388
3388
  };
3389
3389
  });
3390
3390
 
3391
- var baseActionsList$4 = [{
3391
+ var baseActionsList$5 = [{
3392
3392
  action: 'changeKey',
3393
3393
  key: 'key'
3394
3394
  }, {
@@ -3407,10 +3407,10 @@
3407
3407
  action: 'setRoles',
3408
3408
  key: 'roles'
3409
3409
  }];
3410
- function actionsMapBase$4(diff, oldObj, newObj) {
3410
+ function actionsMapBase$5(diff, oldObj, newObj) {
3411
3411
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3412
3412
  return buildBaseAttributesActions({
3413
- actions: baseActionsList$4,
3413
+ actions: baseActionsList$5,
3414
3414
  diff: diff,
3415
3415
  oldObj: oldObj,
3416
3416
  newObj: newObj,
@@ -3422,7 +3422,7 @@
3422
3422
  return function doMapActions(diff, newObj, oldObj) {
3423
3423
  var allActions = [];
3424
3424
  allActions.push(mapActionGroup('base', function () {
3425
- return actionsMapBase$4(diff, oldObj, newObj, syncActionConfig);
3425
+ return actionsMapBase$5(diff, oldObj, newObj, syncActionConfig);
3426
3426
  }));
3427
3427
  allActions.push(mapActionGroup('custom', function () {
3428
3428
  return actionsMapCustom(diff, newObj, oldObj);
@@ -3452,7 +3452,7 @@
3452
3452
  return REGEX_UNDERSCORE_NUMBER.test(key);
3453
3453
  };
3454
3454
 
3455
- var baseActionsList$3 = [{
3455
+ var baseActionsList$4 = [{
3456
3456
  action: 'changeKey',
3457
3457
  key: 'key'
3458
3458
  }, {
@@ -3462,10 +3462,10 @@
3462
3462
  action: 'setDescription',
3463
3463
  key: 'description'
3464
3464
  }];
3465
- function actionsMapBase$3(diff, oldObj, newObj) {
3465
+ function actionsMapBase$4(diff, oldObj, newObj) {
3466
3466
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3467
3467
  return buildBaseAttributesActions({
3468
- actions: baseActionsList$3,
3468
+ actions: baseActionsList$4,
3469
3469
  diff: diff,
3470
3470
  oldObj: oldObj,
3471
3471
  newObj: newObj,
@@ -3582,7 +3582,7 @@
3582
3582
  return function doMapActions(diff, next, previous) {
3583
3583
  var allActions = [];
3584
3584
  allActions.push(mapActionGroup('base', function () {
3585
- return actionsMapBase$3(diff, previous, next, syncActionConfig);
3585
+ return actionsMapBase$4(diff, previous, next, syncActionConfig);
3586
3586
  }), mapActionGroup('fieldDefinitions', function () {
3587
3587
  return actionsMapFieldDefinitions(diff.fieldDefinitions, previous.fieldDefinitions, next.fieldDefinitions, findMatchingPairs(diff.fieldDefinitions, previous.fieldDefinitions, next.fieldDefinitions, 'name'));
3588
3588
  }));
@@ -3599,7 +3599,7 @@
3599
3599
  };
3600
3600
  });
3601
3601
 
3602
- var baseActionsList$2 = [{
3602
+ var baseActionsList$3 = [{
3603
3603
  action: 'changeName',
3604
3604
  key: 'name'
3605
3605
  }, {
@@ -3618,10 +3618,10 @@
3618
3618
  action: 'setShippingRateInputType',
3619
3619
  key: 'shippingRateInputType'
3620
3620
  }];
3621
- function actionsMapBase$2(diff, oldObj, newObj) {
3621
+ function actionsMapBase$3(diff, oldObj, newObj) {
3622
3622
  var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3623
3623
  return buildBaseAttributesActions({
3624
- actions: baseActionsList$2,
3624
+ actions: baseActionsList$3,
3625
3625
  diff: diff,
3626
3626
  oldObj: oldObj,
3627
3627
  newObj: newObj,
@@ -3633,7 +3633,7 @@
3633
3633
  return function doMapActions(diff, newObj, oldObj) {
3634
3634
  var allActions = [];
3635
3635
  allActions.push(mapActionGroup('base', function () {
3636
- return actionsMapBase$2(diff, oldObj, newObj, syncActionConfig);
3636
+ return actionsMapBase$3(diff, oldObj, newObj, syncActionConfig);
3637
3637
  }));
3638
3638
  return flatten__default["default"](allActions);
3639
3639
  };
@@ -3649,7 +3649,7 @@
3649
3649
  };
3650
3650
  });
3651
3651
 
3652
- var baseActionsList$1 = [{
3652
+ var baseActionsList$2 = [{
3653
3653
  action: 'setName',
3654
3654
  key: 'name'
3655
3655
  }, {
@@ -3662,9 +3662,9 @@
3662
3662
  action: 'setSupplyChannels',
3663
3663
  key: 'supplyChannels'
3664
3664
  }];
3665
- function actionsMapBase$1(diff, oldObj, newObj) {
3665
+ function actionsMapBase$2(diff, oldObj, newObj) {
3666
3666
  return buildBaseAttributesActions({
3667
- actions: baseActionsList$1,
3667
+ actions: baseActionsList$2,
3668
3668
  diff: diff,
3669
3669
  oldObj: oldObj,
3670
3670
  newObj: newObj
@@ -3675,7 +3675,7 @@
3675
3675
  return function doMapActions(diff, next, previous) {
3676
3676
  var allActions = [];
3677
3677
  allActions.push(mapActionGroup('base', function () {
3678
- return actionsMapBase$1(diff, previous, next);
3678
+ return actionsMapBase$2(diff, previous, next);
3679
3679
  }));
3680
3680
  allActions.push(mapActionGroup('custom', function () {
3681
3681
  return actionsMapCustom(diff, next, previous);
@@ -3694,16 +3694,16 @@
3694
3694
  };
3695
3695
  });
3696
3696
 
3697
- var baseActionsList = [{
3697
+ var baseActionsList$1 = [{
3698
3698
  action: 'changeName',
3699
3699
  key: 'name'
3700
3700
  }, {
3701
3701
  action: 'setKey',
3702
3702
  key: 'key'
3703
3703
  }];
3704
- function actionsMapBase(diff, oldObj, newObj) {
3704
+ function actionsMapBase$1(diff, oldObj, newObj) {
3705
3705
  return buildBaseAttributesActions({
3706
- actions: baseActionsList,
3706
+ actions: baseActionsList$1,
3707
3707
  diff: diff,
3708
3708
  oldObj: oldObj,
3709
3709
  newObj: newObj
@@ -3714,7 +3714,7 @@
3714
3714
  return function doMapActions(diff, next, previous) {
3715
3715
  var allActions = [];
3716
3716
  allActions.push(mapActionGroup('base', function () {
3717
- return actionsMapBase(diff, previous, next);
3717
+ return actionsMapBase$1(diff, previous, next);
3718
3718
  }));
3719
3719
  allActions.push(mapActionGroup('custom', function () {
3720
3720
  return actionsMapCustom(diff, next, previous);
@@ -3733,6 +3733,47 @@
3733
3733
  };
3734
3734
  });
3735
3735
 
3736
+ /* eslint-disable max-len */
3737
+ var baseActionsList = [{
3738
+ action: 'changeValue',
3739
+ key: 'value'
3740
+ }, {
3741
+ action: 'setDiscountedPrice',
3742
+ key: 'discounted'
3743
+ }];
3744
+ function actionsMapBase(diff, oldObj, newObj) {
3745
+ var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
3746
+ return buildBaseAttributesActions({
3747
+ actions: baseActionsList,
3748
+ diff: diff,
3749
+ oldObj: oldObj,
3750
+ newObj: newObj,
3751
+ shouldOmitEmptyString: config.shouldOmitEmptyString
3752
+ });
3753
+ }
3754
+
3755
+ function createPriceMapActions(mapActionGroup, syncActionConfig) {
3756
+ return function doMapActions(diff, newObj, oldObj) {
3757
+ var allActions = [];
3758
+ allActions.push(mapActionGroup('base', function () {
3759
+ return actionsMapBase(diff, oldObj, newObj, syncActionConfig);
3760
+ }));
3761
+ allActions.push(mapActionGroup('custom', function () {
3762
+ return actionsMapCustom(diff, newObj, oldObj);
3763
+ }));
3764
+ return flatten__default["default"](allActions);
3765
+ };
3766
+ }
3767
+
3768
+ var prices = (function (actionGroupList, syncActionConfig) {
3769
+ var mapActionGroup = createMapActionGroup(actionGroupList);
3770
+ var doMapActions = createPriceMapActions(mapActionGroup, syncActionConfig);
3771
+ var buildActions = createBuildActions(diff, doMapActions);
3772
+ return {
3773
+ buildActions: buildActions
3774
+ };
3775
+ });
3776
+
3736
3777
  exports.createSyncCartDiscounts = cartDiscounts;
3737
3778
  exports.createSyncCategories = categories;
3738
3779
  exports.createSyncChannels = channels;
@@ -3747,6 +3788,7 @@
3747
3788
  exports.createSyncProducts = products;
3748
3789
  exports.createSyncProjects = projects;
3749
3790
  exports.createSyncShippingMethods = shippingMethods;
3791
+ exports.createSyncStandalonePrices = prices;
3750
3792
  exports.createSyncStates = states;
3751
3793
  exports.createSyncStores = stores;
3752
3794
  exports.createSyncTaxCategories = taxCategories;