/** * Copyright (c) 2020 The Nuinalp Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ import { Model } from '@nuinalp/api-core/browser'; import { Project } from '..'; import { WeekList } from '../types'; import ListResponseInterface from '@nuinalp/api-core/types/interfaces/responses'; export default class Timetrack extends Model { protected static adapter: any; id: string; is_billable: boolean; start_time: string; end_time?: string; status?: 'in_progress' | 'finished'; description: string; duration: number; project_id: string; project: Project; user_id: string; static indexByUserWorkspace(page?: number, perPage?: number): Promise>; static startOfWeek(date: Date): Date; static endOfWeek(date: Date): Date; static daysOfWeek(date?: Date): void; private static buildWeekList; static formatToWeekGroup(dates: Timetrack[]): WeekList; }