@adobe/aio-commerce-lib-app 2.0.0-beta-20260820174436 → 2.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 +31 -5
- package/dist/cjs/actions/app-config/index.cjs +3 -3
- package/dist/cjs/actions/app-config/index.d.cts +3 -4
- package/dist/cjs/actions/association/index.d.cts +2 -3
- package/dist/cjs/actions/config/index.d.cts +2 -3
- package/dist/cjs/actions/installation/index.cjs +14 -7
- package/dist/cjs/actions/installation/index.d.cts +5 -5
- package/dist/cjs/actions/scope-tree/index.d.cts +2 -3
- package/dist/cjs/{app-Cf3EmtUh.d.cts → app-DwSqUkJA.d.cts} +122 -16
- package/dist/cjs/commands/index.cjs +91 -51
- package/dist/cjs/commands/templates/admin-ui/web-src/.babelrc +14 -0
- package/dist/cjs/commands/templates/business-configuration/config.js.template +7 -1
- package/dist/cjs/{common-B70f39vI.cjs → common-VSsQEHDv.cjs} +15 -2
- package/dist/cjs/config/index.browser.d.cts +1 -1
- package/dist/cjs/config/index.node.cjs +4 -3
- package/dist/cjs/config/index.node.d.cts +104 -50
- package/dist/{es/define-DSU8Kgu0.d.mts → cjs/define-Cc3AaVmY.d.cts} +1 -1
- package/dist/{es/index-COLnI6Ok.d.mts → cjs/index-C7dqTDHu.d.cts} +25 -3
- package/dist/cjs/index.d.cts +10 -10
- package/dist/cjs/{index.node-CXeIG8SS.cjs → index.node-vcOo1rt0.cjs} +1 -1
- package/dist/cjs/installation-D72LoQ_1.d.cts +39 -0
- package/dist/cjs/management/index.cjs +1 -1
- package/dist/cjs/management/index.d.cts +1 -1
- package/dist/cjs/{management-BhMdRr8i.cjs → management-Bki3hlxL.cjs} +207 -27
- package/dist/cjs/{openapi-DVJUTOXY.cjs → openapi-CAXgKam0.cjs} +317 -390
- package/dist/cjs/{validate-Dff0nrqM.cjs → validate-CwWYtRsS.cjs} +33 -2
- package/dist/cjs/{webhooks-E1KDx3Yu.cjs → webhooks-Bcq2Qy7q.cjs} +69 -8
- package/dist/es/actions/app-config/index.d.mts +3 -4
- package/dist/es/actions/app-config/index.mjs +3 -3
- package/dist/es/actions/association/index.d.mts +2 -3
- package/dist/es/actions/config/index.d.mts +2 -3
- package/dist/es/actions/installation/index.d.mts +5 -5
- package/dist/es/actions/installation/index.mjs +14 -7
- package/dist/es/actions/scope-tree/index.d.mts +2 -3
- package/dist/es/{app-Cf3EmtUh.d.mts → app-DwSqUkJA.d.mts} +122 -16
- package/dist/es/commands/index.mjs +92 -52
- package/dist/es/commands/templates/admin-ui/web-src/.babelrc +14 -0
- package/dist/es/commands/templates/business-configuration/config.js.template +7 -1
- package/dist/es/{common-BVG9tiX0.mjs → common-dy6NrZt8.mjs} +10 -3
- package/dist/es/config/index.browser.d.mts +1 -1
- package/dist/es/config/index.node.d.mts +104 -50
- package/dist/es/config/index.node.mjs +4 -4
- package/dist/{cjs/define-B-_oKmCe.d.cts → es/define-Bq1zw9Lr.d.mts} +1 -1
- package/dist/{cjs/index-CkwCGvut.d.cts → es/index-BryddQId.d.mts} +25 -3
- package/dist/es/index.d.mts +10 -10
- package/dist/es/{index.node-DRTF5Hue.mjs → index.node-CW46zuxW.mjs} +1 -1
- package/dist/es/installation-DqVDJ1ur.d.mts +39 -0
- package/dist/es/management/index.d.mts +1 -1
- package/dist/es/management/index.mjs +1 -1
- package/dist/es/{management-BTWQdJNO.mjs → management-DgwAhaaJ.mjs} +207 -27
- package/dist/es/{openapi-D18LT0Wp.mjs → openapi-BnR9OUac.mjs} +317 -390
- package/dist/es/{validate-8AXMGEwr.mjs → validate-NzW1FQwL.mjs} +29 -4
- package/dist/es/{webhooks-BQ8kSN2Z.mjs → webhooks-CHZ1SXxw.mjs} +64 -9
- package/package.json +19 -19
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { a as CommerceAppConfigSchemas, i as CommerceAppConfigDomain, n as CommerceAppConfig, o as getConfigDomains, r as CommerceAppConfigOutputModel, s as hasConfigDomain, t as AnyCommerceAppConfig } from "../app-
|
|
16
|
-
import { t as
|
|
15
|
+
import { a as CommerceAppConfigSchemas, i as CommerceAppConfigDomain, n as CommerceAppConfig, o as getConfigDomains, r as CommerceAppConfigOutputModel, s as hasConfigDomain, t as AnyCommerceAppConfig } from "../app-DwSqUkJA.mjs";
|
|
16
|
+
import { n as hasCustomInstallationSteps, t as hasCustomInstallation } from "../installation-DqVDJ1ur.mjs";
|
|
17
|
+
import { t as defineConfig } from "../define-Bq1zw9Lr.mjs";
|
|
17
18
|
import "@adobe/aio-commerce-lib-config";
|
|
18
19
|
import * as v from "valibot";
|
|
19
20
|
import { Get } from "type-fest";
|
|
@@ -22,7 +23,7 @@ import { Get } from "type-fest";
|
|
|
22
23
|
* Check whether a commerce app config path uses a supported TypeScript format.
|
|
23
24
|
* @param configFilePath The path to the config file.
|
|
24
25
|
*/
|
|
25
|
-
declare function isTypeScriptConfig(configFilePath: string): boolean;
|
|
26
|
+
export declare function isTypeScriptConfig(configFilePath: string): boolean;
|
|
26
27
|
/**
|
|
27
28
|
* Try to find (up to the nearest package.json file) the app config file.
|
|
28
29
|
*
|
|
@@ -37,7 +38,7 @@ declare function isTypeScriptConfig(configFilePath: string): boolean;
|
|
|
37
38
|
* @param cwd The current working directory
|
|
38
39
|
* @returns The path to the config file, or null if not found
|
|
39
40
|
*/
|
|
40
|
-
declare function resolveCommerceAppConfig(cwd?: string): Promise<string | null>;
|
|
41
|
+
export declare function resolveCommerceAppConfig(cwd?: string): Promise<string | null>;
|
|
41
42
|
/**
|
|
42
43
|
* Read the commerce app config file as-is, without validating it.
|
|
43
44
|
*
|
|
@@ -48,7 +49,7 @@ declare function resolveCommerceAppConfig(cwd?: string): Promise<string | null>;
|
|
|
48
49
|
* @returns The raw config object from the file
|
|
49
50
|
* @throws {Error} If no config file is found or if the file doesn't export a default export
|
|
50
51
|
*/
|
|
51
|
-
declare function readCommerceAppConfig(cwd?: string): Promise<unknown>;
|
|
52
|
+
export declare function readCommerceAppConfig(cwd?: string): Promise<unknown>;
|
|
52
53
|
/**
|
|
53
54
|
* Read the commerce app config file and parse its contents into its schema.
|
|
54
55
|
*
|
|
@@ -59,8 +60,16 @@ declare function readCommerceAppConfig(cwd?: string): Promise<unknown>;
|
|
|
59
60
|
* @returns The validated and parsed config object
|
|
60
61
|
* @throws {Error} If no config file is found, if the file doesn't export a default export, or if validation fails
|
|
61
62
|
*/
|
|
62
|
-
declare function parseCommerceAppConfig(cwd?: string): Promise<{
|
|
63
|
+
export declare function parseCommerceAppConfig(cwd?: string): Promise<{
|
|
63
64
|
adminUi?: {
|
|
65
|
+
acl?: {
|
|
66
|
+
children?: {
|
|
67
|
+
id: string;
|
|
68
|
+
label: string;
|
|
69
|
+
}[] | undefined;
|
|
70
|
+
id: string;
|
|
71
|
+
label: string;
|
|
72
|
+
}[] | undefined;
|
|
64
73
|
customer?: {
|
|
65
74
|
gridColumns?: {
|
|
66
75
|
columns: {
|
|
@@ -528,7 +537,7 @@ declare function parseCommerceAppConfig(cwd?: string): Promise<{
|
|
|
528
537
|
* }
|
|
529
538
|
* ```
|
|
530
539
|
*/
|
|
531
|
-
declare function validateCommerceAppConfig(config: unknown): CommerceAppConfigOutputModel;
|
|
540
|
+
export declare function validateCommerceAppConfig(config: unknown): CommerceAppConfigOutputModel;
|
|
532
541
|
/**
|
|
533
542
|
* Validates a specific domain configuration within the commerce app config.
|
|
534
543
|
*
|
|
@@ -571,7 +580,7 @@ declare function validateCommerceAppConfig(config: unknown): CommerceAppConfigOu
|
|
|
571
580
|
* }
|
|
572
581
|
* ```
|
|
573
582
|
*/
|
|
574
|
-
declare function validateCommerceAppConfigDomain<T extends CommerceAppConfigDomain>(config: unknown, domain: T): NonNullable<Get<CommerceAppConfigOutputModel, T>>;
|
|
583
|
+
export declare function validateCommerceAppConfigDomain<T extends CommerceAppConfigDomain>(config: unknown, domain: T): NonNullable<Get<CommerceAppConfigOutputModel, T>>;
|
|
575
584
|
//#endregion
|
|
576
585
|
//#region source/config/schema/admin-ui.d.ts
|
|
577
586
|
declare const NotificationsSchema: v.ObjectSchema<{
|
|
@@ -598,7 +607,13 @@ declare const GridColumnsSchema: v.ObjectSchema<{
|
|
|
598
607
|
id: string;
|
|
599
608
|
label: string;
|
|
600
609
|
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
601
|
-
}[], 1, "At least one grid column is required"
|
|
610
|
+
}[], 1, "At least one grid column is required">, v.CheckAction<{
|
|
611
|
+
aclProtected?: boolean | undefined;
|
|
612
|
+
align: "left" | "right" | "center";
|
|
613
|
+
id: string;
|
|
614
|
+
label: string;
|
|
615
|
+
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
616
|
+
}[], "Grid column ids must be unique after Commerce id sanitization.">]>;
|
|
602
617
|
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
603
618
|
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
604
619
|
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
@@ -737,9 +752,44 @@ declare const MenuSchema: v.ObjectSchema<{
|
|
|
737
752
|
}, undefined>;
|
|
738
753
|
/**
|
|
739
754
|
* Schema for the `adminUi` config section.
|
|
740
|
-
* Supports grid column extensions, mass actions, order view buttons, and
|
|
755
|
+
* Supports grid column extensions, mass actions, order view buttons, menu, and custom ACL resources on `commerce/backend-ui/2`.
|
|
741
756
|
*/
|
|
742
757
|
declare const AdminUiSchema: v.ObjectSchema<{
|
|
758
|
+
readonly acl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
759
|
+
readonly children: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
760
|
+
readonly id: 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, "ACL resource ID may contain only lowercase letters, digits, and \"_\"">]>;
|
|
761
|
+
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.MinLengthAction<string, 3, "acl resource label must be at least 3 characters">, v.MaxLengthAction<string, 50, "acl resource label must be at most 50 characters">]>;
|
|
762
|
+
}, undefined>, undefined>, v.MinLengthAction<{
|
|
763
|
+
id: string;
|
|
764
|
+
label: string;
|
|
765
|
+
}[], 1, "An ACL resource group must contain at least one child">, v.CheckAction<{
|
|
766
|
+
id: string;
|
|
767
|
+
label: string;
|
|
768
|
+
}[], "Child ACL resource ids must be unique within a group.">]>, undefined>;
|
|
769
|
+
readonly id: 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, "ACL resource ID may contain only lowercase letters, digits, and \"_\"">]>;
|
|
770
|
+
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.MinLengthAction<string, 3, "acl resource label must be at least 3 characters">, v.MaxLengthAction<string, 50, "acl resource label must be at most 50 characters">]>;
|
|
771
|
+
}, undefined>, undefined>, v.MinLengthAction<{
|
|
772
|
+
children?: {
|
|
773
|
+
id: string;
|
|
774
|
+
label: string;
|
|
775
|
+
}[] | undefined;
|
|
776
|
+
id: string;
|
|
777
|
+
label: string;
|
|
778
|
+
}[], 1, "At least one ACL resource is required when acl is defined">, v.CheckAction<{
|
|
779
|
+
children?: {
|
|
780
|
+
id: string;
|
|
781
|
+
label: string;
|
|
782
|
+
}[] | undefined;
|
|
783
|
+
id: string;
|
|
784
|
+
label: string;
|
|
785
|
+
}[], "Top-level ACL resource ids must be unique.">, v.CheckAction<{
|
|
786
|
+
children?: {
|
|
787
|
+
id: string;
|
|
788
|
+
label: string;
|
|
789
|
+
}[] | undefined;
|
|
790
|
+
id: string;
|
|
791
|
+
label: string;
|
|
792
|
+
}[], "Custom ACL resource ids must stay unique after Commerce derivation: a top-level resource id must not equal a group's \"<group>_<child>\" combination.">]>, undefined>;
|
|
743
793
|
readonly customer: v.OptionalSchema<v.ObjectSchema<{
|
|
744
794
|
readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
|
|
745
795
|
readonly columns: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
@@ -754,7 +804,13 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
754
804
|
id: string;
|
|
755
805
|
label: string;
|
|
756
806
|
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
757
|
-
}[], 1, "At least one grid column is required"
|
|
807
|
+
}[], 1, "At least one grid column is required">, v.CheckAction<{
|
|
808
|
+
aclProtected?: boolean | undefined;
|
|
809
|
+
align: "left" | "right" | "center";
|
|
810
|
+
id: string;
|
|
811
|
+
label: string;
|
|
812
|
+
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
813
|
+
}[], "Grid column ids must be unique after Commerce id sanitization.">]>;
|
|
758
814
|
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
759
815
|
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
760
816
|
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
@@ -831,7 +887,7 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
831
887
|
} | undefined;
|
|
832
888
|
selectionLimit?: number | undefined;
|
|
833
889
|
title?: string | undefined;
|
|
834
|
-
})[], "Mass action ids must be unique.">]>, undefined>;
|
|
890
|
+
})[], "Mass action ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
835
891
|
}, undefined>, undefined>;
|
|
836
892
|
readonly menu: v.OptionalSchema<v.ObjectSchema<{
|
|
837
893
|
/**
|
|
@@ -861,7 +917,13 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
861
917
|
id: string;
|
|
862
918
|
label: string;
|
|
863
919
|
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
864
|
-
}[], 1, "At least one grid column is required"
|
|
920
|
+
}[], 1, "At least one grid column is required">, v.CheckAction<{
|
|
921
|
+
aclProtected?: boolean | undefined;
|
|
922
|
+
align: "left" | "right" | "center";
|
|
923
|
+
id: string;
|
|
924
|
+
label: string;
|
|
925
|
+
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
926
|
+
}[], "Grid column ids must be unique after Commerce id sanitization.">]>;
|
|
865
927
|
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
866
928
|
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
867
929
|
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
@@ -938,7 +1000,7 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
938
1000
|
} | undefined;
|
|
939
1001
|
selectionLimit?: number | undefined;
|
|
940
1002
|
title?: string | undefined;
|
|
941
|
-
})[], "Mass action ids must be unique.">]>, undefined>;
|
|
1003
|
+
})[], "Mass action ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
942
1004
|
readonly viewButtons: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
943
1005
|
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
944
1006
|
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -1011,7 +1073,7 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
1011
1073
|
sortOrder?: number | undefined;
|
|
1012
1074
|
timeout?: number | undefined;
|
|
1013
1075
|
type: "worker";
|
|
1014
|
-
})[], "Order view button ids must be unique.">]>, undefined>;
|
|
1076
|
+
})[], "Order view button ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
1015
1077
|
}, undefined>, undefined>;
|
|
1016
1078
|
readonly product: v.OptionalSchema<v.ObjectSchema<{
|
|
1017
1079
|
readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -1027,7 +1089,13 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
1027
1089
|
id: string;
|
|
1028
1090
|
label: string;
|
|
1029
1091
|
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
1030
|
-
}[], 1, "At least one grid column is required"
|
|
1092
|
+
}[], 1, "At least one grid column is required">, v.CheckAction<{
|
|
1093
|
+
aclProtected?: boolean | undefined;
|
|
1094
|
+
align: "left" | "right" | "center";
|
|
1095
|
+
id: string;
|
|
1096
|
+
label: string;
|
|
1097
|
+
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
1098
|
+
}[], "Grid column ids must be unique after Commerce id sanitization.">]>;
|
|
1031
1099
|
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1032
1100
|
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1033
1101
|
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
@@ -1104,7 +1172,7 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
1104
1172
|
} | undefined;
|
|
1105
1173
|
selectionLimit?: number | undefined;
|
|
1106
1174
|
title?: string | undefined;
|
|
1107
|
-
})[], "Mass action ids must be unique.">]>, undefined>;
|
|
1175
|
+
})[], "Mass action ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
1108
1176
|
}, undefined>, undefined>;
|
|
1109
1177
|
}, undefined>;
|
|
1110
1178
|
/**
|
|
@@ -1149,12 +1217,20 @@ type Menu = v.InferInput<typeof MenuSchema>;
|
|
|
1149
1217
|
type AdminUiConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = T & {
|
|
1150
1218
|
adminUi: NonNullable<T["adminUi"]>;
|
|
1151
1219
|
};
|
|
1220
|
+
/**
|
|
1221
|
+
* Check whether the config declares an Admin UI component that requires the
|
|
1222
|
+
* `commerce/backend-ui/2` extension point — a menu, grid columns, mass actions,
|
|
1223
|
+
* or view buttons. Custom ACL resources are deliberately excluded: they reach
|
|
1224
|
+
* Commerce through the `extensibility/1` app-config payload, not backend-ui/2,
|
|
1225
|
+
* so an acl-only config needs no backend-ui/2 registration.
|
|
1226
|
+
*/
|
|
1227
|
+
export declare function hasBackendUiV2Components<T extends AnyCommerceAppConfig>(config: T): config is AdminUiConfig<T>;
|
|
1152
1228
|
/**
|
|
1153
1229
|
* Check whether the config declares at least one Admin UI component (menu, grid
|
|
1154
|
-
* columns, mass actions, or
|
|
1230
|
+
* columns, mass actions, view buttons, or custom ACL resources). A component-less `adminUi` block is
|
|
1155
1231
|
* treated as absent — it registers nothing.
|
|
1156
1232
|
*/
|
|
1157
|
-
declare function hasAdminUi<T extends AnyCommerceAppConfig>(config: T): config is AdminUiConfig<T>;
|
|
1233
|
+
export declare function hasAdminUi<T extends AnyCommerceAppConfig>(config: T): config is AdminUiConfig<T>;
|
|
1158
1234
|
//#endregion
|
|
1159
1235
|
//#region source/config/schema/business-configuration.d.ts
|
|
1160
1236
|
/** Config type when business config is present. */
|
|
@@ -1171,12 +1247,12 @@ type AppConfigWithBusinessConfigSchema<T extends AnyCommerceAppConfig> = T & {
|
|
|
1171
1247
|
* Check if config has business config.
|
|
1172
1248
|
* @param config - The configuration to check.
|
|
1173
1249
|
*/
|
|
1174
|
-
declare function hasBusinessConfig<T extends AnyCommerceAppConfig>(config: T): config is T & AppConfigWithBusinessConfig<T>;
|
|
1250
|
+
export declare function hasBusinessConfig<T extends AnyCommerceAppConfig>(config: T): config is T & AppConfigWithBusinessConfig<T>;
|
|
1175
1251
|
/**
|
|
1176
1252
|
* Check if config has business config schema.
|
|
1177
1253
|
* @param config - The configuration to check.
|
|
1178
1254
|
*/
|
|
1179
|
-
declare function hasBusinessConfigSchema<T extends AnyCommerceAppConfig>(config: T): config is T & AppConfigWithBusinessConfigSchema<T>;
|
|
1255
|
+
export declare function hasBusinessConfigSchema<T extends AnyCommerceAppConfig>(config: T): config is T & AppConfigWithBusinessConfigSchema<T>;
|
|
1180
1256
|
//#endregion
|
|
1181
1257
|
//#region source/config/schema/eventing.d.ts
|
|
1182
1258
|
/** Schema for event provider configuration */
|
|
@@ -1491,39 +1567,17 @@ type ExternalEventsConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutp
|
|
|
1491
1567
|
* Check if config has commerce event sources.
|
|
1492
1568
|
* @param config - The configuration to check.
|
|
1493
1569
|
*/
|
|
1494
|
-
declare function hasCommerceEvents<T extends AnyCommerceAppConfig>(config: T): config is T & CommerceEventsConfig<T>;
|
|
1570
|
+
export declare function hasCommerceEvents<T extends AnyCommerceAppConfig>(config: T): config is T & CommerceEventsConfig<T>;
|
|
1495
1571
|
/**
|
|
1496
1572
|
* Check if config has external event sources.
|
|
1497
1573
|
* @param config - The configuration to check.
|
|
1498
1574
|
*/
|
|
1499
|
-
declare function hasExternalEvents<T extends AnyCommerceAppConfig>(config: T): config is T & ExternalEventsConfig<T>;
|
|
1575
|
+
export declare function hasExternalEvents<T extends AnyCommerceAppConfig>(config: T): config is T & ExternalEventsConfig<T>;
|
|
1500
1576
|
/**
|
|
1501
1577
|
* Check if config has any eventing configuration.
|
|
1502
1578
|
* @param config - The configuration to check.
|
|
1503
1579
|
*/
|
|
1504
|
-
declare function hasEventing<T extends AnyCommerceAppConfig>(config: T): config is T & EventsConfig<T>;
|
|
1505
|
-
//#endregion
|
|
1506
|
-
//#region source/config/schema/installation.d.ts
|
|
1507
|
-
/** Config type when installation settings are present. */
|
|
1508
|
-
type InstallationConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = T & {
|
|
1509
|
-
installation: NonNullable<T["installation"]>;
|
|
1510
|
-
};
|
|
1511
|
-
/** Config type when custom installation steps are present. */
|
|
1512
|
-
type ConfigWithInstallationSteps<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = InstallationConfig<T> & {
|
|
1513
|
-
installation: InstallationConfig<T>["installation"] & {
|
|
1514
|
-
customInstallationSteps: NonNullable<InstallationConfig<T>["installation"]["customInstallationSteps"]>;
|
|
1515
|
-
};
|
|
1516
|
-
};
|
|
1517
|
-
/**
|
|
1518
|
-
* Check if config has custom installation settings.
|
|
1519
|
-
* @param config - The configuration to check.
|
|
1520
|
-
*/
|
|
1521
|
-
declare function hasCustomInstallation<T extends AnyCommerceAppConfig>(config: T): config is T & InstallationConfig<T>;
|
|
1522
|
-
/**
|
|
1523
|
-
* Check if config has custom installation steps.
|
|
1524
|
-
* @param config - The configuration to check.
|
|
1525
|
-
*/
|
|
1526
|
-
declare function hasCustomInstallationSteps<T extends AnyCommerceAppConfig>(config: T): config is T & ConfigWithInstallationSteps<T>;
|
|
1580
|
+
export declare function hasEventing<T extends AnyCommerceAppConfig>(config: T): config is T & EventsConfig<T>;
|
|
1527
1581
|
//#endregion
|
|
1528
1582
|
//#region source/config/schema/metadata.d.ts
|
|
1529
1583
|
/** The schema for the metadata of the application. */
|
|
@@ -1531,7 +1585,7 @@ declare const MetadataSchema: v.ObjectSchema<{
|
|
|
1531
1585
|
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">]>;
|
|
1532
1586
|
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">]>;
|
|
1533
1587
|
readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and hyphens are allowed in string value of "${string}"${string}`>]>, v.MaxLengthAction<string, 100, "The application id must not be longer than 100 characters">]>;
|
|
1534
|
-
readonly upgradeMode: v.OptionalSchema<v.PicklistSchema<["auto", "manual"], undefined>, "
|
|
1588
|
+
readonly upgradeMode: v.OptionalSchema<v.PicklistSchema<["auto", "manual"], undefined>, "manual">;
|
|
1535
1589
|
readonly version: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string for the ${string}`>, v.NonEmptyAction<string, `The ${string} must not be empty`>]>, v.RegexAction<string, "The version must follow semantic versioning (semver) format: Major.Minor.Patch (e.g., '1.0.0', '2.3.1')">]>;
|
|
1536
1590
|
}, undefined>;
|
|
1537
1591
|
/** The metadata associated to an Adobe Commerce application. */
|
|
@@ -1544,7 +1598,7 @@ type AppConfigWithMetadata<T extends AnyCommerceAppConfig> = T & {
|
|
|
1544
1598
|
* Check if config has metadata.
|
|
1545
1599
|
* @param config - The configuration to check.
|
|
1546
1600
|
*/
|
|
1547
|
-
declare function hasMetadata<T extends AnyCommerceAppConfig>(config: T): config is T & AppConfigWithMetadata<T>;
|
|
1601
|
+
export declare function hasMetadata<T extends AnyCommerceAppConfig>(config: T): config is T & AppConfigWithMetadata<T>;
|
|
1548
1602
|
//#endregion
|
|
1549
1603
|
//#region source/config/schema/webhooks.d.ts
|
|
1550
1604
|
/** Schema for webhook field configuration (name and optional source). */
|
|
@@ -1845,6 +1899,6 @@ type WebhooksConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputMode
|
|
|
1845
1899
|
* Check if config has webhooks (non-empty array).
|
|
1846
1900
|
* @param config - The configuration to check.
|
|
1847
1901
|
*/
|
|
1848
|
-
declare function hasWebhooks<T extends AnyCommerceAppConfig>(config: T): config is T & WebhooksConfig<T>;
|
|
1902
|
+
export declare function hasWebhooks<T extends AnyCommerceAppConfig>(config: T): config is T & WebhooksConfig<T>;
|
|
1849
1903
|
//#endregion
|
|
1850
|
-
export { type AdminUiConfig, type AdminUiConfiguration, type AppConfigWithBusinessConfig, type AppConfigWithBusinessConfigSchema, type AppEvent, type ApplicationMetadata, type CommerceAppConfig, type CommerceAppConfigDomain, CommerceAppConfigSchemas, type CommerceEvent, type CommerceEventSource, type CommerceEventSourceSchema, type CommerceEventsConfig, type EventProvider, type EventingConfiguration, type EventingSchema, type EventsConfig, type ExternalEvent, type ExternalEventSource, type ExternalEventSourceSchema, type ExternalEventsConfig, type GridColumn, type GridColumns, type MassAction, type Menu, type Notifications, type OrderViewButton, type ViewMassAction, type WebhookDefinition, type WebhookEntry, type WebhookField, type WebhookHeader, type WebhookRule, type WebhooksConfig, type WebhooksConfiguration, type WebhooksSchema, type WorkerMassAction, defineConfig, getConfigDomains,
|
|
1904
|
+
export { type AdminUiConfig, type AdminUiConfiguration, type AppConfigWithBusinessConfig, type AppConfigWithBusinessConfigSchema, type AppEvent, type ApplicationMetadata, type CommerceAppConfig, type CommerceAppConfigDomain, CommerceAppConfigSchemas, type CommerceEvent, type CommerceEventSource, type CommerceEventSourceSchema, type CommerceEventsConfig, type EventProvider, type EventingConfiguration, type EventingSchema, type EventsConfig, type ExternalEvent, type ExternalEventSource, type ExternalEventSourceSchema, type ExternalEventsConfig, type GridColumn, type GridColumns, type MassAction, type Menu, type Notifications, type OrderViewButton, type ViewMassAction, type WebhookDefinition, type WebhookEntry, type WebhookField, type WebhookHeader, type WebhookRule, type WebhooksConfig, type WebhooksConfiguration, type WebhooksSchema, type WorkerMassAction, defineConfig, getConfigDomains, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps };
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { a as resolveCommerceAppConfig, i as readCommerceAppConfig, n as isTypeScriptConfig, r as parseCommerceAppConfig } from "../index.node-
|
|
15
|
+
import { a as resolveCommerceAppConfig, i as readCommerceAppConfig, n as isTypeScriptConfig, r as parseCommerceAppConfig } from "../index.node-CW46zuxW.mjs";
|
|
16
16
|
import { t as defineConfig } from "../define-Z_Glf1-_.mjs";
|
|
17
|
-
import { a as hasCustomInstallationSteps, c as hasEventing, d as hasAdminUi, i as hasCustomInstallation, l as hasExternalEvents, n as hasWebhooks, s as hasCommerceEvents } from "../webhooks-
|
|
18
|
-
import { a as
|
|
17
|
+
import { a as hasCustomInstallationSteps, c as hasEventing, d as hasAdminUi, f as hasBackendUiV2Components, i as hasCustomInstallation, l as hasExternalEvents, n as hasWebhooks, s as hasCommerceEvents } from "../webhooks-CHZ1SXxw.mjs";
|
|
18
|
+
import { a as CommerceAppConfigSchemas, c as hasMetadata, l as hasBusinessConfig, n as validateCommerceAppConfigDomain, o as getConfigDomains, s as hasConfigDomain, t as validateCommerceAppConfig, u as hasBusinessConfigSchema } from "../validate-NzW1FQwL.mjs";
|
|
19
19
|
|
|
20
|
-
export { CommerceAppConfigSchemas, defineConfig, getConfigDomains, hasAdminUi, hasBusinessConfig, hasBusinessConfigSchema, hasCommerceEvents, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps, hasEventing, hasExternalEvents, hasMetadata, hasWebhooks, isTypeScriptConfig, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };
|
|
20
|
+
export { CommerceAppConfigSchemas, defineConfig, getConfigDomains, hasAdminUi, hasBackendUiV2Components, hasBusinessConfig, hasBusinessConfigSchema, hasCommerceEvents, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps, hasEventing, hasExternalEvents, hasMetadata, hasWebhooks, isTypeScriptConfig, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { n as CommerceAppConfig } from "./app-
|
|
15
|
+
import { n as CommerceAppConfig } from "./app-DwSqUkJA.mjs";
|
|
16
16
|
//#region source/config/lib/define.d.ts
|
|
17
17
|
/**
|
|
18
18
|
* Helper to type-safely define the app config.
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { r as CommerceAppConfigOutputModel } from "./app-
|
|
16
|
-
import
|
|
17
|
-
import AioLogger from "@adobe/aio-lib-core-logging";
|
|
15
|
+
import { r as CommerceAppConfigOutputModel } from "./app-DwSqUkJA.mjs";
|
|
16
|
+
import "./installation-DqVDJ1ur.mjs";
|
|
18
17
|
import * as v from "valibot";
|
|
18
|
+
import AioLogger from "@adobe/aio-lib-core-logging";
|
|
19
|
+
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
19
20
|
//#region source/management/common/schema.d.ts
|
|
20
21
|
/** Schema for validating the Adobe I/O app credentials used across lifecycle workflows. */
|
|
21
22
|
declare const AppDataSchema: v.ObjectSchema<{
|
|
@@ -625,6 +626,19 @@ type ValidateStepTreeOptions = {
|
|
|
625
626
|
*/
|
|
626
627
|
declare function validateStepTree(options: ValidateStepTreeOptions): Promise<ValidationResult>;
|
|
627
628
|
//#endregion
|
|
629
|
+
//#region source/management/domains/custom-installation/types.d.ts
|
|
630
|
+
/**
|
|
631
|
+
* Identity of a custom installation step that has run at least once, as persisted across
|
|
632
|
+
* upgrades. `name` is the step's stable identity; `script` records the path that ran, so a step
|
|
633
|
+
* removed from the config can still be resolved and uninstalled later.
|
|
634
|
+
*/
|
|
635
|
+
type CustomInstallationStepIdentity = {
|
|
636
|
+
/** Matches `installation.customInstallationSteps[].name`. */
|
|
637
|
+
name: string;
|
|
638
|
+
/** The script path this step pointed to when it last (successfully) ran. */
|
|
639
|
+
script: string;
|
|
640
|
+
};
|
|
641
|
+
//#endregion
|
|
628
642
|
//#region source/management/domains/custom-installation/define.d.ts
|
|
629
643
|
/**
|
|
630
644
|
* Handler function type for custom installation steps.
|
|
@@ -723,6 +737,12 @@ declare function runInstallation(options: RunInstallationOptions): Promise<Succe
|
|
|
723
737
|
type CreateInitialUninstallationStateOptions = {
|
|
724
738
|
/** The app configuration used to determine applicable steps. */
|
|
725
739
|
config: CommerceAppConfigOutputModel;
|
|
740
|
+
/**
|
|
741
|
+
* Persisted history of every custom installation step that ever ran, from the lifecycle
|
|
742
|
+
* baseline snapshot. Lets a full unassociate reach steps removed from `config` in a previous
|
|
743
|
+
* upgrade. Defaults to `[]` when there is no recorded history (e.g. legacy installs).
|
|
744
|
+
*/
|
|
745
|
+
executedCustomInstallationSteps?: readonly CustomInstallationStepIdentity[];
|
|
726
746
|
};
|
|
727
747
|
/** Options for running an uninstallation. */
|
|
728
748
|
type RunUninstallationOptions = {
|
|
@@ -734,6 +754,8 @@ type RunUninstallationOptions = {
|
|
|
734
754
|
initialState: InProgressWorkflowState;
|
|
735
755
|
/** Lifecycle hooks for status change notifications. */
|
|
736
756
|
hooks?: InstallationHooks;
|
|
757
|
+
/** Same as {@link CreateInitialUninstallationStateOptions.executedCustomInstallationSteps}. */
|
|
758
|
+
executedCustomInstallationSteps?: readonly CustomInstallationStepIdentity[];
|
|
737
759
|
};
|
|
738
760
|
/**
|
|
739
761
|
* Creates an initial uninstallation state from the config and step definitions.
|
package/dist/es/index.d.mts
CHANGED
|
@@ -46,7 +46,7 @@ type AssociatedCommerceData = {
|
|
|
46
46
|
* }
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
49
|
-
declare function getCommerceInstance(): Promise<AssociatedCommerceData>;
|
|
49
|
+
export declare function getCommerceInstance(): Promise<AssociatedCommerceData>;
|
|
50
50
|
/**
|
|
51
51
|
* Returns an initialised `AdobeCommerceHttpClient` for the Commerce instance
|
|
52
52
|
* this app is currently associated with.
|
|
@@ -72,7 +72,7 @@ declare function getCommerceInstance(): Promise<AssociatedCommerceData>;
|
|
|
72
72
|
* }
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
|
-
declare function getCommerceClient(auth: ImsAuthParams | ImsAuthProvider, fetchOptions?: CommerceHttpClientParams["fetchOptions"]): Promise<AdobeCommerceHttpClient>;
|
|
75
|
+
export declare function getCommerceClient(auth: ImsAuthParams | ImsAuthProvider, fetchOptions?: CommerceHttpClientParams["fetchOptions"]): Promise<AdobeCommerceHttpClient>;
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region source/lib/errors.d.ts
|
|
78
78
|
/**
|
|
@@ -99,14 +99,14 @@ declare function getCommerceClient(auth: ImsAuthParams | ImsAuthProvider, fetchO
|
|
|
99
99
|
* }
|
|
100
100
|
* ```
|
|
101
101
|
*/
|
|
102
|
-
declare class AssociationRecordNotFoundError extends CommerceSdkErrorBase {
|
|
102
|
+
export declare class AssociationRecordNotFoundError extends CommerceSdkErrorBase {
|
|
103
103
|
constructor(message?: string, options?: CommerceSdkErrorBaseOptions);
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Base error thrown by {@link publishEvent} when event resolution or publishing fails.
|
|
107
107
|
* Catch this to handle all publish-event failures in a single clause.
|
|
108
108
|
*/
|
|
109
|
-
declare class PublishEventError extends CommerceSdkErrorBase {}
|
|
109
|
+
export declare class PublishEventError extends CommerceSdkErrorBase {}
|
|
110
110
|
/**
|
|
111
111
|
* Thrown when {@link publishEvent} cannot find the eventing installation data in system storage.
|
|
112
112
|
*
|
|
@@ -124,7 +124,7 @@ declare class PublishEventError extends CommerceSdkErrorBase {}
|
|
|
124
124
|
* }
|
|
125
125
|
* ```
|
|
126
126
|
*/
|
|
127
|
-
declare class EventsDataNotInitializedError extends PublishEventError {
|
|
127
|
+
export declare class EventsDataNotInitializedError extends PublishEventError {
|
|
128
128
|
constructor(options?: CommerceSdkErrorBaseOptions);
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
@@ -142,7 +142,7 @@ declare class EventsDataNotInitializedError extends PublishEventError {
|
|
|
142
142
|
* }
|
|
143
143
|
* ```
|
|
144
144
|
*/
|
|
145
|
-
declare class ProviderNotFoundError extends PublishEventError {
|
|
145
|
+
export declare class ProviderNotFoundError extends PublishEventError {
|
|
146
146
|
constructor(providerKey: string, options?: CommerceSdkErrorBaseOptions);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
@@ -160,7 +160,7 @@ declare class ProviderNotFoundError extends PublishEventError {
|
|
|
160
160
|
* }
|
|
161
161
|
* ```
|
|
162
162
|
*/
|
|
163
|
-
declare class EventNotFoundError extends PublishEventError {
|
|
163
|
+
export declare class EventNotFoundError extends PublishEventError {
|
|
164
164
|
constructor(eventName: string, providerKey: string, options?: CommerceSdkErrorBaseOptions);
|
|
165
165
|
}
|
|
166
166
|
//#endregion
|
|
@@ -202,7 +202,7 @@ declare class EventNotFoundError extends PublishEventError {
|
|
|
202
202
|
* }
|
|
203
203
|
* ```
|
|
204
204
|
*/
|
|
205
|
-
declare function publishEvent<TPayload extends Record<string, unknown> = Record<string, unknown>>(params: {
|
|
205
|
+
export declare function publishEvent<TPayload extends Record<string, unknown> = Record<string, unknown>>(params: {
|
|
206
206
|
client: AdobeIoEventsApiClient;
|
|
207
207
|
provider: string;
|
|
208
208
|
event: string;
|
|
@@ -226,6 +226,6 @@ declare function publishEvent<TPayload extends Record<string, unknown> = Record<
|
|
|
226
226
|
* // => "my_app.webhook.received"
|
|
227
227
|
* ```
|
|
228
228
|
*/
|
|
229
|
-
declare function resolveIoEventCode(appId: string, eventName: string, providerType: "commerce" | "external"): string;
|
|
229
|
+
export declare function resolveIoEventCode(appId: string, eventName: string, providerType: "commerce" | "external"): string;
|
|
230
230
|
//#endregion
|
|
231
|
-
export {
|
|
231
|
+
export type { AssociatedCommerceData };
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { t as stringifyError } from "./error-_RMwtrUA.mjs";
|
|
16
|
-
import { t as validateCommerceAppConfig } from "./validate-
|
|
16
|
+
import { t as validateCommerceAppConfig } from "./validate-NzW1FQwL.mjs";
|
|
17
17
|
import { existsSync } from "fs";
|
|
18
18
|
import { access, mkdir, readFile } from "fs/promises";
|
|
19
19
|
import { basename, dirname, join, parse } from "path";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { r as CommerceAppConfigOutputModel, t as AnyCommerceAppConfig } from "./app-DwSqUkJA.mjs";
|
|
16
|
+
import "valibot";
|
|
17
|
+
//#region source/config/schema/installation.d.ts
|
|
18
|
+
/** Config type when installation settings are present. */
|
|
19
|
+
type InstallationConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = T & {
|
|
20
|
+
installation: NonNullable<T["installation"]>;
|
|
21
|
+
};
|
|
22
|
+
/** Config type when custom installation steps are present. */
|
|
23
|
+
type ConfigWithInstallationSteps<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = InstallationConfig<T> & {
|
|
24
|
+
installation: InstallationConfig<T>["installation"] & {
|
|
25
|
+
customInstallationSteps: NonNullable<InstallationConfig<T>["installation"]["customInstallationSteps"]>;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Check if config has custom installation settings.
|
|
30
|
+
* @param config - The configuration to check.
|
|
31
|
+
*/
|
|
32
|
+
declare function hasCustomInstallation<T extends AnyCommerceAppConfig>(config: T): config is T & InstallationConfig<T>;
|
|
33
|
+
/**
|
|
34
|
+
* Check if config has custom installation steps.
|
|
35
|
+
* @param config - The configuration to check.
|
|
36
|
+
*/
|
|
37
|
+
declare function hasCustomInstallationSteps<T extends AnyCommerceAppConfig>(config: T): config is T & ConfigWithInstallationSteps<T>;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { hasCustomInstallationSteps as n, hasCustomInstallation as t };
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { $ as ValidationContext, A as createRetryState, B as WorkflowHooks, C as defineCustomInstallationStep, D as ValidationSummary, E as ValidationResult, F as executePlannedWorkflow, G as InferStepOutput, H as BranchStep, I as StepEvent, J as LifecycleContext, K as LeafStep, L as StepFailedEvent, M as executeWorkflow, N as planWorkflow, O as validateStepTree, P as createInitialPlanExecutionState, Q as StepMetaInfo, R as StepStartedEvent, S as CustomInstallationStepHandler, T as ValidateStepTreeOptions, U as BranchStepOptions, V as AnyStep, W as ExecutionContext, X as StepContextFactory, Y as Step, Z as StepMeta, _ as createInitialUninstallationState, _t as isFailedState, a as InstallationError, at as isBranchStep, b as runValidation, c as InstallationStatus, ct as FailedWorkflowState, d as CreateInitialUninstallationStateOptions, dt as SucceededWorkflowState, et as ValidationExecutionContext, f as InstallationHooks, ft as WorkflowData, g as createInitialInstallationState, gt as isCompletedState, h as RunValidationOptions, ht as WorkflowStateMetadata, i as InstallationData, it as defineLeafStep, j as executeUninstallWorkflow, k as createInitialState, l as SucceededInstallationState, lt as InProgressWorkflowState, m as RunUninstallationOptions, mt as WorkflowRunState, n as InProgressInstallationState, nt as ValidationIssueSeverity, o as InstallationRetryMetadata, ot as isLeafStep, p as RunInstallationOptions, pt as WorkflowError, q as LeafStepOptions, r as InstallationContext, rt as defineBranchStep, s as InstallationState, st as ExecutionStatus, t as FailedInstallationState, tt as ValidationIssue, u as CreateInitialInstallationStateOptions, ut as StepStatus, v as runInstallation, vt as isInProgressState, w as StepValidationResult, x as CustomInstallationStepDefinition, y as runUninstallation, yt as isSucceededState, z as StepSucceededEvent } from "../index-
|
|
15
|
+
import { $ as ValidationContext, A as createRetryState, B as WorkflowHooks, C as defineCustomInstallationStep, D as ValidationSummary, E as ValidationResult, F as executePlannedWorkflow, G as InferStepOutput, H as BranchStep, I as StepEvent, J as LifecycleContext, K as LeafStep, L as StepFailedEvent, M as executeWorkflow, N as planWorkflow, O as validateStepTree, P as createInitialPlanExecutionState, Q as StepMetaInfo, R as StepStartedEvent, S as CustomInstallationStepHandler, T as ValidateStepTreeOptions, U as BranchStepOptions, V as AnyStep, W as ExecutionContext, X as StepContextFactory, Y as Step, Z as StepMeta, _ as createInitialUninstallationState, _t as isFailedState, a as InstallationError, at as isBranchStep, b as runValidation, c as InstallationStatus, ct as FailedWorkflowState, d as CreateInitialUninstallationStateOptions, dt as SucceededWorkflowState, et as ValidationExecutionContext, f as InstallationHooks, ft as WorkflowData, g as createInitialInstallationState, gt as isCompletedState, h as RunValidationOptions, ht as WorkflowStateMetadata, i as InstallationData, it as defineLeafStep, j as executeUninstallWorkflow, k as createInitialState, l as SucceededInstallationState, lt as InProgressWorkflowState, m as RunUninstallationOptions, mt as WorkflowRunState, n as InProgressInstallationState, nt as ValidationIssueSeverity, o as InstallationRetryMetadata, ot as isLeafStep, p as RunInstallationOptions, pt as WorkflowError, q as LeafStepOptions, r as InstallationContext, rt as defineBranchStep, s as InstallationState, st as ExecutionStatus, t as FailedInstallationState, tt as ValidationIssue, u as CreateInitialInstallationStateOptions, ut as StepStatus, v as runInstallation, vt as isInProgressState, w as StepValidationResult, x as CustomInstallationStepDefinition, y as runUninstallation, yt as isSucceededState, z as StepSucceededEvent } from "../index-BryddQId.mjs";
|
|
16
16
|
export { type AnyStep, type BranchStep, type BranchStepOptions, type CreateInitialInstallationStateOptions, type CreateInitialUninstallationStateOptions, type CustomInstallationStepDefinition, type CustomInstallationStepHandler, type ExecutionContext, type ExecutionStatus, type FailedInstallationState, type FailedWorkflowState, type InProgressInstallationState, type InProgressWorkflowState, type InferStepOutput, type InstallationContext, type InstallationData, type InstallationError, type InstallationHooks, type InstallationRetryMetadata, type InstallationState, type InstallationStatus, type LeafStep, type LeafStepOptions, type LifecycleContext, type RunInstallationOptions, type RunUninstallationOptions, type RunValidationOptions, type Step, type StepContextFactory, type StepEvent, type StepFailedEvent, type StepMeta, type StepMetaInfo, type StepStartedEvent, type StepStatus, type StepSucceededEvent, type StepValidationResult, type SucceededInstallationState, type SucceededWorkflowState, type ValidateStepTreeOptions, type ValidationContext, type ValidationExecutionContext, type ValidationIssue, type ValidationIssueSeverity, type ValidationResult, type ValidationSummary, type WorkflowData, type WorkflowError, type WorkflowHooks, type WorkflowRunState, type WorkflowStateMetadata, createInitialInstallationState, type createInitialPlanExecutionState, type createInitialState, createInitialUninstallationState, type createRetryState, type defineBranchStep, defineCustomInstallationStep, type defineLeafStep, type executePlannedWorkflow, type executeUninstallWorkflow, type executeWorkflow, type isBranchStep, isCompletedState, isFailedState, isInProgressState, type isLeafStep, isSucceededState, type planWorkflow, runInstallation, runUninstallation, runValidation, type validateStepTree };
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { a as runValidation, c as isCompletedState, d as isSucceededState, i as runUninstallation, l as isFailedState, n as createInitialUninstallationState, r as runInstallation, s as defineCustomInstallationStep, t as createInitialInstallationState, u as isInProgressState } from "../management-
|
|
15
|
+
import { a as runValidation, c as isCompletedState, d as isSucceededState, i as runUninstallation, l as isFailedState, n as createInitialUninstallationState, r as runInstallation, s as defineCustomInstallationStep, t as createInitialInstallationState, u as isInProgressState } from "../management-DgwAhaaJ.mjs";
|
|
16
16
|
|
|
17
17
|
export { createInitialInstallationState, createInitialUninstallationState, defineCustomInstallationStep, isCompletedState, isFailedState, isInProgressState, isSucceededState, runInstallation, runUninstallation, runValidation };
|