import { BaseResource } from '@gitbeaker/requester-utils' ; import { BaseRequestOptions , PaginatedRequestOptions , RequestHelper , Sudo , } from '../infrastructure' ; export interface SystemHookSchema extends Record < string , unknown > { id : number ; url : string ; created_at : string ; push_events : boolean ; tag_push_events : boolean ; merge_requests_events : boolean ; repository_update_events : boolean ; enable_ssl_verification : boolean ; } export class SystemHooks < C extends boolean = false > extends BaseResource < C > { add ( url , options ? ) { return RequestHelper . post < SystemHookSchema > ( ) ( this , 'hooks' , { url , ... options } ) ; } all ( options ? ) { return RequestHelper . get < SystemHookSchema [ ] > ( ) ( this , 'hooks' , options ) ; } edit ( hookId , url , options ? ) { return RequestHelper . put < SystemHookSchema > ( ) ( this , `hooks/${ hookId }` , { url , ... options } ) ; } remove ( hookId , options ? ) { return RequestHelper . del ( ) ( this , `hooks/${ hookId }` , options ) ; } }