import basem = require('./ClientApiBases'); import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); import TfsCoreInterfaces = require("./interfaces/CoreInterfaces"); import WorkInterfaces = require("./interfaces/WorkInterfaces"); export interface IWorkApi extends basem.ClientApiBase { getBacklogConfigurations(teamContext: TfsCoreInterfaces.TeamContext): Promise; getBacklogLevelWorkItems(teamContext: TfsCoreInterfaces.TeamContext, backlogId: string): Promise; getBacklog(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; getBacklogs(teamContext: TfsCoreInterfaces.TeamContext): Promise; getBoardBadge(teamContext: TfsCoreInterfaces.TeamContext, id: string, columnOptions?: WorkInterfaces.BoardBadgeColumnOptions, columns?: string[]): Promise; getBoardBadgeData(teamContext: TfsCoreInterfaces.TeamContext, id: string, columnOptions?: WorkInterfaces.BoardBadgeColumnOptions, columns?: string[]): Promise; getColumnSuggestedValues(project?: string): Promise; getBoardMappingParentItems(teamContext: TfsCoreInterfaces.TeamContext, childBacklogContextCategoryRefName: string, workitemIds: number[]): Promise; getRowSuggestedValues(project?: string): Promise; getBoard(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; getBoards(teamContext: TfsCoreInterfaces.TeamContext): Promise; setBoardOptions(options: { [key: string]: string; }, teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<{ [key: string]: string; }>; getBoardUserSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; updateBoardUserSettings(boardUserSettings: { [key: string]: string; }, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; getCapacitiesWithIdentityRef(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; getCapacityWithIdentityRef(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise; replaceCapacitiesWithIdentityRef(capacities: WorkInterfaces.TeamMemberCapacityIdentityRef[], teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; updateCapacityWithIdentityRef(patch: WorkInterfaces.CapacityPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise; getBoardCardRuleSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; updateBoardCardRuleSettings(boardCardRuleSettings: WorkInterfaces.BoardCardRuleSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; updateTaskboardCardRuleSettings(boardCardRuleSettings: WorkInterfaces.BoardCardRuleSettings, teamContext: TfsCoreInterfaces.TeamContext): Promise; getBoardCardSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; updateBoardCardSettings(boardCardSettingsToSave: WorkInterfaces.BoardCardSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; updateTaskboardCardSettings(boardCardSettingsToSave: WorkInterfaces.BoardCardSettings, teamContext: TfsCoreInterfaces.TeamContext): Promise; getBoardChart(teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise; getBoardCharts(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; updateBoardChart(chart: WorkInterfaces.BoardChart, teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise; getBoardColumns(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; updateBoardColumns(boardColumns: WorkInterfaces.BoardColumn[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; getDeliveryTimelineData(project: string, id: string, revision?: number, startDate?: Date, endDate?: Date): Promise; deleteTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; getTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; getTeamIterations(teamContext: TfsCoreInterfaces.TeamContext, timeframe?: string): Promise; postTeamIteration(iteration: WorkInterfaces.TeamSettingsIteration, teamContext: TfsCoreInterfaces.TeamContext): Promise; createPlan(postedPlan: WorkInterfaces.CreatePlan, project: string): Promise; deletePlan(project: string, id: string): Promise; getPlan(project: string, id: string): Promise; getPlans(project: string): Promise; updatePlan(updatedPlan: WorkInterfaces.UpdatePlan, project: string, id: string): Promise; getProcessConfiguration(project: string): Promise; getBoardRows(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; updateBoardRows(boardRows: WorkInterfaces.BoardRow[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; getColumns(teamContext: TfsCoreInterfaces.TeamContext): Promise; updateColumns(updateColumns: WorkInterfaces.UpdateTaskboardColumn[], teamContext: TfsCoreInterfaces.TeamContext): Promise; getWorkItemColumns(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; updateWorkItemColumn(updateColumn: WorkInterfaces.UpdateTaskboardWorkItemColumn, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, workItemId: number): Promise; getTeamDaysOff(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; updateTeamDaysOff(daysOffPatch: WorkInterfaces.TeamSettingsDaysOffPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; getTeamFieldValues(teamContext: TfsCoreInterfaces.TeamContext): Promise; updateTeamFieldValues(patch: WorkInterfaces.TeamFieldValuesPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise; getTeamSettings(teamContext: TfsCoreInterfaces.TeamContext): Promise; updateTeamSettings(teamSettingsPatch: WorkInterfaces.TeamSettingsPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise; getIterationWorkItems(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; reorderBacklogWorkItems(operation: WorkInterfaces.ReorderOperation, teamContext: TfsCoreInterfaces.TeamContext): Promise; reorderIterationWorkItems(operation: WorkInterfaces.ReorderOperation, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; } export declare class WorkApi extends basem.ClientApiBase implements IWorkApi { constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); static readonly RESOURCE_AREA_ID = "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9"; /** * Gets backlog configuration for a team * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ getBacklogConfigurations(teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Get a list of work items within a backlog level * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} backlogId */ getBacklogLevelWorkItems(teamContext: TfsCoreInterfaces.TeamContext, backlogId: string): Promise; /** * Get a backlog level * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} id - The id of the backlog level */ getBacklog(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; /** * List all backlog levels * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ getBacklogs(teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Gets a badge that displays the status of columns on the board. * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} id - The id of the board. * @param {WorkInterfaces.BoardBadgeColumnOptions} columnOptions - Determines what columns to show. * @param {string[]} columns - If columnOptions is set to custom, specify the list of column names. */ getBoardBadge(teamContext: TfsCoreInterfaces.TeamContext, id: string, columnOptions?: WorkInterfaces.BoardBadgeColumnOptions, columns?: string[]): Promise; /** * Gets a badge that displays the status of columns on the board. * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} id - The id of the board. * @param {WorkInterfaces.BoardBadgeColumnOptions} columnOptions - Determines what columns to show. * @param {string[]} columns - If columnOptions is set to custom, specify the list of column names. */ getBoardBadgeData(teamContext: TfsCoreInterfaces.TeamContext, id: string, columnOptions?: WorkInterfaces.BoardBadgeColumnOptions, columns?: string[]): Promise; /** * Get available board columns in a project * * @param {string} project - Project ID or project name */ getColumnSuggestedValues(project?: string): Promise; /** * Returns the list of parent field filter model for the given list of workitem ids * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} childBacklogContextCategoryRefName * @param {number[]} workitemIds */ getBoardMappingParentItems(teamContext: TfsCoreInterfaces.TeamContext, childBacklogContextCategoryRefName: string, workitemIds: number[]): Promise; /** * Get available board rows in a project * * @param {string} project - Project ID or project name */ getRowSuggestedValues(project?: string): Promise; /** * Get board * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} id - identifier for board, either board's backlog level name (Eg:"Stories") or Id */ getBoard(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; /** * Get boards * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ getBoards(teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Update board options * * @param {{ [key: string] : string; }} options - options to updated * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} id - identifier for board, either category plural name (Eg:"Stories") or guid */ setBoardOptions(options: { [key: string]: string; }, teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<{ [key: string]: string; }>; /** * Get board user settings for a board id * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board - Board ID or Name */ getBoardUserSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; /** * Update board user settings for the board id * * @param {{ [key: string] : string; }} boardUserSettings * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board */ updateBoardUserSettings(boardUserSettings: { [key: string]: string; }, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; /** * Get a team's capacity * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} iterationId - ID of the iteration */ getCapacitiesWithIdentityRef(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; /** * Get a team member's capacity * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} iterationId - ID of the iteration * @param {string} teamMemberId - ID of the team member */ getCapacityWithIdentityRef(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise; /** * Replace a team's capacity * * @param {WorkInterfaces.TeamMemberCapacityIdentityRef[]} capacities - Team capacity to replace * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} iterationId - ID of the iteration */ replaceCapacitiesWithIdentityRef(capacities: WorkInterfaces.TeamMemberCapacityIdentityRef[], teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; /** * Update a team member's capacity * * @param {WorkInterfaces.CapacityPatch} patch - Updated capacity * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} iterationId - ID of the iteration * @param {string} teamMemberId - ID of the team member */ updateCapacityWithIdentityRef(patch: WorkInterfaces.CapacityPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise; /** * Get board card Rule settings for the board id or board by name * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board */ getBoardCardRuleSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; /** * Update board card Rule settings for the board id or board by name * * @param {WorkInterfaces.BoardCardRuleSettings} boardCardRuleSettings * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board */ updateBoardCardRuleSettings(boardCardRuleSettings: WorkInterfaces.BoardCardRuleSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; /** * Update taskboard card Rule settings * * @param {WorkInterfaces.BoardCardRuleSettings} boardCardRuleSettings * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ updateTaskboardCardRuleSettings(boardCardRuleSettings: WorkInterfaces.BoardCardRuleSettings, teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Get board card settings for the board id or board by name * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board */ getBoardCardSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; /** * Update board card settings for the board id or board by name * * @param {WorkInterfaces.BoardCardSettings} boardCardSettingsToSave * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board */ updateBoardCardSettings(boardCardSettingsToSave: WorkInterfaces.BoardCardSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; /** * Update taskboard card settings * * @param {WorkInterfaces.BoardCardSettings} boardCardSettingsToSave * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ updateTaskboardCardSettings(boardCardSettingsToSave: WorkInterfaces.BoardCardSettings, teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Get a board chart * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id * @param {string} name - The chart name */ getBoardChart(teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise; /** * Get board charts * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id */ getBoardCharts(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; /** * Update a board chart * * @param {WorkInterfaces.BoardChart} chart * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id * @param {string} name - The chart name */ updateBoardChart(chart: WorkInterfaces.BoardChart, teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise; /** * Get columns on a board * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board - Name or ID of the specific board */ getBoardColumns(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; /** * Update columns on a board * * @param {WorkInterfaces.BoardColumn[]} boardColumns - List of board columns to update * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board - Name or ID of the specific board */ updateBoardColumns(boardColumns: WorkInterfaces.BoardColumn[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; /** * Get Delivery View Data * * @param {string} project - Project ID or project name * @param {string} id - Identifier for delivery view * @param {number} revision - Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision. * @param {Date} startDate - The start date of timeline * @param {Date} endDate - The end date of timeline */ getDeliveryTimelineData(project: string, id: string, revision?: number, startDate?: Date, endDate?: Date): Promise; /** * Delete a team's iteration by iterationId * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} id - ID of the iteration */ deleteTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; /** * Get team's iteration by iterationId * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} id - ID of the iteration */ getTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; /** * Get a team's iterations using timeframe filter * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} timeframe - A filter for which iterations are returned based on relative time. Only Current is supported currently. */ getTeamIterations(teamContext: TfsCoreInterfaces.TeamContext, timeframe?: string): Promise; /** * Add an iteration to the team * * @param {WorkInterfaces.TeamSettingsIteration} iteration - Iteration to add * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ postTeamIteration(iteration: WorkInterfaces.TeamSettingsIteration, teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Add a new plan for the team * * @param {WorkInterfaces.CreatePlan} postedPlan - Plan definition * @param {string} project - Project ID or project name */ createPlan(postedPlan: WorkInterfaces.CreatePlan, project: string): Promise; /** * Delete the specified plan * * @param {string} project - Project ID or project name * @param {string} id - Identifier of the plan */ deletePlan(project: string, id: string): Promise; /** * Get the information for the specified plan * * @param {string} project - Project ID or project name * @param {string} id - Identifier of the plan */ getPlan(project: string, id: string): Promise; /** * Get the information for all the plans configured for the given team * * @param {string} project - Project ID or project name */ getPlans(project: string): Promise; /** * Update the information for the specified plan * * @param {WorkInterfaces.UpdatePlan} updatedPlan - Plan definition to be updated * @param {string} project - Project ID or project name * @param {string} id - Identifier of the plan */ updatePlan(updatedPlan: WorkInterfaces.UpdatePlan, project: string, id: string): Promise; /** * Get process configuration * * @param {string} project - Project ID or project name */ getProcessConfiguration(project: string): Promise; /** * Get rows on a board * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board - Name or ID of the specific board */ getBoardRows(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; /** * Update rows on a board * * @param {WorkInterfaces.BoardRow[]} boardRows - List of board rows to update * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} board - Name or ID of the specific board */ updateBoardRows(boardRows: WorkInterfaces.BoardRow[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; /** * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ getColumns(teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * @param {WorkInterfaces.UpdateTaskboardColumn[]} updateColumns * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ updateColumns(updateColumns: WorkInterfaces.UpdateTaskboardColumn[], teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} iterationId */ getWorkItemColumns(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; /** * @param {WorkInterfaces.UpdateTaskboardWorkItemColumn} updateColumn * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} iterationId * @param {number} workItemId */ updateWorkItemColumn(updateColumn: WorkInterfaces.UpdateTaskboardWorkItemColumn, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, workItemId: number): Promise; /** * Get team's days off for an iteration * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} iterationId - ID of the iteration */ getTeamDaysOff(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; /** * Set a team's days off for an iteration * * @param {WorkInterfaces.TeamSettingsDaysOffPatch} daysOffPatch - Team's days off patch containing a list of start and end dates * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} iterationId - ID of the iteration */ updateTeamDaysOff(daysOffPatch: WorkInterfaces.TeamSettingsDaysOffPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; /** * Get a collection of team field values * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ getTeamFieldValues(teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Update team field values * * @param {WorkInterfaces.TeamFieldValuesPatch} patch * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ updateTeamFieldValues(patch: WorkInterfaces.TeamFieldValuesPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Get a team's settings * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ getTeamSettings(teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Update a team's settings * * @param {WorkInterfaces.TeamSettingsPatch} teamSettingsPatch - TeamSettings changes * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ updateTeamSettings(teamSettingsPatch: WorkInterfaces.TeamSettingsPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Get work items for iteration * * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} iterationId - ID of the iteration */ getIterationWorkItems(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; /** * Reorder Product Backlog/Boards Work Items * * @param {WorkInterfaces.ReorderOperation} operation * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ reorderBacklogWorkItems(operation: WorkInterfaces.ReorderOperation, teamContext: TfsCoreInterfaces.TeamContext): Promise; /** * Reorder Sprint Backlog/Taskboard Work Items * * @param {WorkInterfaces.ReorderOperation} operation * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation * @param {string} iterationId - The id of the iteration */ reorderIterationWorkItems(operation: WorkInterfaces.ReorderOperation, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; }