import jwt from 'jsonwebtoken' ; import { AnyEventObject , Machine , MachineConfig , StateMachine , Typestate } from 'xstate' ; import { WorkflowEvent } from '../types' ; import { taskCreator , transformerInvoke } from './task' ; export function getMachine ( config , secret , signOptions ) { return Machine ( config , { services : { task : taskCreator ( secret , signOptions ) , transform : transformerInvoke } } ) ; }