Installation
The ShopiMind JavaScript SDK is published as @shopimind/sdk-js. It is an outbound HTTP client: your code calls the ShopiMind API, authenticated with your shop's API key (the spm-api-key header).
Prerequisites
| Item | Requirement |
|---|---|
| Node.js | 18 or higher |
| Modules | ESM only (import) — no require |
| Dependency | axios (installed automatically) |
The SDK is ESM-only
@shopimind/sdk-js ships exclusively as ESM ("type": "module"). There is no CommonJS build: a require('@shopimind/sdk-js') will not work. Use the import syntax in a .mjs file, a .ts file compiled to an ESM module, or a project whose package.json declares "type": "module".
Install the package
# npm
npm install @shopimind/sdk-js
# yarn
yarn add @shopimind/sdk-js
# pnpm
pnpm add @shopimind/sdk-jsaxios is the only runtime dependency; it is installed automatically.
Pin a version
For reproducible installs, pin an exact version:
# npm
npm install @shopimind/sdk-js@1.0.0
# yarn
yarn add @shopimind/sdk-js@1.0.0
# pnpm
pnpm add @shopimind/sdk-js@1.0.0The SDK follows semantic versioning. For the versioning policy and the covered scope, see Scope & versions.
Current version
The current version is 1.0.0. The public API is stable and fully follows semantic versioning: no breaking change will land outside a major version. Pinning an exact version guarantees reproducible installs.
Verify the installation
Create an ESM file, for example verify.mjs, and import the client:
import { SpmClient } from '@shopimind/sdk-js';
console.log('ShopiMind SDK loaded:', typeof SpmClient.getClient === 'function');
// → ShopiMind SDK loaded: trueRun it:
node verify.mjsIf the line prints true, the SDK is correctly installed and the ESM import works.
In TypeScript
The package bundles its own type declarations (@shopimind/sdk-js exposes ./dist/index.d.ts). No separate @types/... package is required. See TypeScript.
Next step
You are ready to create a client and call the API: Usage.