@rewritetoday/types centralizes Rewrite API contracts so your integrations stay consistent across services and packages.
Repository: github.com/RewriteToday/types
What is included
Routes
Route builders such as
Routes.apiKeys.create().Enums
Shared enums for scopes, event types, statuses, and domain constants.
Model contracts
Request and response interfaces used across Rewrite SDKs and tooling.
Utility types
Reusable helper types for stronger compile-time guarantees.
Install
Route builder example
Enum example
Why use it even without REST?
- Keeps string literals out of business code.
- Improves refactoring safety in large codebases.
- Makes route and contract drift visible during code review.
- Standardizes API usage across teams and services.
Using
@rewritetoday/types with @rewritetoday/rest keeps request paths, enums, and payload contracts aligned end-to-end.Related docs
REST library
Low-level transport client that pairs naturally with shared contracts.
API reference
Endpoint-level behavior and schema documentation.