@blueking/bkflow-canvas-editor 1.1.0-beta.0 → 1.1.0-beta.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 +237 -42
- package/dist/advanced.cjs.js +1 -1
- package/dist/advanced.d.ts +387 -35
- package/dist/advanced.esm.js +1 -1
- package/dist/bkflow-canvas-editor_false-B70uLuHL.cjs +1 -0
- package/dist/bkflow-canvas-editor_false-BlC281Zg.cjs +1 -0
- package/dist/bkflow-canvas-editor_false-Casww7p4.js +5 -0
- package/dist/bkflow-canvas-editor_false-i9G8sqQi.js +5 -0
- package/dist/{composable-QLQKeBKC.js → composable-Cf47ka9M.js} +381 -192
- package/dist/composable-YlUVct40.cjs +1 -0
- package/dist/index-Bf3z3UZx.cjs +1 -0
- package/dist/index-C16qU3Yx.js +47169 -0
- package/dist/index-CKYqFEfP.cjs +1 -0
- package/dist/index-CyWnToNA.js +159 -0
- package/dist/index-DOcgB3JP.cjs +70 -0
- package/dist/index-Dm3eGl5T.js +504 -0
- package/dist/index-DoCdunh9.js +184 -0
- package/dist/index-DzvB2ICU.cjs +1 -0
- package/dist/index.cjs.js +1 -70
- package/dist/index.d.ts +817 -152
- package/dist/index.esm.js +38 -43048
- package/dist/style.css +1 -1
- package/dist/style.d.ts +2 -0
- package/package.json +18 -7
- package/dist/composable-CNiwlaFl.cjs +0 -1
package/dist/advanced.d.ts
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
2
|
|
|
3
|
-
type NodeExecutionStatus = 'CREATED' | 'RUNNING' | 'FINISHED' | 'FAILED' | 'SUSPENDED' | 'REVOKED';
|
|
3
|
+
type NodeExecutionStatus = 'CREATED' | 'RUNNING' | 'FINISHED' | 'FAILED' | 'SUSPENDED' | 'REVOKED' | 'SKIP';
|
|
4
|
+
type ExecutionNodeAction = 'retry' | 'skip' | 'resume' | 'approve' | 'forceFail' | 'gatewaySkip';
|
|
5
|
+
interface NodeExecutionState {
|
|
6
|
+
status: NodeExecutionStatus;
|
|
7
|
+
version?: string;
|
|
8
|
+
start_time?: string;
|
|
9
|
+
finish_time?: string;
|
|
10
|
+
elapsed_time?: number;
|
|
11
|
+
/** 旧版任务引擎的 task 状态,优先用于识别 REVOKED */
|
|
12
|
+
taskState?: string;
|
|
13
|
+
/** 兼容旧版 snake_case 字段 */
|
|
14
|
+
task_state?: string;
|
|
15
|
+
/** 节点组件 code,如 pause_node / bk_approve,用于动作分流 */
|
|
16
|
+
nodeCode?: string;
|
|
17
|
+
/** 兼容旧版 snake_case 字段 */
|
|
18
|
+
code?: string;
|
|
19
|
+
/** 编辑态配置:失败可重试 */
|
|
20
|
+
retryable?: boolean;
|
|
21
|
+
/** 编辑态配置:失败可跳过 */
|
|
22
|
+
skippable?: boolean;
|
|
23
|
+
/** 编辑态配置:自动忽略错误(隐含 retry/skip 权限) */
|
|
24
|
+
errorIgnorable?: boolean;
|
|
25
|
+
/** 兼容旧版 snake_case 字段 */
|
|
26
|
+
error_ignorable?: boolean;
|
|
27
|
+
/** 是否有管理员权限,影响强制终止按钮 */
|
|
28
|
+
hasAdminPerm?: boolean;
|
|
29
|
+
/** 兼容旧版 snake_case 字段 */
|
|
30
|
+
has_admin_perm?: boolean;
|
|
31
|
+
/** 运行时信息:实际重试次数 */
|
|
32
|
+
retry?: number;
|
|
33
|
+
/** 运行时信息:是否已跳过 */
|
|
34
|
+
skip?: boolean;
|
|
35
|
+
/** 运行时信息:是否自动忽略错误 */
|
|
36
|
+
errorIgnored?: boolean;
|
|
37
|
+
/** 兼容旧版 snake_case 字段 */
|
|
38
|
+
error_ignored?: boolean;
|
|
39
|
+
/** 运行时信息:循环次数 */
|
|
40
|
+
loop?: number;
|
|
41
|
+
/** 运行时信息:生命周期阶段 */
|
|
42
|
+
phase?: number;
|
|
43
|
+
/** 若由上游直接给出操作列表,则 resolver 不再推导 */
|
|
44
|
+
actions?: ExecutionNodeAction[];
|
|
45
|
+
/** 兼容旧版后端直接透出的动作数组字段 */
|
|
46
|
+
action_list?: ExecutionNodeAction[];
|
|
47
|
+
}
|
|
48
|
+
type TaskExecutionStates = Record<string, NodeExecutionState>;
|
|
4
49
|
|
|
5
50
|
type PortOrientation = 'Top' | 'Right' | 'Bottom' | 'Left';
|
|
6
51
|
|
|
@@ -470,6 +515,19 @@ interface BkflowThirdPartyPluginAppDetail {
|
|
|
470
515
|
interface GroupsPluginItem extends PluginGroupConfig {
|
|
471
516
|
children: (PluginMetaItem | BkflowThirdPartyPluginGroupItem)[];
|
|
472
517
|
}
|
|
518
|
+
interface UniformApiPluginOutputItem {
|
|
519
|
+
key: string;
|
|
520
|
+
name?: string;
|
|
521
|
+
type?: string;
|
|
522
|
+
description?: string;
|
|
523
|
+
schema?: Record<string, any>;
|
|
524
|
+
form_type?: string;
|
|
525
|
+
options?: Array<{
|
|
526
|
+
label?: string;
|
|
527
|
+
value?: unknown;
|
|
528
|
+
text?: string;
|
|
529
|
+
}>;
|
|
530
|
+
}
|
|
473
531
|
interface UniformApiPluginDetail {
|
|
474
532
|
alias: string;
|
|
475
533
|
bk_tenant_id: string;
|
|
@@ -484,7 +542,7 @@ interface UniformApiPluginDetail {
|
|
|
484
542
|
url: string;
|
|
485
543
|
methods: string[];
|
|
486
544
|
inputs: Record<string, any>;
|
|
487
|
-
outputs
|
|
545
|
+
outputs?: Array<UniformApiPluginOutputItem | string>;
|
|
488
546
|
scope_id: string;
|
|
489
547
|
sign: string;
|
|
490
548
|
updated_at: string;
|
|
@@ -542,6 +600,184 @@ interface CustomVariableType {
|
|
|
542
600
|
code: string;
|
|
543
601
|
}
|
|
544
602
|
|
|
603
|
+
type DebugContextStatus = 'idle' | 'running' | 'terminating';
|
|
604
|
+
type DebugNodeStatus = 'not_run' | 'running' | 'waiting' | 'paused' | 'finished' | 'failed' | 'suspended' | 'skipped';
|
|
605
|
+
type DebugExecutionMode = 'real' | 'mock';
|
|
606
|
+
interface DebugMissingVar {
|
|
607
|
+
key: string;
|
|
608
|
+
source_node_id: string | null;
|
|
609
|
+
}
|
|
610
|
+
type DebugRunMode = DebugExecutionMode | 'mixed';
|
|
611
|
+
type DebugRunType = 'global' | 'step';
|
|
612
|
+
type DebugRunStatus = 'not_run' | 'running' | 'waiting' | 'paused' | 'terminating' | 'finished' | 'failed' | 'revoked';
|
|
613
|
+
/** 运行级 / 节点级错误详情(last_error_detail、nodes[].error_detail)。 */
|
|
614
|
+
interface DebugErrorFailure {
|
|
615
|
+
message: string;
|
|
616
|
+
node_id?: string;
|
|
617
|
+
template_node_id?: string;
|
|
618
|
+
[key: string]: unknown;
|
|
619
|
+
}
|
|
620
|
+
interface DebugErrorDetail {
|
|
621
|
+
type?: string;
|
|
622
|
+
message?: string;
|
|
623
|
+
task_id?: number | string;
|
|
624
|
+
failures?: DebugErrorFailure[];
|
|
625
|
+
[key: string]: unknown;
|
|
626
|
+
}
|
|
627
|
+
interface DebugContextNode {
|
|
628
|
+
node_id: string;
|
|
629
|
+
node_type: string;
|
|
630
|
+
execution_mode: DebugExecutionMode;
|
|
631
|
+
status: DebugNodeStatus;
|
|
632
|
+
can_step: boolean;
|
|
633
|
+
missing_vars: DebugMissingVar[];
|
|
634
|
+
waiting_reason?: string | null;
|
|
635
|
+
mock_result?: 'success' | 'fail' | null;
|
|
636
|
+
error_detail?: DebugErrorDetail | string | null;
|
|
637
|
+
duration_ms?: number | null;
|
|
638
|
+
log_ref?: {
|
|
639
|
+
instance_id: number | string;
|
|
640
|
+
node_id: string;
|
|
641
|
+
version: string;
|
|
642
|
+
} | null;
|
|
643
|
+
mock_outputs?: Record<string, unknown> | null;
|
|
644
|
+
mock_error?: string | null;
|
|
645
|
+
outputs?: Record<string, unknown> | null;
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* /debug_context/ 顶层结构。
|
|
649
|
+
*
|
|
650
|
+
* 前端按 status 分支:
|
|
651
|
+
* - running:任务定位用 active_*,进度用 last_run_status
|
|
652
|
+
* - terminating:继续用 active_*,UI 展示「终止中」并轮询
|
|
653
|
+
* - idle:active_* 为空,结果摘要用 last_*;last_task_id=null 表示尚无调试记录
|
|
654
|
+
*/
|
|
655
|
+
interface DebugContext {
|
|
656
|
+
template_id: number;
|
|
657
|
+
status: DebugContextStatus;
|
|
658
|
+
locked_by: string;
|
|
659
|
+
active_task_id: number | string | null;
|
|
660
|
+
active_run_type: DebugRunType | null;
|
|
661
|
+
active_node_id: string | null;
|
|
662
|
+
last_task_id: number | string | null;
|
|
663
|
+
last_run_type: DebugRunType | null;
|
|
664
|
+
last_run_status: DebugRunStatus | null;
|
|
665
|
+
last_error_detail?: DebugErrorDetail | null;
|
|
666
|
+
last_inputs?: Record<string, unknown>;
|
|
667
|
+
global_vars: Record<string, unknown>;
|
|
668
|
+
missing_vars?: DebugMissingVar[];
|
|
669
|
+
nodes: DebugContextNode[];
|
|
670
|
+
}
|
|
671
|
+
interface DebugInputSchemaField {
|
|
672
|
+
key: string;
|
|
673
|
+
name: string;
|
|
674
|
+
type: string;
|
|
675
|
+
default?: unknown;
|
|
676
|
+
required?: boolean;
|
|
677
|
+
[key: string]: unknown;
|
|
678
|
+
}
|
|
679
|
+
interface DebugInputSchema {
|
|
680
|
+
fields?: DebugInputSchemaField[];
|
|
681
|
+
constants?: Record<string, unknown>;
|
|
682
|
+
[key: string]: unknown;
|
|
683
|
+
}
|
|
684
|
+
interface DebugHistoryRun {
|
|
685
|
+
task_id?: number | string | null;
|
|
686
|
+
operator?: string;
|
|
687
|
+
started_at?: string;
|
|
688
|
+
finished_at?: string;
|
|
689
|
+
status?: DebugRunStatus | string;
|
|
690
|
+
run_type?: DebugRunType;
|
|
691
|
+
run_mode?: DebugRunMode;
|
|
692
|
+
[key: string]: unknown;
|
|
693
|
+
}
|
|
694
|
+
interface DebugHistory {
|
|
695
|
+
runs?: DebugHistoryRun[];
|
|
696
|
+
[key: string]: unknown;
|
|
697
|
+
}
|
|
698
|
+
interface DebugResetImpact {
|
|
699
|
+
reset_node_ids: string[];
|
|
700
|
+
reasons?: Record<string, string>;
|
|
701
|
+
}
|
|
702
|
+
interface DebugGlobalVarsResult {
|
|
703
|
+
global_vars: Record<string, unknown>;
|
|
704
|
+
[key: string]: unknown;
|
|
705
|
+
}
|
|
706
|
+
interface UpdateNodeDebugMockResult {
|
|
707
|
+
node_id: string;
|
|
708
|
+
execution_mode: DebugExecutionMode;
|
|
709
|
+
updated_global_vars?: Record<string, unknown>;
|
|
710
|
+
[key: string]: unknown;
|
|
711
|
+
}
|
|
712
|
+
interface RunNodeDebugStepResult {
|
|
713
|
+
node_id: string;
|
|
714
|
+
status: DebugNodeStatus;
|
|
715
|
+
outputs?: Record<string, unknown> | null;
|
|
716
|
+
error_detail?: unknown;
|
|
717
|
+
updated_global_vars?: Record<string, unknown>;
|
|
718
|
+
log_ref?: DebugContextNode['log_ref'];
|
|
719
|
+
[key: string]: unknown;
|
|
720
|
+
}
|
|
721
|
+
interface RunGlobalDebugResult {
|
|
722
|
+
task_id: number | string;
|
|
723
|
+
status: DebugContextStatus;
|
|
724
|
+
[key: string]: unknown;
|
|
725
|
+
}
|
|
726
|
+
interface TerminateDebugResult {
|
|
727
|
+
status?: DebugContextStatus;
|
|
728
|
+
[key: string]: unknown;
|
|
729
|
+
}
|
|
730
|
+
interface DebugResetResult {
|
|
731
|
+
reset_node_ids?: string[];
|
|
732
|
+
[key: string]: unknown;
|
|
733
|
+
}
|
|
734
|
+
interface UpdateDebugContextVariableParams {
|
|
735
|
+
templateId: string | number;
|
|
736
|
+
key: string;
|
|
737
|
+
value: unknown;
|
|
738
|
+
}
|
|
739
|
+
interface UpdateNodeDebugMockParams {
|
|
740
|
+
templateId: string | number;
|
|
741
|
+
nodeId: string;
|
|
742
|
+
enable: boolean;
|
|
743
|
+
mockResult?: 'success' | 'fail';
|
|
744
|
+
mockOutputs?: Record<string, unknown>;
|
|
745
|
+
mockError?: string;
|
|
746
|
+
}
|
|
747
|
+
interface RunNodeDebugStepParams {
|
|
748
|
+
templateId: string | number;
|
|
749
|
+
nodeId: string;
|
|
750
|
+
mode: 'real' | 'mock';
|
|
751
|
+
inputOverrides?: Record<string, unknown>;
|
|
752
|
+
mockResult?: 'success' | 'fail';
|
|
753
|
+
mockOutputs?: Record<string, unknown>;
|
|
754
|
+
mockError?: string;
|
|
755
|
+
}
|
|
756
|
+
interface RunGlobalDebugParams {
|
|
757
|
+
templateId: string | number;
|
|
758
|
+
inputs: Record<string, unknown>;
|
|
759
|
+
}
|
|
760
|
+
interface TerminateDebugParams {
|
|
761
|
+
templateId: string | number;
|
|
762
|
+
nodeId?: string;
|
|
763
|
+
}
|
|
764
|
+
interface ResetDebugResultParams {
|
|
765
|
+
templateId: string | number;
|
|
766
|
+
nodeIds?: string[];
|
|
767
|
+
}
|
|
768
|
+
interface DebugApiServices {
|
|
769
|
+
fetchDebugContext(templateId: string | number): Promise<DebugContext>;
|
|
770
|
+
fetchDebugInputSchema(templateId: string | number): Promise<DebugInputSchema>;
|
|
771
|
+
fetchDebugHistory(templateId: string | number): Promise<DebugHistory>;
|
|
772
|
+
fetchDebugResetImpact(templateId: string | number): Promise<DebugResetImpact>;
|
|
773
|
+
updateDebugContextVariable(params: UpdateDebugContextVariableParams): Promise<DebugGlobalVarsResult>;
|
|
774
|
+
updateNodeDebugMock(params: UpdateNodeDebugMockParams): Promise<UpdateNodeDebugMockResult>;
|
|
775
|
+
runNodeDebugStep(params: RunNodeDebugStepParams): Promise<RunNodeDebugStepResult>;
|
|
776
|
+
runGlobalDebug(params: RunGlobalDebugParams): Promise<RunGlobalDebugResult>;
|
|
777
|
+
terminateDebug(params: TerminateDebugParams): Promise<TerminateDebugResult>;
|
|
778
|
+
resetDebugResult(params: ResetDebugResultParams): Promise<DebugResetResult>;
|
|
779
|
+
}
|
|
780
|
+
|
|
545
781
|
/**
|
|
546
782
|
* Flow API 配置接口
|
|
547
783
|
*/
|
|
@@ -558,8 +794,14 @@ interface FlowApiConfig {
|
|
|
558
794
|
scopeData: {
|
|
559
795
|
scope_type: string;
|
|
560
796
|
scope_value: number;
|
|
797
|
+
/** 业务方传入的空间 ID,调试接口专用,语义独立于 scope_value */
|
|
798
|
+
space_id: number;
|
|
561
799
|
};
|
|
562
|
-
/**
|
|
800
|
+
/**
|
|
801
|
+
* 用户查询 API 地址(可选)
|
|
802
|
+
* @deprecated 请改用 FlowEdit/FlowView 顶层组件的 `memberSelectorConfig.fetchUserApi`。
|
|
803
|
+
* 该字段仅保留向后兼容,未来版本会移除。
|
|
804
|
+
*/
|
|
563
805
|
fetchUserApi?: string;
|
|
564
806
|
/** 是否启用第三方插件(可选,默认为 true) */
|
|
565
807
|
enableThirdPlugin?: boolean;
|
|
@@ -573,16 +815,109 @@ interface DrawPipelineParams {
|
|
|
573
815
|
gateway_size?: [number, number];
|
|
574
816
|
start?: [number, number];
|
|
575
817
|
}
|
|
818
|
+
interface CreateMockDebugTaskParams {
|
|
819
|
+
template_id: number;
|
|
820
|
+
name: string;
|
|
821
|
+
pipeline_tree: PipelineTree;
|
|
822
|
+
mock_data: {
|
|
823
|
+
nodes: string[];
|
|
824
|
+
outputs: Record<string, Record<string, unknown>>;
|
|
825
|
+
mock_data_ids?: Record<string, number | string>;
|
|
826
|
+
};
|
|
827
|
+
creator?: string;
|
|
828
|
+
}
|
|
829
|
+
interface StopMockDebugTaskParams {
|
|
830
|
+
task_id: number | string;
|
|
831
|
+
}
|
|
832
|
+
interface FetchTaskStateParams {
|
|
833
|
+
task_id: number | string;
|
|
834
|
+
}
|
|
835
|
+
interface FetchTaskNodeDetailParams {
|
|
836
|
+
task_id: number | string;
|
|
837
|
+
node_id: string;
|
|
838
|
+
}
|
|
839
|
+
interface FetchTaskNodeSnapshotParams {
|
|
840
|
+
task_id: number | string;
|
|
841
|
+
node_id: string;
|
|
842
|
+
}
|
|
843
|
+
interface FetchTaskNodeLogParams {
|
|
844
|
+
task_id: number | string;
|
|
845
|
+
node_id: string;
|
|
846
|
+
version: string;
|
|
847
|
+
}
|
|
848
|
+
interface OperateTaskNodeParams {
|
|
849
|
+
task_id: number | string;
|
|
850
|
+
node_id: string;
|
|
851
|
+
action: ExecutionNodeAction;
|
|
852
|
+
data?: Record<string, unknown>;
|
|
853
|
+
/** 自定义 operation,优先级高于 action 默认映射 */
|
|
854
|
+
operation?: string;
|
|
855
|
+
}
|
|
856
|
+
interface GetFlowTaskDetailParams {
|
|
857
|
+
task_id: number | string;
|
|
858
|
+
}
|
|
859
|
+
interface FlowTaskDetail {
|
|
860
|
+
id: number | string;
|
|
861
|
+
template_id: number;
|
|
862
|
+
pipeline_tree: PipelineTree;
|
|
863
|
+
[key: string]: unknown;
|
|
864
|
+
}
|
|
865
|
+
interface CreateFlowTaskParams {
|
|
866
|
+
template_id: number;
|
|
867
|
+
name: string;
|
|
868
|
+
creator: string;
|
|
869
|
+
constants: Record<string, any>;
|
|
870
|
+
label_ids?: number[];
|
|
871
|
+
[key: string]: unknown;
|
|
872
|
+
}
|
|
873
|
+
interface CreateFlowTaskResult {
|
|
874
|
+
data: {
|
|
875
|
+
id: number | string;
|
|
876
|
+
template_id?: number;
|
|
877
|
+
[key: string]: unknown;
|
|
878
|
+
};
|
|
879
|
+
[key: string]: unknown;
|
|
880
|
+
}
|
|
881
|
+
interface ExecuteFlowTaskResult {
|
|
882
|
+
result?: boolean;
|
|
883
|
+
code?: number;
|
|
884
|
+
data?: {
|
|
885
|
+
/** 任务详情页跳转地址(含正确的 bkflow task id 与 templateId) */
|
|
886
|
+
url?: string;
|
|
887
|
+
[key: string]: unknown;
|
|
888
|
+
};
|
|
889
|
+
message?: string | null;
|
|
890
|
+
request_id?: string;
|
|
891
|
+
trace_id?: string | null;
|
|
892
|
+
[key: string]: unknown;
|
|
893
|
+
}
|
|
894
|
+
interface TaskStateResult {
|
|
895
|
+
state?: string;
|
|
896
|
+
status?: string;
|
|
897
|
+
node_states?: TaskExecutionStates;
|
|
898
|
+
states?: Record<string, unknown>;
|
|
899
|
+
children?: Record<string, unknown> | unknown[];
|
|
900
|
+
nodes?: Record<string, unknown> | unknown[];
|
|
901
|
+
activities?: Record<string, unknown>;
|
|
902
|
+
gateways?: Record<string, unknown>;
|
|
903
|
+
[key: string]: unknown;
|
|
904
|
+
}
|
|
576
905
|
|
|
577
906
|
interface FlowViewApiConfig {
|
|
578
907
|
fetchFlowDetail: (id: string) => Promise<FlowTemplate>;
|
|
579
908
|
fetchSpaceFlowConfig: (id: string) => Promise<SpaceFlowConfig>;
|
|
580
909
|
fetchSystemVariables: (id: string) => Promise<Variable[]>;
|
|
910
|
+
/**
|
|
911
|
+
* 用户查询 API 地址
|
|
912
|
+
* @deprecated 请改用 memberSelectorConfig.fetchUserApi(顶层组件 prop)
|
|
913
|
+
*/
|
|
581
914
|
fetchUserApi?: string;
|
|
582
915
|
/** 作用域数据(必需,由外部传入) */
|
|
583
916
|
scopeData: {
|
|
584
917
|
scope_type: string;
|
|
585
918
|
scope_value: number;
|
|
919
|
+
/** 业务方传入的空间 ID,调试接口专用,语义独立于 scope_value */
|
|
920
|
+
space_id: number;
|
|
586
921
|
};
|
|
587
922
|
fetchFlowDraftDetail?: (id: string) => Promise<FlowDraftDetail>;
|
|
588
923
|
fetchFlowDetailByVersion?: (id: string, version: string) => Promise<FlowDetailByVersion>;
|
|
@@ -602,24 +937,32 @@ interface FlowViewApiConfig {
|
|
|
602
937
|
data: any[];
|
|
603
938
|
};
|
|
604
939
|
}>;
|
|
605
|
-
createFlowTask?: (params:
|
|
606
|
-
template_id: number;
|
|
607
|
-
name: string;
|
|
608
|
-
creator: string;
|
|
609
|
-
constants: Record<string, any>;
|
|
610
|
-
}) => Promise<{
|
|
611
|
-
data: {
|
|
612
|
-
id: number;
|
|
613
|
-
template_id: number;
|
|
614
|
-
};
|
|
615
|
-
}>;
|
|
940
|
+
createFlowTask?: (params: CreateFlowTaskParams) => Promise<CreateFlowTaskResult>;
|
|
616
941
|
executeFlowTask?: (params: {
|
|
617
|
-
task_id: number;
|
|
618
|
-
action: string;
|
|
942
|
+
task_id: number | string;
|
|
619
943
|
resource_type: string;
|
|
620
|
-
resource_id: number;
|
|
944
|
+
resource_id: number | string;
|
|
945
|
+
permission_type: string;
|
|
946
|
+
}) => Promise<ExecuteFlowTaskResult>;
|
|
947
|
+
revokeFlowTask?: (params: {
|
|
948
|
+
task_id: number | string;
|
|
949
|
+
resource_type: string;
|
|
950
|
+
resource_id: number | string;
|
|
621
951
|
permission_type: string;
|
|
622
952
|
}) => Promise<any>;
|
|
953
|
+
createMockDebugTask?: (params: CreateMockDebugTaskParams) => Promise<{
|
|
954
|
+
data: {
|
|
955
|
+
id: number | string;
|
|
956
|
+
template_id: number;
|
|
957
|
+
};
|
|
958
|
+
}>;
|
|
959
|
+
stopMockDebugTask?: (params: StopMockDebugTaskParams) => Promise<void>;
|
|
960
|
+
fetchTaskState?: (params: FetchTaskStateParams) => Promise<TaskStateResult>;
|
|
961
|
+
fetchTaskNodeDetail?: (params: FetchTaskNodeDetailParams) => Promise<unknown>;
|
|
962
|
+
fetchTaskNodeSnapshot?: (params: FetchTaskNodeSnapshotParams) => Promise<unknown>;
|
|
963
|
+
fetchTaskNodeLog?: (params: FetchTaskNodeLogParams) => Promise<unknown>;
|
|
964
|
+
operateTaskNode?: (params: OperateTaskNodeParams) => Promise<unknown>;
|
|
965
|
+
getFlowTaskDetail?: (params: GetFlowTaskDetailParams) => Promise<FlowTaskDetail>;
|
|
623
966
|
fetchControlConfig?: () => Promise<Record<string, any>>;
|
|
624
967
|
checkSpaceConfig?: (scopeValue: number, params: {
|
|
625
968
|
name: string;
|
|
@@ -647,7 +990,7 @@ interface FlowEditApiConfig extends FlowViewApiConfig {
|
|
|
647
990
|
fetchBkFlowThirdPartyPluginTags: () => Promise<BkflowThirdPartyPluginGroupItem[]>;
|
|
648
991
|
fetchBkFlowThirdPartyPluginMeta: (plugin_code: string) => Promise<BkflowThirdPartyPluginMetaDetail>;
|
|
649
992
|
fetchBkFlowThirdPartyPluginDetail: (plugin_code: string, plugin_version: string) => Promise<BkflowThirdPartyPluginDetail>;
|
|
650
|
-
fetchBkFlowThirdPartyPluginAppDetail: (plugin_code: string) => Promise<BkflowThirdPartyPluginAppDetail>;
|
|
993
|
+
fetchBkFlowThirdPartyPluginAppDetail: (plugin_code: string, plugin_version: string) => Promise<BkflowThirdPartyPluginAppDetail>;
|
|
651
994
|
fetchPluginGroupList: () => Promise<PluginGroupConfig[]>;
|
|
652
995
|
fetchCategoryPlugins: (category: string) => Promise<PluginMetaItem[]>;
|
|
653
996
|
fetchAllPluginGroups: () => Promise<GroupsPluginItem[]>;
|
|
@@ -657,33 +1000,42 @@ interface FlowEditApiConfig extends FlowViewApiConfig {
|
|
|
657
1000
|
drawPipeline?: (params: DrawPipelineParams) => Promise<{
|
|
658
1001
|
pipeline_tree: PipelineTree;
|
|
659
1002
|
}>;
|
|
660
|
-
createFlowTask?: (params:
|
|
661
|
-
template_id: number;
|
|
662
|
-
name: string;
|
|
663
|
-
creator: string;
|
|
664
|
-
constants: Record<string, any>;
|
|
665
|
-
}) => Promise<{
|
|
666
|
-
data: {
|
|
667
|
-
id: number;
|
|
668
|
-
template_id: number;
|
|
669
|
-
};
|
|
670
|
-
}>;
|
|
1003
|
+
createFlowTask?: (params: CreateFlowTaskParams) => Promise<CreateFlowTaskResult>;
|
|
671
1004
|
executeFlowTask?: (params: {
|
|
672
|
-
task_id: number;
|
|
673
|
-
|
|
1005
|
+
task_id: number | string;
|
|
1006
|
+
resource_type: string;
|
|
1007
|
+
resource_id: number | string;
|
|
1008
|
+
permission_type: string;
|
|
1009
|
+
}) => Promise<ExecuteFlowTaskResult>;
|
|
1010
|
+
revokeFlowTask?: (params: {
|
|
1011
|
+
task_id: number | string;
|
|
674
1012
|
resource_type: string;
|
|
675
|
-
resource_id: number;
|
|
1013
|
+
resource_id: number | string;
|
|
676
1014
|
permission_type: string;
|
|
677
1015
|
}) => Promise<any>;
|
|
1016
|
+
createMockDebugTask?: (params: CreateMockDebugTaskParams) => Promise<{
|
|
1017
|
+
data: {
|
|
1018
|
+
id: number | string;
|
|
1019
|
+
template_id: number;
|
|
1020
|
+
};
|
|
1021
|
+
}>;
|
|
1022
|
+
stopMockDebugTask?: (params: StopMockDebugTaskParams) => Promise<void>;
|
|
1023
|
+
fetchTaskState?: (params: FetchTaskStateParams) => Promise<TaskStateResult>;
|
|
1024
|
+
fetchTaskNodeDetail?: (params: FetchTaskNodeDetailParams) => Promise<unknown>;
|
|
1025
|
+
fetchTaskNodeSnapshot?: (params: FetchTaskNodeSnapshotParams) => Promise<unknown>;
|
|
1026
|
+
fetchTaskNodeLog?: (params: FetchTaskNodeLogParams) => Promise<unknown>;
|
|
1027
|
+
getFlowTaskDetail?: (params: GetFlowTaskDetailParams) => Promise<FlowTaskDetail>;
|
|
1028
|
+
}
|
|
1029
|
+
interface FlowDetailApiConfig extends FlowEditApiConfig, Partial<DebugApiServices> {
|
|
678
1030
|
}
|
|
679
1031
|
|
|
680
1032
|
declare const PLUGIN_GROUP_ICON_MAP: Record<string, string>;
|
|
681
1033
|
|
|
682
1034
|
/**
|
|
683
1035
|
* 使用 Flow API 的 composable
|
|
684
|
-
* 返回所有 API 方法,兼容
|
|
1036
|
+
* 返回所有 API 方法,兼容 FlowDetailApiConfig 接口(含调试 API)
|
|
685
1037
|
*/
|
|
686
|
-
declare function useFlowApi(config: FlowApiConfig):
|
|
1038
|
+
declare function useFlowApi(config: FlowApiConfig): FlowDetailApiConfig;
|
|
687
1039
|
|
|
688
1040
|
export { PLUGIN_GROUP_ICON_MAP, useFlowApi };
|
|
689
|
-
export type { CustomVariableType, EndEvent, Flow, FlowEditApiConfig, FlowListItem, FlowViewApiConfig, GatewayType, Line, Location, NodeConfigData, NodeType, NotifyConfig, PluginGroupConfig, PluginOutputItem, PortOrientation, StartEvent, TemplateConfigs, UniformApiPluginConfig, UniformApiPluginInputsItem, VariableRefRequestParams };
|
|
1041
|
+
export type { CustomVariableType, DebugApiServices, DebugContext, DebugContextNode, DebugContextStatus, DebugErrorDetail, DebugExecutionMode, DebugInputSchema, DebugMissingVar, DebugNodeStatus, DebugRunStatus, DebugRunType, EndEvent, Flow, FlowDetailApiConfig, FlowEditApiConfig, FlowListItem, FlowViewApiConfig, GatewayType, Line, Location, NodeConfigData, NodeType, NotifyConfig, PluginGroupConfig, PluginOutputItem, PortOrientation, StartEvent, TemplateConfigs, UniformApiPluginConfig, UniformApiPluginInputsItem, VariableRefRequestParams };
|
package/dist/advanced.esm.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={};throw new Error('Could not resolve "@blueking/bk-user-selector/vue3/vue3.css" imported by "@blueking/bkflow-canvas-editor".');exports.default=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={};throw new Error('Could not resolve "@blueking/bk-user-selector" imported by "@blueking/bkflow-canvas-editor".');exports.default=e;
|