forked from jdalrymple/gitbeaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMergeRequestLabelEvents.ts
32 lines (29 loc) · 1.1 KB
/
MergeRequestLabelEvents.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import type { BaseResourceOptions } from '@gitbeaker/requester-utils';
import { ResourceLabelEvents } from '../templates';
import type { LabelEventSchema } from '../templates/ResourceLabelEvents';
import type {
GitlabAPIResponse,
PaginationRequestOptions,
PaginationTypes,
ShowExpanded,
Sudo,
} from '../infrastructure';
export interface MergeRequestLabelEvents<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
mergerequestIId: number,
options?: Sudo & ShowExpanded<E> & PaginationRequestOptions<P>,
): Promise<GitlabAPIResponse<LabelEventSchema[], C, E, P>>;
show<E extends boolean = false>(
projectId: string | number,
mergerequestIId: number,
labelEventId: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<LabelEventSchema, C, E, void>>;
}
export class MergeRequestLabelEvents<C extends boolean = false> extends ResourceLabelEvents<C> {
constructor(options: BaseResourceOptions<C>) {
/* istanbul ignore next */
super('projects', 'merge_requests', options);
}
}