Releases
v0.5.0
Compare
Sorry, something went wrong.
No results found
Added
Full support for optional request and response schemas in endpoint definitions.
Runtime type info flags: hasRequestSchema and hasResponseSchema via extractTypeInfo().
Changed
Endpoint method signatures now conditionally require parameters only when a request schema exists.
Validation utilities (validateRequest, validateResponse, safeParseRequest, safeParseResponse) gracefully skip validation when schemas are undefined.
Type inference helpers (InferRequestType, InferResponseType) now conditionally infer void/unknown when schemas are missing.
.infer property on endpoint methods now reflects schema presence (e.g., infer.request is {} or undefined when no request schema).
Fixed
Client endpoint detection no longer requires request/response to exist for a valid endpoint.
Docs
New examples demonstrating endpoints with optional request/response schemas.
Updated schema extraction and description docs to handle optional schemas.
Migration
Existing endpoints remain compatible without changes.
For endpoints without a request schema, calling methods without arguments is now the canonical form. Passing undefined still works but is unnecessary.
If you previously assumed .infer.request always exists, update code to handle the optional shape.
You can’t perform that action at this time.