Complete API documentation for the ACP Mobile codebase.
!!! note "TypeDoc Generation Required"
TypeDoc documentation has not been generated yet. Run npm run docs:api to generate the complete API reference from TypeScript source code.
TypeDoc will generate comprehensive API documentation including:
- All public classes, interfaces, and types
- Function signatures and parameters
- Return types and descriptions
- Usage examples from code comments
- Cross-references between related APIs
- TokenManager - Secure token storage and management
- OAuthService - OAuth 2.0 + PKCE authentication flow
- AuthAPI - Authentication API client
- APIClient - HTTP client with token refresh
- SessionsAPI - Session management API
- RealtimeService - Server-Sent Events for real-time updates
- CacheService - AsyncStorage wrapper for caching
- useAuth - Authentication state and methods
- useOffline - Network connectivity status
- useSessions - Session list with React Query
- useRealtimeSession - SSE integration for real-time updates
- SessionCard - Session card with progress
- SessionProgress - Progress bar
- StatusBadge - Session status badge
- ModelBadge - AI model badge
- Header - Screen header
- LoadingSpinner - Loading indicator
- Session - Session data structure
- User - User profile structure
- OAuthTokens - OAuth token structure
- RealtimeEvent - SSE event structure
- SessionProgressData - Progress update payload
- SessionUpdatedData - Session update payload
- logger - Logging utility (dev only)
- constants - App constants and config
- mockData - Mock data for development
npm run docs:apiThis generates markdown documentation in docs/api/generated/.
npm run docs:serveThen visit http://localhost:8000/api
npm run docs:deployUse TSDoc format for documenting code:
/**
* Fetches active sessions from the API.
*
* @param filters - Optional filters for session status
* @returns Promise resolving to array of Session objects
* @throws {APIError} When the API request fails
*
* @example
* ```typescript
* const sessions = await SessionsAPI.getSessions({ status: 'running' })
* console.log(`Found ${sessions.length} running sessions`)
* ```
*/
export async function getSessions(filters?: SessionFilters): Promise<Session[]> {
// Implementation
}/**
* Session card component displaying session info and progress.
*
* @param props - Component props
* @param props.session - Session data to display
* @param props.onPress - Optional callback when card is tapped
*
* @example
* ```tsx
* <SessionCard
* session={session}
* onPress={() => router.push(`/sessions/${session.id}`)}
* />
* ```
*/
export function SessionCard({ session, onPress }: SessionCardProps) {
// Implementation
}/**
* Hook for managing authentication state.
*
* Provides methods for login, logout, and tracks authentication status.
* Automatically refreshes tokens before expiration.
*
* @returns Authentication state and methods
*
* @example
* ```tsx
* function LoginScreen() {
* const { login, isAuthenticated, isLoading } = useAuth()
*
* if (isAuthenticated) {
* return <Redirect to="/dashboard" />
* }
*
* return <Button onPress={login}>Sign In</Button>
* }
* ```
*/
export function useAuth() {
// Implementation
}Note: The TypeDoc API documentation is generated automatically from source code comments. To update it, run npm run docs:api after making code changes.