SDK Documentation
Theme API SDK
API client SDK for Theme Packs and Theme Apps
Theme API SDK
The supported theme-facing SDK in this repository is @jiffoo/theme-api-sdk.
Use it when a Theme Pack or Theme App needs to call platform APIs without duplicating request/auth boilerplate.
Install
pnpm add @jiffoo/theme-api-sdkUsage
import { createThemeApiClient } from '@jiffoo/theme-api-sdk';
const api = createThemeApiClient({
baseUrl: 'https://api.example.com',
token: async () => localStorage.getItem('token'),
});
const profile = await api.account.getProfile();
const products = await api.products.list({ page: 1, limit: 20 });Use Cases
- Theme Apps calling Jiffoo Core APIs from a standalone storefront
- Internal theme tooling that needs a typed API client
- Shared theme code that should not reimplement auth or pagination calls
Related Files
packages/theme-api-sdk/package.jsonpackages/theme-api-sdk/src/index.tspackages/theme-api-sdk/README.md- Theme Development