@adobe/aio-commerce-lib-core 1.3.0 → 1.4.0-alpha-20261111105053

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @adobe/aio-commerce-lib-core
2
2
 
3
+ ## 1.4.0-alpha-20261111105053
4
+
5
+ ### Minor Changes
6
+
7
+ - [#770](https://github.com/adobe/aio-commerce-sdk/pull/770) [`7a2f4ac`](https://github.com/adobe/aio-commerce-sdk/commit/7a2f4ac908dc101254c7357a4d6e33415b8c4473) Thanks [@obarcelonap](https://github.com/obarcelonap)! - Add support for Node.js 26.
8
+
3
9
  ## 1.3.0
4
10
 
5
11
  ### Minor Changes
@@ -12,6 +12,11 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
+ /**
16
+ * This module exports the shared Commerce environment schema used to scope SDK
17
+ * items (configuration fields, webhooks, events) to specific Commerce environments.
18
+ * @packageDocumentation
19
+ */
15
20
  import * as v from "valibot";
16
21
  /** The list of supported Commerce environments an item can be scoped to. */
17
22
  export declare const COMMERCE_ENVS: ["paas", "saas"];
@@ -12,6 +12,10 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
+ /**
16
+ * This module exports core error utilities for the AIO Commerce SDK.
17
+ * @packageDocumentation
18
+ */
15
19
  import { GenericIssue } from "valibot";
16
20
  /** Defines the base options for {@link CommerceSdkErrorBase}. */
17
21
  type CommerceSdkErrorBaseOptions = ErrorOptions & {
@@ -12,7 +12,12 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { r as RuntimeActionParams } from "../index-_sNhjzIe.cjs";
15
+ /** biome-ignore-all lint/performance/noBarrelFile: export as part of the Public API */
16
+ /**
17
+ * This module exports core HTTP header utilities for the AIO Commerce SDK.
18
+ * @packageDocumentation
19
+ */
20
+ import { RuntimeActionParams } from "../params/index.cjs";
16
21
  import { CamelCase } from "type-fest";
17
22
  /** The type of an HTTP header value. */
18
23
  type HttpHeaderValue = string | string[] | undefined;
@@ -12,5 +12,45 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { a as nonEmpty, i as allNonEmpty, n as HttpMethodLowercase, r as RuntimeActionParams, t as HttpMethod } from "../index-_sNhjzIe.cjs";
16
- export { HttpMethod, HttpMethodLowercase, RuntimeActionParams, allNonEmpty, nonEmpty };
15
+ /**
16
+ * This module exports core parameter utilities for the AIO Commerce SDK.
17
+ * @packageDocumentation
18
+ */
19
+ /**
20
+ * Checks if the given runtime action input value is non-empty.
21
+ *
22
+ * @param name - The name of the parameter. Required because of `aio app dev` compatibility: inputs mapped to undefined env vars come as $<input_name> in dev mode, but as '' in prod mode.
23
+ * @param value - The value of the parameter.
24
+ */
25
+ export declare function nonEmpty(name: string, value: unknown): boolean;
26
+ /**
27
+ * Checks if all required parameters are non-empty.
28
+ *
29
+ * @param params - The action input parameters.
30
+ * @param required - The list of required parameter names.
31
+ */
32
+ export declare function allNonEmpty<const T extends string[]>(params: Record<string, unknown>, required: T): params is Record<string, unknown> & Record<T[number], unknown>;
33
+ /**
34
+ * Standard HTTP methods supported by Adobe I/O Runtime.
35
+ * These are the methods that can be used when invoking runtime actions via HTTP.
36
+ */
37
+ export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
38
+ /**
39
+ * Lowercase HTTP method as sent by OpenWhisk/Adobe I/O Runtime.
40
+ * OpenWhisk sends methods in lowercase (e.g., "get", "post").
41
+ */
42
+ export type HttpMethodLowercase = Lowercase<HttpMethod>;
43
+ /** The type of the runtime action parameters. */
44
+ export type RuntimeActionParams = {
45
+ /** If the runtime action is invoked via HTTP, this will be the headers of the request. */
46
+ __ow_headers?: Record<string, string | undefined>;
47
+ /** If the runtime action is invoked via HTTP, this will be the HTTP method of the request. */
48
+ __ow_method?: HttpMethodLowercase;
49
+ /** If the runtime action is invoked via HTTP, this will be the unmatched path of the request (matching stops after consuming the action extension) */
50
+ __ow_path?: string;
51
+ /** If the runtime action is invoked via HTTP, this will be the request body entity, as a base64-encoded string when its content is binary or JSON object/array, or as a plain string otherwise */
52
+ __ow_body?: string;
53
+ /** If the runtime action is invoked via HTTP, this will be the query parameters of the request, as an unparsed string. */
54
+ __ow_query?: string;
55
+ [key: string]: unknown;
56
+ };
@@ -12,6 +12,11 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
+ /** biome-ignore-all lint/performance/noBarrelFile: This is the public API for the responses entrypoint */
16
+ /**
17
+ * This module exports core response utilities for the AIO Commerce SDK.
18
+ * @packageDocumentation
19
+ */
15
20
  type HeadersRecord = Record<string, string>;
16
21
  type BodyRecord = Record<string, unknown>;
17
22
  type BodyRecordWithMessage = BodyRecord & {
@@ -12,6 +12,11 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
+ /**
16
+ * This module exports the shared Commerce environment schema used to scope SDK
17
+ * items (configuration fields, webhooks, events) to specific Commerce environments.
18
+ * @packageDocumentation
19
+ */
15
20
  import * as v from "valibot";
16
21
  /** The list of supported Commerce environments an item can be scoped to. */
17
22
  export declare const COMMERCE_ENVS: ["paas", "saas"];
@@ -12,6 +12,10 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
+ /**
16
+ * This module exports core error utilities for the AIO Commerce SDK.
17
+ * @packageDocumentation
18
+ */
15
19
  import { GenericIssue } from "valibot";
16
20
  /** Defines the base options for {@link CommerceSdkErrorBase}. */
17
21
  type CommerceSdkErrorBaseOptions = ErrorOptions & {
@@ -12,6 +12,11 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
+ /** biome-ignore-all lint/performance/noBarrelFile: export as part of the Public API */
16
+ /**
17
+ * This module exports core HTTP header utilities for the AIO Commerce SDK.
18
+ * @packageDocumentation
19
+ */
15
20
  import { r as RuntimeActionParams } from "../index-_sNhjzIe.mjs";
16
21
  import { CamelCase } from "type-fest";
17
22
  /** The type of an HTTP header value. */
@@ -12,5 +12,9 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
+ /**
16
+ * This module exports core parameter utilities for the AIO Commerce SDK.
17
+ * @packageDocumentation
18
+ */
15
19
  import { a as nonEmpty, i as allNonEmpty, n as HttpMethodLowercase, r as RuntimeActionParams, t as HttpMethod } from "../index-_sNhjzIe.mjs";
16
20
  export { HttpMethod, HttpMethodLowercase, RuntimeActionParams, allNonEmpty, nonEmpty };
@@ -12,6 +12,11 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
+ /** biome-ignore-all lint/performance/noBarrelFile: This is the public API for the responses entrypoint */
16
+ /**
17
+ * This module exports core response utilities for the AIO Commerce SDK.
18
+ * @packageDocumentation
19
+ */
15
20
  type HeadersRecord = Record<string, string>;
16
21
  type BodyRecord = Record<string, unknown>;
17
22
  type BodyRecordWithMessage = BodyRecord & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/aio-commerce-lib-core",
3
- "version": "1.3.0",
3
+ "version": "1.4.0-alpha-20261111105053",
4
4
  "private": false,
5
5
  "description": "Core utilities for Adobe Commerce SDK libraries",
6
6
  "keywords": [
@@ -59,11 +59,11 @@
59
59
  "@aio-commerce-sdk/config-typedoc": "1.0.0",
60
60
  "@aio-commerce-sdk/config-typescript": "1.0.0",
61
61
  "@aio-commerce-sdk/config-vitest": "1.0.0",
62
- "@aio-commerce-sdk/scripts": "0.1.1",
62
+ "@aio-commerce-sdk/scripts": "0.2.0-alpha-20261111105053",
63
63
  "typescript": "^6.0.0"
64
64
  },
65
65
  "engines": {
66
- "node": ">=22 <=24"
66
+ "node": ">=22 <=26"
67
67
  },
68
68
  "publishConfig": {
69
69
  "access": "public",
@@ -1,53 +0,0 @@
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
- /**
16
- * Checks if the given runtime action input value is non-empty.
17
- *
18
- * @param name - The name of the parameter. Required because of `aio app dev` compatibility: inputs mapped to undefined env vars come as $<input_name> in dev mode, but as '' in prod mode.
19
- * @param value - The value of the parameter.
20
- */
21
- declare function nonEmpty(name: string, value: unknown): boolean;
22
- /**
23
- * Checks if all required parameters are non-empty.
24
- *
25
- * @param params - The action input parameters.
26
- * @param required - The list of required parameter names.
27
- */
28
- declare function allNonEmpty<const T extends string[]>(params: Record<string, unknown>, required: T): params is Record<string, unknown> & Record<T[number], unknown>;
29
- /**
30
- * Standard HTTP methods supported by Adobe I/O Runtime.
31
- * These are the methods that can be used when invoking runtime actions via HTTP.
32
- */
33
- type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
34
- /**
35
- * Lowercase HTTP method as sent by OpenWhisk/Adobe I/O Runtime.
36
- * OpenWhisk sends methods in lowercase (e.g., "get", "post").
37
- */
38
- type HttpMethodLowercase = Lowercase<HttpMethod>;
39
- /** The type of the runtime action parameters. */
40
- type RuntimeActionParams = {
41
- /** If the runtime action is invoked via HTTP, this will be the headers of the request. */
42
- __ow_headers?: Record<string, string | undefined>;
43
- /** If the runtime action is invoked via HTTP, this will be the HTTP method of the request. */
44
- __ow_method?: HttpMethodLowercase;
45
- /** If the runtime action is invoked via HTTP, this will be the unmatched path of the request (matching stops after consuming the action extension) */
46
- __ow_path?: string;
47
- /** If the runtime action is invoked via HTTP, this will be the request body entity, as a base64-encoded string when its content is binary or JSON object/array, or as a plain string otherwise */
48
- __ow_body?: string;
49
- /** If the runtime action is invoked via HTTP, this will be the query parameters of the request, as an unparsed string. */
50
- __ow_query?: string;
51
- [key: string]: unknown;
52
- };
53
- export { nonEmpty as a, allNonEmpty as i, HttpMethodLowercase as n, RuntimeActionParams as r, HttpMethod as t };