corsair.ts
API Structure
All plugins follow the same pattern:corsair.[plugin].api.[resource].[action]().
example.ts
Strongly Typed
Every API call is fully typed — both request parameters and responses. Your editor shows exactly what’s required and what you’ll get back.example.ts
With Multi-Tenancy
When multi-tenancy is enabled, usewithTenant() to scope operations.
example.ts
Automatic Persistence
API responses are stored in your database automatically. Create foreign key relationships to Corsair resources — they stay in sync through API calls and webhooks.example.ts
Hooks
Add before/after hooks to customize API behavior.corsair.ts