import { EdgeDataDefinition } from 'cytoscape'; import { ReadonlyExtendedActivity, ReadonlyExtendedLink } from './extended-activity'; export type Variable = Readonly<{ name: string; description?: string; id?: string; type: string; value: any; isSecure?: boolean; isCAD?: boolean; desktopLabel?: string; isAgentEditable?: boolean; source?: string; isReportable?: boolean; overwrite?: boolean; isExternalized?: boolean; resourceType?: string; hints?: string[]; isParameter?: boolean; metaAttributes?: number; usedByWfIds?: number[]; }>; export type Resources = Readonly<{ aefFile?: string; audioFiles?: string[]; audioFilesCount?: number; generatedAt?: string; variableCount?: number; variables?: Variable[]; }>; export interface IWxCCJSON { readonly schema: string; readonly aefFile: string; readonly generatedAt: string; readonly activities: ReadonlyExtendedActivity[]; readonly links: ReadonlyExtendedLink[]; readonly prefix?: string; readonly resources?: Resources; readonly warnings?: any[]; } type WithLabel = { label: string; }; export type WxCCFlowchartNode = { data: ReadonlyExtendedActivity & WithLabel; }; export type WxCCFlowchartEdge = { data: ReadonlyExtendedLink & EdgeDataDefinition & WithLabel; }; export interface IWxCCFlowchart { readonly flowId?: string; readonly flowName?: string; readonly nodes: WxCCFlowchartNode[]; readonly edges: WxCCFlowchartEdge[]; } export type NonIRActivityGroup = 'start' | 'end' | 'terminating-action' | 'action' | 'enum-gateway' | 'boolean-gateway' | 'unmapped' | string; export type NonIRWidgetType = 'activity' | 'link' | string; export type NonIRWidgetNodeType = 'start' | 'end' | 'terminating-action' | 'action' | 'enum-gateway' | 'boolean-gateway' | 'unmapped' | string; export type NonIRActivity = Readonly<{ id: string; group: NonIRActivityGroup; name: string; properties: Record; }>; export type NonIRLink = { id: string; sourceActivityId: string; targetActivityId: string; sourceId?: string; targetId?: string; conditionExpr?: string; properties: Record; }; export type NonIRPoint = Readonly<{ x: number; y: number; }>; export type NonIRWidget = Readonly<{ id: string; type: NonIRWidgetNodeType | 'arrow'; widgetType: NonIRWidgetType; label?: string; point?: NonIRPoint; ports?: Array>; properties?: Record; points?: Array>; sourcePort?: Record; targetPort?: Record; }>; export type NonIRProcess = Readonly<{ activities: Record; links: NonIRLink[]; }>; export type NonIRDiagram = Readonly<{ widgets: Record; properties?: { offsetX?: number; offsetY?: number; zoom?: number; gridSize?: number; [key: string]: any; }; }>; export type NonIREventFlow = Readonly<{ id: string; name?: string; description?: string; process: NonIRProcess; onEvents?: Record; diagram?: NonIRDiagram; }>; export type NonIREventFlows = Readonly<{ eventsMap: Record; properties?: Record; __typename?: string; }>; export type NonIRVariableOrders = Readonly>>; export type NonIRSetting = Readonly<{ name: string; value: string; type: string; group: string; __typename?: string; }>; export interface IWxCCNonIRJSON { readonly orgId?: string; readonly version?: number; readonly id?: string; readonly flowType?: string; readonly name?: string; readonly description?: string; readonly comment?: string | null; readonly variables?: Variable[]; readonly process: NonIRProcess; readonly diagram?: NonIRDiagram; readonly variableOrders?: NonIRVariableOrders; readonly eventFlows?: NonIREventFlows; readonly runtimeVariables?: any[]; readonly validating?: boolean; readonly persist?: boolean; readonly validationResults?: any[]; readonly createdBy?: string; readonly createdDate?: string; readonly lastModifiedBy?: string; readonly lastModifiedDate?: string; readonly settings?: NonIRSetting[]; readonly __typename?: string; readonly [key: string]: any; } export type WxCCSyncDocuments = Readonly<{ ir: IWxCCJSON; nonIr: IWxCCNonIRJSON; }>; export interface IWxCCSyncMapper { toIR(nonIr: IWxCCNonIRJSON): IWxCCJSON; toNonIR(ir: IWxCCJSON, baselineNonIr: IWxCCNonIRJSON): IWxCCNonIRJSON; } export {};