@timesheet/sdk
Version:
Official TypeScript SDK for the Timesheet API
141 lines • 3.42 kB
TypeScript
import type { ListParams, Member } from './common';
import type { Project } from './Project';
import type { Todo } from './Todo';
import type { Rate } from './Rate';
import type { Tag } from './Tag';
import type { Pause } from './Pause';
import type { Expense } from './Expense';
import type { Note } from './Note';
export interface Task {
id: string;
description?: string;
startDateTime?: string;
endDateTime?: string;
location?: string;
locationEnd?: string;
feeling?: number;
typeId?: number;
billable?: boolean;
paid?: boolean;
billed?: boolean;
phoneNumber?: string;
distance?: string;
signature?: string;
project?: Project;
todo?: Todo;
rate?: Rate;
member?: Member;
invoiceId?: string;
tags?: Tag[];
pauses?: Pause[];
expenses?: Expense[];
notes?: Note[];
duration?: number;
durationBreak?: number;
salaryTotal?: string;
salaryBreak?: string;
expensesTotal?: string;
expensesPaid?: string;
mileage?: string;
notesTotal?: number;
salaryVisible?: boolean;
user?: string;
deleted?: boolean;
running?: boolean;
created?: number;
lastUpdate?: number;
}
export interface TaskList {
items: Task[];
params: TaskListParams;
taskStatistic?: TaskStatistic;
}
export interface TaskStatistic {
duration: number;
durationBreak: number;
salaryTotal: string;
salaryBreak: string;
expensesTotal: string;
expensesPaid: string;
mileage: string;
}
export interface TaskCreateRequest {
projectId: string;
description?: string;
location?: string;
locationEnd?: string;
startDateTime: string;
endDateTime?: string;
feeling?: number;
typeId?: number;
paid?: boolean;
billed?: boolean;
billable?: boolean;
phoneNumber?: string;
distance?: number;
rateId?: string;
todoId?: string;
signature?: string;
userId?: string;
tagIds?: string[];
}
export interface TaskUpdateRequest {
projectId?: string;
description?: string;
location?: string;
locationEnd?: string;
startDateTime?: string;
endDateTime?: string;
feeling?: number;
typeId?: number;
paid?: boolean;
billed?: boolean;
billable?: boolean;
phoneNumber?: string;
distance?: number;
rateId?: string;
todoId?: string;
signature?: string;
deleted?: boolean;
tagIds?: string[];
}
export interface TaskStatusUpdateRequest {
id: string;
status?: number;
paid?: boolean;
notBillable?: boolean;
unpaid?: boolean;
notBilled?: boolean;
billed?: boolean;
}
export interface TaskTimesUpdateRequest {
id: string;
start: string;
end: string;
}
export interface TaskListParams extends ListParams {
sort?: 'dateTime' | 'time' | 'created';
order?: 'asc' | 'desc';
organizationId?: string;
teamId?: string;
projectId?: string;
todoId?: string;
rateId?: string;
documentId?: string;
type?: string;
filter?: string;
teamIds?: string[];
projectIds?: string[];
tagIds?: string[];
taskIds?: string[];
userIds?: string[];
feelings?: number[];
populatePauses?: boolean;
populateExpenses?: boolean;
populateNotes?: boolean;
populateTags?: boolean;
excludeTaskIds?: string[];
startDate?: string;
endDate?: string;
}
//# sourceMappingURL=Task.d.ts.map