@productcraft/core 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +25 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @productcraft/core
2
+
3
+ Shared transport + auth primitives for the ProductCraft Node.js SDKs.
4
+
5
+ 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.
6
+
7
+ ## What it provides
8
+
9
+ - `PCAuth` — discriminated union covering the three credential shapes the SDKs accept:
10
+ ```ts
11
+ | { type: "apiKey"; key: string } // pcft_live_*
12
+ | { type: "bearer"; token: string } // pre-resolved JWT
13
+ | { type: "cookie"; value: string } // captured auth_token
14
+ ```
15
+ - `PCClientConfig` — `{ auth?, baseUrl?, fetch? }`, the input shape every surface constructor takes.
16
+ - `PC_BASE_URL` — the per-surface prod base URLs, used as defaults.
17
+ - `makeClient<paths>(baseUrl, config)` — internal helper that wires an `openapi-fetch` client with the auth-header middleware.
18
+
19
+ ## When you'd touch it directly
20
+
21
+ 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.
22
+
23
+ ## License
24
+
25
+ [MIT](https://github.com/clauderanelagh/productcraft-node/blob/main/LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@productcraft/core",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Shared transport, auth, and config primitives for the ProductCraft SDKs. Depended on by every per-surface package.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",