UNPKG

wfm-mobile-core

Version:

WFM Mobile Core

36 lines (35 loc) 1.79 kB
import { HalResource } from 'hal-types'; import { EFetchingStatus } from '../enums/EFetchingStatus'; import { IAdditionalInfo, IResourceSchedules, ISchedule, IShift, IWorkingScheduleDay } from '../interfaces'; import { Schedule } from '../models/Schedule'; export declare class ShiftsApi { static error: {}; static schedules: ISchedule[]; static shiftsInExchange: IShift[]; static shifts: IShift[]; static workedShifts: IShift[]; static workingScheduleDays: IWorkingScheduleDay[]; static orgUnitAddress: string; static orgUnitId: number; static fetchingSchedule: EFetchingStatus; static fetchingShift: EFetchingStatus; static fetchingStatusExchange: EFetchingStatus; static setFetchingSchedule(newStatus: EFetchingStatus): void; static setFetchingShift(newStatus: EFetchingStatus): void; static setFetchingStatus(newStatus: EFetchingStatus): void; static getShifts({ startDate, endDate }: { [key: string]: string; }): Promise<any | Error>; static getEmployeesList(date: string, orgId: number): Promise<any>; static getSchedules({ startDate, endDate }: { [key: string]: string; }): Promise<IResourceSchedules | Error>; static createSchedule(scheduleParams: Schedule): Promise<Response>; static editSchedule(link: string, scheduleParams: Schedule): Promise<Response>; static deleteSchedule(link: string): Promise<Response>; static takeShift(link: string, scheduleParams: HalResource): Promise<Response>; static putShift(link: string, scheduleParams: HalResource): Promise<Response>; private static shiftAction; static getAdditionalInfo(shiftId: number): Promise<IAdditionalInfo | Error>; static getExchangeShiftOrgUnitAddress(orgUnitId: number): Promise<HalResource>; }