import { BaseResource } from '@gitbeaker/requester-utils'; import { RequestHelper, endpoint } from '../infrastructure'; import type { GitlabAPIResponse, PaginationRequestOptions, PaginationTypes, ShowExpanded, Sudo, } from '../infrastructure'; import { AccessLevel } from '../constants'; // Documentation: https://docs.gitlab.com/api/groups/#ldap-group-links export class GroupLDAPLinks extends BaseResource { add( groupId: string | number, groupAccess: number, provider: string, options?: { cn?: string; groupAccess?: Exclude } & Sudo & ShowExpanded, ): Promise> { return RequestHelper.post()(this, endpoint`groups/${groupId}/ldap_group_links`, { groupAccess, provider, ...options, }); } all( groupId: string | number, options: PaginationRequestOptions

& Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`groups/${groupId}/ldap_group_links`, options, ); } remove( groupId: string | number, provider: string, options?: { cn?: string; filter?: string } & Sudo & ShowExpanded, ): Promise> { return RequestHelper.del()(this, endpoint`groups/${groupId}/ldap_group_links`, { provider, ...options, }); } sync(groupId: string | number, options?: Sudo & ShowExpanded) { return RequestHelper.post()(this, endpoint`groups/${groupId}/ldap_sync`, options); } }