import { BaseResource } from '@gitbeaker/requester-utils' ; import { BaseRequestOptions , RequestHelper , Camelize , endpoint } from '../infrastructure' ; export interface FreezePeriodSchema extends Record < string , unknown > { id : number ; freeze_start : string ; freeze_end : string ; cron_timezone : string ; created_at : string ; updated_at : string ; } export class FreezePeriods < C extends boolean = false > extends BaseResource < C > { all ( projectId , options ? ) { return RequestHelper . get < FreezePeriodSchema [ ] > ( ) ( this , endpoint `projects/${ projectId }/freeze_periods` , options ) ; } show ( projectId , freezePeriodId , options ? ) { return RequestHelper . get < FreezePeriodSchema > ( ) ( this , endpoint `projects/${ projectId }/freeze_periods/${ freezePeriodId }` , options ) ; } create ( projectId , freezeStart , freezeEnd , options ? ) { return RequestHelper . post < FreezePeriodSchema > ( ) ( this , endpoint `projects/${ projectId }/freeze_periods` , { freezeStart , freezeEnd , ... options , } ) ; } edit ( projectId , freezePeriodId , options ? ) { return RequestHelper . put < FreezePeriodSchema > ( ) ( this , endpoint `projects/${ projectId }/freeze_periods/${ freezePeriodId }` , options ) ; } delete ( projectId , freezePeriodId , options ? ) { return RequestHelper . del ( ) ( this , endpoint `projects/${ projectId }/freeze_periods/${ freezePeriodId }` , options ) ; } }