@complycube/api

中文文档
1.1.14发布于 2026/04/16MITTypeScriptESM + CJS近 30 天下载 2.5万

ComplyCube 为 AML/KYC API 的节点.js 库

中文使用文档
文档目录4 节
  1. 安装
  2. 开始
  3. 答复格式
  4. 更多文档

兼容 Cube 节点.js 库

Version Downloads Dependencies

与ComplyCube API整合的官方Node.js库.

装入立方体 使您能够将您的 AML/ KYC 工作流程自动化 .

文件可在下列地点找到: https://docs.complycube.com (中文(中国大陆) )。 。 。 .

安装

使用 npm :

npm install @complycube/api

使用 Yarn :

yarn add @complycube/api

开始

需要软件包 :

const { ComplyCube } = require("@complycube/api");

配置您的 API 密钥 :

const complycube = new ComplyCube({
  apiKey: process.env.COMPLYCUBE_API_KEY
});

使用方式 async编号 :await (单位:千美元) async function:

try {
  const client = await complycube.client.create({
    type: "person",
    email: "[email protected]",
    personDetails: {
      firstName: "Jane",
      lastName: "Doe"
    }
  });

  const check = await complycube.check.create(client.id, {
    type: "standard_screening_check"
  });

  return check;
} catch (error) {
  if (error instanceof ComplyCubeApiError) {
    // An error response was returned by the ComplyCube API.
    console.log(error.message);
    console.log(error.type);
  } else {
    console.log(error.message);
  }
}

承诺:

complycube.client
  .create({
    type: "person",
    email: "[email protected]",
    personDetails: {
      firstName: "Jane",
      lastName: "Doe"
    }
  })
  .then(client =>
    complycube.check.create(client.id, {
      type: "standard_screening_check"
    })
  )
  .then(check =>
    // Handle successfully created check.
  )
  .catch(error => {
    // Handle error.
  });

答复格式

所有响应都将是JavaScript对象.

const client = await complycube.client.create({
  type: "person",
  email: "[email protected]",
  personDetails: {
    firstName: "Jane",
    lastName: "Doe"
  }
});

console.log(client);
{
  "id": "<CLIENT_ID>",
  "type": "person",
  "email": "[email protected]",
  "personDetails": {
      "firstName": "Jane",
      "lastName": "Doe"
  },
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z"
}

更多文档

更多文档和代码示例可见于 https://docs.complycube.com (中文(中国大陆) )。 。 。 .

有关ComplyCube的更多信息,请访问 https://www.complycube.com (中文(中国大陆) )。 。 。 .

版本与发布记录

@complycube/api 共发布 24 个版本,首次发布于 2020/05/22;过去 12 个月发布了 1 个版本。

版本发布日期距今
1.1.14latest2026/04/166 个月前
1.1.132025/10/281 年前
1.1.122025/09/171.1 年前
1.1.112024/10/292 年前
1.1.102024/06/012 年前
1.1.92023/06/083 年前

关于 @complycube/api 的常见问题

@complycube/api 是什么?

ComplyCube 为 AML/KYC API 的节点.js 库

如何安装 @complycube/api?

在项目目录运行 npm install @complycube/api,或使用 pnpm add / yarn add / bun add。

@complycube/api 支持 TypeScript 吗?

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

@complycube/api 支持 ESM 还是 CommonJS?

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

@complycube/api 可以商用吗?

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

@complycube/api 的下载量有多少?

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

@complycube/api 还在维护吗?

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