import { BaseResource } from '@gitbeaker/requester-utils' ; import { BaseRequestOptions , endpoint , PaginatedRequestOptions , RequestHelper , Sudo , } from '../infrastructure' ; export interface PagesDomainSchema extends Record < string , unknown > { domain : string ; url : string ; project_id : number ; auto_ssl_enabled : boolean ; certificate : { expired : boolean ; expiration : string ; } ; } export class PagesDomains < C extends boolean = false > extends BaseResource < C > { all ( { projectId , ... options } = { } ) { const url = projectId ? endpoint `projects/${ projectId }/` : '' ; return RequestHelper . get < PagesDomainSchema [ ] > ( ) ( this , `${ url }pages/domains` , options ) ; } create ( projectId , domain , options ? ) { return RequestHelper . post < PagesDomainSchema > ( ) ( this , endpoint `projects/${ projectId }/pages/domains` , { domain , ... options , } ) ; } edit ( projectId , domain , options ? ) { return RequestHelper . put < PagesDomainSchema > ( ) ( this , endpoint `projects/${ projectId }/pages/domains/${ domain }` , options ) ; } show ( projectId , domain , options ? ) { return RequestHelper . get < PagesDomainSchema > ( ) ( this , endpoint `projects/${ projectId }/pages/domains/${ domain }` , options ) ; } remove ( projectId , domain , options ? ) { return RequestHelper . del ( ) ( this , endpoint `projects/${ projectId }/pages/domains/${ domain }` , options ) ; } }