import { BaseResourceOptions } from '@gitbeaker/requester-utils'; import { ResourceNotes } from '../templates'; import { NoteSchema } from '../templates/types'; import { PaginatedRequestOptions, BaseRequestOptions, Sudo, CamelizedRecord, } from '../infrastructure'; export interface IssueNoteSchema extends NoteSchema { attachment?: string; system: boolean; noteable_id: number; noteable_type: string; noteable_iid: number; resolvable: boolean; } export interface IssueNotes extends ResourceNotes { all( projectId: string | number, issueIId: number, options?: PaginatedRequestOptions, ): Promise[]>; create( projectId: string | number, issueIId: number, body: string, options?: BaseRequestOptions, ): Promise>; edit( projectId: string | number, issueIId: number, noteId: number, body: string, options?: BaseRequestOptions, ): Promise>; remove( projectId: string | number, issueIId: number, noteId: number, options?: Sudo, ): Promise; show( projectId: string | number, issueIId: number, noteId: number, options?: Sudo, ): Promise>; } export class IssueNotes extends ResourceNotes { constructor(options: BaseResourceOptions) { /* istanbul ignore next */ super('projects', 'issues', options); } }