-
-
Notifications
You must be signed in to change notification settings - Fork 297
/
IssueStateEvents.ts
32 lines (29 loc) · 1.06 KB
/
IssueStateEvents.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 { ResourceStateEvents } from '../templates';
import type { StateEventSchema } from '../templates/ResourceStateEvents';
import type {
GitlabAPIResponse,
PaginationRequestOptions,
PaginationTypes,
ShowExpanded,
Sudo,
} from '../infrastructure';
export interface IssueStateEvents<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
issueIId: number,
options?: Sudo & ShowExpanded<E> & PaginationRequestOptions<P>,
): Promise<GitlabAPIResponse<StateEventSchema[], C, E, P>>;
show<E extends boolean = false>(
projectId: string | number,
issueIId: number,
stateEventId: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<StateEventSchema, C, E, void>>;
}
export class IssueStateEvents<C extends boolean = false> extends ResourceStateEvents<C> {
constructor(options: BaseResourceOptions<C>) {
/* istanbul ignore next */
super('projects', 'issues', options);
}
}