import { BaseResource } from '@gitbeaker/requester-utils'; import { RequestHelper } from '../infrastructure'; import type { GitlabAPIResponse, PaginationRequestOptions, PaginationTypes, ShowExpanded, Sudo, } from '../infrastructure'; export interface ApplicationSchema extends Record { id: number; application_id: string; application_name: string; secret: string; callback_url: string; confidential: boolean; } export class Applications extends BaseResource { all( options?: PaginationRequestOptions

& Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()(this, 'applications', options); } create( name: string, redirectUri: string, scopes: string, options?: { confidential?: boolean } & Sudo & ShowExpanded, ): Promise> { return RequestHelper.post()(this, 'applications', { name, redirectUri, scopes, ...options, }); } remove( applicationId: number, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.del()(this, `applications/${applicationId}`, options); } }