Full operation catalog
The SDK ships named GraphQL operations from the Malonlin web app plus verified self-scoped operations from the backend as TypeScript exports. This gives you access to the website API without adding a UI framework or a separate GraphQL client.
import { CartSDK, USER_PROFILE_GET_USER_ORDERS } from 'malonlin-sdk';
const sdk = new CartSDK({ endpoint: 'https://your-api.example/graphql' });
const result = await sdk.request({
query: USER_PROFILE_GET_USER_ORDERS,
variables: { userId: 'user-id', page: 1, limit: 20 },
});The same operations are available through sdk.operations, or from the malonlin-sdk/operations subpath.
Feature areas#
The catalog includes operations used by the web app for:
| Domain | Included capabilities |
|---|---|
| Stores and storefronts | Public/store reads, create/update/delete, ownership and integrity |
| Products and inventory | Public/store/user products, variants, item pricing, stock, publishing, digital/pre-order/service product fields |
| Cart and checkout | Cart CRUD/sync, self-scoped cart loading, item changes, coupon application, checkout readiness/preparation, idempotent wallet checkout |
| Coupons and refunds | Coupon management, store/user refunds, evidence and status changes |
| Orders and analytics | User/store orders, paid-sales analytics, status and receipt transitions |
| Scheduled orders | Pre-order lifecycle, waitlist information, fulfillment, buyer receipt confirmation |
| Service bookings | Availability, create/list, payment, confirm/start/complete/cancel, receipt and no-show |
| Authentication and account | Login, registration, sessions, token refresh, password/email security, 2FA, account lifecycle, profile |
| Profile and contacts | Self-scoped customer and address management, user/member stores, wallet contacts, store ratings |
| Wallet and payments | Self-scoped wallet/transactions, transfers, secure payment initiation, Ozow deposits/modal data, withdrawals, payment methods, currencies, fees, limits |
| Store administration | Members, roles/permissions, invitations, store settings, notification preferences |
| Subscriptions and API access | Platform/store plans/add-ons, API plans/keys, subscription lifecycle |
| Digital commerce | Purchase library and secure download links |
| Webhooks and notifications | Signed webhook subscriptions/delivery history and self-hosted notifications |
| Public communications | Newsletter signup and contact messages |
The catalog includes the web app's explicitly named Login, registerAdmin, Subscribe, SendContact, and UpdateCart operations, self-scoped backend helpers, and current rating/2FA methods. File/media upload is an HTTP multipart endpoint rather than a GraphQL operation; use sdk.uploads.upload(...).
Use the typed transport#
sdk.request<T>({ query, variables, headers, signal }) returns the GraphQL data object. It adds configured authentication and API-key headers, emits request lifecycle events, and throws GraphQLRequestError or SDKHttpError when a request fails.
The operation catalog currently exports 241 named GraphQL documents. A source cross-check found no GraphQL root operation used by the frontend that is absent from the SDK catalog. The backend also exposes staff-only, administrative, and maintenance operations that are intentionally not all re-exported as public SDK features. The SDK provides ready-made domain clients for common workflows, while sdk.execute(...) and sdk.request(...) remain available for catalog operations. If your backend version changes, check that each operation and its fields exist on that version before using it.
For a more comfortable start, ready-made clients for products, orders, analytics, scheduled orders, service bookings, wallet, communications, and the other feature areas are listed in Feature clients.