@misiki/spryker-connector
v0.4.1
Published
API Connector for Spryker with Svelte Commerce
Readme
@misiki/spryker-connector
The Official TypeScript API Connector for connecting svelte-commerce to Spryker E-Commerce Backend.
@misiki/spryker-connector provides a production-ready, fully-typed API client and integration layer that seamlessly bridges svelte-commerce storefronts with Spryker headless e-commerce backends — part of the Litekart connector suite, mirroring the full 43-service surface of @misiki/litekart-connector.
Coverage: 25 of 43 services are wired to the live Spryker API. The remaining 18 have no Spryker equivalent and return empty placeholder data. Each placeholder says why in a comment at the top of its service file.
🚀 Step-by-Step Integration Guide
Follow these steps to connect svelte-commerce with spryker-connector and your Spryker backend.
1. Install the Connector
Inside your svelte-commerce project directory, run:
bun i @misiki/spryker-connector(Or using npm / pnpm / yarn):
npm install @misiki/spryker-connector
# or
pnpm add @misiki/spryker-connector2. Configure kitcommerce.config.ts
In svelte-commerce, open kitcommerce.config.ts and change the export * line to import from @misiki/spryker-connector:
// kitcommerce.config.ts
export * from '@misiki/spryker-connector';3. Configure Credentials
Pass apiUrl (Glue API base URL), accessToken (bearer token; optional for public reads).
API docs: https://docs.spryker.com/docs/pbc/all/pbc.html
import { SprykerConnector } from '@misiki/spryker-connector'
// Credentials are set once, statically — the constructor only takes an optional fetch.
SprykerConnector.setCredentials({
apiUrl: 'https://glue.example.com',
accessToken: 'bearer_token'
})
const client = new SprykerConnector()
const products = await client.product.list({ page: 1, sort: '-createdAt' })4. Build and Run the Project
Run the development server in svelte-commerce:
bun devTo build and run the production application:
# Build the project
bun run build
# Preview the built application
bun run previewService coverage
| Service | Status |
| --- | --- |
| client.product | ✅ live |
| client.category | ✅ live |
| client.collection | ⚠️ placeholder (no Spryker equivalent) |
| client.order | ✅ live |
| client.coupon | ⚠️ placeholder (no Spryker equivalent) |
| client.address | ✅ live |
| client.review | ✅ live |
| client.cart | ✅ live |
| client.country | ✅ live |
| client.state | ✅ live |
| client.currency | ✅ live |
| client.region | ✅ live |
| client.page | ✅ live |
| client.blog | ⚠️ placeholder (no Spryker equivalent) |
| client.settings | ✅ live |
| client.store | ✅ live |
| client.paymentMethod | ✅ live |
| client.search | ✅ live |
| client.autocomplete | ✅ live |
| client.user | ✅ live |
| client.auth | ✅ live |
| client.profile | ✅ live |
| client.wishlist | ✅ live |
| client.vendor | ✅ live |
| client.checkout | ✅ live |
| client.upload | ⚠️ placeholder (no Spryker equivalent) |
| client.banner | ⚠️ placeholder (no Spryker equivalent) |
| client.chat | ⚠️ placeholder (no Spryker equivalent) |
| client.contact | ⚠️ placeholder (no Spryker equivalent) |
| client.deal | ⚠️ placeholder (no Spryker equivalent) |
| client.demoRequest | ⚠️ placeholder (no Spryker equivalent) |
| client.enquiry | ⚠️ placeholder (no Spryker equivalent) |
| client.faq | ⚠️ placeholder (no Spryker equivalent) |
| client.feedback | ⚠️ placeholder (no Spryker equivalent) |
| client.gallery | ⚠️ placeholder (no Spryker equivalent) |
| client.home | ⚠️ placeholder (no Spryker equivalent) |
| client.init | ✅ live |
| client.meilisearch | ✅ live |
| client.menu | ✅ live |
| client.plugins | ⚠️ placeholder (no Spryker equivalent) |
| client.popularSearch | ⚠️ placeholder (no Spryker equivalent) |
| client.popularity | ⚠️ placeholder (no Spryker equivalent) |
| client.reels | ⚠️ placeholder (no Spryker equivalent) |
Development
bun install && bun run typecheck && bun run buildLicense
MIT © misiki-in
