@vigilkids/cms-client
v0.1.4
Published
Framework-agnostic TypeScript client for OnEx CMS Public API
Readme
@vigilkids/cms-client
TypeScript HTTP client for the OneX CMS delivery API. Framework-agnostic — works with any HTTP client (fetch, axios, etc.).
Install
pnpm add @vigilkids/cms-clientUsage
import { createCmsClient } from '@vigilkids/cms-client'
const cms = createCmsClient({
baseUrl: 'https://api.example.com',
productCode: 'visiva',
})
// Fetch article by slug
const article = await cms.getArticleBySlug('my-article', { locale: 'en' })
// List articles
const { data, pagination } = await cms.listArticles({ page: 1, pageSize: 20 })Exports
| Entry Point | Import | Content |
|-------------|--------|---------|
| Main | @vigilkids/cms-client | Client factory and API methods |
| Types | @vigilkids/cms-client/types | Request/response type definitions |
| Webhook | @vigilkids/cms-client/webhook | Webhook payload types and validation |
Compatibility
- Node.js ≥ 18
- ESM only
- TypeScript ≥ 5.0
