@rhfan2019/smart-kit-core
v0.6.0
Published
Metadata model, query generation and data providers for smart-kit (pure TypeScript).
Maintainers
Readme
@rhfan2019/smart-kit-core
The framework-free part of smart-kit: reads OData V4 $metadata (CSDL XML
or JSON) and annotation files into a model of entity sets, types and the UI the annotations describe; builds OData
requests; talks to a service through a data provider (ODataV4Provider, or MemoryProvider for tests). Pure
TypeScript, ESM, no React.
npm install @rhfan2019/smart-kit-coreimport { loadService } from '@rhfan2019/smart-kit-core';
const { model, provider } = await loadService({ serviceUrl: '/odata/shop/', fetch: (url, init) => fetch(url, init), language: 'en' });
console.log(Object.keys(model.entitySets));Usually you use it together with the React package @rhfan2019/smart-kit
(loadService gives the model and provider for SmartKitProvider).
Documentation in the package: docs/README.md, docs/reference.md (every export). MIT License.
