@cosmicdrift/kumiko-framework 0.388.0 → 0.389.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/AGENTS.md +3 -0
- package/agents/examples/golden-path.md +13 -1
- package/agents/examples/lifecycle-hooks.md +55 -2
- package/agents/examples/list-table-options.md +466 -0
- package/agents/examples/pdf-audit-export.md +4 -2
- package/agents/examples/state-machine.md +3 -2
- package/agents/examples/tenant-isolation.md +73 -1
- package/agents/examples.md +1 -0
- package/agents/widgets.md +1 -0
- package/dist/api/api-constants.d.ts +1 -0
- package/dist/api/api-constants.js +2 -0
- package/dist/api/auth-routes-shared.d.ts +2 -0
- package/dist/api/auth-routes-shared.js +5 -0
- package/dist/api/client-error-route.js +2 -3
- package/dist/api/entity-read-access.d.ts +2 -1
- package/dist/api/entity-read-access.js +14 -0
- package/dist/api/export/export-cells-reference.d.ts +9 -0
- package/dist/api/export/export-cells-reference.js +21 -0
- package/dist/api/export/export-cells.d.ts +11 -0
- package/dist/api/export/export-cells.js +136 -0
- package/dist/api/export/export-ciphertext-guard.d.ts +2 -0
- package/dist/api/export/export-ciphertext-guard.js +27 -0
- package/dist/api/export/export-columns.d.ts +29 -0
- package/dist/api/export/export-columns.js +85 -0
- package/dist/api/export/export-errors.d.ts +4 -0
- package/dist/api/export/export-errors.js +14 -0
- package/dist/api/export/export-route.d.ts +4 -0
- package/dist/api/export/export-route.js +74 -0
- package/dist/api/export/export-rows.d.ts +13 -0
- package/dist/api/export/export-rows.js +62 -0
- package/dist/api/export/export-screen.d.ts +12 -0
- package/dist/api/export/export-screen.js +47 -0
- package/dist/api/export/export-xlsx-writer.d.ts +4 -0
- package/dist/api/export/export-xlsx-writer.js +21 -0
- package/dist/api/extra-route.d.ts +4 -0
- package/dist/api/pii-leak-guard.d.ts +3 -0
- package/dist/api/pii-leak-guard.js +3 -2
- package/dist/api/routes.d.ts +16 -0
- package/dist/api/routes.js +2 -2
- package/dist/api/server-extra-routes.js +3 -0
- package/dist/api/server-routes.d.ts +1 -1
- package/dist/api/server-routes.js +8 -2
- package/dist/api/server-wiring.js +2 -0
- package/dist/api/sse-route.d.ts +2 -1
- package/dist/api/sse-route.js +11 -1
- package/dist/config/index.d.ts +3 -1
- package/dist/crypto/pg-kms-adapter.d.ts +1 -0
- package/dist/crypto/pg-kms-adapter.js +12 -18
- package/dist/db/aggregate-sql.d.ts +2 -0
- package/dist/db/aggregate-sql.js +10 -0
- package/dist/db/closed-connection.js +12 -19
- package/dist/db/connection.d.ts +4 -5
- package/dist/db/connection.js +29 -20
- package/dist/db/driver-row-coercion.js +4 -4
- package/dist/db/driver-value-preparation.js +6 -4
- package/dist/db/event-store-executor-read-aggregate-currencies.d.ts +17 -0
- package/dist/db/event-store-executor-read-aggregate-currencies.js +40 -0
- package/dist/db/event-store-executor-read-aggregate.js +36 -5
- package/dist/db/event-store-executor-read-filter.js +6 -3
- package/dist/db/event-store-executor-write-atomic.d.ts +4 -0
- package/dist/db/event-store-executor-write-atomic.js +41 -0
- package/dist/db/event-store-executor-write-steps.d.ts +0 -3
- package/dist/db/event-store-executor-write-steps.js +0 -5
- package/dist/db/event-store-executor-write.js +15 -15
- package/dist/db/event-store-executor.js +2 -1
- package/dist/db/executor-managed-tables.js +1 -1
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.js +1 -1
- package/dist/db/migrate-runner.js +3 -3
- package/dist/db/pg-error.js +26 -21
- package/dist/db/queries/backfill-pii.js +3 -6
- package/dist/db/queries/database-now.js +2 -1
- package/dist/db/queries/shadow-swap.js +2 -3
- package/dist/db/query.d.ts +14 -0
- package/dist/db/query.js +68 -43
- package/dist/db/reference-data.js +14 -2
- package/dist/db/statement-timeout.js +2 -1
- package/dist/db/tenant-db-upsert.d.ts +5 -0
- package/dist/db/tenant-db-upsert.js +91 -0
- package/dist/db/tenant-db.js +11 -1
- package/dist/engine/boot-validator/bundled-lists-table.d.ts +2 -0
- package/dist/engine/boot-validator/bundled-lists-table.js +36 -0
- package/dist/engine/boot-validator/entity-list-aggregate-options.d.ts +3 -0
- package/dist/engine/boot-validator/entity-list-aggregate-options.js +23 -0
- package/dist/engine/boot-validator/list-bulk-actions.d.ts +3 -0
- package/dist/engine/boot-validator/list-bulk-actions.js +49 -0
- package/dist/engine/boot-validator/list-column-layout.d.ts +8 -0
- package/dist/engine/boot-validator/list-column-layout.js +41 -0
- package/dist/engine/boot-validator/list-table-aggregate-options.d.ts +24 -0
- package/dist/engine/boot-validator/list-table-aggregate-options.js +145 -0
- package/dist/engine/boot-validator/list-table-aggregate-query.d.ts +10 -0
- package/dist/engine/boot-validator/list-table-aggregate-query.js +31 -0
- package/dist/engine/boot-validator/list-table-export-options.d.ts +1 -0
- package/dist/engine/boot-validator/list-table-export-options.js +27 -0
- package/dist/engine/boot-validator/list-table-options.d.ts +3 -0
- package/dist/engine/boot-validator/list-table-options.js +77 -0
- package/dist/engine/boot-validator/list-table-reject-unknown-keys.d.ts +1 -0
- package/dist/engine/boot-validator/list-table-reject-unknown-keys.js +7 -0
- package/dist/engine/boot-validator/projection-list-screens.d.ts +1 -1
- package/dist/engine/boot-validator/projection-list-screens.js +3 -13
- package/dist/engine/boot-validator/related-list-table-rules.d.ts +4 -0
- package/dist/engine/boot-validator/related-list-table-rules.js +42 -0
- package/dist/engine/boot-validator/screens-kind-entity-list.js +7 -0
- package/dist/engine/boot-validator/screens-kind-projection-list.js +4 -0
- package/dist/engine/boot-validator/screens-lists.js +12 -2
- package/dist/engine/build-app-schema.d.ts +2 -1
- package/dist/engine/build-app-schema.js +9 -1
- package/dist/engine/build-config-feature-schema.js +6 -1
- package/dist/engine/define-feature.js +4 -0
- package/dist/engine/feature-ast/extractors/index.d.ts +1 -1
- package/dist/engine/feature-ast/extractors/index.js +1 -1
- package/dist/engine/feature-ast/extractors/round1.d.ts +2 -1
- package/dist/engine/feature-ast/extractors/round1.js +6 -0
- package/dist/engine/feature-ast/index.d.ts +1 -1
- package/dist/engine/feature-ast/parse.js +3 -1
- package/dist/engine/feature-ast/patch.d.ts +2 -0
- package/dist/engine/feature-ast/patch.js +1 -0
- package/dist/engine/feature-ast/pattern-change-schema.d.ts +7 -245
- package/dist/engine/feature-ast/pattern-change-schema.js +9 -163
- package/dist/engine/feature-ast/pattern-id-matchers.js +1 -0
- package/dist/engine/feature-ast/pattern-id-schema.d.ts +251 -0
- package/dist/engine/feature-ast/pattern-id-schema.js +166 -0
- package/dist/engine/feature-ast/patterns.d.ts +5 -1
- package/dist/engine/feature-ast/patterns.js +1 -0
- package/dist/engine/feature-ast/render.js +4 -0
- package/dist/engine/feature-builder-state.d.ts +1 -0
- package/dist/engine/feature-builder-state.js +1 -0
- package/dist/engine/feature-manifest.d.ts +1 -0
- package/dist/engine/feature-manifest.js +1 -0
- package/dist/engine/field-access.d.ts +1 -0
- package/dist/engine/field-access.js +12 -0
- package/dist/engine/index.d.ts +2 -2
- package/dist/engine/index.js +1 -1
- package/dist/engine/pattern-library/library.js +2 -1
- package/dist/engine/pattern-library/static-schemas.d.ts +1 -0
- package/dist/engine/pattern-library/static-schemas.js +9 -0
- package/dist/engine/screen-filter-ops.js +2 -0
- package/dist/engine/strip-disabled-features-from-app-schema.js +7 -3
- package/dist/engine/types/feature.d.ts +1 -0
- package/dist/engine/types/index.d.ts +4 -3
- package/dist/engine/types/screen.d.ts +1 -1
- package/dist/engine/types/screen.js +1 -1
- package/dist/entrypoint/index.d.ts +2 -0
- package/dist/entrypoint/index.js +3 -0
- package/dist/event-store/event-store.d.ts +1 -0
- package/dist/event-store/event-store.js +7 -4
- package/dist/event-store/provenance-append.js +1 -1
- package/dist/files/create-file-ref-from-bytes.js +3 -0
- package/dist/files/create-file-ref.d.ts +3 -0
- package/dist/files/create-file-ref.js +11 -2
- package/dist/files/file-routes.d.ts +2 -0
- package/dist/files/file-routes.js +29 -2
- package/dist/files/provider-resolver.d.ts +1 -0
- package/dist/files/provider-resolver.js +1 -1
- package/dist/files/record-write-check.d.ts +6 -0
- package/dist/files/record-write-check.js +13 -0
- package/dist/files/upload-ledger.d.ts +2 -2
- package/dist/files/upload-ledger.js +4 -4
- package/dist/i18n/required-surface-keys.js +7 -2
- package/dist/internal/testing.js +1 -1
- package/dist/jobs/job-runner-scope.js +6 -6
- package/dist/jobs/job-runner.js +3 -0
- package/dist/observability/escape-hatch-report.js +9 -2
- package/dist/pipeline/after-rollback-sink.d.ts +6 -0
- package/dist/pipeline/after-rollback-sink.js +32 -0
- package/dist/pipeline/dispatch-batch.js +8 -1
- package/dist/pipeline/dispatch-shared.js +4 -0
- package/dist/pipeline/event-dispatcher-delivery.js +3 -1
- package/dist/pipeline/event-dispatcher.d.ts +1 -0
- package/dist/pipeline/event-dispatcher.js +6 -9
- package/dist/pipeline/handler-context-dispatch.d.ts +2 -0
- package/dist/pipeline/handler-context-dispatch.js +13 -1
- package/dist/pipeline/handler-context-events.d.ts +2 -4
- package/dist/pipeline/handler-context-events.js +6 -4
- package/dist/pipeline/system-hooks.d.ts +3 -1
- package/dist/pipeline/system-hooks.js +55 -6
- package/dist/pipeline/write-result-masking.js +13 -10
- package/dist/schema-cli/baseline-command.js +1 -1
- package/dist/schema-cli/status-command.js +1 -1
- package/dist/search/reindex-entity.js +15 -5
- package/dist/ui-types/index.d.ts +2 -2
- package/dist/ui-types/index.js +1 -1
- package/dist/upgrade-changelog.d.ts +2 -0
- package/dist/upgrade-changelog.js +14 -0
- package/dist/upgrade-cli.d.ts +3 -12
- package/dist/upgrade-cli.js +22 -76
- package/dist/upgrade-marker-parse.d.ts +32 -0
- package/dist/upgrade-marker-parse.js +73 -0
- package/package.json +9 -6
- package/src/changes.json +245 -0
- package/src/scripts/codemod/codemod-support.ts +1 -1
- package/src/scripts/codemod/db-factory.ts +1 -1
- package/dist/engine/provider-plugin-context.d.ts +0 -3
- package/dist/engine/provider-plugin-context.js +0 -28
|
@@ -28,6 +28,7 @@ import { describeUnknownFieldType, findUnknownEntityFieldTypes } from "./entity-
|
|
|
28
28
|
import { AGENT_RISK_VALUES } from "./extractors/handlers.js";
|
|
29
29
|
import { isPlainObject, isRawRefSentinel } from "./extractors/shared.js";
|
|
30
30
|
import { SYNTHETIC_LOC } from "./patcher.js";
|
|
31
|
+
import { patternIdSchema } from "./pattern-id-schema.js";
|
|
31
32
|
// Derives an exhaustive literal-value array from a `Record<T, true>` flag
|
|
32
33
|
// map: an added/removed union member fails to compile here instead of
|
|
33
34
|
// silently producing a schema narrower than the runtime type — same
|
|
@@ -406,6 +407,12 @@ const describeSchema = z
|
|
|
406
407
|
text: z.string().refine((s) => s.trim().length > 0, { message: "text must be non-empty" }),
|
|
407
408
|
})
|
|
408
409
|
.strict();
|
|
410
|
+
const adoptsBundledListsSchema = z
|
|
411
|
+
.object({
|
|
412
|
+
kind: z.literal("adoptsBundledLists"),
|
|
413
|
+
source: sourceFieldSchema,
|
|
414
|
+
})
|
|
415
|
+
.strict();
|
|
409
416
|
const uiHintsSchema = z
|
|
410
417
|
.object({
|
|
411
418
|
kind: z.literal("uiHints"),
|
|
@@ -728,6 +735,7 @@ export const PATTERN_SCHEMAS_BY_KIND = {
|
|
|
728
735
|
toggleable: toggleableSchema,
|
|
729
736
|
describe: describeSchema,
|
|
730
737
|
uiHints: uiHintsSchema,
|
|
738
|
+
adoptsBundledLists: adoptsBundledListsSchema,
|
|
731
739
|
metric: metricSchema,
|
|
732
740
|
secret: secretSchema,
|
|
733
741
|
secretNamespace: secretNamespaceSchema,
|
|
@@ -770,6 +778,7 @@ export const patternSchema = z.discriminatedUnion("kind", [
|
|
|
770
778
|
toggleableSchema,
|
|
771
779
|
describeSchema,
|
|
772
780
|
uiHintsSchema,
|
|
781
|
+
adoptsBundledListsSchema,
|
|
773
782
|
metricSchema,
|
|
774
783
|
secretSchema,
|
|
775
784
|
secretNamespaceSchema,
|
|
@@ -800,169 +809,6 @@ export const patternSchema = z.discriminatedUnion("kind", [
|
|
|
800
809
|
unknownPatternSchema,
|
|
801
810
|
]);
|
|
802
811
|
// =============================================================================
|
|
803
|
-
// PatternId union
|
|
804
|
-
// =============================================================================
|
|
805
|
-
const patternIdEntitySchema = z
|
|
806
|
-
.object({ kind: z.literal("entity"), entityName: z.string() })
|
|
807
|
-
.strict();
|
|
808
|
-
const patternIdRelationSchema = z
|
|
809
|
-
.object({ kind: z.literal("relation"), entityName: z.string(), relationName: z.string() })
|
|
810
|
-
.strict();
|
|
811
|
-
const patternIdNavSchema = z.object({ kind: z.literal("nav"), id: z.string() }).strict();
|
|
812
|
-
const patternIdWorkspaceSchema = z
|
|
813
|
-
.object({ kind: z.literal("workspace"), id: z.string() })
|
|
814
|
-
.strict();
|
|
815
|
-
const patternIdScreenSchema = z.object({ kind: z.literal("screen"), id: z.string() }).strict();
|
|
816
|
-
const patternIdWriteHandlerSchema = z
|
|
817
|
-
.object({ kind: z.literal("writeHandler"), handlerName: z.string() })
|
|
818
|
-
.strict();
|
|
819
|
-
const patternIdQueryHandlerSchema = z
|
|
820
|
-
.object({ kind: z.literal("queryHandler"), handlerName: z.string() })
|
|
821
|
-
.strict();
|
|
822
|
-
const patternIdStreamHandlerSchema = z
|
|
823
|
-
.object({ kind: z.literal("streamHandler"), handlerName: z.string() })
|
|
824
|
-
.strict();
|
|
825
|
-
const patternIdHookSchema = z
|
|
826
|
-
.object({
|
|
827
|
-
kind: z.literal("hook"),
|
|
828
|
-
hookType: z.string(),
|
|
829
|
-
target: z.union([z.string(), z.object({ allOf: z.string() }).strict()]),
|
|
830
|
-
})
|
|
831
|
-
.strict();
|
|
832
|
-
const patternIdMetricSchema = z
|
|
833
|
-
.object({ kind: z.literal("metric"), shortName: z.string() })
|
|
834
|
-
.strict();
|
|
835
|
-
const patternIdSecretSchema = z
|
|
836
|
-
.object({ kind: z.literal("secret"), shortName: z.string() })
|
|
837
|
-
.strict();
|
|
838
|
-
const patternIdSecretNamespaceSchema = z
|
|
839
|
-
.object({ kind: z.literal("secretNamespace"), shortName: z.string() })
|
|
840
|
-
.strict();
|
|
841
|
-
const patternIdClaimKeySchema = z
|
|
842
|
-
.object({ kind: z.literal("claimKey"), shortName: z.string() })
|
|
843
|
-
.strict();
|
|
844
|
-
const patternIdReferenceDataSchema = z
|
|
845
|
-
.object({ kind: z.literal("referenceData"), entityName: z.string() })
|
|
846
|
-
.strict();
|
|
847
|
-
const patternIdUseExtensionSchema = z
|
|
848
|
-
.object({ kind: z.literal("useExtension"), extensionName: z.string(), entityName: z.string() })
|
|
849
|
-
.strict();
|
|
850
|
-
const patternIdJobSchema = z.object({ kind: z.literal("job"), jobName: z.string() }).strict();
|
|
851
|
-
const patternIdNotificationSchema = z
|
|
852
|
-
.object({ kind: z.literal("notification"), notificationName: z.string() })
|
|
853
|
-
.strict();
|
|
854
|
-
const patternIdHttpRouteSchema = z
|
|
855
|
-
.object({ kind: z.literal("httpRoute"), method: z.string(), path: z.string() })
|
|
856
|
-
.strict();
|
|
857
|
-
const patternIdProjectionSchema = z
|
|
858
|
-
.object({ kind: z.literal("projection"), name: z.string() })
|
|
859
|
-
.strict();
|
|
860
|
-
const patternIdMultiStreamProjectionSchema = z
|
|
861
|
-
.object({ kind: z.literal("multiStreamProjection"), name: z.string() })
|
|
862
|
-
.strict();
|
|
863
|
-
const patternIdDefineEventSchema = z
|
|
864
|
-
.object({ kind: z.literal("defineEvent"), eventName: z.string() })
|
|
865
|
-
.strict();
|
|
866
|
-
const patternIdExtendsRegistrarSchema = z
|
|
867
|
-
.object({ kind: z.literal("extendsRegistrar"), extensionName: z.string() })
|
|
868
|
-
.strict();
|
|
869
|
-
const patternIdAiGenerateSchema = z
|
|
870
|
-
.object({ kind: z.literal("ai.generate"), stepKey: z.string() })
|
|
871
|
-
.strict();
|
|
872
|
-
const patternIdAiExtractSchema = z
|
|
873
|
-
.object({ kind: z.literal("ai.extract"), stepKey: z.string() })
|
|
874
|
-
.strict();
|
|
875
|
-
const patternIdAiClassifySchema = z
|
|
876
|
-
.object({ kind: z.literal("ai.classify"), stepKey: z.string() })
|
|
877
|
-
.strict();
|
|
878
|
-
const patternIdRequiresSchema = z.object({ kind: z.literal("requires") }).strict();
|
|
879
|
-
const patternIdOptionalRequiresSchema = z.object({ kind: z.literal("optionalRequires") }).strict();
|
|
880
|
-
const patternIdReadsConfigSchema = z.object({ kind: z.literal("readsConfig") }).strict();
|
|
881
|
-
const patternIdSystemScopeSchema = z.object({ kind: z.literal("systemScope") }).strict();
|
|
882
|
-
const patternIdToggleableSchema = z.object({ kind: z.literal("toggleable") }).strict();
|
|
883
|
-
const patternIdDescribeSchema = z.object({ kind: z.literal("describe") }).strict();
|
|
884
|
-
const patternIdUiHintsSchema = z.object({ kind: z.literal("uiHints") }).strict();
|
|
885
|
-
const patternIdConfigSchema = z.object({ kind: z.literal("config") }).strict();
|
|
886
|
-
const patternIdTranslationsSchema = z.object({ kind: z.literal("translations") }).strict();
|
|
887
|
-
const patternIdAuthClaimsSchema = z.object({ kind: z.literal("authClaims") }).strict();
|
|
888
|
-
const patternIdTreeActionsSchema = z.object({ kind: z.literal("treeActions") }).strict();
|
|
889
|
-
export const PATTERN_ID_SCHEMAS_BY_KIND = {
|
|
890
|
-
entity: patternIdEntitySchema,
|
|
891
|
-
relation: patternIdRelationSchema,
|
|
892
|
-
nav: patternIdNavSchema,
|
|
893
|
-
workspace: patternIdWorkspaceSchema,
|
|
894
|
-
screen: patternIdScreenSchema,
|
|
895
|
-
writeHandler: patternIdWriteHandlerSchema,
|
|
896
|
-
queryHandler: patternIdQueryHandlerSchema,
|
|
897
|
-
streamHandler: patternIdStreamHandlerSchema,
|
|
898
|
-
hook: patternIdHookSchema,
|
|
899
|
-
metric: patternIdMetricSchema,
|
|
900
|
-
secret: patternIdSecretSchema,
|
|
901
|
-
secretNamespace: patternIdSecretNamespaceSchema,
|
|
902
|
-
claimKey: patternIdClaimKeySchema,
|
|
903
|
-
referenceData: patternIdReferenceDataSchema,
|
|
904
|
-
useExtension: patternIdUseExtensionSchema,
|
|
905
|
-
job: patternIdJobSchema,
|
|
906
|
-
notification: patternIdNotificationSchema,
|
|
907
|
-
httpRoute: patternIdHttpRouteSchema,
|
|
908
|
-
projection: patternIdProjectionSchema,
|
|
909
|
-
multiStreamProjection: patternIdMultiStreamProjectionSchema,
|
|
910
|
-
defineEvent: patternIdDefineEventSchema,
|
|
911
|
-
extendsRegistrar: patternIdExtendsRegistrarSchema,
|
|
912
|
-
"ai.generate": patternIdAiGenerateSchema,
|
|
913
|
-
"ai.extract": patternIdAiExtractSchema,
|
|
914
|
-
"ai.classify": patternIdAiClassifySchema,
|
|
915
|
-
requires: patternIdRequiresSchema,
|
|
916
|
-
optionalRequires: patternIdOptionalRequiresSchema,
|
|
917
|
-
readsConfig: patternIdReadsConfigSchema,
|
|
918
|
-
systemScope: patternIdSystemScopeSchema,
|
|
919
|
-
toggleable: patternIdToggleableSchema,
|
|
920
|
-
describe: patternIdDescribeSchema,
|
|
921
|
-
uiHints: patternIdUiHintsSchema,
|
|
922
|
-
config: patternIdConfigSchema,
|
|
923
|
-
translations: patternIdTranslationsSchema,
|
|
924
|
-
authClaims: patternIdAuthClaimsSchema,
|
|
925
|
-
treeActions: patternIdTreeActionsSchema,
|
|
926
|
-
};
|
|
927
|
-
export const patternIdSchema = z.discriminatedUnion("kind", [
|
|
928
|
-
patternIdEntitySchema,
|
|
929
|
-
patternIdRelationSchema,
|
|
930
|
-
patternIdNavSchema,
|
|
931
|
-
patternIdWorkspaceSchema,
|
|
932
|
-
patternIdScreenSchema,
|
|
933
|
-
patternIdWriteHandlerSchema,
|
|
934
|
-
patternIdQueryHandlerSchema,
|
|
935
|
-
patternIdStreamHandlerSchema,
|
|
936
|
-
patternIdHookSchema,
|
|
937
|
-
patternIdMetricSchema,
|
|
938
|
-
patternIdSecretSchema,
|
|
939
|
-
patternIdSecretNamespaceSchema,
|
|
940
|
-
patternIdClaimKeySchema,
|
|
941
|
-
patternIdReferenceDataSchema,
|
|
942
|
-
patternIdUseExtensionSchema,
|
|
943
|
-
patternIdJobSchema,
|
|
944
|
-
patternIdNotificationSchema,
|
|
945
|
-
patternIdHttpRouteSchema,
|
|
946
|
-
patternIdProjectionSchema,
|
|
947
|
-
patternIdMultiStreamProjectionSchema,
|
|
948
|
-
patternIdDefineEventSchema,
|
|
949
|
-
patternIdExtendsRegistrarSchema,
|
|
950
|
-
patternIdAiGenerateSchema,
|
|
951
|
-
patternIdAiExtractSchema,
|
|
952
|
-
patternIdAiClassifySchema,
|
|
953
|
-
patternIdRequiresSchema,
|
|
954
|
-
patternIdOptionalRequiresSchema,
|
|
955
|
-
patternIdReadsConfigSchema,
|
|
956
|
-
patternIdSystemScopeSchema,
|
|
957
|
-
patternIdToggleableSchema,
|
|
958
|
-
patternIdDescribeSchema,
|
|
959
|
-
patternIdUiHintsSchema,
|
|
960
|
-
patternIdConfigSchema,
|
|
961
|
-
patternIdTranslationsSchema,
|
|
962
|
-
patternIdAuthClaimsSchema,
|
|
963
|
-
patternIdTreeActionsSchema,
|
|
964
|
-
]);
|
|
965
|
-
// =============================================================================
|
|
966
812
|
// Change union — `rationale` is accepted (optional, on every member) and
|
|
967
813
|
// dropped when the final PatternChange is assembled below (plain field
|
|
968
814
|
// selection, not a schema-level transform — see file-header rationale).
|
|
@@ -8,6 +8,7 @@ const PATTERN_ID_MATCHERS = {
|
|
|
8
8
|
toggleable: matchSingletonCall,
|
|
9
9
|
describe: matchSingletonCall,
|
|
10
10
|
uiHints: matchSingletonCall,
|
|
11
|
+
adoptsBundledLists: matchSingletonCall,
|
|
11
12
|
config: matchSingletonCall,
|
|
12
13
|
translations: matchSingletonCall,
|
|
13
14
|
authClaims: matchSingletonCall,
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const PATTERN_ID_SCHEMAS_BY_KIND: {
|
|
3
|
+
entity: z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"entity">;
|
|
5
|
+
entityName: z.ZodString;
|
|
6
|
+
}, z.core.$strict>;
|
|
7
|
+
relation: z.ZodObject<{
|
|
8
|
+
kind: z.ZodLiteral<"relation">;
|
|
9
|
+
entityName: z.ZodString;
|
|
10
|
+
relationName: z.ZodString;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
nav: z.ZodObject<{
|
|
13
|
+
kind: z.ZodLiteral<"nav">;
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
workspace: z.ZodObject<{
|
|
17
|
+
kind: z.ZodLiteral<"workspace">;
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
screen: z.ZodObject<{
|
|
21
|
+
kind: z.ZodLiteral<"screen">;
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
writeHandler: z.ZodObject<{
|
|
25
|
+
kind: z.ZodLiteral<"writeHandler">;
|
|
26
|
+
handlerName: z.ZodString;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
queryHandler: z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"queryHandler">;
|
|
30
|
+
handlerName: z.ZodString;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
streamHandler: z.ZodObject<{
|
|
33
|
+
kind: z.ZodLiteral<"streamHandler">;
|
|
34
|
+
handlerName: z.ZodString;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
hook: z.ZodObject<{
|
|
37
|
+
kind: z.ZodLiteral<"hook">;
|
|
38
|
+
hookType: z.ZodString;
|
|
39
|
+
target: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
40
|
+
allOf: z.ZodString;
|
|
41
|
+
}, z.core.$strict>]>;
|
|
42
|
+
}, z.core.$strict>;
|
|
43
|
+
metric: z.ZodObject<{
|
|
44
|
+
kind: z.ZodLiteral<"metric">;
|
|
45
|
+
shortName: z.ZodString;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
secret: z.ZodObject<{
|
|
48
|
+
kind: z.ZodLiteral<"secret">;
|
|
49
|
+
shortName: z.ZodString;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
secretNamespace: z.ZodObject<{
|
|
52
|
+
kind: z.ZodLiteral<"secretNamespace">;
|
|
53
|
+
shortName: z.ZodString;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
claimKey: z.ZodObject<{
|
|
56
|
+
kind: z.ZodLiteral<"claimKey">;
|
|
57
|
+
shortName: z.ZodString;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
referenceData: z.ZodObject<{
|
|
60
|
+
kind: z.ZodLiteral<"referenceData">;
|
|
61
|
+
entityName: z.ZodString;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
useExtension: z.ZodObject<{
|
|
64
|
+
kind: z.ZodLiteral<"useExtension">;
|
|
65
|
+
extensionName: z.ZodString;
|
|
66
|
+
entityName: z.ZodString;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
job: z.ZodObject<{
|
|
69
|
+
kind: z.ZodLiteral<"job">;
|
|
70
|
+
jobName: z.ZodString;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
notification: z.ZodObject<{
|
|
73
|
+
kind: z.ZodLiteral<"notification">;
|
|
74
|
+
notificationName: z.ZodString;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
httpRoute: z.ZodObject<{
|
|
77
|
+
kind: z.ZodLiteral<"httpRoute">;
|
|
78
|
+
method: z.ZodString;
|
|
79
|
+
path: z.ZodString;
|
|
80
|
+
}, z.core.$strict>;
|
|
81
|
+
projection: z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"projection">;
|
|
83
|
+
name: z.ZodString;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
multiStreamProjection: z.ZodObject<{
|
|
86
|
+
kind: z.ZodLiteral<"multiStreamProjection">;
|
|
87
|
+
name: z.ZodString;
|
|
88
|
+
}, z.core.$strict>;
|
|
89
|
+
defineEvent: z.ZodObject<{
|
|
90
|
+
kind: z.ZodLiteral<"defineEvent">;
|
|
91
|
+
eventName: z.ZodString;
|
|
92
|
+
}, z.core.$strict>;
|
|
93
|
+
extendsRegistrar: z.ZodObject<{
|
|
94
|
+
kind: z.ZodLiteral<"extendsRegistrar">;
|
|
95
|
+
extensionName: z.ZodString;
|
|
96
|
+
}, z.core.$strict>;
|
|
97
|
+
"ai.generate": z.ZodObject<{
|
|
98
|
+
kind: z.ZodLiteral<"ai.generate">;
|
|
99
|
+
stepKey: z.ZodString;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
"ai.extract": z.ZodObject<{
|
|
102
|
+
kind: z.ZodLiteral<"ai.extract">;
|
|
103
|
+
stepKey: z.ZodString;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
"ai.classify": z.ZodObject<{
|
|
106
|
+
kind: z.ZodLiteral<"ai.classify">;
|
|
107
|
+
stepKey: z.ZodString;
|
|
108
|
+
}, z.core.$strict>;
|
|
109
|
+
requires: z.ZodObject<{
|
|
110
|
+
kind: z.ZodLiteral<"requires">;
|
|
111
|
+
}, z.core.$strict>;
|
|
112
|
+
optionalRequires: z.ZodObject<{
|
|
113
|
+
kind: z.ZodLiteral<"optionalRequires">;
|
|
114
|
+
}, z.core.$strict>;
|
|
115
|
+
readsConfig: z.ZodObject<{
|
|
116
|
+
kind: z.ZodLiteral<"readsConfig">;
|
|
117
|
+
}, z.core.$strict>;
|
|
118
|
+
systemScope: z.ZodObject<{
|
|
119
|
+
kind: z.ZodLiteral<"systemScope">;
|
|
120
|
+
}, z.core.$strict>;
|
|
121
|
+
toggleable: z.ZodObject<{
|
|
122
|
+
kind: z.ZodLiteral<"toggleable">;
|
|
123
|
+
}, z.core.$strict>;
|
|
124
|
+
describe: z.ZodObject<{
|
|
125
|
+
kind: z.ZodLiteral<"describe">;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
uiHints: z.ZodObject<{
|
|
128
|
+
kind: z.ZodLiteral<"uiHints">;
|
|
129
|
+
}, z.core.$strict>;
|
|
130
|
+
adoptsBundledLists: z.ZodObject<{
|
|
131
|
+
kind: z.ZodLiteral<"adoptsBundledLists">;
|
|
132
|
+
}, z.core.$strict>;
|
|
133
|
+
config: z.ZodObject<{
|
|
134
|
+
kind: z.ZodLiteral<"config">;
|
|
135
|
+
}, z.core.$strict>;
|
|
136
|
+
translations: z.ZodObject<{
|
|
137
|
+
kind: z.ZodLiteral<"translations">;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
authClaims: z.ZodObject<{
|
|
140
|
+
kind: z.ZodLiteral<"authClaims">;
|
|
141
|
+
}, z.core.$strict>;
|
|
142
|
+
treeActions: z.ZodObject<{
|
|
143
|
+
kind: z.ZodLiteral<"treeActions">;
|
|
144
|
+
}, z.core.$strict>;
|
|
145
|
+
};
|
|
146
|
+
export declare const patternIdSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
147
|
+
kind: z.ZodLiteral<"entity">;
|
|
148
|
+
entityName: z.ZodString;
|
|
149
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
150
|
+
kind: z.ZodLiteral<"relation">;
|
|
151
|
+
entityName: z.ZodString;
|
|
152
|
+
relationName: z.ZodString;
|
|
153
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
154
|
+
kind: z.ZodLiteral<"nav">;
|
|
155
|
+
id: z.ZodString;
|
|
156
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
157
|
+
kind: z.ZodLiteral<"workspace">;
|
|
158
|
+
id: z.ZodString;
|
|
159
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
160
|
+
kind: z.ZodLiteral<"screen">;
|
|
161
|
+
id: z.ZodString;
|
|
162
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
163
|
+
kind: z.ZodLiteral<"writeHandler">;
|
|
164
|
+
handlerName: z.ZodString;
|
|
165
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
166
|
+
kind: z.ZodLiteral<"queryHandler">;
|
|
167
|
+
handlerName: z.ZodString;
|
|
168
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
169
|
+
kind: z.ZodLiteral<"streamHandler">;
|
|
170
|
+
handlerName: z.ZodString;
|
|
171
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
172
|
+
kind: z.ZodLiteral<"hook">;
|
|
173
|
+
hookType: z.ZodString;
|
|
174
|
+
target: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
175
|
+
allOf: z.ZodString;
|
|
176
|
+
}, z.core.$strict>]>;
|
|
177
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
178
|
+
kind: z.ZodLiteral<"metric">;
|
|
179
|
+
shortName: z.ZodString;
|
|
180
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
181
|
+
kind: z.ZodLiteral<"secret">;
|
|
182
|
+
shortName: z.ZodString;
|
|
183
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
184
|
+
kind: z.ZodLiteral<"secretNamespace">;
|
|
185
|
+
shortName: z.ZodString;
|
|
186
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
187
|
+
kind: z.ZodLiteral<"claimKey">;
|
|
188
|
+
shortName: z.ZodString;
|
|
189
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
190
|
+
kind: z.ZodLiteral<"referenceData">;
|
|
191
|
+
entityName: z.ZodString;
|
|
192
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
193
|
+
kind: z.ZodLiteral<"useExtension">;
|
|
194
|
+
extensionName: z.ZodString;
|
|
195
|
+
entityName: z.ZodString;
|
|
196
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
197
|
+
kind: z.ZodLiteral<"job">;
|
|
198
|
+
jobName: z.ZodString;
|
|
199
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
200
|
+
kind: z.ZodLiteral<"notification">;
|
|
201
|
+
notificationName: z.ZodString;
|
|
202
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
203
|
+
kind: z.ZodLiteral<"httpRoute">;
|
|
204
|
+
method: z.ZodString;
|
|
205
|
+
path: z.ZodString;
|
|
206
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
207
|
+
kind: z.ZodLiteral<"projection">;
|
|
208
|
+
name: z.ZodString;
|
|
209
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
210
|
+
kind: z.ZodLiteral<"multiStreamProjection">;
|
|
211
|
+
name: z.ZodString;
|
|
212
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
213
|
+
kind: z.ZodLiteral<"defineEvent">;
|
|
214
|
+
eventName: z.ZodString;
|
|
215
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
216
|
+
kind: z.ZodLiteral<"extendsRegistrar">;
|
|
217
|
+
extensionName: z.ZodString;
|
|
218
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
219
|
+
kind: z.ZodLiteral<"ai.generate">;
|
|
220
|
+
stepKey: z.ZodString;
|
|
221
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
222
|
+
kind: z.ZodLiteral<"ai.extract">;
|
|
223
|
+
stepKey: z.ZodString;
|
|
224
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
225
|
+
kind: z.ZodLiteral<"ai.classify">;
|
|
226
|
+
stepKey: z.ZodString;
|
|
227
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
228
|
+
kind: z.ZodLiteral<"requires">;
|
|
229
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
230
|
+
kind: z.ZodLiteral<"optionalRequires">;
|
|
231
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
232
|
+
kind: z.ZodLiteral<"readsConfig">;
|
|
233
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
234
|
+
kind: z.ZodLiteral<"systemScope">;
|
|
235
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
236
|
+
kind: z.ZodLiteral<"adoptsBundledLists">;
|
|
237
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
238
|
+
kind: z.ZodLiteral<"toggleable">;
|
|
239
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
240
|
+
kind: z.ZodLiteral<"describe">;
|
|
241
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
242
|
+
kind: z.ZodLiteral<"uiHints">;
|
|
243
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
244
|
+
kind: z.ZodLiteral<"config">;
|
|
245
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
246
|
+
kind: z.ZodLiteral<"translations">;
|
|
247
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
248
|
+
kind: z.ZodLiteral<"authClaims">;
|
|
249
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
250
|
+
kind: z.ZodLiteral<"treeActions">;
|
|
251
|
+
}, z.core.$strict>], "kind">;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
const patternIdEntitySchema = z
|
|
3
|
+
.object({ kind: z.literal("entity"), entityName: z.string() })
|
|
4
|
+
.strict();
|
|
5
|
+
const patternIdRelationSchema = z
|
|
6
|
+
.object({ kind: z.literal("relation"), entityName: z.string(), relationName: z.string() })
|
|
7
|
+
.strict();
|
|
8
|
+
const patternIdNavSchema = z.object({ kind: z.literal("nav"), id: z.string() }).strict();
|
|
9
|
+
const patternIdWorkspaceSchema = z
|
|
10
|
+
.object({ kind: z.literal("workspace"), id: z.string() })
|
|
11
|
+
.strict();
|
|
12
|
+
const patternIdScreenSchema = z.object({ kind: z.literal("screen"), id: z.string() }).strict();
|
|
13
|
+
const patternIdWriteHandlerSchema = z
|
|
14
|
+
.object({ kind: z.literal("writeHandler"), handlerName: z.string() })
|
|
15
|
+
.strict();
|
|
16
|
+
const patternIdQueryHandlerSchema = z
|
|
17
|
+
.object({ kind: z.literal("queryHandler"), handlerName: z.string() })
|
|
18
|
+
.strict();
|
|
19
|
+
const patternIdStreamHandlerSchema = z
|
|
20
|
+
.object({ kind: z.literal("streamHandler"), handlerName: z.string() })
|
|
21
|
+
.strict();
|
|
22
|
+
const patternIdHookSchema = z
|
|
23
|
+
.object({
|
|
24
|
+
kind: z.literal("hook"),
|
|
25
|
+
hookType: z.string(),
|
|
26
|
+
target: z.union([z.string(), z.object({ allOf: z.string() }).strict()]),
|
|
27
|
+
})
|
|
28
|
+
.strict();
|
|
29
|
+
const patternIdMetricSchema = z
|
|
30
|
+
.object({ kind: z.literal("metric"), shortName: z.string() })
|
|
31
|
+
.strict();
|
|
32
|
+
const patternIdSecretSchema = z
|
|
33
|
+
.object({ kind: z.literal("secret"), shortName: z.string() })
|
|
34
|
+
.strict();
|
|
35
|
+
const patternIdSecretNamespaceSchema = z
|
|
36
|
+
.object({ kind: z.literal("secretNamespace"), shortName: z.string() })
|
|
37
|
+
.strict();
|
|
38
|
+
const patternIdClaimKeySchema = z
|
|
39
|
+
.object({ kind: z.literal("claimKey"), shortName: z.string() })
|
|
40
|
+
.strict();
|
|
41
|
+
const patternIdReferenceDataSchema = z
|
|
42
|
+
.object({ kind: z.literal("referenceData"), entityName: z.string() })
|
|
43
|
+
.strict();
|
|
44
|
+
const patternIdUseExtensionSchema = z
|
|
45
|
+
.object({ kind: z.literal("useExtension"), extensionName: z.string(), entityName: z.string() })
|
|
46
|
+
.strict();
|
|
47
|
+
const patternIdJobSchema = z.object({ kind: z.literal("job"), jobName: z.string() }).strict();
|
|
48
|
+
const patternIdNotificationSchema = z
|
|
49
|
+
.object({ kind: z.literal("notification"), notificationName: z.string() })
|
|
50
|
+
.strict();
|
|
51
|
+
const patternIdHttpRouteSchema = z
|
|
52
|
+
.object({ kind: z.literal("httpRoute"), method: z.string(), path: z.string() })
|
|
53
|
+
.strict();
|
|
54
|
+
const patternIdProjectionSchema = z
|
|
55
|
+
.object({ kind: z.literal("projection"), name: z.string() })
|
|
56
|
+
.strict();
|
|
57
|
+
const patternIdMultiStreamProjectionSchema = z
|
|
58
|
+
.object({ kind: z.literal("multiStreamProjection"), name: z.string() })
|
|
59
|
+
.strict();
|
|
60
|
+
const patternIdDefineEventSchema = z
|
|
61
|
+
.object({ kind: z.literal("defineEvent"), eventName: z.string() })
|
|
62
|
+
.strict();
|
|
63
|
+
const patternIdExtendsRegistrarSchema = z
|
|
64
|
+
.object({ kind: z.literal("extendsRegistrar"), extensionName: z.string() })
|
|
65
|
+
.strict();
|
|
66
|
+
const patternIdAiGenerateSchema = z
|
|
67
|
+
.object({ kind: z.literal("ai.generate"), stepKey: z.string() })
|
|
68
|
+
.strict();
|
|
69
|
+
const patternIdAiExtractSchema = z
|
|
70
|
+
.object({ kind: z.literal("ai.extract"), stepKey: z.string() })
|
|
71
|
+
.strict();
|
|
72
|
+
const patternIdAiClassifySchema = z
|
|
73
|
+
.object({ kind: z.literal("ai.classify"), stepKey: z.string() })
|
|
74
|
+
.strict();
|
|
75
|
+
const patternIdRequiresSchema = z.object({ kind: z.literal("requires") }).strict();
|
|
76
|
+
const patternIdOptionalRequiresSchema = z.object({ kind: z.literal("optionalRequires") }).strict();
|
|
77
|
+
const patternIdReadsConfigSchema = z.object({ kind: z.literal("readsConfig") }).strict();
|
|
78
|
+
const patternIdSystemScopeSchema = z.object({ kind: z.literal("systemScope") }).strict();
|
|
79
|
+
const patternIdToggleableSchema = z.object({ kind: z.literal("toggleable") }).strict();
|
|
80
|
+
const patternIdDescribeSchema = z.object({ kind: z.literal("describe") }).strict();
|
|
81
|
+
const patternIdUiHintsSchema = z.object({ kind: z.literal("uiHints") }).strict();
|
|
82
|
+
const patternIdAdoptsBundledListsSchema = z
|
|
83
|
+
.object({ kind: z.literal("adoptsBundledLists") })
|
|
84
|
+
.strict();
|
|
85
|
+
const patternIdConfigSchema = z.object({ kind: z.literal("config") }).strict();
|
|
86
|
+
const patternIdTranslationsSchema = z.object({ kind: z.literal("translations") }).strict();
|
|
87
|
+
const patternIdAuthClaimsSchema = z.object({ kind: z.literal("authClaims") }).strict();
|
|
88
|
+
const patternIdTreeActionsSchema = z.object({ kind: z.literal("treeActions") }).strict();
|
|
89
|
+
export const PATTERN_ID_SCHEMAS_BY_KIND = {
|
|
90
|
+
entity: patternIdEntitySchema,
|
|
91
|
+
relation: patternIdRelationSchema,
|
|
92
|
+
nav: patternIdNavSchema,
|
|
93
|
+
workspace: patternIdWorkspaceSchema,
|
|
94
|
+
screen: patternIdScreenSchema,
|
|
95
|
+
writeHandler: patternIdWriteHandlerSchema,
|
|
96
|
+
queryHandler: patternIdQueryHandlerSchema,
|
|
97
|
+
streamHandler: patternIdStreamHandlerSchema,
|
|
98
|
+
hook: patternIdHookSchema,
|
|
99
|
+
metric: patternIdMetricSchema,
|
|
100
|
+
secret: patternIdSecretSchema,
|
|
101
|
+
secretNamespace: patternIdSecretNamespaceSchema,
|
|
102
|
+
claimKey: patternIdClaimKeySchema,
|
|
103
|
+
referenceData: patternIdReferenceDataSchema,
|
|
104
|
+
useExtension: patternIdUseExtensionSchema,
|
|
105
|
+
job: patternIdJobSchema,
|
|
106
|
+
notification: patternIdNotificationSchema,
|
|
107
|
+
httpRoute: patternIdHttpRouteSchema,
|
|
108
|
+
projection: patternIdProjectionSchema,
|
|
109
|
+
multiStreamProjection: patternIdMultiStreamProjectionSchema,
|
|
110
|
+
defineEvent: patternIdDefineEventSchema,
|
|
111
|
+
extendsRegistrar: patternIdExtendsRegistrarSchema,
|
|
112
|
+
"ai.generate": patternIdAiGenerateSchema,
|
|
113
|
+
"ai.extract": patternIdAiExtractSchema,
|
|
114
|
+
"ai.classify": patternIdAiClassifySchema,
|
|
115
|
+
requires: patternIdRequiresSchema,
|
|
116
|
+
optionalRequires: patternIdOptionalRequiresSchema,
|
|
117
|
+
readsConfig: patternIdReadsConfigSchema,
|
|
118
|
+
systemScope: patternIdSystemScopeSchema,
|
|
119
|
+
toggleable: patternIdToggleableSchema,
|
|
120
|
+
describe: patternIdDescribeSchema,
|
|
121
|
+
uiHints: patternIdUiHintsSchema,
|
|
122
|
+
adoptsBundledLists: patternIdAdoptsBundledListsSchema,
|
|
123
|
+
config: patternIdConfigSchema,
|
|
124
|
+
translations: patternIdTranslationsSchema,
|
|
125
|
+
authClaims: patternIdAuthClaimsSchema,
|
|
126
|
+
treeActions: patternIdTreeActionsSchema,
|
|
127
|
+
};
|
|
128
|
+
export const patternIdSchema = z.discriminatedUnion("kind", [
|
|
129
|
+
patternIdEntitySchema,
|
|
130
|
+
patternIdRelationSchema,
|
|
131
|
+
patternIdNavSchema,
|
|
132
|
+
patternIdWorkspaceSchema,
|
|
133
|
+
patternIdScreenSchema,
|
|
134
|
+
patternIdWriteHandlerSchema,
|
|
135
|
+
patternIdQueryHandlerSchema,
|
|
136
|
+
patternIdStreamHandlerSchema,
|
|
137
|
+
patternIdHookSchema,
|
|
138
|
+
patternIdMetricSchema,
|
|
139
|
+
patternIdSecretSchema,
|
|
140
|
+
patternIdSecretNamespaceSchema,
|
|
141
|
+
patternIdClaimKeySchema,
|
|
142
|
+
patternIdReferenceDataSchema,
|
|
143
|
+
patternIdUseExtensionSchema,
|
|
144
|
+
patternIdJobSchema,
|
|
145
|
+
patternIdNotificationSchema,
|
|
146
|
+
patternIdHttpRouteSchema,
|
|
147
|
+
patternIdProjectionSchema,
|
|
148
|
+
patternIdMultiStreamProjectionSchema,
|
|
149
|
+
patternIdDefineEventSchema,
|
|
150
|
+
patternIdExtendsRegistrarSchema,
|
|
151
|
+
patternIdAiGenerateSchema,
|
|
152
|
+
patternIdAiExtractSchema,
|
|
153
|
+
patternIdAiClassifySchema,
|
|
154
|
+
patternIdRequiresSchema,
|
|
155
|
+
patternIdOptionalRequiresSchema,
|
|
156
|
+
patternIdReadsConfigSchema,
|
|
157
|
+
patternIdSystemScopeSchema,
|
|
158
|
+
patternIdAdoptsBundledListsSchema,
|
|
159
|
+
patternIdToggleableSchema,
|
|
160
|
+
patternIdDescribeSchema,
|
|
161
|
+
patternIdUiHintsSchema,
|
|
162
|
+
patternIdConfigSchema,
|
|
163
|
+
patternIdTranslationsSchema,
|
|
164
|
+
patternIdAuthClaimsSchema,
|
|
165
|
+
patternIdTreeActionsSchema,
|
|
166
|
+
]);
|
|
@@ -61,6 +61,10 @@ export type SystemScopePattern = {
|
|
|
61
61
|
readonly kind: "systemScope";
|
|
62
62
|
readonly source: SourceLocation;
|
|
63
63
|
};
|
|
64
|
+
export type AdoptsBundledListsPattern = {
|
|
65
|
+
readonly kind: "adoptsBundledLists";
|
|
66
|
+
readonly source: SourceLocation;
|
|
67
|
+
};
|
|
64
68
|
export type ToggleablePattern = {
|
|
65
69
|
readonly kind: "toggleable";
|
|
66
70
|
readonly source: SourceLocation;
|
|
@@ -303,7 +307,7 @@ export type UnknownPattern = {
|
|
|
303
307
|
readonly source: SourceLocation;
|
|
304
308
|
readonly methodName: string;
|
|
305
309
|
};
|
|
306
|
-
export type FeaturePattern = EntityPattern | RelationPattern | NavPattern | WorkspacePattern | ConfigPattern | TranslationsPattern | RequiresPattern | OptionalRequiresPattern | SystemScopePattern | ToggleablePattern | DescribePattern | UiHintsPattern | MetricPattern | SecretPattern | SecretNamespacePattern | ClaimKeyPattern | ReferenceDataPattern | ReadsConfigPattern | UseExtensionPattern | UsesApiPattern | ExposesApiPattern | TreeActionsPattern | ScreenPattern | WriteHandlerPattern | QueryHandlerPattern | StreamHandlerPattern | HookPattern | JobPattern | NotificationPattern | AuthClaimsPattern | HttpRoutePattern | ProjectionPattern | MultiStreamProjectionPattern | DefineEventPattern | ExtendsRegistrarPattern | EnvSchemaPattern | AiGeneratePattern | AiExtractPattern | AiClassifyPattern | UnknownPattern;
|
|
310
|
+
export type FeaturePattern = EntityPattern | RelationPattern | NavPattern | WorkspacePattern | ConfigPattern | TranslationsPattern | RequiresPattern | OptionalRequiresPattern | SystemScopePattern | AdoptsBundledListsPattern | ToggleablePattern | DescribePattern | UiHintsPattern | MetricPattern | SecretPattern | SecretNamespacePattern | ClaimKeyPattern | ReferenceDataPattern | ReadsConfigPattern | UseExtensionPattern | UsesApiPattern | ExposesApiPattern | TreeActionsPattern | ScreenPattern | WriteHandlerPattern | QueryHandlerPattern | StreamHandlerPattern | HookPattern | JobPattern | NotificationPattern | AuthClaimsPattern | HttpRoutePattern | ProjectionPattern | MultiStreamProjectionPattern | DefineEventPattern | ExtendsRegistrarPattern | EnvSchemaPattern | AiGeneratePattern | AiExtractPattern | AiClassifyPattern | UnknownPattern;
|
|
307
311
|
export type FeaturePatternKind = FeaturePattern["kind"];
|
|
308
312
|
export type MembersByKind<U extends {
|
|
309
313
|
readonly kind: string;
|
|
@@ -40,6 +40,7 @@ const PATTERN_RENDERERS = {
|
|
|
40
40
|
toggleable: renderToggleable,
|
|
41
41
|
describe: renderDescribe,
|
|
42
42
|
uiHints: renderUiHints,
|
|
43
|
+
adoptsBundledLists: renderAdoptsBundledLists,
|
|
43
44
|
entity: renderEntity,
|
|
44
45
|
relation: renderRelation,
|
|
45
46
|
nav: renderNav,
|
|
@@ -155,6 +156,9 @@ function renderReadsConfig(p) {
|
|
|
155
156
|
function renderSystemScope(_p) {
|
|
156
157
|
return "r.systemScope();";
|
|
157
158
|
}
|
|
159
|
+
function renderAdoptsBundledLists(_p) {
|
|
160
|
+
return "r.adoptsBundledLists();";
|
|
161
|
+
}
|
|
158
162
|
function renderToggleable(p) {
|
|
159
163
|
return `r.toggleable({ default: ${p.default} });`;
|
|
160
164
|
}
|
|
@@ -57,6 +57,7 @@ export type FeatureBuilderState = {
|
|
|
57
57
|
translations: TranslationKeys;
|
|
58
58
|
isSystemScoped: boolean;
|
|
59
59
|
toggleableDefault: boolean | undefined;
|
|
60
|
+
adoptsBundledLists: boolean;
|
|
60
61
|
description: string | undefined;
|
|
61
62
|
uiHints: UiHints | undefined;
|
|
62
63
|
treeActions: Readonly<Record<string, TreeActionDef>> | undefined;
|