@flowrunner/cli 0.1.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/README.md +148 -0
- package/ai-docs/instructions/service-code-format/01-service-structure.md +180 -0
- package/ai-docs/instructions/service-code-format/02-zod-types.md +260 -0
- package/ai-docs/instructions/service-code-format/03-parameters.md +193 -0
- package/ai-docs/instructions/service-code-format/04-http-requests.md +257 -0
- package/ai-docs/instructions/service-code-format/05-dictionaries.md +103 -0
- package/ai-docs/instructions/service-code-format/06-oauth2.md +42 -0
- package/ai-docs/instructions/service-code-format/07-actions.md +171 -0
- package/ai-docs/instructions/service-code-format/08-polling-triggers.md +54 -0
- package/ai-docs/instructions/service-code-format/09-realtime-triggers.md +269 -0
- package/ai-docs/instructions/service-code-format/10-files-api.md +148 -0
- package/ai-docs/instructions/service-code-format/11-output-model.md +142 -0
- package/ai-docs/instructions/service-code-format/12-service-readme.md +69 -0
- package/ai-docs/instructions/service-code-format/13-runtime-contracts.md +193 -0
- package/ai-docs/instructions/service-code-format/14-reference-service.md +341 -0
- package/ai-docs/instructions/service-code-format/15-unit-tests.md +361 -0
- package/ai-docs/instructions/service-code-format/16-gotchas.md +201 -0
- package/ai-docs/instructions/service-code-format/17-client-certificates.md +162 -0
- package/ai-docs/instructions/service-code-format/18-test-recipes.md +160 -0
- package/ai-docs/instructions/service-code-format/README.md +120 -0
- package/ai-docs/providers/claude/agents/flowrunner-service-code-engineer.md +139 -0
- package/ai-docs/providers/claude/agents/flowrunner-service-test-engineer.md +497 -0
- package/ai-docs/providers/claude/main-orchestrator-segment.md +51 -0
- package/bin/flowrunner.js +66 -0
- package/bin/resolve-local.js +98 -0
- package/dist/cli.js +10972 -0
- package/dist/cli.js.map +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +10131 -0
- package/dist/index.js.map +7 -0
- package/dist/types/flow-extension-runner/src/common/config.d.ts +12 -0
- package/dist/types/flow-extension-runner/src/common/constants.d.ts +9 -0
- package/dist/types/flow-extension-runner/src/common/context-files.d.ts +107 -0
- package/dist/types/flow-extension-runner/src/common/context.d.ts +6 -0
- package/dist/types/flow-extension-runner/src/common/types.d.ts +11 -0
- package/dist/types/flow-extension-runner/src/errors/base.d.ts +17 -0
- package/dist/types/flow-extension-runner/src/errors/codes.d.ts +17 -0
- package/dist/types/flow-extension-runner/src/errors/errors.d.ts +48 -0
- package/dist/types/flow-extension-runner/src/errors/index.d.ts +3 -0
- package/dist/types/flow-extension-runner/src/global.d.ts +34 -0
- package/dist/types/flow-extension-runner/src/index.d.ts +15 -0
- package/dist/types/flow-extension-runner/src/namespace.d.ts +3 -0
- package/dist/types/flow-extension-runner/src/v1/config.d.ts +3 -0
- package/dist/types/flow-extension-runner/src/v1/constants.d.ts +4 -0
- package/dist/types/flow-extension-runner/src/v1/index.d.ts +11 -0
- package/dist/types/flow-extension-runner/src/v1/namespace.d.ts +9 -0
- package/dist/types/flow-extension-runner/src/v1/service.d.ts +29 -0
- package/dist/types/flow-extension-runner/src/v1/types.d.ts +13 -0
- package/dist/types/flow-extension-runner/src/v2/actions/action-method.d.ts +34 -0
- package/dist/types/flow-extension-runner/src/v2/context/execution-context.d.ts +25 -0
- package/dist/types/flow-extension-runner/src/v2/context/logger.d.ts +2 -0
- package/dist/types/flow-extension-runner/src/v2/context/method-input.d.ts +27 -0
- package/dist/types/flow-extension-runner/src/v2/context/proxies.d.ts +1 -0
- package/dist/types/flow-extension-runner/src/v2/create-extension.d.ts +2 -0
- package/dist/types/flow-extension-runner/src/v2/crypto.d.ts +6 -0
- package/dist/types/flow-extension-runner/src/v2/dictionaries/dictionary-method.d.ts +24 -0
- package/dist/types/flow-extension-runner/src/v2/dictionaries/payload-schema.d.ts +10 -0
- package/dist/types/flow-extension-runner/src/v2/extension.d.ts +51 -0
- package/dist/types/flow-extension-runner/src/v2/index.d.ts +39 -0
- package/dist/types/flow-extension-runner/src/v2/loaders/loader-method.d.ts +31 -0
- package/dist/types/flow-extension-runner/src/v2/loaders/loader-owner.d.ts +17 -0
- package/dist/types/flow-extension-runner/src/v2/loaders/payload-schema.d.ts +3 -0
- package/dist/types/flow-extension-runner/src/v2/method.d.ts +22 -0
- package/dist/types/flow-extension-runner/src/v2/model/field-mapper.d.ts +10 -0
- package/dist/types/flow-extension-runner/src/v2/model/method-model.d.ts +3 -0
- package/dist/types/flow-extension-runner/src/v2/model/model-types.d.ts +70 -0
- package/dist/types/flow-extension-runner/src/v2/model/params-model.d.ts +16 -0
- package/dist/types/flow-extension-runner/src/v2/oauth/method-names.d.ts +5 -0
- package/dist/types/flow-extension-runner/src/v2/oauth/oauth2.d.ts +9 -0
- package/dist/types/flow-extension-runner/src/v2/oauth/system-params.d.ts +6 -0
- package/dist/types/flow-extension-runner/src/v2/oauth/types.d.ts +54 -0
- package/dist/types/flow-extension-runner/src/v2/params/config-params.d.ts +14 -0
- package/dist/types/flow-extension-runner/src/v2/params/files-options.d.ts +58 -0
- package/dist/types/flow-extension-runner/src/v2/params/index.d.ts +19 -0
- package/dist/types/flow-extension-runner/src/v2/params/json/checks.d.ts +26 -0
- package/dist/types/flow-extension-runner/src/v2/params/json/decode.d.ts +24 -0
- package/dist/types/flow-extension-runner/src/v2/params/json/encode.d.ts +20 -0
- package/dist/types/flow-extension-runner/src/v2/params/json/types.d.ts +86 -0
- package/dist/types/flow-extension-runner/src/v2/params/json/values.d.ts +5 -0
- package/dist/types/flow-extension-runner/src/v2/params/method-params.d.ts +17 -0
- package/dist/types/flow-extension-runner/src/v2/params/params.d.ts +26 -0
- package/dist/types/flow-extension-runner/src/v2/params/schema/assert-object-schema.d.ts +6 -0
- package/dist/types/flow-extension-runner/src/v2/params/schema/assert-supported-schema.d.ts +8 -0
- package/dist/types/flow-extension-runner/src/v2/params/schema/coerce.d.ts +54 -0
- package/dist/types/flow-extension-runner/src/v2/params/schema/dates.d.ts +40 -0
- package/dist/types/flow-extension-runner/src/v2/params/schema/defaults.d.ts +36 -0
- package/dist/types/flow-extension-runner/src/v2/params/schema/field-plan.d.ts +33 -0
- package/dist/types/flow-extension-runner/src/v2/params/schema/introspect.d.ts +58 -0
- package/dist/types/flow-extension-runner/src/v2/params/schema/labels.d.ts +3 -0
- package/dist/types/flow-extension-runner/src/v2/params/schema/messages.d.ts +16 -0
- package/dist/types/flow-extension-runner/src/v2/params/schema/normalize.d.ts +8 -0
- package/dist/types/flow-extension-runner/src/v2/params/schema/parse.d.ts +7 -0
- package/dist/types/flow-extension-runner/src/v2/params/types.d.ts +29 -0
- package/dist/types/flow-extension-runner/src/v2/params/widget-types.d.ts +40 -0
- package/dist/types/flow-extension-runner/src/v2/params/zod.d.ts +86 -0
- package/dist/types/flow-extension-runner/src/v2/path.d.ts +1 -0
- package/dist/types/flow-extension-runner/src/v2/polling-triggers/mechanisms.d.ts +19 -0
- package/dist/types/flow-extension-runner/src/v2/polling-triggers/method-names.d.ts +1 -0
- package/dist/types/flow-extension-runner/src/v2/polling-triggers/polling-triggers.d.ts +11 -0
- package/dist/types/flow-extension-runner/src/v2/polling-triggers/system-params.d.ts +7 -0
- package/dist/types/flow-extension-runner/src/v2/polling-triggers/trigger-method.d.ts +25 -0
- package/dist/types/flow-extension-runner/src/v2/polling-triggers/types.d.ts +46 -0
- package/dist/types/flow-extension-runner/src/v2/realtime-triggers/method-names.d.ts +7 -0
- package/dist/types/flow-extension-runner/src/v2/realtime-triggers/realtime-setup.d.ts +10 -0
- package/dist/types/flow-extension-runner/src/v2/realtime-triggers/system-params.d.ts +29 -0
- package/dist/types/flow-extension-runner/src/v2/realtime-triggers/trigger-method.d.ts +33 -0
- package/dist/types/flow-extension-runner/src/v2/realtime-triggers/types.d.ts +147 -0
- package/dist/types/flow-extension-runner/src/v2/realtime-triggers/verify.d.ts +2 -0
- package/dist/types/flow-extension-runner/src/v2/registry.d.ts +20 -0
- package/dist/types/flow-extension-runner/src/v2/result.d.ts +13 -0
- package/dist/types/flow-extension-runner/src/v2/system-method.d.ts +41 -0
- package/dist/types/flow-extension-runner/src/v2/types.d.ts +126 -0
- package/dist/types/jsdoc-parser/src/custom-type-defs/files.d.ts +2 -0
- package/dist/types/jsdoc-parser/src/index.d.ts +2 -0
- package/dist/types/jsdoc-parser/src/lib.d.ts +42 -0
- package/dist/types/jsdoc-parser/src/types.d.ts +2 -0
- package/dist/types/packages/cli/src/api/console-client.d.ts +69 -0
- package/dist/types/packages/cli/src/constants/index.d.ts +5 -0
- package/dist/types/packages/cli/src/constants/packaging.d.ts +7 -0
- package/dist/types/packages/cli/src/constants/project.d.ts +9 -0
- package/dist/types/packages/cli/src/constants/providers.d.ts +30 -0
- package/dist/types/packages/cli/src/constants/server.d.ts +29 -0
- package/dist/types/packages/cli/src/constants/testing.d.ts +32 -0
- package/dist/types/packages/cli/src/errors.d.ts +131 -0
- package/dist/types/packages/cli/src/index.d.ts +29 -0
- package/dist/types/packages/cli/src/operations/deploy/discover-services.d.ts +26 -0
- package/dist/types/packages/cli/src/operations/deploy/hash.d.ts +1 -0
- package/dist/types/packages/cli/src/operations/deploy/index.d.ts +94 -0
- package/dist/types/packages/cli/src/operations/deploy/public-files.d.ts +20 -0
- package/dist/types/packages/cli/src/operations/deploy/select.d.ts +9 -0
- package/dist/types/packages/cli/src/operations/deploy/zip.d.ts +1 -0
- package/dist/types/packages/cli/src/operations/init/answers.d.ts +35 -0
- package/dist/types/packages/cli/src/operations/init/create-service.d.ts +39 -0
- package/dist/types/packages/cli/src/operations/init/index.d.ts +79 -0
- package/dist/types/packages/cli/src/operations/init/testing.d.ts +13 -0
- package/dist/types/packages/cli/src/operations/init-claude/index.d.ts +40 -0
- package/dist/types/packages/cli/src/operations/init-claude/segment.d.ts +25 -0
- package/dist/types/packages/cli/src/operations/login.d.ts +38 -0
- package/dist/types/packages/cli/src/operations/logout.d.ts +19 -0
- package/dist/types/packages/cli/src/operations/pull/extract.d.ts +23 -0
- package/dist/types/packages/cli/src/operations/pull/index.d.ts +87 -0
- package/dist/types/packages/cli/src/operations/server-target.d.ts +14 -0
- package/dist/types/packages/cli/src/operations/types.d.ts +20 -0
- package/dist/types/packages/cli/src/operations/use-server.d.ts +17 -0
- package/dist/types/packages/cli/src/project/auth.d.ts +41 -0
- package/dist/types/packages/cli/src/project/config.d.ts +31 -0
- package/dist/types/packages/cli/src/project/token.d.ts +5 -0
- package/dist/types/packages/cli/src/server/index.d.ts +14 -0
- package/dist/types/packages/cli/src/server/pages.d.ts +2 -0
- package/dist/types/packages/cli/src/server/routes/callback.d.ts +6 -0
- package/dist/types/packages/cli/src/server/types.d.ts +12 -0
- package/dist/types/packages/cli/src/templates/index.d.ts +8 -0
- package/dist/types/packages/cli/src/templates/manifest.d.ts +97 -0
- package/dist/types/packages/cli/src/templates/package-root.d.ts +3 -0
- package/dist/types/packages/cli/src/templates/paths.d.ts +3 -0
- package/dist/types/packages/cli/src/templates/registry.d.ts +13 -0
- package/dist/types/packages/cli/src/templates/render.d.ts +13 -0
- package/dist/types/packages/cli/src/templates/scaffold.d.ts +25 -0
- package/dist/types/packages/cli/src/utils/invocation.d.ts +28 -0
- package/dist/types/packages/cli/src/utils/open-browser.d.ts +2 -0
- package/dist/types/shared/src/constants/ai-agent-tools.d.ts +20 -0
- package/dist/types/shared/src/constants/ai.d.ts +11 -0
- package/dist/types/shared/src/constants/api-keys.d.ts +1 -0
- package/dist/types/shared/src/constants/app.d.ts +58 -0
- package/dist/types/shared/src/constants/billing.d.ts +16 -0
- package/dist/types/shared/src/constants/compliances.d.ts +3 -0
- package/dist/types/shared/src/constants/data-types.d.ts +26 -0
- package/dist/types/shared/src/constants/error-codes.d.ts +16 -0
- package/dist/types/shared/src/constants/flow.d.ts +12 -0
- package/dist/types/shared/src/constants/index.d.ts +16 -0
- package/dist/types/shared/src/constants/knowledge-base.d.ts +13 -0
- package/dist/types/shared/src/constants/notification-types.d.ts +985 -0
- package/dist/types/shared/src/constants/notifications.d.ts +10 -0
- package/dist/types/shared/src/constants/patterns.d.ts +28 -0
- package/dist/types/shared/src/constants/retry-policy.d.ts +30 -0
- package/dist/types/shared/src/constants/severity.d.ts +9 -0
- package/dist/types/shared/src/constants/shared-extensions-search.d.ts +6 -0
- package/dist/types/shared/src/constants/shared-extensions.d.ts +35 -0
- package/dist/types/shared/src/constants/zod.d.ts +2 -0
- package/dist/types/shared/src/errors/api.d.ts +4 -0
- package/dist/types/shared/src/errors/base.d.ts +38 -0
- package/dist/types/shared/src/errors/common.d.ts +39 -0
- package/dist/types/shared/src/errors/index.d.ts +13 -0
- package/dist/types/shared/src/errors/k8s.d.ts +4 -0
- package/dist/types/shared/src/errors/message.d.ts +48 -0
- package/dist/types/shared/src/errors/open-search.d.ts +4 -0
- package/dist/types/shared/src/errors/s3.d.ts +11 -0
- package/dist/types/shared/src/extensions/zod.d.ts +25 -0
- package/dist/types/shared/src/scheme/account/dto.d.ts +60 -0
- package/dist/types/shared/src/scheme/account/index.d.ts +1 -0
- package/dist/types/shared/src/scheme/ai-agent-tools/dto.d.ts +69 -0
- package/dist/types/shared/src/scheme/ai-agent-tools/index.d.ts +2 -0
- package/dist/types/shared/src/scheme/ai-agent-tools/parameters.d.ts +7 -0
- package/dist/types/shared/src/scheme/ai-router/dto.d.ts +23 -0
- package/dist/types/shared/src/scheme/ai-router/index.d.ts +2 -0
- package/dist/types/shared/src/scheme/api-keys/dto.d.ts +28 -0
- package/dist/types/shared/src/scheme/api-keys/index.d.ts +2 -0
- package/dist/types/shared/src/scheme/app/index.d.ts +1 -0
- package/dist/types/shared/src/scheme/app/java.dto.d.ts +6 -0
- package/dist/types/shared/src/scheme/billing/index.d.ts +1 -0
- package/dist/types/shared/src/scheme/billing/java.dto.d.ts +163 -0
- package/dist/types/shared/src/scheme/crm/billing.d.ts +149 -0
- package/dist/types/shared/src/scheme/crm/dto.d.ts +212 -0
- package/dist/types/shared/src/scheme/crm/index.d.ts +3 -0
- package/dist/types/shared/src/scheme/data-types/index.d.ts +1 -0
- package/dist/types/shared/src/scheme/data-types/java.dto.d.ts +23 -0
- package/dist/types/shared/src/scheme/dynamic-forms/dto.d.ts +30 -0
- package/dist/types/shared/src/scheme/dynamic-forms/index.d.ts +2 -0
- package/dist/types/shared/src/scheme/extensions/index.d.ts +1 -0
- package/dist/types/shared/src/scheme/extensions/params-to-zod.d.ts +14 -0
- package/dist/types/shared/src/scheme/flowrunner/custom-elements.d.ts +368 -0
- package/dist/types/shared/src/scheme/flowrunner/index.d.ts +3 -0
- package/dist/types/shared/src/scheme/flowrunner/java.dto.d.ts +628 -0
- package/dist/types/shared/src/scheme/index.d.ts +19 -0
- package/dist/types/shared/src/scheme/integration-connection/dto.d.ts +81 -0
- package/dist/types/shared/src/scheme/integration-connection/index.d.ts +2 -0
- package/dist/types/shared/src/scheme/knowledge-base/dto.d.ts +540 -0
- package/dist/types/shared/src/scheme/knowledge-base/index.d.ts +2 -0
- package/dist/types/shared/src/scheme/mcp-oauth/dto.d.ts +7 -0
- package/dist/types/shared/src/scheme/mcp-oauth/index.d.ts +2 -0
- package/dist/types/shared/src/scheme/notifications/dto.d.ts +111 -0
- package/dist/types/shared/src/scheme/notifications/index.d.ts +3 -0
- package/dist/types/shared/src/scheme/notifications/rest.d.ts +148 -0
- package/dist/types/shared/src/scheme/properties/account.d.ts +3 -0
- package/dist/types/shared/src/scheme/properties/app.d.ts +5 -0
- package/dist/types/shared/src/scheme/properties/billing.d.ts +12 -0
- package/dist/types/shared/src/scheme/properties/common.d.ts +2 -0
- package/dist/types/shared/src/scheme/properties/db.d.ts +8 -0
- package/dist/types/shared/src/scheme/properties/flow-extensions.d.ts +7 -0
- package/dist/types/shared/src/scheme/properties/index.d.ts +7 -0
- package/dist/types/shared/src/scheme/remote-mcp-server/dto.d.ts +278 -0
- package/dist/types/shared/src/scheme/remote-mcp-server/index.d.ts +2 -0
- package/dist/types/shared/src/scheme/shared-extensions/base.d.ts +56 -0
- package/dist/types/shared/src/scheme/shared-extensions/config.d.ts +96 -0
- package/dist/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +485 -0
- package/dist/types/shared/src/scheme/shared-extensions/extension.d.ts +387 -0
- package/dist/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +64 -0
- package/dist/types/shared/src/scheme/shared-extensions/index.d.ts +15 -0
- package/dist/types/shared/src/scheme/shared-extensions/light.d.ts +38 -0
- package/dist/types/shared/src/scheme/shared-extensions/logs.d.ts +21 -0
- package/dist/types/shared/src/scheme/shared-extensions/methods.d.ts +80 -0
- package/dist/types/shared/src/scheme/shared-extensions/params-schema.d.ts +47 -0
- package/dist/types/shared/src/scheme/shared-extensions/popular-pool.d.ts +11 -0
- package/dist/types/shared/src/scheme/shared-extensions/resolve.d.ts +364 -0
- package/dist/types/shared/src/scheme/shared-extensions/rest.d.ts +9 -0
- package/dist/types/shared/src/scheme/shared-extensions/search.d.ts +177 -0
- package/dist/types/shared/src/scheme/shared-extensions/service-identity.d.ts +10 -0
- package/dist/types/shared/src/scheme/shared-extensions/service-info.d.ts +15 -0
- package/dist/types/shared/src/scheme/workspace/dto.d.ts +40 -0
- package/dist/types/shared/src/scheme/workspace/index.d.ts +1 -0
- package/dist/types/shared/src/utils/object.d.ts +8 -0
- package/dist/types/shared/src/utils/uuid.d.ts +5 -0
- package/dist/types/shared/src/utils/versions.d.ts +4 -0
- package/dist/types/types/backendless-request.d.ts +40 -0
- package/package.json +66 -0
- package/project-files/jest.config.js +38 -0
- package/project-files/jest.setup.js +24 -0
- package/project-files/sandbox/files-mock.js +654 -0
- package/project-files/sandbox/index.js +32 -0
- package/project-files/sandbox/nock-mock.js +600 -0
- package/project-files/sandbox/service.js +145 -0
- package/runtime/index.d.ts +2 -0
- package/runtime/index.js +5665 -0
- package/runtime/index.js.map +7 -0
- package/runtime/types/flow-extension-runner/src/common/config.d.ts +12 -0
- package/runtime/types/flow-extension-runner/src/common/constants.d.ts +9 -0
- package/runtime/types/flow-extension-runner/src/common/context-files.d.ts +107 -0
- package/runtime/types/flow-extension-runner/src/common/context.d.ts +6 -0
- package/runtime/types/flow-extension-runner/src/common/types.d.ts +11 -0
- package/runtime/types/flow-extension-runner/src/errors/base.d.ts +17 -0
- package/runtime/types/flow-extension-runner/src/errors/codes.d.ts +17 -0
- package/runtime/types/flow-extension-runner/src/errors/errors.d.ts +48 -0
- package/runtime/types/flow-extension-runner/src/errors/index.d.ts +3 -0
- package/runtime/types/flow-extension-runner/src/global.d.ts +34 -0
- package/runtime/types/flow-extension-runner/src/index.d.ts +15 -0
- package/runtime/types/flow-extension-runner/src/namespace.d.ts +3 -0
- package/runtime/types/flow-extension-runner/src/v1/config.d.ts +3 -0
- package/runtime/types/flow-extension-runner/src/v1/constants.d.ts +4 -0
- package/runtime/types/flow-extension-runner/src/v1/index.d.ts +11 -0
- package/runtime/types/flow-extension-runner/src/v1/namespace.d.ts +9 -0
- package/runtime/types/flow-extension-runner/src/v1/service.d.ts +29 -0
- package/runtime/types/flow-extension-runner/src/v1/types.d.ts +13 -0
- package/runtime/types/flow-extension-runner/src/v2/actions/action-method.d.ts +34 -0
- package/runtime/types/flow-extension-runner/src/v2/context/execution-context.d.ts +25 -0
- package/runtime/types/flow-extension-runner/src/v2/context/logger.d.ts +2 -0
- package/runtime/types/flow-extension-runner/src/v2/context/method-input.d.ts +27 -0
- package/runtime/types/flow-extension-runner/src/v2/context/proxies.d.ts +1 -0
- package/runtime/types/flow-extension-runner/src/v2/create-extension.d.ts +2 -0
- package/runtime/types/flow-extension-runner/src/v2/crypto.d.ts +6 -0
- package/runtime/types/flow-extension-runner/src/v2/dictionaries/dictionary-method.d.ts +24 -0
- package/runtime/types/flow-extension-runner/src/v2/dictionaries/payload-schema.d.ts +10 -0
- package/runtime/types/flow-extension-runner/src/v2/extension.d.ts +51 -0
- package/runtime/types/flow-extension-runner/src/v2/index.d.ts +39 -0
- package/runtime/types/flow-extension-runner/src/v2/loaders/loader-method.d.ts +31 -0
- package/runtime/types/flow-extension-runner/src/v2/loaders/loader-owner.d.ts +17 -0
- package/runtime/types/flow-extension-runner/src/v2/loaders/payload-schema.d.ts +3 -0
- package/runtime/types/flow-extension-runner/src/v2/method.d.ts +22 -0
- package/runtime/types/flow-extension-runner/src/v2/model/field-mapper.d.ts +10 -0
- package/runtime/types/flow-extension-runner/src/v2/model/method-model.d.ts +3 -0
- package/runtime/types/flow-extension-runner/src/v2/model/model-types.d.ts +70 -0
- package/runtime/types/flow-extension-runner/src/v2/model/params-model.d.ts +16 -0
- package/runtime/types/flow-extension-runner/src/v2/oauth/method-names.d.ts +5 -0
- package/runtime/types/flow-extension-runner/src/v2/oauth/oauth2.d.ts +9 -0
- package/runtime/types/flow-extension-runner/src/v2/oauth/system-params.d.ts +6 -0
- package/runtime/types/flow-extension-runner/src/v2/oauth/types.d.ts +54 -0
- package/runtime/types/flow-extension-runner/src/v2/params/config-params.d.ts +14 -0
- package/runtime/types/flow-extension-runner/src/v2/params/files-options.d.ts +58 -0
- package/runtime/types/flow-extension-runner/src/v2/params/index.d.ts +19 -0
- package/runtime/types/flow-extension-runner/src/v2/params/json/checks.d.ts +26 -0
- package/runtime/types/flow-extension-runner/src/v2/params/json/decode.d.ts +24 -0
- package/runtime/types/flow-extension-runner/src/v2/params/json/encode.d.ts +20 -0
- package/runtime/types/flow-extension-runner/src/v2/params/json/types.d.ts +86 -0
- package/runtime/types/flow-extension-runner/src/v2/params/json/values.d.ts +5 -0
- package/runtime/types/flow-extension-runner/src/v2/params/method-params.d.ts +17 -0
- package/runtime/types/flow-extension-runner/src/v2/params/params.d.ts +26 -0
- package/runtime/types/flow-extension-runner/src/v2/params/schema/assert-object-schema.d.ts +6 -0
- package/runtime/types/flow-extension-runner/src/v2/params/schema/assert-supported-schema.d.ts +8 -0
- package/runtime/types/flow-extension-runner/src/v2/params/schema/coerce.d.ts +54 -0
- package/runtime/types/flow-extension-runner/src/v2/params/schema/dates.d.ts +40 -0
- package/runtime/types/flow-extension-runner/src/v2/params/schema/defaults.d.ts +36 -0
- package/runtime/types/flow-extension-runner/src/v2/params/schema/field-plan.d.ts +33 -0
- package/runtime/types/flow-extension-runner/src/v2/params/schema/introspect.d.ts +58 -0
- package/runtime/types/flow-extension-runner/src/v2/params/schema/labels.d.ts +3 -0
- package/runtime/types/flow-extension-runner/src/v2/params/schema/messages.d.ts +16 -0
- package/runtime/types/flow-extension-runner/src/v2/params/schema/normalize.d.ts +8 -0
- package/runtime/types/flow-extension-runner/src/v2/params/schema/parse.d.ts +7 -0
- package/runtime/types/flow-extension-runner/src/v2/params/types.d.ts +29 -0
- package/runtime/types/flow-extension-runner/src/v2/params/widget-types.d.ts +40 -0
- package/runtime/types/flow-extension-runner/src/v2/params/zod.d.ts +86 -0
- package/runtime/types/flow-extension-runner/src/v2/path.d.ts +1 -0
- package/runtime/types/flow-extension-runner/src/v2/polling-triggers/mechanisms.d.ts +19 -0
- package/runtime/types/flow-extension-runner/src/v2/polling-triggers/method-names.d.ts +1 -0
- package/runtime/types/flow-extension-runner/src/v2/polling-triggers/polling-triggers.d.ts +11 -0
- package/runtime/types/flow-extension-runner/src/v2/polling-triggers/system-params.d.ts +7 -0
- package/runtime/types/flow-extension-runner/src/v2/polling-triggers/trigger-method.d.ts +25 -0
- package/runtime/types/flow-extension-runner/src/v2/polling-triggers/types.d.ts +46 -0
- package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/method-names.d.ts +7 -0
- package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/realtime-setup.d.ts +10 -0
- package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/system-params.d.ts +29 -0
- package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/trigger-method.d.ts +33 -0
- package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/types.d.ts +147 -0
- package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/verify.d.ts +2 -0
- package/runtime/types/flow-extension-runner/src/v2/registry.d.ts +20 -0
- package/runtime/types/flow-extension-runner/src/v2/result.d.ts +13 -0
- package/runtime/types/flow-extension-runner/src/v2/system-method.d.ts +41 -0
- package/runtime/types/flow-extension-runner/src/v2/types.d.ts +126 -0
- package/runtime/types/jsdoc-parser/src/custom-type-defs/files.d.ts +2 -0
- package/runtime/types/jsdoc-parser/src/index.d.ts +2 -0
- package/runtime/types/jsdoc-parser/src/lib.d.ts +42 -0
- package/runtime/types/jsdoc-parser/src/types.d.ts +2 -0
- package/runtime/types/packages/cli/src/runtime/index.d.ts +5 -0
- package/runtime/types/shared/src/constants/ai-agent-tools.d.ts +20 -0
- package/runtime/types/shared/src/constants/ai.d.ts +11 -0
- package/runtime/types/shared/src/constants/api-keys.d.ts +1 -0
- package/runtime/types/shared/src/constants/app.d.ts +58 -0
- package/runtime/types/shared/src/constants/billing.d.ts +16 -0
- package/runtime/types/shared/src/constants/compliances.d.ts +3 -0
- package/runtime/types/shared/src/constants/data-types.d.ts +26 -0
- package/runtime/types/shared/src/constants/error-codes.d.ts +16 -0
- package/runtime/types/shared/src/constants/flow.d.ts +12 -0
- package/runtime/types/shared/src/constants/index.d.ts +16 -0
- package/runtime/types/shared/src/constants/knowledge-base.d.ts +13 -0
- package/runtime/types/shared/src/constants/notification-types.d.ts +985 -0
- package/runtime/types/shared/src/constants/notifications.d.ts +10 -0
- package/runtime/types/shared/src/constants/patterns.d.ts +28 -0
- package/runtime/types/shared/src/constants/retry-policy.d.ts +30 -0
- package/runtime/types/shared/src/constants/severity.d.ts +9 -0
- package/runtime/types/shared/src/constants/shared-extensions-search.d.ts +6 -0
- package/runtime/types/shared/src/constants/shared-extensions.d.ts +35 -0
- package/runtime/types/shared/src/constants/zod.d.ts +2 -0
- package/runtime/types/shared/src/errors/api.d.ts +4 -0
- package/runtime/types/shared/src/errors/base.d.ts +38 -0
- package/runtime/types/shared/src/errors/common.d.ts +39 -0
- package/runtime/types/shared/src/errors/index.d.ts +13 -0
- package/runtime/types/shared/src/errors/k8s.d.ts +4 -0
- package/runtime/types/shared/src/errors/message.d.ts +48 -0
- package/runtime/types/shared/src/errors/open-search.d.ts +4 -0
- package/runtime/types/shared/src/errors/s3.d.ts +11 -0
- package/runtime/types/shared/src/extensions/zod.d.ts +25 -0
- package/runtime/types/shared/src/scheme/account/dto.d.ts +60 -0
- package/runtime/types/shared/src/scheme/account/index.d.ts +1 -0
- package/runtime/types/shared/src/scheme/ai-agent-tools/dto.d.ts +69 -0
- package/runtime/types/shared/src/scheme/ai-agent-tools/index.d.ts +2 -0
- package/runtime/types/shared/src/scheme/ai-agent-tools/parameters.d.ts +7 -0
- package/runtime/types/shared/src/scheme/ai-router/dto.d.ts +23 -0
- package/runtime/types/shared/src/scheme/ai-router/index.d.ts +2 -0
- package/runtime/types/shared/src/scheme/api-keys/dto.d.ts +28 -0
- package/runtime/types/shared/src/scheme/api-keys/index.d.ts +2 -0
- package/runtime/types/shared/src/scheme/app/index.d.ts +1 -0
- package/runtime/types/shared/src/scheme/app/java.dto.d.ts +6 -0
- package/runtime/types/shared/src/scheme/billing/index.d.ts +1 -0
- package/runtime/types/shared/src/scheme/billing/java.dto.d.ts +163 -0
- package/runtime/types/shared/src/scheme/crm/billing.d.ts +149 -0
- package/runtime/types/shared/src/scheme/crm/dto.d.ts +212 -0
- package/runtime/types/shared/src/scheme/crm/index.d.ts +3 -0
- package/runtime/types/shared/src/scheme/data-types/index.d.ts +1 -0
- package/runtime/types/shared/src/scheme/data-types/java.dto.d.ts +23 -0
- package/runtime/types/shared/src/scheme/dynamic-forms/dto.d.ts +30 -0
- package/runtime/types/shared/src/scheme/dynamic-forms/index.d.ts +2 -0
- package/runtime/types/shared/src/scheme/extensions/index.d.ts +1 -0
- package/runtime/types/shared/src/scheme/extensions/params-to-zod.d.ts +14 -0
- package/runtime/types/shared/src/scheme/flowrunner/custom-elements.d.ts +368 -0
- package/runtime/types/shared/src/scheme/flowrunner/index.d.ts +3 -0
- package/runtime/types/shared/src/scheme/flowrunner/java.dto.d.ts +628 -0
- package/runtime/types/shared/src/scheme/index.d.ts +19 -0
- package/runtime/types/shared/src/scheme/integration-connection/dto.d.ts +81 -0
- package/runtime/types/shared/src/scheme/integration-connection/index.d.ts +2 -0
- package/runtime/types/shared/src/scheme/knowledge-base/dto.d.ts +540 -0
- package/runtime/types/shared/src/scheme/knowledge-base/index.d.ts +2 -0
- package/runtime/types/shared/src/scheme/mcp-oauth/dto.d.ts +7 -0
- package/runtime/types/shared/src/scheme/mcp-oauth/index.d.ts +2 -0
- package/runtime/types/shared/src/scheme/notifications/dto.d.ts +111 -0
- package/runtime/types/shared/src/scheme/notifications/index.d.ts +3 -0
- package/runtime/types/shared/src/scheme/notifications/rest.d.ts +148 -0
- package/runtime/types/shared/src/scheme/properties/account.d.ts +3 -0
- package/runtime/types/shared/src/scheme/properties/app.d.ts +5 -0
- package/runtime/types/shared/src/scheme/properties/billing.d.ts +12 -0
- package/runtime/types/shared/src/scheme/properties/common.d.ts +2 -0
- package/runtime/types/shared/src/scheme/properties/db.d.ts +8 -0
- package/runtime/types/shared/src/scheme/properties/flow-extensions.d.ts +7 -0
- package/runtime/types/shared/src/scheme/properties/index.d.ts +7 -0
- package/runtime/types/shared/src/scheme/remote-mcp-server/dto.d.ts +278 -0
- package/runtime/types/shared/src/scheme/remote-mcp-server/index.d.ts +2 -0
- package/runtime/types/shared/src/scheme/shared-extensions/base.d.ts +56 -0
- package/runtime/types/shared/src/scheme/shared-extensions/config.d.ts +96 -0
- package/runtime/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +485 -0
- package/runtime/types/shared/src/scheme/shared-extensions/extension.d.ts +387 -0
- package/runtime/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +64 -0
- package/runtime/types/shared/src/scheme/shared-extensions/index.d.ts +15 -0
- package/runtime/types/shared/src/scheme/shared-extensions/light.d.ts +38 -0
- package/runtime/types/shared/src/scheme/shared-extensions/logs.d.ts +21 -0
- package/runtime/types/shared/src/scheme/shared-extensions/methods.d.ts +80 -0
- package/runtime/types/shared/src/scheme/shared-extensions/params-schema.d.ts +47 -0
- package/runtime/types/shared/src/scheme/shared-extensions/popular-pool.d.ts +11 -0
- package/runtime/types/shared/src/scheme/shared-extensions/resolve.d.ts +364 -0
- package/runtime/types/shared/src/scheme/shared-extensions/rest.d.ts +9 -0
- package/runtime/types/shared/src/scheme/shared-extensions/search.d.ts +177 -0
- package/runtime/types/shared/src/scheme/shared-extensions/service-identity.d.ts +10 -0
- package/runtime/types/shared/src/scheme/shared-extensions/service-info.d.ts +15 -0
- package/runtime/types/shared/src/scheme/workspace/dto.d.ts +40 -0
- package/runtime/types/shared/src/scheme/workspace/index.d.ts +1 -0
- package/runtime/types/shared/src/utils/object.d.ts +8 -0
- package/runtime/types/shared/src/utils/uuid.d.ts +5 -0
- package/runtime/types/shared/src/utils/versions.d.ts +4 -0
- package/runtime/types/types/backendless-request.d.ts +40 -0
- package/templates/blank/files/README.md +28 -0
- package/templates/blank/files/package.json +8 -0
- package/templates/blank/files/public/icon.svg +5 -0
- package/templates/blank/files/src/index.js +130 -0
- package/templates/blank/template.json +61 -0
- package/templates/demo-todo-list/files/README.md +54 -0
- package/templates/demo-todo-list/files/package.json +8 -0
- package/templates/demo-todo-list/files/public/icon.svg +8 -0
- package/templates/demo-todo-list/files/src/index.js +590 -0
- package/templates/demo-todo-list/template.json +44 -0
- package/templates/qa-test/files/README.md +88 -0
- package/templates/qa-test/files/package.json +8 -0
- package/templates/qa-test/files/public/icon.svg +8 -0
- package/templates/qa-test/files/src/index.js +755 -0
- package/templates/qa-test/template.json +62 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare module 'backendless-request' {
|
|
2
|
+
interface RequestInstance {
|
|
3
|
+
path: string;
|
|
4
|
+
queryParams: Record<string, unknown>;
|
|
5
|
+
headers: Record<string, string>;
|
|
6
|
+
|
|
7
|
+
on(event: 'request', handler: () => void): void;
|
|
8
|
+
on(event: 'done', handler: (error: Error | null, result: unknown) => void): void;
|
|
9
|
+
|
|
10
|
+
query(params: Record<string, unknown>): RequestInstance;
|
|
11
|
+
set(headers: Record<string, string | undefined> | string, value?: string): RequestInstance;
|
|
12
|
+
send(body?: unknown): Promise<unknown>;
|
|
13
|
+
setTimeout(ms: number): RequestInstance;
|
|
14
|
+
unwrapBody(unwrap: boolean): RequestInstance;
|
|
15
|
+
setEncoding(encoding: string | null): RequestInstance;
|
|
16
|
+
// terminal — sends the request and always resolves raw bytes (Buffer in node, Uint8Array in a browser)
|
|
17
|
+
toBuffer(): Promise<Buffer | Uint8Array>;
|
|
18
|
+
type(contentType: string): RequestInstance;
|
|
19
|
+
// a plain object, a WHATWG FormData or a Request.FormData
|
|
20
|
+
form(data: Record<string, unknown> | FormData | object): RequestInstance;
|
|
21
|
+
then<T>(onFulfilled?: (value: unknown) => T): Promise<T>;
|
|
22
|
+
catch<T>(onRejected?: (error: unknown) => T): Promise<T>;
|
|
23
|
+
|
|
24
|
+
basicAuth(basicAuth: { token: string } | null | undefined): RequestInstance;
|
|
25
|
+
authKey(authKey: string | null | undefined): RequestInstance;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface RequestStatic {
|
|
29
|
+
new (url: string, method: string, body?: unknown): RequestInstance;
|
|
30
|
+
get(url: string): RequestInstance;
|
|
31
|
+
post(url: string): RequestInstance;
|
|
32
|
+
put(url: string): RequestInstance;
|
|
33
|
+
patch(url: string): RequestInstance;
|
|
34
|
+
delete(url: string): RequestInstance;
|
|
35
|
+
FormData: typeof FormData | undefined;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const Request: RequestStatic;
|
|
39
|
+
export default Request;
|
|
40
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# {{name}} FlowRunner Extension
|
|
2
|
+
|
|
3
|
+
{{description}}
|
|
4
|
+
|
|
5
|
+
Generated from the `blank` template — a minimal service with one action and the shared `apiRequest` helper
|
|
6
|
+
in place. Point `API_BASE_URL` at your API, replace the Ping action, and build from there.
|
|
7
|
+
|
|
8
|
+
## Ideal Use Cases
|
|
9
|
+
|
|
10
|
+
- Starting a new integration against a real API
|
|
11
|
+
- Wrapping an internal service so flows can call it
|
|
12
|
+
|
|
13
|
+
## List of Actions
|
|
14
|
+
|
|
15
|
+
- Ping
|
|
16
|
+
<!-- {{#if enableFiles}} -->
|
|
17
|
+
- Save Note
|
|
18
|
+
<!-- {{/if}} -->
|
|
19
|
+
|
|
20
|
+
## List of Triggers
|
|
21
|
+
|
|
22
|
+
This service declares no triggers.
|
|
23
|
+
|
|
24
|
+
## Agent Ideas
|
|
25
|
+
|
|
26
|
+
- Use **{{name}}** "Ping" as a health check at the start of a flow, then branch on the result
|
|
27
|
+
- Combine **{{name}}** with **Gmail** "Send Email" to notify someone when an operation completes
|
|
28
|
+
- Log every **{{name}}** call into **Google Sheets** "Append Row" to build an audit trail
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-label="Blank service">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#475569"/>
|
|
3
|
+
<rect x="15" y="15" width="34" height="34" rx="7" fill="none" stroke="#cbd5e1" stroke-width="2.6" stroke-dasharray="6 5.5" stroke-linecap="round"/>
|
|
4
|
+
<path d="M32 24v16M24 32h16" fill="none" stroke="#ffffff" stroke-width="3.4" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// {{name}} — a FlowRunner service.
|
|
2
|
+
//
|
|
3
|
+
// A minimal starting point: one action, one config item, and the shared `apiRequest` helper every other
|
|
4
|
+
// action should go through. Rename the placeholders, point `API_BASE_URL` at your API, and build from here.
|
|
5
|
+
//
|
|
6
|
+
// For the full authoring surface — dictionaries, dynamic params, result loaders, triggers — generate the
|
|
7
|
+
// `demo-todo-list` template alongside this one and read it: `flowrunner cs demo`.
|
|
8
|
+
|
|
9
|
+
const z = Flowrunner.z
|
|
10
|
+
|
|
11
|
+
const API_BASE_URL = 'https://api.example.com'
|
|
12
|
+
|
|
13
|
+
const ext = Flowrunner.createExtension({
|
|
14
|
+
id : '{{id}}',
|
|
15
|
+
name : '{{name}}',
|
|
16
|
+
description: '{{description}}',
|
|
17
|
+
logo : '/icon.svg',
|
|
18
|
+
|
|
19
|
+
// [primary, secondary] — the node's colours in the flow editor.
|
|
20
|
+
appearanceColors: ['#475569', '#cbd5e1'],
|
|
21
|
+
|
|
22
|
+
// {{#if enableFiles}}
|
|
23
|
+
// Provisions `ctx.files` in every handler — upload, list, get, delete, usage.
|
|
24
|
+
usesFileStorage: true,
|
|
25
|
+
// {{/if}}
|
|
26
|
+
|
|
27
|
+
// What the workspace fills in before the service can run.
|
|
28
|
+
configItems: z.object({
|
|
29
|
+
// {{#if enableOauth}}
|
|
30
|
+
// The OAuth client credentials, read by setupOauth2 below.
|
|
31
|
+
//
|
|
32
|
+
// On a *shared* (global) extension these are usually marked `.shared()` so every workspace uses one
|
|
33
|
+
// set. Custom extensions deployed with this CLI have a per-app config tier only, so they stay per-app.
|
|
34
|
+
clientId : z.string().label('Client Id'),
|
|
35
|
+
clientSecret: z.string().label('Client Secret'),
|
|
36
|
+
// {{/if}}
|
|
37
|
+
apiKey : z.string().optional().label('API Key'),
|
|
38
|
+
}),
|
|
39
|
+
|
|
40
|
+
// Runs once per invocation. Whatever it returns is `context` in every handler — derive base URLs and
|
|
41
|
+
// resolved credentials here rather than repeating them in each one.
|
|
42
|
+
initContext: ({ config, oauth }) => ({
|
|
43
|
+
baseUrl: API_BASE_URL,
|
|
44
|
+
// {{#if enableOauth}}
|
|
45
|
+
accessToken: oauth?.accessToken,
|
|
46
|
+
// {{/if}}
|
|
47
|
+
apiKey : config.apiKey,
|
|
48
|
+
}),
|
|
49
|
+
|
|
50
|
+
// The one place HTTP happens. Every action should call the API through this, so auth, error handling and
|
|
51
|
+
// logging live in a single spot. The runtime injects `context` and `logger`; the rest is yours to define.
|
|
52
|
+
apiRequest: async ({ path, method = 'get', query, body, context, logger }) => {
|
|
53
|
+
logger.debug(`[${ method.toUpperCase() }] ${ path }`)
|
|
54
|
+
|
|
55
|
+
const headers = {
|
|
56
|
+
// {{#if enableOauth}}
|
|
57
|
+
Authorization: `Bearer ${ context.accessToken }`,
|
|
58
|
+
// {{/if}}
|
|
59
|
+
'X-Api-Key' : context.apiKey,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return Flowrunner.Request[method.toLowerCase()](`${ context.baseUrl }${ path }`)
|
|
63
|
+
.set(headers)
|
|
64
|
+
.query(query)
|
|
65
|
+
.send(body)
|
|
66
|
+
},
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
// {{#if enableOauth}}
|
|
70
|
+
// ─── OAuth2 ──────────────────────────────────────────────────────────────────
|
|
71
|
+
// Declaring this makes the service require a connection before it can run. Fill in the two endpoints and
|
|
72
|
+
// the identity call from your provider's docs.
|
|
73
|
+
ext.setupOauth2({
|
|
74
|
+
scopes : ['read'],
|
|
75
|
+
authorizeUrl: `${ API_BASE_URL }/oauth/authorize`,
|
|
76
|
+
tokenUrl : `${ API_BASE_URL }/oauth/token`,
|
|
77
|
+
clientAuth : 'body',
|
|
78
|
+
|
|
79
|
+
// Shown as the name of the connection in the console.
|
|
80
|
+
identityRequest: ({ apiRequest }) => apiRequest({ path: '/me' }),
|
|
81
|
+
identity : me => ({ name: me.email, imageUrl: me.avatarUrl, userData: me }),
|
|
82
|
+
})
|
|
83
|
+
// {{/if}}
|
|
84
|
+
|
|
85
|
+
// ─── Actions ─────────────────────────────────────────────────────────────────
|
|
86
|
+
|
|
87
|
+
ext.addAction({
|
|
88
|
+
category : '{{name}}',
|
|
89
|
+
id : 'ping',
|
|
90
|
+
label : 'Ping',
|
|
91
|
+
description: 'Replace me with the first real operation.',
|
|
92
|
+
params : z.object({
|
|
93
|
+
message: z.string().label('Message'),
|
|
94
|
+
}),
|
|
95
|
+
// The sample shape the console shows downstream. Swap for a `z.object({...}).example({...})` schema, or a
|
|
96
|
+
// function, once the real response shape is known.
|
|
97
|
+
result : { ok: true, echoed: 'hello' },
|
|
98
|
+
execute : ({ params, logger }) => {
|
|
99
|
+
logger.info(`Ping: ${ params.message }`)
|
|
100
|
+
|
|
101
|
+
// A real action calls the API through the shared helper:
|
|
102
|
+
// return apiRequest({ path: '/things', method: 'post', body: { message: params.message } })
|
|
103
|
+
return { ok: true, echoed: params.message }
|
|
104
|
+
},
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
// {{#if enableFiles}}
|
|
108
|
+
ext.addAction({
|
|
109
|
+
category : '{{name}}',
|
|
110
|
+
id : 'saveNote',
|
|
111
|
+
label : 'Save Note',
|
|
112
|
+
description: 'Writes text to a file in the workspace file storage.',
|
|
113
|
+
params : z.object({
|
|
114
|
+
filename: z.string().optional().default('note.txt').label('File name'),
|
|
115
|
+
content : z.text().label('Content'),
|
|
116
|
+
}),
|
|
117
|
+
result : { url: 'https://files.example.com/note.txt', size: 12 },
|
|
118
|
+
execute : async ({ params, files, filesScope }) => {
|
|
119
|
+
const saved = await files.uploadFile(Buffer.from(params.content), {
|
|
120
|
+
// `filesScope` names the storage layers: WORKSPACE, FLOW or EXECUTION.
|
|
121
|
+
scope : filesScope.FLOW,
|
|
122
|
+
filename : params.filename,
|
|
123
|
+
generateUrl: true,
|
|
124
|
+
ttl : 3600,
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
return { url: saved.url, size: saved.size }
|
|
128
|
+
},
|
|
129
|
+
})
|
|
130
|
+
// {{/if}}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "blank",
|
|
3
|
+
"label": "Blank",
|
|
4
|
+
"description": "A minimal service \u2014 one action, ready to build on. Optionally with OAuth2 and file storage wired up.",
|
|
5
|
+
"prompts": [
|
|
6
|
+
{
|
|
7
|
+
"name": "id",
|
|
8
|
+
"label": "Service id",
|
|
9
|
+
"type": "string",
|
|
10
|
+
"default": "my-service",
|
|
11
|
+
"validate": "serviceId",
|
|
12
|
+
"hint": "Becomes the services/<id>/ folder and the service id, which is frozen once deployed."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "name",
|
|
16
|
+
"label": "Display name",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"default": "{{id|titleCase}}",
|
|
19
|
+
"validate": "nonEmpty"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "description",
|
|
23
|
+
"label": "Description",
|
|
24
|
+
"type": "string",
|
|
25
|
+
"default": "{{name}} integration.",
|
|
26
|
+
"validate": "nonEmpty"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "enableOauth",
|
|
30
|
+
"label": "Enable OAuth2",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": false,
|
|
33
|
+
"hint": "Adds a setupOauth2 block with the authorize/token endpoints to fill in."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "enableFiles",
|
|
37
|
+
"label": "Enable the Files API",
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"default": false,
|
|
40
|
+
"hint": "Sets usesFileStorage so ctx.files is available in every handler."
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"files": [
|
|
44
|
+
{
|
|
45
|
+
"from": "package.json",
|
|
46
|
+
"to": "package.json"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"from": "src/index.js",
|
|
50
|
+
"to": "src/index.js"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"from": "README.md",
|
|
54
|
+
"to": "README.md"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"from": "public/icon.svg",
|
|
58
|
+
"to": "public/icon.svg"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# {{name}} FlowRunner Extension
|
|
2
|
+
|
|
3
|
+
{{description}}
|
|
4
|
+
|
|
5
|
+
A to-do list service: create lists, add and update tasks, tick them off, and read them back — plus a
|
|
6
|
+
general-purpose HTTP Request action for calling any endpoint from a flow.
|
|
7
|
+
|
|
8
|
+
Lists are held **in the pod's memory**. They last as long as the pod does and start empty again after a
|
|
9
|
+
restart or redeploy. That keeps the service dependency-free; replace the storage map in `src/index.js` with
|
|
10
|
+
real API calls when you build the real thing.
|
|
11
|
+
|
|
12
|
+
## Ideal Use Cases
|
|
13
|
+
|
|
14
|
+
- Trying FlowRunner out end to end — deploy, configure, and run a working service in minutes
|
|
15
|
+
- A scratch checklist inside a flow: collect items across steps, then read the open ones back
|
|
16
|
+
- Calling an arbitrary HTTP endpoint from a flow without writing an extension for it
|
|
17
|
+
- A starting point for a real integration — swap the in-memory storage for your API
|
|
18
|
+
|
|
19
|
+
## List of Actions
|
|
20
|
+
|
|
21
|
+
- Add Task
|
|
22
|
+
- Create List
|
|
23
|
+
- Delete List
|
|
24
|
+
- Delete Task
|
|
25
|
+
<!-- {{#if useFilesApi}} -->
|
|
26
|
+
- Export List
|
|
27
|
+
<!-- {{/if}} -->
|
|
28
|
+
- Get List
|
|
29
|
+
- Get Lists
|
|
30
|
+
- Get Tasks
|
|
31
|
+
- HTTP Request
|
|
32
|
+
- Mark Task Completed
|
|
33
|
+
- Update Task
|
|
34
|
+
|
|
35
|
+
## List of Triggers
|
|
36
|
+
|
|
37
|
+
This service declares no triggers.
|
|
38
|
+
|
|
39
|
+
## Configuration
|
|
40
|
+
|
|
41
|
+
| Setting | Required | Effect |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| Owner | yes | Stamped on every list and task as `createdBy` |
|
|
44
|
+
| Default Priority | no | Priority given to a task added without one |
|
|
45
|
+
| Max Tasks Per List | no | Add Task fails once a list reaches this many tasks |
|
|
46
|
+
| Auto-create Missing Lists | no | Add Task creates the list instead of failing |
|
|
47
|
+
| Default Tags | no | One per line; added to every new task |
|
|
48
|
+
| Proxy Auth Token | no | Sent as a Bearer header by HTTP Request when "Use Stored Auth" is on |
|
|
49
|
+
|
|
50
|
+
## Agent Ideas
|
|
51
|
+
|
|
52
|
+
- Use **{{name}}** "Get Tasks" with Status "Not completed" to gather what is still open, then **Gmail** "Send Email" to send the list as a morning digest
|
|
53
|
+
- Use **Airtable** "Get Records" to pull incoming requests, then **{{name}}** "Add Task" to open a task for each one on the right list
|
|
54
|
+
- When a task is closed, use **{{name}}** "Mark Task Completed" and **Google Sheets** "Append Row" to log completion times for reporting
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-label="To-do list">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#4f46e5"/>
|
|
3
|
+
<rect x="13" y="16" width="13" height="13" rx="3.5" fill="#ffffff"/>
|
|
4
|
+
<path d="M16.6 22.6l2.9 2.9 5.4-5.6" fill="none" stroke="#4f46e5" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<rect x="31" y="20" width="20" height="5" rx="2.5" fill="#ffffff"/>
|
|
6
|
+
<rect x="13" y="35" width="13" height="13" rx="3.5" fill="none" stroke="#a5b4fc" stroke-width="2.6"/>
|
|
7
|
+
<rect x="31" y="39" width="20" height="5" rx="2.5" fill="#a5b4fc"/>
|
|
8
|
+
</svg>
|