import type { UserProfile } from '@/types/mall-types.uts' export type DeliveryOnlineStatus = 'online' | 'resting' | 'busy' export type DeliveryAccountStatus = 'active' | 'disabled' | 'locked' | 'suspended' export type DeliveryCertificateStatus = 'valid' | 'expired' | 'pending' export type DeliveryOrderStatus = 'pending_accept' | 'accepted' | 'on_the_way' | 'arrived' | 'checked_in' | 'serving' | 'pending_submit' | 'pending_acceptance' | 'completed' | 'exception_pending' | 'cancelled' | 'settled' | 'archived' export type DeliveryExceptionType = 'cannot_contact_elder' | 'cannot_enter_home' | 'wrong_address' | 'elder_refuse_service' | 'family_requests_reschedule' | 'safety_risk' | 'elder_health_abnormal' | 'emergency_illness' | 'item_unavailable' | 'other' export type DeliveryLocationType = { latitude: number longitude: number address: string time: string } export type DeliveryTimelineItemType = { id: string title: string time: string description: string } export type DeliveryServiceItemType = { id: string name: string required: boolean completed: boolean incompleteReason: string remark: string updatedAt: string } export type DeliveryEvidenceRecordType = { id: string orderId: string phase: string fileType: string name: string url: string localPath: string status: string progress: number retryable: boolean createdAt: string } export type DeliveryOrderType = { id: string orderNo: string serviceType: string serviceName: string serviceItems: Array elderId: string elderNameMasked: string elderPhoneMasked: string fullElderName: string fullPhone: string addressSummary: string fullAddress: string latitude: number longitude: number appointmentStartTime: string appointmentEndTime: string estimatedDuration: number actualStartTime: string actualEndTime: string status: DeliveryOrderStatus statusText: string statusTone: string riskTags: Array careLevel: string merchantId: string merchantName: string deliveryStaffId: string deliveryStaffName: string acceptTime: string departTime: string arriveTime: string checkinTime: string finishTime: string cancelReason: string exceptionType: string exceptionDesc: string evidenceList: Array signatureUrl: string signatureName: string satisfactionStatus: string settlementStatus: string archiveStatus: string createdAt: string updatedAt: string contactName: string contactPhone: string notices: Array timeline: Array serviceSummary: string progressNote: string distanceKm: string allowCheckinRadiusMeters: number lastLocation: DeliveryLocationType | null trackPoints: Array } export type DeliveryCertificateType = { id: string name: string status: DeliveryCertificateStatus expireAt: string issuer: string imageUrl: string } export type DeliveryInfoType = { id: string userId: string staffNo: string name: string phone: string role: string status: DeliveryAccountStatus organizationId: string organizationName: string certificates: Array certificateStatus: DeliveryCertificateStatus certificateExpireAt: string onlineStatus: DeliveryOnlineStatus serviceArea: string skills: Array avatarUrl: string todayAccepted: number todayServing: number todayCompleted: number usesMock: boolean } export type DeliveryDashboardType = { pendingAcceptCount: number pendingDepartCount: number servingCount: number completedCount: number exceptionCount: number onlineStatus: DeliveryOnlineStatus recentOrders: Array } export type DeliveryMessageType = { id: string title: string content: string type: string createdAt: string read: boolean orderId: string } export type DeliveryRecordType = { id: string orderId: string orderNo: string serviceName: string elderNameMasked: string status: string statusText: string appointmentStartTime: string actualStartTime: string actualEndTime: string settlementStatus: string acceptanceStatus: string exceptionDesc: string ratingText: string } export type DeliveryLoginPayloadType = { account: string password: string } export type DeliveryLoginResultType = { token: string userInfo: UserProfile deliveryInfo: DeliveryInfoType | null usesMock: boolean } export type DeliveryOrderQueryType = { tab: string keyword: string } export type DeliveryProgressPayloadType = { items: Array progressNote: string serviceSummary: string } export type DeliveryCheckinPayloadType = { location: DeliveryLocationType note: string photos: Array checkinMode: string } export type DeliveryFinishPayloadType = { serviceSummary: string signatureName: string confirmByFamily: boolean } export type DeliveryExceptionPayloadType = { exceptionType: DeliveryExceptionType description: string images: Array }