JSPM

  • Created
  • Published
  • Downloads 69
  • Score
    100M100P100Q110650F
  • License Apache-2.0

CLINQ Bridge Library

Package Exports

  • @clinq/bridge

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@clinq/bridge) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CLINQ Bridge Library

This is the CLINQ Bridge library for developing integration services. It provides a unified way to connect the CLINQ web application to any contact provider.

Bootstrapping a new bridge

If you want to bootstrap a new CLINQ Bridge you can use one of these repositories:

Installation

npm install --save @clinq/bridge
# or
yarn add @clinq/bridge

Quick Start

const bridge = require("@clinq/bridge");

const adapter = {
    getContacts: async ({ apiKey, apiUrl }) => {
        // TODO: Fetch contacts using apiKey and apiUrl or throw on error
        return [
            {
                id: "abc123",
                name: "Walter Geoffrey",
                company: "Rocket Science Inc.",
                email: "walter@example.com",
                phoneNumbers: [
                    {
                        label: "Mobile",
                        phoneNumber: "+4915799912345"
                    }
                ]
            }
        ];
    }
};

bridge.start(adapter);