@adobe/aio-commerce-lib-app 1.0.2 → 1.1.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 (54) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/actions/app-config.cjs +18 -4
  3. package/dist/cjs/actions/app-config.d.cts +15 -1
  4. package/dist/cjs/actions/config.cjs +17 -3
  5. package/dist/cjs/actions/config.d.cts +14 -0
  6. package/dist/cjs/actions/installation.cjs +70 -16
  7. package/dist/cjs/actions/installation.d.cts +16 -2
  8. package/dist/cjs/actions/scope-tree.cjs +17 -3
  9. package/dist/cjs/actions/scope-tree.d.cts +14 -0
  10. package/dist/cjs/{app-DWX5-Hsf.d.cts → app-lymFcs59.d.cts} +146 -1
  11. package/dist/cjs/commands/index.cjs +41 -27
  12. package/dist/cjs/commands/index.d.cts +14 -0
  13. package/dist/cjs/config/index.cjs +27 -12
  14. package/dist/cjs/config/index.d.cts +576 -4
  15. package/dist/cjs/{parser-BPpg_9QB.cjs → config-YEeaEqzi.cjs} +17 -3
  16. package/dist/cjs/error-Dn7ool6k.cjs +38 -0
  17. package/dist/{es/runner-BD-lItnK.d.mts → cjs/index-DRhLtRrX.d.cts} +102 -4
  18. package/dist/cjs/logging-4s36JTiN.cjs +39 -0
  19. package/dist/cjs/management/index.cjs +23 -8
  20. package/dist/cjs/management/index.d.cts +16 -2
  21. package/dist/cjs/{runner-NHMvoMO2.cjs → management-PZtLe4Ji.cjs} +371 -30
  22. package/dist/cjs/{router-DCw7oEQ9.cjs → router-KeQRduO3.cjs} +15 -1
  23. package/dist/cjs/{schemas-CZ6c8Id9.cjs → schemas-nkIxa8sL.cjs} +34 -0
  24. package/dist/cjs/{validate-Btzn9ilZ.cjs → validate-CwwYD8aC.cjs} +31 -14
  25. package/dist/cjs/{installation-CLbceU9F.cjs → webhooks-CbZpv9y_.cjs} +105 -1
  26. package/dist/es/actions/app-config.d.mts +15 -1
  27. package/dist/es/actions/app-config.mjs +17 -3
  28. package/dist/es/actions/config.d.mts +14 -0
  29. package/dist/es/actions/config.mjs +17 -3
  30. package/dist/es/actions/installation.d.mts +16 -2
  31. package/dist/es/actions/installation.mjs +64 -10
  32. package/dist/es/actions/scope-tree.d.mts +14 -0
  33. package/dist/es/actions/scope-tree.mjs +17 -3
  34. package/dist/es/{app-BAiyvNo2.d.mts → app-Ct7Y0NP8.d.mts} +146 -1
  35. package/dist/es/commands/index.d.mts +14 -0
  36. package/dist/es/commands/index.mjs +21 -7
  37. package/dist/es/config/index.d.mts +576 -4
  38. package/dist/es/config/index.mjs +18 -4
  39. package/dist/es/{parser-CQZTVG6i.mjs → config-BbrkH0Xt.mjs} +16 -2
  40. package/dist/es/error-DHlYzkbb.mjs +32 -0
  41. package/dist/{cjs/runner-DemKouFJ.d.cts → es/index-D33OCH0D.d.mts} +102 -4
  42. package/dist/es/logging-XIUXDK5T.mjs +32 -0
  43. package/dist/es/management/index.d.mts +16 -2
  44. package/dist/es/management/index.mjs +16 -2
  45. package/dist/es/{runner-vwAhjD5r.mjs → management-CIoVWirU.mjs} +360 -25
  46. package/dist/es/{router-CJ4VWoCt.mjs → router-BxaxEEu3.mjs} +14 -0
  47. package/dist/es/{schemas-B8yIv0_b.mjs → schemas-BvPxQwgQ.mjs} +29 -1
  48. package/dist/es/{validate-DKnju9-R.mjs → validate-qRpfubPo.mjs} +21 -4
  49. package/dist/es/{installation-BTL9X7iv.mjs → webhooks-NgM6k3_r.mjs} +94 -2
  50. package/package.json +10 -7
  51. package/dist/cjs/error-DJ2UAPH2.cjs +0 -24
  52. package/dist/cjs/logging-IDRQG0as.cjs +0 -25
  53. package/dist/es/error-CMV3IjBz.mjs +0 -18
  54. package/dist/es/logging-CzmXDzxI.mjs +0 -18
@@ -1,4 +1,18 @@
1
- import { n as CommerceAppConfigOutputModel, t as CommerceAppConfig } from "../app-BAiyvNo2.mjs";
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright 2026 Adobe. All rights reserved.
5
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License. You may obtain a copy
7
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ * OF ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ */
14
+
15
+ import { n as CommerceAppConfigOutputModel, t as CommerceAppConfig } from "../app-Ct7Y0NP8.mjs";
2
16
  import * as v from "valibot";
3
17
  import { Get, SetRequiredDeep } from "type-fest";
4
18
 
@@ -131,6 +145,72 @@ declare function defineConfig(config: CommerceAppConfig): {
131
145
  description: string;
132
146
  }[] | undefined;
133
147
  } | undefined;
148
+ webhooks?: ({
149
+ label: string;
150
+ description: string;
151
+ category?: "validation" | "append" | "modification" | undefined;
152
+ runtimeAction: string;
153
+ requireAdobeAuth?: boolean | undefined;
154
+ webhook: {
155
+ webhook_method: string;
156
+ webhook_type: string;
157
+ batch_name: string;
158
+ batch_order?: number | undefined;
159
+ hook_name: string;
160
+ priority?: number | undefined;
161
+ required?: boolean | undefined;
162
+ soft_timeout?: number | undefined;
163
+ timeout?: number | undefined;
164
+ method: string;
165
+ fallback_error_message?: string | undefined;
166
+ ttl?: number | undefined;
167
+ fields?: {
168
+ name: string;
169
+ source?: string | undefined;
170
+ }[] | undefined;
171
+ rules?: {
172
+ field: string;
173
+ operator: string;
174
+ value: string;
175
+ }[] | undefined;
176
+ headers?: {
177
+ name: string;
178
+ value: string;
179
+ }[] | undefined;
180
+ };
181
+ } | {
182
+ label: string;
183
+ description: string;
184
+ category?: "validation" | "append" | "modification" | undefined;
185
+ webhook: {
186
+ url: string;
187
+ webhook_method: string;
188
+ webhook_type: string;
189
+ batch_name: string;
190
+ batch_order?: number | undefined;
191
+ hook_name: string;
192
+ priority?: number | undefined;
193
+ required?: boolean | undefined;
194
+ soft_timeout?: number | undefined;
195
+ timeout?: number | undefined;
196
+ method: string;
197
+ fallback_error_message?: string | undefined;
198
+ ttl?: number | undefined;
199
+ fields?: {
200
+ name: string;
201
+ source?: string | undefined;
202
+ }[] | undefined;
203
+ rules?: {
204
+ field: string;
205
+ operator: string;
206
+ value: string;
207
+ }[] | undefined;
208
+ headers?: {
209
+ name: string;
210
+ value: string;
211
+ }[] | undefined;
212
+ };
213
+ })[] | undefined;
134
214
  } & {
135
215
  [key: string]: unknown;
136
216
  };
@@ -286,6 +366,72 @@ declare function parseCommerceAppConfig(cwd?: string): Promise<{
286
366
  description: string;
287
367
  }[] | undefined;
288
368
  } | undefined;
369
+ webhooks?: ({
370
+ label: string;
371
+ description: string;
372
+ category?: "validation" | "append" | "modification" | undefined;
373
+ runtimeAction: string;
374
+ requireAdobeAuth?: boolean | undefined;
375
+ webhook: {
376
+ webhook_method: string;
377
+ webhook_type: string;
378
+ batch_name: string;
379
+ batch_order?: number | undefined;
380
+ hook_name: string;
381
+ priority?: number | undefined;
382
+ required?: boolean | undefined;
383
+ soft_timeout?: number | undefined;
384
+ timeout?: number | undefined;
385
+ method: string;
386
+ fallback_error_message?: string | undefined;
387
+ ttl?: number | undefined;
388
+ fields?: {
389
+ name: string;
390
+ source?: string | undefined;
391
+ }[] | undefined;
392
+ rules?: {
393
+ field: string;
394
+ operator: string;
395
+ value: string;
396
+ }[] | undefined;
397
+ headers?: {
398
+ name: string;
399
+ value: string;
400
+ }[] | undefined;
401
+ };
402
+ } | {
403
+ label: string;
404
+ description: string;
405
+ category?: "validation" | "append" | "modification" | undefined;
406
+ webhook: {
407
+ url: string;
408
+ webhook_method: string;
409
+ webhook_type: string;
410
+ batch_name: string;
411
+ batch_order?: number | undefined;
412
+ hook_name: string;
413
+ priority?: number | undefined;
414
+ required?: boolean | undefined;
415
+ soft_timeout?: number | undefined;
416
+ timeout?: number | undefined;
417
+ method: string;
418
+ fallback_error_message?: string | undefined;
419
+ ttl?: number | undefined;
420
+ fields?: {
421
+ name: string;
422
+ source?: string | undefined;
423
+ }[] | undefined;
424
+ rules?: {
425
+ field: string;
426
+ operator: string;
427
+ value: string;
428
+ }[] | undefined;
429
+ headers?: {
430
+ name: string;
431
+ value: string;
432
+ }[] | undefined;
433
+ };
434
+ })[] | undefined;
289
435
  } & {
290
436
  [key: string]: unknown;
291
437
  }>;
@@ -297,7 +443,7 @@ declare const CommerceAppConfigSchemas: {
297
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}`>]>;
298
444
  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">]>;
299
445
  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">]>;
300
- 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">]>;
446
+ 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')">]>;
301
447
  }, undefined>;
302
448
  readonly businessConfig: v.ObjectSchema<{
303
449
  readonly schema: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.VariantSchema<"selectionMode", [v.ObjectSchema<{
@@ -462,6 +608,137 @@ declare const CommerceAppConfigSchemas: {
462
608
  description: string;
463
609
  }[] | undefined, "Duplicate step names detected in custom installation steps. Each step must have a unique name.">]>;
464
610
  }, undefined>;
611
+ readonly webhooks: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
612
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
613
+ readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
614
+ readonly category: v.OptionalSchema<v.PicklistSchema<readonly ["validation", "append", "modification"], `Webhook category must be one of: ${string}`>, undefined>;
615
+ readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
616
+ readonly requireAdobeAuth: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
617
+ readonly webhook: v.ObjectSchema<{
618
+ readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
619
+ readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
620
+ readonly batch_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.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
621
+ readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
622
+ readonly hook_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.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
623
+ readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
624
+ readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
625
+ readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
626
+ readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
627
+ readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
628
+ readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
629
+ readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
630
+ readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
631
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
632
+ readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
633
+ }, undefined>, "Expected an array of webhook field objects">, undefined>;
634
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
635
+ readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
636
+ readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
637
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
638
+ }, undefined>, "Expected an array of webhook rule objects">, undefined>;
639
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
640
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
641
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
642
+ }, undefined>, "Expected an array of webhook header objects">, undefined>;
643
+ }, undefined>;
644
+ }, undefined>, v.ObjectSchema<{
645
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
646
+ readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
647
+ readonly category: v.OptionalSchema<v.PicklistSchema<readonly ["validation", "append", "modification"], `Webhook category must be one of: ${string}`>, undefined>;
648
+ readonly webhook: v.ObjectSchema<{
649
+ readonly url: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.UrlAction<string, "The 'url' field must be a valid absolute URL (e.g., 'https://example.com/webhook')">]>;
650
+ readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
651
+ readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
652
+ readonly batch_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.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
653
+ readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
654
+ readonly hook_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.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
655
+ readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
656
+ readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
657
+ readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
658
+ readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
659
+ readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
660
+ readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
661
+ readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
662
+ readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
663
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
664
+ readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
665
+ }, undefined>, "Expected an array of webhook field objects">, undefined>;
666
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
667
+ readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
668
+ readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
669
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
670
+ }, undefined>, "Expected an array of webhook rule objects">, undefined>;
671
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
672
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
673
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
674
+ }, undefined>, "Expected an array of webhook header objects">, undefined>;
675
+ }, undefined>;
676
+ }, undefined>], "Each webhook entry must define either a 'runtimeAction' (to resolve the URL from a runtime action) or an explicit 'url' inside the 'webhook' object, but not both">, "Expected an array of webhook entries">, v.MinLengthAction<({
677
+ label: string;
678
+ description: string;
679
+ category?: "validation" | "append" | "modification" | undefined;
680
+ runtimeAction: string;
681
+ requireAdobeAuth?: boolean | undefined;
682
+ webhook: {
683
+ webhook_method: string;
684
+ webhook_type: string;
685
+ batch_name: string;
686
+ batch_order?: number | undefined;
687
+ hook_name: string;
688
+ priority?: number | undefined;
689
+ required?: boolean | undefined;
690
+ soft_timeout?: number | undefined;
691
+ timeout?: number | undefined;
692
+ method: string;
693
+ fallback_error_message?: string | undefined;
694
+ ttl?: number | undefined;
695
+ fields?: {
696
+ name: string;
697
+ source?: string | undefined;
698
+ }[] | undefined;
699
+ rules?: {
700
+ field: string;
701
+ operator: string;
702
+ value: string;
703
+ }[] | undefined;
704
+ headers?: {
705
+ name: string;
706
+ value: string;
707
+ }[] | undefined;
708
+ };
709
+ } | {
710
+ label: string;
711
+ description: string;
712
+ category?: "validation" | "append" | "modification" | undefined;
713
+ webhook: {
714
+ url: string;
715
+ webhook_method: string;
716
+ webhook_type: string;
717
+ batch_name: string;
718
+ batch_order?: number | undefined;
719
+ hook_name: string;
720
+ priority?: number | undefined;
721
+ required?: boolean | undefined;
722
+ soft_timeout?: number | undefined;
723
+ timeout?: number | undefined;
724
+ method: string;
725
+ fallback_error_message?: string | undefined;
726
+ ttl?: number | undefined;
727
+ fields?: {
728
+ name: string;
729
+ source?: string | undefined;
730
+ }[] | undefined;
731
+ rules?: {
732
+ field: string;
733
+ operator: string;
734
+ value: string;
735
+ }[] | undefined;
736
+ headers?: {
737
+ name: string;
738
+ value: string;
739
+ }[] | undefined;
740
+ };
741
+ })[], 1, "webhooks array must contain at least one webhook when present">]>, undefined>;
465
742
  readonly "businessConfig.schema": v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.VariantSchema<"selectionMode", [v.ObjectSchema<{
466
743
  readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
467
744
  readonly selectionMode: v.LiteralSchema<"single", "Expected the selectionMode to be 'single'">;
@@ -895,7 +1172,7 @@ declare const MetadataSchema: v.ObjectSchema<{
895
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}`>]>;
896
1173
  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">]>;
897
1174
  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">]>;
898
- 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">]>;
1175
+ 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')">]>;
899
1176
  }, undefined>;
900
1177
  /** The metadata associated to an Adobe Commerce application. */
901
1178
  type ApplicationMetadata = v.InferInput<typeof MetadataSchema>;
@@ -905,4 +1182,299 @@ type ApplicationMetadata = v.InferInput<typeof MetadataSchema>;
905
1182
  */
906
1183
  declare function hasMetadata(config: CommerceAppConfigOutputModel): boolean;
907
1184
  //#endregion
908
- export { type AppConfigWithBusinessConfig, type AppConfigWithBusinessConfigSchema, AppEvent, type ApplicationMetadata, type CommerceAppConfig, type CommerceAppConfigDomain, CommerceAppConfigSchemas, CommerceEvent, CommerceEventSource, CommerceEventSourceSchema, CommerceEventsConfig, EventProvider, EventingConfiguration, EventingSchema, EventsConfig, ExternalEvent, ExternalEventSource, ExternalEventSourceSchema, ExternalEventsConfig, defineConfig, getConfigDomains, hasBusinessConfig, hasBusinessConfigSchema, hasCommerceEvents, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps, hasEventing, hasExternalEvents, hasMetadata, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };
1185
+ //#region source/config/schema/webhooks.d.ts
1186
+ /** Schema for webhook field configuration (name and optional source). */
1187
+ declare const WebhookFieldSchema: v.ObjectSchema<{
1188
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1189
+ readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1190
+ }, undefined>;
1191
+ /** Schema for webhook rule configuration (field, operator, value). */
1192
+ declare const WebhookRuleSchema: v.ObjectSchema<{
1193
+ readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1194
+ readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1195
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1196
+ }, undefined>;
1197
+ /** Schema for webhook header configuration (name, value). */
1198
+ declare const WebhookHeaderSchema: v.ObjectSchema<{
1199
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1200
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1201
+ }, undefined>;
1202
+ /** Schema for the nested webhook payload without url — used when runtimeAction resolves the URL at runtime. */
1203
+ declare const WebhookDefinitionBaseSchema: v.ObjectSchema<{
1204
+ readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1205
+ readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1206
+ readonly batch_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.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
1207
+ readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1208
+ readonly hook_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.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
1209
+ readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1210
+ readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
1211
+ readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1212
+ readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1213
+ readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1214
+ readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1215
+ readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1216
+ readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1217
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1218
+ readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1219
+ }, undefined>, "Expected an array of webhook field objects">, undefined>;
1220
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1221
+ readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1222
+ readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1223
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1224
+ }, undefined>, "Expected an array of webhook rule objects">, undefined>;
1225
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1226
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1227
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1228
+ }, undefined>, "Expected an array of webhook header objects">, undefined>;
1229
+ }, undefined>;
1230
+ /** Schema for the nested webhook payload with a required url. */
1231
+ declare const WebhookDefinitionWithUrlSchema: v.ObjectSchema<{
1232
+ readonly url: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.UrlAction<string, "The 'url' field must be a valid absolute URL (e.g., 'https://example.com/webhook')">]>;
1233
+ readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1234
+ readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1235
+ readonly batch_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.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
1236
+ readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1237
+ readonly hook_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.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
1238
+ readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1239
+ readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
1240
+ readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1241
+ readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1242
+ readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1243
+ readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1244
+ readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1245
+ readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1246
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1247
+ readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1248
+ }, undefined>, "Expected an array of webhook field objects">, undefined>;
1249
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1250
+ readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1251
+ readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1252
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1253
+ }, undefined>, "Expected an array of webhook rule objects">, undefined>;
1254
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1255
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1256
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1257
+ }, undefined>, "Expected an array of webhook header objects">, undefined>;
1258
+ }, undefined>;
1259
+ /** Schema for a single webhook entry — either runtimeAction (no url) or explicit url (no runtimeAction). */
1260
+ declare const WebhookEntrySchema: v.UnionSchema<[v.ObjectSchema<{
1261
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1262
+ readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1263
+ readonly category: v.OptionalSchema<v.PicklistSchema<readonly ["validation", "append", "modification"], `Webhook category must be one of: ${string}`>, undefined>;
1264
+ readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1265
+ readonly requireAdobeAuth: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
1266
+ readonly webhook: v.ObjectSchema<{
1267
+ readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1268
+ readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1269
+ readonly batch_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.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
1270
+ readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1271
+ readonly hook_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.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
1272
+ readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1273
+ readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
1274
+ readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1275
+ readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1276
+ readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1277
+ readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1278
+ readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1279
+ readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1280
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1281
+ readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1282
+ }, undefined>, "Expected an array of webhook field objects">, undefined>;
1283
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1284
+ readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1285
+ readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1286
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1287
+ }, undefined>, "Expected an array of webhook rule objects">, undefined>;
1288
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1289
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1290
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1291
+ }, undefined>, "Expected an array of webhook header objects">, undefined>;
1292
+ }, undefined>;
1293
+ }, undefined>, v.ObjectSchema<{
1294
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1295
+ readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1296
+ readonly category: v.OptionalSchema<v.PicklistSchema<readonly ["validation", "append", "modification"], `Webhook category must be one of: ${string}`>, undefined>;
1297
+ readonly webhook: v.ObjectSchema<{
1298
+ readonly url: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.UrlAction<string, "The 'url' field must be a valid absolute URL (e.g., 'https://example.com/webhook')">]>;
1299
+ readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1300
+ readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1301
+ readonly batch_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.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
1302
+ readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1303
+ readonly hook_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.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
1304
+ readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1305
+ readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
1306
+ readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1307
+ readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1308
+ readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1309
+ readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1310
+ readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1311
+ readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1312
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1313
+ readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1314
+ }, undefined>, "Expected an array of webhook field objects">, undefined>;
1315
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1316
+ readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1317
+ readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1318
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1319
+ }, undefined>, "Expected an array of webhook rule objects">, undefined>;
1320
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1321
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1322
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1323
+ }, undefined>, "Expected an array of webhook header objects">, undefined>;
1324
+ }, undefined>;
1325
+ }, undefined>], "Each webhook entry must define either a 'runtimeAction' (to resolve the URL from a runtime action) or an explicit 'url' inside the 'webhook' object, but not both">;
1326
+ /** Schema for the optional webhooks array (when present, must have at least one item). */
1327
+ declare const WebhooksSchema: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
1328
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1329
+ readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1330
+ readonly category: v.OptionalSchema<v.PicklistSchema<readonly ["validation", "append", "modification"], `Webhook category must be one of: ${string}`>, undefined>;
1331
+ readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1332
+ readonly requireAdobeAuth: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
1333
+ readonly webhook: v.ObjectSchema<{
1334
+ readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1335
+ readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1336
+ readonly batch_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.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
1337
+ readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1338
+ readonly hook_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.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
1339
+ readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1340
+ readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
1341
+ readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1342
+ readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1343
+ readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1344
+ readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1345
+ readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1346
+ readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1347
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1348
+ readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1349
+ }, undefined>, "Expected an array of webhook field objects">, undefined>;
1350
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1351
+ readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1352
+ readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1353
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1354
+ }, undefined>, "Expected an array of webhook rule objects">, undefined>;
1355
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1356
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1357
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1358
+ }, undefined>, "Expected an array of webhook header objects">, undefined>;
1359
+ }, undefined>;
1360
+ }, undefined>, v.ObjectSchema<{
1361
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1362
+ readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1363
+ readonly category: v.OptionalSchema<v.PicklistSchema<readonly ["validation", "append", "modification"], `Webhook category must be one of: ${string}`>, undefined>;
1364
+ readonly webhook: v.ObjectSchema<{
1365
+ readonly url: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.UrlAction<string, "The 'url' field must be a valid absolute URL (e.g., 'https://example.com/webhook')">]>;
1366
+ readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1367
+ readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1368
+ readonly batch_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.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
1369
+ readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1370
+ readonly hook_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.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
1371
+ readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1372
+ readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
1373
+ readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1374
+ readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1375
+ readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1376
+ readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1377
+ readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
1378
+ readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1379
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1380
+ readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
1381
+ }, undefined>, "Expected an array of webhook field objects">, undefined>;
1382
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1383
+ readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1384
+ readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1385
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1386
+ }, undefined>, "Expected an array of webhook rule objects">, undefined>;
1387
+ readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1388
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1389
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
1390
+ }, undefined>, "Expected an array of webhook header objects">, undefined>;
1391
+ }, undefined>;
1392
+ }, undefined>], "Each webhook entry must define either a 'runtimeAction' (to resolve the URL from a runtime action) or an explicit 'url' inside the 'webhook' object, but not both">, "Expected an array of webhook entries">, v.MinLengthAction<({
1393
+ label: string;
1394
+ description: string;
1395
+ category?: "validation" | "append" | "modification" | undefined;
1396
+ runtimeAction: string;
1397
+ requireAdobeAuth?: boolean | undefined;
1398
+ webhook: {
1399
+ webhook_method: string;
1400
+ webhook_type: string;
1401
+ batch_name: string;
1402
+ batch_order?: number | undefined;
1403
+ hook_name: string;
1404
+ priority?: number | undefined;
1405
+ required?: boolean | undefined;
1406
+ soft_timeout?: number | undefined;
1407
+ timeout?: number | undefined;
1408
+ method: string;
1409
+ fallback_error_message?: string | undefined;
1410
+ ttl?: number | undefined;
1411
+ fields?: {
1412
+ name: string;
1413
+ source?: string | undefined;
1414
+ }[] | undefined;
1415
+ rules?: {
1416
+ field: string;
1417
+ operator: string;
1418
+ value: string;
1419
+ }[] | undefined;
1420
+ headers?: {
1421
+ name: string;
1422
+ value: string;
1423
+ }[] | undefined;
1424
+ };
1425
+ } | {
1426
+ label: string;
1427
+ description: string;
1428
+ category?: "validation" | "append" | "modification" | undefined;
1429
+ webhook: {
1430
+ url: string;
1431
+ webhook_method: string;
1432
+ webhook_type: string;
1433
+ batch_name: string;
1434
+ batch_order?: number | undefined;
1435
+ hook_name: string;
1436
+ priority?: number | undefined;
1437
+ required?: boolean | undefined;
1438
+ soft_timeout?: number | undefined;
1439
+ timeout?: number | undefined;
1440
+ method: string;
1441
+ fallback_error_message?: string | undefined;
1442
+ ttl?: number | undefined;
1443
+ fields?: {
1444
+ name: string;
1445
+ source?: string | undefined;
1446
+ }[] | undefined;
1447
+ rules?: {
1448
+ field: string;
1449
+ operator: string;
1450
+ value: string;
1451
+ }[] | undefined;
1452
+ headers?: {
1453
+ name: string;
1454
+ value: string;
1455
+ }[] | undefined;
1456
+ };
1457
+ })[], 1, "webhooks array must contain at least one webhook when present">]>, undefined>;
1458
+ /** Webhook field configuration */
1459
+ type WebhookField = v.InferInput<typeof WebhookFieldSchema>;
1460
+ /** Webhook rule configuration */
1461
+ type WebhookRule = v.InferInput<typeof WebhookRuleSchema>;
1462
+ /** Webhook header configuration */
1463
+ type WebhookHeader = v.InferInput<typeof WebhookHeaderSchema>;
1464
+ /** Nested webhook payload (webhook_method, fields, etc.) — union of base shape and url-carrying shape. */
1465
+ type WebhookDefinition = v.InferInput<typeof WebhookDefinitionBaseSchema> | v.InferInput<typeof WebhookDefinitionWithUrlSchema>;
1466
+ /** Single webhook entry — either runtimeAction-based or url-based (mutually exclusive at the type level). */
1467
+ type WebhookEntry = v.InferInput<typeof WebhookEntrySchema>;
1468
+ /** Webhooks configuration (array of webhook entries). */
1469
+ type WebhooksConfiguration = v.InferInput<typeof WebhooksSchema>;
1470
+ /** Config type when webhooks are present (non-empty array). */
1471
+ type WebhooksConfig = CommerceAppConfigOutputModel & {
1472
+ webhooks: NonNullable<CommerceAppConfigOutputModel["webhooks"]>;
1473
+ };
1474
+ /**
1475
+ * Check if config has webhooks (non-empty array).
1476
+ * @param config - The configuration to check.
1477
+ */
1478
+ declare function hasWebhooks(config: CommerceAppConfigOutputModel): config is WebhooksConfig;
1479
+ //#endregion
1480
+ export { type AppConfigWithBusinessConfig, type AppConfigWithBusinessConfigSchema, AppEvent, type ApplicationMetadata, type CommerceAppConfig, type CommerceAppConfigDomain, CommerceAppConfigSchemas, CommerceEvent, CommerceEventSource, CommerceEventSourceSchema, CommerceEventsConfig, EventProvider, EventingConfiguration, EventingSchema, EventsConfig, ExternalEvent, ExternalEventSource, ExternalEventSourceSchema, ExternalEventsConfig, WebhookDefinition, WebhookEntry, WebhookField, WebhookHeader, WebhookRule, WebhooksConfig, WebhooksConfiguration, WebhooksSchema, defineConfig, getConfigDomains, hasBusinessConfig, hasBusinessConfigSchema, hasCommerceEvents, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps, hasEventing, hasExternalEvents, hasMetadata, hasWebhooks, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };