@adobe/aio-commerce-lib-app 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/actions/index.cjs +815 -170
- package/dist/cjs/actions/index.d.cts +2 -2
- package/dist/cjs/app-Dx0ca6oL.d.cts +181 -0
- package/dist/cjs/commands/generate/actions/templates/business-configuration/get-config-schema.js.template +63 -0
- package/dist/cjs/commands/generate/actions/templates/business-configuration/get-configuration.js.template +104 -0
- package/dist/cjs/commands/generate/actions/templates/business-configuration/get-scope-tree.js.template +69 -0
- package/dist/cjs/commands/generate/actions/templates/business-configuration/set-configuration.js.template +125 -0
- package/dist/cjs/commands/generate/actions/templates/business-configuration/set-custom-scope-tree.js.template +83 -0
- package/dist/cjs/commands/generate/actions/templates/business-configuration/sync-commerce-scopes.js.template +113 -0
- package/dist/cjs/commands/generate/actions/templates/business-configuration/unsync-commerce-scopes.js.template +56 -0
- package/dist/cjs/commands/index.cjs +1075 -119
- package/dist/cjs/config/index.cjs +20 -1
- package/dist/cjs/config/index.d.cts +532 -3
- package/dist/cjs/config-JQ_n-5Nk.cjs +565 -0
- package/dist/cjs/error-Byj1DVHZ.cjs +344 -0
- package/dist/cjs/{index-DS3IlISO.d.cts → index-C5SutkJQ.d.cts} +1 -1
- package/dist/cjs/logging-DYwr5WQk.cjs +25 -0
- package/dist/cjs/management/index.cjs +9 -1
- package/dist/cjs/management/index.d.cts +1 -1
- package/dist/cjs/management-Dm5h0E6l.cjs +1246 -0
- package/dist/es/actions/index.d.mts +2 -2
- package/dist/es/actions/index.mjs +813 -170
- package/dist/es/app-Cx1-6dn0.d.mts +181 -0
- package/dist/es/commands/generate/actions/templates/business-configuration/get-config-schema.js.template +63 -0
- package/dist/es/commands/generate/actions/templates/business-configuration/get-configuration.js.template +104 -0
- package/dist/es/commands/generate/actions/templates/business-configuration/get-scope-tree.js.template +69 -0
- package/dist/es/commands/generate/actions/templates/business-configuration/set-configuration.js.template +125 -0
- package/dist/es/commands/generate/actions/templates/business-configuration/set-custom-scope-tree.js.template +83 -0
- package/dist/es/commands/generate/actions/templates/business-configuration/sync-commerce-scopes.js.template +113 -0
- package/dist/es/commands/generate/actions/templates/business-configuration/unsync-commerce-scopes.js.template +56 -0
- package/dist/es/commands/index.mjs +1070 -119
- package/dist/es/config/index.d.mts +532 -3
- package/dist/es/config/index.mjs +4 -1
- package/dist/es/config-BSGerqCG.mjs +457 -0
- package/dist/es/error-P7JgUTds.mjs +251 -0
- package/dist/es/{index-DQepSWYP.d.mts → index-Bxr3zvCT.d.mts} +2 -2
- package/dist/es/logging-VgerMhp6.mjs +18 -0
- package/dist/es/management/index.d.mts +2 -2
- package/dist/es/management/index.mjs +3 -1
- package/dist/es/management-Y7pwEbNI.mjs +1204 -0
- package/package.json +20 -8
- package/dist/cjs/app-C4HhkXbP.d.cts +0 -451
- package/dist/cjs/error-yAk1zzvx.cjs +0 -1
- package/dist/cjs/management-CE3_DJw4.cjs +0 -2
- package/dist/cjs/parser-Dovux8ce.cjs +0 -1
- package/dist/cjs/schemas-CdaP-Exw.cjs +0 -1
- package/dist/es/app-CMpx3D7Y.d.mts +0 -451
- package/dist/es/chunk-VmiN0kV1.mjs +0 -1
- package/dist/es/error-hBHRgZ9R.mjs +0 -1
- package/dist/es/management-BM2WcbV6.mjs +0 -2
- package/dist/es/parser-DOVfvr9l.mjs +0 -1
- package/dist/es/schemas-eemlD-xS.mjs +0 -1
- /package/dist/cjs/commands/generate/actions/templates/{custom-scripts.js.template → app-management/custom-scripts.js.template} +0 -0
- /package/dist/cjs/commands/generate/actions/templates/{get-app-config.js.template → app-management/get-app-config.js.template} +0 -0
- /package/dist/cjs/commands/generate/actions/templates/{installation.js.template → app-management/installation.js.template} +0 -0
- /package/dist/es/commands/generate/actions/templates/{custom-scripts.js.template → app-management/custom-scripts.js.template} +0 -0
- /package/dist/es/commands/generate/actions/templates/{get-app-config.js.template → app-management/get-app-config.js.template} +0 -0
- /package/dist/es/commands/generate/actions/templates/{installation.js.template → app-management/installation.js.template} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as
|
|
1
|
+
import { n as CommerceAppConfigOutputModel, t as CommerceAppConfig } from "../app-Cx1-6dn0.mjs";
|
|
2
2
|
import * as v from "valibot";
|
|
3
|
-
import { Get } from "type-fest";
|
|
3
|
+
import { Get, SetRequiredDeep } from "type-fest";
|
|
4
4
|
|
|
5
5
|
//#region source/config/lib/define.d.ts
|
|
6
6
|
|
|
@@ -291,6 +291,342 @@ declare function parseCommerceAppConfig(cwd?: string): Promise<{
|
|
|
291
291
|
[key: string]: unknown;
|
|
292
292
|
}>;
|
|
293
293
|
//#endregion
|
|
294
|
+
//#region source/config/schema/domains.d.ts
|
|
295
|
+
/** The individual validatable domains of the app config. */
|
|
296
|
+
declare const CommerceAppConfigSchemas: {
|
|
297
|
+
readonly metadata: v.ObjectSchema<{
|
|
298
|
+
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}`>]>;
|
|
299
|
+
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">]>;
|
|
300
|
+
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">]>;
|
|
301
|
+
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">]>;
|
|
302
|
+
}, undefined>;
|
|
303
|
+
readonly businessConfig: v.ObjectSchema<{
|
|
304
|
+
readonly schema: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.VariantSchema<"selectionMode", [v.ObjectSchema<{
|
|
305
|
+
readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
|
|
306
|
+
readonly selectionMode: v.LiteralSchema<"single", "Expected the selectionMode to be 'single'">;
|
|
307
|
+
readonly options: v.ArraySchema<v.ObjectSchema<{
|
|
308
|
+
readonly label: v.StringSchema<"Expected a string for the option label">;
|
|
309
|
+
readonly value: v.StringSchema<"Expected a string for the option value">;
|
|
310
|
+
}, undefined>, "Expected an array of list options">;
|
|
311
|
+
readonly default: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default value">, v.NonEmptyAction<string, "The default value must not be empty">]>;
|
|
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<"list", "Expected the type to be 'list'">;
|
|
317
|
+
readonly selectionMode: v.LiteralSchema<"multiple", "Expected the selectionMode to be 'multiple'">;
|
|
318
|
+
readonly options: v.ArraySchema<v.ObjectSchema<{
|
|
319
|
+
readonly label: v.StringSchema<"Expected a string for the option label">;
|
|
320
|
+
readonly value: v.StringSchema<"Expected a string for the option value">;
|
|
321
|
+
}, undefined>, "Expected an array of list options">;
|
|
322
|
+
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 []>;
|
|
323
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
324
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
325
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
326
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
327
|
+
readonly type: v.LiteralSchema<"text", "Expected the type to be 'text'">;
|
|
328
|
+
readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
|
|
329
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
330
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
331
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
332
|
+
}, undefined>, v.ObjectSchema<{
|
|
333
|
+
readonly type: v.LiteralSchema<"password", "Expected the type to be 'password'">;
|
|
334
|
+
readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
|
|
335
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
336
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
337
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
338
|
+
}, undefined>, v.ObjectSchema<{
|
|
339
|
+
readonly type: v.LiteralSchema<"email", "Expected the type to be 'email'">;
|
|
340
|
+
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>;
|
|
341
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
342
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
343
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
344
|
+
}, undefined>, v.ObjectSchema<{
|
|
345
|
+
readonly type: v.LiteralSchema<"url", "Expected the type to be 'url'">;
|
|
346
|
+
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>;
|
|
347
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
348
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
349
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
350
|
+
}, undefined>, v.ObjectSchema<{
|
|
351
|
+
readonly type: v.LiteralSchema<"tel", "Expected the type to be 'tel'">;
|
|
352
|
+
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>;
|
|
353
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
354
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
355
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
356
|
+
}, undefined>], undefined>, "Expected an array of configuration fields">, v.MinLengthAction<({
|
|
357
|
+
type: "list";
|
|
358
|
+
selectionMode: "single";
|
|
359
|
+
options: {
|
|
360
|
+
label: string;
|
|
361
|
+
value: string;
|
|
362
|
+
}[];
|
|
363
|
+
default: string;
|
|
364
|
+
name: string;
|
|
365
|
+
label?: string | undefined;
|
|
366
|
+
description?: string | undefined;
|
|
367
|
+
} | {
|
|
368
|
+
type: "list";
|
|
369
|
+
selectionMode: "multiple";
|
|
370
|
+
options: {
|
|
371
|
+
label: string;
|
|
372
|
+
value: string;
|
|
373
|
+
}[];
|
|
374
|
+
default: string[];
|
|
375
|
+
name: string;
|
|
376
|
+
label?: string | undefined;
|
|
377
|
+
description?: string | undefined;
|
|
378
|
+
} | {
|
|
379
|
+
type: "text";
|
|
380
|
+
default?: string | undefined;
|
|
381
|
+
name: string;
|
|
382
|
+
label?: string | undefined;
|
|
383
|
+
description?: string | undefined;
|
|
384
|
+
} | {
|
|
385
|
+
type: "password";
|
|
386
|
+
default?: string | undefined;
|
|
387
|
+
name: string;
|
|
388
|
+
label?: string | undefined;
|
|
389
|
+
description?: string | undefined;
|
|
390
|
+
} | {
|
|
391
|
+
type: "email";
|
|
392
|
+
default?: string | undefined;
|
|
393
|
+
name: string;
|
|
394
|
+
label?: string | undefined;
|
|
395
|
+
description?: string | undefined;
|
|
396
|
+
} | {
|
|
397
|
+
type: "url";
|
|
398
|
+
default?: string | undefined;
|
|
399
|
+
name: string;
|
|
400
|
+
label?: string | undefined;
|
|
401
|
+
description?: string | undefined;
|
|
402
|
+
} | {
|
|
403
|
+
type: "tel";
|
|
404
|
+
default?: string | undefined;
|
|
405
|
+
name: string;
|
|
406
|
+
label?: string | undefined;
|
|
407
|
+
description?: string | undefined;
|
|
408
|
+
})[], 1, "At least one configuration parameter is required">]>, readonly []>;
|
|
409
|
+
}, undefined>;
|
|
410
|
+
readonly eventing: v.ObjectSchema<{
|
|
411
|
+
readonly commerce: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
412
|
+
readonly provider: v.ObjectSchema<{
|
|
413
|
+
readonly label: 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, 100, "The provider label must not be longer than 100 characters">]>;
|
|
414
|
+
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">]>;
|
|
415
|
+
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>;
|
|
416
|
+
}, undefined>;
|
|
417
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
418
|
+
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\")">]>;
|
|
419
|
+
readonly fields: v.ArraySchema<v.ObjectSchema<{
|
|
420
|
+
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 \"*\"">]>;
|
|
421
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
422
|
+
}, undefined>, "Expected an array of event field objects with a 'name' property">;
|
|
423
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
424
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
425
|
+
readonly operator: v.UnionSchema<v.LiteralSchema<"regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange", undefined>[], `Operator must be one of: ${string}`>;
|
|
426
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
427
|
+
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
428
|
+
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>;
|
|
429
|
+
readonly hipaaAuditRequired: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
430
|
+
readonly prioritary: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
431
|
+
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
432
|
+
readonly label: 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, 100, "The event label must not be longer than 100 characters">]>;
|
|
433
|
+
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">]>;
|
|
434
|
+
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>">;
|
|
435
|
+
}, undefined>, "Expected an array of Commerce events">;
|
|
436
|
+
}, undefined>, "Expected an array of Commerce event sources">, undefined>;
|
|
437
|
+
readonly external: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
438
|
+
readonly provider: v.ObjectSchema<{
|
|
439
|
+
readonly label: 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, 100, "The provider label must not be longer than 100 characters">]>;
|
|
440
|
+
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">]>;
|
|
441
|
+
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>;
|
|
442
|
+
}, undefined>;
|
|
443
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
444
|
+
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}`>]>;
|
|
445
|
+
readonly label: 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, 100, "The event label must not be longer than 100 characters">]>;
|
|
446
|
+
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">]>;
|
|
447
|
+
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>">;
|
|
448
|
+
}, undefined>, "Expected an array of external events">;
|
|
449
|
+
}, undefined>, "Expected an array of external event sources">, undefined>;
|
|
450
|
+
}, undefined>;
|
|
451
|
+
readonly installation: v.ObjectSchema<{
|
|
452
|
+
readonly messages: v.OptionalSchema<v.ObjectSchema<{
|
|
453
|
+
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>;
|
|
454
|
+
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>;
|
|
455
|
+
}, undefined>, undefined>;
|
|
456
|
+
readonly customInstallationSteps: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
457
|
+
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\")">]>;
|
|
458
|
+
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">]>;
|
|
459
|
+
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">]>;
|
|
460
|
+
}, undefined>, "Expected an array of custom installation steps">, undefined>, v.CheckAction<{
|
|
461
|
+
script: string;
|
|
462
|
+
name: string;
|
|
463
|
+
description: string;
|
|
464
|
+
}[] | undefined, "Duplicate step names detected in custom installation steps. Each step must have a unique name.">]>;
|
|
465
|
+
}, undefined>;
|
|
466
|
+
readonly "businessConfig.schema": v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.VariantSchema<"selectionMode", [v.ObjectSchema<{
|
|
467
|
+
readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
|
|
468
|
+
readonly selectionMode: v.LiteralSchema<"single", "Expected the selectionMode to be 'single'">;
|
|
469
|
+
readonly options: v.ArraySchema<v.ObjectSchema<{
|
|
470
|
+
readonly label: v.StringSchema<"Expected a string for the option label">;
|
|
471
|
+
readonly value: v.StringSchema<"Expected a string for the option value">;
|
|
472
|
+
}, undefined>, "Expected an array of list options">;
|
|
473
|
+
readonly default: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default value">, v.NonEmptyAction<string, "The default value must not be empty">]>;
|
|
474
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
475
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
476
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
477
|
+
}, undefined>, v.ObjectSchema<{
|
|
478
|
+
readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
|
|
479
|
+
readonly selectionMode: v.LiteralSchema<"multiple", "Expected the selectionMode to be 'multiple'">;
|
|
480
|
+
readonly options: v.ArraySchema<v.ObjectSchema<{
|
|
481
|
+
readonly label: v.StringSchema<"Expected a string for the option label">;
|
|
482
|
+
readonly value: v.StringSchema<"Expected a string for the option value">;
|
|
483
|
+
}, undefined>, "Expected an array of list options">;
|
|
484
|
+
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 []>;
|
|
485
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
486
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
487
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
488
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
489
|
+
readonly type: v.LiteralSchema<"text", "Expected the type to be 'text'">;
|
|
490
|
+
readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
|
|
491
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
492
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
493
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
494
|
+
}, undefined>, v.ObjectSchema<{
|
|
495
|
+
readonly type: v.LiteralSchema<"password", "Expected the type to be 'password'">;
|
|
496
|
+
readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
|
|
497
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
498
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
499
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
500
|
+
}, undefined>, v.ObjectSchema<{
|
|
501
|
+
readonly type: v.LiteralSchema<"email", "Expected the type to be 'email'">;
|
|
502
|
+
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>;
|
|
503
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
504
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
505
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
506
|
+
}, undefined>, v.ObjectSchema<{
|
|
507
|
+
readonly type: v.LiteralSchema<"url", "Expected the type to be 'url'">;
|
|
508
|
+
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>;
|
|
509
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
510
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
511
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
512
|
+
}, undefined>, v.ObjectSchema<{
|
|
513
|
+
readonly type: v.LiteralSchema<"tel", "Expected the type to be 'tel'">;
|
|
514
|
+
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>;
|
|
515
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
516
|
+
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
517
|
+
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
518
|
+
}, undefined>], undefined>, "Expected an array of configuration fields">, v.MinLengthAction<({
|
|
519
|
+
type: "list";
|
|
520
|
+
selectionMode: "single";
|
|
521
|
+
options: {
|
|
522
|
+
label: string;
|
|
523
|
+
value: string;
|
|
524
|
+
}[];
|
|
525
|
+
default: string;
|
|
526
|
+
name: string;
|
|
527
|
+
label?: string | undefined;
|
|
528
|
+
description?: string | undefined;
|
|
529
|
+
} | {
|
|
530
|
+
type: "list";
|
|
531
|
+
selectionMode: "multiple";
|
|
532
|
+
options: {
|
|
533
|
+
label: string;
|
|
534
|
+
value: string;
|
|
535
|
+
}[];
|
|
536
|
+
default: string[];
|
|
537
|
+
name: string;
|
|
538
|
+
label?: string | undefined;
|
|
539
|
+
description?: string | undefined;
|
|
540
|
+
} | {
|
|
541
|
+
type: "text";
|
|
542
|
+
default?: string | undefined;
|
|
543
|
+
name: string;
|
|
544
|
+
label?: string | undefined;
|
|
545
|
+
description?: string | undefined;
|
|
546
|
+
} | {
|
|
547
|
+
type: "password";
|
|
548
|
+
default?: string | undefined;
|
|
549
|
+
name: string;
|
|
550
|
+
label?: string | undefined;
|
|
551
|
+
description?: string | undefined;
|
|
552
|
+
} | {
|
|
553
|
+
type: "email";
|
|
554
|
+
default?: string | undefined;
|
|
555
|
+
name: string;
|
|
556
|
+
label?: string | undefined;
|
|
557
|
+
description?: string | undefined;
|
|
558
|
+
} | {
|
|
559
|
+
type: "url";
|
|
560
|
+
default?: string | undefined;
|
|
561
|
+
name: string;
|
|
562
|
+
label?: string | undefined;
|
|
563
|
+
description?: string | undefined;
|
|
564
|
+
} | {
|
|
565
|
+
type: "tel";
|
|
566
|
+
default?: string | undefined;
|
|
567
|
+
name: string;
|
|
568
|
+
label?: string | undefined;
|
|
569
|
+
description?: string | undefined;
|
|
570
|
+
})[], 1, "At least one configuration parameter is required">]>;
|
|
571
|
+
readonly "eventing.commerce": v.ArraySchema<v.ObjectSchema<{
|
|
572
|
+
readonly provider: v.ObjectSchema<{
|
|
573
|
+
readonly label: 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, 100, "The provider label must not be longer than 100 characters">]>;
|
|
574
|
+
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">]>;
|
|
575
|
+
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>;
|
|
576
|
+
}, undefined>;
|
|
577
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
578
|
+
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\")">]>;
|
|
579
|
+
readonly fields: v.ArraySchema<v.ObjectSchema<{
|
|
580
|
+
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 \"*\"">]>;
|
|
581
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
582
|
+
}, undefined>, "Expected an array of event field objects with a 'name' property">;
|
|
583
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
584
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
585
|
+
readonly operator: v.UnionSchema<v.LiteralSchema<"regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange", undefined>[], `Operator must be one of: ${string}`>;
|
|
586
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
587
|
+
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
588
|
+
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>;
|
|
589
|
+
readonly hipaaAuditRequired: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
590
|
+
readonly prioritary: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
591
|
+
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
592
|
+
readonly label: 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, 100, "The event label must not be longer than 100 characters">]>;
|
|
593
|
+
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">]>;
|
|
594
|
+
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>">;
|
|
595
|
+
}, undefined>, "Expected an array of Commerce events">;
|
|
596
|
+
}, undefined>, "Expected an array of Commerce event sources">;
|
|
597
|
+
readonly "eventing.external": v.ArraySchema<v.ObjectSchema<{
|
|
598
|
+
readonly provider: v.ObjectSchema<{
|
|
599
|
+
readonly label: 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, 100, "The provider label must not be longer than 100 characters">]>;
|
|
600
|
+
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">]>;
|
|
601
|
+
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>;
|
|
602
|
+
}, undefined>;
|
|
603
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
604
|
+
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}`>]>;
|
|
605
|
+
readonly label: 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, 100, "The event label must not be longer than 100 characters">]>;
|
|
606
|
+
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">]>;
|
|
607
|
+
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>">;
|
|
608
|
+
}, undefined>, "Expected an array of external events">;
|
|
609
|
+
}, undefined>, "Expected an array of external event sources">;
|
|
610
|
+
readonly "installation.customInstallationSteps": v.ArraySchema<v.ObjectSchema<{
|
|
611
|
+
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\")">]>;
|
|
612
|
+
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">]>;
|
|
613
|
+
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">]>;
|
|
614
|
+
}, undefined>, "Expected an array of custom installation steps">;
|
|
615
|
+
};
|
|
616
|
+
/** Individual validatable domains of the commerce app config. */
|
|
617
|
+
type CommerceAppConfigDomain = keyof typeof CommerceAppConfigSchemas;
|
|
618
|
+
/**
|
|
619
|
+
* Get the config domains that are present in the config.
|
|
620
|
+
* @param config - The configuration to check.
|
|
621
|
+
*/
|
|
622
|
+
declare function getConfigDomains(config: CommerceAppConfigOutputModel): Set<CommerceAppConfigDomain>;
|
|
623
|
+
/**
|
|
624
|
+
* Check if the config has a specific domain.
|
|
625
|
+
* @param config - The configuration to check.
|
|
626
|
+
* @param domain - The domain to check.
|
|
627
|
+
*/
|
|
628
|
+
declare function hasConfigDomain(config: CommerceAppConfigOutputModel, domain: CommerceAppConfigDomain): boolean;
|
|
629
|
+
//#endregion
|
|
294
630
|
//#region source/config/lib/validate.d.ts
|
|
295
631
|
/**
|
|
296
632
|
* Validates a complete commerce app configuration object against the schema.
|
|
@@ -664,6 +1000,194 @@ declare const SchemaBusinessConfig: v.ObjectSchema<{
|
|
|
664
1000
|
description?: string | undefined;
|
|
665
1001
|
})[], 1, "At least one configuration parameter is required">]>, readonly []>;
|
|
666
1002
|
}, undefined>;
|
|
1003
|
+
/** Config type when business config is present. */
|
|
1004
|
+
type AppConfigWithBusinessConfig = CommerceAppConfigOutputModel & {
|
|
1005
|
+
businessConfig: NonNullable<CommerceAppConfigOutputModel["businessConfig"]>;
|
|
1006
|
+
};
|
|
1007
|
+
/** Config type when business config schema is present. */
|
|
1008
|
+
type AppConfigWithBusinessConfigSchema = SetRequiredDeep<AppConfigWithBusinessConfig, "businessConfig.schema">;
|
|
1009
|
+
/**
|
|
1010
|
+
* Check if config has business config.
|
|
1011
|
+
* @param config - The configuration to check.
|
|
1012
|
+
*/
|
|
1013
|
+
declare function hasBusinessConfig(config: CommerceAppConfigOutputModel): config is AppConfigWithBusinessConfig;
|
|
1014
|
+
/**
|
|
1015
|
+
* Check if config has business config schema.
|
|
1016
|
+
* @param config - The configuration to check.
|
|
1017
|
+
*/
|
|
1018
|
+
declare function hasBusinessConfigSchema(config: CommerceAppConfigOutputModel): config is AppConfigWithBusinessConfigSchema;
|
|
1019
|
+
//#endregion
|
|
1020
|
+
//#region source/config/schema/eventing.d.ts
|
|
1021
|
+
/** Schema for event provider configuration */
|
|
1022
|
+
declare const ProviderSchema: v.ObjectSchema<{
|
|
1023
|
+
readonly label: 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, 100, "The provider label must not be longer than 100 characters">]>;
|
|
1024
|
+
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">]>;
|
|
1025
|
+
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>;
|
|
1026
|
+
}, undefined>;
|
|
1027
|
+
/** Schema for Commerce event configuration */
|
|
1028
|
+
declare const CommerceEventSchema: v.ObjectSchema<{
|
|
1029
|
+
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\")">]>;
|
|
1030
|
+
readonly fields: v.ArraySchema<v.ObjectSchema<{
|
|
1031
|
+
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 \"*\"">]>;
|
|
1032
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1033
|
+
}, undefined>, "Expected an array of event field objects with a 'name' property">;
|
|
1034
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1035
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1036
|
+
readonly operator: v.UnionSchema<v.LiteralSchema<"regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange", undefined>[], `Operator must be one of: ${string}`>;
|
|
1037
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1038
|
+
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
1039
|
+
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>;
|
|
1040
|
+
readonly hipaaAuditRequired: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1041
|
+
readonly prioritary: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1042
|
+
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1043
|
+
readonly label: 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, 100, "The event label must not be longer than 100 characters">]>;
|
|
1044
|
+
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">]>;
|
|
1045
|
+
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>">;
|
|
1046
|
+
}, undefined>;
|
|
1047
|
+
/** Schema for external event configuration */
|
|
1048
|
+
declare const ExternalEventSchema: v.ObjectSchema<{
|
|
1049
|
+
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}`>]>;
|
|
1050
|
+
readonly label: 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, 100, "The event label must not be longer than 100 characters">]>;
|
|
1051
|
+
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">]>;
|
|
1052
|
+
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>">;
|
|
1053
|
+
}, undefined>;
|
|
1054
|
+
/** Schema for Commerce event source configuration */
|
|
1055
|
+
declare const CommerceEventSourceSchema: v.ObjectSchema<{
|
|
1056
|
+
readonly provider: v.ObjectSchema<{
|
|
1057
|
+
readonly label: 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, 100, "The provider label must not be longer than 100 characters">]>;
|
|
1058
|
+
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">]>;
|
|
1059
|
+
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>;
|
|
1060
|
+
}, undefined>;
|
|
1061
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
1062
|
+
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\")">]>;
|
|
1063
|
+
readonly fields: v.ArraySchema<v.ObjectSchema<{
|
|
1064
|
+
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 \"*\"">]>;
|
|
1065
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1066
|
+
}, undefined>, "Expected an array of event field objects with a 'name' property">;
|
|
1067
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1068
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1069
|
+
readonly operator: v.UnionSchema<v.LiteralSchema<"regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange", undefined>[], `Operator must be one of: ${string}`>;
|
|
1070
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1071
|
+
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
1072
|
+
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>;
|
|
1073
|
+
readonly hipaaAuditRequired: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1074
|
+
readonly prioritary: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1075
|
+
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1076
|
+
readonly label: 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, 100, "The event label must not be longer than 100 characters">]>;
|
|
1077
|
+
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">]>;
|
|
1078
|
+
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>">;
|
|
1079
|
+
}, undefined>, "Expected an array of Commerce events">;
|
|
1080
|
+
}, undefined>;
|
|
1081
|
+
/** Schema for external event source configuration */
|
|
1082
|
+
declare const ExternalEventSourceSchema: v.ObjectSchema<{
|
|
1083
|
+
readonly provider: v.ObjectSchema<{
|
|
1084
|
+
readonly label: 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, 100, "The provider label must not be longer than 100 characters">]>;
|
|
1085
|
+
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">]>;
|
|
1086
|
+
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>;
|
|
1087
|
+
}, undefined>;
|
|
1088
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
1089
|
+
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}`>]>;
|
|
1090
|
+
readonly label: 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, 100, "The event label must not be longer than 100 characters">]>;
|
|
1091
|
+
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">]>;
|
|
1092
|
+
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>">;
|
|
1093
|
+
}, undefined>, "Expected an array of external events">;
|
|
1094
|
+
}, undefined>;
|
|
1095
|
+
/** Schema for eventing configuration with separate commerce and external arrays */
|
|
1096
|
+
declare const EventingSchema: v.ObjectSchema<{
|
|
1097
|
+
readonly commerce: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1098
|
+
readonly provider: v.ObjectSchema<{
|
|
1099
|
+
readonly label: 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, 100, "The provider label must not be longer than 100 characters">]>;
|
|
1100
|
+
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">]>;
|
|
1101
|
+
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>;
|
|
1102
|
+
}, undefined>;
|
|
1103
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
1104
|
+
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\")">]>;
|
|
1105
|
+
readonly fields: v.ArraySchema<v.ObjectSchema<{
|
|
1106
|
+
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 \"*\"">]>;
|
|
1107
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1108
|
+
}, undefined>, "Expected an array of event field objects with a 'name' property">;
|
|
1109
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1110
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1111
|
+
readonly operator: v.UnionSchema<v.LiteralSchema<"regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange", undefined>[], `Operator must be one of: ${string}`>;
|
|
1112
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1113
|
+
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
1114
|
+
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>;
|
|
1115
|
+
readonly hipaaAuditRequired: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1116
|
+
readonly prioritary: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1117
|
+
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1118
|
+
readonly label: 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, 100, "The event label must not be longer than 100 characters">]>;
|
|
1119
|
+
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">]>;
|
|
1120
|
+
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>">;
|
|
1121
|
+
}, undefined>, "Expected an array of Commerce events">;
|
|
1122
|
+
}, undefined>, "Expected an array of Commerce event sources">, undefined>;
|
|
1123
|
+
readonly external: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1124
|
+
readonly provider: v.ObjectSchema<{
|
|
1125
|
+
readonly label: 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, 100, "The provider label must not be longer than 100 characters">]>;
|
|
1126
|
+
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">]>;
|
|
1127
|
+
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>;
|
|
1128
|
+
}, undefined>;
|
|
1129
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
1130
|
+
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}`>]>;
|
|
1131
|
+
readonly label: 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, 100, "The event label must not be longer than 100 characters">]>;
|
|
1132
|
+
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">]>;
|
|
1133
|
+
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>">;
|
|
1134
|
+
}, undefined>, "Expected an array of external events">;
|
|
1135
|
+
}, undefined>, "Expected an array of external event sources">, undefined>;
|
|
1136
|
+
}, undefined>;
|
|
1137
|
+
/** The eventing configuration for an Adobe Commerce application */
|
|
1138
|
+
type EventingConfiguration = v.InferInput<typeof EventingSchema>;
|
|
1139
|
+
/** Commerce event source configuration */
|
|
1140
|
+
type CommerceEventSource = v.InferInput<typeof CommerceEventSourceSchema>;
|
|
1141
|
+
/** External event source configuration */
|
|
1142
|
+
type ExternalEventSource = v.InferInput<typeof ExternalEventSourceSchema>;
|
|
1143
|
+
/** Commerce event configuration */
|
|
1144
|
+
type CommerceEvent = v.InferInput<typeof CommerceEventSchema>;
|
|
1145
|
+
/** External event configuration */
|
|
1146
|
+
type ExternalEvent = v.InferInput<typeof ExternalEventSchema>;
|
|
1147
|
+
/** Union type of all supported event configurations */
|
|
1148
|
+
type AppEvent = CommerceEvent | ExternalEvent;
|
|
1149
|
+
/** Event provider configuration */
|
|
1150
|
+
type EventProvider = v.InferInput<typeof ProviderSchema>;
|
|
1151
|
+
/** Config type when eventing is present. */
|
|
1152
|
+
type EventsConfig = CommerceAppConfigOutputModel & {
|
|
1153
|
+
eventing: NonNullable<CommerceAppConfigOutputModel["eventing"]>;
|
|
1154
|
+
};
|
|
1155
|
+
/** Config type when commerce event sources are present. */
|
|
1156
|
+
type CommerceEventsConfig = SetRequiredDeep<EventsConfig, "eventing.commerce">;
|
|
1157
|
+
/** Config type when external event sources are present. */
|
|
1158
|
+
type ExternalEventsConfig = SetRequiredDeep<EventsConfig, "eventing.external">;
|
|
1159
|
+
/**
|
|
1160
|
+
* Check if config has commerce event sources.
|
|
1161
|
+
* @param config - The configuration to check.
|
|
1162
|
+
*/
|
|
1163
|
+
declare function hasCommerceEvents(config: CommerceAppConfigOutputModel): config is CommerceEventsConfig;
|
|
1164
|
+
/**
|
|
1165
|
+
* Check if config has external event sources.
|
|
1166
|
+
* @param config - The configuration to check.
|
|
1167
|
+
*/
|
|
1168
|
+
declare function hasExternalEvents(config: CommerceAppConfigOutputModel): config is ExternalEventsConfig;
|
|
1169
|
+
/**
|
|
1170
|
+
* Check if config has any eventing configuration.
|
|
1171
|
+
* @param config - The configuration to check.
|
|
1172
|
+
*/
|
|
1173
|
+
declare function hasEventing(config: CommerceAppConfigOutputModel): config is EventsConfig;
|
|
1174
|
+
//#endregion
|
|
1175
|
+
//#region source/config/schema/installation.d.ts
|
|
1176
|
+
type InstallationConfig = CommerceAppConfigOutputModel & {
|
|
1177
|
+
installation: NonNullable<CommerceAppConfigOutputModel["installation"]>;
|
|
1178
|
+
};
|
|
1179
|
+
/** Config type when custom installation steps are present. */
|
|
1180
|
+
type ConfigWithInstallationSteps = SetRequiredDeep<InstallationConfig, "installation.customInstallationSteps">;
|
|
1181
|
+
/**
|
|
1182
|
+
* Check if config has custom installation settings.
|
|
1183
|
+
* @param config - The configuration to check.
|
|
1184
|
+
*/
|
|
1185
|
+
declare function hasCustomInstallation(config: CommerceAppConfigOutputModel): config is InstallationConfig;
|
|
1186
|
+
/**
|
|
1187
|
+
* Check if config has custom installation steps.
|
|
1188
|
+
* @param config - The configuration to check.
|
|
1189
|
+
*/
|
|
1190
|
+
declare function hasCustomInstallationSteps(config: CommerceAppConfigOutputModel): config is ConfigWithInstallationSteps;
|
|
667
1191
|
//#endregion
|
|
668
1192
|
//#region source/config/schema/metadata.d.ts
|
|
669
1193
|
/** The schema for the metadata of the application. */
|
|
@@ -675,5 +1199,10 @@ declare const MetadataSchema: v.ObjectSchema<{
|
|
|
675
1199
|
}, undefined>;
|
|
676
1200
|
/** The metadata associated to an Adobe Commerce application. */
|
|
677
1201
|
type ApplicationMetadata = v.InferInput<typeof MetadataSchema>;
|
|
1202
|
+
/**
|
|
1203
|
+
* Check if config has metadata.
|
|
1204
|
+
* @param config - The configuration to check.
|
|
1205
|
+
*/
|
|
1206
|
+
declare function hasMetadata(config: CommerceAppConfigOutputModel): boolean;
|
|
678
1207
|
//#endregion
|
|
679
|
-
export { type ApplicationMetadata, type BusinessConfig, type BusinessConfigSchema, type BusinessConfigSchemaField, type BusinessConfigSchemaListOption, type BusinessConfigSchemaValue, type CommerceAppConfig, type CommerceAppConfigDomain, type SchemaBusinessConfig, defineConfig, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };
|
|
1208
|
+
export { type AppConfigWithBusinessConfig, type AppConfigWithBusinessConfigSchema, AppEvent, type ApplicationMetadata, type BusinessConfig, type BusinessConfigSchema, type BusinessConfigSchemaField, type BusinessConfigSchemaListOption, type BusinessConfigSchemaValue, type CommerceAppConfig, type CommerceAppConfigDomain, CommerceAppConfigSchemas, CommerceEvent, CommerceEventSource, CommerceEventSourceSchema, CommerceEventsConfig, EventProvider, EventingConfiguration, EventingSchema, EventsConfig, ExternalEvent, ExternalEventSource, ExternalEventSourceSchema, ExternalEventsConfig, type SchemaBusinessConfig, defineConfig, getConfigDomains, hasBusinessConfig, hasBusinessConfigSchema, hasCommerceEvents, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps, hasEventing, hasExternalEvents, hasMetadata, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };
|
package/dist/es/config/index.mjs
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import { a as hasExternalEvents, c as hasCustomInstallationSteps, i as hasEventing, r as hasCommerceEvents, s as hasCustomInstallation } from "../error-P7JgUTds.mjs";
|
|
2
|
+
import { a as validateCommerceAppConfigDomain, c as hasConfigDomain, d as hasBusinessConfigSchema, i as validateCommerceAppConfig, l as hasMetadata, n as readCommerceAppConfig, o as CommerceAppConfigSchemas, r as resolveCommerceAppConfig, s as getConfigDomains, t as parseCommerceAppConfig, u as hasBusinessConfig, v as defineConfig } from "../config-BSGerqCG.mjs";
|
|
3
|
+
|
|
4
|
+
export { CommerceAppConfigSchemas, defineConfig, getConfigDomains, hasBusinessConfig, hasBusinessConfigSchema, hasCommerceEvents, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps, hasEventing, hasExternalEvents, hasMetadata, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };
|