import { BaseResource } from '@gitbeaker/requester-utils'; import { RequestHelper, endpoint } from '../infrastructure'; import type { GitlabAPIResponse, ShowExpanded, Sudo } from '../infrastructure'; export class Helm extends BaseResource { downloadChartIndex( projectId: string | number, channel: string, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`projects/${projectId}/packages/helm/${channel}/index.yaml`, options, ); } downloadChart( projectId: string | number, channel: string, filename: string, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`projects/${projectId}/packages/helm/${channel}/charts/${filename}.tgz`, options, ); } import( projectId: string | number, channel: string, chart: { content: Blob; filename: string }, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.post()( this, endpoint`projects/${projectId}/packages/helm/api/${channel}/charts`, { isForm: true, ...options, chart: [chart.content, chart.filename], }, ); } }