import { ChoiceRequest } from "../models"; import { Step } from "./step"; /** * Execute given step * @returns true if there is no more campaign in the list. false otherwise. */ export async function executeStep(step: Step, request: ChoiceRequest): Promise { await step.execute(request); return !request.campaigns.length; }