Skip to content

API Reference ​

Complete export reference for the four Atscript OData packages, one page per package. The Guide explains how they fit together; these pages hold the exact signatures.

Preview release

The packages are a preview (0.0.x): their APIs may still change between releases.

PackageEntry pointsWhat it doesReference
@atscript/odata. (browser and Node)Core: live source, $metadata parser, service engine, query and write translation, codecs, transport, errors@atscript/odata
./plugin (Node), CLI atscript-odataAtscript plugin that generates .as models, fetchODataMetadata, the fetch command@atscript/odata/plugin and CLI
@atscript/odata-client.Browser client: a ClientLike of @atscript/db-client that talks OData directly@atscript/odata-client
@atscript/db-odata.Atscript DB adapter that uses an OData service as the database, its space and sessions@atscript/db-odata
@atscript/moost-odata.Moost controllers, credentials strategies and error mapping for a Moost server@atscript/moost-odata
./client (browser)operationsClient: a page's typed caller of the operations routes/client

Which page for which task ​

You want toStart at
Generate .as models from a saved $metadataodataPlugin, atscript-odata fetch
Connect the live service over the generated modelsthe hosts below; createODataSource for a host of your own
Build everything at runtime, without a build stepa registration without model (LiveServiceRegistration), createODataSource
Point atscript-ui tables and forms at OData from the browsercreateODataClientFactory
Serve an OData service through a Moost servercreateODataSpace, ODataTableController
Give the server its credentials for the servicebasicAuth, bearerAuth, combineAuth; sessions: ODataSessionOptions
Call a function import or an action from code of your ownthe model module's ops (ODataOperationRef) with the host's typed call: odata.call in the browser, space.callOperation on a server, operationsClient on a Moost page; in a controller, the bases' runOperation() method
Handle errorsErrors guide, then each package's error classes

Dependencies between the packages ​

@atscript/odata                 core, browser + Node; ./plugin is Node only
    ├── @atscript/odata-client  + @atscript/db-client
    └── @atscript/db-odata      + @atscript/db
            └── @atscript/moost-odata  + @atscript/moost-db, moost, @moostjs/event-http

Each package depends on the one above it; the + names its main peer dependencies. See Installation for the full install command of each setup.

SAP, SAP S/4HANA, SAP Fiori, SAPUI5, SAP BTP and other SAP products and services mentioned herein, as well as their respective logos, are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. Atscript OData is an independent open-source project and is not affiliated with, sponsored or endorsed by SAP SE.
Released under the MIT License.