/** * Workflow orchestration package * Supports both Temporal and AWS Step Functions */ // Export temporal types (these are the primary types) export * from './temporal'; // Step-functions types conflict with temporal, so we only export the client export { getStepFunctionsWorkflowClient, } from './step-functions'; export type WorkflowProvider = 'temporal' | 'step-functions'; export interface WorkflowClient { startCredentialIssuanceWorkflow(input: unknown): Promise; getWorkflowStatus(workflowId: string): Promise; cancelWorkflow?(workflowId: string): Promise; stopWorkflow?(workflowId: string, error?: string): Promise; } /** * Get workflow client based on provider */ export function getWorkflowClient(provider: WorkflowProvider = 'temporal'): WorkflowClient { if (provider === 'step-functions') { const { getStepFunctionsWorkflowClient } = require('./step-functions'); return getStepFunctionsWorkflowClient(); } else { const { getTemporalWorkflowClient } = require('./temporal'); return getTemporalWorkflowClient(); } }