@blueking/bkflow-canvas-editor 1.1.0-beta.3 → 1.1.0-beta.30
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 +190 -41
- package/dist/advanced.cjs.js +1 -1
- package/dist/advanced.d.ts +287 -34
- package/dist/advanced.esm.js +5 -3
- package/dist/context-B9wWQx6k.cjs +1 -0
- package/dist/{composable-gqC5C2k8.js → context-CVSZiSc9.js} +410 -245
- package/dist/index-6HwGC0ZF.cjs +1 -0
- package/dist/index-81Fx77zz.js +234 -0
- package/dist/index-Blsv_0sr.js +162 -0
- package/dist/index-BrMTOV3N.cjs +1 -0
- package/dist/index-CDI2gET_.js +512 -0
- package/dist/index-CQUL1ICn.js +51079 -0
- package/dist/index-D301MshF.cjs +74 -0
- package/dist/index-dDzAuuom.cjs +1 -0
- package/dist/index.cjs.js +1 -70
- package/dist/index.d.ts +770 -99
- package/dist/index.esm.js +39 -46192
- package/dist/style.css +1 -1
- package/dist/style.d.ts +2 -0
- package/package.json +12 -8
- package/dist/composable-B_bR5Gic.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { Component, ComputedRef, Ref } from 'vue';
|
|
3
3
|
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
4
4
|
import * as _blueking_flow_canvas from '@blueking/flow-canvas';
|
|
5
|
-
import { CanvasUiEvent, QuickAddConfig, CanvasSchema, FlowModel, FlowNodeModel, NodeActionsConfig, ConnectionValidator, CanvasPlugin, CanvasToolbarItem, CommandEnvelope } from '@blueking/flow-canvas';
|
|
6
|
-
export { InsertDirection, QuickAddConfig, QuickAddInsertDirectionResolver, QuickAddPortResolver } from '@blueking/flow-canvas';
|
|
5
|
+
import { ZoomToFitOptions, CanvasUiEvent, QuickAddConfig, CanvasSchema, FlowModel, FlowNodeModel, NodeActionsConfig, ConnectionValidator, CanvasPlugin, CanvasToolbarItem, CommandEnvelope } from '@blueking/flow-canvas';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Flow API 配置接口
|
|
@@ -18,10 +17,7 @@ interface FlowApiConfig {
|
|
|
18
17
|
/** CSRF cookie 名称(可选,用于创建新的 axios 实例时设置 xsrfCookieName) */
|
|
19
18
|
xsrfCookieName?: string;
|
|
20
19
|
/** 作用域数据(必需,由外部传入) */
|
|
21
|
-
scopeData:
|
|
22
|
-
scope_type: string;
|
|
23
|
-
scope_value: number;
|
|
24
|
-
};
|
|
20
|
+
scopeData: ScopeData;
|
|
25
21
|
/**
|
|
26
22
|
* 用户查询 API 地址(可选)
|
|
27
23
|
* @deprecated 请改用 FlowEdit/FlowView 顶层组件的 `memberSelectorConfig.fetchUserApi`。
|
|
@@ -31,12 +27,18 @@ interface FlowApiConfig {
|
|
|
31
27
|
/** 是否启用第三方插件(可选,默认为 true) */
|
|
32
28
|
enableThirdPlugin?: boolean;
|
|
33
29
|
}
|
|
30
|
+
interface ScopeData {
|
|
31
|
+
scope_type: string;
|
|
32
|
+
scope_value: number;
|
|
33
|
+
/** 业务方传入的空间 ID,语义独立于 scope_value。 */
|
|
34
|
+
space_id: number;
|
|
35
|
+
}
|
|
34
36
|
|
|
35
|
-
type __VLS_Slots$
|
|
37
|
+
type __VLS_Slots$7 = {
|
|
36
38
|
header?: () => any;
|
|
37
39
|
extend?: () => any;
|
|
38
40
|
};
|
|
39
|
-
type __VLS_Props$
|
|
41
|
+
type __VLS_Props$7 = {
|
|
40
42
|
flowId: string;
|
|
41
43
|
taskId: string | number;
|
|
42
44
|
apiConfig: FlowApiConfig;
|
|
@@ -44,17 +46,17 @@ type __VLS_Props$6 = {
|
|
|
44
46
|
defaultZoom?: number;
|
|
45
47
|
onBack?: () => void;
|
|
46
48
|
};
|
|
47
|
-
declare const __VLS_base$
|
|
49
|
+
declare const __VLS_base$7: vue.DefineComponent<__VLS_Props$7, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
48
50
|
back: () => any;
|
|
49
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
51
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$7> & Readonly<{
|
|
50
52
|
onBack?: (() => any) | undefined;
|
|
51
53
|
}>, {
|
|
52
54
|
defaultZoom: number;
|
|
53
55
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
54
|
-
declare const __VLS_export$
|
|
55
|
-
declare const _default$
|
|
56
|
+
declare const __VLS_export$7: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
|
|
57
|
+
declare const _default$8: typeof __VLS_export$7;
|
|
56
58
|
|
|
57
|
-
type __VLS_WithSlots$
|
|
59
|
+
type __VLS_WithSlots$7<T, S> = T & {
|
|
58
60
|
new (): {
|
|
59
61
|
$slots: S;
|
|
60
62
|
};
|
|
@@ -62,11 +64,11 @@ type __VLS_WithSlots$5<T, S> = T & {
|
|
|
62
64
|
|
|
63
65
|
declare namespace __mock_vue {
|
|
64
66
|
export {
|
|
65
|
-
_default$
|
|
67
|
+
_default$8 as default,
|
|
66
68
|
};
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
type NodeExecutionStatus = 'CREATED' | 'RUNNING' | 'FINISHED' | 'FAILED' | 'SUSPENDED' | 'REVOKED';
|
|
71
|
+
type NodeExecutionStatus = 'CREATED' | 'RUNNING' | 'FINISHED' | 'FAILED' | 'SUSPENDED' | 'REVOKED' | 'SKIP';
|
|
70
72
|
type ExecutionNodeAction = 'retry' | 'skip' | 'resume' | 'approve' | 'forceFail' | 'gatewaySkip';
|
|
71
73
|
interface NodeExecutionState {
|
|
72
74
|
status: NodeExecutionStatus;
|
|
@@ -110,6 +112,11 @@ interface NodeExecutionState {
|
|
|
110
112
|
actions?: ExecutionNodeAction[];
|
|
111
113
|
/** 兼容旧版后端直接透出的动作数组字段 */
|
|
112
114
|
action_list?: ExecutionNodeAction[];
|
|
115
|
+
/**
|
|
116
|
+
* 条件网关命中的出边 flow_id。
|
|
117
|
+
* 有值时执行态连线优先按它着色,不要求目标节点已经执行(网关单步不会跑下游)。
|
|
118
|
+
*/
|
|
119
|
+
selectedFlowIds?: string[];
|
|
113
120
|
}
|
|
114
121
|
type TaskExecutionStates = Record<string, NodeExecutionState>;
|
|
115
122
|
|
|
@@ -696,11 +703,420 @@ interface CustomVariableType {
|
|
|
696
703
|
code: string;
|
|
697
704
|
}
|
|
698
705
|
|
|
699
|
-
|
|
706
|
+
/**
|
|
707
|
+
* filter 变量的宿主配置契约与注入。
|
|
708
|
+
*
|
|
709
|
+
* `RetrievalFilterField` 与 `getValues` 的返回结构和宿主
|
|
710
|
+
* `src/components/bk-monitor-retieval-filter/types.d.ts` 里的 `IFilterField`
|
|
711
|
+
* 逐字段一致——依赖包不带 `.d.ts`,宿主已经自己维护了一份,这里刻意同源,
|
|
712
|
+
* 避免出现两套形状相近但不兼容的类型。
|
|
713
|
+
*/
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* 关联节点的插件配置摘要。getFields 在节点表单未挂载时要用它自行取维度,
|
|
717
|
+
* 不能依赖「打开过节点配置」留下的内存缓存。
|
|
718
|
+
*/
|
|
719
|
+
interface FilterVariableSourceNodeComponent {
|
|
720
|
+
code?: string;
|
|
721
|
+
/** `name` 是插件的稳定标识(如 log_plugin);`id` 随环境变化,不能用来做判断 */
|
|
722
|
+
api_meta?: {
|
|
723
|
+
id?: string;
|
|
724
|
+
name?: string;
|
|
725
|
+
};
|
|
726
|
+
data?: Record<string, {
|
|
727
|
+
value?: unknown;
|
|
728
|
+
}>;
|
|
729
|
+
}
|
|
730
|
+
/** 关联来源。创建时由宿主锁定,用户不能在编辑器里改 */
|
|
731
|
+
interface FilterVariableSourceContext {
|
|
732
|
+
sourceNodeId: string;
|
|
733
|
+
sourceNodeName: string;
|
|
734
|
+
/** 关联表单项稳定 KEY,例如 query_condition */
|
|
735
|
+
sourceFieldKey: string;
|
|
736
|
+
sourceFieldName: string;
|
|
737
|
+
/** 关联节点当前 component,供宿主 getFields 在节点配置未打开时解析 */
|
|
738
|
+
sourceNodeComponent?: FilterVariableSourceNodeComponent;
|
|
739
|
+
}
|
|
740
|
+
interface RetrievalFilterField {
|
|
741
|
+
alias: string;
|
|
742
|
+
name: string;
|
|
743
|
+
type: string;
|
|
744
|
+
isEnableOptions?: boolean;
|
|
745
|
+
methods: Array<{
|
|
746
|
+
alias: string;
|
|
747
|
+
value: string;
|
|
748
|
+
placeholder?: string;
|
|
749
|
+
wildcardValue?: string;
|
|
750
|
+
options?: unknown[];
|
|
751
|
+
}>;
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* 候选值查询参数。
|
|
755
|
+
*
|
|
756
|
+
* 这是适配器归一化之后的稳定形状:依赖组件内部有四条 `getValueFn` 调用路径,
|
|
757
|
+
* 参数形状互不一致(`search`/`field`/`isInit__` vs `where` + `operator` vs
|
|
758
|
+
* `where` + `method`),禁止把 raw params 直接透给宿主。升级依赖时需重新核对。
|
|
759
|
+
*/
|
|
760
|
+
interface FilterCandidateQuery {
|
|
761
|
+
field?: string;
|
|
762
|
+
keyword?: string;
|
|
763
|
+
limit?: number;
|
|
764
|
+
method?: string;
|
|
765
|
+
/** 通配搜索路径会带 `options.is_wildcard`,宿主据此选择精确或模糊匹配 */
|
|
766
|
+
isWildcard?: boolean;
|
|
767
|
+
}
|
|
768
|
+
interface FilterVariableConfig {
|
|
769
|
+
/**
|
|
770
|
+
* 宿主注入的 **原始** `RetrievalFilter` 组件,即
|
|
771
|
+
* `import { RetrievalFilter } from '@blueking/monitor-vue3-components'`。
|
|
772
|
+
*
|
|
773
|
+
* 必须是原始组件而不是宿主自己的封装(例如 bk-incident 的
|
|
774
|
+
* `BkMonitorRetievalFilter`):封装层 props 是 `filters/fieldList/query`、事件是
|
|
775
|
+
* `change`,与适配器传入的 `fields/where` + `whereChange` 不兼容;且它的
|
|
776
|
+
* `getValueFn` 只透传 `fields`,会丢掉搜索关键词,候选值搜索无法工作。
|
|
777
|
+
*
|
|
778
|
+
* 编辑器不把该依赖列入自身 dependencies,所以拿不到注入就是不可用。
|
|
779
|
+
*/
|
|
780
|
+
retrievalFilterComponent: Component;
|
|
781
|
+
getFields(source: FilterVariableSourceContext): Promise<RetrievalFilterField[]>;
|
|
782
|
+
getValues(source: FilterVariableSourceContext, params: FilterCandidateQuery): Promise<{
|
|
783
|
+
count: number;
|
|
784
|
+
list: Array<{
|
|
785
|
+
id: string;
|
|
786
|
+
name: string;
|
|
787
|
+
}>;
|
|
788
|
+
}>;
|
|
789
|
+
/** 传给依赖组件的 `zIndex`,用于让候选值弹层盖在侧滑之上 */
|
|
790
|
+
popupZIndex?: number;
|
|
791
|
+
loadDelay?: number;
|
|
792
|
+
limit?: number;
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* 在顶层组件中提供 FilterVariableConfig。
|
|
796
|
+
*
|
|
797
|
+
* 与 `provideMemberSelectorConfig` 一致:`config` 为 undefined 时不调用 provide,
|
|
798
|
+
* 避免遮蔽父级已提供的配置。
|
|
799
|
+
*/
|
|
800
|
+
declare function provideFilterVariableConfig(config?: FilterVariableConfig): void;
|
|
801
|
+
|
|
802
|
+
interface CreateVariablePayload {
|
|
803
|
+
keyword?: string;
|
|
804
|
+
cursorIndex?: number;
|
|
805
|
+
defaultCustomType?: string;
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* 宿主自定义的候选项来源标识。
|
|
809
|
+
*
|
|
810
|
+
* 编辑器**不解释**它的内容,只做原样存储与回传:`key` 用于让宿主找到自己的加载器,
|
|
811
|
+
* `params` 放宿主拉取时需要的补充信息。
|
|
812
|
+
*
|
|
813
|
+
* 之所以由宿主带进来而不是编辑器从 pipeline_tree 反查关联节点的插件:节点配置尚未
|
|
814
|
+
* 保存时,`activities[nodeId].component` 还是换插件之前的那个,反查会拿到错的插件。
|
|
815
|
+
*/
|
|
816
|
+
interface SelectRelatedOptionSourceRef {
|
|
817
|
+
key: string;
|
|
818
|
+
params?: Record<string, unknown>;
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* select 变量「关联数据」的来源,由宿主在节点表单里发起受控创建时锁定。
|
|
822
|
+
* 与 filter 的 FilterVariableSourceContext 平行。
|
|
823
|
+
*/
|
|
824
|
+
interface SelectRelatedSourceContext {
|
|
825
|
+
sourceNodeId: string;
|
|
826
|
+
/** 关联表单项稳定 KEY,例如 index_set_id */
|
|
827
|
+
sourceFieldKey: string;
|
|
828
|
+
/**
|
|
829
|
+
* 关联表单项的展示名,例如「查询条件」——即节点表单上那一栏的标题,不是 fieldKey 本身。
|
|
830
|
+
* 全局变量侧滑没有加载插件 schema 的时机,不带进来就只能显示裸 fieldKey。
|
|
831
|
+
*/
|
|
832
|
+
sourceFieldName?: string;
|
|
833
|
+
/** 候选项从哪来。缺省则该变量没有可拉取的候选项 */
|
|
834
|
+
optionSource?: SelectRelatedOptionSourceRef;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* filter(复合条件选择)变量的领域逻辑。
|
|
839
|
+
*
|
|
840
|
+
* `Variable.value` 直接就是提交给后端的条件数组 `{ key, operator, value, options }[]`,
|
|
841
|
+
* 不引入编辑态中间形状:编辑器与依赖组件之间只有一处命名差异(`operator` ⇄ `method`),
|
|
842
|
+
* 那一次转换收在适配器边界上(见 retrieval-filter-adapter/index.vue)。
|
|
843
|
+
*
|
|
844
|
+
* 关联标识复用 `Variable.source_info`(C-09),不另立字段。既有的节点删除清理逻辑
|
|
845
|
+
* 原先只放行 component_inputs / component_outputs,已显式把 filter 一并纳入
|
|
846
|
+
* (canvas-adapter/plugin/index.ts 的节点删除,以及 node-config-sideslider 保存时
|
|
847
|
+
* 对照节点数据里是否还引用 `${var}`)。节点删掉或表单里取消引用后不清理,
|
|
848
|
+
* 就会留下用户无法修复的孤儿变量——关联信息是只读的。
|
|
849
|
+
*/
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* 条件值标量。
|
|
853
|
+
*
|
|
854
|
+
* 必须允许 number:依赖协议里 `value` 是 `number[] | string[]`,整型字段的候选值
|
|
855
|
+
* 就是数字,统一转成字符串会改变提交给后端的类型。
|
|
856
|
+
*/
|
|
857
|
+
type FilterConditionValue = string | number;
|
|
858
|
+
/**
|
|
859
|
+
* 单条条件的附加选项。
|
|
860
|
+
*
|
|
861
|
+
* `is_wildcard`(通配匹配)与 `group_relation`(多值关系)由依赖组件在运算符的
|
|
862
|
+
* `methods[].options` 里声明、由用户勾选,并原样带在条件上。丢掉它等于静默改写
|
|
863
|
+
* 用户的选择,所以读写两侧都必须透传,也不做已知字段白名单。
|
|
864
|
+
*/
|
|
865
|
+
interface FilterConditionOptions {
|
|
866
|
+
is_wildcard?: boolean;
|
|
867
|
+
group_relation?: boolean;
|
|
868
|
+
[key: string]: unknown;
|
|
869
|
+
}
|
|
870
|
+
/** 单条条件,即 Variable.value 的元素。形状对齐宿主既有协议 */
|
|
871
|
+
interface FilterWhereItem {
|
|
872
|
+
key: string;
|
|
873
|
+
operator: string;
|
|
874
|
+
value: FilterConditionValue[];
|
|
875
|
+
options?: FilterConditionOptions;
|
|
876
|
+
}
|
|
877
|
+
type FilterWhereValue = FilterWhereItem[];
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* 全局变量受控创建的对外契约与守卫。
|
|
881
|
+
*
|
|
882
|
+
* filter 变量不能从普通「新建变量」入口创建——它必须携带关联节点与关联字段,
|
|
883
|
+
* 所以对外只暴露这一个方法,由宿主在节点表单里发起。
|
|
884
|
+
*
|
|
885
|
+
* select 的「关联数据」态同样只能受控创建(`selectRelatedContext`),但它是**可选**的:
|
|
886
|
+
* select 缺少关联源时退化为「手动输入」,仍是一个可用的变量,不像 filter 那样必须锁定。
|
|
887
|
+
*/
|
|
888
|
+
|
|
889
|
+
interface OpenFilterVariableCreateRequest {
|
|
890
|
+
defaultCustomType: 'filter';
|
|
891
|
+
/** 关联来源,filter 场景必填 */
|
|
892
|
+
filterContext: FilterVariableSourceContext;
|
|
893
|
+
selectRelatedContext?: never;
|
|
894
|
+
keyword?: string;
|
|
895
|
+
/**
|
|
896
|
+
* 可选:把宿主表单里已配好的真实维度条件带进来作为默认值。
|
|
897
|
+
* 已 hook 的 `${var}` 占位会被丢掉,不能当默认条件。
|
|
898
|
+
*/
|
|
899
|
+
initialValue?: FilterWhereValue;
|
|
900
|
+
onCreated?: (variable: Variable) => void;
|
|
901
|
+
}
|
|
902
|
+
interface OpenStandardVariableCreateRequest {
|
|
903
|
+
defaultCustomType?: string;
|
|
904
|
+
filterContext?: never;
|
|
905
|
+
/**
|
|
906
|
+
* 可选:把 select 变量初始化成「关联数据」态并锁定关联源。
|
|
907
|
+
* 不传则 select 按「手动输入」初始化。
|
|
908
|
+
*/
|
|
909
|
+
selectRelatedContext?: SelectRelatedSourceContext;
|
|
910
|
+
keyword?: string;
|
|
911
|
+
cursorIndex?: number;
|
|
912
|
+
onCreated?: (variable: Variable) => void;
|
|
913
|
+
}
|
|
914
|
+
type OpenGlobalVariableCreateRequest = OpenFilterVariableCreateRequest | OpenStandardVariableCreateRequest;
|
|
915
|
+
|
|
916
|
+
/** 画布视口相关方法,供 FlowView / FlowEdit 对外透传 */
|
|
917
|
+
interface CanvasViewportExpose {
|
|
918
|
+
zoomToFit: (options?: ZoomToFitOptions) => void;
|
|
919
|
+
centerContent: () => void;
|
|
920
|
+
getZoom: () => number;
|
|
921
|
+
}
|
|
922
|
+
/** 受控创建能力。返回 false 表示未通过同步守卫,开发态会打印具体原因 */
|
|
923
|
+
interface GlobalVariableCreateExpose {
|
|
924
|
+
openGlobalVariableCreate: (request?: OpenGlobalVariableCreateRequest) => boolean;
|
|
925
|
+
}
|
|
926
|
+
interface FlowEditExpose extends CanvasViewportExpose, GlobalVariableCreateExpose {
|
|
700
927
|
isFlowEdited: boolean;
|
|
701
928
|
updateNodeInputParams: (inputParams: Record<string, PluginInputDataItem>) => void;
|
|
702
929
|
openGlobalVariables: () => void;
|
|
703
930
|
}
|
|
931
|
+
interface FlowViewExpose extends CanvasViewportExpose {
|
|
932
|
+
}
|
|
933
|
+
/** FlowDetail 统一详情页对外暴露(设计 §7.1) */
|
|
934
|
+
interface FlowDetailExpose extends CanvasViewportExpose, GlobalVariableCreateExpose {
|
|
935
|
+
isFlowEdited: boolean;
|
|
936
|
+
updateNodeInputParams: (inputParams: Record<string, PluginInputDataItem>) => void;
|
|
937
|
+
openGlobalVariables: () => void;
|
|
938
|
+
refreshDebugContext: () => Promise<void>;
|
|
939
|
+
openDebugResult: (nodeId?: string) => void;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
type DebugContextStatus = 'idle' | 'running' | 'terminating';
|
|
943
|
+
type DebugNodeStatus = 'not_run' | 'running' | 'waiting' | 'paused' | 'finished' | 'failed' | 'revoked' | 'suspended' | 'skipped';
|
|
944
|
+
type DebugExecutionMode = 'real' | 'mock';
|
|
945
|
+
interface DebugMissingVar {
|
|
946
|
+
key: string;
|
|
947
|
+
source_node_id: string | null;
|
|
948
|
+
}
|
|
949
|
+
type DebugRunType = 'global' | 'step';
|
|
950
|
+
type DebugRunStatus = 'not_run' | 'running' | 'waiting' | 'paused' | 'terminating' | 'finished' | 'failed' | 'revoked';
|
|
951
|
+
/** 运行级 / 节点级错误详情(last_error_detail、nodes[].error_detail)。 */
|
|
952
|
+
interface DebugErrorFailure {
|
|
953
|
+
message: string;
|
|
954
|
+
node_id?: string;
|
|
955
|
+
template_node_id?: string;
|
|
956
|
+
[key: string]: unknown;
|
|
957
|
+
}
|
|
958
|
+
interface DebugErrorDetail {
|
|
959
|
+
type?: string;
|
|
960
|
+
message?: string;
|
|
961
|
+
task_id?: number | string;
|
|
962
|
+
failures?: DebugErrorFailure[];
|
|
963
|
+
[key: string]: unknown;
|
|
964
|
+
}
|
|
965
|
+
/** 条件网关分支求值结果(`debug_context.nodes[].condition_results`)。 */
|
|
966
|
+
interface DebugConditionResult {
|
|
967
|
+
flow_id: string;
|
|
968
|
+
name?: string;
|
|
969
|
+
expression?: string;
|
|
970
|
+
resolved_expression?: string;
|
|
971
|
+
matched?: boolean;
|
|
972
|
+
[key: string]: unknown;
|
|
973
|
+
}
|
|
974
|
+
interface DebugContextNode {
|
|
975
|
+
node_id: string;
|
|
976
|
+
node_type: string;
|
|
977
|
+
execution_mode: DebugExecutionMode;
|
|
978
|
+
status: DebugNodeStatus;
|
|
979
|
+
can_step: boolean;
|
|
980
|
+
missing_vars: DebugMissingVar[];
|
|
981
|
+
waiting_reason?: string | null;
|
|
982
|
+
/** 是否支持单步调试;并行/汇聚网关为 false,仅用于展示全局调试状态。 */
|
|
983
|
+
supports_step?: boolean;
|
|
984
|
+
/** 是否支持 Mock;全部网关为 false。 */
|
|
985
|
+
supports_mock?: boolean;
|
|
986
|
+
mock_result?: 'success' | 'fail' | null;
|
|
987
|
+
error_detail?: DebugErrorDetail | string | null;
|
|
988
|
+
duration_ms?: number | null;
|
|
989
|
+
log_ref?: {
|
|
990
|
+
instance_id: number | string;
|
|
991
|
+
node_id: string;
|
|
992
|
+
version: string;
|
|
993
|
+
} | null;
|
|
994
|
+
mock_outputs?: Record<string, unknown> | null;
|
|
995
|
+
mock_error?: string | null;
|
|
996
|
+
outputs?: Record<string, unknown> | null;
|
|
997
|
+
/** 条件网关命中的出边 flow_id;画布用它把命中连线标绿。 */
|
|
998
|
+
selected_flow_ids?: string[];
|
|
999
|
+
/** 条件网关每个分支的表达式与命中结果。 */
|
|
1000
|
+
condition_results?: DebugConditionResult[];
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* /debug_context/ 顶层结构。
|
|
1004
|
+
*
|
|
1005
|
+
* 前端按 status 分支:
|
|
1006
|
+
* - running:任务定位用 active_*,进度用 last_run_status
|
|
1007
|
+
* - terminating:继续用 active_*,UI 展示「终止中」并轮询
|
|
1008
|
+
* - idle:active_* 为空,结果摘要用 last_*;last_task_id=null 表示尚无调试记录
|
|
1009
|
+
*/
|
|
1010
|
+
interface DebugContext {
|
|
1011
|
+
template_id: number;
|
|
1012
|
+
status: DebugContextStatus;
|
|
1013
|
+
locked_by: string;
|
|
1014
|
+
active_task_id: number | string | null;
|
|
1015
|
+
active_run_type: DebugRunType | null;
|
|
1016
|
+
active_node_id: string | null;
|
|
1017
|
+
last_task_id: number | string | null;
|
|
1018
|
+
last_run_type: DebugRunType | null;
|
|
1019
|
+
last_run_status: DebugRunStatus | null;
|
|
1020
|
+
last_error_detail?: DebugErrorDetail | null;
|
|
1021
|
+
last_inputs?: Record<string, unknown>;
|
|
1022
|
+
global_vars: Record<string, unknown>;
|
|
1023
|
+
missing_vars?: DebugMissingVar[];
|
|
1024
|
+
nodes: DebugContextNode[];
|
|
1025
|
+
}
|
|
1026
|
+
interface DebugInputSchemaField {
|
|
1027
|
+
key: string;
|
|
1028
|
+
name: string;
|
|
1029
|
+
type: string;
|
|
1030
|
+
default?: unknown;
|
|
1031
|
+
required?: boolean;
|
|
1032
|
+
[key: string]: unknown;
|
|
1033
|
+
}
|
|
1034
|
+
interface DebugInputSchema {
|
|
1035
|
+
fields?: DebugInputSchemaField[];
|
|
1036
|
+
constants?: Record<string, unknown>;
|
|
1037
|
+
[key: string]: unknown;
|
|
1038
|
+
}
|
|
1039
|
+
interface DebugResetImpact {
|
|
1040
|
+
reset_node_ids: string[];
|
|
1041
|
+
reasons?: Record<string, string>;
|
|
1042
|
+
}
|
|
1043
|
+
interface UpdateNodeDebugMockResult {
|
|
1044
|
+
node_id: string;
|
|
1045
|
+
execution_mode: DebugExecutionMode;
|
|
1046
|
+
updated_global_vars?: Record<string, unknown>;
|
|
1047
|
+
[key: string]: unknown;
|
|
1048
|
+
}
|
|
1049
|
+
interface RunNodeDebugStepResult {
|
|
1050
|
+
node_id: string;
|
|
1051
|
+
status: DebugNodeStatus;
|
|
1052
|
+
outputs?: Record<string, unknown> | null;
|
|
1053
|
+
error_detail?: unknown;
|
|
1054
|
+
updated_global_vars?: Record<string, unknown>;
|
|
1055
|
+
log_ref?: DebugContextNode['log_ref'];
|
|
1056
|
+
selected_flow_ids?: string[];
|
|
1057
|
+
condition_results?: DebugConditionResult[];
|
|
1058
|
+
[key: string]: unknown;
|
|
1059
|
+
}
|
|
1060
|
+
interface RunGlobalDebugResult {
|
|
1061
|
+
task_id: number | string;
|
|
1062
|
+
status: DebugContextStatus;
|
|
1063
|
+
[key: string]: unknown;
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* /debug_terminate/ 返回。
|
|
1067
|
+
*
|
|
1068
|
+
* 全局终止返回 `terminating`,需要继续轮询 /debug_context/ 直到 idle + last_run_status=revoked;
|
|
1069
|
+
* 单节点终止直接返回 `idle`,并用 reset_node_ids 告知哪些节点被恢复为「未调试」。
|
|
1070
|
+
*/
|
|
1071
|
+
interface TerminateDebugResult {
|
|
1072
|
+
status?: DebugContextStatus;
|
|
1073
|
+
/** 单节点终止:被恢复为 not_run 的节点,本地需同步清空输入、输出、耗时、错误与日志。 */
|
|
1074
|
+
reset_node_ids?: string[];
|
|
1075
|
+
[key: string]: unknown;
|
|
1076
|
+
}
|
|
1077
|
+
interface DebugResetResult {
|
|
1078
|
+
reset_node_ids?: string[];
|
|
1079
|
+
[key: string]: unknown;
|
|
1080
|
+
}
|
|
1081
|
+
interface UpdateNodeDebugMockParams {
|
|
1082
|
+
templateId: string | number;
|
|
1083
|
+
nodeId: string;
|
|
1084
|
+
enable: boolean;
|
|
1085
|
+
mockResult?: 'success' | 'fail';
|
|
1086
|
+
mockOutputs?: Record<string, unknown>;
|
|
1087
|
+
mockError?: string;
|
|
1088
|
+
}
|
|
1089
|
+
interface RunNodeDebugStepParams {
|
|
1090
|
+
templateId: string | number;
|
|
1091
|
+
nodeId: string;
|
|
1092
|
+
mode: 'real' | 'mock';
|
|
1093
|
+
inputOverrides?: Record<string, unknown>;
|
|
1094
|
+
mockResult?: 'success' | 'fail';
|
|
1095
|
+
mockOutputs?: Record<string, unknown>;
|
|
1096
|
+
mockError?: string;
|
|
1097
|
+
}
|
|
1098
|
+
interface RunGlobalDebugParams {
|
|
1099
|
+
templateId: string | number;
|
|
1100
|
+
inputs: Record<string, unknown>;
|
|
1101
|
+
}
|
|
1102
|
+
interface TerminateDebugParams {
|
|
1103
|
+
templateId: string | number;
|
|
1104
|
+
nodeId?: string;
|
|
1105
|
+
}
|
|
1106
|
+
interface ResetDebugResultParams {
|
|
1107
|
+
templateId: string | number;
|
|
1108
|
+
nodeIds?: string[];
|
|
1109
|
+
}
|
|
1110
|
+
interface DebugApiServices {
|
|
1111
|
+
fetchDebugContext(templateId: string | number): Promise<DebugContext>;
|
|
1112
|
+
fetchDebugInputSchema(templateId: string | number): Promise<DebugInputSchema>;
|
|
1113
|
+
fetchDebugResetImpact(templateId: string | number): Promise<DebugResetImpact>;
|
|
1114
|
+
updateNodeDebugMock(params: UpdateNodeDebugMockParams): Promise<UpdateNodeDebugMockResult>;
|
|
1115
|
+
runNodeDebugStep(params: RunNodeDebugStepParams): Promise<RunNodeDebugStepResult>;
|
|
1116
|
+
runGlobalDebug(params: RunGlobalDebugParams): Promise<RunGlobalDebugResult>;
|
|
1117
|
+
terminateDebug(params: TerminateDebugParams): Promise<TerminateDebugResult>;
|
|
1118
|
+
resetDebugResult(params: ResetDebugResultParams): Promise<DebugResetResult>;
|
|
1119
|
+
}
|
|
704
1120
|
|
|
705
1121
|
interface DrawPipelineParams {
|
|
706
1122
|
pipeline_tree: PipelineTree;
|
|
@@ -730,6 +1146,7 @@ interface FetchTaskStateParams {
|
|
|
730
1146
|
interface FetchTaskNodeDetailParams {
|
|
731
1147
|
task_id: number | string;
|
|
732
1148
|
node_id: string;
|
|
1149
|
+
component_code?: string;
|
|
733
1150
|
}
|
|
734
1151
|
interface FetchTaskNodeSnapshotParams {
|
|
735
1152
|
task_id: number | string;
|
|
@@ -755,8 +1172,45 @@ interface FlowTaskDetail {
|
|
|
755
1172
|
id: number | string;
|
|
756
1173
|
template_id: number;
|
|
757
1174
|
pipeline_tree: PipelineTree;
|
|
1175
|
+
/** 任务已耗时(秒),调试摘要弹层刷新恢复用。 */
|
|
1176
|
+
elapsed_time?: number;
|
|
1177
|
+
[key: string]: unknown;
|
|
1178
|
+
}
|
|
1179
|
+
interface CreateFlowTaskParams {
|
|
1180
|
+
template_id: number;
|
|
1181
|
+
name: string;
|
|
1182
|
+
creator: string;
|
|
1183
|
+
constants: Record<string, any>;
|
|
1184
|
+
label_ids?: number[];
|
|
758
1185
|
[key: string]: unknown;
|
|
759
1186
|
}
|
|
1187
|
+
interface CreateFlowTaskResult {
|
|
1188
|
+
data: {
|
|
1189
|
+
id: number | string;
|
|
1190
|
+
template_id?: number;
|
|
1191
|
+
[key: string]: unknown;
|
|
1192
|
+
};
|
|
1193
|
+
[key: string]: unknown;
|
|
1194
|
+
}
|
|
1195
|
+
interface ExecuteFlowTaskResult {
|
|
1196
|
+
result?: boolean;
|
|
1197
|
+
code?: number;
|
|
1198
|
+
data?: {
|
|
1199
|
+
/** 任务详情页跳转地址(含正确的 bkflow task id 与 templateId) */
|
|
1200
|
+
url?: string;
|
|
1201
|
+
[key: string]: unknown;
|
|
1202
|
+
};
|
|
1203
|
+
message?: string | null;
|
|
1204
|
+
request_id?: string;
|
|
1205
|
+
trace_id?: string | null;
|
|
1206
|
+
[key: string]: unknown;
|
|
1207
|
+
}
|
|
1208
|
+
interface FlowTaskExecuteSuccessResult {
|
|
1209
|
+
/** createFlowTask(create_task)接口响应 */
|
|
1210
|
+
createResult: CreateFlowTaskResult;
|
|
1211
|
+
/** executeFlowTask(operate_task)接口响应,data.url 用于任务详情跳转 */
|
|
1212
|
+
executeResult: ExecuteFlowTaskResult;
|
|
1213
|
+
}
|
|
760
1214
|
interface TaskStateResult {
|
|
761
1215
|
state?: string;
|
|
762
1216
|
status?: string;
|
|
@@ -782,6 +1236,8 @@ interface FlowViewApiConfig {
|
|
|
782
1236
|
scopeData: {
|
|
783
1237
|
scope_type: string;
|
|
784
1238
|
scope_value: number;
|
|
1239
|
+
/** 业务方传入的空间 ID,调试接口专用,语义独立于 scope_value */
|
|
1240
|
+
space_id: number;
|
|
785
1241
|
};
|
|
786
1242
|
fetchFlowDraftDetail?: (id: string) => Promise<FlowDraftDetail>;
|
|
787
1243
|
fetchFlowDetailByVersion?: (id: string, version: string) => Promise<FlowDetailByVersion>;
|
|
@@ -801,23 +1257,13 @@ interface FlowViewApiConfig {
|
|
|
801
1257
|
data: any[];
|
|
802
1258
|
};
|
|
803
1259
|
}>;
|
|
804
|
-
createFlowTask?: (params:
|
|
805
|
-
template_id: number;
|
|
806
|
-
name: string;
|
|
807
|
-
creator: string;
|
|
808
|
-
constants: Record<string, any>;
|
|
809
|
-
}) => Promise<{
|
|
810
|
-
data: {
|
|
811
|
-
id: number;
|
|
812
|
-
template_id: number;
|
|
813
|
-
};
|
|
814
|
-
}>;
|
|
1260
|
+
createFlowTask?: (params: CreateFlowTaskParams) => Promise<CreateFlowTaskResult>;
|
|
815
1261
|
executeFlowTask?: (params: {
|
|
816
1262
|
task_id: number | string;
|
|
817
1263
|
resource_type: string;
|
|
818
1264
|
resource_id: number | string;
|
|
819
1265
|
permission_type: string;
|
|
820
|
-
}) => Promise<
|
|
1266
|
+
}) => Promise<ExecuteFlowTaskResult>;
|
|
821
1267
|
revokeFlowTask?: (params: {
|
|
822
1268
|
task_id: number | string;
|
|
823
1269
|
resource_type: string;
|
|
@@ -864,7 +1310,7 @@ interface FlowEditApiConfig extends FlowViewApiConfig {
|
|
|
864
1310
|
fetchBkFlowThirdPartyPluginTags: () => Promise<BkflowThirdPartyPluginGroupItem[]>;
|
|
865
1311
|
fetchBkFlowThirdPartyPluginMeta: (plugin_code: string) => Promise<BkflowThirdPartyPluginMetaDetail>;
|
|
866
1312
|
fetchBkFlowThirdPartyPluginDetail: (plugin_code: string, plugin_version: string) => Promise<BkflowThirdPartyPluginDetail>;
|
|
867
|
-
fetchBkFlowThirdPartyPluginAppDetail: (plugin_code: string) => Promise<BkflowThirdPartyPluginAppDetail>;
|
|
1313
|
+
fetchBkFlowThirdPartyPluginAppDetail: (plugin_code: string, plugin_version: string) => Promise<BkflowThirdPartyPluginAppDetail>;
|
|
868
1314
|
fetchPluginGroupList: () => Promise<PluginGroupConfig[]>;
|
|
869
1315
|
fetchCategoryPlugins: (category: string) => Promise<PluginMetaItem[]>;
|
|
870
1316
|
fetchAllPluginGroups: () => Promise<GroupsPluginItem[]>;
|
|
@@ -874,23 +1320,13 @@ interface FlowEditApiConfig extends FlowViewApiConfig {
|
|
|
874
1320
|
drawPipeline?: (params: DrawPipelineParams) => Promise<{
|
|
875
1321
|
pipeline_tree: PipelineTree;
|
|
876
1322
|
}>;
|
|
877
|
-
createFlowTask?: (params:
|
|
878
|
-
template_id: number;
|
|
879
|
-
name: string;
|
|
880
|
-
creator: string;
|
|
881
|
-
constants: Record<string, any>;
|
|
882
|
-
}) => Promise<{
|
|
883
|
-
data: {
|
|
884
|
-
id: number;
|
|
885
|
-
template_id: number;
|
|
886
|
-
};
|
|
887
|
-
}>;
|
|
1323
|
+
createFlowTask?: (params: CreateFlowTaskParams) => Promise<CreateFlowTaskResult>;
|
|
888
1324
|
executeFlowTask?: (params: {
|
|
889
1325
|
task_id: number | string;
|
|
890
1326
|
resource_type: string;
|
|
891
1327
|
resource_id: number | string;
|
|
892
1328
|
permission_type: string;
|
|
893
|
-
}) => Promise<
|
|
1329
|
+
}) => Promise<ExecuteFlowTaskResult>;
|
|
894
1330
|
revokeFlowTask?: (params: {
|
|
895
1331
|
task_id: number | string;
|
|
896
1332
|
resource_type: string;
|
|
@@ -910,6 +1346,8 @@ interface FlowEditApiConfig extends FlowViewApiConfig {
|
|
|
910
1346
|
fetchTaskNodeLog?: (params: FetchTaskNodeLogParams) => Promise<unknown>;
|
|
911
1347
|
getFlowTaskDetail?: (params: GetFlowTaskDetailParams) => Promise<FlowTaskDetail>;
|
|
912
1348
|
}
|
|
1349
|
+
interface FlowDetailApiConfig extends FlowEditApiConfig, Partial<DebugApiServices> {
|
|
1350
|
+
}
|
|
913
1351
|
|
|
914
1352
|
/**
|
|
915
1353
|
* 插件分组选择面板配置
|
|
@@ -954,13 +1392,13 @@ type MemberSelectorConfig = {
|
|
|
954
1392
|
* @param config FlowApiConfig 配置对象或已处理的 API 配置对象
|
|
955
1393
|
* @returns 返回处理后的 API 配置对象
|
|
956
1394
|
*/
|
|
957
|
-
declare function provideFlowApiConfig(config: FlowApiConfig | FlowEditApiConfig | FlowViewApiConfig): FlowEditApiConfig | FlowViewApiConfig;
|
|
1395
|
+
declare function provideFlowApiConfig(config: FlowApiConfig | FlowDetailApiConfig | FlowEditApiConfig | FlowViewApiConfig): FlowDetailApiConfig | FlowEditApiConfig | FlowViewApiConfig;
|
|
958
1396
|
/**
|
|
959
1397
|
* 在子组件中注入 FlowApiConfig(通用版本)
|
|
960
1398
|
* @returns FlowEditApiConfig
|
|
961
1399
|
* @throws 如果 apiConfig 未提供则抛出错误
|
|
962
1400
|
*/
|
|
963
|
-
declare function useFlowApiConfig():
|
|
1401
|
+
declare function useFlowApiConfig(): FlowDetailApiConfig;
|
|
964
1402
|
/**
|
|
965
1403
|
* 在子组件中注入 FlowEditApiConfig(类型化版本)
|
|
966
1404
|
* @returns FlowEditApiConfig
|
|
@@ -1002,7 +1440,7 @@ declare function provideMemberSelectorConfig(config?: MemberSelectorConfig): voi
|
|
|
1002
1440
|
*/
|
|
1003
1441
|
declare function useMemberSelectorConfig(): MemberSelectorConfig;
|
|
1004
1442
|
|
|
1005
|
-
type __VLS_Props$
|
|
1443
|
+
type __VLS_Props$6 = {
|
|
1006
1444
|
flowId: string;
|
|
1007
1445
|
show: boolean;
|
|
1008
1446
|
editable?: boolean;
|
|
@@ -1026,15 +1464,15 @@ declare var __VLS_72: {
|
|
|
1026
1464
|
};
|
|
1027
1465
|
variablesValue: Record<string, any>;
|
|
1028
1466
|
};
|
|
1029
|
-
type __VLS_Slots$
|
|
1467
|
+
type __VLS_Slots$6 = {} & {
|
|
1030
1468
|
'custom-form-content'?: (props: typeof __VLS_72) => any;
|
|
1031
1469
|
};
|
|
1032
|
-
declare const __VLS_base$
|
|
1470
|
+
declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$6, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1033
1471
|
close: (...args: any[]) => void;
|
|
1034
1472
|
"update:show": (...args: any[]) => void;
|
|
1035
1473
|
confirm: (...args: any[]) => void;
|
|
1036
1474
|
"before-close": (...args: any[]) => void;
|
|
1037
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
1475
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$6> & Readonly<{
|
|
1038
1476
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
1039
1477
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
1040
1478
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
@@ -1045,10 +1483,10 @@ declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, v
|
|
|
1045
1483
|
useCustomConfirm: boolean;
|
|
1046
1484
|
enableVersion: boolean;
|
|
1047
1485
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1048
|
-
declare const __VLS_export$
|
|
1049
|
-
declare const _default$
|
|
1486
|
+
declare const __VLS_export$6: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
|
|
1487
|
+
declare const _default$7: typeof __VLS_export$6;
|
|
1050
1488
|
|
|
1051
|
-
type __VLS_WithSlots$
|
|
1489
|
+
type __VLS_WithSlots$6<T, S> = T & {
|
|
1052
1490
|
new (): {
|
|
1053
1491
|
$slots: S;
|
|
1054
1492
|
};
|
|
@@ -1056,15 +1494,15 @@ type __VLS_WithSlots$4<T, S> = T & {
|
|
|
1056
1494
|
|
|
1057
1495
|
declare namespace __debug_vue {
|
|
1058
1496
|
export {
|
|
1059
|
-
_default$
|
|
1497
|
+
_default$7 as default,
|
|
1060
1498
|
};
|
|
1061
1499
|
}
|
|
1062
1500
|
|
|
1063
|
-
type __VLS_Slots$
|
|
1501
|
+
type __VLS_Slots$5 = {
|
|
1064
1502
|
header?: () => any;
|
|
1065
1503
|
extend?: () => any;
|
|
1066
1504
|
};
|
|
1067
|
-
type __VLS_Props$
|
|
1505
|
+
type __VLS_Props$5 = {
|
|
1068
1506
|
pipelineTree: PipelineTree;
|
|
1069
1507
|
nodeStates?: TaskExecutionStates;
|
|
1070
1508
|
defaultZoom?: number;
|
|
@@ -1073,7 +1511,7 @@ type __VLS_Props$4 = {
|
|
|
1073
1511
|
showHeader?: boolean;
|
|
1074
1512
|
onBack?: () => void;
|
|
1075
1513
|
};
|
|
1076
|
-
declare const __VLS_base$
|
|
1514
|
+
declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1077
1515
|
retry: (nodeId: string) => any;
|
|
1078
1516
|
skip: (nodeId: string) => any;
|
|
1079
1517
|
resume: (nodeId: string) => any;
|
|
@@ -1092,7 +1530,7 @@ declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, v
|
|
|
1092
1530
|
nodeId: string;
|
|
1093
1531
|
action: ExecutionNodeAction;
|
|
1094
1532
|
}) => any;
|
|
1095
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
1533
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$5> & Readonly<{
|
|
1096
1534
|
onRetry?: ((nodeId: string) => any) | undefined;
|
|
1097
1535
|
onSkip?: ((nodeId: string) => any) | undefined;
|
|
1098
1536
|
onResume?: ((nodeId: string) => any) | undefined;
|
|
@@ -1116,10 +1554,10 @@ declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, v
|
|
|
1116
1554
|
defaultZoom: number;
|
|
1117
1555
|
nodeStates: TaskExecutionStates;
|
|
1118
1556
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1119
|
-
declare const __VLS_export$
|
|
1120
|
-
declare const _default$
|
|
1557
|
+
declare const __VLS_export$5: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
|
|
1558
|
+
declare const _default$6: typeof __VLS_export$5;
|
|
1121
1559
|
|
|
1122
|
-
type __VLS_WithSlots$
|
|
1560
|
+
type __VLS_WithSlots$5<T, S> = T & {
|
|
1123
1561
|
new (): {
|
|
1124
1562
|
$slots: S;
|
|
1125
1563
|
};
|
|
@@ -1127,27 +1565,101 @@ type __VLS_WithSlots$3<T, S> = T & {
|
|
|
1127
1565
|
|
|
1128
1566
|
declare namespace __execute_vue {
|
|
1129
1567
|
export {
|
|
1130
|
-
_default$
|
|
1568
|
+
_default$6 as default,
|
|
1131
1569
|
};
|
|
1132
1570
|
}
|
|
1133
1571
|
|
|
1134
|
-
|
|
1572
|
+
/**
|
|
1573
|
+
* select 变量「关联数据」候选来源的领域逻辑。
|
|
1574
|
+
*
|
|
1575
|
+
* 关联标识落在 `meta.related` 的 `node_id` / `field_key` 上,不复用 `source_info`——
|
|
1576
|
+
* 那里表达的是「哪些节点表单项 hook 了本变量」,两种语义混在一起会让节点删除时的
|
|
1577
|
+
* 清理逻辑误伤。
|
|
1578
|
+
*
|
|
1579
|
+
* 与 filter 的差异是刻意的:filter 脱离关联节点就无法执行,所以它锁定类型、并在
|
|
1580
|
+
* 节点删除时连变量一起清理;select 关联失效后退回「手动输入」就能继续用,而且可能
|
|
1581
|
+
* 已被多处引用,因此这里既不锁类型也不做清理,只把「关联节点已不存在」暴露给配置态。
|
|
1582
|
+
*/
|
|
1583
|
+
|
|
1584
|
+
/** 关联标识。select 恒为单节点单表单项 */
|
|
1585
|
+
interface SelectRelatedSource {
|
|
1586
|
+
nodeId: string;
|
|
1587
|
+
fieldKey: string;
|
|
1588
|
+
}
|
|
1589
|
+
/** 关联来源的完整信息:标识 + 宿主自定义的来源引用 */
|
|
1590
|
+
interface SelectRelatedSourceInfo extends SelectRelatedSource {
|
|
1591
|
+
optionSource?: SelectRelatedOptionSourceRef;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* 关联态 select 的候选项来源:由宿主注入。
|
|
1596
|
+
*
|
|
1597
|
+
* 编辑器不认识具体插件与接口,只要 `{ id, name }[]`——「调哪条指令、响应怎么解析」
|
|
1598
|
+
* 是宿主的知识,放进来就得在编辑器里写死插件名。
|
|
1599
|
+
*
|
|
1600
|
+
* 契约刻意比 FilterVariableConfig 小:filter 需要注入依赖组件、字段与候选值三件套,
|
|
1601
|
+
* select 只需要一次列表拉取。
|
|
1602
|
+
*/
|
|
1603
|
+
|
|
1604
|
+
interface SelectRelatedOptionItem {
|
|
1605
|
+
id: string;
|
|
1606
|
+
name: string;
|
|
1607
|
+
}
|
|
1608
|
+
interface SelectRelatedOptionSource extends SelectRelatedSourceInfo {
|
|
1609
|
+
/**
|
|
1610
|
+
* 关联节点当前 component,仅在节点配置**已写回** pipeline_tree 时才反映真实插件。
|
|
1611
|
+
* 从节点配置面板发起创建时它还是换插件之前的那个,所以宿主必须核对后再用,
|
|
1612
|
+
* 不能把它当作插件标识的唯一来源。
|
|
1613
|
+
*/
|
|
1614
|
+
nodeComponent?: FilterVariableSourceNodeComponent;
|
|
1615
|
+
}
|
|
1616
|
+
interface SelectRelatedOptionConfig {
|
|
1617
|
+
getOptions(source: SelectRelatedOptionSource): Promise<SelectRelatedOptionItem[]>;
|
|
1618
|
+
/**
|
|
1619
|
+
* 关联来源在「关联数据」栏的展示名(如「查询条件」)。
|
|
1620
|
+
*
|
|
1621
|
+
* 由宿主实时提供而不是沿用创建时的快照:那个文案属于宿主的节点表单,改了之后已存
|
|
1622
|
+
* 变量也该跟着显示新的。不实现或返回空时回落快照。
|
|
1623
|
+
*/
|
|
1624
|
+
resolveSourceLabel?(source: SelectRelatedSourceInfo): string | undefined;
|
|
1625
|
+
}
|
|
1626
|
+
/**
|
|
1627
|
+
* 在顶层组件中提供候选项来源。
|
|
1628
|
+
*
|
|
1629
|
+
* 与 `provideFilterVariableConfig` 一致:config 为 undefined 时不调用 provide,
|
|
1630
|
+
* 避免遮蔽父级已提供的配置。
|
|
1631
|
+
*/
|
|
1632
|
+
declare function provideSelectRelatedOptionConfig(config?: SelectRelatedOptionConfig): void;
|
|
1633
|
+
|
|
1634
|
+
type __VLS_Slots$4 = {
|
|
1635
|
+
customFormContent?: (props: {
|
|
1636
|
+
customFormData: Record<string, any>;
|
|
1637
|
+
additionalTaskParams: Record<string, any>;
|
|
1638
|
+
updateCustomFormData: (data: Record<string, any>) => void;
|
|
1639
|
+
updateAdditionalTaskParams: (params: Record<string, any>) => void;
|
|
1640
|
+
}) => any;
|
|
1641
|
+
};
|
|
1642
|
+
type __VLS_Props$4 = {
|
|
1135
1643
|
flowId: string;
|
|
1136
1644
|
show: boolean;
|
|
1137
1645
|
editable?: boolean;
|
|
1138
1646
|
showFlowEntry?: boolean;
|
|
1139
1647
|
apiConfig: FlowApiConfig;
|
|
1140
|
-
onExecuteSuccess?: (
|
|
1648
|
+
onExecuteSuccess?: (result: FlowTaskExecuteSuccessResult) => void;
|
|
1141
1649
|
bkflowSaasUrl?: string;
|
|
1142
1650
|
memberSelectorConfig?: MemberSelectorConfig;
|
|
1651
|
+
/** 执行时填写 filter 变量条件所需的能力;不传则这类变量退化为只读文本 */
|
|
1652
|
+
filterVariableConfig?: FilterVariableConfig;
|
|
1653
|
+
/** 执行时关联态 select 变量的候选项来源;不传则这类变量的下拉为空 */
|
|
1654
|
+
selectRelatedOptionConfig?: SelectRelatedOptionConfig;
|
|
1143
1655
|
};
|
|
1144
|
-
declare const
|
|
1656
|
+
declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1145
1657
|
close: (...args: any[]) => void;
|
|
1146
1658
|
"update:show": (...args: any[]) => void;
|
|
1147
1659
|
confirm: (...args: any[]) => void;
|
|
1148
1660
|
"before-close": (...args: any[]) => void;
|
|
1149
1661
|
"view-flow": (...args: any[]) => void;
|
|
1150
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
1662
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$4> & Readonly<{
|
|
1151
1663
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
1152
1664
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
1153
1665
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
@@ -1157,15 +1669,22 @@ declare const __VLS_export$3: vue.DefineComponent<__VLS_Props$3, {}, {}, {}, {},
|
|
|
1157
1669
|
editable: boolean;
|
|
1158
1670
|
showFlowEntry: boolean;
|
|
1159
1671
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1160
|
-
declare const
|
|
1672
|
+
declare const __VLS_export$4: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
|
|
1673
|
+
declare const _default$5: typeof __VLS_export$4;
|
|
1674
|
+
|
|
1675
|
+
type __VLS_WithSlots$4<T, S> = T & {
|
|
1676
|
+
new (): {
|
|
1677
|
+
$slots: S;
|
|
1678
|
+
};
|
|
1679
|
+
};
|
|
1161
1680
|
|
|
1162
1681
|
declare namespace __create_task_vue {
|
|
1163
1682
|
export {
|
|
1164
|
-
_default$
|
|
1683
|
+
_default$5 as default,
|
|
1165
1684
|
};
|
|
1166
1685
|
}
|
|
1167
1686
|
|
|
1168
|
-
type __VLS_Slots$
|
|
1687
|
+
type __VLS_Slots$3 = {
|
|
1169
1688
|
header?: () => any;
|
|
1170
1689
|
inputParams?: (props: {
|
|
1171
1690
|
node: any;
|
|
@@ -1189,7 +1708,7 @@ type __VLS_Slots$2 = {
|
|
|
1189
1708
|
variablesValue: Record<string, any>;
|
|
1190
1709
|
}) => any;
|
|
1191
1710
|
};
|
|
1192
|
-
type __VLS_Props$
|
|
1711
|
+
type __VLS_Props$3 = {
|
|
1193
1712
|
flowId: string;
|
|
1194
1713
|
apiConfig: FlowApiConfig;
|
|
1195
1714
|
permissions?: {
|
|
@@ -1203,6 +1722,10 @@ type __VLS_Props$2 = {
|
|
|
1203
1722
|
useCustomDebugConfirm?: boolean;
|
|
1204
1723
|
selectPanelConfig?: SelectPanelConfig;
|
|
1205
1724
|
memberSelectorConfig?: MemberSelectorConfig;
|
|
1725
|
+
/** 复合条件选择(filter)变量的宿主配置;不传则该类型变量不可用,其余功能不受影响 */
|
|
1726
|
+
filterVariableConfig?: FilterVariableConfig;
|
|
1727
|
+
/** 关联态 select 变量的候选项来源;不传则这类变量的下拉为空,其余功能不受影响 */
|
|
1728
|
+
selectRelatedOptionConfig?: SelectRelatedOptionConfig;
|
|
1206
1729
|
onSave?: (flowData: FlowTemplate) => void;
|
|
1207
1730
|
onSaveSuccess?: () => void;
|
|
1208
1731
|
onBack?: () => void;
|
|
@@ -1218,11 +1741,17 @@ type __VLS_Props$2 = {
|
|
|
1218
1741
|
bkflowSaasUrl?: string;
|
|
1219
1742
|
enableThirdPlugin?: boolean;
|
|
1220
1743
|
quickAdd?: QuickAddConfig;
|
|
1744
|
+
/** 是否隐藏基础信息中的触发器配置表单,默认 false */
|
|
1745
|
+
hideTrigger?: boolean;
|
|
1221
1746
|
};
|
|
1222
|
-
declare const __VLS_base$
|
|
1747
|
+
declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$3, {
|
|
1223
1748
|
isFlowEdited: ComputedRef<FlowEditExpose["isFlowEdited"]>;
|
|
1224
1749
|
updateNodeInputParams: FlowEditExpose["updateNodeInputParams"];
|
|
1225
1750
|
openGlobalVariables: FlowEditExpose["openGlobalVariables"];
|
|
1751
|
+
openGlobalVariableCreate: FlowEditExpose["openGlobalVariableCreate"];
|
|
1752
|
+
zoomToFit: FlowEditExpose["zoomToFit"];
|
|
1753
|
+
centerContent: FlowEditExpose["centerContent"];
|
|
1754
|
+
getZoom: FlowEditExpose["getZoom"];
|
|
1226
1755
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1227
1756
|
back: () => any;
|
|
1228
1757
|
save: (flowData: FlowTemplate) => any;
|
|
@@ -1233,11 +1762,8 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$2, {
|
|
|
1233
1762
|
saveSuccess: () => any;
|
|
1234
1763
|
exitEdit: () => any;
|
|
1235
1764
|
debugBeforeClose: () => any;
|
|
1236
|
-
createVariable: (payload:
|
|
1237
|
-
|
|
1238
|
-
cursorIndex: number;
|
|
1239
|
-
}) => any;
|
|
1240
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{
|
|
1765
|
+
createVariable: (payload: CreateVariablePayload) => any;
|
|
1766
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{
|
|
1241
1767
|
onBack?: (() => any) | undefined;
|
|
1242
1768
|
onSave?: ((flowData: FlowTemplate) => any) | undefined;
|
|
1243
1769
|
onMockDebugCreated?: ((params: {
|
|
@@ -1247,25 +1773,23 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$2, {
|
|
|
1247
1773
|
onSaveSuccess?: (() => any) | undefined;
|
|
1248
1774
|
onExitEdit?: (() => any) | undefined;
|
|
1249
1775
|
onDebugBeforeClose?: (() => any) | undefined;
|
|
1250
|
-
onCreateVariable?: ((payload:
|
|
1251
|
-
keyword: string;
|
|
1252
|
-
cursorIndex: number;
|
|
1253
|
-
}) => any) | undefined;
|
|
1776
|
+
onCreateVariable?: ((payload: CreateVariablePayload) => any) | undefined;
|
|
1254
1777
|
}>, {
|
|
1255
1778
|
quickAdd: QuickAddConfig;
|
|
1779
|
+
enableThirdPlugin: boolean;
|
|
1780
|
+
hideTrigger: boolean;
|
|
1256
1781
|
defaultZoom: number;
|
|
1782
|
+
enableDebug: boolean;
|
|
1257
1783
|
enableVersion: boolean;
|
|
1258
1784
|
permissions: {
|
|
1259
1785
|
canSave?: boolean;
|
|
1260
1786
|
};
|
|
1261
|
-
enableDebug: boolean;
|
|
1262
1787
|
useCustomDebugConfirm: boolean;
|
|
1263
|
-
enableThirdPlugin: boolean;
|
|
1264
1788
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1265
|
-
declare const __VLS_export$
|
|
1266
|
-
declare const _default$
|
|
1789
|
+
declare const __VLS_export$3: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
|
|
1790
|
+
declare const _default$4: typeof __VLS_export$3;
|
|
1267
1791
|
|
|
1268
|
-
type __VLS_WithSlots$
|
|
1792
|
+
type __VLS_WithSlots$3<T, S> = T & {
|
|
1269
1793
|
new (): {
|
|
1270
1794
|
$slots: S;
|
|
1271
1795
|
};
|
|
@@ -1273,11 +1797,11 @@ type __VLS_WithSlots$2<T, S> = T & {
|
|
|
1273
1797
|
|
|
1274
1798
|
declare namespace __edit_vue {
|
|
1275
1799
|
export {
|
|
1276
|
-
_default$
|
|
1800
|
+
_default$4 as default,
|
|
1277
1801
|
};
|
|
1278
1802
|
}
|
|
1279
1803
|
|
|
1280
|
-
type __VLS_Slots$
|
|
1804
|
+
type __VLS_Slots$2 = {
|
|
1281
1805
|
header?: () => any;
|
|
1282
1806
|
inputParams?: (props: {
|
|
1283
1807
|
node: any;
|
|
@@ -1290,6 +1814,12 @@ type __VLS_Slots$1 = {
|
|
|
1290
1814
|
}[];
|
|
1291
1815
|
updateInputParams: (data: Record<string, any>) => void;
|
|
1292
1816
|
}) => any;
|
|
1817
|
+
customFormContent?: (props: {
|
|
1818
|
+
customFormData: Record<string, any>;
|
|
1819
|
+
additionalTaskParams: Record<string, any>;
|
|
1820
|
+
updateCustomFormData: (data: Record<string, any>) => void;
|
|
1821
|
+
updateAdditionalTaskParams: (params: Record<string, any>) => void;
|
|
1822
|
+
}) => any;
|
|
1293
1823
|
debugCustomFormContent?: (props: {
|
|
1294
1824
|
formData: {
|
|
1295
1825
|
name: string;
|
|
@@ -1297,11 +1827,12 @@ type __VLS_Slots$1 = {
|
|
|
1297
1827
|
variablesValue: Record<string, any>;
|
|
1298
1828
|
}) => any;
|
|
1299
1829
|
};
|
|
1300
|
-
type __VLS_Props$
|
|
1830
|
+
type __VLS_Props$2 = {
|
|
1301
1831
|
flowId: string;
|
|
1302
1832
|
apiConfig: FlowApiConfig;
|
|
1303
1833
|
permissions?: {
|
|
1304
1834
|
canEdit?: boolean;
|
|
1835
|
+
canExecute?: boolean;
|
|
1305
1836
|
};
|
|
1306
1837
|
onEdit?: () => void;
|
|
1307
1838
|
onBack?: () => void;
|
|
@@ -1311,22 +1842,28 @@ type __VLS_Props$1 = {
|
|
|
1311
1842
|
showHeaderActions?: boolean;
|
|
1312
1843
|
defaultZoom?: number;
|
|
1313
1844
|
bkflowSaasUrl?: string;
|
|
1314
|
-
onExecuteSuccess?: (
|
|
1845
|
+
onExecuteSuccess?: (result: FlowTaskExecuteSuccessResult) => void;
|
|
1315
1846
|
memberSelectorConfig?: MemberSelectorConfig;
|
|
1316
1847
|
enableDebug?: boolean;
|
|
1317
1848
|
onMockDebugCreated?: (params: {
|
|
1318
1849
|
taskId: number | string;
|
|
1319
1850
|
templateId: number | string;
|
|
1320
1851
|
}) => void;
|
|
1852
|
+
/** 是否隐藏基础信息中的触发器配置表单,默认 false */
|
|
1853
|
+
hideTrigger?: boolean;
|
|
1321
1854
|
};
|
|
1322
|
-
declare const __VLS_base$
|
|
1855
|
+
declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$2, {
|
|
1856
|
+
zoomToFit: (options?: ZoomToFitOptions) => void;
|
|
1857
|
+
centerContent: () => void;
|
|
1858
|
+
getZoom: () => number;
|
|
1859
|
+
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1323
1860
|
edit: () => any;
|
|
1324
1861
|
back: () => any;
|
|
1325
1862
|
mockDebugCreated: (params: {
|
|
1326
1863
|
taskId: number | string;
|
|
1327
1864
|
templateId: number | string;
|
|
1328
1865
|
}) => any;
|
|
1329
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
1866
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{
|
|
1330
1867
|
onEdit?: (() => any) | undefined;
|
|
1331
1868
|
onBack?: (() => any) | undefined;
|
|
1332
1869
|
onMockDebugCreated?: ((params: {
|
|
@@ -1335,18 +1872,20 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, v
|
|
|
1335
1872
|
}) => any) | undefined;
|
|
1336
1873
|
}>, {
|
|
1337
1874
|
thumbnail: boolean;
|
|
1875
|
+
hideTrigger: boolean;
|
|
1338
1876
|
defaultZoom: number;
|
|
1877
|
+
enableDebug: boolean;
|
|
1339
1878
|
enableVersion: boolean;
|
|
1340
1879
|
permissions: {
|
|
1341
1880
|
canEdit?: boolean;
|
|
1881
|
+
canExecute?: boolean;
|
|
1342
1882
|
};
|
|
1343
1883
|
showHeaderActions: boolean;
|
|
1344
|
-
enableDebug: boolean;
|
|
1345
1884
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1346
|
-
declare const __VLS_export$
|
|
1347
|
-
declare const _default$
|
|
1885
|
+
declare const __VLS_export$2: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
|
|
1886
|
+
declare const _default$3: typeof __VLS_export$2;
|
|
1348
1887
|
|
|
1349
|
-
type __VLS_WithSlots$
|
|
1888
|
+
type __VLS_WithSlots$2<T, S> = T & {
|
|
1350
1889
|
new (): {
|
|
1351
1890
|
$slots: S;
|
|
1352
1891
|
};
|
|
@@ -1354,10 +1893,108 @@ type __VLS_WithSlots$1<T, S> = T & {
|
|
|
1354
1893
|
|
|
1355
1894
|
declare namespace __view_vue {
|
|
1356
1895
|
export {
|
|
1357
|
-
_default$
|
|
1896
|
+
_default$3 as default,
|
|
1358
1897
|
};
|
|
1359
1898
|
}
|
|
1360
1899
|
|
|
1900
|
+
/**
|
|
1901
|
+
* FlowDetail 权限(默认拒绝,设计 §3.1 / §7.2)。
|
|
1902
|
+
*/
|
|
1903
|
+
interface FlowDetailPermissions {
|
|
1904
|
+
canEdit: boolean;
|
|
1905
|
+
canDebug: boolean;
|
|
1906
|
+
canExecute: boolean;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
type __VLS_Slots$1 = {
|
|
1910
|
+
header?: () => any;
|
|
1911
|
+
/** 头部右侧操作区追加宿主自定义按钮,位于内置「保存」「执行流程」之后 */
|
|
1912
|
+
headerActions?: (props: {
|
|
1913
|
+
savePending: boolean;
|
|
1914
|
+
canMutateFlow: boolean;
|
|
1915
|
+
}) => any;
|
|
1916
|
+
inputParams?: (props: {
|
|
1917
|
+
node: any;
|
|
1918
|
+
pluginDetail: PluginDetailCommon | null;
|
|
1919
|
+
inputs: any[];
|
|
1920
|
+
editable: boolean;
|
|
1921
|
+
fullVariableList: {
|
|
1922
|
+
key: string;
|
|
1923
|
+
name: string;
|
|
1924
|
+
source_type?: string;
|
|
1925
|
+
custom_type?: string;
|
|
1926
|
+
}[];
|
|
1927
|
+
updateInputParams: (data: Record<string, PluginInputDataItem>) => void;
|
|
1928
|
+
updateNodeInputParams: (inputParams: Record<string, PluginInputDataItem>) => void;
|
|
1929
|
+
updateVariableSourceInfo: (variableKey: string, nodeId: string, formKey: string) => void;
|
|
1930
|
+
}) => any;
|
|
1931
|
+
customFormContent?: (props: {
|
|
1932
|
+
customFormData: Record<string, any>;
|
|
1933
|
+
additionalTaskParams: Record<string, any>;
|
|
1934
|
+
updateCustomFormData: (data: Record<string, any>) => void;
|
|
1935
|
+
updateAdditionalTaskParams: (params: Record<string, any>) => void;
|
|
1936
|
+
}) => any;
|
|
1937
|
+
};
|
|
1938
|
+
type __VLS_Props$1 = {
|
|
1939
|
+
flowId: string;
|
|
1940
|
+
apiConfig: FlowApiConfig | FlowDetailApiConfig;
|
|
1941
|
+
permissions?: Partial<FlowDetailPermissions>;
|
|
1942
|
+
enableVersion?: boolean;
|
|
1943
|
+
flowVersion?: string;
|
|
1944
|
+
defaultZoom?: number;
|
|
1945
|
+
bkflowSaasUrl?: string;
|
|
1946
|
+
enableThirdPlugin?: boolean;
|
|
1947
|
+
quickAdd?: QuickAddConfig;
|
|
1948
|
+
hideTrigger?: boolean;
|
|
1949
|
+
selectPanelConfig?: SelectPanelConfig;
|
|
1950
|
+
memberSelectorConfig?: MemberSelectorConfig;
|
|
1951
|
+
/** 复合条件选择(filter)变量的宿主配置;不传则该类型变量不可用,其余功能不受影响 */
|
|
1952
|
+
filterVariableConfig?: FilterVariableConfig;
|
|
1953
|
+
/** 关联态 select 变量的候选项来源;不传则这类变量的下拉为空,其余功能不受影响 */
|
|
1954
|
+
selectRelatedOptionConfig?: SelectRelatedOptionConfig;
|
|
1955
|
+
onSave?: (flowData: FlowTemplate) => void;
|
|
1956
|
+
onSaveSuccess?: () => void;
|
|
1957
|
+
onExecuteSuccess?: (result: FlowTaskExecuteSuccessResult) => void;
|
|
1958
|
+
onBack?: () => void;
|
|
1959
|
+
};
|
|
1960
|
+
declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$1, {
|
|
1961
|
+
isFlowEdited: ComputedRef<boolean>;
|
|
1962
|
+
updateNodeInputParams: FlowDetailExpose["updateNodeInputParams"];
|
|
1963
|
+
openGlobalVariables: FlowDetailExpose["openGlobalVariables"];
|
|
1964
|
+
openGlobalVariableCreate: FlowDetailExpose["openGlobalVariableCreate"];
|
|
1965
|
+
refreshDebugContext: FlowDetailExpose["refreshDebugContext"];
|
|
1966
|
+
openDebugResult: FlowDetailExpose["openDebugResult"];
|
|
1967
|
+
zoomToFit: FlowDetailExpose["zoomToFit"];
|
|
1968
|
+
centerContent: FlowDetailExpose["centerContent"];
|
|
1969
|
+
getZoom: FlowDetailExpose["getZoom"];
|
|
1970
|
+
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1971
|
+
back: () => any;
|
|
1972
|
+
save: (flowData: FlowTemplate) => any;
|
|
1973
|
+
saveSuccess: () => any;
|
|
1974
|
+
createVariable: (payload: CreateVariablePayload) => any;
|
|
1975
|
+
executeSuccess: (result: FlowTaskExecuteSuccessResult) => any;
|
|
1976
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{
|
|
1977
|
+
onBack?: (() => any) | undefined;
|
|
1978
|
+
onSave?: ((flowData: FlowTemplate) => any) | undefined;
|
|
1979
|
+
onSaveSuccess?: (() => any) | undefined;
|
|
1980
|
+
onCreateVariable?: ((payload: CreateVariablePayload) => any) | undefined;
|
|
1981
|
+
onExecuteSuccess?: ((result: FlowTaskExecuteSuccessResult) => any) | undefined;
|
|
1982
|
+
}>, {
|
|
1983
|
+
quickAdd: QuickAddConfig;
|
|
1984
|
+
enableThirdPlugin: boolean;
|
|
1985
|
+
hideTrigger: boolean;
|
|
1986
|
+
defaultZoom: number;
|
|
1987
|
+
enableVersion: boolean;
|
|
1988
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1989
|
+
declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
1990
|
+
declare const _default$2: typeof __VLS_export$1;
|
|
1991
|
+
|
|
1992
|
+
type __VLS_WithSlots$1<T, S> = T & {
|
|
1993
|
+
new (): {
|
|
1994
|
+
$slots: S;
|
|
1995
|
+
};
|
|
1996
|
+
};
|
|
1997
|
+
|
|
1361
1998
|
type SimulateDebugStage = 'edit' | 'mock-config' | 'mock-running';
|
|
1362
1999
|
type MockFormControl = 'bk-input' | 'bk-input-number' | 'bk-textarea' | 'json-editor' | 'bk-select' | 'bk-checkbox-group' | 'bk-radio-group' | 'bk-switcher' | 'bk-date-picker' | 'bk-date-range-picker' | 'data-table';
|
|
1363
2000
|
interface MockOutputField extends PluginOutputItem {
|
|
@@ -1407,10 +2044,19 @@ declare function isMockableNode(node: NodeType | Activity | undefined | null): n
|
|
|
1407
2044
|
declare const random4: () => string;
|
|
1408
2045
|
declare const generateId: (group?: number) => string;
|
|
1409
2046
|
|
|
2047
|
+
interface ValidatePipelineTreeOptions {
|
|
2048
|
+
/**
|
|
2049
|
+
* 需要「已配置插件」的节点集合,不传时要求全部节点均已配置。
|
|
2050
|
+
*
|
|
2051
|
+
* 单步 / Mock 调试只依赖目标节点自身的配置(后端 step_run 用目标节点单独拼一棵最小流程树),
|
|
2052
|
+
* 画布其余未配置节点不影响调试,因此这类场景只传目标节点,允许空节点先存为草稿。
|
|
2053
|
+
*/
|
|
2054
|
+
requireConfiguredNodeIds?: string[];
|
|
2055
|
+
}
|
|
1410
2056
|
/**
|
|
1411
2057
|
* 画布pipeline_tree数据校验
|
|
1412
2058
|
*/
|
|
1413
|
-
declare const validatePipelineTree: (pipelineTree: PipelineTree) => {
|
|
2059
|
+
declare const validatePipelineTree: (pipelineTree: PipelineTree, options?: ValidatePipelineTreeOptions) => {
|
|
1414
2060
|
valid: boolean;
|
|
1415
2061
|
message: string;
|
|
1416
2062
|
ids: string[];
|
|
@@ -1467,6 +2113,25 @@ declare class BkFlowModelAccessor {
|
|
|
1467
2113
|
get flowModel(): FlowModel;
|
|
1468
2114
|
}
|
|
1469
2115
|
|
|
2116
|
+
/**
|
|
2117
|
+
* 新调试(FlowDetail)向画布节点透出的最小上下文(设计 §14.3)。
|
|
2118
|
+
*
|
|
2119
|
+
* - isMockNode:节点渲染据此显示 MOCK 标签;
|
|
2120
|
+
* - 其余为可选能力:独立调试聚焦态、打开节点调试面板。
|
|
2121
|
+
* 保持可选以兼容仅需 Mock 标签的场景,且不改变对外 npm 公共 API。
|
|
2122
|
+
*/
|
|
2123
|
+
interface DebugCanvasContext {
|
|
2124
|
+
isMockNode(nodeId: string): boolean;
|
|
2125
|
+
/** 节点调试状态;任务节点用它补充未执行(not_run)标识,不写入连线执行态。 */
|
|
2126
|
+
getNodeStatus?(nodeId: string): string | undefined;
|
|
2127
|
+
/** 当前独立调试聚焦节点(不复用 X6 编辑选择态,设计 §9.3.2) */
|
|
2128
|
+
focusedNodeId?(): string;
|
|
2129
|
+
/** 打开该节点详情侧滑的“调试配置”Tab */
|
|
2130
|
+
openNodeDebugPanel?(nodeId: string): void;
|
|
2131
|
+
/** 调试锁定期(running/terminating);节点配置据此展示只读说明 Alert */
|
|
2132
|
+
isLocked?(): boolean;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
1470
2135
|
type __VLS_Props = {
|
|
1471
2136
|
pipelineTree: PipelineTree;
|
|
1472
2137
|
mode?: BkflowBusinessCanvasMode;
|
|
@@ -1478,6 +2143,7 @@ type __VLS_Props = {
|
|
|
1478
2143
|
additionalPlugins?: CanvasPlugin[];
|
|
1479
2144
|
toolbarItems?: CanvasToolbarItem[];
|
|
1480
2145
|
simulateDebugContext?: SimulateDebugCanvasContext;
|
|
2146
|
+
debugContext?: DebugCanvasContext;
|
|
1481
2147
|
};
|
|
1482
2148
|
declare var __VLS_8: {};
|
|
1483
2149
|
declare var __VLS_22: {
|
|
@@ -1572,8 +2238,8 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props, {
|
|
|
1572
2238
|
}) => any) | undefined;
|
|
1573
2239
|
"onFormat-position"?: (() => any) | undefined;
|
|
1574
2240
|
}>, {
|
|
1575
|
-
mode: BkflowBusinessCanvasMode;
|
|
1576
2241
|
thumbnail: boolean;
|
|
2242
|
+
mode: BkflowBusinessCanvasMode;
|
|
1577
2243
|
nodeActions: NodeActionsConfig;
|
|
1578
2244
|
quickAdd: QuickAddConfig;
|
|
1579
2245
|
defaultZoom: number;
|
|
@@ -1616,7 +2282,8 @@ declare function exportToPipelineTree(flowModel: FlowModel): PipelineTree;
|
|
|
1616
2282
|
* 若目标是 placeholder 且删后无入边,级联删除该 placeholder
|
|
1617
2283
|
* - edge.reconnect:若源从条件网关迁出,清理旧条件
|
|
1618
2284
|
* - node.remove:主动查找将被级联删除的边,清理对应网关条件;
|
|
1619
|
-
* 若删除的是分支网关,级联删除关联的 placeholder
|
|
2285
|
+
* 若删除的是分支网关,级联删除关联的 placeholder 节点;
|
|
2286
|
+
* 同时清理全局变量中对被删除节点的 source_info 引用,并删除已无引用的派生变量
|
|
1620
2287
|
*/
|
|
1621
2288
|
declare function createBkflowPlugin(): CanvasPlugin;
|
|
1622
2289
|
|
|
@@ -1645,8 +2312,12 @@ declare const _default: {
|
|
|
1645
2312
|
FlowCreateTask: () => Promise<typeof __create_task_vue>;
|
|
1646
2313
|
FlowExecute: () => Promise<typeof __execute_vue>;
|
|
1647
2314
|
FlowDebug: () => Promise<typeof __debug_vue>;
|
|
2315
|
+
/**
|
|
2316
|
+
* @deprecated Use FlowDetail with permissions.canDebug instead.
|
|
2317
|
+
* FlowMockDebug will be removed in the next major version.
|
|
2318
|
+
*/
|
|
1648
2319
|
FlowMockDebug: () => Promise<typeof __mock_vue>;
|
|
1649
2320
|
};
|
|
1650
2321
|
|
|
1651
|
-
export { _default$1 as BkFlowCanvas, BkFlowModelAccessor, BkFlowNodeAccessor, _default$
|
|
1652
|
-
export type { Activity, DndNodeItem, ExecutionNodeAction, FlowApiConfig, FlowEditExpose, FlowTemplate, Gateway, GatewayCondition, MemberSelectorConfig, MockOutputField, NodeExecutionState, NodeExecutionStatus, NodeMockConfig, NotifyConfig, PipelineTree, PluginDetailCommon, PluginInputDataItem, SelectPanelConfig, SimulateDebugCanvasContext, SimulateDebugStage, SimulateDebugState, SpaceFlowConfig, TaskExecutionStates, TemplateConfigs, TriggerCron, TriggerItem, UniformApiPluginInputsItem, UpdateFlowParams, Variable, VariableReference };
|
|
2322
|
+
export { _default$1 as BkFlowCanvas, BkFlowModelAccessor, BkFlowNodeAccessor, _default$5 as FlowCreateTask, _default$7 as FlowDebug, _default$2 as FlowDetail, _default$4 as FlowEdit, _default$6 as FlowExecute, _default$8 as FlowMockDebug, _default$3 as FlowView, bkflowConnectionValidator, createBkflowPlugin, createBkflowSchema, createExecutionStatusPlugin, _default as default, exportToPipelineTree, generateId, getUniformApiPluginFormValue, getVariableDefaultConfig, importFromPipelineTree, isMockableNode, mergeOutputs, normalizePluginOutputItems, provideFilterVariableConfig, provideFlowApiConfig, provideMemberSelectorConfig, provideSelectPanelConfig, provideSelectRelatedOptionConfig, random4, resolveExecutionActions, resolveMockFormControl, useFlowApiConfig, useFlowEditApiConfig, useFlowViewApiConfig, useMemberSelectorConfig, useSelectPanelConfig, validatePipelineTree };
|
|
2323
|
+
export type { Activity, CanvasViewportExpose, CreateFlowTaskResult, DndNodeItem, ExecuteFlowTaskResult, ExecutionNodeAction, FilterCandidateQuery, FilterConditionOptions, FilterConditionValue, FilterVariableConfig, FilterVariableSourceContext, FilterVariableSourceNodeComponent, FilterWhereItem, FilterWhereValue, FlowApiConfig, FlowDetailExpose, FlowDetailPermissions, FlowEditExpose, FlowTaskExecuteSuccessResult, FlowTemplate, FlowViewExpose, Gateway, GatewayCondition, GlobalVariableCreateExpose, MemberSelectorConfig, MockOutputField, NodeExecutionState, NodeExecutionStatus, NodeMockConfig, NotifyConfig, OpenFilterVariableCreateRequest, OpenGlobalVariableCreateRequest, OpenStandardVariableCreateRequest, PipelineTree, PluginDetailCommon, PluginInputDataItem, RetrievalFilterField, SelectPanelConfig, SelectRelatedOptionConfig, SelectRelatedOptionItem, SelectRelatedOptionSource, SelectRelatedOptionSourceRef, SelectRelatedSourceContext, SimulateDebugCanvasContext, SimulateDebugStage, SimulateDebugState, SpaceFlowConfig, TaskExecutionStates, TemplateConfigs, TriggerCron, TriggerItem, UniformApiPluginInputsItem, UpdateFlowParams, Variable, VariableReference };
|