@jss-rule-engine/workflow
Version:
25 lines (24 loc) • 1.79 kB
TypeScript
import { RAGItem } from './databaseService';
import { Workflow, WorkflowState, WorkflowExecutionContext, WorkflowServiceOptions, IWorkflowService, WorkflowExecutionResult, WorkflowExecutionOptions, WorkflowScheduledTaskParams, WorkflowAction, WorkflowTrigger } from './workflowTypes';
export declare class WorkflowService implements IWorkflowService {
private workflows;
private databaseService;
private options;
constructor(options: WorkflowServiceOptions);
findRelevantEmbeddings(data: string, indexId: string, topN: number, thresold: number): Promise<RAGItem[]>;
addScheduledTask(params: WorkflowScheduledTaskParams): Promise<void>;
getWorkflow(workflowId: string): Workflow | null;
init(): Promise<void>;
load(workflowConfig: Workflow): Promise<void>;
addVisitorToState(workflowId: string, stateId: string, visitorId: string): Promise<void>;
executeTriggers(options: WorkflowExecutionOptions): Promise<WorkflowExecutionResult>;
executeActions(visitorId: string, workflowExecutionContext: WorkflowExecutionContext, state: WorkflowState): Promise<void>;
executeAction(visitorId: string, action: WorkflowAction, workflowExecutionContext: WorkflowExecutionContext): Promise<void>;
removeVisitorFromWorkflow(visitorId: string, workflowId: string): Promise<void>;
changeVisitorState(visitorId: string, workflowId: string, nextStateId: string, context: WorkflowExecutionContext): Promise<void>;
getStateVisitors(workflowId: string, stateId: string): Promise<string[]>;
parseGraphQLResponse(response: any): Promise<Workflow>;
parseWorkflowItem(child: any): WorkflowAction | WorkflowTrigger | null;
getSitecoreQuery(path: string, language: string): Promise<string>;
}
export default WorkflowService;