@adobe/aio-commerce-lib-app 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/cjs/actions/index.cjs +179 -0
  3. package/dist/cjs/actions/index.d.cts +18 -0
  4. package/dist/cjs/app-C4HhkXbP.d.cts +451 -0
  5. package/dist/cjs/commands/generate/actions/templates/custom-scripts.js.template +28 -0
  6. package/dist/cjs/commands/generate/actions/templates/get-app-config.js.template +11 -10
  7. package/dist/cjs/commands/generate/actions/templates/installation.js.template +21 -0
  8. package/dist/cjs/commands/index.cjs +39 -50
  9. package/dist/cjs/config/index.cjs +1 -14
  10. package/dist/cjs/config/index.d.cts +107 -423
  11. package/dist/cjs/error-yAk1zzvx.cjs +1 -0
  12. package/dist/cjs/index-DS3IlISO.d.cts +345 -0
  13. package/dist/cjs/management/index.cjs +1 -0
  14. package/dist/cjs/management/index.d.cts +2 -0
  15. package/dist/cjs/management-CE3_DJw4.cjs +2 -0
  16. package/dist/cjs/parser-Dovux8ce.cjs +1 -0
  17. package/dist/cjs/schemas-CdaP-Exw.cjs +1 -0
  18. package/dist/es/actions/index.d.mts +18 -0
  19. package/dist/es/actions/index.mjs +179 -0
  20. package/dist/es/app-CMpx3D7Y.d.mts +451 -0
  21. package/dist/es/chunk-VmiN0kV1.mjs +1 -0
  22. package/dist/es/commands/generate/actions/templates/custom-scripts.js.template +28 -0
  23. package/dist/es/commands/generate/actions/templates/get-app-config.js.template +11 -10
  24. package/dist/es/commands/generate/actions/templates/installation.js.template +21 -0
  25. package/dist/es/commands/index.mjs +39 -50
  26. package/dist/es/config/index.d.mts +107 -423
  27. package/dist/es/config/index.mjs +1 -14
  28. package/dist/es/error-hBHRgZ9R.mjs +1 -0
  29. package/dist/es/index-DQepSWYP.d.mts +345 -0
  30. package/dist/es/management/index.d.mts +3 -0
  31. package/dist/es/management/index.mjs +1 -0
  32. package/dist/es/management-BM2WcbV6.mjs +2 -0
  33. package/dist/es/parser-DOVfvr9l.mjs +1 -0
  34. package/dist/es/schemas-eemlD-xS.mjs +1 -0
  35. package/package.json +34 -6
  36. package/dist/cjs/parser-DsI4Y-Z2.cjs +0 -14
  37. package/dist/es/parser-BoZ6cYn-.mjs +0 -14
@@ -0,0 +1,451 @@
1
+ import * as v from "valibot";
2
+
3
+ //#region source/config/schema/app.d.ts
4
+ declare const CommerceAppConfigSchemas: {
5
+ readonly metadata: v.ObjectSchema<{
6
+ 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}`>]>;
7
+ 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">]>;
8
+ 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">]>;
9
+ 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">]>;
10
+ }, undefined>;
11
+ readonly businessConfig: v.ObjectSchema<{
12
+ readonly schema: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.VariantSchema<"selectionMode", [v.ObjectSchema<{
13
+ readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
14
+ readonly selectionMode: v.LiteralSchema<"single", "Expected the selectionMode to be 'single'">;
15
+ readonly options: v.ArraySchema<v.ObjectSchema<{
16
+ readonly label: v.StringSchema<"Expected a string for the option label">;
17
+ readonly value: v.StringSchema<"Expected a string for the option value">;
18
+ }, undefined>, "Expected an array of list options">;
19
+ readonly default: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default value">, v.NonEmptyAction<string, "The default value must not be empty">]>;
20
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
21
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
22
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
23
+ }, undefined>, v.ObjectSchema<{
24
+ readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
25
+ readonly selectionMode: v.LiteralSchema<"multiple", "Expected the selectionMode to be 'multiple'">;
26
+ readonly options: v.ArraySchema<v.ObjectSchema<{
27
+ readonly label: v.StringSchema<"Expected a string for the option label">;
28
+ readonly value: v.StringSchema<"Expected a string for the option value">;
29
+ }, undefined>, "Expected an array of list options">;
30
+ readonly default: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for each default value">, v.NonEmptyAction<string, "Each default value must not be empty">]>, "Expected an array of default values">, readonly []>;
31
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
32
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
33
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
34
+ }, undefined>], undefined>, v.ObjectSchema<{
35
+ readonly type: v.LiteralSchema<"text", "Expected the type to be 'text'">;
36
+ readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
37
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
38
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
39
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
40
+ }, undefined>, v.ObjectSchema<{
41
+ readonly type: v.LiteralSchema<"password", "Expected the type to be 'password'">;
42
+ readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
43
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
44
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
45
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
46
+ }, undefined>, v.ObjectSchema<{
47
+ readonly type: v.LiteralSchema<"email", "Expected the type to be 'email'">;
48
+ readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default email value">, v.EmailAction<string, "The email must be a valid email address">]>, undefined>;
49
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
50
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
51
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
52
+ }, undefined>, v.ObjectSchema<{
53
+ readonly type: v.LiteralSchema<"url", "Expected the type to be 'url'">;
54
+ readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default URL value">, v.UrlAction<string, "The URL must be a valid URL">]>, undefined>;
55
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
56
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
57
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
58
+ }, undefined>, v.ObjectSchema<{
59
+ readonly type: v.LiteralSchema<"tel", "Expected the type to be 'tel'">;
60
+ readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default phone number value">, v.RegexAction<string, "The phone number must contain only numbers and/or country codes">]>, undefined>;
61
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
62
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
63
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
64
+ }, undefined>], undefined>, "Expected an array of configuration fields">, v.MinLengthAction<({
65
+ type: "list";
66
+ selectionMode: "single";
67
+ options: {
68
+ label: string;
69
+ value: string;
70
+ }[];
71
+ default: string;
72
+ name: string;
73
+ label?: string | undefined;
74
+ description?: string | undefined;
75
+ } | {
76
+ type: "list";
77
+ selectionMode: "multiple";
78
+ options: {
79
+ label: string;
80
+ value: string;
81
+ }[];
82
+ default: string[];
83
+ name: string;
84
+ label?: string | undefined;
85
+ description?: string | undefined;
86
+ } | {
87
+ type: "text";
88
+ default?: string | undefined;
89
+ name: string;
90
+ label?: string | undefined;
91
+ description?: string | undefined;
92
+ } | {
93
+ type: "password";
94
+ default?: string | undefined;
95
+ name: string;
96
+ label?: string | undefined;
97
+ description?: string | undefined;
98
+ } | {
99
+ type: "email";
100
+ default?: string | undefined;
101
+ name: string;
102
+ label?: string | undefined;
103
+ description?: string | undefined;
104
+ } | {
105
+ type: "url";
106
+ default?: string | undefined;
107
+ name: string;
108
+ label?: string | undefined;
109
+ description?: string | undefined;
110
+ } | {
111
+ type: "tel";
112
+ default?: string | undefined;
113
+ name: string;
114
+ label?: string | undefined;
115
+ description?: string | undefined;
116
+ })[], 1, "At least one configuration parameter is required">]>, readonly []>;
117
+ }, undefined>;
118
+ readonly "businessConfig.schema": v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.VariantSchema<"selectionMode", [v.ObjectSchema<{
119
+ readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
120
+ readonly selectionMode: v.LiteralSchema<"single", "Expected the selectionMode to be 'single'">;
121
+ readonly options: v.ArraySchema<v.ObjectSchema<{
122
+ readonly label: v.StringSchema<"Expected a string for the option label">;
123
+ readonly value: v.StringSchema<"Expected a string for the option value">;
124
+ }, undefined>, "Expected an array of list options">;
125
+ readonly default: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default value">, v.NonEmptyAction<string, "The default value must not be empty">]>;
126
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
127
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
128
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
129
+ }, undefined>, v.ObjectSchema<{
130
+ readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
131
+ readonly selectionMode: v.LiteralSchema<"multiple", "Expected the selectionMode to be 'multiple'">;
132
+ readonly options: v.ArraySchema<v.ObjectSchema<{
133
+ readonly label: v.StringSchema<"Expected a string for the option label">;
134
+ readonly value: v.StringSchema<"Expected a string for the option value">;
135
+ }, undefined>, "Expected an array of list options">;
136
+ readonly default: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for each default value">, v.NonEmptyAction<string, "Each default value must not be empty">]>, "Expected an array of default values">, readonly []>;
137
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
138
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
139
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
140
+ }, undefined>], undefined>, v.ObjectSchema<{
141
+ readonly type: v.LiteralSchema<"text", "Expected the type to be 'text'">;
142
+ readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
143
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
144
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
145
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
146
+ }, undefined>, v.ObjectSchema<{
147
+ readonly type: v.LiteralSchema<"password", "Expected the type to be 'password'">;
148
+ readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
149
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
150
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
151
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
152
+ }, undefined>, v.ObjectSchema<{
153
+ readonly type: v.LiteralSchema<"email", "Expected the type to be 'email'">;
154
+ readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default email value">, v.EmailAction<string, "The email must be a valid email address">]>, undefined>;
155
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
156
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
157
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
158
+ }, undefined>, v.ObjectSchema<{
159
+ readonly type: v.LiteralSchema<"url", "Expected the type to be 'url'">;
160
+ readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default URL value">, v.UrlAction<string, "The URL must be a valid URL">]>, undefined>;
161
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
162
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
163
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
164
+ }, undefined>, v.ObjectSchema<{
165
+ readonly type: v.LiteralSchema<"tel", "Expected the type to be 'tel'">;
166
+ readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default phone number value">, v.RegexAction<string, "The phone number must contain only numbers and/or country codes">]>, undefined>;
167
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
168
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
169
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
170
+ }, undefined>], undefined>, "Expected an array of configuration fields">, v.MinLengthAction<({
171
+ type: "list";
172
+ selectionMode: "single";
173
+ options: {
174
+ label: string;
175
+ value: string;
176
+ }[];
177
+ default: string;
178
+ name: string;
179
+ label?: string | undefined;
180
+ description?: string | undefined;
181
+ } | {
182
+ type: "list";
183
+ selectionMode: "multiple";
184
+ options: {
185
+ label: string;
186
+ value: string;
187
+ }[];
188
+ default: string[];
189
+ name: string;
190
+ label?: string | undefined;
191
+ description?: string | undefined;
192
+ } | {
193
+ type: "text";
194
+ default?: string | undefined;
195
+ name: string;
196
+ label?: string | undefined;
197
+ description?: string | undefined;
198
+ } | {
199
+ type: "password";
200
+ default?: string | undefined;
201
+ name: string;
202
+ label?: string | undefined;
203
+ description?: string | undefined;
204
+ } | {
205
+ type: "email";
206
+ default?: string | undefined;
207
+ name: string;
208
+ label?: string | undefined;
209
+ description?: string | undefined;
210
+ } | {
211
+ type: "url";
212
+ default?: string | undefined;
213
+ name: string;
214
+ label?: string | undefined;
215
+ description?: string | undefined;
216
+ } | {
217
+ type: "tel";
218
+ default?: string | undefined;
219
+ name: string;
220
+ label?: string | undefined;
221
+ description?: string | undefined;
222
+ })[], 1, "At least one configuration parameter is required">]>;
223
+ readonly eventing: v.ObjectSchema<{
224
+ readonly commerce: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
225
+ readonly provider: v.ObjectSchema<{
226
+ readonly label: v.SchemaWithPipe<readonly [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, `The value of "${string}" must be in Title Case, which means, an uppercase letter after each space (e.g., "Some Title Case")`>]>, v.MaxLengthAction<string, 100, "The provider label must not be longer than 100 characters">]>;
227
+ 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 provider description must not be longer than 255 characters">]>;
228
+ readonly key: v.OptionalSchema<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, 50, "The provider key must not be longer than 50 characters">]>, undefined>;
229
+ }, undefined>;
230
+ readonly events: v.ArraySchema<v.ObjectSchema<{
231
+ 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.RegexAction<string, "Event name must start with \"plugin.\" or \"observer.\" followed by lowercase letters and underscores only (e.g., \"plugin.order_placed\")">]>;
232
+ readonly fields: v.ArraySchema<v.ObjectSchema<{
233
+ 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.RegexAction<string, "Field name must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), dashes (-), dots (.), and square brackets ([, ]), or be exactly \"*\"">]>;
234
+ readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
235
+ }, undefined>, "Expected an array of event field objects with a 'name' property">;
236
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
237
+ readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
238
+ readonly operator: v.UnionSchema<v.LiteralSchema<"regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange", undefined>[], `Operator must be one of: ${string}`>;
239
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
240
+ }, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
241
+ readonly destination: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, undefined>;
242
+ readonly hipaaAuditRequired: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
243
+ readonly prioritary: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
244
+ readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
245
+ readonly label: v.SchemaWithPipe<readonly [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, `The value of "${string}" must be in Title Case, which means, an uppercase letter after each space (e.g., "Some Title Case")`>]>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
246
+ 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 event description must not be longer than 255 characters">]>;
247
+ readonly runtimeActions: v.ArraySchema<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, "Runtime action must be in the format \"<package>/<action>\" (e.g., \"my-package/my-action\")">]>, "Expected an array of runtime actions in the format <package>/<action>">;
248
+ }, undefined>, "Expected an array of Commerce events">;
249
+ }, undefined>, "Expected an array of Commerce event sources">, undefined>;
250
+ readonly external: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
251
+ readonly provider: v.ObjectSchema<{
252
+ readonly label: v.SchemaWithPipe<readonly [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, `The value of "${string}" must be in Title Case, which means, an uppercase letter after each space (e.g., "Some Title Case")`>]>, v.MaxLengthAction<string, 100, "The provider label must not be longer than 100 characters">]>;
253
+ 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 provider description must not be longer than 255 characters">]>;
254
+ readonly key: v.OptionalSchema<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, 50, "The provider key must not be longer than 50 characters">]>, undefined>;
255
+ }, undefined>;
256
+ readonly events: v.ArraySchema<v.ObjectSchema<{
257
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and underscores are allowed in string value of "${string}"${string}`>]>;
258
+ readonly label: v.SchemaWithPipe<readonly [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, `The value of "${string}" must be in Title Case, which means, an uppercase letter after each space (e.g., "Some Title Case")`>]>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
259
+ 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 event description must not be longer than 255 characters">]>;
260
+ readonly runtimeActions: v.ArraySchema<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, "Runtime action must be in the format \"<package>/<action>\" (e.g., \"my-package/my-action\")">]>, "Expected an array of runtime actions in the format <package>/<action>">;
261
+ }, undefined>, "Expected an array of external events">;
262
+ }, undefined>, "Expected an array of external event sources">, undefined>;
263
+ }, undefined>;
264
+ readonly installation: v.ObjectSchema<{
265
+ readonly messages: v.OptionalSchema<v.ObjectSchema<{
266
+ 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>;
267
+ readonly postInstallation: 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 postInstallation message must not be longer than 1000 characters">]>, undefined>;
268
+ }, undefined>, undefined>;
269
+ readonly customInstallationSteps: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
270
+ readonly script: 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, "Script path must end with .js (e.g., \"./setup.js\", \"./scripts/setup.js\", or \"../../scripts/setup.js\")">]>;
271
+ 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">]>;
272
+ 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">]>;
273
+ }, undefined>, "Expected an array of custom installation steps">, undefined>;
274
+ }, undefined>;
275
+ };
276
+ /** Individual validatable domains of the commerce app config. */
277
+ type CommerceAppConfigDomain = keyof typeof CommerceAppConfigSchemas;
278
+ /** The schema used to validate the commerce app config file. */
279
+ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
280
+ readonly metadata: v.ObjectSchema<{
281
+ 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}`>]>;
282
+ 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">]>;
283
+ 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">]>;
284
+ 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">]>;
285
+ }, undefined>;
286
+ readonly businessConfig: v.OptionalSchema<v.ObjectSchema<{
287
+ readonly schema: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.VariantSchema<"selectionMode", [v.ObjectSchema<{
288
+ readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
289
+ readonly selectionMode: v.LiteralSchema<"single", "Expected the selectionMode to be 'single'">;
290
+ readonly options: v.ArraySchema<v.ObjectSchema<{
291
+ readonly label: v.StringSchema<"Expected a string for the option label">;
292
+ readonly value: v.StringSchema<"Expected a string for the option value">;
293
+ }, undefined>, "Expected an array of list options">;
294
+ readonly default: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default value">, v.NonEmptyAction<string, "The default value must not be empty">]>;
295
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
296
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
297
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
298
+ }, undefined>, v.ObjectSchema<{
299
+ readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
300
+ readonly selectionMode: v.LiteralSchema<"multiple", "Expected the selectionMode to be 'multiple'">;
301
+ readonly options: v.ArraySchema<v.ObjectSchema<{
302
+ readonly label: v.StringSchema<"Expected a string for the option label">;
303
+ readonly value: v.StringSchema<"Expected a string for the option value">;
304
+ }, undefined>, "Expected an array of list options">;
305
+ readonly default: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for each default value">, v.NonEmptyAction<string, "Each default value must not be empty">]>, "Expected an array of default values">, readonly []>;
306
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
307
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
308
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
309
+ }, undefined>], undefined>, v.ObjectSchema<{
310
+ readonly type: v.LiteralSchema<"text", "Expected the type to be 'text'">;
311
+ readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
312
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
313
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
314
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
315
+ }, undefined>, v.ObjectSchema<{
316
+ readonly type: v.LiteralSchema<"password", "Expected the type to be 'password'">;
317
+ readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
318
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
319
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
320
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
321
+ }, undefined>, v.ObjectSchema<{
322
+ readonly type: v.LiteralSchema<"email", "Expected the type to be 'email'">;
323
+ readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default email value">, v.EmailAction<string, "The email must be a valid email address">]>, undefined>;
324
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
325
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
326
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
327
+ }, undefined>, v.ObjectSchema<{
328
+ readonly type: v.LiteralSchema<"url", "Expected the type to be 'url'">;
329
+ readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default URL value">, v.UrlAction<string, "The URL must be a valid URL">]>, undefined>;
330
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
331
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
332
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
333
+ }, undefined>, v.ObjectSchema<{
334
+ readonly type: v.LiteralSchema<"tel", "Expected the type to be 'tel'">;
335
+ readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default phone number value">, v.RegexAction<string, "The phone number must contain only numbers and/or country codes">]>, undefined>;
336
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
337
+ readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
338
+ readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
339
+ }, undefined>], undefined>, "Expected an array of configuration fields">, v.MinLengthAction<({
340
+ type: "list";
341
+ selectionMode: "single";
342
+ options: {
343
+ label: string;
344
+ value: string;
345
+ }[];
346
+ default: string;
347
+ name: string;
348
+ label?: string | undefined;
349
+ description?: string | undefined;
350
+ } | {
351
+ type: "list";
352
+ selectionMode: "multiple";
353
+ options: {
354
+ label: string;
355
+ value: string;
356
+ }[];
357
+ default: string[];
358
+ name: string;
359
+ label?: string | undefined;
360
+ description?: string | undefined;
361
+ } | {
362
+ type: "text";
363
+ default?: string | undefined;
364
+ name: string;
365
+ label?: string | undefined;
366
+ description?: string | undefined;
367
+ } | {
368
+ type: "password";
369
+ default?: string | undefined;
370
+ name: string;
371
+ label?: string | undefined;
372
+ description?: string | undefined;
373
+ } | {
374
+ type: "email";
375
+ default?: string | undefined;
376
+ name: string;
377
+ label?: string | undefined;
378
+ description?: string | undefined;
379
+ } | {
380
+ type: "url";
381
+ default?: string | undefined;
382
+ name: string;
383
+ label?: string | undefined;
384
+ description?: string | undefined;
385
+ } | {
386
+ type: "tel";
387
+ default?: string | undefined;
388
+ name: string;
389
+ label?: string | undefined;
390
+ description?: string | undefined;
391
+ })[], 1, "At least one configuration parameter is required">]>, readonly []>;
392
+ }, undefined>, undefined>;
393
+ readonly eventing: v.OptionalSchema<v.ObjectSchema<{
394
+ readonly commerce: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
395
+ readonly provider: v.ObjectSchema<{
396
+ readonly label: v.SchemaWithPipe<readonly [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, `The value of "${string}" must be in Title Case, which means, an uppercase letter after each space (e.g., "Some Title Case")`>]>, v.MaxLengthAction<string, 100, "The provider label must not be longer than 100 characters">]>;
397
+ 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 provider description must not be longer than 255 characters">]>;
398
+ readonly key: v.OptionalSchema<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, 50, "The provider key must not be longer than 50 characters">]>, undefined>;
399
+ }, undefined>;
400
+ readonly events: v.ArraySchema<v.ObjectSchema<{
401
+ 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.RegexAction<string, "Event name must start with \"plugin.\" or \"observer.\" followed by lowercase letters and underscores only (e.g., \"plugin.order_placed\")">]>;
402
+ readonly fields: v.ArraySchema<v.ObjectSchema<{
403
+ 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.RegexAction<string, "Field name must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), dashes (-), dots (.), and square brackets ([, ]), or be exactly \"*\"">]>;
404
+ readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
405
+ }, undefined>, "Expected an array of event field objects with a 'name' property">;
406
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
407
+ readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
408
+ readonly operator: v.UnionSchema<v.LiteralSchema<"regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange", undefined>[], `Operator must be one of: ${string}`>;
409
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
410
+ }, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
411
+ readonly destination: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, undefined>;
412
+ readonly hipaaAuditRequired: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
413
+ readonly prioritary: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
414
+ readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
415
+ readonly label: v.SchemaWithPipe<readonly [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, `The value of "${string}" must be in Title Case, which means, an uppercase letter after each space (e.g., "Some Title Case")`>]>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
416
+ 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 event description must not be longer than 255 characters">]>;
417
+ readonly runtimeActions: v.ArraySchema<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, "Runtime action must be in the format \"<package>/<action>\" (e.g., \"my-package/my-action\")">]>, "Expected an array of runtime actions in the format <package>/<action>">;
418
+ }, undefined>, "Expected an array of Commerce events">;
419
+ }, undefined>, "Expected an array of Commerce event sources">, undefined>;
420
+ readonly external: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
421
+ readonly provider: v.ObjectSchema<{
422
+ readonly label: v.SchemaWithPipe<readonly [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, `The value of "${string}" must be in Title Case, which means, an uppercase letter after each space (e.g., "Some Title Case")`>]>, v.MaxLengthAction<string, 100, "The provider label must not be longer than 100 characters">]>;
423
+ 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 provider description must not be longer than 255 characters">]>;
424
+ readonly key: v.OptionalSchema<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, 50, "The provider key must not be longer than 50 characters">]>, undefined>;
425
+ }, undefined>;
426
+ readonly events: v.ArraySchema<v.ObjectSchema<{
427
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and underscores are allowed in string value of "${string}"${string}`>]>;
428
+ readonly label: v.SchemaWithPipe<readonly [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, `The value of "${string}" must be in Title Case, which means, an uppercase letter after each space (e.g., "Some Title Case")`>]>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
429
+ 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 event description must not be longer than 255 characters">]>;
430
+ readonly runtimeActions: v.ArraySchema<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, "Runtime action must be in the format \"<package>/<action>\" (e.g., \"my-package/my-action\")">]>, "Expected an array of runtime actions in the format <package>/<action>">;
431
+ }, undefined>, "Expected an array of external events">;
432
+ }, undefined>, "Expected an array of external event sources">, undefined>;
433
+ }, undefined>, undefined>;
434
+ readonly installation: v.OptionalSchema<v.ObjectSchema<{
435
+ readonly messages: v.OptionalSchema<v.ObjectSchema<{
436
+ 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>;
437
+ readonly postInstallation: 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 postInstallation message must not be longer than 1000 characters">]>, undefined>;
438
+ }, undefined>, undefined>;
439
+ readonly customInstallationSteps: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
440
+ readonly script: 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, "Script path must end with .js (e.g., \"./setup.js\", \"./scripts/setup.js\", or \"../../scripts/setup.js\")">]>;
441
+ 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">]>;
442
+ 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">]>;
443
+ }, undefined>, "Expected an array of custom installation steps">, undefined>;
444
+ }, undefined>, undefined>;
445
+ }, undefined>;
446
+ /** The input shape of the commerce app config schema. */
447
+ type CommerceAppConfig = v.InferInput<typeof CommerceAppConfigSchema>;
448
+ /** The output shape of the commerce app config schema. */
449
+ type CommerceAppConfigOutputModel = v.InferOutput<typeof CommerceAppConfigSchema>;
450
+ //#endregion
451
+ export { CommerceAppConfigDomain as n, CommerceAppConfigOutputModel as r, CommerceAppConfig as t };
@@ -0,0 +1 @@
1
+ import{createRequire}from"module";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__esmMin=(fn,res)=>()=>(fn&&(res=fn(fn=0)),res),__commonJSMin=(cb,mod)=>()=>(mod||cb((mod={exports:{}}).exports,mod),mod.exports),__exportAll=(all,symbols)=>{let target={};for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0});return symbols&&__defProp(target,Symbol.toStringTag,{value:`Module`}),target},__copyProps=(to,from,except,desc)=>{if(from&&typeof from==`object`||typeof from==`function`)for(var keys=__getOwnPropNames(from),i=0,n=keys.length,key;i<n;i++)key=keys[i],!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:(k=>from[k]).bind(null,key),enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM=(mod,isNodeMode,target)=>(target=mod==null?{}:__create(__getProtoOf(mod)),__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,`default`,{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__hasOwnProp.call(mod,`module.exports`)?mod[`module.exports`]:__copyProps(__defProp({},`__esModule`,{value:!0}),mod),__require=createRequire(import.meta.url);export{__toCommonJS as a,__require as i,__esmMin as n,__toESM as o,__exportAll as r,__commonJSMin as t};
@@ -0,0 +1,28 @@
1
+ // {{CUSTOM_SCRIPTS_IMPORTS}}
2
+
3
+ /**
4
+ * Loads custom installation scripts defined in the manifest
5
+ * @param {object} appConfig - Application configuration from manifest
6
+ * @param {object} logger - Logger instance
7
+ * @returns {Promise<object>} Object mapping script paths to loaded modules
8
+ */
9
+ export function customScriptsLoader(appConfig, logger) {
10
+ const customSteps = appConfig.installation?.customInstallationSteps || [];
11
+
12
+ if (customSteps.length === 0) {
13
+ logger.debug("No custom installation scripts configured");
14
+ return {};
15
+ }
16
+
17
+ try {
18
+ const loadedScripts = {
19
+ // {{CUSTOM_SCRIPTS_MAP}}
20
+ };
21
+
22
+ logger.debug(`Loaded ${Object.keys(loadedScripts).length} custom installation script(s)`);
23
+ return loadedScripts;
24
+ } catch (error) {
25
+ logger.error(`Failed to load custom installation scripts: ${error.message}`);
26
+ throw new Error(`Failed to load custom installation scripts: ${error.message}`);
27
+ }
28
+ }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Adobe. All rights reserved.
2
+ * Copyright 2026 Adobe. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -15,13 +15,16 @@
15
15
 
16
16
  import util from "node:util";
17
17
 
18
- import { readBundledCommerceAppConfig } from "@adobe/aio-commerce-lib-app/config";
18
+ import { validateCommerceAppConfig } from "@adobe/aio-commerce-lib-app/config";
19
19
  import {
20
20
  internalServerError,
21
21
  ok,
22
22
  } from "@adobe/aio-commerce-sdk/core/responses";
23
23
  import AioLogger from "@adobe/aio-lib-core-logging";
24
24
 
25
+ // The manifest is always at this relative constant path from the action.
26
+ import commerceAppManifest from "../../app.commerce.manifest.json" with { type: "json" };
27
+
25
28
  // Shorthand to inspect an object.
26
29
  const inspect = (obj) => util.inspect(obj, { depth: null });
27
30
 
@@ -29,25 +32,23 @@ const inspect = (obj) => util.inspect(obj, { depth: null });
29
32
  * Get the app config.
30
33
  * @returns The response object containing the app config.
31
34
  */
32
- export async function main(params) {
35
+ export function main(params) {
33
36
  const logger = AioLogger("get-app-config", {
34
37
  level: params.LOG_LEVEL || "info",
35
38
  });
36
39
 
37
40
  try {
38
- logger.debug("Retrieving app config...");
39
- const appConfig = await readBundledCommerceAppConfig();
41
+ logger.debug("Validating app config...");
40
42
 
41
- logger.debug(
42
- "Successfully retrieved and validated the app config",
43
- );
43
+ const appConfig = validateCommerceAppConfig(commerceAppManifest);
44
+ logger.debug("Successfully validated the app config");
44
45
 
45
46
  return ok({
46
47
  body: appConfig,
47
48
  });
48
49
  } catch (error) {
49
50
  logger.error(
50
- `Something wen't wrong while retrieving app config: ${inspect(error)}`,
51
+ `Something went wrong while validating app config: ${inspect(error)}`,
51
52
  );
52
53
 
53
54
  return internalServerError({
@@ -56,6 +57,6 @@ export async function main(params) {
56
57
  details: error instanceof Error ? error.message : "Unknown error",
57
58
  message: "An internal server error occurred",
58
59
  },
59
- });
60
+ });
60
61
  }
61
62
  }
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Copyright 2026 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ // This file has been auto-generated by `@adobe/aio-commerce-lib-app`
14
+ // Do not modify this file directly
15
+
16
+ import { installationRuntimeAction } from "@adobe/aio-commerce-lib-app/actions"
17
+ import appConfig from "../../app.commerce.manifest.json" with { type: "json" };
18
+
19
+ // {{CUSTOM_SCRIPTS_LOADER}}
20
+ const args = { appConfig };
21
+ export const main = installationRuntimeAction(args);