@commercetools-frontend-extensions/change-history 8.44.0 → 8.46.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.
Files changed (29) hide show
  1. package/dist/commercetools-frontend-extensions-change-history.cjs.dev.js +3192 -5042
  2. package/dist/commercetools-frontend-extensions-change-history.cjs.prod.js +3177 -5027
  3. package/dist/commercetools-frontend-extensions-change-history.esm.js +3116 -4966
  4. package/dist/declarations/src/constants/constants.d.ts +26 -16
  5. package/dist/declarations/src/constants/resource-types.d.ts +3 -3
  6. package/dist/declarations/src/index.d.ts +19 -19
  7. package/dist/{en-3a67c803.cjs.prod.js → en-5cdaf636.cjs.dev.js} +1 -1
  8. package/dist/{en-74f50f36.esm.js → en-9b55183d.esm.js} +1 -1
  9. package/dist/{en-cd57f8ed.cjs.dev.js → en-f53f1725.cjs.prod.js} +1 -1
  10. package/package.json +12 -12
  11. /package/dist/declarations/src/{resources → resourceRegistry}/associate-role/associate-role-tab.d.ts +0 -0
  12. /package/dist/declarations/src/{resources → resourceRegistry}/business-unit/business-unit-tab.d.ts +0 -0
  13. /package/dist/declarations/src/{resources → resourceRegistry}/category/category-tab.d.ts +0 -0
  14. /package/dist/declarations/src/{resources → resourceRegistry}/channel/channel-tab.d.ts +0 -0
  15. /package/dist/declarations/src/{resources → resourceRegistry}/customer/customer-group/customer-group-tab.d.ts +0 -0
  16. /package/dist/declarations/src/{resources → resourceRegistry}/customer/customer-tab.d.ts +0 -0
  17. /package/dist/declarations/src/{resources → resourceRegistry}/discounts/cart-discount/cart-discount-tab.d.ts +0 -0
  18. /package/dist/declarations/src/{resources → resourceRegistry}/discounts/discount-code/discount-code-tab.d.ts +0 -0
  19. /package/dist/declarations/src/{resources → resourceRegistry}/discounts/product-discount/product-discount-tab.d.ts +0 -0
  20. /package/dist/declarations/src/{resources → resourceRegistry}/order/order-tab.d.ts +0 -0
  21. /package/dist/declarations/src/{resources → resourceRegistry}/product/product-tab.d.ts +0 -0
  22. /package/dist/declarations/src/{resources → resourceRegistry}/product-selection/product-selection-tab.d.ts +0 -0
  23. /package/dist/declarations/src/{resources → resourceRegistry}/product-type/product-type-tab.d.ts +0 -0
  24. /package/dist/declarations/src/{resources → resourceRegistry}/quotes/quote/quote-tab.d.ts +0 -0
  25. /package/dist/declarations/src/{resources → resourceRegistry}/quotes/quote-request/quote-request-tab.d.ts +0 -0
  26. /package/dist/declarations/src/{resources → resourceRegistry}/quotes/staged-quote/staged-quote-tab.d.ts +0 -0
  27. /package/dist/declarations/src/{resources → resourceRegistry}/store/store-tab.d.ts +0 -0
  28. /package/dist/declarations/src/{resources → resourceRegistry}/tax-category/tax-category-tab.d.ts +0 -0
  29. /package/dist/declarations/src/{resources → resourceRegistry}/zone/zone-tab.d.ts +0 -0
@@ -1,23 +1,32 @@
1
1
  import { TierLevels } from "../../types/src/generated/change-history.js";
2
2
  import { ValueOf } from "../types/common-types.js";
3
+ /**
4
+ * This should map to the MC view permissions list.
5
+ * https://github.com/commercetools/merchant-center-services/blob/0cfe19e896f3f11a14468a199035d73ac3d9018b/shared/constants/lib/permissions.ts#L54-L74
6
+ */
3
7
  export declare const PERMISSIONS: {
8
+ readonly ViewAttributeGroups: "ViewAttributeGroups";
4
9
  readonly ViewAuditLog: "ViewAuditLog";
5
10
  readonly ViewBusinessUnits: "ViewBusinessUnits";
6
11
  readonly ViewCartDiscounts: "ViewCartDiscounts";
7
12
  readonly ViewCategories: "ViewCategories";
8
- readonly ViewCustomers: "ViewCustomers";
13
+ readonly ViewCheckout: "ViewCheckout";
9
14
  readonly ViewCustomerGroups: "ViewCustomerGroups";
10
- readonly ViewCustomObjets: "ViewCustomObjets";
15
+ readonly ViewCustomers: "ViewCustomers";
11
16
  readonly ViewDeveloperSettings: "ViewDeveloperSettings";
12
17
  readonly ViewDiscountCodes: "ViewDiscountCodes";
13
18
  readonly ViewMessages: "ViewMessages";
19
+ readonly ViewOperations: "ViewOperations";
14
20
  readonly ViewOrders: "ViewOrders";
15
- readonly ViewProducts: "ViewProducts";
16
21
  readonly ViewProductDiscounts: "ViewProductDiscounts";
22
+ readonly ViewProducts: "ViewProducts";
17
23
  readonly ViewProductSelections: "ViewProductSelections";
18
24
  readonly ViewProductTypes: "ViewProductTypes";
19
25
  readonly ViewProjectSettings: "ViewProjectSettings";
20
26
  readonly ViewQuotes: "ViewQuotes";
27
+ readonly ViewRecurringOrders: "ViewRecurringOrders";
28
+ readonly ViewShoppingLists: "ViewShoppingLists";
29
+ readonly ViewStandalonePrices: "ViewStandalonePrices";
21
30
  };
22
31
  export declare const DATA_FENCE_RESOURCE_TYPES: {
23
32
  readonly CUSTOMERS: "customers";
@@ -27,28 +36,29 @@ export declare const DATA_FENCE_PERMISSION_TYPES: {
27
36
  readonly MANAGE: "manage";
28
37
  readonly VIEW: "view";
29
38
  };
39
+ /**
40
+ * This mapping of permissions to resource types must be a subset of the view permissions -> oauth
41
+ * scopes granted in the merchant-center-services repository.
42
+ * https://github.com/commercetools/merchant-center-services/blob/0cfe19e896f3f11a14468a199035d73ac3d9018b/packages/gateway/lib/utils/oauth-scopes.ts#L12-L255
43
+ *
44
+ * The Change History API authorizes resource types queried against the specific scopes that are associated
45
+ * with the user token in {@link SCOPES_BY_RESOURCE_TYPES} at packages-backend/shared/lib/services/change-history-api/scopes-by-resource-types.ts.
46
+ */
30
47
  export declare const PERMISSION_RESOURCES: {
31
- readonly canViewAssociateRoles: readonly ["AssociateRole"];
32
- readonly canViewBusinessUnits: readonly ["BusinessUnit"];
48
+ readonly canViewBusinessUnits: readonly ["AssociateRole", "BusinessUnit"];
33
49
  readonly canViewCartDiscounts: readonly ["CartDiscount"];
34
50
  readonly canViewCategories: readonly ["Category"];
35
- readonly canViewCustomers: readonly ["Customer"];
51
+ readonly canViewCustomers: readonly ["CustomObject", "Customer"];
36
52
  readonly canViewCustomerGroups: readonly ["CustomerGroup"];
37
- readonly canViewCustomObjects: readonly ["CustomObject"];
38
53
  readonly canViewDiscountCodes: readonly ["DiscountCode"];
39
- readonly canViewProducts: readonly ["Product", "InventoryEntry", "Review"];
54
+ readonly canViewOrders: readonly ["CustomObject", "Order", "Payment"];
55
+ readonly canViewProducts: readonly ["CustomObject", "Product", "InventoryEntry", "Review", "State", "Type"];
40
56
  readonly canViewProductDiscounts: readonly ["ProductDiscount"];
41
57
  readonly canViewProductSelections: readonly ["ProductSelection"];
42
58
  readonly canViewProductTypes: readonly ["ProductType"];
43
- readonly canViewProjectSettings: readonly ["Channel", "Store", "TaxCategory", "Zone"];
44
- readonly canViewOrders: readonly ["Order"];
45
- readonly canViewPayments: readonly ["Payment"];
46
- readonly canViewQuotes: readonly ["Quote"];
47
- readonly canViewQuoteRequests: readonly ["QuoteRequest"];
59
+ readonly canViewProjectSettings: readonly ["AssociateRole", "Channel", "Store", "TaxCategory", "Zone"];
60
+ readonly canViewQuotes: readonly ["Quote", "QuoteRequest", "StagedQuote"];
48
61
  readonly canViewShoppingLists: readonly ["ShoppingList"];
49
- readonly canViewStagedQuotes: readonly ["StagedQuote"];
50
- readonly canViewStates: readonly ["State"];
51
- readonly canViewTypes: readonly ["Type"];
52
62
  };
53
63
  export declare const ASSOCIATE_ROLE_PERMISSIONS: {
54
64
  readonly ACCEPT_MY_QUOTES: "AcceptMyQuotes";
@@ -2,7 +2,6 @@ import { ValueOf } from "../types/common-types.js";
2
2
  export declare const RESOURCE_TYPE: {
3
3
  readonly ASSOCIATE_ROLE: "AssociateRole";
4
4
  readonly BUSINESS_UNIT: "BusinessUnit";
5
- readonly CART: "Cart";
6
5
  readonly CART_DISCOUNT: "CartDiscount";
7
6
  readonly CATEGORY: "Category";
8
7
  readonly CHANNEL: "Channel";
@@ -32,7 +31,7 @@ export declare const RESOURCE_TYPE: {
32
31
  };
33
32
  export type TResourceType = ValueOf<typeof RESOURCE_TYPE>;
34
33
  export type TResourceTypeKey = keyof typeof RESOURCE_TYPE;
35
- export declare const RESOURCE_TYPE_NAME: {
34
+ export declare const RESOURCE_TYPE_ID: {
36
35
  readonly ASSOCIATE_ROLE: "associate-role";
37
36
  readonly BUSINESS_UNIT: "business-unit";
38
37
  readonly CART_DISCOUNT: "cart-discount";
@@ -62,7 +61,7 @@ export declare const RESOURCE_TYPE_NAME: {
62
61
  readonly TYPE: "type";
63
62
  readonly ZONE: "zone";
64
63
  };
65
- export type TResourceTypeName = ValueOf<typeof RESOURCE_TYPE_NAME>;
64
+ export type TResourceTypeId = ValueOf<typeof RESOURCE_TYPE_ID>;
66
65
  export declare const RESOURCE_MODAL_TYPES: {
67
66
  readonly ASSOCIATE_ROLE: "AssociateRole";
68
67
  readonly BUSINESS_UNIT: "BusinessUnit";
@@ -85,3 +84,4 @@ export declare const RESOURCE_MODAL_TYPES: {
85
84
  readonly ZONE: "Zone";
86
85
  };
87
86
  export type TResourceModalType = ValueOf<typeof RESOURCE_MODAL_TYPES>;
87
+ export declare const RESOURCES_WITH_PREVIEW: TResourceType[];
@@ -1,24 +1,24 @@
1
1
  export { default as version } from "./version.js";
2
2
  export { default as ChangeHistory } from "./components/change-history/index.js";
3
- export { default as ChangeHistoryAssociateRolesTab } from "./resources/associate-role/associate-role-tab.jsx";
4
- export { default as ChangeHistoryBusinessUnitsTab } from "./resources/business-unit/business-unit-tab.jsx";
5
- export { default as ChangeHistoryCartDiscountsTab } from "./resources/discounts/cart-discount/cart-discount-tab.jsx";
6
- export { default as ChangeHistoryCategoriesTab } from "./resources/category/category-tab.jsx";
7
- export { default as ChangeHistoryChannelsTab } from "./resources/channel/channel-tab.jsx";
8
- export { default as ChangeHistoryCustomersTab } from "./resources/customer/customer-tab.jsx";
9
- export { default as ChangeHistoryCustomerGroupsTab } from "./resources/customer/customer-group/customer-group-tab.jsx";
10
- export { default as ChangeHistoryDiscountCodesTab } from "./resources/discounts/discount-code/discount-code-tab.jsx";
11
- export { default as ChangeHistoryOrdersTab } from "./resources/order/order-tab.jsx";
12
- export { default as ChangeHistoryProductsTab } from "./resources/product/product-tab.jsx";
13
- export { default as ChangeHistoryProductDiscountsTab } from "./resources/discounts/product-discount/product-discount-tab.jsx";
14
- export { default as ChangeHistoryProductSelectionsTab } from "./resources/product-selection/product-selection-tab.jsx";
15
- export { default as ChangeHistoryProductTypesTab } from "./resources/product-type/product-type-tab.jsx";
16
- export { default as ChangeHistoryQuotesTab } from "./resources/quotes/quote/quote-tab.jsx";
17
- export { default as ChangeHistoryQuoteRequestsTab } from "./resources/quotes/quote-request/quote-request-tab.jsx";
18
- export { default as ChangeHistoryStagedQuotesTab } from "./resources/quotes/staged-quote/staged-quote-tab.jsx";
19
- export { default as ChangeHistoryStoresTab } from "./resources/store/store-tab.jsx";
20
- export { default as ChangeHistoryTaxCategoriesTab } from "./resources/tax-category/tax-category-tab.jsx";
21
- export { default as ChangeHistoryZonesTab } from "./resources/zone/zone-tab.jsx";
3
+ export { default as ChangeHistoryAssociateRolesTab } from "./resourceRegistry/associate-role/associate-role-tab.jsx";
4
+ export { default as ChangeHistoryBusinessUnitsTab } from "./resourceRegistry/business-unit/business-unit-tab.jsx";
5
+ export { default as ChangeHistoryCartDiscountsTab } from "./resourceRegistry/discounts/cart-discount/cart-discount-tab.jsx";
6
+ export { default as ChangeHistoryCategoriesTab } from "./resourceRegistry/category/category-tab.jsx";
7
+ export { default as ChangeHistoryChannelsTab } from "./resourceRegistry/channel/channel-tab.jsx";
8
+ export { default as ChangeHistoryCustomersTab } from "./resourceRegistry/customer/customer-tab.jsx";
9
+ export { default as ChangeHistoryCustomerGroupsTab } from "./resourceRegistry/customer/customer-group/customer-group-tab.jsx";
10
+ export { default as ChangeHistoryDiscountCodesTab } from "./resourceRegistry/discounts/discount-code/discount-code-tab.jsx";
11
+ export { default as ChangeHistoryOrdersTab } from "./resourceRegistry/order/order-tab.jsx";
12
+ export { default as ChangeHistoryProductsTab } from "./resourceRegistry/product/product-tab.jsx";
13
+ export { default as ChangeHistoryProductDiscountsTab } from "./resourceRegistry/discounts/product-discount/product-discount-tab.jsx";
14
+ export { default as ChangeHistoryProductSelectionsTab } from "./resourceRegistry/product-selection/product-selection-tab.jsx";
15
+ export { default as ChangeHistoryProductTypesTab } from "./resourceRegistry/product-type/product-type-tab.jsx";
16
+ export { default as ChangeHistoryQuotesTab } from "./resourceRegistry/quotes/quote/quote-tab.jsx";
17
+ export { default as ChangeHistoryQuoteRequestsTab } from "./resourceRegistry/quotes/quote-request/quote-request-tab.jsx";
18
+ export { default as ChangeHistoryStagedQuotesTab } from "./resourceRegistry/quotes/staged-quote/staged-quote-tab.jsx";
19
+ export { default as ChangeHistoryStoresTab } from "./resourceRegistry/store/store-tab.jsx";
20
+ export { default as ChangeHistoryTaxCategoriesTab } from "./resourceRegistry/tax-category/tax-category-tab.jsx";
21
+ export { default as ChangeHistoryZonesTab } from "./resourceRegistry/zone/zone-tab.jsx";
22
22
  export { default as ChangeHistoryLink } from "./components/change-history-link/index.js";
23
23
  export { RESOURCE_MODAL_TYPES as RESOURCE } from "./constants/resource-types.js";
24
24
  export { loadI18n } from "./i18n/index.js";
@@ -1219,7 +1219,7 @@ var en = {
1219
1219
  },
1220
1220
  "ResourceAction.common.changeLabel": {
1221
1221
  developer_comment: "Label for filter changeLabel",
1222
- string: "Change name"
1222
+ string: "Change label"
1223
1223
  },
1224
1224
  "ResourceAction.common.changeLocalizedEnumValueLabel": {
1225
1225
  developer_comment: "Label for filter changeLocalizedEnumValueLabel",
@@ -1217,7 +1217,7 @@ var en = {
1217
1217
  },
1218
1218
  "ResourceAction.common.changeLabel": {
1219
1219
  developer_comment: "Label for filter changeLabel",
1220
- string: "Change name"
1220
+ string: "Change label"
1221
1221
  },
1222
1222
  "ResourceAction.common.changeLocalizedEnumValueLabel": {
1223
1223
  developer_comment: "Label for filter changeLocalizedEnumValueLabel",
@@ -1219,7 +1219,7 @@ var en = {
1219
1219
  },
1220
1220
  "ResourceAction.common.changeLabel": {
1221
1221
  developer_comment: "Label for filter changeLabel",
1222
- string: "Change name"
1222
+ string: "Change label"
1223
1223
  },
1224
1224
  "ResourceAction.common.changeLocalizedEnumValueLabel": {
1225
1225
  developer_comment: "Label for filter changeLocalizedEnumValueLabel",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-frontend-extensions/change-history",
3
3
  "description": "Change history shared components and utilities",
4
- "version": "8.44.0",
4
+ "version": "8.46.0",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -36,17 +36,17 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@babel/plugin-transform-runtime": "7.24.7",
39
- "@commercetools-frontend/application-components": "24.5.0",
40
- "@commercetools-frontend/application-shell": "24.5.0",
41
- "@commercetools-frontend/application-shell-connectors": "24.5.0",
42
- "@commercetools-frontend/assets": "24.5.0",
43
- "@commercetools-frontend/constants": "24.5.0",
44
- "@commercetools-frontend/i18n": "24.5.0",
45
- "@commercetools-frontend/l10n": "24.5.0",
46
- "@commercetools-frontend/mc-scripts": "24.5.0",
47
- "@commercetools-frontend/permissions": "24.5.0",
48
- "@commercetools-frontend/sdk": "24.5.0",
49
- "@commercetools-frontend/sentry": "24.5.0",
39
+ "@commercetools-frontend/application-components": "24.7.2",
40
+ "@commercetools-frontend/application-shell": "24.7.2",
41
+ "@commercetools-frontend/application-shell-connectors": "24.7.2",
42
+ "@commercetools-frontend/assets": "24.7.2",
43
+ "@commercetools-frontend/constants": "24.7.2",
44
+ "@commercetools-frontend/i18n": "24.7.2",
45
+ "@commercetools-frontend/l10n": "24.7.2",
46
+ "@commercetools-frontend/mc-scripts": "24.7.2",
47
+ "@commercetools-frontend/permissions": "24.7.2",
48
+ "@commercetools-frontend/sdk": "24.7.2",
49
+ "@commercetools-frontend/sentry": "24.7.2",
50
50
  "@commercetools-frontend/ui-kit": "20.0.0",
51
51
  "@commercetools-uikit/design-system": "20.0.0",
52
52
  "@commercetools-uikit/filters": "20.0.0",