Skip to main content
The script loads from a CDN, so its types come as a separate, types-only package:
Reference it once, from any .d.ts file in your project - src/komerza.d.ts, say:
If your tsconfig.json already has a compilerOptions.types list, add "@komerza/types" to it instead. komerza is then typed everywhere, window.komerza and globalThis.komerza included. Every type lives in the Komerza namespace, so none of them collide with your own Product or Order:
The package is generated from the SDK’s own source every time the SDK changes, so it always matches the script the CDN serves.

Without npm

Save this as komerza.d.ts anywhere your tsconfig.json includes. It’s the package’s file, unchanged:
komerza.d.ts
Numeric fields such as visibility and stockMode are unions of their values rather than TypeScript enums: an enum needs an object at runtime, and the script doesn’t provide one.

Machine-readable schema

The same API is published as JSON Schema at docs.komerza.com/storefront/script.json - every function with its parameters and return type, and every model. It’s generated from the SDK’s source too, which makes it the thing to point code generators and AI tools at.
Last modified on October 15, 2026