@ecomweb/sdk 0.13.1 → 0.14.1

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.
package/README.md CHANGED
@@ -4,8 +4,8 @@ Shared TypeScript SDK for the EcomWeb storefront API — request builders,
4
4
  response types and the vocabulary (collection rules, payment methods, order
5
5
  shapes) that the API and its consumers must agree on.
6
6
 
7
- > Part of the ecomweb multi-repo system. For the whole picture see
8
- > [`ecomweb-project/workspace/SETUP.md`](https://github.com/ecomwebai/ecomweb-project/blob/main/workspace/SETUP.md).
7
+ > Source: [ecomwebai/ecomweb-storefront-sdk](https://github.com/ecomwebai/ecomweb-storefront-sdk)
8
+ > (read-only mirror, one commit per release; issues welcome there).
9
9
 
10
10
  ## Source in the workspace, `dist/` on npm
11
11
 
@@ -38,6 +38,15 @@ The SDK lives in the storefront's pnpm workspace (`packages/sdk`). The app
38
38
  imports its source directly, so edits are visible immediately. Run
39
39
  `pnpm --filter @ecomweb/sdk test` before you push.
40
40
 
41
+ ### The `X-Ecomweb-Client` header
42
+
43
+ `createEcomwebSdk` wraps both HTTP clients so every request sends
44
+ `X-Ecomweb-Client: @ecomweb/sdk/<version>` (`SDK_VERSION`, set by tsup's
45
+ `define` at build; `dev` when the source runs without it). Pass
46
+ `clientInfo: "name/version"` to put your own tokens first, as the storefront
47
+ kit does. A header the caller sets itself wins. `withClientHeader(http)`
48
+ wraps a client used outside `createEcomwebSdk`.
49
+
41
50
  ## Layout
42
51
 
43
52
  ```