@monigo/portal-core
v0.3.1
Published
Framework-agnostic core for Monigo customer-portal UI: typed API client, per-feature state stores, formatters, and message catalog.
Downloads
293
Readme
@monigo/portal-core
Framework-agnostic core for Monigo customer-portal UI.
Provides a typed portal API client (PortalClient), per-feature state stores, Intl-based formatters, and a message catalog. Consume from @monigo/react, @monigo/vue, @monigo/svelte, or directly.
Install
npm install @monigo/portal-coreQuick start
import { PortalClient, InvoicesStore } from '@monigo/portal-core'
const client = new PortalClient({ portalToken: 'tok_...' })
const invoices = new InvoicesStore(client)
invoices.subscribe((state) => {
if (state.status === 'ready') console.log(state.invoices)
})
await invoices.dispatch({ type: 'load' })Framework packages wrap these stores into hooks, composables, or runes; see the framework-specific READMEs.
