@coverdash/bor-upload

中文文档
0.0.13发布于 2026/03/28MITTypeScriptESM + CJS零依赖近 30 天下载 2597

Coverdash Broker of Record upload component for partner integrations

原始使用文档
文档目录7 节
  1. Installation
  2. Usage
  3. Props
  4. Development
  5. Publishing
  6. Build Process
  7. BOR Process Flow

@coverdash/bor-upload

Coverdash Broker of Record (BOR) Upload Component for partner integrations. This component provides a drag-and-drop interface for uploading existing insurance policies to transfer broker management to Coverdash.

Installation

npm install @coverdash/bor-upload
# or
yarn add @coverdash/bor-upload

Usage

import BORUploadComponent from "@coverdash/bor-upload"
import "@coverdash/bor-upload/lib/cjs/styles.css"

function App() {
  return (
    <BORUploadComponent
      env="uat" // or "production" or "staging"
      businessId="your-business-id"
      onUploadComplete={(success, documentId) => {
        console.log("Upload complete:", success, documentId)
      }}
      onClose={() => {
        console.log("Component closed")
      }}
    />
  )
}

Props

  • businessId (required): The business ID to associate the BOR document with
  • env: Environment to use ("production", "uat", or "staging")
  • styles: Custom CSS styles for the iframe container
  • allowScroll: Whether to allow scrolling in the iframe
  • hideChat: Hide the chat widget
  • autoResize: Automatically resize the iframe based on content
  • source: Source identifier for tracking
  • hideScrollbar: Hide the scrollbar
  • onUploadComplete: Callback when upload is complete, returns success status and optional document ID
  • onClose: Callback when the component is closed

Development

# Install dependencies
yarn

# Start the example app
cd example
yarn
yarn start

# Build the package
yarn build

Publishing

The package is published to npm via GitLab CI when pushing to the release_prod branch.

Build Process

The build process uses the copy-files script to copy components from example/src/components to src/components before building. This allows you to develop in the example app and have changes automatically copied to the package.

BOR Process Flow

  1. Customer uploads their current insurance policy document
  2. AI extracts relevant fields (policy number, carrier, etc.)
  3. System generates new BOR PDF with extracted data
  4. Document is automatically signed on customer's behalf
  5. Coverdash becomes broker of record, earning renewal commissions

版本与发布记录

@coverdash/bor-upload 共发布 11 个版本,首次发布于 2025/12/09;过去 12 个月发布了 11 个版本。

版本发布日期距今
0.0.13latest2026/03/287 个月前
0.0.122026/02/188 个月前
0.0.102025/12/1910 个月前
0.0.92025/12/1910 个月前
0.0.82025/12/1910 个月前
0.0.72025/12/1710 个月前

关于 @coverdash/bor-upload 的常见问题

@coverdash/bor-upload 是什么?

Coverdash Broker of Record upload component for partner integrations

如何安装 @coverdash/bor-upload?

在项目目录运行 npm install @coverdash/bor-upload,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^17.0.0 || ^18.0.0)、react-dom(^17.0.0 || ^18.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@coverdash/bor-upload 支持 TypeScript 吗?

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

@coverdash/bor-upload 支持 ESM 还是 CommonJS?

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

@coverdash/bor-upload 可以商用吗?

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

@coverdash/bor-upload 的下载量有多少?

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

@coverdash/bor-upload 还在维护吗?

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