UNPKG

projectmanager-sdk

Version:

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

85 lines (84 loc) 4.2 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 { ProjectDto } from "../index.js"; import { ProjectCreateDto } from "../index.js"; import { ProjectUpdateDto } from "../index.js"; export declare class ProjectClient { private readonly client; /** * Internal constructor for this client library */ constructor(client: ProjectManagerClient); /** * Retrieve a list of Projects that match an [OData formatted query](https://www.odata.org/). * * A Project is a collection of Tasks that contributes towards a goal. Within a Project, Tasks * represent individual items of work that team members must complete. The sum total of Tasks * within a Project represents the work to be completed for that Project. * * @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 */ queryProjects(top?: number, skip?: number, filter?: string, orderby?: string, expand?: string): Promise<AstroResult<ProjectDto[]>>; /** * Create a new project based on the details provided. * * A Project is a collection of Tasks that contributes towards a goal. Within a Project, Tasks * represent individual items of work that team members must complete. The sum total of Tasks * within a Project represents the work to be completed for that Project. * * @param body Information about the Project you wish to create */ createProject(body: ProjectCreateDto): Promise<AstroResult<ProjectDto>>; /** * Retrieves a project based on its unique identifier. * * A Project is a collection of Tasks that contributes towards a goal. Within a Project, Tasks * represent individual items of work that team members must complete. The sum total of Tasks * within a Project represents the work to be completed for that Project. * * @param projectId The unique identifier of the Project to retrieve. */ retrieveProject(projectId: string): Promise<AstroResult<ProjectDto>>; /** * Update an existing Project and replace the values of fields specified. * * A Project is a collection of Tasks that contributes towards a goal. Within a Project, Tasks * represent individual items of work that team members must complete. The sum total of Tasks * within a Project represents the work to be completed for that Project. * * Multiple users can be working on data at the same time. When you call an API to update an * object, this call is converted into a Changeset that is then applied sequentially. You can use * RetrieveChangeset to see the status of an individual Changeset. * * @param projectId The unique identifier of the Project to update * @param body All non-null fields in this object will replace previous data within the Project */ updateProject(projectId: string, body: ProjectUpdateDto): Promise<AstroResult<object>>; /** * Delete a project based on the details provided. * * A Project is a collection of Tasks that contributes towards a goal. Within a Project, Tasks * represent individual items of work that team members must complete. The sum total of Tasks * within a Project represents the work to be completed for that Project. * * @param projectId The unique identifier of the Project to delete * @param hardDelete Hard delete project true or false */ deleteProject(projectId: string, hardDelete?: boolean): Promise<AstroResult<object>>; }