import type { Entity, FieldsParam, ListParams, MuteUpdateNotificationsParam, Schema, IssueAttachment, DeepPartial } from "../types"; import { ResourceApi } from "./common"; type IssueAttachmentSchema = Schema; type IssueAttachmentEntity = Entity; /** * Resource that provides access to issues. * https://www.jetbrains.com/help/youtrack/devportal/resource-api-issues.html */ export declare class IssueAttechmentsApi extends ResourceApi { /** * Get a list of all attachments of the specific issue. * @param issueId - The Id of the issue. * @param params - Parameters for the request. * @param params.fields - A list of IssueAttachment 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 be returned. Defaults to the server limit if not set. * @param params.$skip - Optional. Specifies the number of entities to skip before returning the first one. * @returns A promise that resolves to the list of issue attachments. */ getIssueAttachments(issueId: string, params?: FieldsParam & ListParams): Promise[]>; /** * Add an attachment to the issue. * @param issueId - The Id of the issue. * @param attachment - The attachment data to be added. * @param params - Parameters for the request. * @param params.fields - A list of IssueAttachment 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 A promise that resolves to the added issue attachment. */ createIssueAttachment(issueId: string, body: FormData, params?: FieldsParam & MuteUpdateNotificationsParam): Promise>; /** * Read a specific attachment of the issue. * @param issueId - The Id of the issue. * @param attachmentId - The database ID of the attachment. * @param params - Parameters for the request. * @param params.fields - A list of IssueAttachment 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 issue attachment. */ getIssueAttachmentById(issueId: string, attachmentId: string, params?: FieldsParam): Promise>; /** * Update a specific attachment. * @param issueId - The Id of the issue. * @param attachmentId - The database ID of the attachment. * @param params - Parameters for the request. * @param params.fields - A list of IssueAttachment 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 issue attachment. */ updateIssueAttachment(issueId: string, attachmentId: string, body: DeepPartial, params?: FieldsParam): Promise>; /** * Delete a specific attachment. * @param issueId - The Id of the issue. * @param attachmentId - The database ID of the attachment. * @param params - Parameters for the request. * @param params.fields - A list of IssueAttachment 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 attachment is deleted. */ deleteIssueAttachment(issueId: string, attachmentId: string, params?: FieldsParam): Promise>; } export {};