@blueking/bkflow-canvas-editor 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -30
- package/dist/advanced.d.ts +25 -15
- package/dist/index.cjs.js +37 -37
- package/dist/index.d.ts +34 -17
- package/dist/index.esm.js +15909 -15357
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -641,6 +641,33 @@ interface DrawPipelineParams {
|
|
|
641
641
|
gateway_size?: [number, number];
|
|
642
642
|
start?: [number, number];
|
|
643
643
|
}
|
|
644
|
+
interface CreateFlowTaskResult {
|
|
645
|
+
data: {
|
|
646
|
+
id: number;
|
|
647
|
+
template_id: number;
|
|
648
|
+
[key: string]: unknown;
|
|
649
|
+
};
|
|
650
|
+
[key: string]: unknown;
|
|
651
|
+
}
|
|
652
|
+
interface ExecuteFlowTaskResult {
|
|
653
|
+
result?: boolean;
|
|
654
|
+
code?: number;
|
|
655
|
+
data?: {
|
|
656
|
+
/** 任务详情页跳转地址(含正确的 bkflow task id 与 templateId) */
|
|
657
|
+
url?: string;
|
|
658
|
+
[key: string]: unknown;
|
|
659
|
+
};
|
|
660
|
+
message?: string | null;
|
|
661
|
+
request_id?: string;
|
|
662
|
+
trace_id?: string | null;
|
|
663
|
+
[key: string]: unknown;
|
|
664
|
+
}
|
|
665
|
+
interface FlowTaskExecuteSuccessResult {
|
|
666
|
+
/** createFlowTask(create_task)接口响应 */
|
|
667
|
+
createResult: CreateFlowTaskResult;
|
|
668
|
+
/** executeFlowTask(operate_task)接口响应,data.url 用于任务详情跳转 */
|
|
669
|
+
executeResult: ExecuteFlowTaskResult;
|
|
670
|
+
}
|
|
644
671
|
|
|
645
672
|
interface FlowViewApiConfig {
|
|
646
673
|
fetchFlowDetail: (id: string) => Promise<FlowTemplate>;
|
|
@@ -675,19 +702,14 @@ interface FlowViewApiConfig {
|
|
|
675
702
|
name: string;
|
|
676
703
|
creator: string;
|
|
677
704
|
constants: Record<string, any>;
|
|
678
|
-
}) => Promise<
|
|
679
|
-
data: {
|
|
680
|
-
id: number;
|
|
681
|
-
template_id: number;
|
|
682
|
-
};
|
|
683
|
-
}>;
|
|
705
|
+
}) => Promise<CreateFlowTaskResult>;
|
|
684
706
|
executeFlowTask?: (params: {
|
|
685
707
|
task_id: number;
|
|
686
708
|
action: string;
|
|
687
709
|
resource_type: string;
|
|
688
710
|
resource_id: number;
|
|
689
711
|
permission_type: string;
|
|
690
|
-
}) => Promise<
|
|
712
|
+
}) => Promise<ExecuteFlowTaskResult>;
|
|
691
713
|
fetchControlConfig?: () => Promise<Record<string, any>>;
|
|
692
714
|
checkSpaceConfig?: (scopeValue: number, params: {
|
|
693
715
|
name: string;
|
|
@@ -730,19 +752,14 @@ interface FlowEditApiConfig extends FlowViewApiConfig {
|
|
|
730
752
|
name: string;
|
|
731
753
|
creator: string;
|
|
732
754
|
constants: Record<string, any>;
|
|
733
|
-
}) => Promise<
|
|
734
|
-
data: {
|
|
735
|
-
id: number;
|
|
736
|
-
template_id: number;
|
|
737
|
-
};
|
|
738
|
-
}>;
|
|
755
|
+
}) => Promise<CreateFlowTaskResult>;
|
|
739
756
|
executeFlowTask?: (params: {
|
|
740
757
|
task_id: number;
|
|
741
758
|
action: string;
|
|
742
759
|
resource_type: string;
|
|
743
760
|
resource_id: number;
|
|
744
761
|
permission_type: string;
|
|
745
|
-
}) => Promise<
|
|
762
|
+
}) => Promise<ExecuteFlowTaskResult>;
|
|
746
763
|
}
|
|
747
764
|
|
|
748
765
|
type __VLS_Props$5 = {
|
|
@@ -878,7 +895,7 @@ type __VLS_Props$3 = {
|
|
|
878
895
|
editable?: boolean;
|
|
879
896
|
showFlowEntry?: boolean;
|
|
880
897
|
apiConfig: FlowApiConfig;
|
|
881
|
-
onExecuteSuccess?: (
|
|
898
|
+
onExecuteSuccess?: (result: FlowTaskExecuteSuccessResult) => void;
|
|
882
899
|
bkflowSaasUrl?: string;
|
|
883
900
|
};
|
|
884
901
|
declare const __VLS_export$3: vue.DefineComponent<__VLS_Props$3, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
@@ -1068,7 +1085,7 @@ type __VLS_Props$1 = {
|
|
|
1068
1085
|
showHeaderActions?: boolean;
|
|
1069
1086
|
defaultZoom?: number;
|
|
1070
1087
|
bkflowSaasUrl?: string;
|
|
1071
|
-
onExecuteSuccess?: (
|
|
1088
|
+
onExecuteSuccess?: (result: FlowTaskExecuteSuccessResult) => void;
|
|
1072
1089
|
};
|
|
1073
1090
|
declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1074
1091
|
back: () => any;
|
|
@@ -1340,4 +1357,4 @@ declare const _default: {
|
|
|
1340
1357
|
};
|
|
1341
1358
|
|
|
1342
1359
|
export { _default$1 as BkFlowCanvas, BkFlowModelAccessor, BkFlowNodeAccessor, _default$4 as FlowCreateTask, _default$6 as FlowDebug, _default$3 as FlowEdit, _default$5 as FlowExecute, _default$2 as FlowView, bkflowConnectionValidator, createBkflowPlugin, createBkflowSchema, createExecutionStatusPlugin, _default as default, exportToPipelineTree, generateId, getUniformApiPluginFormValue, getVariableDefaultConfig, importFromPipelineTree, provideFlowApiConfig, provideSelectPanelConfig, random4, resolveExecutionActions, useFlowApiConfig, useFlowEditApiConfig, useFlowViewApiConfig, useSelectPanelConfig, validatePipelineTree };
|
|
1343
|
-
export type { Activity, DndNodeItem, ExecutionNodeAction, FlowApiConfig, FlowEditExpose, FlowTemplate, Gateway, GatewayCondition, NodeExecutionState, NodeExecutionStatus, NotifyConfig, PipelineTree, PluginDetailCommon, PluginInputDataItem, SelectPanelConfig, SpaceFlowConfig, TaskExecutionStates, TemplateConfigs, TriggerCron, TriggerItem, UniformApiPluginInputsItem, UpdateFlowParams, Variable, VariableReference };
|
|
1360
|
+
export type { Activity, CreateFlowTaskResult, DndNodeItem, ExecuteFlowTaskResult, ExecutionNodeAction, FlowApiConfig, FlowEditExpose, FlowTaskExecuteSuccessResult, FlowTemplate, Gateway, GatewayCondition, NodeExecutionState, NodeExecutionStatus, NotifyConfig, PipelineTree, PluginDetailCommon, PluginInputDataItem, SelectPanelConfig, SpaceFlowConfig, TaskExecutionStates, TemplateConfigs, TriggerCron, TriggerItem, UniformApiPluginInputsItem, UpdateFlowParams, Variable, VariableReference };
|