@adobe/aio-commerce-lib-api

中文文档
1.4.1发布于 2026/11/04Apache-2.0TypeScriptESM + CJS近 30 天下载 7588

A set of utilities to build HTTP/API clients for I/O Events and Adobe Commerce

原始使用文档
文档目录4 节
  1. Installation
  2. Usage
  3. Architecture
  4. Contributing

@adobe/aio-commerce-lib-api

A set of utilities to build HTTP/API clients for Adobe I/O Events and Adobe Commerce APIs.

This library provides a unified interface for building HTTP clients that can communicate with Adobe Commerce (both SaaS and PaaS) and Adobe I/O Events APIs, with built-in authentication support and a flexible API function binding system.

Installation

pnpm add @adobe/aio-commerce-lib-api

Usage

See the Usage Guide for more information.

Architecture

The library is built on top of Ky, a modern HTTP client based on Fetch API, providing:

  • Automatic retries with exponential backoff
  • Request/response hooks
  • Timeout support
  • JSON parsing
  • Error handling

The authentication layer integrates seamlessly with @adobe/aio-commerce-lib-auth, automatically handling:

  • OAuth 1.0a signatures for PaaS instances
  • Bearer token authentication for SaaS instances
  • IMS token management and refresh

Contributing

This package is part of the Adobe Commerce SDK monorepo. See the Contributing Guide and Development Guide for development setup and guidelines.

版本与发布记录

@adobe/aio-commerce-lib-api 共发布 53 个版本,首次发布于 2025/10/29;过去 12 个月发布了 51 个版本。

版本发布日期距今
1.4.1latest2026/11/042 天前
1.4.1-beta-20261029164417beta2026/10/307 天前
1.4.1-alpha-20261029105213alpha2026/10/297 天前
1.4.1-beta-202610281711152026/10/298 天前
1.4.1-alpha-202610271012502026/10/279 天前
1.4.1-alpha-202610261304262026/10/2610 天前

关于 @adobe/aio-commerce-lib-api 的常见问题

@adobe/aio-commerce-lib-api 是什么?

A set of utilities to build HTTP/API clients for I/O Events and Adobe Commerce

如何安装 @adobe/aio-commerce-lib-api?

在项目目录运行 npm install @adobe/aio-commerce-lib-api,或使用 pnpm add / yarn add / bun add。

@adobe/aio-commerce-lib-api 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@adobe/aio-commerce-lib-api 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@adobe/aio-commerce-lib-api 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22 <=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@adobe/aio-commerce-lib-api 可以商用吗?

@adobe/aio-commerce-lib-api 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@adobe/aio-commerce-lib-api 的下载量有多少?

根据 npm 官方下载统计,@adobe/aio-commerce-lib-api 在 2026/10/05 – 2026/11/03 这 30 天内被下载 7,588 次,日均约 253 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adobe/aio-commerce-lib-api 还在维护吗?

最新版本 1.4.1 发布于 2026/11/04(2 天前);至今共发布 53 个版本,其中过去 12 个月发布了 51 个;首次发布于 2025/10/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。