@adobe/aio-commerce-lib-app 0.3.1 → 1.0.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 +39 -0
- package/README.md +1 -4
- package/bin/cli.mjs +24 -0
- package/dist/cjs/actions/app-config.cjs +27 -0
- package/dist/cjs/actions/app-config.d.cts +15 -0
- package/dist/cjs/actions/config.cjs +79 -0
- package/dist/cjs/actions/config.d.cts +15 -0
- package/dist/cjs/actions/installation.cjs +424 -0
- package/dist/cjs/actions/{index.d.cts → installation.d.cts} +4 -3
- package/dist/cjs/actions/scope-tree.cjs +97 -0
- package/dist/cjs/actions/scope-tree.d.cts +8 -0
- package/dist/cjs/{app-Dx0ca6oL.d.cts → app-PTKvEBea.d.cts} +6 -6
- package/dist/cjs/commands/generate/actions/templates/app-management/app-config.js.template +22 -0
- package/dist/cjs/commands/generate/actions/templates/app-management/installation.js.template +1 -1
- package/dist/cjs/commands/generate/actions/templates/business-configuration/config.js.template +22 -0
- package/dist/cjs/commands/generate/actions/templates/business-configuration/scope-tree.js.template +18 -0
- package/dist/cjs/commands/index.cjs +105 -113
- package/dist/cjs/config/index.cjs +21 -19
- package/dist/cjs/config/index.d.cts +32 -332
- package/dist/cjs/error-DJ2UAPH2.cjs +24 -0
- package/dist/cjs/installation-nwF2RC7F.cjs +241 -0
- package/dist/cjs/{logging-DYwr5WQk.cjs → logging-IDRQG0as.cjs} +2 -2
- package/dist/cjs/management/index.cjs +9 -8
- package/dist/cjs/management/index.d.cts +2 -2
- package/dist/cjs/parser-DIchX9SL.cjs +267 -0
- package/dist/cjs/router-DCw7oEQ9.cjs +417 -0
- package/dist/cjs/{management-Dm5h0E6l.cjs → runner-CUJ8RHzY.cjs} +24 -30
- package/dist/{es/index-Bxr3zvCT.d.mts → cjs/runner-Ds2m27Q4.d.cts} +49 -95
- package/dist/cjs/schemas-CZ6c8Id9.cjs +98 -0
- package/dist/cjs/validate-BegMfe-i.cjs +235 -0
- package/dist/es/actions/app-config.d.mts +15 -0
- package/dist/es/actions/app-config.mjs +25 -0
- package/dist/es/actions/config.d.mts +15 -0
- package/dist/es/actions/config.mjs +77 -0
- package/dist/es/actions/{index.d.mts → installation.d.mts} +4 -3
- package/dist/es/actions/{index.mjs → installation.mjs} +27 -427
- package/dist/es/actions/scope-tree.d.mts +8 -0
- package/dist/es/actions/scope-tree.mjs +95 -0
- package/dist/es/{app-Cx1-6dn0.d.mts → app-vKXaAr6f.d.mts} +6 -6
- package/dist/es/commands/generate/actions/templates/app-management/app-config.js.template +22 -0
- package/dist/es/commands/generate/actions/templates/app-management/installation.js.template +1 -1
- package/dist/es/commands/generate/actions/templates/business-configuration/config.js.template +22 -0
- package/dist/es/commands/generate/actions/templates/business-configuration/scope-tree.js.template +18 -0
- package/dist/es/commands/index.mjs +82 -91
- package/dist/es/config/index.d.mts +32 -332
- package/dist/es/config/index.mjs +3 -2
- package/dist/es/error-CMV3IjBz.mjs +18 -0
- package/dist/es/{error-P7JgUTds.mjs → installation-SWIwhpKT.mjs} +72 -124
- package/dist/es/management/index.d.mts +2 -3
- package/dist/es/management/index.mjs +1 -1
- package/dist/es/parser-CKQyrTB7.mjs +201 -0
- package/dist/es/router-CJ4VWoCt.mjs +404 -0
- package/dist/es/{management-Y7pwEbNI.mjs → runner-DB2tDBQS.mjs} +17 -24
- package/dist/{cjs/index-C5SutkJQ.d.cts → es/runner-Uk7263hG.d.mts} +49 -95
- package/dist/es/schemas-B8yIv0_b.mjs +41 -0
- package/dist/es/validate-DXI6gwZ2.mjs +187 -0
- package/package.json +39 -25
- package/dist/cjs/actions/index.cjs +0 -824
- package/dist/cjs/commands/generate/actions/templates/app-management/get-app-config.js.template +0 -62
- package/dist/cjs/commands/generate/actions/templates/business-configuration/get-config-schema.js.template +0 -63
- package/dist/cjs/commands/generate/actions/templates/business-configuration/get-configuration.js.template +0 -104
- package/dist/cjs/commands/generate/actions/templates/business-configuration/get-scope-tree.js.template +0 -69
- package/dist/cjs/commands/generate/actions/templates/business-configuration/set-configuration.js.template +0 -125
- package/dist/cjs/commands/generate/actions/templates/business-configuration/set-custom-scope-tree.js.template +0 -83
- package/dist/cjs/commands/generate/actions/templates/business-configuration/sync-commerce-scopes.js.template +0 -113
- package/dist/cjs/commands/generate/actions/templates/business-configuration/unsync-commerce-scopes.js.template +0 -56
- package/dist/cjs/config-JQ_n-5Nk.cjs +0 -565
- package/dist/cjs/error-Byj1DVHZ.cjs +0 -344
- package/dist/es/commands/generate/actions/templates/app-management/get-app-config.js.template +0 -62
- package/dist/es/commands/generate/actions/templates/business-configuration/get-config-schema.js.template +0 -63
- package/dist/es/commands/generate/actions/templates/business-configuration/get-configuration.js.template +0 -104
- package/dist/es/commands/generate/actions/templates/business-configuration/get-scope-tree.js.template +0 -69
- package/dist/es/commands/generate/actions/templates/business-configuration/set-configuration.js.template +0 -125
- package/dist/es/commands/generate/actions/templates/business-configuration/set-custom-scope-tree.js.template +0 -83
- package/dist/es/commands/generate/actions/templates/business-configuration/sync-commerce-scopes.js.template +0 -113
- package/dist/es/commands/generate/actions/templates/business-configuration/unsync-commerce-scopes.js.template +0 -56
- package/dist/es/config-BSGerqCG.mjs +0 -457
- /package/dist/es/{logging-VgerMhp6.mjs → logging-CzmXDzxI.mjs} +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { n as CommerceAppConfigOutputModel, t as CommerceAppConfig } from "../app-
|
|
1
|
+
import { n as CommerceAppConfigOutputModel, t as CommerceAppConfig } from "../app-PTKvEBea.cjs";
|
|
2
2
|
import * as v from "valibot";
|
|
3
3
|
import { Get, SetRequiredDeep } from "type-fest";
|
|
4
4
|
|
|
5
5
|
//#region source/config/lib/define.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Helper to type-safely define the app config.
|
|
9
8
|
* @param config - The app config to define.
|
|
@@ -56,7 +55,7 @@ declare function defineConfig(config: CommerceAppConfig): {
|
|
|
56
55
|
description?: string | undefined;
|
|
57
56
|
} | {
|
|
58
57
|
type: "password";
|
|
59
|
-
default?:
|
|
58
|
+
default?: undefined;
|
|
60
59
|
name: string;
|
|
61
60
|
label?: string | undefined;
|
|
62
61
|
description?: string | undefined;
|
|
@@ -99,8 +98,8 @@ declare function defineConfig(config: CommerceAppConfig): {
|
|
|
99
98
|
value: string;
|
|
100
99
|
}[] | undefined;
|
|
101
100
|
destination?: string | undefined;
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
hipaa_audit_required?: boolean | undefined;
|
|
102
|
+
priority?: boolean | undefined;
|
|
104
103
|
force?: boolean | undefined;
|
|
105
104
|
label: string;
|
|
106
105
|
description: string;
|
|
@@ -211,7 +210,7 @@ declare function parseCommerceAppConfig(cwd?: string): Promise<{
|
|
|
211
210
|
description?: string | undefined;
|
|
212
211
|
} | {
|
|
213
212
|
type: "password";
|
|
214
|
-
default?:
|
|
213
|
+
default?: undefined;
|
|
215
214
|
name: string;
|
|
216
215
|
label?: string | undefined;
|
|
217
216
|
description?: string | undefined;
|
|
@@ -254,8 +253,8 @@ declare function parseCommerceAppConfig(cwd?: string): Promise<{
|
|
|
254
253
|
value: string;
|
|
255
254
|
}[] | undefined;
|
|
256
255
|
destination?: string | undefined;
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
hipaa_audit_required?: boolean | undefined;
|
|
257
|
+
priority?: boolean | undefined;
|
|
259
258
|
force?: boolean | undefined;
|
|
260
259
|
label: string;
|
|
261
260
|
description: string;
|
|
@@ -331,7 +330,7 @@ declare const CommerceAppConfigSchemas: {
|
|
|
331
330
|
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
332
331
|
}, undefined>, v.ObjectSchema<{
|
|
333
332
|
readonly type: v.LiteralSchema<"password", "Expected the type to be 'password'">;
|
|
334
|
-
readonly default: v.OptionalSchema<v.
|
|
333
|
+
readonly default: v.OptionalSchema<v.NeverSchema<"Password fields do not have a default value">, undefined>;
|
|
335
334
|
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
335
|
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
337
336
|
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
@@ -383,7 +382,7 @@ declare const CommerceAppConfigSchemas: {
|
|
|
383
382
|
description?: string | undefined;
|
|
384
383
|
} | {
|
|
385
384
|
type: "password";
|
|
386
|
-
default?:
|
|
385
|
+
default?: undefined;
|
|
387
386
|
name: string;
|
|
388
387
|
label?: string | undefined;
|
|
389
388
|
description?: string | undefined;
|
|
@@ -415,7 +414,7 @@ declare const CommerceAppConfigSchemas: {
|
|
|
415
414
|
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
415
|
}, undefined>;
|
|
417
416
|
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\")">]>;
|
|
417
|
+
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\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
419
418
|
readonly fields: v.ArraySchema<v.ObjectSchema<{
|
|
420
419
|
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
420
|
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
@@ -426,8 +425,8 @@ declare const CommerceAppConfigSchemas: {
|
|
|
426
425
|
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
426
|
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
428
427
|
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
|
|
430
|
-
readonly
|
|
428
|
+
readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
429
|
+
readonly priority: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
431
430
|
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
432
431
|
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
432
|
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">]>;
|
|
@@ -441,7 +440,7 @@ declare const CommerceAppConfigSchemas: {
|
|
|
441
440
|
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
441
|
}, undefined>;
|
|
443
442
|
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
444
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.
|
|
443
|
+
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 contain only letters, digits, underscores, hyphens, and dots (e.g., \"external_event\", \"webhook.received\", \"my-event_123\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
445
444
|
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
445
|
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
446
|
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>">;
|
|
@@ -493,7 +492,7 @@ declare const CommerceAppConfigSchemas: {
|
|
|
493
492
|
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
494
493
|
}, undefined>, v.ObjectSchema<{
|
|
495
494
|
readonly type: v.LiteralSchema<"password", "Expected the type to be 'password'">;
|
|
496
|
-
readonly default: v.OptionalSchema<v.
|
|
495
|
+
readonly default: v.OptionalSchema<v.NeverSchema<"Password fields do not have a default value">, undefined>;
|
|
497
496
|
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
497
|
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
499
498
|
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
@@ -545,7 +544,7 @@ declare const CommerceAppConfigSchemas: {
|
|
|
545
544
|
description?: string | undefined;
|
|
546
545
|
} | {
|
|
547
546
|
type: "password";
|
|
548
|
-
default?:
|
|
547
|
+
default?: undefined;
|
|
549
548
|
name: string;
|
|
550
549
|
label?: string | undefined;
|
|
551
550
|
description?: string | undefined;
|
|
@@ -575,7 +574,7 @@ declare const CommerceAppConfigSchemas: {
|
|
|
575
574
|
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
575
|
}, undefined>;
|
|
577
576
|
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\")">]>;
|
|
577
|
+
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\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
579
578
|
readonly fields: v.ArraySchema<v.ObjectSchema<{
|
|
580
579
|
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
580
|
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
@@ -586,8 +585,8 @@ declare const CommerceAppConfigSchemas: {
|
|
|
586
585
|
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
586
|
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
588
587
|
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
|
|
590
|
-
readonly
|
|
588
|
+
readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
589
|
+
readonly priority: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
591
590
|
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
592
591
|
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
592
|
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">]>;
|
|
@@ -601,7 +600,7 @@ declare const CommerceAppConfigSchemas: {
|
|
|
601
600
|
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
601
|
}, undefined>;
|
|
603
602
|
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
604
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.
|
|
603
|
+
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 contain only letters, digits, underscores, hyphens, and dots (e.g., \"external_event\", \"webhook.received\", \"my-event_123\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
605
604
|
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
605
|
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
606
|
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>">;
|
|
@@ -701,305 +700,6 @@ declare function validateCommerceAppConfig(config: unknown): CommerceAppConfigOu
|
|
|
701
700
|
declare function validateCommerceAppConfigDomain<T extends CommerceAppConfigDomain>(config: unknown, domain: T): NonNullable<Get<CommerceAppConfigOutputModel, T>>;
|
|
702
701
|
//#endregion
|
|
703
702
|
//#region source/config/schema/business-configuration.d.ts
|
|
704
|
-
/** Schema for a configuration field that can be one of various field types (list, text, password, email, url, or phone) */
|
|
705
|
-
declare const FieldSchema: v.VariantSchema<"type", [v.VariantSchema<"selectionMode", [v.ObjectSchema<{
|
|
706
|
-
readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
|
|
707
|
-
readonly selectionMode: v.LiteralSchema<"single", "Expected the selectionMode to be 'single'">;
|
|
708
|
-
readonly options: v.ArraySchema<v.ObjectSchema<{
|
|
709
|
-
readonly label: v.StringSchema<"Expected a string for the option label">;
|
|
710
|
-
readonly value: v.StringSchema<"Expected a string for the option value">;
|
|
711
|
-
}, undefined>, "Expected an array of list options">;
|
|
712
|
-
readonly default: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default value">, v.NonEmptyAction<string, "The default value must not be empty">]>;
|
|
713
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
714
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
715
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
716
|
-
}, undefined>, v.ObjectSchema<{
|
|
717
|
-
readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
|
|
718
|
-
readonly selectionMode: v.LiteralSchema<"multiple", "Expected the selectionMode to be 'multiple'">;
|
|
719
|
-
readonly options: v.ArraySchema<v.ObjectSchema<{
|
|
720
|
-
readonly label: v.StringSchema<"Expected a string for the option label">;
|
|
721
|
-
readonly value: v.StringSchema<"Expected a string for the option value">;
|
|
722
|
-
}, undefined>, "Expected an array of list options">;
|
|
723
|
-
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 []>;
|
|
724
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
725
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
726
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
727
|
-
}, undefined>], undefined>, v.ObjectSchema<{
|
|
728
|
-
readonly type: v.LiteralSchema<"text", "Expected the type to be 'text'">;
|
|
729
|
-
readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
|
|
730
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
731
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
732
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
733
|
-
}, undefined>, v.ObjectSchema<{
|
|
734
|
-
readonly type: v.LiteralSchema<"password", "Expected the type to be 'password'">;
|
|
735
|
-
readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
|
|
736
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
737
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
738
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
739
|
-
}, undefined>, v.ObjectSchema<{
|
|
740
|
-
readonly type: v.LiteralSchema<"email", "Expected the type to be 'email'">;
|
|
741
|
-
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>;
|
|
742
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
743
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
744
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
745
|
-
}, undefined>, v.ObjectSchema<{
|
|
746
|
-
readonly type: v.LiteralSchema<"url", "Expected the type to be 'url'">;
|
|
747
|
-
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>;
|
|
748
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
749
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
750
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
751
|
-
}, undefined>, v.ObjectSchema<{
|
|
752
|
-
readonly type: v.LiteralSchema<"tel", "Expected the type to be 'tel'">;
|
|
753
|
-
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>;
|
|
754
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
755
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
756
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
757
|
-
}, undefined>], undefined>;
|
|
758
|
-
/** Schema for the schema of the business configuration, which is an array of configuration fields with at least one field required */
|
|
759
|
-
declare const SchemaBusinessConfigSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.VariantSchema<"selectionMode", [v.ObjectSchema<{
|
|
760
|
-
readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
|
|
761
|
-
readonly selectionMode: v.LiteralSchema<"single", "Expected the selectionMode to be 'single'">;
|
|
762
|
-
readonly options: v.ArraySchema<v.ObjectSchema<{
|
|
763
|
-
readonly label: v.StringSchema<"Expected a string for the option label">;
|
|
764
|
-
readonly value: v.StringSchema<"Expected a string for the option value">;
|
|
765
|
-
}, undefined>, "Expected an array of list options">;
|
|
766
|
-
readonly default: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default value">, v.NonEmptyAction<string, "The default value must not be empty">]>;
|
|
767
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
768
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
769
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
770
|
-
}, undefined>, v.ObjectSchema<{
|
|
771
|
-
readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
|
|
772
|
-
readonly selectionMode: v.LiteralSchema<"multiple", "Expected the selectionMode to be 'multiple'">;
|
|
773
|
-
readonly options: v.ArraySchema<v.ObjectSchema<{
|
|
774
|
-
readonly label: v.StringSchema<"Expected a string for the option label">;
|
|
775
|
-
readonly value: v.StringSchema<"Expected a string for the option value">;
|
|
776
|
-
}, undefined>, "Expected an array of list options">;
|
|
777
|
-
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 []>;
|
|
778
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
779
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
780
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
781
|
-
}, undefined>], undefined>, v.ObjectSchema<{
|
|
782
|
-
readonly type: v.LiteralSchema<"text", "Expected the type to be 'text'">;
|
|
783
|
-
readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
|
|
784
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
785
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
786
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
787
|
-
}, undefined>, v.ObjectSchema<{
|
|
788
|
-
readonly type: v.LiteralSchema<"password", "Expected the type to be 'password'">;
|
|
789
|
-
readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
|
|
790
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
791
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
792
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
793
|
-
}, undefined>, v.ObjectSchema<{
|
|
794
|
-
readonly type: v.LiteralSchema<"email", "Expected the type to be 'email'">;
|
|
795
|
-
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>;
|
|
796
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
797
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
798
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
799
|
-
}, undefined>, v.ObjectSchema<{
|
|
800
|
-
readonly type: v.LiteralSchema<"url", "Expected the type to be 'url'">;
|
|
801
|
-
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>;
|
|
802
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
803
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
804
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
805
|
-
}, undefined>, v.ObjectSchema<{
|
|
806
|
-
readonly type: v.LiteralSchema<"tel", "Expected the type to be 'tel'">;
|
|
807
|
-
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>;
|
|
808
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
809
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
810
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
811
|
-
}, undefined>], undefined>, "Expected an array of configuration fields">, v.MinLengthAction<({
|
|
812
|
-
type: "list";
|
|
813
|
-
selectionMode: "single";
|
|
814
|
-
options: {
|
|
815
|
-
label: string;
|
|
816
|
-
value: string;
|
|
817
|
-
}[];
|
|
818
|
-
default: string;
|
|
819
|
-
name: string;
|
|
820
|
-
label?: string | undefined;
|
|
821
|
-
description?: string | undefined;
|
|
822
|
-
} | {
|
|
823
|
-
type: "list";
|
|
824
|
-
selectionMode: "multiple";
|
|
825
|
-
options: {
|
|
826
|
-
label: string;
|
|
827
|
-
value: string;
|
|
828
|
-
}[];
|
|
829
|
-
default: string[];
|
|
830
|
-
name: string;
|
|
831
|
-
label?: string | undefined;
|
|
832
|
-
description?: string | undefined;
|
|
833
|
-
} | {
|
|
834
|
-
type: "text";
|
|
835
|
-
default?: string | undefined;
|
|
836
|
-
name: string;
|
|
837
|
-
label?: string | undefined;
|
|
838
|
-
description?: string | undefined;
|
|
839
|
-
} | {
|
|
840
|
-
type: "password";
|
|
841
|
-
default?: string | undefined;
|
|
842
|
-
name: string;
|
|
843
|
-
label?: string | undefined;
|
|
844
|
-
description?: string | undefined;
|
|
845
|
-
} | {
|
|
846
|
-
type: "email";
|
|
847
|
-
default?: string | undefined;
|
|
848
|
-
name: string;
|
|
849
|
-
label?: string | undefined;
|
|
850
|
-
description?: string | undefined;
|
|
851
|
-
} | {
|
|
852
|
-
type: "url";
|
|
853
|
-
default?: string | undefined;
|
|
854
|
-
name: string;
|
|
855
|
-
label?: string | undefined;
|
|
856
|
-
description?: string | undefined;
|
|
857
|
-
} | {
|
|
858
|
-
type: "tel";
|
|
859
|
-
default?: string | undefined;
|
|
860
|
-
name: string;
|
|
861
|
-
label?: string | undefined;
|
|
862
|
-
description?: string | undefined;
|
|
863
|
-
})[], 1, "At least one configuration parameter is required">]>;
|
|
864
|
-
/**
|
|
865
|
-
* The schema type for a configuration field.
|
|
866
|
-
*
|
|
867
|
-
* Represents a single field definition in the configuration schema, which can be
|
|
868
|
-
* one of various types: list, text, password, email, url, or phone.
|
|
869
|
-
*/
|
|
870
|
-
type BusinessConfigSchemaField = v.InferInput<typeof FieldSchema>;
|
|
871
|
-
/**
|
|
872
|
-
* The schema type for the business configuration schema.
|
|
873
|
-
*
|
|
874
|
-
* Represents an array of configuration field definitions that make up the complete
|
|
875
|
-
* business configuration schema. Must contain at least one field.
|
|
876
|
-
*/
|
|
877
|
-
type BusinessConfigSchema = v.InferInput<typeof SchemaBusinessConfigSchema>;
|
|
878
|
-
/** The schema type for the business configuration schema. */
|
|
879
|
-
type BusinessConfigSchemaValue = BusinessConfigSchemaField["default"];
|
|
880
|
-
/**
|
|
881
|
-
* The schema type for an option in a list configuration field.
|
|
882
|
-
* Represents a single option that can be selected in a list-type configuration field.
|
|
883
|
-
*/
|
|
884
|
-
type BusinessConfigSchemaListOption = Extract<BusinessConfigSchemaField, {
|
|
885
|
-
type: "list";
|
|
886
|
-
}>["options"][number];
|
|
887
|
-
/** The keys of the `businessConfig` settings in the app config file. */
|
|
888
|
-
type BusinessConfig = {
|
|
889
|
-
/**
|
|
890
|
-
* The schema of the app business configuration.
|
|
891
|
-
* @default []
|
|
892
|
-
*/
|
|
893
|
-
schema?: BusinessConfigSchema;
|
|
894
|
-
};
|
|
895
|
-
/** The schema used to validate the `businessConfig` settings in the app config file. */
|
|
896
|
-
declare const SchemaBusinessConfig: v.ObjectSchema<{
|
|
897
|
-
readonly schema: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.VariantSchema<"selectionMode", [v.ObjectSchema<{
|
|
898
|
-
readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
|
|
899
|
-
readonly selectionMode: v.LiteralSchema<"single", "Expected the selectionMode to be 'single'">;
|
|
900
|
-
readonly options: v.ArraySchema<v.ObjectSchema<{
|
|
901
|
-
readonly label: v.StringSchema<"Expected a string for the option label">;
|
|
902
|
-
readonly value: v.StringSchema<"Expected a string for the option value">;
|
|
903
|
-
}, undefined>, "Expected an array of list options">;
|
|
904
|
-
readonly default: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the default value">, v.NonEmptyAction<string, "The default value must not be empty">]>;
|
|
905
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
906
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
907
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
908
|
-
}, undefined>, v.ObjectSchema<{
|
|
909
|
-
readonly type: v.LiteralSchema<"list", "Expected the type to be 'list'">;
|
|
910
|
-
readonly selectionMode: v.LiteralSchema<"multiple", "Expected the selectionMode to be 'multiple'">;
|
|
911
|
-
readonly options: v.ArraySchema<v.ObjectSchema<{
|
|
912
|
-
readonly label: v.StringSchema<"Expected a string for the option label">;
|
|
913
|
-
readonly value: v.StringSchema<"Expected a string for the option value">;
|
|
914
|
-
}, undefined>, "Expected an array of list options">;
|
|
915
|
-
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 []>;
|
|
916
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
917
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
918
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
919
|
-
}, undefined>], undefined>, v.ObjectSchema<{
|
|
920
|
-
readonly type: v.LiteralSchema<"text", "Expected the type to be 'text'">;
|
|
921
|
-
readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
|
|
922
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
923
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
924
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
925
|
-
}, undefined>, v.ObjectSchema<{
|
|
926
|
-
readonly type: v.LiteralSchema<"password", "Expected the type to be 'password'">;
|
|
927
|
-
readonly default: v.OptionalSchema<v.StringSchema<"Expected a string for the default value">, undefined>;
|
|
928
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
929
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
930
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
931
|
-
}, undefined>, v.ObjectSchema<{
|
|
932
|
-
readonly type: v.LiteralSchema<"email", "Expected the type to be 'email'">;
|
|
933
|
-
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>;
|
|
934
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
935
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
936
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
937
|
-
}, undefined>, v.ObjectSchema<{
|
|
938
|
-
readonly type: v.LiteralSchema<"url", "Expected the type to be 'url'">;
|
|
939
|
-
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>;
|
|
940
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
941
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
942
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
943
|
-
}, undefined>, v.ObjectSchema<{
|
|
944
|
-
readonly type: v.LiteralSchema<"tel", "Expected the type to be 'tel'">;
|
|
945
|
-
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>;
|
|
946
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<"Expected a string for the field name">, v.NonEmptyAction<string, "The field name must not be empty">]>;
|
|
947
|
-
readonly label: v.OptionalSchema<v.StringSchema<"Expected a string for the field label">, undefined>;
|
|
948
|
-
readonly description: v.OptionalSchema<v.StringSchema<"Expected a string for the field description">, undefined>;
|
|
949
|
-
}, undefined>], undefined>, "Expected an array of configuration fields">, v.MinLengthAction<({
|
|
950
|
-
type: "list";
|
|
951
|
-
selectionMode: "single";
|
|
952
|
-
options: {
|
|
953
|
-
label: string;
|
|
954
|
-
value: string;
|
|
955
|
-
}[];
|
|
956
|
-
default: string;
|
|
957
|
-
name: string;
|
|
958
|
-
label?: string | undefined;
|
|
959
|
-
description?: string | undefined;
|
|
960
|
-
} | {
|
|
961
|
-
type: "list";
|
|
962
|
-
selectionMode: "multiple";
|
|
963
|
-
options: {
|
|
964
|
-
label: string;
|
|
965
|
-
value: string;
|
|
966
|
-
}[];
|
|
967
|
-
default: string[];
|
|
968
|
-
name: string;
|
|
969
|
-
label?: string | undefined;
|
|
970
|
-
description?: string | undefined;
|
|
971
|
-
} | {
|
|
972
|
-
type: "text";
|
|
973
|
-
default?: string | undefined;
|
|
974
|
-
name: string;
|
|
975
|
-
label?: string | undefined;
|
|
976
|
-
description?: string | undefined;
|
|
977
|
-
} | {
|
|
978
|
-
type: "password";
|
|
979
|
-
default?: string | undefined;
|
|
980
|
-
name: string;
|
|
981
|
-
label?: string | undefined;
|
|
982
|
-
description?: string | undefined;
|
|
983
|
-
} | {
|
|
984
|
-
type: "email";
|
|
985
|
-
default?: string | undefined;
|
|
986
|
-
name: string;
|
|
987
|
-
label?: string | undefined;
|
|
988
|
-
description?: string | undefined;
|
|
989
|
-
} | {
|
|
990
|
-
type: "url";
|
|
991
|
-
default?: string | undefined;
|
|
992
|
-
name: string;
|
|
993
|
-
label?: string | undefined;
|
|
994
|
-
description?: string | undefined;
|
|
995
|
-
} | {
|
|
996
|
-
type: "tel";
|
|
997
|
-
default?: string | undefined;
|
|
998
|
-
name: string;
|
|
999
|
-
label?: string | undefined;
|
|
1000
|
-
description?: string | undefined;
|
|
1001
|
-
})[], 1, "At least one configuration parameter is required">]>, readonly []>;
|
|
1002
|
-
}, undefined>;
|
|
1003
703
|
/** Config type when business config is present. */
|
|
1004
704
|
type AppConfigWithBusinessConfig = CommerceAppConfigOutputModel & {
|
|
1005
705
|
businessConfig: NonNullable<CommerceAppConfigOutputModel["businessConfig"]>;
|
|
@@ -1026,7 +726,7 @@ declare const ProviderSchema: v.ObjectSchema<{
|
|
|
1026
726
|
}, undefined>;
|
|
1027
727
|
/** Schema for Commerce event configuration */
|
|
1028
728
|
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\")">]>;
|
|
729
|
+
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\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
1030
730
|
readonly fields: v.ArraySchema<v.ObjectSchema<{
|
|
1031
731
|
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
732
|
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
@@ -1037,8 +737,8 @@ declare const CommerceEventSchema: v.ObjectSchema<{
|
|
|
1037
737
|
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
738
|
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
1039
739
|
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
|
|
1041
|
-
readonly
|
|
740
|
+
readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
741
|
+
readonly priority: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1042
742
|
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1043
743
|
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
744
|
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">]>;
|
|
@@ -1046,7 +746,7 @@ declare const CommerceEventSchema: v.ObjectSchema<{
|
|
|
1046
746
|
}, undefined>;
|
|
1047
747
|
/** Schema for external event configuration */
|
|
1048
748
|
declare const ExternalEventSchema: v.ObjectSchema<{
|
|
1049
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.
|
|
749
|
+
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 contain only letters, digits, underscores, hyphens, and dots (e.g., \"external_event\", \"webhook.received\", \"my-event_123\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
1050
750
|
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
751
|
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
752
|
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>">;
|
|
@@ -1059,7 +759,7 @@ declare const CommerceEventSourceSchema: v.ObjectSchema<{
|
|
|
1059
759
|
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
760
|
}, undefined>;
|
|
1061
761
|
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\")">]>;
|
|
762
|
+
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\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
1063
763
|
readonly fields: v.ArraySchema<v.ObjectSchema<{
|
|
1064
764
|
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
765
|
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
@@ -1070,8 +770,8 @@ declare const CommerceEventSourceSchema: v.ObjectSchema<{
|
|
|
1070
770
|
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
771
|
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
1072
772
|
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
|
|
1074
|
-
readonly
|
|
773
|
+
readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
774
|
+
readonly priority: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1075
775
|
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1076
776
|
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
777
|
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">]>;
|
|
@@ -1086,7 +786,7 @@ declare const ExternalEventSourceSchema: v.ObjectSchema<{
|
|
|
1086
786
|
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
787
|
}, undefined>;
|
|
1088
788
|
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
1089
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.
|
|
789
|
+
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 contain only letters, digits, underscores, hyphens, and dots (e.g., \"external_event\", \"webhook.received\", \"my-event_123\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
1090
790
|
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
791
|
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
792
|
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>">;
|
|
@@ -1101,7 +801,7 @@ declare const EventingSchema: v.ObjectSchema<{
|
|
|
1101
801
|
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
802
|
}, undefined>;
|
|
1103
803
|
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\")">]>;
|
|
804
|
+
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\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
1105
805
|
readonly fields: v.ArraySchema<v.ObjectSchema<{
|
|
1106
806
|
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
807
|
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
@@ -1112,8 +812,8 @@ declare const EventingSchema: v.ObjectSchema<{
|
|
|
1112
812
|
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
813
|
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
1114
814
|
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
|
|
1116
|
-
readonly
|
|
815
|
+
readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
816
|
+
readonly priority: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1117
817
|
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1118
818
|
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
819
|
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">]>;
|
|
@@ -1127,7 +827,7 @@ declare const EventingSchema: v.ObjectSchema<{
|
|
|
1127
827
|
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
828
|
}, undefined>;
|
|
1129
829
|
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
1130
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.
|
|
830
|
+
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 contain only letters, digits, underscores, hyphens, and dots (e.g., \"external_event\", \"webhook.received\", \"my-event_123\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
1131
831
|
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
832
|
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
833
|
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>">;
|
|
@@ -1205,4 +905,4 @@ type ApplicationMetadata = v.InferInput<typeof MetadataSchema>;
|
|
|
1205
905
|
*/
|
|
1206
906
|
declare function hasMetadata(config: CommerceAppConfigOutputModel): boolean;
|
|
1207
907
|
//#endregion
|
|
1208
|
-
export { type AppConfigWithBusinessConfig, type AppConfigWithBusinessConfigSchema, AppEvent, type ApplicationMetadata, type
|
|
908
|
+
export { type AppConfigWithBusinessConfig, type AppConfigWithBusinessConfigSchema, AppEvent, type ApplicationMetadata, type CommerceAppConfig, type CommerceAppConfigDomain, CommerceAppConfigSchemas, CommerceEvent, CommerceEventSource, CommerceEventSourceSchema, CommerceEventsConfig, EventProvider, EventingConfiguration, EventingSchema, EventsConfig, ExternalEvent, ExternalEventSource, ExternalEventSourceSchema, ExternalEventsConfig, defineConfig, getConfigDomains, hasBusinessConfig, hasBusinessConfigSchema, hasCommerceEvents, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps, hasEventing, hasExternalEvents, hasMetadata, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const require_schemas = require('./schemas-CZ6c8Id9.cjs');
|
|
2
|
+
let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
|
|
3
|
+
|
|
4
|
+
//#region ../../packages-private/scripting-utils/source/error.ts
|
|
5
|
+
/**
|
|
6
|
+
* This module exports shared error utilities for the AIO Commerce SDK.
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Stringify an error to a human-friendly string.
|
|
11
|
+
* @param error - The error to stringify.
|
|
12
|
+
*/
|
|
13
|
+
function stringifyError(error) {
|
|
14
|
+
if (error instanceof _adobe_aio_commerce_lib_core_error.CommerceSdkValidationError) return error.display();
|
|
15
|
+
return error instanceof Error ? error.message : String(error);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
Object.defineProperty(exports, 'stringifyError', {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return stringifyError;
|
|
23
|
+
}
|
|
24
|
+
});
|