@oomol-lab/open-flow 0.1.0-beta.52 → 0.1.0-beta.54
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/dist/browser/{flowChanges-DtraMpva.js → flowChanges-CcscgZsW.js} +29 -9
- package/dist/browser/{flowWorkspace-DLgti4Lk.js → flowWorkspace-CoT_ewLX.js} +9 -6
- package/dist/browser/preview.js +22 -7
- package/dist/browser/workbench.js +49 -12
- package/dist/common/connector-proxy.d.ts +32 -0
- package/dist/common/control-api-conformance.js +7 -2
- package/dist/common/control-api.d.ts +2 -0
- package/dist/common/control-api.js +7 -2
- package/dist/common/feishu-subscriptions.d.ts +1 -5
- package/dist/common/flow-connectionUsage.d.ts +1 -0
- package/dist/common/flow-semantics.js +1 -0
- package/dist/common/mcp.js +7 -2
- package/dist/common/provider-triggers.d.ts +1 -1
- package/dist/common/provider-triggers.js +166 -16227
- package/package.json +1 -1
|
@@ -590,14 +590,19 @@ function accessPermissions(value) {
|
|
|
590
590
|
exact(source, [
|
|
591
591
|
"actionIds",
|
|
592
592
|
"allActions",
|
|
593
|
+
"triggerIds",
|
|
594
|
+
"allTriggers",
|
|
593
595
|
"configured",
|
|
594
596
|
"proxy"
|
|
595
597
|
]);
|
|
596
|
-
if (!Array.isArray(source.actionIds) || typeof source.allActions != "boolean" || typeof source.configured != "boolean" || typeof source.proxy != "boolean") return invalidResponse();
|
|
598
|
+
if (!Array.isArray(source.triggerIds) || typeof source.allTriggers != "boolean" || !Array.isArray(source.actionIds) || typeof source.allActions != "boolean" || typeof source.configured != "boolean" || typeof source.proxy != "boolean") return invalidResponse();
|
|
597
599
|
const actionIds = source.actionIds.map(string);
|
|
598
|
-
|
|
600
|
+
const triggerIds = source.triggerIds.map(string);
|
|
601
|
+
if (new Set(actionIds).size != actionIds.length || source.allActions && actionIds.length != 0 || new Set(triggerIds).size != triggerIds.length || source.allTriggers && triggerIds.length != 0 || source.proxy && (!source.allActions || !source.allTriggers || source.configured)) return invalidResponse();
|
|
599
602
|
return {
|
|
600
603
|
actionIds,
|
|
604
|
+
triggerIds,
|
|
605
|
+
allTriggers: source.allTriggers,
|
|
601
606
|
allActions: source.allActions,
|
|
602
607
|
configured: source.configured,
|
|
603
608
|
proxy: source.proxy
|
|
@@ -13456,7 +13461,9 @@ var resources$1 = {
|
|
|
13456
13461
|
"dynamicCodeReferences": "All Code nodes in this Flow, including Subflows, share these connections. Node connection selections do not grant Code access.",
|
|
13457
13462
|
"noAccountSelected": "No account selected",
|
|
13458
13463
|
"removeAuthorization": "Remove authorization",
|
|
13459
|
-
"saving": "Saving…"
|
|
13464
|
+
"saving": "Saving…",
|
|
13465
|
+
"permissionAllTriggers": "All Triggers",
|
|
13466
|
+
"permissionTriggers": "Triggers: {{triggers}}"
|
|
13460
13467
|
},
|
|
13461
13468
|
common: {
|
|
13462
13469
|
"cancel": "Cancel",
|
|
@@ -14861,7 +14868,9 @@ var resources$1 = {
|
|
|
14861
14868
|
"dynamicCodeReferences": "此工作流中的所有 Code 节点(包括子流程)共享这些连接。其他节点选择连接不会自动允许 Code 使用。",
|
|
14862
14869
|
"noAccountSelected": "未选择账号",
|
|
14863
14870
|
"removeAuthorization": "移除授权",
|
|
14864
|
-
"saving": "保存中…"
|
|
14871
|
+
"saving": "保存中…",
|
|
14872
|
+
"permissionAllTriggers": "全部触发器",
|
|
14873
|
+
"permissionTriggers": "触发器:{{triggers}}"
|
|
14865
14874
|
},
|
|
14866
14875
|
common: {
|
|
14867
14876
|
"cancel": "取消",
|
|
@@ -16266,7 +16275,9 @@ var resources$1 = {
|
|
|
16266
16275
|
"dynamicCodeReferences": "此 Flow 中的所有 Code 節點(包括子流程)共用這些連線。其他節點選擇連線不會自動允許 Code 使用。",
|
|
16267
16276
|
"noAccountSelected": "未選擇帳號",
|
|
16268
16277
|
"removeAuthorization": "移除授權",
|
|
16269
|
-
"saving": "儲存中…"
|
|
16278
|
+
"saving": "儲存中…",
|
|
16279
|
+
"permissionAllTriggers": "全部觸發器",
|
|
16280
|
+
"permissionTriggers": "觸發器:{{triggers}}"
|
|
16270
16281
|
},
|
|
16271
16282
|
common: {
|
|
16272
16283
|
"cancel": "取消",
|
|
@@ -17671,7 +17682,9 @@ var resources$1 = {
|
|
|
17671
17682
|
"dynamicCodeReferences": "サブフローを含む、この Flow のすべての Code ノードで接続を共有します。他のノードで選択した接続は、Code に自動で許可されません。",
|
|
17672
17683
|
"noAccountSelected": "アカウント未選択",
|
|
17673
17684
|
"removeAuthorization": "承認を削除",
|
|
17674
|
-
"saving": "保存中…"
|
|
17685
|
+
"saving": "保存中…",
|
|
17686
|
+
"permissionAllTriggers": "すべてのトリガー",
|
|
17687
|
+
"permissionTriggers": "トリガー: {{triggers}}"
|
|
17675
17688
|
},
|
|
17676
17689
|
common: {
|
|
17677
17690
|
"cancel": "キャンセル",
|
|
@@ -18864,7 +18877,9 @@ var resources$1 = {
|
|
|
18864
18877
|
"dynamicCodeReferences": "하위 흐름을 포함한 이 Flow의 모든 Code 노드가 이 연결을 공유합니다. 다른 노드에서 연결을 선택해도 Code 사용이 허용되지는 않습니다.",
|
|
18865
18878
|
"noAccountSelected": "선택한 계정 없음",
|
|
18866
18879
|
"removeAuthorization": "권한 제거",
|
|
18867
|
-
"saving": "저장 중…"
|
|
18880
|
+
"saving": "저장 중…",
|
|
18881
|
+
"permissionAllTriggers": "모든 트리거",
|
|
18882
|
+
"permissionTriggers": "트리거: {{triggers}}"
|
|
18868
18883
|
},
|
|
18869
18884
|
common: {
|
|
18870
18885
|
"cancel": "취소",
|
|
@@ -20057,7 +20072,9 @@ var resources$1 = {
|
|
|
20057
20072
|
"dynamicCodeReferences": "Все узлы Code этого Flow, включая подпотоки, используют общий список подключений. Выбор подключения в другом узле не даёт Code доступ к нему.",
|
|
20058
20073
|
"noAccountSelected": "Аккаунт не выбран",
|
|
20059
20074
|
"removeAuthorization": "Удалить авторизацию",
|
|
20060
|
-
"saving": "Сохранение…"
|
|
20075
|
+
"saving": "Сохранение…",
|
|
20076
|
+
"permissionAllTriggers": "Все триггеры",
|
|
20077
|
+
"permissionTriggers": "Триггеры: {{triggers}}"
|
|
20061
20078
|
},
|
|
20062
20079
|
common: {
|
|
20063
20080
|
"cancel": "Отмена",
|
|
@@ -21109,7 +21126,9 @@ var resources$1 = {
|
|
|
21109
21126
|
"dynamicCodeReferences": "Tous les nœuds Code de ce Flow, y compris les sous-flux, partagent ces connexions. Les connexions sélectionnées par les autres nœuds ne donnent pas accès au Code.",
|
|
21110
21127
|
"noAccountSelected": "Aucun compte sélectionné",
|
|
21111
21128
|
"removeAuthorization": "Retirer l’autorisation",
|
|
21112
|
-
"saving": "Enregistrement…"
|
|
21129
|
+
"saving": "Enregistrement…",
|
|
21130
|
+
"permissionAllTriggers": "Tous les déclencheurs",
|
|
21131
|
+
"permissionTriggers": "Déclencheurs : {{triggers}}"
|
|
21113
21132
|
},
|
|
21114
21133
|
common: {
|
|
21115
21134
|
"cancel": "Annuler",
|
|
@@ -27767,6 +27786,7 @@ function connectionUsage(document) {
|
|
|
27767
27786
|
};
|
|
27768
27787
|
if (node.kind == "poll" || node.kind == "integration") uses.push({
|
|
27769
27788
|
kind: "trigger",
|
|
27789
|
+
triggerId: node.definition.key,
|
|
27770
27790
|
providerId: node.definition.provider,
|
|
27771
27791
|
connectionId: node.connectionId,
|
|
27772
27792
|
nodeId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-CEgmsyvS.js";
|
|
2
|
-
import { $ as useIconifyCollectionLoader, $t as InputGroup, A as calendarDate, An as resolutionOutputPorts, B as mapSource, Bn as inputValue, Bt as followWorkbenchLink, C as editorGroups, Cn as EventSourceSetup, D as isUnconstrainedSchema, E as getDefaultValue, Fn as triggerConfigValue, Ft as securityOptions, G as resourceValue, Gt as PopoverPanelContent, Ht as Popover, I as indexAddNodeOptions, In as triggerConfigValues, It as selectOperation, J as triggerNodeIcon, Jn as Checkbox, Jt as NativeScrollArea, K as designerGraph, Kt as PopoverTitle, L as feishuResourceKind, Ln as variableInputCompatible, Lt as serverAddress, M as datePickerValue, Mt as object, N as isDateFormat, Nn as triggerOutputDefinitions, Nt as openApiFieldIssues, O as typeOfSchema, On as decodeResultList, Pn as isJsonObject, Pt as openApiTask, Q as IconifyProvider, Qt as useTriggerFocusGuards, R as supportsFeishuChatFilter, Rt as servers, S as editorComponent, Sn as FeishuEventPicker, T as valueForEditor, U as observeResource, Ut as PopoverContent, Vt as Switch, W as resourceData, Wt as PopoverDescription, X as providerIcon, Xt as VirtualScrollArea, Y as actionSummary, Yn as IconThemeContext, Yt as ScrollArea, Z as ContentIcon, Zt as Z$2, _n as ko_default$1, an as EmptyHeader, bn as en_default$1, ct as diagnosticMessage, dn as createI18n$1, en as InputGroupAddon, et as useIconifyData, fn as uiLocales, ft as connectionCatalog, gn as ru_default$1, hn as zh_CN_default$1, in as EmptyDescription, it as revisionView, j as datePickerChange, jn as sourceOutputLabel, jt as listOperations, k as calendarChange, ln as SourceForm, lt as diagnosticNodeId, mn as zh_TW_default$1, n as agentTool, nn as Empty, nt as canCancelRun, on as EmptyMedia, pn as waitBranchDescription, q as semanticNodeIcon, qn as controlErrorCode, qt as PopoverTrigger, rn as EmptyContent, rt as hasRunFilter, sn as EmptyTitle, tn as InputGroupInput, un as SourceSelect, ut as schemaMismatchMessage, vn as ja_default$1, w as schemaForEditor, wn as errorNotice, x as defaultValueEditorSchema, xn as I18n, yn as fr_default$1, zt as IdTooltip } from "./flowChanges-
|
|
2
|
+
import { $ as useIconifyCollectionLoader, $t as InputGroup, A as calendarDate, An as resolutionOutputPorts, B as mapSource, Bn as inputValue, Bt as followWorkbenchLink, C as editorGroups, Cn as EventSourceSetup, D as isUnconstrainedSchema, E as getDefaultValue, Fn as triggerConfigValue, Ft as securityOptions, G as resourceValue, Gt as PopoverPanelContent, Ht as Popover, I as indexAddNodeOptions, In as triggerConfigValues, It as selectOperation, J as triggerNodeIcon, Jn as Checkbox, Jt as NativeScrollArea, K as designerGraph, Kt as PopoverTitle, L as feishuResourceKind, Ln as variableInputCompatible, Lt as serverAddress, M as datePickerValue, Mt as object, N as isDateFormat, Nn as triggerOutputDefinitions, Nt as openApiFieldIssues, O as typeOfSchema, On as decodeResultList, Pn as isJsonObject, Pt as openApiTask, Q as IconifyProvider, Qt as useTriggerFocusGuards, R as supportsFeishuChatFilter, Rt as servers, S as editorComponent, Sn as FeishuEventPicker, T as valueForEditor, U as observeResource, Ut as PopoverContent, Vt as Switch, W as resourceData, Wt as PopoverDescription, X as providerIcon, Xt as VirtualScrollArea, Y as actionSummary, Yn as IconThemeContext, Yt as ScrollArea, Z as ContentIcon, Zt as Z$2, _n as ko_default$1, an as EmptyHeader, bn as en_default$1, ct as diagnosticMessage, dn as createI18n$1, en as InputGroupAddon, et as useIconifyData, fn as uiLocales, ft as connectionCatalog, gn as ru_default$1, hn as zh_CN_default$1, in as EmptyDescription, it as revisionView, j as datePickerChange, jn as sourceOutputLabel, jt as listOperations, k as calendarChange, ln as SourceForm, lt as diagnosticNodeId, mn as zh_TW_default$1, n as agentTool, nn as Empty, nt as canCancelRun, on as EmptyMedia, pn as waitBranchDescription, q as semanticNodeIcon, qn as controlErrorCode, qt as PopoverTrigger, rn as EmptyContent, rt as hasRunFilter, sn as EmptyTitle, tn as InputGroupInput, un as SourceSelect, ut as schemaMismatchMessage, vn as ja_default$1, w as schemaForEditor, wn as errorNotice, x as defaultValueEditorSchema, xn as I18n, yn as fr_default$1, zt as IdTooltip } from "./flowChanges-CcscgZsW.js";
|
|
3
3
|
import { a as derive, c as strictEqual, i as compute, l as val, n as attachSetter, r as combine, s as readonlyVal } from "./dist-bO8nvHFH.js";
|
|
4
4
|
import { a as useVal, i as useTranslate, n as useI18n, r as useLang, t as I18nProvider } from "./main-BPABKzwN.js";
|
|
5
5
|
import { $r as useRefWithInit, $t as useFocus$1, A as nodeNameIssue, An as Label, At as scrollIntoViewIfNeeded, Bn as getGridCellIndexOfCorner, Br as EMPTY_ARRAY$1, Bt as inertValue, C as FieldError, Cn as ReactStore, Cr as triggerPress, Dn as require_builtin_esm_external_require_react, Dt as VERTICAL_KEYS, En as require_with_selector, Et as MODIFIER_KEYS, Fr as buttonVariants, Ft as InternalBackdrop, G as webhookSupportsBody, Gn as isIndexOutOfListBounds, Gr as useButton, Gt as useOpenInteractionType, H as valueType, Hn as getGridNavigatedIndex, Ht as popupStateMapping, Ir as cn$1, It as useAnchorPositioning, Jn as activeElement, Jr as formatErrorMessage, Jt as useRole, K as dequal, Kn as isListIndexDisabled, Kr as CompositeRootContext, Kt as safePolygon, L as nodeInputMappings, Lr as cva, Lt as adaptiveOrigin, Mt as useAnchoredPopupScrollLock, Nn as useTimeout, Nr as useControlled, Nt as usePositioner, On as createSelector, Or as useBaseUiId, Ot as VERTICAL_KEYS_WITH_EXTRA_KEYS, P as comparisonIssue, Pr as Button$1, Pt as getDisabledMountTransitionStyles, Qn as ownerDocument, Qr as useStableCallback, Qt as useHoverFloatingInteraction, R as operandHandle, Rn as createGridCellMap, Rr as clsx, Rt as useDirection, S as FieldDescription, Sn as addEventListener, St as COMPOSITE_KEYS, T as FieldLabel, Tn as fastComponentRef, Tt as HORIZONTAL_KEYS_WITH_EXTRA_KEYS, U as decodeRevisionContent, Un as getMaxListIndex, Ur as warn, Ut as pressableTriggerOpenStateMapping, V as unaryOperator, Vn as getGridCellIndices, Vr as EMPTY_OBJECT, Vt as getPseudoElementBounds, W as webhookMethods, Wn as getMinListIndex, Wr as useMergedRefs, Wt as triggerOpenStateMapping, Xn as getTarget, Xr as useIsoLayoutEffect, Xt as useInteractions, Yn as contains, Yr as mergeProps, Yt as useListNavigation, Zn as isMac$1, Zr as SafeReact, Zt as useHoverReferenceInteraction, _ as TooltipPortal, _n as FloatingPortal, _t as ARROW_DOWN, a as DialogDescription, an as useOpenStateTransitions, ar as useAnimationsFinished, b as Spinner, bn as POPUP_COLLISION_AVOIDANCE, br as siblingOpen, bt as ARROW_RIGHT, c as DialogTitle, cn as useDismiss, ct as SelectContent, d as TooltipContent, dn as FloatingNode, dr as cancelOpen, dt as SelectSeparator, ei as getParentNode, en as useSyncedFloatingRootContext, er as ChevronDown, f as TooltipProvider, fn as FloatingTree, ft as SelectTrigger, g as TooltipPositioner, gn as FloatingTreeStore, gr as itemPress, gt as ALL_KEYS, h as TooltipPopup, hn as useFloatingTree, hr as imperativeAction, ht as useCompositeListItem, i as DialogContent, in as useImplicitActiveTrigger, ir as useOpenChangeComplete, it as string, jn as Input$1, jt as useToolbarRootContext, kn as useOnFirstRender, kr as useId$1, kt as isNativeInput, l as DialogTrigger, ln as useClick, lt as SelectGroup, m as TooltipArrow, mn as useFloatingParentNodeId, mt as Separator, n as Dialog, ni as isLastTraversableNode, nn as popupStoreSelectors, nr as createLucideIcon, on as useTriggerDataForwarding, or as TransitionStatusDataAttributes, ot as Select$1, p as TooltipTrigger, pn as useFloatingNodeId, pt as SelectValue, qn as stopEvent$1, qr as useCompositeRootContext, qt as useTypeahead, rn as PopupTriggerMap, rr as useTransitionStatus, sn as useTriggerRegistration, sr as transitionStatusMapping, st as SelectChevron, t as Icon, ti as isHTMLElement, tn as createInitialPopupStoreState, tr as Check, u as Tooltip, un as FloatingFocusManager, ur as createChangeEventDetails, ut as SelectItem, v as TooltipTrigger$1, vr as none$1, vt as ARROW_KEYS, w as FieldGroup, wn as fastComponent, wt as HORIZONTAL_KEYS, x as Field, xn as FocusGuard, xt as ARROW_UP, y as TooltipRoot, yn as DROPDOWN_COLLISION_AVOIDANCE, yt as ARROW_LEFT, z as operatorsForType, zn as findNonDisabledListIndex, zr as useRenderElement, zt as CompositeList } from "./icons-0s-Q_3lp.js";
|
|
@@ -3446,11 +3446,13 @@ function connectorAccessPermissionLabel(candidate, t) {
|
|
|
3446
3446
|
const prefix = `${candidate.providerId}.`;
|
|
3447
3447
|
const actions = permissions.actionIds.map((actionId) => actionId.startsWith(prefix) ? actionId.slice(prefix.length) : actionId);
|
|
3448
3448
|
const shown = actions.slice(0, 3).join(", ");
|
|
3449
|
+
const label = permissions.allActions ? t("connectorAccess.permissionAllActions") : actions.length > 3 ? t("connectorAccess.permissionActionsMore", {
|
|
3450
|
+
actions: shown,
|
|
3451
|
+
count: actions.length - 3
|
|
3452
|
+
}) : t("connectorAccess.permissionActions", { actions: shown });
|
|
3449
3453
|
return [
|
|
3450
|
-
permissions.allActions
|
|
3451
|
-
|
|
3452
|
-
count: actions.length - 3
|
|
3453
|
-
}) : t("connectorAccess.permissionActions", { actions: shown }),
|
|
3454
|
+
permissions.allActions || actions.length > 0 ? label : void 0,
|
|
3455
|
+
permissions.allTriggers ? t("connectorAccess.permissionAllTriggers") : permissions.triggerIds.length > 0 ? t("connectorAccess.permissionTriggers", { triggers: permissions.triggerIds.map((id) => id.startsWith(prefix) ? id.slice(prefix.length) : id).join(", ") }) : void 0,
|
|
3454
3456
|
permissions.proxy ? t("connectorAccess.permissionProxy") : void 0,
|
|
3455
3457
|
permissions.configured ? t("connectorAccess.permissionConfigured") : void 0
|
|
3456
3458
|
].filter(Boolean).join(" · ");
|
|
@@ -56532,6 +56534,7 @@ var NodeInspectorContainer = memo(function NodeInspectorContainer({ store, focus
|
|
|
56532
56534
|
const accessState = useVal(store.connectorAccess.$);
|
|
56533
56535
|
const connectorAccess = accessState.access;
|
|
56534
56536
|
const providerId = connectorAction?.authenticated ? connectorAction.serviceId : void 0;
|
|
56537
|
+
const triggerId = selection?.kind == "trigger" && (selection.trigger.kind == "poll" || selection.trigger.kind == "integration") ? selection.trigger.definition.key : void 0;
|
|
56535
56538
|
const triggerProviderId = selection?.kind == "trigger" && (selection.trigger.kind == "poll" || selection.trigger.kind == "integration") ? selection.trigger.definition.provider : void 0;
|
|
56536
56539
|
useEffect(() => {
|
|
56537
56540
|
if (connectorAccess?.mode == "selectable") {
|
|
@@ -56549,7 +56552,7 @@ var NodeInspectorContainer = memo(function NodeInspectorContainer({ store, focus
|
|
|
56549
56552
|
selection,
|
|
56550
56553
|
store
|
|
56551
56554
|
]);
|
|
56552
|
-
const triggerCandidates = triggerProviderId == null ? void 0 :
|
|
56555
|
+
const triggerCandidates = triggerProviderId == null ? void 0 : store.connectorAccess.allowedTriggerCandidates(triggerProviderId, triggerId);
|
|
56553
56556
|
const allowedCandidates = (providerId == null ? void 0 : accessState.candidates[providerId]?.candidates)?.filter((candidate) => candidate.permissions == null || candidate.permissions.allActions || candidate.permissions.actionIds.includes(connectorAction.actionId));
|
|
56554
56557
|
const accessError = providerId != null && connectorAccess?.mode == "selectable" && allowedCandidates?.length == 0 ? t("connectorAccess.noAvailablePermissions") : void 0;
|
|
56555
56558
|
const connectorActionError = useVal(store.connectors.$.selectedActionError);
|
package/dist/browser/preview.js
CHANGED
|
@@ -47781,6 +47781,7 @@ function connectionUsage$7(document) {
|
|
|
47781
47781
|
};
|
|
47782
47782
|
if (node.kind == "poll" || node.kind == "integration") uses.push({
|
|
47783
47783
|
kind: "trigger",
|
|
47784
|
+
triggerId: node.definition.key,
|
|
47784
47785
|
providerId: node.definition.provider,
|
|
47785
47786
|
connectionId: node.connectionId,
|
|
47786
47787
|
nodeId,
|
|
@@ -101853,7 +101854,9 @@ var resources = {
|
|
|
101853
101854
|
"dynamicCodeReferences": "All Code nodes in this Flow, including Subflows, share these connections. Node connection selections do not grant Code access.",
|
|
101854
101855
|
"noAccountSelected": "No account selected",
|
|
101855
101856
|
"removeAuthorization": "Remove authorization",
|
|
101856
|
-
"saving": "Saving…"
|
|
101857
|
+
"saving": "Saving…",
|
|
101858
|
+
"permissionAllTriggers": "All Triggers",
|
|
101859
|
+
"permissionTriggers": "Triggers: {{triggers}}"
|
|
101857
101860
|
},
|
|
101858
101861
|
common: {
|
|
101859
101862
|
"cancel": "Cancel",
|
|
@@ -103258,7 +103261,9 @@ var resources = {
|
|
|
103258
103261
|
"dynamicCodeReferences": "此工作流中的所有 Code 节点(包括子流程)共享这些连接。其他节点选择连接不会自动允许 Code 使用。",
|
|
103259
103262
|
"noAccountSelected": "未选择账号",
|
|
103260
103263
|
"removeAuthorization": "移除授权",
|
|
103261
|
-
"saving": "保存中…"
|
|
103264
|
+
"saving": "保存中…",
|
|
103265
|
+
"permissionAllTriggers": "全部触发器",
|
|
103266
|
+
"permissionTriggers": "触发器:{{triggers}}"
|
|
103262
103267
|
},
|
|
103263
103268
|
common: {
|
|
103264
103269
|
"cancel": "取消",
|
|
@@ -104663,7 +104668,9 @@ var resources = {
|
|
|
104663
104668
|
"dynamicCodeReferences": "此 Flow 中的所有 Code 節點(包括子流程)共用這些連線。其他節點選擇連線不會自動允許 Code 使用。",
|
|
104664
104669
|
"noAccountSelected": "未選擇帳號",
|
|
104665
104670
|
"removeAuthorization": "移除授權",
|
|
104666
|
-
"saving": "儲存中…"
|
|
104671
|
+
"saving": "儲存中…",
|
|
104672
|
+
"permissionAllTriggers": "全部觸發器",
|
|
104673
|
+
"permissionTriggers": "觸發器:{{triggers}}"
|
|
104667
104674
|
},
|
|
104668
104675
|
common: {
|
|
104669
104676
|
"cancel": "取消",
|
|
@@ -106068,7 +106075,9 @@ var resources = {
|
|
|
106068
106075
|
"dynamicCodeReferences": "サブフローを含む、この Flow のすべての Code ノードで接続を共有します。他のノードで選択した接続は、Code に自動で許可されません。",
|
|
106069
106076
|
"noAccountSelected": "アカウント未選択",
|
|
106070
106077
|
"removeAuthorization": "承認を削除",
|
|
106071
|
-
"saving": "保存中…"
|
|
106078
|
+
"saving": "保存中…",
|
|
106079
|
+
"permissionAllTriggers": "すべてのトリガー",
|
|
106080
|
+
"permissionTriggers": "トリガー: {{triggers}}"
|
|
106072
106081
|
},
|
|
106073
106082
|
common: {
|
|
106074
106083
|
"cancel": "キャンセル",
|
|
@@ -107261,7 +107270,9 @@ var resources = {
|
|
|
107261
107270
|
"dynamicCodeReferences": "하위 흐름을 포함한 이 Flow의 모든 Code 노드가 이 연결을 공유합니다. 다른 노드에서 연결을 선택해도 Code 사용이 허용되지는 않습니다.",
|
|
107262
107271
|
"noAccountSelected": "선택한 계정 없음",
|
|
107263
107272
|
"removeAuthorization": "권한 제거",
|
|
107264
|
-
"saving": "저장 중…"
|
|
107273
|
+
"saving": "저장 중…",
|
|
107274
|
+
"permissionAllTriggers": "모든 트리거",
|
|
107275
|
+
"permissionTriggers": "트리거: {{triggers}}"
|
|
107265
107276
|
},
|
|
107266
107277
|
common: {
|
|
107267
107278
|
"cancel": "취소",
|
|
@@ -108454,7 +108465,9 @@ var resources = {
|
|
|
108454
108465
|
"dynamicCodeReferences": "Все узлы Code этого Flow, включая подпотоки, используют общий список подключений. Выбор подключения в другом узле не даёт Code доступ к нему.",
|
|
108455
108466
|
"noAccountSelected": "Аккаунт не выбран",
|
|
108456
108467
|
"removeAuthorization": "Удалить авторизацию",
|
|
108457
|
-
"saving": "Сохранение…"
|
|
108468
|
+
"saving": "Сохранение…",
|
|
108469
|
+
"permissionAllTriggers": "Все триггеры",
|
|
108470
|
+
"permissionTriggers": "Триггеры: {{triggers}}"
|
|
108458
108471
|
},
|
|
108459
108472
|
common: {
|
|
108460
108473
|
"cancel": "Отмена",
|
|
@@ -109506,7 +109519,9 @@ var resources = {
|
|
|
109506
109519
|
"dynamicCodeReferences": "Tous les nœuds Code de ce Flow, y compris les sous-flux, partagent ces connexions. Les connexions sélectionnées par les autres nœuds ne donnent pas accès au Code.",
|
|
109507
109520
|
"noAccountSelected": "Aucun compte sélectionné",
|
|
109508
109521
|
"removeAuthorization": "Retirer l’autorisation",
|
|
109509
|
-
"saving": "Enregistrement…"
|
|
109522
|
+
"saving": "Enregistrement…",
|
|
109523
|
+
"permissionAllTriggers": "Tous les déclencheurs",
|
|
109524
|
+
"permissionTriggers": "Déclencheurs : {{triggers}}"
|
|
109510
109525
|
},
|
|
109511
109526
|
common: {
|
|
109512
109527
|
"cancel": "Annuler",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as InputGroup, At as flowDependencies, Bn as inputValue, Bt as followWorkbenchLink, Ct as resetInputValues, Dn as allConnectorConnectionsQuery, Dt as setTriggerConnection, En as randomId, Et as setInputSources, F as deriveAddNodeOptions, G as resourceValue, Gn as providerIconAppearance, H as CacheResource, Hn as jsonValue, Ht as Popover, K as designerGraph, Kn as ApiError, Kt as PopoverTitle, L as feishuResourceKind, Mn as sampleErrorOutputs, Nn as triggerOutputDefinitions, Ot as updateTriggerConfig, P as addNodeIntent, Pn as isJsonObject, R as supportsFeishuChatFilter, Rn as connection, St as repairNodeNames, Tn as WorkbenchClient, Tt as setConnectorConnection, Un as record, Ut as PopoverContent, V as scopedValue, Vn as invalidResponse, Vt as Switch, W as resourceData, Wn as string, X as providerIcon, Yn as IconThemeContext, _ as updateTaskAdditionalInputs, _t as setComment, a as deleteSelection, an as EmptyHeader, at as Latest, b as updateWebhook, bt as setNodePositions, c as setInputVariable, cn as EventSourcesPage, d as updateNodeIcon, dn as createI18n, dt as actionWithConnections, en as InputGroupAddon, f as updateNodeName, ft as connectionCatalog, g as updateTask, gt as restoreCanvasPresentation, h as updateSubflow, ht as removeComments, i as createResource, in as EmptyDescription, it as revisionView, kn as decodeTriggerCatalog, kt as updateTriggerSchedule, l as updateCondition, m as updateResolution, mt as commentIds, nn as Empty, o as nameCreatedNodes, on as EmptyMedia, ot as deriveInspectorDiagnostics, p as updateNodeSettings, pt as canvasPresentationChange, qn as controlErrorCode, qt as PopoverTrigger, r as applyFlowChanges, rn as EmptyContent, s as setInputValue, sn as EmptyTitle, st as diagnosticItems, t as addNode, tn as InputGroupInput, tt as RunStore, u as updateNodeDescription, v as updateTaskPorts, vt as setFlowViewport, wn as errorNotice, wt as setCodeActions, xt as targetPresentation, y as updateValue, yt as setNodeContentHidden, z as combineSources, zn as connectorActionMetadata, zt as IdTooltip } from "./flowChanges-
|
|
1
|
+
import { $t as InputGroup, At as flowDependencies, Bn as inputValue, Bt as followWorkbenchLink, Ct as resetInputValues, Dn as allConnectorConnectionsQuery, Dt as setTriggerConnection, En as randomId, Et as setInputSources, F as deriveAddNodeOptions, G as resourceValue, Gn as providerIconAppearance, H as CacheResource, Hn as jsonValue, Ht as Popover, K as designerGraph, Kn as ApiError, Kt as PopoverTitle, L as feishuResourceKind, Mn as sampleErrorOutputs, Nn as triggerOutputDefinitions, Ot as updateTriggerConfig, P as addNodeIntent, Pn as isJsonObject, R as supportsFeishuChatFilter, Rn as connection, St as repairNodeNames, Tn as WorkbenchClient, Tt as setConnectorConnection, Un as record, Ut as PopoverContent, V as scopedValue, Vn as invalidResponse, Vt as Switch, W as resourceData, Wn as string, X as providerIcon, Yn as IconThemeContext, _ as updateTaskAdditionalInputs, _t as setComment, a as deleteSelection, an as EmptyHeader, at as Latest, b as updateWebhook, bt as setNodePositions, c as setInputVariable, cn as EventSourcesPage, d as updateNodeIcon, dn as createI18n, dt as actionWithConnections, en as InputGroupAddon, f as updateNodeName, ft as connectionCatalog, g as updateTask, gt as restoreCanvasPresentation, h as updateSubflow, ht as removeComments, i as createResource, in as EmptyDescription, it as revisionView, kn as decodeTriggerCatalog, kt as updateTriggerSchedule, l as updateCondition, m as updateResolution, mt as commentIds, nn as Empty, o as nameCreatedNodes, on as EmptyMedia, ot as deriveInspectorDiagnostics, p as updateNodeSettings, pt as canvasPresentationChange, qn as controlErrorCode, qt as PopoverTrigger, r as applyFlowChanges, rn as EmptyContent, s as setInputValue, sn as EmptyTitle, st as diagnosticItems, t as addNode, tn as InputGroupInput, tt as RunStore, u as updateNodeDescription, v as updateTaskPorts, vt as setFlowViewport, wn as errorNotice, wt as setCodeActions, xt as targetPresentation, y as updateValue, yt as setNodeContentHidden, z as combineSources, zn as connectorActionMetadata, zt as IdTooltip } from "./flowChanges-CcscgZsW.js";
|
|
2
2
|
import { a as derive, i as compute, l as val } from "./dist-bO8nvHFH.js";
|
|
3
3
|
import { a as useVal, i as useTranslate, r as useLang, t as I18nProvider } from "./main-BPABKzwN.js";
|
|
4
4
|
import { C as FieldError, D as applyFlowChanges$1, E as FlowChangeError, I as mapConditionSources, Ir as cn, K as dequal$1, L as nodeInputMappings, N as resourceNameIssue, Pr as Button, T as FieldLabel, a as DialogDescription, b as Spinner, c as DialogTitle, d as TooltipContent, i as DialogContent, jn as Input, n as Dialog, o as DialogFooter, p as TooltipTrigger, r as DialogClose, s as DialogHeader, t as Icon, u as Tooltip, w as FieldGroup, x as Field } from "./icons-0s-Q_3lp.js";
|
|
@@ -595,12 +595,13 @@ function FlowSkeleton() {
|
|
|
595
595
|
})]
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
|
-
function FlowBrowser({ catalogWidth, createFlowDisabled, createFlowField, flowBadges, hrefForFlow, onCreateFlow, onSelectFlow, store }) {
|
|
598
|
+
function FlowBrowser({ catalogWidth, createFlowDisabled, createFlowField, flowBadges, hrefForFlow, initializing = false, onCreateFlow, onSelectFlow, store }) {
|
|
599
599
|
const t = useTranslate();
|
|
600
600
|
const busy = useVal(store.workspace.$.busy);
|
|
601
601
|
const loadFailed = useVal(store.workspace.$.flowLoadFailed);
|
|
602
602
|
const loadMoreFailed = useVal(store.workspace.$.flowLoadMoreFailed);
|
|
603
|
-
const
|
|
603
|
+
const flowLoading = useVal(store.workspace.$.flowLoading);
|
|
604
|
+
const loading = initializing || flowLoading;
|
|
604
605
|
const loadingMore = useVal(store.workspace.$.flowLoadingMore);
|
|
605
606
|
const nextCursor = useVal(store.workspace.$.flowNextCursor);
|
|
606
607
|
const refreshing = useVal(store.workspace.$.flowRefreshing);
|
|
@@ -629,6 +630,7 @@ function FlowBrowser({ catalogWidth, createFlowDisabled, createFlowField, flowBa
|
|
|
629
630
|
children: t("resource.flows")
|
|
630
631
|
}),
|
|
631
632
|
/* @__PURE__ */ jsxs("section", {
|
|
633
|
+
"aria-busy": loading || refreshing,
|
|
632
634
|
"aria-labelledby": "flow-list-title",
|
|
633
635
|
className: "resource-list-section rounded-lg",
|
|
634
636
|
children: [
|
|
@@ -657,7 +659,7 @@ function FlowBrowser({ catalogWidth, createFlowDisabled, createFlowField, flowBa
|
|
|
657
659
|
})]
|
|
658
660
|
}), /* @__PURE__ */ jsxs(Button, {
|
|
659
661
|
className: "pr-3",
|
|
660
|
-
disabled: busy != null,
|
|
662
|
+
disabled: initializing || busy != null,
|
|
661
663
|
onClick: () => setCreating(true),
|
|
662
664
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
663
665
|
"data-icon": "inline-start",
|
|
@@ -3263,6 +3265,26 @@ var ConnectorAccessStore = class {
|
|
|
3263
3265
|
}
|
|
3264
3266
|
return false;
|
|
3265
3267
|
}
|
|
3268
|
+
allowedTriggerCandidates(providerId, triggerId) {
|
|
3269
|
+
return this.#state.value.candidates[providerId]?.candidates.filter((candidate) => candidate.permissions == null || candidate.permissions.allTriggers || candidate.permissions.triggerIds.includes(triggerId));
|
|
3270
|
+
}
|
|
3271
|
+
async filterTriggerConnections(flowId, definition, connections) {
|
|
3272
|
+
if (this.#disposed || flowId != this.#flowId) return [];
|
|
3273
|
+
const access = this.#state.value.access;
|
|
3274
|
+
if (access?.mode == "implicit") return connections;
|
|
3275
|
+
if (access == null) return [];
|
|
3276
|
+
await this.loadCandidates([definition.provider]);
|
|
3277
|
+
if (this.#disposed || flowId != this.#flowId) return [];
|
|
3278
|
+
const candidates = this.allowedTriggerCandidates(definition.provider, definition.key);
|
|
3279
|
+
if (candidates == null) return [];
|
|
3280
|
+
const allowed = new Set(candidates.map((candidate) => candidate.connectionId));
|
|
3281
|
+
const filtered = connections.filter((connection) => allowed.has(connection.connectionId));
|
|
3282
|
+
if (!filtered.some((connection) => connection.status == "active") && connections.some((connection) => connection.status == "active")) this.setNotice({
|
|
3283
|
+
kind: "error",
|
|
3284
|
+
message: this.i18n.t("connectorAccess.noAvailablePermissions")
|
|
3285
|
+
});
|
|
3286
|
+
return filtered;
|
|
3287
|
+
}
|
|
3266
3288
|
async setService(providerId, selected) {
|
|
3267
3289
|
const flowId = this.#flowId;
|
|
3268
3290
|
const access = this.#state.value.access;
|
|
@@ -5353,10 +5375,11 @@ var WorkspaceStore = class {
|
|
|
5353
5375
|
#pendingRepair;
|
|
5354
5376
|
#stopCatalogWatch;
|
|
5355
5377
|
#stopFlowWatch;
|
|
5356
|
-
constructor(client, setNotice, identity = createAuthoringId, i18n = createI18n(), runChanged = () => {}, catalogs = new CatalogStores(client), flowCreated = () => {}, accessChanged = () => {}) {
|
|
5378
|
+
constructor(client, setNotice, identity = createAuthoringId, i18n = createI18n(), runChanged = () => {}, catalogs = new CatalogStores(client), flowCreated = () => {}, accessChanged = () => {}, filterTriggerConnections) {
|
|
5357
5379
|
this.catalogs = catalogs;
|
|
5358
5380
|
this.flowCreated = flowCreated;
|
|
5359
5381
|
this.accessChanged = accessChanged;
|
|
5382
|
+
this.filterTriggerConnections = filterTriggerConnections;
|
|
5360
5383
|
this.#draftSession = new Latest();
|
|
5361
5384
|
this.#history = new CanvasHistory();
|
|
5362
5385
|
this.history$ = this.#history.state$;
|
|
@@ -5407,6 +5430,8 @@ var WorkspaceStore = class {
|
|
|
5407
5430
|
this.#flows.dispose();
|
|
5408
5431
|
}
|
|
5409
5432
|
async start(flowId) {
|
|
5433
|
+
const current = this.#draftSession.capture();
|
|
5434
|
+
let initialLoad;
|
|
5410
5435
|
this.#started = false;
|
|
5411
5436
|
if (this.#stopCatalogWatch == null) {
|
|
5412
5437
|
const subscription = this.#client.watchFlowCatalog((event) => {
|
|
@@ -5415,11 +5440,17 @@ var WorkspaceStore = class {
|
|
|
5415
5440
|
if (event?.kind == "flow.created" && this.#started && this.#model.value.flowId == null && this.#model.value.busy == null) this.flowCreated(event.flowId);
|
|
5416
5441
|
});
|
|
5417
5442
|
this.#stopCatalogWatch = subscription.stop;
|
|
5418
|
-
|
|
5443
|
+
subscription.ready.then(async () => {
|
|
5444
|
+
if (initialLoad == null || this.#disposed) return;
|
|
5445
|
+
await initialLoad;
|
|
5446
|
+
if (!this.#disposed) await this.reloadFlows();
|
|
5447
|
+
});
|
|
5448
|
+
await Promise.resolve();
|
|
5419
5449
|
}
|
|
5420
5450
|
if (this.#disposed) return;
|
|
5421
|
-
|
|
5422
|
-
|
|
5451
|
+
initialLoad = this.reloadFlows();
|
|
5452
|
+
await initialLoad;
|
|
5453
|
+
if (!this.#disposed && current()) await this.selectFlow(flowId);
|
|
5423
5454
|
this.#started = !this.#disposed;
|
|
5424
5455
|
}
|
|
5425
5456
|
async reloadFlows() {
|
|
@@ -5676,9 +5707,10 @@ var WorkspaceStore = class {
|
|
|
5676
5707
|
if (intent.kind == "provider-trigger" && intent.connectionId == null) {
|
|
5677
5708
|
try {
|
|
5678
5709
|
const connections = await resourceValue(this.catalogs.connections.get(intent.definition.provider, draft.flowId));
|
|
5710
|
+
const allowed = this.filterTriggerConnections == null ? connections : await this.filterTriggerConnections(draft.flowId, intent.definition, connections);
|
|
5679
5711
|
intent = {
|
|
5680
5712
|
...intent,
|
|
5681
|
-
connectionId: connectionCatalog(
|
|
5713
|
+
connectionId: connectionCatalog(allowed).preferred?.connectionId
|
|
5682
5714
|
};
|
|
5683
5715
|
} catch (error) {
|
|
5684
5716
|
if (!this.#disposed && this.#model.value.draft == draft) this.#setNotice(errorNotice(error, this.#i18n.t));
|
|
@@ -6515,6 +6547,9 @@ var WorkbenchStore = class {
|
|
|
6515
6547
|
}), (flowId) => void this.#openCreatedFlow(flowId), (flowId) => {
|
|
6516
6548
|
this.connectorAccess.changed(flowId);
|
|
6517
6549
|
this.workspace.catalogs.refreshFlow(flowId);
|
|
6550
|
+
}, async (flowId, definition, connections) => {
|
|
6551
|
+
await this.#accessLoading;
|
|
6552
|
+
return this.connectorAccess.filterTriggerConnections(flowId, definition, connections);
|
|
6518
6553
|
});
|
|
6519
6554
|
this.#stopAccessReaction = this.workspace.$.flowId.reaction((flowId) => {
|
|
6520
6555
|
this.#accessLoading = this.connectorAccess.load(flowId);
|
|
@@ -6890,7 +6925,7 @@ var WorkbenchStore = class {
|
|
|
6890
6925
|
};
|
|
6891
6926
|
//#endregion
|
|
6892
6927
|
//#region src/workbench/browser/runtime/openFlowWorkbench.tsx
|
|
6893
|
-
var FlowWorkspace = lazy(() => import("./flowWorkspace-
|
|
6928
|
+
var FlowWorkspace = lazy(() => import("./flowWorkspace-CoT_ewLX.js"));
|
|
6894
6929
|
function OpenFlowSessionGate({ action, description, error, onSubmit, onTokenChange, pending = false, title, token, tokenLabel }) {
|
|
6895
6930
|
const hasToken = token != null && tokenLabel != null && onTokenChange != null;
|
|
6896
6931
|
const tokenValue = token ?? "";
|
|
@@ -6990,7 +7025,7 @@ function NotificationBridge({ host, store }) {
|
|
|
6990
7025
|
useEffect(() => () => notify(void 0), [notify]);
|
|
6991
7026
|
return null;
|
|
6992
7027
|
}
|
|
6993
|
-
function Workbench({ catalogWidth, createFlow, createFlowDisabled, createFlowField, flowBadges, connectionHref, hrefFor, language, navigation, onConfigureConnector, onManageConnectorAccess, onLanguageChange, store, theme }) {
|
|
7028
|
+
function Workbench({ catalogWidth, createFlow, createFlowDisabled, createFlowField, flowBadges, connectionHref, hrefFor, initializing, language, navigation, onConfigureConnector, onManageConnectorAccess, onLanguageChange, store, theme }) {
|
|
6994
7029
|
const flowId = useVal(store.workspace.$.flowId);
|
|
6995
7030
|
return /* @__PURE__ */ jsx("div", {
|
|
6996
7031
|
className: "app-shell",
|
|
@@ -7003,6 +7038,7 @@ function Workbench({ catalogWidth, createFlow, createFlowDisabled, createFlowFie
|
|
|
7003
7038
|
flowId: flow.flowId,
|
|
7004
7039
|
view: "design"
|
|
7005
7040
|
}),
|
|
7041
|
+
initializing,
|
|
7006
7042
|
language,
|
|
7007
7043
|
onCreateFlow: (name) => navigation.createFlow(name, createFlow),
|
|
7008
7044
|
onLanguageChange,
|
|
@@ -7082,7 +7118,7 @@ function Session({ catalogWidth, createFlow, createFlowDisabled, createFlowField
|
|
|
7082
7118
|
children: [/* @__PURE__ */ jsx(NotificationBridge, {
|
|
7083
7119
|
host,
|
|
7084
7120
|
store
|
|
7085
|
-
}), started ? /* @__PURE__ */ jsx(Workbench, {
|
|
7121
|
+
}), started || location.flowId == null ? /* @__PURE__ */ jsx(Workbench, {
|
|
7086
7122
|
catalogWidth,
|
|
7087
7123
|
createFlow,
|
|
7088
7124
|
createFlowDisabled,
|
|
@@ -7090,6 +7126,7 @@ function Session({ catalogWidth, createFlow, createFlowDisabled, createFlowField
|
|
|
7090
7126
|
flowBadges,
|
|
7091
7127
|
connectionHref,
|
|
7092
7128
|
hrefFor,
|
|
7129
|
+
initializing: !started,
|
|
7093
7130
|
language,
|
|
7094
7131
|
navigation,
|
|
7095
7132
|
onConfigureConnector,
|
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
import type { JsonValue } from '../browser/flow-change.js';
|
|
2
|
+
export type TriggerOperationRequest = {
|
|
3
|
+
readonly operation: 'read';
|
|
4
|
+
readonly config: Readonly<Record<string, JsonValue>>;
|
|
5
|
+
readonly checkpoint: JsonValue;
|
|
6
|
+
} | {
|
|
7
|
+
readonly operation: 'options';
|
|
8
|
+
readonly config: Readonly<Record<string, JsonValue>>;
|
|
9
|
+
readonly field: string;
|
|
10
|
+
} | {
|
|
11
|
+
readonly operation: 'reconcile';
|
|
12
|
+
readonly subscriptionId?: string;
|
|
13
|
+
readonly config: Readonly<Record<string, JsonValue>>;
|
|
14
|
+
readonly requestKey: string;
|
|
15
|
+
readonly endpointUrl: string;
|
|
16
|
+
readonly active: boolean;
|
|
17
|
+
} | {
|
|
18
|
+
readonly operation: 'receive';
|
|
19
|
+
readonly subscriptionId: string;
|
|
20
|
+
readonly method: string;
|
|
21
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
22
|
+
readonly query: Readonly<Record<string, string>>;
|
|
23
|
+
readonly rawBody: string;
|
|
24
|
+
readonly admit: boolean;
|
|
25
|
+
readonly current: boolean;
|
|
26
|
+
} | {
|
|
27
|
+
readonly operation: 'resource';
|
|
28
|
+
readonly config: Readonly<Record<string, JsonValue>>;
|
|
29
|
+
readonly requestKey: string;
|
|
30
|
+
readonly active: boolean;
|
|
31
|
+
};
|
|
1
32
|
export interface ConnectorProxyRequest {
|
|
2
33
|
readonly body?: unknown;
|
|
3
34
|
readonly endpoint: string;
|
|
@@ -10,5 +41,6 @@ export interface ConnectorProxyResult {
|
|
|
10
41
|
readonly status: number;
|
|
11
42
|
}
|
|
12
43
|
export interface ConnectorProxy {
|
|
44
|
+
trigger?(request: TriggerOperationRequest, signal?: AbortSignal): Promise<unknown>;
|
|
13
45
|
execute(request: ConnectorProxyRequest, signal?: AbortSignal): Promise<ConnectorProxyResult>;
|
|
14
46
|
}
|
|
@@ -6452,14 +6452,19 @@ function accessPermissions(value) {
|
|
|
6452
6452
|
exact(source, [
|
|
6453
6453
|
"actionIds",
|
|
6454
6454
|
"allActions",
|
|
6455
|
+
"triggerIds",
|
|
6456
|
+
"allTriggers",
|
|
6455
6457
|
"configured",
|
|
6456
6458
|
"proxy"
|
|
6457
6459
|
]);
|
|
6458
|
-
if (!Array.isArray(source.actionIds) || typeof source.allActions != "boolean" || typeof source.configured != "boolean" || typeof source.proxy != "boolean") return invalidResponse();
|
|
6460
|
+
if (!Array.isArray(source.triggerIds) || typeof source.allTriggers != "boolean" || !Array.isArray(source.actionIds) || typeof source.allActions != "boolean" || typeof source.configured != "boolean" || typeof source.proxy != "boolean") return invalidResponse();
|
|
6459
6461
|
const actionIds = source.actionIds.map(string$1);
|
|
6460
|
-
|
|
6462
|
+
const triggerIds = source.triggerIds.map(string$1);
|
|
6463
|
+
if (new Set(actionIds).size != actionIds.length || source.allActions && actionIds.length != 0 || new Set(triggerIds).size != triggerIds.length || source.allTriggers && triggerIds.length != 0 || source.proxy && (!source.allActions || !source.allTriggers || source.configured)) return invalidResponse();
|
|
6461
6464
|
return {
|
|
6462
6465
|
actionIds,
|
|
6466
|
+
triggerIds,
|
|
6467
|
+
allTriggers: source.allTriggers,
|
|
6463
6468
|
allActions: source.allActions,
|
|
6464
6469
|
configured: source.configured,
|
|
6465
6470
|
proxy: source.proxy
|
|
@@ -176,6 +176,8 @@ export interface ProviderAccessBindingCandidate extends ProviderAccessIdentity {
|
|
|
176
176
|
readonly permissions?: {
|
|
177
177
|
readonly actionIds: readonly string[];
|
|
178
178
|
readonly allActions: boolean;
|
|
179
|
+
readonly triggerIds: readonly string[];
|
|
180
|
+
readonly allTriggers: boolean;
|
|
179
181
|
readonly configured: boolean;
|
|
180
182
|
readonly proxy: boolean;
|
|
181
183
|
};
|
|
@@ -6531,14 +6531,19 @@ function accessPermissions(value) {
|
|
|
6531
6531
|
exact(source, [
|
|
6532
6532
|
"actionIds",
|
|
6533
6533
|
"allActions",
|
|
6534
|
+
"triggerIds",
|
|
6535
|
+
"allTriggers",
|
|
6534
6536
|
"configured",
|
|
6535
6537
|
"proxy"
|
|
6536
6538
|
]);
|
|
6537
|
-
if (!Array.isArray(source.actionIds) || typeof source.allActions != "boolean" || typeof source.configured != "boolean" || typeof source.proxy != "boolean") return invalidResponse();
|
|
6539
|
+
if (!Array.isArray(source.triggerIds) || typeof source.allTriggers != "boolean" || !Array.isArray(source.actionIds) || typeof source.allActions != "boolean" || typeof source.configured != "boolean" || typeof source.proxy != "boolean") return invalidResponse();
|
|
6538
6540
|
const actionIds = source.actionIds.map(string$1);
|
|
6539
|
-
|
|
6541
|
+
const triggerIds = source.triggerIds.map(string$1);
|
|
6542
|
+
if (new Set(actionIds).size != actionIds.length || source.allActions && actionIds.length != 0 || new Set(triggerIds).size != triggerIds.length || source.allTriggers && triggerIds.length != 0 || source.proxy && (!source.allActions || !source.allTriggers || source.configured)) return invalidResponse();
|
|
6540
6543
|
return {
|
|
6541
6544
|
actionIds,
|
|
6545
|
+
triggerIds,
|
|
6546
|
+
allTriggers: source.allTriggers,
|
|
6542
6547
|
allActions: source.allActions,
|
|
6543
6548
|
configured: source.configured,
|
|
6544
6549
|
proxy: source.proxy
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type { ConnectorProxyRequest, ConnectorProxyResult } from './connector-proxy.js';
|
|
2
1
|
import type { JsonValue } from '../browser/flow-change.js';
|
|
3
2
|
export interface FeishuSubscription {
|
|
4
3
|
readonly key: string;
|
|
5
|
-
readonly
|
|
6
|
-
readonly unsubscribe: ConnectorProxyRequest;
|
|
7
|
-
readonly inspect?: ConnectorProxyRequest;
|
|
4
|
+
readonly config: Readonly<Record<string, JsonValue>>;
|
|
8
5
|
}
|
|
9
6
|
export declare function feishuSubscriptions(config: Readonly<Record<string, JsonValue>>, provider: string): readonly FeishuSubscription[];
|
|
10
|
-
export declare function feishuResponse(result: ConnectorProxyResult): Readonly<Record<string, JsonValue>>;
|
|
@@ -10799,6 +10799,7 @@ function connectionUsage(document) {
|
|
|
10799
10799
|
};
|
|
10800
10800
|
if (node.kind == "poll" || node.kind == "integration") uses.push({
|
|
10801
10801
|
kind: "trigger",
|
|
10802
|
+
triggerId: node.definition.key,
|
|
10802
10803
|
providerId: node.definition.provider,
|
|
10803
10804
|
connectionId: node.connectionId,
|
|
10804
10805
|
nodeId,
|
package/dist/common/mcp.js
CHANGED
|
@@ -6671,14 +6671,19 @@ function accessPermissions(value) {
|
|
|
6671
6671
|
exact(source, [
|
|
6672
6672
|
"actionIds",
|
|
6673
6673
|
"allActions",
|
|
6674
|
+
"triggerIds",
|
|
6675
|
+
"allTriggers",
|
|
6674
6676
|
"configured",
|
|
6675
6677
|
"proxy"
|
|
6676
6678
|
]);
|
|
6677
|
-
if (!Array.isArray(source.actionIds) || typeof source.allActions != "boolean" || typeof source.configured != "boolean" || typeof source.proxy != "boolean") return invalidResponse();
|
|
6679
|
+
if (!Array.isArray(source.triggerIds) || typeof source.allTriggers != "boolean" || !Array.isArray(source.actionIds) || typeof source.allActions != "boolean" || typeof source.configured != "boolean" || typeof source.proxy != "boolean") return invalidResponse();
|
|
6678
6680
|
const actionIds = source.actionIds.map(string);
|
|
6679
|
-
|
|
6681
|
+
const triggerIds = source.triggerIds.map(string);
|
|
6682
|
+
if (new Set(actionIds).size != actionIds.length || source.allActions && actionIds.length != 0 || new Set(triggerIds).size != triggerIds.length || source.allTriggers && triggerIds.length != 0 || source.proxy && (!source.allActions || !source.allTriggers || source.configured)) return invalidResponse();
|
|
6680
6683
|
return {
|
|
6681
6684
|
actionIds,
|
|
6685
|
+
triggerIds,
|
|
6686
|
+
allTriggers: source.allTriggers,
|
|
6682
6687
|
allActions: source.allActions,
|
|
6683
6688
|
configured: source.configured,
|
|
6684
6689
|
proxy: source.proxy
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { feishuSubscriptions
|
|
1
|
+
export { feishuSubscriptions } from './feishu-subscriptions.js';
|
|
2
2
|
export { receiveFeishuEvent, matchesFeishuEvent, type FeishuEvent } from './feishu-events.js';
|
|
3
3
|
import type { IntegrationDefinition } from './integration-trigger.js';
|
|
4
4
|
import type { PollDefinition } from './poll-trigger.js';
|