Files
TeleUploader/src/application/dto/auth.ts
T
Claude 5e29589f1a feat: create application DTOs
Add data-transfer-object interfaces for the application layer:
upload, file, bucket, S3, and auth domains.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 17:56:49 +07:00

47 lines
1.0 KiB
TypeScript

/**
* Input for the login endpoint.
* The caller provides the admin API token to obtain a session cookie.
*/
export interface LoginInput {
/** Admin API token for authentication */
token: string;
}
/**
* Active authentication session information.
*/
export interface AuthSession {
/** Authenticated username (currently always "admin") */
username: string;
/** Session expiry timestamp; null for bearer-token sessions */
expiresAt: Date | null;
/** Authentication method used */
method: 'cookie' | 'bearer';
}
/**
* Response payload for a successful login.
*/
export interface LoginResponse {
/** Authenticated username */
username: string;
}
/**
* Response payload for logout.
*/
export interface LogoutResponse {
/** Whether the logout succeeded */
success: boolean;
}
/**
* Response payload for the current-user (/me) endpoint.
*/
export interface UserInfoResponse {
/** Authenticated username */
username: string;
/** ISO-8601 session expiry timestamp; null when using bearer token */
expiresAt: string | null;
}