Skip to main content
Integrations bring data from the systems your business already runs on, such as an ERP, a CRM or a PostgreSQL database, into your Bijection deployment. The data lands in ordinary tables that your queries read and subscribe to like any other table. You describe the external system once, in TypeScript, inside your bijection/ directory. Bijection then runs the sync for you: it calls the provider on a schedule, checks every response against the contract you declared, and publishes each page of results into your tables in one transaction. Here is the shape of it. An integration declares a customers collection that is read every five minutes:
bijection/crm.ts
Your schema binds a table to that collection with .source(...):
bijection/schema.ts
And your app reads it like any other table:
bijection/customers.ts
The provider’s address and credentials are not part of this code. You connect the integration to a real account per deployment, with the bijection integration commands or the console.

Concepts

  • An integration groups what Bijection needs to know about one external system: the HTTP requests it may make, the collections it reads and the commands it can send.
  • A collection is one kind of record the provider holds, such as customers or invoices. Each collection declares its schema, what the provider’s responses prove about it, and its sync: how often it is read and how a response becomes records.
  • A synced table is a table bound to a collection with .source(...). Only the sync writes to it. Your mutations cannot.
  • A connection installs an integration against one verified provider account in one deployment, with a private credential that your functions never see.

Kinds of integrations

Sending changes back to a provider is done with integration commands, which your code requests as durable external calls. See Operations.

Defining integrations

Declare requests, collections, syncs and commands with defineIntegration.

Synced tables

Bind tables to collections and read synced data in your functions.

Connecting and syncing

Provide credentials, verify the account, install sources and follow syncs.

PostgreSQL

Replicate PostgreSQL tables with change data capture.

Mail

Sync messages, contents and folders from an IMAP mailbox.

Listeners and webhooks

Refresh a collection as soon as the provider notifies you.

CLI reference

Every bijection integration subcommand.