@@ -4,7 +4,21 @@ import type {
44 SyncActionConfig ,
55 UpdateAction ,
66} from '@commercetools/sdk-client-v2'
7- import * as productActions from './product-actions'
7+ import {
8+ actionsMapAddVariants ,
9+ actionsMapAssets ,
10+ actionsMapAttributes ,
11+ actionsMapBase ,
12+ actionsMapCategories ,
13+ actionsMapCategoryOrderHints ,
14+ actionsMapImages ,
15+ actionsMapMasterVariant ,
16+ actionsMapMeta ,
17+ actionsMapPrices ,
18+ actionsMapPricesCustom ,
19+ actionsMapReferences ,
20+ actionsMapRemoveVariants ,
21+ } from './product-actions'
822import { SyncAction } from './types/update-actions'
923import copyEmptyArrayProps from './utils/copy-empty-array-props'
1024import createBuildActions from './utils/create-build-actions'
@@ -49,7 +63,7 @@ function createProductMapActions(
4963 mapActionGroup (
5064 'attributes' ,
5165 ( ) : Array < UpdateAction > =>
52- productActions . actionsMapAttributes (
66+ actionsMapAttributes (
5367 diff ,
5468 oldObj ,
5569 newObj ,
@@ -62,71 +76,63 @@ function createProductMapActions(
6276 allActions . push (
6377 mapActionGroup (
6478 'variants' ,
65- ( ) : Array < UpdateAction > =>
66- productActions . actionsMapAddVariants ( diff , oldObj , newObj )
79+ ( ) : Array < UpdateAction > => actionsMapAddVariants ( diff , oldObj , newObj )
6780 )
6881 )
6982
70- allActions . push ( productActions . actionsMapMasterVariant ( oldObj , newObj ) )
83+ allActions . push ( actionsMapMasterVariant ( oldObj , newObj ) )
7184
7285 allActions . push (
7386 mapActionGroup (
7487 'variants' ,
7588 ( ) : Array < UpdateAction > =>
76- productActions . actionsMapRemoveVariants ( diff , oldObj , newObj )
89+ actionsMapRemoveVariants ( diff , oldObj , newObj )
7790 )
7891 )
7992
8093 allActions . push (
8194 mapActionGroup (
8295 'base' ,
8396 ( ) : Array < UpdateAction > =>
84- productActions . actionsMapBase ( diff , oldObj , newObj , syncActionConfig )
97+ actionsMapBase ( diff , oldObj , newObj , syncActionConfig )
8598 )
8699 )
87100
88101 allActions . push (
89102 mapActionGroup (
90103 'meta' ,
91- ( ) : Array < UpdateAction > =>
92- productActions . actionsMapMeta ( diff , oldObj , newObj )
104+ ( ) : Array < UpdateAction > => actionsMapMeta ( diff , oldObj , newObj )
93105 )
94106 )
95107
96108 allActions . push (
97109 mapActionGroup (
98110 'references' ,
99- ( ) : Array < UpdateAction > =>
100- productActions . actionsMapReferences ( diff , oldObj , newObj )
111+ ( ) : Array < UpdateAction > => actionsMapReferences ( diff , oldObj , newObj )
101112 )
102113 )
103114
104115 allActions . push (
105116 mapActionGroup (
106117 'images' ,
107118 ( ) : Array < UpdateAction > =>
108- productActions . actionsMapImages ( diff , oldObj , newObj , variantHashMap )
119+ actionsMapImages ( diff , oldObj , newObj , variantHashMap )
109120 )
110121 )
111122
112123 allActions . push (
113124 mapActionGroup (
114125 'pricesCustom' ,
115126 ( ) : Array < UpdateAction > =>
116- productActions . actionsMapPricesCustom (
117- diff ,
118- oldObj ,
119- newObj ,
120- variantHashMap
121- )
127+ actionsMapPricesCustom ( diff , oldObj , newObj , variantHashMap )
122128 )
123129 )
124130
125131 allActions . push (
126132 mapActionGroup (
127133 'prices' ,
128134 ( ) : Array < UpdateAction > =>
129- productActions . actionsMapPrices (
135+ actionsMapPrices (
130136 diff ,
131137 oldObj ,
132138 newObj ,
@@ -139,23 +145,22 @@ function createProductMapActions(
139145 allActions . push (
140146 mapActionGroup (
141147 'categories' ,
142- ( ) : Array < UpdateAction > => productActions . actionsMapCategories ( diff )
148+ ( ) : Array < UpdateAction > => actionsMapCategories ( diff )
143149 )
144150 )
145151
146152 allActions . push (
147153 mapActionGroup (
148154 'categories' ,
149- ( ) : Array < UpdateAction > =>
150- productActions . actionsMapCategoryOrderHints ( diff )
155+ ( ) : Array < UpdateAction > => actionsMapCategoryOrderHints ( diff )
151156 )
152157 )
153158
154159 allActions . push (
155160 mapActionGroup (
156161 'assets' ,
157162 ( ) : Array < UpdateAction > =>
158- productActions . actionsMapAssets ( diff , oldObj , newObj , variantHashMap )
163+ actionsMapAssets ( diff , oldObj , newObj , variantHashMap )
159164 )
160165 )
161166
0 commit comments