The CWA is in heavy development
The CWA is still in alpha and not ready for production - some code and implementations are likely to change. If you would like to try out the CWA, please enjoy what we have provided and feel free to provide feedback, or get involved on GitHub.
DraftCwa Api
cwa.resourcesManager
CRUD operations on resources — create, update, delete, save, and error management.
CRUD operations that talk to the API. These are used internally by the admin panel and are available for advanced custom UIs.
Creating Resources
await cwa.resourcesManager.createResource({
endpoint: '/component/titles',
data: { title: 'Hello', uiComponent: 'Title' }
})
Updating Resources
await cwa.resourcesManager.updateResource({
endpoint: '/component/titles/018e-...',
data: { title: 'Updated Title' }
})
Deleting Resources
await cwa.resourcesManager.deleteResource({
endpoint: '/component/titles/018e-...'
})
deleteResource shows a confirmation dialog first — it returns false immediately if the user cancels, and no request is made.
Writing Directly to the Store
saveResource({ resource }) writes a resource straight into the local resources store — it makes no API request. It is internal to the module (used by the password-reset flow and by the Mercure handler, which stages incoming updates with isNew: true). Use createResource / updateResource for anything that should reach the API.
Error Management
cwa.resourcesManager.errors // CwaErrorEvent[]
cwa.resourcesManager.hasErrors // boolean
cwa.resourcesManager.addError(event)
cwa.resourcesManager.removeError(id)