@nocobase/plugin-flow-engine 2.1.0-alpha.10 → 2.1.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/ai-employees/nathan/index.d.ts +10 -0
- package/dist/ai/ai-employees/nathan/index.js +152 -0
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/SKILLS.md +69 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +12 -10
- package/dist/node_modules/ajv/.runkit_example.js +23 -0
- package/dist/node_modules/ajv/LICENSE +22 -0
- package/dist/node_modules/ajv/dist/2019.d.ts +19 -0
- package/dist/node_modules/ajv/dist/2019.js +61 -0
- package/dist/node_modules/ajv/dist/2020.d.ts +19 -0
- package/dist/node_modules/ajv/dist/2020.js +55 -0
- package/dist/node_modules/ajv/dist/ajv.d.ts +18 -0
- package/dist/node_modules/ajv/dist/ajv.js +7 -0
- package/dist/node_modules/ajv/dist/compile/codegen/code.d.ts +40 -0
- package/dist/node_modules/ajv/dist/compile/codegen/code.js +156 -0
- package/dist/node_modules/ajv/dist/compile/codegen/index.d.ts +79 -0
- package/dist/node_modules/ajv/dist/compile/codegen/index.js +697 -0
- package/dist/node_modules/ajv/dist/compile/codegen/scope.d.ts +79 -0
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
- package/dist/node_modules/ajv/dist/compile/errors.d.ts +13 -0
- package/dist/node_modules/ajv/dist/compile/errors.js +123 -0
- package/dist/node_modules/ajv/dist/compile/index.d.ts +80 -0
- package/dist/node_modules/ajv/dist/compile/index.js +242 -0
- package/dist/node_modules/ajv/dist/compile/jtd/parse.d.ts +4 -0
- package/dist/node_modules/ajv/dist/compile/jtd/parse.js +350 -0
- package/dist/node_modules/ajv/dist/compile/jtd/serialize.d.ts +4 -0
- package/dist/node_modules/ajv/dist/compile/jtd/serialize.js +236 -0
- package/dist/node_modules/ajv/dist/compile/jtd/types.d.ts +6 -0
- package/dist/node_modules/ajv/dist/compile/jtd/types.js +14 -0
- package/dist/node_modules/ajv/dist/compile/names.d.ts +20 -0
- package/dist/node_modules/ajv/dist/compile/names.js +28 -0
- package/dist/node_modules/ajv/dist/compile/ref_error.d.ts +6 -0
- package/dist/node_modules/ajv/dist/compile/ref_error.js +12 -0
- package/dist/node_modules/ajv/dist/compile/resolve.d.ts +12 -0
- package/dist/node_modules/ajv/dist/compile/resolve.js +155 -0
- package/dist/node_modules/ajv/dist/compile/rules.d.ts +28 -0
- package/dist/node_modules/ajv/dist/compile/rules.js +26 -0
- package/dist/node_modules/ajv/dist/compile/util.d.ts +40 -0
- package/dist/node_modules/ajv/dist/compile/util.js +178 -0
- package/dist/node_modules/ajv/dist/compile/validate/applicability.d.ts +6 -0
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +4 -0
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
- package/dist/node_modules/ajv/dist/compile/validate/dataType.d.ts +17 -0
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
- package/dist/node_modules/ajv/dist/compile/validate/defaults.d.ts +2 -0
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
- package/dist/node_modules/ajv/dist/compile/validate/index.d.ts +42 -0
- package/dist/node_modules/ajv/dist/compile/validate/index.js +520 -0
- package/dist/node_modules/ajv/dist/compile/validate/keyword.d.ts +8 -0
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
- package/dist/node_modules/ajv/dist/compile/validate/subschema.d.ts +47 -0
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
- package/dist/node_modules/ajv/dist/core.d.ts +174 -0
- package/dist/node_modules/ajv/dist/core.js +618 -0
- package/dist/node_modules/ajv/dist/jtd.d.ts +47 -0
- package/dist/node_modules/ajv/dist/jtd.js +72 -0
- package/dist/node_modules/ajv/dist/refs/data.json +13 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +2 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +28 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +2 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
- package/dist/node_modules/ajv/dist/refs/jtd-schema.d.ts +3 -0
- package/dist/node_modules/ajv/dist/refs/jtd-schema.js +118 -0
- package/dist/node_modules/ajv/dist/runtime/equal.d.ts +6 -0
- package/dist/node_modules/ajv/dist/runtime/equal.js +7 -0
- package/dist/node_modules/ajv/dist/runtime/parseJson.d.ts +18 -0
- package/dist/node_modules/ajv/dist/runtime/parseJson.js +185 -0
- package/dist/node_modules/ajv/dist/runtime/quote.d.ts +5 -0
- package/dist/node_modules/ajv/dist/runtime/quote.js +30 -0
- package/dist/node_modules/ajv/dist/runtime/re2.d.ts +6 -0
- package/dist/node_modules/ajv/dist/runtime/re2.js +6 -0
- package/dist/node_modules/ajv/dist/runtime/timestamp.d.ts +5 -0
- package/dist/node_modules/ajv/dist/runtime/timestamp.js +42 -0
- package/dist/node_modules/ajv/dist/runtime/ucs2length.d.ts +5 -0
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
- package/dist/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
- package/dist/node_modules/ajv/dist/runtime/uri.js +6 -0
- package/dist/node_modules/ajv/dist/runtime/validation_error.d.ts +7 -0
- package/dist/node_modules/ajv/dist/runtime/validation_error.js +11 -0
- package/dist/node_modules/ajv/dist/standalone/index.d.ts +6 -0
- package/dist/node_modules/ajv/dist/standalone/index.js +90 -0
- package/dist/node_modules/ajv/dist/standalone/instance.d.ts +12 -0
- package/dist/node_modules/ajv/dist/standalone/instance.js +35 -0
- package/dist/node_modules/ajv/dist/types/index.d.ts +183 -0
- package/dist/node_modules/ajv/dist/types/index.js +3 -0
- package/dist/node_modules/ajv/dist/types/json-schema.d.ts +125 -0
- package/dist/node_modules/ajv/dist/types/json-schema.js +3 -0
- package/dist/node_modules/ajv/dist/types/jtd-schema.d.ts +174 -0
- package/dist/node_modules/ajv/dist/types/jtd-schema.js +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +21 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +6 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +13 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +5 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +6 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +4 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +6 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +6 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
- package/dist/node_modules/ajv/dist/vocabularies/code.d.ts +17 -0
- package/dist/node_modules/ajv/dist/vocabularies/code.js +131 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/id.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/index.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.d.ts +8 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +5 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +10 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
- package/dist/node_modules/ajv/dist/vocabularies/draft2020.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
- package/dist/node_modules/ajv/dist/vocabularies/draft7.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +5 -0
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +5 -0
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
- package/dist/node_modules/ajv/dist/vocabularies/errors.d.ts +9 -0
- package/dist/node_modules/ajv/dist/vocabularies/errors.js +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/format.d.ts +8 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/index.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +6 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +71 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +5 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/elements.js +24 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +6 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/enum.js +43 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +9 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/error.js +20 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +10 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/index.js +29 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +5 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/metadata.js +25 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +4 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/nullable.js +22 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +15 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +22 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/properties.js +149 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +4 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/ref.js +67 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +10 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/type.js +69 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/union.js +12 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +5 -0
- package/dist/node_modules/ajv/dist/vocabularies/jtd/values.js +51 -0
- package/dist/node_modules/ajv/dist/vocabularies/metadata.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
- package/dist/node_modules/ajv/dist/vocabularies/next.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/next.js +8 -0
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +6 -0
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +6 -0
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.d.ts +6 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +5 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +8 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.d.ts +16 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +11 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +3 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +8 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +8 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +33 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.d.ts +8 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +9 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
- package/dist/node_modules/ajv/lib/2019.ts +81 -0
- package/dist/node_modules/ajv/lib/2020.ts +75 -0
- package/dist/node_modules/ajv/lib/ajv.ts +70 -0
- package/dist/node_modules/ajv/lib/compile/codegen/code.ts +169 -0
- package/dist/node_modules/ajv/lib/compile/codegen/index.ts +852 -0
- package/dist/node_modules/ajv/lib/compile/codegen/scope.ts +215 -0
- package/dist/node_modules/ajv/lib/compile/errors.ts +184 -0
- package/dist/node_modules/ajv/lib/compile/index.ts +324 -0
- package/dist/node_modules/ajv/lib/compile/jtd/parse.ts +411 -0
- package/dist/node_modules/ajv/lib/compile/jtd/serialize.ts +277 -0
- package/dist/node_modules/ajv/lib/compile/jtd/types.ts +16 -0
- package/dist/node_modules/ajv/lib/compile/names.ts +27 -0
- package/dist/node_modules/ajv/lib/compile/ref_error.ts +13 -0
- package/dist/node_modules/ajv/lib/compile/resolve.ts +149 -0
- package/dist/node_modules/ajv/lib/compile/rules.ts +50 -0
- package/dist/node_modules/ajv/lib/compile/util.ts +213 -0
- package/dist/node_modules/ajv/lib/compile/validate/applicability.ts +22 -0
- package/dist/node_modules/ajv/lib/compile/validate/boolSchema.ts +47 -0
- package/dist/node_modules/ajv/lib/compile/validate/dataType.ts +230 -0
- package/dist/node_modules/ajv/lib/compile/validate/defaults.ts +32 -0
- package/dist/node_modules/ajv/lib/compile/validate/index.ts +582 -0
- package/dist/node_modules/ajv/lib/compile/validate/keyword.ts +171 -0
- package/dist/node_modules/ajv/lib/compile/validate/subschema.ts +135 -0
- package/dist/node_modules/ajv/lib/core.ts +892 -0
- package/dist/node_modules/ajv/lib/jtd.ts +132 -0
- package/dist/node_modules/ajv/lib/refs/data.json +13 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +28 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +30 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
- package/dist/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
- package/dist/node_modules/ajv/lib/refs/jtd-schema.ts +130 -0
- package/dist/node_modules/ajv/lib/runtime/equal.ts +7 -0
- package/dist/node_modules/ajv/lib/runtime/parseJson.ts +177 -0
- package/dist/node_modules/ajv/lib/runtime/quote.ts +31 -0
- package/dist/node_modules/ajv/lib/runtime/re2.ts +6 -0
- package/dist/node_modules/ajv/lib/runtime/timestamp.ts +46 -0
- package/dist/node_modules/ajv/lib/runtime/ucs2length.ts +20 -0
- package/dist/node_modules/ajv/lib/runtime/uri.ts +6 -0
- package/dist/node_modules/ajv/lib/runtime/validation_error.ts +13 -0
- package/dist/node_modules/ajv/lib/standalone/index.ts +100 -0
- package/dist/node_modules/ajv/lib/standalone/instance.ts +36 -0
- package/dist/node_modules/ajv/lib/types/index.ts +244 -0
- package/dist/node_modules/ajv/lib/types/json-schema.ts +187 -0
- package/dist/node_modules/ajv/lib/types/jtd-schema.ts +273 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +56 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +118 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +22 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +14 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/contains.ts +109 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +112 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +11 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/if.ts +80 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/index.ts +53 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/items.ts +59 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +36 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/not.ts +38 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +82 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +91 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +12 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/properties.ts +57 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +50 -0
- package/dist/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +13 -0
- package/dist/node_modules/ajv/lib/vocabularies/code.ts +168 -0
- package/dist/node_modules/ajv/lib/vocabularies/core/id.ts +10 -0
- package/dist/node_modules/ajv/lib/vocabularies/core/index.ts +16 -0
- package/dist/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -0
- package/dist/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -0
- package/dist/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -0
- package/dist/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -0
- package/dist/node_modules/ajv/lib/vocabularies/draft7.ts +17 -0
- package/dist/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -0
- package/dist/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -0
- package/dist/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -0
- package/dist/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -0
- package/dist/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -0
- package/dist/node_modules/ajv/lib/vocabularies/errors.ts +18 -0
- package/dist/node_modules/ajv/lib/vocabularies/format/format.ts +120 -0
- package/dist/node_modules/ajv/lib/vocabularies/format/index.ts +6 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -0
- package/dist/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -0
- package/dist/node_modules/ajv/lib/vocabularies/metadata.ts +17 -0
- package/dist/node_modules/ajv/lib/vocabularies/next.ts +8 -0
- package/dist/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -0
- package/dist/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -0
- package/dist/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/pattern.ts +39 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -0
- package/dist/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -0
- package/dist/node_modules/ajv/package.json +1 -0
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-models/action-handlers.d.ts +26 -0
- package/dist/server/flow-models/action-handlers.js +209 -0
- package/dist/server/flow-models/http-error-adapter.d.ts +10 -0
- package/dist/server/flow-models/http-error-adapter.js +58 -0
- package/dist/server/flow-models/mutate-executor.d.ts +17 -0
- package/dist/server/flow-models/mutate-executor.js +309 -0
- package/dist/server/flow-models/repository-internals/duplicate-helpers.d.ts +12 -0
- package/dist/server/flow-models/repository-internals/duplicate-helpers.js +121 -0
- package/dist/server/flow-models/repository-internals/ensure-lock.d.ts +15 -0
- package/dist/server/flow-models/repository-internals/ensure-lock.js +117 -0
- package/dist/server/flow-models/repository-internals/errors.d.ts +21 -0
- package/dist/server/flow-models/repository-internals/errors.js +78 -0
- package/dist/server/flow-models/schema-contribution-collector.d.ts +27 -0
- package/dist/server/flow-models/schema-contribution-collector.js +217 -0
- package/dist/server/flow-models/validation-facade.d.ts +29 -0
- package/dist/server/flow-models/validation-facade.js +181 -0
- package/dist/server/flow-schema-contributions/actions/aclCheck.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/aclCheck.js +46 -0
- package/dist/server/flow-schema-contributions/actions/aclCheckRefresh.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/aclCheckRefresh.js +46 -0
- package/dist/server/flow-schema-contributions/actions/actionLinkageRules.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/actionLinkageRules.js +48 -0
- package/dist/server/flow-schema-contributions/actions/confirm.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/confirm.js +73 -0
- package/dist/server/flow-schema-contributions/actions/customVariable.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/customVariable.js +76 -0
- package/dist/server/flow-schema-contributions/actions/dataScope.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/dataScope.js +79 -0
- package/dist/server/flow-schema-contributions/actions/detailsFieldLinkageRules.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/detailsFieldLinkageRules.js +62 -0
- package/dist/server/flow-schema-contributions/actions/fieldLinkageRules.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/fieldLinkageRules.js +62 -0
- package/dist/server/flow-schema-contributions/actions/filterFormDefaultValues.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/filterFormDefaultValues.js +80 -0
- package/dist/server/flow-schema-contributions/actions/formAssignRules.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/formAssignRules.js +62 -0
- package/dist/server/flow-schema-contributions/actions/index.d.ts +31 -0
- package/dist/server/flow-schema-contributions/actions/index.js +117 -0
- package/dist/server/flow-schema-contributions/actions/layout.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/layout.js +68 -0
- package/dist/server/flow-schema-contributions/actions/linkageRulesRefresh.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/linkageRulesRefresh.js +50 -0
- package/dist/server/flow-schema-contributions/actions/navigateToURL.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/navigateToURL.js +82 -0
- package/dist/server/flow-schema-contributions/actions/openView.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/openView.js +68 -0
- package/dist/server/flow-schema-contributions/actions/refreshTargetBlocks.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/refreshTargetBlocks.js +56 -0
- package/dist/server/flow-schema-contributions/actions/runjs.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/runjs.js +55 -0
- package/dist/server/flow-schema-contributions/actions/setTargetDataScope.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/setTargetDataScope.js +59 -0
- package/dist/server/flow-schema-contributions/actions/showMessage.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/showMessage.js +69 -0
- package/dist/server/flow-schema-contributions/actions/showNotification.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/showNotification.js +76 -0
- package/dist/server/flow-schema-contributions/actions/sortingRule.d.ts +10 -0
- package/dist/server/flow-schema-contributions/actions/sortingRule.js +67 -0
- package/dist/server/flow-schema-contributions/field-models.d.ts +12 -0
- package/dist/server/flow-schema-contributions/field-models.js +693 -0
- package/dist/server/flow-schema-contributions/index.d.ts +13 -0
- package/dist/server/flow-schema-contributions/index.js +64 -0
- package/dist/server/flow-schema-contributions/models/ActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/ActionModel.js +202 -0
- package/dist/server/flow-schema-contributions/models/AddChildActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/AddChildActionModel.js +47 -0
- package/dist/server/flow-schema-contributions/models/AddNewActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/AddNewActionModel.js +93 -0
- package/dist/server/flow-schema-contributions/models/AssignFormGridModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/AssignFormGridModel.js +82 -0
- package/dist/server/flow-schema-contributions/models/AssignFormItemModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/AssignFormItemModel.js +80 -0
- package/dist/server/flow-schema-contributions/models/AssignFormModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/AssignFormModel.js +122 -0
- package/dist/server/flow-schema-contributions/models/BasePageTabModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/BasePageTabModel.js +71 -0
- package/dist/server/flow-schema-contributions/models/BlockGridModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/BlockGridModel.js +81 -0
- package/dist/server/flow-schema-contributions/models/BulkDeleteActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/BulkDeleteActionModel.js +47 -0
- package/dist/server/flow-schema-contributions/models/ChildPageModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/ChildPageModel.js +106 -0
- package/dist/server/flow-schema-contributions/models/ChildPageTabModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/ChildPageTabModel.js +114 -0
- package/dist/server/flow-schema-contributions/models/CreateFormModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/CreateFormModel.js +54 -0
- package/dist/server/flow-schema-contributions/models/DeleteActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/DeleteActionModel.js +47 -0
- package/dist/server/flow-schema-contributions/models/DetailsBlockModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/DetailsBlockModel.js +179 -0
- package/dist/server/flow-schema-contributions/models/DetailsGridModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/DetailsGridModel.js +82 -0
- package/dist/server/flow-schema-contributions/models/DetailsItemModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/DetailsItemModel.js +77 -0
- package/dist/server/flow-schema-contributions/models/EditActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/EditActionModel.js +93 -0
- package/dist/server/flow-schema-contributions/models/EditFormModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/EditFormModel.js +103 -0
- package/dist/server/flow-schema-contributions/models/ExpandCollapseActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/ExpandCollapseActionModel.js +47 -0
- package/dist/server/flow-schema-contributions/models/FilterActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FilterActionModel.js +57 -0
- package/dist/server/flow-schema-contributions/models/FilterFormBlockModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FilterFormBlockModel.js +155 -0
- package/dist/server/flow-schema-contributions/models/FilterFormCollapseActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FilterFormCollapseActionModel.js +85 -0
- package/dist/server/flow-schema-contributions/models/FilterFormCustomFieldModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FilterFormCustomFieldModel.js +89 -0
- package/dist/server/flow-schema-contributions/models/FilterFormGridModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FilterFormGridModel.js +82 -0
- package/dist/server/flow-schema-contributions/models/FilterFormItemModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FilterFormItemModel.js +77 -0
- package/dist/server/flow-schema-contributions/models/FilterFormJSActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FilterFormJSActionModel.js +108 -0
- package/dist/server/flow-schema-contributions/models/FilterFormResetActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FilterFormResetActionModel.js +87 -0
- package/dist/server/flow-schema-contributions/models/FilterFormSubmitActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FilterFormSubmitActionModel.js +87 -0
- package/dist/server/flow-schema-contributions/models/FormAssociationItemModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FormAssociationItemModel.js +78 -0
- package/dist/server/flow-schema-contributions/models/FormBlockModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FormBlockModel.js +45 -0
- package/dist/server/flow-schema-contributions/models/FormGridModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FormGridModel.js +67 -0
- package/dist/server/flow-schema-contributions/models/FormItemModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FormItemModel.js +77 -0
- package/dist/server/flow-schema-contributions/models/FormSubmitActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/FormSubmitActionModel.js +87 -0
- package/dist/server/flow-schema-contributions/models/JSActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/JSActionModel.js +65 -0
- package/dist/server/flow-schema-contributions/models/JSBlockModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/JSBlockModel.js +90 -0
- package/dist/server/flow-schema-contributions/models/JSCollectionActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/JSCollectionActionModel.js +47 -0
- package/dist/server/flow-schema-contributions/models/JSColumnModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/JSColumnModel.js +100 -0
- package/dist/server/flow-schema-contributions/models/JSFormActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/JSFormActionModel.js +47 -0
- package/dist/server/flow-schema-contributions/models/JSItemModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/JSItemModel.js +87 -0
- package/dist/server/flow-schema-contributions/models/JSRecordActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/JSRecordActionModel.js +47 -0
- package/dist/server/flow-schema-contributions/models/LinkActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/LinkActionModel.js +47 -0
- package/dist/server/flow-schema-contributions/models/PageModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/PageModel.js +159 -0
- package/dist/server/flow-schema-contributions/models/PageTabModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/PageTabModel.js +69 -0
- package/dist/server/flow-schema-contributions/models/PopupActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/PopupActionModel.js +92 -0
- package/dist/server/flow-schema-contributions/models/PopupCollectionActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/PopupCollectionActionModel.js +119 -0
- package/dist/server/flow-schema-contributions/models/RefreshActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/RefreshActionModel.js +47 -0
- package/dist/server/flow-schema-contributions/models/RootPageModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/RootPageModel.js +124 -0
- package/dist/server/flow-schema-contributions/models/RootPageTabModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/RootPageTabModel.js +69 -0
- package/dist/server/flow-schema-contributions/models/RouteModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/RouteModel.js +121 -0
- package/dist/server/flow-schema-contributions/models/TableActionsColumnModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/TableActionsColumnModel.js +93 -0
- package/dist/server/flow-schema-contributions/models/TableBlockModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/TableBlockModel.js +254 -0
- package/dist/server/flow-schema-contributions/models/TableColumnModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/TableColumnModel.js +77 -0
- package/dist/server/flow-schema-contributions/models/TableCustomColumnModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/TableCustomColumnModel.js +66 -0
- package/dist/server/flow-schema-contributions/models/UpdateRecordActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/UpdateRecordActionModel.js +173 -0
- package/dist/server/flow-schema-contributions/models/ViewActionModel.d.ts +10 -0
- package/dist/server/flow-schema-contributions/models/ViewActionModel.js +123 -0
- package/dist/server/flow-schema-contributions/models/index.d.ts +66 -0
- package/dist/server/flow-schema-contributions/models/index.js +257 -0
- package/dist/server/flow-schema-contributions/shared.d.ts +501 -0
- package/dist/server/flow-schema-contributions/shared.js +1649 -0
- package/dist/server/flow-schema-service.d.ts +87 -0
- package/dist/server/flow-schema-service.js +963 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +4 -1
- package/dist/server/plugin.d.ts +2 -0
- package/dist/server/plugin.js +6 -2
- package/dist/server/repository.d.ts +67 -9
- package/dist/server/repository.js +417 -106
- package/dist/server/server.d.ts +7 -0
- package/dist/server/server.js +23 -53
- package/dist/swagger/index.d.ts +1164 -0
- package/dist/swagger/index.js +732 -0
- package/package.json +4 -2
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextApis.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextApis.js +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextEnvs.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextEnvs.js +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextVars.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextVars.js +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/lintAndTestJS.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/lintAndTestJS.js +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var action_handlers_exports = {};
|
|
28
|
+
__export(action_handlers_exports, {
|
|
29
|
+
createFlowModelActions: () => createFlowModelActions
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(action_handlers_exports);
|
|
32
|
+
var import_http_error_adapter = require("./http-error-adapter");
|
|
33
|
+
var import_mutate_executor = require("./mutate-executor");
|
|
34
|
+
var import_errors = require("./repository-internals/errors");
|
|
35
|
+
function normalizeSchemaDetail(value) {
|
|
36
|
+
return String(value || "").trim() === "full" ? "full" : "compact";
|
|
37
|
+
}
|
|
38
|
+
async function runFlowModelAction(ctx, operation) {
|
|
39
|
+
try {
|
|
40
|
+
await operation();
|
|
41
|
+
return true;
|
|
42
|
+
} catch (error) {
|
|
43
|
+
if (error instanceof import_errors.FlowModelOperationError) {
|
|
44
|
+
(0, import_http_error_adapter.respondWithFlowModelOperationError)(ctx, error);
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function createFlowModelActions(options) {
|
|
51
|
+
const { flowSchemaService, validationFacade } = options;
|
|
52
|
+
return {
|
|
53
|
+
findOne: async (ctx, next) => {
|
|
54
|
+
const { uid, parentId, subKey, includeAsyncNode = false } = ctx.action.params;
|
|
55
|
+
const repository = ctx.db.getCollection("flowModels").repository;
|
|
56
|
+
if (uid) {
|
|
57
|
+
ctx.body = await repository.findModelById(uid, { includeAsyncNode });
|
|
58
|
+
} else if (parentId) {
|
|
59
|
+
ctx.body = await repository.findModelByParentId(parentId, { subKey, includeAsyncNode });
|
|
60
|
+
}
|
|
61
|
+
await next();
|
|
62
|
+
},
|
|
63
|
+
duplicate: async (ctx, next) => {
|
|
64
|
+
const { uid } = ctx.action.params;
|
|
65
|
+
const repository = ctx.db.getCollection("flowModels").repository;
|
|
66
|
+
ctx.body = await repository.duplicate(uid);
|
|
67
|
+
await next();
|
|
68
|
+
},
|
|
69
|
+
schema: async (ctx, next) => {
|
|
70
|
+
const { use, detail } = ctx.action.params;
|
|
71
|
+
const modelUse = String(use || "").trim();
|
|
72
|
+
if (!modelUse) {
|
|
73
|
+
ctx.throw(400, "flowModels:schema requires non-empty 'use'", {
|
|
74
|
+
code: "INVALID_PARAMS"
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
const document = flowSchemaService.getPublicDocument(modelUse, {
|
|
78
|
+
clone: false,
|
|
79
|
+
detail: normalizeSchemaDetail(detail)
|
|
80
|
+
});
|
|
81
|
+
if (!document) {
|
|
82
|
+
ctx.throw(404, `No flow schema document found for use "${modelUse}"`, {
|
|
83
|
+
code: "FLOW_MODEL_SCHEMA_NOT_FOUND"
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
ctx.body = document;
|
|
87
|
+
await next();
|
|
88
|
+
},
|
|
89
|
+
schemas: async (ctx, next) => {
|
|
90
|
+
var _a;
|
|
91
|
+
const payload = ((_a = ctx.action.params) == null ? void 0 : _a.values) ?? ctx.action.params ?? {};
|
|
92
|
+
const uses = Array.isArray(payload == null ? void 0 : payload.uses) ? payload.uses.map((item) => String(item || "").trim()).filter(Boolean) : [];
|
|
93
|
+
ctx.body = flowSchemaService.getPublicDocuments(uses, {
|
|
94
|
+
clone: false,
|
|
95
|
+
detail: normalizeSchemaDetail(payload == null ? void 0 : payload.detail)
|
|
96
|
+
});
|
|
97
|
+
await next();
|
|
98
|
+
},
|
|
99
|
+
schemaBundle: async (ctx, next) => {
|
|
100
|
+
var _a;
|
|
101
|
+
const payload = ((_a = ctx.action.params) == null ? void 0 : _a.values) ?? ctx.action.params ?? {};
|
|
102
|
+
const uses = Array.isArray(payload == null ? void 0 : payload.uses) ? payload.uses.map((item) => String(item || "").trim()).filter(Boolean) : [];
|
|
103
|
+
ctx.body = flowSchemaService.getBundle(uses);
|
|
104
|
+
await next();
|
|
105
|
+
},
|
|
106
|
+
attach: async (ctx, next) => {
|
|
107
|
+
const { uid, parentId, subKey, subType, position } = ctx.action.params;
|
|
108
|
+
const repository = ctx.db.getCollection("flowModels").repository;
|
|
109
|
+
const ok = await runFlowModelAction(ctx, async () => {
|
|
110
|
+
ctx.body = await repository.attach(
|
|
111
|
+
String(uid || "").trim(),
|
|
112
|
+
{
|
|
113
|
+
parentId: String(parentId || "").trim(),
|
|
114
|
+
subKey: String(subKey || "").trim(),
|
|
115
|
+
subType,
|
|
116
|
+
position
|
|
117
|
+
},
|
|
118
|
+
{ transaction: ctx.transaction }
|
|
119
|
+
);
|
|
120
|
+
});
|
|
121
|
+
if (!ok) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
await next();
|
|
125
|
+
},
|
|
126
|
+
move: async (ctx, next) => {
|
|
127
|
+
const { sourceId, targetId, position } = ctx.action.params;
|
|
128
|
+
const repository = ctx.db.getCollection("flowModels").repository;
|
|
129
|
+
const ok = await runFlowModelAction(ctx, async () => {
|
|
130
|
+
await repository.move(
|
|
131
|
+
{
|
|
132
|
+
sourceId,
|
|
133
|
+
targetId,
|
|
134
|
+
position
|
|
135
|
+
},
|
|
136
|
+
{ transaction: ctx.transaction }
|
|
137
|
+
);
|
|
138
|
+
ctx.body = "ok";
|
|
139
|
+
});
|
|
140
|
+
if (!ok) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
await next();
|
|
144
|
+
},
|
|
145
|
+
save: async (ctx, next) => {
|
|
146
|
+
const { values } = ctx.action.params;
|
|
147
|
+
const { return: returnType = "uid", includeAsyncNode = false } = ctx.action.params;
|
|
148
|
+
const repository = ctx.db.getCollection("flowModels").repository;
|
|
149
|
+
const ok = await runFlowModelAction(ctx, async () => {
|
|
150
|
+
if (returnType && returnType !== "model" && returnType !== "uid") {
|
|
151
|
+
ctx.throw(400, `Invalid query param 'return': ${returnType}`, {
|
|
152
|
+
code: "INVALID_PARAMS"
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
const normalizedValues = await validationFacade.assertValidFlowModelSchemaForSave(values, repository);
|
|
156
|
+
const uid = await repository.upsertModel(normalizedValues, { transaction: ctx.transaction });
|
|
157
|
+
if (returnType === "model") {
|
|
158
|
+
ctx.body = await repository.findModelById(uid, { includeAsyncNode, transaction: ctx.transaction });
|
|
159
|
+
} else {
|
|
160
|
+
ctx.body = uid;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
if (!ok) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
await next();
|
|
167
|
+
},
|
|
168
|
+
ensure: async (ctx, next) => {
|
|
169
|
+
const { includeAsyncNode = false } = ctx.action.params;
|
|
170
|
+
const { values } = ctx.action.params;
|
|
171
|
+
const repository = ctx.db.getCollection("flowModels").repository;
|
|
172
|
+
const ok = await runFlowModelAction(ctx, async () => {
|
|
173
|
+
const normalizedValues = await validationFacade.prepareEnsureValues(values, repository, {
|
|
174
|
+
transaction: ctx.transaction
|
|
175
|
+
});
|
|
176
|
+
ctx.body = await repository.ensureModel(normalizedValues, {
|
|
177
|
+
includeAsyncNode,
|
|
178
|
+
transaction: ctx.transaction
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
if (!ok) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
await next();
|
|
185
|
+
},
|
|
186
|
+
mutate: async (ctx, next) => {
|
|
187
|
+
const { includeAsyncNode = false } = ctx.action.params;
|
|
188
|
+
const repository = ctx.db.getCollection("flowModels").repository;
|
|
189
|
+
await (0, import_mutate_executor.executeFlowModelsMutate)({
|
|
190
|
+
ctx,
|
|
191
|
+
repository,
|
|
192
|
+
validationFacade,
|
|
193
|
+
includeAsyncNode
|
|
194
|
+
});
|
|
195
|
+
await next();
|
|
196
|
+
},
|
|
197
|
+
destroy: async (ctx, next) => {
|
|
198
|
+
const { filterByTk } = ctx.action.params;
|
|
199
|
+
const repository = ctx.db.getCollection("flowModels").repository;
|
|
200
|
+
await repository.remove(filterByTk, { transaction: ctx.transaction });
|
|
201
|
+
ctx.body = "ok";
|
|
202
|
+
await next();
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
207
|
+
0 && (module.exports = {
|
|
208
|
+
createFlowModelActions
|
|
209
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { FlowModelOperationError } from './repository-internals/errors';
|
|
10
|
+
export declare function respondWithFlowModelOperationError(ctx: any, error: FlowModelOperationError): void;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var http_error_adapter_exports = {};
|
|
28
|
+
__export(http_error_adapter_exports, {
|
|
29
|
+
respondWithFlowModelOperationError: () => respondWithFlowModelOperationError
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(http_error_adapter_exports);
|
|
32
|
+
function respondWithFlowModelOperationError(ctx, error) {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
const responseError = {
|
|
35
|
+
message: error.message,
|
|
36
|
+
code: error.code
|
|
37
|
+
};
|
|
38
|
+
if (typeof error.details !== "undefined") {
|
|
39
|
+
responseError.details = error.details;
|
|
40
|
+
}
|
|
41
|
+
const opId = typeof ((_a = error.details) == null ? void 0 : _a.opId) === "string" ? error.details.opId : typeof (error == null ? void 0 : error.opId) === "string" ? error.opId : void 0;
|
|
42
|
+
if (opId) {
|
|
43
|
+
responseError.opId = opId;
|
|
44
|
+
}
|
|
45
|
+
const opIndex = typeof ((_b = error.details) == null ? void 0 : _b.opIndex) === "number" ? error.details.opIndex : typeof (error == null ? void 0 : error.opIndex) === "number" ? error.opIndex : void 0;
|
|
46
|
+
if (typeof opIndex === "number") {
|
|
47
|
+
responseError.opIndex = opIndex;
|
|
48
|
+
}
|
|
49
|
+
ctx.status = error.status;
|
|
50
|
+
ctx.withoutDataWrapping = true;
|
|
51
|
+
ctx.body = {
|
|
52
|
+
errors: [responseError]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
respondWithFlowModelOperationError
|
|
58
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import FlowModelRepository from '../repository';
|
|
10
|
+
import { FlowModelValidationFacade } from './validation-facade';
|
|
11
|
+
export declare function createFlowModelsMutateTransactionMiddleware(): (ctx: any, next: () => Promise<void>) => Promise<void>;
|
|
12
|
+
export declare function executeFlowModelsMutate(options: {
|
|
13
|
+
ctx: any;
|
|
14
|
+
repository: FlowModelRepository;
|
|
15
|
+
validationFacade: FlowModelValidationFacade;
|
|
16
|
+
includeAsyncNode?: boolean;
|
|
17
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var mutate_executor_exports = {};
|
|
38
|
+
__export(mutate_executor_exports, {
|
|
39
|
+
createFlowModelsMutateTransactionMiddleware: () => createFlowModelsMutateTransactionMiddleware,
|
|
40
|
+
executeFlowModelsMutate: () => executeFlowModelsMutate
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(mutate_executor_exports);
|
|
43
|
+
var import_lodash = __toESM(require("lodash"));
|
|
44
|
+
var import_http_error_adapter = require("./http-error-adapter");
|
|
45
|
+
var import_ensure_lock = require("./repository-internals/ensure-lock");
|
|
46
|
+
var import_errors = require("./repository-internals/errors");
|
|
47
|
+
function createFlowModelsMutateTransactionMiddleware() {
|
|
48
|
+
return async (ctx, next) => {
|
|
49
|
+
var _a, _b, _c;
|
|
50
|
+
const isFlowModelsMutate = ((_a = ctx == null ? void 0 : ctx.action) == null ? void 0 : _a.resourceName) === "flowModels" && ((_b = ctx == null ? void 0 : ctx.action) == null ? void 0 : _b.actionName) === "mutate";
|
|
51
|
+
if (!isFlowModelsMutate) {
|
|
52
|
+
return next();
|
|
53
|
+
}
|
|
54
|
+
const previousTransaction = ctx.transaction;
|
|
55
|
+
const previousMutateMeta = (_c = ctx.state) == null ? void 0 : _c.flowModelsMutateMeta;
|
|
56
|
+
const ownsTransaction = !previousTransaction;
|
|
57
|
+
const transaction = previousTransaction || await ctx.db.sequelize.transaction();
|
|
58
|
+
ctx.transaction = transaction;
|
|
59
|
+
try {
|
|
60
|
+
await next();
|
|
61
|
+
if (ownsTransaction) {
|
|
62
|
+
await transaction.commit();
|
|
63
|
+
}
|
|
64
|
+
} catch (error) {
|
|
65
|
+
if (ownsTransaction) {
|
|
66
|
+
await transaction.rollback();
|
|
67
|
+
await (0, import_ensure_lock.emitFlowModelTransactionRollback)(ctx.db, transaction);
|
|
68
|
+
}
|
|
69
|
+
if (error instanceof import_errors.FlowModelOperationError && ownsTransaction) {
|
|
70
|
+
(0, import_http_error_adapter.respondWithFlowModelOperationError)(ctx, error);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
throw error;
|
|
74
|
+
} finally {
|
|
75
|
+
if (ctx.state) {
|
|
76
|
+
if (previousMutateMeta === void 0) {
|
|
77
|
+
delete ctx.state.flowModelsMutateMeta;
|
|
78
|
+
} else {
|
|
79
|
+
ctx.state.flowModelsMutateMeta = previousMutateMeta;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (previousTransaction === void 0) {
|
|
83
|
+
delete ctx.transaction;
|
|
84
|
+
} else {
|
|
85
|
+
ctx.transaction = previousTransaction;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
async function executeFlowModelsMutate(options) {
|
|
91
|
+
var _a;
|
|
92
|
+
const { ctx, repository, validationFacade } = options;
|
|
93
|
+
const includeAsyncNode = !!options.includeAsyncNode;
|
|
94
|
+
const { values } = ctx.action.params;
|
|
95
|
+
const atomic = values == null ? void 0 : values.atomic;
|
|
96
|
+
const ops = values == null ? void 0 : values.ops;
|
|
97
|
+
const returnModels = values == null ? void 0 : values.returnModels;
|
|
98
|
+
if (atomic !== true) {
|
|
99
|
+
ctx.throw(400, "flowModels:mutate requires 'atomic=true'", {
|
|
100
|
+
code: "INVALID_PARAMS"
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
if (!Array.isArray(ops) || ops.length === 0) {
|
|
104
|
+
ctx.throw(400, "flowModels:mutate requires non-empty 'ops' array", {
|
|
105
|
+
code: "INVALID_PARAMS"
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
const seenOpIds = /* @__PURE__ */ new Set();
|
|
109
|
+
for (let i = 0; i < ops.length; i++) {
|
|
110
|
+
const opId = String(((_a = ops[i]) == null ? void 0 : _a.opId) || "").trim();
|
|
111
|
+
if (!opId) {
|
|
112
|
+
ctx.throw(400, `flowModels:mutate ops[${i}].opId is required`, {
|
|
113
|
+
code: "INVALID_PARAMS"
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
if (seenOpIds.has(opId)) {
|
|
117
|
+
ctx.throw(400, `flowModels:mutate duplicate opId '${opId}'`, {
|
|
118
|
+
code: "INVALID_PARAMS"
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
seenOpIds.add(opId);
|
|
122
|
+
}
|
|
123
|
+
const outputsByOpId = /* @__PURE__ */ new Map();
|
|
124
|
+
const transaction = ctx.transaction;
|
|
125
|
+
const destroyedNodesByOpId = {};
|
|
126
|
+
ctx.state ||= {};
|
|
127
|
+
ctx.state.flowModelsMutateMeta = {
|
|
128
|
+
...ctx.state.flowModelsMutateMeta && typeof ctx.state.flowModelsMutateMeta === "object" ? ctx.state.flowModelsMutateMeta : {},
|
|
129
|
+
destroyedNodesByOpId
|
|
130
|
+
};
|
|
131
|
+
if (!transaction) {
|
|
132
|
+
ctx.throw(500, "Missing flowModels:mutate transaction", {
|
|
133
|
+
code: "INTERNAL_ERROR"
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
const resolveRefs = (input, meta) => {
|
|
137
|
+
if (typeof input === "string" && input.startsWith("$ref:")) {
|
|
138
|
+
const ref = input.slice("$ref:".length);
|
|
139
|
+
const dotIndex = ref.indexOf(".");
|
|
140
|
+
const refOpId = dotIndex > 0 ? ref.slice(0, dotIndex).trim() : "";
|
|
141
|
+
const refPath = dotIndex > 0 ? ref.slice(dotIndex + 1).trim() : "";
|
|
142
|
+
if (!refOpId || !refPath) {
|
|
143
|
+
throw new import_errors.FlowModelOperationError({
|
|
144
|
+
status: 400,
|
|
145
|
+
code: "INVALID_PARAMS",
|
|
146
|
+
message: `flowModels:mutate invalid ref string '${input}'`,
|
|
147
|
+
details: { ...meta, ref: input }
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
const output = outputsByOpId.get(refOpId);
|
|
151
|
+
if (!output) {
|
|
152
|
+
throw new import_errors.FlowModelOperationError({
|
|
153
|
+
status: 400,
|
|
154
|
+
code: "INVALID_PARAMS",
|
|
155
|
+
message: `flowModels:mutate ref opId '${refOpId}' not found`,
|
|
156
|
+
details: { ...meta, ref: input, refOpId, refPath }
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
const resolved = import_lodash.default.get(output, refPath);
|
|
160
|
+
if (resolved === void 0) {
|
|
161
|
+
throw new import_errors.FlowModelOperationError({
|
|
162
|
+
status: 400,
|
|
163
|
+
code: "INVALID_PARAMS",
|
|
164
|
+
message: `flowModels:mutate ref path '${refPath}' not found on opId '${refOpId}' output`,
|
|
165
|
+
details: { ...meta, ref: input, refOpId, refPath }
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return resolved;
|
|
169
|
+
}
|
|
170
|
+
if (Array.isArray(input)) {
|
|
171
|
+
return input.map((item) => resolveRefs(item, meta));
|
|
172
|
+
}
|
|
173
|
+
if (input && typeof input === "object") {
|
|
174
|
+
const entries = Object.entries(input).map(([k, v]) => [k, resolveRefs(v, meta)]);
|
|
175
|
+
return Object.fromEntries(entries);
|
|
176
|
+
}
|
|
177
|
+
return input;
|
|
178
|
+
};
|
|
179
|
+
const opHandlers = {
|
|
180
|
+
ensure: async (params) => {
|
|
181
|
+
const normalizedParams = await validationFacade.prepareEnsureValues(params, repository, {
|
|
182
|
+
transaction
|
|
183
|
+
});
|
|
184
|
+
return await repository.ensureModel(normalizedParams, { transaction, includeAsyncNode });
|
|
185
|
+
},
|
|
186
|
+
upsert: async (params) => {
|
|
187
|
+
const modelValues = params == null ? void 0 : params.values;
|
|
188
|
+
const modelUid = String((modelValues == null ? void 0 : modelValues.uid) || "").trim();
|
|
189
|
+
if (!modelUid) {
|
|
190
|
+
throw new import_errors.FlowModelOperationError({
|
|
191
|
+
status: 400,
|
|
192
|
+
code: "INVALID_PARAMS",
|
|
193
|
+
message: "flowModels:mutate upsert requires 'params.values.uid' for retry-safety"
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
const normalizedModelValues = validationFacade.assertValidFlowModelSchema(modelValues);
|
|
197
|
+
await repository.upsertModel(normalizedModelValues, { transaction });
|
|
198
|
+
return await repository.findModelById(modelUid, { transaction, includeAsyncNode });
|
|
199
|
+
},
|
|
200
|
+
destroy: async (params, meta) => {
|
|
201
|
+
const uid = String((params == null ? void 0 : params.uid) || "").trim();
|
|
202
|
+
if (!uid) {
|
|
203
|
+
throw new import_errors.FlowModelOperationError({
|
|
204
|
+
status: 400,
|
|
205
|
+
code: "INVALID_PARAMS",
|
|
206
|
+
message: "flowModels:mutate destroy requires 'params.uid'"
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
const nodesToDestroy = await repository.findNodesById(uid, {
|
|
210
|
+
includeAsyncNode: true,
|
|
211
|
+
transaction
|
|
212
|
+
});
|
|
213
|
+
destroyedNodesByOpId[meta.opId] = import_lodash.default.uniqBy(nodesToDestroy, "uid").map((node) => ({ uid: node.uid }));
|
|
214
|
+
await repository.remove(uid, { transaction });
|
|
215
|
+
return { ok: true, uid };
|
|
216
|
+
},
|
|
217
|
+
attach: async (params) => {
|
|
218
|
+
return await repository.attach(
|
|
219
|
+
String((params == null ? void 0 : params.uid) || ""),
|
|
220
|
+
{
|
|
221
|
+
parentId: String((params == null ? void 0 : params.parentId) || ""),
|
|
222
|
+
subKey: String((params == null ? void 0 : params.subKey) || ""),
|
|
223
|
+
subType: params == null ? void 0 : params.subType,
|
|
224
|
+
position: params == null ? void 0 : params.position
|
|
225
|
+
},
|
|
226
|
+
{ transaction }
|
|
227
|
+
);
|
|
228
|
+
},
|
|
229
|
+
move: async (params) => {
|
|
230
|
+
await repository.move(
|
|
231
|
+
{
|
|
232
|
+
sourceId: String((params == null ? void 0 : params.sourceId) || ""),
|
|
233
|
+
targetId: String((params == null ? void 0 : params.targetId) || ""),
|
|
234
|
+
position: params == null ? void 0 : params.position
|
|
235
|
+
},
|
|
236
|
+
{ transaction }
|
|
237
|
+
);
|
|
238
|
+
return { ok: true };
|
|
239
|
+
},
|
|
240
|
+
duplicate: async (params) => {
|
|
241
|
+
return await repository.duplicateWithTargetUid(String((params == null ? void 0 : params.uid) || ""), String((params == null ? void 0 : params.targetUid) || ""), {
|
|
242
|
+
transaction,
|
|
243
|
+
includeAsyncNode
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
const results = [];
|
|
248
|
+
for (let i = 0; i < ops.length; i++) {
|
|
249
|
+
const op = ops[i] || {};
|
|
250
|
+
const opId = String(op.opId || "").trim();
|
|
251
|
+
const type = String(op.type || "").trim();
|
|
252
|
+
const meta = { opId, opIndex: i };
|
|
253
|
+
if (!type) {
|
|
254
|
+
throw new import_errors.FlowModelOperationError({
|
|
255
|
+
status: 400,
|
|
256
|
+
code: "INVALID_PARAMS",
|
|
257
|
+
message: `flowModels:mutate ops[${i}].type is required`,
|
|
258
|
+
details: meta
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
const params = resolveRefs(op.params || {}, meta);
|
|
262
|
+
try {
|
|
263
|
+
const handler = opHandlers[type];
|
|
264
|
+
if (!handler) {
|
|
265
|
+
throw new import_errors.FlowModelOperationError({
|
|
266
|
+
status: 400,
|
|
267
|
+
code: "INVALID_PARAMS",
|
|
268
|
+
message: `flowModels:mutate unsupported op type '${type}'`
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
const output = await handler(params, meta);
|
|
272
|
+
outputsByOpId.set(opId, output);
|
|
273
|
+
results.push({ opId, ok: true, output });
|
|
274
|
+
} catch (error) {
|
|
275
|
+
if (error instanceof import_errors.FlowModelOperationError) {
|
|
276
|
+
throw new import_errors.FlowModelOperationError({
|
|
277
|
+
status: error.status,
|
|
278
|
+
code: error.code,
|
|
279
|
+
message: error.message,
|
|
280
|
+
details: { ...error.details || {}, ...meta }
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
throw new import_errors.FlowModelOperationError({
|
|
284
|
+
status: 500,
|
|
285
|
+
code: "INTERNAL_ERROR",
|
|
286
|
+
message: (error == null ? void 0 : error.message) || "Internal error",
|
|
287
|
+
details: meta
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
let models;
|
|
292
|
+
if (Array.isArray(returnModels) && returnModels.length) {
|
|
293
|
+
models = {};
|
|
294
|
+
for (const uid of returnModels) {
|
|
295
|
+
const modelUid = String(uid || "").trim();
|
|
296
|
+
if (!modelUid) continue;
|
|
297
|
+
models[modelUid] = await repository.findModelById(modelUid, { transaction, includeAsyncNode });
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
ctx.body = {
|
|
301
|
+
results,
|
|
302
|
+
...models ? { models } : {}
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
306
|
+
0 && (module.exports = {
|
|
307
|
+
createFlowModelsMutateTransactionMiddleware,
|
|
308
|
+
executeFlowModelsMutate
|
|
309
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import lodash from 'lodash';
|
|
10
|
+
export declare function dedupeNodesForDuplicate(nodes: any[], rootUid: string): any[];
|
|
11
|
+
export declare function replaceStepParamsModelUids(options: any, uidMap: Record<string, string>): any;
|
|
12
|
+
export declare function stripDuplicateReplayMarker(options: any): lodash.Omit<any, "__mutateDuplicate">;
|