import { IScopedClusterClient } from 'src/core/server' ; import { LicensingPluginStart } from '../../../licensing/server' ; interface StartBasicArg { acknowledge : boolean ; client : IScopedClusterClient ; licensing : LicensingPluginStart ; } export async function startBasic ( { acknowledge , client , licensing } ) { try { const { body : response } = await client . asCurrentUser . license . postStartBasic ( { acknowledge } ) ; const { basic_was_started : basicWasStarted } = response ; if ( basicWasStarted ) { await licensing . refresh ( ) ; } return response ; } catch ( error ) { return error . body ; } }