import type { Schema, FieldsParam, Entity, ListParams, Project, Article, ProjectCustomField, Issue, CustomFieldsParam, MuteUpdateNotificationsParam, ProjectTimeTrackingSettings, WorkItemType, DeepPartial } from "../../types"; import { ResourceApi } from "../common"; type ProjectSchema = Schema; type ArticleSchema = Schema
; type ProjectCustomFieldSchema = Schema; type IssueSchema = Schema; type ProjectTimeTrackingSettingsSchema = Schema; type WorkItemTypeSchema = Schema; type ProjectEntity = Entity; type ArticleEntity = Entity; type ProjectCustomFieldEntity = Entity; type IssueEntity = Entity; type ProjectTimeTrackingSettingsEntity = Entity; type WorkItemTypeEntity = Entity; export declare class ProjectsApi extends ResourceApi { /** * Get a list of all available projects in the system. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.$top - Optional. The maximum number of entries to return in the response. * @param params.$skip - Optional. The number of entities to skip before returning the first one. * @returns A promise that resolves to the list of Project entities. */ getProjects(params?: FieldsParam & ListParams): Promise[]>; /** * Create a project in YouTrack. * @param body - Required fields: name, shortName, leader (id of the project owner user). * @param params - Optional parameters for response filtering and template selection. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.template - Optional. Specify the template to use for the new project (e.g., 'scrum', 'kanban'). If not specified, the default settings will be used. * @returns A promise that resolves to the created Project entity. */ createProject(body: { name: string; shortName: string; leader: { id: string; }; } & DeepPartial>, params?: FieldsParam & { template?: string; }): Promise>; /** * Get the settings of a specific project. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the requested Project entity. */ getProjectById(projectId: string, params?: FieldsParam): Promise>; /** * Update settings of a project with a specific ID. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param body - The fields to update in the project. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the updated Project entity. */ updateProject(projectId: string, body: DeepPartial, params?: FieldsParam): Promise>; /** * Delete a project with specific ID. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves when the project is deleted. */ deleteProject(projectId: string, params?: FieldsParam): Promise>; /** * Get the list of articles that belong to the project. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param params - Optional parameters for response filtering. * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.$top - Optional. Maximum number of entries to return. * @param params.$skip - Optional. Number of returned entities to skip before returning the first one. * @returns A promise that resolves to a list of Article entities. */ getProjectArticles(projectId: string, params?: FieldsParam & ListParams): Promise[]>; /** * Read the list of custom fields that are attached to a specific project. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param params - Optional parameters for response filtering. * @param params.fields - A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.$top - Optional. Maximum number of entries to return. * @param params.$skip - Optional. Number of returned entities to skip before returning the first one. * @returns A promise that resolves to a list of ProjectCustomField entities. */ getProjectCustomFields(projectId: string, params?: FieldsParam & ListParams): Promise[]>; /** * Attach the custom field to the project. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param body - The custom field to attach, including its ID and type. * @param params - Optional parameters for response filtering. * @param params.fields - A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the attached ProjectCustomField entity. */ addCustomFieldToProject(projectId: string, body: { field: { id: string; }; } & DeepPartial>, params?: FieldsParam): Promise>; /** * Get the settings of the specific custom field in the project. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param fieldId - The database ID of the project custom field. * @param params - Optional parameters for response filtering. * @param params.fields - A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the requested ProjectCustomField entity. */ getProjectCustomFieldById(projectId: string, fieldId: string, params?: FieldsParam): Promise>; /** * Change the settings of the specific custom field in the project. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param fieldId - The database ID of the project custom field. * @param params - Optional parameters for response filtering. * @param params.fields - A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param body - The new settings for the project custom field. * @returns A promise that resolves to the updated ProjectCustomField entity. */ updateProjectCustomField(projectId: string, fieldId: string, body: DeepPartial, params?: FieldsParam): Promise>; /** * Remove the specific custom field from the project. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param fieldId - The database ID of the project custom field. * @param params - Optional parameters for response filtering. * @param params.fields - A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the result of the deletion. */ removeProjectCustomField(projectId: string, fieldId: string, params?: FieldsParam): Promise>; /** * Get a list of all available issues in the specific project. * The default issue sorting is by updated desc. * If $top is not provided, the number of returned issues is limited to the Max issues to export value in the Global Settings. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param params - Optional parameters for response filtering. * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.$skip - Optional. Lets you set a number of returned entities to skip before returning the first one. * @param params.$top - Optional. Lets you specify the maximum number of entries that are returned in the response. * @param params.customFields - The name of the custom field(s) to show in the response. Use this parameter multiple times to show more than one custom field. * @returns A promise that resolves to a list of issues in the specified project. */ getProjectIssues(projectId: string, params?: FieldsParam | ListParams | CustomFieldsParam): Promise[]>; /** * Create a new issue in the specified project. * Required fields: summary. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param body - The body of the issue, must include a summary. * @param params - Optional parameters for response filtering. * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityID is returned. * @param params.muteUpdateNotifications - Set to true to mute notifications for this request. Requires Apply Commands Silently permission. * @returns A promise that resolves to the created issue. */ createProjectIssue(projectId: string, body: { summary: string; } & DeepPartial, params?: FieldsParam & MuteUpdateNotificationsParam): Promise>; /** * Read a specific issue in the project. * @param projectId - The database ID or project ID of the project. * @param issueId - The database ID or project ID of the issue. * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns The requested issue. */ getProjectIssueById(projectId: string, issueId: string, params?: FieldsParam): Promise>; /** * Update a single issue. * @param issueId - The database ID or project ID of the issue. * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request. * @returns The updated issue. */ updateProjectIssue(projectId: string, issueId: string, body: DeepPartial, params?: FieldsParam & MuteUpdateNotificationsParam): Promise>; /** * Delete the issue. Note that this operation cannot be undone. * @param issueId - The database ID or project ID of the issue. * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves when the issue is deleted. */ deleteProjectIssue(projectId: string, issueId: string, params?: FieldsParam): Promise>; /** * Read the time tracking settings of the project. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param params - Optional parameters for response filtering. * @param params.fields - A list of ProjectTimeTrackingSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned. * @returns A promise that resolves to the time tracking settings of the project. */ getProjectTimeTrackingSettings(projectId: string, params?: FieldsParam): Promise>; /** * Update the time tracking settings of the project. * @param projectId - The ID of the project (can be the database entity ID or the short name). * @param body - The new time tracking settings to apply. * @param params - Optional parameters for response filtering. * @param params.fields - A list of ProjectTimeTrackingSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned. * @returns A promise that resolves to the updated time tracking settings of the project. */ updateProjectTimeTrackingSettings(projectId: string, body: DeepPartial, params?: FieldsParam): Promise>; /** * Get the list of all work items of the specific project. * @param issueId - The ID of the project. * @param params - Optional parameters. * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.$top - Optional. Specifies the maximum number of entries to return. If not provided, the server limits the number of entries. * @param params.$skip - Optional. Specifies the number of entries to skip before returning the first one. * @returns A promise that resolves to the list of work items for the project. */ getProjectWorkItemTypes(projectId: string, params?: FieldsParam & ListParams): Promise[]>; /** * Add a new work item to the project. * @param projectId - The ID of the project. * @param body - The work item details including duration. * @param params - Optional parameters. * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request. This doesn't mute notifications sent by any workflow rules. * @returns A promise that resolves to the added work item. */ addProjectWorkItemType(projectId: string, body: { duration: number; } & DeepPartial, params?: FieldsParam & MuteUpdateNotificationsParam): Promise>; /** * Get a specific work item of the project. * @param projectId - The ID of the project. * @param workItemId - The ID of the work item to retrieve. * @param params - Optional parameters. * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the specific work item. */ getProjectWorkItemTypeById(projectId: string, workItemId: string, params?: FieldsParam): Promise>; /** * Delete the specific work item in the project. * @param projectId - The ID of the project. * @param workItemId - The ID of the work item to delete. * @param params - Optional parameters. * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the response of the deletion request. */ deleteProjectWorkItemType(projectId: string, workItemId: string, params?: FieldsParam): Promise>; } export {};