@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,12 @@
|
|
|
1
|
+
import { type ServiceConfigsValues } from './constants';
|
|
2
|
+
import type { ConfigItem } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Resolve the effective config values for a service instance: for each declared item take its value from the
|
|
5
|
+
* single `configs` bag, deserialize it with the type adapter, and fall back to the item's default when empty.
|
|
6
|
+
*
|
|
7
|
+
* ONE bag on purpose. `shared` is a UI directive — it decides who fills a value in and in which dialog — so
|
|
8
|
+
* it has no business steering resolution. A service installed as a custom extension has no shared tier at
|
|
9
|
+
* all: the customer fills in every item in one dialog. Whoever runs a *shared* extension merges the two
|
|
10
|
+
* tiers before calling in; everyone else passes the single bag they already have.
|
|
11
|
+
*/
|
|
12
|
+
export declare function prepareServiceConfig(configItems: ConfigItem[], configs?: ServiceConfigsValues): ServiceConfigsValues;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ServiceConfigsValues = Record<string, unknown>;
|
|
2
|
+
export declare const ServiceConfigItemTypes: {
|
|
3
|
+
readonly STRING: "string";
|
|
4
|
+
readonly BOOL: "bool";
|
|
5
|
+
readonly DATE: "date";
|
|
6
|
+
readonly CHOICE: "choice";
|
|
7
|
+
readonly TEXT: "text";
|
|
8
|
+
};
|
|
9
|
+
export type ServiceConfigItemType = (typeof ServiceConfigItemTypes)[keyof typeof ServiceConfigItemTypes];
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export declare const FileScope: {
|
|
2
|
+
readonly WORKSPACE: "WORKSPACE";
|
|
3
|
+
readonly FLOW: "FLOW";
|
|
4
|
+
readonly EXECUTION: "EXECUTION";
|
|
5
|
+
};
|
|
6
|
+
export type FileScope = (typeof FileScope)[keyof typeof FileScope];
|
|
7
|
+
export type FileScopes = typeof FileScope;
|
|
8
|
+
export interface FlowrunnerContextFilesOptions {
|
|
9
|
+
serverURL: string;
|
|
10
|
+
appId: string;
|
|
11
|
+
apiKey: string;
|
|
12
|
+
runtimeKey: string;
|
|
13
|
+
flowId?: string | null;
|
|
14
|
+
executionId?: string | null;
|
|
15
|
+
retrieveNewS3Token: (runtimeKey: string) => Promise<{
|
|
16
|
+
filesS3Token: string;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export interface UploadFileOptions {
|
|
20
|
+
scope?: FileScope;
|
|
21
|
+
filename?: string;
|
|
22
|
+
ttl?: number;
|
|
23
|
+
generateUrl?: boolean;
|
|
24
|
+
objectTtl?: number;
|
|
25
|
+
overwrite?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface ListOptions {
|
|
28
|
+
scope?: FileScope;
|
|
29
|
+
ttl?: number;
|
|
30
|
+
generateUrl?: boolean;
|
|
31
|
+
limit?: number;
|
|
32
|
+
cursor?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface GetOptions {
|
|
35
|
+
scope?: FileScope;
|
|
36
|
+
ttl?: number;
|
|
37
|
+
generateUrl?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface DeleteOptions {
|
|
40
|
+
scope?: FileScope;
|
|
41
|
+
}
|
|
42
|
+
export interface UploadResult {
|
|
43
|
+
key: string;
|
|
44
|
+
filename: string;
|
|
45
|
+
url: string;
|
|
46
|
+
size: number;
|
|
47
|
+
urlExpiresAt: string;
|
|
48
|
+
objectExpiresAt: string | null;
|
|
49
|
+
overwritten: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface FileInfo {
|
|
52
|
+
key: string;
|
|
53
|
+
filename: string;
|
|
54
|
+
url: string;
|
|
55
|
+
size: number;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
urlExpiresAt: string;
|
|
58
|
+
objectExpiresAt: string | null;
|
|
59
|
+
}
|
|
60
|
+
export interface ListResult {
|
|
61
|
+
files: FileInfo[];
|
|
62
|
+
cursor: string | null;
|
|
63
|
+
hasMore: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface DeleteResult {
|
|
66
|
+
key: string;
|
|
67
|
+
freedBytes: number;
|
|
68
|
+
deleted: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface UsageResult {
|
|
71
|
+
workspaceId: string;
|
|
72
|
+
usedBytes: number;
|
|
73
|
+
quotaBytes: number;
|
|
74
|
+
usedFormatted: string;
|
|
75
|
+
quotaFormatted: string;
|
|
76
|
+
utilizationPercent: number;
|
|
77
|
+
fileCount: number;
|
|
78
|
+
}
|
|
79
|
+
export interface FilesApi {
|
|
80
|
+
uploadFile(file: Buffer | Uint8Array, options?: UploadFileOptions): Promise<UploadResult>;
|
|
81
|
+
list(options?: ListOptions): Promise<ListResult>;
|
|
82
|
+
get(filename: string, options?: GetOptions): Promise<FileInfo>;
|
|
83
|
+
delete(filename: string, options?: DeleteOptions): Promise<DeleteResult>;
|
|
84
|
+
usage(): Promise<UsageResult>;
|
|
85
|
+
}
|
|
86
|
+
export declare class FlowrunnerContextFiles implements FilesApi {
|
|
87
|
+
appId: string;
|
|
88
|
+
apiKey: string;
|
|
89
|
+
runtimeKey: string;
|
|
90
|
+
serverURL: string;
|
|
91
|
+
flowId: string | null;
|
|
92
|
+
executionId: string | null;
|
|
93
|
+
retrieveNewS3Token: (runtimeKey: string) => Promise<{
|
|
94
|
+
filesS3Token: string;
|
|
95
|
+
}>;
|
|
96
|
+
constructor({ appId, apiKey, runtimeKey, serverURL, flowId, executionId, retrieveNewS3Token, }: FlowrunnerContextFilesOptions);
|
|
97
|
+
get base(): string;
|
|
98
|
+
private collectionPath;
|
|
99
|
+
private filePath;
|
|
100
|
+
private resolveFilesS3Token;
|
|
101
|
+
private request;
|
|
102
|
+
uploadFile(file: Buffer | Uint8Array, options?: UploadFileOptions): Promise<UploadResult>;
|
|
103
|
+
list(options?: ListOptions): Promise<ListResult>;
|
|
104
|
+
get(filename: string, options?: GetOptions): Promise<FileInfo>;
|
|
105
|
+
delete(filename: string, options?: DeleteOptions): Promise<DeleteResult>;
|
|
106
|
+
usage(): Promise<UsageResult>;
|
|
107
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FlowrunnerContextFiles, type FlowrunnerContextFilesOptions } from './context-files';
|
|
2
|
+
export type FlowrunnerContextOptions = FlowrunnerContextFilesOptions;
|
|
3
|
+
export declare class FlowrunnerContext {
|
|
4
|
+
Files: FlowrunnerContextFiles;
|
|
5
|
+
constructor(options: FlowrunnerContextOptions);
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ServiceConfigItemType } from './constants';
|
|
2
|
+
export interface ConfigItem {
|
|
3
|
+
name: string;
|
|
4
|
+
type: ServiceConfigItemType;
|
|
5
|
+
shared: boolean;
|
|
6
|
+
required: boolean;
|
|
7
|
+
description: string;
|
|
8
|
+
label: string;
|
|
9
|
+
defaultValue?: unknown;
|
|
10
|
+
options: string[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FlowExtensionErrorCode } from './codes';
|
|
2
|
+
export interface FlowExtensionErrorJSON {
|
|
3
|
+
name: string;
|
|
4
|
+
code: FlowExtensionErrorCode;
|
|
5
|
+
statusCode: number;
|
|
6
|
+
message: string;
|
|
7
|
+
details?: unknown;
|
|
8
|
+
}
|
|
9
|
+
export declare class FlowExtensionError<DetailsT = unknown> extends Error {
|
|
10
|
+
readonly code: FlowExtensionErrorCode;
|
|
11
|
+
readonly statusCode: number;
|
|
12
|
+
readonly details?: DetailsT | undefined;
|
|
13
|
+
readonly isFlowExtensionError = true;
|
|
14
|
+
constructor(code: FlowExtensionErrorCode, statusCode: number, message: string, details?: DetailsT | undefined);
|
|
15
|
+
toJSON(): FlowExtensionErrorJSON;
|
|
16
|
+
}
|
|
17
|
+
export declare function isFlowExtensionError(value: unknown): value is FlowExtensionError;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const FlowExtensionErrorCodes: {
|
|
2
|
+
readonly UNKNOWN_METHOD: "FR_EXT_UNKNOWN_METHOD";
|
|
3
|
+
readonly MISSING_METHOD_PARAM: "FR_EXT_MISSING_METHOD_PARAM";
|
|
4
|
+
readonly INVALID_METHOD_INPUT: "FR_EXT_INVALID_METHOD_INPUT";
|
|
5
|
+
readonly INVALID_CRITERIA: "FR_EXT_INVALID_CRITERIA";
|
|
6
|
+
readonly DUPLICATE_ITEM_ID: "FR_EXT_DUPLICATE_ITEM_ID";
|
|
7
|
+
readonly EXTENSION_NOT_REGISTERED: "FR_EXT_NOT_REGISTERED";
|
|
8
|
+
readonly INVALID_CONFIG: "FR_EXT_INVALID_CONFIG";
|
|
9
|
+
readonly INVALID_SCHEMA: "FR_EXT_INVALID_SCHEMA";
|
|
10
|
+
readonly INVALID_TRIGGER_CONFIG: "FR_EXT_INVALID_TRIGGER_CONFIG";
|
|
11
|
+
readonly UNKNOWN_TRIGGER: "FR_EXT_UNKNOWN_TRIGGER";
|
|
12
|
+
readonly REALTIME_SETUP: "FR_EXT_REALTIME_SETUP";
|
|
13
|
+
readonly OAUTH_SETUP: "FR_EXT_OAUTH_SETUP";
|
|
14
|
+
readonly FEATURE_NOT_ENABLED: "FR_EXT_FEATURE_NOT_ENABLED";
|
|
15
|
+
readonly INVALID_DICTIONARY_OUTPUT_SCHEME: "INVALID_DICTIONARY_OUTPUT_SCHEME";
|
|
16
|
+
};
|
|
17
|
+
export type FlowExtensionErrorCode = (typeof FlowExtensionErrorCodes)[keyof typeof FlowExtensionErrorCodes];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { FlowExtensionError } from './base';
|
|
2
|
+
export declare class UnknownMethodError extends FlowExtensionError {
|
|
3
|
+
constructor(serviceId: string, methodName: string);
|
|
4
|
+
}
|
|
5
|
+
export declare class MissingMethodParamError extends FlowExtensionError {
|
|
6
|
+
constructor(serviceId: string, param: string);
|
|
7
|
+
}
|
|
8
|
+
export interface ValidationIssue {
|
|
9
|
+
path: string;
|
|
10
|
+
message: string;
|
|
11
|
+
code?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class InvalidMethodInputError extends FlowExtensionError {
|
|
14
|
+
constructor(serviceId: string, methodName: string, target: string, issues: ValidationIssue[]);
|
|
15
|
+
}
|
|
16
|
+
export declare class InvalidCriteriaError extends FlowExtensionError {
|
|
17
|
+
constructor(serviceId: string, methodName: string, issues: ValidationIssue[]);
|
|
18
|
+
}
|
|
19
|
+
export declare class DuplicateItemIdError extends FlowExtensionError {
|
|
20
|
+
constructor(serviceId: string, id: string, kind: string);
|
|
21
|
+
}
|
|
22
|
+
export declare class ExtensionNotRegisteredError extends FlowExtensionError {
|
|
23
|
+
constructor(serviceId: string, entryPoint?: string);
|
|
24
|
+
}
|
|
25
|
+
export declare class InvalidConfigError extends FlowExtensionError {
|
|
26
|
+
constructor(serviceId: string, issues: ValidationIssue[]);
|
|
27
|
+
}
|
|
28
|
+
export declare class InvalidSchemaError extends FlowExtensionError {
|
|
29
|
+
constructor(message: string, details: Record<string, unknown>);
|
|
30
|
+
}
|
|
31
|
+
export declare class InvalidTriggerConfigError extends FlowExtensionError {
|
|
32
|
+
constructor(serviceId: string, message: string, details?: Record<string, unknown>);
|
|
33
|
+
}
|
|
34
|
+
export declare class UnknownTriggerError extends FlowExtensionError {
|
|
35
|
+
constructor(serviceId: string, triggerId: string, kind?: string);
|
|
36
|
+
}
|
|
37
|
+
export declare class RealtimeSetupError extends FlowExtensionError {
|
|
38
|
+
constructor(serviceId: string, message: string);
|
|
39
|
+
}
|
|
40
|
+
export declare class OAuthSetupError extends FlowExtensionError {
|
|
41
|
+
constructor(serviceId: string, message: string);
|
|
42
|
+
}
|
|
43
|
+
export declare class FeatureNotEnabledError extends FlowExtensionError {
|
|
44
|
+
constructor(feature: string, hint: string);
|
|
45
|
+
}
|
|
46
|
+
export declare class InvalidDictionaryOutputScheme extends FlowExtensionError {
|
|
47
|
+
constructor(serviceId: string, dictionaryName: string);
|
|
48
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type BLRequest from 'backendless-request'
|
|
2
|
+
|
|
3
|
+
import type { ServiceConfigItemTypes } from './common/constants'
|
|
4
|
+
import type { ServiceClassType } from './v1/constants'
|
|
5
|
+
import type { ConfigItemSource } from './v1/types'
|
|
6
|
+
import type { createExtension } from './v2/create-extension'
|
|
7
|
+
import type { FlowrunnerCrypto } from './v2/crypto'
|
|
8
|
+
import type { ExtendedZod } from './v2/params'
|
|
9
|
+
import type { getExtension } from './v2/registry'
|
|
10
|
+
|
|
11
|
+
// The single `Flowrunner` runtime installed on the global scope by ../namespace.ts. Shared by v1 and v2:
|
|
12
|
+
// - `Request` — HTTP client used by service code (`Flowrunner.Request.get(...)`).
|
|
13
|
+
// - `z` / `createExtension` / `getExtension` — the v2 authoring surface (services do `const z = Flowrunner.z`).
|
|
14
|
+
// - `ServerCode` — the v1-only registration seam, set for the duration of a v1 require (see v1/namespace.ts).
|
|
15
|
+
export interface FlowrunnerRuntime {
|
|
16
|
+
Request: typeof BLRequest
|
|
17
|
+
z: ExtendedZod
|
|
18
|
+
crypto: FlowrunnerCrypto
|
|
19
|
+
createExtension: typeof createExtension
|
|
20
|
+
getExtension: typeof getExtension
|
|
21
|
+
ServerCode: FlowrunnerServerCode | null
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface FlowrunnerServerCode {
|
|
25
|
+
addService(ServiceClass: ServiceClassType, sourceConfigItems?: ConfigItemSource[]): void
|
|
26
|
+
ConfigItems: {
|
|
27
|
+
TYPES: typeof ServiceConfigItemTypes
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare global {
|
|
32
|
+
|
|
33
|
+
var Flowrunner: FlowrunnerRuntime
|
|
34
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './namespace';
|
|
2
|
+
import * as v1 from './v1';
|
|
3
|
+
import { createFlowrunnerSandboxV1 } from './v1/namespace';
|
|
4
|
+
import * as v2 from './v2';
|
|
5
|
+
export * from './errors';
|
|
6
|
+
export type { RunServiceMethodData } from './v2';
|
|
7
|
+
export type { FlowrunnerContextOptions } from './common/context';
|
|
8
|
+
export type { DeleteOptions, DeleteResult, FileInfo, FilesApi, GetOptions, ListOptions, ListResult, UploadFileOptions, UploadResult, UsageResult, } from './common/context-files';
|
|
9
|
+
export { FileScope } from './common/context-files';
|
|
10
|
+
export type ExtensionVersion = 'v1' | 'v2';
|
|
11
|
+
export { createFlowrunnerSandboxV1, };
|
|
12
|
+
export declare function detectVersion(serviceId: string, serviceEntryPointPath: string): ExtensionVersion;
|
|
13
|
+
export declare function getServiceConfigs(serviceId: string, serviceEntryPointPath: string): ReturnType<typeof v1.getServiceConfigs>;
|
|
14
|
+
export declare function runServiceMethod(data: v2.RunServiceMethodData): Promise<unknown>;
|
|
15
|
+
export declare function buildServiceDefinition(serviceId: string, serviceEntryPointPath: string): v2.SharedExtensionDefinition | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { prepareServiceConfig } from '../common/config';
|
|
2
|
+
export type { ServiceConfigItemType, ServiceConfigsValues } from '../common/constants';
|
|
3
|
+
export { ServiceConfigItemTypes } from '../common/constants';
|
|
4
|
+
export { FlowrunnerContext, type FlowrunnerContextOptions } from '../common/context';
|
|
5
|
+
export { FileScope, FlowrunnerContextFiles } from '../common/context-files';
|
|
6
|
+
export type { ConfigItem } from '../common/types';
|
|
7
|
+
export { normalizeConfigItems } from './config';
|
|
8
|
+
export type { MethodRequestArgumentsList, MethodRequestArgumentsMap, ServiceClassType } from './constants';
|
|
9
|
+
export { OAUTH_ACCESS_TOKEN_HEADER } from './constants';
|
|
10
|
+
export { getServiceConfigs, runServiceMethod } from './service';
|
|
11
|
+
export type { ConfigItemSource } from './types';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../namespace';
|
|
2
|
+
import type { ConfigItem } from '../common/types';
|
|
3
|
+
import { type ServiceClassType } from './constants';
|
|
4
|
+
interface RegisteredService {
|
|
5
|
+
ServiceClass: ServiceClassType;
|
|
6
|
+
configItems: ConfigItem[];
|
|
7
|
+
}
|
|
8
|
+
export declare function createFlowrunnerSandboxV1(serviceId: string, cb: () => void): RegisteredService | undefined;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ServiceConfigsValues } from '../common/constants';
|
|
2
|
+
import { type FlowrunnerContextOptions } from '../common/context';
|
|
3
|
+
import type { FilesApi } from '../common/context-files';
|
|
4
|
+
import type { ConfigItem } from '../common/types';
|
|
5
|
+
import { type MethodRequestArgumentsList, type MethodRequestArgumentsMap } from './constants';
|
|
6
|
+
export declare function getServiceConfigs(serviceId: string, serviceEntryPointPath: string): ConfigItem[];
|
|
7
|
+
type RunServiceMethodData = {
|
|
8
|
+
serviceId: string;
|
|
9
|
+
serviceEntryPointPath: string;
|
|
10
|
+
configs?: ServiceConfigsValues;
|
|
11
|
+
methodName: string;
|
|
12
|
+
methodData?: MethodRequestArgumentsMap;
|
|
13
|
+
methodArgs?: MethodRequestArgumentsList;
|
|
14
|
+
retrieveNewS3Token: (runtimeKey: string) => Promise<{
|
|
15
|
+
filesS3Token: string;
|
|
16
|
+
}>;
|
|
17
|
+
createFiles?: (options: FlowrunnerContextOptions) => FilesApi;
|
|
18
|
+
executionContext: {
|
|
19
|
+
runtimeKey: string;
|
|
20
|
+
accessToken: string;
|
|
21
|
+
appId: string;
|
|
22
|
+
apiKey: string;
|
|
23
|
+
serverURL: string;
|
|
24
|
+
flowId: string;
|
|
25
|
+
executionId: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare function runServiceMethod(data: RunServiceMethodData): Promise<unknown>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ServiceConfigItemType } from '../common/constants';
|
|
2
|
+
export interface ConfigItemSource {
|
|
3
|
+
name: string;
|
|
4
|
+
type?: ServiceConfigItemType;
|
|
5
|
+
shared?: boolean;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
description?: string | null;
|
|
8
|
+
hint?: string | null;
|
|
9
|
+
label?: string;
|
|
10
|
+
displayName?: string;
|
|
11
|
+
defaultValue?: unknown;
|
|
12
|
+
options?: string[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ExecutionContext } from '../context/execution-context';
|
|
2
|
+
import type { Extension } from '../extension';
|
|
3
|
+
import { type LoaderOwner } from '../loaders/loader-owner';
|
|
4
|
+
import { ExtensionMethod } from '../method';
|
|
5
|
+
import type { SharedExtensionMethod } from '../model/model-types';
|
|
6
|
+
import { MethodParams } from '../params';
|
|
7
|
+
import { ResultSpec } from '../result';
|
|
8
|
+
import type { ActionProps, AnySchema, HandlerBag } from '../types';
|
|
9
|
+
export declare class ActionMethod extends ExtensionMethod implements LoaderOwner {
|
|
10
|
+
private readonly props;
|
|
11
|
+
readonly params: MethodParams;
|
|
12
|
+
readonly result: ResultSpec;
|
|
13
|
+
readonly dynamicParamsCriteria: MethodParams;
|
|
14
|
+
constructor(extension: Extension, props: ActionProps);
|
|
15
|
+
get id(): string;
|
|
16
|
+
get name(): string;
|
|
17
|
+
get registerAs(): string;
|
|
18
|
+
get category(): string;
|
|
19
|
+
get oauth2Scopes(): string[];
|
|
20
|
+
hasDynamicParams(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Normalize, coerce and validate against the declared `params` — the same pipeline every other declared
|
|
23
|
+
* slot uses, so an author expresses optionality in the schema and nowhere else.
|
|
24
|
+
*
|
|
25
|
+
* An action with `dynamicParams` carries the input's undeclared keys through, since its runtime-generated
|
|
26
|
+
* top-level fields are not in the static schema.
|
|
27
|
+
*/
|
|
28
|
+
validate(methodData: Record<string, unknown>): Record<string, unknown>;
|
|
29
|
+
execute(params: Record<string, unknown>, ctx: ExecutionContext): unknown;
|
|
30
|
+
resolveDynamicParams(bag: HandlerBag & {
|
|
31
|
+
criteria: Record<string, unknown>;
|
|
32
|
+
}): AnySchema | Promise<AnySchema>;
|
|
33
|
+
toModel(): SharedExtensionMethod;
|
|
34
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ServiceConfigsValues } from '../../common/constants';
|
|
2
|
+
import { type FilesApi, type FileScopes } from '../../common/context-files';
|
|
3
|
+
import type { Extension } from '../extension';
|
|
4
|
+
import type { OAuthBag } from '../oauth/types';
|
|
5
|
+
import type { HandlerBag, Logger } from '../types';
|
|
6
|
+
export interface ExecutionContextOptions {
|
|
7
|
+
configs?: ServiceConfigsValues;
|
|
8
|
+
accessToken?: string;
|
|
9
|
+
logger?: Logger;
|
|
10
|
+
files?: unknown;
|
|
11
|
+
}
|
|
12
|
+
export declare class ExecutionContext {
|
|
13
|
+
#private;
|
|
14
|
+
constructor(extension: Extension, options?: ExecutionContextOptions);
|
|
15
|
+
get logger(): Logger;
|
|
16
|
+
get config(): Record<string, unknown>;
|
|
17
|
+
get oauth(): OAuthBag;
|
|
18
|
+
get filesScope(): FileScopes;
|
|
19
|
+
get files(): FilesApi;
|
|
20
|
+
get context(): unknown;
|
|
21
|
+
get apiRequest(): HandlerBag['apiRequest'];
|
|
22
|
+
toBag(): HandlerBag;
|
|
23
|
+
bagWith<T extends object>(extra: T): HandlerBag & T;
|
|
24
|
+
withAccessToken(accessToken?: string): ExecutionContext;
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type FailFn } from '../params';
|
|
2
|
+
import type { ZodSchema } from '../types';
|
|
3
|
+
export declare class MethodInput {
|
|
4
|
+
readonly serviceId: string;
|
|
5
|
+
readonly methodName: string;
|
|
6
|
+
private readonly data;
|
|
7
|
+
constructor(serviceId: string, methodName: string, data?: Record<string, unknown>);
|
|
8
|
+
require<T>(param: string): T;
|
|
9
|
+
/**
|
|
10
|
+
* Extract a declared param and validate its value against the schema that owns it.
|
|
11
|
+
*
|
|
12
|
+
* An OBJECT schema — every runtime-owned wrapper (`callbackObject`, `invocation`, `payload`) — goes
|
|
13
|
+
* through the same per-field pipeline every author-declared slot uses, so `.optional()` means one thing
|
|
14
|
+
* everywhere: a blank arrives as absence whether the host sent `null`, `''` or nothing at all.
|
|
15
|
+
*
|
|
16
|
+
* That consistency is the point. While these wrappers were parsed by a bare `safeParse`, `.optional()`
|
|
17
|
+
* rejected `null` here while accepting it everywhere else, and each field had to be remembered as
|
|
18
|
+
* `.nullish()` the first time a host sent a null — which is how `state` on the OAuth callback stayed
|
|
19
|
+
* broken for a non-PKCE provider, where the console legitimately has no verifier to hand back.
|
|
20
|
+
*
|
|
21
|
+
* `carryUnknown` preserves the passthrough these schemas declare with `z.looseObject`: a host may send
|
|
22
|
+
* fields a given milestone does not model yet, and dropping them silently would be worse.
|
|
23
|
+
*/
|
|
24
|
+
parseField<T>(param: string, schema?: ZodSchema): T;
|
|
25
|
+
invalidInput(target: string): FailFn;
|
|
26
|
+
invalidCriteria(): FailFn;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createThrowingProxy(feature: string, hint: string): Record<string, never>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { AnySchema, ApiRequestFn, ExtensionApi, ExtensionProps, ShapeOf } from './types';
|
|
2
|
+
export declare function createExtension<TConfigSchema extends AnySchema = AnySchema, TContext = Record<string, unknown>, THelpers = Record<string, unknown>, TApiRequest extends ApiRequestFn = ApiRequestFn>(props: ExtensionProps<TConfigSchema, TContext, THelpers, TApiRequest>): ExtensionApi<ShapeOf<TConfigSchema, TContext, THelpers, TApiRequest>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface FlowrunnerCrypto {
|
|
2
|
+
hmac(algo: string, key: string, data: string, encoding?: 'hex' | 'base64'): string;
|
|
3
|
+
timingSafeEqual(a: unknown, b: unknown): boolean;
|
|
4
|
+
ageSeconds(timestamp: string | number): number;
|
|
5
|
+
}
|
|
6
|
+
export declare const crypto: FlowrunnerCrypto;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ExecutionContext } from '../context/execution-context';
|
|
2
|
+
import type { Extension } from '../extension';
|
|
3
|
+
import { ExtensionMethod } from '../method';
|
|
4
|
+
import type { SharedExtensionMethod } from '../model/model-types';
|
|
5
|
+
import { MethodParams } from '../params';
|
|
6
|
+
import { ResultSpec } from '../result';
|
|
7
|
+
import type { DictionaryProps, DictionaryResult } from '../types';
|
|
8
|
+
import { type DictionaryPayload } from './payload-schema';
|
|
9
|
+
export declare class DictionaryMethod extends ExtensionMethod {
|
|
10
|
+
#private;
|
|
11
|
+
private readonly props;
|
|
12
|
+
readonly criteria: MethodParams;
|
|
13
|
+
readonly result: ResultSpec;
|
|
14
|
+
constructor(extension: Extension, props: DictionaryProps);
|
|
15
|
+
get id(): string;
|
|
16
|
+
get name(): string;
|
|
17
|
+
get registerAs(): string;
|
|
18
|
+
get category(): string;
|
|
19
|
+
get oauth2Scopes(): string[];
|
|
20
|
+
get dependsOn(): string[];
|
|
21
|
+
validate(methodData: Record<string, unknown>): DictionaryPayload;
|
|
22
|
+
execute(payload: DictionaryPayload, ctx: ExecutionContext): Promise<DictionaryResult>;
|
|
23
|
+
toModel(): SharedExtensionMethod;
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const DictionaryPayloadSchema: import("zod").ZodObject<{
|
|
2
|
+
search: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3
|
+
cursor: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>>;
|
|
4
|
+
criteria: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
5
|
+
}, import("zod/v4/core").$loose>;
|
|
6
|
+
export interface DictionaryPayload {
|
|
7
|
+
search?: string;
|
|
8
|
+
cursor?: unknown;
|
|
9
|
+
criteria: Record<string, unknown>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ConfigItem } from '../common/types';
|
|
2
|
+
import { ExecutionContext, type ExecutionContextOptions } from './context/execution-context';
|
|
3
|
+
import type { ExtensionMethod } from './method';
|
|
4
|
+
import type { SharedExtensionDefinition, SharedExtensionServiceInfo } from './model/model-types';
|
|
5
|
+
import { OAuth2 } from './oauth/oauth2';
|
|
6
|
+
import type { OAuth2Props } from './oauth/types';
|
|
7
|
+
import type { DictionaryRef } from './params';
|
|
8
|
+
import { ConfigParams } from './params';
|
|
9
|
+
import { PollingTriggers } from './polling-triggers/polling-triggers';
|
|
10
|
+
import type { PollingTriggerProps } from './polling-triggers/types';
|
|
11
|
+
import { RealtimeSetup } from './realtime-triggers/realtime-setup';
|
|
12
|
+
import { RealtimeTriggerMethod } from './realtime-triggers/trigger-method';
|
|
13
|
+
import type { RealtimeSetupProps, RealtimeTriggerProps } from './realtime-triggers/types';
|
|
14
|
+
import { type SystemMethodSpec } from './system-method';
|
|
15
|
+
import type { ActionProps, DictionaryProps, ExtensionProps } from './types';
|
|
16
|
+
export declare class Extension {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(props: ExtensionProps);
|
|
19
|
+
get id(): string;
|
|
20
|
+
get props(): ExtensionProps;
|
|
21
|
+
get config(): ConfigParams;
|
|
22
|
+
get oauth(): OAuth2 | undefined;
|
|
23
|
+
get realtime(): RealtimeSetup | undefined;
|
|
24
|
+
realtimeTriggers(): RealtimeTriggerMethod[];
|
|
25
|
+
findRealtimeTrigger(id: string): RealtimeTriggerMethod | undefined;
|
|
26
|
+
get pollingTriggers(): PollingTriggers;
|
|
27
|
+
get appearanceColors(): [string, string];
|
|
28
|
+
registerDictionary(props: DictionaryProps): DictionaryRef;
|
|
29
|
+
registerAction(props: ActionProps): void;
|
|
30
|
+
registerPollingTrigger(props: PollingTriggerProps): void;
|
|
31
|
+
registerRealtimeTrigger(props: RealtimeTriggerProps): void;
|
|
32
|
+
setupRealtime(props: RealtimeSetupProps): void;
|
|
33
|
+
setupOAuth2(props: OAuth2Props): void;
|
|
34
|
+
registerSystemMethods(specs: SystemMethodSpec[]): void;
|
|
35
|
+
methods(): ExtensionMethod[];
|
|
36
|
+
findMethod(name: string): ExtensionMethod | undefined;
|
|
37
|
+
getMethod(name: string): ExtensionMethod;
|
|
38
|
+
createContext(options?: ExecutionContextOptions): ExecutionContext;
|
|
39
|
+
run(methodName: string, methodData: Record<string, unknown>, ctx: ExecutionContext): Promise<unknown>;
|
|
40
|
+
toConfigItems(): ConfigItem[];
|
|
41
|
+
toServiceInfo(): SharedExtensionServiceInfo;
|
|
42
|
+
/**
|
|
43
|
+
* The published model — the v2 analogue of jsdoc-parser's `parseJsDocToServiceJson`, and the same
|
|
44
|
+
* `{ serviceInfo, methodsMap }` shape the console consumes for a v1 service.
|
|
45
|
+
*
|
|
46
|
+
* Every method describes itself, so this is one pass with no per-kind branches: what a service publishes
|
|
47
|
+
* is exactly what it registered.
|
|
48
|
+
*/
|
|
49
|
+
toDefinition(): SharedExtensionDefinition;
|
|
50
|
+
declaredOAuthScopes(): string[];
|
|
51
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ServiceConfigsValues } from '../common/constants';
|
|
2
|
+
import { type FlowrunnerContextOptions } from '../common/context';
|
|
3
|
+
import type { FilesApi } from '../common/context-files';
|
|
4
|
+
import type { ConfigItem } from '../common/types';
|
|
5
|
+
import type { SharedExtensionDefinition } from './model/model-types';
|
|
6
|
+
import type { Logger } from './types';
|
|
7
|
+
export type { ConfigItem } from '../common/types';
|
|
8
|
+
export type { SharedExtensionDefinition } from './model/model-types';
|
|
9
|
+
export { ExecutionContext } from './context/execution-context';
|
|
10
|
+
export { Extension } from './extension';
|
|
11
|
+
export { getAllExtensions, getExtension, resetRegistry } from './registry';
|
|
12
|
+
export type { PollingInvocation, PollingResult } from './polling-triggers/types';
|
|
13
|
+
export type { RealtimeInvocation } from './realtime-triggers/types';
|
|
14
|
+
export type { HandlerBag, Logger } from './types';
|
|
15
|
+
export interface RunServiceMethodData {
|
|
16
|
+
serviceId: string;
|
|
17
|
+
serviceEntryPointPath: string;
|
|
18
|
+
configs?: ServiceConfigsValues;
|
|
19
|
+
methodName: string;
|
|
20
|
+
methodData?: Record<string, unknown>;
|
|
21
|
+
methodArgs?: unknown[];
|
|
22
|
+
logger?: Logger;
|
|
23
|
+
retrieveNewS3Token: (runtimeKey: string) => Promise<{
|
|
24
|
+
filesS3Token: string;
|
|
25
|
+
}>;
|
|
26
|
+
createFiles?: (options: FlowrunnerContextOptions) => FilesApi;
|
|
27
|
+
executionContext: {
|
|
28
|
+
runtimeKey: string;
|
|
29
|
+
accessToken: string;
|
|
30
|
+
appId: string;
|
|
31
|
+
apiKey: string;
|
|
32
|
+
serverURL: string;
|
|
33
|
+
flowId: string;
|
|
34
|
+
executionId: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export declare function getServiceConfigs(serviceId: string, serviceEntryPointPath: string): ConfigItem[];
|
|
38
|
+
export declare function buildServiceDefinition(serviceId: string, serviceEntryPointPath: string): SharedExtensionDefinition;
|
|
39
|
+
export declare function runServiceMethod(data: RunServiceMethodData): Promise<unknown>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ExecutionContext } from '../context/execution-context';
|
|
2
|
+
import type { Extension } from '../extension';
|
|
3
|
+
import { ExtensionMethod } from '../method';
|
|
4
|
+
import type { SharedExtensionMethod, SharedExtensionParam } from '../model/model-types';
|
|
5
|
+
import { MethodParams } from '../params';
|
|
6
|
+
import { type DynamicParamsOwner, type LoaderOwner } from './loader-owner';
|
|
7
|
+
declare abstract class LoaderMethod extends ExtensionMethod {
|
|
8
|
+
protected readonly owner: LoaderOwner;
|
|
9
|
+
constructor(extension: Extension, owner: LoaderOwner);
|
|
10
|
+
protected abstract get criteria(): MethodParams;
|
|
11
|
+
validate(methodData: Record<string, unknown>): Record<string, unknown>;
|
|
12
|
+
toModel(): SharedExtensionMethod;
|
|
13
|
+
protected abstract get returnType(): string;
|
|
14
|
+
}
|
|
15
|
+
export declare class SampleResultLoaderMethod extends LoaderMethod {
|
|
16
|
+
get name(): string;
|
|
17
|
+
get registerAs(): string;
|
|
18
|
+
protected get returnType(): string;
|
|
19
|
+
protected get criteria(): MethodParams;
|
|
20
|
+
execute(criteria: Record<string, unknown>, ctx: ExecutionContext): unknown;
|
|
21
|
+
}
|
|
22
|
+
export declare class DynamicParamsLoaderMethod extends LoaderMethod {
|
|
23
|
+
protected readonly owner: DynamicParamsOwner;
|
|
24
|
+
constructor(extension: Extension, owner: DynamicParamsOwner);
|
|
25
|
+
get name(): string;
|
|
26
|
+
get registerAs(): string;
|
|
27
|
+
protected get returnType(): string;
|
|
28
|
+
protected get criteria(): MethodParams;
|
|
29
|
+
execute(criteria: Record<string, unknown>, ctx: ExecutionContext): Promise<SharedExtensionParam[]>;
|
|
30
|
+
}
|
|
31
|
+
export {};
|