@summoniq/bizfoo-server-sdk
v0.1.0
Published
Server-side TypeScript client for the bizfoo storefront API.
Downloads
179
Maintainers
Readme
@summoniq/bizfoo-server-sdk
Server-side TypeScript client for the bizfoo storefront API.
Install
npm i @summoniq/bizfoo-server-sdkUsage
import { createBizfooServerClient } from "@summoniq/bizfoo-server-sdk";
const bizfoo = createBizfooServerClient({
storefront: "summoniq",
apiKey: process.env.BIZFOO_PUBLIC_KEY,
});
const { products } = await bizfoo.listProducts();
const { product } = await bizfoo.getProduct("tech-lead-guide");
const guide = await bizfoo.getPurchasedGuide("tech-lead-guide", "[email protected]");What you get
- Typed storefront product and guide responses.
- Server-oriented request controls (
cache,next, and custom fetch). BizfooErrorwith astatuscode for error handling.
Defaults
baseUrldefaults tohttps://bizfoo.com.apiKeyis optional for public reads and required for purchased guide access.fetchdefaults toglobalThis.fetch.
License
MIT
