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, and they stay in sync through API calls and webhooks.example.ts
Hooks
Add before/after hooks to customize API behavior.corsair.ts