gitbeaker/packages/core/src/resources/EpicLabelEvents.ts
Adam Dehnel dbd208e6f3
Epic label events super used singular 'epic', not 'epics' (#3594)
The super() call here sets the URL path and "epic" isn't valid so this change makes that "epics" to match the GitLab API
2024-05-26 15:26:43 -04:00

34 lines
1.1 KiB
TypeScript

import type { BaseResourceOptions } from '@gitbeaker/requester-utils';
import { ResourceLabelEvents } from '../templates';
import type { LabelEventSchema } from '../templates/ResourceLabelEvents';
import type {
BaseRequestOptions,
GitlabAPIResponse,
PaginationRequestOptions,
PaginationTypes,
ShowExpanded,
Sudo,
} from '../infrastructure';
export interface EpicLabelEvents<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
groupId: string | number,
epidId: number,
options?: BaseRequestOptions<E> & PaginationRequestOptions<P>,
): Promise<GitlabAPIResponse<LabelEventSchema[], C, E, P>>;
show<E extends boolean = false>(
groupId: string | number,
epidId: number,
labelEventId: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<LabelEventSchema, C, E, void>>;
}
export class EpicLabelEvents<C extends boolean = false> extends ResourceLabelEvents<C> {
constructor(options: BaseResourceOptions<C>) {
/* istanbul ignore next */
super('groups', 'epics', options);
}
}