@adobe/aio-commerce-lib-app 1.1.0 → 1.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/actions/app-config.cjs +1 -1
  3. package/dist/cjs/actions/app-config.d.cts +3 -3
  4. package/dist/cjs/actions/config.cjs +1 -1
  5. package/dist/cjs/actions/config.d.cts +2 -2
  6. package/dist/cjs/actions/installation.cjs +1 -1
  7. package/dist/cjs/actions/installation.d.cts +4 -4
  8. package/dist/cjs/actions/scope-tree.d.cts +3 -3
  9. package/dist/cjs/{app-lymFcs59.d.cts → app-DcQMhW2N.d.cts} +13 -1
  10. package/dist/cjs/commands/index.cjs +3 -3
  11. package/dist/cjs/config/index.cjs +3 -3
  12. package/dist/cjs/config/index.d.cts +39 -3
  13. package/dist/cjs/{config-YEeaEqzi.cjs → config-BppBKCFj.cjs} +1 -1
  14. package/dist/{es/index-D33OCH0D.d.mts → cjs/index-DZxladgt.d.cts} +23 -8
  15. package/dist/cjs/management/index.cjs +1 -1
  16. package/dist/cjs/management/index.d.cts +1 -1
  17. package/dist/cjs/{management-PZtLe4Ji.cjs → management-iLQubQ7K.cjs} +93 -20
  18. package/dist/cjs/{validate-CwwYD8aC.cjs → validate-CeUCT_7k.cjs} +7 -3
  19. package/dist/cjs/{webhooks-CbZpv9y_.cjs → webhooks-CLtDxwMa.cjs} +33 -0
  20. package/dist/es/actions/app-config.d.mts +3 -3
  21. package/dist/es/actions/app-config.mjs +1 -1
  22. package/dist/es/actions/config.d.mts +2 -2
  23. package/dist/es/actions/config.mjs +2 -2
  24. package/dist/es/actions/installation.d.mts +4 -4
  25. package/dist/es/actions/installation.mjs +2 -2
  26. package/dist/es/actions/scope-tree.d.mts +3 -3
  27. package/dist/es/actions/scope-tree.mjs +1 -1
  28. package/dist/es/{app-Ct7Y0NP8.d.mts → app-DJr-mN9d.d.mts} +13 -1
  29. package/dist/es/commands/index.mjs +3 -3
  30. package/dist/es/config/index.d.mts +39 -3
  31. package/dist/es/config/index.mjs +3 -3
  32. package/dist/es/{config-BbrkH0Xt.mjs → config-BohwKkQS.mjs} +1 -1
  33. package/dist/{cjs/index-DRhLtRrX.d.cts → es/index-BmYXe7kp.d.mts} +23 -8
  34. package/dist/es/management/index.d.mts +1 -1
  35. package/dist/es/management/index.mjs +1 -1
  36. package/dist/es/{management-CIoVWirU.mjs → management-DSexEPTW.mjs} +93 -20
  37. package/dist/es/{validate-qRpfubPo.mjs → validate-CqJdGzyZ.mjs} +8 -4
  38. package/dist/es/{webhooks-NgM6k3_r.mjs → webhooks-CYo-pqbR.mjs} +23 -2
  39. package/package.json +4 -3
  40. /package/dist/es/{schemas-BvPxQwgQ.mjs → schemas-CVXHgUhv.mjs} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @adobe/aio-commerce-lib-app
2
2
 
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#351](https://github.com/adobe/aio-commerce-sdk/pull/351) [`8af56e1`](https://github.com/adobe/aio-commerce-sdk/commit/8af56e142179b4d15249ce385bda23117003c133) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Add workspace ID to the event provider instance ID to ensure uniqueness within the IMS org.
8
+
9
+ - [#372](https://github.com/adobe/aio-commerce-sdk/pull/372) [`a04ee2b`](https://github.com/adobe/aio-commerce-sdk/commit/a04ee2b511aa7169e9fcc827f8eddab6192f00ba) Thanks [@asalloum5](https://github.com/asalloum5)! - Added Admin UI SDK installation step to correctly configure extensions in Adobe Commerce instance.
10
+
11
+ ### Patch Changes
12
+
13
+ - [#370](https://github.com/adobe/aio-commerce-sdk/pull/370) [`a627efc`](https://github.com/adobe/aio-commerce-sdk/commit/a627efc95d8176ff20a4506f9cadd828c9886d84) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Only configure the Commerce Eventing Module when it doesn't have a default provider or a workspace configuration.
14
+
15
+ - Updated dependencies [[`fe79660`](https://github.com/adobe/aio-commerce-sdk/commit/fe79660a9f010b5651f36e4e9d85bb11fc856296), [`fe79660`](https://github.com/adobe/aio-commerce-sdk/commit/fe79660a9f010b5651f36e4e9d85bb11fc856296), [`eeef589`](https://github.com/adobe/aio-commerce-sdk/commit/eeef589461f9bd684ed1fcf23ff97dfeba88723e), [`3e4b765`](https://github.com/adobe/aio-commerce-sdk/commit/3e4b7657cd34ff45317d29067846a4a113a3d37f)]:
16
+ - @adobe/aio-commerce-lib-config@1.1.0
17
+
3
18
  ## 1.1.0
4
19
 
5
20
  ### Minor Changes
@@ -15,7 +15,7 @@
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
16
  const require_schemas = require('../schemas-nkIxa8sL.cjs');
17
17
  const require_router = require('../router-KeQRduO3.cjs');
18
- const require_validate = require('../validate-CwwYD8aC.cjs');
18
+ const require_validate = require('../validate-CeUCT_7k.cjs');
19
19
  let _adobe_aio_commerce_lib_core_responses = require("@adobe/aio-commerce-lib-core/responses");
20
20
 
21
21
  //#region source/actions/app-config.ts
@@ -12,8 +12,8 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { n as CommerceAppConfigOutputModel } from "../app-lymFcs59.cjs";
16
- import * as _adobe_aio_commerce_lib_core_responses0 from "@adobe/aio-commerce-lib-core/responses";
15
+ import { n as CommerceAppConfigOutputModel } from "../app-DcQMhW2N.cjs";
16
+ import * as _$_adobe_aio_commerce_lib_core_responses0 from "@adobe/aio-commerce-lib-core/responses";
17
17
  import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
18
18
 
19
19
  //#region source/actions/app-config.d.ts
@@ -24,6 +24,6 @@ type RuntimeActionFactoryArgs = {
24
24
  /** Factory to create the route handler for the `app-config` action. */
25
25
  declare const appConfigRuntimeAction: ({
26
26
  appConfig
27
- }: RuntimeActionFactoryArgs) => (params: RuntimeActionParams) => Promise<_adobe_aio_commerce_lib_core_responses0.ActionResponse>;
27
+ }: RuntimeActionFactoryArgs) => (params: RuntimeActionParams) => Promise<_$_adobe_aio_commerce_lib_core_responses0.ActionResponse>;
28
28
  //#endregion
29
29
  export { appConfigRuntimeAction };
@@ -15,7 +15,7 @@
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
16
  const require_schemas = require('../schemas-nkIxa8sL.cjs');
17
17
  const require_router = require('../router-KeQRduO3.cjs');
18
- const require_validate = require('../validate-CwwYD8aC.cjs');
18
+ const require_validate = require('../validate-CeUCT_7k.cjs');
19
19
  let _adobe_aio_commerce_lib_core_responses = require("@adobe/aio-commerce-lib-core/responses");
20
20
  let valibot = require("valibot");
21
21
  valibot = require_schemas.__toESM(valibot);
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import * as _adobe_aio_commerce_lib_core_responses0 from "@adobe/aio-commerce-lib-core/responses";
15
+ import * as _$_adobe_aio_commerce_lib_core_responses0 from "@adobe/aio-commerce-lib-core/responses";
16
16
  import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
17
17
  import { BusinessConfigSchema } from "@adobe/aio-commerce-lib-config";
18
18
 
@@ -24,6 +24,6 @@ type ConfigActionFactoryArgs = {
24
24
  /** Factory to create the route handler for the `config` action. */
25
25
  declare const configRuntimeAction: ({
26
26
  configSchema
27
- }: ConfigActionFactoryArgs) => (params: RuntimeActionParams) => Promise<_adobe_aio_commerce_lib_core_responses0.ActionResponse>;
27
+ }: ConfigActionFactoryArgs) => (params: RuntimeActionParams) => Promise<_$_adobe_aio_commerce_lib_core_responses0.ActionResponse>;
28
28
  //#endregion
29
29
  export { configRuntimeAction };
@@ -15,7 +15,7 @@
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
16
  const require_schemas = require('../schemas-nkIxa8sL.cjs');
17
17
  const require_router = require('../router-KeQRduO3.cjs');
18
- const require_management = require('../management-PZtLe4Ji.cjs');
18
+ const require_management = require('../management-iLQubQ7K.cjs');
19
19
  let _adobe_aio_commerce_lib_core_responses = require("@adobe/aio-commerce-lib-core/responses");
20
20
  let valibot = require("valibot");
21
21
  valibot = require_schemas.__toESM(valibot);
@@ -12,9 +12,9 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { n as CommerceAppConfigOutputModel } from "../app-lymFcs59.cjs";
16
- import { V as InstallationContext } from "../index-DRhLtRrX.cjs";
17
- import * as _adobe_aio_commerce_lib_core_responses0 from "@adobe/aio-commerce-lib-core/responses";
15
+ import { n as CommerceAppConfigOutputModel } from "../app-DcQMhW2N.cjs";
16
+ import { V as InstallationContext } from "../index-DZxladgt.cjs";
17
+ import * as _$_adobe_aio_commerce_lib_core_responses0 from "@adobe/aio-commerce-lib-core/responses";
18
18
  import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
19
19
 
20
20
  //#region source/actions/installation.d.ts
@@ -28,6 +28,6 @@ type RuntimeActionFactoryArgs = {
28
28
  declare const installationRuntimeAction: ({
29
29
  appConfig,
30
30
  customScriptsLoader
31
- }: RuntimeActionFactoryArgs) => (params: RuntimeActionParams) => Promise<_adobe_aio_commerce_lib_core_responses0.ActionResponse>;
31
+ }: RuntimeActionFactoryArgs) => (params: RuntimeActionParams) => Promise<_$_adobe_aio_commerce_lib_core_responses0.ActionResponse>;
32
32
  //#endregion
33
33
  export { installationRuntimeAction };
@@ -12,11 +12,11 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import * as _adobe_aio_commerce_lib_core_responses0 from "@adobe/aio-commerce-lib-core/responses";
16
- import * as _adobe_aio_commerce_lib_core_params0 from "@adobe/aio-commerce-lib-core/params";
15
+ import * as _$_adobe_aio_commerce_lib_core_responses0 from "@adobe/aio-commerce-lib-core/responses";
16
+ import * as _$_adobe_aio_commerce_lib_core_params0 from "@adobe/aio-commerce-lib-core/params";
17
17
 
18
18
  //#region source/actions/scope-tree.d.ts
19
19
  /** The handler method for the `scope-tree` action. */
20
- declare const scopeTreeRuntimeAction: (args: _adobe_aio_commerce_lib_core_params0.RuntimeActionParams) => Promise<_adobe_aio_commerce_lib_core_responses0.ActionResponse>;
20
+ declare const scopeTreeRuntimeAction: (args: _$_adobe_aio_commerce_lib_core_params0.RuntimeActionParams) => Promise<_$_adobe_aio_commerce_lib_core_responses0.ActionResponse>;
21
21
  //#endregion
22
22
  export { scopeTreeRuntimeAction };
@@ -18,7 +18,7 @@ import * as v from "valibot";
18
18
  /** The schema used to validate the commerce app config file. */
19
19
  declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
20
20
  readonly metadata: v.ObjectSchema<{
21
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and hyphens are allowed in string value of "${string}"${string}`>]>;
21
+ readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and hyphens are allowed in string value of "${string}"${string}`>]>, v.MaxLengthAction<string, 100, "The application id must not be longer than 100 characters">]>;
22
22
  readonly displayName: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.MaxLengthAction<string, 50, "The application display name must not be longer than 50 characters">]>;
23
23
  readonly description: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.MaxLengthAction<string, 255, "The metadata description must not be longer than 255 characters">]>;
24
24
  readonly version: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.RegexAction<string, "The version must follow semantic versioning (semver) format: Major.Minor.Patch (e.g., '1.0.0', '2.3.1')">]>;
@@ -171,6 +171,18 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
171
171
  }, undefined>, "Expected an array of external events">;
172
172
  }, undefined>, "Expected an array of external event sources">, undefined>;
173
173
  }, undefined>, undefined>;
174
+ readonly adminUiSdk: v.OptionalSchema<v.ObjectSchema<{
175
+ readonly registration: v.ObjectSchema<{
176
+ readonly menuItems: v.ArraySchema<v.ObjectSchema<{
177
+ readonly id: v.StringSchema<undefined>;
178
+ readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
179
+ readonly parent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
180
+ readonly sortOrder: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
181
+ readonly sandbox: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
182
+ readonly isSection: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
183
+ }, undefined>, undefined>;
184
+ }, undefined>;
185
+ }, undefined>, undefined>;
174
186
  readonly installation: v.OptionalSchema<v.ObjectSchema<{
175
187
  readonly messages: v.OptionalSchema<v.ObjectSchema<{
176
188
  readonly preInstallation: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.MaxLengthAction<string, 1000, "The preInstallation message must not be longer than 1000 characters">]>, undefined>;
@@ -14,9 +14,9 @@
14
14
  */
15
15
 
16
16
  const require_schemas = require('../schemas-nkIxa8sL.cjs');
17
- const require_validate = require('../validate-CwwYD8aC.cjs');
18
- const require_webhooks = require('../webhooks-CbZpv9y_.cjs');
19
- const require_config = require('../config-YEeaEqzi.cjs');
17
+ const require_webhooks = require('../webhooks-CLtDxwMa.cjs');
18
+ const require_validate = require('../validate-CeUCT_7k.cjs');
19
+ const require_config = require('../config-BppBKCFj.cjs');
20
20
  const require_error = require('../error-Dn7ool6k.cjs');
21
21
  const require_logging = require('../logging-4s36JTiN.cjs');
22
22
  let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
@@ -13,9 +13,9 @@
13
13
  */
14
14
 
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
- const require_validate = require('../validate-CwwYD8aC.cjs');
17
- const require_webhooks = require('../webhooks-CbZpv9y_.cjs');
18
- const require_config = require('../config-YEeaEqzi.cjs');
16
+ const require_webhooks = require('../webhooks-CLtDxwMa.cjs');
17
+ const require_validate = require('../validate-CeUCT_7k.cjs');
18
+ const require_config = require('../config-BppBKCFj.cjs');
19
19
 
20
20
  exports.CommerceAppConfigSchemas = require_validate.CommerceAppConfigSchemas;
21
21
  exports.defineConfig = require_config.defineConfig;
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { n as CommerceAppConfigOutputModel, t as CommerceAppConfig } from "../app-lymFcs59.cjs";
15
+ import { n as CommerceAppConfigOutputModel, t as CommerceAppConfig } from "../app-DcQMhW2N.cjs";
16
16
  import * as v from "valibot";
17
17
  import { Get, SetRequiredDeep } from "type-fest";
18
18
 
@@ -134,6 +134,18 @@ declare function defineConfig(config: CommerceAppConfig): {
134
134
  }[];
135
135
  }[] | undefined;
136
136
  } | undefined;
137
+ adminUiSdk?: {
138
+ registration: {
139
+ menuItems: {
140
+ id: string;
141
+ title?: string | undefined;
142
+ parent?: string | undefined;
143
+ sortOrder?: number | undefined;
144
+ sandbox?: string | undefined;
145
+ isSection?: boolean | undefined;
146
+ }[];
147
+ };
148
+ } | undefined;
137
149
  installation?: {
138
150
  messages?: {
139
151
  preInstallation?: string | undefined;
@@ -355,6 +367,18 @@ declare function parseCommerceAppConfig(cwd?: string): Promise<{
355
367
  }[];
356
368
  }[] | undefined;
357
369
  } | undefined;
370
+ adminUiSdk?: {
371
+ registration: {
372
+ menuItems: {
373
+ id: string;
374
+ title?: string | undefined;
375
+ parent?: string | undefined;
376
+ sortOrder?: number | undefined;
377
+ sandbox?: string | undefined;
378
+ isSection?: boolean | undefined;
379
+ }[];
380
+ };
381
+ } | undefined;
358
382
  installation?: {
359
383
  messages?: {
360
384
  preInstallation?: string | undefined;
@@ -440,7 +464,7 @@ declare function parseCommerceAppConfig(cwd?: string): Promise<{
440
464
  /** The individual validatable domains of the app config. */
441
465
  declare const CommerceAppConfigSchemas: {
442
466
  readonly metadata: v.ObjectSchema<{
443
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and hyphens are allowed in string value of "${string}"${string}`>]>;
467
+ readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and hyphens are allowed in string value of "${string}"${string}`>]>, v.MaxLengthAction<string, 100, "The application id must not be longer than 100 characters">]>;
444
468
  readonly displayName: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.MaxLengthAction<string, 50, "The application display name must not be longer than 50 characters">]>;
445
469
  readonly description: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.MaxLengthAction<string, 255, "The metadata description must not be longer than 255 characters">]>;
446
470
  readonly version: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.RegexAction<string, "The version must follow semantic versioning (semver) format: Major.Minor.Patch (e.g., '1.0.0', '2.3.1')">]>;
@@ -888,6 +912,18 @@ declare const CommerceAppConfigSchemas: {
888
912
  readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.MaxLengthAction<string, 255, "The step name must not be longer than 255 characters">]>;
889
913
  readonly description: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.MaxLengthAction<string, 255, "The step description must not be longer than 255 characters">]>;
890
914
  }, undefined>, "Expected an array of custom installation steps">;
915
+ readonly adminUiSdk: v.ObjectSchema<{
916
+ readonly registration: v.ObjectSchema<{
917
+ readonly menuItems: v.ArraySchema<v.ObjectSchema<{
918
+ readonly id: v.StringSchema<undefined>;
919
+ readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
920
+ readonly parent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
921
+ readonly sortOrder: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
922
+ readonly sandbox: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
923
+ readonly isSection: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
924
+ }, undefined>, undefined>;
925
+ }, undefined>;
926
+ }, undefined>;
891
927
  };
892
928
  /** Individual validatable domains of the commerce app config. */
893
929
  type CommerceAppConfigDomain = keyof typeof CommerceAppConfigSchemas;
@@ -1169,7 +1205,7 @@ declare function hasCustomInstallationSteps(config: CommerceAppConfigOutputModel
1169
1205
  //#region source/config/schema/metadata.d.ts
1170
1206
  /** The schema for the metadata of the application. */
1171
1207
  declare const MetadataSchema: v.ObjectSchema<{
1172
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and hyphens are allowed in string value of "${string}"${string}`>]>;
1208
+ readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and hyphens are allowed in string value of "${string}"${string}`>]>, v.MaxLengthAction<string, 100, "The application id must not be longer than 100 characters">]>;
1173
1209
  readonly displayName: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.MaxLengthAction<string, 50, "The application display name must not be longer than 50 characters">]>;
1174
1210
  readonly description: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.MaxLengthAction<string, 255, "The metadata description must not be longer than 255 characters">]>;
1175
1211
  readonly version: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.RegexAction<string, "The version must follow semantic versioning (semver) format: Major.Minor.Patch (e.g., '1.0.0', '2.3.1')">]>;
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  const require_schemas = require('./schemas-nkIxa8sL.cjs');
16
- const require_validate = require('./validate-CwwYD8aC.cjs');
16
+ const require_validate = require('./validate-CeUCT_7k.cjs');
17
17
  const require_error = require('./error-Dn7ool6k.cjs');
18
18
  let path = require("path");
19
19
  let fs = require("fs");
@@ -12,10 +12,10 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { n as CommerceAppConfigOutputModel } from "./app-Ct7Y0NP8.mjs";
16
- import AioLogger from "@adobe/aio-lib-core-logging";
17
- import * as v from "valibot";
15
+ import { n as CommerceAppConfigOutputModel } from "./app-DcQMhW2N.cjs";
18
16
  import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
17
+ import * as v from "valibot";
18
+ import AioLogger from "@adobe/aio-lib-core-logging";
19
19
 
20
20
  //#region source/management/installation/schema.d.ts
21
21
  /** Schema for validating Adobe I/O app credentials required for installation. */
@@ -90,10 +90,10 @@ type LeafStep<TName extends string = string, TConfig extends CommerceAppConfigOu
90
90
  validate?: (config: TConfig, context: ValidationExecutionContext<TStepCtx>) => ValidationIssue[] | Promise<ValidationIssue[]>;
91
91
  };
92
92
  /** A branch step that contains children (no execution). */
93
- type BranchStep<TName extends string = string, TConfig extends CommerceAppConfigOutputModel = CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>> = StepBase<TName, TConfig> & {
93
+ type BranchStep<TName extends string = string, TConfig extends CommerceAppConfigOutputModel = CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TChildren extends AnyStep[] = AnyStep[]> = StepBase<TName, TConfig> & {
94
94
  type: "branch"; /** An optional factory function to setup shared context for the children steps. */
95
95
  context?: StepContextFactory<TStepCtx>; /** The children steps of this branch. */
96
- children: AnyStep[];
96
+ children: TChildren;
97
97
  /**
98
98
  * Optional pre-installation validation handler for the branch itself.
99
99
  * Called before children are validated. Returning an empty array means
@@ -121,7 +121,7 @@ declare function isBranchStep(step: AnyStep): step is BranchStep;
121
121
  /** Options for defining a leaf step. */
122
122
  type LeafStepOptions<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown> = Omit<LeafStep<TName, TConfig, TStepCtx, TOutput>, "type">;
123
123
  /** Options for defining a branch step. */
124
- type BranchStepOptions<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>> = Omit<BranchStep<TName, TConfig, TStepCtx>, "type">;
124
+ type BranchStepOptions<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TChildren extends AnyStep[] = AnyStep[]> = Omit<BranchStep<TName, TConfig, TStepCtx, TChildren>, "type">;
125
125
  /**
126
126
  * Define a leaf step (executable, no children).
127
127
  *
@@ -137,7 +137,14 @@ type BranchStepOptions<TName extends string, TConfig extends CommerceAppConfigOu
137
137
  * });
138
138
  * ```
139
139
  */
140
- declare function defineLeafStep<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown>(options: LeafStepOptions<TName, TConfig, TStepCtx, TOutput>): LeafStep<TName, TConfig, TStepCtx, TOutput>;
140
+ declare function defineLeafStep<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown>(options: LeafStepOptions<TName, TConfig, TStepCtx, TOutput>): {
141
+ type: "leaf";
142
+ name: TName;
143
+ meta: StepMeta;
144
+ when: ((config: CommerceAppConfigOutputModel) => config is TConfig) | undefined;
145
+ run: (config: TConfig, context: ExecutionContext<TStepCtx>) => TOutput | Promise<TOutput>;
146
+ validate: ((config: TConfig, context: ValidationExecutionContext<TStepCtx>) => ValidationIssue[] | Promise<ValidationIssue[]>) | undefined;
147
+ };
141
148
  /**
142
149
  * Define a branch step (container with children, no runner).
143
150
  *
@@ -152,7 +159,15 @@ declare function defineLeafStep<TName extends string, TConfig extends CommerceAp
152
159
  * });
153
160
  * ```
154
161
  */
155
- declare function defineBranchStep<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>>(options: BranchStepOptions<TName, TConfig, TStepCtx>): BranchStep<TName, TConfig, TStepCtx>;
162
+ declare function defineBranchStep<TName extends string, TConfig extends CommerceAppConfigOutputModel, TStepCtx extends Record<string, unknown> = Record<string, unknown>, const TChildren extends AnyStep[] = AnyStep[]>(options: BranchStepOptions<TName, TConfig, TStepCtx, TChildren>): {
163
+ type: "branch";
164
+ name: TName;
165
+ meta: StepMeta;
166
+ when: ((config: CommerceAppConfigOutputModel) => config is TConfig) | undefined;
167
+ context: StepContextFactory<TStepCtx> | undefined;
168
+ children: TChildren;
169
+ validate: ((config: TConfig, context: ValidationExecutionContext<TStepCtx>) => ValidationIssue[] | Promise<ValidationIssue[]>) | undefined;
170
+ };
156
171
  /** Infer the output type from a leaf step. */
157
172
  type InferStepOutput<TStep> = TStep extends LeafStep<infer _TName, infer _TConfig, infer _TStepCtx, infer TOutput> ? Awaited<TOutput> : never;
158
173
  //#endregion
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
- const require_management = require('../management-PZtLe4Ji.cjs');
16
+ const require_management = require('../management-iLQubQ7K.cjs');
17
17
 
18
18
  exports.createInitialInstallationState = require_management.createInitialInstallationState;
19
19
  exports.defineCustomInstallationStep = require_management.defineCustomInstallationStep;
@@ -12,5 +12,5 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { $ as isBranchStep, A as StepStatus, B as InferStepOutput, C as ExecutionStatus, D as InstallationError, E as InstallationData, F as isSucceededState, G as StepContextFactory, H as LeafStep, I as AnyStep, J as ValidationExecutionContext, K as StepMeta, L as BranchStep, M as isCompletedState, N as isFailedState, O as InstallationState, P as isInProgressState, Q as defineLeafStep, R as BranchStepOptions, S as StepSucceededEvent, T as InProgressInstallationState, U as LeafStepOptions, V as InstallationContext, W as Step, X as ValidationIssueSeverity, Y as ValidationIssue, Z as defineBranchStep, _ as executeWorkflow, a as runInstallation, b as StepFailedEvent, c as defineCustomInstallationStep, d as ValidationResult, et as isLeafStep, f as ValidationSummary, g as createInitialState, h as ExecuteWorkflowOptions, i as createInitialInstallationState, j as SucceededInstallationState, k as InstallationStatus, l as StepValidationResult, m as CreateInitialStateOptions, n as RunInstallationOptions, o as runValidation, p as validateStepTree, q as ValidationContext, r as RunValidationOptions, s as CustomInstallationStepHandler, t as CreateInitialInstallationStateOptions, u as ValidateStepTreeOptions, v as InstallationHooks, w as FailedInstallationState, x as StepStartedEvent, y as StepEvent, z as ExecutionContext } from "../index-DRhLtRrX.cjs";
15
+ import { $ as isBranchStep, A as StepStatus, B as InferStepOutput, C as ExecutionStatus, D as InstallationError, E as InstallationData, F as isSucceededState, G as StepContextFactory, H as LeafStep, I as AnyStep, J as ValidationExecutionContext, K as StepMeta, L as BranchStep, M as isCompletedState, N as isFailedState, O as InstallationState, P as isInProgressState, Q as defineLeafStep, R as BranchStepOptions, S as StepSucceededEvent, T as InProgressInstallationState, U as LeafStepOptions, V as InstallationContext, W as Step, X as ValidationIssueSeverity, Y as ValidationIssue, Z as defineBranchStep, _ as executeWorkflow, a as runInstallation, b as StepFailedEvent, c as defineCustomInstallationStep, d as ValidationResult, et as isLeafStep, f as ValidationSummary, g as createInitialState, h as ExecuteWorkflowOptions, i as createInitialInstallationState, j as SucceededInstallationState, k as InstallationStatus, l as StepValidationResult, m as CreateInitialStateOptions, n as RunInstallationOptions, o as runValidation, p as validateStepTree, q as ValidationContext, r as RunValidationOptions, s as CustomInstallationStepHandler, t as CreateInitialInstallationStateOptions, u as ValidateStepTreeOptions, v as InstallationHooks, w as FailedInstallationState, x as StepStartedEvent, y as StepEvent, z as ExecutionContext } from "../index-DZxladgt.cjs";
16
16
  export { AnyStep, BranchStep, BranchStepOptions, CreateInitialInstallationStateOptions, CreateInitialStateOptions, CustomInstallationStepHandler, ExecuteWorkflowOptions, ExecutionContext, ExecutionStatus, FailedInstallationState, InProgressInstallationState, InferStepOutput, InstallationContext, InstallationData, InstallationError, InstallationHooks, InstallationState, InstallationStatus, LeafStep, LeafStepOptions, RunInstallationOptions, RunValidationOptions, Step, StepContextFactory, StepEvent, StepFailedEvent, StepMeta, StepStartedEvent, StepStatus, StepSucceededEvent, StepValidationResult, SucceededInstallationState, ValidateStepTreeOptions, ValidationContext, ValidationExecutionContext, ValidationIssue, ValidationIssueSeverity, ValidationResult, ValidationSummary, createInitialInstallationState, createInitialState, defineBranchStep, defineCustomInstallationStep, defineLeafStep, executeWorkflow, isBranchStep, isCompletedState, isFailedState, isInProgressState, isLeafStep, isSucceededState, runInstallation, runValidation, validateStepTree };
@@ -13,13 +13,13 @@
13
13
  */
14
14
 
15
15
  const require_schemas = require('./schemas-nkIxa8sL.cjs');
16
- const require_webhooks = require('./webhooks-CbZpv9y_.cjs');
16
+ const require_webhooks = require('./webhooks-CLtDxwMa.cjs');
17
17
  const require_error = require('./error-Dn7ool6k.cjs');
18
18
  const require_logging = require('./logging-4s36JTiN.cjs');
19
19
  let camelcase = require("camelcase");
20
20
  camelcase = require_schemas.__toESM(camelcase);
21
- let _adobe_aio_commerce_lib_auth = require("@adobe/aio-commerce-lib-auth");
22
21
  let _adobe_aio_commerce_lib_api = require("@adobe/aio-commerce-lib-api");
22
+ let _adobe_aio_commerce_lib_auth = require("@adobe/aio-commerce-lib-auth");
23
23
  let _adobe_aio_commerce_lib_events_commerce = require("@adobe/aio-commerce-lib-events/commerce");
24
24
  let _adobe_aio_commerce_lib_events_io_events = require("@adobe/aio-commerce-lib-events/io-events");
25
25
  let _adobe_aio_commerce_lib_webhooks_api = require("@adobe/aio-commerce-lib-webhooks/api");
@@ -511,6 +511,62 @@ function defineCustomInstallationStep(handler) {
511
511
  return handler;
512
512
  }
513
513
 
514
+ //#endregion
515
+ //#region source/management/installation/admin-ui-sdk/helpers.ts
516
+ /**
517
+ * Registers the extension with Commerce via POST /V1/adminuisdk/extension.
518
+ *
519
+ * @param context - The execution context providing the Commerce HTTP client and logger.
520
+ * @returns The response from the Commerce API.
521
+ */
522
+ async function registerExtension(context) {
523
+ const { commerceClient, appData, logger } = context;
524
+ logger.info(`Registering Admin UI SDK extension: ${appData.projectName}`);
525
+ const response = await commerceClient.post("adminuisdk/extension", { json: { extension: {
526
+ extensionName: process.env.__OW_NAMESPACE,
527
+ extensionTitle: appData.projectTitle,
528
+ extensionUrl: `https://${process.env.__OW_NAMESPACE}.adobeio-static.net/index.html`,
529
+ extensionWorkspace: appData.workspaceName
530
+ } } }).json();
531
+ logger.info(`Admin UI SDK extension registered successfully: ${response.extensionId}`);
532
+ return response;
533
+ }
534
+
535
+ //#endregion
536
+ //#region source/management/installation/admin-ui-sdk/utils.ts
537
+ /** Creates the Admin UI SDK step context with a lazy-initialized Commerce HTTP client. */
538
+ const createAdminUiSdkStepContext = (installation) => {
539
+ const { params } = installation;
540
+ let commerceClient = null;
541
+ return { get commerceClient() {
542
+ if (commerceClient === null) commerceClient = new _adobe_aio_commerce_lib_api.AdobeCommerceHttpClient((0, _adobe_aio_commerce_lib_api.resolveCommerceHttpClientParams)(params, { tryForwardAuthProvider: true }));
543
+ return commerceClient;
544
+ } };
545
+ };
546
+
547
+ //#endregion
548
+ //#region source/management/installation/admin-ui-sdk/branch.ts
549
+ /** Leaf step that calls POST /V1/adminuisdk/extension to register the extension. */
550
+ const registerExtensionStep = defineLeafStep({
551
+ name: "register-extension",
552
+ meta: {
553
+ label: "Register Extension",
554
+ description: "Registers the Admin UI SDK extension in Adobe Commerce"
555
+ },
556
+ run: (_, context) => registerExtension(context)
557
+ });
558
+ /** Branch step for setting up the Admin UI SDK extension registration. */
559
+ const adminUiSdkStep = defineBranchStep({
560
+ name: "admin-ui-sdk",
561
+ meta: {
562
+ label: "Admin UI SDK",
563
+ description: "Registers the extension with Adobe Commerce Admin UI SDK"
564
+ },
565
+ when: require_webhooks.hasAdminUiSdk,
566
+ context: createAdminUiSdkStepContext,
567
+ children: [registerExtensionStep]
568
+ });
569
+
514
570
  //#endregion
515
571
  //#region source/management/installation/events/utils.ts
516
572
  const COMMERCE_PROVIDER_TYPE = "dx_commerce_events";
@@ -519,14 +575,20 @@ const PROVIDER_TYPE_TO_LABEL = {
519
575
  [COMMERCE_PROVIDER_TYPE]: "Commerce",
520
576
  [EXTERNAL_PROVIDER_TYPE]: "External"
521
577
  };
578
+ /** Max characters taken from `metadata.id` in the I/O Events provider `instance_id`. */
579
+ const METADATA_ID_MAX_LENGTH_FOR_INSTANCE_ID = 100;
522
580
  /**
523
- * Generates a unique instance ID for the given event provider within the context of the provided config.
581
+ * Generates a unique instance ID for I/O Events for this app deployment.
582
+ * Uses `{metadata.id (first 100 chars)}-{providerKeyOrSlug}-{workspaceId}` (lowercased).
583
+ *
524
584
  * @param metadata - The metadata of the application
525
- * @param provider - The event provider for which to generate the instance ID
585
+ * @param provider - The event provider (optional `key`, else label is slugified)
586
+ * @param workspaceId - Adobe I/O Developer Console workspace ID for this deployment
526
587
  */
527
- function generateInstanceId(metadata, provider) {
588
+ function generateInstanceId(metadata, provider, workspaceId) {
589
+ const appId = metadata.id.slice(0, METADATA_ID_MAX_LENGTH_FOR_INSTANCE_ID);
528
590
  const slugLabel = provider.label.toLowerCase().replace(/\s+/g, "-");
529
- return `${metadata.id}-${provider.key ?? slugLabel}`.toLowerCase();
591
+ return `${appId}-${provider.key ?? slugLabel}-${workspaceId}`.toLowerCase();
530
592
  }
531
593
  /**
532
594
  * Find an existing event provider by its instance ID.
@@ -545,7 +607,6 @@ function findExistingProviderMetadata(allMetadata, eventName) {
545
607
  return allMetadata.find((meta) => meta.event_code === eventName) ?? null;
546
608
  }
547
609
  /**
548
- <<<<<<< HEAD
549
610
  * Find existing event registrations by client ID and name.
550
611
  * @param allRegistrations - The list of all existing event registrations.
551
612
  * @param clientId - The client ID of the workspace where the registration was created.
@@ -576,7 +637,7 @@ function getIoEventCode(name, providerType) {
576
637
  * @param runtimeAction - The runtime action this registration points to.
577
638
  */
578
639
  function getRegistrationName(provider, runtimeAction) {
579
- const providerLabel = PROVIDER_TYPE_TO_LABEL[provider.provider_metadata] ?? "Unknown";
640
+ const providerLabel = PROVIDER_TYPE_TO_LABEL[provider.provider_metadata];
580
641
  const [packageName, actionName] = runtimeAction.split("/").map(kebabToTitleCase);
581
642
  return `${providerLabel} Event Registration: ${actionName} (${packageName})`;
582
643
  }
@@ -700,8 +761,11 @@ async function getCommerceEventingExistingData(context) {
700
761
  const { commerceEventsClient } = context;
701
762
  const existingProviders = await commerceEventsClient.getAllEventProviders();
702
763
  const existingSubscriptions = await commerceEventsClient.getAllEventSubscriptions();
764
+ const defaultProvider = existingProviders.find((provider) => !("id" in provider)) ?? null;
765
+ const isDefaultProviderConfigured = defaultProvider !== null;
703
766
  return {
704
- isDefaultWorkspaceConfigurationEmpty: existingProviders.some((provider) => !("id" in provider) && !provider.workspace_configuration?.trim()),
767
+ isDefaultProviderConfigured,
768
+ isDefaultWorkspaceConfigurationEmpty: isDefaultProviderConfigured ? !defaultProvider.workspace_configuration?.trim() : true,
705
769
  providers: existingProviders,
706
770
  subscriptions: new Map(existingSubscriptions.map((subscription) => [subscription.name, subscription]))
707
771
  };
@@ -862,22 +926,30 @@ async function createOrGetIoEventRegistration(params, registrations) {
862
926
  async function configureCommerceEventing(params, existingData) {
863
927
  const { context, config } = params;
864
928
  const { commerceEventsClient, logger } = context;
929
+ const { isDefaultProviderConfigured, isDefaultWorkspaceConfigurationEmpty } = existingData;
865
930
  logger.info("Starting configuration of the Commerce Eventing Module");
866
- let updateParams = {
867
- ...config,
868
- enabled: true
869
- };
870
- if (existingData.isDefaultWorkspaceConfigurationEmpty) {
871
- if (!config.workspace_configuration) {
931
+ if (isDefaultProviderConfigured && !isDefaultWorkspaceConfigurationEmpty) {
932
+ logger.info("Commerce Eventing Module is already configured, skipping configuration step.");
933
+ return;
934
+ }
935
+ const { workspace_configuration, ...configWithoutWorkspace } = config;
936
+ let updateParams = { enabled: true };
937
+ if (isDefaultWorkspaceConfigurationEmpty) {
938
+ if (!workspace_configuration) {
872
939
  const message = "Workspace configuration is required to enable Commerce Eventing when there is not an existing one.";
873
940
  logger.error(message);
874
941
  throw new Error(message);
875
942
  }
876
- logger.info("Default provider workspace configuration already present, it will not be overriden");
877
- const { workspace_configuration, ...rest } = updateParams;
878
- updateParams = rest;
943
+ updateParams.workspace_configuration = workspace_configuration;
944
+ logger.info("Adding workspace configuration to Commerce Eventing configuration as it has not been set up yet.");
945
+ }
946
+ if (!isDefaultProviderConfigured) {
947
+ logger.info("Default provider not configured, it will be created with the provided configuration.");
948
+ updateParams = {
949
+ ...updateParams,
950
+ ...configWithoutWorkspace
951
+ };
879
952
  }
880
- logger.info("Updating Commerce Eventing configuration with provided workspace configuration.");
881
953
  return commerceEventsClient.updateEventingConfiguration(updateParams).then((success) => {
882
954
  if (success) {
883
955
  logger.info("Commerce Eventing Module configured successfully.");
@@ -976,7 +1048,7 @@ async function createOrGetCommerceEventSubscription(params, existingData) {
976
1048
  async function onboardIoEvents(params, existingData) {
977
1049
  const { providersWithMetadata, registrations } = existingData;
978
1050
  const { context, metadata, provider, providerType, events } = params;
979
- const instanceId = generateInstanceId(metadata, provider);
1051
+ const instanceId = generateInstanceId(metadata, provider, context.appData.workspaceId);
980
1052
  const providerData = await createOrGetIoEventProvider({
981
1053
  context,
982
1054
  provider: {
@@ -1469,6 +1541,7 @@ function createDefaultChildSteps(config) {
1469
1541
  return [
1470
1542
  eventingStep,
1471
1543
  webhooksStep,
1544
+ adminUiSdkStep,
1472
1545
  createCustomInstallationStep(config)
1473
1546
  ];
1474
1547
  }
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  const require_schemas = require('./schemas-nkIxa8sL.cjs');
16
- const require_webhooks = require('./webhooks-CbZpv9y_.cjs');
16
+ const require_webhooks = require('./webhooks-CLtDxwMa.cjs');
17
17
  let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
18
18
  let valibot = require("valibot");
19
19
  valibot = require_schemas.__toESM(valibot);
@@ -37,6 +37,7 @@ function hasBusinessConfigSchema(config) {
37
37
 
38
38
  //#endregion
39
39
  //#region source/config/schema/metadata.ts
40
+ const MAX_ID_LENGTH = 100;
40
41
  const MAX_DESCRIPTION_LENGTH = 255;
41
42
  const MAX_DISPLAY_NAME_LENGTH = 50;
42
43
  const NUMERIC_IDENTIFIER = "(0|[1-9]\\d*)";
@@ -46,7 +47,7 @@ function nonEmptyString(fieldName) {
46
47
  }
47
48
  /** The schema for the metadata of the application. */
48
49
  const MetadataSchema = valibot.object({
49
- id: require_schemas.alphaNumericOrHyphenSchema("application id (metadata.id)"),
50
+ id: valibot.pipe(require_schemas.alphaNumericOrHyphenSchema("application id (metadata.id)"), valibot.maxLength(MAX_ID_LENGTH, `The application id must not be longer than ${MAX_ID_LENGTH} characters`)),
50
51
  displayName: valibot.pipe(nonEmptyString("application display name"), valibot.maxLength(MAX_DISPLAY_NAME_LENGTH, `The application display name must not be longer than ${MAX_DISPLAY_NAME_LENGTH} characters`)),
51
52
  description: valibot.pipe(nonEmptyString("metadata description"), valibot.maxLength(MAX_DESCRIPTION_LENGTH, `The metadata description must not be longer than ${MAX_DESCRIPTION_LENGTH} characters`)),
52
53
  version: valibot.pipe(nonEmptyString("version"), valibot.regex(SEMVER_REGEX, "The version must follow semantic versioning (semver) format: Major.Minor.Patch (e.g., '1.0.0', '2.3.1')"))
@@ -67,6 +68,7 @@ const CommerceAppConfigSchema = valibot.looseObject({
67
68
  metadata: MetadataSchema,
68
69
  businessConfig: valibot.optional(_adobe_aio_commerce_lib_config.SchemaBusinessConfig),
69
70
  eventing: valibot.optional(require_webhooks.EventingSchema),
71
+ adminUiSdk: valibot.optional(require_webhooks.AdminUiSdkSchema),
70
72
  installation: valibot.optional(require_webhooks.InstallationSchema),
71
73
  webhooks: valibot.optional(require_webhooks.WebhooksSchema)
72
74
  });
@@ -83,7 +85,8 @@ const CommerceAppConfigSchemas = {
83
85
  "businessConfig.schema": valibot.unwrap(_adobe_aio_commerce_lib_config.SchemaBusinessConfig.entries.schema),
84
86
  "eventing.commerce": valibot.unwrap(require_webhooks.EventingSchema.entries.commerce),
85
87
  "eventing.external": valibot.unwrap(require_webhooks.EventingSchema.entries.external),
86
- "installation.customInstallationSteps": valibot.unwrap(require_webhooks.InstallationSchema.entries.customInstallationSteps)
88
+ "installation.customInstallationSteps": valibot.unwrap(require_webhooks.InstallationSchema.entries.customInstallationSteps),
89
+ adminUiSdk: require_webhooks.AdminUiSdkSchema
87
90
  };
88
91
  /**
89
92
  * Get the config domains that are present in the config.
@@ -98,6 +101,7 @@ function getConfigDomains(config) {
98
101
  eventing: withCommerceEvents || withExternalEvents,
99
102
  installation: require_webhooks.hasCustomInstallation(config),
100
103
  webhooks: require_webhooks.hasWebhooks(config),
104
+ adminUiSdk: require_webhooks.hasAdminUiSdk(config),
101
105
  "businessConfig.schema": hasBusinessConfigSchema(config),
102
106
  "eventing.commerce": withCommerceEvents,
103
107
  "eventing.external": withExternalEvents,