import { BaseResource } from '@gitbeaker/requester-utils'; import { RequestHelper, endpoint } from '../infrastructure'; import type { GitlabAPIResponse, PaginationRequestOptions, PaginationTypes, ShowExpanded, Sudo, } from '../infrastructure'; import type { JobSchema } from './Jobs'; export interface ResourceGroupSchema extends Record { id: number; key: string; process_mode: string; created_at: string; updated_at: string; } export class ResourceGroups extends BaseResource { all( projectId: string | number, options?: Sudo & ShowExpanded & PaginationRequestOptions

, ): Promise> { return RequestHelper.get()( this, endpoint`projects/${projectId}/resource_groups`, options, ); } edit( projectId: string | number, key: string, options?: { processMode?: string } & Sudo & ShowExpanded, ) { return RequestHelper.put()( this, endpoint`projects/${projectId}/resource_groups/${key}`, options, ); } show( projectId: string | number, key: string, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`projects/${projectId}/resource_groups/${key}`, options, ); } allUpcomingJobs( projectId: string | number, key: string, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`projects/${projectId}/resource_groups/${key}/upcoming_jobs`, options, ); } }