@coverdash/bor-upload
v0.0.12
Published
Coverdash Broker of Record upload component for partner integrations
Keywords
Readme
@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-uploadUsage
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 withenv: Environment to use ("production", "uat", or "staging")styles: Custom CSS styles for the iframe containerallowScroll: Whether to allow scrolling in the iframehideChat: Hide the chat widgetautoResize: Automatically resize the iframe based on contentsource: Source identifier for trackinghideScrollbar: Hide the scrollbaronUploadComplete: Callback when upload is complete, returns success status and optional document IDonClose: Callback when the component is closed
Development
# Install dependencies
yarn
# Start the example app
cd example
yarn
yarn start
# Build the package
yarn buildPublishing
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
- Customer uploads their current insurance policy document
- AI extracts relevant fields (policy number, carrier, etc.)
- System generates new BOR PDF with extracted data
- Document is automatically signed on customer's behalf
- Coverdash becomes broker of record, earning renewal commissions
