@comapi/sdk-js-foundation

中文文档
1.4.1发布于 2026/07/02MITTypeScriptCommonJS近 30 天下载 7555

Comapi Javascript SDK - Foundation

原始使用文档
文档目录14 节
  1. Install the SDK
  2. Initialise the SDK
  3. Creating a conversation
  4. Sending a message to a conversation
  5. Querying conversations
  6. Querying conversation messages
  7. Querying conversation events
  8. Consuming websocket events
  9. Posting message status updates
  10. eTag usage
  11. Profile API
  12. Typescript
  13. Cordova
  14. SDK Docs

Comapi Javascript SDK - Foundation

Install the SDK

The following document details how to install the SDK.

Initialise the SDK

The following document details how to initialise the SDK.

Creating a conversation

The following document details how to create a conversation.

Sending a message to a conversation

The following document details how to send a message to a conversation.

Querying conversations

The following document details how to query conversations.

Querying conversation messages

The following document details how to query messages.

Querying conversation events

The following document details how to query events.

Consuming websocket events

The following document details how to process realtime events that arrive from the websocket.

Posting message status updates

The following document details how to send status updates for a message.

eTag usage

`The following document details how to use eTags and which methods utilise them.

Profile API

The following document details how to use the profile API

Typescript

The following document details how to consume the SDK using typescript.

Cordova

The following document details how to usi the SDK in a cordova Project.

SDK Docs

JSDOC documenttion is available here

版本与发布记录

@comapi/sdk-js-foundation 共发布 15 个版本,首次发布于 2017/04/04;过去 12 个月发布了 2 个版本。

版本发布日期距今
1.4.1latest2026/07/024 个月前
1.4.02026/06/304 个月前
1.3.02024/05/172 年前
1.2.22022/06/214 年前
1.2.0-beta.1beta2021/04/195 年前
1.1.62020/12/045 年前

关于 @comapi/sdk-js-foundation 的常见问题

@comapi/sdk-js-foundation 是什么?

Comapi Javascript SDK - Foundation

如何安装 @comapi/sdk-js-foundation?

在项目目录运行 npm install @comapi/sdk-js-foundation,或使用 pnpm add / yarn add / bun add。

@comapi/sdk-js-foundation 支持 TypeScript 吗?

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

@comapi/sdk-js-foundation 支持 ESM 还是 CommonJS?

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

@comapi/sdk-js-foundation 可以商用吗?

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

@comapi/sdk-js-foundation 的下载量有多少?

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

@comapi/sdk-js-foundation 还在维护吗?

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