import { BaseResource } from '@gitbeaker/requester-utils' ; import { BaseRequestOptions , endpoint , PaginatedRequestOptions , RequestHelper , Sudo , } from '../infrastructure' ; export interface WikiSchema extends Record < string , unknown > { content : string ; format : string ; slug : string ; title : string ; } export class Wikis < C extends boolean = false > extends BaseResource < C > { all ( projectId , options ? ) { return RequestHelper . get < WikiSchema [ ] > ( ) ( this , endpoint `projects/${ projectId }/wikis` , options ) ; } create ( projectId , options ? ) { return RequestHelper . post < WikiSchema > ( ) ( this , endpoint `projects/${ projectId }/wikis` , options ) ; } edit ( projectId , slug , options ? ) { return RequestHelper . put < WikiSchema > ( ) ( this , endpoint `projects/${ projectId }/wikis/${ slug }` , options ) ; } show ( projectId , slug , options ? ) { return RequestHelper . get < WikiSchema > ( ) ( this , endpoint `projects/${ projectId }/wikis/${ slug }` , options ) ; } remove ( projectId , slug , options ? ) { return RequestHelper . del ( ) ( this , endpoint `projects/${ projectId }/wikis/${ slug }` , options ) ; } }