@adobe/aio-commerce-lib-app 1.6.0 → 1.8.0-beta-20260714082406
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 +106 -0
- package/dist/cjs/actions/app-config/index.cjs +205 -0
- package/dist/cjs/actions/{app-config.d.cts → app-config/index.d.cts} +10 -7
- package/dist/cjs/actions/association/index.cjs +85 -0
- package/dist/cjs/actions/association/index.d.cts +28 -0
- package/dist/cjs/actions/{config.cjs → config/index.cjs} +70 -53
- package/dist/{es/actions/config.d.mts → cjs/actions/config/index.d.cts} +10 -7
- package/dist/cjs/actions/{installation.cjs → installation/index.cjs} +106 -72
- package/dist/{es/actions/installation.d.mts → cjs/actions/installation/index.d.cts} +10 -8
- package/dist/cjs/actions/{scope-tree.cjs → scope-tree/index.cjs} +60 -22
- package/dist/cjs/actions/{scope-tree.d.cts → scope-tree/index.d.cts} +1 -1
- package/dist/cjs/app-D3P-Z6uY.d.cts +1679 -0
- package/dist/cjs/association-repository-BAs3-VkW.cjs +69 -0
- package/dist/cjs/commands/index.cjs +517 -309
- package/dist/cjs/commands/templates/admin-ui/tsconfig.json +14 -0
- package/dist/cjs/commands/templates/admin-ui/web-src/index.css +5 -0
- package/dist/cjs/commands/templates/admin-ui/web-src/index.html +17 -0
- package/dist/cjs/commands/templates/admin-ui/web-src/src/app.jsx +13 -0
- package/dist/cjs/commands/templates/admin-ui/web-src/src/components/welcome.jsx +12 -0
- package/dist/cjs/commands/templates/admin-ui/web-src/src/pages/main-page.jsx +10 -0
- package/dist/cjs/commands/templates/{admin-ui-sdk/registration.js.template → admin-ui/web-src-template.d.ts} +11 -6
- package/dist/cjs/commands/templates/app-management/app-config.js.template +1 -14
- package/dist/cjs/commands/templates/app-management/association.js.template +6 -0
- package/dist/cjs/commands/templates/app-management/installation.js.template +1 -13
- package/dist/cjs/commands/templates/business-configuration/config.js.template +2 -15
- package/dist/cjs/commands/templates/business-configuration/scope-tree.js.template +0 -12
- package/dist/cjs/config/index.browser.cjs +18 -0
- package/dist/cjs/config/index.browser.d.cts +16 -0
- package/dist/cjs/config/{index.cjs → index.node.cjs} +9 -8
- package/dist/cjs/config/index.node.d.cts +1603 -0
- package/dist/cjs/define-DBxAlJfN.d.cts +34 -0
- package/dist/cjs/define-hlcQw7Cv.cjs +41 -0
- package/dist/cjs/environment-B7EnozSg.cjs +135 -0
- package/dist/cjs/index-BXm8UbK7.d.cts +16 -0
- package/dist/cjs/{index-Dw2NvVOY.d.cts → index-CzReNwbF.d.cts} +177 -3
- package/dist/cjs/index.cjs +250 -0
- package/dist/cjs/index.d.cts +217 -0
- package/dist/cjs/{config-FNMclIFO.cjs → index.node-Dz4lV4qe.cjs} +119 -35
- package/dist/cjs/{logging-BVz3weoC.cjs → logging-udPuAJPt.cjs} +2 -2
- package/dist/cjs/management/index.cjs +1 -1
- package/dist/cjs/management/index.d.cts +1 -2
- package/dist/cjs/{management-Cvsz4VMf.cjs → management-B9ItB80R.cjs} +432 -591
- package/dist/cjs/openapi-CwytYdWl.cjs +2948 -0
- package/dist/cjs/{router-BOR7T6qR.cjs → router-hA_Y9gZ1.cjs} +42 -44
- package/dist/cjs/{schemas-FngDuIeo.cjs → schemas-mLxMh_ko.cjs} +2 -2
- package/dist/cjs/utils-DSCmZ_iJ.cjs +408 -0
- package/dist/cjs/{validate-DydOAZha.cjs → validate-BfxhZ5Wv.cjs} +63 -31
- package/dist/cjs/{webhooks-tbZy9G3p.cjs → webhooks-B5tb9NeF.cjs} +159 -151
- package/dist/es/actions/{app-config.d.mts → app-config/index.d.mts} +10 -7
- package/dist/es/actions/app-config/index.mjs +202 -0
- package/dist/es/actions/association/index.d.mts +28 -0
- package/dist/es/actions/association/index.mjs +82 -0
- package/dist/{cjs/actions/config.d.cts → es/actions/config/index.d.mts} +10 -7
- package/dist/es/actions/{config.mjs → config/index.mjs} +67 -50
- package/dist/{cjs/actions/installation.d.cts → es/actions/installation/index.d.mts} +10 -8
- package/dist/es/actions/{installation.mjs → installation/index.mjs} +104 -71
- package/dist/es/actions/{scope-tree.d.mts → scope-tree/index.d.mts} +1 -1
- package/dist/es/actions/{scope-tree.mjs → scope-tree/index.mjs} +58 -20
- package/dist/es/app-D3P-Z6uY.d.mts +1679 -0
- package/dist/es/association-repository-BbQv9WCl.mjs +52 -0
- package/dist/es/commands/index.mjs +550 -340
- package/dist/es/commands/templates/admin-ui/tsconfig.json +14 -0
- package/dist/es/commands/templates/admin-ui/web-src/index.css +5 -0
- package/dist/es/commands/templates/admin-ui/web-src/index.html +17 -0
- package/dist/es/commands/templates/admin-ui/web-src/src/app.jsx +13 -0
- package/dist/es/commands/templates/admin-ui/web-src/src/components/welcome.jsx +12 -0
- package/dist/es/commands/templates/admin-ui/web-src/src/pages/main-page.jsx +10 -0
- package/dist/es/commands/templates/{admin-ui-sdk/registration.js.template → admin-ui/web-src-template.d.ts} +11 -6
- package/dist/es/commands/templates/app-management/app-config.js.template +1 -14
- package/dist/es/commands/templates/app-management/association.js.template +6 -0
- package/dist/es/commands/templates/app-management/installation.js.template +1 -13
- package/dist/es/commands/templates/business-configuration/config.js.template +2 -15
- package/dist/es/commands/templates/business-configuration/scope-tree.js.template +0 -12
- package/dist/es/config/index.browser.d.mts +16 -0
- package/dist/es/config/index.browser.mjs +17 -0
- package/dist/es/config/index.node.d.mts +1604 -0
- package/dist/es/config/index.node.mjs +20 -0
- package/dist/es/define-EoYRZbpe.d.mts +34 -0
- package/dist/es/define-Z_Glf1-_.mjs +35 -0
- package/dist/es/environment-C84BPRJZ.mjs +104 -0
- package/dist/es/index-B0XqHwY5.d.mts +16 -0
- package/dist/es/{index-Bo0tQsVq.d.mts → index-D52xglhZ.d.mts} +177 -3
- package/dist/es/index.d.mts +217 -0
- package/dist/es/index.mjs +242 -0
- package/dist/es/{config-CcE0EBG7.mjs → index.node-CDH5gwJE.mjs} +94 -30
- package/dist/es/management/index.d.mts +1 -2
- package/dist/es/management/index.mjs +1 -1
- package/dist/es/{management-BZ4Y6lVp.mjs → management-B89ApQVY.mjs} +402 -562
- package/dist/es/openapi-CXonvevE.mjs +2900 -0
- package/dist/es/{router-D58JJHHA.mjs → router-B_h0cvjc.mjs} +40 -42
- package/dist/es/utils-_gj8L6eN.mjs +289 -0
- package/dist/es/{validate-Du3LhCre.mjs → validate-9cRZWGrA.mjs} +49 -29
- package/dist/es/{webhooks-B5oq9ULL.mjs → webhooks-BBPbY2mb.mjs} +150 -142
- package/package.json +52 -22
- package/dist/cjs/actions/app-config.cjs +0 -54
- package/dist/cjs/actions/registration.cjs +0 -40
- package/dist/cjs/actions/registration.d.cts +0 -32
- package/dist/cjs/admin-ui-sdk-DZZJCrdT.d.cts +0 -665
- package/dist/cjs/app-CakwxQvs.d.cts +0 -673
- package/dist/cjs/config/index.d.cts +0 -1975
- package/dist/cjs/step-CKVE0aJi.d.cts +0 -187
- package/dist/es/actions/app-config.mjs +0 -53
- package/dist/es/actions/registration.d.mts +0 -32
- package/dist/es/actions/registration.mjs +0 -39
- package/dist/es/admin-ui-sdk-hu6iWr0A.d.mts +0 -667
- package/dist/es/app-CakwxQvs.d.mts +0 -673
- package/dist/es/config/index.d.mts +0 -1975
- package/dist/es/config/index.mjs +0 -19
- package/dist/es/step-D64mMPrt.d.mts +0 -187
- /package/dist/cjs/{chunk-Cozy-1ZF.cjs → rolldown-runtime-Cozy-1ZF.cjs} +0 -0
|
@@ -0,0 +1,1603 @@
|
|
|
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 { a as CommerceAppConfigSchemas, i as CommerceAppConfigDomain, n as CommerceAppConfig, o as getConfigDomains, r as CommerceAppConfigOutputModel, s as hasConfigDomain, t as AnyCommerceAppConfig } from "../app-D3P-Z6uY.cjs";
|
|
16
|
+
import { t as defineConfig } from "../define-DBxAlJfN.cjs";
|
|
17
|
+
import { Get } from "type-fest";
|
|
18
|
+
import * as v from "valibot";
|
|
19
|
+
//#region source/config/lib/parser.d.ts
|
|
20
|
+
/**
|
|
21
|
+
* Try to find (up to the nearest package.json file) the app config file.
|
|
22
|
+
*
|
|
23
|
+
* Searches for config files in the following order of priority:
|
|
24
|
+
* 1. `app.commerce.config.js` - JavaScript (CommonJS or ESM)
|
|
25
|
+
* 2. `app.commerce.config.ts` - TypeScript
|
|
26
|
+
* 3. `app.commerce.config.cjs` - CommonJS
|
|
27
|
+
* 4. `app.commerce.config.mjs` - ES Module
|
|
28
|
+
* 5. `app.commerce.config.mts` - ES Module TypeScript
|
|
29
|
+
* 6. `app.commerce.config.cts` - CommonJS TypeScript
|
|
30
|
+
*
|
|
31
|
+
* @param cwd The current working directory
|
|
32
|
+
* @returns The path to the config file, or null if not found
|
|
33
|
+
*/
|
|
34
|
+
declare function resolveCommerceAppConfig(cwd?: string): Promise<string | null>;
|
|
35
|
+
/**
|
|
36
|
+
* Read the commerce app config file as-is, without validating it.
|
|
37
|
+
*
|
|
38
|
+
* Supports multiple config file formats (see {@link resolveCommerceAppConfig} for the list).
|
|
39
|
+
* The config file must export a default export with the configuration object.
|
|
40
|
+
*
|
|
41
|
+
* @param cwd The current working directory
|
|
42
|
+
* @returns The raw config object from the file
|
|
43
|
+
* @throws {Error} If no config file is found or if the file doesn't export a default export
|
|
44
|
+
*/
|
|
45
|
+
declare function readCommerceAppConfig(cwd?: string): Promise<unknown>;
|
|
46
|
+
/**
|
|
47
|
+
* Read the commerce app config file and parse its contents into its schema.
|
|
48
|
+
*
|
|
49
|
+
* Supports multiple config file formats (see {@link resolveCommerceAppConfig} for the list).
|
|
50
|
+
* The config file must export a default export with the configuration object.
|
|
51
|
+
*
|
|
52
|
+
* @param cwd The current working directory
|
|
53
|
+
* @returns The validated and parsed config object
|
|
54
|
+
* @throws {Error} If no config file is found, if the file doesn't export a default export, or if validation fails
|
|
55
|
+
*/
|
|
56
|
+
declare function parseCommerceAppConfig(cwd?: string): Promise<{
|
|
57
|
+
adminUi?: {
|
|
58
|
+
customer?: {
|
|
59
|
+
gridColumns?: {
|
|
60
|
+
columns: {
|
|
61
|
+
aclProtected?: boolean | undefined;
|
|
62
|
+
align: "left" | "right" | "center";
|
|
63
|
+
id: string;
|
|
64
|
+
label: string;
|
|
65
|
+
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
66
|
+
}[];
|
|
67
|
+
description: string;
|
|
68
|
+
label: string;
|
|
69
|
+
runtimeAction: string;
|
|
70
|
+
} | undefined;
|
|
71
|
+
massActions?: ({
|
|
72
|
+
path: string;
|
|
73
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
74
|
+
type: "view";
|
|
75
|
+
aclProtected?: boolean | undefined;
|
|
76
|
+
confirm?: {
|
|
77
|
+
message?: string | undefined;
|
|
78
|
+
title?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
description?: string | undefined;
|
|
81
|
+
id: string;
|
|
82
|
+
label: string;
|
|
83
|
+
notifications?: {
|
|
84
|
+
error?: string | undefined;
|
|
85
|
+
success?: string | undefined;
|
|
86
|
+
} | undefined;
|
|
87
|
+
selectionLimit?: number | undefined;
|
|
88
|
+
title?: string | undefined;
|
|
89
|
+
} | {
|
|
90
|
+
runtimeAction: string;
|
|
91
|
+
timeout?: number | undefined;
|
|
92
|
+
type: "worker";
|
|
93
|
+
aclProtected?: boolean | undefined;
|
|
94
|
+
confirm?: {
|
|
95
|
+
message?: string | undefined;
|
|
96
|
+
title?: string | undefined;
|
|
97
|
+
} | undefined;
|
|
98
|
+
description?: string | undefined;
|
|
99
|
+
id: string;
|
|
100
|
+
label: string;
|
|
101
|
+
notifications?: {
|
|
102
|
+
error?: string | undefined;
|
|
103
|
+
success?: string | undefined;
|
|
104
|
+
} | undefined;
|
|
105
|
+
selectionLimit?: number | undefined;
|
|
106
|
+
title?: string | undefined;
|
|
107
|
+
})[] | undefined;
|
|
108
|
+
} | undefined;
|
|
109
|
+
menu?: {
|
|
110
|
+
aclProtected?: boolean | undefined;
|
|
111
|
+
description: string;
|
|
112
|
+
id: string;
|
|
113
|
+
label: string;
|
|
114
|
+
pageTitle?: string | undefined;
|
|
115
|
+
parentMenu?: "sales" | "catalog" | "customers" | "marketing" | "content" | "reports" | "stores" | "system" | undefined;
|
|
116
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
117
|
+
} | undefined;
|
|
118
|
+
order?: {
|
|
119
|
+
gridColumns?: {
|
|
120
|
+
columns: {
|
|
121
|
+
aclProtected?: boolean | undefined;
|
|
122
|
+
align: "left" | "right" | "center";
|
|
123
|
+
id: string;
|
|
124
|
+
label: string;
|
|
125
|
+
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
126
|
+
}[];
|
|
127
|
+
description: string;
|
|
128
|
+
label: string;
|
|
129
|
+
runtimeAction: string;
|
|
130
|
+
} | undefined;
|
|
131
|
+
massActions?: ({
|
|
132
|
+
path: string;
|
|
133
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
134
|
+
type: "view";
|
|
135
|
+
aclProtected?: boolean | undefined;
|
|
136
|
+
confirm?: {
|
|
137
|
+
message?: string | undefined;
|
|
138
|
+
title?: string | undefined;
|
|
139
|
+
} | undefined;
|
|
140
|
+
description?: string | undefined;
|
|
141
|
+
id: string;
|
|
142
|
+
label: string;
|
|
143
|
+
notifications?: {
|
|
144
|
+
error?: string | undefined;
|
|
145
|
+
success?: string | undefined;
|
|
146
|
+
} | undefined;
|
|
147
|
+
selectionLimit?: number | undefined;
|
|
148
|
+
title?: string | undefined;
|
|
149
|
+
} | {
|
|
150
|
+
runtimeAction: string;
|
|
151
|
+
timeout?: number | undefined;
|
|
152
|
+
type: "worker";
|
|
153
|
+
aclProtected?: boolean | undefined;
|
|
154
|
+
confirm?: {
|
|
155
|
+
message?: string | undefined;
|
|
156
|
+
title?: string | undefined;
|
|
157
|
+
} | undefined;
|
|
158
|
+
description?: string | undefined;
|
|
159
|
+
id: string;
|
|
160
|
+
label: string;
|
|
161
|
+
notifications?: {
|
|
162
|
+
error?: string | undefined;
|
|
163
|
+
success?: string | undefined;
|
|
164
|
+
} | undefined;
|
|
165
|
+
selectionLimit?: number | undefined;
|
|
166
|
+
title?: string | undefined;
|
|
167
|
+
})[] | undefined;
|
|
168
|
+
viewButtons?: ({
|
|
169
|
+
aclProtected?: boolean | undefined;
|
|
170
|
+
confirm?: {
|
|
171
|
+
message?: string | undefined;
|
|
172
|
+
title?: string | undefined;
|
|
173
|
+
} | undefined;
|
|
174
|
+
description?: string | undefined;
|
|
175
|
+
id: string;
|
|
176
|
+
label: string;
|
|
177
|
+
level?: 0 | 1 | -1 | undefined;
|
|
178
|
+
notifications?: {
|
|
179
|
+
error?: string | undefined;
|
|
180
|
+
success?: string | undefined;
|
|
181
|
+
} | undefined;
|
|
182
|
+
path: string;
|
|
183
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
184
|
+
sortOrder?: number | undefined;
|
|
185
|
+
type: "view";
|
|
186
|
+
} | {
|
|
187
|
+
aclProtected?: boolean | undefined;
|
|
188
|
+
confirm?: {
|
|
189
|
+
message?: string | undefined;
|
|
190
|
+
title?: string | undefined;
|
|
191
|
+
} | undefined;
|
|
192
|
+
description?: string | undefined;
|
|
193
|
+
id: string;
|
|
194
|
+
label: string;
|
|
195
|
+
level?: 0 | 1 | -1 | undefined;
|
|
196
|
+
notifications?: {
|
|
197
|
+
error?: string | undefined;
|
|
198
|
+
success?: string | undefined;
|
|
199
|
+
} | undefined;
|
|
200
|
+
runtimeAction: string;
|
|
201
|
+
sortOrder?: number | undefined;
|
|
202
|
+
timeout?: number | undefined;
|
|
203
|
+
type: "worker";
|
|
204
|
+
})[] | undefined;
|
|
205
|
+
} | undefined;
|
|
206
|
+
product?: {
|
|
207
|
+
gridColumns?: {
|
|
208
|
+
columns: {
|
|
209
|
+
aclProtected?: boolean | undefined;
|
|
210
|
+
align: "left" | "right" | "center";
|
|
211
|
+
id: string;
|
|
212
|
+
label: string;
|
|
213
|
+
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
214
|
+
}[];
|
|
215
|
+
description: string;
|
|
216
|
+
label: string;
|
|
217
|
+
runtimeAction: string;
|
|
218
|
+
} | undefined;
|
|
219
|
+
massActions?: ({
|
|
220
|
+
path: string;
|
|
221
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
222
|
+
type: "view";
|
|
223
|
+
aclProtected?: boolean | undefined;
|
|
224
|
+
confirm?: {
|
|
225
|
+
message?: string | undefined;
|
|
226
|
+
title?: string | undefined;
|
|
227
|
+
} | undefined;
|
|
228
|
+
description?: string | undefined;
|
|
229
|
+
id: string;
|
|
230
|
+
label: string;
|
|
231
|
+
notifications?: {
|
|
232
|
+
error?: string | undefined;
|
|
233
|
+
success?: string | undefined;
|
|
234
|
+
} | undefined;
|
|
235
|
+
selectionLimit?: number | undefined;
|
|
236
|
+
title?: string | undefined;
|
|
237
|
+
} | {
|
|
238
|
+
runtimeAction: string;
|
|
239
|
+
timeout?: number | undefined;
|
|
240
|
+
type: "worker";
|
|
241
|
+
aclProtected?: boolean | undefined;
|
|
242
|
+
confirm?: {
|
|
243
|
+
message?: string | undefined;
|
|
244
|
+
title?: string | undefined;
|
|
245
|
+
} | undefined;
|
|
246
|
+
description?: string | undefined;
|
|
247
|
+
id: string;
|
|
248
|
+
label: string;
|
|
249
|
+
notifications?: {
|
|
250
|
+
error?: string | undefined;
|
|
251
|
+
success?: string | undefined;
|
|
252
|
+
} | undefined;
|
|
253
|
+
selectionLimit?: number | undefined;
|
|
254
|
+
title?: string | undefined;
|
|
255
|
+
})[] | undefined;
|
|
256
|
+
} | undefined;
|
|
257
|
+
} | undefined;
|
|
258
|
+
businessConfig?: {
|
|
259
|
+
schema: ({
|
|
260
|
+
default: string;
|
|
261
|
+
selectionMode: "single";
|
|
262
|
+
options: {
|
|
263
|
+
label: string;
|
|
264
|
+
value: string;
|
|
265
|
+
}[];
|
|
266
|
+
type: "list";
|
|
267
|
+
description?: string | undefined;
|
|
268
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
269
|
+
label?: string | undefined;
|
|
270
|
+
name: string;
|
|
271
|
+
} | {
|
|
272
|
+
default: string[];
|
|
273
|
+
selectionMode: "multiple";
|
|
274
|
+
options: {
|
|
275
|
+
label: string;
|
|
276
|
+
value: string;
|
|
277
|
+
}[];
|
|
278
|
+
type: "list";
|
|
279
|
+
description?: string | undefined;
|
|
280
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
281
|
+
label?: string | undefined;
|
|
282
|
+
name: string;
|
|
283
|
+
} | {
|
|
284
|
+
default: (resolvedOptions: {
|
|
285
|
+
label: string;
|
|
286
|
+
value: string;
|
|
287
|
+
}[]) => string;
|
|
288
|
+
selectionMode: "single";
|
|
289
|
+
options: (params: import("@adobe/aio-commerce-lib-core/params").RuntimeActionParams) => {
|
|
290
|
+
label: string;
|
|
291
|
+
value: string;
|
|
292
|
+
}[] | Promise<{
|
|
293
|
+
label: string;
|
|
294
|
+
value: string;
|
|
295
|
+
}[]>;
|
|
296
|
+
type: "dynamicList";
|
|
297
|
+
description?: string | undefined;
|
|
298
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
299
|
+
label?: string | undefined;
|
|
300
|
+
name: string;
|
|
301
|
+
} | {
|
|
302
|
+
default?: ((resolvedOptions: {
|
|
303
|
+
label: string;
|
|
304
|
+
value: string;
|
|
305
|
+
}[]) => string[]) | undefined;
|
|
306
|
+
selectionMode: "multiple";
|
|
307
|
+
options: (params: import("@adobe/aio-commerce-lib-core/params").RuntimeActionParams) => {
|
|
308
|
+
label: string;
|
|
309
|
+
value: string;
|
|
310
|
+
}[] | Promise<{
|
|
311
|
+
label: string;
|
|
312
|
+
value: string;
|
|
313
|
+
}[]>;
|
|
314
|
+
type: "dynamicList";
|
|
315
|
+
description?: string | undefined;
|
|
316
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
317
|
+
label?: string | undefined;
|
|
318
|
+
name: string;
|
|
319
|
+
} | {
|
|
320
|
+
default: string;
|
|
321
|
+
type: "text";
|
|
322
|
+
description?: string | undefined;
|
|
323
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
324
|
+
label?: string | undefined;
|
|
325
|
+
name: string;
|
|
326
|
+
} | {
|
|
327
|
+
default: "";
|
|
328
|
+
type: "password";
|
|
329
|
+
description?: string | undefined;
|
|
330
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
331
|
+
label?: string | undefined;
|
|
332
|
+
name: string;
|
|
333
|
+
} | {
|
|
334
|
+
default: string;
|
|
335
|
+
type: "email";
|
|
336
|
+
description?: string | undefined;
|
|
337
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
338
|
+
label?: string | undefined;
|
|
339
|
+
name: string;
|
|
340
|
+
} | {
|
|
341
|
+
default: string;
|
|
342
|
+
type: "url";
|
|
343
|
+
description?: string | undefined;
|
|
344
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
345
|
+
label?: string | undefined;
|
|
346
|
+
name: string;
|
|
347
|
+
} | {
|
|
348
|
+
default: string;
|
|
349
|
+
type: "tel";
|
|
350
|
+
description?: string | undefined;
|
|
351
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
352
|
+
label?: string | undefined;
|
|
353
|
+
name: string;
|
|
354
|
+
} | {
|
|
355
|
+
default: boolean;
|
|
356
|
+
type: "boolean";
|
|
357
|
+
description?: string | undefined;
|
|
358
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
359
|
+
label?: string | undefined;
|
|
360
|
+
name: string;
|
|
361
|
+
})[];
|
|
362
|
+
} | undefined;
|
|
363
|
+
eventing?: {
|
|
364
|
+
commerce?: {
|
|
365
|
+
events: {
|
|
366
|
+
destination?: string | undefined;
|
|
367
|
+
fields: {
|
|
368
|
+
name: string;
|
|
369
|
+
source?: string | undefined;
|
|
370
|
+
}[];
|
|
371
|
+
force?: boolean | undefined;
|
|
372
|
+
hipaa_audit_required?: boolean | undefined;
|
|
373
|
+
name: string;
|
|
374
|
+
priority?: boolean | undefined;
|
|
375
|
+
rules?: {
|
|
376
|
+
field: string;
|
|
377
|
+
operator: "regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange";
|
|
378
|
+
value: string;
|
|
379
|
+
}[] | undefined;
|
|
380
|
+
description: string;
|
|
381
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
382
|
+
label: string;
|
|
383
|
+
runtimeActions: string[];
|
|
384
|
+
}[];
|
|
385
|
+
provider: {
|
|
386
|
+
description: string;
|
|
387
|
+
key?: string | undefined;
|
|
388
|
+
label: string;
|
|
389
|
+
};
|
|
390
|
+
}[] | undefined;
|
|
391
|
+
external?: {
|
|
392
|
+
events: {
|
|
393
|
+
hipaa_audit_required?: boolean | undefined;
|
|
394
|
+
name: string;
|
|
395
|
+
description: string;
|
|
396
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
397
|
+
label: string;
|
|
398
|
+
runtimeActions: string[];
|
|
399
|
+
}[];
|
|
400
|
+
provider: {
|
|
401
|
+
description: string;
|
|
402
|
+
key?: string | undefined;
|
|
403
|
+
label: string;
|
|
404
|
+
};
|
|
405
|
+
}[] | undefined;
|
|
406
|
+
} | undefined;
|
|
407
|
+
installation?: {
|
|
408
|
+
customInstallationSteps?: {
|
|
409
|
+
description: string;
|
|
410
|
+
name: string;
|
|
411
|
+
script: string;
|
|
412
|
+
}[] | undefined;
|
|
413
|
+
messages?: {
|
|
414
|
+
postInstallation?: string | undefined;
|
|
415
|
+
preInstallation?: string | undefined;
|
|
416
|
+
} | undefined;
|
|
417
|
+
} | undefined;
|
|
418
|
+
metadata: {
|
|
419
|
+
description: string;
|
|
420
|
+
displayName: string;
|
|
421
|
+
id: string;
|
|
422
|
+
version: string;
|
|
423
|
+
};
|
|
424
|
+
webhooks?: ({
|
|
425
|
+
requireAdobeAuth?: boolean | undefined;
|
|
426
|
+
runtimeAction: string;
|
|
427
|
+
webhook: {
|
|
428
|
+
batch_name: string;
|
|
429
|
+
batch_order?: number | undefined;
|
|
430
|
+
fallback_error_message?: string | undefined;
|
|
431
|
+
fields?: {
|
|
432
|
+
name: string;
|
|
433
|
+
source?: string | undefined;
|
|
434
|
+
}[] | undefined;
|
|
435
|
+
headers?: {
|
|
436
|
+
name: string;
|
|
437
|
+
value: string;
|
|
438
|
+
}[] | undefined;
|
|
439
|
+
hook_name: string;
|
|
440
|
+
method: string;
|
|
441
|
+
priority?: number | undefined;
|
|
442
|
+
required?: boolean | undefined;
|
|
443
|
+
rules?: {
|
|
444
|
+
field: string;
|
|
445
|
+
operator: string;
|
|
446
|
+
value: string;
|
|
447
|
+
}[] | undefined;
|
|
448
|
+
soft_timeout?: number | undefined;
|
|
449
|
+
timeout?: number | undefined;
|
|
450
|
+
ttl?: number | undefined;
|
|
451
|
+
webhook_method: string;
|
|
452
|
+
webhook_type: string;
|
|
453
|
+
};
|
|
454
|
+
category?: "validation" | "append" | "modification" | undefined;
|
|
455
|
+
description: string;
|
|
456
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
457
|
+
label: string;
|
|
458
|
+
} | {
|
|
459
|
+
webhook: {
|
|
460
|
+
url: string;
|
|
461
|
+
batch_name: string;
|
|
462
|
+
batch_order?: number | undefined;
|
|
463
|
+
fallback_error_message?: string | undefined;
|
|
464
|
+
fields?: {
|
|
465
|
+
name: string;
|
|
466
|
+
source?: string | undefined;
|
|
467
|
+
}[] | undefined;
|
|
468
|
+
headers?: {
|
|
469
|
+
name: string;
|
|
470
|
+
value: string;
|
|
471
|
+
}[] | undefined;
|
|
472
|
+
hook_name: string;
|
|
473
|
+
method: string;
|
|
474
|
+
priority?: number | undefined;
|
|
475
|
+
required?: boolean | undefined;
|
|
476
|
+
rules?: {
|
|
477
|
+
field: string;
|
|
478
|
+
operator: string;
|
|
479
|
+
value: string;
|
|
480
|
+
}[] | undefined;
|
|
481
|
+
soft_timeout?: number | undefined;
|
|
482
|
+
timeout?: number | undefined;
|
|
483
|
+
ttl?: number | undefined;
|
|
484
|
+
webhook_method: string;
|
|
485
|
+
webhook_type: string;
|
|
486
|
+
};
|
|
487
|
+
category?: "validation" | "append" | "modification" | undefined;
|
|
488
|
+
description: string;
|
|
489
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
490
|
+
label: string;
|
|
491
|
+
})[] | undefined;
|
|
492
|
+
} & {
|
|
493
|
+
[key: string]: unknown;
|
|
494
|
+
}>;
|
|
495
|
+
//#endregion
|
|
496
|
+
//#region source/config/lib/validate.d.ts
|
|
497
|
+
/**
|
|
498
|
+
* Validates a complete commerce app configuration object against the schema.
|
|
499
|
+
*
|
|
500
|
+
* @param config - The configuration object to validate.
|
|
501
|
+
* @returns The validated and typed configuration output model.
|
|
502
|
+
*
|
|
503
|
+
* @throws {CommerceSdkValidationError} If the configuration is invalid, with
|
|
504
|
+
* detailed validation issues included.
|
|
505
|
+
*
|
|
506
|
+
* @example
|
|
507
|
+
* ```typescript
|
|
508
|
+
* const config = {
|
|
509
|
+
* businessConfiguration: {
|
|
510
|
+
* // ... configuration data
|
|
511
|
+
* }
|
|
512
|
+
* };
|
|
513
|
+
*
|
|
514
|
+
* try {
|
|
515
|
+
* const validatedConfig = validateCommerceAppConfig(config);
|
|
516
|
+
* // Use validatedConfig safely
|
|
517
|
+
* } catch (error) {
|
|
518
|
+
* if (error instanceof CommerceSdkValidationError) {
|
|
519
|
+
* console.error('Validation failed:', error.display());
|
|
520
|
+
* }
|
|
521
|
+
* }
|
|
522
|
+
* ```
|
|
523
|
+
*/
|
|
524
|
+
declare function validateCommerceAppConfig(config: unknown): CommerceAppConfigOutputModel;
|
|
525
|
+
/**
|
|
526
|
+
* Validates a specific domain configuration within the commerce app config.
|
|
527
|
+
*
|
|
528
|
+
* This function validates only a specific domain's configuration rather than
|
|
529
|
+
* the entire commerce app configuration object. It first validates that the
|
|
530
|
+
* domain name is valid, then validates the configuration data against the
|
|
531
|
+
* schema for that specific domain.
|
|
532
|
+
*
|
|
533
|
+
* @template T - The type of the domain, constrained to valid domain names.
|
|
534
|
+
*
|
|
535
|
+
* @param config - The domain configuration object to validate.
|
|
536
|
+
* @param domain - The name of the domain to validate (e.g., 'businessConfiguration').
|
|
537
|
+
* @returns The validated and typed configuration for the specified domain.
|
|
538
|
+
*
|
|
539
|
+
* @throws {CommerceSdkValidationError} If the domain name is invalid or if the
|
|
540
|
+
* configuration doesn't match the domain's schema.
|
|
541
|
+
*
|
|
542
|
+
* @example
|
|
543
|
+
* ```typescript
|
|
544
|
+
* const businessConfig = {
|
|
545
|
+
* fields: [
|
|
546
|
+
* {
|
|
547
|
+
* name: 'category',
|
|
548
|
+
* type: 'dropdown',
|
|
549
|
+
* // ... field configuration
|
|
550
|
+
* }
|
|
551
|
+
* ]
|
|
552
|
+
* };
|
|
553
|
+
*
|
|
554
|
+
* try {
|
|
555
|
+
* const validatedConfig = validateCommerceAppConfigDomain(
|
|
556
|
+
* businessConfig,
|
|
557
|
+
* 'businessConfig'
|
|
558
|
+
* );
|
|
559
|
+
* // Use validatedConfig safely
|
|
560
|
+
* } catch (error) {
|
|
561
|
+
* if (error instanceof CommerceSdkValidationError) {
|
|
562
|
+
* console.error('Domain validation failed:', error.issues);
|
|
563
|
+
* }
|
|
564
|
+
* }
|
|
565
|
+
* ```
|
|
566
|
+
*/
|
|
567
|
+
declare function validateCommerceAppConfigDomain<T extends CommerceAppConfigDomain>(config: unknown, domain: T): NonNullable<Get<CommerceAppConfigOutputModel, T>>;
|
|
568
|
+
//#endregion
|
|
569
|
+
//#region source/config/schema/admin-ui.d.ts
|
|
570
|
+
declare const NotificationsSchema: v.ObjectSchema<{
|
|
571
|
+
readonly error: 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>;
|
|
572
|
+
readonly success: 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>;
|
|
573
|
+
}, undefined>;
|
|
574
|
+
declare const GridColumnSchema: v.StrictObjectSchema<{
|
|
575
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
576
|
+
readonly align: v.PicklistSchema<["left", "right", "center"], undefined>;
|
|
577
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
578
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
579
|
+
readonly type: v.PicklistSchema<["boolean", "date", "datetime", "float", "integer", "string"], undefined>;
|
|
580
|
+
}, undefined>;
|
|
581
|
+
declare const GridColumnsSchema: v.ObjectSchema<{
|
|
582
|
+
readonly columns: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
583
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
584
|
+
readonly align: v.PicklistSchema<["left", "right", "center"], undefined>;
|
|
585
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
586
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
587
|
+
readonly type: v.PicklistSchema<["boolean", "date", "datetime", "float", "integer", "string"], undefined>;
|
|
588
|
+
}, undefined>, undefined>, v.MinLengthAction<{
|
|
589
|
+
aclProtected?: boolean | undefined;
|
|
590
|
+
align: "left" | "right" | "center";
|
|
591
|
+
id: string;
|
|
592
|
+
label: string;
|
|
593
|
+
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
594
|
+
}[], 1, "At least one grid column is required">]>;
|
|
595
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
596
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
597
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
598
|
+
}, undefined>;
|
|
599
|
+
/** `type: "view"` mass action — renders an iframe at `path`. */
|
|
600
|
+
declare const ViewMassActionSchema: v.StrictObjectSchema<{
|
|
601
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
602
|
+
readonly sandboxPermissions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["allow-downloads", "allow-modals", "allow-popups"], `Invalid sandbox permission. Accepted values are: ${string}`>, undefined>, v.MinLengthAction<("allow-downloads" | "allow-modals" | "allow-popups")[], 1, "sandboxPermissions must contain at least one permission when it's defined">, v.CheckAction<("allow-downloads" | "allow-modals" | "allow-popups")[], "Duplicate permissions are not allowed in sandboxPermissions">]>, undefined>;
|
|
603
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
604
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
605
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
606
|
+
readonly message: 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>;
|
|
607
|
+
readonly title: 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>;
|
|
608
|
+
}, undefined>, undefined>;
|
|
609
|
+
readonly description: 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>;
|
|
610
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
611
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
612
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
613
|
+
readonly error: 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>;
|
|
614
|
+
readonly success: 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>;
|
|
615
|
+
}, undefined>, undefined>;
|
|
616
|
+
readonly selectionLimit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
617
|
+
readonly title: 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>;
|
|
618
|
+
}, undefined>;
|
|
619
|
+
/** `type: "worker"` mass action — invokes a workerProcess runtime action. */
|
|
620
|
+
declare const WorkerMassActionSchema: v.StrictObjectSchema<{
|
|
621
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
622
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
623
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
624
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
625
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
626
|
+
readonly message: 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>;
|
|
627
|
+
readonly title: 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>;
|
|
628
|
+
}, undefined>, undefined>;
|
|
629
|
+
readonly description: 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>;
|
|
630
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
631
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
632
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
633
|
+
readonly error: 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>;
|
|
634
|
+
readonly success: 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>;
|
|
635
|
+
}, undefined>, undefined>;
|
|
636
|
+
readonly selectionLimit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
637
|
+
readonly title: 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>;
|
|
638
|
+
}, undefined>;
|
|
639
|
+
/**
|
|
640
|
+
* A mass action entry discriminated by `type`: `"view"` renders an iframe;
|
|
641
|
+
* `"worker"` invokes a runtime action.
|
|
642
|
+
*/
|
|
643
|
+
declare const MassActionSchema: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
644
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
645
|
+
readonly sandboxPermissions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["allow-downloads", "allow-modals", "allow-popups"], `Invalid sandbox permission. Accepted values are: ${string}`>, undefined>, v.MinLengthAction<("allow-downloads" | "allow-modals" | "allow-popups")[], 1, "sandboxPermissions must contain at least one permission when it's defined">, v.CheckAction<("allow-downloads" | "allow-modals" | "allow-popups")[], "Duplicate permissions are not allowed in sandboxPermissions">]>, undefined>;
|
|
646
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
647
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
648
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
649
|
+
readonly message: 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>;
|
|
650
|
+
readonly title: 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>;
|
|
651
|
+
}, undefined>, undefined>;
|
|
652
|
+
readonly description: 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>;
|
|
653
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
654
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
655
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
656
|
+
readonly error: 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>;
|
|
657
|
+
readonly success: 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>;
|
|
658
|
+
}, undefined>, undefined>;
|
|
659
|
+
readonly selectionLimit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
660
|
+
readonly title: 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>;
|
|
661
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
662
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
663
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
664
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
665
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
666
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
667
|
+
readonly message: 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>;
|
|
668
|
+
readonly title: 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>;
|
|
669
|
+
}, undefined>, undefined>;
|
|
670
|
+
readonly description: 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>;
|
|
671
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
672
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
673
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
674
|
+
readonly error: 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>;
|
|
675
|
+
readonly success: 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>;
|
|
676
|
+
}, undefined>, undefined>;
|
|
677
|
+
readonly selectionLimit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
678
|
+
readonly title: 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>;
|
|
679
|
+
}, undefined>], "mass action \"type\" must be either \"view\" or \"worker\"">;
|
|
680
|
+
declare const OrderViewButtonSchema: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
681
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
682
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
683
|
+
readonly message: 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>;
|
|
684
|
+
readonly title: 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>;
|
|
685
|
+
}, undefined>, undefined>;
|
|
686
|
+
readonly description: 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>;
|
|
687
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
688
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
689
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
690
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
691
|
+
readonly error: 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>;
|
|
692
|
+
readonly success: 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>;
|
|
693
|
+
}, undefined>, undefined>;
|
|
694
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
695
|
+
readonly sandboxPermissions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["allow-downloads", "allow-modals", "allow-popups"], `Invalid sandbox permission. Accepted values are: ${string}`>, undefined>, v.MinLengthAction<("allow-downloads" | "allow-modals" | "allow-popups")[], 1, "sandboxPermissions must contain at least one permission when it's defined">, v.CheckAction<("allow-downloads" | "allow-modals" | "allow-popups")[], "Duplicate permissions are not allowed in sandboxPermissions">]>, undefined>;
|
|
696
|
+
readonly sortOrder: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
697
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
698
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
699
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
700
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
701
|
+
readonly message: 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>;
|
|
702
|
+
readonly title: 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>;
|
|
703
|
+
}, undefined>, undefined>;
|
|
704
|
+
readonly description: 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>;
|
|
705
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
706
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
707
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
708
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
709
|
+
readonly error: 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>;
|
|
710
|
+
readonly success: 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>;
|
|
711
|
+
}, undefined>, undefined>;
|
|
712
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
713
|
+
readonly sortOrder: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
714
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
715
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
716
|
+
}, undefined>], undefined>;
|
|
717
|
+
declare const MenuSchema: v.ObjectSchema<{
|
|
718
|
+
/**
|
|
719
|
+
* When `true`, Commerce auto-generates a per-app ACL resource id from `metadata.id`
|
|
720
|
+
* and injects it into the Adobe Commerce User Roles permission tree, allowing role-based
|
|
721
|
+
* access control per app menu.
|
|
722
|
+
*/
|
|
723
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
724
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
725
|
+
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, "Menu ID may contain only letters, digits, \"/\", \":\", and \"_\"">]>;
|
|
726
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
727
|
+
readonly pageTitle: 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>;
|
|
728
|
+
readonly parentMenu: v.OptionalSchema<v.PicklistSchema<readonly ["sales", "catalog", "customers", "marketing", "content", "reports", "stores", "system"], "parentMenu must be a known Commerce Admin menu ID">, undefined>;
|
|
729
|
+
readonly sandboxPermissions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["allow-downloads", "allow-modals", "allow-popups"], `Invalid sandbox permission. Accepted values are: ${string}`>, undefined>, v.MinLengthAction<("allow-downloads" | "allow-modals" | "allow-popups")[], 1, "sandboxPermissions must contain at least one permission when it's defined">, v.CheckAction<("allow-downloads" | "allow-modals" | "allow-popups")[], "Duplicate permissions are not allowed in sandboxPermissions">]>, undefined>;
|
|
730
|
+
}, undefined>;
|
|
731
|
+
/**
|
|
732
|
+
* Schema for the `adminUi` config section.
|
|
733
|
+
* Supports grid column extensions, mass actions, order view buttons, and menu on `commerce/backend-ui/2`.
|
|
734
|
+
* @experimental
|
|
735
|
+
*/
|
|
736
|
+
declare const AdminUiSchema: v.ObjectSchema<{
|
|
737
|
+
readonly customer: v.OptionalSchema<v.ObjectSchema<{
|
|
738
|
+
readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
|
|
739
|
+
readonly columns: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
740
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
741
|
+
readonly align: v.PicklistSchema<["left", "right", "center"], undefined>;
|
|
742
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
743
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
744
|
+
readonly type: v.PicklistSchema<["boolean", "date", "datetime", "float", "integer", "string"], undefined>;
|
|
745
|
+
}, undefined>, undefined>, v.MinLengthAction<{
|
|
746
|
+
aclProtected?: boolean | undefined;
|
|
747
|
+
align: "left" | "right" | "center";
|
|
748
|
+
id: string;
|
|
749
|
+
label: string;
|
|
750
|
+
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
751
|
+
}[], 1, "At least one grid column is required">]>;
|
|
752
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
753
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
754
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
755
|
+
}, undefined>, undefined>;
|
|
756
|
+
readonly massActions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
757
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
758
|
+
readonly sandboxPermissions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["allow-downloads", "allow-modals", "allow-popups"], `Invalid sandbox permission. Accepted values are: ${string}`>, undefined>, v.MinLengthAction<("allow-downloads" | "allow-modals" | "allow-popups")[], 1, "sandboxPermissions must contain at least one permission when it's defined">, v.CheckAction<("allow-downloads" | "allow-modals" | "allow-popups")[], "Duplicate permissions are not allowed in sandboxPermissions">]>, undefined>;
|
|
759
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
760
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
761
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
762
|
+
readonly message: 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>;
|
|
763
|
+
readonly title: 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>;
|
|
764
|
+
}, undefined>, undefined>;
|
|
765
|
+
readonly description: 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>;
|
|
766
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
767
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
768
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
769
|
+
readonly error: 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>;
|
|
770
|
+
readonly success: 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>;
|
|
771
|
+
}, undefined>, undefined>;
|
|
772
|
+
readonly selectionLimit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
773
|
+
readonly title: 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>;
|
|
774
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
775
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
776
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
777
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
778
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
779
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
780
|
+
readonly message: 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>;
|
|
781
|
+
readonly title: 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>;
|
|
782
|
+
}, undefined>, undefined>;
|
|
783
|
+
readonly description: 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>;
|
|
784
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
785
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
786
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
787
|
+
readonly error: 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>;
|
|
788
|
+
readonly success: 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>;
|
|
789
|
+
}, undefined>, undefined>;
|
|
790
|
+
readonly selectionLimit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
791
|
+
readonly title: 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>;
|
|
792
|
+
}, undefined>], "mass action \"type\" must be either \"view\" or \"worker\"">, undefined>, undefined>;
|
|
793
|
+
}, undefined>, undefined>;
|
|
794
|
+
readonly menu: v.OptionalSchema<v.ObjectSchema<{
|
|
795
|
+
/**
|
|
796
|
+
* When `true`, Commerce auto-generates a per-app ACL resource id from `metadata.id`
|
|
797
|
+
* and injects it into the Adobe Commerce User Roles permission tree, allowing role-based
|
|
798
|
+
* access control per app menu.
|
|
799
|
+
*/
|
|
800
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
801
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
802
|
+
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, "Menu ID may contain only letters, digits, \"/\", \":\", and \"_\"">]>;
|
|
803
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
804
|
+
readonly pageTitle: 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>;
|
|
805
|
+
readonly parentMenu: v.OptionalSchema<v.PicklistSchema<readonly ["sales", "catalog", "customers", "marketing", "content", "reports", "stores", "system"], "parentMenu must be a known Commerce Admin menu ID">, undefined>;
|
|
806
|
+
readonly sandboxPermissions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["allow-downloads", "allow-modals", "allow-popups"], `Invalid sandbox permission. Accepted values are: ${string}`>, undefined>, v.MinLengthAction<("allow-downloads" | "allow-modals" | "allow-popups")[], 1, "sandboxPermissions must contain at least one permission when it's defined">, v.CheckAction<("allow-downloads" | "allow-modals" | "allow-popups")[], "Duplicate permissions are not allowed in sandboxPermissions">]>, undefined>;
|
|
807
|
+
}, undefined>, undefined>;
|
|
808
|
+
readonly order: v.OptionalSchema<v.ObjectSchema<{
|
|
809
|
+
readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
|
|
810
|
+
readonly columns: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
811
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
812
|
+
readonly align: v.PicklistSchema<["left", "right", "center"], undefined>;
|
|
813
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
814
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
815
|
+
readonly type: v.PicklistSchema<["boolean", "date", "datetime", "float", "integer", "string"], undefined>;
|
|
816
|
+
}, undefined>, undefined>, v.MinLengthAction<{
|
|
817
|
+
aclProtected?: boolean | undefined;
|
|
818
|
+
align: "left" | "right" | "center";
|
|
819
|
+
id: string;
|
|
820
|
+
label: string;
|
|
821
|
+
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
822
|
+
}[], 1, "At least one grid column is required">]>;
|
|
823
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
824
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
825
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
826
|
+
}, undefined>, undefined>;
|
|
827
|
+
readonly massActions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
828
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
829
|
+
readonly sandboxPermissions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["allow-downloads", "allow-modals", "allow-popups"], `Invalid sandbox permission. Accepted values are: ${string}`>, undefined>, v.MinLengthAction<("allow-downloads" | "allow-modals" | "allow-popups")[], 1, "sandboxPermissions must contain at least one permission when it's defined">, v.CheckAction<("allow-downloads" | "allow-modals" | "allow-popups")[], "Duplicate permissions are not allowed in sandboxPermissions">]>, undefined>;
|
|
830
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
831
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
832
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
833
|
+
readonly message: 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>;
|
|
834
|
+
readonly title: 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>;
|
|
835
|
+
}, undefined>, undefined>;
|
|
836
|
+
readonly description: 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>;
|
|
837
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
838
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
839
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
840
|
+
readonly error: 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>;
|
|
841
|
+
readonly success: 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>;
|
|
842
|
+
}, undefined>, undefined>;
|
|
843
|
+
readonly selectionLimit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
844
|
+
readonly title: 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>;
|
|
845
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
846
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
847
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
848
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
849
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
850
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
851
|
+
readonly message: 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>;
|
|
852
|
+
readonly title: 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>;
|
|
853
|
+
}, undefined>, undefined>;
|
|
854
|
+
readonly description: 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>;
|
|
855
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
856
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
857
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
858
|
+
readonly error: 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>;
|
|
859
|
+
readonly success: 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>;
|
|
860
|
+
}, undefined>, undefined>;
|
|
861
|
+
readonly selectionLimit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
862
|
+
readonly title: 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>;
|
|
863
|
+
}, undefined>], "mass action \"type\" must be either \"view\" or \"worker\"">, undefined>, undefined>;
|
|
864
|
+
readonly viewButtons: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
865
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
866
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
867
|
+
readonly message: 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>;
|
|
868
|
+
readonly title: 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>;
|
|
869
|
+
}, undefined>, undefined>;
|
|
870
|
+
readonly description: 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>;
|
|
871
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
872
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
873
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
874
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
875
|
+
readonly error: 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>;
|
|
876
|
+
readonly success: 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>;
|
|
877
|
+
}, undefined>, undefined>;
|
|
878
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
879
|
+
readonly sandboxPermissions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["allow-downloads", "allow-modals", "allow-popups"], `Invalid sandbox permission. Accepted values are: ${string}`>, undefined>, v.MinLengthAction<("allow-downloads" | "allow-modals" | "allow-popups")[], 1, "sandboxPermissions must contain at least one permission when it's defined">, v.CheckAction<("allow-downloads" | "allow-modals" | "allow-popups")[], "Duplicate permissions are not allowed in sandboxPermissions">]>, undefined>;
|
|
880
|
+
readonly sortOrder: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
881
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
882
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
883
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
884
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
885
|
+
readonly message: 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>;
|
|
886
|
+
readonly title: 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>;
|
|
887
|
+
}, undefined>, undefined>;
|
|
888
|
+
readonly description: 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>;
|
|
889
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
890
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
891
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
892
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
893
|
+
readonly error: 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>;
|
|
894
|
+
readonly success: 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>;
|
|
895
|
+
}, undefined>, undefined>;
|
|
896
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
897
|
+
readonly sortOrder: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
898
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
899
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
900
|
+
}, undefined>], undefined>, undefined>, undefined>;
|
|
901
|
+
}, undefined>, undefined>;
|
|
902
|
+
readonly product: v.OptionalSchema<v.ObjectSchema<{
|
|
903
|
+
readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
|
|
904
|
+
readonly columns: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
905
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
906
|
+
readonly align: v.PicklistSchema<["left", "right", "center"], undefined>;
|
|
907
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
908
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
909
|
+
readonly type: v.PicklistSchema<["boolean", "date", "datetime", "float", "integer", "string"], undefined>;
|
|
910
|
+
}, undefined>, undefined>, v.MinLengthAction<{
|
|
911
|
+
aclProtected?: boolean | undefined;
|
|
912
|
+
align: "left" | "right" | "center";
|
|
913
|
+
id: string;
|
|
914
|
+
label: string;
|
|
915
|
+
type: "string" | "boolean" | "date" | "datetime" | "float" | "integer";
|
|
916
|
+
}[], 1, "At least one grid column is required">]>;
|
|
917
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
918
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
919
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
920
|
+
}, undefined>, undefined>;
|
|
921
|
+
readonly massActions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
922
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
923
|
+
readonly sandboxPermissions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["allow-downloads", "allow-modals", "allow-popups"], `Invalid sandbox permission. Accepted values are: ${string}`>, undefined>, v.MinLengthAction<("allow-downloads" | "allow-modals" | "allow-popups")[], 1, "sandboxPermissions must contain at least one permission when it's defined">, v.CheckAction<("allow-downloads" | "allow-modals" | "allow-popups")[], "Duplicate permissions are not allowed in sandboxPermissions">]>, undefined>;
|
|
924
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
925
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
926
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
927
|
+
readonly message: 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>;
|
|
928
|
+
readonly title: 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>;
|
|
929
|
+
}, undefined>, undefined>;
|
|
930
|
+
readonly description: 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>;
|
|
931
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
932
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
933
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
934
|
+
readonly error: 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>;
|
|
935
|
+
readonly success: 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>;
|
|
936
|
+
}, undefined>, undefined>;
|
|
937
|
+
readonly selectionLimit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
938
|
+
readonly title: 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>;
|
|
939
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
940
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
941
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
942
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
943
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
944
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
945
|
+
readonly message: 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>;
|
|
946
|
+
readonly title: 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>;
|
|
947
|
+
}, undefined>, undefined>;
|
|
948
|
+
readonly description: 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>;
|
|
949
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
950
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
951
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
952
|
+
readonly error: 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>;
|
|
953
|
+
readonly success: 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>;
|
|
954
|
+
}, undefined>, undefined>;
|
|
955
|
+
readonly selectionLimit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
956
|
+
readonly title: 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>;
|
|
957
|
+
}, undefined>], "mass action \"type\" must be either \"view\" or \"worker\"">, undefined>, undefined>;
|
|
958
|
+
}, undefined>, undefined>;
|
|
959
|
+
}, undefined>;
|
|
960
|
+
/**
|
|
961
|
+
* The Admin UI configuration for an Adobe Commerce application.
|
|
962
|
+
* @experimental
|
|
963
|
+
*/
|
|
964
|
+
type AdminUiConfiguration = v.InferInput<typeof AdminUiSchema>;
|
|
965
|
+
/**
|
|
966
|
+
* Grid columns registration configuration.
|
|
967
|
+
* @experimental
|
|
968
|
+
*/
|
|
969
|
+
type GridColumns = v.InferInput<typeof GridColumnsSchema>;
|
|
970
|
+
/**
|
|
971
|
+
* A single grid column definition.
|
|
972
|
+
* @experimental
|
|
973
|
+
*/
|
|
974
|
+
type GridColumn = v.InferInput<typeof GridColumnSchema>;
|
|
975
|
+
/**
|
|
976
|
+
* A mass action registration entry (view or worker variant).
|
|
977
|
+
* @experimental
|
|
978
|
+
*/
|
|
979
|
+
type MassAction = v.InferInput<typeof MassActionSchema>;
|
|
980
|
+
/**
|
|
981
|
+
* A view-type mass action.
|
|
982
|
+
* @experimental
|
|
983
|
+
*/
|
|
984
|
+
type ViewMassAction = v.InferInput<typeof ViewMassActionSchema>;
|
|
985
|
+
/**
|
|
986
|
+
* A worker-type mass action.
|
|
987
|
+
* @experimental
|
|
988
|
+
*/
|
|
989
|
+
type WorkerMassAction = v.InferInput<typeof WorkerMassActionSchema>;
|
|
990
|
+
/**
|
|
991
|
+
* An order view button registration entry (v2, `adminUi`).
|
|
992
|
+
* @experimental
|
|
993
|
+
*/
|
|
994
|
+
type OrderViewButton = v.InferInput<typeof OrderViewButtonSchema>;
|
|
995
|
+
/**
|
|
996
|
+
* Inlined notification strings on an `adminUi` registration entry.
|
|
997
|
+
* @experimental
|
|
998
|
+
*/
|
|
999
|
+
type Notifications = v.InferInput<typeof NotificationsSchema>;
|
|
1000
|
+
/**
|
|
1001
|
+
* Admin UI menu registration configuration.
|
|
1002
|
+
* Includes the optional `aclProtected` flag — when `true`, Commerce auto-generates
|
|
1003
|
+
* a per-app ACL resource from `metadata.id` for role-based menu access control.
|
|
1004
|
+
* @experimental
|
|
1005
|
+
*/
|
|
1006
|
+
type Menu = v.InferInput<typeof MenuSchema>;
|
|
1007
|
+
/** Config type when `adminUi` configuration is present. */
|
|
1008
|
+
type AdminUiConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = T & {
|
|
1009
|
+
adminUi: NonNullable<T["adminUi"]>;
|
|
1010
|
+
};
|
|
1011
|
+
/**
|
|
1012
|
+
* Check if config has Admin UI configuration.
|
|
1013
|
+
* @experimental
|
|
1014
|
+
*/
|
|
1015
|
+
declare function hasAdminUi<T extends AnyCommerceAppConfig>(config: T): config is AdminUiConfig<T>;
|
|
1016
|
+
//#endregion
|
|
1017
|
+
//#region source/config/schema/business-configuration.d.ts
|
|
1018
|
+
/** Config type when business config is present. */
|
|
1019
|
+
type AppConfigWithBusinessConfig<T extends AnyCommerceAppConfig> = T & {
|
|
1020
|
+
businessConfig: NonNullable<T["businessConfig"]>;
|
|
1021
|
+
};
|
|
1022
|
+
/** Config type when business config schema is present. */
|
|
1023
|
+
type AppConfigWithBusinessConfigSchema<T extends AnyCommerceAppConfig> = T & {
|
|
1024
|
+
businessConfig: NonNullable<T["businessConfig"]> & {
|
|
1025
|
+
schema: NonNullable<NonNullable<T["businessConfig"]>["schema"]>;
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
1028
|
+
/**
|
|
1029
|
+
* Check if config has business config.
|
|
1030
|
+
* @param config - The configuration to check.
|
|
1031
|
+
*/
|
|
1032
|
+
declare function hasBusinessConfig<T extends AnyCommerceAppConfig>(config: T): config is T & AppConfigWithBusinessConfig<T>;
|
|
1033
|
+
/**
|
|
1034
|
+
* Check if config has business config schema.
|
|
1035
|
+
* @param config - The configuration to check.
|
|
1036
|
+
*/
|
|
1037
|
+
declare function hasBusinessConfigSchema<T extends AnyCommerceAppConfig>(config: T): config is T & AppConfigWithBusinessConfigSchema<T>;
|
|
1038
|
+
//#endregion
|
|
1039
|
+
//#region source/config/schema/eventing.d.ts
|
|
1040
|
+
/** Schema for event provider configuration */
|
|
1041
|
+
declare const ProviderSchema: v.ObjectSchema<{
|
|
1042
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The provider description must not be longer than 255 characters">]>;
|
|
1043
|
+
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>;
|
|
1044
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The provider label must not be longer than 100 characters">]>;
|
|
1045
|
+
}, undefined>;
|
|
1046
|
+
/** Schema for Commerce event configuration */
|
|
1047
|
+
declare const CommerceEventSchema: v.ObjectSchema<{
|
|
1048
|
+
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>;
|
|
1049
|
+
readonly fields: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
1050
|
+
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 \"*\"">]>;
|
|
1051
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1052
|
+
}, undefined>, "Expected an array of event field objects with a 'name' property">, v.MinLengthAction<{
|
|
1053
|
+
name: string;
|
|
1054
|
+
source?: string | undefined;
|
|
1055
|
+
}[], 1, "The Commerce event configuration must define at least one field">]>;
|
|
1056
|
+
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1057
|
+
readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1058
|
+
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 one or more dot-separated lowercase segments containing letters and underscores only (e.g., \"observer.order_placed\", \"plugin.sales.api.order_management.place\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
1059
|
+
readonly priority: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1060
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1061
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1062
|
+
readonly operator: v.UnionSchema<v.LiteralSchema<"regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange", undefined>[], `Operator must be one of: ${string}`>;
|
|
1063
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1064
|
+
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
1065
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The event description must not be longer than 255 characters">]>;
|
|
1066
|
+
readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
|
|
1067
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
|
|
1068
|
+
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>">;
|
|
1069
|
+
}, undefined>;
|
|
1070
|
+
/** Schema for external event configuration */
|
|
1071
|
+
declare const ExternalEventSchema: v.ObjectSchema<{
|
|
1072
|
+
readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1073
|
+
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">]>;
|
|
1074
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The event description must not be longer than 255 characters">]>;
|
|
1075
|
+
readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
|
|
1076
|
+
readonly label: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
|
|
1077
|
+
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>">;
|
|
1078
|
+
}, undefined>;
|
|
1079
|
+
/** Schema for Commerce event source configuration */
|
|
1080
|
+
declare const CommerceEventSourceSchema: v.ObjectSchema<{
|
|
1081
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
1082
|
+
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>;
|
|
1083
|
+
readonly fields: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
1084
|
+
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 \"*\"">]>;
|
|
1085
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1086
|
+
}, undefined>, "Expected an array of event field objects with a 'name' property">, v.MinLengthAction<{
|
|
1087
|
+
name: string;
|
|
1088
|
+
source?: string | undefined;
|
|
1089
|
+
}[], 1, "The Commerce event configuration must define at least one field">]>;
|
|
1090
|
+
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1091
|
+
readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1092
|
+
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 one or more dot-separated lowercase segments containing letters and underscores only (e.g., \"observer.order_placed\", \"plugin.sales.api.order_management.place\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
1093
|
+
readonly priority: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1094
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1095
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1096
|
+
readonly operator: v.UnionSchema<v.LiteralSchema<"regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange", undefined>[], `Operator must be one of: ${string}`>;
|
|
1097
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1098
|
+
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
1099
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The event description must not be longer than 255 characters">]>;
|
|
1100
|
+
readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
|
|
1101
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
|
|
1102
|
+
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>">;
|
|
1103
|
+
}, undefined>, "Expected an array of Commerce events">;
|
|
1104
|
+
readonly provider: v.ObjectSchema<{
|
|
1105
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The provider description must not be longer than 255 characters">]>;
|
|
1106
|
+
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>;
|
|
1107
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The provider label must not be longer than 100 characters">]>;
|
|
1108
|
+
}, undefined>;
|
|
1109
|
+
}, undefined>;
|
|
1110
|
+
/** Schema for external event source configuration */
|
|
1111
|
+
declare const ExternalEventSourceSchema: v.ObjectSchema<{
|
|
1112
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
1113
|
+
readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1114
|
+
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">]>;
|
|
1115
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The event description must not be longer than 255 characters">]>;
|
|
1116
|
+
readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
|
|
1117
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
|
|
1118
|
+
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>">;
|
|
1119
|
+
}, undefined>, "Expected an array of external events">;
|
|
1120
|
+
readonly provider: v.ObjectSchema<{
|
|
1121
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The provider description must not be longer than 255 characters">]>;
|
|
1122
|
+
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>;
|
|
1123
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The provider label must not be longer than 100 characters">]>;
|
|
1124
|
+
}, undefined>;
|
|
1125
|
+
}, undefined>;
|
|
1126
|
+
/** Schema for eventing configuration with separate commerce and external arrays */
|
|
1127
|
+
declare const EventingSchema: v.ObjectSchema<{
|
|
1128
|
+
readonly commerce: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
1129
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
1130
|
+
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>;
|
|
1131
|
+
readonly fields: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
1132
|
+
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 \"*\"">]>;
|
|
1133
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1134
|
+
}, undefined>, "Expected an array of event field objects with a 'name' property">, v.MinLengthAction<{
|
|
1135
|
+
name: string;
|
|
1136
|
+
source?: string | undefined;
|
|
1137
|
+
}[], 1, "The Commerce event configuration must define at least one field">]>;
|
|
1138
|
+
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1139
|
+
readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1140
|
+
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 one or more dot-separated lowercase segments containing letters and underscores only (e.g., \"observer.order_placed\", \"plugin.sales.api.order_management.place\")">, v.MaxLengthAction<string, 180, "The event name must not be longer than 180 characters">]>;
|
|
1141
|
+
readonly priority: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1142
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1143
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1144
|
+
readonly operator: v.UnionSchema<v.LiteralSchema<"regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange", undefined>[], `Operator must be one of: ${string}`>;
|
|
1145
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1146
|
+
}, undefined>, "Expected an array of event rules with field, operator, and value">, undefined>;
|
|
1147
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The event description must not be longer than 255 characters">]>;
|
|
1148
|
+
readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
|
|
1149
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
|
|
1150
|
+
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>">;
|
|
1151
|
+
}, undefined>, "Expected an array of Commerce events">;
|
|
1152
|
+
readonly provider: v.ObjectSchema<{
|
|
1153
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The provider description must not be longer than 255 characters">]>;
|
|
1154
|
+
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>;
|
|
1155
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The provider label must not be longer than 100 characters">]>;
|
|
1156
|
+
}, undefined>;
|
|
1157
|
+
}, undefined>, "Expected an array of Commerce event sources">, v.CheckAction<{
|
|
1158
|
+
events: {
|
|
1159
|
+
destination?: string | undefined;
|
|
1160
|
+
fields: {
|
|
1161
|
+
name: string;
|
|
1162
|
+
source?: string | undefined;
|
|
1163
|
+
}[];
|
|
1164
|
+
force?: boolean | undefined;
|
|
1165
|
+
hipaa_audit_required?: boolean | undefined;
|
|
1166
|
+
name: string;
|
|
1167
|
+
priority?: boolean | undefined;
|
|
1168
|
+
rules?: {
|
|
1169
|
+
field: string;
|
|
1170
|
+
operator: "regex" | "greaterThan" | "lessThan" | "equal" | "in" | "onChange";
|
|
1171
|
+
value: string;
|
|
1172
|
+
}[] | undefined;
|
|
1173
|
+
description: string;
|
|
1174
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
1175
|
+
label: string;
|
|
1176
|
+
runtimeActions: string[];
|
|
1177
|
+
}[];
|
|
1178
|
+
provider: {
|
|
1179
|
+
description: string;
|
|
1180
|
+
key?: string | undefined;
|
|
1181
|
+
label: string;
|
|
1182
|
+
};
|
|
1183
|
+
}[], "Commerce provider labels must be unique">]>, undefined>;
|
|
1184
|
+
readonly external: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
1185
|
+
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
1186
|
+
readonly hipaa_audit_required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1187
|
+
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">]>;
|
|
1188
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The event description must not be longer than 255 characters">]>;
|
|
1189
|
+
readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
|
|
1190
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The event label must not be longer than 100 characters">]>;
|
|
1191
|
+
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>">;
|
|
1192
|
+
}, undefined>, "Expected an array of external events">;
|
|
1193
|
+
readonly provider: v.ObjectSchema<{
|
|
1194
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 255, "The provider description must not be longer than 255 characters">]>;
|
|
1195
|
+
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>;
|
|
1196
|
+
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.RegexAction<string, `${string} can only contain letters, numbers, spaces, underscores, hyphens, dots, colons, parentheses, commas, @, and /`>, v.MaxLengthAction<string, 100, "The provider label must not be longer than 100 characters">]>;
|
|
1197
|
+
}, undefined>;
|
|
1198
|
+
}, undefined>, "Expected an array of external event sources">, v.CheckAction<{
|
|
1199
|
+
events: {
|
|
1200
|
+
hipaa_audit_required?: boolean | undefined;
|
|
1201
|
+
name: string;
|
|
1202
|
+
description: string;
|
|
1203
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
1204
|
+
label: string;
|
|
1205
|
+
runtimeActions: string[];
|
|
1206
|
+
}[];
|
|
1207
|
+
provider: {
|
|
1208
|
+
description: string;
|
|
1209
|
+
key?: string | undefined;
|
|
1210
|
+
label: string;
|
|
1211
|
+
};
|
|
1212
|
+
}[], "External provider labels must be unique">]>, undefined>;
|
|
1213
|
+
}, undefined>;
|
|
1214
|
+
/** The eventing configuration for an Adobe Commerce application */
|
|
1215
|
+
type EventingConfiguration = v.InferInput<typeof EventingSchema>;
|
|
1216
|
+
/** Commerce event source configuration */
|
|
1217
|
+
type CommerceEventSource = v.InferInput<typeof CommerceEventSourceSchema>;
|
|
1218
|
+
/** External event source configuration */
|
|
1219
|
+
type ExternalEventSource = v.InferInput<typeof ExternalEventSourceSchema>;
|
|
1220
|
+
/** Commerce event configuration */
|
|
1221
|
+
type CommerceEvent = v.InferInput<typeof CommerceEventSchema>;
|
|
1222
|
+
/** External event configuration */
|
|
1223
|
+
type ExternalEvent = v.InferInput<typeof ExternalEventSchema>;
|
|
1224
|
+
/** Union type of all supported event configurations */
|
|
1225
|
+
type AppEvent = CommerceEvent | ExternalEvent;
|
|
1226
|
+
/** Event provider configuration */
|
|
1227
|
+
type EventProvider = v.InferInput<typeof ProviderSchema>;
|
|
1228
|
+
/** Config type when eventing is present. */
|
|
1229
|
+
type EventsConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = T & {
|
|
1230
|
+
eventing: NonNullable<T["eventing"]>;
|
|
1231
|
+
};
|
|
1232
|
+
/** Config type when commerce event sources are present. */
|
|
1233
|
+
type CommerceEventsConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = EventsConfig<T> & {
|
|
1234
|
+
eventing: EventsConfig<T>["eventing"] & {
|
|
1235
|
+
commerce: NonNullable<EventsConfig<T>["eventing"]["commerce"]>;
|
|
1236
|
+
};
|
|
1237
|
+
};
|
|
1238
|
+
/** Config type when external event sources are present. */
|
|
1239
|
+
type ExternalEventsConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = EventsConfig<T> & {
|
|
1240
|
+
eventing: EventsConfig<T>["eventing"] & {
|
|
1241
|
+
external: NonNullable<EventsConfig<T>["eventing"]["external"]>;
|
|
1242
|
+
};
|
|
1243
|
+
};
|
|
1244
|
+
/**
|
|
1245
|
+
* Check if config has commerce event sources.
|
|
1246
|
+
* @param config - The configuration to check.
|
|
1247
|
+
*/
|
|
1248
|
+
declare function hasCommerceEvents<T extends AnyCommerceAppConfig>(config: T): config is T & CommerceEventsConfig<T>;
|
|
1249
|
+
/**
|
|
1250
|
+
* Check if config has external event sources.
|
|
1251
|
+
* @param config - The configuration to check.
|
|
1252
|
+
*/
|
|
1253
|
+
declare function hasExternalEvents<T extends AnyCommerceAppConfig>(config: T): config is T & ExternalEventsConfig<T>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Check if config has any eventing configuration.
|
|
1256
|
+
* @param config - The configuration to check.
|
|
1257
|
+
*/
|
|
1258
|
+
declare function hasEventing<T extends AnyCommerceAppConfig>(config: T): config is T & EventsConfig<T>;
|
|
1259
|
+
//#endregion
|
|
1260
|
+
//#region source/config/schema/installation.d.ts
|
|
1261
|
+
/** Config type when installation settings are present. */
|
|
1262
|
+
type InstallationConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = T & {
|
|
1263
|
+
installation: NonNullable<T["installation"]>;
|
|
1264
|
+
};
|
|
1265
|
+
/** Config type when custom installation steps are present. */
|
|
1266
|
+
type ConfigWithInstallationSteps<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = InstallationConfig<T> & {
|
|
1267
|
+
installation: InstallationConfig<T>["installation"] & {
|
|
1268
|
+
customInstallationSteps: NonNullable<InstallationConfig<T>["installation"]["customInstallationSteps"]>;
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
/**
|
|
1272
|
+
* Check if config has custom installation settings.
|
|
1273
|
+
* @param config - The configuration to check.
|
|
1274
|
+
*/
|
|
1275
|
+
declare function hasCustomInstallation<T extends AnyCommerceAppConfig>(config: T): config is T & InstallationConfig<T>;
|
|
1276
|
+
/**
|
|
1277
|
+
* Check if config has custom installation steps.
|
|
1278
|
+
* @param config - The configuration to check.
|
|
1279
|
+
*/
|
|
1280
|
+
declare function hasCustomInstallationSteps<T extends AnyCommerceAppConfig>(config: T): config is T & ConfigWithInstallationSteps<T>;
|
|
1281
|
+
//#endregion
|
|
1282
|
+
//#region source/config/schema/metadata.d.ts
|
|
1283
|
+
/** The schema for the metadata of the application. */
|
|
1284
|
+
declare const MetadataSchema: v.ObjectSchema<{
|
|
1285
|
+
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">]>;
|
|
1286
|
+
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">]>;
|
|
1287
|
+
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">]>;
|
|
1288
|
+
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')">]>;
|
|
1289
|
+
}, undefined>;
|
|
1290
|
+
/** The metadata associated to an Adobe Commerce application. */
|
|
1291
|
+
type ApplicationMetadata = v.InferInput<typeof MetadataSchema>;
|
|
1292
|
+
/** Config type when metadata is present. */
|
|
1293
|
+
type AppConfigWithMetadata<T extends AnyCommerceAppConfig> = T & {
|
|
1294
|
+
metadata: NonNullable<T["metadata"]>;
|
|
1295
|
+
};
|
|
1296
|
+
/**
|
|
1297
|
+
* Check if config has metadata.
|
|
1298
|
+
* @param config - The configuration to check.
|
|
1299
|
+
*/
|
|
1300
|
+
declare function hasMetadata<T extends AnyCommerceAppConfig>(config: T): config is T & AppConfigWithMetadata<T>;
|
|
1301
|
+
//#endregion
|
|
1302
|
+
//#region source/config/schema/webhooks.d.ts
|
|
1303
|
+
/** Schema for webhook field configuration (name and optional source). */
|
|
1304
|
+
declare const WebhookFieldSchema: v.ObjectSchema<{
|
|
1305
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1306
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1307
|
+
}, undefined>;
|
|
1308
|
+
/** Schema for webhook rule configuration (field, operator, value). */
|
|
1309
|
+
declare const WebhookRuleSchema: v.ObjectSchema<{
|
|
1310
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1311
|
+
readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1312
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1313
|
+
}, undefined>;
|
|
1314
|
+
/** Schema for webhook header configuration (name, value). */
|
|
1315
|
+
declare const WebhookHeaderSchema: v.ObjectSchema<{
|
|
1316
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1317
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1318
|
+
}, undefined>;
|
|
1319
|
+
/** Schema for the nested webhook payload without url — used when runtimeAction resolves the URL at runtime. */
|
|
1320
|
+
declare const WebhookDefinitionBaseSchema: v.ObjectSchema<{
|
|
1321
|
+
readonly batch_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
|
|
1322
|
+
readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1323
|
+
readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1324
|
+
readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1325
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1326
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1327
|
+
}, undefined>, "Expected an array of webhook field objects">, undefined>;
|
|
1328
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1329
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1330
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1331
|
+
}, undefined>, "Expected an array of webhook header objects">, undefined>;
|
|
1332
|
+
readonly hook_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
|
|
1333
|
+
readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1334
|
+
readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1335
|
+
readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1336
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1337
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1338
|
+
readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1339
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1340
|
+
}, undefined>, "Expected an array of webhook rule objects">, undefined>;
|
|
1341
|
+
readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1342
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1343
|
+
readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1344
|
+
readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1345
|
+
readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1346
|
+
}, undefined>;
|
|
1347
|
+
/** Schema for the nested webhook payload with a required url. */
|
|
1348
|
+
declare const WebhookDefinitionWithUrlSchema: v.ObjectSchema<{
|
|
1349
|
+
readonly url: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.UrlAction<string, "The 'url' field must be a valid absolute URL (e.g., 'https://example.com/webhook')">]>;
|
|
1350
|
+
readonly batch_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
|
|
1351
|
+
readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1352
|
+
readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1353
|
+
readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1354
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1355
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1356
|
+
}, undefined>, "Expected an array of webhook field objects">, undefined>;
|
|
1357
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1358
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1359
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1360
|
+
}, undefined>, "Expected an array of webhook header objects">, undefined>;
|
|
1361
|
+
readonly hook_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
|
|
1362
|
+
readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1363
|
+
readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1364
|
+
readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1365
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1366
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1367
|
+
readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1368
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1369
|
+
}, undefined>, "Expected an array of webhook rule objects">, undefined>;
|
|
1370
|
+
readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1371
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1372
|
+
readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1373
|
+
readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1374
|
+
readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1375
|
+
}, undefined>;
|
|
1376
|
+
/** Schema for a single webhook entry — either runtimeAction (no url) or explicit url (no runtimeAction). */
|
|
1377
|
+
declare const WebhookEntrySchema: v.UnionSchema<[v.ObjectSchema<{
|
|
1378
|
+
readonly requireAdobeAuth: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1379
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1380
|
+
readonly webhook: v.ObjectSchema<{
|
|
1381
|
+
readonly batch_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
|
|
1382
|
+
readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1383
|
+
readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1384
|
+
readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1385
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1386
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1387
|
+
}, undefined>, "Expected an array of webhook field objects">, undefined>;
|
|
1388
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1389
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1390
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1391
|
+
}, undefined>, "Expected an array of webhook header objects">, undefined>;
|
|
1392
|
+
readonly hook_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
|
|
1393
|
+
readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1394
|
+
readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1395
|
+
readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1396
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1397
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1398
|
+
readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1399
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1400
|
+
}, undefined>, "Expected an array of webhook rule objects">, undefined>;
|
|
1401
|
+
readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1402
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1403
|
+
readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1404
|
+
readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1405
|
+
readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1406
|
+
}, undefined>;
|
|
1407
|
+
readonly category: v.OptionalSchema<v.PicklistSchema<readonly ["validation", "append", "modification"], `Webhook category must be one of: ${string}`>, undefined>;
|
|
1408
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1409
|
+
readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
|
|
1410
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1411
|
+
}, undefined>, v.ObjectSchema<{
|
|
1412
|
+
readonly webhook: v.ObjectSchema<{
|
|
1413
|
+
readonly url: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.UrlAction<string, "The 'url' field must be a valid absolute URL (e.g., 'https://example.com/webhook')">]>;
|
|
1414
|
+
readonly batch_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
|
|
1415
|
+
readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1416
|
+
readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1417
|
+
readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1418
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1419
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1420
|
+
}, undefined>, "Expected an array of webhook field objects">, undefined>;
|
|
1421
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1422
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1423
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1424
|
+
}, undefined>, "Expected an array of webhook header objects">, undefined>;
|
|
1425
|
+
readonly hook_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
|
|
1426
|
+
readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1427
|
+
readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1428
|
+
readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1429
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1430
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1431
|
+
readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1432
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1433
|
+
}, undefined>, "Expected an array of webhook rule objects">, undefined>;
|
|
1434
|
+
readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1435
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1436
|
+
readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1437
|
+
readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1438
|
+
readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1439
|
+
}, undefined>;
|
|
1440
|
+
readonly category: v.OptionalSchema<v.PicklistSchema<readonly ["validation", "append", "modification"], `Webhook category must be one of: ${string}`>, undefined>;
|
|
1441
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1442
|
+
readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
|
|
1443
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1444
|
+
}, undefined>], "Each webhook entry must define either a 'runtimeAction' (to resolve the URL from a runtime action) or an explicit 'url' inside the 'webhook' object, but not both">;
|
|
1445
|
+
/** Schema for the optional webhooks array (when present, must have at least one item). */
|
|
1446
|
+
declare const WebhooksSchema: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
1447
|
+
readonly requireAdobeAuth: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1448
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1449
|
+
readonly webhook: v.ObjectSchema<{
|
|
1450
|
+
readonly batch_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
|
|
1451
|
+
readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1452
|
+
readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1453
|
+
readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1454
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1455
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1456
|
+
}, undefined>, "Expected an array of webhook field objects">, undefined>;
|
|
1457
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1458
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1459
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1460
|
+
}, undefined>, "Expected an array of webhook header objects">, undefined>;
|
|
1461
|
+
readonly hook_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
|
|
1462
|
+
readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1463
|
+
readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1464
|
+
readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1465
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1466
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1467
|
+
readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1468
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1469
|
+
}, undefined>, "Expected an array of webhook rule objects">, undefined>;
|
|
1470
|
+
readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1471
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1472
|
+
readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1473
|
+
readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1474
|
+
readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1475
|
+
}, undefined>;
|
|
1476
|
+
readonly category: v.OptionalSchema<v.PicklistSchema<readonly ["validation", "append", "modification"], `Webhook category must be one of: ${string}`>, undefined>;
|
|
1477
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1478
|
+
readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
|
|
1479
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1480
|
+
}, undefined>, v.ObjectSchema<{
|
|
1481
|
+
readonly webhook: v.ObjectSchema<{
|
|
1482
|
+
readonly url: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.UrlAction<string, "The 'url' field must be a valid absolute URL (e.g., 'https://example.com/webhook')">]>;
|
|
1483
|
+
readonly batch_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "batch_name must contain only letters, numbers, and underscores">]>;
|
|
1484
|
+
readonly batch_order: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1485
|
+
readonly fallback_error_message: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1486
|
+
readonly fields: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1487
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1488
|
+
readonly source: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
1489
|
+
}, undefined>, "Expected an array of webhook field objects">, undefined>;
|
|
1490
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1491
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1492
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1493
|
+
}, undefined>, "Expected an array of webhook header objects">, undefined>;
|
|
1494
|
+
readonly hook_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>, v.RegexAction<string, "hook_name must contain only letters, numbers, and underscores">]>;
|
|
1495
|
+
readonly method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1496
|
+
readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1497
|
+
readonly required: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
1498
|
+
readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1499
|
+
readonly field: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1500
|
+
readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1501
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1502
|
+
}, undefined>, "Expected an array of webhook rule objects">, undefined>;
|
|
1503
|
+
readonly soft_timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1504
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1505
|
+
readonly ttl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<`Expected a number value for '${string}'`>, v.MinValueAction<number, 0, `The value of ${string} must be a non-negative number`>]>, undefined>;
|
|
1506
|
+
readonly webhook_method: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1507
|
+
readonly webhook_type: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1508
|
+
}, undefined>;
|
|
1509
|
+
readonly category: v.OptionalSchema<v.PicklistSchema<readonly ["validation", "append", "modification"], `Webhook category must be one of: ${string}`>, undefined>;
|
|
1510
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1511
|
+
readonly env: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["paas", "saas"], `Expected one of: ${string}`>, "Expected an array of commerce environments for the field \"env\"">, v.NonEmptyAction<("paas" | "saas")[], "The \"env\" array must contain at least one commerce environment">]>, undefined>;
|
|
1512
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1513
|
+
}, undefined>], "Each webhook entry must define either a 'runtimeAction' (to resolve the URL from a runtime action) or an explicit 'url' inside the 'webhook' object, but not both">, "Expected an array of webhook entries">, v.MinLengthAction<({
|
|
1514
|
+
requireAdobeAuth?: boolean | undefined;
|
|
1515
|
+
runtimeAction: string;
|
|
1516
|
+
webhook: {
|
|
1517
|
+
batch_name: string;
|
|
1518
|
+
batch_order?: number | undefined;
|
|
1519
|
+
fallback_error_message?: string | undefined;
|
|
1520
|
+
fields?: {
|
|
1521
|
+
name: string;
|
|
1522
|
+
source?: string | undefined;
|
|
1523
|
+
}[] | undefined;
|
|
1524
|
+
headers?: {
|
|
1525
|
+
name: string;
|
|
1526
|
+
value: string;
|
|
1527
|
+
}[] | undefined;
|
|
1528
|
+
hook_name: string;
|
|
1529
|
+
method: string;
|
|
1530
|
+
priority?: number | undefined;
|
|
1531
|
+
required?: boolean | undefined;
|
|
1532
|
+
rules?: {
|
|
1533
|
+
field: string;
|
|
1534
|
+
operator: string;
|
|
1535
|
+
value: string;
|
|
1536
|
+
}[] | undefined;
|
|
1537
|
+
soft_timeout?: number | undefined;
|
|
1538
|
+
timeout?: number | undefined;
|
|
1539
|
+
ttl?: number | undefined;
|
|
1540
|
+
webhook_method: string;
|
|
1541
|
+
webhook_type: string;
|
|
1542
|
+
};
|
|
1543
|
+
category?: "validation" | "append" | "modification" | undefined;
|
|
1544
|
+
description: string;
|
|
1545
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
1546
|
+
label: string;
|
|
1547
|
+
} | {
|
|
1548
|
+
webhook: {
|
|
1549
|
+
url: string;
|
|
1550
|
+
batch_name: string;
|
|
1551
|
+
batch_order?: number | undefined;
|
|
1552
|
+
fallback_error_message?: string | undefined;
|
|
1553
|
+
fields?: {
|
|
1554
|
+
name: string;
|
|
1555
|
+
source?: string | undefined;
|
|
1556
|
+
}[] | undefined;
|
|
1557
|
+
headers?: {
|
|
1558
|
+
name: string;
|
|
1559
|
+
value: string;
|
|
1560
|
+
}[] | undefined;
|
|
1561
|
+
hook_name: string;
|
|
1562
|
+
method: string;
|
|
1563
|
+
priority?: number | undefined;
|
|
1564
|
+
required?: boolean | undefined;
|
|
1565
|
+
rules?: {
|
|
1566
|
+
field: string;
|
|
1567
|
+
operator: string;
|
|
1568
|
+
value: string;
|
|
1569
|
+
}[] | undefined;
|
|
1570
|
+
soft_timeout?: number | undefined;
|
|
1571
|
+
timeout?: number | undefined;
|
|
1572
|
+
ttl?: number | undefined;
|
|
1573
|
+
webhook_method: string;
|
|
1574
|
+
webhook_type: string;
|
|
1575
|
+
};
|
|
1576
|
+
category?: "validation" | "append" | "modification" | undefined;
|
|
1577
|
+
description: string;
|
|
1578
|
+
env?: ("paas" | "saas")[] | undefined;
|
|
1579
|
+
label: string;
|
|
1580
|
+
})[], 1, "webhooks array must contain at least one webhook when present">]>, undefined>;
|
|
1581
|
+
/** Webhook field configuration */
|
|
1582
|
+
type WebhookField = v.InferInput<typeof WebhookFieldSchema>;
|
|
1583
|
+
/** Webhook rule configuration */
|
|
1584
|
+
type WebhookRule = v.InferInput<typeof WebhookRuleSchema>;
|
|
1585
|
+
/** Webhook header configuration */
|
|
1586
|
+
type WebhookHeader = v.InferInput<typeof WebhookHeaderSchema>;
|
|
1587
|
+
/** Nested webhook payload (webhook_method, fields, etc.) — union of base shape and url-carrying shape. */
|
|
1588
|
+
type WebhookDefinition = v.InferInput<typeof WebhookDefinitionBaseSchema> | v.InferInput<typeof WebhookDefinitionWithUrlSchema>;
|
|
1589
|
+
/** Single webhook entry — either runtimeAction-based or url-based (mutually exclusive at the type level). */
|
|
1590
|
+
type WebhookEntry = v.InferInput<typeof WebhookEntrySchema>;
|
|
1591
|
+
/** Webhooks configuration (array of webhook entries). */
|
|
1592
|
+
type WebhooksConfiguration = v.InferInput<typeof WebhooksSchema>;
|
|
1593
|
+
/** Config type when webhooks are present (non-empty array). */
|
|
1594
|
+
type WebhooksConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = T & {
|
|
1595
|
+
webhooks: NonNullable<T["webhooks"]>;
|
|
1596
|
+
};
|
|
1597
|
+
/**
|
|
1598
|
+
* Check if config has webhooks (non-empty array).
|
|
1599
|
+
* @param config - The configuration to check.
|
|
1600
|
+
*/
|
|
1601
|
+
declare function hasWebhooks<T extends AnyCommerceAppConfig>(config: T): config is T & WebhooksConfig<T>;
|
|
1602
|
+
//#endregion
|
|
1603
|
+
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, hasAdminUi, hasBusinessConfig, hasBusinessConfigSchema, hasCommerceEvents, hasConfigDomain, hasCustomInstallation, hasCustomInstallationSteps, hasEventing, hasExternalEvents, hasMetadata, hasWebhooks, parseCommerceAppConfig, readCommerceAppConfig, resolveCommerceAppConfig, validateCommerceAppConfig, validateCommerceAppConfigDomain };
|