@complycube/api

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

ComplyCube's Node.js library for the AML/KYC API

原始使用文档
文档目录4 节
  1. Installation
  2. Getting Started
  3. Response format
  4. More Documentation

ComplyCube Node.js Library

Version Downloads Dependencies

The official Node.js library for integrating with the ComplyCube API.

ComplyCube enables you to automate your AML/KYC workflows effortlessly.

Documentation can be found at https://docs.complycube.com.

Installation

Using npm:

npm install @complycube/api

Using Yarn:

yarn add @complycube/api

Getting Started

Require the package:

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

Configure with your API key:

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

Using with async/await (in an 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);
  }
}

Using with promises:

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.
  });

Response format

All responses will be JavaScript objects.

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"
}

More Documentation

More documentation and code examples can be found at https://docs.complycube.com.

Further information on ComplyCube can be found at 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's Node.js library for the AML/KYC API

如何安装 @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 和提交记录判断。