@skmtc/core 0.18.1 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/esm/anchors/buildSidecar.js +1 -1
- package/esm/anchors/postPass.d.ts +1 -1
- package/esm/anchors/postPass.js +1 -1
- package/esm/anchors/sidecar.d.ts +2 -2
- package/esm/anchors/sidecar.js +1 -1
- package/esm/context/CoreContext.d.ts +7 -1
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/CoreContext.js +17 -11
- package/esm/context/GenerateContext.d.ts +25 -4
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +135 -70
- package/esm/context/ParseIssue.d.ts +1 -1
- package/esm/context/RenderContext.d.ts +2 -6
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/RenderContext.js +4 -14
- package/esm/context/generateTypes.d.ts +35 -8
- package/esm/context/generateTypes.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/fs/1.0.23 → esm/deps/jsr.io/@std/fs/1.0.24}/exists.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.14/_os.js +14 -0
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/posix/join.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/posix/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/from_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/join.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.js +1 -1
- package/esm/dsl/CodeFileBase.d.ts +57 -24
- package/esm/dsl/CodeFileBase.d.ts.map +1 -1
- package/esm/dsl/CodeFileBase.js +35 -53
- package/esm/dsl/FileBase.d.ts +21 -25
- package/esm/dsl/FileBase.d.ts.map +1 -1
- package/esm/dsl/FileBase.js +20 -29
- package/esm/dsl/GeneratorKeys.d.ts +19 -19
- package/esm/dsl/GeneratorKeys.d.ts.map +1 -1
- package/esm/dsl/GeneratorKeys.js +6 -5
- package/esm/dsl/IdentifierBase.d.ts +19 -5
- package/esm/dsl/IdentifierBase.d.ts.map +1 -1
- package/esm/dsl/IdentifierBase.js +21 -5
- package/esm/dsl/IdentifierType.d.ts +8 -14
- package/esm/dsl/IdentifierType.d.ts.map +1 -1
- package/esm/dsl/Lang.d.ts +18 -38
- package/esm/dsl/Lang.d.ts.map +1 -1
- package/esm/dsl/MarkdownFile.d.ts +55 -0
- package/esm/dsl/MarkdownFile.d.ts.map +1 -0
- package/esm/dsl/MarkdownFile.js +58 -0
- package/esm/dsl/model/ModelDriver.d.ts +3 -1
- package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.js +6 -8
- package/esm/dsl/model/toModelEntry.d.ts +21 -17
- package/esm/dsl/model/toModelEntry.d.ts.map +1 -1
- package/esm/dsl/model/toModelEntry.js +3 -27
- package/esm/dsl/model/toModelProjectionBase.d.ts +15 -15
- package/esm/dsl/model/toModelProjectionBase.d.ts.map +1 -1
- package/esm/dsl/model/types.d.ts +2 -52
- package/esm/dsl/model/types.d.ts.map +1 -1
- package/esm/dsl/operation/gql/GqlOperationDriver.d.ts +3 -1
- package/esm/dsl/operation/gql/GqlOperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/gql/GqlOperationDriver.js +12 -9
- package/esm/dsl/operation/gql/toGqlOperationEntry.d.ts +20 -15
- package/esm/dsl/operation/gql/toGqlOperationEntry.d.ts.map +1 -1
- package/esm/dsl/operation/gql/toGqlOperationEntry.js +3 -25
- package/esm/dsl/operation/gql/toGqlOperationProjectionBase.d.ts +11 -10
- package/esm/dsl/operation/gql/toGqlOperationProjectionBase.d.ts.map +1 -1
- package/esm/dsl/operation/gql/types.d.ts +1 -33
- package/esm/dsl/operation/gql/types.d.ts.map +1 -1
- package/esm/dsl/operation/oas/OasOperationDriver.d.ts +3 -1
- package/esm/dsl/operation/oas/OasOperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/oas/OasOperationDriver.js +12 -9
- package/esm/dsl/operation/oas/toOasOperationEntry.d.ts +21 -17
- package/esm/dsl/operation/oas/toOasOperationEntry.d.ts.map +1 -1
- package/esm/dsl/operation/oas/toOasOperationEntry.js +3 -32
- package/esm/dsl/operation/oas/toOasOperationProjectionBase.d.ts +11 -10
- package/esm/dsl/operation/oas/toOasOperationProjectionBase.d.ts.map +1 -1
- package/esm/dsl/operation/oas/types.d.ts +1 -43
- package/esm/dsl/operation/oas/types.d.ts.map +1 -1
- package/esm/dsl/webhook/WebhookDriver.d.ts +3 -1
- package/esm/dsl/webhook/WebhookDriver.d.ts.map +1 -1
- package/esm/dsl/webhook/WebhookDriver.js +12 -9
- package/esm/dsl/webhook/toWebhookEntry.d.ts +21 -16
- package/esm/dsl/webhook/toWebhookEntry.d.ts.map +1 -1
- package/esm/dsl/webhook/toWebhookEntry.js +3 -32
- package/esm/dsl/webhook/toWebhookProjectionBase.d.ts +11 -10
- package/esm/dsl/webhook/toWebhookProjectionBase.d.ts.map +1 -1
- package/esm/dsl/webhook/types.d.ts +1 -36
- package/esm/dsl/webhook/types.d.ts.map +1 -1
- package/esm/enrichments/toEnrichmentDescriptor.d.ts +72 -27
- package/esm/enrichments/toEnrichmentDescriptor.d.ts.map +1 -1
- package/esm/enrichments/toEnrichmentDescriptor.js +57 -31
- package/esm/enrichments/validateConfig.d.ts +1 -1
- package/esm/enrichments/validateConfig.js +2 -2
- package/esm/helpers/isImported.js +1 -1
- package/esm/helpers/toResolvedArtifactPath.js +1 -1
- package/esm/mod.d.ts +7 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +7 -1
- package/esm/oas/array/Array.d.ts +2 -0
- package/esm/oas/array/Array.d.ts.map +1 -1
- package/esm/oas/array/Array.js +4 -0
- package/esm/oas/boolean/Boolean.d.ts +3 -1
- package/esm/oas/boolean/Boolean.d.ts.map +1 -1
- package/esm/oas/boolean/Boolean.js +4 -0
- package/esm/oas/components/Components.d.ts +5 -0
- package/esm/oas/components/Components.d.ts.map +1 -1
- package/esm/oas/components/Components.js +6 -1
- package/esm/oas/integer/Integer.d.ts +3 -1
- package/esm/oas/integer/Integer.d.ts.map +1 -1
- package/esm/oas/integer/Integer.js +4 -0
- package/esm/oas/link/Link.d.ts +68 -0
- package/esm/oas/link/Link.d.ts.map +1 -0
- package/esm/oas/link/Link.js +107 -0
- package/esm/oas/number/Number.d.ts +3 -1
- package/esm/oas/number/Number.d.ts.map +1 -1
- package/esm/oas/number/Number.js +4 -0
- package/esm/oas/object/Object.d.ts +9 -0
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +14 -0
- package/esm/oas/operation/Operation.d.ts +15 -0
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +33 -0
- package/esm/oas/ref/Ref.d.ts +23 -1
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +32 -0
- package/esm/oas/ref/ref-types.d.ts +18 -1
- package/esm/oas/ref/ref-types.d.ts.map +1 -1
- package/esm/oas/ref/ref-types.js +12 -1
- package/esm/oas/response/Response.d.ts +4 -0
- package/esm/oas/response/Response.d.ts.map +1 -1
- package/esm/oas/response/Response.js +7 -0
- package/esm/oas/schemaPath/traverseSchema.d.ts +31 -0
- package/esm/oas/schemaPath/traverseSchema.d.ts.map +1 -0
- package/esm/oas/schemaPath/traverseSchema.js +113 -0
- package/esm/oas/string/String.d.ts +3 -1
- package/esm/oas/string/String.d.ts.map +1 -1
- package/esm/oas/string/String.js +4 -0
- package/esm/oas/union/Union.d.ts +9 -0
- package/esm/oas/union/Union.d.ts.map +1 -1
- package/esm/oas/union/Union.js +14 -0
- package/esm/oas/unknown/Unknown.d.ts +3 -1
- package/esm/oas/unknown/Unknown.d.ts.map +1 -1
- package/esm/oas/unknown/Unknown.js +4 -0
- package/esm/parse/v3-0/components/toComponentsV3.d.ts.map +1 -1
- package/esm/parse/v3-0/components/toComponentsV3.js +3 -1
- package/esm/parse/v3-0/link/toLinksV3.d.ts +17 -0
- package/esm/parse/v3-0/link/toLinksV3.d.ts.map +1 -0
- package/esm/parse/v3-0/link/toLinksV3.js +40 -0
- package/esm/parse/v3-0/object/toObject.d.ts.map +1 -1
- package/esm/parse/v3-0/object/toObject.js +3 -1
- package/esm/parse/v3-0/response/toResponseV3.d.ts.map +1 -1
- package/esm/parse/v3-0/response/toResponseV3.js +4 -1
- package/esm/parse/v3-0/union/toUnion.d.ts.map +1 -1
- package/esm/parse/v3-0/union/toUnion.js +3 -1
- package/esm/parse/v3-1/components/toComponentsV3.d.ts.map +1 -1
- package/esm/parse/v3-1/components/toComponentsV3.js +3 -1
- package/esm/parse/v3-1/link/toLinksV3.d.ts +17 -0
- package/esm/parse/v3-1/link/toLinksV3.d.ts.map +1 -0
- package/esm/parse/v3-1/link/toLinksV3.js +40 -0
- package/esm/parse/v3-1/object/toObject.d.ts.map +1 -1
- package/esm/parse/v3-1/object/toObject.js +3 -1
- package/esm/parse/v3-1/response/toResponseV3.d.ts.map +1 -1
- package/esm/parse/v3-1/response/toResponseV3.js +4 -1
- package/esm/parse/v3-1/union/toUnion.d.ts.map +1 -1
- package/esm/parse/v3-1/union/toUnion.js +3 -1
- package/esm/run/toArtifacts.d.ts +8 -1
- package/esm/run/toArtifacts.d.ts.map +1 -1
- package/esm/run/toArtifacts.js +5 -5
- package/esm/run/toInspection.d.ts +8 -0
- package/esm/run/toInspection.d.ts.map +1 -0
- package/esm/run/toInspection.js +78 -0
- package/esm/types/Enrichments.d.ts +19 -8
- package/esm/types/Enrichments.d.ts.map +1 -1
- package/esm/types/Enrichments.js +4 -3
- package/esm/types/GeneratorType.d.ts +5 -5
- package/esm/types/GeneratorType.d.ts.map +1 -1
- package/esm/types/Manifest.d.ts +1 -2
- package/esm/types/Manifest.d.ts.map +1 -1
- package/esm/types/Manifest.js +1 -2
- package/esm/types/ModuleSelect.d.ts +81 -0
- package/esm/types/ModuleSelect.d.ts.map +1 -0
- package/esm/types/ModuleSelect.js +63 -0
- package/esm/types/Preview.d.ts +4 -27
- package/esm/types/Preview.d.ts.map +1 -1
- package/esm/types/Preview.js +4 -25
- package/esm/types/SchemaPath.d.ts +17 -0
- package/esm/types/SchemaPath.d.ts.map +1 -0
- package/esm/types/SchemaPath.js +9 -0
- package/esm/types/Settings.d.ts +8 -0
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +1 -0
- package/esm/types/SkmtcDocument.d.ts +1 -1
- package/esm/types/SupportedSubjects.d.ts +1 -1
- package/package.json +1 -1
- package/script/anchors/buildSidecar.js +1 -1
- package/script/anchors/postPass.d.ts +1 -1
- package/script/anchors/postPass.js +1 -1
- package/script/anchors/sidecar.d.ts +2 -2
- package/script/anchors/sidecar.js +1 -1
- package/script/context/CoreContext.d.ts +7 -1
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +17 -11
- package/script/context/GenerateContext.d.ts +25 -4
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +135 -70
- package/script/context/ParseIssue.d.ts +1 -1
- package/script/context/RenderContext.d.ts +2 -6
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/RenderContext.js +4 -14
- package/script/context/generateTypes.d.ts +35 -8
- package/script/context/generateTypes.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/fs/1.0.23 → script/deps/jsr.io/@std/fs/1.0.24}/exists.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.js +7 -5
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.js +2 -2
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.js +2 -2
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/posix/join.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/posix/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/from_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/join.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.js +1 -1
- package/script/dsl/CodeFileBase.d.ts +57 -24
- package/script/dsl/CodeFileBase.d.ts.map +1 -1
- package/script/dsl/CodeFileBase.js +37 -54
- package/script/dsl/FileBase.d.ts +21 -25
- package/script/dsl/FileBase.d.ts.map +1 -1
- package/script/dsl/FileBase.js +20 -29
- package/script/dsl/GeneratorKeys.d.ts +19 -19
- package/script/dsl/GeneratorKeys.d.ts.map +1 -1
- package/script/dsl/GeneratorKeys.js +6 -5
- package/script/dsl/IdentifierBase.d.ts +19 -5
- package/script/dsl/IdentifierBase.d.ts.map +1 -1
- package/script/dsl/IdentifierBase.js +21 -5
- package/script/dsl/IdentifierType.d.ts +8 -14
- package/script/dsl/IdentifierType.d.ts.map +1 -1
- package/script/dsl/Lang.d.ts +18 -38
- package/script/dsl/Lang.d.ts.map +1 -1
- package/script/dsl/MarkdownFile.d.ts +55 -0
- package/script/dsl/MarkdownFile.d.ts.map +1 -0
- package/script/dsl/MarkdownFile.js +62 -0
- package/script/dsl/model/ModelDriver.d.ts +3 -1
- package/script/dsl/model/ModelDriver.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.js +6 -8
- package/script/dsl/model/toModelEntry.d.ts +21 -17
- package/script/dsl/model/toModelEntry.d.ts.map +1 -1
- package/script/dsl/model/toModelEntry.js +3 -63
- package/script/dsl/model/toModelProjectionBase.d.ts +15 -15
- package/script/dsl/model/toModelProjectionBase.d.ts.map +1 -1
- package/script/dsl/model/types.d.ts +2 -52
- package/script/dsl/model/types.d.ts.map +1 -1
- package/script/dsl/operation/gql/GqlOperationDriver.d.ts +3 -1
- package/script/dsl/operation/gql/GqlOperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/gql/GqlOperationDriver.js +12 -9
- package/script/dsl/operation/gql/toGqlOperationEntry.d.ts +20 -15
- package/script/dsl/operation/gql/toGqlOperationEntry.d.ts.map +1 -1
- package/script/dsl/operation/gql/toGqlOperationEntry.js +3 -61
- package/script/dsl/operation/gql/toGqlOperationProjectionBase.d.ts +11 -10
- package/script/dsl/operation/gql/toGqlOperationProjectionBase.d.ts.map +1 -1
- package/script/dsl/operation/gql/types.d.ts +1 -33
- package/script/dsl/operation/gql/types.d.ts.map +1 -1
- package/script/dsl/operation/oas/OasOperationDriver.d.ts +3 -1
- package/script/dsl/operation/oas/OasOperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/oas/OasOperationDriver.js +12 -9
- package/script/dsl/operation/oas/toOasOperationEntry.d.ts +21 -17
- package/script/dsl/operation/oas/toOasOperationEntry.d.ts.map +1 -1
- package/script/dsl/operation/oas/toOasOperationEntry.js +3 -68
- package/script/dsl/operation/oas/toOasOperationProjectionBase.d.ts +11 -10
- package/script/dsl/operation/oas/toOasOperationProjectionBase.d.ts.map +1 -1
- package/script/dsl/operation/oas/types.d.ts +1 -43
- package/script/dsl/operation/oas/types.d.ts.map +1 -1
- package/script/dsl/webhook/WebhookDriver.d.ts +3 -1
- package/script/dsl/webhook/WebhookDriver.d.ts.map +1 -1
- package/script/dsl/webhook/WebhookDriver.js +12 -9
- package/script/dsl/webhook/toWebhookEntry.d.ts +21 -16
- package/script/dsl/webhook/toWebhookEntry.d.ts.map +1 -1
- package/script/dsl/webhook/toWebhookEntry.js +3 -68
- package/script/dsl/webhook/toWebhookProjectionBase.d.ts +11 -10
- package/script/dsl/webhook/toWebhookProjectionBase.d.ts.map +1 -1
- package/script/dsl/webhook/types.d.ts +1 -36
- package/script/dsl/webhook/types.d.ts.map +1 -1
- package/script/enrichments/toEnrichmentDescriptor.d.ts +72 -27
- package/script/enrichments/toEnrichmentDescriptor.d.ts.map +1 -1
- package/script/enrichments/toEnrichmentDescriptor.js +57 -31
- package/script/enrichments/validateConfig.d.ts +1 -1
- package/script/enrichments/validateConfig.js +2 -2
- package/script/helpers/isImported.js +1 -1
- package/script/helpers/toResolvedArtifactPath.js +1 -1
- package/script/mod.d.ts +7 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +7 -1
- package/script/oas/array/Array.d.ts +2 -0
- package/script/oas/array/Array.d.ts.map +1 -1
- package/script/oas/array/Array.js +4 -0
- package/script/oas/boolean/Boolean.d.ts +3 -1
- package/script/oas/boolean/Boolean.d.ts.map +1 -1
- package/script/oas/boolean/Boolean.js +4 -0
- package/script/oas/components/Components.d.ts +5 -0
- package/script/oas/components/Components.d.ts.map +1 -1
- package/script/oas/components/Components.js +6 -1
- package/script/oas/integer/Integer.d.ts +3 -1
- package/script/oas/integer/Integer.d.ts.map +1 -1
- package/script/oas/integer/Integer.js +4 -0
- package/script/oas/link/Link.d.ts +68 -0
- package/script/oas/link/Link.d.ts.map +1 -0
- package/script/oas/link/Link.js +111 -0
- package/script/oas/number/Number.d.ts +3 -1
- package/script/oas/number/Number.d.ts.map +1 -1
- package/script/oas/number/Number.js +4 -0
- package/script/oas/object/Object.d.ts +9 -0
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +14 -0
- package/script/oas/operation/Operation.d.ts +15 -0
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +33 -0
- package/script/oas/ref/Ref.d.ts +23 -1
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +32 -0
- package/script/oas/ref/ref-types.d.ts +18 -1
- package/script/oas/ref/ref-types.d.ts.map +1 -1
- package/script/oas/ref/ref-types.js +13 -2
- package/script/oas/response/Response.d.ts +4 -0
- package/script/oas/response/Response.d.ts.map +1 -1
- package/script/oas/response/Response.js +7 -0
- package/script/oas/schemaPath/traverseSchema.d.ts +31 -0
- package/script/oas/schemaPath/traverseSchema.d.ts.map +1 -0
- package/script/oas/schemaPath/traverseSchema.js +117 -0
- package/script/oas/string/String.d.ts +3 -1
- package/script/oas/string/String.d.ts.map +1 -1
- package/script/oas/string/String.js +4 -0
- package/script/oas/union/Union.d.ts +9 -0
- package/script/oas/union/Union.d.ts.map +1 -1
- package/script/oas/union/Union.js +14 -0
- package/script/oas/unknown/Unknown.d.ts +3 -1
- package/script/oas/unknown/Unknown.d.ts.map +1 -1
- package/script/oas/unknown/Unknown.js +4 -0
- package/script/parse/v3-0/components/toComponentsV3.d.ts.map +1 -1
- package/script/parse/v3-0/components/toComponentsV3.js +3 -1
- package/script/parse/v3-0/link/toLinksV3.d.ts +17 -0
- package/script/parse/v3-0/link/toLinksV3.d.ts.map +1 -0
- package/script/parse/v3-0/link/toLinksV3.js +44 -0
- package/script/parse/v3-0/object/toObject.d.ts.map +1 -1
- package/script/parse/v3-0/object/toObject.js +3 -1
- package/script/parse/v3-0/response/toResponseV3.d.ts.map +1 -1
- package/script/parse/v3-0/response/toResponseV3.js +4 -1
- package/script/parse/v3-0/union/toUnion.d.ts.map +1 -1
- package/script/parse/v3-0/union/toUnion.js +3 -1
- package/script/parse/v3-1/components/toComponentsV3.d.ts.map +1 -1
- package/script/parse/v3-1/components/toComponentsV3.js +3 -1
- package/script/parse/v3-1/link/toLinksV3.d.ts +17 -0
- package/script/parse/v3-1/link/toLinksV3.d.ts.map +1 -0
- package/script/parse/v3-1/link/toLinksV3.js +44 -0
- package/script/parse/v3-1/object/toObject.d.ts.map +1 -1
- package/script/parse/v3-1/object/toObject.js +3 -1
- package/script/parse/v3-1/response/toResponseV3.d.ts.map +1 -1
- package/script/parse/v3-1/response/toResponseV3.js +4 -1
- package/script/parse/v3-1/union/toUnion.d.ts.map +1 -1
- package/script/parse/v3-1/union/toUnion.js +3 -1
- package/script/run/toArtifacts.d.ts +8 -1
- package/script/run/toArtifacts.d.ts.map +1 -1
- package/script/run/toArtifacts.js +5 -5
- package/script/run/toInspection.d.ts +8 -0
- package/script/run/toInspection.d.ts.map +1 -0
- package/script/run/toInspection.js +82 -0
- package/script/types/Enrichments.d.ts +19 -8
- package/script/types/Enrichments.d.ts.map +1 -1
- package/script/types/Enrichments.js +5 -4
- package/script/types/GeneratorType.d.ts +5 -5
- package/script/types/GeneratorType.d.ts.map +1 -1
- package/script/types/Manifest.d.ts +1 -2
- package/script/types/Manifest.d.ts.map +1 -1
- package/script/types/Manifest.js +0 -1
- package/script/types/ModuleSelect.d.ts +81 -0
- package/script/types/ModuleSelect.d.ts.map +1 -0
- package/script/types/ModuleSelect.js +101 -0
- package/script/types/Preview.d.ts +4 -27
- package/script/types/Preview.d.ts.map +1 -1
- package/script/types/Preview.js +5 -26
- package/script/types/SchemaPath.d.ts +17 -0
- package/script/types/SchemaPath.d.ts.map +1 -0
- package/script/types/{AccessorPath.js → SchemaPath.js} +7 -7
- package/script/types/Settings.d.ts +8 -0
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +1 -0
- package/script/types/SkmtcDocument.d.ts +1 -1
- package/script/types/SupportedSubjects.d.ts +1 -1
- package/esm/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.13/_os.js +0 -12
- package/esm/types/AccessorPath.d.ts +0 -17
- package/esm/types/AccessorPath.d.ts.map +0 -1
- package/esm/types/AccessorPath.js +0 -9
- package/script/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
- package/script/types/AccessorPath.d.ts +0 -17
- package/script/types/AccessorPath.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.d.ts +0 -0
|
@@ -4,9 +4,6 @@ import type { ContentSettings } from '../../ContentSettings.js';
|
|
|
4
4
|
import type { GenerateContextType } from '../../../context/generateTypes.js';
|
|
5
5
|
import type { IdentifierType } from '../../IdentifierType.js';
|
|
6
6
|
import type { GeneratedValue } from '../../GeneratedValue.js';
|
|
7
|
-
import type { EnrichmentRequest } from '../../../types/EnrichmentRequest.js';
|
|
8
|
-
import type * as v from 'valibot';
|
|
9
|
-
import type { MappingModule, PreviewModule } from '../../../types/Preview.js';
|
|
10
7
|
/**
|
|
11
8
|
* External constructor signature for an OAS operation projection class.
|
|
12
9
|
*
|
|
@@ -32,13 +29,6 @@ export type TransformOasOperationArgs = {
|
|
|
32
29
|
export type WithTransformOasOperation = {
|
|
33
30
|
transformOperation: (operation: OasOperation) => void;
|
|
34
31
|
};
|
|
35
|
-
export type IsSupportedOasOperationConfigArgs<EnrichmentType = undefined> = {
|
|
36
|
-
context: GenerateContextType;
|
|
37
|
-
operation: OasOperation;
|
|
38
|
-
enrichments: EnrichmentType;
|
|
39
|
-
/** Operation variant being probed (see {@link Variant}) */
|
|
40
|
-
variant: string;
|
|
41
|
-
};
|
|
42
32
|
export type IsSupportedOasOperationArgs = {
|
|
43
33
|
context: GenerateContextType;
|
|
44
34
|
operation: OasOperation;
|
|
@@ -119,38 +109,6 @@ export type OasOperationProjection<V extends GeneratedValue, EnrichmentType = un
|
|
|
119
109
|
* projection may omit it, in which case it is treated as supporting
|
|
120
110
|
* every operation.
|
|
121
111
|
*/
|
|
122
|
-
isSupported?: (args:
|
|
123
|
-
operation: OasOperation;
|
|
124
|
-
context: GenerateContextType;
|
|
125
|
-
}) => boolean;
|
|
112
|
+
isSupported?: (args: IsSupportedOasOperationArgs) => boolean;
|
|
126
113
|
} & Function;
|
|
127
|
-
/**
|
|
128
|
-
* Pipeline-side configuration for an OAS operation projection (built by
|
|
129
|
-
* `toOasOperationEntry`).
|
|
130
|
-
*/
|
|
131
|
-
export type OasOperationConfig<EnrichmentType = undefined> = {
|
|
132
|
-
id: string;
|
|
133
|
-
type: 'oasOperation';
|
|
134
|
-
transform: ({ context, operation, variant }: TransformOasOperationArgs) => void;
|
|
135
|
-
toEnrichmentSchema: () => v.GenericSchema<EnrichmentType>;
|
|
136
|
-
/**
|
|
137
|
-
* Optional capability gate, evaluated before `include` / `skip`. Absent →
|
|
138
|
-
* treated as `() => true` (every operation supported). `toOasOperationEntry`
|
|
139
|
-
* defaults it for built configs; a hand-constructed config may omit it.
|
|
140
|
-
*/
|
|
141
|
-
isSupported?: ({ context, operation }: IsSupportedOasOperationArgs) => boolean;
|
|
142
|
-
/**
|
|
143
|
-
* Optional: compute the DEFAULT enrichment values for an operation from its
|
|
144
|
-
* schema — the seed the CMS persists and the user then edits. The pipeline
|
|
145
|
-
* counterpart of the projection base's static of the same name: a generator
|
|
146
|
-
* wires this on the entry (typically forwarding `MyProjection.toEnrichmentDefaults`)
|
|
147
|
-
* so the seeding pass can reach it from the generator-config map without the
|
|
148
|
-
* projection class. Returns the `{ subject, generator, stack }` umbrella, or
|
|
149
|
-
* `undefined` when the generator advertises no defaults.
|
|
150
|
-
*/
|
|
151
|
-
toEnrichmentDefaults?: ({ operation, context, variant }: ToOasOperationEnrichmentsArgs) => EnrichmentType | undefined;
|
|
152
|
-
toPreviewModule?: ({ context, operation }: ToOasOperationPreviewModuleArgs) => PreviewModule;
|
|
153
|
-
toMappingModule?: ({ context, operation }: ToOasOperationMappingArgs) => MappingModule;
|
|
154
|
-
toEnrichmentRequest?: <RequestedEnrichment extends EnrichmentType>(operation: OasOperation) => EnrichmentRequest<RequestedEnrichment> | undefined;
|
|
155
|
-
};
|
|
156
114
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dsl/operation/oas/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AACvE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dsl/operation/oas/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AACvE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,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AK,OAAO,CAAA;CAE7D,GAAG,QAAQ,CAAA"}
|
|
@@ -15,8 +15,10 @@ type CreateWebhookArgs<V extends GeneratedValue, EnrichmentType = undefined> = {
|
|
|
15
15
|
* enrichment for this variant, asserts the variant exists (or is the
|
|
16
16
|
* default `'main'` which is always permitted), and threads it into the
|
|
17
17
|
* projection's `ContentSettings`.
|
|
18
|
+
* Optional — omitting it means `'main'`, so variants-unaware
|
|
19
|
+
* callers keep working unchanged.
|
|
18
20
|
*/
|
|
19
|
-
variant
|
|
21
|
+
variant?: string;
|
|
20
22
|
};
|
|
21
23
|
/**
|
|
22
24
|
* Driver for the webhook insertion lifecycle.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebhookDriver.d.ts","sourceRoot":"","sources":["../../../src/dsl/webhook/WebhookDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAI5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAKzE,KAAK,iBAAiB,CAAC,CAAC,SAAS,cAAc,EAAE,cAAc,GAAG,SAAS,IAAI;IAC7E,OAAO,EAAE,mBAAmB,CAAA;IAC5B,UAAU,EAAE,iBAAiB,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;IAChD,OAAO,EAAE,UAAU,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB
|
|
1
|
+
{"version":3,"file":"WebhookDriver.d.ts","sourceRoot":"","sources":["../../../src/dsl/webhook/Web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AAC,CAAC,EAAE,cAAc,CAAC;IA0BvC,OAAO,CAAC,KAAK;IAiBb;;;OAGG;IACH,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,gBAAgB;CAsBzB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { normalize } from '../../deps/jsr.io/@std/path/1.1.
|
|
1
|
+
import { normalize } from '../../deps/jsr.io/@std/path/1.1.6/normalize.js';
|
|
2
2
|
import { toWebhookGeneratorKey } from '../GeneratorKeys.js';
|
|
3
3
|
import { DEFAULT_VARIANT } from '../../types/Variant.js';
|
|
4
4
|
import get from 'lodash-es/get.js';
|
|
@@ -12,7 +12,7 @@ import get from 'lodash-es/get.js';
|
|
|
12
12
|
* `destinationPath` if it differs from the projection's `exportPath`.
|
|
13
13
|
*/
|
|
14
14
|
export class WebhookDriver {
|
|
15
|
-
constructor({ context, projection, webhook, destinationPath, noExport, variant }) {
|
|
15
|
+
constructor({ context, projection, webhook, destinationPath, noExport, variant = DEFAULT_VARIANT }) {
|
|
16
16
|
Object.defineProperty(this, "context", {
|
|
17
17
|
enumerable: true,
|
|
18
18
|
configurable: true,
|
|
@@ -73,7 +73,7 @@ export class WebhookDriver {
|
|
|
73
73
|
webhook,
|
|
74
74
|
variant
|
|
75
75
|
});
|
|
76
|
-
assertPeerSupported({ context, projection, webhook });
|
|
76
|
+
assertPeerSupported({ context, projection, webhook, variant });
|
|
77
77
|
this.settings = this.context.toWebhookContentSettings({
|
|
78
78
|
webhook,
|
|
79
79
|
projection,
|
|
@@ -155,7 +155,12 @@ const assertPeerVariantExists = ({ context, generatorId, webhook, variant }) =>
|
|
|
155
155
|
if (variant === DEFAULT_VARIANT) {
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
|
-
const webhookEnrichments = get(context.settings, [
|
|
158
|
+
const webhookEnrichments = get(context.settings, [
|
|
159
|
+
'enrichments',
|
|
160
|
+
generatorId,
|
|
161
|
+
webhook.name,
|
|
162
|
+
webhook.method
|
|
163
|
+
]);
|
|
159
164
|
const webhookLabel = `webhook '${webhook.name}' (${webhook.method.toUpperCase()})`;
|
|
160
165
|
if (webhookEnrichments === null || webhookEnrichments === undefined) {
|
|
161
166
|
throw new Error(`[${generatorId}] Cannot insert variant '${variant}' for ${webhookLabel} — ` +
|
|
@@ -178,11 +183,9 @@ const assertPeerVariantExists = ({ context, generatorId, webhook, variant }) =>
|
|
|
178
183
|
* generator's item as `error` while the run continues. A peer with no static
|
|
179
184
|
* `isSupported` supports every webhook.
|
|
180
185
|
*/
|
|
181
|
-
const assertPeerSupported = ({ context, projection, webhook }) => {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
if (!projection.isSupported({ webhook, context })) {
|
|
186
|
+
const assertPeerSupported = ({ context, projection, webhook, variant }) => {
|
|
187
|
+
const isSupported = projection.isSupported ?? (() => true);
|
|
188
|
+
if (!isSupported({ webhook, context, variant })) {
|
|
186
189
|
const webhookLabel = `webhook '${webhook.name}' (${webhook.method.toUpperCase()})`;
|
|
187
190
|
throw new Error(`[${projection.id}] Cannot insert ${webhookLabel} — peer generator ` +
|
|
188
191
|
`does not support this webhook (isSupported returned false).`);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
1
|
+
import type * as v from 'valibot';
|
|
2
2
|
import type { OasWebhook } from '../../oas/webhook/Webhook.js';
|
|
3
3
|
import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
4
|
-
import type { IsSupportedWebhookArgs, ToWebhookPreviewModuleArgs,
|
|
5
|
-
import type {
|
|
4
|
+
import type { IsSupportedWebhookArgs, ToWebhookPreviewModuleArgs, ToWebhookEnrichmentsArgs, TransformWebhookArgs } from './types.js';
|
|
5
|
+
import type { PreviewModule } from '../../types/Preview.js';
|
|
6
6
|
/**
|
|
7
7
|
* Configuration arguments for creating webhook generator entries.
|
|
8
8
|
*
|
|
@@ -16,9 +16,24 @@ export type ToWebhookConfigArgs<EnrichmentType = undefined> = {
|
|
|
16
16
|
id: string;
|
|
17
17
|
transform: ({ context, webhook, variant }: TransformWebhookArgs) => void;
|
|
18
18
|
toEnrichmentSchema: () => v.GenericSchema<EnrichmentType>;
|
|
19
|
-
isSupported?: (
|
|
19
|
+
isSupported?: (args: IsSupportedWebhookArgs) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Optional: whether this generator entry supports variants. Defaults to a
|
|
22
|
+
* function returning `false` when omitted.
|
|
23
|
+
*/
|
|
24
|
+
supportsVariant?: () => boolean;
|
|
25
|
+
toPreviewModule?: ({ context, webhook }: ToWebhookPreviewModuleArgs) => PreviewModule;
|
|
26
|
+
toEnrichmentRequest?: <RequestedEnrichment extends EnrichmentType>(webhook: OasWebhook) => EnrichmentRequest<RequestedEnrichment> | undefined;
|
|
27
|
+
toEnrichmentDefaults?: ({ webhook, context, variant }: ToWebhookEnrichmentsArgs) => EnrichmentType | undefined;
|
|
28
|
+
};
|
|
29
|
+
export type WebhookEntry<EnrichmentType = undefined> = {
|
|
30
|
+
id: string;
|
|
31
|
+
type: 'webhook';
|
|
32
|
+
transform: ({ context, webhook, variant }: TransformWebhookArgs) => void;
|
|
33
|
+
toEnrichmentSchema: () => v.GenericSchema<EnrichmentType>;
|
|
34
|
+
isSupported: (args: IsSupportedWebhookArgs) => boolean;
|
|
35
|
+
supportsVariant: () => boolean;
|
|
20
36
|
toPreviewModule?: ({ context, webhook }: ToWebhookPreviewModuleArgs) => PreviewModule;
|
|
21
|
-
toMappingModule?: ({ context, webhook }: ToWebhookMappingArgs) => MappingModule;
|
|
22
37
|
toEnrichmentRequest?: <RequestedEnrichment extends EnrichmentType>(webhook: OasWebhook) => EnrichmentRequest<RequestedEnrichment> | undefined;
|
|
23
38
|
toEnrichmentDefaults?: ({ webhook, context, variant }: ToWebhookEnrichmentsArgs) => EnrichmentType | undefined;
|
|
24
39
|
};
|
|
@@ -44,15 +59,5 @@ export type ToWebhookConfigArgs<EnrichmentType = undefined> = {
|
|
|
44
59
|
* });
|
|
45
60
|
* ```
|
|
46
61
|
*/
|
|
47
|
-
export declare const toWebhookEntry: <EnrichmentType = undefined>({ id, transform, toEnrichmentSchema, isSupported,
|
|
48
|
-
id: string;
|
|
49
|
-
type: "webhook";
|
|
50
|
-
transform: ({ context, webhook, variant }: TransformWebhookArgs) => void;
|
|
51
|
-
toEnrichmentSchema: () => v.GenericSchema<EnrichmentType>;
|
|
52
|
-
isSupported: ({ context, webhook }: IsSupportedWebhookArgs) => boolean;
|
|
53
|
-
toPreviewModule?: ({ context, webhook }: ToWebhookPreviewModuleArgs) => PreviewModule;
|
|
54
|
-
toMappingModule?: ({ context, webhook }: ToWebhookMappingArgs) => MappingModule;
|
|
55
|
-
toEnrichmentRequest?: <RequestedEnrichment extends EnrichmentType>(webhook: OasWebhook) => EnrichmentRequest<RequestedEnrichment> | undefined;
|
|
56
|
-
toEnrichmentDefaults?: ({ webhook, context, variant }: ToWebhookEnrichmentsArgs) => EnrichmentType | undefined;
|
|
57
|
-
};
|
|
62
|
+
export declare const toWebhookEntry: <EnrichmentType = undefined>({ id, transform, toEnrichmentSchema, isSupported, supportsVariant, toPreviewModule, toEnrichmentRequest, toEnrichmentDefaults }: ToWebhookConfigArgs<EnrichmentType>) => WebhookEntry<EnrichmentType>;
|
|
58
63
|
//# sourceMappingURL=toWebhookEntry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toWebhookEntry.d.ts","sourceRoot":"","sources":["../../../src/dsl/webhook/toWebhookEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"toWebhookEntry.d.ts","sourceRoot":"","sources":["../../../src/dsl/webhook/toWebhookEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,O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CAAA;IACzD,WAAW,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,OAAO,CAAA;IACtD,eAAe,EAAE,MAAM,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,0BAA0B,KAAK,aAAa,CAAA;IACrF,mBAAmB,CAAC,EAAE,CAAC,mBAAmB,SAAS,cAAc,EAC/D,OAAO,EAAE,UAAU,KAChB,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAA;IACvD,oBAAoB,CAAC,EAAE,CAAC,EACtB,OAAO,EACP,OAAO,EACP,OAAO,EACR,EAAE,wBAAwB,KAAK,cAAc,GAAG,SAAS,CAAA;CAC3D,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,cAAc,GAAI,cAAc,GAAG,SAAS,EAAE,iIASxD,mBAAmB,CAAC,cAAc,CAAC,KAAG,YAAY,CAAC,cAAc,CAYnE,CAAA"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
|
-
import { GENERATOR_ENRICHMENT_KEY, STACK_ENRICHMENT_KEY } from '../../types/Enrichments.js';
|
|
3
|
-
import get from 'lodash-es/get.js';
|
|
4
1
|
/**
|
|
5
2
|
* Creates a configured webhook generator entry.
|
|
6
3
|
*
|
|
@@ -23,41 +20,15 @@ import get from 'lodash-es/get.js';
|
|
|
23
20
|
* });
|
|
24
21
|
* ```
|
|
25
22
|
*/
|
|
26
|
-
export const toWebhookEntry = ({ id, transform, toEnrichmentSchema, isSupported,
|
|
23
|
+
export const toWebhookEntry = ({ id, transform, toEnrichmentSchema, isSupported, supportsVariant, toPreviewModule, toEnrichmentRequest, toEnrichmentDefaults }) => {
|
|
27
24
|
return {
|
|
28
25
|
id,
|
|
29
26
|
type: 'webhook',
|
|
30
27
|
transform,
|
|
31
28
|
toEnrichmentSchema,
|
|
32
|
-
isSupported:
|
|
33
|
-
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
// Assemble the three-scope umbrella — mirrors
|
|
37
|
-
// `WebhookProjectionBase.toEnrichments` so the shim and the
|
|
38
|
-
// projection-base resolve to the same value. Subject is per-item
|
|
39
|
-
// (`[id][name][method][variant]`); generator and stack are
|
|
40
|
-
// run-constants. The required composite schema parses cast-free.
|
|
41
|
-
const raw = {
|
|
42
|
-
subject: get(context.settings, [
|
|
43
|
-
'enrichments',
|
|
44
|
-
id,
|
|
45
|
-
webhook.name,
|
|
46
|
-
webhook.method,
|
|
47
|
-
variant
|
|
48
|
-
]),
|
|
49
|
-
generator: get(context.settings, ['enrichments', id, GENERATOR_ENRICHMENT_KEY]),
|
|
50
|
-
stack: get(context.settings, ['enrichments', STACK_ENRICHMENT_KEY])
|
|
51
|
-
};
|
|
52
|
-
return isSupported({
|
|
53
|
-
context,
|
|
54
|
-
webhook,
|
|
55
|
-
enrichments: v.parse(toEnrichmentSchema(), raw),
|
|
56
|
-
variant
|
|
57
|
-
});
|
|
58
|
-
},
|
|
29
|
+
isSupported: isSupported ?? (() => true),
|
|
30
|
+
supportsVariant: supportsVariant ?? (() => false),
|
|
59
31
|
toPreviewModule,
|
|
60
|
-
toMappingModule,
|
|
61
32
|
toEnrichmentRequest,
|
|
62
33
|
toEnrichmentDefaults
|
|
63
34
|
};
|
|
@@ -3,7 +3,7 @@ import type { InsertOperationOptions, InsertModelOptions, InsertNormalizedModelA
|
|
|
3
3
|
import type { OasWebhook } from '../../oas/webhook/Webhook.js';
|
|
4
4
|
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
5
5
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
6
|
-
import type {
|
|
6
|
+
import type { LangSnippetConstructor } from '../Lang.js';
|
|
7
7
|
import type { IdentifierType } from '../IdentifierType.js';
|
|
8
8
|
import type { GeneratedValue } from '../GeneratedValue.js';
|
|
9
9
|
import type { Inserted } from '../Inserted.js';
|
|
@@ -19,20 +19,21 @@ import * as v from 'valibot';
|
|
|
19
19
|
* Configuration for {@link toWebhookProjectionBase}.
|
|
20
20
|
*
|
|
21
21
|
* Sibling of `OasOperationProjectionBaseConfig` for the webhook subject.
|
|
22
|
-
* Generic over the
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* Generic over the identifier-type shape `IdType`: a language veneer
|
|
23
|
+
* parameterizes this config with its own `XxIdentifierType`
|
|
24
|
+
* (`WebhookProjectionBaseConfig<E, KtIdentifierType>`) so `toIdentifierType`'s
|
|
25
|
+
* return tightens to that language's `type` vocabulary — no recast.
|
|
25
26
|
*/
|
|
26
|
-
export type WebhookProjectionBaseConfig<EnrichmentType = undefined,
|
|
27
|
+
export type WebhookProjectionBaseConfig<EnrichmentType = undefined, IdType extends IdentifierType = IdentifierType> = {
|
|
27
28
|
id: string;
|
|
28
29
|
/** Pure: the cache-key name (the cache-check path runs this). */
|
|
29
30
|
toIdentifierName: (args: ToWebhookIdentifierNameArgs<EnrichmentType>) => string;
|
|
30
31
|
/**
|
|
31
32
|
* Context-aware, overridable: the non-`name` parts of the identifier,
|
|
32
33
|
* derived from the webhook. Runs only on cache-miss. Returns this
|
|
33
|
-
* language's `
|
|
34
|
+
* language's `XxIdentifierType` (`IdType`; the loose `type: string` by default).
|
|
34
35
|
*/
|
|
35
|
-
toIdentifierType: (webhook: OasWebhook, context: GenerateContextType) =>
|
|
36
|
+
toIdentifierType: (webhook: OasWebhook, context: GenerateContextType) => IdType;
|
|
36
37
|
toExportPath: (args: ToWebhookExportPathArgs<EnrichmentType>) => string;
|
|
37
38
|
/**
|
|
38
39
|
* Required composite schema for the `{ subject, generator, stack }`
|
|
@@ -77,7 +78,7 @@ type ToEnrichmentsArgs = {
|
|
|
77
78
|
* Defines NO `register` / `registerInto` — those live in the language
|
|
78
79
|
* package's projection-base veneer over this factory.
|
|
79
80
|
*/
|
|
80
|
-
export declare const toWebhookProjectionBase: <EnrichmentType = undefined,
|
|
81
|
+
export declare const toWebhookProjectionBase: <EnrichmentType = undefined, IdType extends IdentifierType = IdentifierType>(base: LangSnippetConstructor, config: WebhookProjectionBaseConfig<EnrichmentType, IdType>) => {
|
|
81
82
|
new (args: WebhookProjectionConstructorArgs<EnrichmentType>): {
|
|
82
83
|
settings: ContentSettings<EnrichmentType>;
|
|
83
84
|
webhook: OasWebhook;
|
|
@@ -106,7 +107,7 @@ export declare const toWebhookProjectionBase: <EnrichmentType = undefined, L ext
|
|
|
106
107
|
id: string;
|
|
107
108
|
type: "webhook";
|
|
108
109
|
toIdentifierName: (args: ToWebhookIdentifierNameArgs<EnrichmentType>) => string;
|
|
109
|
-
toIdentifierType: (webhook: OasWebhook, context: GenerateContextType) =>
|
|
110
|
+
toIdentifierType: (webhook: OasWebhook, context: GenerateContextType) => IdType;
|
|
110
111
|
toExportPath: (args: ToWebhookExportPathArgs<EnrichmentType>) => string;
|
|
111
112
|
isSupported: (args: {
|
|
112
113
|
webhook: OasWebhook;
|
|
@@ -119,7 +120,7 @@ export declare const toWebhookProjectionBase: <EnrichmentType = undefined, L ext
|
|
|
119
120
|
* `toEnrichmentDefaults` — the common case.
|
|
120
121
|
*/
|
|
121
122
|
toEnrichmentDefaults: (args: ToEnrichmentsArgs) => EnrichmentType | undefined;
|
|
122
|
-
lang:
|
|
123
|
+
lang: import("../Lang.js").Lang;
|
|
123
124
|
};
|
|
124
125
|
export {};
|
|
125
126
|
//# sourceMappingURL=toWebhookProjectionBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toWebhookProjectionBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/webhook/toWebhookProjectionBase.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAC5B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;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;;;;WAIG;wBACa,CAAC,SAAS,cAAc,EAAE,kBAAkB,0BAC9C,sBAAsB,CAAC,CAAC,EAAE,kBAAkB,CAAC,aAC9C,YAAY,YACd,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,SAAS,CAAC,GAC5D,QAAQ,CAAC,CAAC,EAAE,kBAAkB,CAAC;QAUlC;;;WAGG;oBACS,CAAC,SAAS,cAAc,gDACtB,eAAe,CAAC,CAAC,EAAE,oBAAkB,CAAC,WACzC,OAAO,YACP,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,SAAS,CAAC,GACxD,QAAQ,CAAC,CAAC,EAAE,oBAAkB,CAAC;QAQlC;;;;WAIG;8BAED,CAAC,SAAS,cAAc,EACxB,MAAM,SAAS,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,OAAO,gDAGzC,eAAe,CAAC,CAAC,EAAE,oBAAkB,CAAC,4BACxB,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC,YAC3E,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,SAAS,CAAC,GACxD,2BAA2B,CAAC,CAAC,EAAE,MAAM,CAAC;;;;;;;UA3G3B,SAAS;6EAxDgD,MAAM;gCAMnD,UAAU,WAAW,mBAAmB;qEACH,MAAM;wBAoBlD;QAAE,OAAO,EAAE,UAAU,CAAC;QAAC,OAAO,EAAE,mBAAmB,CAAA;KAAE,KAAK,OAAO;oBAqC5D,+BAIrB,iBAAiB,KAAG,cAAc;IAsBrC;;;;OAIG;2BAC4B,MAAM,iBAAiB,KAAG,cAAc,GAAG,SAAS;;CAmFtF,CAAA"}
|
|
@@ -4,9 +4,6 @@ import type { ContentSettings } from '../ContentSettings.js';
|
|
|
4
4
|
import type { GenerateContextType } from '../../context/generateTypes.js';
|
|
5
5
|
import type { IdentifierType } from '../IdentifierType.js';
|
|
6
6
|
import type { GeneratedValue } from '../GeneratedValue.js';
|
|
7
|
-
import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
8
|
-
import type * as v from 'valibot';
|
|
9
|
-
import type { MappingModule, PreviewModule } from '../../types/Preview.js';
|
|
10
7
|
/**
|
|
11
8
|
* External constructor signature for a webhook projection class.
|
|
12
9
|
*
|
|
@@ -33,13 +30,6 @@ export type TransformWebhookArgs = {
|
|
|
33
30
|
*/
|
|
34
31
|
variant: string;
|
|
35
32
|
};
|
|
36
|
-
export type IsSupportedWebhookConfigArgs<EnrichmentType = undefined> = {
|
|
37
|
-
context: GenerateContextType;
|
|
38
|
-
webhook: OasWebhook;
|
|
39
|
-
enrichments: EnrichmentType;
|
|
40
|
-
/** Webhook variant being probed (see {@link Variant}) */
|
|
41
|
-
variant: string;
|
|
42
|
-
};
|
|
43
33
|
export type IsSupportedWebhookArgs = {
|
|
44
34
|
context: GenerateContextType;
|
|
45
35
|
webhook: OasWebhook;
|
|
@@ -119,31 +109,6 @@ export type WebhookProjection<V extends GeneratedValue, EnrichmentType = undefin
|
|
|
119
109
|
* declared unsupported. Optional: a hand-rolled projection may omit it,
|
|
120
110
|
* in which case it is treated as supporting every webhook.
|
|
121
111
|
*/
|
|
122
|
-
isSupported?: (args:
|
|
123
|
-
webhook: OasWebhook;
|
|
124
|
-
context: GenerateContextType;
|
|
125
|
-
}) => boolean;
|
|
112
|
+
isSupported?: (args: IsSupportedWebhookArgs) => boolean;
|
|
126
113
|
} & Function;
|
|
127
|
-
/**
|
|
128
|
-
* Pipeline-side configuration for a webhook projection (built by
|
|
129
|
-
* `toWebhookEntry`).
|
|
130
|
-
*/
|
|
131
|
-
export type WebhookConfig<EnrichmentType = undefined> = {
|
|
132
|
-
id: string;
|
|
133
|
-
type: 'webhook';
|
|
134
|
-
transform: ({ context, webhook, variant }: TransformWebhookArgs) => void;
|
|
135
|
-
toEnrichmentSchema: () => v.GenericSchema<EnrichmentType>;
|
|
136
|
-
isSupported: ({ context, webhook }: IsSupportedWebhookArgs) => boolean;
|
|
137
|
-
/**
|
|
138
|
-
* Optional: compute the DEFAULT enrichment values for a webhook from its
|
|
139
|
-
* schema — the seed the CMS persists and the user then edits. The pipeline
|
|
140
|
-
* counterpart of the projection base's static of the same name. Returns the
|
|
141
|
-
* `{ subject, generator, stack }` umbrella, or `undefined` when the
|
|
142
|
-
* generator advertises no defaults.
|
|
143
|
-
*/
|
|
144
|
-
toEnrichmentDefaults?: ({ webhook, context, variant }: ToWebhookEnrichmentsArgs) => EnrichmentType | undefined;
|
|
145
|
-
toPreviewModule?: ({ context, webhook }: ToWebhookPreviewModuleArgs) => PreviewModule;
|
|
146
|
-
toMappingModule?: ({ context, webhook }: ToWebhookMappingArgs) => MappingModule;
|
|
147
|
-
toEnrichmentRequest?: <RequestedEnrichment extends EnrichmentType>(webhook: OasWebhook) => EnrichmentRequest<RequestedEnrichment> | undefined;
|
|
148
|
-
};
|
|
149
114
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dsl/webhook/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dsl/webhook/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,EAAE,eAAe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|
|
4
|
-
* enrichment-editor UI. Mirrors the `EnrichmentFieldKind` enum in the
|
|
5
|
-
* skmtc-hub TypeSpec contract.
|
|
3
|
+
* Properties shared by every enrichment-field variant.
|
|
6
4
|
*/
|
|
7
|
-
export type
|
|
8
|
-
/**
|
|
9
|
-
* One node of a serialised enrichment-schema descriptor — the
|
|
10
|
-
* form-renderable projection of a generator's enrichment schema.
|
|
11
|
-
*/
|
|
12
|
-
export type EnrichmentField = {
|
|
5
|
+
export type EnrichmentFieldBase = {
|
|
13
6
|
/** Key written into the enrichment values object. */
|
|
14
7
|
key: string;
|
|
15
8
|
/** Human label, derived from the key when no metadata is supplied. */
|
|
@@ -17,22 +10,58 @@ export type EnrichmentField = {
|
|
|
17
10
|
description?: string;
|
|
18
11
|
/** Whether the schema marks this field optional. */
|
|
19
12
|
optional: boolean;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The variant-specific part of one enrichment field — the widget `type`
|
|
16
|
+
* discriminant plus exactly the payload that widget carries. Mirrors the
|
|
17
|
+
* `EnrichmentField` union in the skmtc-hub TypeSpec contract.
|
|
18
|
+
*
|
|
19
|
+
* There are deliberately NO standalone `module` / `schemaPath` widget
|
|
20
|
+
* types: a component reference is only meaningful WITH the path that gives
|
|
21
|
+
* it a type, so the pair is declared as one `moduleSelect` field. A
|
|
22
|
+
* generator that uses the raw `moduleExport` / `schemaPath` schemas
|
|
23
|
+
* standalone degrades to the generic object/array widgets.
|
|
24
|
+
*/
|
|
25
|
+
export type EnrichmentFieldShape = {
|
|
26
|
+
type: 'text';
|
|
27
|
+
} | {
|
|
28
|
+
type: 'textarea';
|
|
29
|
+
} | {
|
|
30
|
+
type: 'toggle';
|
|
31
|
+
} | {
|
|
32
|
+
type: 'select';
|
|
33
|
+
/** The selectable choices. */
|
|
34
|
+
options: string[];
|
|
35
|
+
} | {
|
|
36
|
+
type: 'moduleSelect';
|
|
23
37
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
38
|
+
* The TS source of the contract a chosen module must satisfy for this
|
|
39
|
+
* field (a single `export type XModule<F> = …` the editor's matcher
|
|
40
|
+
* checks candidates against). Always present: the module type is
|
|
41
|
+
* explicit in the declaration (`lensInputModuleType` for the common
|
|
42
|
+
* lens/input case), never an editor-side default.
|
|
29
43
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
44
|
+
moduleType: string;
|
|
45
|
+
} | {
|
|
46
|
+
type: 'array';
|
|
47
|
+
/** Shape of each item. */
|
|
48
|
+
item: EnrichmentField;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'object';
|
|
51
|
+
/** The nested object's fields. */
|
|
52
|
+
fields: EnrichmentField[];
|
|
33
53
|
};
|
|
34
|
-
/**
|
|
35
|
-
|
|
54
|
+
/**
|
|
55
|
+
* One node of a serialised enrichment-schema descriptor — the
|
|
56
|
+
* form-renderable projection of a generator's enrichment schema,
|
|
57
|
+
* discriminated on `type`. Recursive: `array` fields carry a single
|
|
58
|
+
* `item` shape, `object` fields carry nested `fields`.
|
|
59
|
+
*/
|
|
60
|
+
export type EnrichmentField = EnrichmentFieldBase & EnrichmentFieldShape;
|
|
61
|
+
/** The widget-type discriminant values of {@link EnrichmentField}. */
|
|
62
|
+
export type EnrichmentFieldType = EnrichmentField['type'];
|
|
63
|
+
/** Which subject type a generator enriches — operations, webhooks, or models. */
|
|
64
|
+
export type SubjectType = 'operation' | 'model' | 'webhook';
|
|
36
65
|
/**
|
|
37
66
|
* A generator's enrichment schema, projected for the CMS. The same
|
|
38
67
|
* descriptor is what an agent would drive — the form UI is one
|
|
@@ -40,7 +69,14 @@ export type TargetKind = 'operation' | 'model';
|
|
|
40
69
|
*/
|
|
41
70
|
export type EnrichmentDescriptor = {
|
|
42
71
|
generator: string;
|
|
43
|
-
|
|
72
|
+
subjectType: SubjectType;
|
|
73
|
+
/**
|
|
74
|
+
* Whether this generator's entry declares variant support
|
|
75
|
+
* (`supportsVariant: () => true`). The CMS reads it to decide whether to
|
|
76
|
+
* offer the per-subject variant axis (add / rename / delete variants) above
|
|
77
|
+
* the subject scope; `false` when the entry omits it.
|
|
78
|
+
*/
|
|
79
|
+
supportsVariant: boolean;
|
|
44
80
|
fields: EnrichmentField[];
|
|
45
81
|
};
|
|
46
82
|
/**
|
|
@@ -54,6 +90,14 @@ export type EnrichmentSource = {
|
|
|
54
90
|
readonly id: string;
|
|
55
91
|
readonly type: 'oasOperation' | 'gqlOperation' | 'model' | 'webhook';
|
|
56
92
|
readonly toEnrichmentSchema?: () => v.GenericSchema;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the entry supports the variant axis. Required: every entry built by
|
|
95
|
+
* `toOasOperationEntry` / `toGqlOperationEntry` / `toModelEntry` has it,
|
|
96
|
+
* because the factory inserts a `() => false` default when the author omits
|
|
97
|
+
* it — so by the time an entry reaches the descriptor the function always
|
|
98
|
+
* exists.
|
|
99
|
+
*/
|
|
100
|
+
readonly supportsVariant: () => boolean;
|
|
57
101
|
};
|
|
58
102
|
/**
|
|
59
103
|
* Walk a Valibot object schema and return the projected list of
|
|
@@ -71,7 +115,7 @@ export type EnrichmentSource = {
|
|
|
71
115
|
* umbrella yields `[]`.
|
|
72
116
|
*
|
|
73
117
|
* Generally callers should prefer {@link toEnrichmentDescriptor}, which
|
|
74
|
-
* takes a generator entry and fills in `generator` / `
|
|
118
|
+
* takes a generator entry and fills in `generator` / `subjectType`
|
|
75
119
|
* automatically. This lower-level entry point is useful in tests and
|
|
76
120
|
* when only the field shape is needed.
|
|
77
121
|
*/
|
|
@@ -80,8 +124,9 @@ export declare const toEnrichmentFields: (schema: v.GenericSchema | undefined) =
|
|
|
80
124
|
* Project a generator entry's enrichment schema into a serialisable
|
|
81
125
|
* `EnrichmentDescriptor` the CMS can render as a form. The entry's
|
|
82
126
|
* `id` becomes `descriptor.generator`; its `type` discriminator maps
|
|
83
|
-
* to `
|
|
84
|
-
* `'model'` → `'model'`). If the entry has no
|
|
127
|
+
* to `subjectType` (`'oasOperation' | 'gqlOperation'` → `'operation'`;
|
|
128
|
+
* `'webhook'` → `'webhook'`; `'model'` → `'model'`). If the entry has no
|
|
129
|
+
* `toEnrichmentSchema`, or
|
|
85
130
|
* declares the empty umbrella, the descriptor has an empty `fields`
|
|
86
131
|
* array — the UI hides the section, matching the engine's "no
|
|
87
132
|
* enrichments" behaviour.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toEnrichmentDescriptor.d.ts","sourceRoot":"","sources":["../../src/enrichments/toEnrichmentDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"toEnrichmentDescriptor.d.ts","sourceRoot":"","sources":["../../src/enrichments/toEnrichmentDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAGjC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAA;IACX,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oDAAoD;IACpD,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IACA,IAAI,EAAE,QAAQ,CAAA;IACd,8BAA8B;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,GACC;IACA,IAAI,EAAE,cAAc,CAAA;IACpB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAA;CACnB,GACC;IACA,IAAI,EAAE,OAAO,CAAA;IACb,0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