@adobe/aio-commerce-lib-app 2.1.0 → 2.2.0-alpha-20261110171457
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 +21 -0
- package/dist/cjs/actions/app-config/index.cjs +5 -5
- package/dist/cjs/actions/app-config/index.d.cts +2 -2
- package/dist/cjs/actions/association/index.cjs +2 -2
- package/dist/cjs/actions/config/index.cjs +2 -2
- package/dist/cjs/actions/config/index.d.cts +2 -2
- package/dist/cjs/actions/installation/index.cjs +61 -21
- package/dist/cjs/actions/installation/index.d.cts +4 -3
- package/dist/cjs/actions/scope-tree/index.cjs +2 -2
- package/dist/cjs/{app-Ch19CR6g.d.cts → app-DREvtzyX.d.cts} +330 -4
- package/dist/cjs/commands/index.cjs +27 -12
- package/dist/cjs/config/index.browser.d.cts +2 -1
- package/dist/cjs/config/index.node.cjs +3 -3
- package/dist/cjs/config/index.node.d.cts +96 -8
- package/dist/{es/define-C95h_wa0.d.mts → cjs/define-DW6Vzfku.d.cts} +1 -1
- package/dist/cjs/{index-D-Qn-irL.d.cts → index-B9MUZY-U.d.cts} +316 -316
- package/dist/cjs/{index-DWEigxhy.d.cts → index-vAue-u_y.d.cts} +1 -4
- package/dist/cjs/index.d.cts +8 -8
- package/dist/cjs/{index.node-CxdwPrOg.cjs → index.node-CcH8PCzC.cjs} +1 -1
- package/dist/cjs/management/index.cjs +1 -1
- package/dist/cjs/management/index.d.cts +6 -1
- package/dist/cjs/{management-C_JQpgVB.cjs → management-DeRZYcjS.cjs} +17 -5
- package/dist/cjs/{openapi-DFoMdZzI.cjs → openapi-CFqaMxUV.cjs} +426 -45
- package/dist/cjs/types-DslZGym8.d.cts +23 -0
- package/dist/cjs/{validate-B0rOILvG.cjs → validate-DAw7Pxp3.cjs} +1 -1
- package/dist/cjs/{router-DpB8wpR2.cjs → version-BACmFGD2.cjs} +77 -19
- package/dist/{es/webhooks-C9vMZZDZ.d.mts → cjs/webhooks-BMSr1l7c.d.cts} +268 -12
- package/dist/cjs/{webhooks-TvDm57xt.cjs → webhooks-EVlO8rxi.cjs} +53 -12
- package/dist/es/actions/app-config/index.d.mts +2 -2
- package/dist/es/actions/app-config/index.mjs +5 -5
- package/dist/es/actions/association/index.mjs +2 -2
- package/dist/es/actions/config/index.d.mts +1 -1
- package/dist/es/actions/config/index.mjs +2 -2
- package/dist/es/actions/installation/index.d.mts +4 -3
- package/dist/es/actions/installation/index.mjs +62 -22
- package/dist/es/actions/scope-tree/index.mjs +2 -2
- package/dist/es/{app-Ch19CR6g.d.mts → app-DREvtzyX.d.mts} +330 -4
- package/dist/es/commands/index.mjs +27 -12
- package/dist/es/config/index.browser.d.mts +2 -1
- package/dist/es/config/index.node.d.mts +95 -6
- package/dist/es/config/index.node.mjs +3 -3
- package/dist/{cjs/define-C12IwNNN.d.cts → es/define-B6cjhz1J.d.mts} +1 -1
- package/dist/es/{index-CgsSXApi.d.mts → index-DUJtT78x.d.mts} +2 -2
- package/dist/es/{index-VgCNSlLP.d.mts → index-zgc3l2nj.d.mts} +2 -2
- package/dist/es/index.d.mts +8 -8
- package/dist/es/{index.node-C8EXBW94.mjs → index.node-ClvSfs5w.mjs} +1 -1
- package/dist/es/management/index.d.mts +6 -1
- package/dist/es/management/index.mjs +1 -1
- package/dist/es/{management-DKDR7-fX.mjs → management-CG_4z2Ck.mjs} +17 -5
- package/dist/es/{openapi-E_1RFhAr.mjs → openapi-BUIws500.mjs} +426 -45
- package/dist/es/types-DslZGym8.d.mts +23 -0
- package/dist/es/{validate-CiJIjyOr.mjs → validate-BszbuhiE.mjs} +1 -1
- package/dist/es/{router-C23GIyGQ.mjs → version-CabzC7R9.mjs} +71 -20
- package/dist/{cjs/webhooks-Buu1d7AB.d.cts → es/webhooks-BLgKadnn.d.mts} +268 -12
- package/dist/es/{webhooks-CfrYeMy_.mjs → webhooks-DRPXVMMo.mjs} +48 -13
- package/package.json +4 -4
|
@@ -0,0 +1,23 @@
|
|
|
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 { CommerceEnv } from "@adobe/aio-commerce-lib-core/commerce";
|
|
16
|
+
/** The Commerce instance data an app is associated with. */
|
|
17
|
+
type AssociatedCommerceData = {
|
|
18
|
+
/** Commerce API base URL. */
|
|
19
|
+
baseUrl: string;
|
|
20
|
+
/** Deployment type of the Commerce instance. */
|
|
21
|
+
env: CommerceEnv;
|
|
22
|
+
};
|
|
23
|
+
export { AssociatedCommerceData as t };
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
const require_rolldown_runtime = require("./rolldown-runtime-CoOt0iuZ.cjs");
|
|
16
|
-
const require_webhooks = require("./webhooks-
|
|
16
|
+
const require_webhooks = require("./webhooks-EVlO8rxi.cjs");
|
|
17
17
|
const require_schemas = require("./schemas-B6ITl1bG.cjs");
|
|
18
18
|
let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
|
|
19
19
|
let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
|
|
@@ -17,6 +17,8 @@ let _adobe_aio_commerce_lib_core_responses = require("@adobe/aio-commerce-lib-co
|
|
|
17
17
|
let _adobe_aio_lib_core_logging = require("@adobe/aio-lib-core-logging");
|
|
18
18
|
_adobe_aio_lib_core_logging = require_rolldown_runtime.__toESM(_adobe_aio_lib_core_logging, 1);
|
|
19
19
|
let regexparam = require("regexparam");
|
|
20
|
+
let _adobe_aio_commerce_lib_config_package_json = require("@adobe/aio-commerce-lib-config/package.json");
|
|
21
|
+
_adobe_aio_commerce_lib_config_package_json = require_rolldown_runtime.__toESM(_adobe_aio_commerce_lib_config_package_json, 1);
|
|
20
22
|
|
|
21
23
|
// ../../packages-private/common-utils/source/actions/http/middleware/logger.ts
|
|
22
24
|
/**
|
|
@@ -159,6 +161,36 @@ function parseQueryParams(queryString, fallbackParams) {
|
|
|
159
161
|
var HttpActionRouter = class HttpActionRouter {
|
|
160
162
|
routes = [];
|
|
161
163
|
contextBuilders = [];
|
|
164
|
+
defaultHeaders;
|
|
165
|
+
/**
|
|
166
|
+
* @param options - Router options.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```typescript
|
|
170
|
+
* const router = new HttpActionRouter({ headers: { "x-content-type-options": "nosniff" } });
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
constructor(options = {}) {
|
|
174
|
+
this.defaultHeaders = { ...options.headers };
|
|
175
|
+
}
|
|
176
|
+
/** Adds the default headers to a response. Headers already on the response win. */
|
|
177
|
+
withDefaultHeaders(response) {
|
|
178
|
+
const defaults = Object.entries(this.defaultHeaders);
|
|
179
|
+
if (defaults.length === 0) return response;
|
|
180
|
+
const headers = { ...(response.type === "error" ? response.error : response).headers };
|
|
181
|
+
const present = new Set(Object.keys(headers).map((k) => k.toLowerCase()));
|
|
182
|
+
for (const [name, value] of defaults) if (!present.has(name.toLowerCase())) headers[name] = value;
|
|
183
|
+
return response.type === "error" ? {
|
|
184
|
+
...response,
|
|
185
|
+
error: {
|
|
186
|
+
...response.error,
|
|
187
|
+
headers
|
|
188
|
+
}
|
|
189
|
+
} : {
|
|
190
|
+
...response,
|
|
191
|
+
headers
|
|
192
|
+
};
|
|
193
|
+
}
|
|
162
194
|
/**
|
|
163
195
|
* Internal method to add a route to the router.
|
|
164
196
|
*/
|
|
@@ -390,34 +422,60 @@ var HttpActionRouter = class HttpActionRouter {
|
|
|
390
422
|
* ```
|
|
391
423
|
*/
|
|
392
424
|
handler() {
|
|
393
|
-
return async (args) =>
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
if (
|
|
410
|
-
return
|
|
411
|
-
}
|
|
425
|
+
return async (args) => this.withDefaultHeaders(await this.dispatch(args));
|
|
426
|
+
}
|
|
427
|
+
/** Matches the request to a route and runs it. */
|
|
428
|
+
async dispatch(args) {
|
|
429
|
+
const method = (args.__ow_method ?? "get").toUpperCase();
|
|
430
|
+
const rawPath = args.__ow_path ?? "/";
|
|
431
|
+
const path = rawPath.startsWith("/") ? rawPath : `/${rawPath}`;
|
|
432
|
+
const headers = args.__ow_headers ?? {};
|
|
433
|
+
const body = parseRequestBody(args.__ow_body, args);
|
|
434
|
+
const query = parseQueryParams(args.__ow_query, args);
|
|
435
|
+
const context = await this.buildContext(args);
|
|
436
|
+
const matchedMethods = [];
|
|
437
|
+
for (const route of this.routes) {
|
|
438
|
+
const match = route.pattern.exec(path);
|
|
439
|
+
if (!match) continue;
|
|
440
|
+
matchedMethods.push(route.method);
|
|
441
|
+
if (route.method !== method) continue;
|
|
442
|
+
return await HttpActionRouter.handleRoute(route, match, body, query, headers, method, path, context);
|
|
443
|
+
}
|
|
444
|
+
if (matchedMethods.length > 0) return (0, _adobe_aio_commerce_lib_core_responses.methodNotAllowed)(`Method ${method} not allowed`);
|
|
445
|
+
return (0, _adobe_aio_commerce_lib_core_responses.notFound)(`No route matches ${path}`);
|
|
412
446
|
}
|
|
413
447
|
};
|
|
414
448
|
|
|
449
|
+
// source/actions/version.ts
|
|
450
|
+
/**
|
|
451
|
+
* Name of the response header that carries the versions of the SDK libraries the app-management
|
|
452
|
+
* endpoints were built with. These are not the app's own version.
|
|
453
|
+
*/
|
|
454
|
+
const SDK_LIB_VERSIONS_HEADER = "x-ac-sdk-lib-versions";
|
|
455
|
+
const UNKNOWN_VERSION = "unknown";
|
|
456
|
+
/**
|
|
457
|
+
* Value of {@link SDK_LIB_VERSIONS_HEADER}, an RFC 8941 dictionary with string values, e.g.
|
|
458
|
+
* `lib-app="2.2.0", lib-config="1.4.1"`. TSDown and Vitest replace `__PKG_VERSION__` for
|
|
459
|
+
* `lib-app`, which is "unknown" when the variable is not defined. `lib-config` is the version
|
|
460
|
+
* in the `package.json` of the copy of lib-config that lib-app loads, which the app's bundler
|
|
461
|
+
* resolves when it builds the action.
|
|
462
|
+
*/
|
|
463
|
+
const SDK_LIB_VERSIONS = [["lib-app", "2.2.0-alpha-20261110171457"], ["lib-config", _adobe_aio_commerce_lib_config_package_json.default.version ?? UNKNOWN_VERSION]].map(([name, version]) => `${name}="${version}"`).join(", ");
|
|
464
|
+
/** Headers every app-management router adds to its responses. */
|
|
465
|
+
const SDK_LIB_VERSIONS_HEADERS = { [SDK_LIB_VERSIONS_HEADER]: SDK_LIB_VERSIONS };
|
|
466
|
+
|
|
415
467
|
Object.defineProperty(exports, "HttpActionRouter", {
|
|
416
468
|
enumerable: true,
|
|
417
469
|
get: function () {
|
|
418
470
|
return HttpActionRouter;
|
|
419
471
|
}
|
|
420
472
|
});
|
|
473
|
+
Object.defineProperty(exports, "SDK_LIB_VERSIONS_HEADERS", {
|
|
474
|
+
enumerable: true,
|
|
475
|
+
get: function () {
|
|
476
|
+
return SDK_LIB_VERSIONS_HEADERS;
|
|
477
|
+
}
|
|
478
|
+
});
|
|
421
479
|
Object.defineProperty(exports, "logger", {
|
|
422
480
|
enumerable: true,
|
|
423
481
|
get: function () {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { r as CommerceAppConfigOutputModel, t as AnyCommerceAppConfig } from "./app-
|
|
15
|
+
import { r as CommerceAppConfigOutputModel, t as AnyCommerceAppConfig } from "./app-DREvtzyX.cjs";
|
|
16
16
|
import * as v from "valibot";
|
|
17
17
|
declare const NotificationsSchema: v.ObjectSchema<{
|
|
18
18
|
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>;
|
|
@@ -167,6 +167,82 @@ declare const OrderViewButtonSchema: v.VariantSchema<"type", [v.StrictObjectSche
|
|
|
167
167
|
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>;
|
|
168
168
|
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
169
169
|
}, undefined>], undefined>;
|
|
170
|
+
declare const InvoiceViewButtonSchema: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
171
|
+
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>;
|
|
172
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
173
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
174
|
+
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>;
|
|
175
|
+
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>;
|
|
176
|
+
}, undefined>, undefined>;
|
|
177
|
+
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>;
|
|
178
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
179
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
180
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
181
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
182
|
+
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>;
|
|
183
|
+
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>;
|
|
184
|
+
}, undefined>, undefined>;
|
|
185
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
186
|
+
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>;
|
|
187
|
+
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>;
|
|
188
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
189
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
190
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
191
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
192
|
+
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>;
|
|
193
|
+
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>;
|
|
194
|
+
}, undefined>, undefined>;
|
|
195
|
+
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>;
|
|
196
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
197
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
198
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
199
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
200
|
+
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>;
|
|
201
|
+
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>;
|
|
202
|
+
}, undefined>, undefined>;
|
|
203
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
204
|
+
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>;
|
|
205
|
+
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>;
|
|
206
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
207
|
+
}, undefined>], undefined>;
|
|
208
|
+
declare const CreditMemoViewButtonSchema: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
209
|
+
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>;
|
|
210
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
211
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
212
|
+
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>;
|
|
213
|
+
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>;
|
|
214
|
+
}, undefined>, undefined>;
|
|
215
|
+
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>;
|
|
216
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
217
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
218
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
219
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
220
|
+
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>;
|
|
221
|
+
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>;
|
|
222
|
+
}, undefined>, undefined>;
|
|
223
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
224
|
+
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>;
|
|
225
|
+
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>;
|
|
226
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
227
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
228
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
229
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
230
|
+
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>;
|
|
231
|
+
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>;
|
|
232
|
+
}, undefined>, undefined>;
|
|
233
|
+
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>;
|
|
234
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
235
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
236
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
237
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
238
|
+
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>;
|
|
239
|
+
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>;
|
|
240
|
+
}, undefined>, undefined>;
|
|
241
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
242
|
+
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>;
|
|
243
|
+
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>;
|
|
244
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
245
|
+
}, undefined>], undefined>;
|
|
170
246
|
declare const MenuSchema: v.ObjectSchema<{
|
|
171
247
|
/**
|
|
172
248
|
* When `true`, Commerce auto-generates a per-app ACL resource id from `metadata.id`
|
|
@@ -181,6 +257,12 @@ declare const MenuSchema: v.ObjectSchema<{
|
|
|
181
257
|
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>;
|
|
182
258
|
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>;
|
|
183
259
|
}, undefined>;
|
|
260
|
+
declare const NativeUiReplacedPageSchema: v.StrictObjectSchema<{
|
|
261
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
262
|
+
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>;
|
|
263
|
+
readonly target: v.PicklistSchema<readonly ["order.create", "return.create"], `Invalid native UI replaced page target. Accepted values are: ${string}`>;
|
|
264
|
+
readonly title: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
265
|
+
}, undefined>;
|
|
184
266
|
/** A top-level acl entry: a leaf, or a group carrying leaf children (exactly one level of nesting). */
|
|
185
267
|
declare const AclResourceEntrySchema: v.StrictObjectSchema<{
|
|
186
268
|
readonly children: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
@@ -198,7 +280,7 @@ declare const AclResourceEntrySchema: v.StrictObjectSchema<{
|
|
|
198
280
|
}, undefined>;
|
|
199
281
|
/**
|
|
200
282
|
* Schema for the `adminUi` config section.
|
|
201
|
-
* Supports grid column extensions, mass actions, order view buttons, menu, and custom ACL resources on `commerce/backend-ui/2`.
|
|
283
|
+
* Supports grid column extensions, mass actions, order, invoice, and credit memo view buttons, menu, native UI replaced pages, and custom ACL resources on `commerce/backend-ui/2`.
|
|
202
284
|
*/
|
|
203
285
|
declare const AdminUiSchema: v.ObjectSchema<{
|
|
204
286
|
readonly acl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
@@ -261,6 +343,81 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
261
343
|
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
262
344
|
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
263
345
|
}, undefined>, undefined>;
|
|
346
|
+
readonly viewButtons: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
347
|
+
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>;
|
|
348
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
349
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
350
|
+
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>;
|
|
351
|
+
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>;
|
|
352
|
+
}, undefined>, undefined>;
|
|
353
|
+
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>;
|
|
354
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
355
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
356
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
357
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
358
|
+
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>;
|
|
359
|
+
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>;
|
|
360
|
+
}, undefined>, undefined>;
|
|
361
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
362
|
+
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>;
|
|
363
|
+
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>;
|
|
364
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
365
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
366
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
367
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
368
|
+
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>;
|
|
369
|
+
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>;
|
|
370
|
+
}, undefined>, undefined>;
|
|
371
|
+
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>;
|
|
372
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
373
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
374
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
375
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
376
|
+
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>;
|
|
377
|
+
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>;
|
|
378
|
+
}, undefined>, undefined>;
|
|
379
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
380
|
+
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>;
|
|
381
|
+
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>;
|
|
382
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
383
|
+
}, undefined>], undefined>, undefined>, v.CheckAction<({
|
|
384
|
+
title?: string | undefined;
|
|
385
|
+
aclProtected?: boolean | undefined;
|
|
386
|
+
confirm?: {
|
|
387
|
+
message?: string | undefined;
|
|
388
|
+
title?: string | undefined;
|
|
389
|
+
} | undefined;
|
|
390
|
+
description?: string | undefined;
|
|
391
|
+
id: string;
|
|
392
|
+
label: string;
|
|
393
|
+
level?: 0 | 1 | -1 | undefined;
|
|
394
|
+
notifications?: {
|
|
395
|
+
error?: string | undefined;
|
|
396
|
+
success?: string | undefined;
|
|
397
|
+
} | undefined;
|
|
398
|
+
path: string;
|
|
399
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
400
|
+
sortOrder?: number | undefined;
|
|
401
|
+
type: "view";
|
|
402
|
+
} | {
|
|
403
|
+
aclProtected?: boolean | undefined;
|
|
404
|
+
confirm?: {
|
|
405
|
+
message?: string | undefined;
|
|
406
|
+
title?: string | undefined;
|
|
407
|
+
} | undefined;
|
|
408
|
+
description?: string | undefined;
|
|
409
|
+
id: string;
|
|
410
|
+
label: string;
|
|
411
|
+
level?: 0 | 1 | -1 | undefined;
|
|
412
|
+
notifications?: {
|
|
413
|
+
error?: string | undefined;
|
|
414
|
+
success?: string | undefined;
|
|
415
|
+
} | undefined;
|
|
416
|
+
runtimeAction: string;
|
|
417
|
+
sortOrder?: number | undefined;
|
|
418
|
+
timeout?: number | undefined;
|
|
419
|
+
type: "worker";
|
|
420
|
+
})[], "Credit memo view button ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
264
421
|
}, undefined>, undefined>;
|
|
265
422
|
readonly customer: v.OptionalSchema<v.ObjectSchema<{
|
|
266
423
|
readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -386,6 +543,81 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
386
543
|
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
387
544
|
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
388
545
|
}, undefined>, undefined>;
|
|
546
|
+
readonly viewButtons: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
547
|
+
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>;
|
|
548
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
549
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
550
|
+
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>;
|
|
551
|
+
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>;
|
|
552
|
+
}, undefined>, undefined>;
|
|
553
|
+
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>;
|
|
554
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
555
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
556
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
557
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
558
|
+
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>;
|
|
559
|
+
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>;
|
|
560
|
+
}, undefined>, undefined>;
|
|
561
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
562
|
+
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>;
|
|
563
|
+
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>;
|
|
564
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
565
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
566
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
567
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
568
|
+
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>;
|
|
569
|
+
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>;
|
|
570
|
+
}, undefined>, undefined>;
|
|
571
|
+
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>;
|
|
572
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
573
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
574
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
575
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
576
|
+
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>;
|
|
577
|
+
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>;
|
|
578
|
+
}, undefined>, undefined>;
|
|
579
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
580
|
+
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>;
|
|
581
|
+
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>;
|
|
582
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
583
|
+
}, undefined>], undefined>, undefined>, v.CheckAction<({
|
|
584
|
+
aclProtected?: boolean | undefined;
|
|
585
|
+
confirm?: {
|
|
586
|
+
message?: string | undefined;
|
|
587
|
+
title?: string | undefined;
|
|
588
|
+
} | undefined;
|
|
589
|
+
description?: string | undefined;
|
|
590
|
+
id: string;
|
|
591
|
+
label: string;
|
|
592
|
+
level?: 0 | 1 | -1 | undefined;
|
|
593
|
+
notifications?: {
|
|
594
|
+
error?: string | undefined;
|
|
595
|
+
success?: string | undefined;
|
|
596
|
+
} | undefined;
|
|
597
|
+
runtimeAction: string;
|
|
598
|
+
sortOrder?: number | undefined;
|
|
599
|
+
timeout?: number | undefined;
|
|
600
|
+
type: "worker";
|
|
601
|
+
} | {
|
|
602
|
+
title?: string | undefined;
|
|
603
|
+
aclProtected?: boolean | undefined;
|
|
604
|
+
confirm?: {
|
|
605
|
+
message?: string | undefined;
|
|
606
|
+
title?: string | undefined;
|
|
607
|
+
} | undefined;
|
|
608
|
+
description?: string | undefined;
|
|
609
|
+
id: string;
|
|
610
|
+
label: string;
|
|
611
|
+
level?: 0 | 1 | -1 | undefined;
|
|
612
|
+
notifications?: {
|
|
613
|
+
error?: string | undefined;
|
|
614
|
+
success?: string | undefined;
|
|
615
|
+
} | undefined;
|
|
616
|
+
path: string;
|
|
617
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
618
|
+
sortOrder?: number | undefined;
|
|
619
|
+
type: "view";
|
|
620
|
+
})[], "Invoice view button ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
389
621
|
}, undefined>, undefined>;
|
|
390
622
|
readonly menu: v.OptionalSchema<v.ObjectSchema<{
|
|
391
623
|
/**
|
|
@@ -401,6 +633,19 @@ declare const AdminUiSchema: v.ObjectSchema<{
|
|
|
401
633
|
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>;
|
|
402
634
|
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>;
|
|
403
635
|
}, undefined>, undefined>;
|
|
636
|
+
readonly nativeUi: v.OptionalSchema<v.ObjectSchema<{
|
|
637
|
+
readonly replacedPages: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
638
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
639
|
+
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>;
|
|
640
|
+
readonly target: v.PicklistSchema<readonly ["order.create", "return.create"], `Invalid native UI replaced page target. Accepted values are: ${string}`>;
|
|
641
|
+
readonly title: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
642
|
+
}, undefined>, undefined>, v.CheckAction<{
|
|
643
|
+
path: string;
|
|
644
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
645
|
+
target: "order.create" | "return.create";
|
|
646
|
+
title: string;
|
|
647
|
+
}[], "Native UI replaced page targets must be unique.">]>;
|
|
648
|
+
}, undefined>, undefined>;
|
|
404
649
|
readonly newsletter: v.OptionalSchema<v.ObjectSchema<{
|
|
405
650
|
readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
|
|
406
651
|
readonly columns: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
@@ -733,9 +978,10 @@ type AdminUiConfiguration = v.InferInput<typeof AdminUiSchema>;
|
|
|
733
978
|
type AclResourceEntry = v.InferInput<typeof AclResourceEntrySchema>;
|
|
734
979
|
/**
|
|
735
980
|
* The validated config of a single Admin UI component: the menu, an entity's
|
|
736
|
-
* grid columns, a
|
|
981
|
+
* grid columns, a mass action, a view button, a native UI page replacement, or a
|
|
982
|
+
* custom ACL resource entry.
|
|
737
983
|
*/
|
|
738
|
-
type AdminUiComponentConfig = v.InferOutput<typeof MenuSchema> | v.InferOutput<typeof GridColumnsSchema> | v.InferOutput<typeof MassActionSchema> | v.InferOutput<typeof OrderViewButtonSchema> | AclResourceEntry;
|
|
984
|
+
type AdminUiComponentConfig = v.InferOutput<typeof MenuSchema> | v.InferOutput<typeof GridColumnsSchema> | v.InferOutput<typeof MassActionSchema> | v.InferOutput<typeof OrderViewButtonSchema> | v.InferOutput<typeof NativeUiReplacedPageSchema> | v.InferOutput<typeof InvoiceViewButtonSchema> | v.InferOutput<typeof CreditMemoViewButtonSchema> | AclResourceEntry;
|
|
739
985
|
/**
|
|
740
986
|
* Grid columns registration configuration.
|
|
741
987
|
*/
|
|
@@ -760,6 +1006,10 @@ type WorkerMassAction = v.InferInput<typeof WorkerMassActionSchema>;
|
|
|
760
1006
|
* An order view button registration entry (v2, `adminUi`).
|
|
761
1007
|
*/
|
|
762
1008
|
type OrderViewButton = v.InferInput<typeof OrderViewButtonSchema>;
|
|
1009
|
+
/** An invoice view button registration entry (view or worker variant). */
|
|
1010
|
+
type InvoiceViewButton = v.InferInput<typeof InvoiceViewButtonSchema>;
|
|
1011
|
+
/** A credit memo view button registration entry (view or worker variant). */
|
|
1012
|
+
type CreditMemoViewButton = v.InferInput<typeof CreditMemoViewButtonSchema>;
|
|
763
1013
|
/**
|
|
764
1014
|
* Inlined notification strings on an `adminUi` registration entry.
|
|
765
1015
|
*/
|
|
@@ -770,6 +1020,10 @@ type Notifications = v.InferInput<typeof NotificationsSchema>;
|
|
|
770
1020
|
* a per-app ACL resource from `metadata.id` for role-based menu access control.
|
|
771
1021
|
*/
|
|
772
1022
|
type Menu = v.InferInput<typeof MenuSchema>;
|
|
1023
|
+
/**
|
|
1024
|
+
* A native Commerce Admin form replaced by an application page.
|
|
1025
|
+
*/
|
|
1026
|
+
type NativeUiReplacedPage = v.InferInput<typeof NativeUiReplacedPageSchema>;
|
|
773
1027
|
/** Config type when `adminUi` configuration is present. */
|
|
774
1028
|
type AdminUiConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel> = T & {
|
|
775
1029
|
adminUi: NonNullable<T["adminUi"]>;
|
|
@@ -777,15 +1031,17 @@ type AdminUiConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputModel
|
|
|
777
1031
|
/**
|
|
778
1032
|
* Check whether the config declares an Admin UI component that requires the
|
|
779
1033
|
* `commerce/backend-ui/2` extension point — a menu, grid columns, mass actions,
|
|
780
|
-
* or
|
|
781
|
-
* Commerce through the `extensibility/1`
|
|
782
|
-
* so an acl-only config needs no
|
|
1034
|
+
* view buttons, or native UI replaced pages. Custom ACL resources are
|
|
1035
|
+
* deliberately excluded: they reach Commerce through the `extensibility/1`
|
|
1036
|
+
* app-config payload, not backend-ui/2, so an acl-only config needs no
|
|
1037
|
+
* backend-ui/2 registration.
|
|
783
1038
|
*/
|
|
784
1039
|
declare function hasBackendUiV2Components<T extends AnyCommerceAppConfig>(config: T): config is AdminUiConfig<T>;
|
|
785
1040
|
/**
|
|
786
1041
|
* Check whether the config declares at least one Admin UI component (menu, grid
|
|
787
|
-
* columns, mass actions, view buttons,
|
|
788
|
-
* treated as absent — it
|
|
1042
|
+
* columns, mass actions, view buttons, native UI replaced pages, or custom ACL
|
|
1043
|
+
* resources). A component-less `adminUi` block is treated as absent — it
|
|
1044
|
+
* registers nothing.
|
|
789
1045
|
*/
|
|
790
1046
|
declare function hasAdminUi<T extends AnyCommerceAppConfig>(config: T): config is AdminUiConfig<T>;
|
|
791
1047
|
/** Schema for event provider configuration */
|
|
@@ -1367,7 +1623,7 @@ declare const WebhooksSchema: v.OptionalSchema<v.SchemaWithPipe<readonly [v.Arra
|
|
|
1367
1623
|
value: string;
|
|
1368
1624
|
}[] | undefined;
|
|
1369
1625
|
hook_name: string;
|
|
1370
|
-
method: "
|
|
1626
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
1371
1627
|
priority?: number | undefined;
|
|
1372
1628
|
required?: boolean | undefined;
|
|
1373
1629
|
rules?: {
|
|
@@ -1400,7 +1656,7 @@ declare const WebhooksSchema: v.OptionalSchema<v.SchemaWithPipe<readonly [v.Arra
|
|
|
1400
1656
|
value: string;
|
|
1401
1657
|
}[] | undefined;
|
|
1402
1658
|
hook_name: string;
|
|
1403
|
-
method: "
|
|
1659
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
1404
1660
|
priority?: number | undefined;
|
|
1405
1661
|
required?: boolean | undefined;
|
|
1406
1662
|
rules?: {
|
|
@@ -1440,4 +1696,4 @@ type WebhooksConfig<T extends AnyCommerceAppConfig = CommerceAppConfigOutputMode
|
|
|
1440
1696
|
* @param config - The configuration to check.
|
|
1441
1697
|
*/
|
|
1442
1698
|
declare function hasWebhooks<T extends AnyCommerceAppConfig>(config: T): config is T & WebhooksConfig<T>;
|
|
1443
|
-
export { AdminUiConfig as A,
|
|
1699
|
+
export { AdminUiConfig as A, OrderViewButton as B, ExternalEventSource as C, hasEventing as D, hasCommerceEvents as E, InvoiceViewButton as F, WorkerMassAction as H, MassAction as I, Menu as L, CreditMemoViewButton as M, GridColumn as N, hasExternalEvents as O, GridColumns as P, NativeUiReplacedPage as R, ExternalEvent as S, ExternalEventsConfig as T, hasAdminUi as U, ViewMassAction as V, hasBackendUiV2Components as W, CommerceEventsConfig as _, WebhookRule as a, EventingSchema as b, WebhooksSchema as c, hasCustomInstallation as d, hasCustomInstallationSteps as f, CommerceEventSourceSchema as g, CommerceEventSource as h, WebhookHeader as i, AdminUiConfiguration as j, AdminUiComponentConfig as k, hasWebhooks as l, CommerceEvent as m, WebhookEntry as n, WebhooksConfig as o, AppEvent as p, WebhookField as r, WebhooksConfiguration as s, WebhookDefinition as t, CustomInstallationStep as u, EventProvider as v, ExternalEventSourceSchema as w, EventsConfig as x, EventingConfiguration as y, Notifications as z };
|