@adobe/aio-commerce-lib-admin-ui 1.2.0-beta-20260930143021 → 1.2.0-beta-20261028171115

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 (35) hide show
  1. package/CHANGELOG.md +5 -4
  2. package/dist/cjs/{acl-resource-id-nCj_Kne2.cjs → acl-resource-id-Bjpse1tR.cjs} +9 -11
  3. package/dist/cjs/{acl-resource-id-Bha1pOIk.d.cts → acl-resource-id-CXVgxUmB.d.cts} +2 -4
  4. package/dist/cjs/api/index.cjs +11 -19
  5. package/dist/cjs/api/index.d.cts +1 -11
  6. package/dist/cjs/grid-columns/index.cjs +8 -12
  7. package/dist/cjs/grid-columns/index.d.cts +1 -13
  8. package/dist/cjs/mass-actions/index.cjs +8 -11
  9. package/dist/cjs/mass-actions/index.d.cts +4 -12
  10. package/dist/cjs/menu/index.cjs +3 -5
  11. package/dist/cjs/menu/index.d.cts +1 -5
  12. package/dist/cjs/order-view-buttons/index.cjs +7 -10
  13. package/dist/cjs/order-view-buttons/index.d.cts +0 -8
  14. package/dist/cjs/{rolldown-runtime-Bf2WWRga.cjs → rolldown-runtime-DREAZOkv.cjs} +3 -4
  15. package/dist/cjs/{schemas-DRhCF0TF.cjs → schemas-C-tIBLog.cjs} +3 -4
  16. package/dist/cjs/{utils-CiBhSMw4.cjs → utils-D5meZ8l8.cjs} +3 -4
  17. package/dist/cjs/web/index.cjs +26 -49
  18. package/dist/cjs/web/index.d.cts +0 -20
  19. package/dist/es/{acl-resource-id-CHw95qd2.mjs → acl-resource-id-C4Is2i_h.mjs} +4 -6
  20. package/dist/es/{acl-resource-id-Bha1pOIk.d.mts → acl-resource-id-CXVgxUmB.d.mts} +2 -4
  21. package/dist/es/api/index.d.mts +1 -11
  22. package/dist/es/api/index.mjs +11 -20
  23. package/dist/es/grid-columns/index.d.mts +1 -13
  24. package/dist/es/grid-columns/index.mjs +7 -11
  25. package/dist/es/mass-actions/index.d.mts +4 -12
  26. package/dist/es/mass-actions/index.mjs +7 -10
  27. package/dist/es/menu/index.d.mts +1 -5
  28. package/dist/es/menu/index.mjs +3 -5
  29. package/dist/es/order-view-buttons/index.d.mts +0 -8
  30. package/dist/es/order-view-buttons/index.mjs +6 -9
  31. package/dist/es/{schemas-BFT8ys8P.mjs → schemas-Dftlsf98.mjs} +1 -2
  32. package/dist/es/{utils-COPGW1HO.mjs → utils-G-EDWmew.mjs} +1 -2
  33. package/dist/es/web/index.d.mts +0 -20
  34. package/dist/es/web/index.mjs +25 -48
  35. package/package.json +4 -5
package/CHANGELOG.md CHANGED
@@ -1,17 +1,18 @@
1
1
  # @adobe/aio-commerce-lib-admin-ui
2
2
 
3
- ## 1.2.0-beta-20260930143021
3
+ ## 1.2.0-beta-20261028171115
4
4
 
5
5
  ### Minor Changes
6
6
 
7
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
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.
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 request parsing and ACL resource id helpers, so handlers can serve Newsletter Subscriber grids.
10
10
 
11
11
  ### Patch Changes
12
12
 
13
- - Updated dependencies []:
14
- - @adobe/aio-commerce-lib-api@1.4.1-beta-20260930143021
13
+ - Updated dependencies [[`d78221e`](https://github.com/adobe/aio-commerce-sdk/commit/d78221e01894d2209b7864aca6a5fbfab93c7192), [`395eb22`](https://github.com/adobe/aio-commerce-sdk/commit/395eb22da7646944d5e5f02e1517dc23cc3ebfe6), [`9145e82`](https://github.com/adobe/aio-commerce-sdk/commit/9145e822b17b99465bfee649fae69d61c11bc0ab)]:
14
+ - @adobe/aio-commerce-lib-api@1.4.1-beta-20261028171115
15
+ - @adobe/aio-commerce-lib-core@1.3.0-beta-20261028171115
15
16
 
16
17
  ## 1.1.0
17
18
 
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- //#region source/api/lib/acl-resource-id.ts
15
+ // source/api/lib/acl-resource-id.ts
16
16
  /**
17
17
  * Fixed, constant prefix that every Admin UI SDK ACL resource id starts with.
18
18
  * It is owned by Commerce and is a stable part of the cross-repo id contract.
@@ -27,7 +27,7 @@ const PREFIX = "Magento_CommerceBackendUix::adminuisdk_app_";
27
27
  * config id.
28
28
  */
29
29
  function sanitizeSegment(segment) {
30
- return segment.trim().toLowerCase().replace(/[^a-z0-9_]/g, "_");
30
+ return segment.trim().toLowerCase().replace(/[^a-z0-9_]/gu, (character) => "_".repeat(character.length));
31
31
  }
32
32
  /**
33
33
  * Derives the deterministic Commerce ACL resource id for an app from its metadata id.
@@ -98,42 +98,40 @@ const ADMIN_UI_GRID_ENTITIES = [
98
98
  ];
99
99
  /**
100
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.
101
+ * grid columns, are not available on the invoice, credit memo, shipment, or newsletter grids.
102
102
  * `MassActionGridTypeSchema` derives its picklist from it.
103
103
  */
104
104
  const MASS_ACTION_ENTITIES = [
105
105
  "order",
106
106
  "product",
107
- "customer",
108
- "newsletter"
107
+ "customer"
109
108
  ];
110
109
 
111
- //#endregion
112
- Object.defineProperty(exports, 'ADMIN_UI_GRID_ENTITIES', {
110
+ Object.defineProperty(exports, "ADMIN_UI_GRID_ENTITIES", {
113
111
  enumerable: true,
114
112
  get: function () {
115
113
  return ADMIN_UI_GRID_ENTITIES;
116
114
  }
117
115
  });
118
- Object.defineProperty(exports, 'MASS_ACTION_ENTITIES', {
116
+ Object.defineProperty(exports, "MASS_ACTION_ENTITIES", {
119
117
  enumerable: true,
120
118
  get: function () {
121
119
  return MASS_ACTION_ENTITIES;
122
120
  }
123
121
  });
124
- Object.defineProperty(exports, 'getAclResourceId', {
122
+ Object.defineProperty(exports, "getAclResourceId", {
125
123
  enumerable: true,
126
124
  get: function () {
127
125
  return getAclResourceId;
128
126
  }
129
127
  });
130
- Object.defineProperty(exports, 'getCustomAclResourceId', {
128
+ Object.defineProperty(exports, "getCustomAclResourceId", {
131
129
  enumerable: true,
132
130
  get: function () {
133
131
  return getCustomAclResourceId;
134
132
  }
135
133
  });
136
- Object.defineProperty(exports, 'sanitizeSegment', {
134
+ Object.defineProperty(exports, "sanitizeSegment", {
137
135
  enumerable: true,
138
136
  get: function () {
139
137
  return sanitizeSegment;
@@ -12,7 +12,6 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- //#region source/api/lib/acl-resource-id.d.ts
16
15
  /**
17
16
  * Sanitizes a single ACL id segment: trims whitespace, lowercases, and replaces every
18
17
  * character outside [a-z0-9_] with an underscore. This mirrors the Commerce module's own
@@ -75,11 +74,10 @@ declare const ADMIN_UI_GRID_ENTITIES: readonly ["order", "product", "customer",
75
74
  type AdminUiEntity = (typeof ADMIN_UI_GRID_ENTITIES)[number];
76
75
  /**
77
76
  * 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.
77
+ * grid columns, are not available on the invoice, credit memo, shipment, or newsletter grids.
79
78
  * `MassActionGridTypeSchema` derives its picklist from it.
80
79
  */
81
- declare const MASS_ACTION_ENTITIES: readonly ["order", "product", "customer", "newsletter"];
80
+ declare const MASS_ACTION_ENTITIES: readonly ["order", "product", "customer"];
82
81
  /** Commerce entity a mass action is attached to. */
83
82
  type MassActionEntity = (typeof MASS_ACTION_ENTITIES)[number];
84
- //#endregion
85
83
  export { sanitizeSegment as a, getCustomAclResourceId as i, MassActionEntity as n, getAclResourceId as r, AdminUiEntity as t };
@@ -13,16 +13,16 @@
13
13
  */
14
14
 
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
- const require_rolldown_runtime = require('../rolldown-runtime-Bf2WWRga.cjs');
17
- const require_acl_resource_id = require('../acl-resource-id-nCj_Kne2.cjs');
18
- const require_utils = require('../utils-CiBhSMw4.cjs');
16
+ const require_rolldown_runtime = require("../rolldown-runtime-DREAZOkv.cjs");
17
+ const require_acl_resource_id = require("../acl-resource-id-Bjpse1tR.cjs");
18
+ const require_utils = require("../utils-D5meZ8l8.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");
21
21
  let valibot = require("valibot");
22
22
  valibot = require_rolldown_runtime.__toESM(valibot, 1);
23
23
  let ky = require("ky");
24
24
 
25
- //#region source/errors.ts
25
+ // source/errors.ts
26
26
  /** Base error for Admin UI SDK permission helper failures. */
27
27
  var AdminUiPermissionError = class extends _adobe_aio_commerce_lib_core_error.CommerceSdkErrorBase {};
28
28
  /** Error thrown when the current user is denied access to an Admin UI SDK ACL resource. */
@@ -34,8 +34,7 @@ var AdminUiPermissionDeniedError = class extends AdminUiPermissionError {
34
34
  }
35
35
  };
36
36
 
37
- //#endregion
38
- //#region source/api/config/endpoints.ts
37
+ // source/api/config/endpoints.ts
39
38
  var endpoints_exports$1 = /* @__PURE__ */ require_rolldown_runtime.__exportAll({ enableAdminUiSdk: () => enableAdminUiSdk });
40
39
  /**
41
40
  * Enables the Admin UI SDK in Commerce via PUT /V1/adminuisdk/config.
@@ -56,8 +55,7 @@ async function enableAdminUiSdk(httpClient, fetchOptions) {
56
55
  }).json();
57
56
  }
58
57
 
59
- //#endregion
60
- //#region source/api/extensions/schema.ts
58
+ // source/api/extensions/schema.ts
61
59
  /** Parameters for POST /V1/adminuisdk/extension. */
62
60
  const ExtensionRegistrationParamsSchema = valibot.object({
63
61
  extensionName: valibot.pipe(valibot.string(), valibot.minLength(1)),
@@ -75,8 +73,7 @@ const RefreshExtensionParamsSchema = valibot.object({
75
73
  workspaceName: valibot.pipe(valibot.string(), valibot.minLength(1))
76
74
  });
77
75
 
78
- //#endregion
79
- //#region source/api/extensions/endpoints.ts
76
+ // source/api/extensions/endpoints.ts
80
77
  var endpoints_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
81
78
  refreshExtension: () => refreshExtension,
82
79
  registerExtension: () => registerExtension,
@@ -132,8 +129,7 @@ async function refreshExtension(httpClient, params, fetchOptions) {
132
129
  return httpClient.post(`adminuisdk/extension/${workspaceName}/${extensionName}/refresh`, fetchOptions).then((_res) => {});
133
130
  }
134
131
 
135
- //#endregion
136
- //#region source/api/lib/api-client.ts
132
+ // source/api/lib/api-client.ts
137
133
  /**
138
134
  * Creates a new API client for the Admin UI API with all available operations.
139
135
  *
@@ -146,13 +142,11 @@ function createAdminUiApiClient(params) {
146
142
  });
147
143
  }
148
144
 
149
- //#endregion
150
- //#region source/api/permissions/schema.ts
145
+ // source/api/permissions/schema.ts
151
146
  /** Response shape returned by the Admin UI SDK permission check endpoint. */
152
147
  const permissionCheckResponseSchema = valibot.object({ allowed: valibot.boolean() });
153
148
 
154
- //#endregion
155
- //#region source/api/permissions/endpoints.ts
149
+ // source/api/permissions/endpoints.ts
156
150
  /**
157
151
  * Checks whether the current user has the given ACL resource granted via POST /V1/adminuisdk/permission/check.
158
152
  * This is the raw HTTP call — prefer {@link getAdminUiPermissionClient} for caching and deduplication.
@@ -167,8 +161,7 @@ async function checkPermission(httpClient, params) {
167
161
  return require_utils.parseOrThrow(permissionCheckResponseSchema, raw);
168
162
  }
169
163
 
170
- //#endregion
171
- //#region source/api/lib/permission-client.ts
164
+ // source/api/lib/permission-client.ts
172
165
  const DEFAULT_CACHE_TTL_MS = 3e5;
173
166
  /** Returns true when the error is an HTTP 401 Unauthorized response from ky. */
174
167
  function isUnauthorizedError(error) {
@@ -269,7 +262,6 @@ function getAdminUiPermissionClient(options) {
269
262
  };
270
263
  }
271
264
 
272
- //#endregion
273
265
  exports.AdminUiPermissionDeniedError = AdminUiPermissionDeniedError;
274
266
  exports.AdminUiPermissionError = AdminUiPermissionError;
275
267
  exports.createAdminUiApiClient = createAdminUiApiClient;
@@ -12,11 +12,10 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { a as sanitizeSegment, i as getCustomAclResourceId, r as getAclResourceId, t as AdminUiEntity } from "../acl-resource-id-Bha1pOIk.cjs";
15
+ import { a as sanitizeSegment, i as getCustomAclResourceId, r as getAclResourceId, t as AdminUiEntity } from "../acl-resource-id-CXVgxUmB.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
- //#region source/errors.d.ts
20
19
  /** Base error for Admin UI SDK permission helper failures. */
21
20
  export declare class AdminUiPermissionError extends CommerceSdkErrorBase {}
22
21
  /** Options for {@link AdminUiPermissionDeniedError}. */
@@ -26,8 +25,6 @@ export declare class AdminUiPermissionDeniedError extends AdminUiPermissionError
26
25
  readonly resource: string;
27
26
  constructor(resource: string, options?: AdminUiPermissionDeniedErrorOptions);
28
27
  }
29
- //#endregion
30
- //#region source/api/lib/api-client.d.ts
31
28
  /**
32
29
  * Creates a new API client for the Admin UI API with all available operations.
33
30
  *
@@ -44,8 +41,6 @@ export declare function createAdminUiApiClient(params: CommerceHttpClientParams)
44
41
  * @see {@link createAdminUiApiClient}
45
42
  */
46
43
  export type AdminUiApiClient = ReturnType<typeof createAdminUiApiClient>;
47
- //#endregion
48
- //#region source/api/lib/permission-client.d.ts
49
44
  /** Options used to create an Admin UI SDK permission client. */
50
45
  export type AdminUiPermissionClientOptions = {
51
46
  /** The application's `metadata.id` value. When provided, `check()` and `require()` can be called with no resource argument. */
@@ -96,8 +91,6 @@ export type AdminUiPermissionClient = {
96
91
  * @returns An {@link AdminUiPermissionClient} for checking and requiring ACL resources.
97
92
  */
98
93
  export declare function getAdminUiPermissionClient(options: AdminUiPermissionClientOptions): AdminUiPermissionClient;
99
- //#endregion
100
- //#region source/api/extensions/schema.d.ts
101
94
  /** Parameters for POST /V1/adminuisdk/extension. */
102
95
  declare const ExtensionRegistrationParamsSchema: v.ObjectSchema<{
103
96
  readonly extensionName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -124,13 +117,10 @@ type RefreshExtensionParams = v.InferInput<typeof RefreshExtensionParamsSchema>;
124
117
  type RegisterExtensionResponse = {
125
118
  extensionId: string;
126
119
  };
127
- //#endregion
128
- //#region source/api/permissions/schema.d.ts
129
120
  /** Response shape returned by the Admin UI SDK permission check endpoint. */
130
121
  declare const permissionCheckResponseSchema: v.ObjectSchema<{
131
122
  readonly allowed: v.BooleanSchema<undefined>;
132
123
  }, undefined>;
133
124
  /** Parsed Admin UI SDK permission check response. */
134
125
  type PermissionCheckResponse = v.InferOutput<typeof permissionCheckResponseSchema>;
135
- //#endregion
136
126
  export { type AdminUiEntity, type ExtensionRegistrationParams, type ExtensionRegistrationParamsSchema, type PermissionCheckResponse, type RefreshExtensionParams, type RefreshExtensionParamsSchema, type RegisterExtensionResponse, type UnregisterExtensionParams, type UnregisterExtensionParamsSchema, getAclResourceId, getCustomAclResourceId, type permissionCheckResponseSchema, sanitizeSegment };
@@ -13,15 +13,15 @@
13
13
  */
14
14
 
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
- const require_rolldown_runtime = require('../rolldown-runtime-Bf2WWRga.cjs');
17
- const require_acl_resource_id = require('../acl-resource-id-nCj_Kne2.cjs');
18
- const require_schemas = require('../schemas-DRhCF0TF.cjs');
19
- const require_utils = require('../utils-CiBhSMw4.cjs');
16
+ const require_rolldown_runtime = require("../rolldown-runtime-DREAZOkv.cjs");
17
+ const require_acl_resource_id = require("../acl-resource-id-Bjpse1tR.cjs");
18
+ const require_schemas = require("../schemas-C-tIBLog.cjs");
19
+ const require_utils = require("../utils-D5meZ8l8.cjs");
20
20
  let valibot = require("valibot");
21
21
  valibot = require_rolldown_runtime.__toESM(valibot, 1);
22
22
  let _adobe_aio_commerce_lib_core_responses = require("@adobe/aio-commerce-lib-core/responses");
23
23
 
24
- //#region source/grid-columns/acl-resource-id.ts
24
+ // source/grid-columns/acl-resource-id.ts
25
25
  /**
26
26
  * Derives the deterministic Commerce ACL resource id for a grid column.
27
27
  *
@@ -52,8 +52,7 @@ function getGridColumnAclResourceId(metadataId, entity, columnId) {
52
52
  return `${appRoot}_${entity}_gridcolumns_${require_acl_resource_id.sanitizeSegment(columnId)}`;
53
53
  }
54
54
 
55
- //#endregion
56
- //#region source/grid-columns/requests/schema.ts
55
+ // source/grid-columns/requests/schema.ts
57
56
  /**
58
57
  * Grid identifier sent by Commerce on the `commerce/backend-ui/2` wire contract.
59
58
  *
@@ -76,8 +75,7 @@ const GridRequestSchema = valibot.object({
76
75
  requestId: require_schemas.nonEmptyStringValueSchema("requestId")
77
76
  });
78
77
 
79
- //#endregion
80
- //#region source/grid-columns/requests/presets.ts
78
+ // source/grid-columns/requests/presets.ts
81
79
  /**
82
80
  * Parses and validates the JSON body Commerce POSTs to a grid column handler.
83
81
  *
@@ -97,8 +95,7 @@ function parseGridRequest(input) {
97
95
  return require_utils.parseOrThrow(GridRequestSchema, input, "Invalid grid column request");
98
96
  }
99
97
 
100
- //#endregion
101
- //#region source/grid-columns/responses/presets.ts
98
+ // source/grid-columns/responses/presets.ts
102
99
  /**
103
100
  * Builds an HTTP 200 success response carrying the grid column data envelope
104
101
  * Commerce expects on the `commerce/backend-ui/2` wire contract.
@@ -142,7 +139,6 @@ function errorGridResponse(statusCode, errorMessage) {
142
139
  return (0, _adobe_aio_commerce_lib_core_responses.buildErrorResponse)(statusCode, { body: { message: errorMessage } });
143
140
  }
144
141
 
145
- //#endregion
146
142
  exports.GridRequestSchema = GridRequestSchema;
147
143
  exports.GridTypeSchema = GridTypeSchema;
148
144
  exports.errorGridResponse = errorGridResponse;
@@ -12,10 +12,9 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { t as AdminUiEntity } from "../acl-resource-id-Bha1pOIk.cjs";
15
+ import { t as AdminUiEntity } from "../acl-resource-id-CXVgxUmB.cjs";
16
16
  import * as v from "valibot";
17
17
  import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/responses";
18
- //#region source/grid-columns/acl-resource-id.d.ts
19
18
  /**
20
19
  * Derives the deterministic Commerce ACL resource id for a grid column.
21
20
  *
@@ -41,8 +40,6 @@ import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/res
41
40
  * when `metadataId` is blank.
42
41
  */
43
42
  export declare function getGridColumnAclResourceId(metadataId: string, entity: AdminUiEntity, columnId: string): string;
44
- //#endregion
45
- //#region source/grid-columns/requests/schema.d.ts
46
43
  /**
47
44
  * Grid identifier sent by Commerce on the `commerce/backend-ui/2` wire contract.
48
45
  *
@@ -64,14 +61,10 @@ export declare const GridRequestSchema: v.ObjectSchema<{
64
61
  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">]>;
65
62
  readonly requestId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
66
63
  }, undefined>;
67
- //#endregion
68
- //#region source/grid-columns/requests/types.d.ts
69
64
  /** Grid identifier sent on the wire. */
70
65
  type GridType = v.InferOutput<typeof GridTypeSchema>;
71
66
  /** Parsed request body sent by Commerce to a grid column handler. */
72
67
  type GridRequest = v.InferOutput<typeof GridRequestSchema>;
73
- //#endregion
74
- //#region source/grid-columns/requests/presets.d.ts
75
68
  /**
76
69
  * Parses and validates the JSON body Commerce POSTs to a grid column handler.
77
70
  *
@@ -88,8 +81,6 @@ type GridRequest = v.InferOutput<typeof GridRequestSchema>;
88
81
  * ```
89
82
  */
90
83
  export declare function parseGridRequest(input: unknown): GridRequest;
91
- //#endregion
92
- //#region source/grid-columns/responses/types.d.ts
93
84
  /** Cell values returned for a single row, keyed by `id`. */
94
85
  type GridRow = Record<string, unknown>;
95
86
  /**
@@ -108,8 +99,6 @@ type GridSuccessBody = {
108
99
  type GridErrorBody = {
109
100
  message: string;
110
101
  };
111
- //#endregion
112
- //#region source/grid-columns/responses/presets.d.ts
113
102
  /**
114
103
  * Builds an HTTP 200 success response carrying the grid column data envelope
115
104
  * Commerce expects on the `commerce/backend-ui/2` wire contract.
@@ -145,5 +134,4 @@ export declare function okGridResponse(data: Record<string, GridRow>, defaults?:
145
134
  * ```
146
135
  */
147
136
  export declare function errorGridResponse(statusCode: number, errorMessage: string): ErrorResponse<GridErrorBody>;
148
- //#endregion
149
137
  export type { AdminUiEntity, GridErrorBody, GridRequest, GridRow, GridSuccessBody, GridType };
@@ -13,15 +13,15 @@
13
13
  */
14
14
 
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
- const require_rolldown_runtime = require('../rolldown-runtime-Bf2WWRga.cjs');
17
- const require_acl_resource_id = require('../acl-resource-id-nCj_Kne2.cjs');
18
- const require_schemas = require('../schemas-DRhCF0TF.cjs');
19
- const require_utils = require('../utils-CiBhSMw4.cjs');
16
+ const require_rolldown_runtime = require("../rolldown-runtime-DREAZOkv.cjs");
17
+ const require_acl_resource_id = require("../acl-resource-id-Bjpse1tR.cjs");
18
+ const require_schemas = require("../schemas-C-tIBLog.cjs");
19
+ const require_utils = require("../utils-D5meZ8l8.cjs");
20
20
  let valibot = require("valibot");
21
21
  valibot = require_rolldown_runtime.__toESM(valibot, 1);
22
22
  let _adobe_aio_commerce_lib_core_responses = require("@adobe/aio-commerce-lib-core/responses");
23
23
 
24
- //#region source/mass-actions/acl-resource-id.ts
24
+ // source/mass-actions/acl-resource-id.ts
25
25
  /**
26
26
  * Derives the deterministic Commerce ACL resource id for a mass action.
27
27
  *
@@ -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"`, `"customer"`, or `"newsletter"`).
43
+ * @param entity - The grid's Commerce entity (`"order"`, `"product"`, or `"customer"`).
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.
@@ -51,8 +51,7 @@ function getMassActionAclResourceId(metadataId, entity, actionId) {
51
51
  return `${appRoot}_${entity}_massactions_${require_acl_resource_id.sanitizeSegment(actionId)}`;
52
52
  }
53
53
 
54
- //#endregion
55
- //#region source/mass-actions/worker/schema.ts
54
+ // source/mass-actions/worker/schema.ts
56
55
  /**
57
56
  * Grid identifier sent by Commerce on the `commerce/backend-ui/2` wire contract
58
57
  * for worker mass actions.
@@ -71,8 +70,7 @@ const MassActionRequestSchema = valibot.object({
71
70
  selectedIds: valibot.pipe(valibot.array(require_schemas.nonEmptyStringValueSchema("id")), valibot.minLength(1, "The value of \"selectedIds\" must contain at least one entry"))
72
71
  });
73
72
 
74
- //#endregion
75
- //#region source/mass-actions/worker/presets.ts
73
+ // source/mass-actions/worker/presets.ts
76
74
  /**
77
75
  * Parses and validates the JSON body Commerce POSTs to a worker mass action handler.
78
76
  *
@@ -121,7 +119,6 @@ function massActionErrorResponse(statusCode, errorMessage) {
121
119
  return (0, _adobe_aio_commerce_lib_core_responses.buildErrorResponse)(statusCode, { body: { message: errorMessage } });
122
120
  }
123
121
 
124
- //#endregion
125
122
  exports.MassActionGridTypeSchema = MassActionGridTypeSchema;
126
123
  exports.MassActionRequestSchema = MassActionRequestSchema;
127
124
  exports.getMassActionAclResourceId = getMassActionAclResourceId;
@@ -12,10 +12,9 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { n as MassActionEntity, t as AdminUiEntity } from "../acl-resource-id-Bha1pOIk.cjs";
15
+ import { n as MassActionEntity, t as AdminUiEntity } from "../acl-resource-id-CXVgxUmB.cjs";
16
16
  import * as v from "valibot";
17
17
  import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/responses";
18
- //#region source/mass-actions/acl-resource-id.d.ts
19
18
  /**
20
19
  * Derives the deterministic Commerce ACL resource id for a mass action.
21
20
  *
@@ -34,19 +33,17 @@ import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/res
34
33
  * ```
35
34
  *
36
35
  * @param metadataId - The application's `metadata.id` value (e.g. `"approval-dashboard-app"`).
37
- * @param entity - The grid's Commerce entity (`"order"`, `"product"`, `"customer"`, or `"newsletter"`).
36
+ * @param entity - The grid's Commerce entity (`"order"`, `"product"`, or `"customer"`).
38
37
  * @param actionId - The action's `id` value from `adminUi.<entity>.massActions[].id`.
39
38
  * @returns The full Commerce ACL resource id for the mass-action leaf node, or an empty string
40
39
  * when `metadataId` is blank.
41
40
  */
42
41
  export declare function getMassActionAclResourceId(metadataId: string, entity: MassActionEntity, actionId: string): string;
43
- //#endregion
44
- //#region source/mass-actions/worker/schema.d.ts
45
42
  /**
46
43
  * Grid identifier sent by Commerce on the `commerce/backend-ui/2` wire contract
47
44
  * for worker mass actions.
48
45
  */
49
- export declare const MassActionGridTypeSchema: v.PicklistSchema<readonly ["order", "product", "customer", "newsletter"], undefined>;
46
+ export declare const MassActionGridTypeSchema: v.PicklistSchema<readonly ["order", "product", "customer"], undefined>;
50
47
  /**
51
48
  * Schema for the JSON body Commerce POSTs to a worker mass action handler.
52
49
  *
@@ -55,12 +52,10 @@ export declare const MassActionGridTypeSchema: v.PicklistSchema<readonly ["order
55
52
  * enforced here.
56
53
  */
57
54
  export declare const MassActionRequestSchema: v.ObjectSchema<{
58
- readonly gridType: v.PicklistSchema<readonly ["order", "product", "customer", "newsletter"], undefined>;
55
+ readonly gridType: v.PicklistSchema<readonly ["order", "product", "customer"], undefined>;
59
56
  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
57
  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
58
  }, undefined>;
62
- //#endregion
63
- //#region source/mass-actions/worker/types.d.ts
64
59
  /** Grid identifier sent on the wire by a worker mass action request. */
65
60
  type MassActionGridType = v.InferOutput<typeof MassActionGridTypeSchema>;
66
61
  /** Parsed request body sent by Commerce to a worker mass action handler. */
@@ -71,8 +66,6 @@ type MassActionResponseBody = Record<string, unknown>;
71
66
  type MassActionErrorBody = {
72
67
  message: string;
73
68
  };
74
- //#endregion
75
- //#region source/mass-actions/worker/presets.d.ts
76
69
  /**
77
70
  * Parses and validates the JSON body Commerce POSTs to a worker mass action handler.
78
71
  *
@@ -114,5 +107,4 @@ export declare function okMassActionResponse(body?: MassActionResponseBody): Suc
114
107
  * ```
115
108
  */
116
109
  export declare function massActionErrorResponse(statusCode: number, errorMessage: string): ErrorResponse<MassActionErrorBody>;
117
- //#endregion
118
110
  export type { AdminUiEntity, MassActionEntity, MassActionErrorBody, MassActionGridType, MassActionRequest, MassActionResponseBody };
@@ -13,9 +13,9 @@
13
13
  */
14
14
 
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
- const require_acl_resource_id = require('../acl-resource-id-nCj_Kne2.cjs');
16
+ const require_acl_resource_id = require("../acl-resource-id-Bjpse1tR.cjs");
17
17
 
18
- //#region source/menu/acl-resource-id.ts
18
+ // source/menu/acl-resource-id.ts
19
19
  /**
20
20
  * Derives the deterministic Commerce ACL resource id for a specific menu item.
21
21
  *
@@ -43,8 +43,7 @@ function getMenuAclResourceId(metadataId, menuId) {
43
43
  return `${appRoot}_menu_${require_acl_resource_id.sanitizeSegment(menuId)}`;
44
44
  }
45
45
 
46
- //#endregion
47
- //#region source/menu/paths.ts
46
+ // source/menu/paths.ts
48
47
  /** Menu ID for "Catalog" in the Adobe Commerce admin */
49
48
  const MENU_CATALOG = "catalog";
50
49
  /** Menu ID for "Customers" in the Adobe Commerce admin */
@@ -77,7 +76,6 @@ function isCommerceMenu(menu) {
77
76
  return COMMERCE_MENUS.includes(menu);
78
77
  }
79
78
 
80
- //#endregion
81
79
  exports.COMMERCE_MENUS = COMMERCE_MENUS;
82
80
  exports.MENU_CATALOG = MENU_CATALOG;
83
81
  exports.MENU_CONTENT = MENU_CONTENT;
@@ -12,7 +12,6 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- //#region source/menu/acl-resource-id.d.ts
16
15
  /**
17
16
  * Derives the deterministic Commerce ACL resource id for a specific menu item.
18
17
  *
@@ -35,8 +34,6 @@
35
34
  * when `metadataId` is blank.
36
35
  */
37
36
  export declare function getMenuAclResourceId(metadataId: string, menuId: string): string;
38
- //#endregion
39
- //#region source/menu/paths.d.ts
40
37
  /** Menu ID for "Catalog" in the Adobe Commerce admin */
41
38
  export declare const MENU_CATALOG = "catalog";
42
39
  /** Menu ID for "Customers" in the Adobe Commerce admin */
@@ -58,5 +55,4 @@ export declare const COMMERCE_MENUS: readonly ["sales", "catalog", "customers",
58
55
  /** A union type of all known supported Commerce Admin menu IDs. */
59
56
  export type CommerceMenu = (typeof COMMERCE_MENUS)[number];
60
57
  /** Returns true if the given string is a known Commerce Admin menu ID. */
61
- export declare function isCommerceMenu(menu: string): menu is CommerceMenu;
62
- //#endregion
58
+ export declare function isCommerceMenu(menu: string): menu is CommerceMenu;
@@ -13,15 +13,15 @@
13
13
  */
14
14
 
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
- const require_rolldown_runtime = require('../rolldown-runtime-Bf2WWRga.cjs');
17
- const require_acl_resource_id = require('../acl-resource-id-nCj_Kne2.cjs');
18
- const require_schemas = require('../schemas-DRhCF0TF.cjs');
19
- const require_utils = require('../utils-CiBhSMw4.cjs');
16
+ const require_rolldown_runtime = require("../rolldown-runtime-DREAZOkv.cjs");
17
+ const require_acl_resource_id = require("../acl-resource-id-Bjpse1tR.cjs");
18
+ const require_schemas = require("../schemas-C-tIBLog.cjs");
19
+ const require_utils = require("../utils-D5meZ8l8.cjs");
20
20
  let valibot = require("valibot");
21
21
  valibot = require_rolldown_runtime.__toESM(valibot, 1);
22
22
  let _adobe_aio_commerce_lib_core_responses = require("@adobe/aio-commerce-lib-core/responses");
23
23
 
24
- //#region source/order-view-buttons/acl-resource-id.ts
24
+ // source/order-view-buttons/acl-resource-id.ts
25
25
  /**
26
26
  * Derives the deterministic Commerce ACL resource id for an order view button.
27
27
  *
@@ -50,8 +50,7 @@ function getOrderViewButtonAclResourceId(metadataId, buttonId) {
50
50
  return `${appRoot}_order_viewbuttons_${require_acl_resource_id.sanitizeSegment(buttonId)}`;
51
51
  }
52
52
 
53
- //#endregion
54
- //#region source/order-view-buttons/schema.ts
53
+ // source/order-view-buttons/schema.ts
55
54
  /**
56
55
  * Schema for the JSON body Commerce POSTs to an order view button handler.
57
56
  *
@@ -65,8 +64,7 @@ const OrderViewButtonRequestSchema = valibot.object({
65
64
  requestId: require_schemas.nonEmptyStringValueSchema("requestId")
66
65
  });
67
66
 
68
- //#endregion
69
- //#region source/order-view-buttons/presets.ts
67
+ // source/order-view-buttons/presets.ts
70
68
  /**
71
69
  * Parses and validates the JSON body Commerce POSTs to an order view button handler.
72
70
  *
@@ -118,7 +116,6 @@ function orderViewButtonErrorResponse(statusCode, errorMessage) {
118
116
  return (0, _adobe_aio_commerce_lib_core_responses.buildErrorResponse)(statusCode, { body: { message: errorMessage } });
119
117
  }
120
118
 
121
- //#endregion
122
119
  exports.OrderViewButtonRequestSchema = OrderViewButtonRequestSchema;
123
120
  exports.getOrderViewButtonAclResourceId = getOrderViewButtonAclResourceId;
124
121
  exports.okOrderViewButtonResponse = okOrderViewButtonResponse;
@@ -14,7 +14,6 @@
14
14
 
15
15
  import * as v from "valibot";
16
16
  import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/responses";
17
- //#region source/order-view-buttons/acl-resource-id.d.ts
18
17
  /**
19
18
  * Derives the deterministic Commerce ACL resource id for an order view button.
20
19
  *
@@ -38,8 +37,6 @@ import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/res
38
37
  * when `metadataId` is blank.
39
38
  */
40
39
  export declare function getOrderViewButtonAclResourceId(metadataId: string, buttonId: string): string;
41
- //#endregion
42
- //#region source/order-view-buttons/schema.d.ts
43
40
  /**
44
41
  * Schema for the JSON body Commerce POSTs to an order view button handler.
45
42
  *
@@ -52,8 +49,6 @@ export declare const OrderViewButtonRequestSchema: v.ObjectSchema<{
52
49
  readonly orderId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
53
50
  readonly requestId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
54
51
  }, undefined>;
55
- //#endregion
56
- //#region source/order-view-buttons/types.d.ts
57
52
  /** Parsed request body sent by Commerce to an order view button handler. */
58
53
  type OrderViewButtonRequest = v.InferOutput<typeof OrderViewButtonRequestSchema>;
59
54
  /** Success body returned to Commerce — an empty object signals success. */
@@ -62,8 +57,6 @@ type OrderViewButtonSuccessBody = Record<string, never>;
62
57
  type OrderViewButtonErrorBody = {
63
58
  message: string;
64
59
  };
65
- //#endregion
66
- //#region source/order-view-buttons/presets.d.ts
67
60
  /**
68
61
  * Parses and validates the JSON body Commerce POSTs to an order view button handler.
69
62
  *
@@ -108,5 +101,4 @@ export declare function okOrderViewButtonResponse(): SuccessResponse<OrderViewBu
108
101
  * ```
109
102
  */
110
103
  export declare function orderViewButtonErrorResponse(statusCode: number, errorMessage: string): ErrorResponse<OrderViewButtonErrorBody>;
111
- //#endregion
112
104
  export type { OrderViewButtonErrorBody, OrderViewButtonRequest, OrderViewButtonSuccessBody };