import type { CoreService } from '../../types' ; import type { HttpStart } from '../http' ; import { DeprecationsClient , ResolveDeprecationResponse } from './deprecations_client' ; import type { DomainDeprecationDetails } from '../../server/types' ; public export interface DeprecationsServiceStart { /**
     * Grabs deprecations details for all domains.
     */ getAllDeprecations : ( ) => Promise < DomainDeprecationDetails [ ] > ; param { string } domainId getDeprecations : ( domainId : string ) => Promise < DomainDeprecationDetails [ ] > ; param { DomainDeprecationDetails } details isDeprecationResolvable : ( details : DomainDeprecationDetails ) => boolean ; param { DomainDeprecationDetails } details resolveDeprecation : ( details : DomainDeprecationDetails ) => Promise < ResolveDeprecationResponse > ; } export class DeprecationsService implements CoreService < void , DeprecationsServiceStart > { public setup ( ) { } public start ( { http } ) { const deprecationsClient = new DeprecationsClient ( { http } ) ; return { getAllDeprecations : deprecationsClient . getAllDeprecations , getDeprecations : deprecationsClient . getDeprecations , isDeprecationResolvable : deprecationsClient . isDeprecationResolvable , resolveDeprecation : deprecationsClient . resolveDeprecation , } ; } public stop ( ) { } }