Skip to main content

External Connectors

Hub provides backend connectors for integrating with external services. All connectors are in Connectors/ and extend BaseConnector with @Extern methods callable via LCP.

Connectors Reference​

SlackConnector​

Sends notifications to Slack channels via the Slack Web API.

MethodSignaturePurpose
NotifyAsync($channel, $text, $asUser?)Send a message to a Slack channel
  • Uses chat.postMessage API with Bearer token authentication
  • Channel names are auto-prefixed with # if missing
  • Custom sender name and icon from config; override with $asUser

Config section: slack

slack: {
enabled: true,
token : "xoxb-...", // Slack Bot token
icon : "https://...", // Bot avatar URL
name : "Oidis Hub" // Bot display name
}

MsTeamsConnector​

Sends notifications to Microsoft Teams channels via incoming webhooks.

MethodSignaturePurpose
Notify($text)Send a message to a Teams channel
  • Uses Adaptive Card format (v1.2) via webhook URL
  • Optional display name from config prepended as bold header

Config section: msTeams

msTeams: {
enabled : true,
webhookURL: "https://...", // Teams incoming webhook URL
name : "Oidis Hub" // Display name in messages
}

CertsHandler​

Manages TLS/SSL certificate generation for whitelisted domains.

MethodSignaturePurpose
getCertsFor($domain, $callback)Generate certificate and key for a domain
  • Only generates certificates for domains listed in certs.whitelist
  • Returns empty strings for non-whitelisted domains
  • Uses FULL_CONTROL response type for async callback pattern
  • Delegates to localhost CertsManager for actual certificate creation

Config section: certs

certs: {
whitelist: ["agent1.example.com", "agent2.example.com"]
// ... plus parent ICertsConfiguration fields
}

FileTransferHandler​

Handles file upload and download operations between Hub and agents or external systems.

LoggerConnector​

External logging service integration for forwarding logs to centralized logging infrastructure.

ReportsConnector​

Report generation and delivery integration for analytics and usage reports.

RegistryConnector​

Access to the configuration registry for reading and managing stored configurations.

AddressesConnector​

Address resolution and location service integration.

Using Connectors​

All connectors are BaseConnector subclasses and follow the standard Oidis connector pattern:

// Server-side usage
const slack = SlackConnector.getInstance<SlackConnector>();
await slack.NotifyAsync("#deployments", "Build v2.1.0 deployed successfully");

// Frontend calls via LCP (from hub-gui connectors)
const result = await this.connector.NotifyAsync("#alerts", "Disk usage at 90%");

Microsoft Graph (MsGraphConnector)​

MsGraphConnector.getInstance() is the shared application-only Graph client (client credentials from the msGraph block). It caches the token and retries throttled calls. Read verbs: Get (JSON) and GetBinary (file content). Write verbs:

MethodUse
Put($path, $body, $contentType?)PUT a JSON string or a binary body
Post($path, $body)POST a JSON body
Delete($path)DELETE; a missing item counts as deleted
UploadFile($itemPath, $data, $contentType?)Upload to /drives/{id}/root:/Folder/file.ext, replacing a file of the same name; over 4 MiB it opens an upload session and sends 10 MiB chunks (multiples of 320 KiB)

Writing requires a write permission of the app registration; prefer Sites.Selected with the write role granted on the one site over the tenant-wide Sites.ReadWrite.All. The chunk URLs of an upload session are pre-authorized and are called without the bearer token.


See also: Connectors Reference | Hub Configuration | Hub Backend Overview