import { BaseResource } from '@gitbeaker/requester-utils'; import { RequestHelper, endpoint } from '../infrastructure'; import type { GitlabAPIResponse, PaginationRequestOptions, PaginationTypes, ShowExpanded, Sudo, } from '../infrastructure'; import type { CondensedGroupSchema } from './Groups'; import { LabelSchema } from '../templates/ResourceLabels'; export interface GroupEpicBoardListSchema extends Record { id: number; label: Pick; position: number; list_type: 'label'; collapsed: boolean; } export interface GroupEpicBoardSchema extends Record { id: number; name: string; group: CondensedGroupSchema; hide_backlog_list: boolean; hide_closed_list: boolean; labels: LabelSchema[] | null; lists: GroupEpicBoardListSchema[] | null; } export class GroupEpicBoards extends BaseResource { all( groupId: string | number, options?: PaginationRequestOptions

& Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`groups/${groupId}/epic_boards`, options, ); } allLists( groupId: string | number, boardId: number, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`groups/${groupId}/epic_boards/${boardId}/lists`, options, ); } show( groupId: string | number, boardId: number, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`groups/${groupId}/epic_boards/${boardId}`, options, ); } showList( groupId: string | number, boardId: number, listId: number, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`groups/${groupId}/epic_boards/${boardId}/lists/${listId}`, options, ); } }