@adobe/aio-commerce-lib-admin-ui 1.1.0-beta-20260820174436 → 1.2.0-beta-20260930143021
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 +23 -1
- package/dist/cjs/acl-resource-id-Bha1pOIk.d.cts +85 -0
- package/dist/cjs/acl-resource-id-nCj_Kne2.cjs +141 -0
- package/dist/cjs/api/index.cjs +4 -2
- package/dist/cjs/api/index.d.cts +10 -10
- package/dist/cjs/grid-columns/index.cjs +7 -7
- package/dist/cjs/grid-columns/index.d.cts +14 -10
- package/dist/cjs/mass-actions/index.cjs +3 -7
- package/dist/cjs/mass-actions/index.d.cts +10 -10
- package/dist/cjs/menu/index.cjs +1 -1
- package/dist/cjs/menu/index.d.cts +13 -14
- package/dist/cjs/order-view-buttons/index.cjs +1 -1
- package/dist/cjs/order-view-buttons/index.d.cts +6 -6
- package/dist/cjs/web/index.cjs +4 -4
- package/dist/cjs/web/index.d.cts +8 -8
- package/dist/es/acl-resource-id-Bha1pOIk.d.mts +85 -0
- package/dist/es/acl-resource-id-CHw95qd2.mjs +112 -0
- package/dist/es/api/index.d.mts +10 -10
- package/dist/es/api/index.mjs +2 -2
- package/dist/es/grid-columns/index.d.mts +14 -10
- package/dist/es/grid-columns/index.mjs +7 -7
- package/dist/es/mass-actions/index.d.mts +10 -10
- package/dist/es/mass-actions/index.mjs +3 -7
- package/dist/es/menu/index.d.mts +13 -14
- package/dist/es/menu/index.mjs +1 -1
- package/dist/es/order-view-buttons/index.d.mts +6 -6
- package/dist/es/order-view-buttons/index.mjs +1 -1
- package/dist/es/web/index.d.mts +8 -8
- package/dist/es/web/index.mjs +1 -1
- package/package.json +12 -12
- package/dist/cjs/acl-resource-id-DBlYU0DE.d.cts +0 -39
- package/dist/cjs/acl-resource-id-R52pR3gG.cjs +0 -68
- package/dist/es/acl-resource-id-DBlYU0DE.d.mts +0 -39
- package/dist/es/acl-resource-id-pryVxI_c.mjs +0 -57
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,33 @@
|
|
|
1
1
|
# @adobe/aio-commerce-lib-admin-ui
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.2.0-beta-20260930143021
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#692](https://github.com/adobe/aio-commerce-sdk/pull/692) [`264539a`](https://github.com/adobe/aio-commerce-sdk/commit/264539a13371b11b637eb01fd1c0aa185f4349cc) Thanks [@asalloum5](https://github.com/asalloum5)! - Add `invoice`, `creditmemo`, and `shipment` grid types to the grid column wire contract, so runtime action handlers and `getGridColumnAclResourceId` can target those grids in addition to order, product, and customer. Export a `MassActionEntity` type that reflects the entities mass actions actually support (order, product, customer); `getMassActionAclResourceId` now accepts it instead of the wider grid entity type.
|
|
8
|
+
|
|
9
|
+
- [#699](https://github.com/adobe/aio-commerce-sdk/pull/699) [`53f1f8b`](https://github.com/adobe/aio-commerce-sdk/commit/53f1f8be4428862015294f1edc2816972e501a9e) Thanks [@mariam21arauj](https://github.com/mariam21arauj)! - Support the `newsletter` entity in grid-column and mass-action request parsing and ACL resource id helpers, so handlers can serve Newsletter Subscriber grids and mass actions.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies []:
|
|
14
|
+
- @adobe/aio-commerce-lib-api@1.4.1-beta-20260930143021
|
|
15
|
+
|
|
16
|
+
## 1.1.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
6
19
|
|
|
7
20
|
- [#626](https://github.com/adobe/aio-commerce-sdk/pull/626) [`f012ae0`](https://github.com/adobe/aio-commerce-sdk/commit/f012ae0d8eaac5cac314a62de3902fca842bd936) Thanks [@vinayrao2000](https://github.com/vinayrao2000)! - Add a `refreshExtension` client operation that re-syncs an Admin UI extension's registrations via the dedicated refresh endpoint, with its `RefreshExtensionParams` type and schema.
|
|
8
21
|
|
|
22
|
+
- [#653](https://github.com/adobe/aio-commerce-sdk/pull/653) [`c04983d`](https://github.com/adobe/aio-commerce-sdk/commit/c04983dfe04926094ab810c070598d5609004a61) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Export `sanitizeSegment`, which normalizes an id the same way Commerce does when generating ACL resource ids.
|
|
23
|
+
|
|
24
|
+
- [#653](https://github.com/adobe/aio-commerce-sdk/pull/653) [`c04983d`](https://github.com/adobe/aio-commerce-sdk/commit/c04983dfe04926094ab810c070598d5609004a61) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Add `getCustomAclResourceId` to derive the deterministic Commerce ACL resource id for a custom `adminUi.acl` resource, checkable at runtime with the permission client.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [[`1837df1`](https://github.com/adobe/aio-commerce-sdk/commit/1837df107bd2b8d2211f77438a07b6e7ee0af03e)]:
|
|
29
|
+
- @adobe/aio-commerce-lib-api@1.4.0
|
|
30
|
+
|
|
9
31
|
## 1.0.1
|
|
10
32
|
|
|
11
33
|
### Patch Changes
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
//#region source/api/lib/acl-resource-id.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Sanitizes a single ACL id segment: trims whitespace, lowercases, and replaces every
|
|
18
|
+
* character outside [a-z0-9_] with an underscore. This mirrors the Commerce module's own
|
|
19
|
+
* per-segment normalization — the same step applied when building any ACL resource id from a
|
|
20
|
+
* config id.
|
|
21
|
+
*/
|
|
22
|
+
declare function sanitizeSegment(segment: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Derives the deterministic Commerce ACL resource id for an app from its metadata id.
|
|
25
|
+
*
|
|
26
|
+
* The id is assembled as {@link PREFIX} + sanitized `metadataId`, where sanitization trims
|
|
27
|
+
* whitespace, lowercases, and replaces every character outside `[a-z0-9_]` with `_`.
|
|
28
|
+
* `"Magento_CommerceBackendUix::adminuisdk_app_"` is that fixed constant prefix — not a
|
|
29
|
+
* placeholder — so the example below is fully reproducible from the given argument:
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```
|
|
33
|
+
* getAclResourceId("approval-dashboard-app")
|
|
34
|
+
* // PREFIX + sanitize("approval-dashboard-app")
|
|
35
|
+
* // "Magento_CommerceBackendUix::adminuisdk_app_" + "approval_dashboard_app"
|
|
36
|
+
* // → "Magento_CommerceBackendUix::adminuisdk_app_approval_dashboard_app"
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @param metadataId - The application's `metadata.id` value (e.g. `"approval-dashboard-app"`).
|
|
40
|
+
* @returns The full Commerce ACL resource id, or an empty string when `metadataId` is blank.
|
|
41
|
+
*/
|
|
42
|
+
declare function getAclResourceId(metadataId: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* Derives the deterministic Commerce ACL resource id for a custom (standalone) ACL resource
|
|
45
|
+
* declared under `adminUi.acl`. Mirrors the Commerce `AclResourceIdGenerator` `acl` token exactly.
|
|
46
|
+
*
|
|
47
|
+
* With only `resourceId`, returns the id of a top-level resource or a group node; with `childId`,
|
|
48
|
+
* returns the id of a leaf inside that group. Each segment is sanitized independently (trim,
|
|
49
|
+
* lowercase, non-`[a-z0-9_]` → `_`).
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```
|
|
53
|
+
* getCustomAclResourceId("my-app", "approve_refunds")
|
|
54
|
+
* // → "Magento_CommerceBackendUix::adminuisdk_app_my_app_acl_approve_refunds"
|
|
55
|
+
* getCustomAclResourceId("my-app", "reports", "export")
|
|
56
|
+
* // → "Magento_CommerceBackendUix::adminuisdk_app_my_app_acl_reports_export"
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @param metadataId - The application's `metadata.id` value.
|
|
60
|
+
* @param resourceId - The top-level resource or group `id` from `adminUi.acl`.
|
|
61
|
+
* @param childId - Optional child leaf `id` when addressing a resource inside a group.
|
|
62
|
+
* @returns The full Commerce ACL resource id, or an empty string when `metadataId` is blank.
|
|
63
|
+
*/
|
|
64
|
+
declare function getCustomAclResourceId(metadataId: string, resourceId: string, childId?: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* Commerce entities an Admin UI component can attach to, using the same spelling Commerce
|
|
67
|
+
* sends in the wire-contract `gridType` field. Credit memo grids send `"creditmemo"` on the
|
|
68
|
+
* wire — not `"creditMemo"` — even though the corresponding config key (`adminUi.creditMemo`)
|
|
69
|
+
* is camelCase.
|
|
70
|
+
*
|
|
71
|
+
* Single source of truth for the entity vocabulary: `GridTypeSchema` derives its picklist from it.
|
|
72
|
+
*/
|
|
73
|
+
declare const ADMIN_UI_GRID_ENTITIES: readonly ["order", "product", "customer", "invoice", "creditmemo", "shipment", "newsletter"];
|
|
74
|
+
/** Commerce entity an Admin UI component is attached to. */
|
|
75
|
+
type AdminUiEntity = (typeof ADMIN_UI_GRID_ENTITIES)[number];
|
|
76
|
+
/**
|
|
77
|
+
* Entities that support mass actions — a subset of `ADMIN_UI_GRID_ENTITIES`. Mass actions, unlike
|
|
78
|
+
* grid columns, are not available on the invoice, credit memo, or shipment grids.
|
|
79
|
+
* `MassActionGridTypeSchema` derives its picklist from it.
|
|
80
|
+
*/
|
|
81
|
+
declare const MASS_ACTION_ENTITIES: readonly ["order", "product", "customer", "newsletter"];
|
|
82
|
+
/** Commerce entity a mass action is attached to. */
|
|
83
|
+
type MassActionEntity = (typeof MASS_ACTION_ENTITIES)[number];
|
|
84
|
+
//#endregion
|
|
85
|
+
export { sanitizeSegment as a, getCustomAclResourceId as i, MassActionEntity as n, getAclResourceId as r, AdminUiEntity as t };
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
//#region source/api/lib/acl-resource-id.ts
|
|
16
|
+
/**
|
|
17
|
+
* Fixed, constant prefix that every Admin UI SDK ACL resource id starts with.
|
|
18
|
+
* It is owned by Commerce and is a stable part of the cross-repo id contract.
|
|
19
|
+
*
|
|
20
|
+
* @internal Exported for use by domain ACL helpers only — not part of the public API.
|
|
21
|
+
*/
|
|
22
|
+
const PREFIX = "Magento_CommerceBackendUix::adminuisdk_app_";
|
|
23
|
+
/**
|
|
24
|
+
* Sanitizes a single ACL id segment: trims whitespace, lowercases, and replaces every
|
|
25
|
+
* character outside [a-z0-9_] with an underscore. This mirrors the Commerce module's own
|
|
26
|
+
* per-segment normalization — the same step applied when building any ACL resource id from a
|
|
27
|
+
* config id.
|
|
28
|
+
*/
|
|
29
|
+
function sanitizeSegment(segment) {
|
|
30
|
+
return segment.trim().toLowerCase().replace(/[^a-z0-9_]/g, "_");
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Derives the deterministic Commerce ACL resource id for an app from its metadata id.
|
|
34
|
+
*
|
|
35
|
+
* The id is assembled as {@link PREFIX} + sanitized `metadataId`, where sanitization trims
|
|
36
|
+
* whitespace, lowercases, and replaces every character outside `[a-z0-9_]` with `_`.
|
|
37
|
+
* `"Magento_CommerceBackendUix::adminuisdk_app_"` is that fixed constant prefix — not a
|
|
38
|
+
* placeholder — so the example below is fully reproducible from the given argument:
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```
|
|
42
|
+
* getAclResourceId("approval-dashboard-app")
|
|
43
|
+
* // PREFIX + sanitize("approval-dashboard-app")
|
|
44
|
+
* // "Magento_CommerceBackendUix::adminuisdk_app_" + "approval_dashboard_app"
|
|
45
|
+
* // → "Magento_CommerceBackendUix::adminuisdk_app_approval_dashboard_app"
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @param metadataId - The application's `metadata.id` value (e.g. `"approval-dashboard-app"`).
|
|
49
|
+
* @returns The full Commerce ACL resource id, or an empty string when `metadataId` is blank.
|
|
50
|
+
*/
|
|
51
|
+
function getAclResourceId(metadataId) {
|
|
52
|
+
if (metadataId.trim() === "") return "";
|
|
53
|
+
return `${PREFIX}${sanitizeSegment(metadataId)}`;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Derives the deterministic Commerce ACL resource id for a custom (standalone) ACL resource
|
|
57
|
+
* declared under `adminUi.acl`. Mirrors the Commerce `AclResourceIdGenerator` `acl` token exactly.
|
|
58
|
+
*
|
|
59
|
+
* With only `resourceId`, returns the id of a top-level resource or a group node; with `childId`,
|
|
60
|
+
* returns the id of a leaf inside that group. Each segment is sanitized independently (trim,
|
|
61
|
+
* lowercase, non-`[a-z0-9_]` → `_`).
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```
|
|
65
|
+
* getCustomAclResourceId("my-app", "approve_refunds")
|
|
66
|
+
* // → "Magento_CommerceBackendUix::adminuisdk_app_my_app_acl_approve_refunds"
|
|
67
|
+
* getCustomAclResourceId("my-app", "reports", "export")
|
|
68
|
+
* // → "Magento_CommerceBackendUix::adminuisdk_app_my_app_acl_reports_export"
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @param metadataId - The application's `metadata.id` value.
|
|
72
|
+
* @param resourceId - The top-level resource or group `id` from `adminUi.acl`.
|
|
73
|
+
* @param childId - Optional child leaf `id` when addressing a resource inside a group.
|
|
74
|
+
* @returns The full Commerce ACL resource id, or an empty string when `metadataId` is blank.
|
|
75
|
+
*/
|
|
76
|
+
function getCustomAclResourceId(metadataId, resourceId, childId) {
|
|
77
|
+
const appRoot = getAclResourceId(metadataId);
|
|
78
|
+
if (appRoot === "") return "";
|
|
79
|
+
const base = `${appRoot}_acl_${sanitizeSegment(resourceId)}`;
|
|
80
|
+
return childId === void 0 ? base : `${base}_${sanitizeSegment(childId)}`;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Commerce entities an Admin UI component can attach to, using the same spelling Commerce
|
|
84
|
+
* sends in the wire-contract `gridType` field. Credit memo grids send `"creditmemo"` on the
|
|
85
|
+
* wire — not `"creditMemo"` — even though the corresponding config key (`adminUi.creditMemo`)
|
|
86
|
+
* is camelCase.
|
|
87
|
+
*
|
|
88
|
+
* Single source of truth for the entity vocabulary: `GridTypeSchema` derives its picklist from it.
|
|
89
|
+
*/
|
|
90
|
+
const ADMIN_UI_GRID_ENTITIES = [
|
|
91
|
+
"order",
|
|
92
|
+
"product",
|
|
93
|
+
"customer",
|
|
94
|
+
"invoice",
|
|
95
|
+
"creditmemo",
|
|
96
|
+
"shipment",
|
|
97
|
+
"newsletter"
|
|
98
|
+
];
|
|
99
|
+
/**
|
|
100
|
+
* Entities that support mass actions — a subset of `ADMIN_UI_GRID_ENTITIES`. Mass actions, unlike
|
|
101
|
+
* grid columns, are not available on the invoice, credit memo, or shipment grids.
|
|
102
|
+
* `MassActionGridTypeSchema` derives its picklist from it.
|
|
103
|
+
*/
|
|
104
|
+
const MASS_ACTION_ENTITIES = [
|
|
105
|
+
"order",
|
|
106
|
+
"product",
|
|
107
|
+
"customer",
|
|
108
|
+
"newsletter"
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
Object.defineProperty(exports, 'ADMIN_UI_GRID_ENTITIES', {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () {
|
|
115
|
+
return ADMIN_UI_GRID_ENTITIES;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
Object.defineProperty(exports, 'MASS_ACTION_ENTITIES', {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: function () {
|
|
121
|
+
return MASS_ACTION_ENTITIES;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(exports, 'getAclResourceId', {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
get: function () {
|
|
127
|
+
return getAclResourceId;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
Object.defineProperty(exports, 'getCustomAclResourceId', {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
get: function () {
|
|
133
|
+
return getCustomAclResourceId;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(exports, 'sanitizeSegment', {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
get: function () {
|
|
139
|
+
return sanitizeSegment;
|
|
140
|
+
}
|
|
141
|
+
});
|
package/dist/cjs/api/index.cjs
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
16
|
const require_rolldown_runtime = require('../rolldown-runtime-Bf2WWRga.cjs');
|
|
17
|
-
const require_acl_resource_id = require('../acl-resource-id-
|
|
17
|
+
const require_acl_resource_id = require('../acl-resource-id-nCj_Kne2.cjs');
|
|
18
18
|
const require_utils = require('../utils-CiBhSMw4.cjs');
|
|
19
19
|
let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
|
|
20
20
|
let _adobe_aio_commerce_lib_api = require("@adobe/aio-commerce-lib-api");
|
|
@@ -274,4 +274,6 @@ exports.AdminUiPermissionDeniedError = AdminUiPermissionDeniedError;
|
|
|
274
274
|
exports.AdminUiPermissionError = AdminUiPermissionError;
|
|
275
275
|
exports.createAdminUiApiClient = createAdminUiApiClient;
|
|
276
276
|
exports.getAclResourceId = require_acl_resource_id.getAclResourceId;
|
|
277
|
-
exports.getAdminUiPermissionClient = getAdminUiPermissionClient;
|
|
277
|
+
exports.getAdminUiPermissionClient = getAdminUiPermissionClient;
|
|
278
|
+
exports.getCustomAclResourceId = require_acl_resource_id.getCustomAclResourceId;
|
|
279
|
+
exports.sanitizeSegment = require_acl_resource_id.sanitizeSegment;
|
package/dist/cjs/api/index.d.cts
CHANGED
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { a as sanitizeSegment, i as getCustomAclResourceId, r as getAclResourceId, t as AdminUiEntity } from "../acl-resource-id-Bha1pOIk.cjs";
|
|
16
16
|
import { CommerceSdkErrorBase, CommerceSdkErrorOptions } from "@adobe/aio-commerce-lib-core/error";
|
|
17
17
|
import { AdobeCommerceHttpClient, CommerceHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
18
18
|
import * as v from "valibot";
|
|
19
19
|
//#region source/errors.d.ts
|
|
20
20
|
/** Base error for Admin UI SDK permission helper failures. */
|
|
21
|
-
declare class AdminUiPermissionError extends CommerceSdkErrorBase {}
|
|
21
|
+
export declare class AdminUiPermissionError extends CommerceSdkErrorBase {}
|
|
22
22
|
/** Options for {@link AdminUiPermissionDeniedError}. */
|
|
23
|
-
type AdminUiPermissionDeniedErrorOptions = CommerceSdkErrorOptions;
|
|
23
|
+
export type AdminUiPermissionDeniedErrorOptions = CommerceSdkErrorOptions;
|
|
24
24
|
/** Error thrown when the current user is denied access to an Admin UI SDK ACL resource. */
|
|
25
|
-
declare class AdminUiPermissionDeniedError extends AdminUiPermissionError {
|
|
25
|
+
export declare class AdminUiPermissionDeniedError extends AdminUiPermissionError {
|
|
26
26
|
readonly resource: string;
|
|
27
27
|
constructor(resource: string, options?: AdminUiPermissionDeniedErrorOptions);
|
|
28
28
|
}
|
|
@@ -33,7 +33,7 @@ declare class AdminUiPermissionDeniedError extends AdminUiPermissionError {
|
|
|
33
33
|
*
|
|
34
34
|
* @param params - The parameters to build the Commerce HTTP client.
|
|
35
35
|
*/
|
|
36
|
-
declare function createAdminUiApiClient(params: CommerceHttpClientParams): import("@adobe/aio-commerce-lib-api").ApiClientRecord<AdobeCommerceHttpClient, {
|
|
36
|
+
export declare function createAdminUiApiClient(params: CommerceHttpClientParams): import("@adobe/aio-commerce-lib-api").ApiClientRecord<AdobeCommerceHttpClient, {
|
|
37
37
|
registerExtension(httpClient: AdobeCommerceHttpClient, params: ExtensionRegistrationParams, fetchOptions?: import("ky").Options): Promise<RegisterExtensionResponse>;
|
|
38
38
|
unregisterExtension(httpClient: AdobeCommerceHttpClient, params: UnregisterExtensionParams, fetchOptions?: import("ky").Options): Promise<void>;
|
|
39
39
|
refreshExtension(httpClient: AdobeCommerceHttpClient, params: RefreshExtensionParams, fetchOptions?: import("ky").Options): Promise<void>;
|
|
@@ -43,11 +43,11 @@ declare function createAdminUiApiClient(params: CommerceHttpClientParams): impor
|
|
|
43
43
|
* An API client for the Admin UI API with all operations.
|
|
44
44
|
* @see {@link createAdminUiApiClient}
|
|
45
45
|
*/
|
|
46
|
-
type AdminUiApiClient = ReturnType<typeof createAdminUiApiClient>;
|
|
46
|
+
export type AdminUiApiClient = ReturnType<typeof createAdminUiApiClient>;
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region source/api/lib/permission-client.d.ts
|
|
49
49
|
/** Options used to create an Admin UI SDK permission client. */
|
|
50
|
-
type AdminUiPermissionClientOptions = {
|
|
50
|
+
export type AdminUiPermissionClientOptions = {
|
|
51
51
|
/** The application's `metadata.id` value. When provided, `check()` and `require()` can be called with no resource argument. */
|
|
52
52
|
appId?: string;
|
|
53
53
|
/**
|
|
@@ -62,7 +62,7 @@ type AdminUiPermissionClientOptions = {
|
|
|
62
62
|
httpClient: AdobeCommerceHttpClient;
|
|
63
63
|
};
|
|
64
64
|
/** Client for checking the current user's Admin UI SDK resource permissions. */
|
|
65
|
-
type AdminUiPermissionClient = {
|
|
65
|
+
export type AdminUiPermissionClient = {
|
|
66
66
|
/**
|
|
67
67
|
* Checks whether the current user has the given ACL resource granted.
|
|
68
68
|
*
|
|
@@ -95,7 +95,7 @@ type AdminUiPermissionClient = {
|
|
|
95
95
|
* @param options - Client configuration; see {@link AdminUiPermissionClientOptions}.
|
|
96
96
|
* @returns An {@link AdminUiPermissionClient} for checking and requiring ACL resources.
|
|
97
97
|
*/
|
|
98
|
-
declare function getAdminUiPermissionClient(options: AdminUiPermissionClientOptions): AdminUiPermissionClient;
|
|
98
|
+
export declare function getAdminUiPermissionClient(options: AdminUiPermissionClientOptions): AdminUiPermissionClient;
|
|
99
99
|
//#endregion
|
|
100
100
|
//#region source/api/extensions/schema.d.ts
|
|
101
101
|
/** Parameters for POST /V1/adminuisdk/extension. */
|
|
@@ -133,4 +133,4 @@ declare const permissionCheckResponseSchema: v.ObjectSchema<{
|
|
|
133
133
|
/** Parsed Admin UI SDK permission check response. */
|
|
134
134
|
type PermissionCheckResponse = v.InferOutput<typeof permissionCheckResponseSchema>;
|
|
135
135
|
//#endregion
|
|
136
|
-
export {
|
|
136
|
+
export { type AdminUiEntity, type ExtensionRegistrationParams, type ExtensionRegistrationParamsSchema, type PermissionCheckResponse, type RefreshExtensionParams, type RefreshExtensionParamsSchema, type RegisterExtensionResponse, type UnregisterExtensionParams, type UnregisterExtensionParamsSchema, getAclResourceId, getCustomAclResourceId, type permissionCheckResponseSchema, sanitizeSegment };
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
16
|
const require_rolldown_runtime = require('../rolldown-runtime-Bf2WWRga.cjs');
|
|
17
|
-
const require_acl_resource_id = require('../acl-resource-id-
|
|
17
|
+
const require_acl_resource_id = require('../acl-resource-id-nCj_Kne2.cjs');
|
|
18
18
|
const require_schemas = require('../schemas-DRhCF0TF.cjs');
|
|
19
19
|
const require_utils = require('../utils-CiBhSMw4.cjs');
|
|
20
20
|
let valibot = require("valibot");
|
|
@@ -40,7 +40,8 @@ let _adobe_aio_commerce_lib_core_responses = require("@adobe/aio-commerce-lib-co
|
|
|
40
40
|
* ```
|
|
41
41
|
*
|
|
42
42
|
* @param metadataId - The application's `metadata.id` value (e.g. `"approval-dashboard-app"`).
|
|
43
|
-
* @param entity - The grid's Commerce entity (`"order"`, `"product"`,
|
|
43
|
+
* @param entity - The grid's Commerce entity (`"order"`, `"product"`, `"customer"`, `"invoice"`,
|
|
44
|
+
* `"creditmemo"`, `"shipment"`, or `"newsletter"`).
|
|
44
45
|
* @param columnId - The column's `id` value from `adminUi.<entity>.gridColumns.columns[].id`.
|
|
45
46
|
* @returns The full Commerce ACL resource id for the grid-column leaf node, or an empty string
|
|
46
47
|
* when `metadataId` is blank.
|
|
@@ -56,13 +57,12 @@ function getGridColumnAclResourceId(metadataId, entity, columnId) {
|
|
|
56
57
|
/**
|
|
57
58
|
* Grid identifier sent by Commerce on the `commerce/backend-ui/2` wire contract.
|
|
58
59
|
*
|
|
60
|
+
* Credit memo grids send `"creditmemo"` — not `"creditMemo"` — even though the corresponding
|
|
61
|
+
* config key (`adminUi.creditMemo`) is camelCase; see the Commerce module's `CustomColumn::GRID_MAP`.
|
|
62
|
+
*
|
|
59
63
|
* @see {@link https://github.com/magento-commerce/adobe-commerce-backend-uix Magento module reference}
|
|
60
64
|
*/
|
|
61
|
-
const GridTypeSchema = valibot.picklist(
|
|
62
|
-
"order",
|
|
63
|
-
"product",
|
|
64
|
-
"customer"
|
|
65
|
-
]);
|
|
65
|
+
const GridTypeSchema = valibot.picklist(require_acl_resource_id.ADMIN_UI_GRID_ENTITIES);
|
|
66
66
|
/**
|
|
67
67
|
* Schema for the JSON body Commerce POSTs to a grid column handler.
|
|
68
68
|
*
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { t as AdminUiEntity } from "../acl-resource-id-
|
|
15
|
+
import { t as AdminUiEntity } from "../acl-resource-id-Bha1pOIk.cjs";
|
|
16
16
|
import * as v from "valibot";
|
|
17
17
|
import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/responses";
|
|
18
18
|
//#region source/grid-columns/acl-resource-id.d.ts
|
|
@@ -34,20 +34,24 @@ import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/res
|
|
|
34
34
|
* ```
|
|
35
35
|
*
|
|
36
36
|
* @param metadataId - The application's `metadata.id` value (e.g. `"approval-dashboard-app"`).
|
|
37
|
-
* @param entity - The grid's Commerce entity (`"order"`, `"product"`,
|
|
37
|
+
* @param entity - The grid's Commerce entity (`"order"`, `"product"`, `"customer"`, `"invoice"`,
|
|
38
|
+
* `"creditmemo"`, `"shipment"`, or `"newsletter"`).
|
|
38
39
|
* @param columnId - The column's `id` value from `adminUi.<entity>.gridColumns.columns[].id`.
|
|
39
40
|
* @returns The full Commerce ACL resource id for the grid-column leaf node, or an empty string
|
|
40
41
|
* when `metadataId` is blank.
|
|
41
42
|
*/
|
|
42
|
-
declare function getGridColumnAclResourceId(metadataId: string, entity: AdminUiEntity, columnId: string): string;
|
|
43
|
+
export declare function getGridColumnAclResourceId(metadataId: string, entity: AdminUiEntity, columnId: string): string;
|
|
43
44
|
//#endregion
|
|
44
45
|
//#region source/grid-columns/requests/schema.d.ts
|
|
45
46
|
/**
|
|
46
47
|
* Grid identifier sent by Commerce on the `commerce/backend-ui/2` wire contract.
|
|
47
48
|
*
|
|
49
|
+
* Credit memo grids send `"creditmemo"` — not `"creditMemo"` — even though the corresponding
|
|
50
|
+
* config key (`adminUi.creditMemo`) is camelCase; see the Commerce module's `CustomColumn::GRID_MAP`.
|
|
51
|
+
*
|
|
48
52
|
* @see {@link https://github.com/magento-commerce/adobe-commerce-backend-uix Magento module reference}
|
|
49
53
|
*/
|
|
50
|
-
declare const GridTypeSchema: v.PicklistSchema<["order", "product", "customer"], undefined>;
|
|
54
|
+
export declare const GridTypeSchema: v.PicklistSchema<readonly ["order", "product", "customer", "invoice", "creditmemo", "shipment", "newsletter"], undefined>;
|
|
51
55
|
/**
|
|
52
56
|
* Schema for the JSON body Commerce POSTs to a grid column handler.
|
|
53
57
|
*
|
|
@@ -55,8 +59,8 @@ declare const GridTypeSchema: v.PicklistSchema<["order", "product", "customer"],
|
|
|
55
59
|
* per request). The upper bound is the Commerce side's contract and is not
|
|
56
60
|
* enforced here.
|
|
57
61
|
*/
|
|
58
|
-
declare const GridRequestSchema: v.ObjectSchema<{
|
|
59
|
-
readonly gridType: v.PicklistSchema<["order", "product", "customer"], undefined>;
|
|
62
|
+
export declare const GridRequestSchema: v.ObjectSchema<{
|
|
63
|
+
readonly gridType: v.PicklistSchema<readonly ["order", "product", "customer", "invoice", "creditmemo", "shipment", "newsletter"], undefined>;
|
|
60
64
|
readonly ids: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, undefined>, v.MinLengthAction<string[], 1, "The value of \"ids\" must contain at least one entry">]>;
|
|
61
65
|
readonly requestId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
62
66
|
}, undefined>;
|
|
@@ -83,7 +87,7 @@ type GridRequest = v.InferOutput<typeof GridRequestSchema>;
|
|
|
83
87
|
* }
|
|
84
88
|
* ```
|
|
85
89
|
*/
|
|
86
|
-
declare function parseGridRequest(input: unknown): GridRequest;
|
|
90
|
+
export declare function parseGridRequest(input: unknown): GridRequest;
|
|
87
91
|
//#endregion
|
|
88
92
|
//#region source/grid-columns/responses/types.d.ts
|
|
89
93
|
/** Cell values returned for a single row, keyed by `id`. */
|
|
@@ -126,7 +130,7 @@ type GridErrorBody = {
|
|
|
126
130
|
* );
|
|
127
131
|
* ```
|
|
128
132
|
*/
|
|
129
|
-
declare function okGridResponse(data: Record<string, GridRow>, defaults?: GridRow): SuccessResponse<GridSuccessBody>;
|
|
133
|
+
export declare function okGridResponse(data: Record<string, GridRow>, defaults?: GridRow): SuccessResponse<GridSuccessBody>;
|
|
130
134
|
/**
|
|
131
135
|
* Builds an error response for a grid column handler with the given HTTP status code.
|
|
132
136
|
*
|
|
@@ -140,6 +144,6 @@ declare function okGridResponse(data: Record<string, GridRow>, defaults?: GridRo
|
|
|
140
144
|
* return errorGridResponse(500, "Could not reach inventory service");
|
|
141
145
|
* ```
|
|
142
146
|
*/
|
|
143
|
-
declare function errorGridResponse(statusCode: number, errorMessage: string): ErrorResponse<GridErrorBody>;
|
|
147
|
+
export declare function errorGridResponse(statusCode: number, errorMessage: string): ErrorResponse<GridErrorBody>;
|
|
144
148
|
//#endregion
|
|
145
|
-
export {
|
|
149
|
+
export type { AdminUiEntity, GridErrorBody, GridRequest, GridRow, GridSuccessBody, GridType };
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
16
|
const require_rolldown_runtime = require('../rolldown-runtime-Bf2WWRga.cjs');
|
|
17
|
-
const require_acl_resource_id = require('../acl-resource-id-
|
|
17
|
+
const require_acl_resource_id = require('../acl-resource-id-nCj_Kne2.cjs');
|
|
18
18
|
const require_schemas = require('../schemas-DRhCF0TF.cjs');
|
|
19
19
|
const require_utils = require('../utils-CiBhSMw4.cjs');
|
|
20
20
|
let valibot = require("valibot");
|
|
@@ -40,7 +40,7 @@ let _adobe_aio_commerce_lib_core_responses = require("@adobe/aio-commerce-lib-co
|
|
|
40
40
|
* ```
|
|
41
41
|
*
|
|
42
42
|
* @param metadataId - The application's `metadata.id` value (e.g. `"approval-dashboard-app"`).
|
|
43
|
-
* @param entity - The grid's Commerce entity (`"order"`, `"product"`, or `"
|
|
43
|
+
* @param entity - The grid's Commerce entity (`"order"`, `"product"`, `"customer"`, or `"newsletter"`).
|
|
44
44
|
* @param actionId - The action's `id` value from `adminUi.<entity>.massActions[].id`.
|
|
45
45
|
* @returns The full Commerce ACL resource id for the mass-action leaf node, or an empty string
|
|
46
46
|
* when `metadataId` is blank.
|
|
@@ -57,11 +57,7 @@ function getMassActionAclResourceId(metadataId, entity, actionId) {
|
|
|
57
57
|
* Grid identifier sent by Commerce on the `commerce/backend-ui/2` wire contract
|
|
58
58
|
* for worker mass actions.
|
|
59
59
|
*/
|
|
60
|
-
const MassActionGridTypeSchema = valibot.picklist(
|
|
61
|
-
"order",
|
|
62
|
-
"product",
|
|
63
|
-
"customer"
|
|
64
|
-
]);
|
|
60
|
+
const MassActionGridTypeSchema = valibot.picklist(require_acl_resource_id.MASS_ACTION_ENTITIES);
|
|
65
61
|
/**
|
|
66
62
|
* Schema for the JSON body Commerce POSTs to a worker mass action handler.
|
|
67
63
|
*
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { t as AdminUiEntity } from "../acl-resource-id-
|
|
15
|
+
import { n as MassActionEntity, t as AdminUiEntity } from "../acl-resource-id-Bha1pOIk.cjs";
|
|
16
16
|
import * as v from "valibot";
|
|
17
17
|
import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/responses";
|
|
18
18
|
//#region source/mass-actions/acl-resource-id.d.ts
|
|
@@ -34,19 +34,19 @@ import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/res
|
|
|
34
34
|
* ```
|
|
35
35
|
*
|
|
36
36
|
* @param metadataId - The application's `metadata.id` value (e.g. `"approval-dashboard-app"`).
|
|
37
|
-
* @param entity - The grid's Commerce entity (`"order"`, `"product"`, or `"
|
|
37
|
+
* @param entity - The grid's Commerce entity (`"order"`, `"product"`, `"customer"`, or `"newsletter"`).
|
|
38
38
|
* @param actionId - The action's `id` value from `adminUi.<entity>.massActions[].id`.
|
|
39
39
|
* @returns The full Commerce ACL resource id for the mass-action leaf node, or an empty string
|
|
40
40
|
* when `metadataId` is blank.
|
|
41
41
|
*/
|
|
42
|
-
declare function getMassActionAclResourceId(metadataId: string, entity:
|
|
42
|
+
export declare function getMassActionAclResourceId(metadataId: string, entity: MassActionEntity, actionId: string): string;
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region source/mass-actions/worker/schema.d.ts
|
|
45
45
|
/**
|
|
46
46
|
* Grid identifier sent by Commerce on the `commerce/backend-ui/2` wire contract
|
|
47
47
|
* for worker mass actions.
|
|
48
48
|
*/
|
|
49
|
-
declare const MassActionGridTypeSchema: v.PicklistSchema<["order", "product", "customer"], undefined>;
|
|
49
|
+
export declare const MassActionGridTypeSchema: v.PicklistSchema<readonly ["order", "product", "customer", "newsletter"], undefined>;
|
|
50
50
|
/**
|
|
51
51
|
* Schema for the JSON body Commerce POSTs to a worker mass action handler.
|
|
52
52
|
*
|
|
@@ -54,8 +54,8 @@ declare const MassActionGridTypeSchema: v.PicklistSchema<["order", "product", "c
|
|
|
54
54
|
* IDs per request). The upper bound is the Commerce side's contract and is not
|
|
55
55
|
* enforced here.
|
|
56
56
|
*/
|
|
57
|
-
declare const MassActionRequestSchema: v.ObjectSchema<{
|
|
58
|
-
readonly gridType: v.PicklistSchema<["order", "product", "customer"], undefined>;
|
|
57
|
+
export declare const MassActionRequestSchema: v.ObjectSchema<{
|
|
58
|
+
readonly gridType: v.PicklistSchema<readonly ["order", "product", "customer", "newsletter"], undefined>;
|
|
59
59
|
readonly requestId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
60
60
|
readonly selectedIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, undefined>, v.MinLengthAction<string[], 1, "The value of \"selectedIds\" must contain at least one entry">]>;
|
|
61
61
|
}, undefined>;
|
|
@@ -88,7 +88,7 @@ type MassActionErrorBody = {
|
|
|
88
88
|
* }
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
|
-
declare function parseMassActionRequest(input: unknown): MassActionRequest;
|
|
91
|
+
export declare function parseMassActionRequest(input: unknown): MassActionRequest;
|
|
92
92
|
/**
|
|
93
93
|
* Builds an HTTP 200 success response for a worker mass action.
|
|
94
94
|
*
|
|
@@ -101,7 +101,7 @@ declare function parseMassActionRequest(input: unknown): MassActionRequest;
|
|
|
101
101
|
* return okMassActionResponse({ exported: selectedIds.length });
|
|
102
102
|
* ```
|
|
103
103
|
*/
|
|
104
|
-
declare function okMassActionResponse(body?: MassActionResponseBody): SuccessResponse<MassActionResponseBody>;
|
|
104
|
+
export declare function okMassActionResponse(body?: MassActionResponseBody): SuccessResponse<MassActionResponseBody>;
|
|
105
105
|
/**
|
|
106
106
|
* Builds an error response for a worker mass action with the given HTTP status code.
|
|
107
107
|
*
|
|
@@ -113,6 +113,6 @@ declare function okMassActionResponse(body?: MassActionResponseBody): SuccessRes
|
|
|
113
113
|
* return massActionErrorResponse(422, "Request entity is unprocessable");
|
|
114
114
|
* ```
|
|
115
115
|
*/
|
|
116
|
-
declare function massActionErrorResponse(statusCode: number, errorMessage: string): ErrorResponse<MassActionErrorBody>;
|
|
116
|
+
export declare function massActionErrorResponse(statusCode: number, errorMessage: string): ErrorResponse<MassActionErrorBody>;
|
|
117
117
|
//#endregion
|
|
118
|
-
export {
|
|
118
|
+
export type { AdminUiEntity, MassActionEntity, MassActionErrorBody, MassActionGridType, MassActionRequest, MassActionResponseBody };
|
package/dist/cjs/menu/index.cjs
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
|
-
const require_acl_resource_id = require('../acl-resource-id-
|
|
16
|
+
const require_acl_resource_id = require('../acl-resource-id-nCj_Kne2.cjs');
|
|
17
17
|
|
|
18
18
|
//#region source/menu/acl-resource-id.ts
|
|
19
19
|
/**
|
|
@@ -34,30 +34,29 @@
|
|
|
34
34
|
* @returns The full Commerce ACL resource id for the menu leaf node, or an empty string
|
|
35
35
|
* when `metadataId` is blank.
|
|
36
36
|
*/
|
|
37
|
-
declare function getMenuAclResourceId(metadataId: string, menuId: string): string;
|
|
37
|
+
export declare function getMenuAclResourceId(metadataId: string, menuId: string): string;
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region source/menu/paths.d.ts
|
|
40
40
|
/** Menu ID for "Catalog" in the Adobe Commerce admin */
|
|
41
|
-
declare const MENU_CATALOG = "catalog";
|
|
41
|
+
export declare const MENU_CATALOG = "catalog";
|
|
42
42
|
/** Menu ID for "Customers" in the Adobe Commerce admin */
|
|
43
|
-
declare const MENU_CUSTOMERS = "customers";
|
|
43
|
+
export declare const MENU_CUSTOMERS = "customers";
|
|
44
44
|
/** Menu ID for "Marketing" in the Adobe Commerce admin */
|
|
45
|
-
declare const MENU_MARKETING = "marketing";
|
|
45
|
+
export declare const MENU_MARKETING = "marketing";
|
|
46
46
|
/** Menu ID for "Content" in the Adobe Commerce admin */
|
|
47
|
-
declare const MENU_CONTENT = "content";
|
|
47
|
+
export declare const MENU_CONTENT = "content";
|
|
48
48
|
/** Menu ID for "Reports" in the Adobe Commerce admin */
|
|
49
|
-
declare const MENU_REPORTS = "reports";
|
|
49
|
+
export declare const MENU_REPORTS = "reports";
|
|
50
50
|
/** Menu ID for "Sales" in the Adobe Commerce admin */
|
|
51
|
-
declare const MENU_SALES = "sales";
|
|
51
|
+
export declare const MENU_SALES = "sales";
|
|
52
52
|
/** Menu ID for "Stores" in the Adobe Commerce admin */
|
|
53
|
-
declare const MENU_STORES = "stores";
|
|
53
|
+
export declare const MENU_STORES = "stores";
|
|
54
54
|
/** Menu ID for "System" in the Adobe Commerce admin */
|
|
55
|
-
declare const MENU_SYSTEM = "system";
|
|
55
|
+
export declare const MENU_SYSTEM = "system";
|
|
56
56
|
/** All Commerce Admin menus available for app attachment. */
|
|
57
|
-
declare const COMMERCE_MENUS: readonly ["sales", "catalog", "customers", "marketing", "content", "reports", "stores", "system"];
|
|
57
|
+
export declare const COMMERCE_MENUS: readonly ["sales", "catalog", "customers", "marketing", "content", "reports", "stores", "system"];
|
|
58
58
|
/** A union type of all known supported Commerce Admin menu IDs. */
|
|
59
|
-
type CommerceMenu = (typeof COMMERCE_MENUS)[number];
|
|
59
|
+
export type CommerceMenu = (typeof COMMERCE_MENUS)[number];
|
|
60
60
|
/** Returns true if the given string is a known Commerce Admin menu ID. */
|
|
61
|
-
declare function isCommerceMenu(menu: string): menu is CommerceMenu;
|
|
62
|
-
//#endregion
|
|
63
|
-
export { COMMERCE_MENUS, CommerceMenu, MENU_CATALOG, MENU_CONTENT, MENU_CUSTOMERS, MENU_MARKETING, MENU_REPORTS, MENU_SALES, MENU_STORES, MENU_SYSTEM, getMenuAclResourceId, isCommerceMenu };
|
|
61
|
+
export declare function isCommerceMenu(menu: string): menu is CommerceMenu;
|
|
62
|
+
//#endregion
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
16
|
const require_rolldown_runtime = require('../rolldown-runtime-Bf2WWRga.cjs');
|
|
17
|
-
const require_acl_resource_id = require('../acl-resource-id-
|
|
17
|
+
const require_acl_resource_id = require('../acl-resource-id-nCj_Kne2.cjs');
|
|
18
18
|
const require_schemas = require('../schemas-DRhCF0TF.cjs');
|
|
19
19
|
const require_utils = require('../utils-CiBhSMw4.cjs');
|
|
20
20
|
let valibot = require("valibot");
|