# Changelog

All notable changes will be documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

## [0.2.3] - 2026-08-04
### Changed
- Bumped the `trama-types` dependency to 0.2.2. No SDK code changes; this
  release exists so installs resolve the current types package rather than
  the older 0.2.1.

## [0.2.2] — 2026-08-01
### Fixed
- Docs only: the README quickstart destructured `{ products }` from
  `useProducts()`. That hook returns a TanStack Query result, so the array
  arrives on `data` — `products` was always `undefined` and the example's
  `products.map()` threw for anyone who copied it. Now
  `const { data: products, isLoading } = useProducts(...)`, with optional
  chaining on the render, since `data` is undefined until the first fetch
  resolves. No code changes; the SDK itself always behaved this way.

## [0.2.1] — 2026-07-09
### Changed
- Docs only: README now covers all three platforms (Wix, Shopify, Webflow),
  the member identity handoff (`verifyMember`) with a gated-content example,
  and content-site usage via `getCmsCollections`. No code changes.

## [0.2.0] — 2026-07-09
### Added
- `client.verifyMember(memberToken)` — member identity handoff. Verifies an
  end-user platform session token (Wix member access token or Shopify
  Storefront `customerAccessToken`) live against the platform and returns a
  normalized `TramaMember` (`platformId`, `email`, `firstName`, `lastName`,
  `tags`, `verifiedAt`, `metadata`) for gating content against a custom
  backend. Returns `null` for invalid/expired tokens. Call it server-side.
  Webflow has no native membership system (User Accounts was discontinued),
  so the API answers 501 with guidance instead of pretending.
- `client.getCmsCollections()` — discover the connected site's content
  collections: Webflow CMS collections, Wix Data collections, or Shopify
  metaobject types. Pairs with the existing `useCmsItems` for content and
  marketing sites that never touch the commerce surface.

## [0.1.0] — 2026-05-06
### Added
- Initial public release.
- Hooks: `useProducts`, `useInfiniteProducts`, `useProduct`, `useCollections`, `useCart`, `useCheckout`, `useCmsItems`, `useAgencyComponent`.
- `TramaProvider` context with TanStack Query under the hood.
- Full TypeScript types re-exported from `trama-types`.
