UNPKG

@springtree/eva-core

Version:
324 lines (272 loc) 7.34 kB
declare module EVA.Workforce { export namespace Errors { export namespace FinancialPeriodClosingImpediments { export const ClockedInUsers = 'FinancialPeriodClosingImpediments:ClockedInUsers'; } } export interface ListAvailabilityForTimeslot { OrganizationUnitID: number; StartDateTime?: string; EndDateTime?: string; } export interface ListAvailabilityForTimeslotResponse { Availability: ConsecutiveTimeChunkWithUser[]; Error: EVA.Core.ServiceError; } export interface ConsecutiveTimeChunkWithUser { UserID: number; FullName: string; Date?: string; StartTime?: string; EndTime?: string; IsAvailable: boolean; BadgeIDs: number[]; Duration?: string; StartDateTime?: string; EndDateTime?: string; } export interface ListPlanning { OrganizationUnitID: number; StartDate?: string; EndDate?: string; } export interface ListPlanningResponse { Items: Planning[]; Error: EVA.Core.ServiceError; } export interface Planning { OrganizationUnit: EVA.Core.OrganizationUnitDto; DateTime?: string; Result: number; } /** * Clocks the given employee out for the given `FinancialPeriodID` (if no value is passed, the curerntly active period is * used instead). The `UserID` indicates the user that should be clocked out. `AbsentFrom` indicates at what time the * employee should be registered as AFK. */ export interface ClockEmployeeOutAsAbsent { UserID: number; FinancialPeriodID: number; AbsentFrom?: string; } export interface CorrectWorkedHours { ID: number; ClockInDateTime?: string; ClockOutDateTime?: string; } export interface CreateWorkedHours { UserID: number; Date?: string; ClockInTime?: string; ClockOutTime?: string; OrganizationUnitID: number; } /** * Returns all of the employees that haven't yet clocked out for the given financial period (`PeriodID`). Use this service * in combination with the `ClockEmployeeOutAsAbsent` service. */ export interface ListClockedInEmployeesForFinancialPeriod { PeriodID: number; } export interface ListClockedInEmployeesForFinancialPeriodResponse { Employees: ClockedInUser[]; Error: EVA.Core.ServiceError; } export interface ClockedInUser { User: EVA.Core.UserDto; ClockedIn?: string; ClockedOut?: string; IsAbsent: boolean; } export interface ListUnrosteredWorkedHours { UserID: number; StartDate?: string; EndDate?: string; OrganizationUnitID: number; } export interface ListUnrosteredWorkedHoursResponse { WorkedHours: WorkedPeriod[]; Error: EVA.Core.ServiceError; } export interface WorkedPeriod { StartDate?: string; EndDate?: string; } export interface ListWorkedHoursForCurrentEmployee { } export interface ListWorkedHoursForCurrentEmployeeResponse { WorkedHours: WorkedHoursDto[]; Error: EVA.Core.ServiceError; } export interface WorkedHoursDto { ID: number; UserID: number; User: EVA.Core.UserDto; OrganizationUnitID: number; OrganizationUnit: EVA.Core.OrganizationUnitDto; Date?: string; ClockInTime?: string; ClockOutTime?: string; ClockInDateTime?: string; ClockOutDateTime?: string; IsExported: boolean; } export interface ListWorkedHours { UserIDs?: number[]; StartDate?: string; EndDate?: string; OrganizationUnitID: number; } export interface ListWorkedHoursResponse { WorkedPeriods: { [key: number]: WorkedPeriod[] }; Error: EVA.Core.ServiceError; } export interface WorkedPeriod { StartDate?: string; StartID: number; EndDate?: string; ClockedOut: boolean; } export interface DeleteRosterItem { ID: number; ExpireDate?: string; } export interface ListOccupiedPeriods { UserID: number; StartDate?: string; EndDate?: string; } export interface ListOccupiedPeriodsResponse { Absence: OccupiedPeriod[]; Leave: OccupiedPeriod[]; Error: EVA.Core.ServiceError; } export interface OccupiedPeriod { StartDate?: string; EndDate?: string; TypeDescription: string; Reason: string; } export interface ListRosterableUsersForOrganizationUnit { OrganizationUnitID: number; From?: string; To?: string; } export interface ListRosterableUsersForOrganizationUnitResponse { Users: EVA.Core.UserDto[]; Error: EVA.Core.ServiceError; } export interface ListRoster { Types?: number[]; UserID: number; BadgeID: number; OrganizationUnitID: number; StartDate?: string; EndDate?: string; } export interface ListRosterResponse { Items: RosterItem[]; Error: EVA.Core.ServiceError; } export interface RosterItem { TypeID: number; OrganizationUnitID: number; OrganizationUnitName: string; UserID: number; BadgeID: number; FullName: string; Date?: string; StartTime?: string; EndTime?: string; DayOfWeekID: number; ID: number; StartDateTime?: string; EndDateTime?: string; Description: string; AllDay: boolean; } export interface SaveRosterItem { ID: number; TypeID: number; OrganizationUnitID: number; UserID: number; BadgeID: number; Date?: string; DayOfWeekID: number; AllDay: boolean; AvailabilityID: number; SlotID: number; StartDateTime?: string; EndDateTime?: string; Description?: string; } export interface ExportPayrollPeriod { PayrollPeriodID: number; } export interface GetPayrollPeriodReport { PayrollPeriodID: number; } export interface GetPayrollPeriodWorkedHoursReport { PayrollPeriodID: number; } export interface ListPayrollPeriods { PageConfig?: EVA.Core.PageConfig; } export interface ListPayrollPeriodsResponse { Result: EVA.Core.PagedResult<PayrollPeriodDto>; Error: EVA.Core.ServiceError; } export interface PayrollPeriodDto { ID: number; PreviousPeriodID: number; StartDate?: string; EndDate?: string; Weeks: number; IsExported: boolean; } export interface ListSalaryComponents { PageConfig?: EVA.Core.PageConfig; } export interface ListSalaryComponentsResponse { Result: EVA.Core.PagedResult<SalaryComponentDto>; Error: EVA.Core.ServiceError; } export interface SalaryComponentDto { PayrollPeriodID: number; UserID: number; User: EVA.Core.UserDto; TypeID: number; Param1?: number; Param2?: number; Param3?: number; Reason: string; IsExported: boolean; } export interface ListSalaryComponentTypes { } export interface ListSalaryComponentTypesResponse { Result: SalaryComponentTypeDto[]; Error: EVA.Core.ServiceError; } export interface SalaryComponentTypeDto { ID: number; Name: string; Description: string; Code: string; ExportNextPeriod: boolean; } export interface RecalculatePayrollPeriod { PayrollPeriodID: number; } export interface ListLeaveBalancesForUser { UserID: number; } export interface ListLeaveBalancesForUserResponse { Items: LeaveBalanceDto[]; Error: EVA.Core.ServiceError; } export interface LeaveBalanceDto { LeaveType: string; Balance?: number; } }