@epilot/dashboard-client

中文文档
2.1.3发布于 2026/07/07UNLICENSEDTypeScriptCommonJS近 30 天下载 1万

API Client for epilot dashboard API

原始使用文档
文档目录3 节
  1. Getting Started
  2. BaseURL & Authorization
  3. API Docs:

@epilot/dashboard-client

API Client for epilot dashboard API.

Uses openapi-client-axios

Getting Started

Install the package:

npm install --save-dev @epilot/dashboard-client

Import the package:

import { getClient } from '@epilot/dashboard-client';

Use the client:

// get typed client
const client = await getClient();

// call an operation
const res = await client.testS3();

BaseURL & Authorization

To pass an authorization header and set up the API url, you can use axios defaults:

const client = getClient();
client.defaults.baseURL = config.API_URL;
client.defaults.headers['authorization'] = `Bearer ${token}`;

API Docs:

https://docs.api.epilot.io/

版本与发布记录

@epilot/dashboard-client 共发布 11 个版本,首次发布于 2022/08/08;过去 12 个月发布了 5 个版本。

版本发布日期距今
2.1.3latest2026/07/074 个月前
2.1.22026/06/264 个月前
2.1.12026/06/174 个月前
2.0.3-alpha.0alpha2026/06/125 个月前
2.1.02026/03/098 个月前
2.0.22025/06/041.4 年前

关于 @epilot/dashboard-client 的常见问题

@epilot/dashboard-client 是什么?

API Client for epilot dashboard API

如何安装 @epilot/dashboard-client?

在项目目录运行 npm install @epilot/dashboard-client,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:axios(^1.6.2)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@epilot/dashboard-client 支持 TypeScript 吗?

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

@epilot/dashboard-client 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@epilot/dashboard-client 可以商用吗?

@epilot/dashboard-client 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@epilot/dashboard-client 的下载量有多少?

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

@epilot/dashboard-client 还在维护吗?

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