import mongoose, { Schema } from 'mongoose'; /** * ClockIn Mongoose Schemas * * Reusable schemas for attendance tracking * These can be embedded in any model (Membership, Employee, etc.) * * @module @classytic/clockin/schemas */ /** * Single check-in entry schema * Minimal data per check-in for storage efficiency */ declare const checkInEntrySchema: mongoose.Schema, {}, {}, {}, {}, { _id: true; timestamps: false; }, { timestamp: NativeDate; method: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api"; status: "valid" | "invalid" | "corrected" | "disputed"; checkOutAt: NativeDate; attendanceType: "full_day" | "half_day_morning" | "half_day_afternoon" | "paid_leave" | "unpaid_leave" | "overtime"; autoCheckedOut: boolean; corrections: mongoose.Types.DocumentArray<{ correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }, mongoose.Types.Subdocument & { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: Map | null | undefined; }, mongoose.Document & { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: Map | null | undefined; }, { id: string; }, mongoose.ResolveSchemaOptions<{ _id: true; timestamps: false; }>> & Omit<{ timestamp: NativeDate; method: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api"; status: "valid" | "invalid" | "corrected" | "disputed"; checkOutAt: NativeDate; attendanceType: "full_day" | "half_day_morning" | "half_day_afternoon" | "paid_leave" | "unpaid_leave" | "overtime"; autoCheckedOut: boolean; corrections: mongoose.Types.DocumentArray<{ correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }, mongoose.Types.Subdocument & { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: Map | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty & { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: Map | null | undefined; }, { id: string; }, mongoose.ResolveSchemaOptions<{ _id: true; timestamps: false; }>> & Omit<{ timestamp: NativeDate; method: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api"; status: "valid" | "invalid" | "corrected" | "disputed"; checkOutAt: NativeDate; attendanceType: "full_day" | "half_day_morning" | "half_day_afternoon" | "paid_leave" | "unpaid_leave" | "overtime"; autoCheckedOut: boolean; corrections: mongoose.Types.DocumentArray<{ correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }, mongoose.Types.Subdocument & { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: Map | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { timestamp: NativeDate; method: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api"; status: "valid" | "invalid" | "corrected" | "disputed"; checkOutAt: NativeDate; attendanceType: "full_day" | "half_day_morning" | "half_day_afternoon" | "paid_leave" | "unpaid_leave" | "overtime"; autoCheckedOut: boolean; corrections: mongoose.Types.DocumentArray<{ correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; } | { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: string | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; _id: string; }, mongoose.Types.Subdocument & ({ correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; } | { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: string | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; _id: string; })>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: { [x: string]: any; } | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; /** * Pre-calculated attendance statistics * Embedded in member/employee documents for fast access */ declare const attendanceStatsSchema: mongoose.Schema, {}, {}, {}, {}, { _id: false; timestamps: false; }, { totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; }, mongoose.Document> & Omit<{ totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; /** * Current session tracking schema * Real-time check-in status cached on member document for fast access */ declare const currentSessionSchema: mongoose.Schema, {}, {}, {}, {}, { _id: false; timestamps: false; toJSON: { virtuals: true; }; toObject: { virtuals: true; }; }, { isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; }, mongoose.Document> & Omit<{ isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; /** * Correction request schema for employee self-service */ declare const correctionRequestSchema: mongoose.Schema, {}, {}, {}, {}, { _id: true; timestamps: false; }, { status: "pending" | "approved" | "rejected" | "applied"; createdAt: NativeDate; requestType: "update_check_in_time" | "update_check_out_time" | "add_missing_attendance" | "delete_duplicate" | "override_attendance_type"; priority: "low" | "normal" | "high" | "urgent"; checkInId?: mongoose.Types.ObjectId | null | undefined; reviewedAt?: NativeDate | null | undefined; reviewNotes?: string | null | undefined; appliedAt?: NativeDate | null | undefined; requestedChanges?: { reason: string; checkInTime?: NativeDate | null | undefined; checkOutTime?: NativeDate | null | undefined; attendanceType?: string | null | undefined; } | null | undefined; reviewedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }, mongoose.Document> & Omit<{ status: "pending" | "approved" | "rejected" | "applied"; createdAt: NativeDate; requestType: "update_check_in_time" | "update_check_out_time" | "add_missing_attendance" | "delete_duplicate" | "override_attendance_type"; priority: "low" | "normal" | "high" | "urgent"; checkInId?: mongoose.Types.ObjectId | null | undefined; reviewedAt?: NativeDate | null | undefined; reviewNotes?: string | null | undefined; appliedAt?: NativeDate | null | undefined; requestedChanges?: { reason: string; checkInTime?: NativeDate | null | undefined; checkOutTime?: NativeDate | null | undefined; attendanceType?: string | null | undefined; } | null | undefined; reviewedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ status: "pending" | "approved" | "rejected" | "applied"; createdAt: NativeDate; requestType: "update_check_in_time" | "update_check_out_time" | "add_missing_attendance" | "delete_duplicate" | "override_attendance_type"; priority: "low" | "normal" | "high" | "urgent"; checkInId?: mongoose.Types.ObjectId | null | undefined; reviewedAt?: NativeDate | null | undefined; reviewNotes?: string | null | undefined; appliedAt?: NativeDate | null | undefined; requestedChanges?: { reason: string; checkInTime?: NativeDate | null | undefined; checkOutTime?: NativeDate | null | undefined; attendanceType?: string | null | undefined; } | null | undefined; reviewedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { status: "pending" | "approved" | "rejected" | "applied"; createdAt: NativeDate; requestType: "update_check_in_time" | "update_check_out_time" | "add_missing_attendance" | "delete_duplicate" | "override_attendance_type"; priority: "low" | "normal" | "high" | "urgent"; checkInId?: mongoose.Types.ObjectId | null | undefined; reviewedAt?: NativeDate | null | undefined; reviewNotes?: string | null | undefined; appliedAt?: NativeDate | null | undefined; requestedChanges?: { reason: string; checkInTime?: NativeDate | null | undefined; checkOutTime?: NativeDate | null | undefined; attendanceType?: string | null | undefined; } | null | undefined; reviewedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; /** * Time slot distribution for analytics */ declare const timeSlotDistributionSchema: mongoose.Schema, {}, {}, {}, {}, { _id: false; timestamps: false; }, { early_morning: number; morning: number; afternoon: number; evening: number; night: number; }, mongoose.Document> & Omit<{ early_morning: number; morning: number; afternoon: number; evening: number; night: number; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ early_morning: number; morning: number; afternoon: number; evening: number; night: number; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { early_morning: number; morning: number; afternoon: number; evening: number; night: number; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; /** * Common attendance fields to add to member/employee schemas * * @example * ```typescript * import { commonAttendanceFields, applyAttendanceIndexes } from '@classytic/clockin'; * * const membershipSchema = new Schema({ * ...commonAttendanceFields, * // ... other fields * }); * * applyAttendanceIndexes(membershipSchema, { tenantField: 'organizationId' }); * ``` */ declare const commonAttendanceFields: { currentSession: { type: mongoose.Schema, {}, {}, {}, {}, { _id: false; timestamps: false; toJSON: { virtuals: true; }; toObject: { virtuals: true; }; }, { isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; }, mongoose.Document> & Omit<{ isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; default: () => { isActive: boolean; }; }; attendanceStats: { type: mongoose.Schema, {}, {}, {}, {}, { _id: false; timestamps: false; }, { totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; }, mongoose.Document> & Omit<{ totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; default: () => {}; }; attendanceEnabled: { type: BooleanConstructor; default: boolean; }; attendanceNotes: StringConstructor; }; /** * Recommended indexes for attendance queries */ declare const attendanceIndexes: ({ organizationId: number; year: number; month: number; targetModel?: undefined; targetId?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { organizationId: number; targetModel: number; year: number; month: number; targetId?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { targetId: number; year: number; month: number; organizationId?: undefined; targetModel?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { organizationId: number; 'checkIns.timestamp': number; year?: undefined; month?: undefined; targetModel?: undefined; targetId?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { organizationId: number; 'attendanceStats.engagementLevel': number; year?: undefined; month?: undefined; targetModel?: undefined; targetId?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { organizationId: number; 'attendanceStats.lastVisitedAt': number; year?: undefined; month?: undefined; targetModel?: undefined; targetId?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { organizationId: number; 'attendanceStats.currentStreak': number; year?: undefined; month?: undefined; targetModel?: undefined; targetId?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; })[]; /** * Apply attendance indexes to a member/employee schema * * @param schema - Mongoose schema * @param options - Configuration options * @param options.tenantField - Field name for tenant/organization ID (default: 'organizationId') * @param options.createIndexes - Whether to create indexes (default: false). Set to true to opt-in to index creation. */ declare function applyAttendanceIndexes(schema: Schema, options?: { tenantField?: string; createIndexes?: boolean; }): void; /** * Create full attendance model schema * Use this to create your own Attendance model * * @param options - Schema options * @param options.ttlDays - TTL for documents in days (default: 730). Set to 0 to disable TTL. * @param options.additionalFields - Additional fields to add to the schema * @param options.createIndexes - Whether to create indexes (default: false). Set to true to opt-in to index creation. * @returns Mongoose schema */ declare function createAttendanceSchema(options?: { ttlDays?: number; additionalFields?: Record; createIndexes?: boolean; }): Schema; declare const _default: { checkInEntrySchema: mongoose.Schema, {}, {}, {}, {}, { _id: true; timestamps: false; }, { timestamp: NativeDate; method: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api"; status: "valid" | "invalid" | "corrected" | "disputed"; checkOutAt: NativeDate; attendanceType: "full_day" | "half_day_morning" | "half_day_afternoon" | "paid_leave" | "unpaid_leave" | "overtime"; autoCheckedOut: boolean; corrections: mongoose.Types.DocumentArray<{ correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }, mongoose.Types.Subdocument & { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: Map | null | undefined; }, mongoose.Document & { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: Map | null | undefined; }, { id: string; }, mongoose.ResolveSchemaOptions<{ _id: true; timestamps: false; }>> & Omit<{ timestamp: NativeDate; method: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api"; status: "valid" | "invalid" | "corrected" | "disputed"; checkOutAt: NativeDate; attendanceType: "full_day" | "half_day_morning" | "half_day_afternoon" | "paid_leave" | "unpaid_leave" | "overtime"; autoCheckedOut: boolean; corrections: mongoose.Types.DocumentArray<{ correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }, mongoose.Types.Subdocument & { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: Map | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty & { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: Map | null | undefined; }, { id: string; }, mongoose.ResolveSchemaOptions<{ _id: true; timestamps: false; }>> & Omit<{ timestamp: NativeDate; method: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api"; status: "valid" | "invalid" | "corrected" | "disputed"; checkOutAt: NativeDate; attendanceType: "full_day" | "half_day_morning" | "half_day_afternoon" | "paid_leave" | "unpaid_leave" | "overtime"; autoCheckedOut: boolean; corrections: mongoose.Types.DocumentArray<{ correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }, mongoose.Types.Subdocument & { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: Map | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { timestamp: NativeDate; method: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api"; status: "valid" | "invalid" | "corrected" | "disputed"; checkOutAt: NativeDate; attendanceType: "full_day" | "half_day_morning" | "half_day_afternoon" | "paid_leave" | "unpaid_leave" | "overtime"; autoCheckedOut: boolean; corrections: mongoose.Types.DocumentArray<{ correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; } | { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: string | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; _id: string; }, mongoose.Types.Subdocument & ({ correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; } | { correctedAt: NativeDate; field?: string | null | undefined; originalValue?: any; newValue?: any; reason?: string | null | undefined; correctedBy?: { userId?: string | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; _id: string; })>; duration?: number | null | undefined; notes?: string | null | undefined; location?: { lat?: number | null | undefined; lng?: number | null | undefined; accuracy?: number | null | undefined; } | null | undefined; device?: string | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; recordedBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; checkedOutBy?: { name?: string | null | undefined; userId?: mongoose.Types.ObjectId | null | undefined; role?: string | null | undefined; } | null | undefined; timeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; metadata?: { [x: string]: any; } | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; attendanceStatsSchema: mongoose.Schema, {}, {}, {}, {}, { _id: false; timestamps: false; }, { totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; }, mongoose.Document> & Omit<{ totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; currentSessionSchema: mongoose.Schema, {}, {}, {}, {}, { _id: false; timestamps: false; toJSON: { virtuals: true; }; toObject: { virtuals: true; }; }, { isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; }, mongoose.Document> & Omit<{ isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; correctionRequestSchema: mongoose.Schema, {}, {}, {}, {}, { _id: true; timestamps: false; }, { status: "pending" | "approved" | "rejected" | "applied"; createdAt: NativeDate; requestType: "update_check_in_time" | "update_check_out_time" | "add_missing_attendance" | "delete_duplicate" | "override_attendance_type"; priority: "low" | "normal" | "high" | "urgent"; checkInId?: mongoose.Types.ObjectId | null | undefined; reviewedAt?: NativeDate | null | undefined; reviewNotes?: string | null | undefined; appliedAt?: NativeDate | null | undefined; requestedChanges?: { reason: string; checkInTime?: NativeDate | null | undefined; checkOutTime?: NativeDate | null | undefined; attendanceType?: string | null | undefined; } | null | undefined; reviewedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; }, mongoose.Document> & Omit<{ status: "pending" | "approved" | "rejected" | "applied"; createdAt: NativeDate; requestType: "update_check_in_time" | "update_check_out_time" | "add_missing_attendance" | "delete_duplicate" | "override_attendance_type"; priority: "low" | "normal" | "high" | "urgent"; checkInId?: mongoose.Types.ObjectId | null | undefined; reviewedAt?: NativeDate | null | undefined; reviewNotes?: string | null | undefined; appliedAt?: NativeDate | null | undefined; requestedChanges?: { reason: string; checkInTime?: NativeDate | null | undefined; checkOutTime?: NativeDate | null | undefined; attendanceType?: string | null | undefined; } | null | undefined; reviewedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ status: "pending" | "approved" | "rejected" | "applied"; createdAt: NativeDate; requestType: "update_check_in_time" | "update_check_out_time" | "add_missing_attendance" | "delete_duplicate" | "override_attendance_type"; priority: "low" | "normal" | "high" | "urgent"; checkInId?: mongoose.Types.ObjectId | null | undefined; reviewedAt?: NativeDate | null | undefined; reviewNotes?: string | null | undefined; appliedAt?: NativeDate | null | undefined; requestedChanges?: { reason: string; checkInTime?: NativeDate | null | undefined; checkOutTime?: NativeDate | null | undefined; attendanceType?: string | null | undefined; } | null | undefined; reviewedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { status: "pending" | "approved" | "rejected" | "applied"; createdAt: NativeDate; requestType: "update_check_in_time" | "update_check_out_time" | "add_missing_attendance" | "delete_duplicate" | "override_attendance_type"; priority: "low" | "normal" | "high" | "urgent"; checkInId?: mongoose.Types.ObjectId | null | undefined; reviewedAt?: NativeDate | null | undefined; reviewNotes?: string | null | undefined; appliedAt?: NativeDate | null | undefined; requestedChanges?: { reason: string; checkInTime?: NativeDate | null | undefined; checkOutTime?: NativeDate | null | undefined; attendanceType?: string | null | undefined; } | null | undefined; reviewedBy?: { userId?: mongoose.Types.ObjectId | null | undefined; userName?: string | null | undefined; userRole?: string | null | undefined; } | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; timeSlotDistributionSchema: mongoose.Schema, {}, {}, {}, {}, { _id: false; timestamps: false; }, { early_morning: number; morning: number; afternoon: number; evening: number; night: number; }, mongoose.Document> & Omit<{ early_morning: number; morning: number; afternoon: number; evening: number; night: number; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ early_morning: number; morning: number; afternoon: number; evening: number; night: number; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { early_morning: number; morning: number; afternoon: number; evening: number; night: number; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; commonAttendanceFields: { currentSession: { type: mongoose.Schema, {}, {}, {}, {}, { _id: false; timestamps: false; toJSON: { virtuals: true; }; toObject: { virtuals: true; }; }, { isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; }, mongoose.Document> & Omit<{ isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { isActive: boolean; method?: "manual" | "qr_code" | "rfid" | "biometric" | "mobile_app" | "api" | null | undefined; checkInId?: mongoose.Types.ObjectId | null | undefined; checkInTime?: NativeDate | null | undefined; expectedCheckOutAt?: NativeDate | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; default: () => { isActive: boolean; }; }; attendanceStats: { type: mongoose.Schema, {}, {}, {}, {}, { _id: false; timestamps: false; }, { totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; }, mongoose.Document> & Omit<{ totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }, { [path: string]: mongoose.SchemaDefinitionProperty; } | { [x: string]: mongoose.SchemaDefinitionProperty> & Omit<{ totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }, "id"> & { id: string; }> | undefined; }, { totalVisits: number; currentStreak: number; longestStreak: number; monthlyAverage: number; thisMonthVisits: number; lastMonthVisits: number; engagementLevel: "highly_active" | "active" | "regular" | "occasional" | "inactive" | "at_risk" | "dormant"; loyaltyScore: number; updatedAt: NativeDate; lastVisitedAt?: NativeDate | null | undefined; firstVisitedAt?: NativeDate | null | undefined; daysSinceLastVisit?: number | null | undefined; favoriteTimeSlot?: "early_morning" | "morning" | "afternoon" | "evening" | "night" | null | undefined; } & { _id: mongoose.Types.ObjectId; } & { __v: number; }>; default: () => {}; }; attendanceEnabled: { type: BooleanConstructor; default: boolean; }; attendanceNotes: StringConstructor; }; attendanceIndexes: ({ organizationId: number; year: number; month: number; targetModel?: undefined; targetId?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { organizationId: number; targetModel: number; year: number; month: number; targetId?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { targetId: number; year: number; month: number; organizationId?: undefined; targetModel?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { organizationId: number; 'checkIns.timestamp': number; year?: undefined; month?: undefined; targetModel?: undefined; targetId?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { organizationId: number; 'attendanceStats.engagementLevel': number; year?: undefined; month?: undefined; targetModel?: undefined; targetId?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { organizationId: number; 'attendanceStats.lastVisitedAt': number; year?: undefined; month?: undefined; targetModel?: undefined; targetId?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.currentStreak'?: undefined; } | { organizationId: number; 'attendanceStats.currentStreak': number; year?: undefined; month?: undefined; targetModel?: undefined; targetId?: undefined; 'checkIns.timestamp'?: undefined; 'attendanceStats.engagementLevel'?: undefined; 'attendanceStats.lastVisitedAt'?: undefined; })[]; applyAttendanceIndexes: typeof applyAttendanceIndexes; createAttendanceSchema: typeof createAttendanceSchema; }; export { applyAttendanceIndexes, attendanceIndexes, attendanceStatsSchema, checkInEntrySchema, commonAttendanceFields, correctionRequestSchema, createAttendanceSchema, currentSessionSchema, _default as default, timeSlotDistributionSchema };