UNPKG

projectmanager-sdk

Version:

Software development kit for the ProjectManager.com API. for TypeScript

84 lines (83 loc) 3.43 kB
/** * ProjectManager API for TypeScript * * (c) ProjectManager.com, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @author ProjectManager.com <support@projectmanager.com> * @copyright ProjectManager.com, Inc. * @link https://github.com/projectmgr/projectmanager-sdk-typescript */ import { ProjectManagerClient } from "../index.js"; import { AstroResult } from "../index.js"; import { TimesheetResponseDto } from "../index.js"; import { TimesheetCreateRequestDto } from "../index.js"; import { TimesheetDto } from "../index.js"; import { TimesheetUpdateRequestDto } from "../index.js"; import { TimesheetAdminTypeDto } from "../index.js"; import { TimeSheetApprovalResponseDto } from "../index.js"; import { TimeSheetApprovalDto } from "../index.js"; import { TimeSheetApprovalRejectDto } from "../index.js"; export declare class TimesheetClient { private readonly client; /** * Internal constructor for this client library */ constructor(client: ProjectManagerClient); /** * Creates new time entry for given resource on given day. * * @param body Payload */ createtimeentry(body: TimesheetCreateRequestDto): Promise<AstroResult<TimesheetResponseDto>>; /** * Retrieve a list of TimeSheets that match an [OData formatted query](https://www.odata.org/). * * Time Sheets is a list of times per task * * @param top The number of records to return * @param skip Skips the given number of records and then returns $top records * @param filter Filter the expression according to oData queries * @param orderby Order collection by this field. * @param expand Include related data in the response */ queryTimeSheets(top?: number, skip?: number, filter?: string, orderby?: string, expand?: string): Promise<AstroResult<TimesheetDto[]>>; /** * Delete time entry by id. * * @param timesheetId time entry id */ deletetimeentry(timesheetId: string): Promise<AstroResult<object>>; /** * Updates a time entry by its unique identifier. * * @param timesheetId time entry id * @param body payload */ updatetimeentry(timesheetId: string, body: TimesheetUpdateRequestDto): Promise<AstroResult<TimesheetResponseDto>>; /** * Returns active admin tasks that are used to report time not related to work on projects. I.e. annual/sick leave etc * */ returnsactiveadmintasksthatareusedtoreporttime(): Promise<AstroResult<TimesheetAdminTypeDto[]>>; /** * Submit a timesheet for approval for a specific resource. * * @param body The timesheet to be submitted for approval */ submitResourceTimeSheetForApproval(body: TimeSheetApprovalDto): Promise<AstroResult<TimeSheetApprovalResponseDto>>; /** * Approve a timesheet approval request * * @param body The timesheet to approve */ approveResourceTimeSheetApprovalRequest(body: TimeSheetApprovalDto): Promise<AstroResult<TimeSheetApprovalResponseDto>>; /** * Rejects a specific resource's timesheet approval request for a specific week. * * @param body The data for rejecting the approval request */ rejectResourceTimeSheetApprovalRequest(body: TimeSheetApprovalRejectDto): Promise<AstroResult<TimeSheetApprovalResponseDto>>; }