@oomol-lab/open-flow 0.1.0-beta.74 → 0.1.0-beta.75
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 +1 -0
- package/dist/browser/{ContentIcon-CUQHjQIw.js → ContentIcon-FCpKiwjp.js} +2 -1
- package/dist/browser/{FlowCanvas-Dtf8_cQp.js → FlowCanvas-dzRBnlUT.js} +1 -1
- package/dist/browser/{createResourceDialog-DI9pL-Yr.js → createResourceDialog-BeYDdUl-.js} +2 -2
- package/dist/browser/{dialog-BYJGvItc.js → dialog-ZtpsFbl4.js} +284 -13
- package/dist/browser/{exportSvg-BOoy7-Db.js → exportSvg-DqXw1yf-.js} +2 -2
- package/dist/browser/{flowChanges-RL-H4CjD.js → flowChanges-b_5UobFj.js} +285 -44
- package/dist/browser/{flowWorkspace-BkDsETj0.js → flowWorkspace-ItojZbO4.js} +414 -53
- package/dist/browser/preview.css +181 -176
- package/dist/browser/preview.js +955 -182
- package/dist/browser/workbench.css +181 -176
- package/dist/browser/workbench.js +12 -6
- package/dist/browser/{workbenchSelect-BcWPWGzw.js → workbenchSelect-M441Lz0d.js} +1 -1
- package/dist/command/index.js +36 -36
- package/dist/common/authoring.d.ts +4 -4
- package/dist/common/authoringExamples.d.ts +3 -2
- package/dist/common/authoringSchema.d.ts +67 -4
- package/dist/common/control-api-conformance.js +58 -7
- package/dist/common/control-api.js +58 -7
- package/dist/common/control-requests.d.ts +3 -3
- package/dist/common/control-requests.js +234 -62
- package/dist/common/engine-contract.d.ts +1 -0
- package/dist/common/flow-authoring.js +56 -7
- package/dist/common/flow-change.d.ts +1 -1
- package/dist/common/flow-change.js +56 -7
- package/dist/common/flow-encoding.js +55 -7
- package/dist/common/flow-graph.d.ts +2 -1
- package/dist/common/flow-retry.d.ts +1 -1
- package/dist/common/flow-semantics.js +810 -577
- package/dist/common/http-request.d.ts +156 -0
- package/dist/common/http-request.js +5254 -0
- package/dist/common/mcp.d.ts +3 -3
- package/dist/common/mcp.js +58 -7
- package/dist/common/run-events.js +11 -9
- package/dist/common/runtime-contract.js +3 -0
- package/dist/common/scheduler.d.ts +1 -1
- package/dist/common/scheduler.js +70 -21
- package/dist/common/webhook-response.d.ts +0 -2
- package/dist/common/webhook-trigger.js +12 -11
- package/package.json +5 -1
- package/skills/open-flow/references/flow-authoring.md +1 -0
- package/skills/open-flow/references/flow-n8n-conversion.md +19 -15
- package/src/control/common/api.ts +1 -0
- package/src/control/common/authoring.ts +14 -3
- package/src/control/common/authoringExamples.ts +8 -0
- package/src/control/common/authoringSchema.ts +30 -24
- package/src/execution/common/engineContract.ts +4 -0
- package/src/execution/common/events.ts +3 -0
- package/src/execution/common/node-execution.ts +4 -2
- package/src/execution/common/scheduler.ts +1 -0
- package/src/flow/common/change.ts +3 -2
- package/src/flow/common/changeSchema.ts +12 -3
- package/src/flow/common/graph.ts +10 -4
- package/src/flow/common/retry.ts +1 -1
- package/src/flow/common/semantics.ts +60 -3
- package/src/flow/common/webhookResponse.ts +3 -7
- package/src/{openapi → http}/common/authBindings.ts +3 -3
- package/src/http/common/headers.ts +5 -0
- package/src/http/common/httpRequest.ts +251 -0
- package/src/trigger/common/webhook.ts +4 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-CEgmsyvS.js";
|
|
2
|
-
import { A as DropdownMenuSub, C as DropdownMenuContent, D as DropdownMenuRadioGroup, E as DropdownMenuLabel, I as useCompositeItem, J as waitBranchDescription, M as DropdownMenuSubTrigger, N as DropdownMenuTrigger, O as DropdownMenuRadioItem, P as isElementDisabled, S as DropdownMenuCheckboxItem, T as DropdownMenuItem, _ as NativeScrollArea, at as Checkbox, b as Z$1, c as useIconifyData, d as PopoverContent, f as PopoverDescription, g as PopoverTrigger, h as PopoverTitle, j as DropdownMenuSubContent, k as DropdownMenuSeparator, m as PopoverPanelContent, o as IconifyProvider, ot as useAriaLabelledBy, p as PopoverHeader, s as useIconifyCollectionLoader, t as ContentIcon, u as Popover, v as ScrollArea, w as DropdownMenuGroup, x as DropdownMenu, y as VirtualScrollArea } from "./ContentIcon-
|
|
2
|
+
import { A as DropdownMenuSub, C as DropdownMenuContent, D as DropdownMenuRadioGroup, E as DropdownMenuLabel, I as useCompositeItem, J as waitBranchDescription, M as DropdownMenuSubTrigger, N as DropdownMenuTrigger, O as DropdownMenuRadioItem, P as isElementDisabled, S as DropdownMenuCheckboxItem, T as DropdownMenuItem, _ as NativeScrollArea, at as Checkbox, b as Z$1, c as useIconifyData, d as PopoverContent, f as PopoverDescription, g as PopoverTrigger, h as PopoverTitle, j as DropdownMenuSubContent, k as DropdownMenuSeparator, m as PopoverPanelContent, o as IconifyProvider, ot as useAriaLabelledBy, p as PopoverHeader, s as useIconifyCollectionLoader, t as ContentIcon, u as Popover, v as ScrollArea, w as DropdownMenuGroup, x as DropdownMenu, y as VirtualScrollArea } from "./ContentIcon-FCpKiwjp.js";
|
|
3
3
|
import { i as compute, l as val } from "./dist-bO8nvHFH.js";
|
|
4
4
|
import { c as useLang, l as useTranslate, o as I18nProvider, r as isPlainObject, s as useI18n, u as useVal } from "./dist-BFmpkX4P.js";
|
|
5
5
|
import { $ as useAnchoredPopupScrollLock, $n as listNavigation, A as string, An as ownerDocument, Ar as CompositeRootContext, B as ARROW_LEFT, Bn as useValueChanged, Br as isElement, Cn as activeElement, Cr as useRenderElement, Dn as isFirefox, En as isAndroid, Er as NOOP, F as IndexGuessBehavior, Ft as FloatingFocusManager, G as HORIZONTAL_KEYS, Gn as closePress, H as ARROW_UP, Hn as createGenericEventDetails, Ht as FloatingPortal, I as useCompositeListItem, In as TransitionStatusDataAttributes, Ir as useStableCallback, J as VERTICAL_KEYS, K as HORIZONTAL_KEYS_WITH_EXTRA_KEYS, Kn as escapeKey, L as ALL_KEYS, Ln as transitionStatusMapping, Lr as useRefWithInit, Mr as formatErrorMessage, Nn as useTransitionStatus, Nr as mergeProps, Nt as useDismiss, Or as useMergedRefs, Pn as useOpenChangeComplete, Pr as useIsoLayoutEffect, Pt as useClick, Qn as itemPress, R as ARROW_DOWN, Sn as isInteractiveElement, Sr as clsx, Tn as getTarget, Tr as EMPTY_OBJECT, V as ARROW_RIGHT, Vn as createChangeEventDetails, Wn as clearPress, Wt as DROPDOWN_COLLISION_AVOIDANCE, X as isNativeInput, Xn as inputClear, Xt as useStore, Y as VERTICAL_KEYS_WITH_EXTRA_KEYS, Yn as inputChange, Yt as Store, Z as scrollIntoViewIfNeeded, Zn as inputPress, _n as isIndexOutOfListBounds, _r as useControlled, a as createTooltipHandle, an as useTimeout, bn as stopEvent, br as cn, c as TooltipPositioner, cr as useFormContext, ct as inertValue, d as TooltipRoot, dn as findNonDisabledListIndex, dr as useBaseUiId, dt as popupStateMapping, en as require_builtin_esm_external_require_react, er as none, fn as getGridCellIndexOfCorner, ft as pressableTriggerOpenStateMapping, gn as getMinListIndex, gr as visuallyHiddenInput, gt as useTypeahead, hn as getMaxListIndex, hr as visuallyHidden, i as TooltipTrigger, it as useAnchorPositioning, kr as useButton, l as TooltipPortal, lr as useRegisterFieldControl, lt as getPseudoElementBounds, mn as getGridNavigatedIndex, mr as fieldValidityMapping, mt as useOpenInteractionType, n as TooltipContent, nn as useValueAsRef, nt as getDisabledMountTransitionStyles, o as TooltipArrow, ot as useDirection, p as timeZoneOffsetMinutes, pn as getGridCellIndices, pr as DEFAULT_FIELD_STATE_ATTRIBUTES, pt as triggerOpenStateMapping, q as MODIFIER_KEYS, r as TooltipProvider, rn as useOnFirstRender, rt as InternalBackdrop, s as TooltipPopup, sr as useLabelableContext, st as CompositeList, t as Tooltip, tn as createSelector, tt as usePositioner, u as TooltipTrigger$1, un as createGridCellMap, ur as useFieldRootContext, vn as isListIndexDisabled, vr as Button$1, vt as useListNavigation, wn as contains, wr as EMPTY_ARRAY$1, wt as useFloatingRootContext, xr as cva, yr as buttonVariants, yt as useInteractions, z as ARROW_KEYS } from "./tooltip-wZJRB9oP.js";
|
|
6
|
-
import { $ as
|
|
7
|
-
import { C as isSameViewport, S as isMac, _ as CanvasTooltip, a as collapseAllNested, b as toManifestHandleName, c as defaultTriggerIcon, d as selectableTimeZones, f as timeZoneLabel, g as E$1, h as cronDescription, i as JSONViewer, l as useDebouncedValue, m as timeZoneOffset, n as setAddItemId, o as formatDuration, p as timeZoneLongLabel, r as Textarea, s as CanvasNodeIcon, t as FlowCanvas, u as IconStack, v as CanvasStore, x as toManifestNodeId, y as toViewEdge } from "./FlowCanvas-
|
|
8
|
-
import { $
|
|
6
|
+
import { $ as waitAutoContinueSchema, $t as useLabelableId, Bt as SelectValue, Ct as webhookMethods, D as nodeErrorSchema, Dt as portsAssignable, E as workflowToolNameIssue, Et as matchesSchema, F as operandHandle, Ft as SelectContent, Gt as stringifyAsValue, Ht as hasNullItemLabel, I as operatorsForType, It as SelectGroup, J as webhookResponseAllowsBody, Jt as findItemIndex, K as webhookHeaderValuePort, Kt as compareItemEquality, Lt as SelectItem, Mt as dequal, Nt as Select$1, O as nodeSystemOutputPorts, Ot as schemaObject, Pt as SelectChevron, Q as workflowOutputsPort, Qt as Input, R as unaryOperator, Rt as SelectSeparator, St as limitDecisionQuestions, Ut as isGroupedItems, Vt as resolveAriaLabelledBy, W as decodeRevisionContent, Wt as stringifyAsLabel, X as webhookResponseTimeout, Xt as selectedValueIncludes, Y as webhookResponseInputs, Yt as removeItem, Z as webhookStatusCodePort, Zt as Label, _t as decisionLimits, at as httpHeaderSchema, b as nodeNameIssue, bt as decisionTask, c as DialogTrigger, d as Field, en as ChevronDown, et as defaultNodeRetry, f as FieldDescription, h as FieldLabel, i as DialogDescription, j as comparisonIssue, k as supportsNodeErrorHandling, kt as variableInputCompatible, l as Icon, lt as httpRequestIssues, m as FieldGroup, nt as retryConfigurationSchema, o as DialogHeader, ot as httpQuerySchema, p as FieldError, pt as httpHeaderNameIssue, q as webhookHeadersPort, qt as defaultItemEquality, r as DialogContent, rt as supportsNodeRetry, s as DialogTitle, t as Dialog, tt as nodeRetryLimits, u as Spinner, ut as httpRequestTask, wt as webhookSupportsBody, xt as defaultDecisionQuestion, yt as decisionQuestionIssues, z as valueType, zt as SelectTrigger } from "./dialog-ZtpsFbl4.js";
|
|
7
|
+
import { C as isSameViewport, S as isMac, _ as CanvasTooltip, a as collapseAllNested, b as toManifestHandleName, c as defaultTriggerIcon, d as selectableTimeZones, f as timeZoneLabel, g as E$1, h as cronDescription, i as JSONViewer, l as useDebouncedValue, m as timeZoneOffset, n as setAddItemId, o as formatDuration, p as timeZoneLongLabel, r as Textarea, s as CanvasNodeIcon, t as FlowCanvas, u as IconStack, v as CanvasStore, x as toManifestNodeId, y as toViewEdge } from "./FlowCanvas-dzRBnlUT.js";
|
|
8
|
+
import { $t as FeishuEventPicker, A as schemaForEditor, An as securityOptions, B as datePickerValue, Bt as InputGroupAddon, Cn as triggerConfigValue, D as defaultValueEditorSchema, Dn as object$1, E as supportsFeishuChatFilter, En as listOperations, F as calendarChange, Fn as workflowAgentTool, Ft as dequal$1, G as indexAddNodeOptions, Gn as controlErrorCode, Gt as EmptyHeader, H as isDateFormat, Ht as Empty, I as calendarDate, It as WorkflowExportMenuItem, Jt as Badge, Kn as eventSourceKind, Kt as EmptyMedia, L as dateFromTimeZone, Ln as workflowCandidateGroup, Lt as IdTooltip, M as getDefaultValue, Mn as serverAddress, N as isUnconstrainedSchema, Nn as servers, O as editorComponent, On as openApiFieldIssues, P as typeOfSchema, Pn as sameWorkflowInterface, Q as resourceValue, Qt as createI18n, R as dateInTimeZone, Rn as workflowCapability, Rt as followWorkbenchLink, T as feishuResourceKind, Tn as inputValue, Ut as EmptyContent, V as dateTimeWall, Vt as InputGroupInput, Wt as EmptyDescription, X as observeResource, Xt as SourceForm, Z as resourceData, Zt as SourceSelect, _t as connectionCatalog, an as decodeResultList, cn as inputSourceCandidates, ct as revisionView, dn as sourceOutputLabel, en as EventSourceSetup, et as designerGraph, fn as sourcePort, gn as isJsonObject, hn as triggerOutputDefinitions, ht as schemaMismatchMessage, it as providerIcon, j as valueForEditor, jn as selectOperation, k as editorGroups, kn as openApiTask, ln as resolutionOutputPorts, mt as diagnosticNodeId, n as agentTool, nt as triggerNodeIcon, ot as canCancelRun, pt as diagnosticMessage, q as mapSource, qt as EmptyTitle, rt as actionSummary, sn as executionReachableNodes, st as hasRunFilter, tn as errorNotice, tt as semanticNodeIcon, un as webhookResponseDiagnostics, wn as triggerConfigValues, z as datePickerChange, zn as workflowSelectionTask, zt as InputGroup } from "./flowChanges-b_5UobFj.js";
|
|
9
9
|
import { r as resolveUiLanguage } from "./languages-gYzoQqCi.js";
|
|
10
10
|
import { a as renameObjectField, i as objectValue, n as isJsonValue, o as setObjectField, r as jsonDataTypes, s as valueType$1, t as initialValue } from "./value-BbFQZZ_V.js";
|
|
11
11
|
import { n as compile, r as validate } from "./flowRunInputEditorStore-ys1-w9GW.js";
|
|
12
|
-
import { t as WorkbenchSelect } from "./workbenchSelect-
|
|
12
|
+
import { t as WorkbenchSelect } from "./workbenchSelect-M441Lz0d.js";
|
|
13
13
|
import * as React from "react";
|
|
14
14
|
import reactExports, { Children, Fragment, Suspense, createContext, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
15
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -2559,6 +2559,7 @@ function fallbackIcon$1(item) {
|
|
|
2559
2559
|
case "agent": return "llm";
|
|
2560
2560
|
case "condition": return "condition";
|
|
2561
2561
|
case "decision": return "decision";
|
|
2562
|
+
case "http-request":
|
|
2562
2563
|
case "openapi":
|
|
2563
2564
|
case "connector":
|
|
2564
2565
|
case "connector-group": return "connection";
|
|
@@ -5607,44 +5608,44 @@ function FlowNodeList({ nodes, onFocusNode, onSelect, groupTriggers = false }) {
|
|
|
5607
5608
|
});
|
|
5608
5609
|
}
|
|
5609
5610
|
var valueEditor_module_default = {
|
|
5610
|
-
root: "
|
|
5611
|
-
errorAnchor: "
|
|
5612
|
-
body: "
|
|
5613
|
-
valueTools: "
|
|
5614
|
-
options: "
|
|
5615
|
-
toolbar: "
|
|
5616
|
-
presence: "
|
|
5617
|
-
actions: "
|
|
5618
|
-
collection: "
|
|
5619
|
-
fieldName: "
|
|
5620
|
-
fieldType: "
|
|
5621
|
-
json: "
|
|
5622
|
-
description: "
|
|
5623
|
-
error: "
|
|
5624
|
-
summary: "
|
|
5625
|
-
summaryError: "
|
|
5626
|
-
srOnly: "
|
|
5627
|
-
option: "
|
|
5628
|
-
header: "
|
|
5629
|
-
leadingControl: "
|
|
5630
|
-
toggleControl: "
|
|
5631
|
-
valueAddon: "
|
|
5632
|
-
summaryText: "
|
|
5633
|
-
clearValue: "
|
|
5634
|
-
resetValue: "
|
|
5635
|
-
unsetValue: "
|
|
5636
|
-
arrayIndex: "
|
|
5637
|
-
nullValue: "
|
|
5638
|
-
nullChip: "
|
|
5639
|
-
collectionActions: "
|
|
5640
|
-
emptyObjectContent: "
|
|
5641
|
-
emptyObjectConstraint: "
|
|
5642
|
-
jsonCode: "
|
|
5643
|
-
emptyString: "
|
|
5644
|
-
booleanControl: "
|
|
5645
|
-
booleanIndicator: "
|
|
5646
|
-
objectNotice: "
|
|
5647
|
-
valuePrefix: "
|
|
5611
|
+
root: "valueEditor_root_4a4f1",
|
|
5612
|
+
errorAnchor: "valueEditor_errorAnchor_4a4f1",
|
|
5613
|
+
body: "valueEditor_body_4a4f1",
|
|
5614
|
+
valueTools: "valueEditor_valueTools_4a4f1",
|
|
5615
|
+
options: "valueEditor_options_4a4f1",
|
|
5616
|
+
toolbar: "valueEditor_toolbar_4a4f1",
|
|
5617
|
+
presence: "valueEditor_presence_4a4f1",
|
|
5618
|
+
actions: "valueEditor_actions_4a4f1",
|
|
5619
|
+
collection: "valueEditor_collection_4a4f1",
|
|
5620
|
+
fieldName: "valueEditor_fieldName_4a4f1",
|
|
5621
|
+
fieldType: "valueEditor_fieldType_4a4f1",
|
|
5622
|
+
json: "valueEditor_json_4a4f1",
|
|
5623
|
+
description: "valueEditor_description_4a4f1",
|
|
5624
|
+
error: "valueEditor_error_4a4f1",
|
|
5625
|
+
summary: "valueEditor_summary_4a4f1",
|
|
5626
|
+
summaryError: "valueEditor_summaryError_4a4f1",
|
|
5627
|
+
srOnly: "valueEditor_srOnly_4a4f1",
|
|
5628
|
+
option: "valueEditor_option_4a4f1",
|
|
5629
|
+
header: "valueEditor_header_4a4f1",
|
|
5630
|
+
leadingControl: "valueEditor_leadingControl_4a4f1",
|
|
5631
|
+
toggleControl: "valueEditor_toggleControl_4a4f1",
|
|
5632
|
+
valueAddon: "valueEditor_valueAddon_4a4f1",
|
|
5633
|
+
summaryText: "valueEditor_summaryText_4a4f1",
|
|
5634
|
+
clearValue: "valueEditor_clearValue_4a4f1",
|
|
5635
|
+
resetValue: "valueEditor_resetValue_4a4f1",
|
|
5636
|
+
unsetValue: "valueEditor_unsetValue_4a4f1",
|
|
5637
|
+
arrayIndex: "valueEditor_arrayIndex_4a4f1",
|
|
5638
|
+
nullValue: "valueEditor_nullValue_4a4f1",
|
|
5639
|
+
nullChip: "valueEditor_nullChip_4a4f1",
|
|
5640
|
+
collectionActions: "valueEditor_collectionActions_4a4f1",
|
|
5641
|
+
emptyObjectContent: "valueEditor_emptyObjectContent_4a4f1",
|
|
5642
|
+
emptyObjectConstraint: "valueEditor_emptyObjectConstraint_4a4f1",
|
|
5643
|
+
jsonCode: "valueEditor_jsonCode_4a4f1",
|
|
5644
|
+
emptyString: "valueEditor_emptyString_4a4f1",
|
|
5645
|
+
booleanControl: "valueEditor_booleanControl_4a4f1",
|
|
5646
|
+
booleanIndicator: "valueEditor_booleanIndicator_4a4f1",
|
|
5647
|
+
objectNotice: "valueEditor_objectNotice_4a4f1",
|
|
5648
|
+
valuePrefix: "valueEditor_valuePrefix_4a4f1"
|
|
5648
5649
|
};
|
|
5649
5650
|
//#endregion
|
|
5650
5651
|
//#region src/form/browser/fieldControl.tsx
|
|
@@ -5654,6 +5655,7 @@ function ValueEditorFeedback({ children, error }) {
|
|
|
5654
5655
|
const errorId = error == null ? void 0 : `${id}-error`;
|
|
5655
5656
|
return /* @__PURE__ */ jsxs("div", {
|
|
5656
5657
|
className: valueEditor_module_default.errorAnchor,
|
|
5658
|
+
"data-feedback": error != null || void 0,
|
|
5657
5659
|
children: [children(errorId), error != null && /* @__PURE__ */ jsx("div", {
|
|
5658
5660
|
id: errorId,
|
|
5659
5661
|
className: valueEditor_module_default.error,
|
|
@@ -23361,8 +23363,9 @@ function FieldValueEditor(suppliedProps) {
|
|
|
23361
23363
|
});
|
|
23362
23364
|
const firstName = objectFieldNames(schema, value)[0];
|
|
23363
23365
|
const firstSchema = firstName == null ? void 0 : objectValue(source.properties)?.[firstName] ?? source.additionalProperties ?? {};
|
|
23366
|
+
const firstEditorSchema = !definitionEditable && editorComponent(firstSchema) === "json" ? defaultValueEditorSchema(firstSchema) : firstSchema;
|
|
23364
23367
|
const firstValue = firstName == null ? void 0 : objectValue(value)?.[firstName];
|
|
23365
|
-
const childMarker = type === "array" ? array.length > 0 : firstName != null && (sorting && props.onDefinitionChange != null || fieldValueShape(
|
|
23368
|
+
const childMarker = type === "array" ? array.length > 0 : firstName != null && (sorting && props.onDefinitionChange != null || fieldValueShape(firstEditorSchema, firstValue, {
|
|
23366
23369
|
objectChild: true,
|
|
23367
23370
|
depth: depth + 1
|
|
23368
23371
|
}).expandable);
|
|
@@ -23373,6 +23376,7 @@ function FieldValueEditor(suppliedProps) {
|
|
|
23373
23376
|
id: `${id}-body`,
|
|
23374
23377
|
className: valueEditor_module_default.body,
|
|
23375
23378
|
"data-value-body": true,
|
|
23379
|
+
"data-feedback": anchor === "body" && messages.length > 0 || void 0,
|
|
23376
23380
|
hidden: compactValue && expandable && !expanded || expandable && !hasExpandedContent,
|
|
23377
23381
|
children: [
|
|
23378
23382
|
!showUnset && !compactValue && valueEditable && presence !== "value" && /* @__PURE__ */ jsx("span", {
|
|
@@ -23503,6 +23507,7 @@ function FieldValueEditor(suppliedProps) {
|
|
|
23503
23507
|
"aria-label": label,
|
|
23504
23508
|
"aria-describedby": messages.length ? `${id}-error` : void 0,
|
|
23505
23509
|
ref: setContainer,
|
|
23510
|
+
"data-summary-feedback": anchor === "summary" && messages.length > 0 || void 0,
|
|
23506
23511
|
"data-inline": props.hideOptions && !hasHeader || void 0,
|
|
23507
23512
|
"data-compact": props.compact || void 0,
|
|
23508
23513
|
"data-value-tools": canReset || canClear || canToggleJson || inlineExpansion && hasExpandedContent || void 0,
|
|
@@ -29561,6 +29566,278 @@ function GeneralSettings({ title, children, disabled = false, readOnly = false,
|
|
|
29561
29566
|
}, nodeId);
|
|
29562
29567
|
}
|
|
29563
29568
|
//#endregion
|
|
29569
|
+
//#region src/workbench/browser/runtime/editor/httpParameterEditor.tsx
|
|
29570
|
+
var expanded$2 = () => true;
|
|
29571
|
+
var object = (value) => value != null && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
29572
|
+
function HttpParameterEditor({ group, task, entries, disabled, readOnly, variables, renderSource, onEdit }) {
|
|
29573
|
+
const t = useTranslate();
|
|
29574
|
+
if (task.executor.kind !== "http-request") return null;
|
|
29575
|
+
const parameters = task.executor[group];
|
|
29576
|
+
const root = parameters.mode === "object" ? entries[group] : void 0;
|
|
29577
|
+
const label = t(`httpRequest.${group}`);
|
|
29578
|
+
const schema = group === "query" ? httpQuerySchema : httpHeaderSchema;
|
|
29579
|
+
const handle = (name) => `${group === "query" ? "query" : "header"}.${name}`;
|
|
29580
|
+
const values = parameters.mode === "fields" ? Object.fromEntries(parameters.names.map((name) => {
|
|
29581
|
+
const value = entries[handle(name)]?.value;
|
|
29582
|
+
return [name, value === void 0 ? "" : value];
|
|
29583
|
+
})) : object(root?.value);
|
|
29584
|
+
const input = (port, entry, name) => {
|
|
29585
|
+
const upstream = renderSource(port.handle, port);
|
|
29586
|
+
return {
|
|
29587
|
+
embedded: true,
|
|
29588
|
+
definition: port,
|
|
29589
|
+
variables,
|
|
29590
|
+
disabled,
|
|
29591
|
+
readOnly,
|
|
29592
|
+
variableName: entry?.variableName,
|
|
29593
|
+
connected: entry?.connected ?? false,
|
|
29594
|
+
upstream: upstream == null ? void 0 : {
|
|
29595
|
+
...upstream,
|
|
29596
|
+
onChange: (source) => onEdit({
|
|
29597
|
+
kind: "source",
|
|
29598
|
+
source: {
|
|
29599
|
+
kind: "node",
|
|
29600
|
+
...source
|
|
29601
|
+
},
|
|
29602
|
+
field: name,
|
|
29603
|
+
fields: values
|
|
29604
|
+
})
|
|
29605
|
+
},
|
|
29606
|
+
onVariable: (next) => {
|
|
29607
|
+
if (next == null) onEdit({
|
|
29608
|
+
kind: "fields",
|
|
29609
|
+
value: name == null ? {} : {
|
|
29610
|
+
...values,
|
|
29611
|
+
[name]: ""
|
|
29612
|
+
},
|
|
29613
|
+
field: name
|
|
29614
|
+
});
|
|
29615
|
+
else onEdit({
|
|
29616
|
+
kind: "variable",
|
|
29617
|
+
name: next,
|
|
29618
|
+
field: name,
|
|
29619
|
+
fields: values
|
|
29620
|
+
});
|
|
29621
|
+
}
|
|
29622
|
+
};
|
|
29623
|
+
};
|
|
29624
|
+
return /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), /* @__PURE__ */ jsx(FieldTable, {
|
|
29625
|
+
standalone: true,
|
|
29626
|
+
layout: "values",
|
|
29627
|
+
typeColumn: false,
|
|
29628
|
+
columnHeadings: false,
|
|
29629
|
+
actionSlots: 2,
|
|
29630
|
+
children: /* @__PURE__ */ jsx(NodeInputValue, {
|
|
29631
|
+
...input({
|
|
29632
|
+
handle: group,
|
|
29633
|
+
jsonSchema: schema,
|
|
29634
|
+
nullable: true
|
|
29635
|
+
}, root),
|
|
29636
|
+
label,
|
|
29637
|
+
value: values,
|
|
29638
|
+
onValue: (next) => onEdit({
|
|
29639
|
+
kind: "fields",
|
|
29640
|
+
value: object(next)
|
|
29641
|
+
}),
|
|
29642
|
+
presentation: {
|
|
29643
|
+
valueOnly: true,
|
|
29644
|
+
hideOptions: true,
|
|
29645
|
+
hideValueTools: true,
|
|
29646
|
+
hideChildTypes: true,
|
|
29647
|
+
expansionPolicy: expanded$2,
|
|
29648
|
+
validateObjectFieldName: (name, current) => group === "query" ? !!name.trim() && (name === current || !Object.hasOwn(values, name)) : httpHeaderNameIssue(name, Object.keys(values).filter((key) => key !== current)) == null,
|
|
29649
|
+
renderObjectField: (name, props) => /* @__PURE__ */ jsx(NodeInputValue, {
|
|
29650
|
+
...input({
|
|
29651
|
+
handle: handle(name),
|
|
29652
|
+
jsonSchema: props.schema,
|
|
29653
|
+
nullable: true
|
|
29654
|
+
}, parameters.mode === "fields" ? entries[handle(name)] : void 0, name),
|
|
29655
|
+
label: props.label,
|
|
29656
|
+
value: parameters.mode === "fields" ? entries[handle(name)]?.value : values[name],
|
|
29657
|
+
presentation: props,
|
|
29658
|
+
onValue: (value) => onEdit({
|
|
29659
|
+
kind: "fields",
|
|
29660
|
+
value: {
|
|
29661
|
+
...values,
|
|
29662
|
+
[name]: value ?? null
|
|
29663
|
+
},
|
|
29664
|
+
field: name
|
|
29665
|
+
})
|
|
29666
|
+
})
|
|
29667
|
+
}
|
|
29668
|
+
})
|
|
29669
|
+
})] });
|
|
29670
|
+
}
|
|
29671
|
+
//#endregion
|
|
29672
|
+
//#region src/workbench/browser/runtime/editor/httpRequestSection.tsx
|
|
29673
|
+
function HttpRequestSection({ task, disabled, onSave, parameters, input }) {
|
|
29674
|
+
const t = useTranslate();
|
|
29675
|
+
const id = useId();
|
|
29676
|
+
const saveRef = useRef(onSave);
|
|
29677
|
+
saveRef.current = onSave;
|
|
29678
|
+
const taskRef = useRef(task);
|
|
29679
|
+
taskRef.current = task;
|
|
29680
|
+
const [changes] = useState(() => new TaskExecutorChanges(task.executor, (before, next) => {
|
|
29681
|
+
if (before.kind != "http-request" || next.kind != "http-request") return Promise.resolve(false);
|
|
29682
|
+
const current = taskRef.current;
|
|
29683
|
+
if (current.executor.kind !== "http-request") return Promise.resolve(false);
|
|
29684
|
+
const merged = { ...current.executor };
|
|
29685
|
+
for (const key of [
|
|
29686
|
+
"method",
|
|
29687
|
+
"authentication",
|
|
29688
|
+
"bodyFormat",
|
|
29689
|
+
"responseFormat",
|
|
29690
|
+
"statusPolicy"
|
|
29691
|
+
]) if (!dequal(before[key], next[key])) Object.assign(merged, { [key]: next[key] });
|
|
29692
|
+
return saveRef.current(current, httpRequestTask(merged, current.name, current));
|
|
29693
|
+
}));
|
|
29694
|
+
const [config, setConfig] = useState(changes.value);
|
|
29695
|
+
const [failed, setFailed] = useState(false);
|
|
29696
|
+
useEffect(() => {
|
|
29697
|
+
changes.sync(task.executor);
|
|
29698
|
+
setConfig(changes.value);
|
|
29699
|
+
}, [changes, task.executor]);
|
|
29700
|
+
if (config.kind != "http-request") return null;
|
|
29701
|
+
const issues = httpRequestIssues(config);
|
|
29702
|
+
const error = (field, index) => {
|
|
29703
|
+
const messages = issues.filter((issue) => issue.field === field && issue.index === index).map((issue) => t(`httpRequest.${issue.code}`));
|
|
29704
|
+
return messages.length ? [...new Set(messages)].join(" ") : void 0;
|
|
29705
|
+
};
|
|
29706
|
+
async function save() {
|
|
29707
|
+
try {
|
|
29708
|
+
setFailed(!await changes.save());
|
|
29709
|
+
} catch {
|
|
29710
|
+
setFailed(true);
|
|
29711
|
+
}
|
|
29712
|
+
}
|
|
29713
|
+
function update(patch) {
|
|
29714
|
+
if (disabled || changes.value.kind != "http-request") return;
|
|
29715
|
+
changes.value = {
|
|
29716
|
+
...changes.value,
|
|
29717
|
+
...patch
|
|
29718
|
+
};
|
|
29719
|
+
setConfig(changes.value);
|
|
29720
|
+
save();
|
|
29721
|
+
}
|
|
29722
|
+
const select = (key, value, options, change, fieldLabel = t(`httpRequest.${key}`)) => /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, {
|
|
29723
|
+
htmlFor: `${id}-${key}`,
|
|
29724
|
+
children: fieldLabel
|
|
29725
|
+
}), /* @__PURE__ */ jsx(ValueEditorFeedback, {
|
|
29726
|
+
error: key === "authentication" && config.authentication.type === "apiKey" ? void 0 : error(key),
|
|
29727
|
+
children: (errorId) => /* @__PURE__ */ jsx(NativeSelect, {
|
|
29728
|
+
className: "w-full",
|
|
29729
|
+
id: `${id}-${key}`,
|
|
29730
|
+
value,
|
|
29731
|
+
disabled,
|
|
29732
|
+
"aria-invalid": !!errorId,
|
|
29733
|
+
"aria-describedby": errorId,
|
|
29734
|
+
onChange: (event) => change(event.target.value),
|
|
29735
|
+
children: options.map(([optionValue, label]) => /* @__PURE__ */ jsx(NativeSelectOption, {
|
|
29736
|
+
value: optionValue,
|
|
29737
|
+
children: label
|
|
29738
|
+
}, optionValue))
|
|
29739
|
+
})
|
|
29740
|
+
})] }, key);
|
|
29741
|
+
const auth = config.authentication;
|
|
29742
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
29743
|
+
/* @__PURE__ */ jsx(InspectorSection, {
|
|
29744
|
+
title: t("httpRequest.title"),
|
|
29745
|
+
"data-inspector-section": "task",
|
|
29746
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
29747
|
+
className: "node-settings flex flex-col gap-3",
|
|
29748
|
+
"data-value-editor-scope": true,
|
|
29749
|
+
children: [
|
|
29750
|
+
input("url", "URL"),
|
|
29751
|
+
select("method", config.method, [
|
|
29752
|
+
"GET",
|
|
29753
|
+
"POST",
|
|
29754
|
+
"PUT",
|
|
29755
|
+
"PATCH",
|
|
29756
|
+
"DELETE",
|
|
29757
|
+
"HEAD",
|
|
29758
|
+
"OPTIONS"
|
|
29759
|
+
].map((value) => [value, value]), (method) => update({ method })),
|
|
29760
|
+
parameters,
|
|
29761
|
+
select("bodyFormat", config.bodyFormat, [
|
|
29762
|
+
["none", t("httpRequest.none")],
|
|
29763
|
+
["json", "JSON"],
|
|
29764
|
+
["text", t("httpRequest.text")],
|
|
29765
|
+
["form", "URL-encoded"]
|
|
29766
|
+
], (bodyFormat) => update({ bodyFormat })),
|
|
29767
|
+
config.bodyFormat !== "none" && input("body", t("httpRequest.body"))
|
|
29768
|
+
]
|
|
29769
|
+
})
|
|
29770
|
+
}),
|
|
29771
|
+
/* @__PURE__ */ jsx(InspectorSection, {
|
|
29772
|
+
title: t("httpRequest.authentication"),
|
|
29773
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
29774
|
+
className: "node-settings flex flex-col gap-3",
|
|
29775
|
+
"data-value-editor-scope": true,
|
|
29776
|
+
children: [
|
|
29777
|
+
select("authentication", auth.type, [
|
|
29778
|
+
["none", t("httpRequest.none")],
|
|
29779
|
+
["bearer", "Bearer"],
|
|
29780
|
+
["basic", "Basic"],
|
|
29781
|
+
["apiKey", "API Key"]
|
|
29782
|
+
], (type) => update({ authentication: type == "apiKey" ? {
|
|
29783
|
+
type,
|
|
29784
|
+
name: "X-API-Key",
|
|
29785
|
+
in: "header"
|
|
29786
|
+
} : { type } }), t("httpRequest.authenticationType")),
|
|
29787
|
+
auth.type == "apiKey" && /* @__PURE__ */ jsxs(Fragment$1, { children: [select("location", auth.in, [["header", "Header"], ["query", "Query"]], (location) => update({ authentication: {
|
|
29788
|
+
...auth,
|
|
29789
|
+
in: location
|
|
29790
|
+
} })), /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, {
|
|
29791
|
+
htmlFor: `${id}-keyName`,
|
|
29792
|
+
children: t("httpRequest.keyName")
|
|
29793
|
+
}), /* @__PURE__ */ jsx(ValueEditorFeedback, {
|
|
29794
|
+
error: error("authentication"),
|
|
29795
|
+
children: (errorId) => /* @__PURE__ */ jsx(Input, {
|
|
29796
|
+
id: `${id}-keyName`,
|
|
29797
|
+
value: auth.name,
|
|
29798
|
+
"aria-invalid": !!errorId,
|
|
29799
|
+
"aria-describedby": errorId,
|
|
29800
|
+
readOnly: disabled,
|
|
29801
|
+
onChange: (event) => update({ authentication: {
|
|
29802
|
+
...auth,
|
|
29803
|
+
name: event.target.value
|
|
29804
|
+
} })
|
|
29805
|
+
})
|
|
29806
|
+
})] })] }),
|
|
29807
|
+
auth.type === "basic" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [input("auth.username", t("httpRequest.username")), input("auth.password", t("httpRequest.password"))] }) : auth.type !== "none" ? input("auth.token", auth.type === "apiKey" ? t("httpRequest.keyValue") : "Token") : null
|
|
29808
|
+
]
|
|
29809
|
+
})
|
|
29810
|
+
}),
|
|
29811
|
+
/* @__PURE__ */ jsx(InspectorSection, {
|
|
29812
|
+
title: t("httpRequest.responseSettings"),
|
|
29813
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
29814
|
+
className: "node-settings flex flex-col gap-3",
|
|
29815
|
+
"data-value-editor-scope": true,
|
|
29816
|
+
children: [
|
|
29817
|
+
select("responseFormat", config.responseFormat, [
|
|
29818
|
+
["auto", t("httpRequest.auto")],
|
|
29819
|
+
["json", "JSON"],
|
|
29820
|
+
["text", t("httpRequest.text")]
|
|
29821
|
+
], (responseFormat) => update({ responseFormat })),
|
|
29822
|
+
select("statusPolicy", config.statusPolicy, [["success", t("httpRequest.success")], ["all", t("httpRequest.all")]], (statusPolicy) => update({ statusPolicy })),
|
|
29823
|
+
failed && /* @__PURE__ */ jsx(ValueEditorFeedback, {
|
|
29824
|
+
error: t("httpRequest.saveFailed"),
|
|
29825
|
+
children: (errorId) => /* @__PURE__ */ jsx(Button$1, {
|
|
29826
|
+
variant: "outline",
|
|
29827
|
+
size: "field",
|
|
29828
|
+
"aria-invalid": true,
|
|
29829
|
+
"aria-describedby": errorId,
|
|
29830
|
+
disabled,
|
|
29831
|
+
onClick: () => void save(),
|
|
29832
|
+
children: t("httpRequest.retry")
|
|
29833
|
+
})
|
|
29834
|
+
})
|
|
29835
|
+
]
|
|
29836
|
+
})
|
|
29837
|
+
})
|
|
29838
|
+
] });
|
|
29839
|
+
}
|
|
29840
|
+
//#endregion
|
|
29564
29841
|
//#region src/workbench/browser/runtime/editor/leinaBotSelect.tsx
|
|
29565
29842
|
function LeinaBotSelect({ source, flowId, value, disabled, onChange }) {
|
|
29566
29843
|
const t = useTranslate();
|
|
@@ -30392,9 +30669,9 @@ function OpenApiSection({ task, disabled, load, onSave, credentials }) {
|
|
|
30392
30669
|
})]
|
|
30393
30670
|
})]
|
|
30394
30671
|
})
|
|
30395
|
-
})] }), selectedServer != null && Object.entries(object(selectedServer.variables ?? {})).map(([name, definition]) => /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: name }), /* @__PURE__ */ jsx(Input, {
|
|
30672
|
+
})] }), selectedServer != null && Object.entries(object$1(selectedServer.variables ?? {})).map(([name, definition]) => /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: name }), /* @__PURE__ */ jsx(Input, {
|
|
30396
30673
|
"aria-label": name,
|
|
30397
|
-
value: serverVariables[name] ?? String(object(definition).default ?? ""),
|
|
30674
|
+
value: serverVariables[name] ?? String(object$1(definition).default ?? ""),
|
|
30398
30675
|
disabled,
|
|
30399
30676
|
onChange: (event) => setServerVariables({
|
|
30400
30677
|
...serverVariables,
|
|
@@ -31595,7 +31872,7 @@ function WebhookHeadersEditor({ options, outputs, disabled, readOnly, sourceDisa
|
|
|
31595
31872
|
onDraftIssue: ignoreDraft,
|
|
31596
31873
|
valueAddon: source(),
|
|
31597
31874
|
editor: whole == null ? void 0 : selected(whole.output, issue("/responseHeadersSource")),
|
|
31598
|
-
validateObjectFieldName: (name, current) =>
|
|
31875
|
+
validateObjectFieldName: (name, current) => httpHeaderNameIssue(name, Object.keys(headers).filter((candidate) => candidate !== current)) == null,
|
|
31599
31876
|
renderObjectField: (name, props) => {
|
|
31600
31877
|
const reference = binding(name);
|
|
31601
31878
|
return /* @__PURE__ */ jsx(FieldValueEditor, {
|
|
@@ -32098,7 +32375,7 @@ function WebhookResponseEditor({ entries, disabled, readOnly, variables, renderS
|
|
|
32098
32375
|
hideValueTools: true,
|
|
32099
32376
|
hideChildTypes: true,
|
|
32100
32377
|
expansionPolicy: expanded,
|
|
32101
|
-
validateObjectFieldName: (next, current) =>
|
|
32378
|
+
validateObjectFieldName: (next, current) => httpHeaderNameIssue(next, Object.keys(value != null && typeof value === "object" && !Array.isArray(value) ? value : {}).filter((key) => key !== current)) == null
|
|
32102
32379
|
} : { hideOptions: true }
|
|
32103
32380
|
});
|
|
32104
32381
|
return /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), headers ? /* @__PURE__ */ jsx(FieldTable, {
|
|
@@ -32125,7 +32402,7 @@ function inspectorIcon(node) {
|
|
|
32125
32402
|
if (node?.kind == "task" && node.definition != null && "executor" in node.definition) {
|
|
32126
32403
|
if (node.definition.executor.kind == "decision") return "decision";
|
|
32127
32404
|
if (node.definition.executor.kind == "workflow") return "flow";
|
|
32128
|
-
if (node.definition.executor.kind == "openapi") return "task";
|
|
32405
|
+
if (node.definition.executor.kind == "openapi" || node.definition.executor.kind == "http-request") return "task";
|
|
32129
32406
|
return node.definition.executor.kind == "connector" ? "connection" : "llm";
|
|
32130
32407
|
}
|
|
32131
32408
|
return "task";
|
|
@@ -32158,6 +32435,7 @@ function nodePurposePlaceholder(selection, t, action, displays) {
|
|
|
32158
32435
|
case "agent": return t("addNode.agentDescription");
|
|
32159
32436
|
case "decision": return t("decision.description");
|
|
32160
32437
|
case "workflow": return t("workflow.description");
|
|
32438
|
+
case "http-request": return t("httpRequest.description");
|
|
32161
32439
|
case "openapi": return t("openapi.description");
|
|
32162
32440
|
case "connector": return action?.description;
|
|
32163
32441
|
case "llm": return t(definition.executor.mode == "json" ? "addNode.llmStructuredDescription" : "addNode.llmChatDescription");
|
|
@@ -32165,7 +32443,7 @@ function nodePurposePlaceholder(selection, t, action, displays) {
|
|
|
32165
32443
|
}
|
|
32166
32444
|
}
|
|
32167
32445
|
}
|
|
32168
|
-
function inputUpstreamSources({ revision, sourceNodeIcons, selection, store, handleName, t, triggerDisplays }) {
|
|
32446
|
+
function inputUpstreamSources({ revision, sourceNodeIcons, selection, store, handleName, port, t, triggerDisplays }) {
|
|
32169
32447
|
const graph = revision.graph();
|
|
32170
32448
|
const mapping = revision.inputMappings(selection.node)[handleName];
|
|
32171
32449
|
const sources = mapping?.kind == "sources" ? mapping.sources.filter((source) => source.kind == "node") : [];
|
|
@@ -32184,7 +32462,10 @@ function inputUpstreamSources({ revision, sourceNodeIcons, selection, store, han
|
|
|
32184
32462
|
check: void 0
|
|
32185
32463
|
};
|
|
32186
32464
|
}),
|
|
32187
|
-
query: revision.inputSource(selection.id, handleName)
|
|
32465
|
+
query: port == null ? revision.inputSource(selection.id, handleName) : {
|
|
32466
|
+
...revision.inputSource(selection.id, handleName),
|
|
32467
|
+
candidates: () => inputSourceCandidates(graph, selection.id, handleName, port)
|
|
32468
|
+
},
|
|
32188
32469
|
groups: [],
|
|
32189
32470
|
describeGroups: (candidates) => Object.entries(candidates).map(([nodeId, outputs]) => {
|
|
32190
32471
|
const node = graph.nodes[nodeId];
|
|
@@ -32227,6 +32508,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
|
|
|
32227
32508
|
const task = selection?.kind == "task" ? selection.definition : void 0;
|
|
32228
32509
|
const isAgent = task != null && "executor" in task && task.executor.kind == "agent";
|
|
32229
32510
|
const isDecision = task != null && "executor" in task && task.executor.kind == "decision";
|
|
32511
|
+
const isHttpRequest = task != null && "executor" in task && task.executor.kind == "http-request";
|
|
32230
32512
|
const isOpenApi = task != null && "executor" in task && task.executor.kind == "openapi";
|
|
32231
32513
|
const unconfiguredWorkflow = task != null && "executor" in task && task.executor.kind == "workflow" && !task.executor.flowId;
|
|
32232
32514
|
const unconfiguredOpenApi = task != null && "executor" in task && task.executor.kind == "openapi" && !task.executor.path;
|
|
@@ -32500,6 +32782,84 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
|
|
|
32500
32782
|
actions: workflowActions,
|
|
32501
32783
|
list: (signal) => store.listWorkflowTargets(signal)
|
|
32502
32784
|
}, `workflow:${selection?.id}`),
|
|
32785
|
+
isHttpRequest && task != null && "executor" in task && /* @__PURE__ */ jsx(HttpRequestSection, {
|
|
32786
|
+
task,
|
|
32787
|
+
disabled,
|
|
32788
|
+
input: (handle, label) => {
|
|
32789
|
+
if (selection?.kind !== "task") return null;
|
|
32790
|
+
const definition = task.inputs.find((port) => "handle" in port && port.handle === handle);
|
|
32791
|
+
if (definition == null) return null;
|
|
32792
|
+
const mapping = revision.inputMappings(selection.node)[handle];
|
|
32793
|
+
const source = mapping?.kind === "sources" ? mapping.sources.find((item) => item.kind === "binding") : void 0;
|
|
32794
|
+
const binding = source?.kind === "binding" ? revision.binding(source.bindingId) : void 0;
|
|
32795
|
+
return /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), /* @__PURE__ */ jsx(NodeInputValue, {
|
|
32796
|
+
embedded: true,
|
|
32797
|
+
definition,
|
|
32798
|
+
label,
|
|
32799
|
+
presentation: {
|
|
32800
|
+
compact: true,
|
|
32801
|
+
hideOptions: true
|
|
32802
|
+
},
|
|
32803
|
+
sourceOnly: handle.startsWith("auth."),
|
|
32804
|
+
readOnly,
|
|
32805
|
+
disabled,
|
|
32806
|
+
value: inputValue(mapping, definition.value),
|
|
32807
|
+
connected: mapping?.kind === "sources" && binding?.kind !== "variable",
|
|
32808
|
+
variableName: binding?.kind === "variable" ? binding.target : void 0,
|
|
32809
|
+
upstream: inputUpstreamSources({
|
|
32810
|
+
revision,
|
|
32811
|
+
sourceNodeIcons,
|
|
32812
|
+
selection,
|
|
32813
|
+
store,
|
|
32814
|
+
handleName: handle,
|
|
32815
|
+
t,
|
|
32816
|
+
triggerDisplays
|
|
32817
|
+
}),
|
|
32818
|
+
variables,
|
|
32819
|
+
onValue: (value, deletion) => {
|
|
32820
|
+
store?.nodes.setInputValue(selection.id, handle, value, deletion);
|
|
32821
|
+
},
|
|
32822
|
+
onVariable: (name) => {
|
|
32823
|
+
store?.nodes.setInputVariable(selection.id, handle, name);
|
|
32824
|
+
}
|
|
32825
|
+
})] }, handle);
|
|
32826
|
+
},
|
|
32827
|
+
parameters: selection?.kind === "task" && ["query", "headers"].map((group) => /* @__PURE__ */ jsx(HttpParameterEditor, {
|
|
32828
|
+
group,
|
|
32829
|
+
task,
|
|
32830
|
+
entries: Object.fromEntries(Object.entries(revision.inputMappings(selection.node)).map(([handle, mapping]) => {
|
|
32831
|
+
const source = mapping.kind === "sources" ? mapping.sources.find((item) => item.kind === "binding") : void 0;
|
|
32832
|
+
const binding = source?.kind === "binding" ? revision.binding(source.bindingId) : void 0;
|
|
32833
|
+
return [handle, {
|
|
32834
|
+
value: inputValue(mapping, void 0),
|
|
32835
|
+
connected: mapping.kind === "sources" && binding?.kind !== "variable",
|
|
32836
|
+
variableName: binding?.kind === "variable" ? binding.target : void 0
|
|
32837
|
+
}];
|
|
32838
|
+
})),
|
|
32839
|
+
variables,
|
|
32840
|
+
disabled,
|
|
32841
|
+
readOnly,
|
|
32842
|
+
renderSource: (handleName, port) => inputUpstreamSources({
|
|
32843
|
+
revision,
|
|
32844
|
+
sourceNodeIcons,
|
|
32845
|
+
selection,
|
|
32846
|
+
store,
|
|
32847
|
+
handleName,
|
|
32848
|
+
port,
|
|
32849
|
+
t,
|
|
32850
|
+
triggerDisplays
|
|
32851
|
+
}),
|
|
32852
|
+
onEdit: (edit) => {
|
|
32853
|
+
store?.nodes.saveHttpParameters(selection.id, group, edit);
|
|
32854
|
+
}
|
|
32855
|
+
}, group)),
|
|
32856
|
+
onSave: (before, value) => store?.nodes.saveTaskSettings(selection.id, {
|
|
32857
|
+
kind: "http-request",
|
|
32858
|
+
name: task.name,
|
|
32859
|
+
before,
|
|
32860
|
+
task: value
|
|
32861
|
+
}) ?? Promise.resolve(false)
|
|
32862
|
+
}, `http:${selection?.id}`),
|
|
32503
32863
|
isOpenApi && task != null && "executor" in task && /* @__PURE__ */ jsx(OpenApiSection, {
|
|
32504
32864
|
task,
|
|
32505
32865
|
credentials: (onInvalidChange) => selection?.kind === "task" && task.inputs.filter((port) => "handle" in port && port.handle.startsWith("auth.")).map((definition) => {
|
|
@@ -32548,7 +32908,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
|
|
|
32548
32908
|
task: value
|
|
32549
32909
|
}) ?? Promise.resolve(false)
|
|
32550
32910
|
}, `openapi:${selection?.id}`),
|
|
32551
|
-
!unconfiguredOpenApi && !unconfiguredWorkflow && (selection?.kind === "outputs" || selection?.kind === "approval" || selection?.kind === "wait" || selection?.kind === "task") && (() => {
|
|
32911
|
+
!isHttpRequest && !unconfiguredOpenApi && !unconfiguredWorkflow && (selection?.kind === "outputs" || selection?.kind === "approval" || selection?.kind === "wait" || selection?.kind === "task") && (() => {
|
|
32552
32912
|
const definitions = selection.kind === "outputs" ? [...selection.node.outputDefs] : selection.kind === "task" ? [...selection.definition?.inputs ?? []] : [...selection.node.inputDefinitions];
|
|
32553
32913
|
const handles = new Set(definitions.flatMap((definition) => "handle" in definition ? [definition.handle] : []));
|
|
32554
32914
|
for (const handle of Object.keys(revision.inputMappings(selection.node))) if (!handles.has(handle) && !(selection.kind === "task" && selection.node.additionalInputs?.some((port) => port.handle === handle))) definitions.push({
|
|
@@ -32567,6 +32927,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
|
|
|
32567
32927
|
const binding = source?.kind === "binding" ? revision.binding(source.bindingId) : void 0;
|
|
32568
32928
|
return {
|
|
32569
32929
|
definition,
|
|
32930
|
+
sourceOnly: isHttpRequest && definition.handle.startsWith("auth."),
|
|
32570
32931
|
editor: !readOnly && connectors != null && connector?.action == "leina.send_notification" && definition.handle == "leinaId" && mapping?.kind != "sources" ? /* @__PURE__ */ jsx(LeinaBotSelect, {
|
|
32571
32932
|
source: connectors,
|
|
32572
32933
|
flowId: revision.revision.flowId,
|
|
@@ -32714,7 +33075,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
|
|
|
32714
33075
|
readOnly,
|
|
32715
33076
|
groups: true,
|
|
32716
33077
|
layout: "ports",
|
|
32717
|
-
title: t("inspector.ports.outputsTitle"),
|
|
33078
|
+
title: t(isHttpRequest ? "httpRequest.responseOutputs" : "inspector.ports.outputsTitle"),
|
|
32718
33079
|
output: true,
|
|
32719
33080
|
values: presentDecisionOutputs(selection.definition, t),
|
|
32720
33081
|
disabled: disabled || !("moduleId" in selection.node.task || isAgent),
|