mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-25 16:04:01 +00:00
- Fixing codeclimate config - Improving README badge config - Debug CI test reports - Improve test coverage - Update externals APIs to have consistent structures - Update Alert Management to improve clarity - Add convenience methods in ProtectedTags - Update optional types through the library that were missed - Rename deregister to unregister and fix the register method which was using the wrong HTTP method - Fixing CI caching
48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
import { BaseResource } from '@gitbeaker/requester-utils';
|
|
import { RequestHelper, endpoint } from '../infrastructure';
|
|
import type { GitlabAPIResponse, ShowExpanded, Sudo } from '../infrastructure';
|
|
|
|
export class Helm<C extends boolean = false> extends BaseResource<C> {
|
|
downloadChartIndex<E extends boolean = false>(
|
|
projectId: string | number,
|
|
channel: string,
|
|
options?: Sudo & ShowExpanded<E>,
|
|
): Promise<GitlabAPIResponse<Blob, void, E, void>> {
|
|
return RequestHelper.get<Blob>()(
|
|
this,
|
|
endpoint`projects/${projectId}/packages/helm/${channel}/index.yaml`,
|
|
options,
|
|
);
|
|
}
|
|
|
|
downloadChart<E extends boolean = false>(
|
|
projectId: string | number,
|
|
channel: string,
|
|
filename: string,
|
|
options?: Sudo & ShowExpanded<E>,
|
|
): Promise<GitlabAPIResponse<Blob, void, E, void>> {
|
|
return RequestHelper.get<Blob>()(
|
|
this,
|
|
endpoint`projects/${projectId}/packages/helm/${channel}/charts/${filename}.tgz`,
|
|
options,
|
|
);
|
|
}
|
|
|
|
import<E extends boolean = false>(
|
|
projectId: string | number,
|
|
channel: string,
|
|
chart: { content: Blob; filename: string },
|
|
options?: Sudo & ShowExpanded<E>,
|
|
): Promise<GitlabAPIResponse<void, C, E, void>> {
|
|
return RequestHelper.post<void>()(
|
|
this,
|
|
endpoint`projects/${projectId}/packages/helm/api/${channel}/charts`,
|
|
{
|
|
isForm: true,
|
|
...options,
|
|
chart: [chart.content, chart.filename],
|
|
},
|
|
);
|
|
}
|
|
}
|