import { BaseResource } from '@gitbeaker/requester-utils' ; import { RequestHelper , Sudo } from '../infrastructure' ; export interface LicenseSchema extends Record < string , unknown > { id : number ; plan : string ; created_at : string ; starts_at : string ; expires_at : string ; historical_max : number ; maximum_user_count : number ; expired : boolean ; overage : number ; user_limit : number ; active_users : number ; licensee : { Name : string ; } ; add_ons : { GitLab_FileLocks : number ; GitLab_Auditor_User : number ; } ; } export class License < C extends boolean = false > extends BaseResource < C > { add ( license , options ? ) { return RequestHelper . post < LicenseSchema > ( ) ( this , 'license' , { license , ... options } ) ; } all ( options ? ) { return RequestHelper . get < LicenseSchema [ ] > ( ) ( this , 'licenses' , options ) ; } show ( options ? ) { return RequestHelper . get < LicenseSchema > ( ) ( this , 'license' , options ) ; } remove ( licenceId , options ? ) { return RequestHelper . del < LicenseSchema > ( ) ( this , `license/${ licenceId }` , options ) ; } }