Get started
The OneEntry Platform SDK is a JavaScript client for the OneEntry Platform API.
Importing types
Every public interface and type of the SDK is re-exported from the package root and from a dedicated oneentry/types entry point. You don't need deep oneentry/dist/... paths.
Attribute values
OneEntry describes content with attributes: a page, product, block, user, order or form field carries a map of attribute values keyed by marker. The SDK normalizes every attribute in every response to the same shape, so a field looks the same whichever module returned it.
Time intervals
A timeInterval attribute is a recurrence rule, not a list of slots: an anchor date, daily time ranges and repeat flags. To turn it into concrete [start, end] pairs for the window you render, use the top-level helpers expandAttributeTimeIntervals and expandTimeIntervals and the type guard isTimeIntervalAttribute.
Bundle size and module formats
The SDK ships a CommonJS and an ESM build, and keeps its two heavy dependencies, Zod and socket.io-client, out of the import graph until they are used. A project that calls a single method, leaves validation off and never opens a socket loads about 49 kB minified (10.9 kB gzip), down from 706 kB (141 kB gzip) in 1.0.158.
mTLS and deployment
How to protect a OneEntry project with a token or an mTLS certificate, and deploy the application to a server with Nginx, Docker and GitLab or GitHub.
Usage Examples
6 items