@flowrunner/cli 0.1.18 → 0.1.19-dev.2
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/ai-docs/instructions/service-code-format/01-service-structure.md +1 -1
- package/ai-docs/instructions/service-code-format/02-zod-types.md +115 -7
- package/ai-docs/instructions/service-code-format/05-dictionaries.md +1 -1
- package/ai-docs/instructions/service-code-format/11-output-model.md +5 -5
- package/ai-docs/instructions/service-code-format/13-runtime-contracts.md +2 -3
- package/ai-docs/instructions/service-code-format/16-gotchas.md +30 -6
- package/ai-docs/instructions/service-code-format/README.md +2 -2
- package/dist/cli.js +944 -958
- package/dist/cli.js.map +4 -4
- package/dist/index.js +977 -988
- package/dist/index.js.map +4 -4
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/context/execution-context.d.ts +10 -2
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/extension.d.ts +3 -3
- package/dist/types/flow-extension-runner/src/global.d.ts +6 -18
- package/dist/types/flow-extension-runner/src/index.d.ts +39 -13
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/model/field-mapper.d.ts +1 -1
- package/dist/types/flow-extension-runner/src/{v2/model → model}/model-types.d.ts +11 -1
- package/dist/types/flow-extension-runner/src/{v2/model → model}/params-model.d.ts +1 -1
- package/dist/types/flow-extension-runner/src/{v2/params → params}/config-params.d.ts +1 -1
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/index.d.ts +2 -0
- package/dist/types/flow-extension-runner/src/{v2/params → params}/json/types.d.ts +2 -0
- package/dist/types/flow-extension-runner/src/params/schema/date-format.d.ts +80 -0
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/defaults.d.ts +3 -2
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/field-plan.d.ts +9 -2
- package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/introspect.d.ts +8 -0
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/messages.d.ts +1 -1
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/normalize.d.ts +1 -1
- package/dist/types/flow-extension-runner/src/params/schema/notices.d.ts +15 -0
- package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/parse.d.ts +1 -1
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/types.d.ts +1 -1
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/zod.d.ts +21 -0
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/registry.d.ts +2 -0
- package/dist/types/flow-extension-runner/src/{v2/types.d.ts → types.d.ts} +1 -1
- package/dist/types/packages/cli/src/operations/deploy/discover-services.d.ts +2 -4
- package/dist/types/shared/src/constants/activity-log.d.ts +248 -2
- package/dist/types/shared/src/constants/error-codes.d.ts +6 -0
- package/dist/types/shared/src/constants/index.d.ts +1 -0
- package/dist/types/shared/src/constants/notification-types.d.ts +309 -0
- package/dist/types/shared/src/constants/panic-mode.d.ts +17 -0
- package/dist/types/shared/src/constants/shared-extensions.d.ts +10 -0
- package/dist/types/shared/src/errors/index.d.ts +1 -0
- package/dist/types/shared/src/errors/secrets.d.ts +16 -0
- package/dist/types/shared/src/scheme/access-keys/dto.d.ts +35 -13
- package/dist/types/shared/src/scheme/api-keys/dto.d.ts +29 -4
- package/dist/types/shared/src/scheme/flowrunner/custom-elements.d.ts +0 -16
- package/dist/types/shared/src/scheme/flowrunner/index.d.ts +1 -0
- package/dist/types/shared/src/scheme/flowrunner/java.dto.d.ts +26 -0
- package/dist/types/shared/src/scheme/flowrunner/workspace-dashboard.dto.d.ts +207 -0
- package/dist/types/shared/src/scheme/integration-connection/dto.d.ts +22 -0
- package/dist/types/shared/src/scheme/notifications/dto.d.ts +10 -0
- package/dist/types/shared/src/scheme/notifications/rest.d.ts +20 -0
- package/dist/types/shared/src/scheme/remote-mcp-server/dto.d.ts +153 -29
- package/dist/types/shared/src/scheme/shared-extensions/base.d.ts +0 -4
- package/dist/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +0 -24
- package/dist/types/shared/src/scheme/shared-extensions/extension.d.ts +0 -18
- package/dist/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +0 -3
- package/dist/types/shared/src/scheme/shared-extensions/index.d.ts +1 -0
- package/dist/types/shared/src/scheme/shared-extensions/list.d.ts +0 -28
- package/dist/types/shared/src/scheme/shared-extensions/methods.d.ts +0 -1
- package/dist/types/shared/src/scheme/shared-extensions/resolve.d.ts +0 -12
- package/dist/types/shared/src/scheme/shared-extensions/search.d.ts +0 -8
- package/dist/types/shared/src/scheme/shared-extensions/usage-stats.d.ts +189 -0
- package/package.json +1 -4
- package/project-files/sandbox/files-mock.js +3 -5
- package/project-files/sandbox/service.js +10 -11
- package/runtime/index.js +794 -896
- package/runtime/index.js.map +4 -4
- package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/context/execution-context.d.ts +10 -2
- package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/extension.d.ts +3 -3
- package/runtime/types/flow-extension-runner/src/global.d.ts +6 -18
- package/runtime/types/flow-extension-runner/src/index.d.ts +39 -13
- package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/model/field-mapper.d.ts +1 -1
- package/runtime/types/flow-extension-runner/src/{v2/model → model}/model-types.d.ts +11 -1
- package/runtime/types/flow-extension-runner/src/{v2/model → model}/params-model.d.ts +1 -1
- package/runtime/types/flow-extension-runner/src/{v2/params → params}/config-params.d.ts +1 -1
- package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/index.d.ts +2 -0
- package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/types.d.ts +2 -0
- package/runtime/types/flow-extension-runner/src/params/schema/date-format.d.ts +80 -0
- package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/defaults.d.ts +3 -2
- package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/field-plan.d.ts +9 -2
- package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/introspect.d.ts +8 -0
- package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/messages.d.ts +1 -1
- package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/normalize.d.ts +1 -1
- package/runtime/types/flow-extension-runner/src/params/schema/notices.d.ts +15 -0
- package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/parse.d.ts +1 -1
- package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/types.d.ts +1 -1
- package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/zod.d.ts +21 -0
- package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/registry.d.ts +2 -0
- package/runtime/types/flow-extension-runner/src/{v2/types.d.ts → types.d.ts} +1 -1
- package/runtime/types/packages/cli/src/runtime/index.d.ts +6 -5
- package/dist/types/flow-extension-runner/src/common/config.d.ts +0 -12
- package/dist/types/flow-extension-runner/src/common/context.d.ts +0 -6
- package/dist/types/flow-extension-runner/src/common/types.d.ts +0 -11
- package/dist/types/flow-extension-runner/src/v1/config.d.ts +0 -3
- package/dist/types/flow-extension-runner/src/v1/constants.d.ts +0 -4
- package/dist/types/flow-extension-runner/src/v1/index.d.ts +0 -11
- package/dist/types/flow-extension-runner/src/v1/namespace.d.ts +0 -9
- package/dist/types/flow-extension-runner/src/v1/service.d.ts +0 -29
- package/dist/types/flow-extension-runner/src/v1/types.d.ts +0 -13
- package/dist/types/flow-extension-runner/src/v2/index.d.ts +0 -39
- package/dist/types/jsdoc-parser/src/custom-type-defs/files.d.ts +0 -2
- package/dist/types/jsdoc-parser/src/index.d.ts +0 -2
- package/dist/types/jsdoc-parser/src/lib.d.ts +0 -42
- package/dist/types/jsdoc-parser/src/types.d.ts +0 -2
- package/runtime/types/flow-extension-runner/src/common/config.d.ts +0 -12
- package/runtime/types/flow-extension-runner/src/common/context.d.ts +0 -6
- package/runtime/types/flow-extension-runner/src/common/types.d.ts +0 -11
- package/runtime/types/flow-extension-runner/src/v1/config.d.ts +0 -3
- package/runtime/types/flow-extension-runner/src/v1/constants.d.ts +0 -4
- package/runtime/types/flow-extension-runner/src/v1/index.d.ts +0 -11
- package/runtime/types/flow-extension-runner/src/v1/namespace.d.ts +0 -9
- package/runtime/types/flow-extension-runner/src/v1/service.d.ts +0 -29
- package/runtime/types/flow-extension-runner/src/v1/types.d.ts +0 -13
- package/runtime/types/flow-extension-runner/src/v2/index.d.ts +0 -39
- package/runtime/types/jsdoc-parser/src/custom-type-defs/files.d.ts +0 -2
- package/runtime/types/jsdoc-parser/src/index.d.ts +0 -2
- package/runtime/types/jsdoc-parser/src/lib.d.ts +0 -42
- package/runtime/types/jsdoc-parser/src/types.d.ts +0 -2
- package/runtime/types/shared/src/constants/activity-log.d.ts +0 -1573
- package/runtime/types/shared/src/constants/ai-agent-tools.d.ts +0 -20
- package/runtime/types/shared/src/constants/ai.d.ts +0 -11
- package/runtime/types/shared/src/constants/api-keys.d.ts +0 -1
- package/runtime/types/shared/src/constants/app.d.ts +0 -57
- package/runtime/types/shared/src/constants/billing.d.ts +0 -16
- package/runtime/types/shared/src/constants/compliances.d.ts +0 -3
- package/runtime/types/shared/src/constants/data-types.d.ts +0 -26
- package/runtime/types/shared/src/constants/docs.d.ts +0 -6
- package/runtime/types/shared/src/constants/error-codes.d.ts +0 -20
- package/runtime/types/shared/src/constants/flow.d.ts +0 -12
- package/runtime/types/shared/src/constants/index.d.ts +0 -18
- package/runtime/types/shared/src/constants/knowledge-base.d.ts +0 -15
- package/runtime/types/shared/src/constants/notification-types.d.ts +0 -1234
- package/runtime/types/shared/src/constants/notifications.d.ts +0 -10
- package/runtime/types/shared/src/constants/oauth-connection-error.d.ts +0 -3
- package/runtime/types/shared/src/constants/patterns.d.ts +0 -28
- package/runtime/types/shared/src/constants/retry-policy.d.ts +0 -30
- package/runtime/types/shared/src/constants/severity.d.ts +0 -9
- package/runtime/types/shared/src/constants/shared-extensions-search.d.ts +0 -6
- package/runtime/types/shared/src/constants/shared-extensions.d.ts +0 -56
- package/runtime/types/shared/src/constants/zod.d.ts +0 -2
- package/runtime/types/shared/src/errors/api.d.ts +0 -15
- package/runtime/types/shared/src/errors/base.d.ts +0 -38
- package/runtime/types/shared/src/errors/common.d.ts +0 -39
- package/runtime/types/shared/src/errors/index.d.ts +0 -14
- package/runtime/types/shared/src/errors/k8s.d.ts +0 -14
- package/runtime/types/shared/src/errors/message.d.ts +0 -48
- package/runtime/types/shared/src/errors/oauth-connection.d.ts +0 -4
- package/runtime/types/shared/src/errors/open-search.d.ts +0 -4
- package/runtime/types/shared/src/errors/s3.d.ts +0 -11
- package/runtime/types/shared/src/extensions/zod.d.ts +0 -25
- package/runtime/types/shared/src/scheme/access-keys/dto.d.ts +0 -101
- package/runtime/types/shared/src/scheme/access-keys/index.d.ts +0 -2
- package/runtime/types/shared/src/scheme/account/dto.d.ts +0 -63
- package/runtime/types/shared/src/scheme/account/index.d.ts +0 -1
- package/runtime/types/shared/src/scheme/activity-log-base.d.ts +0 -35
- package/runtime/types/shared/src/scheme/ai-agent-tools/dto.d.ts +0 -69
- package/runtime/types/shared/src/scheme/ai-agent-tools/index.d.ts +0 -2
- package/runtime/types/shared/src/scheme/ai-agent-tools/parameters.d.ts +0 -7
- package/runtime/types/shared/src/scheme/ai-router/dto.d.ts +0 -23
- package/runtime/types/shared/src/scheme/ai-router/index.d.ts +0 -2
- package/runtime/types/shared/src/scheme/api-keys/dto.d.ts +0 -28
- package/runtime/types/shared/src/scheme/api-keys/index.d.ts +0 -2
- package/runtime/types/shared/src/scheme/app/index.d.ts +0 -1
- package/runtime/types/shared/src/scheme/app/java.dto.d.ts +0 -6
- package/runtime/types/shared/src/scheme/billing/index.d.ts +0 -1
- package/runtime/types/shared/src/scheme/billing/java.dto.d.ts +0 -181
- package/runtime/types/shared/src/scheme/crm/billing.d.ts +0 -149
- package/runtime/types/shared/src/scheme/crm/dto.d.ts +0 -218
- package/runtime/types/shared/src/scheme/crm/index.d.ts +0 -3
- package/runtime/types/shared/src/scheme/data-types/index.d.ts +0 -1
- package/runtime/types/shared/src/scheme/data-types/java.dto.d.ts +0 -22
- package/runtime/types/shared/src/scheme/dynamic-forms/dto.d.ts +0 -30
- package/runtime/types/shared/src/scheme/dynamic-forms/index.d.ts +0 -2
- package/runtime/types/shared/src/scheme/extensions/index.d.ts +0 -1
- package/runtime/types/shared/src/scheme/extensions/params-to-zod.d.ts +0 -14
- package/runtime/types/shared/src/scheme/flowrunner/custom-elements.d.ts +0 -383
- package/runtime/types/shared/src/scheme/flowrunner/index.d.ts +0 -3
- package/runtime/types/shared/src/scheme/flowrunner/java.dto.d.ts +0 -655
- package/runtime/types/shared/src/scheme/index.d.ts +0 -21
- package/runtime/types/shared/src/scheme/integration-connection/dto.d.ts +0 -135
- package/runtime/types/shared/src/scheme/integration-connection/index.d.ts +0 -2
- package/runtime/types/shared/src/scheme/knowledge-base/dto.d.ts +0 -776
- package/runtime/types/shared/src/scheme/knowledge-base/index.d.ts +0 -2
- package/runtime/types/shared/src/scheme/mcp-oauth/dto.d.ts +0 -9
- package/runtime/types/shared/src/scheme/mcp-oauth/index.d.ts +0 -2
- package/runtime/types/shared/src/scheme/notifications/dto.d.ts +0 -118
- package/runtime/types/shared/src/scheme/notifications/index.d.ts +0 -3
- package/runtime/types/shared/src/scheme/notifications/rest.d.ts +0 -162
- package/runtime/types/shared/src/scheme/onboarding/dto.d.ts +0 -29
- package/runtime/types/shared/src/scheme/onboarding/index.d.ts +0 -1
- package/runtime/types/shared/src/scheme/properties/account.d.ts +0 -3
- package/runtime/types/shared/src/scheme/properties/app.d.ts +0 -5
- package/runtime/types/shared/src/scheme/properties/billing.d.ts +0 -12
- package/runtime/types/shared/src/scheme/properties/common.d.ts +0 -2
- package/runtime/types/shared/src/scheme/properties/db.d.ts +0 -8
- package/runtime/types/shared/src/scheme/properties/flow-extensions.d.ts +0 -7
- package/runtime/types/shared/src/scheme/properties/index.d.ts +0 -7
- package/runtime/types/shared/src/scheme/remote-mcp-server/dto.d.ts +0 -278
- package/runtime/types/shared/src/scheme/remote-mcp-server/index.d.ts +0 -2
- package/runtime/types/shared/src/scheme/shared-extensions/base.d.ts +0 -62
- package/runtime/types/shared/src/scheme/shared-extensions/config.d.ts +0 -96
- package/runtime/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +0 -631
- package/runtime/types/shared/src/scheme/shared-extensions/extension.d.ts +0 -411
- package/runtime/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +0 -64
- package/runtime/types/shared/src/scheme/shared-extensions/index.d.ts +0 -17
- package/runtime/types/shared/src/scheme/shared-extensions/light.d.ts +0 -38
- package/runtime/types/shared/src/scheme/shared-extensions/list.d.ts +0 -250
- package/runtime/types/shared/src/scheme/shared-extensions/logs.d.ts +0 -21
- package/runtime/types/shared/src/scheme/shared-extensions/methods.d.ts +0 -112
- package/runtime/types/shared/src/scheme/shared-extensions/params-schema.d.ts +0 -48
- package/runtime/types/shared/src/scheme/shared-extensions/popular-pool.d.ts +0 -11
- package/runtime/types/shared/src/scheme/shared-extensions/resolve.d.ts +0 -373
- package/runtime/types/shared/src/scheme/shared-extensions/rest.d.ts +0 -9
- package/runtime/types/shared/src/scheme/shared-extensions/search.d.ts +0 -189
- package/runtime/types/shared/src/scheme/shared-extensions/service-identity.d.ts +0 -10
- package/runtime/types/shared/src/scheme/shared-extensions/service-info.d.ts +0 -16
- package/runtime/types/shared/src/scheme/shared-extensions/workspace-stack.d.ts +0 -44
- package/runtime/types/shared/src/scheme/workspace/dto.d.ts +0 -40
- package/runtime/types/shared/src/scheme/workspace/index.d.ts +0 -1
- package/runtime/types/shared/src/utils/object.d.ts +0 -8
- package/runtime/types/shared/src/utils/uuid.d.ts +0 -5
- package/runtime/types/shared/src/utils/versions.d.ts +0 -4
- package/dist/types/flow-extension-runner/src/{v2/actions → actions}/action-method.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{common/context-files.d.ts → context/files.d.ts} +0 -0
- package/dist/types/flow-extension-runner/src/{v2/context → context}/logger.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/context → context}/method-input.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/context → context}/proxies.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/create-extension.d.ts → create-extension.d.ts} +0 -0
- package/dist/types/flow-extension-runner/src/{v2/crypto.d.ts → crypto.d.ts} +0 -0
- package/dist/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/dictionary-method.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/payload-schema.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-method.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-owner.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/payload-schema.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/method.d.ts → method.d.ts} +0 -0
- package/dist/types/flow-extension-runner/src/{v2/model → model}/method-model.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/method-names.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/oauth2.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/system-params.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/types.d.ts +0 -0
- package/dist/types/flow-extension-runner/src/{common/constants.d.ts → params/config-types.d.ts} +0 -0
- package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/files-options.d.ts +4 -4
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/checks.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/decode.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/encode.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/values.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/method-params.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/params.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/assert-object-schema.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/assert-supported-schema.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/coerce.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/dates.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/dictionary-binding.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/labels.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/params → params}/widget-types.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/path.d.ts → path.d.ts} +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/mechanisms.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/method-names.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/polling-triggers.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/system-params.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/trigger-method.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/types.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/method-names.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/realtime-setup.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/system-params.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/trigger-method.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/types.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/verify.d.ts +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/result.d.ts → result.d.ts} +0 -0
- /package/dist/types/flow-extension-runner/src/{v2/system-method.d.ts → system-method.d.ts} +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/actions → actions}/action-method.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{common/context-files.d.ts → context/files.d.ts} +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/context → context}/logger.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/context → context}/method-input.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/context → context}/proxies.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/create-extension.d.ts → create-extension.d.ts} +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/crypto.d.ts → crypto.d.ts} +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/dictionary-method.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/payload-schema.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-method.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-owner.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/payload-schema.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/method.d.ts → method.d.ts} +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/model → model}/method-model.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/method-names.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/oauth2.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/system-params.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/types.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{common/constants.d.ts → params/config-types.d.ts} +0 -0
- /package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/files-options.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/checks.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/decode.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/encode.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/values.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/method-params.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/params.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/assert-object-schema.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/assert-supported-schema.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/coerce.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/dates.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/dictionary-binding.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/labels.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/params → params}/widget-types.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/path.d.ts → path.d.ts} +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/mechanisms.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/method-names.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/polling-triggers.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/system-params.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/trigger-method.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/types.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/method-names.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/realtime-setup.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/system-params.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/trigger-method.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/types.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/verify.d.ts +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/result.d.ts → result.d.ts} +0 -0
- /package/runtime/types/flow-extension-runner/src/{v2/system-method.d.ts → system-method.d.ts} +0 -0
|
@@ -61,7 +61,7 @@ logo for that one item. Omit it and the item inherits the service's.
|
|
|
61
61
|
| `logo` | string | ✓ | Icon path, resolved **inside the service's `public/` folder** — see [Folder layout](#folder-layout). |
|
|
62
62
|
| `appearanceColors` | `[string, string]` | – | `[primary, secondary]`. |
|
|
63
63
|
| `usesFileStorage` | boolean | – | `true` provisions `ctx.files`; when false, `ctx.files` is a proxy that throws. Default false. See [10-files-api.md](10-files-api.md). |
|
|
64
|
-
| `serviceClassName` | string | – | **Deprecated — will be removed soon. Shared extensions only.** The class name of a shared extension
|
|
64
|
+
| `serviceClassName` | string | – | **Deprecated — will be removed soon. Shared extensions only.** The class name of a shared extension that was previously published as a class-based service (`'GeminiAIService'`). It is published as `serviceInfo.serviceClassName` (absent otherwise), so flows, configs and connections saved against the old service keep resolving to this one. Keep it unchanged once set. Never set it on a new service or a custom extension. |
|
|
65
65
|
| `configItems` | `z.object` | – | App + shared config (see [02-zod-types.md](02-zod-types.md)). → `appConfigDescriptions` / `sharedConfigDescriptions`. Omit when the service needs none — see [Services with no credentials](#services-with-no-credentials); a plain object of fields is **not** accepted (see [03-parameters.md](03-parameters.md)). |
|
|
66
66
|
| `initContext` | fn | – | `({ config, oauth }) => context`; runs once per invocation. Runs for OAuth flows too (`oauth` may be empty). |
|
|
67
67
|
| `apiRequest` | fn | – | Shared HTTP helper (envelope-unwrap, error-normalize, redacted logging). See [04-http-requests.md](04-http-requests.md). |
|
|
@@ -12,6 +12,7 @@ and behaviors.
|
|
|
12
12
|
| `z.boolean()` | toggle | | `.optional()` | any field | not required (required is default) |
|
|
13
13
|
| `z.enum([...])` | dropdown | | `.default(v)` | any field | default value |
|
|
14
14
|
| `z.date()` | date picker | | `.shared()` | config field | `shared:true` (OAuth client id/secret) |
|
|
15
|
+
| `z.iso.date()`, `z.iso.datetime({ local: true })`, `z.iso.time()` | date / date-and-time / time picker that stores **text** — see [Dates](#dates--an-instant-or-a-date-as-text) | | `.dateFormat(pattern)` | those three | the text `execute` receives: `'dd/MM/yyyy'` → `'31/01/2024'` |
|
|
15
16
|
| `z.object({...})` | nested form — **drops** the keys it does not declare | | `.dictionary(ref)` | param field | dynamic options + auto `dependsOn` (see [05-dictionaries.md](05-dictionaries.md)) |
|
|
16
17
|
| `z.looseObject({...})` | nested form — **keeps** the keys it does not declare; see [`z.object` or `z.looseObject`](#zobject-or-zlooseobject) | | | | |
|
|
17
18
|
| `z.array(inner)` | list | | `.labels({ value: 'Label' })` | `z.enum` | UI shows the label; the flow stores and `execute` receives the VALUE |
|
|
@@ -71,6 +72,7 @@ what the **handler** needs, and convert in the handler:
|
|
|
71
72
|
| An object or list whose shape you know, which the author may also supply as JSON text | `z.object({ … })` / `z.array(…)`: they draw a real form **and** accept JSON text (see [Text and structures](#text-and-structures)) | — |
|
|
72
73
|
| Several lines of text | `z.text()` | — |
|
|
73
74
|
| Several values (ids, emails, tags), even when the vendor wants them comma-separated | `z.array(<element>)`, and `.join(',')` at the request if the vendor needs text | A comma-separated `z.string()` gets a bound list as JSON text, which `.split(',')` breaks ([16-gotchas.md](16-gotchas.md#a-list-is-a-zarray-never-comma-separated-text-you-split)) |
|
|
75
|
+
| A calendar date or a wall-clock time the vendor wants as text (`20/05/2026`, `2026-05-20`, `10:00`) | `z.iso.date().dateFormat('dd/MM/yyyy')` (or `z.iso.datetime({ local: true })` / `z.iso.time()`) — see [Dates](#dates--an-instant-or-a-date-as-text) | `z.date()` hands you an instant; formatting it yourself needs a time zone you do not have, and is a day early for an author east of UTC ([16-gotchas.md](16-gotchas.md#a-date-the-vendor-wants-as-text-is-dateformat-never-a-zdate-you-format)) |
|
|
74
76
|
|
|
75
77
|
**`z.json()` is not supported.** It fails when the extension loads, with a message naming the two declarations
|
|
76
78
|
above. A value whose shape you don't declare is `z.unknown()`. One you do know is the shape itself, which
|
|
@@ -112,6 +114,95 @@ The top-level `params` object is the exception. It is always a `z.object()`, and
|
|
|
112
114
|
dropped unless the action declares `dynamicParams` (see [07-actions.md](07-actions.md)). Looseness is for the
|
|
113
115
|
objects **inside** it.
|
|
114
116
|
|
|
117
|
+
## Dates — an instant, or a date as text
|
|
118
|
+
|
|
119
|
+
Two different things are called "a date", and they are declared differently:
|
|
120
|
+
|
|
121
|
+
| The vendor wants | Declare | Widget | `execute` receives |
|
|
122
|
+
|---|---|---|---|
|
|
123
|
+
| an **instant** — a moment, the same everywhere (`scheduled_at: 2026-05-20T07:00:00Z`) | `z.date()` (the value as sent) or `z.coerce.date()` (a `Date`) | date picker | what the caller sent / a `Date` |
|
|
124
|
+
| a **calendar date** as text | `z.iso.date()` | date picker | `'2024-01-31'` |
|
|
125
|
+
| | `z.iso.date().dateFormat('dd/MM/yyyy')` | date picker | `'31/01/2024'` |
|
|
126
|
+
| a **wall-clock date and time** as text, read in the vendor's zone | `z.iso.datetime({ local: true })` | date-and-time picker | `'2024-01-31T13:45'` |
|
|
127
|
+
| | `z.iso.datetime({ local: true }).dateFormat('dd/MM/yy HH:mm')` | date-and-time picker | `'31/01/24 13:45'` |
|
|
128
|
+
| a **time of day** as text | `z.iso.time()` | time picker | `'13:45'` |
|
|
129
|
+
| | `z.iso.time().dateFormat('h:mm a')` | time picker | `'1:45 PM'` |
|
|
130
|
+
|
|
131
|
+
A date as text is **text from end to end**: the picker builds it from the day and time the author clicked, the
|
|
132
|
+
flow stores it as text, and your handler receives it in your pattern. Nothing converts it through a time zone,
|
|
133
|
+
so 31 January picked in UTC+3 stays 31 January. `z.iso.datetime()` **without** `{ local: true }` is an instant
|
|
134
|
+
with a zone and stays a text box.
|
|
135
|
+
|
|
136
|
+
### `.dateFormat(pattern)`
|
|
137
|
+
|
|
138
|
+
The pattern uses these tokens, and only these:
|
|
139
|
+
|
|
140
|
+
| Token | Meaning | 31 Jan 2024, 13:45:30 |
|
|
141
|
+
|---|---|---|
|
|
142
|
+
| `yyyy` / `yy` | year | `2024` / `24` |
|
|
143
|
+
| `MM` / `M` | month | `01` / `1` |
|
|
144
|
+
| `dd` / `d` | day of the month | `31` / `31` |
|
|
145
|
+
| `HH` / `H` | hour, 0–23 | `13` / `13` |
|
|
146
|
+
| `hh` / `h` | hour, 1–12 — needs `a` | `01` / `1` |
|
|
147
|
+
| `mm` | minute | `45` |
|
|
148
|
+
| `ss` | second | `30` |
|
|
149
|
+
| `a` | AM / PM | `PM` |
|
|
150
|
+
| `'text'` | literal text | `'at'` → `at` |
|
|
151
|
+
|
|
152
|
+
Any other character that is not a letter (`/ - . : , space`) is written as is. Without `.dateFormat()` the
|
|
153
|
+
value is ISO: `yyyy-MM-dd`, `yyyy-MM-ddTHH:mm` (with seconds when the value had them), `HH:mm`.
|
|
154
|
+
|
|
155
|
+
**Checked when the extension loads**, naming the parameter — so a mistake stops `flowrunner deploy`:
|
|
156
|
+
|
|
157
|
+
| You wrote | Refused because |
|
|
158
|
+
|---|---|
|
|
159
|
+
| `'DD/MM/YYYY'`, `'dd/mm/YYYY'` | `YYYY` is the week-numbering year, `DD` the day of the year, `mm` minutes — the message suggests `dd/MM/yyyy` |
|
|
160
|
+
| `'dd/MM/yyyy HH:mm'` on `z.iso.date()` | a date has no time of day — declare `z.iso.datetime({ local: true })` |
|
|
161
|
+
| `'dd/MM'` on `z.iso.time()`, `'MM/yyyy'` on `z.iso.date()` | a time has no date; every part of a date must be in its pattern |
|
|
162
|
+
| `'hh:mm'` | a 12-hour clock without `a` cannot be read back — add `a`, or use `HH` |
|
|
163
|
+
| `'HH:mm a'` | a 24-hour clock with `a` writes `13:45 PM`, which cannot be read back — use `hh:mm a` or `HH:mm` |
|
|
164
|
+
| `.dateFormat()` on `z.string()`, `z.date()`, or `z.iso.datetime()` without `{ local: true }` | only the three wall-clock types take a format |
|
|
165
|
+
| `.default('2024-01-31')` with `.dateFormat('dd/MM/yyyy')` | a default is handed to `execute` as written, so write it in the field's own format: `.default('31/01/2024')` |
|
|
166
|
+
|
|
167
|
+
### What a date-as-text field accepts
|
|
168
|
+
|
|
169
|
+
A value picked in the editor already has your pattern. A value **bound from another block** may be any text,
|
|
170
|
+
and is reshaped from the characters as written:
|
|
171
|
+
|
|
172
|
+
| Declared `.dateFormat('dd/MM/yyyy')`, given | `execute` receives |
|
|
173
|
+
|---|---|
|
|
174
|
+
| `'31/01/2024'` | `'31/01/2024'` |
|
|
175
|
+
| `'2024-01-31'`, `'2024-01-31T23:30:00+03:00'`, `'2024-01-31T23:30:00Z'` | `'31/01/2024'` — the date **as written**; a zone is dropped, never applied |
|
|
176
|
+
| `'31/02/2024'`, `'1/1/2024'`, `'01/31/2024'` | refused: `«Due Date» must be a date in dd/MM/yyyy, e.g. 31/01/2024` |
|
|
177
|
+
| a timestamp (`1706659200000`) | refused, with the same message — a timestamp is an instant, and turning it into a day needs a time zone. A field that takes one is `z.date()` |
|
|
178
|
+
|
|
179
|
+
- **Strict.** The text must be exactly what the pattern writes — `1/1/2024` is not `dd/MM/yyyy`, `1:45 pm` is not
|
|
180
|
+
`h:mm a`, and `31/02/2024` or `24:00` is no date at all.
|
|
181
|
+
- **Nothing is invented.** A date alone is refused by a date-and-time or a time field, rather than given a
|
|
182
|
+
midnight nobody picked.
|
|
183
|
+
- **An ISO value with `Z`** keeps its UTC date: `new Date().toISOString()` just after midnight in UTC+3 is still
|
|
184
|
+
yesterday's date in UTC. If the local day matters, format it in the zone you mean before it reaches the field.
|
|
185
|
+
- **Blank is "not set"**, as on a number: `''`, `null` and a missing value follow `.optional()` / `.nullable()` /
|
|
186
|
+
`.default()`. `.min()` / `.max()` are not available on these types.
|
|
187
|
+
- **A pattern made only of digits** (`yyyyMMdd`, `HHmm`) is fine: `20240131` is read as that date, and a value
|
|
188
|
+
that is no date in it (`20241331`) is refused like any other.
|
|
189
|
+
- **To let a flow clear a date**, declare a union with an empty branch:
|
|
190
|
+
`z.union([z.iso.date().dateFormat('dd/MM/yyyy'), z.literal('')]).optional()` (or with `z.date()`). The picker
|
|
191
|
+
stays; `''` (the flow sets the field to Empty Text, or binds an empty value) reaches `execute` as `''`, and an
|
|
192
|
+
untouched field arrives as `undefined`. Map `''` to the vendor's clear in the handler. **Never use `null` as
|
|
193
|
+
the clear signal**: a field left empty in a block arrives as `null`, so `.nullable()` would clear the date on
|
|
194
|
+
every run. This holds for `z.date()` as well — see [Clearing a value](#clearing-a-value).
|
|
195
|
+
- Inside an object or a list it behaves the same, and a failure names the property (`«Days item 2» must be …`).
|
|
196
|
+
|
|
197
|
+
### Moving a field from `z.date()` to a date as text
|
|
198
|
+
|
|
199
|
+
A flow saved against `z.date()` holds the old picker's **timestamp**. When an author opens the block, the
|
|
200
|
+
console converts it to your pattern **in the author's own time zone** — the day they originally picked — and
|
|
201
|
+
notes *"Converted from an older saved value — check it and save."* Ask your users to open and save the flows
|
|
202
|
+
that use the field. A flow that is never re-saved keeps sending the timestamp: for a transition period the
|
|
203
|
+
runtime still accepts it, reading it in **UTC** (a day early for an author east of UTC), and after that it is
|
|
204
|
+
refused like any other timestamp.
|
|
205
|
+
|
|
115
206
|
## The type list is CLOSED
|
|
116
207
|
|
|
117
208
|
The table above is what a service declares day to day. A few more types are accepted and rarely reached for:
|
|
@@ -229,7 +320,7 @@ converted:
|
|
|
229
320
|
```js
|
|
230
321
|
limit: z.union([z.number(), z.literal('max')]) // '5' → 5 'max' → 'max'
|
|
231
322
|
mode : z.union([z.boolean(), z.literal('auto')]) // 'false' → false 'auto' → 'auto'
|
|
232
|
-
scope: z.union([z.number(), z.enum(['all', 'none'])]) // '5' → 5 'all' → 'all' 'x' → «Scope»
|
|
323
|
+
scope: z.union([z.number(), z.enum(['all', 'none'])]) // '5' → 5 'all' → 'all' 'x' → «Scope» must be a number, or one of: all, none
|
|
233
324
|
```
|
|
234
325
|
|
|
235
326
|
Keep `z.string()` in a union only when free text really is one of the forms, and convert in the handler if
|
|
@@ -239,17 +330,33 @@ you need a number out of it. For a value that must pass through untouched whatev
|
|
|
239
330
|
A constraint is part of "fits": `z.union([z.number().min(10), z.string()])` given `5` hands over `'5'`,
|
|
240
331
|
because the number branch refuses it and the string branch takes it converted.
|
|
241
332
|
|
|
242
|
-
|
|
333
|
+
A value no branch accepts is refused with what **every** branch expects, in declared order: `«Scope» must be a
|
|
334
|
+
number, or one of: all, none`. A `z.literal('')` branch is left out, so a `''` union reads like its other
|
|
335
|
+
branch.
|
|
336
|
+
|
|
337
|
+
### Clearing a value
|
|
338
|
+
|
|
339
|
+
A flow sends three kinds of "nothing", and only one of them is deliberate:
|
|
340
|
+
|
|
341
|
+
| In the block | `execute` receives |
|
|
342
|
+
|---|---|
|
|
343
|
+
| the field left untouched, or cleared | `null` → absence (`undefined` under `.optional()`) |
|
|
344
|
+
| the **Empty Text** chip, or a bound `''` | `''` |
|
|
345
|
+
| a cleared text box in the **config dialog** | `''` |
|
|
243
346
|
|
|
244
|
-
`''` is a
|
|
245
|
-
|
|
347
|
+
`''` is a value on a plain `z.string()`. On every other type it is absence — unless you declare it with a
|
|
348
|
+
`z.literal('')` branch, which keeps it as a value. That is how a field lets a flow **clear** something:
|
|
246
349
|
|
|
247
350
|
```js
|
|
248
|
-
|
|
249
|
-
webhookUrl: z.
|
|
351
|
+
dueDate : z.union([z.date(), z.literal('')]).optional() // untouched → undefined Empty Text → '' a date → the date
|
|
352
|
+
webhookUrl: z.url().optional() // '' → «Webhook URL» is invalid — expects a URL
|
|
353
|
+
webhookUrl: z.union([z.url(), z.literal('')]).optional() // '' → '' untouched → undefined
|
|
250
354
|
```
|
|
251
355
|
|
|
252
|
-
|
|
356
|
+
The handler decides what `''` means for the vendor: send the vendor's clear (`body.dueDate = null` when
|
|
357
|
+
`params.dueDate === ''`), or leave the field out (`params.webhookUrl || undefined`). Never make `null` the
|
|
358
|
+
clear signal — an untouched field arrives as `null`, so the vendor's value would be cleared on every run. See
|
|
359
|
+
[16-gotchas.md](16-gotchas.md) for the rest of that trap.
|
|
253
360
|
|
|
254
361
|
## Config fields publish a smaller set of types
|
|
255
362
|
|
|
@@ -360,6 +467,7 @@ field by its `.label()`:
|
|
|
360
467
|
«Retries» must be at least 1
|
|
361
468
|
«Site» is invalid — expects a URL, e.g. https://example.com
|
|
362
469
|
«Region» must be one of: us, eu
|
|
470
|
+
«Scope» must be a number, or one of: all, none
|
|
363
471
|
```
|
|
364
472
|
|
|
365
473
|
The console checks the *same* schema while the form is being filled in, so a config dialog reports the same
|
|
@@ -8,7 +8,7 @@ via `.dictionary(ref)` on a param (see [02-zod-types.md](02-zod-types.md)). A di
|
|
|
8
8
|
| Property | Type | Description |
|
|
9
9
|
|---|---|---|
|
|
10
10
|
| `id` | string | Dictionary id — **starts with `get`, ends with `Dictionary`** (`getChatsDictionary`). |
|
|
11
|
-
| `category` | string | Optional grouping label. Defaults to `''` — unlike an action's `category`, which is required.
|
|
11
|
+
| `category` | string | Optional grouping label. Defaults to `''` — unlike an action's `category`, which is required. |
|
|
12
12
|
| `label` | string | **Human-readable name** → `operationName`. Dictionaries are shown in the UI and exposed to AI tools, so **always set a label**. Falls back to `id` when omitted. |
|
|
13
13
|
| `description` | string | Description. |
|
|
14
14
|
| `criteria` | `z.object` | Optional dependency inputs (become `dependsOn` on consumers). Omit when the dictionary depends on nothing; declared ⇒ must be a `z.object` (see [03-parameters.md](03-parameters.md)). |
|
|
@@ -31,7 +31,7 @@ The names change on the way out, which matters when you inspect a built model:
|
|
|
31
31
|
| `appearanceColors` | per-method `colorStart` / `colorEnd` (every method inherits them) |
|
|
32
32
|
| `label` | per-method `operationName` |
|
|
33
33
|
|
|
34
|
-
`serviceInfo` also carries `requireOAuth
|
|
34
|
+
`serviceInfo` also carries `requireOAuth`. A
|
|
35
35
|
service's `appearanceColors` are not published on `serviceInfo` itself.
|
|
36
36
|
|
|
37
37
|
## The schema travels too
|
|
@@ -94,6 +94,9 @@ There is no `.uiComponent()`; the widget follows the zod type (after unwrapping
|
|
|
94
94
|
| `z.number()` | `NUMBER` | `NUMERIC_STEPPER` |
|
|
95
95
|
| `z.boolean()` | `BOOLEAN` | `TOGGLE` |
|
|
96
96
|
| `z.date()` | `STRING` | `DATE_PICKER` |
|
|
97
|
+
| `z.iso.date()` | `STRING` | `DATE_PICKER` + `valueKind: 'string'` + `format` (the `.dateFormat()` pattern, else `yyyy-MM-dd`) |
|
|
98
|
+
| `z.iso.datetime({ local: true })` | `STRING` | `DATE_TIME_PICKER` + `valueKind: 'string'` + `format` (else `yyyy-MM-dd'T'HH:mm`) |
|
|
99
|
+
| `z.iso.time()` | `STRING` | `TIME_PICKER` + `valueKind: 'string'` + `format` (else `HH:mm`) |
|
|
97
100
|
| `z.enum([...])` | `STRING` | `DROPDOWN` — `{ value, label }` pairs when `.labels()` is declared, else the enum values |
|
|
98
101
|
| `z.object({...})` | `OBJECT` | — (recurses into `properties`) |
|
|
99
102
|
| `z.array(inner)` | `LIST` | — (`items.type` from the element) |
|
|
@@ -153,8 +156,7 @@ function itself never ships; only its name does.
|
|
|
153
156
|
| `field.dynamicProps({ dependsOn, execute })` | `metaInfo.args[field].schemaLoader` = the loader's name, `metaInfo.args[field].dependsOn` = `dependsOn` (`[]` when omitted); in `paramsSchema`, the field's `meta.frDynamicProps` = `{ id, dependsOn }` and the object carries `loose: true` | `<actionId>_<field>_DynamicProps` |
|
|
154
157
|
| `dynamicParams: { dependsOn, execute }` | `metaInfo.dynamicParams` = `{ methodName, dependsOn }` | `<actionId>_DynamicParams` |
|
|
155
158
|
|
|
156
|
-
-
|
|
157
|
-
the same way. The field's own `bodyParams` entry and `paramsSchema` entry stay as declared.
|
|
159
|
+
- The field's own `bodyParams` entry and `paramsSchema` entry stay as declared.
|
|
158
160
|
- `frDynamicProps` in `paramsSchema` is the plain ref `{ id, dependsOn }`, written next to the other `fr*`
|
|
159
161
|
meta keys (`frDictionary`, `frLabels`, …).
|
|
160
162
|
- `loose: true` marks an object that keeps the keys it does not declare (`z.looseObject()`); without it a
|
|
@@ -181,5 +183,3 @@ Both are built from the one schema `execute` returned, so they cannot disagree.
|
|
|
181
183
|
field's own static keys come **first** in both. A loaded field that carries `.dictionary(ref)` publishes the
|
|
182
184
|
dictionary on its `params` entry.
|
|
183
185
|
|
|
184
|
-
A legacy loader differs: it answers with a plain list of param definitions, not this object. Consumers accept
|
|
185
|
-
both.
|
|
@@ -15,8 +15,8 @@ Two different surfaces, easily confused:
|
|
|
15
15
|
|
|
16
16
|
| Surface | How you get it | Contains |
|
|
17
17
|
|---|---|---|
|
|
18
|
-
| **`Flowrunner` global** | always present when the platform runs your service; a harness gets it as a side effect of importing `@flowrunner/cli/runtime` | `Request`, `z`, `crypto`, `createExtension`, `getExtension
|
|
19
|
-
| **`require('@flowrunner/cli/runtime')`** | explicit import — **harness-side only** | `buildServiceDefinition`, `getServiceConfigs`, `runServiceMethod`, `
|
|
18
|
+
| **`Flowrunner` global** | always present when the platform runs your service; a harness gets it as a side effect of importing `@flowrunner/cli/runtime` | `Request`, `z`, `crypto`, `createExtension`, `getExtension` |
|
|
19
|
+
| **`require('@flowrunner/cli/runtime')`** | explicit import — **harness-side only** | `buildServiceDefinition`, `getServiceConfigs`, `runServiceMethod`, `resetRegistry` |
|
|
20
20
|
|
|
21
21
|
A service module uses only the global, and `require`s nothing. Note that importing the module is what
|
|
22
22
|
installs the global — there is no separate namespace export to pull in.
|
|
@@ -31,7 +31,6 @@ than a syntax error. Check it directly:
|
|
|
31
31
|
| `buildServiceDefinition` | `(serviceId, serviceEntryPointPath)` | `SharedExtensionDefinition` — `serviceInfo` + `methodsMap` (see [11-output-model.md](11-output-model.md)) |
|
|
32
32
|
| `getServiceConfigs` | `(serviceId, serviceEntryPointPath)` | `ConfigItem[]` — the published config descriptions |
|
|
33
33
|
| `runServiceMethod` | `(data: RunServiceMethodData)` | `Promise<unknown>` — invokes one method, SYSTEM methods included |
|
|
34
|
-
| `detectVersion` | `(serviceId, serviceEntryPointPath)` | `'v1' \| 'v2'` |
|
|
35
34
|
| `resetRegistry` | `()` | clears the extension registry — **not sufficient on its own**, see below |
|
|
36
35
|
|
|
37
36
|
```js
|
|
@@ -25,7 +25,8 @@ builder that prunes `''` makes the documented "leave it blank to clear it" behav
|
|
|
25
25
|
error anywhere.
|
|
26
26
|
|
|
27
27
|
**The inverse is equally sharp, and appears the moment you fix the first half.** Once `''` reaches the wire,
|
|
28
|
-
every optional string param sends one
|
|
28
|
+
every optional string param sends one whenever a flow passes an empty value (a cleared config field, the Empty
|
|
29
|
+
Text chip, a bound `''`; a block field left untouched arrives as `null`, which is absence) — and for an API where an absent
|
|
29
30
|
field means *keep the current value*, a blank one now **overwrites** it. Copy/duplicate endpoints are the
|
|
30
31
|
usual place this bites: an absent caption keeps the original, an empty caption erases it.
|
|
31
32
|
|
|
@@ -41,15 +42,17 @@ documentation.
|
|
|
41
42
|
### The same `''` fails a format-constrained field
|
|
42
43
|
|
|
43
44
|
Because `''` is a value, it reaches the format check and fails it — and `.optional()` does not help, since
|
|
44
|
-
the field WAS provided. A cleared text box
|
|
45
|
-
|
|
45
|
+
the field WAS provided. A cleared config text box sends it, and so does a flow passing an empty value, so this
|
|
46
|
+
fires the first time someone clears an optional URL or email:
|
|
46
47
|
|
|
47
48
|
```js
|
|
48
|
-
webhookUrl: z.url().optional().label('Webhook URL') //
|
|
49
|
-
webhookUrl: z.union([z.url(), z.literal('')]).optional().label('Webhook URL') //
|
|
49
|
+
webhookUrl: z.url().optional().label('Webhook URL') // '' → «Webhook URL» is invalid — expects a URL
|
|
50
|
+
webhookUrl: z.union([z.url(), z.literal('')]).optional().label('Webhook URL') // '' → '' (a value)
|
|
50
51
|
```
|
|
51
52
|
|
|
52
|
-
Declare the union wherever
|
|
53
|
+
Declare the union wherever an empty value must be accepted, then decide in the handler what `''` means:
|
|
54
|
+
`params.webhookUrl || undefined` when empty means "not set", the vendor's clear when it means "clear it". A
|
|
55
|
+
non-empty value still has to satisfy the format.
|
|
53
56
|
|
|
54
57
|
## An optional object the author never filled in is absent — but may still arrive as `{}`
|
|
55
58
|
|
|
@@ -246,6 +249,26 @@ if (listIds?.length) payload.listIds = listIds
|
|
|
246
249
|
|
|
247
250
|
Details in [02-zod-types.md](02-zod-types.md#text-and-structures).
|
|
248
251
|
|
|
252
|
+
## A date the vendor wants as text is `.dateFormat()`, never a `z.date()` you format
|
|
253
|
+
|
|
254
|
+
A `z.date()` value is an **instant**. Turning it into the text a vendor wants (`20/05/2026`, `10:00`) needs a
|
|
255
|
+
time zone, and your handler has none — so the usual code is wrong for every author east of UTC:
|
|
256
|
+
|
|
257
|
+
```js
|
|
258
|
+
// ✗ the picker stores local midnight: 20 May picked in UTC+3 is 2026-05-19T21:00:00Z
|
|
259
|
+
dueDate: z.date()
|
|
260
|
+
// …
|
|
261
|
+
body.due = new Date(params.dueDate).toISOString().slice(0, 10) // '2026-05-19' — a day early
|
|
262
|
+
|
|
263
|
+
// ✓ the picker stores the day the author clicked, as text in your pattern
|
|
264
|
+
dueDate: z.iso.date().dateFormat('dd/MM/yyyy')
|
|
265
|
+
// …
|
|
266
|
+
body.due = params.dueDate // '20/05/2026'
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
The same goes for `getUTCDate()` / `getUTCHours()` and hand-rolled `pad2` helpers. Keep `z.date()` for a field
|
|
270
|
+
whose vendor wants an instant. Details in [02-zod-types.md](02-zod-types.md#dates--an-instant-or-a-date-as-text).
|
|
271
|
+
|
|
249
272
|
## A schema slot must be a `z.object`, or the method quietly has no inputs
|
|
250
273
|
|
|
251
274
|
`params`, `criteria` and `configItems` are containers of named fields. Hand one anything else and there is
|
|
@@ -360,6 +383,7 @@ Do not restate these here; they are covered where they belong.
|
|
|
360
383
|
| A binary download is `.toBuffer()`, not a response encoding — an encoded body is parsed and corrupted | [04-http-requests.md](04-http-requests.md) |
|
|
361
384
|
| `ResponseError.message` is the response *body*, so it can be an object | [04-http-requests.md](04-http-requests.md) |
|
|
362
385
|
| A blank (`''`) fails `z.url().optional()` — `.optional()` does not cover it | this document |
|
|
386
|
+
| A `.dateFormat()` pattern is checked at load; `YYYY`, `DD`, and `hh` without `a` are refused | [02-zod-types.md](02-zod-types.md#dateformatpattern) |
|
|
363
387
|
| Secrets in logs, credentials in the URL, credentials or caller headers sent to an origin the service didn't choose, upload MIME type | [19-security.md](19-security.md) |
|
|
364
388
|
| `.default()` is not applied to realtime-trigger `match` params | [13-runtime-contracts.md](13-runtime-contracts.md) |
|
|
365
389
|
| `rawBody` is **absent**, not empty, when there is nothing to verify — hashing `''` looks like a bad signature | [09-realtime-triggers.md](09-realtime-triggers.md) |
|
|
@@ -115,7 +115,7 @@ and testing one are separate jobs; do not read it while writing a service.
|
|
|
115
115
|
|
|
116
116
|
That is also separate from **checking that a service builds**, which needs no suite at all and is part of
|
|
117
117
|
writing one: `require('@flowrunner/cli/runtime')` exports `buildServiceDefinition`, `getServiceConfigs`,
|
|
118
|
-
`runServiceMethod
|
|
119
|
-
the `Flowrunner` global (`Request`, `z`, `crypto`, `createExtension`, `getExtension
|
|
118
|
+
`runServiceMethod` and `resetRegistry`, and importing it installs
|
|
119
|
+
the `Flowrunner` global (`Request`, `z`, `crypto`, `createExtension`, `getExtension`).
|
|
120
120
|
Signatures, a copy-paste snippet, and the boundary between a throwaway check and a suite are in
|
|
121
121
|
[13-runtime-contracts.md](13-runtime-contracts.md).
|