Integrations
Manage flows used as integration templates and instances.
Was this helpful?
Was this helpful?
const integrations = appmixer.ui.Integrations(config)
integrations.set(key, value)
integrations.get(key)appmixer.ui.Integrations({
/* ... */
options: {
customFilter: {
// displaying Integrations with a certain customField
'customFields.category': 'healthcare',
// that are shared with someone
'sharedWith': '![]'
// and in this example, that are shared throught the 'domain'
// options with a 'testdomain.com'
'sharedWith.domain': 'testdomain.com'
// or we could filter only Integrations that are shared with
// scope 'user'
// 'sharedWith.scope': 'user',
}
}
}integrations.state(name, value)integrations.on(event, handler)integrations.on('integration:create', integrationId => {/* ... */})integrations.on('integration:edit', integrationId => {/* ... */})integrations.on('integration:remove', integrationId => {/* ... */})integrations.on('integration:start', integrationId => {/* ... */})integrations.on('integration:stop', integrationId => {/* ... */})const integrations = appmixer.ui.Integrations({
el: '#integrations'
})
integrations.open()
integrations.on('integration:create', async templateId => {
// Create integration flow as a clone of the template. Disconnect
// accounts because they might not be shared with the end user.
const integrationId = await appmixer.api.cloneFlow(templateId, { connectAccounts: false })
await appmixer.api.updateFlow(integrationId, { templateId })
const wizard = appmixer.ui.Wizard({
el: '#your-wizard-div',
flowId: integrationId,
});
wizard.open()
integrations.reload()
})
integrations.on('integration:edit', function(integrationId) {
var wizard = appmixer.ui.Wizard({
el: '#wizard',
flowId: integrationId
});
wizard.open()
});
integrations.open()