windmill-components 1.623.2 → 1.655.0
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/appPolicy/myFunction.es.js +1337 -0
- package/dist/sharedUtils/assets/tokens/colorTokensConfig.d.ts +2 -0
- package/dist/sharedUtils/base.d.ts +1 -0
- package/dist/sharedUtils/cloud.d.ts +1 -0
- package/dist/sharedUtils/common.d.ts +108 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/count.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/delete.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/insert.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/select.d.ts +11 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/update.d.ts +11 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/utils.d.ts +84 -0
- package/dist/sharedUtils/components/apps/editor/appPolicy.d.ts +6 -0
- package/dist/sharedUtils/components/apps/editor/appUtilsCore.d.ts +7 -0
- package/dist/sharedUtils/components/apps/editor/appUtilsS3.d.ts +22 -0
- package/dist/sharedUtils/components/apps/editor/commonAppUtils.d.ts +10 -0
- package/dist/sharedUtils/components/apps/editor/component/components.d.ts +5305 -0
- package/dist/sharedUtils/components/apps/editor/component/default-codes.d.ts +3 -0
- package/dist/sharedUtils/components/apps/editor/component/index.d.ts +3 -0
- package/dist/sharedUtils/components/apps/editor/component/sets.d.ts +7 -0
- package/dist/sharedUtils/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +3 -0
- package/dist/sharedUtils/components/apps/gridUtils.d.ts +14 -0
- package/dist/sharedUtils/components/apps/inputType.d.ts +176 -0
- package/dist/sharedUtils/components/apps/rx.d.ts +29 -0
- package/dist/sharedUtils/components/apps/sharedTypes.d.ts +19 -0
- package/dist/sharedUtils/components/apps/types.d.ts +274 -0
- package/dist/sharedUtils/components/common/alert/model.d.ts +2 -0
- package/dist/sharedUtils/components/common/badge/model.d.ts +8 -0
- package/dist/sharedUtils/components/common/button/model.d.ts +45 -0
- package/dist/sharedUtils/components/common/fileInput/model.d.ts +1 -0
- package/dist/sharedUtils/components/common/index.d.ts +24 -0
- package/dist/sharedUtils/components/common/skeleton/model.d.ts +21 -0
- package/dist/sharedUtils/components/dbTypes.d.ts +11 -0
- package/dist/sharedUtils/components/diff_drawer.d.ts +26 -0
- package/dist/sharedUtils/components/ducklake.d.ts +1 -0
- package/dist/sharedUtils/components/flows/scheduleUtils.d.ts +7 -0
- package/dist/sharedUtils/components/random_positive_adjetive.d.ts +1 -0
- package/dist/sharedUtils/components/raw_apps/rawAppPolicy.d.ts +10 -0
- package/dist/sharedUtils/components/raw_apps/utils.d.ts +15 -0
- package/dist/sharedUtils/components/triggers/email/utils.d.ts +4 -0
- package/dist/sharedUtils/components/triggers/gcp/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/http/utils.d.ts +11 -0
- package/dist/sharedUtils/components/triggers/kafka/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/mqtt/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/nats/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/postgres/utils.d.ts +8 -0
- package/dist/sharedUtils/components/triggers/sqs/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/triggers.svelte.d.ts +32 -0
- package/dist/sharedUtils/components/triggers/utils.d.ts +81 -0
- package/dist/sharedUtils/components/triggers/websocket/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers.d.ts +20 -0
- package/dist/sharedUtils/gen/core/ApiError.d.ts +10 -0
- package/dist/sharedUtils/gen/core/ApiRequestOptions.d.ts +13 -0
- package/dist/sharedUtils/gen/core/ApiResult.d.ts +7 -0
- package/dist/sharedUtils/gen/core/CancelablePromise.d.ts +26 -0
- package/dist/sharedUtils/gen/core/OpenAPI.d.ts +27 -0
- package/dist/sharedUtils/gen/core/request.d.ts +29 -0
- package/dist/sharedUtils/gen/index.d.ts +6 -0
- package/dist/sharedUtils/gen/schemas.gen.d.ts +6192 -0
- package/dist/sharedUtils/gen/services.gen.d.ts +5741 -0
- package/dist/sharedUtils/gen/types.gen.d.ts +20152 -0
- package/dist/sharedUtils/history.svelte.d.ts +9 -0
- package/dist/sharedUtils/hub.d.ts +48 -0
- package/dist/sharedUtils/jsr.json +6 -0
- package/dist/sharedUtils/lib.d.ts +5 -0
- package/dist/sharedUtils/lib.es.js +1426 -0
- package/dist/sharedUtils/package.json +12 -0
- package/dist/sharedUtils/schema.d.ts +3 -0
- package/dist/sharedUtils/stores.d.ts +96 -0
- package/dist/sharedUtils/svelte5Utils.svelte.d.ts +49 -0
- package/dist/sharedUtils/toast.d.ts +8 -0
- package/dist/sharedUtils/utils.d.ts +250 -0
- package/package/aiStore.d.ts +1 -0
- package/package/aiStore.js +3 -0
- package/package/assets/app.css +32 -13
- package/package/components/AIAgentLogViewer.svelte +2 -2
- package/package/components/AIAgentLogViewer.svelte.d.ts +1 -0
- package/package/components/AIProviderPicker.svelte +20 -80
- package/package/components/AIProviderPicker.svelte.d.ts +2 -7
- package/package/components/AddUser.svelte +2 -2
- package/package/components/ApiConnectForm.svelte +14 -1
- package/package/components/ApiConnectForm.svelte.d.ts +1 -1
- package/package/components/AppConnectDrawer.svelte +18 -15
- package/package/components/AppConnectDrawer.svelte.d.ts +5 -5
- package/package/components/AppConnectInner.svelte +2 -0
- package/package/components/AppConnectInner.svelte.d.ts +1 -1
- package/package/components/AppConnectLightweightResourcePicker.svelte +3 -3
- package/package/components/AppWrapper.svelte +3 -2
- package/package/components/ArgInput.svelte +16 -5
- package/package/components/ArgInput.svelte.d.ts +3 -4
- package/package/components/Auth0Setting.svelte +6 -2
- package/package/components/AuthSettings.svelte +68 -39
- package/package/components/AuthSettings.svelte.d.ts +3 -1
- package/package/components/AutheliaSetting.svelte +12 -8
- package/package/components/AutheliaSetting.svelte.d.ts +4 -18
- package/package/components/AuthentikSetting.svelte +13 -9
- package/package/components/AuthentikSetting.svelte.d.ts +4 -18
- package/package/components/AutoscalingConfigEditor.svelte +2 -1
- package/package/components/AutoscalingConfigEditor.svelte.d.ts +1 -0
- package/package/components/AzureOauthSettings.svelte +23 -23
- package/package/components/AzureOauthSettings.svelte.d.ts +4 -18
- package/package/components/Badge.svelte +2 -4
- package/package/components/Badge.svelte.d.ts +5 -27
- package/package/components/CenteredModal.svelte +14 -4
- package/package/components/CenteredModal.svelte.d.ts +1 -0
- package/package/components/ChangeInstanceUsernameInner.svelte +5 -8
- package/package/components/ChangeInstanceUsernameInner.svelte.d.ts +8 -7
- package/package/components/ChannelSelector.svelte +19 -15
- package/package/components/CompareWorkspaces.svelte +634 -694
- package/package/components/ConcurrentJobsChart.svelte +1 -1
- package/package/components/ConnectionSection.svelte +69 -73
- package/package/components/ContextualVariableEditor.svelte +8 -8
- package/package/components/ContextualVariableEditor.svelte.d.ts +3 -6
- package/package/components/CustomOauth.svelte +19 -23
- package/package/components/CustomOauth.svelte.d.ts +4 -26
- package/package/components/CustomPopover.svelte +3 -2
- package/package/components/CustomSso.svelte +27 -32
- package/package/components/CustomSso.svelte.d.ts +4 -27
- package/package/components/DBManager.svelte +15 -4
- package/package/components/DBManager.svelte.d.ts +2 -0
- package/package/components/DBManagerContent.svelte +5 -0
- package/package/components/DBManagerContent.svelte.d.ts +1 -0
- package/package/components/DBManagerDrawer.svelte +26 -42
- package/package/components/DBManagerDrawer.svelte.d.ts +3 -5
- package/package/components/DBSchemaExplorer.svelte +3 -3
- package/package/components/DBTableEditor.svelte +6 -6
- package/package/components/DatatablePicker.svelte +27 -0
- package/package/components/DatatablePicker.svelte.d.ts +13 -0
- package/package/components/DateInput.svelte +1 -0
- package/package/components/DateTimeInput.svelte +4 -3
- package/package/components/DedicatedWorkersSelector.svelte +39 -42
- package/package/components/DefaultScripts.svelte +3 -5
- package/package/components/DefaultScripts.svelte.d.ts +6 -20
- package/package/components/DefaultScriptsInner.svelte +4 -4
- package/package/components/DefaultScriptsInner.svelte.d.ts +4 -18
- package/package/components/DeployToSetting.svelte +183 -123
- package/package/components/DeployToSetting.svelte.d.ts +19 -28
- package/package/components/DeployWorkspace.svelte +224 -510
- package/package/components/DeployWorkspace.svelte.d.ts +2 -1
- package/package/components/DeployWorkspaceDrawer.svelte +10 -8
- package/package/components/DeployWorkspaceDrawer.svelte.d.ts +3 -20
- package/package/components/Description.svelte +6 -4
- package/package/components/Description.svelte.d.ts +6 -28
- package/package/components/Dev.svelte +16 -14
- package/package/components/DiffEditor.svelte +9 -8
- package/package/components/DiffEditor.svelte.d.ts +2 -6
- package/package/components/DisplayResult.svelte +2 -2
- package/package/components/DisplayResult.svelte.d.ts +1 -1
- package/package/components/DropdownMenu.svelte +39 -0
- package/package/components/DropdownMenu.svelte.d.ts +14 -0
- package/package/components/DropdownSubmenuItem.svelte +69 -0
- package/package/components/DropdownSubmenuItem.svelte.d.ts +10 -0
- package/package/components/DropdownV2.svelte +4 -4
- package/package/components/DropdownV2.svelte.d.ts +2 -2
- package/package/components/DropdownV2Inner.svelte +45 -34
- package/package/components/DropdownV2Inner.svelte.d.ts +2 -1
- package/package/components/DucklakePicker.svelte +0 -5
- package/package/components/DurationMs.svelte +1 -3
- package/package/components/DurationMs.svelte.d.ts +4 -18
- package/package/components/DynamicInput.svelte +2 -2
- package/package/components/EEOnly.svelte +4 -14
- package/package/components/EEOnly.svelte.d.ts +0 -1
- package/package/components/EditableSchemaForm.svelte +4 -4
- package/package/components/Editor.svelte +11 -13
- package/package/components/Editor.svelte.d.ts +1 -0
- package/package/components/EditorBar.svelte +4 -6
- package/package/components/EditorBar.svelte.d.ts +1 -1
- package/package/components/ErrorOrRecoveryHandler.svelte +62 -53
- package/package/components/ErrorOrRecoveryHandler.svelte.d.ts +1 -0
- package/package/components/ExecutionDuration.svelte +12 -20
- package/package/components/ExecutionDuration.svelte.d.ts +14 -24
- package/package/components/ExploreAssetButton.svelte +14 -8
- package/package/components/ExploreAssetButton.svelte.d.ts +0 -2
- package/package/components/FakeMonacoPlaceHolder.svelte +3 -2
- package/package/components/FieldHeader.svelte +6 -16
- package/package/components/FieldHeader.svelte.d.ts +5 -20
- package/package/components/FileExplorer.svelte +249 -0
- package/package/components/FileExplorer.svelte.d.ts +21 -0
- package/package/components/FilesetEditor.svelte +126 -0
- package/package/components/FilesetEditor.svelte.d.ts +6 -0
- package/package/components/FilterSearchbar.svelte +661 -0
- package/package/components/FilterSearchbar.svelte.d.ts +87 -0
- package/package/components/FlowBuilder.svelte +161 -98
- package/package/components/FlowGraphViewer.svelte +1 -10
- package/package/components/FlowGraphViewer.svelte.d.ts +17 -16
- package/package/components/FlowGraphViewerStep.svelte +52 -38
- package/package/components/FlowGraphViewerStep.svelte.d.ts +4 -18
- package/package/components/FlowHistoryJobPicker.svelte +6 -3
- package/package/components/FlowHistoryJobPicker.svelte.d.ts +1 -0
- package/package/components/FlowInputViewer.svelte +1 -1
- package/package/components/FlowInputViewer.svelte.d.ts +4 -18
- package/package/components/FlowJobResult.svelte +31 -23
- package/package/components/FlowJobResult.svelte.d.ts +0 -1
- package/package/components/FlowLogRow.svelte +1 -1
- package/package/components/FlowLogViewer.svelte +14 -7
- package/package/components/FlowLogViewerWrapper.svelte +2 -2
- package/package/components/FlowPlugConnect.svelte +1 -3
- package/package/components/FlowPlugConnect.svelte.d.ts +7 -6
- package/package/components/FlowPreviewContent.svelte +174 -53
- package/package/components/FlowPreviewContent.svelte.d.ts +5 -0
- package/package/components/FlowRestartButton.svelte +47 -47
- package/package/components/FlowRestartButton.svelte.d.ts +2 -0
- package/package/components/FlowStatusViewer.svelte +8 -9
- package/package/components/FlowStatusViewer.svelte.d.ts +1 -0
- package/package/components/FlowStatusViewerInner.svelte +463 -367
- package/package/components/FlowStatusViewerInner.svelte.d.ts +2 -2
- package/package/components/FlowStatusWaitingForEvents.svelte +11 -10
- package/package/components/FlowViewer.svelte +6 -4
- package/package/components/FlowWrapper.svelte +5 -4
- package/package/components/FolderEditor.svelte +9 -7
- package/package/components/FolderPicker.svelte +195 -65
- package/package/components/FolderPicker.svelte.d.ts +2 -0
- package/package/components/FolderUsageInfo.svelte +7 -6
- package/package/components/FolderUsageInfo.svelte.d.ts +5 -19
- package/package/components/GraphqlSchemaViewer.svelte +3 -3
- package/package/components/GraphqlSchemaViewer.svelte.d.ts +5 -19
- package/package/components/GroupEditor.svelte +22 -10
- package/package/components/HistoricInputs.svelte +3 -4
- package/package/components/IconedResourceType.svelte +8 -2
- package/package/components/IconedResourceType.svelte.d.ts +2 -0
- package/package/components/IdEditorInput.svelte +3 -2
- package/package/components/InputError.svelte +9 -0
- package/package/components/InputError.svelte.d.ts +6 -0
- package/package/components/InputTransformForm.svelte +48 -39
- package/package/components/InputTransformForm.svelte.d.ts +1 -0
- package/package/components/InputTransformSchemaForm.svelte +2 -1
- package/package/components/InputTransformSchemaForm.svelte.d.ts +2 -1
- package/package/components/InputTransformsViewer.svelte +39 -22
- package/package/components/InputTransformsViewer.svelte.d.ts +4 -18
- package/package/components/InstanceGroupEditor.svelte +28 -23
- package/package/components/InstanceGroupEditor.svelte.d.ts +5 -4
- package/package/components/InstanceNameEditor.svelte +22 -20
- package/package/components/InstanceNameEditor.svelte.d.ts +9 -9
- package/package/components/InstanceSetting.svelte +156 -374
- package/package/components/InstanceSetting.svelte.d.ts +1 -0
- package/package/components/InstanceSettings.svelte +818 -193
- package/package/components/InstanceSettings.svelte.d.ts +17 -2
- package/package/components/IntegerInput.svelte +58 -0
- package/package/components/IntegerInput.svelte.d.ts +14 -0
- package/package/components/InviteGlobalUser.svelte +28 -28
- package/package/components/InviteGlobalUser.svelte.d.ts +6 -3
- package/package/components/JobArgs.svelte +14 -10
- package/package/components/JobLoader.svelte +57 -5
- package/package/components/JobLoader.svelte.d.ts +2 -2
- package/package/components/JobStatus.svelte +29 -26
- package/package/components/JobStatus.svelte.d.ts +1 -0
- package/package/components/KanidmSetting.svelte +18 -14
- package/package/components/KanidmSetting.svelte.d.ts +4 -18
- package/package/components/KeycloakSetting.svelte +21 -11
- package/package/components/KeycloakSetting.svelte.d.ts +4 -18
- package/package/components/LogId.svelte +5 -2
- package/package/components/LogId.svelte.d.ts +4 -18
- package/package/components/LogSnippetViewer.svelte +5 -5
- package/package/components/LogSnippetViewer.svelte.d.ts +5 -20
- package/package/components/LogViewer.svelte +2 -2
- package/package/components/Login.svelte +9 -3
- package/package/components/ManualPopover.svelte +4 -1
- package/package/components/MapResult.svelte +33 -33
- package/package/components/MapResult.svelte.d.ts +13 -26
- package/package/components/MemoryFootprintViewer.svelte +8 -6
- package/package/components/MemoryFootprintViewer.svelte.d.ts +4 -18
- package/package/components/ModulePreview.svelte.d.ts +1 -1
- package/package/components/ModuleStatus.svelte +6 -8
- package/package/components/ModuleStatus.svelte.d.ts +5 -19
- package/package/components/ModuleTest.svelte +6 -6
- package/package/components/ModuleTest.svelte.d.ts +1 -1
- package/package/components/MoveDrawer.svelte +47 -76
- package/package/components/MoveDrawer.svelte.d.ts +4 -6
- package/package/components/NextcloudSetting.svelte +3 -2
- package/package/components/NoDirectDeployAlert.svelte +31 -0
- package/package/components/NoDirectDeployAlert.svelte.d.ts +6 -0
- package/package/components/NumberTypeNarrowing.svelte +65 -67
- package/package/components/NumberTypeNarrowing.svelte.d.ts +2 -1
- package/package/components/OAuthSetting.svelte +63 -55
- package/package/components/OauthExtraParams.svelte +9 -4
- package/package/components/OauthExtraParams.svelte.d.ts +4 -18
- package/package/components/OauthScopes.svelte +9 -4
- package/package/components/OauthScopes.svelte.d.ts +4 -18
- package/package/components/ObjectResourceInput.svelte +10 -3
- package/package/components/ObjectResourceInput.svelte.d.ts +1 -0
- package/package/components/ObjectStoreConfigSettings.svelte +150 -55
- package/package/components/ObjectStoreConfigSettings.svelte.d.ts +34 -44
- package/package/components/OktaSetting.svelte +3 -2
- package/package/components/OnBehalfOfSelector.svelte +191 -0
- package/package/components/OnBehalfOfSelector.svelte.d.ts +21 -0
- package/package/components/PageHeader.svelte +4 -8
- package/package/components/PageHeader.svelte.d.ts +5 -27
- package/package/components/ParentWorkspaceProtectionAlert.svelte +48 -0
- package/package/components/ParentWorkspaceProtectionAlert.svelte.d.ts +7 -0
- package/package/components/ParqetCsvTableRenderer.svelte +12 -12
- package/package/components/ParqetCsvTableRenderer.svelte.d.ts +4 -18
- package/package/components/Path.svelte +40 -28
- package/package/components/Path.svelte.d.ts +3 -0
- package/package/components/PermissionHistory.svelte +8 -6
- package/package/components/PersistentScriptDrawer.svelte +56 -50
- package/package/components/PersistentScriptDrawer.svelte.d.ts +3 -5
- package/package/components/PocketIdSetting.svelte +3 -2
- package/package/components/Popover.svelte +2 -2
- package/package/components/PrefixedInput.svelte +2 -2
- package/package/components/QueueMetricsDrawer.svelte +1 -1
- package/package/components/QueueMetricsDrawer.svelte.d.ts +3 -20
- package/package/components/QueueMetricsDrawerInner.svelte +14 -9
- package/package/components/QueueMetricsDrawerInner.svelte.d.ts +2 -17
- package/package/components/RadioButton.svelte +3 -8
- package/package/components/RadioButton.svelte.d.ts +13 -12
- package/package/components/Range.svelte +15 -18
- package/package/components/Range.svelte.d.ts +5 -21
- package/package/components/RepositorySelector.svelte +3 -2
- package/package/components/Required.svelte +4 -4
- package/package/components/Required.svelte.d.ts +6 -20
- package/package/components/ResourceEditor.svelte +28 -5
- package/package/components/ResourceEditor.svelte.d.ts +0 -1
- package/package/components/ResourceEditorDrawer.svelte +11 -16
- package/package/components/ResourceEditorDrawer.svelte.d.ts +3 -6
- package/package/components/ResourcePicker.svelte +34 -19
- package/package/components/ResourcePicker.svelte.d.ts +1 -0
- package/package/components/RightClickPopover.svelte +37 -0
- package/package/components/RightClickPopover.svelte.d.ts +11 -0
- package/package/components/RunChart.svelte +2 -21
- package/package/components/RunChart.svelte.d.ts +0 -3
- package/package/components/RunForm.svelte +2 -2
- package/package/components/RunFormAdvancedPopup.svelte +1 -4
- package/package/components/RunFormAdvancedPopup.svelte.d.ts +4 -18
- package/package/components/RunsPage.svelte +554 -557
- package/package/components/S3FilePicker.svelte +2 -1
- package/package/components/S3FilePicker.svelte.d.ts +1 -0
- package/package/components/S3FilePickerInner.svelte +19 -7
- package/package/components/S3FilePickerInner.svelte.d.ts +1 -0
- package/package/components/S3ObjectPicker.svelte +4 -5
- package/package/components/S3ObjectPicker.svelte.d.ts +6 -6
- package/package/components/SaveButton.svelte +80 -0
- package/package/components/SaveButton.svelte.d.ts +12 -0
- package/package/components/SaveInputsButton.svelte +3 -8
- package/package/components/SaveInputsButton.svelte.d.ts +10 -9
- package/package/components/SavedInputsPickerViewer.svelte +21 -22
- package/package/components/SavedInputsPickerViewer.svelte.d.ts +10 -10
- package/package/components/SavedInputsV2.svelte +1 -3
- package/package/components/SchemaEditorProperty.svelte +1 -1
- package/package/components/SchemaEditorProperty.svelte.d.ts +4 -18
- package/package/components/SchemaForm.svelte.d.ts +1 -1
- package/package/components/SchemaFormWithArgPicker.svelte +34 -30
- package/package/components/SchemaFormWithArgPicker.svelte.d.ts +12 -21
- package/package/components/SchemaViewer.svelte +56 -53
- package/package/components/ScriptBuilder.svelte +123 -40
- package/package/components/ScriptEditor.svelte +97 -39
- package/package/components/ScriptEditor.svelte.d.ts +2 -2
- package/package/components/ScriptPicker.svelte +1 -1
- package/package/components/ScriptWrapper.svelte +3 -2
- package/package/components/Scrollable.svelte +10 -10
- package/package/components/Scrollable.svelte.d.ts +6 -29
- package/package/components/SearchItems.svelte +1 -1
- package/package/components/Section.svelte +2 -2
- package/package/components/ServiceLogsInner.svelte +36 -91
- package/package/components/ShareModal.svelte +15 -8
- package/package/components/ShareModal.svelte.d.ts +1 -1
- package/package/components/SimpleEditor.svelte +1 -1
- package/package/components/Slider.svelte +2 -5
- package/package/components/Slider.svelte.d.ts +6 -28
- package/package/components/Star.svelte +8 -22
- package/package/components/Star.svelte.d.ts +4 -4
- package/package/components/StringTypeNarrowing.svelte +4 -2
- package/package/components/Subsection.svelte +3 -2
- package/package/components/Summary.svelte +1 -2
- package/package/components/Summary.svelte.d.ts +4 -18
- package/package/components/SummaryPathDisplay.svelte +177 -0
- package/package/components/SummaryPathDisplay.svelte.d.ts +10 -0
- package/package/components/SupabaseConnect.svelte +20 -17
- package/package/components/SupabaseConnect.svelte.d.ts +3 -5
- package/package/components/SuperadminSettings.svelte +187 -4
- package/package/components/SuperadminSettings.svelte.d.ts +4 -1
- package/package/components/SuperadminSettingsInner.svelte +310 -195
- package/package/components/SuperadminSettingsInner.svelte.d.ts +12 -1
- package/package/components/TableCustom.svelte +6 -8
- package/package/components/TableCustom.svelte.d.ts +10 -10
- package/package/components/TaggedTextInput.svelte +449 -0
- package/package/components/TaggedTextInput.svelte.d.ts +28 -0
- package/package/components/TeamSelector.svelte +20 -14
- package/package/components/TemplateEditor.svelte +1 -7
- package/package/components/TestConnection.svelte +2 -5
- package/package/components/TestConnection.svelte.d.ts +4 -18
- package/package/components/TimelineBar.svelte +5 -2
- package/package/components/Toast.svelte +69 -51
- package/package/components/Toast.svelte.d.ts +2 -2
- package/package/components/Toggle.svelte +2 -2
- package/package/components/Tooltip.svelte +4 -17
- package/package/components/Tooltip.svelte.d.ts +6 -1
- package/package/components/TooltipInner.svelte +8 -14
- package/package/components/TooltipInner.svelte.d.ts +6 -28
- package/package/components/Uptodate.svelte +4 -3
- package/package/components/Uptodate.svelte.d.ts +2 -17
- package/package/components/Urlize.svelte +2 -2
- package/package/components/Urlize.svelte.d.ts +4 -18
- package/package/components/UserSettings.svelte +2 -2
- package/package/components/UserSettings.svelte.d.ts +1 -0
- package/package/components/Version.svelte +1 -1
- package/package/components/Version.svelte.d.ts +2 -17
- package/package/components/WhitelistIp.svelte +1 -1
- package/package/components/WhitelistIp.svelte.d.ts +2 -17
- package/package/components/WorkerGroup.svelte +321 -197
- package/package/components/WorkerGroup.svelte.d.ts +2 -0
- package/package/components/WorkerRepl.svelte +1 -2
- package/package/components/WorkflowTimeline.svelte +10 -14
- package/package/components/WorkflowTimeline.svelte.d.ts +4 -18
- package/package/components/WorkspaceDependenciesEditor.svelte +34 -18
- package/package/components/WorkspaceDeployLayout.svelte +107 -0
- package/package/components/WorkspaceDeployLayout.svelte.d.ts +31 -0
- package/package/components/ZitadelSetting.svelte +12 -8
- package/package/components/ZitadelSetting.svelte.d.ts +4 -18
- package/package/components/aiProviderStorage.d.ts +5 -0
- package/package/components/aiProviderStorage.js +50 -0
- package/package/components/apps/components/GroupWrapper.svelte +5 -2
- package/package/components/apps/components/buttons/AppButton.svelte +6 -5
- package/package/components/apps/components/buttons/AppForm.svelte +5 -5
- package/package/components/apps/components/buttons/AppFormButton.svelte +5 -5
- package/package/components/apps/components/buttons/AppSchemaForm.svelte +5 -4
- package/package/components/apps/components/display/AppAccordionList.svelte +4 -4
- package/package/components/apps/components/display/AppAlert.svelte +4 -4
- package/package/components/apps/components/display/AppBarChart.svelte +4 -4
- package/package/components/apps/components/display/AppCarouselList.svelte +5 -5
- package/package/components/apps/components/display/AppChartJs.svelte +4 -4
- package/package/components/apps/components/display/AppChartJsV2.svelte +4 -4
- package/package/components/apps/components/display/AppChat.svelte +5 -5
- package/package/components/apps/components/display/AppCustomComponent.svelte +3 -3
- package/package/components/apps/components/display/AppDisplayComponent.svelte +5 -5
- package/package/components/apps/components/display/AppDisplayComponentByJobId.svelte +3 -3
- package/package/components/apps/components/display/AppDownload.svelte +3 -3
- package/package/components/apps/components/display/AppHtml.svelte +4 -3
- package/package/components/apps/components/display/AppIcon.svelte +4 -4
- package/package/components/apps/components/display/AppImage.svelte +4 -4
- package/package/components/apps/components/display/AppJobIdFlowStatus.svelte +4 -4
- package/package/components/apps/components/display/AppJobIdLogComponent.svelte +3 -3
- package/package/components/apps/components/display/AppJobProgressBar.svelte +3 -3
- package/package/components/apps/components/display/AppMap.svelte +6 -4
- package/package/components/apps/components/display/AppMarkdown.svelte +5 -4
- package/package/components/apps/components/display/AppMenu.svelte +4 -3
- package/package/components/apps/components/display/AppNavbar.svelte +4 -4
- package/package/components/apps/components/display/AppPdf.svelte +3 -3
- package/package/components/apps/components/display/AppPieChart.svelte +3 -3
- package/package/components/apps/components/display/AppRecomputeAll.svelte +3 -3
- package/package/components/apps/components/display/AppScatterChart.svelte +3 -3
- package/package/components/apps/components/display/AppStatCard.svelte +3 -3
- package/package/components/apps/components/display/AppText.svelte +10 -8
- package/package/components/apps/components/display/AppTimeseries.svelte +3 -3
- package/package/components/apps/components/display/InsertRowDrawerButton.svelte +1 -1
- package/package/components/apps/components/display/PlotlyHtml.svelte +3 -2
- package/package/components/apps/components/display/PlotlyHtmlV2.svelte +3 -2
- package/package/components/apps/components/display/ResolveNavbarItemPath.svelte +3 -2
- package/package/components/apps/components/display/VegaLiteHtml.svelte +3 -2
- package/package/components/apps/components/display/charts/AppAgCharts.svelte +3 -3
- package/package/components/apps/components/display/dbtable/AppDbExplorer.svelte +26 -15
- package/package/components/apps/components/display/dbtable/DbExplorerCount.svelte +3 -3
- package/package/components/apps/components/display/dbtable/DeleteRow.svelte +2 -2
- package/package/components/apps/components/display/dbtable/InsertRowRunnable.svelte +2 -2
- package/package/components/apps/components/display/dbtable/UpdateCell.svelte +2 -2
- package/package/components/apps/components/display/dbtable/metadata.d.ts +1 -0
- package/package/components/apps/components/display/dbtable/metadata.js +10 -4
- package/package/components/apps/components/display/dbtable/queries/count.js +3 -1
- package/package/components/apps/components/display/dbtable/queries/delete.js +3 -1
- package/package/components/apps/components/display/dbtable/queries/insert.js +3 -1
- package/package/components/apps/components/display/dbtable/queries/select.js +15 -1
- package/package/components/apps/components/display/dbtable/queries/update.js +3 -1
- package/package/components/apps/components/display/dbtable/utils.d.ts +3 -3
- package/package/components/apps/components/display/dbtable/utils.js +3 -3
- package/package/components/apps/components/display/table/AppAggridExplorerTable.svelte +14 -4
- package/package/components/apps/components/display/table/AppAggridExplorerTable.svelte.d.ts +1 -1
- package/package/components/apps/components/display/table/AppAggridInfiniteTable.svelte +4 -3
- package/package/components/apps/components/display/table/AppAggridTable.svelte +11 -3
- package/package/components/apps/components/display/table/AppAggridTableActions.svelte +12 -6
- package/package/components/apps/components/display/table/AppAggridTableActions.svelte.d.ts +1 -0
- package/package/components/apps/components/display/table/AppTable.svelte +4 -4
- package/package/components/apps/components/display/table/theme/windmill-theme.css +8 -7
- package/package/components/apps/components/helpers/HiddenComponent.svelte +2 -2
- package/package/components/apps/components/helpers/InputValue.svelte +3 -3
- package/package/components/apps/components/helpers/RunnableComponent.svelte +2 -2
- package/package/components/apps/components/helpers/RunnableWrapper.svelte +2 -2
- package/package/components/apps/components/helpers/eval.js +5 -2
- package/package/components/apps/components/inputs/AppCheckbox.svelte +6 -6
- package/package/components/apps/components/inputs/AppCodeInputComponent.svelte +6 -5
- package/package/components/apps/components/inputs/AppDateInput.svelte +4 -4
- package/package/components/apps/components/inputs/AppDateSelect.svelte +4 -4
- package/package/components/apps/components/inputs/AppDateSliderInput.svelte +5 -4
- package/package/components/apps/components/inputs/AppDateTimeInput.svelte +4 -4
- package/package/components/apps/components/inputs/AppFileInput.svelte +4 -4
- package/package/components/apps/components/inputs/AppMultiSelectV2.svelte +5 -4
- package/package/components/apps/components/inputs/AppNumberInput.svelte +4 -4
- package/package/components/apps/components/inputs/AppQuillEditor.svelte +3 -2
- package/package/components/apps/components/inputs/AppRangeInput.svelte +5 -4
- package/package/components/apps/components/inputs/AppS3FileInput.svelte +4 -4
- package/package/components/apps/components/inputs/AppSelect.svelte +8 -7
- package/package/components/apps/components/inputs/AppSelectStep.svelte +5 -4
- package/package/components/apps/components/inputs/AppSelectTab.svelte +4 -4
- package/package/components/apps/components/inputs/AppSliderInputs.svelte +5 -4
- package/package/components/apps/components/inputs/AppTextInput.svelte +4 -4
- package/package/components/apps/components/inputs/AppTimeInput.svelte +4 -4
- package/package/components/apps/components/inputs/AppUserResource.svelte +4 -4
- package/package/components/apps/components/inputs/currency/AppCurrencyInput.svelte +5 -4
- package/package/components/apps/components/inputs/currency/CurrencyInput.svelte +3 -1
- package/package/components/apps/components/layout/AppConditionalWrapper.svelte +5 -5
- package/package/components/apps/components/layout/AppContainer.svelte +3 -3
- package/package/components/apps/components/layout/AppDecisionTree.svelte +5 -5
- package/package/components/apps/components/layout/AppDivider.svelte +3 -3
- package/package/components/apps/components/layout/AppDrawer.svelte +7 -6
- package/package/components/apps/components/layout/AppList.svelte +5 -5
- package/package/components/apps/components/layout/AppModal.svelte +9 -7
- package/package/components/apps/components/layout/AppModal.svelte.d.ts +1 -0
- package/package/components/apps/components/layout/AppSplitpanes.svelte +8 -6
- package/package/components/apps/components/layout/AppStepper.svelte +6 -6
- package/package/components/apps/components/layout/AppTabs.svelte +8 -8
- package/package/components/apps/components/layout/ListWrapper.svelte +6 -2
- package/package/components/apps/components/layout/RowWrapper.svelte +6 -2
- package/package/components/apps/editor/AppEditor.svelte +11 -11
- package/package/components/apps/editor/AppEditorHeader.svelte +21 -4
- package/package/components/apps/editor/AppEditorHeaderDeploy.svelte +41 -1
- package/package/components/apps/editor/AppEditorHeaderDeploy.svelte.d.ts +2 -1
- package/package/components/apps/editor/AppExportButton.svelte +4 -4
- package/package/components/apps/editor/AppExportButton.svelte.d.ts +3 -20
- package/package/components/apps/editor/AppInputs.svelte +1 -1
- package/package/components/apps/editor/AppInputs.svelte.d.ts +2 -17
- package/package/components/apps/editor/AppJsonEditor.svelte +5 -5
- package/package/components/apps/editor/AppJsonEditor.svelte.d.ts +3 -7
- package/package/components/apps/editor/AppPreview.svelte +17 -16
- package/package/components/apps/editor/ComponentHeader.svelte +1 -1
- package/package/components/apps/editor/DecisionTreeDebug.svelte +4 -4
- package/package/components/apps/editor/GridEditor.svelte +1 -0
- package/package/components/apps/editor/GridViewer.svelte +3 -3
- package/package/components/apps/editor/RecomputeAllComponents.svelte +13 -8
- package/package/components/apps/editor/RecomputeAllComponents.svelte.d.ts +2 -17
- package/package/components/apps/editor/SubGridEditor.svelte +4 -2
- package/package/components/apps/editor/appPolicy.js +6 -5
- package/package/components/apps/editor/appUtils.d.ts +1 -1
- package/package/components/apps/editor/commonAppUtils.d.ts +1 -1
- package/package/components/apps/editor/commonAppUtils.js +1 -1
- package/package/components/apps/editor/component/Component.svelte +2 -2
- package/package/components/apps/editor/component/components.d.ts +19 -2
- package/package/components/apps/editor/component/components.js +43 -39
- package/package/components/apps/editor/componentsPanel/CssHelperPanel.svelte +10 -7
- package/package/components/apps/editor/componentsPanel/CssHelperPanel.svelte.d.ts +1 -1
- package/package/components/apps/editor/componentsPanel/CssProperty.svelte +3 -1
- package/package/components/apps/editor/componentsPanel/CustomComponentsList.svelte +7 -7
- package/package/components/apps/editor/componentsPanel/CustomComponentsList.svelte.d.ts +1 -1
- package/package/components/apps/editor/componentsPanel/NameEditor.svelte +2 -2
- package/package/components/apps/editor/componentsPanel/QuickStyleMenu.svelte +3 -4
- package/package/components/apps/editor/componentsPanel/QuickStyleProperty.svelte +3 -3
- package/package/components/apps/editor/componentsPanel/ThemeList.svelte +5 -5
- package/package/components/apps/editor/componentsPanel/ThemeList.svelte.d.ts +1 -1
- package/package/components/apps/editor/componentsPanel/ThemeNameEditor.svelte +2 -2
- package/package/components/apps/editor/contextPanel/ComponentOutput.svelte +2 -2
- package/package/components/apps/editor/contextPanel/DebugPanel.svelte +4 -4
- package/package/components/apps/editor/contextPanel/DebugPanel.svelte.d.ts +2 -17
- package/package/components/apps/editor/contextPanel/components/Output.svelte +6 -1
- package/package/components/apps/editor/contextPanel/components/Output.svelte.d.ts +1 -0
- package/package/components/apps/editor/contextPanel/components/TableActionsOutput.svelte +14 -2
- package/package/components/apps/editor/inlineScriptsPanel/CacheTtlPopup.svelte +1 -1
- package/package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +1 -1
- package/package/components/apps/editor/settingsPanel/ComponentControl.svelte +3 -2
- package/package/components/apps/editor/settingsPanel/ContextVariables.svelte +6 -6
- package/package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +4 -4
- package/package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte.d.ts +0 -1
- package/package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +1 -2
- package/package/components/apps/editor/settingsPanel/OneOfInputSpecsEditor.svelte +1 -1
- package/package/components/apps/editor/settingsPanel/StylePanel.svelte +66 -29
- package/package/components/apps/editor/settingsPanel/StylePanel.svelte.d.ts +2 -17
- package/package/components/apps/editor/settingsPanel/common/PanelSection.svelte +3 -2
- package/package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +10 -0
- package/package/components/apps/editor/settingsPanel/inputEditor/UploadInputEditor.svelte +6 -5
- package/package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +2 -2
- package/package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte +3 -2
- package/package/components/apps/inputType.d.ts +2 -2
- package/package/components/apps/svelte-grid/Grid.svelte +4 -4
- package/package/components/apps/svelte-grid/MoveResize.svelte +5 -5
- package/package/components/assets/AssetButtons.svelte +33 -33
- package/package/components/assets/AssetButtons.svelte.d.ts +1 -4
- package/package/components/assets/AssetColumnBadges.svelte +37 -0
- package/package/components/assets/AssetColumnBadges.svelte.d.ts +10 -0
- package/package/components/assets/AssetsDropdownButton.svelte +16 -16
- package/package/components/assets/AssetsUsageDrawer.svelte +23 -19
- package/package/components/assets/JobAssetsViewer.svelte +12 -8
- package/package/components/assets/VolumeDetailDrawer.svelte +101 -0
- package/package/components/assets/VolumeDetailDrawer.svelte.d.ts +9 -0
- package/package/components/assets/VolumesDrawer.svelte +191 -0
- package/package/components/assets/VolumesDrawer.svelte.d.ts +8 -0
- package/package/components/assets/assetsFilter.d.ts +54 -0
- package/package/components/assets/assetsFilter.js +47 -0
- package/package/components/assets/lib.d.ts +3 -2
- package/package/components/assets/lib.js +12 -1
- package/package/components/auditLogs/AuditLogsFilters.svelte +28 -2
- package/package/components/chartjs-wrappers/Chart.svelte +4 -4
- package/package/components/common/FileProgressBar.svelte +9 -7
- package/package/components/common/FileProgressBar.svelte.d.ts +5 -27
- package/package/components/common/InlineCalendarInput.svelte +584 -0
- package/package/components/common/InlineCalendarInput.svelte.d.ts +31 -0
- package/package/components/common/alert/Alert.svelte +2 -8
- package/package/components/common/alert/Notification.svelte +2 -2
- package/package/components/common/alert/Notification.svelte.d.ts +4 -18
- package/package/components/common/alert/model.d.ts +1 -0
- package/package/components/common/alert/model.js +7 -0
- package/package/components/common/badge/Badge.svelte +7 -3
- package/package/components/common/badge/Badge.svelte.d.ts +1 -0
- package/package/components/common/breadcrumb/Breadcrumb.svelte +10 -14
- package/package/components/common/breadcrumb/Breadcrumb.svelte.d.ts +8 -23
- package/package/components/common/button/AnimatedButton.svelte +3 -9
- package/package/components/common/button/AnimatedButton.svelte.d.ts +5 -27
- package/package/components/common/button/AnimatedButtonInner.svelte +6 -12
- package/package/components/common/button/AnimatedButtonInner.svelte.d.ts +5 -27
- package/package/components/common/button/Button.svelte +5 -5
- package/package/components/common/button/PulseButton.svelte +15 -19
- package/package/components/common/button/PulseButton.svelte.d.ts +10 -48
- package/package/components/common/button/RefreshButton.svelte +3 -2
- package/package/components/common/button/RefreshButton.svelte.d.ts +1 -1
- package/package/components/common/button/RoundIconButton.svelte +5 -5
- package/package/components/common/button/RoundIconButton.svelte.d.ts +6 -28
- package/package/components/common/button/UndoRedo.svelte +1 -2
- package/package/components/common/button/UndoRedo.svelte.d.ts +6 -5
- package/package/components/common/calendarPicker/CalendarPicker.svelte +44 -43
- package/package/components/common/calendarPicker/CalendarPicker.svelte.d.ts +11 -11
- package/package/components/common/clearableInput/ClearableInput.svelte +28 -27
- package/package/components/common/clearableInput/ClearableInput.svelte.d.ts +11 -37
- package/package/components/common/confirmationModal/ConfirmationModal.svelte +1 -1
- package/package/components/common/confirmationModal/DraftTriggersConfirmationModal.svelte +2 -2
- package/package/components/common/confirmationModal/UnsavedConfirmationModal.svelte +3 -3
- package/package/components/common/contextmenu/ContextMenu.svelte +14 -4
- package/package/components/common/contextmenu/ContextMenu.svelte.d.ts +2 -0
- package/package/components/common/contextmenu/contextMenuStyles.d.ts +4 -0
- package/package/components/common/contextmenu/contextMenuStyles.js +4 -0
- package/package/components/common/drawer/Disposable.svelte +3 -3
- package/package/components/common/drawer/DrawerContent.svelte +1 -1
- package/package/components/common/fileInput/FileInput.svelte +16 -30
- package/package/components/common/fileInput/FileInput.svelte.d.ts +24 -32
- package/package/components/common/fileUpload/FileUploadModal.svelte +2 -4
- package/package/components/common/fileUpload/FileUploadModal.svelte.d.ts +7 -6
- package/package/components/common/kbd/Kbd.svelte +4 -3
- package/package/components/common/languageIcons/LanguageIcon.svelte +21 -4
- package/package/components/common/languageIcons/LanguageIcon.svelte.d.ts +1 -1
- package/package/components/common/layout/ListElement.svelte +5 -1
- package/package/components/common/layout/ListElement.svelte.d.ts +5 -25
- package/package/components/common/menu/MenuItem.svelte +9 -4
- package/package/components/common/menu/MenuItem.svelte.d.ts +5 -29
- package/package/components/common/menu/ResolveOpen.svelte +6 -3
- package/package/components/common/menu/ResolveOpen.svelte.d.ts +8 -4
- package/package/components/common/modal/AlwaysMountedModal.svelte +11 -15
- package/package/components/common/modal/AlwaysMountedModal.svelte.d.ts +8 -32
- package/package/components/common/modal/Modal2.svelte +12 -20
- package/package/components/common/modal/Modal2.svelte.d.ts +10 -36
- package/package/components/common/popup/PopupV2.svelte +3 -2
- package/package/components/common/seconds/SecondsInput.svelte +158 -67
- package/package/components/common/seconds/SecondsInput.svelte.d.ts +9 -21
- package/package/components/common/sidebar/SidebarNavigation.svelte +50 -0
- package/package/components/common/sidebar/SidebarNavigation.svelte.d.ts +25 -0
- package/package/components/common/stepper/Stepper.svelte +4 -9
- package/package/components/common/stepper/Stepper.svelte.d.ts +10 -9
- package/package/components/common/table/AppRow.svelte +25 -20
- package/package/components/common/table/AppRow.svelte.d.ts +2 -2
- package/package/components/common/table/FlowRow.svelte +25 -20
- package/package/components/common/table/FlowRow.svelte.d.ts +2 -2
- package/package/components/common/table/RawAppRow.svelte +5 -82
- package/package/components/common/table/RawAppRow.svelte.d.ts +2 -23
- package/package/components/common/table/Row.svelte +7 -6
- package/package/components/common/table/Row.svelte.d.ts +2 -3
- package/package/components/common/table/RowIcon.svelte +40 -11
- package/package/components/common/table/RowIcon.svelte.d.ts +6 -18
- package/package/components/common/table/ScriptRow.svelte +43 -36
- package/package/components/common/table/ScriptRow.svelte.d.ts +2 -2
- package/package/components/common/table/Table.svelte +5 -1
- package/package/components/common/table/Table.svelte.d.ts +5 -25
- package/package/components/common/tabs/Tabs.svelte +2 -2
- package/package/components/common/tabs/TabsV2.svelte +1 -1
- package/package/components/common/toggleButton-v2/ToggleButton.svelte +0 -1
- package/package/components/common/toggleButton-v2/ToggleButtonGroup.svelte +1 -1
- package/package/components/common/toggleButton-v2/ToggleButtonGroup.svelte.d.ts +1 -1
- package/package/components/common/toggleButton-v2/ToggleButtonMore.svelte +10 -5
- package/package/components/common/toggleButton-v2/ToggleButtonMore.svelte.d.ts +1 -0
- package/package/components/copilot/FlowCopilotInputsModal.svelte +14 -13
- package/package/components/copilot/FlowCopilotInputsModal.svelte.d.ts +6 -5
- package/package/components/copilot/MetadataGen.svelte +5 -5
- package/package/components/copilot/RegexGen.svelte +87 -80
- package/package/components/copilot/RegexGen.svelte.d.ts +1 -1
- package/package/components/copilot/ResourceGen.svelte +157 -0
- package/package/components/copilot/ResourceGen.svelte.d.ts +12 -0
- package/package/components/copilot/ScriptFix.svelte +37 -33
- package/package/components/copilot/ScriptGen.svelte +1 -1
- package/package/components/copilot/TestAIKey.svelte +1 -1
- package/package/components/copilot/chat/AIChat.svelte +1 -1
- package/package/components/copilot/chat/AIChatDisplay.svelte +52 -48
- package/package/components/copilot/chat/AIChatInput.svelte +64 -45
- package/package/components/copilot/chat/AIChatManager.svelte.js +19 -19
- package/package/components/copilot/chat/AssistantMessage.svelte +1 -1
- package/package/components/copilot/chat/AssistantMessage.svelte.d.ts +4 -18
- package/package/components/copilot/chat/AvailableContextList.svelte +215 -12
- package/package/components/copilot/chat/AvailableContextList.svelte.d.ts +1 -0
- package/package/components/copilot/chat/ChatMode.svelte +37 -33
- package/package/components/copilot/chat/ContextElementBadge.svelte +6 -8
- package/package/components/copilot/chat/ContextTextarea.svelte +15 -2
- package/package/components/copilot/chat/__tests__/app/variants/streamlined.js +1 -1
- package/package/components/copilot/chat/__tests__/flow/variants/minimal-single-tool.js +4 -2
- package/package/components/copilot/chat/app/core.js +7 -86
- package/package/components/copilot/chat/context.js +4 -1
- package/package/components/copilot/chat/flow/AIChangesWarningModal.svelte +8 -11
- package/package/components/copilot/chat/flow/core.js +193 -61
- package/package/components/copilot/chat/flow/openFlow.json +1 -1
- package/package/components/copilot/chat/flow/openFlowZod.d.ts +2 -2
- package/package/components/copilot/chat/flow/openFlowZod.js +6 -8
- package/package/components/copilot/chat/navigator/core.d.ts +2 -2
- package/package/components/copilot/chat/navigator/core.js +11 -2
- package/package/components/copilot/chat/script/core.js +4 -1
- package/package/components/copilot/chat/shared.d.ts +53 -1
- package/package/components/copilot/chat/shared.js +227 -1
- package/package/components/copilot/lib.d.ts +3 -2
- package/package/components/copilot/lib.js +67 -29
- package/package/components/custom_ui.d.ts +3 -0
- package/package/components/dbManagerDrawerModel.svelte.d.ts +13 -0
- package/package/components/dbManagerDrawerModel.svelte.js +182 -0
- package/package/components/dedicated_worker.d.ts +7 -0
- package/package/components/dedicated_worker.js +36 -0
- package/package/components/details/ClipboardPanel.svelte +5 -8
- package/package/components/details/ClipboardPanel.svelte.d.ts +8 -22
- package/package/components/details/DetailPageHeader.svelte +8 -23
- package/package/components/details/DetailPageHeader.svelte.d.ts +1 -0
- package/package/components/details/DetailPageLayout.svelte +1 -1
- package/package/components/details/ErrorHandlerToggleButton.svelte +1 -4
- package/package/components/details/ErrorHandlerToggleButton.svelte.d.ts +5 -19
- package/package/components/details/ErrorHandlerToggleButtonV2.svelte +2 -6
- package/package/components/details/ErrorHandlerToggleButtonV2.svelte.d.ts +6 -20
- package/package/components/details/createAppFromScript.d.ts +136 -16
- package/package/components/details/createAppFromScript.js +13 -12
- package/package/components/diffEditorTypes.d.ts +6 -0
- package/package/components/diffEditorTypes.js +1 -0
- package/package/components/flows/CreateActionsApp.svelte +70 -96
- package/package/components/flows/CreateActionsFlow.svelte +28 -28
- package/package/components/flows/DebounceLimit.svelte.d.ts +1 -1
- package/package/components/flows/FlowAssetsHandler.svelte +4 -6
- package/package/components/flows/FlowModuleIcon.svelte +4 -3
- package/package/components/flows/FlowProgressBar.svelte +37 -1
- package/package/components/flows/FlowProgressBar.svelte.d.ts +3 -0
- package/package/components/flows/agentToolUtils.d.ts +18 -0
- package/package/components/flows/agentToolUtils.js +47 -0
- package/package/components/flows/common/FlowCardHeader.svelte +11 -11
- package/package/components/flows/content/AgentToolWrapper.svelte +1 -1
- package/package/components/flows/content/DynamicInputHelpBox.svelte +1 -1
- package/package/components/flows/content/DynamicInputHelpBox.svelte.d.ts +2 -17
- package/package/components/flows/content/FlowEditorPanel.svelte +14 -1
- package/package/components/flows/content/FlowEnvironmentVariables.svelte +131 -34
- package/package/components/flows/content/FlowFailureModule.svelte +2 -3
- package/package/components/flows/content/FlowFailureModule.svelte.d.ts +4 -18
- package/package/components/flows/content/FlowInputs.svelte +20 -2
- package/package/components/flows/content/FlowInputsQuick.svelte +21 -0
- package/package/components/flows/content/FlowLoop.svelte +5 -6
- package/package/components/flows/content/FlowModuleCache.svelte +1 -3
- package/package/components/flows/content/FlowModuleComponent.svelte +24 -8
- package/package/components/flows/content/FlowModuleMockTransitionMessage.svelte +13 -13
- package/package/components/flows/content/FlowModuleMockTransitionMessage.svelte.d.ts +2 -17
- package/package/components/flows/content/FlowModuleScript.svelte +1 -1
- package/package/components/flows/content/FlowModuleSleep.svelte +1 -1
- package/package/components/flows/content/FlowPathViewer.svelte +7 -5
- package/package/components/flows/content/FlowPathViewer.svelte.d.ts +4 -18
- package/package/components/flows/content/FlowPreprocessorModule.svelte +2 -3
- package/package/components/flows/content/FlowPreprocessorModule.svelte.d.ts +4 -18
- package/package/components/flows/content/FlowResult.svelte +77 -25
- package/package/components/flows/content/FlowRetries.svelte +1 -1
- package/package/components/flows/content/FlowSelectionPanel.svelte +34 -10
- package/package/components/flows/content/FlowSelectionPanel.svelte.d.ts +5 -0
- package/package/components/flows/content/FlowSettings.svelte +70 -25
- package/package/components/flows/content/FlowWhileLoop.svelte +2 -1
- package/package/components/flows/content/GenAiQuick.svelte +6 -6
- package/package/components/flows/content/GenAiQuick.svelte.d.ts +7 -6
- package/package/components/flows/content/ScriptEditorDrawer.svelte +5 -4
- package/package/components/flows/content/SuspendDrawer.svelte +4 -4
- package/package/components/flows/content/SuspendDrawer.svelte.d.ts +4 -18
- package/package/components/flows/flowModuleNextId.d.ts +1 -0
- package/package/components/flows/flowModuleNextId.js +11 -0
- package/package/components/flows/flowState.js +6 -0
- package/package/components/flows/flowStateUtils.svelte.d.ts +1 -1
- package/package/components/flows/flowStateUtils.svelte.js +4 -1
- package/package/components/flows/flowStore.svelte.d.ts +1 -1
- package/package/components/flows/flowStore.svelte.js +4 -2
- package/package/components/flows/header/FlowPreviewButtons.svelte +12 -1
- package/package/components/flows/header/FlowYamlEditor.svelte +6 -2
- package/package/components/flows/map/FlowJobsMenu.svelte +4 -0
- package/package/components/flows/map/FlowJobsMenu.svelte.d.ts +2 -2
- package/package/components/flows/map/FlowModuleSchemaItem.svelte +65 -54
- package/package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +2 -2
- package/package/components/flows/map/FlowModuleSchemaItemViewer.svelte +11 -9
- package/package/components/flows/map/FlowModuleSchemaItemViewer.svelte.d.ts +1 -0
- package/package/components/flows/map/FlowModuleSchemaMap.svelte +163 -23
- package/package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +5 -2
- package/package/components/flows/map/InsertModuleInner.svelte +53 -21
- package/package/components/flows/map/InsertModuleInner.svelte.d.ts +1 -0
- package/package/components/flows/map/MapItem.svelte +22 -9
- package/package/components/flows/map/MapItem.svelte.d.ts +4 -3
- package/package/components/flows/map/VirtualItem.svelte +5 -2
- package/package/components/flows/missingInputWarnings.js +7 -0
- package/package/components/flows/multiSelectUtils.d.ts +26 -0
- package/package/components/flows/multiSelectUtils.js +122 -0
- package/package/components/flows/pickers/FlowScriptPicker.svelte +3 -0
- package/package/components/flows/pickers/FlowScriptPicker.svelte.d.ts +1 -1
- package/package/components/flows/pickers/FlowScriptPickerQuick.svelte +5 -6
- package/package/components/flows/pickers/FlowScriptPickerQuick.svelte.d.ts +9 -8
- package/package/components/flows/pickers/FlowToplevelNode.svelte +2 -3
- package/package/components/flows/pickers/FlowToplevelNode.svelte.d.ts +6 -5
- package/package/components/flows/pickers/PickHubApp.svelte +21 -2
- package/package/components/flows/pickers/PickHubFlow.svelte +21 -2
- package/package/components/flows/pickers/PickHubScript.svelte +12 -1
- package/package/components/flows/pickers/PickHubScriptQuick.svelte +18 -9
- package/package/components/flows/pickers/TopLevelNode.svelte +2 -0
- package/package/components/flows/previousResults.d.ts +1 -1
- package/package/components/flows/propPicker/JobPickerLight.svelte +1 -1
- package/package/components/flows/propPicker/JobPickerLight.svelte.d.ts +4 -18
- package/package/components/flows/propPicker/OutputBadge.svelte +2 -2
- package/package/components/flows/propPicker/OutputBadge.svelte.d.ts +6 -20
- package/package/components/flows/propPicker/OutputPicker.svelte +2 -1
- package/package/components/flows/propPicker/PropPickerWrapper.svelte +6 -12
- package/package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +3 -3
- package/package/components/flows/scheduleUtils.js +2 -2
- package/package/components/flows/types.d.ts +3 -6
- package/package/components/flows/utils.svelte.js +5 -1
- package/package/components/git_sync/GitSyncContext.svelte.js +74 -41
- package/package/components/git_sync/GitSyncModalManager.svelte +1 -1
- package/package/components/git_sync/GitSyncModalManager.svelte.d.ts +2 -17
- package/package/components/git_sync/GitSyncRepositoryCard.svelte +57 -38
- package/package/components/git_sync/GitSyncSection.svelte +24 -27
- package/package/components/graph/DragCoordinator.svelte +63 -0
- package/package/components/graph/DragCoordinator.svelte.d.ts +12 -0
- package/package/components/graph/DragGhost.svelte +138 -0
- package/package/components/graph/DragGhost.svelte.d.ts +10 -0
- package/package/components/graph/FlowGraphV2.svelte +86 -62
- package/package/components/graph/FlowGraphV2.svelte.d.ts +9 -3
- package/package/components/graph/MiniFlowGraph.svelte +82 -0
- package/package/components/graph/MiniFlowGraph.svelte.d.ts +11 -0
- package/package/components/graph/MoveHandleButton.svelte +47 -0
- package/package/components/graph/MoveHandleButton.svelte.d.ts +13 -0
- package/package/components/graph/SelectionBoundingBox.svelte +72 -20
- package/package/components/graph/SelectionBoundingBox.svelte.d.ts +7 -0
- package/package/components/graph/SelectionTool.svelte +3 -2
- package/package/components/graph/compoundLayout.d.ts +28 -0
- package/package/components/graph/compoundLayout.js +436 -0
- package/package/components/graph/graphBuilder.svelte.d.ts +12 -23
- package/package/components/graph/graphBuilder.svelte.js +27 -41
- package/package/components/graph/graphContext.d.ts +2 -0
- package/package/components/graph/model.d.ts +1 -1
- package/package/components/graph/moveManager.svelte.d.ts +74 -0
- package/package/components/graph/moveManager.svelte.js +176 -0
- package/package/components/graph/noteEditor.svelte.d.ts +0 -1
- package/package/components/graph/noteManager.svelte.d.ts +4 -0
- package/package/components/graph/noteManager.svelte.js +6 -0
- package/package/components/graph/noteUtils.svelte.d.ts +0 -1
- package/package/components/graph/noteUtils.svelte.js +0 -2
- package/package/components/graph/renderers/edges/BaseEdge.svelte +65 -24
- package/package/components/graph/renderers/edges/BaseEdge.svelte.d.ts +0 -1
- package/package/components/graph/renderers/edges/HiddenBaseEdge.svelte +1 -1
- package/package/components/graph/renderers/edges/HiddenBaseEdge.svelte.d.ts +4 -18
- package/package/components/graph/renderers/nodes/AIToolNode.svelte +7 -5
- package/package/components/graph/renderers/nodes/AIToolNode.svelte.d.ts +1 -0
- package/package/components/graph/renderers/nodes/AssetNode.svelte +51 -36
- package/package/components/graph/renderers/nodes/AssetNode.svelte.d.ts +1 -0
- package/package/components/graph/renderers/nodes/AssetsOverflowedNode.svelte +18 -14
- package/package/components/graph/renderers/nodes/AssetsOverflowedNode.svelte.d.ts +1 -0
- package/package/components/graph/renderers/nodes/BranchAllEndNode.svelte +1 -1
- package/package/components/graph/renderers/nodes/BranchAllStart.svelte +1 -1
- package/package/components/graph/renderers/nodes/BranchOneStart.svelte +1 -1
- package/package/components/graph/renderers/nodes/ForLoopEndNode.svelte +1 -1
- package/package/components/graph/renderers/nodes/ForLoopStartNode.svelte +1 -1
- package/package/components/graph/renderers/nodes/ModuleNode.svelte +50 -9
- package/package/components/graph/renderers/nodes/NewAIToolNode.svelte +13 -0
- package/package/components/graph/renderers/nodes/NoBranchNode.svelte +2 -2
- package/package/components/graph/renderers/nodes/NoBranchNode.svelte.d.ts +1 -0
- package/package/components/graph/renderers/nodes/NodeWrapper.svelte +21 -7
- package/package/components/graph/renderers/nodes/NodeWrapper.svelte.d.ts +4 -1
- package/package/components/graph/renderers/nodes/NoteNode.svelte +2 -2
- package/package/components/graph/renderers/nodes/SubflowBound.svelte +1 -1
- package/package/components/graph/renderers/nodes/branchOneEndNode.svelte +1 -1
- package/package/components/graph/renderers/triggers/TriggerButton.svelte +6 -4
- package/package/components/graph/renderers/triggers/TriggerButton.svelte.d.ts +5 -29
- package/package/components/graph/renderers/triggers/TriggerCount.svelte +1 -1
- package/package/components/graph/renderers/triggers/TriggerCount.svelte.d.ts +4 -18
- package/package/components/graph/renderers/triggers/TriggersBadge.svelte +7 -8
- package/package/components/graph/selectionUtils.svelte.d.ts +1 -0
- package/package/components/graph/selectionUtils.svelte.js +11 -1
- package/package/components/graph/util.d.ts +1 -4
- package/package/components/graph/util.js +3 -6
- package/package/components/graph/wacToFlow.d.ts +4 -0
- package/package/components/graph/wacToFlow.js +14 -0
- package/package/components/home/FlowIcon.svelte +2 -2
- package/package/components/home/FlowIcon.svelte.d.ts +5 -19
- package/package/components/home/Item.svelte +9 -15
- package/package/components/home/Item.svelte.d.ts +8 -7
- package/package/components/home/ItemsList.svelte +7 -13
- package/package/components/home/ItemsList.svelte.d.ts +1 -0
- package/package/components/home/ListFiltersQuick.svelte +2 -4
- package/package/components/home/ListFiltersQuick.svelte.d.ts +10 -9
- package/package/components/icons/AssetGenericIcon.svelte +3 -1
- package/package/components/icons/ClaudeIcon.svelte +20 -0
- package/package/components/icons/ClaudeIcon.svelte.d.ts +7 -0
- package/package/components/icons/GoogleCalendarIcon.svelte +41 -0
- package/package/components/icons/GoogleCalendarIcon.svelte.d.ts +7 -0
- package/package/components/icons/GoogleDriveIcon.svelte +30 -0
- package/package/components/icons/GoogleDriveIcon.svelte.d.ts +7 -0
- package/package/components/icons/GoogleIcon.svelte +15 -6
- package/package/components/icons/GoogleIcon.svelte.d.ts +5 -2
- package/package/components/icons/MSSqlServerIcon.svelte +111 -47
- package/package/components/icons/RubyIcon.svelte +2 -2
- package/package/components/icons/WindmillIcon2.svelte +0 -1
- package/package/components/instanceSettings/IndexerJobIndexSettings.svelte +94 -0
- package/package/components/instanceSettings/IndexerJobIndexSettings.svelte.d.ts +9 -0
- package/package/components/instanceSettings/IndexerLogIndexSettings.svelte +67 -0
- package/package/components/instanceSettings/IndexerLogIndexSettings.svelte.d.ts +9 -0
- package/package/components/instanceSettings/IndexerMemorySettings.svelte +242 -0
- package/package/components/instanceSettings/IndexerMemorySettings.svelte.d.ts +9 -0
- package/package/components/instanceSettings/SecretBackendConfig.svelte +15 -16
- package/package/components/instanceSettings/SettingCard.svelte +47 -0
- package/package/components/instanceSettings/SettingCard.svelte.d.ts +19 -0
- package/package/components/instanceSettings/SettingsSearchInput.svelte +66 -0
- package/package/components/instanceSettings/SettingsSearchInput.svelte.d.ts +9 -0
- package/package/components/instanceSettings.d.ts +52 -0
- package/package/components/instanceSettings.js +446 -64
- package/package/components/meltComponents/MeltButton.svelte +5 -10
- package/package/components/meltComponents/MeltButton.svelte.d.ts +12 -35
- package/package/components/meltComponents/Menu.svelte +6 -6
- package/package/components/meltComponents/Menu.svelte.d.ts +2 -2
- package/package/components/meltComponents/MenuItem.svelte +1 -0
- package/package/components/meltComponents/Menubar.svelte +3 -2
- package/package/components/meltComponents/Menubar.svelte.d.ts +7 -0
- package/package/components/meltComponents/Popover.svelte +50 -65
- package/package/components/meltComponents/Popover.svelte.d.ts +40 -42
- package/package/components/meltComponents/SideBarTab.svelte +3 -2
- package/package/components/meltComponents/Tooltip.svelte +15 -20
- package/package/components/meltComponents/Tooltip.svelte.d.ts +16 -38
- package/package/components/moveRenameManager.d.ts +21 -0
- package/package/components/moveRenameManager.js +61 -0
- package/package/components/progressBar/ProgressBar.svelte +69 -27
- package/package/components/progressBar/ProgressBar.svelte.d.ts +7 -0
- package/package/components/prop_picker.d.ts +0 -3
- package/package/components/propertyPicker/ObjectViewer.svelte +253 -165
- package/package/components/propertyPicker/ObjectViewerWrapper.svelte +16 -27
- package/package/components/propertyPicker/ObjectViewerWrapper.svelte.d.ts +16 -15
- package/package/components/propertyPicker/PropPicker.svelte +49 -96
- package/package/components/propertyPicker/PropPicker.svelte.d.ts +11 -11
- package/package/components/propertyPicker/PropPickerResult.svelte +1 -5
- package/package/components/propertyPicker/PropPickerResult.svelte.d.ts +9 -8
- package/package/components/raw_apps/DefaultDatabaseSelector.svelte +40 -36
- package/package/components/raw_apps/FileTreeNode.svelte +3 -2
- package/package/components/raw_apps/RawAppBackgroundRunner.svelte +3 -2
- package/package/components/raw_apps/RawAppEditor.svelte +20 -16
- package/package/components/raw_apps/RawAppEditor.svelte.d.ts +4 -4
- package/package/components/raw_apps/RawAppEditorHeader.svelte +87 -8
- package/package/components/raw_apps/RawAppEditorHeader.svelte.d.ts +1 -1
- package/package/components/raw_apps/RawAppInlineScriptEditor.svelte.d.ts +1 -2
- package/package/components/raw_apps/RawAppInlineScriptPanelList.svelte +41 -1
- package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte +0 -1
- package/package/components/raw_apps/RawAppInlineScriptsPanel.svelte.d.ts +0 -1
- package/package/components/raw_apps/RawAppInputsSpecEditor.svelte +4 -4
- package/package/components/raw_apps/RawAppInputsSpecEditor.svelte.d.ts +0 -1
- package/package/components/raw_apps/RawAppSidebar.svelte +32 -284
- package/package/components/raw_apps/RawAppSidebar.svelte.d.ts +1 -1
- package/package/components/raw_apps/RunnableRow.svelte +88 -34
- package/package/components/raw_apps/RunnableRow.svelte.d.ts +4 -0
- package/package/components/raw_apps/fileTreeUtils.js +2 -3
- package/package/components/raw_apps/utils.js +6 -1
- package/package/components/recording/FlowRecordingReplay.svelte +210 -0
- package/package/components/recording/FlowRecordingReplay.svelte.d.ts +7 -0
- package/package/components/recording/ScriptRecordingReplay.svelte +210 -0
- package/package/components/recording/ScriptRecordingReplay.svelte.d.ts +7 -0
- package/package/components/recording/flowRecording.svelte.d.ts +22 -0
- package/package/components/recording/flowRecording.svelte.js +205 -0
- package/package/components/recording/scriptRecording.svelte.d.ts +9 -0
- package/package/components/recording/scriptRecording.svelte.js +88 -0
- package/package/components/recording/types.d.ts +39 -0
- package/package/components/recording/types.js +1 -0
- package/package/components/resources/resourcesFilter.d.ts +74 -0
- package/package/components/resources/resourcesFilter.js +65 -0
- package/package/components/runs/BatchReRunOptionsPane.svelte +130 -121
- package/package/components/runs/BatchReRunOptionsPane.svelte.d.ts +3 -2
- package/package/components/runs/FlowExecutionStatus.svelte +30 -0
- package/package/components/runs/FlowExecutionStatus.svelte.d.ts +15 -0
- package/package/components/runs/JobDetailFieldConfig.d.ts +47 -0
- package/package/components/runs/JobDetailFieldConfig.js +433 -0
- package/package/components/runs/JobDetailHeader.svelte +551 -0
- package/package/components/runs/JobDetailHeader.svelte.d.ts +17 -0
- package/package/components/runs/JobRunsPreview.svelte +182 -219
- package/package/components/runs/JobRunsPreview.svelte.d.ts +0 -1
- package/package/components/runs/JobStatusIcon.svelte +47 -0
- package/package/components/runs/JobStatusIcon.svelte.d.ts +9 -0
- package/package/components/runs/MobileFilters.svelte +15 -10
- package/package/components/runs/MobileFilters.svelte.d.ts +4 -18
- package/package/components/runs/PreprocessedArgsDisplay.svelte +2 -10
- package/package/components/runs/PreprocessedArgsDisplay.svelte.d.ts +4 -18
- package/package/components/runs/QueuePopover.svelte +2 -2
- package/package/components/runs/QueuePopover.svelte.d.ts +4 -18
- package/package/components/runs/RunBadges.svelte +40 -35
- package/package/components/runs/RunBadges.svelte.d.ts +2 -1
- package/package/components/runs/RunRow.svelte +24 -64
- package/package/components/runs/RunRow.svelte.d.ts +1 -2
- package/package/components/runs/RunsTable.svelte +317 -131
- package/package/components/runs/RunsTable.svelte.d.ts +5 -3
- package/package/components/runs/TimeframeSelect.svelte +189 -0
- package/package/components/runs/TimeframeSelect.svelte.d.ts +44 -0
- package/package/components/runs/runsFilter.d.ts +217 -0
- package/package/components/runs/runsFilter.js +198 -0
- package/package/components/runs/useJobsLoader.svelte.d.ts +13 -8
- package/package/components/runs/useJobsLoader.svelte.js +214 -75
- package/package/components/schedules/schedulesFilter.d.ts +69 -0
- package/package/components/schedules/schedulesFilter.js +64 -0
- package/package/components/schema/AddProperty.svelte +1 -1
- package/package/components/schema/AddProperty.svelte.d.ts +5 -6
- package/package/components/schema/AddPropertyForm.svelte +1 -1
- package/package/components/schema/AddPropertyForm.svelte.d.ts +1 -1
- package/package/components/schema/EditableSchemaSdkWrapper.svelte +3 -2
- package/package/components/schema/EditableSchemaWrapper.svelte +43 -22
- package/package/components/schema/EditableSchemaWrapper.svelte.d.ts +1 -1
- package/package/components/schema/FlowPropertyEditor.svelte +1 -5
- package/package/components/schema/FlowPropertyEditor.svelte.d.ts +1 -1
- package/package/components/schema/PropertyEditor.svelte +1 -0
- package/package/components/schema/RunningJobSchemaPicker.svelte +32 -31
- package/package/components/schema/RunningJobSchemaPicker.svelte.d.ts +8 -7
- package/package/components/schema/SchemaPickerRow.svelte +3 -3
- package/package/components/schema/editable_schema_wrapper.d.ts +1 -0
- package/package/components/scriptEditor/LogPanel.svelte +11 -2
- package/package/components/script_builder.d.ts +1 -1
- package/package/components/scripts/CreateActionsScript.svelte +0 -1
- package/package/components/search/GlobalSearchModal.svelte +1 -8
- package/package/components/search/QuickMenuItem.svelte +2 -2
- package/package/components/search/RunsSearch.svelte +5 -1
- package/package/components/select/GenericDropdown.svelte +116 -0
- package/package/components/select/GenericDropdown.svelte.d.ts +37 -0
- package/package/components/select/MultiSelect.svelte +1 -0
- package/package/components/select/Select.svelte +18 -4
- package/package/components/select/Select.svelte.d.ts +2 -1
- package/package/components/select/SelectDropdown.svelte +77 -156
- package/package/components/select/SelectDropdown.svelte.d.ts +4 -1
- package/package/components/settings/ChangeWorkspaceColor.svelte +7 -8
- package/package/components/settings/ChangeWorkspaceId.svelte +18 -15
- package/package/components/settings/ChangeWorkspaceId.svelte.d.ts +4 -18
- package/package/components/settings/ChangeWorkspaceName.svelte +6 -8
- package/package/components/settings/CreateToken.svelte +8 -20
- package/package/components/settings/PremiumInfo.svelte +302 -158
- package/package/components/settings/PremiumInfo.svelte.d.ts +4 -18
- package/package/components/settings/SettingsPageHeader.svelte +22 -0
- package/package/components/settings/SettingsPageHeader.svelte.d.ts +10 -0
- package/package/components/settings/TokensTable.svelte +74 -14
- package/package/components/settings/WorkspaceUserSettings.svelte +13 -24
- package/package/components/sidebar/CriticalAlertModal.svelte +33 -30
- package/package/components/sidebar/CriticalAlertModal.svelte.d.ts +4 -18
- package/package/components/sidebar/CriticalAlertModalInner.svelte +28 -22
- package/package/components/sidebar/CriticalAlertModalInner.svelte.d.ts +5 -20
- package/package/components/sidebar/CriticalAlertTable.svelte +4 -13
- package/package/components/sidebar/CriticalAlertTable.svelte.d.ts +4 -18
- package/package/components/sidebar/DarkModeToggle.svelte +4 -5
- package/package/components/sidebar/DarkModeToggle.svelte.d.ts +5 -20
- package/package/components/sidebar/FavoriteMenu.svelte +101 -20
- package/package/components/sidebar/FavoriteMenu.svelte.d.ts +29 -1
- package/package/components/sidebar/MenuButton.svelte +12 -9
- package/package/components/sidebar/MenuButton.svelte.d.ts +2 -0
- package/package/components/sidebar/MenuLink.svelte +4 -3
- package/package/components/sidebar/MultiplayerMenu.svelte +12 -7
- package/package/components/sidebar/MultiplayerMenu.svelte.d.ts +2 -17
- package/package/components/sidebar/OperatorMenu.svelte +3 -1
- package/package/components/sidebar/OperatorMenu.svelte.d.ts +6 -1
- package/package/components/sidebar/SideBarNotification.svelte +1 -2
- package/package/components/sidebar/SideBarNotification.svelte.d.ts +4 -18
- package/package/components/sidebar/SidebarContent.svelte +6 -6
- package/package/components/sidebar/WorkspaceMenu.svelte +7 -6
- package/package/components/splitPanes/AnimatedPane.svelte +2 -2
- package/package/components/splitPanes/SplitPanesWrapper.svelte +11 -15
- package/package/components/splitPanes/SplitPanesWrapper.svelte.d.ts +12 -28
- package/package/components/sqlTypeService.d.ts +2 -2
- package/package/components/sqlTypeService.js +4 -8
- package/package/components/table/AutoDataTable.svelte +2 -2
- package/package/components/table/Cell.svelte +2 -2
- package/package/components/table/DataTable.svelte +1 -1
- package/package/components/table/DownloadCsv.svelte +1 -2
- package/package/components/table/DownloadCsv.svelte.d.ts +4 -18
- package/package/components/table/Head.svelte +6 -2
- package/package/components/table/Head.svelte.d.ts +6 -27
- package/package/components/table/Row.svelte +6 -10
- package/package/components/table/Row.svelte.d.ts +11 -18
- package/package/components/toast.js +1 -2
- package/package/components/triggers/AddTriggersButton.svelte +11 -0
- package/package/components/triggers/CaptureIcon.svelte +1 -2
- package/package/components/triggers/CaptureIcon.svelte.d.ts +5 -19
- package/package/components/triggers/TestTriggerConnection.svelte +1 -4
- package/package/components/triggers/TestTriggerConnection.svelte.d.ts +6 -21
- package/package/components/triggers/TriggerAdvancedBadges.svelte +16 -0
- package/package/components/triggers/TriggerAdvancedBadges.svelte.d.ts +12 -0
- package/package/components/triggers/TriggerEditorToolbar.svelte +11 -9
- package/package/components/triggers/TriggerFilters.svelte +71 -0
- package/package/components/triggers/TriggerFilters.svelte.d.ts +10 -0
- package/package/components/triggers/TriggerTokens.svelte +8 -7
- package/package/components/triggers/TriggerTokens.svelte.d.ts +6 -21
- package/package/components/triggers/TriggersEditor.svelte +31 -11
- package/package/components/triggers/TriggersWrapper.svelte +10 -0
- package/package/components/triggers/email/EmailTriggerEditorConfigSection.svelte +1 -1
- package/package/components/triggers/email/EmailTriggerEditorInner.svelte +7 -2
- package/package/components/triggers/gcp/GcpTriggerEditorInner.svelte +9 -2
- package/package/components/triggers/http/RouteCapture.svelte +1 -1
- package/package/components/triggers/http/RouteEditorConfigSection.svelte +1 -1
- package/package/components/triggers/http/RouteEditorInner.svelte +11 -2
- package/package/components/triggers/kafka/KafkaTriggerEditorInner.svelte +124 -3
- package/package/components/triggers/kafka/KafkaTriggersConfigSection.svelte +1 -0
- package/package/components/triggers/kafka/utils.js +3 -0
- package/package/components/triggers/mqtt/MqttTriggerEditorInner.svelte +12 -3
- package/package/components/triggers/native/NativeTriggerEditor.svelte +22 -17
- package/package/components/triggers/native/NativeTriggerTable.svelte +16 -0
- package/package/components/triggers/native/services/google/GoogleCalendarPicker.svelte +112 -0
- package/package/components/triggers/native/services/google/GoogleCalendarPicker.svelte.d.ts +8 -0
- package/package/components/triggers/native/services/google/GoogleDrivePicker.svelte +323 -0
- package/package/components/triggers/native/services/google/GoogleDrivePicker.svelte.d.ts +8 -0
- package/package/components/triggers/native/services/google/GoogleTriggerForm.svelte +116 -0
- package/package/components/triggers/native/services/google/GoogleTriggerForm.svelte.d.ts +12 -0
- package/package/components/triggers/native/utils.d.ts +0 -1
- package/package/components/triggers/native/utils.js +15 -1
- package/package/components/triggers/nats/NatsTriggerEditorInner.svelte +7 -2
- package/package/components/triggers/postgres/CheckPostgresRequirement.svelte +2 -4
- package/package/components/triggers/postgres/CheckPostgresRequirement.svelte.d.ts +4 -18
- package/package/components/triggers/postgres/PostgresTriggerEditorInner.svelte +10 -4
- package/package/components/triggers/postgres/PublicationPicker.svelte +9 -12
- package/package/components/triggers/postgres/PublicationPicker.svelte.d.ts +4 -18
- package/package/components/triggers/postgres/SlotPicker.svelte +4 -7
- package/package/components/triggers/postgres/SlotPicker.svelte.d.ts +4 -18
- package/package/components/triggers/schedules/ScheduleEditorInner.svelte +13 -3
- package/package/components/triggers/sqs/SqsTriggerEditorInner.svelte +6 -1
- package/package/components/triggers/testingBadge.svelte +3 -1
- package/package/components/triggers/triggers.svelte.d.ts +1 -1
- package/package/components/triggers/triggers.svelte.js +11 -3
- package/package/components/triggers/utils.js +33 -6
- package/package/components/triggers/webhook/WebhooksConfigSection.svelte +1 -1
- package/package/components/triggers/websocket/WebsocketCapture.svelte +15 -13
- package/package/components/triggers/websocket/WebsocketEditorConfigSection.svelte +1 -1
- package/package/components/triggers/websocket/WebsocketTriggerEditorInner.svelte +12 -84
- package/package/components/triggers.d.ts +1 -1
- package/package/components/tutorials/Tutorial.svelte +2 -6
- package/package/components/tutorials/Tutorial.svelte.d.ts +14 -23
- package/package/components/tutorials/TutorialControls.svelte +1 -2
- package/package/components/tutorials/TutorialControls.svelte.d.ts +6 -5
- package/package/components/tutorials/TutorialWrapper.svelte +3 -2
- package/package/components/tutorials/app/BackgroundRunnablesTutorial.svelte +2 -3
- package/package/components/tutorials/app/BackgroundRunnablesTutorial.svelte.d.ts +6 -6
- package/package/components/tutorials/app/ConnectionTutorial.svelte +2 -3
- package/package/components/tutorials/app/ConnectionTutorial.svelte.d.ts +6 -6
- package/package/components/tutorials/app/ExpressionEvaluationTutorial.svelte +2 -3
- package/package/components/tutorials/app/ExpressionEvaluationTutorial.svelte.d.ts +6 -6
- package/package/components/tutorials/workspace/WorkspaceOnboardingOperatorTutorial.svelte +3 -3
- package/package/components/tutorials/workspace/WorkspaceOnboardingTutorial.svelte +3 -3
- package/package/components/variables/variablesFilter.d.ts +60 -0
- package/package/components/variables/variablesFilter.js +55 -0
- package/package/components/waitJob.d.ts +1 -1
- package/package/components/waitJob.js +3 -2
- package/package/components/wizards/AppPicker.svelte +3 -3
- package/package/components/wizards/AppPicker.svelte.d.ts +4 -18
- package/package/components/wizards/DBExplorerWizard.svelte +1 -0
- package/package/components/worker_group.d.ts +2 -0
- package/package/components/worker_group.js +15 -0
- package/package/components/workspace/WorkspaceCard.svelte +3 -2
- package/package/components/workspaceSettings/AISettings.svelte +36 -42
- package/package/components/workspaceSettings/AISettings.svelte.d.ts +2 -0
- package/package/components/workspaceSettings/CreateWorkspace.svelte +7 -7
- package/package/components/workspaceSettings/CustomInstanceDbSelect.svelte +1 -3
- package/package/components/workspaceSettings/CustomInstanceDbSelect.svelte.d.ts +0 -2
- package/package/components/workspaceSettings/CustomInstanceDbWizardModal.svelte +3 -3
- package/package/components/workspaceSettings/CustomInstanceDbWizardModal.svelte.d.ts +0 -2
- package/package/components/workspaceSettings/DataTableSettings.svelte +31 -25
- package/package/components/workspaceSettings/DataTableSettings.svelte.d.ts +1 -0
- package/package/components/workspaceSettings/DucklakeSettings.svelte +140 -170
- package/package/components/workspaceSettings/DucklakeSettings.svelte.d.ts +1 -0
- package/package/components/workspaceSettings/GitSyncFilterSettings.svelte +36 -68
- package/package/components/workspaceSettings/ModelTokenLimits.svelte +6 -10
- package/package/components/workspaceSettings/OAuthClientConfig.svelte +46 -75
- package/package/components/workspaceSettings/OAuthClientConfig.svelte.d.ts +8 -1
- package/package/components/workspaceSettings/RulesetEditor.svelte +292 -0
- package/package/components/workspaceSettings/RulesetEditor.svelte.d.ts +9 -0
- package/package/components/workspaceSettings/SettingsFooter.svelte +35 -0
- package/package/components/workspaceSettings/SettingsFooter.svelte.d.ts +12 -0
- package/package/components/workspaceSettings/StorageSettings.svelte +115 -48
- package/package/components/workspaceSettings/StorageSettings.svelte.d.ts +1 -0
- package/package/components/workspaceSettings/WorkspaceDependenciesSettings.svelte +66 -27
- package/package/components/workspaceSettings/WorkspaceIntegrations.svelte +244 -79
- package/package/components/workspaceSettings/WorkspaceRulesets.svelte +183 -0
- package/package/components/workspaceSettings/WorkspaceRulesets.svelte.d.ts +3 -0
- package/package/editorLangUtils.d.ts +1 -1
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +1253 -79
- package/package/gen/schemas.gen.js +1608 -386
- package/package/gen/services.gen.d.ts +320 -98
- package/package/gen/services.gen.js +597 -147
- package/package/gen/types.gen.d.ts +2706 -476
- package/package/hub.d.ts +1 -1
- package/package/hub.js +7 -0
- package/package/hubPaths.json +26 -23
- package/package/infer.d.ts +2 -0
- package/package/infer.js +64 -14
- package/package/infer.svelte.js +88 -42
- package/package/mcpEndpointTools.d.ts +3 -0
- package/package/mcpEndpointTools.js +574 -147
- package/package/rawAppWmillTs.js +12 -11
- package/package/script_helpers.d.ts +8 -5
- package/package/script_helpers.js +64 -21
- package/package/scripts.d.ts +1 -1
- package/package/scripts.js +1 -1
- package/package/storeUtils.js +8 -0
- package/package/stores.d.ts +3 -1
- package/package/stores.js +3 -2
- package/package/svelte5Utils.svelte.js +164 -0
- package/package/svelte5UtilsKit.svelte.d.ts +13 -3
- package/package/svelte5UtilsKit.svelte.js +97 -20
- package/package/system_prompts/prompts.d.ts +20 -20
- package/package/system_prompts/prompts.js +943 -596
- package/package/templates/claude_sandbox.ts.template +85 -0
- package/package/toast.d.ts +5 -1
- package/package/toast.js +14 -5
- package/package/utils/editInFork.d.ts +3 -0
- package/package/utils/editInFork.js +19 -0
- package/package/utils.js +216 -9
- package/package/utils_deployable.d.ts +258 -34
- package/package/utils_deployable.js +66 -11
- package/package/utils_workspace_deploy.d.ts +31 -0
- package/package/utils_workspace_deploy.js +449 -0
- package/package/validators/workspaceSettings.d.ts +12 -0
- package/package/validators/workspaceSettings.js +72 -0
- package/package/workspaceProtectionRules.svelte.d.ts +73 -0
- package/package/workspaceProtectionRules.svelte.js +176 -0
- package/package/workspace_settings.d.ts +2 -1
- package/package/workspace_settings.js +28 -0
- package/package.json +38 -16
- package/package/components/DropdownSelect.svelte +0 -26
- package/package/components/DropdownSelect.svelte.d.ts +0 -11
- package/package/components/FlowPreviewResult.svelte +0 -84
- package/package/components/FlowPreviewResult.svelte.d.ts +0 -20
- package/package/components/copilot/chat/context.d.ts +0 -119
- package/package/components/flows/propPicker/FlowPropPicker.svelte +0 -72
- package/package/components/flows/propPicker/FlowPropPicker.svelte.d.ts +0 -23
- package/package/components/runs/ManuelDatePicker.svelte +0 -96
- package/package/components/runs/ManuelDatePicker.svelte.d.ts +0 -35
- package/package/components/runs/RunsBatchActionsDropdown.svelte +0 -82
- package/package/components/runs/RunsBatchActionsDropdown.svelte.d.ts +0 -15
- package/package/components/runs/RunsFilter.svelte +0 -966
- package/package/components/runs/RunsFilter.svelte.d.ts +0 -80
- package/package/svelte5Utils.svelte.d.ts +0 -138
|
@@ -29,6 +29,18 @@ The preprocessor receives a single parameter called \`event\`.
|
|
|
29
29
|
`;
|
|
30
30
|
export const FLOW_BASE = `# Windmill Flow Building Guide
|
|
31
31
|
|
|
32
|
+
## CLI Commands
|
|
33
|
+
|
|
34
|
+
Create a folder ending with \`.flow\` and add a YAML file with the flow definition.
|
|
35
|
+
For rawscript modules, use \`!inline path/to/script.ts\` for the content key.
|
|
36
|
+
After writing, tell the user they can run:
|
|
37
|
+
- \`wmill flow generate-locks <path_to_flow_folder> --yes\` - Generate lock files for the specific flow you modified (e.g. \`wmill flow generate-locks f/my_folder/my_flow.flow --yes\`)
|
|
38
|
+
- \`wmill sync push\` - Deploy to Windmill
|
|
39
|
+
|
|
40
|
+
Do NOT run these commands yourself. Instead, inform the user that they should run them.
|
|
41
|
+
|
|
42
|
+
## OpenFlow Schema
|
|
43
|
+
|
|
32
44
|
The OpenFlow schema (openflow.openapi.yaml) is the source of truth for flow structure. Refer to OPENFLOW_SCHEMA for the complete type definitions.
|
|
33
45
|
|
|
34
46
|
## Reserved Module IDs
|
|
@@ -232,13 +244,6 @@ async getResult(jobId: string): Promise<any>
|
|
|
232
244
|
*/
|
|
233
245
|
async getResultMaybe(jobId: string): Promise<any>
|
|
234
246
|
|
|
235
|
-
/**
|
|
236
|
-
* Wrap a function to execute as a Windmill task within a flow context
|
|
237
|
-
* @param f - Function to wrap as a task
|
|
238
|
-
* @returns Async wrapper function that executes as a Windmill job
|
|
239
|
-
*/
|
|
240
|
-
task<P, T>(f: (_: P) => T): (_: P) => Promise<T>
|
|
241
|
-
|
|
242
247
|
/**
|
|
243
248
|
* @deprecated Use runScriptByPathAsync or runScriptByHashAsync instead
|
|
244
249
|
*/
|
|
@@ -303,8 +308,9 @@ async setInternalState(state: any): Promise<void>
|
|
|
303
308
|
/**
|
|
304
309
|
* Set the state
|
|
305
310
|
* @param state state to set
|
|
311
|
+
* @param path Optional state resource path override. Defaults to \`getStatePath()\`.
|
|
306
312
|
*/
|
|
307
|
-
async setState(state: any): Promise<void>
|
|
313
|
+
async setState(state: any, path?: string): Promise<void>
|
|
308
314
|
|
|
309
315
|
/**
|
|
310
316
|
* Set the progress
|
|
@@ -342,8 +348,9 @@ async getInternalState(): Promise<any>
|
|
|
342
348
|
|
|
343
349
|
/**
|
|
344
350
|
* Get the state shared across executions
|
|
351
|
+
* @param path Optional state resource path override. Defaults to \`getStatePath()\`.
|
|
345
352
|
*/
|
|
346
|
-
async getState(): Promise<any>
|
|
353
|
+
async getState(path?: string): Promise<any>
|
|
347
354
|
|
|
348
355
|
/**
|
|
349
356
|
* Get a variable by path
|
|
@@ -368,6 +375,10 @@ async setVariable(path: string, value: string, isSecretIfNotExist?: boolean, des
|
|
|
368
375
|
*/
|
|
369
376
|
async databaseUrlFromResource(path: string): Promise<string>
|
|
370
377
|
|
|
378
|
+
async polarsConnectionSettings(s3_resource_path: string | undefined): Promise<any>
|
|
379
|
+
|
|
380
|
+
async duckdbConnectionSettings(s3_resource_path: string | undefined): Promise<any>
|
|
381
|
+
|
|
371
382
|
/**
|
|
372
383
|
* Get S3 client settings from a resource or workspace default
|
|
373
384
|
* @param s3_resource_path - Path to S3 resource (uses workspace default if undefined)
|
|
@@ -441,9 +452,11 @@ async getPresignedS3PublicUrl(s3Objects: S3Object, { baseUrl }: { baseUrl?: stri
|
|
|
441
452
|
/**
|
|
442
453
|
* Get URLs needed for resuming a flow after this step
|
|
443
454
|
* @param approver approver name
|
|
455
|
+
* @param flowLevel if true, generate resume URLs for the parent flow instead of the specific step.
|
|
456
|
+
* This allows pre-approvals that can be consumed by any later suspend step in the same flow.
|
|
444
457
|
* @returns approval page UI URL, resume and cancel API URLs for resuming the flow
|
|
445
458
|
*/
|
|
446
|
-
async getResumeUrls(approver?: string): Promise<{
|
|
459
|
+
async getResumeUrls(approver?: string, flowLevel?: boolean): Promise<{
|
|
447
460
|
approvalPage: string;
|
|
448
461
|
resume: string;
|
|
449
462
|
cancel: string;
|
|
@@ -502,6 +515,8 @@ async usernameToEmail(username: string): Promise<string>
|
|
|
502
515
|
* @param {string} [options.approver] - Optional user ID or name of the approver for the request.
|
|
503
516
|
* @param {DefaultArgs} [options.defaultArgsJson] - Optional object defining or overriding the default arguments to a form field.
|
|
504
517
|
* @param {Enums} [options.dynamicEnumsJson] - Optional object overriding the enum default values of an enum form field.
|
|
518
|
+
* @param {string} [options.resumeButtonText] - Optional text for the resume button.
|
|
519
|
+
* @param {string} [options.cancelButtonText] - Optional text for the cancel button.
|
|
505
520
|
*
|
|
506
521
|
* @returns {Promise<void>} Resolves when the Slack approval request is successfully sent.
|
|
507
522
|
*
|
|
@@ -517,12 +532,14 @@ async usernameToEmail(username: string): Promise<string>
|
|
|
517
532
|
* approver: "approver123",
|
|
518
533
|
* defaultArgsJson: { key1: "value1", key2: 42 },
|
|
519
534
|
* dynamicEnumsJson: { foo: ["choice1", "choice2"], bar: ["optionA", "optionB"] },
|
|
535
|
+
* resumeButtonText: "Resume",
|
|
536
|
+
* cancelButtonText: "Cancel",
|
|
520
537
|
* });
|
|
521
538
|
* \`\`\`
|
|
522
539
|
*
|
|
523
540
|
* **Note:** This function requires execution within a Windmill flow or flow preview.
|
|
524
541
|
*/
|
|
525
|
-
async requestInteractiveSlackApproval({ slackResourcePath, channelId, message, approver, defaultArgsJson, dynamicEnumsJson, }: SlackApprovalOptions): Promise<void>
|
|
542
|
+
async requestInteractiveSlackApproval({ slackResourcePath, channelId, message, approver, defaultArgsJson, dynamicEnumsJson, resumeButtonText, cancelButtonText, }: SlackApprovalOptions): Promise<void>
|
|
526
543
|
|
|
527
544
|
/**
|
|
528
545
|
* Sends an interactive approval request via Teams, allowing optional customization of the message, approver, and form fields.
|
|
@@ -566,6 +583,75 @@ async requestInteractiveTeamsApproval({ teamName, channelName, message, approver
|
|
|
566
583
|
*/
|
|
567
584
|
parseS3Object(s3Object: S3Object): S3ObjectRecord
|
|
568
585
|
|
|
586
|
+
setWorkflowCtx(ctx: WorkflowCtx | null): void
|
|
587
|
+
|
|
588
|
+
async sleep(seconds: number): Promise<void>
|
|
589
|
+
|
|
590
|
+
async step<T>(name: string, fn: () => T | Promise<T>): Promise<T>
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Create a task that dispatches to a separate Windmill script.
|
|
594
|
+
*
|
|
595
|
+
* @example
|
|
596
|
+
* const extract = taskScript("f/data/extract");
|
|
597
|
+
* // inside workflow: await extract({ url: "https://..." })
|
|
598
|
+
*/
|
|
599
|
+
taskScript(path: string, options?: TaskOptions): (...args: any[]) => PromiseLike<any>
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Create a task that dispatches to a separate Windmill flow.
|
|
603
|
+
*
|
|
604
|
+
* @example
|
|
605
|
+
* const pipeline = taskFlow("f/etl/pipeline");
|
|
606
|
+
* // inside workflow: await pipeline({ input: data })
|
|
607
|
+
*/
|
|
608
|
+
taskFlow(path: string, options?: TaskOptions): (...args: any[]) => PromiseLike<any>
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Mark an async function as a workflow-as-code entry point.
|
|
612
|
+
*
|
|
613
|
+
* The function must be **deterministic**: given the same inputs it must call
|
|
614
|
+
* tasks in the same order on every replay. Branching on task results is fine
|
|
615
|
+
* (results are replayed from checkpoint), but branching on external state
|
|
616
|
+
* (current time, random values, external API calls) must use \`step()\` to
|
|
617
|
+
* checkpoint the value so replays see the same result.
|
|
618
|
+
*/
|
|
619
|
+
workflow<T>(fn: (...args: any[]) => Promise<T>): void
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Suspend the workflow and wait for an external approval.
|
|
623
|
+
*
|
|
624
|
+
* Use \`getResumeUrls()\` (wrapped in \`step()\`) to obtain resume/cancel/approvalPage
|
|
625
|
+
* URLs before calling this function.
|
|
626
|
+
*
|
|
627
|
+
* @example
|
|
628
|
+
* const urls = await step("urls", () => getResumeUrls());
|
|
629
|
+
* await step("notify", () => sendEmail(urls.approvalPage));
|
|
630
|
+
* const { value, approver } = await waitForApproval({ timeout: 3600 });
|
|
631
|
+
*/
|
|
632
|
+
waitForApproval(options?: { timeout?: number; form?: object; }): PromiseLike<{ value: any; approver: string; approved: boolean }>
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Process items in parallel with optional concurrency control.
|
|
636
|
+
*
|
|
637
|
+
* Each item is processed by calling \`fn(item)\`, which should be a task().
|
|
638
|
+
* Items are dispatched in batches of \`concurrency\` (default: all at once).
|
|
639
|
+
*
|
|
640
|
+
* @example
|
|
641
|
+
* const process = task(async (item: string) => { ... });
|
|
642
|
+
* const results = await parallel(items, process, { concurrency: 5 });
|
|
643
|
+
*/
|
|
644
|
+
async parallel<T, R>(items: T[], fn: (item: T) => PromiseLike<R> | R, options?: { concurrency?: number },): Promise<R[]>
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Commit Kafka offsets for a trigger with auto_commit disabled.
|
|
648
|
+
* @param triggerPath - Path to the Kafka trigger (from event.wm_trigger.trigger_path)
|
|
649
|
+
* @param topic - Kafka topic name (from event.topic)
|
|
650
|
+
* @param partition - Partition number (from event.partition)
|
|
651
|
+
* @param offset - Message offset to commit (from event.offset)
|
|
652
|
+
*/
|
|
653
|
+
async commitKafkaOffsets(triggerPath: string, topic: string, partition: number, offset: number,): Promise<void>
|
|
654
|
+
|
|
569
655
|
/**
|
|
570
656
|
* Create a SQL template function for PostgreSQL/datatable queries
|
|
571
657
|
* @param name - Database/datatable name (default: "main")
|
|
@@ -579,7 +665,7 @@ parseS3Object(s3Object: S3Object): S3ObjectRecord
|
|
|
579
665
|
* WHERE name = \${name} AND age = \${age}::int
|
|
580
666
|
* \`.fetch()
|
|
581
667
|
*/
|
|
582
|
-
datatable(name: string = "main"):
|
|
668
|
+
datatable(name: string = "main"): DatatableSqlTemplateFunction
|
|
583
669
|
|
|
584
670
|
/**
|
|
585
671
|
* Create a SQL template function for DuckDB/ducklake queries
|
|
@@ -595,10 +681,6 @@ datatable(name: string = "main"): SqlTemplateFunction
|
|
|
595
681
|
* \`.fetch()
|
|
596
682
|
*/
|
|
597
683
|
ducklake(name: string = "main"): SqlTemplateFunction
|
|
598
|
-
|
|
599
|
-
async polarsConnectionSettings(s3_resource_path: string | undefined): Promise<any>
|
|
600
|
-
|
|
601
|
-
async duckdbConnectionSettings(s3_resource_path: string | undefined): Promise<any>
|
|
602
684
|
`;
|
|
603
685
|
export const SDK_PYTHON = `# Python SDK (wmill)
|
|
604
686
|
|
|
@@ -770,10 +852,11 @@ def set_variable(path: str, value: str, is_secret: bool = False) -> None
|
|
|
770
852
|
# Args:
|
|
771
853
|
# path: Resource path in Windmill
|
|
772
854
|
# none_if_undefined: Return None instead of raising if not found
|
|
855
|
+
# interpolated: if variables and resources are fully unrolled
|
|
773
856
|
#
|
|
774
857
|
# Returns:
|
|
775
858
|
# Resource value dictionary or None
|
|
776
|
-
def get_resource(path: str, none_if_undefined: bool = False) -> dict | None
|
|
859
|
+
def get_resource(path: str, none_if_undefined: bool = False, interpolated: bool = True) -> dict | None
|
|
777
860
|
|
|
778
861
|
# Set a resource value by path, creating it if it doesn't exist.
|
|
779
862
|
#
|
|
@@ -798,7 +881,17 @@ def list_resources(resource_type: str = None, page: int = None, per_page: int =
|
|
|
798
881
|
#
|
|
799
882
|
# Args:
|
|
800
883
|
# value: State value to set
|
|
801
|
-
|
|
884
|
+
# path: Optional state resource path override.
|
|
885
|
+
def set_state(value: Any, path: str | None = None) -> None
|
|
886
|
+
|
|
887
|
+
# Get the workflow state.
|
|
888
|
+
#
|
|
889
|
+
# Args:
|
|
890
|
+
# path: Optional state resource path override.
|
|
891
|
+
#
|
|
892
|
+
# Returns:
|
|
893
|
+
# State value or None if not set
|
|
894
|
+
def get_state(path: str | None = None) -> Any
|
|
802
895
|
|
|
803
896
|
# Set job progress percentage (0-99).
|
|
804
897
|
#
|
|
@@ -879,6 +972,16 @@ def load_s3_file_reader(s3object: S3Object | str, s3_resource_path: str | None)
|
|
|
879
972
|
# '''
|
|
880
973
|
def write_s3_file(s3object: S3Object | str | None, file_content: BufferedReader | bytes, s3_resource_path: str | None, content_type: str | None = None, content_disposition: str | None = None) -> S3Object
|
|
881
974
|
|
|
975
|
+
# Permanently delete a file from the workspace S3 bucket.
|
|
976
|
+
#
|
|
977
|
+
# '''python
|
|
978
|
+
# from wmill import S3Object
|
|
979
|
+
#
|
|
980
|
+
# s3_obj = S3Object(s3="/path/to/my_file.txt")
|
|
981
|
+
# client.delete_s3_object(s3_obj)
|
|
982
|
+
# '''
|
|
983
|
+
def delete_s3_object(s3object: S3Object | str, s3_resource_path: str | None = None) -> None
|
|
984
|
+
|
|
882
985
|
# Sign S3 objects for use by anonymous users in public apps.
|
|
883
986
|
#
|
|
884
987
|
# Args:
|
|
@@ -967,10 +1070,13 @@ def get_shared_state(path: str = 'state.json') -> None
|
|
|
967
1070
|
#
|
|
968
1071
|
# Args:
|
|
969
1072
|
# approver: Optional approver name
|
|
1073
|
+
# flow_level: If True, generate resume URLs for the parent flow instead of the
|
|
1074
|
+
# specific step. This allows pre-approvals that can be consumed by any later
|
|
1075
|
+
# suspend step in the same flow.
|
|
970
1076
|
#
|
|
971
1077
|
# Returns:
|
|
972
1078
|
# Dictionary with approvalPage, resume, and cancel URLs
|
|
973
|
-
def get_resume_urls(approver: str = None) -> dict
|
|
1079
|
+
def get_resume_urls(approver: str = None, flow_level: bool = None) -> dict
|
|
974
1080
|
|
|
975
1081
|
# Sends an interactive approval request via Slack, allowing optional customization of the message, approver, and form fields.
|
|
976
1082
|
#
|
|
@@ -1088,27 +1194,12 @@ def polars_connection_settings(s3_resource_path: str = '') -> PolarsConnectionSe
|
|
|
1088
1194
|
# initiate an S3 connection using boto3
|
|
1089
1195
|
def boto3_connection_settings(s3_resource_path: str = '') -> Boto3ConnectionSettings
|
|
1090
1196
|
|
|
1091
|
-
# Get the state
|
|
1092
|
-
def get_state() -> Any
|
|
1093
|
-
|
|
1094
1197
|
# Get the state resource path from environment.
|
|
1095
1198
|
#
|
|
1096
1199
|
# Returns:
|
|
1097
1200
|
# State path string
|
|
1098
1201
|
def get_state_path() -> str
|
|
1099
1202
|
|
|
1100
|
-
# Decorator to mark a function as a workflow task.
|
|
1101
|
-
#
|
|
1102
|
-
# When executed inside a Windmill job, the decorated function runs as a
|
|
1103
|
-
# separate workflow step. Outside Windmill, it executes normally.
|
|
1104
|
-
#
|
|
1105
|
-
# Args:
|
|
1106
|
-
# tag: Optional worker tag for execution
|
|
1107
|
-
#
|
|
1108
|
-
# Returns:
|
|
1109
|
-
# Decorated function
|
|
1110
|
-
def task(*args, **kwargs)
|
|
1111
|
-
|
|
1112
1203
|
# Parse resource syntax from string.
|
|
1113
1204
|
def parse_resource_syntax(s: str) -> Optional[str]
|
|
1114
1205
|
|
|
@@ -1138,7 +1229,7 @@ def stream_result(stream) -> None
|
|
|
1138
1229
|
#
|
|
1139
1230
|
# Returns:
|
|
1140
1231
|
# SqlQuery instance for fetching results
|
|
1141
|
-
def query(sql: str, *args)
|
|
1232
|
+
def query(sql: str, *args) -> SqlQuery
|
|
1142
1233
|
|
|
1143
1234
|
# Execute query and fetch results.
|
|
1144
1235
|
#
|
|
@@ -1155,21 +1246,130 @@ def fetch(result_collection: str | None = None)
|
|
|
1155
1246
|
# First row of query results
|
|
1156
1247
|
def fetch_one()
|
|
1157
1248
|
|
|
1249
|
+
# Execute query and fetch first row of results. Return result as a scalar value.
|
|
1250
|
+
#
|
|
1251
|
+
# Returns:
|
|
1252
|
+
# First row of query result as a scalar value
|
|
1253
|
+
def fetch_one_scalar()
|
|
1254
|
+
|
|
1255
|
+
# Execute query and don't return any results.
|
|
1256
|
+
#
|
|
1257
|
+
def execute()
|
|
1258
|
+
|
|
1158
1259
|
# DuckDB executor requires explicit argument types at declaration
|
|
1159
1260
|
# These types exist in both DuckDB and Postgres
|
|
1160
1261
|
# Check that the types exist if you plan to extend this function for other SQL engines.
|
|
1161
1262
|
def infer_sql_type(value) -> str
|
|
1162
1263
|
|
|
1264
|
+
def parse_sql_client_name(name: str) -> tuple[str, Optional[str]]
|
|
1265
|
+
|
|
1266
|
+
# Decorator that marks a function as a workflow task.
|
|
1267
|
+
#
|
|
1268
|
+
# Works in both WAC v1 (sync, HTTP-based dispatch) and WAC v2
|
|
1269
|
+
# (async, checkpoint/replay) modes:
|
|
1270
|
+
#
|
|
1271
|
+
# - **v2 (inside @workflow)**: dispatches as a checkpoint step.
|
|
1272
|
+
# - **v1 (WM_JOB_ID set, no @workflow)**: dispatches via HTTP API.
|
|
1273
|
+
# - **Standalone**: executes the function body directly.
|
|
1274
|
+
#
|
|
1275
|
+
# Usage::
|
|
1276
|
+
#
|
|
1277
|
+
# @task
|
|
1278
|
+
# async def extract_data(url: str): ...
|
|
1279
|
+
#
|
|
1280
|
+
# @task(path="f/external_script", timeout=600, tag="gpu")
|
|
1281
|
+
# async def run_external(x: int): ...
|
|
1282
|
+
def task(_func = None, path: Optional[str] = None, tag: Optional[str] = None, timeout: Optional[int] = None, cache_ttl: Optional[int] = None, priority: Optional[int] = None, concurrency_limit: Optional[int] = None, concurrency_key: Optional[str] = None, concurrency_time_window_s: Optional[int] = None)
|
|
1283
|
+
|
|
1284
|
+
# Create a task that dispatches to a separate Windmill script.
|
|
1285
|
+
#
|
|
1286
|
+
# Usage::
|
|
1287
|
+
#
|
|
1288
|
+
# extract = task_script("f/data/extract", timeout=600)
|
|
1289
|
+
#
|
|
1290
|
+
# @workflow
|
|
1291
|
+
# async def main():
|
|
1292
|
+
# data = await extract(url="https://...")
|
|
1293
|
+
def task_script(path: str, timeout: Optional[int] = None, tag: Optional[str] = None, cache_ttl: Optional[int] = None, priority: Optional[int] = None, concurrency_limit: Optional[int] = None, concurrency_key: Optional[str] = None, concurrency_time_window_s: Optional[int] = None)
|
|
1294
|
+
|
|
1295
|
+
# Create a task that dispatches to a separate Windmill flow.
|
|
1296
|
+
#
|
|
1297
|
+
# Usage::
|
|
1298
|
+
#
|
|
1299
|
+
# pipeline = task_flow("f/etl/pipeline", priority=10)
|
|
1300
|
+
#
|
|
1301
|
+
# @workflow
|
|
1302
|
+
# async def main():
|
|
1303
|
+
# result = await pipeline(input=data)
|
|
1304
|
+
def task_flow(path: str, timeout: Optional[int] = None, tag: Optional[str] = None, cache_ttl: Optional[int] = None, priority: Optional[int] = None, concurrency_limit: Optional[int] = None, concurrency_key: Optional[str] = None, concurrency_time_window_s: Optional[int] = None)
|
|
1305
|
+
|
|
1306
|
+
# Decorator marking an async function as a workflow-as-code entry point.
|
|
1307
|
+
#
|
|
1308
|
+
# The function must be **deterministic**: given the same inputs it must call
|
|
1309
|
+
# tasks in the same order on every replay. Branching on task results is fine
|
|
1310
|
+
# (results are replayed from checkpoint), but branching on external state
|
|
1311
|
+
# (current time, random values, external API calls) must use \`\`step()\`\` to
|
|
1312
|
+
# checkpoint the value so replays see the same result.
|
|
1313
|
+
def workflow(func)
|
|
1314
|
+
|
|
1315
|
+
# Execute \`\`fn\`\` inline and checkpoint the result.
|
|
1316
|
+
#
|
|
1317
|
+
# On replay the cached value is returned without re-executing \`\`fn\`\`.
|
|
1318
|
+
# Use for lightweight deterministic operations (timestamps, random IDs,
|
|
1319
|
+
# config reads) that should not incur the overhead of a child job.
|
|
1320
|
+
async def step(name: str, fn)
|
|
1321
|
+
|
|
1322
|
+
# Server-side sleep — suspend the workflow for the given duration without holding a worker.
|
|
1323
|
+
#
|
|
1324
|
+
# Inside a @workflow, the parent job suspends and auto-resumes after \`\`seconds\`\`.
|
|
1325
|
+
# Outside a workflow, falls back to \`\`asyncio.sleep\`\`.
|
|
1326
|
+
async def sleep(seconds: int)
|
|
1327
|
+
|
|
1328
|
+
# Suspend the workflow and wait for an external approval.
|
|
1329
|
+
#
|
|
1330
|
+
# Use \`\`get_resume_urls()\`\` (wrapped in \`\`step()\`\`) to obtain
|
|
1331
|
+
# resume/cancel/approval URLs before calling this function.
|
|
1332
|
+
#
|
|
1333
|
+
# Returns a dict with \`\`value\`\` (form data), \`\`approver\`\`, and \`\`approved\`\`.
|
|
1334
|
+
#
|
|
1335
|
+
# Example::
|
|
1336
|
+
#
|
|
1337
|
+
# urls = await step("urls", lambda: get_resume_urls())
|
|
1338
|
+
# await step("notify", lambda: send_email(urls["approvalPage"]))
|
|
1339
|
+
# result = await wait_for_approval(timeout=3600)
|
|
1340
|
+
async def wait_for_approval(timeout: int = 1800, form: dict | None = None) -> dict
|
|
1341
|
+
|
|
1342
|
+
# Process items in parallel with optional concurrency control.
|
|
1343
|
+
#
|
|
1344
|
+
# Each item is processed by calling \`\`fn(item)\`\`, which should be a @task.
|
|
1345
|
+
# Items are dispatched in batches of \`\`concurrency\`\` (default: all at once).
|
|
1346
|
+
#
|
|
1347
|
+
# Example::
|
|
1348
|
+
#
|
|
1349
|
+
# @task
|
|
1350
|
+
# async def process(item: str):
|
|
1351
|
+
# ...
|
|
1352
|
+
#
|
|
1353
|
+
# results = await parallel(items, process, concurrency=5)
|
|
1354
|
+
async def parallel(items, fn, concurrency: Optional[int] = None)
|
|
1355
|
+
|
|
1356
|
+
# Commit Kafka offsets for a trigger with auto_commit disabled.
|
|
1357
|
+
#
|
|
1358
|
+
# Args:
|
|
1359
|
+
# trigger_path: Path to the Kafka trigger (from event['wm_trigger']['trigger_path'])
|
|
1360
|
+
# topic: Kafka topic name (from event['topic'])
|
|
1361
|
+
# partition: Partition number (from event['partition'])
|
|
1362
|
+
# offset: Message offset to commit (from event['offset'])
|
|
1363
|
+
def commit_kafka_offsets(trigger_path: str, topic: str, partition: int, offset: int) -> None
|
|
1364
|
+
|
|
1163
1365
|
`;
|
|
1164
1366
|
export const OPENFLOW_SCHEMA = `## OpenFlow Schema
|
|
1165
1367
|
|
|
1166
|
-
{"OpenFlow":{"type":"object","description":"Top-level flow definition containing metadata, configuration, and the flow structure","properties":{"summary":{"type":"string","description":"Short description of what this flow does"},"description":{"type":"string","description":"Detailed documentation for this flow"},"value":{"$ref":"#/components/schemas/FlowValue"},"schema":{"type":"object","description":"JSON Schema for flow inputs. Use this to define input parameters, their types, defaults, and validation. For resource inputs, set type to 'object' and format to 'resource-<type>' (e.g., 'resource-stripe')"}},"required":["summary","value"]},"FlowValue":{"type":"object","description":"The flow structure containing modules and optional preprocessor/failure handlers","properties":{"modules":{"type":"array","description":"Array of steps that execute in sequence. Each step can be a script, subflow, loop, or branch","items":{"$ref":"#/components/schemas/FlowModule"}},"failure_module":{"description":"Special module that executes when the flow fails. Receives error object with message, name, stack, and step_id. Must have id 'failure'. Only supports script/rawscript types","$ref":"#/components/schemas/FlowModule"},"preprocessor_module":{"description":"Special module that runs before the first step on external triggers. Must have id 'preprocessor'. Only supports script/rawscript types. Cannot reference other step results","$ref":"#/components/schemas/FlowModule"},"same_worker":{"type":"boolean","description":"If true, all steps run on the same worker for better performance"},"concurrent_limit":{"type":"number","description":"Maximum number of concurrent executions of this flow"},"concurrency_key":{"type":"string","description":"Expression to group concurrent executions (e.g., by user ID)"},"concurrency_time_window_s":{"type":"number","description":"Time window in seconds for concurrent_limit"},"debounce_delay_s":{"type":"number","description":"Delay in seconds to debounce flow executions"},"debounce_key":{"type":"string","description":"Expression to group debounced executions"},"skip_expr":{"type":"string","description":"JavaScript expression to conditionally skip the entire flow"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for flow results"},"cache_ignore_s3_path":{"type":"boolean"},"flow_env":{"type":"object","description":"Environment variables available to all steps","additionalProperties":{"type":"string"}},"priority":{"type":"number","description":"Execution priority (higher numbers run first)"},"early_return":{"type":"string","description":"JavaScript expression to return early from the flow"},"chat_input_enabled":{"type":"boolean","description":"Whether this flow accepts chat-style input"},"notes":{"type":"array","description":"Sticky notes attached to the flow","items":{"$ref":"#/components/schemas/FlowNote"}}},"required":["modules"]},"Retry":{"type":"object","description":"Retry configuration for failed module executions","properties":{"constant":{"type":"object","description":"Retry with constant delay between attempts","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"seconds":{"type":"integer","description":"Seconds to wait between retries"}}},"exponential":{"type":"object","description":"Retry with exponential backoff (delay doubles each time)","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"multiplier":{"type":"integer","description":"Multiplier for exponential backoff"},"seconds":{"type":"integer","minimum":1,"description":"Initial delay in seconds"},"random_factor":{"type":"integer","minimum":0,"maximum":100,"description":"Random jitter percentage (0-100) to avoid thundering herd"}}},"retry_if":{"$ref":"#/components/schemas/RetryIf"}}},"FlowNote":{"type":"object","description":"A sticky note attached to a flow for documentation and annotation","properties":{"id":{"type":"string","description":"Unique identifier for the note"},"text":{"type":"string","description":"Content of the note"},"position":{"type":"object","description":"Position of the note in the flow editor","properties":{"x":{"type":"number","description":"X coordinate"},"y":{"type":"number","description":"Y coordinate"}},"required":["x","y"]},"size":{"type":"object","description":"Size of the note in the flow editor","properties":{"width":{"type":"number","description":"Width in pixels"},"height":{"type":"number","description":"Height in pixels"}},"required":["width","height"]},"color":{"type":"string","description":"Color of the note (e.g., \\"yellow\\", \\"#ffff00\\")"},"type":{"type":"string","enum":["free","group"],"description":"Type of note - 'free' for standalone notes, 'group' for notes that group other nodes"},"locked":{"type":"boolean","default":false,"description":"Whether the note is locked and cannot be edited or moved"},"contained_node_ids":{"type":"array","items":{"type":"string"},"description":"For group notes, the IDs of nodes contained within this group"}},"required":["id","text","color","type"]},"RetryIf":{"type":"object","description":"Conditional retry based on error or result","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables"}},"required":["expr"]},"StopAfterIf":{"type":"object","description":"Early termination condition for a module","properties":{"skip_if_stopped":{"type":"boolean","description":"If true, following steps are skipped when this condition triggers"},"expr":{"type":"string","description":"JavaScript expression evaluated after the module runs. Can use 'result' (step's result) or 'flow_input'. Return true to stop"},"error_message":{"type":"string","description":"Custom error message shown when stopping"}},"required":["expr"]},"FlowModule":{"type":"object","description":"A single step in a flow. Can be a script, subflow, loop, or branch","properties":{"id":{"type":"string","description":"Unique identifier for this step. Used to reference results via 'results.step_id'. Must be a valid identifier (alphanumeric, underscore, hyphen)"},"value":{"$ref":"#/components/schemas/FlowModuleValue"},"stop_after_if":{"description":"Early termination condition evaluated after this step completes","$ref":"#/components/schemas/StopAfterIf"},"stop_after_all_iters_if":{"description":"For loops only - early termination condition evaluated after all iterations complete","$ref":"#/components/schemas/StopAfterIf"},"skip_if":{"type":"object","description":"Conditionally skip this step based on previous results or flow inputs","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to skip. Can use 'flow_input' or 'results.<step_id>'"}},"required":["expr"]},"sleep":{"description":"Delay before executing this step (in seconds or as expression)","$ref":"#/components/schemas/InputTransform"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for this step's results"},"cache_ignore_s3_path":{"type":"boolean"},"timeout":{"description":"Maximum execution time in seconds (static value or expression)","$ref":"#/components/schemas/InputTransform"},"delete_after_use":{"type":"boolean","description":"If true, this step's result is deleted after use to save memory"},"summary":{"type":"string","description":"Short description of what this step does"},"mock":{"type":"object","description":"Mock configuration for testing without executing the actual step","properties":{"enabled":{"type":"boolean","description":"If true, return mock value instead of executing"},"return_value":{"description":"Value to return when mocked"}}},"suspend":{"type":"object","description":"Configuration for approval/resume steps that wait for user input","properties":{"required_events":{"type":"integer","description":"Number of approvals required before continuing"},"timeout":{"type":"integer","description":"Timeout in seconds before auto-continuing or canceling"},"resume_form":{"type":"object","description":"Form schema for collecting input when resuming","properties":{"schema":{"type":"object","description":"JSON Schema for the resume form"}}},"user_auth_required":{"type":"boolean","description":"If true, only authenticated users can approve"},"user_groups_required":{"description":"Expression or list of groups that can approve","$ref":"#/components/schemas/InputTransform"},"self_approval_disabled":{"type":"boolean","description":"If true, the user who started the flow cannot approve"},"hide_cancel":{"type":"boolean","description":"If true, hide the cancel button on the approval form"},"continue_on_disapprove_timeout":{"type":"boolean","description":"If true, continue flow on timeout instead of canceling"}}},"priority":{"type":"number","description":"Execution priority for this step (higher numbers run first)"},"continue_on_error":{"type":"boolean","description":"If true, flow continues even if this step fails"},"retry":{"description":"Retry configuration if this step fails","$ref":"#/components/schemas/Retry"}},"required":["value","id"]},"InputTransform":{"description":"Maps input parameters for a step. Can be a static value or a JavaScript expression that references previous results or flow inputs","oneOf":[{"$ref":"#/components/schemas/StaticTransform"},{"$ref":"#/components/schemas/JavascriptTransform"}],"discriminator":{"propertyName":"type","mapping":{"static":"#/components/schemas/StaticTransform","javascript":"#/components/schemas/JavascriptTransform"}}},"StaticTransform":{"type":"object","description":"Static value passed directly to the step. Use for hardcoded values or resource references like '$res:path/to/resource'","properties":{"value":{"description":"The static value. For resources, use format '$res:path/to/resource'"},"type":{"type":"string","enum":["static"]}},"required":["type"]},"JavascriptTransform":{"type":"object","description":"JavaScript expression evaluated at runtime. Can reference previous step results via 'results.step_id' or flow inputs via 'flow_input.property'. Inside loops, use 'flow_input.iter.value' for the current iteration value","properties":{"expr":{"type":"string","description":"JavaScript expression returning the value. Available variables - results (object with all previous step results), flow_input (flow inputs), flow_input.iter (in loops)"},"type":{"type":"string","enum":["javascript"]}},"required":["expr","type"]},"FlowModuleValue":{"description":"The actual implementation of a flow step. Can be a script (inline or referenced), subflow, loop, branch, or special module type","oneOf":[{"$ref":"#/components/schemas/RawScript"},{"$ref":"#/components/schemas/PathScript"},{"$ref":"#/components/schemas/PathFlow"},{"$ref":"#/components/schemas/ForloopFlow"},{"$ref":"#/components/schemas/WhileloopFlow"},{"$ref":"#/components/schemas/BranchOne"},{"$ref":"#/components/schemas/BranchAll"},{"$ref":"#/components/schemas/Identity"},{"$ref":"#/components/schemas/AiAgent"}],"discriminator":{"propertyName":"type","mapping":{"rawscript":"#/components/schemas/RawScript","script":"#/components/schemas/PathScript","flow":"#/components/schemas/PathFlow","forloopflow":"#/components/schemas/ForloopFlow","whileloopflow":"#/components/schemas/WhileloopFlow","branchone":"#/components/schemas/BranchOne","branchall":"#/components/schemas/BranchAll","identity":"#/components/schemas/Identity","aiagent":"#/components/schemas/AiAgent"}}},"RawScript":{"type":"object","description":"Inline script with code defined directly in the flow. Use 'bun' as default language if unspecified. The script receives arguments from input_transforms","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"content":{"type":"string","description":"The script source code. Should export a 'main' function"},"language":{"type":"string","description":"Programming language for this script","enum":["deno","bun","python3","go","bash","powershell","postgresql","mysql","bigquery","snowflake","mssql","oracledb","graphql","nativets","php"]},"path":{"type":"string","description":"Optional path for saving this script"},"lock":{"type":"string","description":"Lock file content for dependencies"},"type":{"type":"string","enum":["rawscript"]},"tag":{"type":"string","description":"Worker group tag for execution routing"},"concurrent_limit":{"type":"number","description":"Maximum concurrent executions of this script"},"concurrency_time_window_s":{"type":"number","description":"Time window for concurrent_limit"},"custom_concurrency_key":{"type":"string","description":"Custom key for grouping concurrent executions"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"},"assets":{"type":"array","description":"External resources this script accesses (S3 objects, resources, etc.)","items":{"type":"object","required":["path","kind"],"properties":{"path":{"type":"string","description":"Path to the asset"},"kind":{"type":"string","description":"Type of asset","enum":["s3object","resource","ducklake","datatable"]},"access_type":{"type":"string","description":"Access level for this asset","enum":["r","w","rw"]},"alt_access_type":{"type":"string","description":"Alternative access level","enum":["r","w","rw"]}}}}},"required":["type","content","language","input_transforms"]},"PathScript":{"type":"object","description":"Reference to an existing script by path. Use this when calling a previously saved script instead of writing inline code","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the script in the workspace (e.g., 'f/scripts/send_email')"},"hash":{"type":"string","description":"Optional specific version hash of the script to use"},"type":{"type":"string","enum":["script"]},"tag_override":{"type":"string","description":"Override the script's default worker group tag"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"}},"required":["type","path","input_transforms"]},"PathFlow":{"type":"object","description":"Reference to an existing flow by path. Use this to call another flow as a subflow","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the subflow's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the flow in the workspace (e.g., 'f/flows/process_user')"},"type":{"type":"string","enum":["flow"]}},"required":["type","path","input_transforms"]},"ForloopFlow":{"type":"object","description":"Executes nested modules in a loop over an iterator. Inside the loop, use 'flow_input.iter.value' to access the current iteration value, and 'flow_input.iter.index' for the index. Supports parallel execution for better performance on I/O-bound operations","properties":{"modules":{"type":"array","description":"Steps to execute for each iteration. These can reference the iteration value via 'flow_input.iter.value'","items":{"$ref":"#/components/schemas/FlowModule"}},"iterator":{"description":"JavaScript expression that returns an array to iterate over. Can reference 'results.step_id' or 'flow_input'","$ref":"#/components/schemas/InputTransform"},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["forloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (faster for I/O-bound operations). Use with parallelism to control concurrency"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true. Limits resource usage. Can be static number or expression","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","iterator","skip_failures","type"]},"WhileloopFlow":{"type":"object","description":"Executes nested modules repeatedly while a condition is true. The loop checks the condition after each iteration. Use stop_after_if on modules to control loop termination","properties":{"modules":{"type":"array","description":"Steps to execute in each iteration. Use stop_after_if to control when the loop ends","items":{"$ref":"#/components/schemas/FlowModule"}},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["whileloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (use with caution in while loops)"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","skip_failures","type"]},"BranchOne":{"type":"object","description":"Conditional branching where only the first matching branch executes. Branches are evaluated in order, and the first one with a true expression runs. If no branches match, the default branch executes","properties":{"branches":{"type":"array","description":"Array of branches to evaluate in order. The first branch with expr evaluating to true executes","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch condition"},"expr":{"type":"string","description":"JavaScript expression that returns boolean. Can use 'results.step_id' or 'flow_input'. First true expr wins"},"modules":{"type":"array","description":"Steps to execute if this branch's expr is true","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules","expr"]}},"default":{"type":"array","description":"Steps to execute if no branch expressions match","items":{"$ref":"#/components/schemas/FlowModule"}},"type":{"type":"string","enum":["branchone"]}},"required":["branches","default","type"]},"BranchAll":{"type":"object","description":"Parallel branching where all branches execute simultaneously. Unlike BranchOne, all branches run regardless of conditions. Useful for executing independent tasks concurrently","properties":{"branches":{"type":"array","description":"Array of branches that all execute (either in parallel or sequentially)","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch's purpose"},"skip_failure":{"type":"boolean","description":"If true, failure in this branch doesn't fail the entire flow"},"modules":{"type":"array","description":"Steps to execute in this branch","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules"]}},"type":{"type":"string","enum":["branchall"]},"parallel":{"type":"boolean","description":"If true, all branches execute concurrently. If false, they execute sequentially"}},"required":["branches","type"]},"AgentTool":{"type":"object","description":"A tool available to an AI agent. Can be a flow module or an external MCP (Model Context Protocol) tool","properties":{"id":{"type":"string","description":"Unique identifier for this tool. Cannot contain spaces - use underscores instead (e.g., 'get_user_data' not 'get user data')"},"summary":{"type":"string","description":"Short description of what this tool does (shown to the AI)"},"value":{"$ref":"#/components/schemas/ToolValue"}},"required":["id","value"]},"ToolValue":{"description":"The implementation of a tool. Can be a flow module (script/flow) or an MCP tool reference","oneOf":[{"$ref":"#/components/schemas/FlowModuleTool"},{"$ref":"#/components/schemas/McpToolValue"}],"discriminator":{"propertyName":"tool_type","mapping":{"flowmodule":"#/components/schemas/FlowModuleTool","mcp":"#/components/schemas/McpToolValue"}}},"FlowModuleTool":{"description":"A tool implemented as a flow module (script, flow, etc.). The AI can call this like any other flow module","allOf":[{"type":"object","properties":{"tool_type":{"type":"string","enum":["flowmodule"]}},"required":["tool_type"]},{"$ref":"#/components/schemas/FlowModuleValue"}]},"McpToolValue":{"type":"object","description":"Reference to an external MCP (Model Context Protocol) tool. The AI can call tools from MCP servers","properties":{"tool_type":{"type":"string","enum":["mcp"]},"resource_path":{"type":"string","description":"Path to the MCP resource/server configuration"},"include_tools":{"type":"array","description":"Whitelist of specific tools to include from this MCP server","items":{"type":"string"}},"exclude_tools":{"type":"array","description":"Blacklist of tools to exclude from this MCP server","items":{"type":"string"}}},"required":["tool_type","resource_path"]},"AiAgent":{"type":"object","description":"AI agent step that can use tools to accomplish tasks. The agent receives inputs and can call any of its configured tools to complete the task","properties":{"input_transforms":{"type":"object","description":"Input parameters for the AI agent mapped to their values","properties":{"provider":{"$ref":"#/components/schemas/InputTransform"},"output_type":{"$ref":"#/components/schemas/InputTransform"},"user_message":{"$ref":"#/components/schemas/InputTransform"},"system_prompt":{"$ref":"#/components/schemas/InputTransform"},"streaming":{"$ref":"#/components/schemas/InputTransform"},"messages_context_length":{"$ref":"#/components/schemas/InputTransform"},"output_schema":{"$ref":"#/components/schemas/InputTransform"},"user_images":{"$ref":"#/components/schemas/InputTransform"},"max_completion_tokens":{"$ref":"#/components/schemas/InputTransform"},"temperature":{"$ref":"#/components/schemas/InputTransform"}},"required":["provider","user_message","output_type"]},"tools":{"type":"array","description":"Array of tools the agent can use. The agent decides which tools to call based on the task","items":{"$ref":"#/components/schemas/AgentTool"}},"type":{"type":"string","enum":["aiagent"]},"parallel":{"type":"boolean","description":"If true, the agent can execute multiple tool calls in parallel"}},"required":["tools","type","input_transforms"]},"Identity":{"type":"object","description":"Pass-through module that returns its input unchanged. Useful for flow structure or as a placeholder","properties":{"type":{"type":"string","enum":["identity"]},"flow":{"type":"boolean","description":"If true, marks this as a flow identity (special handling)"}},"required":["type"]},"FlowStatus":{"type":"object","properties":{"step":{"type":"integer"},"modules":{"type":"array","items":{"$ref":"#/components/schemas/FlowStatusModule"}},"user_states":{"additionalProperties":true},"preprocessor_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"}]},"failure_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"},{"type":"object","properties":{"parent_module":{"type":"string"}}}]},"retry":{"type":"object","properties":{"fail_count":{"type":"integer"},"failed_jobs":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"required":["step","modules","failure_module"]},"FlowStatusModule":{"type":"object","properties":{"type":{"type":"string","enum":["WaitingForPriorSteps","WaitingForEvents","WaitingForExecutor","InProgress","Success","Failure"]},"id":{"type":"string"},"job":{"type":"string","format":"uuid"},"count":{"type":"integer"},"progress":{"type":"integer"},"iterator":{"type":"object","properties":{"index":{"type":"integer"},"itered":{"type":"array","items":{}},"args":{}}},"flow_jobs":{"type":"array","items":{"type":"string"}},"flow_jobs_success":{"type":"array","items":{"type":"boolean"}},"flow_jobs_duration":{"type":"object","properties":{"started_at":{"type":"array","items":{"type":"string"}},"duration_ms":{"type":"array","items":{"type":"integer"}}}},"branch_chosen":{"type":"object","properties":{"type":{"type":"string","enum":["branch","default"]},"branch":{"type":"integer"}},"required":["type"]},"branchall":{"type":"object","properties":{"branch":{"type":"integer"},"len":{"type":"integer"}},"required":["branch","len"]},"approvers":{"type":"array","items":{"type":"object","properties":{"resume_id":{"type":"integer"},"approver":{"type":"string"}},"required":["resume_id","approver"]}},"failed_retries":{"type":"array","items":{"type":"string","format":"uuid"}},"skipped":{"type":"boolean"},"agent_actions":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"type":{"type":"string","enum":["tool_call"]},"module_id":{"type":"string"}},"required":["job_id","function_name","type","module_id"]},{"type":"object","properties":{"call_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"resource_path":{"type":"string"},"type":{"type":"string","enum":["mcp_tool_call"]},"arguments":{"type":"object"}},"required":["call_id","function_name","resource_path","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["message"]}},"required":["content","type"]}]}},"agent_actions_success":{"type":"array","items":{"type":"boolean"}}},"required":["type"]}}`;
|
|
1368
|
+
{"OpenFlow":{"type":"object","description":"Top-level flow definition containing metadata, configuration, and the flow structure","properties":{"summary":{"type":"string","description":"Short description of what this flow does"},"description":{"type":"string","description":"Detailed documentation for this flow"},"value":{"$ref":"#/components/schemas/FlowValue"},"schema":{"type":"object","description":"JSON Schema for flow inputs. Use this to define input parameters, their types, defaults, and validation. For resource inputs, set type to 'object' and format to 'resource-<type>' (e.g., 'resource-stripe')"},"on_behalf_of_email":{"type":"string","description":"The flow will be run with the permissions of the user with this email."}},"required":["summary","value"]},"FlowValue":{"type":"object","description":"The flow structure containing modules and optional preprocessor/failure handlers","properties":{"modules":{"type":"array","description":"Array of steps that execute in sequence. Each step can be a script, subflow, loop, or branch","items":{"$ref":"#/components/schemas/FlowModule"}},"failure_module":{"description":"Special module that executes when the flow fails. Receives error object with message, name, stack, and step_id. Must have id 'failure'. Only supports script/rawscript types","$ref":"#/components/schemas/FlowModule"},"preprocessor_module":{"description":"Special module that runs before the first step on external triggers. Must have id 'preprocessor'. Only supports script/rawscript types. Cannot reference other step results","$ref":"#/components/schemas/FlowModule"},"same_worker":{"type":"boolean","description":"If true, all steps run on the same worker for better performance"},"concurrent_limit":{"type":"number","description":"Maximum number of concurrent executions of this flow"},"concurrency_key":{"type":"string","description":"Expression to group concurrent executions (e.g., by user ID)"},"concurrency_time_window_s":{"type":"number","description":"Time window in seconds for concurrent_limit"},"debounce_delay_s":{"type":"number","description":"Delay in seconds to debounce flow executions"},"debounce_key":{"type":"string","description":"Expression to group debounced executions"},"debounce_args_to_accumulate":{"type":"array","description":"Arguments to accumulate across debounced executions","items":{"type":"string"}},"max_total_debouncing_time":{"type":"number","description":"Maximum total time in seconds that a job can be debounced"},"max_total_debounces_amount":{"type":"number","description":"Maximum number of times a job can be debounced"},"skip_expr":{"type":"string","description":"JavaScript expression to conditionally skip the entire flow"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for flow results"},"cache_ignore_s3_path":{"type":"boolean"},"flow_env":{"type":"object","description":"Environment variables available to all steps. Values can be strings, JSON values, or special references: '$var:path' (workspace variable) or '$res:path' (resource).","additionalProperties":{}},"priority":{"type":"number","description":"Execution priority (higher numbers run first)"},"early_return":{"type":"string","description":"JavaScript expression to return early from the flow"},"chat_input_enabled":{"type":"boolean","description":"Whether this flow accepts chat-style input"},"notes":{"type":"array","description":"Sticky notes attached to the flow","items":{"$ref":"#/components/schemas/FlowNote"}}},"required":["modules"]},"Retry":{"type":"object","description":"Retry configuration for failed module executions","properties":{"constant":{"type":"object","description":"Retry with constant delay between attempts","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"seconds":{"type":"integer","description":"Seconds to wait between retries"}}},"exponential":{"type":"object","description":"Retry with exponential backoff (delay doubles each time)","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"multiplier":{"type":"integer","description":"Multiplier for exponential backoff"},"seconds":{"type":"integer","minimum":1,"description":"Initial delay in seconds"},"random_factor":{"type":"integer","minimum":0,"maximum":100,"description":"Random jitter percentage (0-100) to avoid thundering herd"}}},"retry_if":{"$ref":"#/components/schemas/RetryIf"}}},"FlowNote":{"type":"object","description":"A sticky note attached to a flow for documentation and annotation","properties":{"id":{"type":"string","description":"Unique identifier for the note"},"text":{"type":"string","description":"Content of the note"},"position":{"type":"object","description":"Position of the note in the flow editor","properties":{"x":{"type":"number","description":"X coordinate"},"y":{"type":"number","description":"Y coordinate"}},"required":["x","y"]},"size":{"type":"object","description":"Size of the note in the flow editor","properties":{"width":{"type":"number","description":"Width in pixels"},"height":{"type":"number","description":"Height in pixels"}},"required":["width","height"]},"color":{"type":"string","description":"Color of the note (e.g., \\"yellow\\", \\"#ffff00\\")"},"type":{"type":"string","enum":["free","group"],"description":"Type of note - 'free' for standalone notes, 'group' for notes that group other nodes"},"locked":{"type":"boolean","default":false,"description":"Whether the note is locked and cannot be edited or moved"},"contained_node_ids":{"type":"array","items":{"type":"string"},"description":"For group notes, the IDs of nodes contained within this group"}},"required":["id","text","color","type"]},"RetryIf":{"type":"object","description":"Conditional retry based on error or result","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables"}},"required":["expr"]},"StopAfterIf":{"type":"object","description":"Early termination condition for a module","properties":{"skip_if_stopped":{"type":"boolean","description":"If true, following steps are skipped when this condition triggers"},"expr":{"type":"string","description":"JavaScript expression evaluated after the module runs. Can use 'result' (step's result) or 'flow_input'. Return true to stop"},"error_message":{"type":"string","description":"Custom error message shown when stopping"}},"required":["expr"]},"FlowModule":{"type":"object","description":"A single step in a flow. Can be a script, subflow, loop, or branch","properties":{"id":{"type":"string","description":"Unique identifier for this step. Used to reference results via 'results.step_id'. Must be a valid identifier (alphanumeric, underscore, hyphen)"},"value":{"$ref":"#/components/schemas/FlowModuleValue"},"stop_after_if":{"description":"Early termination condition evaluated after this step completes","$ref":"#/components/schemas/StopAfterIf"},"stop_after_all_iters_if":{"description":"For loops only - early termination condition evaluated after all iterations complete","$ref":"#/components/schemas/StopAfterIf"},"skip_if":{"type":"object","description":"Conditionally skip this step based on previous results or flow inputs","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to skip. Can use 'flow_input' or 'results.<step_id>'"}},"required":["expr"]},"sleep":{"description":"Delay before executing this step (in seconds or as expression)","$ref":"#/components/schemas/InputTransform"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for this step's results"},"cache_ignore_s3_path":{"type":"boolean"},"timeout":{"description":"Maximum execution time in seconds (static value or expression)","$ref":"#/components/schemas/InputTransform"},"delete_after_use":{"type":"boolean","description":"If true, this step's result is deleted after use to save memory"},"summary":{"type":"string","description":"Short description of what this step does"},"mock":{"type":"object","description":"Mock configuration for testing without executing the actual step","properties":{"enabled":{"type":"boolean","description":"If true, return mock value instead of executing"},"return_value":{"description":"Value to return when mocked"}}},"suspend":{"type":"object","description":"Configuration for approval/resume steps that wait for user input","properties":{"required_events":{"type":"integer","description":"Number of approvals required before continuing"},"timeout":{"type":"integer","description":"Timeout in seconds before auto-continuing or canceling"},"resume_form":{"type":"object","description":"Form schema for collecting input when resuming","properties":{"schema":{"type":"object","description":"JSON Schema for the resume form"}}},"user_auth_required":{"type":"boolean","description":"If true, only authenticated users can approve"},"user_groups_required":{"description":"Expression or list of groups that can approve","$ref":"#/components/schemas/InputTransform"},"self_approval_disabled":{"type":"boolean","description":"If true, the user who started the flow cannot approve"},"hide_cancel":{"type":"boolean","description":"If true, hide the cancel button on the approval form"},"continue_on_disapprove_timeout":{"type":"boolean","description":"If true, continue flow on timeout instead of canceling"}}},"priority":{"type":"number","description":"Execution priority for this step (higher numbers run first)"},"continue_on_error":{"type":"boolean","description":"If true, flow continues even if this step fails"},"retry":{"description":"Retry configuration if this step fails","$ref":"#/components/schemas/Retry"}},"required":["value","id"]},"InputTransform":{"description":"Maps input parameters for a step. Can be a static value or a JavaScript expression that references previous results or flow inputs","oneOf":[{"$ref":"#/components/schemas/StaticTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type","mapping":{"static":"#/components/schemas/StaticTransform","javascript":"#/components/schemas/JavascriptTransform","ai":"#/components/schemas/AiTransform"}}},"StaticTransform":{"type":"object","description":"Static value passed directly to the step. Use for hardcoded values or resource references like '$res:path/to/resource'","properties":{"value":{"description":"The static value. For resources, use format '$res:path/to/resource'"},"type":{"type":"string","enum":["static"]}},"required":["type"]},"JavascriptTransform":{"type":"object","description":"JavaScript expression evaluated at runtime. Can reference previous step results via 'results.step_id' or flow inputs via 'flow_input.property'. Inside loops, use 'flow_input.iter.value' for the current iteration value","properties":{"expr":{"type":"string","description":"JavaScript expression returning the value. Available variables - results (object with all previous step results), flow_input (flow inputs), flow_input.iter (in loops)"},"type":{"type":"string","enum":["javascript"]}},"required":["expr","type"]},"AiTransform":{"type":"object","description":"Value resolved by the AI runtime for this input. The AI engine decides how to satisfy the parameter.","properties":{"type":{"type":"string","enum":["ai"]}},"required":["type"]},"AIProviderKind":{"type":"string","description":"Supported AI provider types","enum":["openai","azure_openai","anthropic","mistral","deepseek","googleai","groq","openrouter","togetherai","customai","aws_bedrock"]},"ProviderConfig":{"type":"object","description":"Complete AI provider configuration with resource reference and model selection","properties":{"kind":{"$ref":"#/components/schemas/AIProviderKind"},"resource":{"type":"string","description":"Resource reference in format '$res:{resource_path}' pointing to provider credentials"},"model":{"type":"string","description":"Model identifier (e.g., 'gpt-4', 'claude-3-opus-20240229', 'gemini-pro')"}},"required":["kind","resource","model"]},"StaticProviderTransform":{"type":"object","description":"Static provider configuration passed directly to the AI agent","properties":{"value":{"$ref":"#/components/schemas/ProviderConfig"},"type":{"type":"string","enum":["static"]}},"required":["type","value"]},"ProviderTransform":{"description":"Provider configuration - can be static (ProviderConfig), JavaScript expression, or AI-determined","oneOf":[{"$ref":"#/components/schemas/StaticProviderTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type","mapping":{"static":"#/components/schemas/StaticProviderTransform","javascript":"#/components/schemas/JavascriptTransform","ai":"#/components/schemas/AiTransform"}}},"MemoryOff":{"type":"object","description":"No conversation memory/context","properties":{"kind":{"type":"string","enum":["off"]}},"required":["kind"]},"MemoryAuto":{"type":"object","description":"Automatic context management","properties":{"kind":{"type":"string","enum":["auto"]},"context_length":{"type":"integer","description":"Maximum number of messages to retain in context"},"memory_id":{"type":"string","description":"Identifier for persistent memory across agent invocations"}},"required":["kind"]},"MemoryMessage":{"type":"object","description":"A single message in conversation history","properties":{"role":{"type":"string","enum":["user","assistant","system"]},"content":{"type":"string"}},"required":["role","content"]},"MemoryManual":{"type":"object","description":"Explicit message history","properties":{"kind":{"type":"string","enum":["manual"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MemoryMessage"}}},"required":["kind","messages"]},"MemoryConfig":{"description":"Conversation memory configuration","oneOf":[{"$ref":"#/components/schemas/MemoryOff"},{"$ref":"#/components/schemas/MemoryAuto"},{"$ref":"#/components/schemas/MemoryManual"}],"discriminator":{"propertyName":"kind","mapping":{"off":"#/components/schemas/MemoryOff","auto":"#/components/schemas/MemoryAuto","manual":"#/components/schemas/MemoryManual"}}},"StaticMemoryTransform":{"type":"object","description":"Static memory configuration passed directly to the AI agent","properties":{"value":{"$ref":"#/components/schemas/MemoryConfig"},"type":{"type":"string","enum":["static"]}},"required":["type","value"]},"MemoryTransform":{"description":"Memory configuration - can be static (MemoryConfig), JavaScript expression, or AI-determined","oneOf":[{"$ref":"#/components/schemas/StaticMemoryTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type","mapping":{"static":"#/components/schemas/StaticMemoryTransform","javascript":"#/components/schemas/JavascriptTransform","ai":"#/components/schemas/AiTransform"}}},"FlowModuleValue":{"description":"The actual implementation of a flow step. Can be a script (inline or referenced), subflow, loop, branch, or special module type","oneOf":[{"$ref":"#/components/schemas/RawScript"},{"$ref":"#/components/schemas/PathScript"},{"$ref":"#/components/schemas/PathFlow"},{"$ref":"#/components/schemas/ForloopFlow"},{"$ref":"#/components/schemas/WhileloopFlow"},{"$ref":"#/components/schemas/BranchOne"},{"$ref":"#/components/schemas/BranchAll"},{"$ref":"#/components/schemas/Identity"},{"$ref":"#/components/schemas/AiAgent"}],"discriminator":{"propertyName":"type","mapping":{"rawscript":"#/components/schemas/RawScript","script":"#/components/schemas/PathScript","flow":"#/components/schemas/PathFlow","forloopflow":"#/components/schemas/ForloopFlow","whileloopflow":"#/components/schemas/WhileloopFlow","branchone":"#/components/schemas/BranchOne","branchall":"#/components/schemas/BranchAll","identity":"#/components/schemas/Identity","aiagent":"#/components/schemas/AiAgent"}}},"RawScript":{"type":"object","description":"Inline script with code defined directly in the flow. Use 'bun' as default language if unspecified. The script receives arguments from input_transforms","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"content":{"type":"string","description":"The script source code. Should export a 'main' function"},"language":{"type":"string","description":"Programming language for this script","enum":["deno","bun","python3","go","bash","powershell","postgresql","mysql","bigquery","snowflake","mssql","oracledb","graphql","nativets","php","rust","ansible","csharp","nu","java","ruby","duckdb"]},"path":{"type":"string","description":"Optional path for saving this script"},"lock":{"type":"string","description":"Lock file content for dependencies"},"type":{"type":"string","enum":["rawscript"]},"tag":{"type":"string","description":"Worker group tag for execution routing"},"concurrent_limit":{"type":"number","description":"Maximum concurrent executions of this script"},"concurrency_time_window_s":{"type":"number","description":"Time window for concurrent_limit"},"custom_concurrency_key":{"type":"string","description":"Custom key for grouping concurrent executions"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"},"assets":{"type":"array","description":"External resources this script accesses (S3 objects, resources, etc.)","items":{"type":"object","required":["path","kind"],"properties":{"path":{"type":"string","description":"Path to the asset"},"kind":{"type":"string","description":"Type of asset","enum":["s3object","resource","ducklake","datatable","volume"]},"access_type":{"type":"string","nullable":true,"description":"Access level for this asset","enum":["r","w","rw"]},"alt_access_type":{"type":"string","nullable":true,"description":"Alternative access level","enum":["r","w","rw"]}}}}},"required":["type","content","language","input_transforms"]},"PathScript":{"type":"object","description":"Reference to an existing script by path. Use this when calling a previously saved script instead of writing inline code","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the script in the workspace (e.g., 'f/scripts/send_email')"},"hash":{"type":"string","description":"Optional specific version hash of the script to use"},"type":{"type":"string","enum":["script"]},"tag_override":{"type":"string","description":"Override the script's default worker group tag"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"}},"required":["type","path","input_transforms"]},"PathFlow":{"type":"object","description":"Reference to an existing flow by path. Use this to call another flow as a subflow","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the subflow's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the flow in the workspace (e.g., 'f/flows/process_user')"},"type":{"type":"string","enum":["flow"]}},"required":["type","path","input_transforms"]},"ForloopFlow":{"type":"object","description":"Executes nested modules in a loop over an iterator. Inside the loop, use 'flow_input.iter.value' to access the current iteration value, and 'flow_input.iter.index' for the index. Supports parallel execution for better performance on I/O-bound operations","properties":{"modules":{"type":"array","description":"Steps to execute for each iteration. These can reference the iteration value via 'flow_input.iter.value'","items":{"$ref":"#/components/schemas/FlowModule"}},"iterator":{"description":"JavaScript expression that returns an array to iterate over. Can reference 'results.step_id' or 'flow_input'","$ref":"#/components/schemas/InputTransform"},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["forloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (faster for I/O-bound operations). Use with parallelism to control concurrency"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true. Limits resource usage. Can be static number or expression","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","iterator","skip_failures","type"]},"WhileloopFlow":{"type":"object","description":"Executes nested modules repeatedly while a condition is true. The loop checks the condition after each iteration. Use stop_after_if on modules to control loop termination","properties":{"modules":{"type":"array","description":"Steps to execute in each iteration. Use stop_after_if to control when the loop ends","items":{"$ref":"#/components/schemas/FlowModule"}},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["whileloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (use with caution in while loops)"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","skip_failures","type"]},"BranchOne":{"type":"object","description":"Conditional branching where only the first matching branch executes. Branches are evaluated in order, and the first one with a true expression runs. If no branches match, the default branch executes","properties":{"branches":{"type":"array","description":"Array of branches to evaluate in order. The first branch with expr evaluating to true executes","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch condition"},"expr":{"type":"string","description":"JavaScript expression that returns boolean. Can use 'results.step_id' or 'flow_input'. First true expr wins"},"modules":{"type":"array","description":"Steps to execute if this branch's expr is true","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules","expr"]}},"default":{"type":"array","description":"Steps to execute if no branch expressions match","items":{"$ref":"#/components/schemas/FlowModule"}},"type":{"type":"string","enum":["branchone"]}},"required":["branches","default","type"]},"BranchAll":{"type":"object","description":"Parallel branching where all branches execute simultaneously. Unlike BranchOne, all branches run regardless of conditions. Useful for executing independent tasks concurrently","properties":{"branches":{"type":"array","description":"Array of branches that all execute (either in parallel or sequentially)","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch's purpose"},"skip_failure":{"type":"boolean","description":"If true, failure in this branch doesn't fail the entire flow"},"modules":{"type":"array","description":"Steps to execute in this branch","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules"]}},"type":{"type":"string","enum":["branchall"]},"parallel":{"type":"boolean","description":"If true, all branches execute concurrently. If false, they execute sequentially"}},"required":["branches","type"]},"AgentTool":{"type":"object","description":"A tool available to an AI agent. Can be a flow module or an external MCP (Model Context Protocol) tool","properties":{"id":{"type":"string","description":"Unique identifier for this tool. Cannot contain spaces - use underscores instead (e.g., 'get_user_data' not 'get user data')"},"summary":{"type":"string","description":"Short description of what this tool does (shown to the AI)"},"value":{"$ref":"#/components/schemas/ToolValue"}},"required":["id","value"]},"ToolValue":{"description":"The implementation of a tool. Can be a flow module (script/flow) or an MCP tool reference","oneOf":[{"$ref":"#/components/schemas/FlowModuleTool"},{"$ref":"#/components/schemas/McpToolValue"},{"$ref":"#/components/schemas/WebsearchToolValue"}],"discriminator":{"propertyName":"tool_type","mapping":{"flowmodule":"#/components/schemas/FlowModuleTool","mcp":"#/components/schemas/McpToolValue","websearch":"#/components/schemas/WebsearchToolValue"}}},"FlowModuleTool":{"description":"A tool implemented as a flow module (script, flow, etc.). The AI can call this like any other flow module","allOf":[{"type":"object","properties":{"tool_type":{"type":"string","enum":["flowmodule"]}},"required":["tool_type"]},{"$ref":"#/components/schemas/FlowModuleValue"}]},"WebsearchToolValue":{"type":"object","description":"A tool implemented as a websearch tool. The AI can call this like any other websearch tool","properties":{"tool_type":{"type":"string","enum":["websearch"]}},"required":["tool_type"]},"McpToolValue":{"type":"object","description":"Reference to an external MCP (Model Context Protocol) tool. The AI can call tools from MCP servers","properties":{"tool_type":{"type":"string","enum":["mcp"]},"resource_path":{"type":"string","description":"Path to the MCP resource/server configuration"},"include_tools":{"type":"array","description":"Whitelist of specific tools to include from this MCP server","items":{"type":"string"}},"exclude_tools":{"type":"array","description":"Blacklist of tools to exclude from this MCP server","items":{"type":"string"}}},"required":["tool_type","resource_path"]},"AiAgent":{"type":"object","description":"AI agent step that can use tools to accomplish tasks. The agent receives inputs and can call any of its configured tools to complete the task","properties":{"input_transforms":{"type":"object","description":"Input parameters for the AI agent mapped to their values","properties":{"provider":{"$ref":"#/components/schemas/ProviderTransform"},"output_type":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Output format type.\\nValid values: 'text' (default) - plain text response, 'image' - image generation\\n"},"user_message":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"The user's prompt/message to the AI agent. Supports variable interpolation with flow.input syntax."},"system_prompt":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"System instructions that guide the AI's behavior, persona, and response style. Optional."},"streaming":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Boolean. If true, stream the AI response incrementally.\\nStreaming events include: token_delta, tool_call, tool_call_arguments, tool_execution, tool_result\\n"},"memory":{"$ref":"#/components/schemas/MemoryTransform"},"output_schema":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"JSON Schema object defining structured output format. Used when you need the AI to return data in a specific shape.\\nSupports standard JSON Schema properties: type, properties, required, items, enum, pattern, minLength, maxLength, minimum, maximum, etc.\\nExample: { type: 'object', properties: { name: { type: 'string' }, age: { type: 'integer' } }, required: ['name'] }\\n"},"user_images":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Array of image references for vision-capable models.\\nFormat: Array<{ bucket: string, key: string }> - S3 object references\\nExample: [{ bucket: 'my-bucket', key: 'images/photo.jpg' }]\\n"},"max_completion_tokens":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Integer. Maximum number of tokens the AI will generate in its response.\\nRange: 1 to 4,294,967,295. Typical values: 256-4096 for most use cases.\\n"},"temperature":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Float. Controls randomness/creativity of responses.\\nRange: 0.0 to 2.0 (provider-dependent)\\n- 0.0 = deterministic, focused responses\\n- 0.7 = balanced (common default)\\n- 1.0+ = more creative/random\\n"}},"required":["provider","user_message","output_type"]},"tools":{"type":"array","description":"Array of tools the agent can use. The agent decides which tools to call based on the task","items":{"$ref":"#/components/schemas/AgentTool"}},"type":{"type":"string","enum":["aiagent"]},"parallel":{"type":"boolean","description":"If true, the agent can execute multiple tool calls in parallel"}},"required":["tools","type","input_transforms"]},"Identity":{"type":"object","description":"Pass-through module that returns its input unchanged. Useful for flow structure or as a placeholder","properties":{"type":{"type":"string","enum":["identity"]},"flow":{"type":"boolean","description":"If true, marks this as a flow identity (special handling)"}},"required":["type"]},"FlowStatus":{"type":"object","properties":{"step":{"type":"integer"},"modules":{"type":"array","items":{"$ref":"#/components/schemas/FlowStatusModule"}},"user_states":{"additionalProperties":true},"preprocessor_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"}]},"failure_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"},{"type":"object","properties":{"parent_module":{"type":"string"}}}]},"retry":{"type":"object","properties":{"fail_count":{"type":"integer"},"failed_jobs":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"required":["step","modules","failure_module"]},"FlowStatusModule":{"type":"object","properties":{"type":{"type":"string","enum":["WaitingForPriorSteps","WaitingForEvents","WaitingForExecutor","InProgress","Success","Failure"]},"id":{"type":"string"},"job":{"type":"string","format":"uuid"},"count":{"type":"integer"},"progress":{"type":"integer"},"iterator":{"type":"object","properties":{"index":{"type":"integer"},"itered":{"type":"array","items":{}},"itered_len":{"type":"integer"},"args":{}}},"flow_jobs":{"type":"array","items":{"type":"string"}},"flow_jobs_success":{"type":"array","items":{"type":"boolean"}},"flow_jobs_duration":{"type":"object","properties":{"started_at":{"type":"array","items":{"type":"string"}},"duration_ms":{"type":"array","items":{"type":"integer"}}}},"branch_chosen":{"type":"object","properties":{"type":{"type":"string","enum":["branch","default"]},"branch":{"type":"integer"}},"required":["type"]},"branchall":{"type":"object","properties":{"branch":{"type":"integer"},"len":{"type":"integer"}},"required":["branch","len"]},"approvers":{"type":"array","items":{"type":"object","properties":{"resume_id":{"type":"integer"},"approver":{"type":"string"}},"required":["resume_id","approver"]}},"failed_retries":{"type":"array","items":{"type":"string","format":"uuid"}},"skipped":{"type":"boolean"},"agent_actions":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"type":{"type":"string","enum":["tool_call"]},"module_id":{"type":"string"}},"required":["job_id","function_name","type","module_id"]},{"type":"object","properties":{"call_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"resource_path":{"type":"string"},"type":{"type":"string","enum":["mcp_tool_call"]},"arguments":{"type":"object"}},"required":["call_id","function_name","resource_path","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_search"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["message"]}},"required":["content","type"]}]}},"agent_actions_success":{"type":"array","items":{"type":"boolean"}}},"required":["type"]}}`;
|
|
1167
1369
|
export const CLI_COMMANDS = `# Windmill CLI Commands
|
|
1168
1370
|
|
|
1169
1371
|
The Windmill CLI (\`wmill\`) provides commands for managing scripts, flows, apps, and other resources.
|
|
1170
1372
|
|
|
1171
|
-
Current version: 1.591.2
|
|
1172
|
-
|
|
1173
1373
|
## Global Options
|
|
1174
1374
|
|
|
1175
1375
|
- \`--workspace <workspace:string>\` - Specify the target workspace. This overrides the default workspace.
|
|
@@ -1185,9 +1385,25 @@ Current version: 1.591.2
|
|
|
1185
1385
|
|
|
1186
1386
|
app related commands
|
|
1187
1387
|
|
|
1388
|
+
**Options:**
|
|
1389
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1390
|
+
|
|
1188
1391
|
**Subcommands:**
|
|
1189
1392
|
|
|
1393
|
+
- \`app list\` - list all apps
|
|
1394
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1395
|
+
- \`app get <path:string>\` - get an app's details
|
|
1396
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1190
1397
|
- \`app push <file_path:string> <remote_path:string>\` - push a local app
|
|
1398
|
+
- \`app dev [app_folder:string]\` - Start a development server for building apps with live reload and hot module replacement
|
|
1399
|
+
- \`--port <port:number>\` - Port to run the dev server on (will find next available port if occupied)
|
|
1400
|
+
- \`--host <host:string>\` - Host to bind the dev server to
|
|
1401
|
+
- \`--entry <entry:string>\` - Entry point file (default: index.ts for Svelte/Vue, index.tsx otherwise)
|
|
1402
|
+
- \`--no-open\` - Don't automatically open the browser
|
|
1403
|
+
- \`app lint [app_folder:string]\` - Lint a raw app folder to validate structure and buildability
|
|
1404
|
+
- \`--fix\` - Attempt to fix common issues (not implemented yet)
|
|
1405
|
+
- \`app new\` - create a new raw app from a template
|
|
1406
|
+
- \`app generate-agents [app_folder:string]\` - regenerate AGENTS.md and DATATABLES.md from remote workspace
|
|
1191
1407
|
- \`app generate-locks [app_folder:string]\` - re-generate the lockfiles for app runnables inline scripts that have changed
|
|
1192
1408
|
- \`--yes\` - Skip confirmation prompt
|
|
1193
1409
|
- \`--dry-run\` - Perform a dry run without making changes
|
|
@@ -1202,8 +1418,6 @@ workspace dependencies related commands
|
|
|
1202
1418
|
**Subcommands:**
|
|
1203
1419
|
|
|
1204
1420
|
- \`dependencies push <file_path:string>\` - Push workspace dependencies from a local file
|
|
1205
|
-
- \`--language <language:string>\` - Programming language (python3, typescript, go, php). If not specified, will be inferred from file extension.
|
|
1206
|
-
- \`--name <name:string>\` - Name for the dependencies. If not specified, creates workspace default dependencies.
|
|
1207
1421
|
|
|
1208
1422
|
### dev
|
|
1209
1423
|
|
|
@@ -1212,33 +1426,66 @@ Launch a dev server that will spawn a webserver with HMR
|
|
|
1212
1426
|
**Options:**
|
|
1213
1427
|
- \`--includes <pattern...:string>\` - Filter paths givena glob pattern or path
|
|
1214
1428
|
|
|
1429
|
+
### docs
|
|
1430
|
+
|
|
1431
|
+
Search Windmill documentation. Requires Enterprise Edition.
|
|
1432
|
+
|
|
1433
|
+
**Arguments:** \`<query:string>\`
|
|
1434
|
+
|
|
1435
|
+
**Options:**
|
|
1436
|
+
- \`--json\` - Output results as JSON.
|
|
1437
|
+
|
|
1215
1438
|
### flow
|
|
1216
1439
|
|
|
1217
1440
|
flow related commands
|
|
1218
1441
|
|
|
1219
1442
|
**Options:**
|
|
1220
|
-
- \`--show-archived\` - Enable archived
|
|
1443
|
+
- \`--show-archived\` - Enable archived flows in output
|
|
1444
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1221
1445
|
|
|
1222
1446
|
**Subcommands:**
|
|
1223
1447
|
|
|
1448
|
+
- \`flow list\` - list all flows
|
|
1449
|
+
- \`--show-archived\` - Enable archived flows in output
|
|
1450
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1451
|
+
- \`flow get <path:string>\` - get a flow's details
|
|
1452
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1224
1453
|
- \`flow push <file_path:string> <remote_path:string>\` - push a local flow spec. This overrides any remote versions.
|
|
1225
1454
|
- \`flow run <path:string>\` - run a flow by path.
|
|
1226
1455
|
- \`-d --data <data:string>\` - Inputs specified as a JSON string or a file using @<filename> or stdin using @-.
|
|
1227
1456
|
- \`-s --silent\` - Do not ouput anything other then the final output. Useful for scripting.
|
|
1457
|
+
- \`flow preview <flow_path:string>\` - preview a local flow without deploying it. Runs the flow definition from local files.
|
|
1458
|
+
- \`-d --data <data:string>\` - Inputs specified as a JSON string or a file using @<filename> or stdin using @-.
|
|
1459
|
+
- \`-s --silent\` - Do not output anything other then the final output. Useful for scripting.
|
|
1228
1460
|
- \`flow generate-locks [flow:file]\` - re-generate the lock files of all inline scripts of all updated flows
|
|
1229
1461
|
- \`--yes\` - Skip confirmation prompt
|
|
1462
|
+
- \`-i --includes <patterns:file[]>\` - Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)
|
|
1230
1463
|
- \`-e --excludes <patterns:file[]>\` - Comma separated patterns to specify which file to NOT take into account.
|
|
1231
|
-
- \`flow
|
|
1232
|
-
- \`--summary <summary:string>\` -
|
|
1233
|
-
- \`--description <description:string>\` -
|
|
1464
|
+
- \`flow new <flow_path:string>\` - create a new empty flow
|
|
1465
|
+
- \`--summary <summary:string>\` - flow summary
|
|
1466
|
+
- \`--description <description:string>\` - flow description
|
|
1467
|
+
- \`flow bootstrap <flow_path:string>\` - create a new empty flow (alias for new
|
|
1468
|
+
- \`--summary <summary:string>\` - flow summary
|
|
1469
|
+
- \`--description <description:string>\` - flow description
|
|
1234
1470
|
|
|
1235
1471
|
### folder
|
|
1236
1472
|
|
|
1237
1473
|
folder related commands
|
|
1238
1474
|
|
|
1475
|
+
**Options:**
|
|
1476
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1477
|
+
|
|
1239
1478
|
**Subcommands:**
|
|
1240
1479
|
|
|
1241
|
-
- \`folder
|
|
1480
|
+
- \`folder list\` - list all folders
|
|
1481
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1482
|
+
- \`folder get <name:string>\` - get a folder's details
|
|
1483
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1484
|
+
- \`folder new <name:string>\` - create a new folder locally
|
|
1485
|
+
- \`--summary <summary:string>\` - folder summary
|
|
1486
|
+
- \`folder push <name:string>\` - push a local folder to the remote by name. This overrides any remote versions.
|
|
1487
|
+
- \`folder add-missing\` - create default folder.meta.yaml for all subdirectories of f/ that are missing one
|
|
1488
|
+
- \`-y, --yes\` - skip confirmation prompt
|
|
1242
1489
|
|
|
1243
1490
|
### gitsync-settings
|
|
1244
1491
|
|
|
@@ -1247,14 +1494,20 @@ Manage git-sync settings between local wmill.yaml and Windmill backend
|
|
|
1247
1494
|
**Subcommands:**
|
|
1248
1495
|
|
|
1249
1496
|
- \`gitsync-settings pull\` - Pull git-sync settings from Windmill backend to local wmill.yaml
|
|
1497
|
+
- \`--repository <repo:string>\` - Specify repository path (e.g., u/user/repo)
|
|
1498
|
+
- \`--default\` - Write settings to top-level defaults instead of overrides
|
|
1250
1499
|
- \`--replace\` - Replace existing settings (non-interactive mode)
|
|
1500
|
+
- \`--override\` - Add branch-specific override (non-interactive mode)
|
|
1251
1501
|
- \`--diff\` - Show differences without applying changes
|
|
1252
1502
|
- \`--json-output\` - Output in JSON format
|
|
1503
|
+
- \`--with-backend-settings <json:string>\` - Use provided JSON settings instead of querying backend (for testing)
|
|
1253
1504
|
- \`--yes\` - Skip interactive prompts and use default behavior
|
|
1254
1505
|
- \`--promotion <branch:string>\` - Use promotionOverrides from the specified branch instead of regular overrides
|
|
1255
1506
|
- \`gitsync-settings push\` - Push git-sync settings from local wmill.yaml to Windmill backend
|
|
1507
|
+
- \`--repository <repo:string>\` - Specify repository path (e.g., u/user/repo)
|
|
1256
1508
|
- \`--diff\` - Show what would be pushed without applying changes
|
|
1257
1509
|
- \`--json-output\` - Output in JSON format
|
|
1510
|
+
- \`--with-backend-settings <json:string>\` - Use provided JSON settings instead of querying backend (for testing)
|
|
1258
1511
|
- \`--yes\` - Skip interactive prompts and use default behavior
|
|
1259
1512
|
- \`--promotion <branch:string>\` - Use promotionOverrides from the specified branch instead of regular overrides
|
|
1260
1513
|
|
|
@@ -1311,6 +1564,9 @@ sync local with a remote instance or the opposite (push or pull)
|
|
|
1311
1564
|
- \`--prefix <prefix:string>\` - Prefix of the local workspaces folders to push
|
|
1312
1565
|
- \`--prefix-settings\` - Store instance yamls inside prefixed folders when using --prefix and --folder-per-instance
|
|
1313
1566
|
- \`instance whoami\` - Display information about the currently logged-in user
|
|
1567
|
+
- \`instance get-config\` - Dump the current instance config (global settings + worker configs) as YAML
|
|
1568
|
+
- \`-o, --output-file <file:string>\` - Write YAML to a file instead of stdout
|
|
1569
|
+
- \`--instance <instance:string>\` - Name of the instance, override the active instance
|
|
1314
1570
|
|
|
1315
1571
|
### jobs
|
|
1316
1572
|
|
|
@@ -1323,6 +1579,22 @@ Pull completed and queued jobs from workspace
|
|
|
1323
1579
|
- \`-q, --queued-output <file:string>\` - Queued jobs output file (default: queued_jobs.json)
|
|
1324
1580
|
- \`--skip-worker-check\` - Skip checking for active workers before export
|
|
1325
1581
|
|
|
1582
|
+
**Subcommands:**
|
|
1583
|
+
|
|
1584
|
+
- \`jobs pull\`
|
|
1585
|
+
- \`jobs push\`
|
|
1586
|
+
|
|
1587
|
+
### lint
|
|
1588
|
+
|
|
1589
|
+
Validate Windmill flow, schedule, and trigger YAML files in a directory
|
|
1590
|
+
|
|
1591
|
+
**Arguments:** \`[directory:string]\`
|
|
1592
|
+
|
|
1593
|
+
**Options:**
|
|
1594
|
+
- \`--json\` - Output results in JSON format
|
|
1595
|
+
- \`--fail-on-warn\` - Exit with code 1 when warnings are emitted
|
|
1596
|
+
- \`--locks-required\` - Fail if scripts or flow inline scripts that need locks have no locks
|
|
1597
|
+
|
|
1326
1598
|
### queues
|
|
1327
1599
|
|
|
1328
1600
|
List all queues with their metrics
|
|
@@ -1337,18 +1609,33 @@ List all queues with their metrics
|
|
|
1337
1609
|
|
|
1338
1610
|
resource related commands
|
|
1339
1611
|
|
|
1612
|
+
**Options:**
|
|
1613
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1614
|
+
|
|
1340
1615
|
**Subcommands:**
|
|
1341
1616
|
|
|
1617
|
+
- \`resource list\` - list all resources
|
|
1618
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1619
|
+
- \`resource get <path:string>\` - get a resource's details
|
|
1620
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1621
|
+
- \`resource new <path:string>\` - create a new resource locally
|
|
1342
1622
|
- \`resource push <file_path:string> <remote_path:string>\` - push a local resource spec. This overrides any remote versions.
|
|
1343
1623
|
|
|
1344
1624
|
### resource-type
|
|
1345
1625
|
|
|
1346
1626
|
resource type related commands
|
|
1347
1627
|
|
|
1628
|
+
**Options:**
|
|
1629
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1630
|
+
|
|
1348
1631
|
**Subcommands:**
|
|
1349
1632
|
|
|
1350
1633
|
- \`resource-type list\` - list all resource types
|
|
1351
1634
|
- \`--schema\` - Show schema in the output
|
|
1635
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1636
|
+
- \`resource-type get <path:string>\` - get a resource type's details
|
|
1637
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1638
|
+
- \`resource-type new <name:string>\` - create a new resource type locally
|
|
1352
1639
|
- \`resource-type push <file_path:string> <name:string>\` - push a local resource spec. This overrides any remote versions.
|
|
1353
1640
|
- \`resource-type generate-namespace\` - Create a TypeScript definition file with the RT namespace generated from the resource types
|
|
1354
1641
|
|
|
@@ -1356,8 +1643,16 @@ resource type related commands
|
|
|
1356
1643
|
|
|
1357
1644
|
schedule related commands
|
|
1358
1645
|
|
|
1646
|
+
**Options:**
|
|
1647
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1648
|
+
|
|
1359
1649
|
**Subcommands:**
|
|
1360
1650
|
|
|
1651
|
+
- \`schedule list\` - list all schedules
|
|
1652
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1653
|
+
- \`schedule get <path:string>\` - get a schedule's details
|
|
1654
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1655
|
+
- \`schedule new <path:string>\` - create a new schedule locally
|
|
1361
1656
|
- \`schedule push <file_path:string> <remote_path:string>\` - push a local schedule spec. This overrides any remote versions.
|
|
1362
1657
|
|
|
1363
1658
|
### script
|
|
@@ -1366,22 +1661,35 @@ script related commands
|
|
|
1366
1661
|
|
|
1367
1662
|
**Options:**
|
|
1368
1663
|
- \`--show-archived\` - Enable archived scripts in output
|
|
1664
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1369
1665
|
|
|
1370
1666
|
**Subcommands:**
|
|
1371
1667
|
|
|
1372
|
-
- \`script
|
|
1373
|
-
- \`
|
|
1668
|
+
- \`script list\` - list all scripts
|
|
1669
|
+
- \`--show-archived\` - Enable archived scripts in output
|
|
1670
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1671
|
+
- \`script push <path:file>\` - push a local script spec. This overrides any remote versions. Use the script file (.ts, .js, .py, .sh
|
|
1672
|
+
- \`script get <path:file>\` - get a script's details
|
|
1673
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1674
|
+
- \`script show <path:file>\` - show a script's content (alias for get
|
|
1374
1675
|
- \`script run <path:file>\` - run a script by path
|
|
1375
1676
|
- \`-d --data <data:file>\` - Inputs specified as a JSON string or a file using @<filename> or stdin using @-.
|
|
1376
1677
|
- \`-s --silent\` - Do not output anything other then the final output. Useful for scripting.
|
|
1377
|
-
- \`script
|
|
1678
|
+
- \`script preview <path:file>\` - preview a local script without deploying it. Supports both regular and codebase scripts.
|
|
1679
|
+
- \`-d --data <data:file>\` - Inputs specified as a JSON string or a file using @<filename> or stdin using @-.
|
|
1680
|
+
- \`-s --silent\` - Do not output anything other than the final output. Useful for scripting.
|
|
1681
|
+
- \`script new <path:file> <language:string>\` - create a new script
|
|
1378
1682
|
- \`--summary <summary:string>\` - script summary
|
|
1379
1683
|
- \`--description <description:string>\` - script description
|
|
1380
|
-
- \`script
|
|
1684
|
+
- \`script bootstrap <path:file> <language:string>\` - create a new script (alias for new
|
|
1685
|
+
- \`--summary <summary:string>\` - script summary
|
|
1686
|
+
- \`--description <description:string>\` - script description
|
|
1687
|
+
- \`script generate-metadata [script:file]\` - re-generate the metadata file updating the lock and the script schema (for flows, use \`wmill flow generate-locks\`
|
|
1381
1688
|
- \`--yes\` - Skip confirmation prompt
|
|
1382
1689
|
- \`--dry-run\` - Perform a dry run without making changes
|
|
1383
1690
|
- \`--lock-only\` - re-generate only the lock
|
|
1384
1691
|
- \`--schema-only\` - re-generate only script schema
|
|
1692
|
+
- \`-i --includes <patterns:file[]>\` - Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)
|
|
1385
1693
|
- \`-e --excludes <patterns:file[]>\` - Comma separated patterns to specify which file to NOT take into account.
|
|
1386
1694
|
|
|
1387
1695
|
### sync
|
|
@@ -1413,9 +1721,12 @@ sync local with a remote workspaces or the opposite (push or pull)
|
|
|
1413
1721
|
- \`--include-key\` - Include workspace encryption key
|
|
1414
1722
|
- \`--skip-branch-validation\` - Skip git branch validation and prompts
|
|
1415
1723
|
- \`--json-output\` - Output results in JSON format
|
|
1724
|
+
- \`-i --includes <patterns:file[]>\` - Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Overrides wmill.yaml includes
|
|
1416
1725
|
- \`-e --excludes <patterns:file[]>\` - Comma separated patterns to specify which file to NOT take into account. Overrides wmill.yaml excludes
|
|
1726
|
+
- \`--extra-includes <patterns:file[]>\` - Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy
|
|
1417
1727
|
- \`--repository <repo:string>\` - Specify repository path (e.g., u/user/repo) when multiple repositories exist
|
|
1418
1728
|
- \`--promotion <branch:string>\` - Use promotionOverrides from the specified branch instead of regular overrides
|
|
1729
|
+
- \`--branch <branch:string>\` - Override the current git branch (works even outside a git repository)
|
|
1419
1730
|
- \`sync push\` - Push any local changes and apply them remotely.
|
|
1420
1731
|
- \`--yes\` - Push without needing confirmation
|
|
1421
1732
|
- \`--dry-run\` - Show changes that would be pushed without actually pushing
|
|
@@ -1439,17 +1750,32 @@ sync local with a remote workspaces or the opposite (push or pull)
|
|
|
1439
1750
|
- \`--include-key\` - Include workspace encryption key
|
|
1440
1751
|
- \`--skip-branch-validation\` - Skip git branch validation and prompts
|
|
1441
1752
|
- \`--json-output\` - Output results in JSON format
|
|
1753
|
+
- \`-i --includes <patterns:file[]>\` - Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)
|
|
1442
1754
|
- \`-e --excludes <patterns:file[]>\` - Comma separated patterns to specify which file to NOT take into account.
|
|
1755
|
+
- \`--extra-includes <patterns:file[]>\` - Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy
|
|
1443
1756
|
- \`--message <message:string>\` - Include a message that will be added to all scripts/flows/apps updated during this push
|
|
1444
1757
|
- \`--parallel <number>\` - Number of changes to process in parallel
|
|
1445
1758
|
- \`--repository <repo:string>\` - Specify repository path (e.g., u/user/repo) when multiple repositories exist
|
|
1759
|
+
- \`--branch <branch:string>\` - Override the current git branch (works even outside a git repository)
|
|
1760
|
+
- \`--lint\` - Run lint validation before pushing
|
|
1761
|
+
- \`--locks-required\` - Fail if scripts or flow inline scripts that need locks have no locks
|
|
1446
1762
|
|
|
1447
1763
|
### trigger
|
|
1448
1764
|
|
|
1449
1765
|
trigger related commands
|
|
1450
1766
|
|
|
1767
|
+
**Options:**
|
|
1768
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1769
|
+
|
|
1451
1770
|
**Subcommands:**
|
|
1452
1771
|
|
|
1772
|
+
- \`trigger list\` - list all triggers
|
|
1773
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1774
|
+
- \`trigger get <path:string>\` - get a trigger's details
|
|
1775
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1776
|
+
- \`--kind <kind:string>\` - Trigger kind (http, websocket, kafka, nats, postgres, mqtt, sqs, gcp, email). Recommended for faster lookup
|
|
1777
|
+
- \`trigger new <path:string>\` - create a new trigger locally
|
|
1778
|
+
- \`--kind <kind:string>\` - Trigger kind (required: http, websocket, kafka, nats, postgres, mqtt, sqs, gcp, email)
|
|
1453
1779
|
- \`trigger push <file_path:string> <remote_path:string>\` - push a local trigger spec. This overrides any remote versions.
|
|
1454
1780
|
|
|
1455
1781
|
### user
|
|
@@ -1464,13 +1790,23 @@ user related commands
|
|
|
1464
1790
|
- \`--name <name:string>\` - Specify to set the name of the new user.
|
|
1465
1791
|
- \`user remove <email:string>\` - Delete a user
|
|
1466
1792
|
- \`user create-token\`
|
|
1793
|
+
- \`--email <email:string>\` - Specify credentials to use for authentication. This will not be stored. It will only be used to exchange for a token with the API server, which will not be stored either.
|
|
1794
|
+
- \`--password <password:string>\` - Specify credentials to use for authentication. This will not be stored. It will only be used to exchange for a token with the API server, which will not be stored either.
|
|
1467
1795
|
|
|
1468
1796
|
### variable
|
|
1469
1797
|
|
|
1470
1798
|
variable related commands
|
|
1471
1799
|
|
|
1800
|
+
**Options:**
|
|
1801
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1802
|
+
|
|
1472
1803
|
**Subcommands:**
|
|
1473
1804
|
|
|
1805
|
+
- \`variable list\` - list all variables
|
|
1806
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1807
|
+
- \`variable get <path:string>\` - get a variable's details
|
|
1808
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1809
|
+
- \`variable new <path:string>\` - create a new variable locally
|
|
1474
1810
|
- \`variable push <file_path:string> <remote_path:string>\` - Push a local variable spec. This overrides any remote versions.
|
|
1475
1811
|
- \`--plain-secrets\` - Push secrets as plain text
|
|
1476
1812
|
- \`variable add <value:string> <remote_path:string>\` - Create a new variable on the remote. This will update the variable if it already exists.
|
|
@@ -1516,8 +1852,11 @@ workspace related commands
|
|
|
1516
1852
|
- \`workspace add [workspace_name:string] [workspace_id:string] [remote:string]\` - Add a workspace
|
|
1517
1853
|
- \`-c --create\` - Create the workspace if it does not exist
|
|
1518
1854
|
- \`--create-workspace-name <workspace_name:string>\` - Specify the workspace name. Ignored if --create is not specified or the workspace already exists. Will default to the workspace id.
|
|
1855
|
+
- \`--create-username <username:string>\` - Specify your own username in the newly created workspace. Ignored if --create is not specified, the workspace already exists or automatic username creation is enabled on the instance.
|
|
1519
1856
|
- \`workspace remove <workspace_name:string>\` - Remove a workspace
|
|
1520
1857
|
- \`workspace whoami\` - Show the currently active user
|
|
1858
|
+
- \`workspace list\` - List local workspace profiles
|
|
1859
|
+
- \`workspace list-remote\` - List workspaces on the remote server that you have access to
|
|
1521
1860
|
- \`workspace bind\` - Bind the current Git branch to the active workspace
|
|
1522
1861
|
- \`--branch <branch:string>\` - Specify branch (defaults to current)
|
|
1523
1862
|
- \`workspace unbind\` - Remove workspace binding from the current Git branch
|
|
@@ -1528,147 +1867,90 @@ workspace related commands
|
|
|
1528
1867
|
- \`-y --yes\` - Skip confirmation prompt
|
|
1529
1868
|
|
|
1530
1869
|
`;
|
|
1531
|
-
export const
|
|
1870
|
+
export const LANG_BASH = `# Bash
|
|
1532
1871
|
|
|
1533
1872
|
## Structure
|
|
1534
1873
|
|
|
1535
|
-
|
|
1874
|
+
Do not include \`#!/bin/bash\`. Arguments are obtained as positional parameters:
|
|
1536
1875
|
|
|
1537
|
-
\`\`\`
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
\`\`\`
|
|
1876
|
+
\`\`\`bash
|
|
1877
|
+
# Get arguments
|
|
1878
|
+
var1="$1"
|
|
1879
|
+
var2="$2"
|
|
1542
1880
|
|
|
1543
|
-
|
|
1881
|
+
echo "Processing $var1 and $var2"
|
|
1544
1882
|
|
|
1545
|
-
|
|
1883
|
+
# Return JSON by echoing to stdout
|
|
1884
|
+
echo "{\\"result\\": \\"$var1\\", \\"count\\": $var2}"
|
|
1885
|
+
\`\`\`
|
|
1546
1886
|
|
|
1547
|
-
|
|
1887
|
+
**Important:**
|
|
1888
|
+
- Do not include shebang (\`#!/bin/bash\`)
|
|
1889
|
+
- Arguments are always strings
|
|
1890
|
+
- Access with \`$1\`, \`$2\`, etc.
|
|
1548
1891
|
|
|
1549
|
-
|
|
1892
|
+
## Output
|
|
1550
1893
|
|
|
1551
|
-
|
|
1552
|
-
from typing import TypedDict
|
|
1894
|
+
The script output is captured as the result. For structured data, output valid JSON:
|
|
1553
1895
|
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
user: str
|
|
1558
|
-
password: str
|
|
1559
|
-
dbname: str
|
|
1896
|
+
\`\`\`bash
|
|
1897
|
+
name="$1"
|
|
1898
|
+
count="$2"
|
|
1560
1899
|
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1900
|
+
# Output JSON result
|
|
1901
|
+
cat << EOF
|
|
1902
|
+
{
|
|
1903
|
+
"name": "$name",
|
|
1904
|
+
"count": $count,
|
|
1905
|
+
"timestamp": "$(date -Iseconds)"
|
|
1906
|
+
}
|
|
1907
|
+
EOF
|
|
1564
1908
|
\`\`\`
|
|
1565
1909
|
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
- The resource type name must be **IN LOWERCASE**
|
|
1569
|
-
- Only include resource types if they are actually needed
|
|
1570
|
-
- If an import conflicts with a resource type name, **rename the imported object, not the type name**
|
|
1571
|
-
- Make sure to import TypedDict from typing **if you're using it**
|
|
1572
|
-
|
|
1573
|
-
## Imports
|
|
1910
|
+
## Environment Variables
|
|
1574
1911
|
|
|
1575
|
-
|
|
1912
|
+
Environment variables set in Windmill are available:
|
|
1576
1913
|
|
|
1577
|
-
\`\`\`
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1914
|
+
\`\`\`bash
|
|
1915
|
+
# Access environment variable
|
|
1916
|
+
echo "Workspace: $WM_WORKSPACE"
|
|
1917
|
+
echo "Job ID: $WM_JOB_ID"
|
|
1581
1918
|
\`\`\`
|
|
1919
|
+
`;
|
|
1920
|
+
export const LANG_BIGQUERY = `# BigQuery
|
|
1582
1921
|
|
|
1583
|
-
|
|
1922
|
+
Arguments use \`@name\` syntax.
|
|
1584
1923
|
|
|
1585
|
-
|
|
1586
|
-
# Wrong - don't rename the type
|
|
1587
|
-
import stripe as stripe_lib
|
|
1588
|
-
class stripe_type(TypedDict): ...
|
|
1924
|
+
Name the parameters by adding comments before the statement:
|
|
1589
1925
|
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1926
|
+
\`\`\`sql
|
|
1927
|
+
-- @name1 (string)
|
|
1928
|
+
-- @name2 (int64) = 0
|
|
1929
|
+
SELECT * FROM users WHERE name = @name1 AND age > @name2;
|
|
1594
1930
|
\`\`\`
|
|
1931
|
+
`;
|
|
1932
|
+
export const LANG_BUN = `# TypeScript (Bun)
|
|
1595
1933
|
|
|
1596
|
-
|
|
1934
|
+
Bun runtime with full npm ecosystem and fastest execution.
|
|
1597
1935
|
|
|
1598
|
-
|
|
1936
|
+
## Structure
|
|
1599
1937
|
|
|
1600
|
-
|
|
1601
|
-
|
|
1938
|
+
Export a single **async** function called \`main\`:
|
|
1939
|
+
|
|
1940
|
+
\`\`\`typescript
|
|
1941
|
+
export async function main(param1: string, param2: number) {
|
|
1942
|
+
// Your code here
|
|
1943
|
+
return { result: param1, count: param2 };
|
|
1944
|
+
}
|
|
1602
1945
|
\`\`\`
|
|
1603
1946
|
|
|
1604
|
-
|
|
1947
|
+
Do not call the main function. Libraries are installed automatically.
|
|
1605
1948
|
|
|
1606
|
-
##
|
|
1949
|
+
## Resource Types
|
|
1607
1950
|
|
|
1608
|
-
|
|
1951
|
+
On Windmill, credentials and configuration are stored in resources and passed as parameters to main.
|
|
1609
1952
|
|
|
1610
|
-
|
|
1611
|
-
from typing import TypedDict, Literal, Any
|
|
1612
|
-
|
|
1613
|
-
class Event(TypedDict):
|
|
1614
|
-
kind: Literal["webhook", "http", "websocket", "kafka", "email", "nats", "postgres", "sqs", "mqtt", "gcp"]
|
|
1615
|
-
body: Any
|
|
1616
|
-
headers: dict[str, str]
|
|
1617
|
-
query: dict[str, str]
|
|
1618
|
-
|
|
1619
|
-
def preprocessor(event: Event):
|
|
1620
|
-
# Transform the event into flow input parameters
|
|
1621
|
-
return {
|
|
1622
|
-
"param1": event["body"]["field1"],
|
|
1623
|
-
"param2": event["query"]["id"]
|
|
1624
|
-
}
|
|
1625
|
-
\`\`\`
|
|
1626
|
-
|
|
1627
|
-
## S3 Object Operations
|
|
1628
|
-
|
|
1629
|
-
Windmill provides built-in support for S3-compatible storage operations.
|
|
1630
|
-
|
|
1631
|
-
\`\`\`python
|
|
1632
|
-
import wmill
|
|
1633
|
-
|
|
1634
|
-
# Load file content from S3
|
|
1635
|
-
content: bytes = wmill.load_s3_file(s3object)
|
|
1636
|
-
|
|
1637
|
-
# Load file as stream reader
|
|
1638
|
-
reader: BufferedReader = wmill.load_s3_file_reader(s3object)
|
|
1639
|
-
|
|
1640
|
-
# Write file to S3
|
|
1641
|
-
result: S3Object = wmill.write_s3_file(
|
|
1642
|
-
s3object, # Target path (or None to auto-generate)
|
|
1643
|
-
file_content, # bytes or BufferedReader
|
|
1644
|
-
s3_resource_path, # Optional: specific S3 resource
|
|
1645
|
-
content_type, # Optional: MIME type
|
|
1646
|
-
content_disposition # Optional: Content-Disposition header
|
|
1647
|
-
)
|
|
1648
|
-
\`\`\`
|
|
1649
|
-
`;
|
|
1650
|
-
export const LANG_BUN = `# TypeScript (Bun)
|
|
1651
|
-
|
|
1652
|
-
Bun runtime with full npm ecosystem and fastest execution.
|
|
1653
|
-
|
|
1654
|
-
## Structure
|
|
1655
|
-
|
|
1656
|
-
Export a single **async** function called \`main\`:
|
|
1657
|
-
|
|
1658
|
-
\`\`\`typescript
|
|
1659
|
-
export async function main(param1: string, param2: number) {
|
|
1660
|
-
// Your code here
|
|
1661
|
-
return { result: param1, count: param2 };
|
|
1662
|
-
}
|
|
1663
|
-
\`\`\`
|
|
1664
|
-
|
|
1665
|
-
Do not call the main function. Libraries are installed automatically.
|
|
1666
|
-
|
|
1667
|
-
## Resource Types
|
|
1668
|
-
|
|
1669
|
-
On Windmill, credentials and configuration are stored in resources and passed as parameters to main.
|
|
1670
|
-
|
|
1671
|
-
Use the \`RT\` namespace for resource types:
|
|
1953
|
+
Use the \`RT\` namespace for resource types:
|
|
1672
1954
|
|
|
1673
1955
|
\`\`\`typescript
|
|
1674
1956
|
export async function main(stripe: RT.Stripe) {
|
|
@@ -1678,6 +1960,8 @@ export async function main(stripe: RT.Stripe) {
|
|
|
1678
1960
|
|
|
1679
1961
|
Only use resource types if you need them to satisfy the instructions. Always use the RT namespace.
|
|
1680
1962
|
|
|
1963
|
+
Before using a resource type, check the \`rt.d.ts\` file in the project root to see all available resource types and their fields. This file is generated by \`wmill resource-type generate-namespace\`.
|
|
1964
|
+
|
|
1681
1965
|
## Imports
|
|
1682
1966
|
|
|
1683
1967
|
\`\`\`typescript
|
|
@@ -1758,142 +2042,156 @@ const result: S3Object = await wmill.writeS3File(
|
|
|
1758
2042
|
);
|
|
1759
2043
|
\`\`\`
|
|
1760
2044
|
`;
|
|
1761
|
-
export const
|
|
2045
|
+
export const LANG_BUNNATIVE = `# TypeScript (Bun Native)
|
|
1762
2046
|
|
|
1763
|
-
|
|
2047
|
+
Native TypeScript execution with fetch only - no external imports allowed.
|
|
1764
2048
|
|
|
1765
|
-
|
|
2049
|
+
## Structure
|
|
1766
2050
|
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
2051
|
+
Export a single **async** function called \`main\`:
|
|
2052
|
+
|
|
2053
|
+
\`\`\`typescript
|
|
2054
|
+
export async function main(param1: string, param2: number) {
|
|
2055
|
+
// Your code here
|
|
2056
|
+
return { result: param1, count: param2 };
|
|
2057
|
+
}
|
|
1771
2058
|
\`\`\`
|
|
1772
|
-
`;
|
|
1773
|
-
export const LANG_POWERSHELL = `# PowerShell
|
|
1774
2059
|
|
|
1775
|
-
|
|
2060
|
+
Do not call the main function.
|
|
1776
2061
|
|
|
1777
|
-
|
|
2062
|
+
## Resource Types
|
|
1778
2063
|
|
|
1779
|
-
|
|
1780
|
-
param($Name, $Count = 0, [int]$Age)
|
|
2064
|
+
On Windmill, credentials and configuration are stored in resources and passed as parameters to main.
|
|
1781
2065
|
|
|
1782
|
-
|
|
1783
|
-
Write-Output "Processing $Name, count: $Count, age: $Age"
|
|
2066
|
+
Use the \`RT\` namespace for resource types:
|
|
1784
2067
|
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
count = $Count
|
|
1789
|
-
age = $Age
|
|
2068
|
+
\`\`\`typescript
|
|
2069
|
+
export async function main(stripe: RT.Stripe) {
|
|
2070
|
+
// stripe contains API key and config from the resource
|
|
1790
2071
|
}
|
|
1791
2072
|
\`\`\`
|
|
1792
2073
|
|
|
1793
|
-
|
|
2074
|
+
Only use resource types if you need them to satisfy the instructions. Always use the RT namespace.
|
|
1794
2075
|
|
|
1795
|
-
|
|
2076
|
+
Before using a resource type, check the \`rt.d.ts\` file in the project root to see all available resource types and their fields. This file is generated by \`wmill resource-type generate-namespace\`.
|
|
1796
2077
|
|
|
1797
|
-
|
|
1798
|
-
param(
|
|
1799
|
-
[string]$Name,
|
|
1800
|
-
[int]$Count = 0,
|
|
1801
|
-
[bool]$Enabled = $true,
|
|
1802
|
-
[array]$Items
|
|
1803
|
-
)
|
|
2078
|
+
## Imports
|
|
1804
2079
|
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
2080
|
+
**No imports allowed.** Use the globally available \`fetch\` function:
|
|
2081
|
+
|
|
2082
|
+
\`\`\`typescript
|
|
2083
|
+
export async function main(url: string) {
|
|
2084
|
+
const response = await fetch(url);
|
|
2085
|
+
return await response.json();
|
|
1810
2086
|
}
|
|
1811
2087
|
\`\`\`
|
|
1812
2088
|
|
|
1813
|
-
##
|
|
1814
|
-
|
|
1815
|
-
Return values by outputting them at the end of the script:
|
|
1816
|
-
|
|
1817
|
-
\`\`\`powershell
|
|
1818
|
-
param($Input)
|
|
2089
|
+
## Windmill Client
|
|
1819
2090
|
|
|
1820
|
-
|
|
1821
|
-
processed = $true
|
|
1822
|
-
data = $Input
|
|
1823
|
-
timestamp = Get-Date -Format "o"
|
|
1824
|
-
}
|
|
2091
|
+
The windmill client is not available in native TypeScript mode. Use fetch to call APIs directly.
|
|
1825
2092
|
|
|
1826
|
-
|
|
1827
|
-
\`\`\`
|
|
1828
|
-
`;
|
|
1829
|
-
export const LANG_SNOWFLAKE = `# Snowflake
|
|
2093
|
+
## Preprocessor Scripts
|
|
1830
2094
|
|
|
1831
|
-
|
|
2095
|
+
For preprocessor scripts, the function should be named \`preprocessor\` and receives an \`event\` parameter:
|
|
1832
2096
|
|
|
1833
|
-
|
|
2097
|
+
\`\`\`typescript
|
|
2098
|
+
type Event = {
|
|
2099
|
+
kind:
|
|
2100
|
+
| "webhook"
|
|
2101
|
+
| "http"
|
|
2102
|
+
| "websocket"
|
|
2103
|
+
| "kafka"
|
|
2104
|
+
| "email"
|
|
2105
|
+
| "nats"
|
|
2106
|
+
| "postgres"
|
|
2107
|
+
| "sqs"
|
|
2108
|
+
| "mqtt"
|
|
2109
|
+
| "gcp";
|
|
2110
|
+
body: any;
|
|
2111
|
+
headers: Record<string, string>;
|
|
2112
|
+
query: Record<string, string>;
|
|
2113
|
+
};
|
|
1834
2114
|
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
2115
|
+
export async function preprocessor(event: Event) {
|
|
2116
|
+
return {
|
|
2117
|
+
param1: event.body.field1,
|
|
2118
|
+
param2: event.query.id,
|
|
2119
|
+
};
|
|
2120
|
+
}
|
|
1839
2121
|
\`\`\`
|
|
1840
|
-
`;
|
|
1841
|
-
export const LANG_GO = `# Go
|
|
1842
2122
|
|
|
1843
|
-
##
|
|
2123
|
+
## S3 Object Operations
|
|
1844
2124
|
|
|
1845
|
-
|
|
2125
|
+
Windmill provides built-in support for S3-compatible storage operations.
|
|
1846
2126
|
|
|
1847
|
-
|
|
1848
|
-
package inner
|
|
2127
|
+
### S3Object Type
|
|
1849
2128
|
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
}
|
|
2129
|
+
The S3Object type represents a file in S3 storage:
|
|
2130
|
+
|
|
2131
|
+
\`\`\`typescript
|
|
2132
|
+
type S3Object = {
|
|
2133
|
+
s3: string; // Path within the bucket
|
|
2134
|
+
};
|
|
1856
2135
|
\`\`\`
|
|
1857
2136
|
|
|
1858
|
-
|
|
1859
|
-
- Package must be \`inner\`
|
|
1860
|
-
- Return type must be \`({return_type}, error)\`
|
|
1861
|
-
- Function name is \`main\` (lowercase)
|
|
2137
|
+
## TypeScript Operations
|
|
1862
2138
|
|
|
1863
|
-
|
|
2139
|
+
\`\`\`typescript
|
|
2140
|
+
import * as wmill from "windmill-client";
|
|
1864
2141
|
|
|
1865
|
-
|
|
2142
|
+
// Load file content from S3
|
|
2143
|
+
const content: Uint8Array = await wmill.loadS3File(s3object);
|
|
1866
2144
|
|
|
1867
|
-
|
|
1868
|
-
|
|
2145
|
+
// Load file as stream
|
|
2146
|
+
const blob: Blob = await wmill.loadS3FileStream(s3object);
|
|
1869
2147
|
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
2148
|
+
// Write file to S3
|
|
2149
|
+
const result: S3Object = await wmill.writeS3File(
|
|
2150
|
+
s3object, // Target path (or undefined to auto-generate)
|
|
2151
|
+
fileContent, // string or Blob
|
|
2152
|
+
s3ResourcePath // Optional: specific S3 resource to use
|
|
2153
|
+
);
|
|
2154
|
+
\`\`\`
|
|
2155
|
+
`;
|
|
2156
|
+
export const LANG_CSHARP = `# C#
|
|
1874
2157
|
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
2158
|
+
The script must contain a public static \`Main\` method inside a class:
|
|
2159
|
+
|
|
2160
|
+
\`\`\`csharp
|
|
2161
|
+
public class Script
|
|
2162
|
+
{
|
|
2163
|
+
public static object Main(string name, int count)
|
|
2164
|
+
{
|
|
2165
|
+
return new { Name = name, Count = count };
|
|
2166
|
+
}
|
|
1880
2167
|
}
|
|
1881
2168
|
\`\`\`
|
|
1882
2169
|
|
|
1883
|
-
|
|
2170
|
+
**Important:**
|
|
2171
|
+
- Class name is irrelevant
|
|
2172
|
+
- Method must be \`public static\`
|
|
2173
|
+
- Return type can be \`object\` or specific type
|
|
1884
2174
|
|
|
1885
|
-
|
|
2175
|
+
## NuGet Packages
|
|
1886
2176
|
|
|
1887
|
-
|
|
1888
|
-
package inner
|
|
2177
|
+
Add packages using the \`#r\` directive at the top:
|
|
1889
2178
|
|
|
1890
|
-
|
|
2179
|
+
\`\`\`csharp
|
|
2180
|
+
#r "nuget: Newtonsoft.Json, 13.0.3"
|
|
2181
|
+
#r "nuget: RestSharp, 110.2.0"
|
|
1891
2182
|
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
2183
|
+
using Newtonsoft.Json;
|
|
2184
|
+
using RestSharp;
|
|
2185
|
+
|
|
2186
|
+
public class Script
|
|
2187
|
+
{
|
|
2188
|
+
public static object Main(string url)
|
|
2189
|
+
{
|
|
2190
|
+
var client = new RestClient(url);
|
|
2191
|
+
var request = new RestRequest();
|
|
2192
|
+
var response = client.Get(request);
|
|
2193
|
+
return JsonConvert.DeserializeObject(response.Content);
|
|
1895
2194
|
}
|
|
1896
|
-
return "success", nil
|
|
1897
2195
|
}
|
|
1898
2196
|
\`\`\`
|
|
1899
2197
|
`;
|
|
@@ -1928,6 +2226,8 @@ export async function main(stripe: RT.Stripe) {
|
|
|
1928
2226
|
|
|
1929
2227
|
Only use resource types if you need them to satisfy the instructions. Always use the RT namespace.
|
|
1930
2228
|
|
|
2229
|
+
Before using a resource type, check the \`rt.d.ts\` file in the project root to see all available resource types and their fields. This file is generated by \`wmill resource-type generate-namespace\`.
|
|
2230
|
+
|
|
1931
2231
|
## Imports
|
|
1932
2232
|
|
|
1933
2233
|
\`\`\`typescript
|
|
@@ -2012,57 +2312,227 @@ const result: S3Object = await wmill.writeS3File(
|
|
|
2012
2312
|
);
|
|
2013
2313
|
\`\`\`
|
|
2014
2314
|
`;
|
|
2015
|
-
export const
|
|
2315
|
+
export const LANG_DUCKDB = `# DuckDB
|
|
2316
|
+
|
|
2317
|
+
Arguments are defined with comments and used with \`$name\` syntax:
|
|
2318
|
+
|
|
2319
|
+
\`\`\`sql
|
|
2320
|
+
-- $name (text) = default
|
|
2321
|
+
-- $age (integer)
|
|
2322
|
+
SELECT * FROM users WHERE name = $name AND age > $age;
|
|
2323
|
+
\`\`\`
|
|
2324
|
+
|
|
2325
|
+
## Ducklake Integration
|
|
2326
|
+
|
|
2327
|
+
Attach Ducklake for data lake operations:
|
|
2328
|
+
|
|
2329
|
+
\`\`\`sql
|
|
2330
|
+
-- Main ducklake
|
|
2331
|
+
ATTACH 'ducklake' AS dl;
|
|
2332
|
+
|
|
2333
|
+
-- Named ducklake
|
|
2334
|
+
ATTACH 'ducklake://my_lake' AS dl;
|
|
2335
|
+
|
|
2336
|
+
-- Then query
|
|
2337
|
+
SELECT * FROM dl.schema.table;
|
|
2338
|
+
\`\`\`
|
|
2339
|
+
|
|
2340
|
+
## External Database Connections
|
|
2341
|
+
|
|
2342
|
+
Connect to external databases using resources:
|
|
2343
|
+
|
|
2344
|
+
\`\`\`sql
|
|
2345
|
+
ATTACH '$res:path/to/resource' AS db (TYPE postgres);
|
|
2346
|
+
SELECT * FROM db.schema.table;
|
|
2347
|
+
\`\`\`
|
|
2348
|
+
|
|
2349
|
+
## S3 File Operations
|
|
2350
|
+
|
|
2351
|
+
Read files from S3 storage:
|
|
2352
|
+
|
|
2353
|
+
\`\`\`sql
|
|
2354
|
+
-- Default storage
|
|
2355
|
+
SELECT * FROM read_csv('s3:///path/to/file.csv');
|
|
2356
|
+
|
|
2357
|
+
-- Named storage
|
|
2358
|
+
SELECT * FROM read_csv('s3://storage_name/path/to/file.csv');
|
|
2359
|
+
|
|
2360
|
+
-- Parquet files
|
|
2361
|
+
SELECT * FROM read_parquet('s3:///path/to/file.parquet');
|
|
2362
|
+
|
|
2363
|
+
-- JSON files
|
|
2364
|
+
SELECT * FROM read_json('s3:///path/to/file.json');
|
|
2365
|
+
\`\`\`
|
|
2366
|
+
`;
|
|
2367
|
+
export const LANG_GO = `# Go
|
|
2016
2368
|
|
|
2017
2369
|
## Structure
|
|
2018
2370
|
|
|
2019
|
-
|
|
2371
|
+
The file package must be \`inner\` and export a function called \`main\`:
|
|
2020
2372
|
|
|
2021
|
-
\`\`\`
|
|
2022
|
-
|
|
2023
|
-
var1="$1"
|
|
2024
|
-
var2="$2"
|
|
2373
|
+
\`\`\`go
|
|
2374
|
+
package inner
|
|
2025
2375
|
|
|
2026
|
-
|
|
2376
|
+
func main(param1 string, param2 int) (map[string]interface{}, error) {
|
|
2377
|
+
return map[string]interface{}{
|
|
2378
|
+
"result": param1,
|
|
2379
|
+
"count": param2,
|
|
2380
|
+
}, nil
|
|
2381
|
+
}
|
|
2382
|
+
\`\`\`
|
|
2027
2383
|
|
|
2028
|
-
|
|
2029
|
-
|
|
2384
|
+
**Important:**
|
|
2385
|
+
- Package must be \`inner\`
|
|
2386
|
+
- Return type must be \`({return_type}, error)\`
|
|
2387
|
+
- Function name is \`main\` (lowercase)
|
|
2388
|
+
|
|
2389
|
+
## Return Types
|
|
2390
|
+
|
|
2391
|
+
The return type can be any Go type that can be serialized to JSON:
|
|
2392
|
+
|
|
2393
|
+
\`\`\`go
|
|
2394
|
+
package inner
|
|
2395
|
+
|
|
2396
|
+
type Result struct {
|
|
2397
|
+
Name string \`json:"name"\`
|
|
2398
|
+
Count int \`json:"count"\`
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
func main(name string, count int) (Result, error) {
|
|
2402
|
+
return Result{
|
|
2403
|
+
Name: name,
|
|
2404
|
+
Count: count,
|
|
2405
|
+
}, nil
|
|
2406
|
+
}
|
|
2407
|
+
\`\`\`
|
|
2408
|
+
|
|
2409
|
+
## Error Handling
|
|
2410
|
+
|
|
2411
|
+
Return errors as the second return value:
|
|
2412
|
+
|
|
2413
|
+
\`\`\`go
|
|
2414
|
+
package inner
|
|
2415
|
+
|
|
2416
|
+
import "errors"
|
|
2417
|
+
|
|
2418
|
+
func main(value int) (string, error) {
|
|
2419
|
+
if value < 0 {
|
|
2420
|
+
return "", errors.New("value must be positive")
|
|
2421
|
+
}
|
|
2422
|
+
return "success", nil
|
|
2423
|
+
}
|
|
2424
|
+
\`\`\`
|
|
2425
|
+
`;
|
|
2426
|
+
export const LANG_GRAPHQL = `# GraphQL
|
|
2427
|
+
|
|
2428
|
+
## Structure
|
|
2429
|
+
|
|
2430
|
+
Write GraphQL queries or mutations. Arguments can be added as query parameters:
|
|
2431
|
+
|
|
2432
|
+
\`\`\`graphql
|
|
2433
|
+
query GetUser($id: ID!) {
|
|
2434
|
+
user(id: $id) {
|
|
2435
|
+
id
|
|
2436
|
+
name
|
|
2437
|
+
email
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
\`\`\`
|
|
2441
|
+
|
|
2442
|
+
## Variables
|
|
2443
|
+
|
|
2444
|
+
Variables are passed as script arguments and automatically bound to the query:
|
|
2445
|
+
|
|
2446
|
+
\`\`\`graphql
|
|
2447
|
+
query SearchProducts($query: String!, $limit: Int = 10) {
|
|
2448
|
+
products(search: $query, first: $limit) {
|
|
2449
|
+
edges {
|
|
2450
|
+
node {
|
|
2451
|
+
id
|
|
2452
|
+
name
|
|
2453
|
+
price
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
\`\`\`
|
|
2459
|
+
|
|
2460
|
+
## Mutations
|
|
2461
|
+
|
|
2462
|
+
\`\`\`graphql
|
|
2463
|
+
mutation CreateUser($input: CreateUserInput!) {
|
|
2464
|
+
createUser(input: $input) {
|
|
2465
|
+
id
|
|
2466
|
+
name
|
|
2467
|
+
createdAt
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
\`\`\`
|
|
2471
|
+
`;
|
|
2472
|
+
export const LANG_JAVA = `# Java
|
|
2473
|
+
|
|
2474
|
+
The script must contain a Main public class with a \`public static main()\` method:
|
|
2475
|
+
|
|
2476
|
+
\`\`\`java
|
|
2477
|
+
public class Main {
|
|
2478
|
+
public static Object main(String name, int count) {
|
|
2479
|
+
java.util.Map<String, Object> result = new java.util.HashMap<>();
|
|
2480
|
+
result.put("name", name);
|
|
2481
|
+
result.put("count", count);
|
|
2482
|
+
return result;
|
|
2483
|
+
}
|
|
2484
|
+
}
|
|
2030
2485
|
\`\`\`
|
|
2031
2486
|
|
|
2032
2487
|
**Important:**
|
|
2033
|
-
-
|
|
2034
|
-
-
|
|
2035
|
-
-
|
|
2488
|
+
- Class must be named \`Main\`
|
|
2489
|
+
- Method must be \`public static Object main(...)\`
|
|
2490
|
+
- Return type is \`Object\` or \`void\`
|
|
2036
2491
|
|
|
2037
|
-
##
|
|
2492
|
+
## Maven Dependencies
|
|
2038
2493
|
|
|
2039
|
-
|
|
2494
|
+
Add dependencies using comments at the top:
|
|
2040
2495
|
|
|
2041
|
-
\`\`\`
|
|
2042
|
-
|
|
2043
|
-
|
|
2496
|
+
\`\`\`java
|
|
2497
|
+
//requirements:
|
|
2498
|
+
//com.google.code.gson:gson:2.10.1
|
|
2499
|
+
//org.apache.httpcomponents:httpclient:4.5.14
|
|
2044
2500
|
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
{
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2501
|
+
import com.google.gson.Gson;
|
|
2502
|
+
|
|
2503
|
+
public class Main {
|
|
2504
|
+
public static Object main(String input) {
|
|
2505
|
+
Gson gson = new Gson();
|
|
2506
|
+
return gson.fromJson(input, Object.class);
|
|
2507
|
+
}
|
|
2051
2508
|
}
|
|
2052
|
-
EOF
|
|
2053
2509
|
\`\`\`
|
|
2510
|
+
`;
|
|
2511
|
+
export const LANG_MSSQL = `# Microsoft SQL Server (MSSQL)
|
|
2054
2512
|
|
|
2055
|
-
|
|
2513
|
+
Arguments use \`@P1\`, \`@P2\`, etc.
|
|
2056
2514
|
|
|
2057
|
-
|
|
2515
|
+
Name the parameters by adding comments before the statement:
|
|
2058
2516
|
|
|
2059
|
-
\`\`\`
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2517
|
+
\`\`\`sql
|
|
2518
|
+
-- @P1 name1 (varchar)
|
|
2519
|
+
-- @P2 name2 (int) = 0
|
|
2520
|
+
SELECT * FROM users WHERE name = @P1 AND age > @P2;
|
|
2063
2521
|
\`\`\`
|
|
2064
2522
|
`;
|
|
2065
|
-
export const
|
|
2523
|
+
export const LANG_MYSQL = `# MySQL
|
|
2524
|
+
|
|
2525
|
+
Arguments use \`?\` placeholders.
|
|
2526
|
+
|
|
2527
|
+
Name the parameters by adding comments before the statement:
|
|
2528
|
+
|
|
2529
|
+
\`\`\`sql
|
|
2530
|
+
-- ? name1 (text)
|
|
2531
|
+
-- ? name2 (int) = 0
|
|
2532
|
+
SELECT * FROM users WHERE name = ? AND age > ?;
|
|
2533
|
+
\`\`\`
|
|
2534
|
+
`;
|
|
2535
|
+
export const LANG_NATIVETS = `# TypeScript (Native)
|
|
2066
2536
|
|
|
2067
2537
|
Native TypeScript execution with fetch only - no external imports allowed.
|
|
2068
2538
|
|
|
@@ -2093,6 +2563,8 @@ export async function main(stripe: RT.Stripe) {
|
|
|
2093
2563
|
|
|
2094
2564
|
Only use resource types if you need them to satisfy the instructions. Always use the RT namespace.
|
|
2095
2565
|
|
|
2566
|
+
Before using a resource type, check the \`rt.d.ts\` file in the project root to see all available resource types and their fields. This file is generated by \`wmill resource-type generate-namespace\`.
|
|
2567
|
+
|
|
2096
2568
|
## Imports
|
|
2097
2569
|
|
|
2098
2570
|
**No imports allowed.** Use the globally available \`fetch\` function:
|
|
@@ -2133,182 +2605,254 @@ type Event = {
|
|
|
2133
2605
|
export async function preprocessor(event: Event) {
|
|
2134
2606
|
return {
|
|
2135
2607
|
param1: event.body.field1,
|
|
2136
|
-
param2: event.query.id
|
|
2608
|
+
param2: event.query.id
|
|
2137
2609
|
};
|
|
2138
2610
|
}
|
|
2139
2611
|
\`\`\`
|
|
2612
|
+
`;
|
|
2613
|
+
export const LANG_PHP = `# PHP
|
|
2140
2614
|
|
|
2141
|
-
##
|
|
2142
|
-
|
|
2143
|
-
Windmill provides built-in support for S3-compatible storage operations.
|
|
2615
|
+
## Structure
|
|
2144
2616
|
|
|
2145
|
-
|
|
2617
|
+
The script must start with \`<?php\` and contain at least one function called \`main\`:
|
|
2146
2618
|
|
|
2147
|
-
|
|
2619
|
+
\`\`\`php
|
|
2620
|
+
<?php
|
|
2148
2621
|
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
};
|
|
2622
|
+
function main(string $param1, int $param2) {
|
|
2623
|
+
return ["result" => $param1, "count" => $param2];
|
|
2624
|
+
}
|
|
2153
2625
|
\`\`\`
|
|
2154
2626
|
|
|
2155
|
-
##
|
|
2627
|
+
## Resource Types
|
|
2156
2628
|
|
|
2157
|
-
|
|
2158
|
-
import * as wmill from "windmill-client";
|
|
2629
|
+
On Windmill, credentials and configuration are stored in resources and passed as parameters to main.
|
|
2159
2630
|
|
|
2160
|
-
|
|
2161
|
-
const content: Uint8Array = await wmill.loadS3File(s3object);
|
|
2631
|
+
You need to **redefine** the type of the resources that are needed before the main function. Always check if the class already exists using \`class_exists\`:
|
|
2162
2632
|
|
|
2163
|
-
|
|
2164
|
-
|
|
2633
|
+
\`\`\`php
|
|
2634
|
+
<?php
|
|
2165
2635
|
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2636
|
+
if (!class_exists('Postgresql')) {
|
|
2637
|
+
class Postgresql {
|
|
2638
|
+
public string $host;
|
|
2639
|
+
public int $port;
|
|
2640
|
+
public string $user;
|
|
2641
|
+
public string $password;
|
|
2642
|
+
public string $dbname;
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2646
|
+
function main(Postgresql $db) {
|
|
2647
|
+
// $db contains the database connection details
|
|
2648
|
+
}
|
|
2172
2649
|
\`\`\`
|
|
2650
|
+
|
|
2651
|
+
The resource type name has to be exactly as specified.
|
|
2652
|
+
|
|
2653
|
+
## Library Dependencies
|
|
2654
|
+
|
|
2655
|
+
Specify library dependencies as comments before the main function:
|
|
2656
|
+
|
|
2657
|
+
\`\`\`php
|
|
2658
|
+
<?php
|
|
2659
|
+
|
|
2660
|
+
// require:
|
|
2661
|
+
// guzzlehttp/guzzle
|
|
2662
|
+
// stripe/stripe-php@^10.0
|
|
2663
|
+
|
|
2664
|
+
function main() {
|
|
2665
|
+
// Libraries are available
|
|
2666
|
+
}
|
|
2667
|
+
\`\`\`
|
|
2668
|
+
|
|
2669
|
+
One dependency per line. No need to require autoload, it is already done.
|
|
2173
2670
|
`;
|
|
2174
|
-
export const
|
|
2671
|
+
export const LANG_POSTGRESQL = `# PostgreSQL
|
|
2175
2672
|
|
|
2176
|
-
Arguments are
|
|
2673
|
+
Arguments are obtained directly in the statement with \`$1::{type}\`, \`$2::{type}\`, etc.
|
|
2674
|
+
|
|
2675
|
+
Name the parameters by adding comments at the beginning of the script (without specifying the type):
|
|
2177
2676
|
|
|
2178
2677
|
\`\`\`sql
|
|
2179
|
-
-- $
|
|
2180
|
-
-- $
|
|
2181
|
-
SELECT * FROM users WHERE name = $
|
|
2678
|
+
-- $1 name1
|
|
2679
|
+
-- $2 name2 = default_value
|
|
2680
|
+
SELECT * FROM users WHERE name = $1::TEXT AND age > $2::INT;
|
|
2182
2681
|
\`\`\`
|
|
2682
|
+
`;
|
|
2683
|
+
export const LANG_POWERSHELL = `# PowerShell
|
|
2183
2684
|
|
|
2184
|
-
##
|
|
2685
|
+
## Structure
|
|
2185
2686
|
|
|
2186
|
-
|
|
2687
|
+
Arguments are obtained by calling the \`param\` function on the first line:
|
|
2187
2688
|
|
|
2188
|
-
\`\`\`
|
|
2189
|
-
|
|
2190
|
-
ATTACH 'ducklake' AS dl;
|
|
2689
|
+
\`\`\`powershell
|
|
2690
|
+
param($Name, $Count = 0, [int]$Age)
|
|
2191
2691
|
|
|
2192
|
-
|
|
2193
|
-
|
|
2692
|
+
# Your code here
|
|
2693
|
+
Write-Output "Processing $Name, count: $Count, age: $Age"
|
|
2194
2694
|
|
|
2195
|
-
|
|
2196
|
-
|
|
2695
|
+
# Return object
|
|
2696
|
+
@{
|
|
2697
|
+
name = $Name
|
|
2698
|
+
count = $Count
|
|
2699
|
+
age = $Age
|
|
2700
|
+
}
|
|
2197
2701
|
\`\`\`
|
|
2198
2702
|
|
|
2199
|
-
##
|
|
2703
|
+
## Parameter Types
|
|
2200
2704
|
|
|
2201
|
-
|
|
2705
|
+
You can specify types for parameters:
|
|
2202
2706
|
|
|
2203
|
-
\`\`\`
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2707
|
+
\`\`\`powershell
|
|
2708
|
+
param(
|
|
2709
|
+
[string]$Name,
|
|
2710
|
+
[int]$Count = 0,
|
|
2711
|
+
[bool]$Enabled = $true,
|
|
2712
|
+
[array]$Items
|
|
2713
|
+
)
|
|
2207
2714
|
|
|
2208
|
-
|
|
2715
|
+
@{
|
|
2716
|
+
name = $Name
|
|
2717
|
+
count = $Count
|
|
2718
|
+
enabled = $Enabled
|
|
2719
|
+
items = $Items
|
|
2720
|
+
}
|
|
2721
|
+
\`\`\`
|
|
2209
2722
|
|
|
2210
|
-
|
|
2723
|
+
## Return Values
|
|
2211
2724
|
|
|
2212
|
-
|
|
2213
|
-
-- Default storage
|
|
2214
|
-
SELECT * FROM read_csv('s3:///path/to/file.csv');
|
|
2725
|
+
Return values by outputting them at the end of the script:
|
|
2215
2726
|
|
|
2216
|
-
|
|
2217
|
-
|
|
2727
|
+
\`\`\`powershell
|
|
2728
|
+
param($Input)
|
|
2218
2729
|
|
|
2219
|
-
|
|
2220
|
-
|
|
2730
|
+
$result = @{
|
|
2731
|
+
processed = $true
|
|
2732
|
+
data = $Input
|
|
2733
|
+
timestamp = Get-Date -Format "o"
|
|
2734
|
+
}
|
|
2221
2735
|
|
|
2222
|
-
|
|
2223
|
-
SELECT * FROM read_json('s3:///path/to/file.json');
|
|
2736
|
+
$result
|
|
2224
2737
|
\`\`\`
|
|
2225
2738
|
`;
|
|
2226
|
-
export const
|
|
2227
|
-
|
|
2228
|
-
Native TypeScript execution with fetch only - no external imports allowed.
|
|
2739
|
+
export const LANG_PYTHON3 = `# Python
|
|
2229
2740
|
|
|
2230
2741
|
## Structure
|
|
2231
2742
|
|
|
2232
|
-
|
|
2743
|
+
The script must contain at least one function called \`main\`:
|
|
2233
2744
|
|
|
2234
|
-
\`\`\`
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
}
|
|
2745
|
+
\`\`\`python
|
|
2746
|
+
def main(param1: str, param2: int):
|
|
2747
|
+
# Your code here
|
|
2748
|
+
return {"result": param1, "count": param2}
|
|
2239
2749
|
\`\`\`
|
|
2240
2750
|
|
|
2241
|
-
Do not call the main function.
|
|
2751
|
+
Do not call the main function. Libraries are installed automatically.
|
|
2242
2752
|
|
|
2243
2753
|
## Resource Types
|
|
2244
2754
|
|
|
2245
2755
|
On Windmill, credentials and configuration are stored in resources and passed as parameters to main.
|
|
2246
2756
|
|
|
2247
|
-
|
|
2757
|
+
You need to **redefine** the type of the resources that are needed before the main function as TypedDict:
|
|
2248
2758
|
|
|
2249
|
-
\`\`\`
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2759
|
+
\`\`\`python
|
|
2760
|
+
from typing import TypedDict
|
|
2761
|
+
|
|
2762
|
+
class postgresql(TypedDict):
|
|
2763
|
+
host: str
|
|
2764
|
+
port: int
|
|
2765
|
+
user: str
|
|
2766
|
+
password: str
|
|
2767
|
+
dbname: str
|
|
2768
|
+
|
|
2769
|
+
def main(db: postgresql):
|
|
2770
|
+
# db contains the database connection details
|
|
2771
|
+
pass
|
|
2253
2772
|
\`\`\`
|
|
2254
2773
|
|
|
2255
|
-
|
|
2774
|
+
**Important rules:**
|
|
2775
|
+
|
|
2776
|
+
- The resource type name must be **IN LOWERCASE**
|
|
2777
|
+
- Only include resource types if they are actually needed
|
|
2778
|
+
- If an import conflicts with a resource type name, **rename the imported object, not the type name**
|
|
2779
|
+
- Make sure to import TypedDict from typing **if you're using it**
|
|
2256
2780
|
|
|
2257
2781
|
## Imports
|
|
2258
2782
|
|
|
2259
|
-
|
|
2783
|
+
Libraries are installed automatically. Do not show installation instructions.
|
|
2260
2784
|
|
|
2261
|
-
\`\`\`
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2785
|
+
\`\`\`python
|
|
2786
|
+
import requests
|
|
2787
|
+
import pandas as pd
|
|
2788
|
+
from datetime import datetime
|
|
2789
|
+
\`\`\`
|
|
2790
|
+
|
|
2791
|
+
If an import name conflicts with a resource type:
|
|
2792
|
+
|
|
2793
|
+
\`\`\`python
|
|
2794
|
+
# Wrong - don't rename the type
|
|
2795
|
+
import stripe as stripe_lib
|
|
2796
|
+
class stripe_type(TypedDict): ...
|
|
2797
|
+
|
|
2798
|
+
# Correct - rename the import
|
|
2799
|
+
import stripe as stripe_sdk
|
|
2800
|
+
class stripe(TypedDict):
|
|
2801
|
+
api_key: str
|
|
2266
2802
|
\`\`\`
|
|
2267
2803
|
|
|
2268
2804
|
## Windmill Client
|
|
2269
2805
|
|
|
2270
|
-
|
|
2806
|
+
Import the windmill client for platform interactions:
|
|
2807
|
+
|
|
2808
|
+
\`\`\`python
|
|
2809
|
+
import wmill
|
|
2810
|
+
\`\`\`
|
|
2811
|
+
|
|
2812
|
+
See the SDK documentation for available methods.
|
|
2271
2813
|
|
|
2272
2814
|
## Preprocessor Scripts
|
|
2273
2815
|
|
|
2274
2816
|
For preprocessor scripts, the function should be named \`preprocessor\` and receives an \`event\` parameter:
|
|
2275
2817
|
|
|
2276
|
-
\`\`\`
|
|
2277
|
-
|
|
2278
|
-
kind:
|
|
2279
|
-
| "webhook"
|
|
2280
|
-
| "http"
|
|
2281
|
-
| "websocket"
|
|
2282
|
-
| "kafka"
|
|
2283
|
-
| "email"
|
|
2284
|
-
| "nats"
|
|
2285
|
-
| "postgres"
|
|
2286
|
-
| "sqs"
|
|
2287
|
-
| "mqtt"
|
|
2288
|
-
| "gcp";
|
|
2289
|
-
body: any;
|
|
2290
|
-
headers: Record<string, string>;
|
|
2291
|
-
query: Record<string, string>;
|
|
2292
|
-
};
|
|
2818
|
+
\`\`\`python
|
|
2819
|
+
from typing import TypedDict, Literal, Any
|
|
2293
2820
|
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2821
|
+
class Event(TypedDict):
|
|
2822
|
+
kind: Literal["webhook", "http", "websocket", "kafka", "email", "nats", "postgres", "sqs", "mqtt", "gcp"]
|
|
2823
|
+
body: Any
|
|
2824
|
+
headers: dict[str, str]
|
|
2825
|
+
query: dict[str, str]
|
|
2826
|
+
|
|
2827
|
+
def preprocessor(event: Event):
|
|
2828
|
+
# Transform the event into flow input parameters
|
|
2829
|
+
return {
|
|
2830
|
+
"param1": event["body"]["field1"],
|
|
2831
|
+
"param2": event["query"]["id"]
|
|
2832
|
+
}
|
|
2300
2833
|
\`\`\`
|
|
2301
|
-
`;
|
|
2302
|
-
export const LANG_BIGQUERY = `# BigQuery
|
|
2303
2834
|
|
|
2304
|
-
|
|
2835
|
+
## S3 Object Operations
|
|
2305
2836
|
|
|
2306
|
-
|
|
2837
|
+
Windmill provides built-in support for S3-compatible storage operations.
|
|
2307
2838
|
|
|
2308
|
-
\`\`\`
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2839
|
+
\`\`\`python
|
|
2840
|
+
import wmill
|
|
2841
|
+
|
|
2842
|
+
# Load file content from S3
|
|
2843
|
+
content: bytes = wmill.load_s3_file(s3object)
|
|
2844
|
+
|
|
2845
|
+
# Load file as stream reader
|
|
2846
|
+
reader: BufferedReader = wmill.load_s3_file_reader(s3object)
|
|
2847
|
+
|
|
2848
|
+
# Write file to S3
|
|
2849
|
+
result: S3Object = wmill.write_s3_file(
|
|
2850
|
+
s3object, # Target path (or None to auto-generate)
|
|
2851
|
+
file_content, # bytes or BufferedReader
|
|
2852
|
+
s3_resource_path, # Optional: specific S3 resource
|
|
2853
|
+
content_type, # Optional: MIME type
|
|
2854
|
+
content_disposition # Optional: Content-Disposition header
|
|
2855
|
+
)
|
|
2312
2856
|
\`\`\`
|
|
2313
2857
|
`;
|
|
2314
2858
|
export const LANG_RUST = `# Rust
|
|
@@ -2387,212 +2931,15 @@ fn main(url: String) -> anyhow::Result<Response> {
|
|
|
2387
2931
|
}
|
|
2388
2932
|
\`\`\`
|
|
2389
2933
|
`;
|
|
2390
|
-
export const
|
|
2391
|
-
|
|
2392
|
-
## Structure
|
|
2393
|
-
|
|
2394
|
-
The script must start with \`<?php\` and contain at least one function called \`main\`:
|
|
2395
|
-
|
|
2396
|
-
\`\`\`php
|
|
2397
|
-
<?php
|
|
2398
|
-
|
|
2399
|
-
function main(string $param1, int $param2) {
|
|
2400
|
-
return ["result" => $param1, "count" => $param2];
|
|
2401
|
-
}
|
|
2402
|
-
\`\`\`
|
|
2403
|
-
|
|
2404
|
-
## Resource Types
|
|
2405
|
-
|
|
2406
|
-
On Windmill, credentials and configuration are stored in resources and passed as parameters to main.
|
|
2407
|
-
|
|
2408
|
-
You need to **redefine** the type of the resources that are needed before the main function. Always check if the class already exists using \`class_exists\`:
|
|
2409
|
-
|
|
2410
|
-
\`\`\`php
|
|
2411
|
-
<?php
|
|
2412
|
-
|
|
2413
|
-
if (!class_exists('Postgresql')) {
|
|
2414
|
-
class Postgresql {
|
|
2415
|
-
public string $host;
|
|
2416
|
-
public int $port;
|
|
2417
|
-
public string $user;
|
|
2418
|
-
public string $password;
|
|
2419
|
-
public string $dbname;
|
|
2420
|
-
}
|
|
2421
|
-
}
|
|
2422
|
-
|
|
2423
|
-
function main(Postgresql $db) {
|
|
2424
|
-
// $db contains the database connection details
|
|
2425
|
-
}
|
|
2426
|
-
\`\`\`
|
|
2427
|
-
|
|
2428
|
-
The resource type name has to be exactly as specified.
|
|
2429
|
-
|
|
2430
|
-
## Library Dependencies
|
|
2431
|
-
|
|
2432
|
-
Specify library dependencies as comments before the main function:
|
|
2433
|
-
|
|
2434
|
-
\`\`\`php
|
|
2435
|
-
<?php
|
|
2436
|
-
|
|
2437
|
-
// require:
|
|
2438
|
-
// guzzlehttp/guzzle
|
|
2439
|
-
// stripe/stripe-php@^10.0
|
|
2440
|
-
|
|
2441
|
-
function main() {
|
|
2442
|
-
// Libraries are available
|
|
2443
|
-
}
|
|
2444
|
-
\`\`\`
|
|
2445
|
-
|
|
2446
|
-
One dependency per line. No need to require autoload, it is already done.
|
|
2447
|
-
`;
|
|
2448
|
-
export const LANG_MSSQL = `# Microsoft SQL Server (MSSQL)
|
|
2934
|
+
export const LANG_SNOWFLAKE = `# Snowflake
|
|
2449
2935
|
|
|
2450
|
-
Arguments use
|
|
2936
|
+
Arguments use \`?\` placeholders.
|
|
2451
2937
|
|
|
2452
2938
|
Name the parameters by adding comments before the statement:
|
|
2453
2939
|
|
|
2454
2940
|
\`\`\`sql
|
|
2455
|
-
--
|
|
2456
|
-
--
|
|
2457
|
-
SELECT * FROM users WHERE name =
|
|
2458
|
-
\`\`\`
|
|
2459
|
-
`;
|
|
2460
|
-
export const LANG_POSTGRESQL = `# PostgreSQL
|
|
2461
|
-
|
|
2462
|
-
Arguments are obtained directly in the statement with \`$1::{type}\`, \`$2::{type}\`, etc.
|
|
2463
|
-
|
|
2464
|
-
Name the parameters by adding comments at the beginning of the script (without specifying the type):
|
|
2465
|
-
|
|
2466
|
-
\`\`\`sql
|
|
2467
|
-
-- $1 name1
|
|
2468
|
-
-- $2 name2 = default_value
|
|
2469
|
-
SELECT * FROM users WHERE name = $1::TEXT AND age > $2::INT;
|
|
2470
|
-
\`\`\`
|
|
2471
|
-
`;
|
|
2472
|
-
export const LANG_GRAPHQL = `# GraphQL
|
|
2473
|
-
|
|
2474
|
-
## Structure
|
|
2475
|
-
|
|
2476
|
-
Write GraphQL queries or mutations. Arguments can be added as query parameters:
|
|
2477
|
-
|
|
2478
|
-
\`\`\`graphql
|
|
2479
|
-
query GetUser($id: ID!) {
|
|
2480
|
-
user(id: $id) {
|
|
2481
|
-
id
|
|
2482
|
-
name
|
|
2483
|
-
email
|
|
2484
|
-
}
|
|
2485
|
-
}
|
|
2486
|
-
\`\`\`
|
|
2487
|
-
|
|
2488
|
-
## Variables
|
|
2489
|
-
|
|
2490
|
-
Variables are passed as script arguments and automatically bound to the query:
|
|
2491
|
-
|
|
2492
|
-
\`\`\`graphql
|
|
2493
|
-
query SearchProducts($query: String!, $limit: Int = 10) {
|
|
2494
|
-
products(search: $query, first: $limit) {
|
|
2495
|
-
edges {
|
|
2496
|
-
node {
|
|
2497
|
-
id
|
|
2498
|
-
name
|
|
2499
|
-
price
|
|
2500
|
-
}
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
\`\`\`
|
|
2505
|
-
|
|
2506
|
-
## Mutations
|
|
2507
|
-
|
|
2508
|
-
\`\`\`graphql
|
|
2509
|
-
mutation CreateUser($input: CreateUserInput!) {
|
|
2510
|
-
createUser(input: $input) {
|
|
2511
|
-
id
|
|
2512
|
-
name
|
|
2513
|
-
createdAt
|
|
2514
|
-
}
|
|
2515
|
-
}
|
|
2516
|
-
\`\`\`
|
|
2517
|
-
`;
|
|
2518
|
-
export const LANG_CSHARP = `# C#
|
|
2519
|
-
|
|
2520
|
-
The script must contain a public static \`Main\` method inside a class:
|
|
2521
|
-
|
|
2522
|
-
\`\`\`csharp
|
|
2523
|
-
public class Script
|
|
2524
|
-
{
|
|
2525
|
-
public static object Main(string name, int count)
|
|
2526
|
-
{
|
|
2527
|
-
return new { Name = name, Count = count };
|
|
2528
|
-
}
|
|
2529
|
-
}
|
|
2530
|
-
\`\`\`
|
|
2531
|
-
|
|
2532
|
-
**Important:**
|
|
2533
|
-
- Class name is irrelevant
|
|
2534
|
-
- Method must be \`public static\`
|
|
2535
|
-
- Return type can be \`object\` or specific type
|
|
2536
|
-
|
|
2537
|
-
## NuGet Packages
|
|
2538
|
-
|
|
2539
|
-
Add packages using the \`#r\` directive at the top:
|
|
2540
|
-
|
|
2541
|
-
\`\`\`csharp
|
|
2542
|
-
#r "nuget: Newtonsoft.Json, 13.0.3"
|
|
2543
|
-
#r "nuget: RestSharp, 110.2.0"
|
|
2544
|
-
|
|
2545
|
-
using Newtonsoft.Json;
|
|
2546
|
-
using RestSharp;
|
|
2547
|
-
|
|
2548
|
-
public class Script
|
|
2549
|
-
{
|
|
2550
|
-
public static object Main(string url)
|
|
2551
|
-
{
|
|
2552
|
-
var client = new RestClient(url);
|
|
2553
|
-
var request = new RestRequest();
|
|
2554
|
-
var response = client.Get(request);
|
|
2555
|
-
return JsonConvert.DeserializeObject(response.Content);
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
|
-
\`\`\`
|
|
2559
|
-
`;
|
|
2560
|
-
export const LANG_JAVA = `# Java
|
|
2561
|
-
|
|
2562
|
-
The script must contain a Main public class with a \`public static main()\` method:
|
|
2563
|
-
|
|
2564
|
-
\`\`\`java
|
|
2565
|
-
public class Main {
|
|
2566
|
-
public static Object main(String name, int count) {
|
|
2567
|
-
java.util.Map<String, Object> result = new java.util.HashMap<>();
|
|
2568
|
-
result.put("name", name);
|
|
2569
|
-
result.put("count", count);
|
|
2570
|
-
return result;
|
|
2571
|
-
}
|
|
2572
|
-
}
|
|
2573
|
-
\`\`\`
|
|
2574
|
-
|
|
2575
|
-
**Important:**
|
|
2576
|
-
- Class must be named \`Main\`
|
|
2577
|
-
- Method must be \`public static Object main(...)\`
|
|
2578
|
-
- Return type is \`Object\` or \`void\`
|
|
2579
|
-
|
|
2580
|
-
## Maven Dependencies
|
|
2581
|
-
|
|
2582
|
-
Add dependencies using comments at the top:
|
|
2583
|
-
|
|
2584
|
-
\`\`\`java
|
|
2585
|
-
//requirements:
|
|
2586
|
-
//com.google.code.gson:gson:2.10.1
|
|
2587
|
-
//org.apache.httpcomponents:httpclient:4.5.14
|
|
2588
|
-
|
|
2589
|
-
import com.google.gson.Gson;
|
|
2590
|
-
|
|
2591
|
-
public class Main {
|
|
2592
|
-
public static Object main(String input) {
|
|
2593
|
-
Gson gson = new Gson();
|
|
2594
|
-
return gson.fromJson(input, Object.class);
|
|
2595
|
-
}
|
|
2596
|
-
}
|
|
2941
|
+
-- ? name1 (text)
|
|
2942
|
+
-- ? name2 (number) = 0
|
|
2943
|
+
SELECT * FROM users WHERE name = ? AND age > ?;
|
|
2597
2944
|
\`\`\`
|
|
2598
2945
|
`;
|