@productcraft/core
v0.0.3
Published
Shared transport, auth, and config primitives for the ProductCraft SDKs. Depended on by every per-surface package.
Readme
@productcraft/core
Shared transport + auth primitives for the ProductCraft Node.js SDKs.
You don't install this directly. It's a runtime dependency of every product SDK (@productcraft/heimdall, @productcraft/envoi, @productcraft/rally, @productcraft/agora, @productcraft/platform-auth) plus the productcraft umbrella. Installing one of those pulls @productcraft/core along automatically.
What it provides
PCAuth— discriminated union covering the three credential shapes the SDKs accept:| { type: "apiKey"; key: string } // pcft_live_* | { type: "bearer"; token: string } // pre-resolved JWT | { type: "cookie"; value: string } // captured auth_tokenPCClientConfig—{ auth?, baseUrl?, fetch? }, the input shape every surface constructor takes.PC_BASE_URL— the per-surface prod base URLs, used as defaults.makeClient<paths>(baseUrl, config)— internal helper that wires anopenapi-fetchclient with the auth-header middleware.
When you'd touch it directly
Only if you're writing a new ProductCraft SDK surface package. Authoring custom backend integrations against ProductCraft APIs is what the per-product packages are for — start with one of those.
License
MIT.
