Skip to main content
A connector app is a mountable app: a function from your choices to app(...). You call it at a path in your own tree, and it places its tables, functions, reactions and operator role under that path. The guides below describe each mode the connector catalog implements. The catalog lists every provider and mode and links its guide.

Mount an app

Every connector app follows the same shape:
  1. Declare the label its rows live under, or use label.public.
  2. Declare a secret() for each credential and place it in your tree.
  3. Bind a receiver with the app’s binder: the endpoint, the credential and the label. A binder takes no name, because its path in your tree names it.
  4. Call the app at a path, passing data and the receiver.
This example mounts the REST app for one Box folder:
bijection/app.ts
The app’s functions take their paths under the mount: box.source.initialize, box.source.health, box.records.list. They allow the app’s operator role, box.operator, which clears data. The same role holds the app’s clock reactions. Set the credential, grant the role, and start the source:
box.operator is granted from code: ctx.grant(box.operator, { to, under }) in one of your mutations (Grants). Each provider guide gives the binder call and the initialization arguments for its modes. Call the app’s functions from your own code with ctx.call(box.source.health, {}), where box is the value the app returned, or expose your own functions over them.

Provider writes

Bind a writer receiver at the same data label and pass it to the app. The app places its write functions under the mount, allowed only to its operator role. Each accepted command is a row under data. The app’s clock submits one task per command with the command’s key as its once, and the writer’s contract decides the task’s result. The app records the provider’s evidence under the same label. An accepted answer means the command is queued. A provider reply that never arrives leaves the result Unknown. For a native REST write mode, bind providerWriter(mode, { endpoint, auth, scope? }, data) and pass it as receivers.writers[mode]:
Queue a command with <mount>.writes.submit({ key, mode, command }) and read its state with <mount>.writes.get.

Installer-bound labels

Every connector app takes its data label from you. Pass label.public for public data. For protected data, declare a label, pass it as data and as the binder’s label argument. The app’s operator role clears data, and every row, position, task and File the app keeps lives under it. A provider that returns personal or tenant data refuses ProtectedLabelRequired under label.public. A protected SFTP source mounts as follows:
bijection/app.ts
Follow the trading-partner guide for an inbound route’s agreement secret. See protected object storage for an object store under a protected label.