@blueking/bkflow-canvas-editor 1.0.8 → 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 +22 -22
- package/dist/index.d.ts +36 -17
- package/dist/index.esm.js +4215 -4206
- package/dist/style.css +1 -1
- package/package.json +2 -2
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, {
|
|
@@ -1058,6 +1075,7 @@ type __VLS_Props$1 = {
|
|
|
1058
1075
|
apiConfig: FlowApiConfig;
|
|
1059
1076
|
permissions?: {
|
|
1060
1077
|
canEdit?: boolean;
|
|
1078
|
+
canExecute?: boolean;
|
|
1061
1079
|
};
|
|
1062
1080
|
onEdit?: () => void;
|
|
1063
1081
|
onBack?: () => void;
|
|
@@ -1067,7 +1085,7 @@ type __VLS_Props$1 = {
|
|
|
1067
1085
|
showHeaderActions?: boolean;
|
|
1068
1086
|
defaultZoom?: number;
|
|
1069
1087
|
bkflowSaasUrl?: string;
|
|
1070
|
-
onExecuteSuccess?: (
|
|
1088
|
+
onExecuteSuccess?: (result: FlowTaskExecuteSuccessResult) => void;
|
|
1071
1089
|
};
|
|
1072
1090
|
declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1073
1091
|
back: () => any;
|
|
@@ -1080,6 +1098,7 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, v
|
|
|
1080
1098
|
defaultZoom: number;
|
|
1081
1099
|
permissions: {
|
|
1082
1100
|
canEdit?: boolean;
|
|
1101
|
+
canExecute?: boolean;
|
|
1083
1102
|
};
|
|
1084
1103
|
enableVersion: boolean;
|
|
1085
1104
|
showHeaderActions: boolean;
|
|
@@ -1338,4 +1357,4 @@ declare const _default: {
|
|
|
1338
1357
|
};
|
|
1339
1358
|
|
|
1340
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 };
|
|
1341
|
-
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 };
|