@athos-sdk/api-types
v2.15.0
Published
Shared API request and response types for Athos backend, admin dashboard, and mobile app
Readme
@athos/api-types
Shared TypeScript types for the Athos API: request DTOs and response shapes used by the backend, admin dashboard, and mobile app.
Install
From another repo (e.g. admin dashboard or mobile app):
npm install @athos/api-typesOr with a workspace (same monorepo):
{
"dependencies": {
"@athos/api-types": "workspace:*"
}
}Build
npm install
npm run buildUsage
import {
LoginDto,
AuthResponse,
GetMeResponse,
LeaderboardEntryStatus,
type Member,
type Gym,
} from '@athos/api-types';
const body: LoginDto = { email: '[email protected]', password: 'secret123' };
const res: AuthResponse = await fetch('/auth/login', {
method: 'POST',
body: JSON.stringify(body),
}).then((r) => r.json());All request bodies (DTOs) and response types match the NestJS backend routes. Enums are exported as TypeScript enums; entities and DTOs are interfaces.
