import { ITimesheetFlowContextData, ITimesheetUpdateDto } from "../../api"; import { CurrencyEnum } from "../../enums"; import { IClassificationWindowConfig, ITimesheetActionItem, SortableTimesheet } from "../../model/entities/interface/timesheet.model.interface"; import { TimesheetClassificationStatusEnum } from "../enums/timesheet_classification_status_enum"; import { TimesheetStatusEnum } from "../enums/timesheet_status_enum"; import { IDesignationEntity } from "../interface/designation.entity.interface"; import { EntityEnum, Nullable } from "../interface/entity.utils.interface"; import { RelationConfigs } from "../interface/relation-config.interface"; import { ITimesheetEntity } from "../interface/timesheet.entity.interface"; import { BaseEntityModel } from "./base.entity.model"; import { EntityHistoryEntityModel } from "./entity_history.entity.model"; import { ProjectEntityModel } from "./project.entity.model"; import { UserEntityModel } from "./user.entity.model"; export declare class TimesheetEntityModel extends BaseEntityModel implements ITimesheetEntity { id: number; userId: number; projectId: number; task: string; description?: string; dateCode: string; totalDuration: number; status: TimesheetStatusEnum; remark?: string; billingId?: number; billedDuration?: number; notBilledDuration?: number; classificationStatus: TimesheetClassificationStatusEnum; classifiedBy?: number; createdBy: number; updatedBy: number; createdOn: number; updatedOn: number; user?: UserEntityModel; project?: ProjectEntityModel; entityHistory?: EntityHistoryEntityModel[]; static fromEntity(entity: ITimesheetEntity): TimesheetEntityModel; getRelationConfigs(): any[]; static relationConfigs: RelationConfigs<[EntityEnum.USER, EntityEnum.ENTITY_HISTORY, EntityEnum.PROJECT], EntityEnum.TIMESHEET>; getTimesheetAmount(projectCurrency: CurrencyEnum): number; isFullyNotBilled(): boolean; get formattedDate(): string; get userName(): string | undefined; getUpdateActionVisibility(currentUser: UserEntityModel, currentUserProjectIds?: number[]): { [key: string]: () => boolean; }; getAvailableActions(currentUser: UserEntityModel, contextData?: ITimesheetFlowContextData, currentUserProjectIds?: number[], options?: { mergeApproveReject?: boolean; }): ITimesheetActionItem[]; getNextStatus(currentUser: UserEntityModel, dto: ITimesheetUpdateDto, contextData?: ITimesheetFlowContextData): TimesheetStatusEnum; get approvers(): UserEntityModel[]; get latestStatusFromHistory(): TimesheetStatusEnum | undefined; getDateCodeDay(): number; getClassificationDeadline(config: IClassificationWindowConfig): Date; /** * IST point-in-time AUTO-CLASSIFY trigger. Returns the classification window * whose `endDay + bufferDays + 1 == today` (IST) — i.e. it fires on a SINGLE day * per window (the auto-classify cron runs at 01:00 IST each morning). * Trailing window (endDay === null) evaluates against the PREVIOUS month's EOM. * * "today" is `getTodayInIST()` (IST calendar day). Concrete per getTodayInIST() * rollover rule: endDay 13 + buffer 3 -> trigger IST day 17; that 01:00 IST IS * UTC 19:30 the PREVIOUS day, so a UTC-default container reads getDate() = 16 -> * 17 !== 16 -> returns null -> auto-classification silently no-ops. */ static getTimesheetAutoClassificationDateCodeRange(config: IClassificationWindowConfig): { windowStart: string; windowEnd: string; } | null; /** * Resolves the classification window that contains `now` (used by the reminder). * `now` defaults to the IST calendar day (getTodayInIST()). * * Boundary examples per getTodayInIST() rollover rule (IST < 05:30 -> UTC prev day): * IST day 1 00:xx -> UTC last day of the PREVIOUS month * (a UTC clock would skip the day-1-3 spillover onto the * prev-month 21-EOM window); * IST day 21 00:30 -> UTC day 20 * (a UTC clock would miss the current-month 21-EOM tail). */ static getActiveClassificationWindowRange(config: IClassificationWindowConfig, now?: Date): { windowStart: string; windowEnd: string; } | null; static parseClassificationWindowsString(str: string): Array<{ startDay: number; endDay: Nullable; }>; /** * Fields on a timesheet that, when changed via an UPDATE, reset the timesheet's * `classificationStatus` back to `PENDING`. Shared by backend (toUpdateDto) and frontend * (edit warning). `billingId` intentionally NOT included — a billing change does not reset * classification. Anything not listed here is by definition "non-reset". */ static timesheetClassificationResetFieldsSet(): string[]; static sortByProjectAndDesignation(data: SortableTimesheet[], designations: IDesignationEntity[]): SortableTimesheet[]; }