@adobe/aio-commerce-lib-app 2.2.0-beta-20261105172845 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -4
- package/dist/cjs/actions/app-config/index.cjs +4 -4
- package/dist/cjs/actions/app-config/index.d.cts +2 -2
- package/dist/cjs/actions/association/index.cjs +1 -1
- package/dist/cjs/actions/config/index.cjs +1 -1
- package/dist/cjs/actions/config/index.d.cts +2 -2
- package/dist/cjs/actions/installation/index.cjs +60 -20
- package/dist/cjs/actions/installation/index.d.cts +4 -3
- package/dist/cjs/actions/scope-tree/index.cjs +1 -1
- package/dist/cjs/{app-CiZuhrsm.d.cts → app-B3bAEor-.d.cts} +176 -22
- package/dist/cjs/commands/index.cjs +25 -11
- 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 +60 -16
- package/dist/{es/define-9bwRE_UG.d.mts → cjs/define-eBMdGAq6.d.cts} +1 -1
- package/dist/cjs/{index-Bu2X-HUh.d.cts → index-BEeludy0.d.cts} +316 -316
- package/dist/cjs/{index-DWEigxhy.d.cts → index-vAue-u_y.d.cts} +1 -4
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.d.cts +8 -8
- package/dist/cjs/{index.node-Boszndri.cjs → index.node-9bfp79rs.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_cVbr0s.cjs → management-5Et1mEUp.cjs} +41 -6
- package/dist/cjs/{openapi-c06taOv1.cjs → openapi-DghfuM8S.cjs} +135 -1
- package/dist/cjs/types-DslZGym8.d.cts +23 -0
- package/dist/cjs/{utils-B_Ypb2xF.cjs → utils-CoR_PBHz.cjs} +16 -3
- package/dist/cjs/{validate-CunJ4fUD.cjs → validate-BC3rnRLc.cjs} +1 -1
- package/dist/cjs/{version-CUu8Ks59.cjs → version-5MonNzl5.cjs} +1 -1
- package/dist/{es/webhooks-B7UjO8dd.d.mts → cjs/webhooks-DNLuuv9_.d.cts} +133 -16
- package/dist/cjs/{webhooks-C5ONLbQ4.cjs → webhooks-ZPh2gVb3.cjs} +11 -9
- package/dist/es/actions/app-config/index.d.mts +2 -2
- package/dist/es/actions/app-config/index.mjs +4 -4
- package/dist/es/actions/association/index.mjs +1 -1
- package/dist/es/actions/config/index.d.mts +1 -1
- package/dist/es/actions/config/index.mjs +1 -1
- package/dist/es/actions/installation/index.d.mts +4 -3
- package/dist/es/actions/installation/index.mjs +61 -21
- package/dist/es/actions/scope-tree/index.mjs +1 -1
- package/dist/es/{app-CiZuhrsm.d.mts → app-B3bAEor-.d.mts} +176 -22
- package/dist/es/commands/index.mjs +25 -11
- package/dist/es/config/index.browser.d.mts +2 -1
- package/dist/es/config/index.node.d.mts +59 -14
- package/dist/es/config/index.node.mjs +3 -3
- package/dist/{cjs/define-CZRjG5N_.d.cts → es/define-BdXyLAwb.d.mts} +1 -1
- package/dist/es/{index-Cho-eRFD.d.mts → index-DE2KVXfH.d.mts} +2 -2
- package/dist/es/{index-CgsSXApi.d.mts → index-DUJtT78x.d.mts} +2 -2
- package/dist/es/index.d.mts +8 -8
- package/dist/es/index.mjs +1 -1
- package/dist/es/{index.node-BVO6sC7z.mjs → index.node-CURztkP5.mjs} +1 -1
- package/dist/es/management/index.d.mts +6 -1
- package/dist/es/management/index.mjs +1 -1
- package/dist/es/{management-BYmbjhGb.mjs → management-BAQ64OyR.mjs} +41 -6
- package/dist/es/{openapi-C_TGWLou.mjs → openapi-BvPVTUMt.mjs} +135 -1
- package/dist/es/types-DslZGym8.d.mts +23 -0
- package/dist/es/{utils-SOtVo2VW.mjs → utils-DB8HaSj0.mjs} +11 -4
- package/dist/es/{validate-D-Oh-sxE.mjs → validate-xS9Dc-4m.mjs} +1 -1
- package/dist/es/{version-C-Pkqohl.mjs → version-BWgrh_QM.mjs} +1 -1
- package/dist/{cjs/webhooks-DX7km8wk.d.cts → es/webhooks-DgaLfP36.d.mts} +133 -16
- package/dist/es/{webhooks-CMb_05b6.mjs → webhooks-HBe_DEKA.mjs} +11 -9
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,38 @@
|
|
|
1
1
|
# @adobe/aio-commerce-lib-app
|
|
2
2
|
|
|
3
|
-
## 2.2.0
|
|
3
|
+
## 2.2.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
7
|
- [#776](https://github.com/adobe/aio-commerce-sdk/pull/776) [`32988bb`](https://github.com/adobe/aio-commerce-sdk/commit/32988bbda397d9a34f788aee721f4dca9abc362a) Thanks [@aminakhyat](https://github.com/aminakhyat)! - Add `adminUi.creditMemo.viewButtons` to the app config schema, with generated `view` and `workerProcess` operations and installation and upgrade support.
|
|
8
8
|
|
|
9
|
+
- [#802](https://github.com/adobe/aio-commerce-sdk/pull/802) [`a03c546`](https://github.com/adobe/aio-commerce-sdk/commit/a03c546f8b6a54c8c1aa1352d89b6a0efef00d9e) Thanks [@aminakhyat](https://github.com/aminakhyat)! - Add `adminUi.rma.viewButtons` to the app config schema, with generated `view` and `workerProcess` operations and installation and upgrade support for return (RMA) view buttons.
|
|
10
|
+
|
|
9
11
|
- [#746](https://github.com/adobe/aio-commerce-sdk/pull/746) [`ca065be`](https://github.com/adobe/aio-commerce-sdk/commit/ca065bec387cf90ce21309420851bef408ca194e) Thanks [@asalloum5](https://github.com/asalloum5)! - Add `adminUi.nativeUi.replacedPages` configuration to replace the native order creation form with an app page, including validation, web generation, and installation planning.
|
|
10
12
|
|
|
13
|
+
- [#770](https://github.com/adobe/aio-commerce-sdk/pull/770) [`9b6e61c`](https://github.com/adobe/aio-commerce-sdk/commit/9b6e61ceed9c45ae415c37b401272f09d4c75759) Thanks [@obarcelonap](https://github.com/obarcelonap)! - Default new actions to Node.js 26 without changing existing runtimes.
|
|
14
|
+
|
|
15
|
+
- [#770](https://github.com/adobe/aio-commerce-sdk/pull/770) [`9b6e61c`](https://github.com/adobe/aio-commerce-sdk/commit/9b6e61ceed9c45ae415c37b401272f09d4c75759) Thanks [@obarcelonap](https://github.com/obarcelonap)! - Add support for Node.js 26.
|
|
16
|
+
|
|
17
|
+
- [#801](https://github.com/adobe/aio-commerce-sdk/pull/801) [`26287d7`](https://github.com/adobe/aio-commerce-sdk/commit/26287d7a0cc3dbd154e52acb94e2ad123c74ef4b) Thanks [@pablomoreno61](https://github.com/pablomoreno61)! - Allow `adminUi.nativeUi.replacedPages` to use the `return.create` target.
|
|
18
|
+
|
|
11
19
|
- [#732](https://github.com/adobe/aio-commerce-sdk/pull/732) [`f124cf4`](https://github.com/adobe/aio-commerce-sdk/commit/f124cf49208d930ca0f151e948a7597317365697) Thanks [@asalloum5](https://github.com/asalloum5)! - Add invoice detail-page view and worker button configuration, validation, generated operations, and installation and upgrade support.
|
|
12
20
|
|
|
13
21
|
### Patch Changes
|
|
14
22
|
|
|
23
|
+
- [#806](https://github.com/adobe/aio-commerce-sdk/pull/806) [`18be2b5`](https://github.com/adobe/aio-commerce-sdk/commit/18be2b5b9f6af0b8c150e0a5c6747e66eafefd72) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Fix the uninstall of apps installed with lib-app before 1.8.0, including 1.0.x and 1.1.0, which 2.1.0 blocked because of a missing association record and an unreadable event provider link.
|
|
24
|
+
|
|
15
25
|
- [#792](https://github.com/adobe/aio-commerce-sdk/pull/792) [`6dbdf71`](https://github.com/adobe/aio-commerce-sdk/commit/6dbdf711a6fdf6f38794dc74a0a9e16146c5d771) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Add an `x-ac-sdk-lib-versions` response header to every app-management endpoint response. It lists the lib-app version and the installed lib-config version it loads (not the app's version), for example `lib-app="2.2.0", lib-config="1.4.1"`.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
|
|
27
|
+
- [#803](https://github.com/adobe/aio-commerce-sdk/pull/803) [`e56dd61`](https://github.com/adobe/aio-commerce-sdk/commit/e56dd614586f4a335d0fbc373a5cd2e07fa3db48) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Fix `publishEvent` using a stale or missing provider after an app is uninstalled and reinstalled. The uninstall now removes the stored event data of a provider that was already deleted, and lists the removal in the plan. If it fails, the uninstall fails and can be retried. An install or upgrade that removes a duplicate provider no longer deletes the stored data of the provider it keeps.
|
|
28
|
+
- Updated dependencies [[`32988bb`](https://github.com/adobe/aio-commerce-sdk/commit/32988bbda397d9a34f788aee721f4dca9abc362a), [`a03c546`](https://github.com/adobe/aio-commerce-sdk/commit/a03c546f8b6a54c8c1aa1352d89b6a0efef00d9e), [`f124cf4`](https://github.com/adobe/aio-commerce-sdk/commit/f124cf49208d930ca0f151e948a7597317365697), [`ca065be`](https://github.com/adobe/aio-commerce-sdk/commit/ca065bec387cf90ce21309420851bef408ca194e), [`9b6e61c`](https://github.com/adobe/aio-commerce-sdk/commit/9b6e61ceed9c45ae415c37b401272f09d4c75759), [`32988bb`](https://github.com/adobe/aio-commerce-sdk/commit/32988bbda397d9a34f788aee721f4dca9abc362a), [`a066916`](https://github.com/adobe/aio-commerce-sdk/commit/a066916918f9d3ff66affc7783c743c34a02f263), [`e56dd61`](https://github.com/adobe/aio-commerce-sdk/commit/e56dd614586f4a335d0fbc373a5cd2e07fa3db48), [`6dbdf71`](https://github.com/adobe/aio-commerce-sdk/commit/6dbdf711a6fdf6f38794dc74a0a9e16146c5d771)]:
|
|
29
|
+
- @adobe/aio-commerce-lib-admin-ui@1.3.0
|
|
30
|
+
- @adobe/aio-commerce-lib-api@1.5.0
|
|
31
|
+
- @adobe/aio-commerce-lib-auth@1.3.0
|
|
32
|
+
- @adobe/aio-commerce-lib-config@1.9.0
|
|
33
|
+
- @adobe/aio-commerce-lib-core@1.4.0
|
|
34
|
+
- @adobe/aio-commerce-lib-events@1.6.0
|
|
35
|
+
- @adobe/aio-commerce-lib-webhooks@1.3.0
|
|
19
36
|
|
|
20
37
|
## 2.1.0
|
|
21
38
|
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
16
|
const require_rolldown_runtime = require("../../rolldown-runtime-CoOt0iuZ.cjs");
|
|
17
|
-
const require_version = require("../../version-
|
|
17
|
+
const require_version = require("../../version-5MonNzl5.cjs");
|
|
18
18
|
const require_environment = require("../../environment-CW6M76gS.cjs");
|
|
19
|
-
const require_validate = require("../../validate-
|
|
19
|
+
const require_validate = require("../../validate-BC3rnRLc.cjs");
|
|
20
20
|
let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
|
|
21
21
|
let _adobe_aio_commerce_lib_core_commerce = require("@adobe/aio-commerce-lib-core/commerce");
|
|
22
22
|
let valibot = require("valibot");
|
|
@@ -29,7 +29,7 @@ let crypto = require("crypto");
|
|
|
29
29
|
* Loads the committed OpenAPI spec via dynamic import so it
|
|
30
30
|
* lands in its own chunk and is not parsed on every cold start.
|
|
31
31
|
*/
|
|
32
|
-
const importOpenApi = () => Promise.resolve().then(() => require("../../openapi-
|
|
32
|
+
const importOpenApi = () => Promise.resolve().then(() => require("../../openapi-DghfuM8S.cjs"));
|
|
33
33
|
/** Matches component schema `$ref` strings, capturing the schema name. */
|
|
34
34
|
const SCHEMA_REF_PATTERN = /"#\/components\/schemas\/(?<schema>\w+)"/gu;
|
|
35
35
|
/**
|
|
@@ -80,7 +80,7 @@ function pruneUnusedTags(spec) {
|
|
|
80
80
|
* @param domains - The active config domains.
|
|
81
81
|
*/
|
|
82
82
|
function getOpenApiCacheKey(domains) {
|
|
83
|
-
const input = `2.2.0
|
|
83
|
+
const input = `2.2.0:${[...domains].sort().join(",")}:4.2.0`;
|
|
84
84
|
return (0, crypto.createHash)("sha256").update(input).digest("hex").slice(0, 8);
|
|
85
85
|
}
|
|
86
86
|
/** Returns the server URL to be set in the OpenAPI spec, based on the current namespace. */
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import "../../index-
|
|
16
|
-
import { n as CommerceAppConfig } from "../../app-
|
|
15
|
+
import "../../index-vAue-u_y.cjs";
|
|
16
|
+
import { n as CommerceAppConfig } from "../../app-B3bAEor-.cjs";
|
|
17
17
|
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
18
18
|
/** The arguments required to create the runtime action for the app-config action. */
|
|
19
19
|
type RuntimeActionFactoryArgs = {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
16
|
const require_rolldown_runtime = require("../../rolldown-runtime-CoOt0iuZ.cjs");
|
|
17
|
-
const require_version = require("../../version-
|
|
17
|
+
const require_version = require("../../version-5MonNzl5.cjs");
|
|
18
18
|
const require_repository = require("../../repository-C3nn0Mon.cjs");
|
|
19
19
|
let _adobe_aio_commerce_lib_auth = require("@adobe/aio-commerce-lib-auth");
|
|
20
20
|
let _adobe_aio_commerce_lib_core_commerce = require("@adobe/aio-commerce-lib-core/commerce");
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
16
|
const require_rolldown_runtime = require("../../rolldown-runtime-CoOt0iuZ.cjs");
|
|
17
|
-
const require_version = require("../../version-
|
|
17
|
+
const require_version = require("../../version-5MonNzl5.cjs");
|
|
18
18
|
const require_environment = require("../../environment-CW6M76gS.cjs");
|
|
19
19
|
const require_schemas = require("../../schemas-B6ITl1bG.cjs");
|
|
20
20
|
let _adobe_aio_commerce_lib_config = require("@adobe/aio-commerce-lib-config");
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import "../../index-
|
|
16
|
-
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
15
|
+
import "../../index-vAue-u_y.cjs";
|
|
17
16
|
import { BusinessConfigSchema } from "@adobe/aio-commerce-lib-config";
|
|
17
|
+
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
18
18
|
/** The arguments required to create the runtime action for the config action. */
|
|
19
19
|
type ConfigActionFactoryArgs = {
|
|
20
20
|
configSchema: BusinessConfigSchema;
|
|
@@ -14,15 +14,16 @@
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
16
|
const require_rolldown_runtime = require("../../rolldown-runtime-CoOt0iuZ.cjs");
|
|
17
|
-
const require_version = require("../../version-
|
|
17
|
+
const require_version = require("../../version-5MonNzl5.cjs");
|
|
18
18
|
const require_schemas = require("../../schemas-B6ITl1bG.cjs");
|
|
19
|
-
const require_management = require("../../management-
|
|
19
|
+
const require_management = require("../../management-5Et1mEUp.cjs");
|
|
20
20
|
const require_repository = require("../../repository-C3nn0Mon.cjs");
|
|
21
|
-
const require_webhooks = require("../../webhooks-
|
|
22
|
-
const require_validate = require("../../validate-
|
|
21
|
+
const require_webhooks = require("../../webhooks-ZPh2gVb3.cjs");
|
|
22
|
+
const require_validate = require("../../validate-BC3rnRLc.cjs");
|
|
23
23
|
let _adobe_aio_lib_state = require("@adobe/aio-lib-state");
|
|
24
24
|
let _adobe_aio_commerce_lib_core_error = require("@adobe/aio-commerce-lib-core/error");
|
|
25
25
|
let _adobe_aio_commerce_lib_auth = require("@adobe/aio-commerce-lib-auth");
|
|
26
|
+
let _adobe_aio_commerce_lib_core_commerce = require("@adobe/aio-commerce-lib-core/commerce");
|
|
26
27
|
let valibot = require("valibot");
|
|
27
28
|
valibot = require_rolldown_runtime.__toESM(valibot, 1);
|
|
28
29
|
let safe_stable_stringify = require("safe-stable-stringify");
|
|
@@ -384,6 +385,8 @@ const AppDataSchema = valibot.object({
|
|
|
384
385
|
*/
|
|
385
386
|
const LifecycleRequestContextSchema = valibot.object({
|
|
386
387
|
appData: AppDataSchema,
|
|
388
|
+
commerceBaseUrl: valibot.nullish(valibot.pipe(valibot.string(), valibot.url("The 'commerceBaseUrl' field must be a valid absolute URL (e.g., 'https://my-store.example.com')"))),
|
|
389
|
+
commerceEnv: valibot.nullish(_adobe_aio_commerce_lib_core_commerce.CommerceEnvSchema),
|
|
387
390
|
installedState: valibot.optional(valibot.literal("business-config-only")),
|
|
388
391
|
installedVersion: valibot.optional(valibot.string()),
|
|
389
392
|
ioEventsEnv: valibot.string(),
|
|
@@ -1028,20 +1031,36 @@ const DEFAULT_ACTION_NAME = "app-management/installation";
|
|
|
1028
1031
|
const CUSTOM_INSTALLATION_STEPS_PATH = ["installation", "customInstallationSteps"];
|
|
1029
1032
|
/**
|
|
1030
1033
|
* Merges the runtime params with the request body and the Commerce instance the app is
|
|
1031
|
-
* associated with. Returns `null` when the app
|
|
1034
|
+
* associated with. Returns `null` when the app has no Commerce instance to use.
|
|
1035
|
+
*
|
|
1036
|
+
* An uninstall without an association record uses the Commerce instance of the request body and
|
|
1037
|
+
* returns it as `commerceFromBody`. Any other operation needs the record.
|
|
1032
1038
|
*/
|
|
1033
|
-
async function resolveWorkflowParams(body, rawParams) {
|
|
1039
|
+
async function resolveWorkflowParams(body, rawParams, operation) {
|
|
1034
1040
|
const association = await require_repository.getAssociationData();
|
|
1035
|
-
|
|
1041
|
+
const commerceFromBody = !association && operation === "uninstall" ? getBodyCommerce(body) : null;
|
|
1042
|
+
const commerce = association?.commerce ?? commerceFromBody;
|
|
1043
|
+
if (!commerce) return null;
|
|
1036
1044
|
return {
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1045
|
+
commerceFromBody,
|
|
1046
|
+
params: {
|
|
1047
|
+
...rawParams,
|
|
1048
|
+
AIO_COMMERCE_API_BASE_URL: commerce.baseUrl,
|
|
1049
|
+
AIO_COMMERCE_API_FLAVOR: commerce.env,
|
|
1050
|
+
AIO_COMMERCE_AUTH_IMS_ENVIRONMENT: body.ioEventsEnv,
|
|
1051
|
+
AIO_EVENTS_API_BASE_URL: body.ioEventsUrl,
|
|
1052
|
+
appData: body.appData
|
|
1053
|
+
}
|
|
1043
1054
|
};
|
|
1044
1055
|
}
|
|
1056
|
+
/** The Commerce instance the request body names, or `null` when it lacks the URL or the env. */
|
|
1057
|
+
function getBodyCommerce(body) {
|
|
1058
|
+
const { commerceBaseUrl, commerceEnv } = body;
|
|
1059
|
+
return commerceBaseUrl && commerceEnv ? {
|
|
1060
|
+
baseUrl: commerceBaseUrl,
|
|
1061
|
+
env: commerceEnv
|
|
1062
|
+
} : null;
|
|
1063
|
+
}
|
|
1045
1064
|
/** The response for a request on an app that is not associated with a Commerce instance. */
|
|
1046
1065
|
function notAssociatedConflict() {
|
|
1047
1066
|
return (0, _adobe_aio_commerce_lib_core_responses.conflict)({ body: {
|
|
@@ -1858,16 +1877,18 @@ async function persistDispatchFailure(stateStore, attempt, error, logger) {
|
|
|
1858
1877
|
|
|
1859
1878
|
// source/actions/installation/plan.ts
|
|
1860
1879
|
/**
|
|
1861
|
-
* Checks what every planning request needs (the action version, the app config and
|
|
1862
|
-
*
|
|
1880
|
+
* Checks what every planning request needs (the action version, the app config and a Commerce
|
|
1881
|
+
* instance) and creates the lifecycle runtime. `operation` is the operation the request is for,
|
|
1882
|
+
* when it is known before the state is read.
|
|
1863
1883
|
*/
|
|
1864
|
-
async function prepareRequest({ body, logger, rawParams }) {
|
|
1884
|
+
async function prepareRequest({ body, logger, rawParams }, operation) {
|
|
1865
1885
|
const actionVersion = process.env.__OW_ACTION_VERSION;
|
|
1866
1886
|
if (!actionVersion) return rejected((0, _adobe_aio_commerce_lib_core_responses.internalServerError)("The OpenWhisk action version is required to plan a lifecycle operation"));
|
|
1867
1887
|
const rawAppConfig = rawParams.appConfig;
|
|
1868
1888
|
if (!rawAppConfig) return rejected((0, _adobe_aio_commerce_lib_core_responses.internalServerError)("The app config is missing. Does the action receive it as a parameter?"));
|
|
1869
|
-
const
|
|
1870
|
-
if (!
|
|
1889
|
+
const resolved = await resolveWorkflowParams(body, rawParams, operation);
|
|
1890
|
+
if (!resolved) return rejected(notAssociatedConflict());
|
|
1891
|
+
const { commerceFromBody, params } = resolved;
|
|
1871
1892
|
logger.debug(`Lifecycle request for app "${body.appData.projectName}" (workspace: "${body.appData.workspaceName}", commerce: "${params.AIO_COMMERCE_API_BASE_URL}")`);
|
|
1872
1893
|
const appConfig = require_validate.validateCommerceAppConfig(rawAppConfig);
|
|
1873
1894
|
const runtime = await createLifecycleRuntime(params, appConfig, logger);
|
|
@@ -1891,6 +1912,7 @@ async function prepareRequest({ body, logger, rawParams }) {
|
|
|
1891
1912
|
appConfig,
|
|
1892
1913
|
baseline,
|
|
1893
1914
|
businessConfigOnlyVersion: body.installedState === "business-config-only" && body.installedVersion ? body.installedVersion : null,
|
|
1915
|
+
commerceFromBody,
|
|
1894
1916
|
isBaselineMissing,
|
|
1895
1917
|
latestAttempt: state?.latestAttempt ?? null,
|
|
1896
1918
|
params,
|
|
@@ -1903,7 +1925,7 @@ async function prepareRequest({ body, logger, rawParams }) {
|
|
|
1903
1925
|
* the plan's issues as a validation result, and the plan, whose `id` starts it.
|
|
1904
1926
|
*/
|
|
1905
1927
|
async function planRequestedOperation(args) {
|
|
1906
|
-
const prepared = await prepareRequest(args);
|
|
1928
|
+
const prepared = await prepareRequest(args, args.body.operation);
|
|
1907
1929
|
if (prepared.kind === "rejected") return prepared.response;
|
|
1908
1930
|
const { request } = prepared;
|
|
1909
1931
|
const resolved = await resolveOperation(request, args.body.operation);
|
|
@@ -2067,8 +2089,8 @@ const StatusQuerySchema = valibot.object({
|
|
|
2067
2089
|
async function startPlannedRequest(args) {
|
|
2068
2090
|
const { planId } = args.body;
|
|
2069
2091
|
if (!planId) return (0, _adobe_aio_commerce_lib_core_responses.badRequest)("A lifecycle operation starts from a plan. Call POST /plan and pass the planId it returns.");
|
|
2070
|
-
const prepared = await prepareRequest(args);
|
|
2071
2092
|
const { logger } = args;
|
|
2093
|
+
const prepared = await prepareRequest(args, await getPendingPlanOperation(planId));
|
|
2072
2094
|
if (prepared.kind === "rejected") return prepared.response;
|
|
2073
2095
|
const { request } = prepared;
|
|
2074
2096
|
const { stateStore } = request.runtime;
|
|
@@ -2104,6 +2126,7 @@ async function startPlannedRequest(args) {
|
|
|
2104
2126
|
runtime: request.runtime
|
|
2105
2127
|
});
|
|
2106
2128
|
if (planned.kind === "rejected") return planned.response;
|
|
2129
|
+
await backfillAssociation(request.commerceFromBody, logger);
|
|
2107
2130
|
return startPlannedOperation({
|
|
2108
2131
|
actionVersion: request.actionVersion,
|
|
2109
2132
|
logger,
|
|
@@ -2113,6 +2136,23 @@ async function startPlannedRequest(args) {
|
|
|
2113
2136
|
});
|
|
2114
2137
|
}
|
|
2115
2138
|
/**
|
|
2139
|
+
* Stores the Commerce instance of the request as the association record, unless a record exists.
|
|
2140
|
+
* Does nothing when the request did not supply the instance.
|
|
2141
|
+
*/
|
|
2142
|
+
async function backfillAssociation(commerce, logger) {
|
|
2143
|
+
if (!commerce) return;
|
|
2144
|
+
if (await require_repository.getAssociationData()) return;
|
|
2145
|
+
await require_repository.setAssociationData({ commerce });
|
|
2146
|
+
logger.info(`Stored the Commerce instance "${commerce.baseUrl}" of the request as the association record.`);
|
|
2147
|
+
}
|
|
2148
|
+
/**
|
|
2149
|
+
* Reads the operation of the pending plan, or `undefined` when `planId` is not the pending plan.
|
|
2150
|
+
*/
|
|
2151
|
+
async function getPendingPlanOperation(planId) {
|
|
2152
|
+
const pendingPlan = (await (await createOrchestrationStateStore()).get(CURRENT_STATE_KEY))?.pendingPlan;
|
|
2153
|
+
return pendingPlan?.id === planId ? pendingPlan.operation : void 0;
|
|
2154
|
+
}
|
|
2155
|
+
/**
|
|
2116
2156
|
* Stores the baseline of an app installed with only business configuration: the target config
|
|
2117
2157
|
* without what needs installation, at the installed version, with no installed data.
|
|
2118
2158
|
*/
|
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import "../../index-
|
|
16
|
-
import {
|
|
17
|
-
import { n as CommerceAppConfig, r as CommerceAppConfigOutputModel } from "../../app-
|
|
15
|
+
import "../../index-vAue-u_y.cjs";
|
|
16
|
+
import { it as LifecycleContext } from "../../index-BEeludy0.cjs";
|
|
17
|
+
import { n as CommerceAppConfig, r as CommerceAppConfigOutputModel } from "../../app-B3bAEor-.cjs";
|
|
18
|
+
import "../../types-DslZGym8.cjs";
|
|
18
19
|
import { RuntimeActionParams } from "@adobe/aio-commerce-lib-core/params";
|
|
19
20
|
/** Loads generated custom installation script modules. */
|
|
20
21
|
type CustomScriptsLoader = (config: CommerceAppConfigOutputModel, logger: LifecycleContext["logger"]) => Record<string, unknown>;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
16
|
const require_rolldown_runtime = require("../../rolldown-runtime-CoOt0iuZ.cjs");
|
|
17
|
-
const require_version = require("../../version-
|
|
17
|
+
const require_version = require("../../version-5MonNzl5.cjs");
|
|
18
18
|
const require_logging = require("../../logging-Emi7P923.cjs");
|
|
19
19
|
const require_constants = require("../../constants-CgeVvu6f.cjs");
|
|
20
20
|
const require_schemas = require("../../schemas-B6ITl1bG.cjs");
|
|
@@ -314,6 +314,7 @@ declare const CommerceAppConfigSchemas: {
|
|
|
314
314
|
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>;
|
|
315
315
|
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
316
316
|
}, undefined>], undefined>, undefined>, v.CheckAction<({
|
|
317
|
+
title?: string | undefined;
|
|
317
318
|
aclProtected?: boolean | undefined;
|
|
318
319
|
confirm?: {
|
|
319
320
|
message?: string | undefined;
|
|
@@ -327,12 +328,11 @@ declare const CommerceAppConfigSchemas: {
|
|
|
327
328
|
error?: string | undefined;
|
|
328
329
|
success?: string | undefined;
|
|
329
330
|
} | undefined;
|
|
330
|
-
|
|
331
|
+
path: string;
|
|
332
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
331
333
|
sortOrder?: number | undefined;
|
|
332
|
-
|
|
333
|
-
type: "worker";
|
|
334
|
+
type: "view";
|
|
334
335
|
} | {
|
|
335
|
-
title?: string | undefined;
|
|
336
336
|
aclProtected?: boolean | undefined;
|
|
337
337
|
confirm?: {
|
|
338
338
|
message?: string | undefined;
|
|
@@ -346,10 +346,10 @@ declare const CommerceAppConfigSchemas: {
|
|
|
346
346
|
error?: string | undefined;
|
|
347
347
|
success?: string | undefined;
|
|
348
348
|
} | undefined;
|
|
349
|
-
|
|
350
|
-
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
349
|
+
runtimeAction: string;
|
|
351
350
|
sortOrder?: number | undefined;
|
|
352
|
-
|
|
351
|
+
timeout?: number | undefined;
|
|
352
|
+
type: "worker";
|
|
353
353
|
})[], "Invoice view button ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
354
354
|
}, undefined>, undefined>;
|
|
355
355
|
readonly menu: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -365,12 +365,12 @@ declare const CommerceAppConfigSchemas: {
|
|
|
365
365
|
readonly replacedPages: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
366
366
|
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
367
367
|
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>;
|
|
368
|
-
readonly target: v.PicklistSchema<readonly ["order.create"], `Invalid native UI replaced page target. Accepted values are: ${string}`>;
|
|
368
|
+
readonly target: v.PicklistSchema<readonly ["order.create", "return.create"], `Invalid native UI replaced page target. Accepted values are: ${string}`>;
|
|
369
369
|
readonly title: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
370
370
|
}, undefined>, undefined>, v.CheckAction<{
|
|
371
371
|
path: string;
|
|
372
372
|
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
373
|
-
target: "order.create";
|
|
373
|
+
target: "order.create" | "return.create";
|
|
374
374
|
title: string;
|
|
375
375
|
}[], "Native UI replaced page targets must be unique.">]>;
|
|
376
376
|
}, undefined>, undefined>;
|
|
@@ -671,6 +671,83 @@ declare const CommerceAppConfigSchemas: {
|
|
|
671
671
|
title?: string | undefined;
|
|
672
672
|
})[], "Mass action ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
673
673
|
}, undefined>, undefined>;
|
|
674
|
+
readonly rma: v.OptionalSchema<v.ObjectSchema<{
|
|
675
|
+
readonly viewButtons: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
676
|
+
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>;
|
|
677
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
678
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
679
|
+
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>;
|
|
680
|
+
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>;
|
|
681
|
+
}, undefined>, undefined>;
|
|
682
|
+
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>;
|
|
683
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
684
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
685
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
686
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
687
|
+
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>;
|
|
688
|
+
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>;
|
|
689
|
+
}, undefined>, undefined>;
|
|
690
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
691
|
+
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>;
|
|
692
|
+
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>;
|
|
693
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
694
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
695
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
696
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
697
|
+
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>;
|
|
698
|
+
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>;
|
|
699
|
+
}, undefined>, undefined>;
|
|
700
|
+
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>;
|
|
701
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
702
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
703
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
704
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
705
|
+
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>;
|
|
706
|
+
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>;
|
|
707
|
+
}, undefined>, undefined>;
|
|
708
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
709
|
+
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>;
|
|
710
|
+
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>;
|
|
711
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
712
|
+
}, undefined>], undefined>, undefined>, v.CheckAction<({
|
|
713
|
+
title?: string | undefined;
|
|
714
|
+
aclProtected?: boolean | undefined;
|
|
715
|
+
confirm?: {
|
|
716
|
+
message?: string | undefined;
|
|
717
|
+
title?: string | undefined;
|
|
718
|
+
} | undefined;
|
|
719
|
+
description?: string | undefined;
|
|
720
|
+
id: string;
|
|
721
|
+
label: string;
|
|
722
|
+
level?: 0 | 1 | -1 | undefined;
|
|
723
|
+
notifications?: {
|
|
724
|
+
error?: string | undefined;
|
|
725
|
+
success?: string | undefined;
|
|
726
|
+
} | undefined;
|
|
727
|
+
path: string;
|
|
728
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
729
|
+
sortOrder?: number | undefined;
|
|
730
|
+
type: "view";
|
|
731
|
+
} | {
|
|
732
|
+
aclProtected?: boolean | undefined;
|
|
733
|
+
confirm?: {
|
|
734
|
+
message?: string | undefined;
|
|
735
|
+
title?: string | undefined;
|
|
736
|
+
} | undefined;
|
|
737
|
+
description?: string | undefined;
|
|
738
|
+
id: string;
|
|
739
|
+
label: string;
|
|
740
|
+
level?: 0 | 1 | -1 | undefined;
|
|
741
|
+
notifications?: {
|
|
742
|
+
error?: string | undefined;
|
|
743
|
+
success?: string | undefined;
|
|
744
|
+
} | undefined;
|
|
745
|
+
runtimeAction: string;
|
|
746
|
+
sortOrder?: number | undefined;
|
|
747
|
+
timeout?: number | undefined;
|
|
748
|
+
type: "worker";
|
|
749
|
+
})[], "Return view button ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
750
|
+
}, undefined>, undefined>;
|
|
674
751
|
readonly shipment: v.OptionalSchema<v.ObjectSchema<{
|
|
675
752
|
readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
|
|
676
753
|
readonly columns: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
@@ -1496,7 +1573,7 @@ declare const CommerceAppConfigSchemas: {
|
|
|
1496
1573
|
value: string;
|
|
1497
1574
|
}[] | undefined;
|
|
1498
1575
|
hook_name: string;
|
|
1499
|
-
method: "
|
|
1576
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
1500
1577
|
priority?: number | undefined;
|
|
1501
1578
|
required?: boolean | undefined;
|
|
1502
1579
|
rules?: {
|
|
@@ -1529,7 +1606,7 @@ declare const CommerceAppConfigSchemas: {
|
|
|
1529
1606
|
value: string;
|
|
1530
1607
|
}[] | undefined;
|
|
1531
1608
|
hook_name: string;
|
|
1532
|
-
method: "
|
|
1609
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
1533
1610
|
priority?: number | undefined;
|
|
1534
1611
|
required?: boolean | undefined;
|
|
1535
1612
|
rules?: {
|
|
@@ -1863,6 +1940,7 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
|
|
|
1863
1940
|
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>;
|
|
1864
1941
|
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
1865
1942
|
}, undefined>], undefined>, undefined>, v.CheckAction<({
|
|
1943
|
+
title?: string | undefined;
|
|
1866
1944
|
aclProtected?: boolean | undefined;
|
|
1867
1945
|
confirm?: {
|
|
1868
1946
|
message?: string | undefined;
|
|
@@ -1876,12 +1954,11 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
|
|
|
1876
1954
|
error?: string | undefined;
|
|
1877
1955
|
success?: string | undefined;
|
|
1878
1956
|
} | undefined;
|
|
1879
|
-
|
|
1957
|
+
path: string;
|
|
1958
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
1880
1959
|
sortOrder?: number | undefined;
|
|
1881
|
-
|
|
1882
|
-
type: "worker";
|
|
1960
|
+
type: "view";
|
|
1883
1961
|
} | {
|
|
1884
|
-
title?: string | undefined;
|
|
1885
1962
|
aclProtected?: boolean | undefined;
|
|
1886
1963
|
confirm?: {
|
|
1887
1964
|
message?: string | undefined;
|
|
@@ -1895,10 +1972,10 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
|
|
|
1895
1972
|
error?: string | undefined;
|
|
1896
1973
|
success?: string | undefined;
|
|
1897
1974
|
} | undefined;
|
|
1898
|
-
|
|
1899
|
-
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
1975
|
+
runtimeAction: string;
|
|
1900
1976
|
sortOrder?: number | undefined;
|
|
1901
|
-
|
|
1977
|
+
timeout?: number | undefined;
|
|
1978
|
+
type: "worker";
|
|
1902
1979
|
})[], "Invoice view button ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
1903
1980
|
}, undefined>, undefined>;
|
|
1904
1981
|
readonly menu: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -1914,12 +1991,12 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
|
|
|
1914
1991
|
readonly replacedPages: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
1915
1992
|
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1916
1993
|
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>;
|
|
1917
|
-
readonly target: v.PicklistSchema<readonly ["order.create"], `Invalid native UI replaced page target. Accepted values are: ${string}`>;
|
|
1994
|
+
readonly target: v.PicklistSchema<readonly ["order.create", "return.create"], `Invalid native UI replaced page target. Accepted values are: ${string}`>;
|
|
1918
1995
|
readonly title: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
1919
1996
|
}, undefined>, undefined>, v.CheckAction<{
|
|
1920
1997
|
path: string;
|
|
1921
1998
|
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
1922
|
-
target: "order.create";
|
|
1999
|
+
target: "order.create" | "return.create";
|
|
1923
2000
|
title: string;
|
|
1924
2001
|
}[], "Native UI replaced page targets must be unique.">]>;
|
|
1925
2002
|
}, undefined>, undefined>;
|
|
@@ -2220,6 +2297,83 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
|
|
|
2220
2297
|
title?: string | undefined;
|
|
2221
2298
|
})[], "Mass action ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
2222
2299
|
}, undefined>, undefined>;
|
|
2300
|
+
readonly rma: v.OptionalSchema<v.ObjectSchema<{
|
|
2301
|
+
readonly viewButtons: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
2302
|
+
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>;
|
|
2303
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2304
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
2305
|
+
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>;
|
|
2306
|
+
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>;
|
|
2307
|
+
}, undefined>, undefined>;
|
|
2308
|
+
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>;
|
|
2309
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
2310
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
2311
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
2312
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
2313
|
+
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>;
|
|
2314
|
+
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>;
|
|
2315
|
+
}, undefined>, undefined>;
|
|
2316
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
2317
|
+
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>;
|
|
2318
|
+
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>;
|
|
2319
|
+
readonly type: v.LiteralSchema<"view", undefined>;
|
|
2320
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
2321
|
+
readonly aclProtected: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2322
|
+
readonly confirm: v.OptionalSchema<v.ObjectSchema<{
|
|
2323
|
+
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>;
|
|
2324
|
+
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>;
|
|
2325
|
+
}, undefined>, undefined>;
|
|
2326
|
+
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>;
|
|
2327
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
2328
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
2329
|
+
readonly level: v.OptionalSchema<v.PicklistSchema<[-1, 0, 1], undefined>, undefined>;
|
|
2330
|
+
readonly notifications: v.OptionalSchema<v.ObjectSchema<{
|
|
2331
|
+
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>;
|
|
2332
|
+
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>;
|
|
2333
|
+
}, undefined>, undefined>;
|
|
2334
|
+
readonly runtimeAction: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.NonEmptyAction<string, `The value of "${string}" must not be empty`>]>;
|
|
2335
|
+
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>;
|
|
2336
|
+
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>;
|
|
2337
|
+
readonly type: v.LiteralSchema<"worker", undefined>;
|
|
2338
|
+
}, undefined>], undefined>, undefined>, v.CheckAction<({
|
|
2339
|
+
title?: string | undefined;
|
|
2340
|
+
aclProtected?: boolean | undefined;
|
|
2341
|
+
confirm?: {
|
|
2342
|
+
message?: string | undefined;
|
|
2343
|
+
title?: string | undefined;
|
|
2344
|
+
} | undefined;
|
|
2345
|
+
description?: string | undefined;
|
|
2346
|
+
id: string;
|
|
2347
|
+
label: string;
|
|
2348
|
+
level?: 0 | 1 | -1 | undefined;
|
|
2349
|
+
notifications?: {
|
|
2350
|
+
error?: string | undefined;
|
|
2351
|
+
success?: string | undefined;
|
|
2352
|
+
} | undefined;
|
|
2353
|
+
path: string;
|
|
2354
|
+
sandboxPermissions?: ("allow-downloads" | "allow-modals" | "allow-popups")[] | undefined;
|
|
2355
|
+
sortOrder?: number | undefined;
|
|
2356
|
+
type: "view";
|
|
2357
|
+
} | {
|
|
2358
|
+
aclProtected?: boolean | undefined;
|
|
2359
|
+
confirm?: {
|
|
2360
|
+
message?: string | undefined;
|
|
2361
|
+
title?: string | undefined;
|
|
2362
|
+
} | undefined;
|
|
2363
|
+
description?: string | undefined;
|
|
2364
|
+
id: string;
|
|
2365
|
+
label: string;
|
|
2366
|
+
level?: 0 | 1 | -1 | undefined;
|
|
2367
|
+
notifications?: {
|
|
2368
|
+
error?: string | undefined;
|
|
2369
|
+
success?: string | undefined;
|
|
2370
|
+
} | undefined;
|
|
2371
|
+
runtimeAction: string;
|
|
2372
|
+
sortOrder?: number | undefined;
|
|
2373
|
+
timeout?: number | undefined;
|
|
2374
|
+
type: "worker";
|
|
2375
|
+
})[], "Return view button ids must be unique after Commerce id sanitization.">]>, undefined>;
|
|
2376
|
+
}, undefined>, undefined>;
|
|
2223
2377
|
readonly shipment: v.OptionalSchema<v.ObjectSchema<{
|
|
2224
2378
|
readonly gridColumns: v.OptionalSchema<v.ObjectSchema<{
|
|
2225
2379
|
readonly columns: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
@@ -2698,7 +2852,7 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
|
|
|
2698
2852
|
value: string;
|
|
2699
2853
|
}[] | undefined;
|
|
2700
2854
|
hook_name: string;
|
|
2701
|
-
method: "
|
|
2855
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
2702
2856
|
priority?: number | undefined;
|
|
2703
2857
|
required?: boolean | undefined;
|
|
2704
2858
|
rules?: {
|
|
@@ -2731,7 +2885,7 @@ declare const CommerceAppConfigSchema: v.LooseObjectSchema<{
|
|
|
2731
2885
|
value: string;
|
|
2732
2886
|
}[] | undefined;
|
|
2733
2887
|
hook_name: string;
|
|
2734
|
-
method: "
|
|
2888
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
2735
2889
|
priority?: number | undefined;
|
|
2736
2890
|
required?: boolean | undefined;
|
|
2737
2891
|
rules?: {
|