UNPKG

1.98 kBTypeScriptView Raw
1import { BaseRequestOptions, BaseService, PaginatedRequestOptions, Sudo } from '../infrastructure';
2import { ProjectSchema } from './Projects';
3export interface GroupSchema {
4 id: number;
5 web_url: string;
6 name: string;
7 path: string;
8 description: string;
9 visibility: string;
10 share_with_group_lock: boolean;
11 require_two_factor_authentication: boolean;
12 two_factor_grace_period: number;
13 project_creation_level: string;
14 auto_devops_enabled?: boolean;
15 subgroup_creation_level: string;
16 emails_disabled?: boolean;
17 lfs_enabled: boolean;
18 avatar_url: string;
19 request_access_enabled: boolean;
20 full_name: string;
21 full_path: string;
22 parent_id?: number;
23}
24export interface GroupDetailSchema extends GroupSchema {
25 projects: ProjectSchema[];
26 shared_projects: ProjectSchema[];
27 runners_token: string;
28}
29export declare class Groups extends BaseService {
30 all(options?: PaginatedRequestOptions): Promise<GroupSchema[]>;
31 create(options?: BaseRequestOptions): Promise<object>;
32 createLDAPLink(groupId: string | number, cn: any, groupAccess: any, provider: string, options?: Sudo): Promise<object>;
33 edit(groupId: string | number, options?: BaseRequestOptions): Promise<object>;
34 projects(groupId: string | number, options?: BaseRequestOptions): Promise<ProjectSchema[]>;
35 remove(groupId: string | number, options?: Sudo): Promise<object>;
36 removeLDAPLink(groupId: string | number, cn: any, { provider, ...options }?: Sudo & {
37 provider?: string;
38 }): Promise<object>;
39 search(nameOrPath: string, options?: Sudo): Promise<import("../infrastructure").GetResponse>;
40 show(groupId: string | number, options?: BaseRequestOptions): Promise<GroupDetailSchema>;
41 subgroups(groupId: string | number, options?: PaginatedRequestOptions): Promise<GroupDetailSchema[]>;
42 syncLDAP(groupId: string | number, options?: Sudo): Promise<object>;
43}