export type ApiResponse = { code: number; msg: string; data: T; errorCode?: string; details?: unknown; }; export type ApiErrorResponse = { code: number; msg: string; data: null; errorCode?: string; details?: unknown; }; export type AdminUser = { id: string; email: string; name: string; role: string; isActive?: boolean; }; export type AdminMenu = { id: string; parentId?: string | null; name: string; type: "directory" | "page" | "button"; path?: string | null; component?: string | null; permission?: string | null; icon?: string | null; children?: AdminMenu[]; sortOrder?: number; }; export type AdminProfile = { user: AdminUser; roles: Array<{ id: string; name: string; code: string; dataScope: string }>; permissions: string[]; menus: AdminMenu[]; dataScopes: string[]; }; export type SystemUserItem = AdminUser & { roleIds: string[]; deptIds: string[]; createdAt?: string; updatedAt?: string; }; export type SystemRoleItem = { id: string; name: string; code: string; dataScope: "all" | "dept" | "dept_and_children" | "custom_dept" | "self"; description?: string | null; isActive: boolean; menuIds: string[]; deptIds: string[]; createdAt?: string; updatedAt?: string; }; export type SystemMenuItem = { id: string; parentId?: string | null; name: string; type: "directory" | "page" | "button"; path?: string | null; component?: string | null; permission?: string | null; icon?: string | null; sortOrder: number; isVisible: boolean; isActive: boolean; createdAt?: string; updatedAt?: string; }; export type SystemMenuTreeItem = SystemMenuItem & { children?: SystemMenuTreeItem[]; }; export type SystemDeptItem = { id: string; parentId?: string | null; name: string; sortOrder: number; isActive: boolean; createdAt?: string; updatedAt?: string; }; export type SystemUserCreate = { email: string; name: string; password: string; isActive: boolean; roleIds: string[]; deptIds: string[]; }; export type SystemUserPatch = Partial>; export type SystemRoleCreate = Omit; export type SystemRolePatch = Partial; export type SystemMenuCreate = Omit; export type SystemMenuPatch = Partial; export type SystemDeptCreate = Omit; export type SystemDeptPatch = Partial; export type AuthPayload = { token: string; accessToken: string; expiresIn: number; user: AdminUser; }; export type CaptchaPayload = { captchaEnabled: boolean; captchaId: string; image: string; expiresIn: number; }; export type Dashboard = { stats: { newLeadCount: number; leadCount: number }; recentLeads: Lead[]; }; export type Lead = { id: string; leadType: LeadType; contactName?: string | null; customerId?: string | null; phone: string; destination?: string | null; travelDate?: string | null; peopleCount?: number | null; budgetMin?: number | null; budgetMax?: number | null; note?: string | null; sourcePage?: string | null; vehicleDemand?: VehicleDemand | null; status: LeadStatus; assignedUser?: { id: string; name: string } | null; createdAt?: string; updatedAt?: string; }; export type LeadStatus = "new" | "assigned" | "contacted" | "planning" | "won" | "invalid"; export type LeadType = "general" | "vehicle"; export type VehicleDemand = { serviceType: "charter" | "transfer"; charterDuration?: "halfDay" | "fullDay" | null; travelDate: string; pickupTime?: string | null; pickupLocation: string; dropoffLocation: string; peopleCount: number; luggageCount?: number | null; vehicleOptionId?: string | null; vehicleOptionTitle?: string | null; specialRequirements?: string | null; }; export type WanfaCategory = { id: string; label: string; routes: WanfaRoute[]; }; export type WanfaRoute = { id: string; title: string; subtitle: string; image: string; routeCount: number; demandKeyword: string; }; export type WanfaCategoryCreate = { label: string }; export type WanfaCategoryPatch = { label?: string }; export type WanfaRouteCreate = { title: string; subtitle: string; image: string; routeCount: number; demandKeyword: string; }; export type WanfaRoutePatch = Partial; export type DetailRecord = { id: string; key: string; eyebrow: string; duration: string; title: string; subtitle: string; intro: string; highlights: string[]; included: string[]; excluded: string[]; notes: string[]; gallery: string[]; conciergeAdvisorId: string | null; isActive: boolean; sortOrder: number; createdAt?: string; updatedAt?: string; }; export type DetailCreate = Omit & { sortOrder?: number }; export type DetailPatch = Partial; export type MediaAsset = { id: string; url: string; name: string; mimeType: string; sizeBytes: number; group: string; createdAt?: string; updatedAt?: string; }; export type ConciergeAdvisor = { id: string; avatar?: string; name: string; role: string; details?: Array<{ icon: string; label: string }>; qrImage?: string; isActive: boolean; sortOrder?: number; createdAt?: string; updatedAt?: string; }; export type ConciergeDetail = { icon: string; label: string }; export type ConciergeAdvisorCreate = { avatar: string; name: string; role: string; details: ConciergeDetail[]; qrImage: string; isActive?: boolean; sortOrder?: number; }; export type ConciergeAdvisorPatch = Partial; export type SiteModule = "heroSlides" | "vehicleOptions"; export type HeroSlide = { id: string; title: string; kicker: string | null; image: string | null; isActive: boolean; sortOrder: number; createdAt?: string; updatedAt?: string; }; export type VehicleOption = { id: string; title: string; description: string | null; image: string | null; isActive: boolean; sortOrder: number; createdAt?: string; updatedAt?: string; }; export type SiteConfig = { heroSlides: HeroSlide[]; vehicleOptions: VehicleOption[]; }; export type SiteConfigItem = HeroSlide | VehicleOption; export type HomeWanfaRecommendation = { id: string; categoryId: string; categoryLabel: string; routeCount: number; isActive: boolean; sortOrder: number; createdAt?: string; updatedAt?: string; }; export type HomeTeamBuilding = { id: string; tag: string; title: string; description: string; image: string; demandKeyword: string; detailSubtitle?: string | null; detailParagraphs?: string[] | null; isActive: boolean; sortOrder: number; createdAt?: string; updatedAt?: string; }; export type HomeWildArchive = { id: string; title: string; image: string; images?: string[] | null; demandKeyword: string; isActive: boolean; sortOrder: number; createdAt?: string; updatedAt?: string; }; export type HomeWanfaRecommendationCreate = { categoryId: string; isActive: boolean; sortOrder?: number }; export type HomeWanfaRecommendationPatch = Partial; export type HomeTeamBuildingCreate = Omit; export type HomeTeamBuildingPatch = Partial; export type HomeWildArchiveCreate = Omit; export type HomeWildArchivePatch = Partial; export type SiteItemPatch = { title?: string | null; kicker?: string | null; image?: string | null; description?: string | null; steps?: string[]; isActive?: boolean; sortOrder?: number; };