# @dbbs/poeditor-sdk 中文文档

规范地址：https://npmcn.com/package/%40dbbs/poeditor-sdk/

版本：0\.0\.5
npm 元数据更新时间：2025-03-26T09:17:20.726Z
中文译文更新时间：2026-11-11T16:52:01.998Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40dbbs/poeditor-sdk
原文对照：https://npmcn.com/package/%40dbbs/poeditor-sdk/?lang=original

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：50.5 kB，78 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：0 个
- 首次发布：2025-03-17T13:28:21.585Z
- 最新版本发布：2025-03-26T09:17:20.534Z
- 近 30 天下载量：8204（2026-10-12 至 2026-11-10，npm 官方下载统计）
- 已发布版本数：5（近 12 个月 0 个）

## 中文简介

编辑器 SDK

## 安装

```sh
npm install @dbbs/poeditor-sdk
```

也可以使用：`pnpm add @dbbs/poeditor-sdk`、`yarn add @dbbs/poeditor-sdk`、`bun add @dbbs/poeditor-sdk`

## README

# 编辑器 SDK

> TypeScript- first SDK 与 POEditor 本地化平台进行无缝集成

## 特征

-   **类型安全互动** - 严格打字的完整类型脚本支持
-   **原子行动** - 批量术语/翻译同步
-   **企业准备** - 重试政策、缓存和找回错误
-   **Webhook 支持** - 内部核查和事件打字
-   **高API覆盖率** - 已执行的大多数编辑端点

## 安装

```bash
# Using yarn
yarn add @dbbs/poeditor-sdk

# Using npm
npm install @dbbs/poeditor-sdk
```

## 快速启动 QQ

1.  获取 API 托肯
    
    访问 POEditor 账户设置
    
    生成 API 令牌
    
    安全存储( 建议: 环境变量)
    
2.  基本用途
    

```tsx
import { POEditorSDK } from '@dbbs/poeditor-sdk';

// Initialize with project ID and token
const sdk = new POEditorSDK(process.env.POEDITOR_TOKEN, 12345);

// Sync terms atomically
await sdk.syncTerms({
  terms: [
    { term: 'welcome_message', context: 'greetings' },
    { term: 'error_404', context: 'errors' }
  ]
});

// Export French translations
const frenchTranslations = await sdk.exportProject({
  language: 'fr',
  type: 'json'
});
```

## API 参考QQ

| 类别 | 方法 | 参数 | 说明 |
| --- | --- | --- | --- |
| 项目 | `listProjects()` | \- 说吧 | 列出所有可访问的项目 |
| 项目 | `exportProject()` | `{ language: string, type: Format }` | 导出翻译 |
| 术语 | `syncTerms()` | `{ terms: Term[] }` | 原子术语同步 |
| 术语 | `updateTerms()` | `{ terms: UpdateTerm[] }` | 批量术语更新 |
| 语文 | `addLanguageToProject()` | `{ language: string, code?: string }` | 添加新工程语言 |

[查看完整的 API 文档 - >](https://poeditor.com/docs/api)

## 捐款额

我们欢迎捐款! 请遵循我们的工作流程:

1.  叉子存储器
    
2.  创建特征分支( feat/ your- setature)
    
3.  新功能的写入测试
    
4.  以 :
    
    ```
     - Description of changes
    
     - Updated documentation
    
     - Test coverage report
    ```
    

## 许可证 QQ

DBBS Poeditor SDK是开源软件,根据 [MIT 许可证](https://npmcn.com/package/%40dbbs/poeditor-sdk/LICENSE)。 。 。 .

## 作者和维护者

-   [罗斯季斯拉夫·扎霍鲁尔科](https://github.com/rostyslavZH)
-   [安德烈·比卢斯](https://github.com/andrii-dbb)
-   [罗曼·博博夫斯基](https://github.com/RomanBobrovskiy)

## 常见问题

### @dbbs/poeditor-sdk 是什么？

编辑器 SDK

### 如何安装 @dbbs/poeditor-sdk？

在项目目录运行 npm install @dbbs/poeditor-sdk，或使用 pnpm add / yarn add / bun add。

### @dbbs/poeditor-sdk 支持 TypeScript 吗？

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

### @dbbs/poeditor-sdk 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @dbbs/poeditor-sdk 可以商用吗？

@dbbs/poeditor-sdk 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @dbbs/poeditor-sdk 的下载量有多少？

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

### @dbbs/poeditor-sdk 还在维护吗？

最新版本 0\.0\.5 发布于 2025/03/26（1\.6 年前）；至今共发布 5 个版本，其中过去 12 个月发布了 0 个；首次发布于 2025/03/17。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

