index.ts
Ricky/StrongPassword/backend/src/types/index.ts
export interface Record {
id: string;
username: string;
email: string;
password: string;
createdAt: Date;
updatedAt: Date;
}
export interface CreateRecordRequest {
username: string;
email: string;
password: string;
}
export interface UpdateRecordRequest {
username?: string;
email?: string;
password?: string;
}
export interface RecordResponse {
id: string;
username: string;
email: string;
createdAt: string;
updatedAt: string;
}
export interface RecordResponseWithPassword extends RecordResponse {
password: string;
}
export interface RecordsListResponse {
items: RecordResponse[];
total: number;
}
export interface RecordsListResponseWithPassword {
items: RecordResponseWithPassword[];
total: number;
}
export interface ErrorResponse {
error: {
code: 'VALIDATION_ERROR' | 'NOT_FOUND' | 'CONFLICT' | 'BAD_REQUEST' | 'INTERNAL_ERROR';
message: string;
details?: { [key: string]: any };
};
}
export interface ValidationError {
field: string;
message: string;
}
Artículos relacionados
__init__.py
__init__.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/__init__.py).
Leer artículo →auth.py
auth.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/admin/auth.py).
Leer artículo →routes.py
routes.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/admin/routes.py).
Leer artículo →config.py
config.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/config.py).
Leer artículo →admin_ingest.py
admin_ingest.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/routes/admin_ingest.py).
Leer artículo →admin_stats.py
admin_stats.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/routes/admin_stats.py).
Leer artículo →