Dieser Commit ist enthalten in:
Claude Project Manager
2025-09-20 21:31:04 +02:00
Commit 6b9b6d4f20
1821 geänderte Dateien mit 348527 neuen und 0 gelöschten Zeilen

120
shared/index.d.ts vendored Normale Datei
Datei anzeigen

@ -0,0 +1,120 @@
// Shared types used by backend and admin-panel
export type UserRole = 'admin' | 'superuser' | 'user'
export interface User {
id: string
username: string
email: string
role: UserRole
employeeId?: string | null
lastLogin?: Date | null
isActive: boolean
createdAt: Date
updatedAt: Date
}
export interface Skill {
id: string
name: string
category?: string | null
level?: string | null
verified?: boolean
verifiedBy?: string | null
verifiedDate?: Date | null
}
export interface LanguageSkill {
code: string
level: 'basic' | 'fluent' | 'native' | 'business'
certified?: boolean
certificateType?: string | null
isNative?: boolean
canInterpret?: boolean
}
export interface Clearance {
level: string
validUntil: Date
issuedDate: Date
}
export interface Employee {
id: string
firstName: string
lastName: string
employeeNumber: string
photo?: string | null
position: string
department: string
email?: string | null
phone?: string | null
mobile?: string | null
office?: string | null
availability: string
skills?: Skill[]
languages?: LanguageSkill[]
clearance?: Clearance
specializations?: string[]
createdAt: Date | string
updatedAt: Date | string
createdBy?: string
updatedBy?: string | null
}
export interface SkillDefinition {
id: string
name: string
category?: string
description?: string
}
export interface LoginRequest {
username?: string
email?: string
password: string
}
export interface Token {
accessToken: string
expiresIn: number
tokenType: 'Bearer'
}
export interface LoginResponse {
user: User
token: Token
}
export const ROLE_PERMISSIONS: Record<UserRole, string[]>
export const DEFAULT_SKILLS: Record<string, string[]>
export const LANGUAGE_LEVELS: string[]
export interface SkillLevel { id: string; name: string; level?: string }
export interface SubCategory { id: string; name: string; skills: SkillLevel[] }
export interface SkillCategory { id: string; name: string; subcategories: SubCategory[] }
export const SKILL_HIERARCHY: SkillCategory[]
// Workspaces
export type WorkspaceType = 'desk' | 'meeting_room' | 'phone_booth' | 'parking' | 'locker'
export interface Workspace {
id: string
name: string
type: WorkspaceType
floor: string
building?: string | null
capacity: number
equipment: string[]
position_x?: number | null
position_y?: number | null
is_active: boolean
created_at: string
updated_at: string
}
export interface WorkspaceFilter {
type?: WorkspaceType
floor?: string
building?: string
min_capacity?: number
}