> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connector apps

> Mount a connector app in your tree, bind its receiver and run its source.

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](https://docs.bijection.com/reference/connectors) lists every provider and mode and links
its guide.

| Connector app | Mode |
| - | - |
| [S3](https://docs.bijection.com/integrations/native-s3.md) | Retain versioned objects and bounded Files under one bucket prefix. |
| [Google Cloud Storage](https://docs.bijection.com/integrations/native-gcs.md) | Retain object generations under one bucket prefix. |
| [Azure Blob Storage](https://docs.bijection.com/integrations/native-azure-blob.md) | Retain blob versions under one container prefix. |
| [ADLS Gen2](https://docs.bijection.com/integrations/native-adls.md) | Retain files from one recursive directory with conditional range reads. |
| [CSV and JSON object records](https://docs.bijection.com/integrations/native-object-records.md) | Publish bounded parsed records from Files retained by any object store. |
| [SFTP](https://docs.bijection.com/integrations/native-sftp.md) | Observe files in a flat directory and retain bounded Files. |
| [OData](https://docs.bijection.com/integrations/native-odata.md) | Observe one OData v4 entity set. Bundling requires the bundled parser artifact. |
| [Dataverse](https://docs.bijection.com/integrations/native-dataverse.md) | Track changes to one GUID-keyed Dataverse table. |
| [DynamoDB](https://docs.bijection.com/integrations/native-dynamodb.md) | Observe items from one table using bounded Scan pages. |
| [RSS and Atom](https://docs.bijection.com/integrations/native-feeds.md) | Observe up to 128 keyed entries from one HTTPS feed window. |
| [LDAP and Active Directory](https://docs.bijection.com/integrations/native-ldap.md) | Read keyed directory entries through a customer HTTPS bridge. |
| [Managed Mail](https://docs.bijection.com/integrations/native-mail.md) | Receive SES mail with labelled messages, attachments and a reaction. |
| [Outbound webhooks](https://docs.bijection.com/integrations/native-webhooks.md) | Deliver signed events to registered HTTPS endpoints. |
| [Amazon Kinesis Data Streams](https://docs.bijection.com/integrations/native-kinesis.md) | Read one shard by sequence and publish to the stream. |
| [Amazon SQS](https://docs.bijection.com/integrations/native-sqs.md) | Receive and publish queue messages, with deletion after landing. |
| [Google Cloud Pub/Sub](https://docs.bijection.com/integrations/native-pubsub.md) | Pull and acknowledge one subscription and publish to one topic. |
| [Azure Service Bus](https://docs.bijection.com/integrations/native-service-bus.md) | Peek-Lock and complete queue messages and send to the queue. |
| [Salesforce Streaming](https://docs.bijection.com/integrations/native-salesforce-streaming.md) | Replay custom platform events over CometD and enqueue new events through REST. |
| [IMAP](https://docs.bijection.com/integrations/native-imap.md) | Capture ranged MIME and attachment Files and reconcile mailbox state when supported. |
| [Gmail](https://docs.bijection.com/integrations/native-gmail.md), [Microsoft Graph](https://docs.bijection.com/integrations/native-microsoft-graph.md), [Exchange EWS](https://docs.bijection.com/integrations/native-exchange-ews.md) | Track mailbox metadata and stage version-checked MIME and attachment Files. |
| [MongoDB](https://docs.bijection.com/integrations/native-mongodb.md) | Observe one collection through a fixed TLS endpoint. |
| [PostgreSQL](https://docs.bijection.com/integrations/native-sql.md), [MySQL](https://docs.bijection.com/integrations/native-mysql.md), [MariaDB](https://docs.bijection.com/integrations/native-mariadb.md) | Observe one relation with bounded keyset paging. |
| [REST](https://docs.bijection.com/integrations/native-rest.md) | Read a bounded JSON collection from one reviewed HTTPS receiver. |
| [Salesforce](https://docs.bijection.com/integrations/native-salesforce.md) | Observe one sObject with SOQL or read one completed Bulk API 2.0 job. |
| [HubSpot](https://docs.bijection.com/integrations/native-hubspot.md), [Zendesk](https://docs.bijection.com/integrations/native-zendesk.md), [Stripe](https://docs.bijection.com/integrations/native-stripe.md), [Jira](https://docs.bijection.com/integrations/native-jira.md), [GitHub](https://docs.bijection.com/integrations/native-github.md) | Read each provider's declared REST feed. |
| [External compute](https://docs.bijection.com/integrations/native-compute.md) | Admit exact-key work and observe or recover original executions on a reviewed external provider. |
| [AS2 and AS4](https://docs.bijection.com/integrations/native-trading-partners.md) | Send and receive signed, encrypted documents with synchronous signed receipts. |
| [OFTP2](https://docs.bijection.com/integrations/native-oftp2.md) | Exchange virtual files over polled sessions and retain matched signed EERP or NERP receipts. |
| [OPC UA](https://docs.bijection.com/integrations/native-opcua.md) | Browse hierarchical references, read raw history, and observe monitored items with Republish. |
| [AVEVA PI Web API](https://docs.bijection.com/integrations/native-pi.md) | Read point metadata, recorded values and stream sets. |
| [Google Sheets](https://docs.bijection.com/integrations/native-sheets.md) | Read entered values and tab metadata with a Drive file version check. |

## 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:

```ts bijection/app.ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { app, label, secret } from "@bijectionhq/bijection";
import rest, { providerEndpoint } from "@bijectionhq/app-rest";

const files = label();
const token = secret();
const provider = providerEndpoint(
  "box.folder.items.observations",
  "https://api.box.com",
  "/2.0/folders/123456/items",
  { kind: "bearer", secret: token },
  files,
);

export default app({ files, token, provider, box: rest({ data: files, receivers: { provider } }) });
```

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:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
printf %s "$BOX_TOKEN" | bijection secret set token
bijection mutate box.source.initialize \
  '{"profile": {"mode": "provider", "provider": "box.folder.items.observations", "limit": 25}}' --as person:ops
```

`box.operator` is granted from code: `ctx.grant(box.operator, { to, under })` in one of your
mutations ([Grants](https://docs.bijection.com/access/grants.md)).

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`.

* [REST and SaaS writes](https://docs.bijection.com/integrations/native-rest.md#native-provider-writes)
* [Object puts](https://docs.bijection.com/integrations/native-s3.md#put-an-object)
* [Create-only SFTP puts](https://docs.bijection.com/integrations/native-sftp.md#put-a-file)
* [Parameterized SQL writes](https://docs.bijection.com/integrations/native-sql.md#parameterized-sql-writes)

For a native REST write mode, bind `providerWriter(mode, { endpoint, auth, scope? }, data)`
and pass it as `receivers.writers[mode]`:

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import rest, { providerEndpoint, providerWriter } from "@bijectionhq/app-rest";

const tasks = providerWriter("asana.tasks.create-update-delete",
  { endpoint: "https://app.asana.com", auth: { kind: "bearer", secret: token } }, projects);
// rest({ data: projects, receivers: { provider, writers: { "asana.tasks.create-update-delete": tasks } } })
```

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:

```ts bijection/app.ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { app, label, secret } from "@bijectionhq/bijection";
import sftp, { sftpDirectory } from "@bijectionhq/app-sftp";

const vendor = label();
const login = secret();
const directory = sftpDirectory("vendor.example:22", login, vendor);

export default app({ vendor, login, directory, imports: sftp({ data: vendor, provider: directory }) });
```

Follow the [trading-partner guide](https://docs.bijection.com/integrations/native-trading-partners.md)
for an inbound route's agreement secret. See
[protected object storage](https://docs.bijection.com/integrations/native-s3.md#mount-and-bind)
for an object store under a protected label.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.