@commercetools-frontend-extensions/change-history 8.43.2 → 8.45.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/dist/commercetools-frontend-extensions-change-history.cjs.dev.js +8826 -10786
- package/dist/commercetools-frontend-extensions-change-history.cjs.prod.js +8681 -10641
- package/dist/commercetools-frontend-extensions-change-history.esm.js +8893 -10853
- package/dist/declarations/src/constants/constants.d.ts +26 -16
- package/dist/declarations/src/constants/resource-types.d.ts +3 -3
- package/dist/{en-3a67c803.cjs.prod.js → en-5cdaf636.cjs.dev.js} +1 -1
- package/dist/{en-74f50f36.esm.js → en-9b55183d.esm.js} +1 -1
- package/dist/{en-cd57f8ed.cjs.dev.js → en-f53f1725.cjs.prod.js} +1 -1
- package/package.json +12 -12
|
@@ -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
|
|
13
|
+
readonly ViewCheckout: "ViewCheckout";
|
|
9
14
|
readonly ViewCustomerGroups: "ViewCustomerGroups";
|
|
10
|
-
readonly
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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[];
|
|
@@ -1219,7 +1219,7 @@ var en = {
|
|
|
1219
1219
|
},
|
|
1220
1220
|
"ResourceAction.common.changeLabel": {
|
|
1221
1221
|
developer_comment: "Label for filter changeLabel",
|
|
1222
|
-
string: "Change
|
|
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
|
|
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
|
|
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.
|
|
4
|
+
"version": "8.45.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.
|
|
40
|
-
"@commercetools-frontend/application-shell": "24.
|
|
41
|
-
"@commercetools-frontend/application-shell-connectors": "24.
|
|
42
|
-
"@commercetools-frontend/assets": "24.
|
|
43
|
-
"@commercetools-frontend/constants": "24.
|
|
44
|
-
"@commercetools-frontend/i18n": "24.
|
|
45
|
-
"@commercetools-frontend/l10n": "24.
|
|
46
|
-
"@commercetools-frontend/mc-scripts": "24.
|
|
47
|
-
"@commercetools-frontend/permissions": "24.
|
|
48
|
-
"@commercetools-frontend/sdk": "24.
|
|
49
|
-
"@commercetools-frontend/sentry": "24.
|
|
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",
|