v0.1.0-beta.20
core, express, fastify, fetch, hono, node, server, tanstack-query:
- Add custom codecs support for fetch client and server adapters (d72a045)
core, express, fastify, fetch, hono, node, server, tanstack-query:
- Add server-first route declarations and implementations, typed clients derived from server implementations, and matching TanStack Query helpers. Add new
@rest-rpc/nodeadapter for serving routes directly with Node HTTPIncomingMessageandServerResponsehandler. (45d0fca)
core, express, fastify, fetch, hono, node, server, tanstack-query:
- Remove flattened request keys convention and make each http declaration specify the request segments (d72a045)
core, express, fastify, fetch, hono, node, server, tanstack-query:
- Remove support of returning undeclared headers through server handler. Remove set-cookie header helpers (d72a045)
core, express, fastify, fetch, hono, node, server, tanstack-query:
- Remove the WebSocket and server-sent events abstractions, including their route builders, client and server helpers, adapter options, and related public types. (d72a045)
core, express, fastify, fetch, hono, node, server, tanstack-query:
- Replace inferred and explicitly declared form array keys with bracket notation serialization across query parameters, URL-encoded forms, and multipart forms. (d72a045)
core, server:
- Declare responses with
response(status, schema?, options?), where content type and typed headers are options and an omitted schema means no body. Store every response declaration as{ body, contentType, headers? }, normalizing an omitted body content type toapplication/jsonandstreamResponse()toapplication/x-ndjson; no-body responses usebody: undefined. Remove the custom body wrapper types,isStandardSchema(), andcustomStreamResponse(). Fetch clients parse and validate non-stream custom responses, with an optionalbodyParserclient setting for custom decoding. (3cc08a5)
core, server:
- Remove
jsonQuery(schema)support. This allowed to sent json via query string, but added unnecessary complexity to the client and server. (3cc08a5)
core, server:
- Use
body(schema, { contentType })andinput(schema, { contentType })for every request body encoding, removing the form and multipart wrapper methods. An omitted body content type is normalized toapplication/json. Client calls select among multiple declared content types through the Fetch options argument. Server-first body calls always provide that option for non-JSON content types. (3cc08a5)
core, server, tanstack-query:
- Add shorthand routes that omit explicit HTTP details and behave like procedures. Support shorthand declarations in server-first implementations, generated clients, OpenAPI documents, and TanStack Query helpers. Procedure handlers receive validated input under an
inputfield while clients pass the input value directly. (45d0fca)
core, tanstack-query:
- Add HttpError to core package and convert all unknown responses to one (eb811fd)
core, tanstack-query:
- Remove the
strictStatusCodesroute factory option and make its behavior the default. HTTP clients now return only contract-declared responses and throw when a server returns an undeclared status. TanStack Query errors no longer include an undeclaredrawResponsebranch. (b301886)
core, tanstack-query:
- Replace
.fetchand.fetchResponsewith callable route leaves that return the response envelope. Server-first HTTP selectors now accept the path, grouped request, and Fetch API options in one call. (45d0fca)
core, tanstack-query:
- Replace conditional positional arguments on fetch client and tanstack query for request/options with simpler convention. To pass options when there is no request input pass undefined as first argument explictly (45d0fca)
core, tanstack-query:
- Replace the client response
declareddiscriminator with status-based narrowing. Undeclared responses now preserve the untouched nativeResponse, HTTP response declarations are limited to statuses from 100 through 599. (45d0fca)
express, fastify, fetch, hono, node, server:
- Use each framework’s native error-handling flow for request and response validation failures. Replace the shared server error-handler API with exported validation error classes and adapter-specific hooks allowing for more native feeling error handling. (45d0fca)
fetch, server:
- Replace automatic 404 handling for non-matched route with a result type, giving more control for user on how to handle non-matched routes (f1e7102)