-
-
Notifications
You must be signed in to change notification settings - Fork 301
/
Copy pathGroupIssueBoards.ts
96 lines (84 loc) · 2.99 KB
/
GroupIssueBoards.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import type { BaseResourceOptions } from '@gitbeaker/requester-utils';
import { ResourceIssueBoards } from '../templates';
import { IssueBoardListSchema, IssueBoardSchema } from '../templates/ResourceIssueBoards';
import type {
GitlabAPIResponse,
PaginationRequestOptions,
PaginationTypes,
ShowExpanded,
Sudo,
} from '../infrastructure';
import type { CondensedGroupSchema } from './Groups';
export interface GrouptIssueBoardSchema extends IssueBoardSchema {
group: CondensedGroupSchema;
}
export interface GroupIssueBoards<C extends boolean = false> extends ResourceIssueBoards<C> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
groupId: string | number,
options?: PaginationRequestOptions<P> & Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<GrouptIssueBoardSchema[], C, E, P>>;
allLists<E extends boolean = false>(
resourceId: string | number,
boardId: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<IssueBoardListSchema[], C, E, void>>;
create<E extends boolean = false>(
groupId: string | number,
name: string,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<GrouptIssueBoardSchema, C, E, void>>;
createList<E extends boolean = false>(
groupId: string | number,
boardId: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<IssueBoardListSchema, C, E, void>>;
edit<E extends boolean = false>(
groupId: string | number,
boardId: number,
options?: {
hideBacklogList?: boolean;
hideClosedList?: boolean;
name?: string;
assigneeId?: number;
milestoneId?: number;
labels?: string;
weight?: number;
} & Sudo &
ShowExpanded<E>,
): Promise<GitlabAPIResponse<GrouptIssueBoardSchema, C, E, void>>;
editList<E extends boolean = false>(
groupId: string | number,
boardId: number,
listId: number,
position: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<IssueBoardListSchema, C, E, void>>;
remove<E extends boolean = false>(
groupId: string | number,
boardId: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<void, C, E, void>>;
removeList<E extends boolean = false>(
groupId: string | number,
boardId: number,
listId: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<void, C, E, void>>;
show<E extends boolean = false>(
groupId: string | number,
boardId: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<GrouptIssueBoardSchema, C, E, void>>;
showList<E extends boolean = false>(
groupId: string | number,
boardId: number,
listId: number,
options?: Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<IssueBoardListSchema, C, E, void>>;
}
export class GroupIssueBoards<C extends boolean = false> extends ResourceIssueBoards<C> {
constructor(options: BaseResourceOptions<C>) {
/* istanbul ignore next */
super('groups', options);
}
}