Docs / Connectors
Connector SDK
The package a connector backend uses to reach core, and to serve its own documentation.
@vendorlogic/connector-sdk is the only way a connector reaches VendorLogic core. It speaks HTTP to /v1/connect, holds no database access and imports
nothing from apps/*.
What it offers#
| Call | Purpose |
|---|---|
createConnector({ apiUrl, clientId, clientSecret }) | the server client. clientId is the connector slug |
exchangeCode(code) | trade the one-time launch code for who opened the connector, the organization and a ready installation client |
installation(id) | a client for background work (a webhook, a schedule) |
installation.references.putResponseDraft(...) | propose a reference answer as a draft (scope references:draft) |
InstallationRevokedError | thrown when the organization uninstalled: forget the installation |
loadDocs(dir) and serveDocs(docs, path) | validate a folder of markdown and answer /docs/index.json and /docs/<slug>.md |
Rules#
- A connector writes drafts only. A person reviews them in core.
- Tokens last one hour and name an installation; core checks the installation on every call.
- Docs the connector serves are public: see Connector documentation contract.