@timesheet/sdk
Version:
Official TypeScript SDK for the Timesheet API
345 lines • 8.97 kB
TypeScript
export interface TaskReportItem {
taskDate?: string;
taskStartTime?: string;
taskEndTime?: string;
taskTimeRange?: string;
taskDuration?: string;
taskDurationRelative?: string;
pauseDuration?: string;
taskDescription?: string;
taskId?: string;
userId?: string;
invoiceId?: string;
startDateTimeRaw?: string;
endDateTimeRaw?: string;
durationSeconds?: number;
durationBreakSeconds?: number;
taskLocation?: string;
taskLocationStart?: string;
taskLocationEnd?: string;
taskDistance?: string;
taskRateName?: string;
taskRate?: string;
taskTotal?: string;
taskTotalRelative?: string;
projectName?: string;
projectClient?: string;
projectColor?: string;
memberName?: string;
taskTags?: string;
taskSignature?: string;
quantityHours?: number;
unitPriceNumeric?: number;
lineTotalNumeric?: number;
salaryTotalNumeric?: number;
salaryBreakNumeric?: number;
projectId?: string;
memberId?: string;
billable?: boolean;
paid?: boolean;
expenses?: ExpenseReportItem[];
notes?: NoteReportItem[];
}
export interface ExpenseReportItem {
expenseDate?: string;
expenseTime?: string;
expenseAmount?: string;
expenseDescription?: string;
expenseDescriptionRaw?: string;
expenseDateTimeRaw?: string;
expenseId?: string;
expenseUserId?: string;
attachmentBase64?: string;
expenseAuthor?: string;
amountNumeric?: number;
}
export interface NoteReportItem {
noteDate?: string;
noteContent?: string;
attachmentBase64?: string;
noteType?: string;
noteAuthor?: string;
}
export interface DocumentReport {
documentName?: string;
documentTitle?: string;
documentDate?: string;
invoiceNumber?: string;
customerNumber?: string;
paymentDate?: string;
paymentMethod?: string;
paid?: boolean;
companyName?: string;
companyAddress1?: string;
companyAddress2?: string;
companyAddress3?: string;
companyAddress4?: string;
companyLogo?: string;
customerName?: string;
customerAddress1?: string;
customerAddress2?: string;
customerAddress3?: string;
customerAddress4?: string;
taskSubtotal?: string;
expenseSubtotal?: string;
subtotalAmount?: string;
taxRate?: number;
taxAmount?: string;
taxSecondRate?: number;
taxSecondAmount?: string;
discountRate?: number;
discountAmount?: string;
discountSecondRate?: number;
discountSecondAmount?: string;
totalAmount?: string;
totalDuration?: string;
paymentAmount?: string;
eInvoiceType?: string;
companyVatId?: string;
companyTaxNumber?: string;
companyRegistrationNumber?: string;
companyBankAccount?: string;
companyBankBIC?: string;
eInvoiceCurrency?: string;
deliveryDate?: string;
dueDate?: string;
paymentReference?: string;
orderReference?: string;
taxExemptionReason?: string;
reverseChargeRate?: number;
isReverseCharge?: boolean;
eInvoiceDocumentType?: string;
invoiceTypeCode?: string;
customerVatId?: string;
customerTaxNumber?: string;
customerOrderNumber?: string;
paymentTermDays?: number;
cashDiscountRate?: number;
cashDiscountDays?: number;
originalInvoiceNumber?: string;
originalInvoiceDate?: string;
projectReference?: string;
costCenter?: string;
isGovernmentInvoice?: boolean;
procurementReference?: string;
contractReference?: string;
eInvoicingEnabled?: boolean;
documentDescription?: string;
documentTerms?: string;
documentSignature?: string;
showTaskTime?: boolean;
showRates?: boolean;
showTaxes?: boolean;
showSecondTax?: boolean;
showDiscount?: boolean;
showSecondDiscount?: boolean;
includeExpenses?: boolean;
includeNotes?: boolean;
showProjectTitle?: boolean;
showMemberName?: boolean;
showTags?: boolean;
showQrCode?: boolean;
qrCodeType?: string;
qrCodeContent?: string;
qrCodeDescription?: string;
hideExpenseDateTime?: boolean;
hideSummation?: boolean;
useRelatives?: boolean;
tasks?: TaskReportItem[];
expenses?: ExpenseReportItem[];
notes?: NoteReportItem[];
labelDescription?: string;
labelRate?: string;
labelQuantity?: string;
labelTotal?: string;
labelTotalSum?: string;
labelSubtotal?: string;
labelTax?: string;
labelSecondTax?: string;
labelDiscount?: string;
labelSecondDiscount?: string;
labelExpenseTitle?: string;
labelExpenseTotal?: string;
templateId?: string;
reportType?: string;
language?: string;
currency?: string;
currencyCode?: string;
}
export interface ExportedField {
id: string;
name?: string;
position?: number;
projectField?: boolean;
teamField?: boolean;
customField?: boolean;
customValue?: string;
customFormula?: string;
customType?: string;
}
export interface ExportParams {
report: number;
email?: string;
filename?: string;
teamIds?: string[];
projectIds?: string[];
userIds?: string[];
tagIds?: string[];
absenceTypeIds?: string[];
absenceStatuses?: string[];
overtimeStatuses?: string[];
periodType?: string;
year?: number;
organizationId?: string;
type?: string;
startDate: string;
endDate: string;
format?: ExportFormat;
filter?: string;
splitTask?: boolean;
summarize?: boolean;
saveAsTemplate?: boolean;
templateName?: string;
exportedFields?: ExportedField[];
fileType?: string;
xls?: boolean;
xls1904?: boolean;
csv?: boolean;
pdf?: boolean;
mimeType?: string;
dateRange?: string;
fileExtension?: string;
}
export type ExportFormat = 'xlsx' | 'xlsx1904' | 'csv' | 'pdf';
export interface ExportTemplateParams {
templateId: string;
startDate: string;
endDate: string;
}
export interface FileResponse {
url: string;
}
export interface ExportTemplate {
id: string;
user?: string;
deleted?: boolean;
lastUpdate?: number;
created?: number;
name: string;
report: number;
teamIds?: string[];
projectIds?: string[];
userIds?: string[];
tagIds?: string[];
type?: string;
format?: string;
filter?: string;
splitTask?: boolean;
summarize?: boolean;
email?: string;
filename?: string;
exportedFields?: ExportedField[];
}
export interface ExportTemplateCreateRequest {
name: string;
report?: number;
teamIds?: string[];
projectIds?: string[];
userIds?: string[];
tagIds?: string[];
type?: string;
format?: string;
filter?: string;
splitTask?: boolean;
summarize?: boolean;
email?: string;
filename?: string;
exportedFields?: ExportedField[];
}
export interface ExportTemplateUpdateRequest {
name?: string;
report?: number;
teamIds?: string[];
projectIds?: string[];
userIds?: string[];
tagIds?: string[];
type?: string;
format?: string;
filter?: string;
splitTask?: boolean;
summarize?: boolean;
email?: string;
filename?: string;
exportedFields?: ExportedField[];
}
export interface ExportTemplateListParams {
sort?: 'alpha' | 'name' | 'created' | 'lastUpdate';
order?: 'asc' | 'desc';
page?: number;
limit?: number;
search?: string;
}
export interface ExportFieldDefinition {
fieldId: string;
nameKey?: string;
descriptionKey?: string;
name: string;
description?: string;
type?: string;
category?: string;
scope?: string;
defaultEnabled?: boolean;
defaultPosition?: number;
customField?: boolean;
customType?: string;
customValue?: string;
customFormula?: string;
}
export interface ExportFieldsResponse {
fields: ExportFieldDefinition[];
scope?: string;
totalCount?: number;
}
export interface ExportReportType {
id: number;
name: string;
acceptFields?: boolean;
fieldScope?: string;
dataCategory?: string;
}
export interface ExportReportsResponse {
items: ExportReportType[];
}
export interface CustomExportField {
id: string;
user?: string;
name: string;
customType: string;
customValue?: string;
customFormula?: string;
scope: string;
defaultPosition?: number;
deleted?: boolean;
lastUpdate?: number;
created?: number;
}
export interface CustomExportFieldCreateRequest {
name: string;
customType: string;
customValue?: string;
customFormula?: string;
scope: string;
defaultPosition?: number;
}
export interface CustomExportFieldUpdateRequest {
name?: string;
customValue?: string;
customFormula?: string;
defaultPosition?: number;
deleted?: boolean;
}
export interface CustomExportFieldsResponse {
fields: CustomExportField[];
scope?: string;
}
//# sourceMappingURL=Reports.d.ts.map