import type { BaseResourceOptions } from '@gitbeaker/requester-utils'; import type { BaseRequestSearchParams, GitlabAPIResponse, OneOf, PaginationRequestOptions, PaginationTypes, ShowExpanded, Sudo, } from '../infrastructure'; import type { InvitationSchema, InvitationResponseSchema, UpdateInvitationResponseSchema, } from '../templates/ResourceInvitations'; import { AccessLevel } from '../constants'; import { ResourceInvitations } from '../templates'; export interface ProjectInvitations { add( projectId: string | number, accessLevel: Exclude, options: { expiresAt?: string; inviteSource?: string; tasksToBeDone?: string[]; tasksProjectId?: number; } & OneOf<{ email: string; userId: string }> & ShowExpanded & Sudo, ): Promise>; all( projectId: string | number, options?: { query?: string } & BaseRequestSearchParams & PaginationRequestOptions

& ShowExpanded & Sudo, ): Promise>; edit( projectId: string | number, email: string, options?: { expiresAt?: string; accessLevel?: Exclude; } & ShowExpanded & Sudo, ): Promise>; remove( projectId: string | number, email: string, options?: ShowExpanded & Sudo, ): Promise>; } export class ProjectInvitations extends ResourceInvitations { constructor(options: BaseResourceOptions) { /* istanbul ignore next */ super('projects', options); } }