@commercetools/sync-actions 7.3.1 → 8.0.0-alpha.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 +265 -0
- package/dist/commercetools-sync-actions.cjs.js +43947 -5
- package/dist/commercetools-sync-actions.esm.js +27861 -3864
- package/dist/commercetools-sync-actions.umd.js +1 -0
- package/dist/commercetools-sync-actions.umd.min.js +1 -0
- package/dist/declarations/api-extensions/api-extensions-actions.d.ts +9 -0
- package/dist/declarations/api-extensions/api-extensions.d.ts +4 -0
- package/dist/declarations/assets/assets-actions.d.ts +2 -0
- package/dist/declarations/attribute-groups/attribute-groups-actions.d.ts +10 -0
- package/dist/declarations/attribute-groups/attribute-groups.d.ts +3 -0
- package/dist/declarations/business-units/business-units-actions.d.ts +10 -0
- package/dist/declarations/business-units/business-units.d.ts +3 -0
- package/dist/declarations/cart-discounts/cart-discounts-actions.d.ts +9 -0
- package/dist/declarations/cart-discounts/cart-discounts.d.ts +4 -0
- package/dist/declarations/categories/categories.d.ts +4 -0
- package/dist/declarations/categories/category-actions.d.ts +18 -0
- package/dist/declarations/channels/channels-actions.d.ts +6 -0
- package/dist/declarations/channels/channels.d.ts +4 -0
- package/dist/declarations/customer-group/customer-group-actions.d.ts +6 -0
- package/dist/declarations/customer-group/customer-group.d.ts +4 -0
- package/dist/declarations/customers/customer-actions.d.ts +25 -0
- package/dist/declarations/customers/customers.d.ts +4 -0
- package/dist/declarations/discount-codes/discount-codes-actions.d.ts +6 -0
- package/dist/declarations/discount-codes/discount-codes.d.ts +6 -0
- package/dist/declarations/index.d.ts +26 -0
- package/dist/declarations/inventories/inventories.d.ts +4 -0
- package/dist/declarations/inventories/inventory-actions.d.ts +13 -0
- package/dist/declarations/orders/order-actions.d.ts +16 -0
- package/dist/declarations/orders/orders.d.ts +4 -0
- package/dist/declarations/prices/prices-actions.d.ts +6 -0
- package/dist/declarations/prices/prices.d.ts +4 -0
- package/dist/declarations/product-discounts/product-discounts-actions.d.ts +9 -0
- package/dist/declarations/product-discounts/product-discounts.d.ts +4 -0
- package/dist/declarations/product-selections/product-selections-actions.d.ts +9 -0
- package/dist/declarations/product-selections/product-selections.d.ts +4 -0
- package/dist/declarations/product-types/product-types-actions.d.ts +11 -0
- package/dist/declarations/product-types/product-types.d.ts +4 -0
- package/dist/declarations/products/product-actions.d.ts +38 -0
- package/dist/declarations/products/products.d.ts +4 -0
- package/dist/declarations/projects/projects-actions.d.ts +17 -0
- package/dist/declarations/projects/projects.d.ts +4 -0
- package/dist/declarations/quotes/quotes-actions.d.ts +6 -0
- package/dist/declarations/quotes/quotes.d.ts +5 -0
- package/dist/declarations/quotes-requests/quote-requests-actions.d.ts +6 -0
- package/dist/declarations/quotes-requests/quote-requests.d.ts +4 -0
- package/dist/declarations/recurring-orders/recurring-orders-actions.d.ts +16 -0
- package/dist/declarations/recurring-orders/recurring-orders.d.ts +5 -0
- package/dist/declarations/shipping-methods/shipping-methods-actions.d.ts +10 -0
- package/dist/declarations/shipping-methods/shipping-methods.d.ts +4 -0
- package/dist/declarations/staged-quotes/staged-quotes-actions.d.ts +6 -0
- package/dist/declarations/staged-quotes/staged-quotes.d.ts +5 -0
- package/dist/declarations/states/state-actions.d.ts +7 -0
- package/dist/declarations/states/states.d.ts +4 -0
- package/dist/declarations/stores/stores-actions.d.ts +6 -0
- package/dist/declarations/stores/stores.d.ts +4 -0
- package/dist/declarations/subscriptions/subscriptions-actions.d.ts +6 -0
- package/dist/declarations/subscriptions/subscriptions.d.ts +4 -0
- package/dist/declarations/tax-categories/tax-categories-actions.d.ts +7 -0
- package/dist/declarations/tax-categories/tax-categories.d.ts +4 -0
- package/dist/declarations/types/types-actions.d.ts +7 -0
- package/dist/declarations/types/types.d.ts +5 -0
- package/dist/declarations/utils/action-map-custom.d.ts +5 -0
- package/dist/declarations/utils/clone.d.ts +6 -0
- package/dist/declarations/utils/combine-validity-actions.d.ts +1 -0
- package/dist/declarations/utils/common-actions.d.ts +46 -0
- package/dist/declarations/utils/copy-empty-array-props.d.ts +9 -0
- package/dist/declarations/utils/create-build-actions.d.ts +4 -0
- package/dist/declarations/utils/create-build-array-actions.d.ts +15 -0
- package/dist/declarations/utils/create-map-action-group.d.ts +2 -0
- package/dist/declarations/utils/diffpatcher.d.ts +11 -0
- package/dist/declarations/utils/extract-matching-pairs.d.ts +4 -0
- package/dist/declarations/utils/find-matching-pairs.d.ts +2 -0
- package/dist/declarations/utils/remove-typename.d.ts +3 -0
- package/dist/declarations/utils/types.d.ts +31 -0
- package/dist/declarations/zones/zones-actions.d.ts +7 -0
- package/dist/declarations/zones/zones.d.ts +4 -0
- package/package.json +20 -29
- package/LICENSE +0 -21
- package/dist/commercetools-sync-actions.cjs.dev.js +0 -3997
- package/dist/commercetools-sync-actions.cjs.prod.js +0 -3997
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Delta, Extension, SyncActionConfig } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: {
|
|
3
|
+
action: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const actionsMapBase: <T extends Extension>(diff: Delta, oldObj: T, newObj: T, config: SyncActionConfig) => {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
action: string;
|
|
9
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, ActionGroup, SyncActionConfig, Extension, ExtensionUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Extension, ExtensionUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AttributeGroup, Delta, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: {
|
|
3
|
+
action: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare function actionsMapBase<T>(diff: Delta, oldObj: T, newObj: T, config?: SyncActionConfig): {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
action: string;
|
|
9
|
+
}[];
|
|
10
|
+
export declare function actionsMapAttributes<T extends AttributeGroup>(diff: Delta, oldObj: T, newObj: T): Array<UpdateAction>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SyncAction, ActionGroup, SyncActionConfig, AttributeGroupUpdateAction, AttributeGroup } from '../utils/types';
|
|
2
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<AttributeGroup, AttributeGroupUpdateAction>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Delta, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: {
|
|
3
|
+
action: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const actionsMapAssociates: <T>(diff: Delta, oldObj: T, newObj: T) => Array<UpdateAction>;
|
|
7
|
+
export declare const actionsMapBase: <T>(diff: Delta, oldObj: T, newObj: T, config: SyncActionConfig) => {
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
action: string;
|
|
10
|
+
}[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SyncAction, ActionGroup, SyncActionConfig, BusinessUnit, BusinessUnitUpdateAction } from '../utils/types';
|
|
2
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<BusinessUnit, BusinessUnitUpdateAction>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CartDiscount, Delta, SyncActionConfig } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: {
|
|
3
|
+
action: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare function actionsMapBase(diff: Delta, oldObj: CartDiscount, newObj: CartDiscount, config?: SyncActionConfig): {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
action: string;
|
|
9
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ActionGroup, CartDiscount, CartDiscountUpdateAction, SyncAction, SyncActionConfig } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<CartDiscount, CartDiscountUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, Category, CategoryUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Category, CategoryUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Category, Delta, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare const metaActionsList: Array<UpdateAction>;
|
|
4
|
+
export declare const referenceActionsList: Array<UpdateAction>;
|
|
5
|
+
/**
|
|
6
|
+
* SYNC FUNCTIONS
|
|
7
|
+
*/
|
|
8
|
+
export declare function actionsMapBase(diff: Delta, oldObj: Category, newObj: Category, config?: SyncActionConfig): {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
action: string;
|
|
11
|
+
}[];
|
|
12
|
+
export declare function actionsMapReferences(diff: Delta, oldObj: Category, newObj: Category): {
|
|
13
|
+
action: string;
|
|
14
|
+
}[];
|
|
15
|
+
export declare function actionsMapMeta(diff: Delta, oldObj: Category, newObj: Category): {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
action: string;
|
|
18
|
+
}[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Channel, Delta, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare function actionsMapBase(diff: Delta, oldObj: Channel, newObj: Channel, config?: SyncActionConfig): {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ActionGroup, Channel, ChannelUpdateAction, SyncAction, SyncActionConfig } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Channel, ChannelUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomerGroup, Delta, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare function actionsMapBase(diff: Delta, oldObj: CustomerGroup, newObj: CustomerGroup, config?: SyncActionConfig): {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ActionGroup, CustomerGroup, SyncActionConfig, SyncAction, CustomerGroupUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<CustomerGroup, CustomerGroupUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Customer, Delta, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare const setDefaultBaseActionsList: Array<UpdateAction>;
|
|
4
|
+
export declare const referenceActionsList: Array<UpdateAction>;
|
|
5
|
+
export declare const authenticationModeActionsList: Array<UpdateAction>;
|
|
6
|
+
/**
|
|
7
|
+
* SYNC FUNCTIONS
|
|
8
|
+
*/
|
|
9
|
+
export declare function actionsMapBase<T extends Customer>(diff: Delta, oldObj: T, newObj: T, config?: SyncActionConfig): {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
action: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare function actionsMapSetDefaultBase<T extends Customer>(diff: Delta, oldObj: T, newObj: T, config?: SyncActionConfig): {
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
action: string;
|
|
16
|
+
}[];
|
|
17
|
+
export declare function actionsMapReferences<T extends Customer>(diff: Delta, oldObj: T, newObj: T): {
|
|
18
|
+
action: string;
|
|
19
|
+
}[];
|
|
20
|
+
export declare function actionsMapAddresses<T extends Customer>(diff: Delta, oldObj: T, newObj: T): UpdateAction[];
|
|
21
|
+
export declare function actionsMapAddBillingAddresses<T extends Customer>(diff: Delta, oldObj: T, newObj: T): UpdateAction[];
|
|
22
|
+
export declare function actionsMapRemoveBillingAddresses<T extends Customer>(diff: Delta, oldObj: T, newObj: T): UpdateAction[];
|
|
23
|
+
export declare function actionsMapAddShippingAddresses<T extends Customer>(diff: Delta, oldObj: T, newObj: T): UpdateAction[];
|
|
24
|
+
export declare function actionsMapRemoveShippingAddresses<T extends Customer>(diff: Delta, oldObj: T, newObj: T): UpdateAction[];
|
|
25
|
+
export declare function actionsMapAuthenticationModes<T extends Customer>(diff: Delta, oldObj: T, newObj: T): any;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, Customer, CustomerUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: Array<string>;
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Customer, CustomerUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Delta, DiscountCode, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare function actionsMapBase(diff: Delta, oldObj: DiscountCode, newObj: DiscountCode, config?: SyncActionConfig): {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionGroup, DiscountCode, SyncActionConfig } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => {
|
|
4
|
+
buildActions: (now: DiscountCode, before: DiscountCode, options?: SyncActionConfig) => any[];
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export { default as createSyncCategories } from './categories/categories';
|
|
2
|
+
export { default as createSyncCustomers } from './customers/customers';
|
|
3
|
+
export { default as createSyncInventories } from './inventories/inventories';
|
|
4
|
+
export { default as createSyncProducts } from './products/products';
|
|
5
|
+
export { default as createSyncOrders } from './orders/orders';
|
|
6
|
+
export { default as createSyncRecurringOrders } from './recurring-orders/recurring-orders';
|
|
7
|
+
export { default as createSyncProductDiscounts } from './product-discounts/product-discounts';
|
|
8
|
+
export { default as createSyncDiscountCodes } from './discount-codes/discount-codes';
|
|
9
|
+
export { default as createSyncCustomerGroup } from './customer-group/customer-group';
|
|
10
|
+
export { default as createSyncCartDiscounts } from './cart-discounts/cart-discounts';
|
|
11
|
+
export { default as createSyncTaxCategories } from './tax-categories/tax-categories';
|
|
12
|
+
export { default as createSyncZones } from './zones/zones';
|
|
13
|
+
export { default as createSyncShippingMethods } from './shipping-methods/shipping-methods';
|
|
14
|
+
export { default as createSyncProductTypes } from './product-types/product-types';
|
|
15
|
+
export { default as createSyncStates } from './states/states';
|
|
16
|
+
export { default as createSyncChannels } from './channels/channels';
|
|
17
|
+
export { default as createSyncTypes } from './types/types';
|
|
18
|
+
export { default as createSyncProjects } from './projects/projects';
|
|
19
|
+
export { default as createSyncStores } from './stores/stores';
|
|
20
|
+
export { default as createSyncProductSelections } from './product-selections/product-selections';
|
|
21
|
+
export { default as createSyncStandalonePrices } from './prices/prices';
|
|
22
|
+
export { default as createSyncAttributeGroups } from './attribute-groups/attribute-groups';
|
|
23
|
+
export { default as createSyncApiExtensions } from './api-extensions/api-extensions';
|
|
24
|
+
export { default as createSyncBusinessUnits } from './business-units/business-units';
|
|
25
|
+
export { default as createSyncSubscriptions } from './subscriptions/subscriptions';
|
|
26
|
+
export * from './utils/types';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, InventoryEntry, InventoryEntryUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<InventoryEntry, InventoryEntryUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Delta, InventoryEntry, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare const referenceActionsList: Array<UpdateAction>;
|
|
4
|
+
/**
|
|
5
|
+
* SYNC FUNCTIONS
|
|
6
|
+
*/
|
|
7
|
+
export declare function actionsMapBase(diff: Delta, oldObj: InventoryEntry, newObj: InventoryEntry, config?: SyncActionConfig): {
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
action: string;
|
|
10
|
+
}[];
|
|
11
|
+
export declare function actionsMapReferences(diff: Delta, oldObj: InventoryEntry, newObj: InventoryEntry): {
|
|
12
|
+
action: string;
|
|
13
|
+
}[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Delta, Order, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: {
|
|
3
|
+
action: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
/**
|
|
7
|
+
* SYNC FUNCTIONS
|
|
8
|
+
*/
|
|
9
|
+
export declare function actionsMapBase(diff: Delta, oldObj: Order, newObj: Order, config?: SyncActionConfig): {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
action: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare function actionsMapDeliveries<T extends Order>(diff: Delta, oldObj: T, newObj: T): UpdateAction[];
|
|
14
|
+
export declare function actionsMapParcels<T extends Order>(diff: Delta, oldObj: T, newObj: T, deliveryHashMap: object): any[];
|
|
15
|
+
export declare function actionsMapDeliveryItems<T extends Order>(diff: Delta, oldObj: T, newObj: T, deliveryHashMap: object): any[];
|
|
16
|
+
export declare function actionsMapReturnsInfo<T extends Order>(diff: Delta, oldObj: T, newObj: T): UpdateAction[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, Order, OrderUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Order, OrderUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Delta, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare function actionsMapBase<T>(diff: Delta, oldObj: T, newObj: T, config?: SyncActionConfig): {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, StandalonePrice, StandalonePriceUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<StandalonePrice, StandalonePriceUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Delta, SyncActionConfig } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: {
|
|
3
|
+
action: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare function actionsMapBase<T>(diff: Delta, oldObj: T, newObj: T, config?: SyncActionConfig): {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
action: string;
|
|
9
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ActionGroup, ProductDiscount, ProductDiscountUpdateAction, SyncAction, SyncActionConfig } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<ProductDiscount, ProductDiscountUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Delta, ProductSelection, SyncActionConfig } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: {
|
|
3
|
+
action: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare function actionsMapBase(diff: Delta, oldObj: ProductSelection, newObj: ProductSelection, config?: SyncActionConfig): {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
action: string;
|
|
9
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, ActionGroup, ProductSelection, ProductSelectionUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList: Array<ActionGroup>) => SyncAction<ProductSelection, ProductSelectionUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Delta, ProductType, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: {
|
|
3
|
+
action: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare function actionsMapBase<T extends ProductType>(diff: Delta, previous: T, next: T, config?: SyncActionConfig): {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
action: string;
|
|
9
|
+
}[];
|
|
10
|
+
export declare const generateBaseFieldsUpdateActions: <T extends object>(previous: T, next: T, actionDefinition: object) => Array<UpdateAction>;
|
|
11
|
+
export declare const actionsMapForHints: <T extends ProductType>(nestedValuesChanges: Delta, ptOld: T, ptNew: T) => Array<UpdateAction>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, ActionGroup, SyncActionConfig, ProductType, ProductTypeUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<ProductType, ProductTypeUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Category, Delta, ProductData, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare const baseAssetActionsList: Array<UpdateAction>;
|
|
4
|
+
export declare const metaActionsList: Array<UpdateAction>;
|
|
5
|
+
export declare const referenceActionsList: Array<UpdateAction>;
|
|
6
|
+
/**
|
|
7
|
+
* SYNC FUNCTIONS
|
|
8
|
+
*/
|
|
9
|
+
export declare function actionsMapBase(diff: Delta, oldObj: object, newObj: object, config?: SyncActionConfig): {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
action: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare function actionsMapMeta<T extends object>(diff: Delta, oldObj: T, newObj: T, config?: SyncActionConfig): {
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
action: string;
|
|
16
|
+
}[];
|
|
17
|
+
export declare function actionsMapAddVariants<T extends object>(diff: Delta, oldObj: T, newObj: T): UpdateAction[];
|
|
18
|
+
export declare function actionsMapRemoveVariants<T extends object>(diff: Delta, oldObj: T, newObj: T): UpdateAction[];
|
|
19
|
+
export declare function actionsMapReferences<T extends object>(diff: Delta, oldObj: T, newObj: T): {
|
|
20
|
+
action: string;
|
|
21
|
+
}[];
|
|
22
|
+
export declare function actionsMapCategories(diff: Delta): any[];
|
|
23
|
+
export declare function actionsMapCategoryOrderHints(diff: Delta, _oldObj: Category): {
|
|
24
|
+
action: "setCategoryOrderHint";
|
|
25
|
+
categoryId: string;
|
|
26
|
+
orderHint?: string;
|
|
27
|
+
staged?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
export declare function actionsMapAssets<T extends object = ProductData>(diff: Delta, oldObj: T, newObj: T, variantHashMap: object): Array<UpdateAction>;
|
|
30
|
+
export declare function actionsMapProductAttributes(diffedProductData: any, oldProductData: any, newProductData: any): any[];
|
|
31
|
+
export declare function actionsMapAttributes(diff: any, oldObj: any, newObj: any, sameForAllAttributeNames: any[], variantHashMap: any): any;
|
|
32
|
+
export declare function actionsMapImages(diff: any, oldObj: any, newObj: any, variantHashMap: any): any[];
|
|
33
|
+
export declare function actionsMapPrices(diff: any, oldObj: any, newObj: any, variantHashMap: any, enableDiscounted: any): any[];
|
|
34
|
+
export declare function actionsMapPricesCustom(diff: any, oldObj: any, newObj: any, variantHashMap: any): any[];
|
|
35
|
+
export declare function actionsMapMasterVariant(oldObj: any, newObj: any): {
|
|
36
|
+
action: string;
|
|
37
|
+
variantId: any;
|
|
38
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, ProductData, ProductUpdateAction, Product } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: Array<string>;
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Product | ProductData, ProductUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Delta, Project, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare const myBusinessUnitActionsList: Array<UpdateAction>;
|
|
4
|
+
export declare const customerSearchActionsList: Array<UpdateAction>;
|
|
5
|
+
export declare const businessUnitSearchActionsList: Array<UpdateAction>;
|
|
6
|
+
export declare function actionsMapBase(diff: Delta, oldObj: Project, newObj: Project, config?: SyncActionConfig): {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
action: string;
|
|
9
|
+
}[];
|
|
10
|
+
export declare const actionsMapBusinessUnit: (diff: Delta, oldObj: Project, newObj: Project, config?: SyncActionConfig) => {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
action: string;
|
|
13
|
+
}[];
|
|
14
|
+
export declare function actionsMapSearchIndexingConfiguration(diff: Delta, oldObj: Project, newObj: Project, config?: SyncActionConfig): {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
action: string;
|
|
17
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ActionGroup, Project, ProjectUpdateAction, SyncAction, SyncActionConfig } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Project, ProjectUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Delta, Quote, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare function actionsMapBase(diff: Delta, oldObj: Quote, newObj: Quote, config?: SyncActionConfig): {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, Quote, QuoteUpdateAction } from '../utils/types';
|
|
2
|
+
declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Quote, QuoteUpdateAction>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export { actionGroups };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Delta, Quote, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare function actionsMapBase(diff: Delta, oldObj: Quote, newObj: Quote, config?: SyncActionConfig): {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, Quote, QuoteUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Quote, QuoteUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Delta, Order, SyncActionConfig } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: {
|
|
3
|
+
action: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const referenceActionsList: {
|
|
7
|
+
action: string;
|
|
8
|
+
key: string;
|
|
9
|
+
}[];
|
|
10
|
+
export declare function actionsMapBase(diff: Delta, oldObj: Order, newObj: Order, config?: SyncActionConfig): {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
action: string;
|
|
13
|
+
}[];
|
|
14
|
+
export declare function actionsMapReferences(diff: Delta, oldObj: Order, newObj: Order): {
|
|
15
|
+
action: string;
|
|
16
|
+
}[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, OrderUpdateAction } from '../utils/types';
|
|
2
|
+
import { Order } from '../utils/types';
|
|
3
|
+
export declare const actionGroups: string[];
|
|
4
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Order, OrderUpdateAction>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Delta, ShippingMethod, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: {
|
|
3
|
+
action: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare function actionsMapBase<T>(diff: Delta, oldObj: T, newObj: T, config?: SyncActionConfig): {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
action: string;
|
|
9
|
+
}[];
|
|
10
|
+
export declare function actionsMapZoneRates(diff: Delta, oldObj: ShippingMethod, newObj: ShippingMethod): UpdateAction[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, ShippingMethod, ShippingMethodUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<ShippingMethod, ShippingMethodUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Delta, Quote, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare function actionsMapBase(diff: Delta, oldObj: Quote, newObj: Quote, config?: SyncActionConfig): {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SyncAction, SyncActionConfig, ActionGroup, Quote, QuoteUpdateAction } from '../utils/types';
|
|
2
|
+
declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Quote, QuoteUpdateAction>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export { actionGroups };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Delta, State, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare function actionsMapBase(diff: Delta, oldObj: State, newObj: State, config?: SyncActionConfig): {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
7
|
+
export declare function actionsMapRoles(diff: Delta, oldObj: State, newObj: State): UpdateAction[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, ActionGroup, SyncActionConfig, State, StateUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<State, StateUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Delta, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare function actionsMapBase<T extends object>(diff: Delta, oldObj: T, newObj: T, config?: SyncActionConfig): {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, ActionGroup, SyncActionConfig, StoreUpdateAction, Store } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, options?: SyncActionConfig) => SyncAction<Store, StoreUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Delta, Subscription, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare const actionsMapBase: (diff: Delta, oldObj: Subscription, newObj: Subscription, config: SyncActionConfig) => {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, ActionGroup, SyncActionConfig, Subscription, SubscriptionUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Subscription, SubscriptionUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Delta, SyncActionConfig, TaxCategory, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare function actionsMapBase(diff: Delta, oldObj: TaxCategory, newObj: TaxCategory, config?: SyncActionConfig): {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
7
|
+
export declare function actionsMapRates(diff: Delta, oldObj: Partial<TaxCategory>, newObj: Partial<TaxCategory>): UpdateAction[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncAction, ActionGroup, SyncActionConfig, TaxCategory, TaxCategoryUpdateAction } from '../utils/types';
|
|
2
|
+
export declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<TaxCategory, TaxCategoryUpdateAction>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CustomFieldEnumType, Delta, FieldDefinition, SyncActionConfig, UpdateAction } from '../utils/types';
|
|
2
|
+
export declare const baseActionsList: Array<UpdateAction>;
|
|
3
|
+
export declare function actionsMapBase<T = CustomFieldEnumType | FieldDefinition>(diff: Delta, oldObj: T, newObj: T, config?: SyncActionConfig): {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
action: string;
|
|
6
|
+
}[];
|
|
7
|
+
export declare function actionsMapFieldDefinitions(fieldDefinitionsDiff: Delta, previous: FieldDefinition, next: FieldDefinition | Array<FieldDefinition>, diffPaths: Delta): any;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ActionGroup, SyncAction, SyncActionConfig, Type, TypeUpdateAction } from '../utils/types';
|
|
2
|
+
declare const actionGroups: string[];
|
|
3
|
+
declare const _default: (actionGroupList?: Array<ActionGroup>, syncActionConfig?: SyncActionConfig) => SyncAction<Type, TypeUpdateAction>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export { actionGroups };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function combineValidityActions(actions?: any[]): any[];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Delta, UpdateAction } from './types';
|
|
2
|
+
export declare const createIsEmptyValue: <T extends string | object>(emptyValues: T[]) => (value: string | unknown) => boolean;
|
|
3
|
+
export declare const isOptionalField: (action: string) => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Builds actions for simple object properties, given a list of actions
|
|
6
|
+
* E.g. [{ action: `changeName`, key: 'name' }]
|
|
7
|
+
*
|
|
8
|
+
* @param {Array} options.actions - a list of actions to be built
|
|
9
|
+
* based on the given property
|
|
10
|
+
* @param {Object} options.diff - the diff object
|
|
11
|
+
* @param {Object} options.oldObj - the object that needs to be updated
|
|
12
|
+
* @param {Object} options.newObj - the new representation of the object
|
|
13
|
+
* @param {Boolean} options.shouldOmitEmptyString - a flag to determine if we should treat an empty string a NON-value
|
|
14
|
+
* @param {Boolean} options.shouldUnsetOmittedProperties - a flag to determine if we should unset fields which are omitted in the newObj
|
|
15
|
+
* @param {Boolean} options.shouldPreventUnsettingRequiredFields - a flag to determine if required fields should be unset
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildBaseAttributesActions<T, U>({ actions, diff, oldObj, newObj, shouldOmitEmptyString, shouldUnsetOmittedProperties, shouldPreventUnsettingRequiredFields, }: {
|
|
18
|
+
actions: Array<UpdateAction>;
|
|
19
|
+
diff: Delta;
|
|
20
|
+
oldObj: T;
|
|
21
|
+
newObj: U;
|
|
22
|
+
shouldOmitEmptyString?: boolean;
|
|
23
|
+
shouldUnsetOmittedProperties?: boolean;
|
|
24
|
+
shouldPreventUnsettingRequiredFields?: boolean;
|
|
25
|
+
}): {
|
|
26
|
+
[x: string]: any;
|
|
27
|
+
action: string;
|
|
28
|
+
}[];
|
|
29
|
+
/**
|
|
30
|
+
* Builds actions for simple reference objects, given a list of actions
|
|
31
|
+
* E.g. [{ action: `setTaxCategory`, key: 'taxCategory' }]
|
|
32
|
+
*
|
|
33
|
+
* @param {Array} options.actions - a list of actions to be built
|
|
34
|
+
* based on the given property
|
|
35
|
+
* @param {Object} options.diff - the diff object
|
|
36
|
+
* @param {Object} options.oldObj - the object that needs to be updated
|
|
37
|
+
* @param {Object} options.newObj - the new representation of the object
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildReferenceActions<T>({ actions, diff, oldObj, newObj, }: {
|
|
40
|
+
actions: Array<UpdateAction>;
|
|
41
|
+
diff: Delta;
|
|
42
|
+
oldObj: T;
|
|
43
|
+
newObj: T;
|
|
44
|
+
}): {
|
|
45
|
+
action: string;
|
|
46
|
+
}[];
|