@yiyi_zhang/reactflow-ui 1.2.0 → 1.3.1

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.
Files changed (116) hide show
  1. package/README.md +8 -6
  2. package/dist/AiWorkflowIDE.d.ts +13 -0
  3. package/dist/WorkflowIDE.d.ts +9 -0
  4. package/dist/actions/builtin/coerce.d.ts +9 -0
  5. package/dist/actions/types.d.ts +1 -0
  6. package/dist/ai.d.ts +21 -2
  7. package/dist/components/AiNative/AgentTimeline.d.ts +1 -1
  8. package/dist/components/AiNative/ClarificationCard.d.ts +3 -2
  9. package/dist/components/AiNative/InlineCanvasCopilot.d.ts +2 -1
  10. package/dist/components/AiNative/RepairCard.d.ts +3 -2
  11. package/dist/components/AiNative/mermaidParser.d.ts +31 -0
  12. package/dist/components/AiNative/repairActions.d.ts +16 -0
  13. package/dist/components/AiNative/runInputs.d.ts +13 -0
  14. package/dist/components/BrandLogo.d.ts +2 -3
  15. package/dist/components/ConfirmDialog.d.ts +3 -1
  16. package/dist/components/DraftCodeField.d.ts +26 -0
  17. package/dist/components/PromptDialog.d.ts +3 -1
  18. package/dist/components/business/ActionPickerModal.d.ts +2 -0
  19. package/dist/components/business/BusinessEditorContext.d.ts +38 -0
  20. package/dist/components/business/DataPillInput.d.ts +10 -0
  21. package/dist/components/business/DecisionBranchCard.d.ts +2 -1
  22. package/dist/components/business/ForkJoinCard.d.ts +2 -1
  23. package/dist/components/business/LibraryVersionBadge.d.ts +1 -1
  24. package/dist/components/business/LoopDoWhileCard.d.ts +2 -1
  25. package/dist/components/business/NestedControlStep.d.ts +7 -1
  26. package/dist/components/business/RunStoryTimeline.d.ts +7 -0
  27. package/dist/components/business/StepCardParts.d.ts +73 -0
  28. package/dist/components/business/StepFlowEditor.d.ts +18 -1
  29. package/dist/components/business/StepListEditor.d.ts +6 -2
  30. package/dist/components/business/deleteMessage.d.ts +6 -0
  31. package/dist/components/business/runStatus.d.ts +11 -0
  32. package/dist/components/icons/CmIcon.d.ts +17 -0
  33. package/dist/components/icons/iconRegistry.d.ts +80 -0
  34. package/dist/components/import/ApiImportDialog.d.ts +27 -0
  35. package/dist/components/onboarding/ModalShell.d.ts +15 -0
  36. package/dist/components/onboarding/OnboardingController.d.ts +74 -0
  37. package/dist/components/onboarding/OnboardingGuideCard.d.ts +10 -0
  38. package/dist/components/onboarding/OnboardingWizard.d.ts +42 -0
  39. package/dist/components/onboarding/PromotionPanel.d.ts +28 -0
  40. package/dist/components/onboarding/WorkflowNameBuilder.d.ts +19 -0
  41. package/dist/components/onboarding/index.d.ts +8 -0
  42. package/dist/components/onboarding/styles.d.ts +11 -0
  43. package/dist/components/onboarding/useOnboardingData.d.ts +17 -0
  44. package/dist/components/template/TemplateGallery.d.ts +2 -0
  45. package/dist/components/template/TemplateSetupWizard.d.ts +2 -0
  46. package/dist/hooks/useConfirm.d.ts +3 -1
  47. package/dist/import/buildAction.d.ts +23 -0
  48. package/dist/import/common.d.ts +23 -0
  49. package/dist/import/curl.d.ts +12 -0
  50. package/dist/import/detect.d.ts +9 -0
  51. package/dist/import/index.d.ts +10 -0
  52. package/dist/import/insert.d.ts +16 -0
  53. package/dist/import/openapi.d.ts +9 -0
  54. package/dist/import/postman.d.ts +9 -0
  55. package/dist/import/schema.d.ts +15 -0
  56. package/dist/import/selection.d.ts +17 -0
  57. package/dist/import/sensitive.d.ts +18 -0
  58. package/dist/import/types.d.ts +62 -0
  59. package/dist/import/util.d.ts +23 -0
  60. package/dist/index.d.ts +21 -2
  61. package/dist/library/versionStatus.d.ts +2 -2
  62. package/dist/logo.svg +9 -36
  63. package/dist/onboarding/index.d.ts +6 -0
  64. package/dist/onboarding/naming.d.ts +46 -0
  65. package/dist/onboarding/poll.d.ts +42 -0
  66. package/dist/onboarding/wizardState.d.ts +44 -0
  67. package/dist/parser/conductorGenerator.d.ts +17 -2
  68. package/dist/product-launch.html +10 -1394
  69. package/dist/providers/WorkflowIdeProvider.d.ts +23 -0
  70. package/dist/providers/resolve.d.ts +20 -0
  71. package/dist/providers/types.d.ts +67 -0
  72. package/dist/reactflow-ui-ai.es.js +20355 -13884
  73. package/dist/reactflow-ui.css +1 -1
  74. package/dist/reactflow-ui.es.js +23257 -14745
  75. package/dist/reactflow-ui.umd.js +192 -38
  76. package/dist/sample-imports/cmdb-openapi3.json +334 -0
  77. package/dist/sample-imports/cmdb-postman.json +100 -0
  78. package/dist/sample-imports/ticket-swagger2.json +231 -0
  79. package/dist/sample-workflows/ecs-lifecycle-automation.json +36 -4
  80. package/dist/services/ai/agentRunner.d.ts +42 -1
  81. package/dist/services/ai/errorMessages.d.ts +9 -1
  82. package/dist/services/ai/protocolAdapter.d.ts +5 -0
  83. package/dist/services/ai/systemPrompt.d.ts +1 -1
  84. package/dist/services/ai/toolExecutor.d.ts +26 -0
  85. package/dist/services/ai/workflowSynthesizer.d.ts +4 -4
  86. package/dist/services/aiService.d.ts +5 -1
  87. package/dist/stepmodel/compile.d.ts +2 -1
  88. package/dist/stepmodel/factory.d.ts +5 -0
  89. package/dist/stepmodel/pills.d.ts +32 -0
  90. package/dist/stepmodel/types.d.ts +10 -0
  91. package/dist/stepmodel/validate.d.ts +20 -0
  92. package/dist/store/aiStore.d.ts +10 -3
  93. package/dist/store/sandboxRunObserver.d.ts +20 -0
  94. package/dist/store/workflowStore.d.ts +2 -9
  95. package/dist/telemetry/buffer.d.ts +37 -0
  96. package/dist/telemetry/once.d.ts +11 -0
  97. package/dist/telemetry/track.d.ts +17 -0
  98. package/dist/telemetry/types.d.ts +24 -0
  99. package/dist/telemetry/useTelemetry.d.ts +22 -0
  100. package/dist/template/templateStore.d.ts +6 -0
  101. package/dist/template/types.d.ts +1 -0
  102. package/dist/types/conductor.d.ts +25 -1
  103. package/dist/types/workflow.d.ts +20 -3
  104. package/dist/types/workflowLibrary.d.ts +5 -5
  105. package/dist/utils/executionAnalyzer.d.ts +5 -0
  106. package/dist/utils/executionImport.d.ts +52 -0
  107. package/dist/utils/executionPoller.d.ts +37 -0
  108. package/dist/utils/localSandboxEngine.d.ts +43 -6
  109. package/dist/utils/runStory.d.ts +20 -0
  110. package/dist/utils/sandbox/jq.d.ts +13 -0
  111. package/dist/utils/sandbox/scriptRunner.d.ts +34 -0
  112. package/dist/utils/statusMeta.d.ts +35 -0
  113. package/dist/utils/taskEditing.d.ts +59 -0
  114. package/dist/utils/taskTypeMeta.d.ts +1 -0
  115. package/dist/utils/validationRules.d.ts +19 -5
  116. package/package.json +6 -2
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { BusinessStep } from '../../stepmodel/types';
3
3
  import { ActionRegistry } from '../../actions/registry';
4
4
  import type { ActionDefinition } from '../../actions/types';
5
+ import { type InsertPickerInfo } from './BusinessEditorContext';
5
6
  export interface StepListEditorProps {
6
7
  steps: BusinessStep[];
7
8
  onStepsChange: (next: BusinessStep[]) => void;
@@ -11,7 +12,7 @@ export interface StepListEditorProps {
11
12
  disabled?: boolean;
12
13
  /** 本列表所在容器的嵌套深度(顶层容器为 0) */
13
14
  depth: number;
14
- onOpenInsertModal: (callback: (action: ActionDefinition) => void) => void;
15
+ onOpenInsertModal: (callback: (action: ActionDefinition) => void, info?: InsertPickerInfo) => void;
15
16
  /** regular:分支 / 循环体内的宽松行;compact:并行泳道内的窄列行 */
16
17
  variant?: 'regular' | 'compact';
17
18
  /** 行背景色调;展开区域使用相反色调,保持层次 */
@@ -20,10 +21,13 @@ export interface StepListEditorProps {
20
21
  indexPrefix?: string;
21
22
  /** 序号徽标是否使用强调色(默认为中性底色) */
22
23
  accentIndexBadge?: boolean;
24
+ /** 动作选择器标题中的位置说明前缀,如"分支 VIP" */
25
+ insertLabel?: string;
23
26
  }
24
27
  /**
25
28
  * 分支 / 并行泳道 / 循环体共用的"子步骤列表":
26
- * - 普通动作渲染为可展开的表单行
29
+ * - 普通动作渲染为可展开的表单行,头部与顶层卡片相同(改名、排序、版本徽标、敏感标记、校验与试跑状态)
30
+ * - 步骤之间可插入新步骤
27
31
  * - 控制流步骤(分支 / 并行 / 循环)交给 NestedControlStep 递归渲染,因此可任意层级嵌套
28
32
  */
29
33
  export declare const StepListEditor: React.FC<StepListEditorProps>;
@@ -0,0 +1,6 @@
1
+ import type { BusinessStep } from '../../stepmodel/types';
2
+ import type { ActionRegistry } from '../../actions/registry';
3
+ /** 统计控制流内部(任意层级)的步骤数 */
4
+ export declare function countNestedSteps(step: BusinessStep): number;
5
+ /** 删除步骤前的确认文案:说清删的是什么、连带删除多少内部步骤、如何恢复 */
6
+ export declare function confirmDeleteMessage(step: BusinessStep, registry: ActionRegistry): string;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 试跑 / 运行状态 → 业务卡片徽标(CMASTER 规则 5:颜色 + 图标 + 中文词,不能只靠颜色)。
3
+ * icon 为 lucide 图标名,由组件映射为具体图标。
4
+ */
5
+ export interface RunStatusBadge {
6
+ label: string;
7
+ /** 颜色 token(var(--cm-status-*)) */
8
+ color: string;
9
+ icon: 'check' | 'x' | 'timer' | 'skip' | 'loader' | 'circle' | 'ban' | 'alert';
10
+ }
11
+ export declare function runStatusBadge(status: string | undefined | null): RunStatusBadge;
@@ -0,0 +1,17 @@
1
+ import type { CSSProperties } from 'react';
2
+ import { CM_ICONS } from './iconRegistry';
3
+ interface CmIconProps {
4
+ /** Icon name from CM_ICONS (preferred) or a legacy emoji from host data. */
5
+ name: string | undefined | null;
6
+ size?: number;
7
+ /** Name to use when `name` is empty or unknown. */
8
+ fallback?: keyof typeof CM_ICONS;
9
+ style?: CSSProperties;
10
+ className?: string;
11
+ }
12
+ /**
13
+ * Renders a CMASTER data icon as a Lucide icon (stroke 1.75). Unknown non-empty values fall back to `fallback`,
14
+ * so host-supplied emoji or typos never reach the UI as raw glyphs.
15
+ */
16
+ export declare function CmIcon({ name, size, fallback, style, className }: CmIconProps): import("react/jsx-runtime").JSX.Element;
17
+ export default CmIcon;
@@ -0,0 +1,80 @@
1
+ /**
2
+ * CMASTER icon names → Lucide icons. Data (actions, templates, task types, library extensions) stores an icon as one
3
+ * of these kebab-case names, never as an emoji (design/guidelines/brand.md · 图标).
4
+ */
5
+ export declare const CM_ICONS: {
6
+ activity: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
7
+ alert: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
8
+ book: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
9
+ flag: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
10
+ flame: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
11
+ library: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
12
+ lightbulb: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
13
+ lock: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
14
+ map: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
15
+ pause: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
16
+ undo: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
17
+ wrench: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
18
+ approval: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
19
+ clipboard: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
20
+ mail: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
21
+ pointer: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
22
+ x: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
23
+ ban: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
24
+ bell: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
25
+ 'bell-ring': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
26
+ braces: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
27
+ chart: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
28
+ circle: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
29
+ clock: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
30
+ cloud: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
31
+ code: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
32
+ database: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
33
+ 'file-text': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
34
+ folder: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
35
+ branch: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
36
+ merge: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
37
+ globe: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
38
+ 'hard-drive': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
39
+ hourglass: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
40
+ key: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
41
+ megaphone: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
42
+ message: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
43
+ monitor: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
44
+ moon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
45
+ package: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
46
+ pencil: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
47
+ play: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
48
+ plug: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
49
+ puzzle: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
50
+ radio: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
51
+ refresh: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
52
+ repeat: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
53
+ rocket: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
54
+ save: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
55
+ scale: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
56
+ search: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
57
+ send: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
58
+ server: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
59
+ settings: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
60
+ shield: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
61
+ shuffle: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
62
+ smartphone: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
63
+ sparkles: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
64
+ stop: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
65
+ 'stop-circle': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
66
+ sunrise: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
67
+ terminal: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
68
+ trash: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
69
+ upload: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
70
+ user: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
71
+ zap: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
72
+ };
73
+ export type CmIconName = keyof typeof CM_ICONS;
74
+ /**
75
+ * Legacy emoji → icon name. Older hosts and the governance service may still send emoji as `icon`; they render as the
76
+ * matching Lucide icon instead. Keys are compared after stripping the emoji variation selector (U+FE0F).
77
+ */
78
+ export declare const EMOJI_ALIASES: Record<string, CmIconName>;
79
+ /** Resolves an icon value (icon name or legacy emoji) to a registered icon name; null when unknown. */
80
+ export declare function resolveIconName(icon: string | undefined | null): CmIconName | null;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import type { ActionDefinition } from '../../actions/types';
3
+ import type { ImportFormat } from '../../import/types';
4
+ export interface ApiImportInsertInfo {
5
+ format: ImportFormat;
6
+ /** 本次插入的步骤数 */
7
+ count: number;
8
+ /** 解析时产生的提示(敏感头替换、不支持的部分等) */
9
+ warnings: string[];
10
+ }
11
+ export interface ApiImportDialogProps {
12
+ open: boolean;
13
+ onClose: () => void;
14
+ /**
15
+ * 确认插入:actions 为所选接口生成的 HTTP 业务动作(按文档顺序)。
16
+ * 调用方负责把动作注册到动作库并把步骤追加到流程(可用 `appendImportedActions`);
17
+ * 对话框在回调返回后自动关闭。B2 向导的「从接口导入」可直接复用本组件。
18
+ */
19
+ onInsert: (actions: ActionDefinition[], info: ApiImportInsertInfo) => void;
20
+ /** 已存在的动作 id,用于避免重复导入时 id 冲突 */
21
+ existingActionIds?: Iterable<string>;
22
+ }
23
+ /**
24
+ * 接口导入对话框:粘贴或上传 -> 识别格式 -> 勾选接口 -> 插入为步骤。
25
+ * 外层仅在打开时挂载内容,因此每次打开都是干净状态。
26
+ */
27
+ export declare const ApiImportDialog: React.FC<ApiImportDialogProps>;
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface ModalShellProps {
3
+ /** 用于 aria-labelledby 的标题元素 id */
4
+ titleId: string;
5
+ title: string;
6
+ onClose: () => void;
7
+ children: ReactNode;
8
+ footer?: ReactNode;
9
+ width?: number;
10
+ }
11
+ /**
12
+ * 自助接入弹窗外壳:Portal 渲染到 body,并带上 data-mode / data-brand 使主题变量生效。
13
+ * 无障碍:role="dialog" + aria-modal + 标题关联;Esc 关闭;Tab 在弹窗内循环;关闭后焦点回到打开前的元素。
14
+ */
15
+ export declare function ModalShell({ titleId, title, onClose, children, footer, width }: ModalShellProps): import("react").ReactPortal | null;
@@ -0,0 +1,74 @@
1
+ import type { OnboardingProvider, ProductInfo } from '../../providers/types';
2
+ import type { WorkflowLevel } from '../../types/workflowLibrary';
3
+ import type { IdeEventName } from '../../telemetry/types';
4
+ import type { OnboardingCreateResult } from './OnboardingWizard';
5
+ import type { PendingPromotion } from './PromotionPanel';
6
+ import type { OnboardingData } from './useOnboardingData';
7
+ /** 向导创建骨架后、选择了模板 / 导入时暂存的流程身份,供宿主在后续步骤里保留名称 */
8
+ export interface PendingIdentity {
9
+ name: string;
10
+ description: string;
11
+ ownerEmail?: string;
12
+ }
13
+ export interface OnboardingControllerOptions {
14
+ /** 解析后的 providers.onboarding;不存在时一切入口都不出现 */
15
+ provider: OnboardingProvider | undefined;
16
+ /** useTelemetry 返回的 track */
17
+ track: (name: IdeEventName, props?: Record<string, unknown>) => void;
18
+ /** 只读 / 运行态时隐藏入口 */
19
+ disabled?: boolean;
20
+ /** 向导「模板中心」起点的回调;不提供则隐藏该选项 */
21
+ onPickTemplate?: () => void;
22
+ /** 向导「从接口导入」起点的回调;不提供则隐藏该选项 */
23
+ onImportApi?: () => void;
24
+ ownerEmail?: string;
25
+ }
26
+ export interface OnboardingController {
27
+ enabled: boolean;
28
+ data: OnboardingData;
29
+ /** 向导选择的层级;宿主没有传 currentWorkflowLevel 时作为默认值 */
30
+ level: WorkflowLevel | undefined;
31
+ wizardOpen: boolean;
32
+ promoOpen: boolean;
33
+ /** 「新建流程」会替换画布上的流程,正在请用户确认 */
34
+ confirmReplace: boolean;
35
+ resolveConfirmReplace: (proceed: boolean) => void;
36
+ openWizard: () => void;
37
+ openPromotion: () => void;
38
+ /** 当前流程是否可申请上线(名称可解析且类型为 tmp) */
39
+ canPromote: boolean;
40
+ /** 是否显示空画布的「开始试用」引导 */
41
+ showGuide: boolean;
42
+ dismissGuide: () => void;
43
+ /** 取走并清空暂存的流程身份(选了模板 / 导入后使用) */
44
+ takePendingIdentity: () => PendingIdentity | null;
45
+ provider: OnboardingProvider | undefined;
46
+ /** 以下供 OnboardingOverlays 使用 */
47
+ close: () => void;
48
+ handleCreate: (r: OnboardingCreateResult) => void;
49
+ handleTrialStarted: (p: ProductInfo) => void;
50
+ onPickTemplate?: () => void;
51
+ onImportApi?: () => void;
52
+ ownerEmail?: string;
53
+ track: OnboardingControllerOptions['track'];
54
+ /** 已提交、未到终态的上线申请(按流程名称与版本) */
55
+ getPendingPromotion: (name: string, version: number) => PendingPromotion | null;
56
+ setPendingPromotion: (name: string, version: number, request: PendingPromotion | null) => void;
57
+ }
58
+ /**
59
+ * IDE 内部使用:把自助接入的状态与动作集中在一处,IDE 只需渲染
60
+ * `<OnboardingToolbarButtons>`、`<OnboardingOverlays>` 与(可选)引导卡片。
61
+ */
62
+ export declare function useOnboardingController(opts: OnboardingControllerOptions): OnboardingController;
63
+ /** 工具栏入口:「新建流程」与「申请上线」。没有 onboarding provider 时不渲染任何内容 */
64
+ export declare function OnboardingToolbarButtons({ c }: {
65
+ c: OnboardingController;
66
+ }): import("react/jsx-runtime").JSX.Element | null;
67
+ /** 弹窗:向导与申请上线面板(Portal 渲染,自带主题属性) */
68
+ export declare function OnboardingOverlays({ c }: {
69
+ c: OnboardingController;
70
+ }): import("react/jsx-runtime").JSX.Element | null;
71
+ /** 空画布引导:覆盖整个 IDE 的半透明层(不拦截点击),卡片居中;仅 `c.showGuide` 时渲染 */
72
+ export declare function OnboardingGuideOverlay({ c }: {
73
+ c: OnboardingController;
74
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ export interface OnboardingGuideCardProps {
2
+ onStart: () => void;
3
+ /** 提供时显示「暂不使用」,用于露出画布原有的空状态 */
4
+ onDismiss?: () => void;
5
+ }
6
+ /**
7
+ * 空画布上的「开始试用」引导卡片。
8
+ * 仅在测试环境开放自助试用且用户还没有所属产品时由宿主显示。
9
+ */
10
+ export declare function OnboardingGuideCard({ onStart, onDismiss }: OnboardingGuideCardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,42 @@
1
+ import type { OnboardingProvider, ProductInfo } from '../../providers/types';
2
+ import type { WorkflowDef } from '../../types/conductor';
3
+ import type { WorkflowLevel } from '../../types/workflowLibrary';
4
+ import type { StartSource } from '../../onboarding/wizardState';
5
+ export interface OnboardingCreateResult {
6
+ /** 向导生成的骨架定义(名称已按规范拼好) */
7
+ def: WorkflowDef;
8
+ /** 所选层级,宿主可据此设置 `currentWorkflowLevel` */
9
+ level: WorkflowLevel;
10
+ /** 起点:空白 / 模板中心 / 从接口导入 */
11
+ source: StartSource;
12
+ }
13
+ export interface OnboardingWizardProps {
14
+ /** 只用到 startTrial;传完整的 OnboardingProvider 即可 */
15
+ provider: Pick<OnboardingProvider, 'startTrial'>;
16
+ /** 当前环境是否开放自助试用(决定能否登记新产品、类型是否固定 tmp) */
17
+ trialEnabled: boolean;
18
+ /** 我的产品 */
19
+ products: ProductInfo[];
20
+ /** 业务域列表 */
21
+ domains: string[];
22
+ /** 默认层级,默认 L2 */
23
+ defaultLevel?: WorkflowLevel;
24
+ /** 写入骨架定义的负责人邮箱 */
25
+ ownerEmail?: string;
26
+ onClose: () => void;
27
+ /** 完成:交给宿主把骨架设为当前流程 */
28
+ onCreate: (result: OnboardingCreateResult) => void;
29
+ /** 新产品登记成功(宿主可刷新「我的产品」、上报 trial_started) */
30
+ onTrialStarted?: (product: ProductInfo) => void;
31
+ /** 选择「从模板中心开始」:创建骨架后调用,宿主打开模板中心;不提供则隐藏该选项 */
32
+ onPickTemplate?: () => void;
33
+ /** 选择「从接口导入」:创建骨架后调用,宿主打开导入面板;不提供则隐藏该选项 */
34
+ onImportApi?: () => void;
35
+ }
36
+ /**
37
+ * 自助接入向导(3 步弹窗):产品 → 命名 → 起点。
38
+ * - 试用环境可登记新产品(startTrial);产品被他人占用时提示联系负责人;
39
+ * - 接口失败停在当前步,显示「重试」,已填内容保留;
40
+ * - 完成后用 `onCreate({ def, level, source })` 交给宿主设置当前流程。
41
+ */
42
+ export declare function OnboardingWizard({ provider, trialEnabled, products, domains, defaultLevel, ownerEmail, onClose, onCreate, onTrialStarted, onPickTemplate, onImportApi, }: OnboardingWizardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import type { OnboardingProvider, PromotionStatus } from '../../providers/types';
2
+ import type { PromotionTargetType } from '../../onboarding/naming';
3
+ export interface PromotionPanelProps {
4
+ /** 用到 requestPromotion / getPromotion */
5
+ provider: Pick<OnboardingProvider, 'requestPromotion' | 'getPromotion'>;
6
+ /** 当前(tmp 类型的)流程名称 */
7
+ workflowName: string;
8
+ /** 当前流程版本 */
9
+ version: number;
10
+ onClose: () => void;
11
+ /** 提交成功(埋点:promotion_requested) */
12
+ onRequested?: (targetType: PromotionTargetType) => void;
13
+ /** 状态变化(埋点:promotion_state),同一状态只回调一次 */
14
+ onStateChange?: (state: PromotionStatus['state']) => void;
15
+ /** 关闭前已提交、尚未到终态的申请:重新打开时接着轮询,不会重复提交(R12) */
16
+ resumeRequest?: PendingPromotion | null;
17
+ /** 提交成功时传入申请;到达终态(SYNCED / REJECTED)时传 null。宿主据此保存 / 清除 resumeRequest */
18
+ onRequestChange?: (request: PendingPromotion | null) => void;
19
+ }
20
+ export interface PendingPromotion {
21
+ requestId: string;
22
+ targetType: PromotionTargetType;
23
+ }
24
+ /**
25
+ * 申请上线面板:选择目标类型 → 预览正式名称 → 提交 → 轮询进度(指数退避,30 秒封顶)。
26
+ * 轮询在关闭面板 / 卸载时中止。
27
+ */
28
+ export declare function PromotionPanel({ provider, workflowName, version, onClose, onRequested, onStateChange, resumeRequest, onRequestChange }: PromotionPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import type { ProductInfo } from '../../providers/types';
2
+ import type { WorkflowNameParts } from '../../onboarding/naming';
3
+ export interface WorkflowNameBuilderProps {
4
+ /** 可选的所属产品(我的产品);业务域取自所选产品 */
5
+ products: ProductInfo[];
6
+ /** 允许的业务域列表;提供时参与校验 */
7
+ domains?: string[];
8
+ /** 试用环境:类型固定为 tmp;否则可选 custom / std */
9
+ trial: boolean;
10
+ value: WorkflowNameParts;
11
+ onChange: (next: WorkflowNameParts) => void;
12
+ disabled?: boolean;
13
+ }
14
+ /**
15
+ * 五段式命名生成器:`类型-层级-业务域-产品-功能`。
16
+ * 受控组件:类型(试用固定 tmp)、层级、产品(下拉我的产品,业务域随产品带出)、功能(自由输入,推荐 snake_case),
17
+ * 实时预览完整名称并用 `validateWorkflowName` 校验。
18
+ */
19
+ export declare function WorkflowNameBuilder({ products, domains, trial, value, onChange, disabled }: WorkflowNameBuilderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export { WorkflowNameBuilder } from './WorkflowNameBuilder';
2
+ export type { WorkflowNameBuilderProps } from './WorkflowNameBuilder';
3
+ export { OnboardingWizard } from './OnboardingWizard';
4
+ export type { OnboardingWizardProps, OnboardingCreateResult } from './OnboardingWizard';
5
+ export { PromotionPanel } from './PromotionPanel';
6
+ export type { PromotionPanelProps } from './PromotionPanel';
7
+ export { OnboardingGuideCard } from './OnboardingGuideCard';
8
+ export type { OnboardingGuideCardProps } from './OnboardingGuideCard';
@@ -0,0 +1,11 @@
1
+ import type { CSSProperties } from 'react';
2
+ /** 自助接入组件共用的内联样式:只使用主题 CSS 变量,弹窗根节点另行设置 data-mode / data-brand */
3
+ export declare const labelStyle: CSSProperties;
4
+ export declare const inputStyle: CSSProperties;
5
+ export declare const hintStyle: CSSProperties;
6
+ export declare const errorStyle: CSSProperties;
7
+ export declare const buttonBase: CSSProperties;
8
+ export declare const primaryButton: CSSProperties;
9
+ export declare const ghostButton: CSSProperties;
10
+ export declare function disabledStyle(base: CSSProperties, disabled: boolean): CSSProperties;
11
+ export declare const noticeStyle: (kind: "error" | "warning" | "success") => CSSProperties;
@@ -0,0 +1,17 @@
1
+ import type { OnboardingContext, OnboardingProvider, ProductInfo } from '../../providers/types';
2
+ export interface OnboardingData {
3
+ status: 'idle' | 'loading' | 'ready' | 'error';
4
+ context: OnboardingContext | null;
5
+ domains: string[];
6
+ products: ProductInfo[];
7
+ error: string | null;
8
+ /** 重新加载(失败后重试) */
9
+ reload: () => void;
10
+ /** 新登记产品后本地追加,避免再请求一次 */
11
+ addProduct: (p: ProductInfo) => void;
12
+ }
13
+ /**
14
+ * 按 provider 实例加载一次:上下文、业务域、我的产品。
15
+ * provider 引用变化时重新加载;卸载或切换时中止进行中的请求。没有 provider 时保持 idle。
16
+ */
17
+ export declare function useOnboardingData(provider: OnboardingProvider | undefined): OnboardingData;
@@ -6,5 +6,7 @@ export interface TemplateGalleryProps {
6
6
  onClose: () => void;
7
7
  onSelectTemplate: (configuredDef: WorkflowDef) => void;
8
8
  templateStore?: TemplateStore;
9
+ /** 试跑结束(快捷试跑或向导内试跑):参数为最终状态或 'error',用于接入埋点,不含数据 */
10
+ onSandboxRun?: (result: string) => void;
9
11
  }
10
12
  export declare const TemplateGallery: React.FC<TemplateGalleryProps>;
@@ -5,5 +5,7 @@ export interface TemplateSetupWizardProps {
5
5
  template: WorkflowTemplate;
6
6
  onApply: (configuredDef: WorkflowDef) => void;
7
7
  onClose: () => void;
8
+ /** 向导内试跑结束:最终状态或 'error'(埋点用,不含数据) */
9
+ onSandboxRun?: (result: string) => void;
8
10
  }
9
11
  export declare const TemplateSetupWizard: React.FC<TemplateSetupWizardProps>;
@@ -1,12 +1,14 @@
1
1
  interface ConfirmState {
2
2
  message: string;
3
+ /** 确认按钮文案(动词开头,如"删除");缺省为"确定" */
4
+ confirmLabel?: string;
3
5
  resolve: (value: boolean) => void;
4
6
  }
5
7
  /**
6
8
  * 提供 Promise-based confirm 对话框替代 window.confirm
7
9
  */
8
10
  export declare const useConfirm: () => {
9
- confirm: (message: string) => Promise<boolean>;
11
+ confirm: (message: string, confirmLabel?: string) => Promise<boolean>;
10
12
  confirmState: ConfirmState | null;
11
13
  handleConfirm: () => void;
12
14
  handleCancel: () => void;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * ImportedOperation → 业务动作(ActionDefinition)。
3
+ *
4
+ * - 字段:路径参数 / 查询参数 / 请求头参数 / 请求体属性,沿用 `buildFields` 规则(title → 标签、enum → 下拉、
5
+ * 类型 → 控件),全部支持插入数据胶囊;
6
+ * - 出参:2xx 响应 schema,沿用 `buildOutputs`,键为 Conductor HTTP 任务的真实输出路径
7
+ * `response.body.<字段>`,因此数据胶囊引用 `${ref.output.response.body.xxx}` 运行时可直接取到;
8
+ * - 编译:Conductor `HTTP` 任务,`inputParameters` 里保留 `_actionId` 与各字段值,
9
+ * 使步骤重新打开时能被 `decompile` 还原为同一动作(动作未注册时退回「专业步骤」卡片,定义无损)。
10
+ */
11
+ import type { ActionDefinition } from '../actions/types';
12
+ import type { ImportedOperation } from './types';
13
+ export interface BuildHttpActionOptions {
14
+ /** 已存在的动作 id(完整 id,如 `import.get_tickets`):冲突时自动追加 `_2` 等后缀 */
15
+ existingIds?: Iterable<string>;
16
+ /** 动作 id 前缀,默认 `import` */
17
+ idPrefix?: string;
18
+ }
19
+ /**
20
+ * 由导入的接口生成 HTTP 业务动作。
21
+ * 固定请求头会再做一次敏感值检查(解析器已处理时这里是空操作),保证动作定义里不会出现凭据。
22
+ */
23
+ export declare function buildHttpAction(op: ImportedOperation, opts?: BuildHttpActionOptions): ActionDefinition;
@@ -0,0 +1,23 @@
1
+ /** 各格式解析器共用的收尾逻辑(纯函数)。 */
2
+ import type { ImportedOperation } from './types';
3
+ import type { ImportedParam } from './types';
4
+ /** 收尾:替换固定请求头里的敏感值,并把提示并入接口的 warnings */
5
+ export declare function finishOperation(op: ImportedOperation): ImportedOperation;
6
+ /** 接口的展示标识:`GET /tickets/{id}` */
7
+ export declare function operationLabel(op: Pick<ImportedOperation, 'method' | 'path'>): string;
8
+ /** 汇总所有接口的提示(带接口前缀,去重) */
9
+ export declare function collectWarnings(ops: ImportedOperation[], extra?: string[]): string[];
10
+ /**
11
+ * 把 JSON 示例的顶层属性作为默认值写入 schema;敏感字段(任意层级,R7)的默认值换成占位。
12
+ * 嵌套字段的占位名取路径(`credentials.password` → `${workflow.input.credentialsPassword}`);
13
+ * 敏感名下面的所有标量值都视为敏感(如 `credentials: { user, pass }`)。
14
+ */
15
+ export declare function schemaWithDefaults(example: unknown, warnings: string[]): Record<string, any>;
16
+ /** 递归替换敏感值;返回新值,不修改入参 */
17
+ export declare function redactSensitive(value: unknown, path: string[], underSensitive: boolean, warnings: string[]): unknown;
18
+ /** 把查询串解析为 query 参数(字面量作为默认值;敏感参数名的值替换为占位) */
19
+ export declare function queryParamsFromString(query: string, warnings: string[]): ImportedParam[];
20
+ /** Content-Type / Accept 由 body.contentType 与 accept 统一输出,不再作为固定头 */
21
+ export declare function dropContentHeaders(headers: Record<string, string>): Record<string, string>;
22
+ /** 不区分大小写取请求头的值 */
23
+ export declare function findHeader(headers: Record<string, string>, name: string): string | undefined;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * curl 命令 → ImportedOperation[](恒为 0 或 1 个接口)。
3
+ * 支持:-X、-H(多个)、-d / --data / --data-raw / --data-binary、-u、--url、-G、行尾 `\` 续行、
4
+ * 单引号 / 双引号 / `$'…'`(浏览器「复制为 cURL」)。不执行任何命令。
5
+ */
6
+ import type { ParseResult } from './types';
7
+ /** 把命令行切成 token(兼容续行与常见引号写法) */
8
+ export declare function tokenizeCurl(input: string): string[];
9
+ /** 提示用的 curl 示例(对话框 placeholder 使用) */
10
+ export declare const CURL_SAMPLE = "curl -X POST 'https://api.example.com/v1/tickets' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer <token>' \\\n -d '{\"title\":\"\u78C1\u76D8\u544A\u8B66\",\"priority\":\"high\"}'";
11
+ /** 解析一条 curl 命令 */
12
+ export declare function parseCurl(command: string): ParseResult;
@@ -0,0 +1,9 @@
1
+ /** 输入格式识别与统一入口(纯函数,不抛异常)。 */
2
+ import type { DetectedFormat, ParseResult } from './types';
3
+ /** 识别输入文本的格式 */
4
+ export declare function detectFormat(text: string): DetectedFormat;
5
+ /**
6
+ * 识别并解析:返回 ParseResult,永不抛异常。
7
+ * YAML 不受支持,返回固定提示 {@link YAML_HINT}。
8
+ */
9
+ export declare function parseApiText(text: string): ParseResult;
@@ -0,0 +1,10 @@
1
+ export * from './types';
2
+ export { detectFormat, parseApiText } from './detect';
3
+ export { parseOpenApi3, parseSwagger2 } from './openapi';
4
+ export { parsePostman21 } from './postman';
5
+ export { parseCurl, tokenizeCurl, CURL_SAMPLE } from './curl';
6
+ export { buildHttpAction } from './buildAction';
7
+ export type { BuildHttpActionOptions } from './buildAction';
8
+ export { appendImportedActions, blankImportWorkflow, collectWorkflowInputRefs } from './insert';
9
+ export { resolveSchema } from './schema';
10
+ export { isSensitiveHeader, sanitizeHeaders, inputPlaceholder } from './sensitive';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * 把导入生成的动作作为步骤追加到流程末尾(纯函数,业务模式与专业模式共用)。
3
+ * B2 向导的「从接口导入」也可直接复用。
4
+ */
5
+ import type { ActionDefinition } from '../actions/types';
6
+ import type { TaskDef, WorkflowDef } from '../types/conductor';
7
+ /** 没有当前流程时使用的空白骨架 */
8
+ export declare function blankImportWorkflow(name?: string): WorkflowDef;
9
+ /** 取出任务里引用的 `${workflow.input.xxx}` 的顶层入参名 */
10
+ export declare function collectWorkflowInputRefs(tasks: TaskDef[]): string[];
11
+ /**
12
+ * 为每个动作按默认值生成一个步骤并追加到 `def.tasks` 末尾;
13
+ * 步骤引用的 `${workflow.input.xxx}`(敏感头占位、路径参数默认值等)会补进流程的入参声明。
14
+ * 不修改入参,返回新的定义。
15
+ */
16
+ export declare function appendImportedActions(def: WorkflowDef | null | undefined, actions: ActionDefinition[]): WorkflowDef;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * OpenAPI 3.x / Swagger 2.0(JSON 文档对象)→ ImportedOperation[]。
3
+ * 只做解析,不发请求;解析失败返回 { ok: false },不抛异常。
4
+ */
5
+ import type { ParseResult } from './types';
6
+ /** 解析 OpenAPI 3.x 文档对象 */
7
+ export declare function parseOpenApi3(doc: unknown): ParseResult;
8
+ /** 解析 Swagger 2.0 文档对象 */
9
+ export declare function parseSwagger2(doc: unknown): ParseResult;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Postman Collection v2.1(JSON 文档对象)→ ImportedOperation[]。
3
+ * Postman 变量 `{{var}}` 转为 `${workflow.input.var}`;认证配置只生成占位,不读取凭据值。
4
+ */
5
+ import type { ParseResult } from './types';
6
+ /** `{{var}}` → `${workflow.input.var}`;记录用到的变量名 */
7
+ export declare function convertPostmanVars(text: string, used?: Set<string>): string;
8
+ /** 解析 Postman Collection v2.1 文档对象 */
9
+ export declare function parsePostman21(doc: unknown): ParseResult;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * JSON Schema 本地 `$ref` 解析(OpenAPI 3 `#/components/schemas/...`、Swagger 2 `#/definitions/...`)。
3
+ * 防循环引用,最大展开深度 6;不处理远程引用。
4
+ */
5
+ import type { JsonSchema } from './types';
6
+ export declare const MAX_SCHEMA_DEPTH = 6;
7
+ /** 按 JSON Pointer(`#/a/b`)取值,找不到返回 undefined */
8
+ export declare function resolvePointer(root: unknown, ref: string): unknown;
9
+ /** 解开非 schema 对象(parameter / requestBody / response)上的 `$ref`,最多跳 10 次 */
10
+ export declare function derefObject<T = any>(node: unknown, root: unknown): T | undefined;
11
+ /**
12
+ * 解析 schema:展开本地 `$ref` 与 allOf,oneOf / anyOf 取第一个分支。
13
+ * 超过深度上限的节点只保留类型;循环引用处截断为 `{ type: 'object' }` 并在 warnings 中提示一次。
14
+ */
15
+ export declare function resolveSchema(schema: unknown, root: unknown, warnings?: string[], maxDepth?: number): JsonSchema;