/** * @license * * Copyright 2026 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ //#region source/api/lib/acl-resource-id.d.ts /** * Derives the deterministic Commerce ACL resource id for an app from its metadata id. * * The id is assembled as {@link PREFIX} + sanitized `metadataId`, where sanitization trims * whitespace, lowercases, and replaces every character outside `[a-z0-9_]` with `_`. * `"Magento_CommerceBackendUix::adminuisdk_app_"` is that fixed constant prefix — not a * placeholder — so the example below is fully reproducible from the given argument: * * @example * ``` * getAclResourceId("approval-dashboard-app") * // PREFIX + sanitize("approval-dashboard-app") * // "Magento_CommerceBackendUix::adminuisdk_app_" + "approval_dashboard_app" * // → "Magento_CommerceBackendUix::adminuisdk_app_approval_dashboard_app" * ``` * * @param metadataId - The application's `metadata.id` value (e.g. `"approval-dashboard-app"`). * @returns The full Commerce ACL resource id, or an empty string when `metadataId` is blank. */ declare function getAclResourceId(metadataId: string): string; /** Commerce entity an Admin UI component is attached to. */ type AdminUiEntity = "order" | "product" | "customer"; //#endregion export { getAclResourceId as n, AdminUiEntity as t };