import { EvaluateFlagsRequest , EvaluateFlagsResponse } from '../../protocol/actions' ; import { Action } from '../action' ; import { CheckRequestResult } from '../checkrequestresult' ; import { FlagEvaluator } from '../flagevaluator' ; export class EvaluateFlagsAction implements Action < EvaluateFlagsRequest , EvaluateFlagsResponse > { checkRequest ( ) { return Promise . resolve ( { success : true } ) ; } do ( ) { return Promise . resolve ( { evaluatedFlags : FlagEvaluator . evaluateAllFlags ( ) } ) ; } }