@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
|
+
import type { AnyZod, Inspected } from './introspect';
|
|
2
|
+
/**
|
|
3
|
+
* Any date input → a `Date`, or `undefined` when it is not a date at all.
|
|
4
|
+
*
|
|
5
|
+
* A finite number is EPOCH MILLIS, which is what the console's date control stores; a numeric string is that
|
|
6
|
+
* same number through a stringly-typed transport. Everything else that is a string is handed to `Date`.
|
|
7
|
+
*
|
|
8
|
+
* `new Date('nope')` returns a `Date` whose value is `NaN` — and `z.date()` accepts it — so an invalid date
|
|
9
|
+
* has to be rejected here explicitly, or garbage would reach a handler looking like a date.
|
|
10
|
+
*/
|
|
11
|
+
export declare function toDate(value: unknown): Date | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* A date input → the ISO shape the field declared.
|
|
14
|
+
*
|
|
15
|
+
* NARROWING IS LEXICAL. `'2024-06-01T23:00:00Z'` → `'2024-06-01'` takes the characters before the `T`;
|
|
16
|
+
* parsing and reformatting would impose UTC, and in UTC+2 that instant is the 2nd, not the 1st. So a string
|
|
17
|
+
* is sliced, never converted.
|
|
18
|
+
*
|
|
19
|
+
* Two conversions do assume UTC, and both are unavoidable:
|
|
20
|
+
* • widening a date to a datetime invents a time of day (`'2024-06-01'` → `'2024-06-01T00:00:00Z'`)
|
|
21
|
+
* • naming a date or a time from EPOCH MILLIS has to pick a wall clock — the same instant is 2024-06-01
|
|
22
|
+
* in London and 2024-06-02 in Kiritimati
|
|
23
|
+
*
|
|
24
|
+
* `z.iso.datetime()` from millis is not in that class: the instant is preserved and UTC is merely which of
|
|
25
|
+
* several equivalent spellings we emit.
|
|
26
|
+
*/
|
|
27
|
+
export declare function toIso(value: unknown, format: string): string | undefined;
|
|
28
|
+
/** The zod format token a schema declared, if any: 'datetime' | 'date' | 'time' | 'duration' | … */
|
|
29
|
+
export declare const formatOf: (ins: Inspected) => string | undefined;
|
|
30
|
+
/** The ISO formats this module converts INTO. `duration` is absent on purpose — it stays strict. */
|
|
31
|
+
export declare const isConvertibleIso: (format?: string) => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* True for `z.date()` and false for `z.coerce.date()`.
|
|
34
|
+
*
|
|
35
|
+
* `.coerce` is zod's own flag, set by `z.coerce.date()` and readable through the optional/nullable/default
|
|
36
|
+
* wrappers — so the author's intent is a flag to look up rather than a heuristic to guess.
|
|
37
|
+
*/
|
|
38
|
+
export declare const passesDateThrough: (ins: Inspected) => boolean;
|
|
39
|
+
/** Whether a schema, at any depth, has a `z.date()` whose value must survive validation unchanged. */
|
|
40
|
+
export declare function hasPassThroughDate(schema: AnyZod | undefined, inspectSchema: (s: AnyZod) => Inspected, entriesOf: (s: AnyZod | undefined) => [string, AnyZod][]): boolean;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type AnyZod } from './introspect';
|
|
2
|
+
/** `z.text()` — FlowRunner's own marker, the most specific thing a field can declare. */
|
|
3
|
+
export declare const WIDGET_DESCRIPTIONS: Record<string, string>;
|
|
4
|
+
/**
|
|
5
|
+
* `z.json()`. More specific than the widget it carries: it renders as the same textarea `z.text()` does, so
|
|
6
|
+
* the widget wording would say "line breaks are allowed" and leave out the only rule that actually rejects
|
|
7
|
+
* anything — that what is typed has to parse.
|
|
8
|
+
*/
|
|
9
|
+
export declare const JSON_DESCRIPTION = "Expects JSON, e.g. {\"key\": \"value\"}";
|
|
10
|
+
/**
|
|
11
|
+
* The plain core type, when nothing more specific is declared.
|
|
12
|
+
*
|
|
13
|
+
* Only worth filling in where the widget does NOT already convey the type. `z.number()` earns one because a
|
|
14
|
+
* number renders as a plain text field — there is no numeric widget — so "Expects a number" is real
|
|
15
|
+
* information. `z.string()` and `z.boolean()` do not: the field is visibly a text box or a toggle, and
|
|
16
|
+
* filling them would put generic prose under every field of every service, overwriting the meaningful empty
|
|
17
|
+
* state that says "the service author documented this".
|
|
18
|
+
*/
|
|
19
|
+
export declare const TYPE_DESCRIPTIONS: Record<string, string>;
|
|
20
|
+
/**
|
|
21
|
+
* A zod `format` token. Spelled out rather than composed — the wording is what a customer reads, so it
|
|
22
|
+
* should be editable here without reasoning about how it is assembled. Every example is a value that
|
|
23
|
+
* actually satisfies its helper.
|
|
24
|
+
*/
|
|
25
|
+
export declare const FORMAT_DESCRIPTIONS: Record<string, string>;
|
|
26
|
+
/**
|
|
27
|
+
* What a field's declaration explains about itself, most specific wins:
|
|
28
|
+
*
|
|
29
|
+
* 1. `z.json()` — the content rule, which outranks the widget it shares with `z.text()`
|
|
30
|
+
* 2. a FlowRunner widget marker — `z.text()`, a string the console renders specially
|
|
31
|
+
* 3. a zod `format` token — `z.email()`, `z.ipv4()`, `z.iso.date()`, …
|
|
32
|
+
* 4. the plain core type — `number`, `bigint`, `literal`, `enum`, `date`
|
|
33
|
+
*
|
|
34
|
+
* All three are read past the optional/nullable/default wrappers, so a modifier never changes the answer.
|
|
35
|
+
*/
|
|
36
|
+
export declare function describeField(schema: AnyZod): string | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type AnyZod } from './introspect';
|
|
2
|
+
export type AbsencePolicy = 'as-received' | 'undefined' | 'null' | 'required';
|
|
3
|
+
export interface FieldPlan {
|
|
4
|
+
name: string;
|
|
5
|
+
schema: AnyZod;
|
|
6
|
+
label: string;
|
|
7
|
+
coreType: string;
|
|
8
|
+
/**
|
|
9
|
+
* True when the declaration is a `z.union()`.
|
|
10
|
+
*
|
|
11
|
+
* Carried because `coreType` alone stops describing the field: a union resolves to its first branch, so a
|
|
12
|
+
* `z.union([z.email(), z.literal('')])` reports `'string'` and would then treat a blank as a VALUE. It is
|
|
13
|
+
* not one — `''` has always been absence on a union, which is exactly what makes the documented
|
|
14
|
+
* "blank means not set" spelling (`z.union([z.url(), z.literal('')]).optional()`) work.
|
|
15
|
+
*/
|
|
16
|
+
isUnion: boolean;
|
|
17
|
+
absence: AbsencePolicy;
|
|
18
|
+
absorbsBlank: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* True for a `z.date()` whose value must reach the handler UNCHANGED — validated through a converted copy,
|
|
21
|
+
* handed over as the host sent it. False for `z.coerce.date()`, which the author asked to convert.
|
|
22
|
+
*
|
|
23
|
+
* Set when the field ITSELF is such a date; `restoresDates` covers one nested anywhere inside it.
|
|
24
|
+
*/
|
|
25
|
+
passThroughDate: boolean;
|
|
26
|
+
restoresDates: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** The absent forms a schema accepts, at any depth. Same question `planField` asks for a top-level field. */
|
|
29
|
+
export declare function absenceOf(schema: AnyZod | undefined): {
|
|
30
|
+
absence: AbsencePolicy;
|
|
31
|
+
absorbsBlank: boolean;
|
|
32
|
+
};
|
|
33
|
+
export declare function planField(name: string, schema: AnyZod): FieldPlan;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { FrMeta } from '../zod';
|
|
2
|
+
export interface Inspected {
|
|
3
|
+
core: AnyZod;
|
|
4
|
+
coreType: string;
|
|
5
|
+
resolvedType?: string;
|
|
6
|
+
/**
|
|
7
|
+
* A `z.union()`'s declared branches, outermost union only — `undefined` for everything else.
|
|
8
|
+
*
|
|
9
|
+
* `core` and `coreType` above have already been resolved to the FIRST branch, which is what publishes and
|
|
10
|
+
* what picks the widget. That answer is right for every consumer that only needs a type, and wrong for the
|
|
11
|
+
* two that must consider all of them: the registration guard has to refuse a union with an unsupported
|
|
12
|
+
* branch, and coercion has to try each branch in turn. They read this.
|
|
13
|
+
*/
|
|
14
|
+
branches?: AnyZod[];
|
|
15
|
+
required: boolean;
|
|
16
|
+
defaultValue: unknown;
|
|
17
|
+
meta: FrMeta;
|
|
18
|
+
}
|
|
19
|
+
export type AnyZod = {
|
|
20
|
+
_zod?: {
|
|
21
|
+
def?: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
meta?: () => Record<string, unknown> | undefined;
|
|
24
|
+
shape?: Record<string, AnyZod>;
|
|
25
|
+
options?: unknown[];
|
|
26
|
+
};
|
|
27
|
+
export declare const DEFAULT_WRAPPERS: Set<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Modifiers that constrain or re-shape a value without changing what the AUTHOR declared it to be. The
|
|
30
|
+
* runtime looks straight through them: they decide nothing about the widget, the published type, or which
|
|
31
|
+
* coercion runs.
|
|
32
|
+
*
|
|
33
|
+
* - `readonly` — freezes zod's output; the declared type is the inner one.
|
|
34
|
+
* - `pipe` — `.pipe(b)` and `.transform(fn)` both produce this. We follow `def.in`, the INPUT side, because
|
|
35
|
+
* the published model describes **what a caller supplies**: it is what the console renders a form for, what
|
|
36
|
+
* the AI-tool schema advertises, and what the coercion layer must convert to before zod sees the value.
|
|
37
|
+
* What `execute` ends up receiving is the pipe's own business and is not a published fact.
|
|
38
|
+
* - `lazy` — a thunk, for a recursive declaration.
|
|
39
|
+
*
|
|
40
|
+
* `.catch()` is deliberately NOT here. It is refused at registration instead (see
|
|
41
|
+
* ./assert-supported-schema.ts): unwrapping it would fix the published type while leaving the declaration
|
|
42
|
+
* silently substituting a fallback for invalid input, which is the more serious half of that defect.
|
|
43
|
+
*/
|
|
44
|
+
export declare const TRANSPARENT_WRAPPERS: Set<string>;
|
|
45
|
+
export declare function innerOf(def: Record<string, unknown>, type: string): AnyZod | undefined;
|
|
46
|
+
export declare const MAX_UNWRAP_DEPTH = 64;
|
|
47
|
+
export declare function inspect(schema: AnyZod): Inspected;
|
|
48
|
+
export interface WidgetInfo {
|
|
49
|
+
paramType: string;
|
|
50
|
+
uiComponent?: Record<string, unknown>;
|
|
51
|
+
items?: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export declare function literalType(core: AnyZod): string | undefined;
|
|
56
|
+
export declare function deriveWidget(ins: Inspected): WidgetInfo;
|
|
57
|
+
export declare function shapeEntries(schema: AnyZod | undefined): [name: string, schema: AnyZod][];
|
|
58
|
+
export declare function fieldLabels(schema: AnyZod): Record<string, string> | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ValidationIssue } from '../../../errors';
|
|
2
|
+
import type { ZodIssue } from '../types';
|
|
3
|
+
import type { FieldPlan } from './field-plan';
|
|
4
|
+
export declare const requiredMessage: (plan: FieldPlan) => string;
|
|
5
|
+
export declare const invalidTypeMessage: (plan: FieldPlan, expected: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Restate one zod issue for a field. `path` is the field key — issues from a nested object keep the zod path
|
|
8
|
+
* appended, so a caller can still point at the exact property.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toFieldIssue(plan: FieldPlan, issue: ZodIssue & {
|
|
11
|
+
message?: string;
|
|
12
|
+
expected?: string;
|
|
13
|
+
minimum?: unknown;
|
|
14
|
+
maximum?: unknown;
|
|
15
|
+
values?: unknown[];
|
|
16
|
+
}, fieldValue?: unknown): ValidationIssue;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ValidationIssue } from '../../../errors';
|
|
2
|
+
import type { FieldPlan } from './field-plan';
|
|
3
|
+
export interface FieldResult {
|
|
4
|
+
value?: unknown;
|
|
5
|
+
present: boolean;
|
|
6
|
+
issues: ValidationIssue[];
|
|
7
|
+
}
|
|
8
|
+
export declare function normalizeField(value: unknown, plan: FieldPlan): FieldResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ValidationIssue } from '../../../errors';
|
|
2
|
+
import type { ZodIssue, ZodSchema } from '../types';
|
|
3
|
+
export type FailFn = (issues: ValidationIssue[]) => never;
|
|
4
|
+
export declare function toIssues(error: {
|
|
5
|
+
issues?: ZodIssue[];
|
|
6
|
+
} | undefined, param?: string): ValidationIssue[];
|
|
7
|
+
export declare function parseSchema<T>(schema: ZodSchema | undefined, value: unknown, fail: FailFn, param?: string): T;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ValidationIssue } from '../../errors';
|
|
2
|
+
export interface ZodIssue {
|
|
3
|
+
path?: readonly PropertyKey[];
|
|
4
|
+
message?: string;
|
|
5
|
+
code?: string;
|
|
6
|
+
}
|
|
7
|
+
export type ZodSchema = {
|
|
8
|
+
shape?: Record<string, unknown>;
|
|
9
|
+
parse?: (data: unknown) => unknown;
|
|
10
|
+
safeParse?: (data: unknown) => {
|
|
11
|
+
success: boolean;
|
|
12
|
+
data?: unknown;
|
|
13
|
+
error?: {
|
|
14
|
+
issues?: ZodIssue[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
partial?: () => ZodSchema;
|
|
18
|
+
_zod?: unknown;
|
|
19
|
+
};
|
|
20
|
+
export interface SchemaSource {
|
|
21
|
+
serviceId?: string;
|
|
22
|
+
kind?: string;
|
|
23
|
+
itemId?: string;
|
|
24
|
+
slot?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface NormalizedInput {
|
|
27
|
+
values: Record<string, unknown>;
|
|
28
|
+
issues: ValidationIssue[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform param GROUPS — a whole `z.object` the runtime ships (see ./files-options.ts), not a control.
|
|
3
|
+
*
|
|
4
|
+
* They travel in the same `uiComponent.type` slot as a control token, so they belong in the map below. They
|
|
5
|
+
* are named apart from it because **nothing renders a single input for one**: a consumer reads the token to
|
|
6
|
+
* decide how to draw the whole group, and a registry of one-input-per-token has no entry for it.
|
|
7
|
+
*
|
|
8
|
+
* An author's own `z.object` carries none of these.
|
|
9
|
+
*/
|
|
10
|
+
export declare const FlowExtensionParamGroupTypes: {
|
|
11
|
+
FILE_UPLOAD_OPTIONS: string;
|
|
12
|
+
FILE_LIST_OPTIONS: string;
|
|
13
|
+
FILE_GET_OPTIONS: string;
|
|
14
|
+
FILE_DELETE_OPTIONS: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const FlowExtensionParamWidgetTypes: {
|
|
17
|
+
NUMERIC: string;
|
|
18
|
+
CHECKBOX: string;
|
|
19
|
+
DATE_TIME_PICKER: string;
|
|
20
|
+
TIME_PICKER: string;
|
|
21
|
+
FILE_UPLOAD_OPTIONS: string;
|
|
22
|
+
FILE_LIST_OPTIONS: string;
|
|
23
|
+
FILE_GET_OPTIONS: string;
|
|
24
|
+
FILE_DELETE_OPTIONS: string;
|
|
25
|
+
SINGLE_LINE_TEXT: string;
|
|
26
|
+
MULTI_LINE_TEXT: string;
|
|
27
|
+
NUMERIC_STEPPER: string;
|
|
28
|
+
DATE_PICKER: string;
|
|
29
|
+
TOGGLE: string;
|
|
30
|
+
DROPDOWN: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The widget tokens a declaration carries EXPLICITLY, as author metadata (`meta.frWidget`) — everything else
|
|
34
|
+
* in the map above is DERIVED from the zod type by `deriveWidget`.
|
|
35
|
+
*
|
|
36
|
+
* `MULTI_LINE_TEXT` is `z.text()` / `z.json()`; the `FILE_*_OPTIONS` tokens name a platform param group.
|
|
37
|
+
*/
|
|
38
|
+
export type FrWidgetToken = 'MULTI_LINE_TEXT' | 'FILE_UPLOAD_OPTIONS' | 'FILE_LIST_OPTIONS' | 'FILE_GET_OPTIONS' | 'FILE_DELETE_OPTIONS';
|
|
39
|
+
/** The subset that names a platform param GROUP rather than a single control. */
|
|
40
|
+
export type FrGroupToken = Exclude<FrWidgetToken, 'MULTI_LINE_TEXT'>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z as baseZod } from 'zod';
|
|
2
|
+
import { filesDeleteOptions, filesGetOptions, filesListOptions, filesUploadOptions } from './files-options';
|
|
3
|
+
import { type FrWidgetToken } from './widget-types';
|
|
4
|
+
export interface DictionaryRef {
|
|
5
|
+
id: string;
|
|
6
|
+
dependsOn?: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface FrMeta {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
examples?: unknown[];
|
|
12
|
+
frShared?: boolean;
|
|
13
|
+
frDictionary?: {
|
|
14
|
+
id: string;
|
|
15
|
+
dependsOn: string[];
|
|
16
|
+
};
|
|
17
|
+
frLabels?: Record<string, string>;
|
|
18
|
+
/** A widget token the declaration carries explicitly — see `FrWidgetToken` in ./widget-types.ts. */
|
|
19
|
+
frWidget?: FrWidgetToken;
|
|
20
|
+
frSecret?: boolean;
|
|
21
|
+
/** `z.json()` — the value arrives as TEXT and is parsed before the handler sees it. See `json()` below. */
|
|
22
|
+
frJson?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare module 'zod' {
|
|
25
|
+
interface ZodType {
|
|
26
|
+
/** Display label → native `meta.title`. */
|
|
27
|
+
label(text: string): this;
|
|
28
|
+
/** Sample value → appended to native `meta.examples`. */
|
|
29
|
+
example(value: unknown): this;
|
|
30
|
+
/** Mark a config field as shared (global) rather than per-app (OAuth client id/secret, secrets). */
|
|
31
|
+
shared(): this;
|
|
32
|
+
/**
|
|
33
|
+
* Mark a `z.string()` CONFIG field as sensitive: the console masks it and offers a reveal toggle.
|
|
34
|
+
*
|
|
35
|
+
* Display only. The value is stored, transmitted and validated exactly as it would be without it — this
|
|
36
|
+
* hides a credential from a passer-by, it does not protect it.
|
|
37
|
+
*
|
|
38
|
+
* No effect anywhere else. Not on `z.text()`, which has no password mode; and not on an action or
|
|
39
|
+
* trigger param, whose value lives in the flow definition and is readable through the API, so masking
|
|
40
|
+
* its input would suggest a protection that is not there.
|
|
41
|
+
*/
|
|
42
|
+
secret(): this;
|
|
43
|
+
/** Bind a param to a dictionary for dynamic options; auto-derives `dependsOn` from the dictionary criteria. */
|
|
44
|
+
dictionary(ref: DictionaryRef): this;
|
|
45
|
+
/**
|
|
46
|
+
* Show a human label per declared VALUE: `.labels({ asc: 'Ascending' })`.
|
|
47
|
+
*
|
|
48
|
+
* The flow element stores the VALUE, so renaming a label changes nothing that was saved — and the
|
|
49
|
+
* handler receives the value it declared, with no translation step anywhere.
|
|
50
|
+
*/
|
|
51
|
+
labels(byValue: Record<string, string>): this;
|
|
52
|
+
/** @deprecated Inverted and renamed — see `labels`. Throws, so the change cannot pass silently. */
|
|
53
|
+
map(mapping: Record<string, unknown>): never;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
declare function text(): baseZod.ZodString;
|
|
57
|
+
/**
|
|
58
|
+
* Custom type: a parameter that takes arbitrary JSON.
|
|
59
|
+
*
|
|
60
|
+
* Three facts have to hold at once, and each picks one piece of this declaration:
|
|
61
|
+
*
|
|
62
|
+
* - **The console renders a textarea.** `frWidget` says so, and ../schema/introspect.ts publishes the
|
|
63
|
+
* parameter as `STRING` — the model describes what a caller SUPPLIES, and what a caller supplies is text.
|
|
64
|
+
* - **`execute` receives the parsed structure.** `frJson` tells ../schema/coerce.ts to `JSON.parse` the text
|
|
65
|
+
* on the way in, so no service writes its own parse and none has to invent wording for text that is not
|
|
66
|
+
* JSON. Coercion already sits between the transport and zod for exactly this kind of conversion — this is
|
|
67
|
+
* the same arrangement as `z.string().pipe(z.coerce.number())`, with a fixed conversion.
|
|
68
|
+
* - **The author's TYPE is the parsed value, not the text.** Hence `unknown` underneath: `z.infer` gives the
|
|
69
|
+
* handler `unknown`, which is what it actually receives. Declaring `z.string()` here would publish and
|
|
70
|
+
* coerce correctly and then lie to every author about what lands in `params`.
|
|
71
|
+
*
|
|
72
|
+
* ⚠️ This SHADOWS zod's own `z.json()` (the namespace is `Object.create(baseZod)`). Deliberate, and safe
|
|
73
|
+
* only because zod's version cannot currently be declared at all — it recurses until the stack is gone, and
|
|
74
|
+
* the extension never registers (FR-3600). An author reaching for `z.json()` gets this one.
|
|
75
|
+
*/
|
|
76
|
+
declare function json(): baseZod.ZodNonOptional<baseZod.ZodUnknown>;
|
|
77
|
+
export declare const z: Omit<typeof baseZod, "json"> & {
|
|
78
|
+
text: typeof text;
|
|
79
|
+
json: typeof json;
|
|
80
|
+
filesUploadOptions: typeof filesUploadOptions;
|
|
81
|
+
filesListOptions: typeof filesListOptions;
|
|
82
|
+
filesGetOptions: typeof filesGetOptions;
|
|
83
|
+
filesDeleteOptions: typeof filesDeleteOptions;
|
|
84
|
+
};
|
|
85
|
+
export type ExtendedZod = typeof z;
|
|
86
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getPath(source: unknown, path: string): unknown;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HandlerBag } from '../types';
|
|
2
|
+
import type { PollingInvocation, PollingResult, PollingTriggerProps } from './types';
|
|
3
|
+
interface PollCycle {
|
|
4
|
+
bag: HandlerBag;
|
|
5
|
+
params: Record<string, unknown>;
|
|
6
|
+
isLearningMode: boolean;
|
|
7
|
+
state: Record<string, unknown> | null;
|
|
8
|
+
}
|
|
9
|
+
export declare abstract class PollingMechanism {
|
|
10
|
+
/**
|
|
11
|
+
* Pick the strategy an author declared, rejecting the combinations that cannot work. Runs at REGISTRATION
|
|
12
|
+
* time, so a misconfigured trigger fails while the service module is being required rather than on some
|
|
13
|
+
* later tick in production.
|
|
14
|
+
*/
|
|
15
|
+
static from(props: PollingTriggerProps, serviceId: string): PollingMechanism;
|
|
16
|
+
run(invocation: PollingInvocation, bag: HandlerBag): Promise<PollingResult>;
|
|
17
|
+
protected abstract poll(cycle: PollCycle): Promise<PollingResult>;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const POLLING_SYSTEM_METHOD = "handleTriggerPollingForEvent";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Extension } from '../extension';
|
|
2
|
+
import type { PollingTriggerMethod } from './trigger-method';
|
|
3
|
+
export declare class PollingTriggers {
|
|
4
|
+
#private;
|
|
5
|
+
private readonly extension;
|
|
6
|
+
constructor(extension: Extension);
|
|
7
|
+
get size(): number;
|
|
8
|
+
get(id: string): PollingTriggerMethod | undefined;
|
|
9
|
+
all(): PollingTriggerMethod[];
|
|
10
|
+
add(trigger: PollingTriggerMethod): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const PollingInvocationSchema: import("zod").ZodObject<{
|
|
2
|
+
eventName: import("zod").ZodString;
|
|
3
|
+
triggerData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
4
|
+
state: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
|
|
5
|
+
learningMode: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
6
|
+
connectionId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
7
|
+
}, import("zod/v4/core").$loose>;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { PollingMechanism } from './mechanisms';
|
|
9
|
+
import type { PollingInvocation, PollingResult, PollingTriggerProps } from './types';
|
|
10
|
+
export declare class PollingTriggerMethod extends ExtensionMethod implements LoaderOwner {
|
|
11
|
+
#private;
|
|
12
|
+
private readonly props;
|
|
13
|
+
readonly params: MethodParams;
|
|
14
|
+
readonly result: ResultSpec;
|
|
15
|
+
readonly mechanism: PollingMechanism;
|
|
16
|
+
constructor(extension: Extension, props: PollingTriggerProps);
|
|
17
|
+
get id(): string;
|
|
18
|
+
get name(): string;
|
|
19
|
+
get registerAs(): string;
|
|
20
|
+
get category(): string;
|
|
21
|
+
get oauth2Scopes(): string[];
|
|
22
|
+
execute(): never;
|
|
23
|
+
poll(invocation: PollingInvocation, ctx: ExecutionContext): Promise<PollingResult>;
|
|
24
|
+
toModel(): SharedExtensionMethod;
|
|
25
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { AnySchema, AnyShape, BagWithParams, ExtensionShape, Infer, ProviderPayload, SampleResult } from '../types';
|
|
2
|
+
export type PollingFetchBag<TShape extends ExtensionShape = AnyShape, TParams = AnySchema> = BagWithParams<TShape, TParams> & {
|
|
3
|
+
isLearningMode: boolean;
|
|
4
|
+
};
|
|
5
|
+
export type PollingPollBag<TShape extends ExtensionShape = AnyShape, TParams = AnySchema> = PollingFetchBag<TShape, TParams> & {
|
|
6
|
+
state: Record<string, unknown> | null;
|
|
7
|
+
};
|
|
8
|
+
export type DedupeConfig = ((item: ProviderPayload) => unknown) | string | {
|
|
9
|
+
by: ((item: ProviderPayload) => unknown) | string;
|
|
10
|
+
stateKey?: string;
|
|
11
|
+
max?: number;
|
|
12
|
+
};
|
|
13
|
+
export interface WatermarkConfig<TParams = AnySchema> {
|
|
14
|
+
by: string | ((item: ProviderPayload, ctx: {
|
|
15
|
+
params: Infer<TParams>;
|
|
16
|
+
}) => unknown);
|
|
17
|
+
stateKey?: string;
|
|
18
|
+
sortedDesc?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface PollingTriggerProps<TShape extends ExtensionShape = AnyShape, TParams extends AnySchema = AnySchema> {
|
|
21
|
+
category: string;
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
description: string;
|
|
25
|
+
params?: TParams;
|
|
26
|
+
result: SampleResult<TShape, TParams>;
|
|
27
|
+
fetch?: (bag: PollingFetchBag<TShape, TParams>) => unknown[] | Promise<unknown[]>;
|
|
28
|
+
dedupe?: DedupeConfig;
|
|
29
|
+
watermark?: WatermarkConfig<TParams>;
|
|
30
|
+
poll?: (bag: PollingPollBag<TShape, TParams>) => PollingResult | Promise<PollingResult>;
|
|
31
|
+
logo?: string;
|
|
32
|
+
appearanceColors?: [string, string];
|
|
33
|
+
oauth2Scopes?: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface PollingResult {
|
|
36
|
+
events: unknown[];
|
|
37
|
+
state: Record<string, unknown> | null;
|
|
38
|
+
}
|
|
39
|
+
export interface PollingInvocation {
|
|
40
|
+
eventName: string;
|
|
41
|
+
triggerData?: Record<string, unknown>;
|
|
42
|
+
state?: Record<string, unknown> | null;
|
|
43
|
+
learningMode?: boolean;
|
|
44
|
+
connectionId?: string;
|
|
45
|
+
}
|
|
46
|
+
export type PollingTriggerDefinition = PollingTriggerProps;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const REALTIME_SYSTEM_METHODS: {
|
|
2
|
+
readonly UPSERT: "handleTriggerUpsertWebhook";
|
|
3
|
+
readonly RESOLVE: "handleTriggerResolveEvents";
|
|
4
|
+
readonly SELECT: "handleTriggerSelectMatched";
|
|
5
|
+
readonly DELETE: "handleTriggerDeleteWebhook";
|
|
6
|
+
readonly REFRESH: "handleTriggerRefreshWebhook";
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Extension } from '../extension';
|
|
2
|
+
import type { RealtimeSetupProps } from './types';
|
|
3
|
+
export declare class RealtimeSetup {
|
|
4
|
+
#private;
|
|
5
|
+
private readonly extension;
|
|
6
|
+
private readonly props;
|
|
7
|
+
constructor(extension: Extension, props: RealtimeSetupProps);
|
|
8
|
+
get scope(): RealtimeSetupProps['scope'];
|
|
9
|
+
get hasRefresh(): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const RealtimeSubscriptionInvocationSchema: import("zod").ZodObject<{
|
|
2
|
+
callbackUrl: import("zod").ZodString;
|
|
3
|
+
events: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
|
|
4
|
+
name: import("zod").ZodString;
|
|
5
|
+
triggerData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
6
|
+
}, import("zod/v4/core").$loose>>>;
|
|
7
|
+
webhookData: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
|
|
8
|
+
connectionId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
9
|
+
}, import("zod/v4/core").$loose>;
|
|
10
|
+
export declare const RealtimeDeleteInvocationSchema: import("zod").ZodObject<{
|
|
11
|
+
callbackUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
12
|
+
webhookData: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
|
|
13
|
+
connectionId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
14
|
+
}, import("zod/v4/core").$loose>;
|
|
15
|
+
export declare const RealtimeInboundInvocationSchema: import("zod").ZodObject<{
|
|
16
|
+
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
17
|
+
queryParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
18
|
+
body: import("zod").ZodUnknown;
|
|
19
|
+
rawBody: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
+
connectionId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
21
|
+
}, import("zod/v4/core").$loose>;
|
|
22
|
+
export declare const RealtimeSelectInvocationSchema: import("zod").ZodObject<{
|
|
23
|
+
eventName: import("zod").ZodString;
|
|
24
|
+
eventData: import("zod").ZodUnknown;
|
|
25
|
+
triggers: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
|
|
26
|
+
id: import("zod").ZodString;
|
|
27
|
+
data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
28
|
+
}, import("zod/v4/core").$loose>>>;
|
|
29
|
+
}, import("zod/v4/core").$loose>;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { ProviderPayload } from '../types';
|
|
9
|
+
import type { RealtimeTriggerProps } from './types';
|
|
10
|
+
export declare class RealtimeTriggerMethod extends ExtensionMethod implements LoaderOwner {
|
|
11
|
+
private readonly props;
|
|
12
|
+
readonly params: MethodParams;
|
|
13
|
+
readonly result: ResultSpec;
|
|
14
|
+
constructor(extension: Extension, props: RealtimeTriggerProps);
|
|
15
|
+
get id(): string;
|
|
16
|
+
get name(): string;
|
|
17
|
+
get registerAs(): string;
|
|
18
|
+
get category(): string;
|
|
19
|
+
get oauth2Scopes(): string[];
|
|
20
|
+
execute(): never;
|
|
21
|
+
providerEventNames(params?: Record<string, unknown>): string[];
|
|
22
|
+
claims(providerEventName: string): boolean;
|
|
23
|
+
extendEventData(requestBody: ProviderPayload, providerEventData: ProviderPayload): Record<string, unknown> | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Whether one CONFIGURED INSTANCE of this trigger cares about an event. Declarative form: type-coerced
|
|
26
|
+
* equality per filled param, where an empty param means "any" — that is what lets a user leave a filter
|
|
27
|
+
* blank and receive everything. Predicate form: the author decides. No `match` at all: always fires.
|
|
28
|
+
*/
|
|
29
|
+
matches(params: Record<string, unknown>, providerEventData: ProviderPayload): boolean;
|
|
30
|
+
extendResult(providerEventData: ProviderPayload, ctx: ExecutionContext): Promise<unknown> | unknown;
|
|
31
|
+
hasExtendResult(): boolean;
|
|
32
|
+
toModel(): SharedExtensionMethod;
|
|
33
|
+
}
|