@transai/connector-runner-qlink
v0.3.0
Published
Connector runner for the **QLink MIS/ERP Interface** by Nyquist Systems.
Readme
connector-runner-qlink
Connector runner for the QLink MIS/ERP Interface by Nyquist Systems.
QLink exposes a REST API that allows external systems (PDA/MIS/ERP) to subscribe to production-event notifications. This connector subscribes to all QLink notification types on startup and forwards every notification it receives to the transAI platform as a document.
How it works
- On
start()the connector launches a local HTTP server to receive callbacks. - It calls
POST /qlink/v1/subscribeon the QLink API with the registered callback URL and the configured notification types. - QLink posts JSON notifications to that URL whenever an event occurs.
- The connector forwards each notification to the platform via
sender.documents(). - On
stop()it callsDELETE /qlink/v1/unsubscribe:<id>to clean up.
Configuration
| Field | Type | Required | Default | Description |
|---------------------|--------------------------|----------|---------------------------|------------------------------------------------------------------------------|
| endpointUrl | string | Yes | — | Base URL of the QLink REST API, e.g. http://qlink-pc:23456 |
| apiKey | string | Yes | — | API key used for HTTP Basic authentication to the QLink API |
| callbackHost | string | Yes | — | Externally reachable hostname/IP that QLink will POST notifications to |
| port | number | No | 3080 | Local port the webhook server listens on |
| webhookPath | string | No | /qlink-notifications | HTTP path for the notification endpoint |
| notificationTypes | QlinkNotificationType[]| No | all types (see below) | Subset of event types to subscribe to |
Available notification types
InspectionStart · InspectionStop · ProductionStart · ProductionStop ·
AutoWasteStart · AutoWasteStop · RollCut · PdfReportGenerated
Example configuration
{
"config": {
"endpointUrl": "http://192.168.1.50:23456",
"apiKey": "0815",
"callbackHost": "192.168.1.10",
"port": 3080,
"webhookPath": "/qlink-notifications",
"notificationTypes": ["ProductionStart", "ProductionStop", "RollCut"]
}
}Platform collections
Each notification type is stored in its own collection:
| Notification type | Collection name |
|---------------------|------------------------------------|
| InspectionStart | qlink_inspectionstart |
| InspectionStop | qlink_inspectionstop |
| ProductionStart | qlink_productionstart |
| ProductionStop | qlink_productionstop |
| AutoWasteStart | qlink_autowasterstart |
| AutoWasteStop | qlink_autowasterstop |
| RollCut | qlink_rollcut |
| PdfReportGenerated| qlink_pdfreportgenerated |
Building
pnpm nx build connector-runner-qlinkRunning unit tests
pnpm nx test connector-runner-qlink