Documentation Index
Fetch the complete documentation index at: https://docs.hotglue.com/llms.txt
Use this file to discover all available pages before exploring further.
setListeners
ThesetListeners function allows you to set event listeners for connector link operations and for sync schedule changes inside the widget.
Parameters:
- listeners:
objectonConnectorLink:(event: ConnectorLinkEvent) => void- Callback for when a connector is successfully linked.
onConnectorRelink:(event: ConnectorLinkEvent) => void- Callback for when a connector is relinked.
onConnectorUnlink:(event: ConnectorUnlinkEvent) => void- Callback for when a connector is unlinked.
onConnectorLinkFail:(event: ConnectorLinkFailEvent) => void- Callback for when a connector link fails.
onScheduleSave:(event: ScheduleEvent) => void(optional)- Callback when the sync schedule is saved or disabled in the widget. Your app can mirror schedule state, trigger backend syncs, or run analytics. For how the schedule UI behaves, see Sync Schedule.
- If you omit
onScheduleSave, the widget skips it. If your callback throws, the widget catches the error and logsonScheduleSave listener failedto the console without breaking the save flow in the UI.
Event Types:
-
ConnectorLinkEvent:- connectorId:
string - connectorType:
'connector' | 'source' | 'target' - connectorDetail:
Record<string, unknown> - flowId:
string - tenantId:
string
- connectorId:
-
ConnectorUnlinkEvent:- connectorId:
string - connectorType:
'connector' | 'source' | 'target' - flowId:
string - tenantId:
string
- connectorId:
-
ConnectorLinkFailEvent:- error:
string - connectorId:
string - connectorType:
'connector' | 'source' | 'target' - flowId:
string - tenantId:
string - type:
'failed' | 'cancelled'(optional)
- error:
-
ScheduleEvent:- type:
'save' | 'disabled'—'save'when the user saves with scheduling enabled;'disabled'when they save with scheduling turned off in the schedule UI. - oldSchedule:
string | null— Previous schedule expression before the change;nullif none applied. - newSchedule:
string | null— Schedule after the change;nullif cleared or not applicable. - connectorId:
string(optional) — Present when your environment has Enable connector schedules on and the user saved a connector-level schedule (the widget scoped the save to that connector). Omitted for flow-only schedule updates. See Sync Schedule — flow vs connector. - flowId:
string - tenantId:
string— May be an empty string when no tenant id is available (the widget passestenantId || '').
- type: