nl_tokens: Set metadata on a service based on the given action object .
pl_tokens: async function setMeta ( { payload , meta } , { getService } ) { debug ( 'Action: SET_META' ) const { service : serviceId , meta : metaAttrs , endpoint } = payload const id = ` ${ serviceId } ` const service = getService ( null , serviceId ) if ( ! service ) { debug ( ` ${ serviceId } ` ) return createError ( ` ${ serviceId } ` ) } const type = <mask> . meta const metaService = getService ( type ) if ( ! metaService ) { debug ( ` ${ service . id } ${ service . meta } ` ) return { status : 'noaction' } } const endpointDebug = ( endpoint ) ? ` ${ endpoint } ` : ` ${ type } ${ id } ` debug ( 'SET_META: Send metadata %o for service \'%s\' on service \'%s\' %s' , metaAttrs , service . id , metaService . id , endpointDebug ) const data = { id , type , attributes : metaAttrs } const { response } = await metaService . send ( { type : 'SET' , payload : { keys : Object . keys ( metaAttrs ) , type , id , data , endpoint , onlyMappedValues : true } , meta : { ident : meta . ident } } ) return response }