import { BaseResource } from '@gitbeaker/requester-utils'; import { RequestHelper, endpoint } from '../infrastructure'; import type { GitlabAPIResponse, MappedOmit, PaginationRequestOptions, PaginationTypes, ShowExpanded, Sudo, } from '../infrastructure'; import type { IssueSchema } from './Issues'; export interface EpicIssueSchema extends MappedOmit { epic_issue_id: number; } export interface ExpandedEpicIssueSchema extends EpicIssueSchema { subscribed: boolean; relative_position: number; } export class EpicIssues extends BaseResource { all( groupId: string | number, epicIId: number, options?: PaginationRequestOptions

& Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`groups/${groupId}/epics/${epicIId}/issues`, options, ); } assign( groupId: string | number, epicIId: number, epicIssueId: number, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.post()( this, endpoint`groups/${groupId}/epics/${epicIId}/issues/${epicIssueId}`, options, ); } edit( groupId: string | number, epicIId: number, epicIssueId: number, options?: { moveBeforeId?: number; moveAfterId?: number } & Sudo & ShowExpanded, ): Promise> { return RequestHelper.put()( this, endpoint`groups/${groupId}/epics/${epicIId}/issues/${epicIssueId}`, options, ); } remove( groupId: string | number, epicIId: number, epicIssueId: number, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.del()( this, endpoint`groups/${groupId}/epics/${epicIId}/issues/${epicIssueId}`, options, ); } }