-
Notifications
You must be signed in to change notification settings - Fork 1
api HowTo
GitHub Action edited this page May 21, 2026
·
1 revision
The @quatrain/api package contains shared types and base classes for all API-related logic in the Quatrain framework.
When defining custom responses or interacting with data across the network, use the ApiPayload interface:
import { ApiPayload } from '@quatrain/api';
const myPayload: ApiPayload = {
data: [
{ uid: '123', name: 'Test' }
],
meta: {
count: 1,
offset: 0,
batch: 10
}
};If you are building custom Server Adapters (for Express, Fastify, etc.), you should leverage the ServerAdapter and EndpointHandler interfaces to ensure consistency across the framework.