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
| Method | Returns | Description |
|---|---|---|
register(entry) | object | null | Normalise 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) | boolean | Remove an integration. Returns true when something was removed. |
list() | object[] | Snapshot sorted by order ascending then id. |
get(id) | object | null | Single entry by id. |
has(id) | boolean | Membership check. |
resolveWidget(id, surface) | object | null | Apply the AD-19 surface fallback rule. |
onChange(fn) | () => boolean | Subscribe; 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
createIntegrationRegistry— isolated instancesinstallIntegrationRegistry— attach ontowindow.OCA.OpenRegister.integrationsand drain queued stubsuseIntegrationRegistry— Vue reactive wrapperVALID_SURFACES— the surface enum