@commercetools/sync-actions 8.0.0 → 8.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.
- package/CHANGELOG.md +12 -0
- package/dist/commercetools-sync-actions.cjs.js +616 -33
- package/dist/commercetools-sync-actions.esm.js +4300 -27779
- package/dist/commercetools-sync-actions.umd.js +1 -1
- package/dist/commercetools-sync-actions.umd.min.js +1 -1
- package/dist/declarations/index.d.ts +1 -0
- package/dist/declarations/product-tailoring/product-tailoring-actions.d.ts +21 -0
- package/dist/declarations/product-tailoring/product-tailoring.d.ts +4 -0
- package/dist/declarations/types/types-actions.d.ts +1 -1
- package/dist/declarations/utils/array-actions-utils.d.ts +6 -0
- package/dist/declarations/utils/extract-matching-pairs.d.ts +1 -1
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ export { default as createSyncTypes } from './types/types';
|
|
|
18
18
|
export { default as createSyncProjects } from './projects/projects';
|
|
19
19
|
export { default as createSyncStores } from './stores/stores';
|
|
20
20
|
export { default as createSyncProductSelections } from './product-selections/product-selections';
|
|
21
|
+
export { default as createSyncProductTailoring } from './product-tailoring/product-tailoring';
|
|
21
22
|
export { default as createSyncStandalonePrices } from './prices/prices';
|
|
22
23
|
export { default as createSyncAttributeGroups } from './attribute-groups/attribute-groups';
|
|
23
24
|
export { default as createSyncApiExtensions } from './api-extensions/api-extensions';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Delta, ProductTailoringData, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare const metaActionsList: Array<UpdateAction>;
|
|
4
|
+
export declare const baseAssetActionsList: Array<UpdateAction>;
|
|
5
|
+
/**
|
|
6
|
+
* SYNC FUNCTIONS
|
|
7
|
+
*/
|
|
8
|
+
export declare function actionsMapBase(diff: Delta, oldObj: object, newObj: object, config?: SyncActionConfig): {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
action: string;
|
|
11
|
+
}[];
|
|
12
|
+
export declare function actionsMapMeta<T extends object>(diff: Delta, oldObj: T, newObj: T, config?: SyncActionConfig): {
|
|
13
|
+
[x: string]: any;
|
|
14
|
+
action: string;
|
|
15
|
+
}[];
|
|
16
|
+
export declare function actionsMapAddVariants<T extends object>(diff: Delta, oldObj: T, newObj: T): UpdateAction[];
|
|
17
|
+
export declare function actionsMapRemoveVariants<T extends object>(diff: Delta, oldObj: T, newObj: T): UpdateAction[];
|
|
18
|
+
export declare function actionsMapImages<T extends object = ProductTailoringData>(diff: Delta, oldObj: T, newObj: T, variantHashMap: object): Array<UpdateAction>;
|
|
19
|
+
export declare function actionsMapAssets<T extends ProductTailoringData>(diff: Delta, oldObj: T, newObj: T, variantHashMap: object): Array<UpdateAction>;
|
|
20
|
+
export declare function actionsMapProductAttributes(diff: Delta, oldObj: ProductTailoringData, newObj: ProductTailoringData): any[];
|
|
21
|
+
export declare function actionsMapVariantAttributes(diff: Delta, oldObj: ProductTailoringData, newObj: ProductTailoringData, sameForAllAttributeNames: Array<string>, variantHashMap: object): any;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, ProductTailoring, ProductTailoringData, ProductTailoringUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: Array<string>;
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<ProductTailoring | ProductTailoringData, ProductTailoringUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -4,4 +4,4 @@ export declare function actionsMapBase<T = CustomFieldEnumType | FieldDefinition
|
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
action: string;
|
|
6
6
|
}[];
|
|
7
|
-
export declare function actionsMapFieldDefinitions(fieldDefinitionsDiff: Delta, previous: FieldDefinition
|
|
7
|
+
export declare function actionsMapFieldDefinitions(fieldDefinitionsDiff: Delta, previous: Array<FieldDefinition>, next: Array<FieldDefinition>, diffPaths: Delta): any;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const REGEX_NUMBER: RegExp;
|
|
2
|
+
export declare const REGEX_UNDERSCORE_NUMBER: RegExp;
|
|
3
|
+
export declare const getIsAddAction: (key: string, resource: unknown) => number;
|
|
4
|
+
export declare const getIsUpdateAction: (key: string, resource: unknown) => number;
|
|
5
|
+
export declare const getIsRemoveAction: (key: string, resource: unknown) => boolean;
|
|
6
|
+
export declare const getIsItemMovedAction: (key: string, resource: unknown) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default function extractMatchingPairs<T extends object>(hashMap: object, key: string, before: T
|
|
1
|
+
export default function extractMatchingPairs<T extends object>(hashMap: object, key: string, before: ArrayLike<T>, now: ArrayLike<T>): {
|
|
2
2
|
oldObj: T;
|
|
3
3
|
newObj: T;
|
|
4
4
|
};
|