DB, Collections, Search

This commit is contained in:
Stefan Hardegger
2025-11-21 07:53:37 +01:00
parent c8eb6237c4
commit 8a03edbb88
67 changed files with 17703 additions and 103 deletions

41
src/types/index.ts Normal file
View File

@@ -0,0 +1,41 @@
// Standard Server Action result type
export type ActionResult<T = void> = {
success: boolean
data?: T
message?: string
errors?: Record<string, string[]>
}
// User types
export type UserRole = 'USER' | 'ADMIN' | 'MODERATOR'
export type SafeUser = {
id: string
email: string
name: string | null
role: UserRole
isActive: boolean
createdAt: Date
}
// Auth types
export type LoginCredentials = {
email: string
password: string
}
export type RegisterData = {
email: string
password: string
name: string
}
export type UpdatePasswordData = {
currentPassword: string
newPassword: string
}
export type UpdateProfileData = {
name?: string
email?: string
}