forked from jdalrymple/gitbeaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IssueAwardEmojis.ts
46 lines (41 loc) · 1.49 KB
/
IssueAwardEmojis.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import type { BaseResourceOptions } from '@gitbeaker/requester-utils';
import { ResourceAwardEmojis } from '../templates';
import type { AwardEmojiSchema } from '../templates/ResourceAwardEmojis';
import type {
GitlabAPIResponse,
PaginationRequestOptions,
PaginationTypes,
ShowExpanded,
Sudo,
} from '../infrastructure';
export interface IssueAwardEmojis<C extends boolean = false> extends ResourceAwardEmojis<C> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
issueIId: number,
options?: PaginationRequestOptions<P> & Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<AwardEmojiSchema[], C, E, P>>;
award<E extends boolean = false>(
projectId: string | number,
issueIId: number,
name: string,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<AwardEmojiSchema, C, E, void>>;
remove<E extends boolean = false>(
projectId: string | number,
issueIId: number,
awardId: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<void, C, E, void>>;
show<E extends boolean = false>(
projectId: string | number,
issueIId: number,
awardId: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<AwardEmojiSchema, C, E, void>>;
}
export class IssueAwardEmojis<C extends boolean = false> extends ResourceAwardEmojis<C> {
constructor(options: BaseResourceOptions<C>) {
/* istanbul ignore next */
super('projects', 'issues', options);
}
}