The listener option can be passed in order to respond to various widget events.

Syntax

javascript
listener: {
  onSourceLinked:
  (source, flow) => console.log(JSON.stringify(source))
}

Supported listeners

onWidgetOpen

Signature ()

onWidgetClose

Signature ()

onReconnect

Signature (entityId, flow)
NameTypeDescription
entityIdstringID of the entity (source/target/connector) being reconnected
flowstringID of the flow

onPopupClose

Signature (id, flowId)
NameTypeDescription
idstringID of source/target being linked
flowIdstringID of flow being linked

onSourceLinked

Signature (source, flowId, tenantId)
NameTypeDescription
sourceobjectThe source that has been linked. Follows same response structure as ​linked sources API
flowIdstringID of flow that has been linked
tenantIdstringID of the tenant

onTargetLinked

Signature (target, flowId)
NameTypeDescription
targetobjectThe target that has been linked. Follows same response structure as linked targets API
flowIdstringID of flow that has been linked

onConnectorLinked

Signature (connector, flowId, tenantId)
NameTypeDescription
connectorobjectThe connector that has been linked
flowIdstringID of flow that has been linked
tenantIdstringID of the tenant

onSourceLinkCanceled

Signature (tapId, flowId)
NameTypeDescription
tapIdstringID of source
flowIdstringID of flow

onConnectorLinkCanceled

Signature (connectorId, flowId)
NameTypeDescription
connectorIdstringID of connector
flowIdstringID of flow

onSourceUnlinked

Signature (source, flowId)
NameTypeDescription
sourcestringThe source that has been unlinked
flowIdstringID of flow that has been unlinked

onConnectorUnlinked

Signature (connector, flowId)
NameTypeDescription
connectorstringThe connector that has been unlinked
flowIdstringID of flow that has been unlinked

onTargetUnlinked

Signature (target, flowId)
NameTypeDescription
targetstringThe target that has been unlinked
flowIdstringID of flow that has been unlinked

onTargetLinkCanceled

Signature (targetId, flowId)
NameTypeDescription
targetIdstringID of target
flowIdstringID of flow

onSourceLinkFailed

Signature (source, flowId, tenant, errorMessage)
NameTypeDescription
sourcestring | objectThe source that failed to link
flowIdstringID of flow
tenantstringID of the tenant
errorMessagestringError message describing the failure

onConnectorLinkFailed

Signature (connector, flowId, tenant, errorMessage)
NameTypeDescription
connectorstring | objectThe connector that failed to link
flowIdstringID of flow
tenantstringID of the tenant
errorMessagestringError message describing the failure

onTargetLinkFailed

Signature (target, flowId, tenant, errorMessage)
NameTypeDescription
targetstring | objectThe target that failed to link
flowIdstringID of flow
tenantstringID of the tenant
errorMessagestringError message describing the failure

onStartJob

Signature (tap_id, flow_id, user_id)
NameTypeDescription
tap_idstringID of source the job is running for
flow_idstringID of flow source is linked under
user_idstringID of the tenant who started job

onFieldMapSave

Signature (entityId, flowId, tenantId)
NameTypeDescription
entityIdstringID of the entity
flowIdstringID of the flow
tenantIdstringID of the tenant

onCustomMappingSave

Signature (entityId, flowId, tenantId)
NameTypeDescription
entityIdstringID of the entity
flowIdstringID of the flow
tenantIdstringID of the tenant