@channel3/sdk@4.0.0 is released. The Python SDK is in prerelease — pip install channel3-sdk still resolves to 3.5.0; reach the preview with pip install channel3-sdk==4.0.0b2.
Newly available in the SDKs
- Conversations —
POST /v1/conversationsfor a buffered turn or an SSE event stream, andGET /v1/conversations/{conversation_id}to page a thread’s history. See Conversations - Client tokens —
POST /v1/conversations/client_tokensand revoke, for browser-safe tokens scoped to one conversation. See Client tokens - Reporting — clicks and transactions
POST /v1/browseandPOST /v1/monetize- Typed variant selection on
GET /v1/products/{product_id}— passselected_optionsas a map of dimension name to value label
products.search instead of search.perform, brands.search instead of brands.find, products.lookup instead of enrich.enrichURL / enrich_url, websites.retrieve instead of websites.find, and retrieveHistory / retrieve_history instead of getHistory / get_history. The search and enrich resources no longer exist
Breaking (TypeScript)
- The default export is gone —
import { Channel3 } from "@channel3/sdk" ProductDetailis nowProduct, and the variant types are top-level:VariantOption,OptionValue,SelectedOption.PriceHistoryis nowPriceHistoryResponse, kept as a deprecated alias until 5.0- Pagination returns an iterable you must
awaitfirst:const page = await client.products.search({ query }); for await (const product of page) { ... } - Client options renamed —
baseURL→baseUrl,timeout→timeoutInSeconds,defaultHeaders→headers,defaultQuery→queryParams,logLevel/logger→logging.fetchOptionshas no equivalent
- The base exception is
ApiError, notChannel3Error.AuthenticationErroris nowUnauthorizedError;status_codeis still on the exception - The four per-call options (
extra_headers,extra_query,extra_body,timeout) are replaced by a singlerequest_options - Renamed models:
ProductDetail→Product,PriceHistory→PriceHistoryResponse,Subscription→SubscriptionResponse,VariantsOption→VariantOption,VariantsOptionValue→OptionValue,VariantsSelected→SelectedOption. No compatibility aliases ship — rename at the import site search_by_image(base64_image=...)is nowbase64image— a generator casing limitation, not a deliberate rename. The wire field and the TypeScript spelling are unchangedNOT_GIVEN,NotGiven,Omit,Stream,AsyncStreamandDefaultHttpxClientare gone. Omitting an optional argument behaves as before
CHANNEL3_* locale environment variables still work.