import { IFlowTracingAttrProps } from '../flowTrace'; import { GetDataConfigRequest } from './api/getDataConfig'; import { GetFlowDefinitionChoseListRequest, GetFlowDefinitionChoseListResponse } from './api/getFlowDefinitionChoseList'; import { GetPushBillDataRequest, GetPushBillDataResponse } from './api/getPushBillData'; import { GetPushConversionListRequest } from './api/getPushConversionList'; import { GetTreeHelpInfoRequest, GetTreeHelpInfoResponse } from './api/getTreeHelpInfo'; import { MappingAllDataRequest } from './api/mappingAllData'; import { PushBillForOpenRequest, PushBillForOpenResponse } from './api/pushBillForOpen'; export type ArrayReturnType = [boolean, T]; /** * 业务流 参数 */ export interface GetFlowParmas extends GetFlowDefinitionChoseListRequest { /** 标题 */ title?: string; } /** * 业务流 返回 */ export type GetFlowReturn = ArrayReturnType; /** * 获取数据源 参数 */ export interface GetSourceParams extends GetTreeHelpInfoRequest { /** 标题 */ title?: string; } /** * 获取数据源 返回 */ export type GetSourceReturn = ArrayReturnType[number] | null>; /** * 获取数据 参数 */ export interface GetDataParams extends GetDataConfigRequest { /** 流程编码 */ flowCode: string; /** 业务表头数据 */ configMap?: Record; /** 标题 */ title?: string; /** 默认引用来源表主键集合 */ defaultSelectedKeys?: string[]; } /** * 获取数据 返回 */ export type GetDataReturn = ArrayReturnType | null>; /** * 生成目的单 参数 */ export interface PushBillParams extends Omit, Partial>, Omit { /** 流程编码 */ flowCode?: string; /** 合同类型 */ contractTypes?: string; /** 标题 */ title?: string; } /** * 生成目的单 返回 */ export type PushBillReturn = ArrayReturnType | null>; /** * 获取推单数据 参数 */ export type GetPushBillDataParams = GetPushBillDataRequest; /** * 获取推单数据 返回 */ export type GetPushBillDataReturn = ArrayReturnType | null>; /** * 业务流查看 参数 */ export type ShowFlowInstanceParams = IFlowTracingAttrProps; /** * 业务流查看 返回 */ export type ShowFlowInstanceReturn = ArrayReturnType; /** * 获取当前流程下所有映射数据 参数 */ export type MappingAllDataParasms = MappingAllDataRequest; /** * 获取当前流程下所有映射数据 返回 */ export type MappingAllDataReturn = ArrayReturnType[] | null>; /** * 业务流 API */ export interface IMPAPI { /** 获取业务流 */ getFlow: (params: GetFlowParmas) => Promise; /** 获取数据源 */ getSource: (params: GetSourceParams) => Promise; /** 获取数据 */ getData: (params: GetDataParams) => Promise; /** 生成目的单 */ pushBill: (params: PushBillParams) => Promise; /** 获取推单数据 */ getPushBillData: (params: GetPushBillDataParams) => Promise; /** 业务流查看 */ showFlowInstance: (params: ShowFlowInstanceParams) => Promise; /** 获取当前流程下所有映射数据 */ mappingAllData: (params: MappingAllDataParasms) => Promise; }