import { BaseResource } from '@gitbeaker/requester-utils'; import { RequestHelper, endpoint } from '../infrastructure'; import type { GitlabAPIResponse, PaginationRequestOptions, PaginationTypes, ShowExpanded, Sudo, } from '../infrastructure'; import { AccessLevel } from '../constants'; export interface SAMLGroupSchema extends Record { name: string; access_level: number; } export class GroupSAMLLinks extends BaseResource { all( groupId: string | number, options: PaginationRequestOptions

& Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`groups/${groupId}/saml_group_links`, options, ); } create( groupId: string | number, samlGroupName: string, accessLevel: Exclude, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.post()( this, endpoint`groups/${groupId}/saml_group_links`, { accessLevel, samlGroupName, ...options, }, ); } remove( groupId: string | number, samlGroupName: string, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.del()( this, endpoint`groups/${groupId}/saml_group_links/${samlGroupName}`, options, ); } show( groupId: string | number, samlGroupName: string, options: Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`groups/${groupId}/saml_group_links/${samlGroupName}`, options, ); } }