Skip to main content

integrations

Default singleton instance of the pluggable integration registry. OpenRegister attaches this to window.OCA.OpenRegister.integrations at bootstrap; consuming Conduction apps call integrations.register(...) to expose tabs and widgets that appear in CnObjectSidebar, CnDashboardPage, and CnDetailPage.

For test isolation, import createIntegrationRegistry instead — each call returns a fresh, isolated registry.

Signature​

import { integrations } from '@conduction/nextcloud-vue'

integrations.register({ id, label, tab, widget, /* ... */ })
integrations.list() // sorted snapshot
integrations.get('files') // single entry or null
integrations.has('files') // boolean
integrations.resolveWidget('files', 'detail-page')
integrations.onChange((snapshot) => { /* ... */ })
integrations.unregister('files')

Methods​

MethodReturnsDescription
register(entry)object | nullNormalise and store an integration. Throws on invalid input, on missing tab/widget, and on duplicate id in development (warns + keeps first in production — AD-13).
unregister(id)booleanRemove an integration. Returns true when something was removed.
list()object[]Snapshot sorted by order ascending then id.
get(id)object | nullSingle entry by id.
has(id)booleanMembership check.
resolveWidget(id, surface)object | nullApply the AD-19 surface fallback rule.
onChange(fn)() => booleanSubscribe; returns an unsubscribe function.

Entry shape​

See the registration shape reference for the full descriptor (id, label, icon, requiredApp, order, group, requiresPermission, referenceType, tab, widget, widgetCompact, widgetExpanded, widgetEntity, defaultSize).

See also​