Cloudflare's TypeScript SDK Just Got a Big v6 Beta Makeover!
Hey, it's me! Today I found a Cloudflare Changelog post I really wanted to share with you. The official Cloudflare TypeScript SDK just got a new major version in beta!
Cloudflare ChangelogWhat was announced?
According to the Cloudflare Changelog, a new version of the official TypeScript SDK, "v6.0.0-beta.1," is now available. Cloudflare is upfront about its status though: "v6.0.0-beta.1 is in Beta and we are still testing it for stability." So it's probably not the moment to drop it straight into production.
The headline of this release is the sheer number of breaking changes. The post explains that they're mainly driven by changes in the OpenAPI definitions and updates to the SDK's codegen tooling.
The story so far
Cloudflare's TypeScript SDK is auto-generated from Cloudflare's OpenAPI definitions. That means whenever Cloudflare's API surface changes, those changes ripple straight into the SDK's types and parameters.
Over time, some parameters' required/optional status and some response types had drifted slightly out of sync with the actual API behavior. This v6 beta is essentially a big cleanup pass that realigns the SDK with the real API, using the refreshed OpenAPI definitions and codegen.
What changes
Here are the concrete breaking changes called out in the post. If you use the SDK, it's worth checking these before you upgrade.
- Addressing (BGPPrefixCreateParams / ServiceBindingCreateParams):
cidrandservice_idmoved from optional to required - PrefixCreateParams:
asnmoved from nullable to required, whileloa_document_idmoved from required to optional - API Gateway:
ConfigurationUpdateResponsewas removed and how properties are set has changed - CloudforceOne:
ThreatEventBulkCreateResponsechanged from a simple number to a more complex object structure - D1 Database: query parameters moved from a simple interface to a union type that supports batch queries
- DNS Records: 21 record types were renamed to shorter forms, such as
ARecordbecomingA - Pages: deployment response types were consolidated
- Pipelines: v0 was dropped in favor of v1
- Workers: types were restructured, and several response classes were removed
Here's a simplified illustration of the PrefixCreateParams change:
// Roughly how it looked in v5
interface PrefixCreateParams {
asn: number | null;
loa_document_id: string;
}
// v6.0.0-beta.1
interface PrefixCreateParams {
asn: number;
loa_document_id?: string;
}
Some fields flipped from required to optional and vice versa, so it's worth reviewing your code beyond just what the type checker flags.
Dive Deep
It's not just breaking changes, though. Plenty of new features landed too.
Newly added:
- Abuse Reports, AI Search, Connectivity, and Organizations management APIs
- R2 Data Catalog with Apache Iceberg support
- Realtime Kit for meetings, livestreams, and recordings
- Token Validation with JWT support (RS256/384/512, PS256/384/512, ES256, ES384)
- Alerting silences and IAM SSO endpoints
- Zero-Trust AI Controls via Model Context Protocol (MCP)
Existing capabilities that got expanded:
- D1 gained Time Travel for point-in-time recovery
- Workers gained observability settings and startup timing metrics
- Radar added geolocation methods and a V2 dimension-based approach
- R2's Sippy now supports S3-compatible endpoints
And a few things marked deprecated:
- API Gateway schema validation
- CloudforceOne's threat event methods
- Pipelines v0 (fully replaced by v1)
Wrap-up
- Cloudflare's TypeScript SDK got a new major version, v6.0.0-beta.1, still being tested for stability
- Breaking changes are mainly driven by OpenAPI definition changes and codegen updates
- Breaking changes span Addressing, API Gateway, CloudforceOne, D1, DNS Records, Pages, Pipelines, and Workers
- New features include R2 Data Catalog, Realtime Kit, and JWT-based Token Validation
- Existing features like D1's Time Travel and Workers' observability settings also got upgrades
If you're building against Cloudflare's Workers, D1, DNS, or API Gateway APIs through this SDK, it's worth comparing the change list above before you upgrade — especially if you're touching Addressing or PrefixCreateParams.