@adobe/aio-commerce-lib-admin-ui 0.2.0-beta-20260721105643 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,50 +1,32 @@
1
1
  # @adobe/aio-commerce-lib-admin-ui
2
2
 
3
- ## 0.2.0-beta-20260721105643
4
- ### Minor Changes
5
-
3
+ ## 0.2.0
6
4
 
5
+ ### Minor Changes
7
6
 
8
7
  - [#528](https://github.com/adobe/aio-commerce-sdk/pull/528) [`0bb7d15`](https://github.com/adobe/aio-commerce-sdk/commit/0bb7d150961f631116b1ac421124960b5b857896) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Add `getGridColumnAclResourceId`, `getMassActionAclResourceId`, and `getOrderViewButtonAclResourceId` helpers to derive the Commerce ACL resource id for protected grid columns, mass actions, and order view buttons, mirroring `getMenuAclResourceId`.
9
8
 
10
-
11
-
12
9
  - [#522](https://github.com/adobe/aio-commerce-sdk/pull/522) [`4396a64`](https://github.com/adobe/aio-commerce-sdk/commit/4396a647ad22dba063cdf03a16e04aef9387212f) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Add `getAdminUiPermissionClient` for checking ACL permissions at runtime (SPA bootstrap and runtime action entry). Includes in-process TTL cache, in-flight request deduplication, and deny-by-default on errors. Also exports `getAclResourceId` for deterministic ACL resource id derivation from `metadata.id`.
13
10
 
14
-
15
-
16
11
  - [#542](https://github.com/adobe/aio-commerce-sdk/pull/542) [`c15b50f`](https://github.com/adobe/aio-commerce-sdk/commit/c15b50f667e6d1288270dbd4192c150db0ff0914) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Add browser helpers for Admin UI iframe extensions.
17
12
 
18
-
19
-
20
13
  - [#508](https://github.com/adobe/aio-commerce-sdk/pull/508) [`c36f825`](https://github.com/adobe/aio-commerce-sdk/commit/c36f825aff7329fc2831d8aaca032d17bbee373a) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Add `@adobe/aio-commerce-lib-admin-ui/menu` entrypoint with named constants for Commerce Admin menu IDs (`MENU_SALES`, `MENU_CATALOG`, etc.), a `COMMERCE_MENUS` collection, a `CommerceMenu` type, and an `isCommerceMenu` type guard.
21
14
 
22
-
23
-
24
15
  - [#516](https://github.com/adobe/aio-commerce-sdk/pull/516) [`bdcced9`](https://github.com/adobe/aio-commerce-sdk/commit/bdcced9297ae5e1b87ce86490a2b6fad76b2e341) Thanks [@obarcelonap](https://github.com/obarcelonap)! - Add `order-view-buttons` entrypoint with request parsing and response builders for `commerce/backend-ui/2` order view button handlers.
25
16
 
26
-
27
-
28
17
  - [#551](https://github.com/adobe/aio-commerce-sdk/pull/551) [`a66f389`](https://github.com/adobe/aio-commerce-sdk/commit/a66f3892622584d27cd6b5d2fc633e15bf9942a8) Thanks [@asalloum5](https://github.com/asalloum5)! - Add `enableAdminUiSdk` to the Admin UI API client, which enables the Admin UI SDK in Commerce via `PUT /V1/adminuisdk/config`.
29
18
 
30
-
31
-
32
19
  - [#486](https://github.com/adobe/aio-commerce-sdk/pull/486) [`413da36`](https://github.com/adobe/aio-commerce-sdk/commit/413da36dcd83e5a41c194f5af50611097659e725) Thanks [@obarcelonap](https://github.com/obarcelonap)! - Add request and response builders for the `commerce/backend-ui/2` grid column wire contract.
33
20
 
34
-
35
-
36
21
  - [#546](https://github.com/adobe/aio-commerce-sdk/pull/546) [`ca2c4fe`](https://github.com/adobe/aio-commerce-sdk/commit/ca2c4febcdfbe52b933775f08e9a53765fc306ab) Thanks [@obarcelonap](https://github.com/obarcelonap)! - Remove `extensionUrl` from extension registration params. The Commerce backend now derives the view URL from the App Registry, so the field has no effect for v2 installed apps.
37
22
 
38
-
39
-
40
- - [#492](https://github.com/adobe/aio-commerce-sdk/pull/492) [`ce63b2b`](https://github.com/adobe/aio-commerce-sdk/commit/ce63b2b46f7ef1f2f68780b13e52d1c13fd5fe6e) Thanks [@jcuerdo](https://github.com/jcuerdo)! - Add `mass-actions` entrypoint with wire contract helpers for `commerce/backend-ui/2` mass actions. Parse worker action requests with `parseMassActionRequest`, build success/error responses with `okMassActionResponse`/`errorMassActionResponse`, and parse iframe selection parameters with `parseMassActionSelection`.
41
-
23
+ - [#492](https://github.com/adobe/aio-commerce-sdk/pull/492) [`ce63b2b`](https://github.com/adobe/aio-commerce-sdk/commit/ce63b2b46f7ef1f2f68780b13e52d1c13fd5fe6e) Thanks [@jcuerdo](https://github.com/jcuerdo)! - Add `mass-actions` entrypoint with wire contract helpers for `commerce/backend-ui/2` mass actions. Parse worker action requests with `parseMassActionRequest`, and build success/error responses with `okMassActionResponse`/`errorMassActionResponse`.
42
24
 
43
25
  ### Patch Changes
44
26
 
45
27
  - Updated dependencies [[`19400fb`](https://github.com/adobe/aio-commerce-sdk/commit/19400fbdfc03c5bbfc30f995a2acdd4272c5e032), [`ce7768e`](https://github.com/adobe/aio-commerce-sdk/commit/ce7768e0ddc6ca35ad6ccec60f584c8bb5a743f0), [`4396a64`](https://github.com/adobe/aio-commerce-sdk/commit/4396a647ad22dba063cdf03a16e04aef9387212f), [`e85bec4`](https://github.com/adobe/aio-commerce-sdk/commit/e85bec40f1eaa91dd6bb7bc6954b2ecfc3ea4029), [`413da36`](https://github.com/adobe/aio-commerce-sdk/commit/413da36dcd83e5a41c194f5af50611097659e725)]:
46
- - @adobe/aio-commerce-lib-core@1.2.0-beta-20260721105643
47
- - @adobe/aio-commerce-lib-api@1.3.0-beta-20260721105643
28
+ - @adobe/aio-commerce-lib-core@1.2.0
29
+ - @adobe/aio-commerce-lib-api@1.3.0
48
30
 
49
31
  ## 0.1.0
50
32
 
@@ -51,58 +51,6 @@ 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/view/schema.ts
56
- /**
57
- * Schema for the `selection` query parameter Commerce appends to the iframe URL
58
- * of a view mass action.
59
- *
60
- * Commerce serializes the selection as a JSON-encoded string:
61
- * `?selection={"ids":["000000001"],"gridType":"customer"}`
62
- */
63
- const MassActionSelectionSchema = valibot.object({
64
- gridType: valibot.picklist([
65
- "order",
66
- "product",
67
- "customer"
68
- ]),
69
- ids: valibot.pipe(valibot.array(require_schemas.nonEmptyStringValueSchema("id")), valibot.minLength(1, "The value of \"ids\" must contain at least one entry"))
70
- });
71
-
72
- //#endregion
73
- //#region source/mass-actions/view/presets.ts
74
- /**
75
- * Parses the `selection` query parameter Commerce appends to the iframe URL of
76
- * a view mass action.
77
- *
78
- * Commerce serializes the selection as a JSON string:
79
- * `?selection={"ids":["000000001","000000002"],"gridType":"customer"}`
80
- *
81
- * Throws a `CommerceSdkValidationError` if the input is missing, not valid
82
- * JSON, or does not match the expected shape.
83
- *
84
- * @param rawSelection - The raw string value of the `selection` query parameter.
85
- *
86
- * @example
87
- * ```ts
88
- * import { parseMassActionSelection } from "@adobe/aio-commerce-lib-admin-ui/mass-actions";
89
- *
90
- * // In your SPA route handler:
91
- * const raw = new URLSearchParams(window.location.search).get("selection");
92
- * const { ids, gridType } = parseMassActionSelection(raw);
93
- * ```
94
- */
95
- function parseMassActionSelection(rawSelection) {
96
- if (rawSelection === null || rawSelection === void 0) throw new Error("Invalid mass action selection: the selection query parameter is missing.");
97
- let parsed;
98
- try {
99
- parsed = JSON.parse(String(rawSelection));
100
- } catch (error) {
101
- throw new Error(`Invalid mass action selection: expected a JSON string, got: ${String(rawSelection)}`, { cause: error });
102
- }
103
- return require_utils.parseOrThrow(MassActionSelectionSchema, parsed, "Invalid mass action selection");
104
- }
105
-
106
54
  //#endregion
107
55
  //#region source/mass-actions/worker/schema.ts
108
56
  /**
@@ -180,9 +128,7 @@ function massActionErrorResponse(statusCode, errorMessage) {
180
128
  //#endregion
181
129
  exports.MassActionGridTypeSchema = MassActionGridTypeSchema;
182
130
  exports.MassActionRequestSchema = MassActionRequestSchema;
183
- exports.MassActionSelectionSchema = MassActionSelectionSchema;
184
131
  exports.getMassActionAclResourceId = getMassActionAclResourceId;
185
132
  exports.massActionErrorResponse = massActionErrorResponse;
186
133
  exports.okMassActionResponse = okMassActionResponse;
187
- exports.parseMassActionRequest = parseMassActionRequest;
188
- exports.parseMassActionSelection = parseMassActionSelection;
134
+ exports.parseMassActionRequest = parseMassActionRequest;
@@ -42,47 +42,6 @@ import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/res
42
42
  */
43
43
  declare function getMassActionAclResourceId(metadataId: string, entity: AdminUiEntity, actionId: string): string;
44
44
  //#endregion
45
- //#region source/mass-actions/view/schema.d.ts
46
- /**
47
- * Schema for the `selection` query parameter Commerce appends to the iframe URL
48
- * of a view mass action.
49
- *
50
- * Commerce serializes the selection as a JSON-encoded string:
51
- * `?selection={"ids":["000000001"],"gridType":"customer"}`
52
- */
53
- declare const MassActionSelectionSchema: v.ObjectSchema<{
54
- readonly gridType: v.PicklistSchema<["order", "product", "customer"], undefined>;
55
- 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">]>;
56
- }, undefined>;
57
- //#endregion
58
- //#region source/mass-actions/view/types.d.ts
59
- /** Parsed `selection` query parameter appended by Commerce to the iframe URL. */
60
- type MassActionSelection = v.InferOutput<typeof MassActionSelectionSchema>;
61
- //#endregion
62
- //#region source/mass-actions/view/presets.d.ts
63
- /**
64
- * Parses the `selection` query parameter Commerce appends to the iframe URL of
65
- * a view mass action.
66
- *
67
- * Commerce serializes the selection as a JSON string:
68
- * `?selection={"ids":["000000001","000000002"],"gridType":"customer"}`
69
- *
70
- * Throws a `CommerceSdkValidationError` if the input is missing, not valid
71
- * JSON, or does not match the expected shape.
72
- *
73
- * @param rawSelection - The raw string value of the `selection` query parameter.
74
- *
75
- * @example
76
- * ```ts
77
- * import { parseMassActionSelection } from "@adobe/aio-commerce-lib-admin-ui/mass-actions";
78
- *
79
- * // In your SPA route handler:
80
- * const raw = new URLSearchParams(window.location.search).get("selection");
81
- * const { ids, gridType } = parseMassActionSelection(raw);
82
- * ```
83
- */
84
- declare function parseMassActionSelection(rawSelection: unknown): MassActionSelection;
85
- //#endregion
86
45
  //#region source/mass-actions/worker/schema.d.ts
87
46
  /**
88
47
  * Grid identifier sent by Commerce on the `commerce/backend-ui/2` wire contract
@@ -157,4 +116,4 @@ declare function okMassActionResponse(body?: MassActionResponseBody): SuccessRes
157
116
  */
158
117
  declare function massActionErrorResponse(statusCode: number, errorMessage: string): ErrorResponse<MassActionErrorBody>;
159
118
  //#endregion
160
- export { type AdminUiEntity, type MassActionErrorBody, type MassActionGridType, MassActionGridTypeSchema, type MassActionRequest, MassActionRequestSchema, type MassActionResponseBody, type MassActionSelection, MassActionSelectionSchema, getMassActionAclResourceId, massActionErrorResponse, okMassActionResponse, parseMassActionRequest, parseMassActionSelection };
119
+ export { type AdminUiEntity, type MassActionErrorBody, type MassActionGridType, MassActionGridTypeSchema, type MassActionRequest, MassActionRequestSchema, type MassActionResponseBody, getMassActionAclResourceId, massActionErrorResponse, okMassActionResponse, parseMassActionRequest };
@@ -42,47 +42,6 @@ import { ErrorResponse, SuccessResponse } from "@adobe/aio-commerce-lib-core/res
42
42
  */
43
43
  declare function getMassActionAclResourceId(metadataId: string, entity: AdminUiEntity, actionId: string): string;
44
44
  //#endregion
45
- //#region source/mass-actions/view/schema.d.ts
46
- /**
47
- * Schema for the `selection` query parameter Commerce appends to the iframe URL
48
- * of a view mass action.
49
- *
50
- * Commerce serializes the selection as a JSON-encoded string:
51
- * `?selection={"ids":["000000001"],"gridType":"customer"}`
52
- */
53
- declare const MassActionSelectionSchema: v.ObjectSchema<{
54
- readonly gridType: v.PicklistSchema<["order", "product", "customer"], undefined>;
55
- 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">]>;
56
- }, undefined>;
57
- //#endregion
58
- //#region source/mass-actions/view/types.d.ts
59
- /** Parsed `selection` query parameter appended by Commerce to the iframe URL. */
60
- type MassActionSelection = v.InferOutput<typeof MassActionSelectionSchema>;
61
- //#endregion
62
- //#region source/mass-actions/view/presets.d.ts
63
- /**
64
- * Parses the `selection` query parameter Commerce appends to the iframe URL of
65
- * a view mass action.
66
- *
67
- * Commerce serializes the selection as a JSON string:
68
- * `?selection={"ids":["000000001","000000002"],"gridType":"customer"}`
69
- *
70
- * Throws a `CommerceSdkValidationError` if the input is missing, not valid
71
- * JSON, or does not match the expected shape.
72
- *
73
- * @param rawSelection - The raw string value of the `selection` query parameter.
74
- *
75
- * @example
76
- * ```ts
77
- * import { parseMassActionSelection } from "@adobe/aio-commerce-lib-admin-ui/mass-actions";
78
- *
79
- * // In your SPA route handler:
80
- * const raw = new URLSearchParams(window.location.search).get("selection");
81
- * const { ids, gridType } = parseMassActionSelection(raw);
82
- * ```
83
- */
84
- declare function parseMassActionSelection(rawSelection: unknown): MassActionSelection;
85
- //#endregion
86
45
  //#region source/mass-actions/worker/schema.d.ts
87
46
  /**
88
47
  * Grid identifier sent by Commerce on the `commerce/backend-ui/2` wire contract
@@ -157,4 +116,4 @@ declare function okMassActionResponse(body?: MassActionResponseBody): SuccessRes
157
116
  */
158
117
  declare function massActionErrorResponse(statusCode: number, errorMessage: string): ErrorResponse<MassActionErrorBody>;
159
118
  //#endregion
160
- export { type AdminUiEntity, type MassActionErrorBody, type MassActionGridType, MassActionGridTypeSchema, type MassActionRequest, MassActionRequestSchema, type MassActionResponseBody, type MassActionSelection, MassActionSelectionSchema, getMassActionAclResourceId, massActionErrorResponse, okMassActionResponse, parseMassActionRequest, parseMassActionSelection };
119
+ export { type AdminUiEntity, type MassActionErrorBody, type MassActionGridType, MassActionGridTypeSchema, type MassActionRequest, MassActionRequestSchema, type MassActionResponseBody, getMassActionAclResourceId, massActionErrorResponse, okMassActionResponse, parseMassActionRequest };
@@ -48,58 +48,6 @@ function getMassActionAclResourceId(metadataId, entity, actionId) {
48
48
  return `${appRoot}_${entity}_massactions_${sanitizeSegment(actionId)}`;
49
49
  }
50
50
 
51
- //#endregion
52
- //#region source/mass-actions/view/schema.ts
53
- /**
54
- * Schema for the `selection` query parameter Commerce appends to the iframe URL
55
- * of a view mass action.
56
- *
57
- * Commerce serializes the selection as a JSON-encoded string:
58
- * `?selection={"ids":["000000001"],"gridType":"customer"}`
59
- */
60
- const MassActionSelectionSchema = v.object({
61
- gridType: v.picklist([
62
- "order",
63
- "product",
64
- "customer"
65
- ]),
66
- ids: v.pipe(v.array(nonEmptyStringValueSchema("id")), v.minLength(1, "The value of \"ids\" must contain at least one entry"))
67
- });
68
-
69
- //#endregion
70
- //#region source/mass-actions/view/presets.ts
71
- /**
72
- * Parses the `selection` query parameter Commerce appends to the iframe URL of
73
- * a view mass action.
74
- *
75
- * Commerce serializes the selection as a JSON string:
76
- * `?selection={"ids":["000000001","000000002"],"gridType":"customer"}`
77
- *
78
- * Throws a `CommerceSdkValidationError` if the input is missing, not valid
79
- * JSON, or does not match the expected shape.
80
- *
81
- * @param rawSelection - The raw string value of the `selection` query parameter.
82
- *
83
- * @example
84
- * ```ts
85
- * import { parseMassActionSelection } from "@adobe/aio-commerce-lib-admin-ui/mass-actions";
86
- *
87
- * // In your SPA route handler:
88
- * const raw = new URLSearchParams(window.location.search).get("selection");
89
- * const { ids, gridType } = parseMassActionSelection(raw);
90
- * ```
91
- */
92
- function parseMassActionSelection(rawSelection) {
93
- if (rawSelection === null || rawSelection === void 0) throw new Error("Invalid mass action selection: the selection query parameter is missing.");
94
- let parsed;
95
- try {
96
- parsed = JSON.parse(String(rawSelection));
97
- } catch (error) {
98
- throw new Error(`Invalid mass action selection: expected a JSON string, got: ${String(rawSelection)}`, { cause: error });
99
- }
100
- return parseOrThrow(MassActionSelectionSchema, parsed, "Invalid mass action selection");
101
- }
102
-
103
51
  //#endregion
104
52
  //#region source/mass-actions/worker/schema.ts
105
53
  /**
@@ -175,4 +123,4 @@ function massActionErrorResponse(statusCode, errorMessage) {
175
123
  }
176
124
 
177
125
  //#endregion
178
- export { MassActionGridTypeSchema, MassActionRequestSchema, MassActionSelectionSchema, getMassActionAclResourceId, massActionErrorResponse, okMassActionResponse, parseMassActionRequest, parseMassActionSelection };
126
+ export { MassActionGridTypeSchema, MassActionRequestSchema, getMassActionAclResourceId, massActionErrorResponse, okMassActionResponse, parseMassActionRequest };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@adobe/aio-commerce-lib-admin-ui",
3
3
  "type": "module",
4
4
  "author": "Adobe Inc.",
5
- "version": "0.2.0-beta-20260721105643",
5
+ "version": "0.2.0",
6
6
  "private": false,
7
7
  "engines": {
8
8
  "node": ">=22 <=24"
@@ -113,8 +113,8 @@
113
113
  "ky": "^1.9.0",
114
114
  "react-error-boundary": "^6.1.2",
115
115
  "valibot": "^1.1.0",
116
- "@adobe/aio-commerce-lib-api": "1.3.0-beta-20260721105643",
117
- "@adobe/aio-commerce-lib-core": "1.2.0-beta-20260721105643"
116
+ "@adobe/aio-commerce-lib-api": "1.3.0",
117
+ "@adobe/aio-commerce-lib-core": "1.2.0"
118
118
  },
119
119
  "peerDependencies": {
120
120
  "@react-spectrum/s2": "^1.5.1",
@@ -139,12 +139,12 @@
139
139
  "react": "^19.2.7",
140
140
  "react-dom": "^19.2.7",
141
141
  "typescript": "^6.0.0",
142
- "@aio-commerce-sdk/common-utils": "0.2.6-beta-20260721105643",
142
+ "@aio-commerce-sdk/common-utils": "0.2.6",
143
143
  "@aio-commerce-sdk/config-tsdown": "1.0.1",
144
144
  "@aio-commerce-sdk/config-typedoc": "1.0.0",
145
145
  "@aio-commerce-sdk/config-typescript": "1.0.0",
146
146
  "@aio-commerce-sdk/config-vitest": "1.0.0",
147
- "@aio-commerce-sdk/scripting-utils": "0.3.4-beta-20260721105643",
147
+ "@aio-commerce-sdk/scripting-utils": "0.3.4",
148
148
  "@aio-commerce-sdk/scripts": "0.1.0"
149
149
  },
150
150
  "sideEffects": false,