@lssm/lib.contracts 1.41.0 → 1.42.1
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/LICENSE +21 -0
- package/README.md +7 -4
- package/dist/_virtual/rolldown_runtime.js +37 -1
- package/dist/app-config/app-config.feature.d.ts +11 -0
- package/dist/app-config/app-config.feature.js +54 -1
- package/dist/app-config/branding.d.ts +55 -0
- package/dist/app-config/contracts.d.ts +245 -0
- package/dist/app-config/contracts.js +395 -1
- package/dist/app-config/docs/app-config.docblock.d.ts +6 -0
- package/dist/app-config/docs/app-config.docblock.js +21 -220
- package/dist/app-config/events.d.ts +122 -0
- package/dist/app-config/events.js +174 -1
- package/dist/app-config/index.d.ts +9 -0
- package/dist/app-config/index.js +8 -1
- package/dist/app-config/lifecycle-contracts.d.ts +273 -0
- package/dist/app-config/lifecycle-contracts.js +440 -1
- package/dist/app-config/lifecycle.d.ts +27 -0
- package/dist/app-config/runtime.d.ts +117 -0
- package/dist/app-config/runtime.js +617 -1
- package/dist/app-config/spec.d.ts +172 -0
- package/dist/app-config/spec.js +36 -1
- package/dist/app-config/validation.d.ts +49 -0
- package/dist/app-config/validation.js +538 -1
- package/dist/capabilities/capabilities.d.ts +48 -0
- package/dist/capabilities/capabilities.js +50 -0
- package/dist/capabilities/docs/capabilities.docblock.d.ts +6 -0
- package/dist/capabilities/docs/capabilities.docblock.js +21 -1
- package/dist/capabilities/index.d.ts +3 -0
- package/dist/capabilities/index.js +4 -0
- package/dist/capabilities/openbanking.d.ts +10 -0
- package/dist/capabilities/openbanking.js +92 -1
- package/dist/client/index.d.ts +6 -0
- package/dist/client/index.js +9 -1
- package/dist/client/react/drivers/rn-reusables.d.ts +22 -0
- package/dist/client/react/drivers/rn-reusables.js +21 -1
- package/dist/client/react/drivers/shadcn.d.ts +12 -0
- package/dist/client/react/drivers/shadcn.js +11 -1
- package/dist/client/react/feature-render.d.ts +21 -0
- package/dist/client/react/feature-render.js +44 -1
- package/dist/client/react/form-render.d.ts +92 -0
- package/dist/client/react/form-render.js +298 -1
- package/dist/client/react/index.d.ts +5 -0
- package/dist/client/react/index.js +8 -1
- package/dist/contract-registry/index.d.ts +3 -0
- package/dist/contract-registry/index.js +3 -1
- package/dist/contract-registry/schemas.d.ts +124 -0
- package/dist/contract-registry/schemas.js +61 -1
- package/dist/contract-registry/types.d.ts +46 -0
- package/dist/data-views/data-views.d.ts +138 -0
- package/dist/data-views/data-views.js +58 -0
- package/dist/data-views/docs/data-views.docblock.d.ts +6 -0
- package/dist/data-views/docs/data-views.docblock.js +21 -1
- package/dist/data-views/index.d.ts +4 -0
- package/dist/data-views/index.js +5 -0
- package/dist/data-views/query-generator.d.ts +40 -0
- package/dist/data-views/query-generator.js +48 -1
- package/dist/data-views/runtime.d.ts +27 -0
- package/dist/data-views/runtime.js +39 -1
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.d.ts +6 -0
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.js +17 -350
- package/dist/docs/index.d.ts +6 -0
- package/dist/docs/index.js +27 -1
- package/dist/docs/meta.docs.d.ts +6 -0
- package/dist/docs/meta.docs.js +18 -2
- package/dist/docs/presentations.d.ts +33 -0
- package/dist/docs/presentations.js +64 -1
- package/dist/docs/registry.d.ts +23 -0
- package/dist/docs/registry.js +51 -1
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.d.ts +6 -0
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.js +25 -2
- package/dist/docs/tech/contracts/README.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/README.docblock.js +21 -1
- package/dist/docs/tech/contracts/create-subscription.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/create-subscription.docblock.js +21 -1
- package/dist/docs/tech/contracts/graphql-typed-outputs.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/graphql-typed-outputs.docblock.js +21 -180
- package/dist/docs/tech/contracts/migrations.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/migrations.docblock.js +21 -1
- package/dist/docs/tech/contracts/openapi-export.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/openapi-export.docblock.js +25 -5
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +19 -60
- package/dist/docs/tech/contracts/overlays.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/overlays.docblock.js +21 -68
- package/dist/docs/tech/contracts/tests.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/tests.docblock.js +21 -132
- package/dist/docs/tech/contracts/themes.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/themes.docblock.js +21 -1
- package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.js +21 -106
- package/dist/docs/tech/lifecycle-stage-system.docblock.d.ts +6 -0
- package/dist/docs/tech/lifecycle-stage-system.docblock.js +17 -213
- package/dist/docs/tech/llm/llm-integration.docblock.d.ts +7 -0
- package/dist/docs/tech/llm/llm-integration.docblock.js +76 -7
- package/dist/docs/tech/mcp-endpoints.docblock.d.ts +6 -0
- package/dist/docs/tech/mcp-endpoints.docblock.js +38 -1
- package/dist/docs/tech/presentation-runtime.docblock.d.ts +6 -0
- package/dist/docs/tech/presentation-runtime.docblock.js +17 -1
- package/dist/docs/tech/schema/README.docblock.d.ts +6 -0
- package/dist/docs/tech/schema/README.docblock.js +21 -262
- package/dist/docs/tech/studio/learning-events.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/learning-events.docblock.js +49 -1
- package/dist/docs/tech/studio/learning-journeys.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/learning-journeys.docblock.js +25 -2
- package/dist/docs/tech/studio/platform-admin-panel.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/platform-admin-panel.docblock.js +24 -2
- package/dist/docs/tech/studio/project-access-teams.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/project-access-teams.docblock.js +26 -16
- package/dist/docs/tech/studio/project-routing.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/project-routing.docblock.js +68 -1
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.js +23 -2
- package/dist/docs/tech/studio/team-invitations.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/team-invitations.docblock.js +41 -36
- package/dist/docs/tech/studio/workspace-ops.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/workspace-ops.docblock.js +48 -1
- package/dist/docs/tech/studio/workspaces.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/workspaces.docblock.js +24 -2
- package/dist/docs/tech/telemetry-ingest.docblock.d.ts +6 -0
- package/dist/docs/tech/telemetry-ingest.docblock.js +37 -3
- package/dist/docs/tech/templates/runtime.docblock.d.ts +6 -0
- package/dist/docs/tech/templates/runtime.docblock.js +21 -1
- package/dist/docs/tech/vscode-extension.docblock.d.ts +6 -0
- package/dist/docs/tech/vscode-extension.docblock.js +37 -3
- package/dist/docs/tech/workflows/overview.docblock.d.ts +6 -0
- package/dist/docs/tech/workflows/overview.docblock.js +21 -1
- package/dist/docs/tech-contracts.docs.d.ts +6 -0
- package/dist/docs/tech-contracts.docs.js +27 -7
- package/dist/docs/types.d.ts +41 -0
- package/dist/events.d.ts +47 -0
- package/dist/events.js +19 -1
- package/dist/experiments/docs/experiments.docblock.d.ts +6 -0
- package/dist/experiments/docs/experiments.docblock.js +21 -128
- package/dist/experiments/evaluator.d.ts +37 -0
- package/dist/experiments/evaluator.js +101 -1
- package/dist/experiments/spec-resolver.d.ts +17 -0
- package/dist/experiments/spec.d.ts +82 -0
- package/dist/experiments/spec.js +33 -1
- package/dist/features.d.ts +104 -0
- package/dist/features.js +91 -1
- package/dist/forms/docs/forms.docblock.d.ts +6 -0
- package/dist/forms/docs/forms.docblock.js +21 -1
- package/dist/forms/forms.d.ts +266 -0
- package/dist/forms/forms.js +146 -0
- package/dist/forms/index.d.ts +2 -0
- package/dist/forms/index.js +3 -0
- package/dist/index.d.ts +142 -0
- package/dist/index.js +119 -1
- package/dist/install.d.ts +77 -0
- package/dist/install.js +40 -1
- package/dist/integrations/binding.d.ts +17 -0
- package/dist/integrations/connection.d.ts +51 -0
- package/dist/integrations/docs/integrations.docblock.d.ts +6 -0
- package/dist/integrations/docs/integrations.docblock.js +94 -1
- package/dist/integrations/health.d.ts +21 -0
- package/dist/integrations/health.js +69 -1
- package/dist/integrations/index.d.ts +34 -0
- package/dist/integrations/index.js +23 -1
- package/dist/integrations/integrations.feature.d.ts +11 -0
- package/dist/integrations/integrations.feature.js +60 -0
- package/dist/integrations/openbanking/contracts/accounts.d.ts +289 -0
- package/dist/integrations/openbanking/contracts/accounts.js +236 -1
- package/dist/integrations/openbanking/contracts/balances.d.ts +165 -0
- package/dist/integrations/openbanking/contracts/balances.js +166 -1
- package/dist/integrations/openbanking/contracts/index.d.ts +10 -0
- package/dist/integrations/openbanking/contracts/index.js +12 -1
- package/dist/integrations/openbanking/contracts/transactions.d.ts +213 -0
- package/dist/integrations/openbanking/contracts/transactions.js +217 -1
- package/dist/integrations/openbanking/guards.d.ts +12 -0
- package/dist/integrations/openbanking/guards.js +33 -1
- package/dist/integrations/openbanking/models.d.ts +228 -0
- package/dist/integrations/openbanking/models.js +240 -1
- package/dist/integrations/openbanking/openbanking.feature.d.ts +11 -0
- package/dist/integrations/openbanking/openbanking.feature.js +69 -1
- package/dist/integrations/openbanking/telemetry.d.ts +15 -0
- package/dist/integrations/openbanking/telemetry.js +39 -1
- package/dist/integrations/operations.d.ts +437 -0
- package/dist/integrations/operations.js +392 -0
- package/dist/integrations/providers/calendar.d.ts +78 -0
- package/dist/integrations/providers/elevenlabs.d.ts +7 -0
- package/dist/integrations/providers/elevenlabs.js +55 -1
- package/dist/integrations/providers/email.d.ts +86 -0
- package/dist/integrations/providers/embedding.d.ts +24 -0
- package/dist/integrations/providers/gcs-storage.d.ts +7 -0
- package/dist/integrations/providers/gcs-storage.js +78 -1
- package/dist/integrations/providers/gmail.d.ts +7 -0
- package/dist/integrations/providers/gmail.js +90 -1
- package/dist/integrations/providers/google-calendar.d.ts +7 -0
- package/dist/integrations/providers/google-calendar.js +69 -1
- package/dist/integrations/providers/impls/elevenlabs-voice.d.ts +20 -0
- package/dist/integrations/providers/impls/elevenlabs-voice.js +95 -1
- package/dist/integrations/providers/impls/gcs-storage.d.ts +24 -0
- package/dist/integrations/providers/impls/gcs-storage.js +88 -1
- package/dist/integrations/providers/impls/gmail-inbound.d.ts +26 -0
- package/dist/integrations/providers/impls/gmail-inbound.js +200 -1
- package/dist/integrations/providers/impls/gmail-outbound.d.ts +18 -0
- package/dist/integrations/providers/impls/gmail-outbound.js +104 -5
- package/dist/integrations/providers/impls/google-calendar.d.ts +23 -0
- package/dist/integrations/providers/impls/google-calendar.js +154 -1
- package/dist/integrations/providers/impls/index.d.ts +15 -0
- package/dist/integrations/providers/impls/index.js +16 -1
- package/dist/integrations/providers/impls/mistral-embedding.d.ts +23 -0
- package/dist/integrations/providers/impls/mistral-embedding.js +41 -1
- package/dist/integrations/providers/impls/mistral-llm.d.ts +31 -0
- package/dist/integrations/providers/impls/mistral-llm.js +247 -1
- package/dist/integrations/providers/impls/postmark-email.d.ts +19 -0
- package/dist/integrations/providers/impls/postmark-email.js +55 -1
- package/dist/integrations/providers/impls/powens-client.d.ts +124 -0
- package/dist/integrations/providers/impls/powens-client.js +171 -1
- package/dist/integrations/providers/impls/powens-openbanking.d.ts +27 -0
- package/dist/integrations/providers/impls/powens-openbanking.js +218 -1
- package/dist/integrations/providers/impls/provider-factory.d.ts +26 -0
- package/dist/integrations/providers/impls/provider-factory.js +145 -1
- package/dist/integrations/providers/impls/qdrant-vector.d.ts +24 -0
- package/dist/integrations/providers/impls/qdrant-vector.js +69 -1
- package/dist/integrations/providers/impls/stripe-payments.d.ts +28 -0
- package/dist/integrations/providers/impls/stripe-payments.js +202 -1
- package/dist/integrations/providers/impls/twilio-sms.d.ts +20 -0
- package/dist/integrations/providers/impls/twilio-sms.js +58 -1
- package/dist/integrations/providers/index.d.ts +22 -0
- package/dist/integrations/providers/index.js +13 -1
- package/dist/integrations/providers/llm.d.ts +82 -0
- package/dist/integrations/providers/mistral.d.ts +7 -0
- package/dist/integrations/providers/mistral.js +71 -1
- package/dist/integrations/providers/openbanking.d.ts +128 -0
- package/dist/integrations/providers/payments.d.ts +109 -0
- package/dist/integrations/providers/postmark.d.ts +7 -0
- package/dist/integrations/providers/postmark.js +71 -1
- package/dist/integrations/providers/powens.d.ts +7 -0
- package/dist/integrations/providers/powens.js +119 -1
- package/dist/integrations/providers/qdrant.d.ts +7 -0
- package/dist/integrations/providers/qdrant.js +76 -1
- package/dist/integrations/providers/registry.d.ts +11 -0
- package/dist/integrations/providers/registry.js +34 -1
- package/dist/integrations/providers/sms.d.ts +34 -0
- package/dist/integrations/providers/storage.d.ts +60 -0
- package/dist/integrations/providers/stripe.d.ts +7 -0
- package/dist/integrations/providers/stripe.js +86 -1
- package/dist/integrations/providers/twilio-sms.d.ts +7 -0
- package/dist/integrations/providers/twilio-sms.js +64 -1
- package/dist/integrations/providers/vector-store.d.ts +43 -0
- package/dist/integrations/providers/voice.d.ts +34 -0
- package/dist/integrations/runtime.d.ts +99 -0
- package/dist/integrations/runtime.js +186 -1
- package/dist/integrations/secrets/aws-secret-manager.d.ts +31 -0
- package/dist/integrations/secrets/aws-secret-manager.js +231 -1
- package/dist/integrations/secrets/env-secret-provider.d.ts +31 -0
- package/dist/integrations/secrets/env-secret-provider.js +81 -1
- package/dist/integrations/secrets/gcp-secret-manager.d.ts +32 -0
- package/dist/integrations/secrets/gcp-secret-manager.js +229 -1
- package/dist/integrations/secrets/index.d.ts +7 -0
- package/dist/integrations/secrets/index.js +8 -1
- package/dist/integrations/secrets/manager.d.ts +47 -0
- package/dist/integrations/secrets/manager.js +103 -1
- package/dist/integrations/secrets/provider.d.ts +52 -0
- package/dist/integrations/secrets/provider.js +58 -1
- package/dist/integrations/secrets/scaleway-secret-manager.d.ts +38 -0
- package/dist/integrations/secrets/scaleway-secret-manager.js +247 -1
- package/dist/integrations/secrets-types.d.ts +17 -0
- package/dist/integrations/spec.d.ts +75 -0
- package/dist/integrations/spec.js +39 -1
- package/dist/jobs/define-job.d.ts +18 -0
- package/dist/jobs/define-job.js +16 -1
- package/dist/jobs/gcp-cloud-tasks.d.ts +41 -0
- package/dist/jobs/gcp-cloud-tasks.js +53 -1
- package/dist/jobs/gcp-pubsub.d.ts +25 -0
- package/dist/jobs/gcp-pubsub.js +39 -1
- package/dist/jobs/handlers/gmail-sync-handler.d.ts +9 -0
- package/dist/jobs/handlers/gmail-sync-handler.js +9 -1
- package/dist/jobs/handlers/index.d.ts +9 -0
- package/dist/jobs/handlers/index.js +12 -1
- package/dist/jobs/handlers/ping-handler.d.ts +10 -0
- package/dist/jobs/handlers/ping-handler.js +15 -1
- package/dist/jobs/handlers/storage-document-handler.d.ts +12 -0
- package/dist/jobs/handlers/storage-document-handler.js +14 -1
- package/dist/jobs/index.d.ts +3 -0
- package/dist/jobs/index.js +4 -1
- package/dist/jobs/memory-queue.d.ts +18 -0
- package/dist/jobs/memory-queue.js +71 -1
- package/dist/jobs/queue.d.ts +131 -0
- package/dist/jobs/queue.js +33 -1
- package/dist/jobs/scaleway-sqs-queue.d.ts +30 -0
- package/dist/jobs/scaleway-sqs-queue.js +153 -1
- package/dist/jsonschema.d.ts +28 -0
- package/dist/jsonschema.js +32 -1
- package/dist/knowledge/binding.d.ts +25 -0
- package/dist/knowledge/docs/knowledge.docblock.d.ts +6 -0
- package/dist/knowledge/docs/knowledge.docblock.js +21 -138
- package/dist/knowledge/index.d.ts +11 -0
- package/dist/knowledge/index.js +10 -1
- package/dist/knowledge/ingestion/document-processor.d.ts +24 -0
- package/dist/knowledge/ingestion/document-processor.js +54 -1
- package/dist/knowledge/ingestion/embedding-service.d.ts +12 -0
- package/dist/knowledge/ingestion/embedding-service.js +25 -1
- package/dist/knowledge/ingestion/gmail-adapter.d.ts +18 -0
- package/dist/knowledge/ingestion/gmail-adapter.js +50 -5
- package/dist/knowledge/ingestion/index.d.ts +6 -0
- package/dist/knowledge/ingestion/index.js +7 -1
- package/dist/knowledge/ingestion/storage-adapter.d.ts +15 -0
- package/dist/knowledge/ingestion/storage-adapter.js +26 -1
- package/dist/knowledge/ingestion/vector-indexer.d.ts +18 -0
- package/dist/knowledge/ingestion/vector-indexer.js +32 -1
- package/dist/knowledge/knowledge.feature.d.ts +11 -0
- package/dist/knowledge/knowledge.feature.js +61 -0
- package/dist/knowledge/operations.d.ts +318 -0
- package/dist/knowledge/operations.js +321 -0
- package/dist/knowledge/query/index.d.ts +2 -0
- package/dist/knowledge/query/index.js +3 -1
- package/dist/knowledge/query/service.d.ts +29 -0
- package/dist/knowledge/query/service.js +64 -2
- package/dist/knowledge/runtime.d.ts +32 -0
- package/dist/knowledge/runtime.js +49 -1
- package/dist/knowledge/source.d.ts +32 -0
- package/dist/knowledge/spaces/email-threads.d.ts +7 -0
- package/dist/knowledge/spaces/email-threads.js +37 -1
- package/dist/knowledge/spaces/financial-docs.d.ts +7 -0
- package/dist/knowledge/spaces/financial-docs.js +37 -1
- package/dist/knowledge/spaces/financial-overview.d.ts +7 -0
- package/dist/knowledge/spaces/financial-overview.js +41 -1
- package/dist/knowledge/spaces/index.d.ts +7 -0
- package/dist/knowledge/spaces/index.js +8 -1
- package/dist/knowledge/spaces/product-canon.d.ts +7 -0
- package/dist/knowledge/spaces/product-canon.js +37 -1
- package/dist/knowledge/spaces/support-faq.d.ts +7 -0
- package/dist/knowledge/spaces/support-faq.js +40 -1
- package/dist/knowledge/spaces/uploaded-docs.d.ts +7 -0
- package/dist/knowledge/spaces/uploaded-docs.js +37 -1
- package/dist/knowledge/spec.d.ts +48 -0
- package/dist/knowledge/spec.js +39 -1
- package/dist/llm/exporters.d.ts +69 -0
- package/dist/llm/exporters.js +542 -8
- package/dist/llm/index.d.ts +4 -0
- package/dist/llm/index.js +4 -1
- package/dist/llm/prompts.d.ts +52 -0
- package/dist/llm/prompts.js +246 -56
- package/dist/llm/types.d.ts +214 -0
- package/dist/markdown.d.ts +22 -0
- package/dist/markdown.js +119 -3
- package/dist/migrations.d.ts +52 -0
- package/dist/migrations.js +33 -1
- package/dist/onboarding-base.d.ts +138 -0
- package/dist/onboarding-base.js +195 -1
- package/dist/openapi.d.ts +31 -0
- package/dist/openapi.js +75 -1
- package/dist/operations/index.d.ts +3 -0
- package/dist/operations/index.js +4 -0
- package/dist/operations/operation.d.ts +180 -0
- package/dist/operations/operation.js +35 -0
- package/dist/operations/registry.d.ts +103 -0
- package/dist/operations/registry.js +252 -0
- package/dist/ownership.d.ts +84 -0
- package/dist/ownership.js +38 -1
- package/dist/policy/docs/policy.docblock.d.ts +6 -0
- package/dist/policy/docs/policy.docblock.js +21 -1
- package/dist/policy/engine.d.ts +40 -0
- package/dist/policy/engine.js +223 -1
- package/dist/policy/index.d.ts +5 -0
- package/dist/policy/index.js +5 -0
- package/dist/policy/opa-adapter.d.ts +45 -0
- package/dist/policy/opa-adapter.js +71 -1
- package/dist/policy/registry.d.ts +9 -0
- package/dist/policy/registry.js +11 -0
- package/dist/policy/spec.d.ts +103 -0
- package/dist/policy/spec.js +0 -1
- package/dist/presentations/docs/presentations-conventions.docblock.d.ts +6 -0
- package/dist/presentations/docs/presentations-conventions.docblock.js +20 -7
- package/dist/presentations/index.d.ts +4 -0
- package/dist/presentations/index.js +5 -0
- package/dist/presentations/presentations.d.ts +50 -0
- package/dist/presentations/presentations.js +7 -0
- package/dist/presentations/registry.d.ts +10 -0
- package/dist/presentations/registry.js +12 -0
- package/dist/presentations/transform-engine.d.ts +66 -0
- package/dist/presentations/transform-engine.js +282 -0
- package/dist/prompt.d.ts +60 -0
- package/dist/prompt.js +10 -1
- package/dist/promptRegistry.d.ts +15 -0
- package/dist/promptRegistry.js +34 -1
- package/dist/regenerator/adapters.d.ts +19 -0
- package/dist/regenerator/docs/regenerator.docblock.d.ts +6 -0
- package/dist/regenerator/docs/regenerator.docblock.js +21 -184
- package/dist/regenerator/executor.d.ts +70 -0
- package/dist/regenerator/executor.js +86 -1
- package/dist/regenerator/index.d.ts +7 -0
- package/dist/regenerator/index.js +6 -1
- package/dist/regenerator/service.d.ts +33 -0
- package/dist/regenerator/service.js +92 -1
- package/dist/regenerator/sinks.d.ts +26 -0
- package/dist/regenerator/sinks.js +32 -1
- package/dist/regenerator/types.d.ts +107 -0
- package/dist/regenerator/utils.d.ts +9 -0
- package/dist/regenerator/utils.js +51 -1
- package/dist/registry-utils.d.ts +106 -0
- package/dist/registry-utils.js +122 -0
- package/dist/registry.d.ts +30 -0
- package/dist/registry.js +58 -1
- package/dist/resources.d.ts +64 -0
- package/dist/resources.js +50 -1
- package/dist/schema-to-markdown.d.ts +54 -0
- package/dist/schema-to-markdown.js +214 -10
- package/dist/server/contracts-adapter-hydration.d.ts +15 -0
- package/dist/server/contracts-adapter-hydration.js +41 -0
- package/dist/server/contracts-adapter-input.d.ts +9 -0
- package/dist/server/contracts-adapter-input.js +77 -0
- package/dist/server/graphql-pothos.d.ts +31 -0
- package/dist/server/graphql-pothos.js +127 -1
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +10 -1
- package/dist/server/mcp/createMcpServer.d.ts +15 -0
- package/dist/server/mcp/createMcpServer.js +28 -1
- package/dist/server/mcp/mcpTypes.d.ts +30 -0
- package/dist/server/mcp/registerPresentations.d.ts +7 -0
- package/dist/server/mcp/registerPresentations.js +112 -1
- package/dist/server/mcp/registerPrompts.d.ts +8 -0
- package/dist/server/mcp/registerPrompts.js +36 -2
- package/dist/server/mcp/registerResources.d.ts +8 -0
- package/dist/server/mcp/registerResources.js +35 -1
- package/dist/server/mcp/registerTools.d.ts +8 -0
- package/dist/server/mcp/registerTools.js +22 -1
- package/dist/server/provider-mcp.d.ts +2 -0
- package/dist/server/provider-mcp.js +3 -1
- package/dist/server/rest-elysia.d.ts +40 -0
- package/dist/server/rest-elysia.js +20 -1
- package/dist/server/rest-express.d.ts +16 -0
- package/dist/server/rest-express.js +36 -1
- package/dist/server/rest-generic.d.ts +32 -0
- package/dist/server/rest-generic.js +124 -1
- package/dist/server/rest-next-app.d.ts +35 -0
- package/dist/server/rest-next-app.js +38 -1
- package/dist/server/rest-next-mcp.d.ts +11 -0
- package/dist/server/rest-next-mcp.js +45 -1
- package/dist/server/rest-next-pages.d.ts +9 -0
- package/dist/server/rest-next-pages.js +22 -1
- package/dist/telemetry/anomaly.d.ts +27 -0
- package/dist/telemetry/anomaly.js +48 -1
- package/dist/telemetry/docs/telemetry.docblock.d.ts +6 -0
- package/dist/telemetry/docs/telemetry.docblock.js +21 -139
- package/dist/telemetry/index.d.ts +4 -0
- package/dist/telemetry/index.js +5 -1
- package/dist/telemetry/spec.d.ts +91 -0
- package/dist/telemetry/spec.js +69 -1
- package/dist/telemetry/tracker.d.ts +51 -0
- package/dist/telemetry/tracker.js +76 -1
- package/dist/tests/index.d.ts +3 -0
- package/dist/tests/index.js +4 -1
- package/dist/tests/runner.d.ts +43 -0
- package/dist/tests/runner.js +150 -1
- package/dist/tests/spec.d.ts +89 -0
- package/dist/tests/spec.js +33 -1
- package/dist/themes.d.ts +53 -0
- package/dist/themes.js +39 -1
- package/dist/translations/catalog.d.ts +28 -0
- package/dist/translations/tenant.d.ts +15 -0
- package/dist/types.d.ts +92 -0
- package/dist/workflow/adapters/db-adapter.d.ts +46 -0
- package/dist/workflow/adapters/db-adapter.js +83 -1
- package/dist/workflow/adapters/file-adapter.d.ts +14 -0
- package/dist/workflow/adapters/file-adapter.js +11 -1
- package/dist/workflow/adapters/index.d.ts +4 -0
- package/dist/workflow/adapters/index.js +5 -1
- package/dist/workflow/adapters/memory-store.d.ts +18 -0
- package/dist/workflow/adapters/memory-store.js +58 -1
- package/dist/workflow/expression.d.ts +9 -0
- package/dist/workflow/expression.js +99 -1
- package/dist/workflow/index.d.ts +10 -0
- package/dist/workflow/index.js +9 -1
- package/dist/workflow/runner.d.ts +74 -0
- package/dist/workflow/runner.js +337 -1
- package/dist/workflow/sla-monitor.d.ts +20 -0
- package/dist/workflow/sla-monitor.js +47 -1
- package/dist/workflow/spec.d.ts +105 -0
- package/dist/workflow/spec.js +55 -1
- package/dist/workflow/state.d.ts +35 -0
- package/dist/workflow/validation.d.ts +29 -0
- package/dist/workflow/validation.js +176 -1
- package/dist/workspace-config/contractsrc-schema.d.ts +786 -0
- package/dist/workspace-config/contractsrc-schema.js +247 -0
- package/dist/workspace-config/index.d.ts +2 -0
- package/dist/workspace-config/index.js +3 -0
- package/package.json +287 -266
- package/dist/capabilities.js +0 -1
- package/dist/contracts-adapter-hydration.js +0 -1
- package/dist/contracts-adapter-input.js +0 -1
- package/dist/data-views.js +0 -1
- package/dist/docs/PUBLISHING.docblock.js +0 -76
- package/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -383
- package/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -68
- package/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -140
- package/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -86
- package/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -1
- package/dist/forms.js +0 -1
- package/dist/integrations/contracts.js +0 -1
- package/dist/knowledge/contracts.js +0 -1
- package/dist/node_modules/@pothos/plugin-complexity/esm/calculate-complexity.js +0 -1
- package/dist/node_modules/@pothos/plugin-complexity/esm/defaults.js +0 -1
- package/dist/node_modules/@pothos/plugin-complexity/esm/index.js +0 -1
- package/dist/node_modules/@pothos/plugin-complexity/esm/types.js +0 -1
- package/dist/node_modules/@pothos/plugin-complexity/esm/util.js +0 -1
- package/dist/node_modules/@pothos/plugin-complexity/esm/validator.js +0 -1
- package/dist/node_modules/@pothos/plugin-dataloader/esm/field-builder.js +0 -1
- package/dist/node_modules/@pothos/plugin-dataloader/esm/index.js +0 -1
- package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/index.js +0 -1
- package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/interface.js +0 -1
- package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/node.js +0 -1
- package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/object.js +0 -1
- package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/union.js +0 -1
- package/dist/node_modules/@pothos/plugin-dataloader/esm/schema-builder.js +0 -1
- package/dist/node_modules/@pothos/plugin-dataloader/esm/util.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/connection-helpers.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/field-builder.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/index.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/interface-ref.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/model-loader.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/node-ref.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/object-ref.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/prisma-field-builder.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/schema-builder.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/util/cursors.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/util/datamodel.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/util/deep-equal.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/util/description.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/util/get-client.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/util/loader-map.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/util/map-query.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/util/relation-map.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/util/selections.js +0 -1
- package/dist/node_modules/@pothos/plugin-prisma/esm/util/usage.js +0 -1
- package/dist/node_modules/@pothos/plugin-tracing/esm/index.js +0 -1
- package/dist/node_modules/@pothos/plugin-tracing/esm/util.js +0 -1
- package/dist/node_modules/dataloader/index.js +0 -7
- package/dist/node_modules/graphql/error/GraphQLError.js +0 -5
- package/dist/node_modules/graphql/error/index.js +0 -1
- package/dist/node_modules/graphql/error/locatedError.js +0 -1
- package/dist/node_modules/graphql/error/syntaxError.js +0 -1
- package/dist/node_modules/graphql/execution/collectFields.js +0 -1
- package/dist/node_modules/graphql/execution/execute.js +0 -1
- package/dist/node_modules/graphql/execution/index.js +0 -1
- package/dist/node_modules/graphql/execution/mapAsyncIterator.js +0 -1
- package/dist/node_modules/graphql/execution/subscribe.js +0 -1
- package/dist/node_modules/graphql/execution/values.js +0 -1
- package/dist/node_modules/graphql/graphql.js +0 -1
- package/dist/node_modules/graphql/index.js +0 -1
- package/dist/node_modules/graphql/jsutils/Path.js +0 -1
- package/dist/node_modules/graphql/jsutils/devAssert.js +0 -1
- package/dist/node_modules/graphql/jsutils/didYouMean.js +0 -1
- package/dist/node_modules/graphql/jsutils/groupBy.js +0 -1
- package/dist/node_modules/graphql/jsutils/identityFunc.js +0 -1
- package/dist/node_modules/graphql/jsutils/inspect.js +0 -1
- package/dist/node_modules/graphql/jsutils/instanceOf.js +0 -12
- package/dist/node_modules/graphql/jsutils/invariant.js +0 -1
- package/dist/node_modules/graphql/jsutils/isAsyncIterable.js +0 -1
- package/dist/node_modules/graphql/jsutils/isIterableObject.js +0 -1
- package/dist/node_modules/graphql/jsutils/isObjectLike.js +0 -1
- package/dist/node_modules/graphql/jsutils/isPromise.js +0 -1
- package/dist/node_modules/graphql/jsutils/keyMap.js +0 -1
- package/dist/node_modules/graphql/jsutils/keyValMap.js +0 -1
- package/dist/node_modules/graphql/jsutils/mapValue.js +0 -1
- package/dist/node_modules/graphql/jsutils/memoize3.js +0 -1
- package/dist/node_modules/graphql/jsutils/naturalCompare.js +0 -1
- package/dist/node_modules/graphql/jsutils/printPathArray.js +0 -1
- package/dist/node_modules/graphql/jsutils/promiseForObject.js +0 -1
- package/dist/node_modules/graphql/jsutils/promiseReduce.js +0 -1
- package/dist/node_modules/graphql/jsutils/suggestionList.js +0 -1
- package/dist/node_modules/graphql/jsutils/toError.js +0 -1
- package/dist/node_modules/graphql/jsutils/toObjMap.js +0 -1
- package/dist/node_modules/graphql/language/ast.js +0 -1
- package/dist/node_modules/graphql/language/blockString.js +0 -3
- package/dist/node_modules/graphql/language/characterClasses.js +0 -1
- package/dist/node_modules/graphql/language/directiveLocation.js +0 -1
- package/dist/node_modules/graphql/language/index.js +0 -1
- package/dist/node_modules/graphql/language/kinds.js +0 -1
- package/dist/node_modules/graphql/language/lexer.js +0 -3
- package/dist/node_modules/graphql/language/location.js +0 -1
- package/dist/node_modules/graphql/language/parser.js +0 -1
- package/dist/node_modules/graphql/language/predicates.js +0 -1
- package/dist/node_modules/graphql/language/printLocation.js +0 -2
- package/dist/node_modules/graphql/language/printString.js +0 -1
- package/dist/node_modules/graphql/language/printer.js +0 -34
- package/dist/node_modules/graphql/language/schemaCoordinateLexer.js +0 -1
- package/dist/node_modules/graphql/language/source.js +0 -1
- package/dist/node_modules/graphql/language/tokenKind.js +0 -1
- package/dist/node_modules/graphql/language/visitor.js +0 -1
- package/dist/node_modules/graphql/type/assertName.js +0 -1
- package/dist/node_modules/graphql/type/definition.js +0 -1
- package/dist/node_modules/graphql/type/directives.js +0 -1
- package/dist/node_modules/graphql/type/index.js +0 -1
- package/dist/node_modules/graphql/type/introspection.js +0 -3
- package/dist/node_modules/graphql/type/scalars.js +0 -1
- package/dist/node_modules/graphql/type/schema.js +0 -1
- package/dist/node_modules/graphql/type/validate.js +0 -3
- package/dist/node_modules/graphql/utilities/TypeInfo.js +0 -1
- package/dist/node_modules/graphql/utilities/assertValidName.js +0 -1
- package/dist/node_modules/graphql/utilities/astFromValue.js +0 -1
- package/dist/node_modules/graphql/utilities/buildASTSchema.js +0 -1
- package/dist/node_modules/graphql/utilities/buildClientSchema.js +0 -1
- package/dist/node_modules/graphql/utilities/coerceInputValue.js +0 -1
- package/dist/node_modules/graphql/utilities/concatAST.js +0 -1
- package/dist/node_modules/graphql/utilities/extendSchema.js +0 -1
- package/dist/node_modules/graphql/utilities/findBreakingChanges.js +0 -1
- package/dist/node_modules/graphql/utilities/getIntrospectionQuery.js +0 -107
- package/dist/node_modules/graphql/utilities/getOperationAST.js +0 -1
- package/dist/node_modules/graphql/utilities/getOperationRootType.js +0 -1
- package/dist/node_modules/graphql/utilities/index.js +0 -1
- package/dist/node_modules/graphql/utilities/introspectionFromSchema.js +0 -1
- package/dist/node_modules/graphql/utilities/lexicographicSortSchema.js +0 -1
- package/dist/node_modules/graphql/utilities/printSchema.js +0 -13
- package/dist/node_modules/graphql/utilities/resolveSchemaCoordinate.js +0 -1
- package/dist/node_modules/graphql/utilities/separateOperations.js +0 -1
- package/dist/node_modules/graphql/utilities/sortValueNode.js +0 -1
- package/dist/node_modules/graphql/utilities/stripIgnoredCharacters.js +0 -1
- package/dist/node_modules/graphql/utilities/typeComparators.js +0 -1
- package/dist/node_modules/graphql/utilities/typeFromAST.js +0 -1
- package/dist/node_modules/graphql/utilities/valueFromAST.js +0 -1
- package/dist/node_modules/graphql/utilities/valueFromASTUntyped.js +0 -1
- package/dist/node_modules/graphql/validation/ValidationContext.js +0 -1
- package/dist/node_modules/graphql/validation/index.js +0 -1
- package/dist/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/KnownDirectivesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/KnownTypeNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/NoFragmentCyclesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/ScalarLeafsRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueOperationNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueOperationTypesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueTypeNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/UniqueVariableNamesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.js +0 -1
- package/dist/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +0 -1
- package/dist/node_modules/graphql/validation/specifiedRules.js +0 -1
- package/dist/node_modules/graphql/validation/validate.js +0 -5
- package/dist/node_modules/graphql/version.js +0 -1
- package/dist/openbanking/docs/openbanking.docblock.js +0 -109
- package/dist/presentations.backcompat.js +0 -1
- package/dist/presentations.js +0 -1
- package/dist/presentations.v2.js +0 -7
- package/dist/spec.js +0 -1
- package/dist/types/all.js +0 -0
- /package/dist/{node_modules/@pothos/plugin-prisma/esm/types.js → integrations/secrets-types.js} +0 -0
|
@@ -1 +1,298 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { buildZodWithRelations, evalPredicate } from "../../forms/forms.js";
|
|
2
|
+
import React, { useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { Controller, useFieldArray, useForm } from "react-hook-form";
|
|
4
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/client/react/form-render.tsx
|
|
8
|
+
function toOptionsArray(src) {
|
|
9
|
+
if (!src) return void 0;
|
|
10
|
+
if (Array.isArray(src)) return {
|
|
11
|
+
kind: "static",
|
|
12
|
+
options: src
|
|
13
|
+
};
|
|
14
|
+
return src;
|
|
15
|
+
}
|
|
16
|
+
function getAtPath(values, path) {
|
|
17
|
+
if (!path) return void 0;
|
|
18
|
+
const segs = path.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
|
|
19
|
+
let cur = values;
|
|
20
|
+
for (const s of segs) {
|
|
21
|
+
if (cur == null) return void 0;
|
|
22
|
+
cur = cur[s];
|
|
23
|
+
}
|
|
24
|
+
return cur;
|
|
25
|
+
}
|
|
26
|
+
function makeDepsKey(values, deps) {
|
|
27
|
+
if (!deps || deps.length === 0) return "[]";
|
|
28
|
+
try {
|
|
29
|
+
return JSON.stringify(deps.map((d) => getAtPath(values, d)));
|
|
30
|
+
} catch {
|
|
31
|
+
return "[]";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function useResolvedOptions(values, source, resolvers) {
|
|
35
|
+
const [opts, setOpts] = useState([]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
let mounted = true;
|
|
38
|
+
const run = async () => {
|
|
39
|
+
if (!source) return setOpts([]);
|
|
40
|
+
if (source.kind === "static") return setOpts([...source.options ?? []]);
|
|
41
|
+
const fn = resolvers?.[source.resolverKey];
|
|
42
|
+
if (!fn) return setOpts([]);
|
|
43
|
+
const res = await fn(values, source.args);
|
|
44
|
+
if (mounted) setOpts([...res ?? []]);
|
|
45
|
+
};
|
|
46
|
+
run();
|
|
47
|
+
return () => {
|
|
48
|
+
mounted = false;
|
|
49
|
+
};
|
|
50
|
+
}, [useMemo(() => {
|
|
51
|
+
if (!source) return "nil";
|
|
52
|
+
if (source.kind === "static") return JSON.stringify(source.options ?? []);
|
|
53
|
+
return makeDepsKey(values, source.deps);
|
|
54
|
+
}, [source, values]), source && source.kind === "resolver" ? source.resolverKey : void 0]);
|
|
55
|
+
return opts;
|
|
56
|
+
}
|
|
57
|
+
function fieldPath(parent, name, arrayIndex) {
|
|
58
|
+
if (!name) return parent ?? "";
|
|
59
|
+
const child = typeof arrayIndex === "number" ? `${name.replace(/^\$index$/, String(arrayIndex))}` : name;
|
|
60
|
+
return parent ? `${parent}${typeof arrayIndex === "number" ? `.${arrayIndex}` : ""}.${child}`.replace(/\.+/g, ".") : child;
|
|
61
|
+
}
|
|
62
|
+
function createFormRenderer(base) {
|
|
63
|
+
const conf = base;
|
|
64
|
+
const { driver } = conf;
|
|
65
|
+
function InternalForm(props) {
|
|
66
|
+
const { spec, options, merged } = props;
|
|
67
|
+
const baseZod = useMemo(() => buildZodWithRelations(spec), [spec]);
|
|
68
|
+
const form = useForm({
|
|
69
|
+
...merged.formOptions,
|
|
70
|
+
resolver: zodResolver(baseZod),
|
|
71
|
+
defaultValues: options?.defaultValues
|
|
72
|
+
});
|
|
73
|
+
const values = form.watch();
|
|
74
|
+
const renderOne = (f, parent, arrayIndex) => {
|
|
75
|
+
const DriverField = driver.Field;
|
|
76
|
+
const DriverLabel = driver.FieldLabel;
|
|
77
|
+
const DriverDesc = driver.FieldDescription;
|
|
78
|
+
const DriverError = driver.FieldError;
|
|
79
|
+
const name = fieldPath(parent, f.name, arrayIndex);
|
|
80
|
+
const visible = evalPredicate(values, f.visibleWhen);
|
|
81
|
+
const enabled = evalPredicate(values, f.enabledWhen);
|
|
82
|
+
const invalid = Boolean(form.getFieldState(name)?.invalid);
|
|
83
|
+
if (!visible) return null;
|
|
84
|
+
const id = name?.replace(/\./g, "-");
|
|
85
|
+
const commonWrapProps = {
|
|
86
|
+
"data-invalid": invalid,
|
|
87
|
+
hidden: !visible,
|
|
88
|
+
disabled: !enabled
|
|
89
|
+
};
|
|
90
|
+
const labelNode = f.labelI18n ? /* @__PURE__ */ jsx(DriverLabel, {
|
|
91
|
+
htmlFor: id,
|
|
92
|
+
children: f.labelI18n
|
|
93
|
+
}) : null;
|
|
94
|
+
const descNode = f.descriptionI18n ? /* @__PURE__ */ jsx(DriverDesc, { children: f.descriptionI18n }) : null;
|
|
95
|
+
if (f.kind === "group") {
|
|
96
|
+
const children = f.fields.map((c, i) => /* @__PURE__ */ jsx(React.Fragment, { children: renderOne(c, name, arrayIndex) }, `${name}-${i}`));
|
|
97
|
+
return /* @__PURE__ */ jsxs(DriverField, {
|
|
98
|
+
...commonWrapProps,
|
|
99
|
+
children: [
|
|
100
|
+
labelNode,
|
|
101
|
+
children,
|
|
102
|
+
descNode
|
|
103
|
+
]
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (f.kind === "array") return renderArray(f, parent);
|
|
107
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
108
|
+
name,
|
|
109
|
+
control: form.control,
|
|
110
|
+
render: ({ field, fieldState }) => {
|
|
111
|
+
const err = fieldState.error ? [fieldState.error] : [];
|
|
112
|
+
const ariaInvalid = fieldState.invalid || void 0;
|
|
113
|
+
if (f.kind === "text") {
|
|
114
|
+
const textField = f;
|
|
115
|
+
const Input = driver.Input;
|
|
116
|
+
return /* @__PURE__ */ jsxs(DriverField, {
|
|
117
|
+
...commonWrapProps,
|
|
118
|
+
children: [
|
|
119
|
+
labelNode,
|
|
120
|
+
/* @__PURE__ */ jsx(Input, {
|
|
121
|
+
id,
|
|
122
|
+
"aria-invalid": ariaInvalid,
|
|
123
|
+
placeholder: f.placeholderI18n,
|
|
124
|
+
autoComplete: textField.autoComplete,
|
|
125
|
+
inputMode: textField.inputMode,
|
|
126
|
+
maxLength: textField.maxLength,
|
|
127
|
+
minLength: textField.minLength,
|
|
128
|
+
disabled: !enabled,
|
|
129
|
+
...field,
|
|
130
|
+
...f.uiProps
|
|
131
|
+
}),
|
|
132
|
+
descNode,
|
|
133
|
+
fieldState.invalid ? /* @__PURE__ */ jsx(DriverError, { errors: err }) : null
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
if (f.kind === "textarea") {
|
|
138
|
+
const textareaField = f;
|
|
139
|
+
const Textarea = driver.Textarea;
|
|
140
|
+
return /* @__PURE__ */ jsxs(DriverField, {
|
|
141
|
+
...commonWrapProps,
|
|
142
|
+
children: [
|
|
143
|
+
labelNode,
|
|
144
|
+
/* @__PURE__ */ jsx(Textarea, {
|
|
145
|
+
id,
|
|
146
|
+
"aria-invalid": ariaInvalid,
|
|
147
|
+
placeholder: f.placeholderI18n,
|
|
148
|
+
rows: textareaField.rows,
|
|
149
|
+
maxLength: textareaField.maxLength,
|
|
150
|
+
disabled: !enabled,
|
|
151
|
+
...field,
|
|
152
|
+
...f.uiProps
|
|
153
|
+
}),
|
|
154
|
+
descNode,
|
|
155
|
+
fieldState.invalid ? /* @__PURE__ */ jsx(DriverError, { errors: err }) : null
|
|
156
|
+
]
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
if (f.kind === "select") {
|
|
160
|
+
const selectField = f;
|
|
161
|
+
const Select = driver.Select;
|
|
162
|
+
const opts = useResolvedOptions(values, toOptionsArray(selectField.options), merged.resolvers);
|
|
163
|
+
return /* @__PURE__ */ jsxs(DriverField, {
|
|
164
|
+
...commonWrapProps,
|
|
165
|
+
children: [
|
|
166
|
+
labelNode,
|
|
167
|
+
/* @__PURE__ */ jsx(Select, {
|
|
168
|
+
id,
|
|
169
|
+
name,
|
|
170
|
+
"aria-invalid": ariaInvalid,
|
|
171
|
+
disabled: !enabled,
|
|
172
|
+
value: field.value,
|
|
173
|
+
onChange: (v) => field.onChange(v),
|
|
174
|
+
options: opts,
|
|
175
|
+
...f.uiProps
|
|
176
|
+
}),
|
|
177
|
+
descNode,
|
|
178
|
+
fieldState.invalid ? /* @__PURE__ */ jsx(DriverError, { errors: err }) : null
|
|
179
|
+
]
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
if (f.kind === "checkbox") {
|
|
183
|
+
const Checkbox = driver.Checkbox;
|
|
184
|
+
return /* @__PURE__ */ jsxs(DriverField, {
|
|
185
|
+
...commonWrapProps,
|
|
186
|
+
children: [
|
|
187
|
+
labelNode,
|
|
188
|
+
/* @__PURE__ */ jsx(Checkbox, {
|
|
189
|
+
id,
|
|
190
|
+
name,
|
|
191
|
+
disabled: !enabled,
|
|
192
|
+
checked: !!field.value,
|
|
193
|
+
onCheckedChange: (v) => field.onChange(v),
|
|
194
|
+
...f.uiProps
|
|
195
|
+
}),
|
|
196
|
+
descNode,
|
|
197
|
+
fieldState.invalid ? /* @__PURE__ */ jsx(DriverError, { errors: err }) : null
|
|
198
|
+
]
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
if (f.kind === "radio") {
|
|
202
|
+
const radioField = f;
|
|
203
|
+
const RadioGroup = driver.RadioGroup;
|
|
204
|
+
const opts = useResolvedOptions(values, toOptionsArray(radioField.options), merged.resolvers);
|
|
205
|
+
return /* @__PURE__ */ jsxs(DriverField, {
|
|
206
|
+
...commonWrapProps,
|
|
207
|
+
children: [
|
|
208
|
+
labelNode,
|
|
209
|
+
/* @__PURE__ */ jsx(RadioGroup, {
|
|
210
|
+
id,
|
|
211
|
+
name,
|
|
212
|
+
disabled: !enabled,
|
|
213
|
+
value: field.value,
|
|
214
|
+
onValueChange: (v) => field.onChange(v),
|
|
215
|
+
options: opts,
|
|
216
|
+
...f.uiProps
|
|
217
|
+
}),
|
|
218
|
+
descNode,
|
|
219
|
+
fieldState.invalid ? /* @__PURE__ */ jsx(DriverError, { errors: err }) : null
|
|
220
|
+
]
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
if (f.kind === "switch") {
|
|
224
|
+
const Switch = driver.Switch;
|
|
225
|
+
return /* @__PURE__ */ jsxs(DriverField, {
|
|
226
|
+
...commonWrapProps,
|
|
227
|
+
children: [
|
|
228
|
+
labelNode,
|
|
229
|
+
/* @__PURE__ */ jsx(Switch, {
|
|
230
|
+
id,
|
|
231
|
+
name,
|
|
232
|
+
disabled: !enabled,
|
|
233
|
+
checked: !!field.value,
|
|
234
|
+
onCheckedChange: (v) => field.onChange(v),
|
|
235
|
+
...f.uiProps
|
|
236
|
+
}),
|
|
237
|
+
descNode,
|
|
238
|
+
fieldState.invalid ? /* @__PURE__ */ jsx(DriverError, { errors: err }) : null
|
|
239
|
+
]
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
243
|
+
}
|
|
244
|
+
}, name);
|
|
245
|
+
};
|
|
246
|
+
const renderArray = (f, parent) => {
|
|
247
|
+
const name = fieldPath(parent, f.name);
|
|
248
|
+
const { fields, append, remove } = useFieldArray({
|
|
249
|
+
control: form.control,
|
|
250
|
+
name
|
|
251
|
+
});
|
|
252
|
+
const canAdd = f.max == null || fields.length < f.max;
|
|
253
|
+
const canRemove = (idx) => (f.min == null ? fields.length > 0 : fields.length > f.min) && idx >= 0;
|
|
254
|
+
const Button$1 = driver.Button;
|
|
255
|
+
const Label = driver.FieldLabel;
|
|
256
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
257
|
+
f.labelI18n ? /* @__PURE__ */ jsx(Label, { children: f.labelI18n }) : null,
|
|
258
|
+
fields.map((row, idx) => /* @__PURE__ */ jsxs("div", { children: [renderOne(f.of, name, idx), canRemove(idx) ? /* @__PURE__ */ jsx(Button$1, {
|
|
259
|
+
type: "button",
|
|
260
|
+
variant: "ghost",
|
|
261
|
+
size: "sm",
|
|
262
|
+
onClick: () => remove(idx),
|
|
263
|
+
children: "Remove"
|
|
264
|
+
}) : null] }, row.id ?? idx)),
|
|
265
|
+
canAdd ? /* @__PURE__ */ jsx(Button$1, {
|
|
266
|
+
type: "button",
|
|
267
|
+
variant: "outline",
|
|
268
|
+
size: "sm",
|
|
269
|
+
onClick: () => append({}),
|
|
270
|
+
children: "Add"
|
|
271
|
+
}) : null
|
|
272
|
+
] }, name);
|
|
273
|
+
};
|
|
274
|
+
const onSubmit = async (data) => {
|
|
275
|
+
const actionKey = spec.actions?.[0]?.key ?? "submit";
|
|
276
|
+
if (merged.onSubmitOverride) return merged.onSubmitOverride(data, actionKey);
|
|
277
|
+
};
|
|
278
|
+
const Button = driver.Button;
|
|
279
|
+
return /* @__PURE__ */ jsxs("form", {
|
|
280
|
+
onSubmit: form.handleSubmit(onSubmit),
|
|
281
|
+
children: [(spec.fields || []).map((f, i) => /* @__PURE__ */ jsx(React.Fragment, { children: renderOne(f) }, i)), spec.actions && spec.actions.length ? /* @__PURE__ */ jsx("div", { children: spec.actions.map((a) => /* @__PURE__ */ jsx(Button, {
|
|
282
|
+
type: "submit",
|
|
283
|
+
children: a.labelI18n
|
|
284
|
+
}, a.key)) }) : null]
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
return { render: (spec, options) => /* @__PURE__ */ jsx(InternalForm, {
|
|
288
|
+
spec,
|
|
289
|
+
options,
|
|
290
|
+
merged: {
|
|
291
|
+
...conf,
|
|
292
|
+
...options?.overrides ?? {}
|
|
293
|
+
}
|
|
294
|
+
}) };
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
//#endregion
|
|
298
|
+
export { createFormRenderer };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createEngineWithDefaults, createFeatureModule, registerFeature, renderFeaturePresentation } from "./feature-render.js";
|
|
2
|
+
import { ComputationMap, CreateRendererOptions, DriverSlots, RenderOptions, ResolverMap, createFormRenderer } from "./form-render.js";
|
|
3
|
+
import { ShadcnDriver, shadcnDriver } from "./drivers/shadcn.js";
|
|
4
|
+
import { RnReusablesDriver, rnReusablesDriver } from "./drivers/rn-reusables.js";
|
|
5
|
+
export { ComputationMap, CreateRendererOptions, DriverSlots, RenderOptions, ResolverMap, RnReusablesDriver, ShadcnDriver, createEngineWithDefaults, createFeatureModule, createFormRenderer, registerFeature, renderFeaturePresentation, rnReusablesDriver, shadcnDriver };
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { createEngineWithDefaults, createFeatureModule, registerFeature, renderFeaturePresentation } from "./feature-render.js";
|
|
4
|
+
import { createFormRenderer } from "./form-render.js";
|
|
5
|
+
import { shadcnDriver } from "./drivers/shadcn.js";
|
|
6
|
+
import { rnReusablesDriver } from "./drivers/rn-reusables.js";
|
|
7
|
+
|
|
8
|
+
export { createEngineWithDefaults, createFeatureModule, createFormRenderer, registerFeature, renderFeaturePresentation, rnReusablesDriver, shadcnDriver };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ContractRegistryFile, ContractRegistryItem, ContractRegistryItemType, ContractRegistryManifest, JsonSchema } from "./types.js";
|
|
2
|
+
import { ContractRegistryFileSchema, ContractRegistryItemParsed, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestParsed, ContractRegistryManifestSchema } from "./schemas.js";
|
|
3
|
+
export { type ContractRegistryFile, ContractRegistryFileSchema, type ContractRegistryItem, type ContractRegistryItemParsed, ContractRegistryItemSchema, type ContractRegistryItemType, ContractRegistryItemTypeSchema, type ContractRegistryManifest, type ContractRegistryManifestParsed, ContractRegistryManifestSchema, type JsonSchema };
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
import{ContractRegistryFileSchema
|
|
1
|
+
import { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema } from "./schemas.js";
|
|
2
|
+
|
|
3
|
+
export { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { ContractRegistryItem, ContractRegistryManifest } from "./types.js";
|
|
2
|
+
import z from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/contract-registry/schemas.d.ts
|
|
5
|
+
declare const ContractRegistryItemTypeSchema: z.ZodEnum<{
|
|
6
|
+
"contractspec:operation": "contractspec:operation";
|
|
7
|
+
"contractspec:event": "contractspec:event";
|
|
8
|
+
"contractspec:presentation": "contractspec:presentation";
|
|
9
|
+
"contractspec:form": "contractspec:form";
|
|
10
|
+
"contractspec:feature": "contractspec:feature";
|
|
11
|
+
"contractspec:workflow": "contractspec:workflow";
|
|
12
|
+
"contractspec:template": "contractspec:template";
|
|
13
|
+
"contractspec:integration": "contractspec:integration";
|
|
14
|
+
"contractspec:data-view": "contractspec:data-view";
|
|
15
|
+
"contractspec:migration": "contractspec:migration";
|
|
16
|
+
"contractspec:telemetry": "contractspec:telemetry";
|
|
17
|
+
"contractspec:experiment": "contractspec:experiment";
|
|
18
|
+
"contractspec:app-config": "contractspec:app-config";
|
|
19
|
+
"contractspec:knowledge": "contractspec:knowledge";
|
|
20
|
+
}>;
|
|
21
|
+
declare const ContractRegistryFileSchema: z.ZodObject<{
|
|
22
|
+
path: z.ZodString;
|
|
23
|
+
type: z.ZodString;
|
|
24
|
+
content: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
declare const ContractRegistryItemSchema: z.ZodObject<{
|
|
27
|
+
key: z.ZodString;
|
|
28
|
+
type: z.ZodEnum<{
|
|
29
|
+
"contractspec:operation": "contractspec:operation";
|
|
30
|
+
"contractspec:event": "contractspec:event";
|
|
31
|
+
"contractspec:presentation": "contractspec:presentation";
|
|
32
|
+
"contractspec:form": "contractspec:form";
|
|
33
|
+
"contractspec:feature": "contractspec:feature";
|
|
34
|
+
"contractspec:workflow": "contractspec:workflow";
|
|
35
|
+
"contractspec:template": "contractspec:template";
|
|
36
|
+
"contractspec:integration": "contractspec:integration";
|
|
37
|
+
"contractspec:data-view": "contractspec:data-view";
|
|
38
|
+
"contractspec:migration": "contractspec:migration";
|
|
39
|
+
"contractspec:telemetry": "contractspec:telemetry";
|
|
40
|
+
"contractspec:experiment": "contractspec:experiment";
|
|
41
|
+
"contractspec:app-config": "contractspec:app-config";
|
|
42
|
+
"contractspec:knowledge": "contractspec:knowledge";
|
|
43
|
+
}>;
|
|
44
|
+
version: z.ZodNumber;
|
|
45
|
+
title: z.ZodString;
|
|
46
|
+
description: z.ZodString;
|
|
47
|
+
meta: z.ZodObject<{
|
|
48
|
+
stability: z.ZodEnum<{
|
|
49
|
+
idea: "idea";
|
|
50
|
+
in_creation: "in_creation";
|
|
51
|
+
experimental: "experimental";
|
|
52
|
+
beta: "beta";
|
|
53
|
+
stable: "stable";
|
|
54
|
+
deprecated: "deprecated";
|
|
55
|
+
}>;
|
|
56
|
+
owners: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
57
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
60
|
+
registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
|
+
files: z.ZodArray<z.ZodObject<{
|
|
62
|
+
path: z.ZodString;
|
|
63
|
+
type: z.ZodString;
|
|
64
|
+
content: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
schema: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
input: z.ZodOptional<z.ZodUnknown>;
|
|
68
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
declare const ContractRegistryManifestSchema: z.ZodObject<{
|
|
72
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
73
|
+
name: z.ZodString;
|
|
74
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
75
|
+
items: z.ZodArray<z.ZodObject<{
|
|
76
|
+
key: z.ZodString;
|
|
77
|
+
type: z.ZodEnum<{
|
|
78
|
+
"contractspec:operation": "contractspec:operation";
|
|
79
|
+
"contractspec:event": "contractspec:event";
|
|
80
|
+
"contractspec:presentation": "contractspec:presentation";
|
|
81
|
+
"contractspec:form": "contractspec:form";
|
|
82
|
+
"contractspec:feature": "contractspec:feature";
|
|
83
|
+
"contractspec:workflow": "contractspec:workflow";
|
|
84
|
+
"contractspec:template": "contractspec:template";
|
|
85
|
+
"contractspec:integration": "contractspec:integration";
|
|
86
|
+
"contractspec:data-view": "contractspec:data-view";
|
|
87
|
+
"contractspec:migration": "contractspec:migration";
|
|
88
|
+
"contractspec:telemetry": "contractspec:telemetry";
|
|
89
|
+
"contractspec:experiment": "contractspec:experiment";
|
|
90
|
+
"contractspec:app-config": "contractspec:app-config";
|
|
91
|
+
"contractspec:knowledge": "contractspec:knowledge";
|
|
92
|
+
}>;
|
|
93
|
+
version: z.ZodNumber;
|
|
94
|
+
title: z.ZodString;
|
|
95
|
+
description: z.ZodString;
|
|
96
|
+
meta: z.ZodObject<{
|
|
97
|
+
stability: z.ZodEnum<{
|
|
98
|
+
idea: "idea";
|
|
99
|
+
in_creation: "in_creation";
|
|
100
|
+
experimental: "experimental";
|
|
101
|
+
beta: "beta";
|
|
102
|
+
stable: "stable";
|
|
103
|
+
deprecated: "deprecated";
|
|
104
|
+
}>;
|
|
105
|
+
owners: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
106
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
+
registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
110
|
+
files: z.ZodArray<z.ZodObject<{
|
|
111
|
+
path: z.ZodString;
|
|
112
|
+
type: z.ZodString;
|
|
113
|
+
content: z.ZodOptional<z.ZodString>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
schema: z.ZodOptional<z.ZodObject<{
|
|
116
|
+
input: z.ZodOptional<z.ZodUnknown>;
|
|
117
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
type ContractRegistryItemParsed = z.infer<typeof ContractRegistryItemSchema> & ContractRegistryItem;
|
|
122
|
+
type ContractRegistryManifestParsed = z.infer<typeof ContractRegistryManifestSchema> & ContractRegistryManifest;
|
|
123
|
+
//#endregion
|
|
124
|
+
export { ContractRegistryFileSchema, ContractRegistryItemParsed, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestParsed, ContractRegistryManifestSchema };
|
|
@@ -1 +1,61 @@
|
|
|
1
|
-
import{StabilityEnum
|
|
1
|
+
import { StabilityEnum } from "../ownership.js";
|
|
2
|
+
import z from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/contract-registry/schemas.ts
|
|
5
|
+
const ContractRegistryItemTypeValues = [
|
|
6
|
+
"contractspec:operation",
|
|
7
|
+
"contractspec:event",
|
|
8
|
+
"contractspec:presentation",
|
|
9
|
+
"contractspec:form",
|
|
10
|
+
"contractspec:feature",
|
|
11
|
+
"contractspec:workflow",
|
|
12
|
+
"contractspec:template",
|
|
13
|
+
"contractspec:integration",
|
|
14
|
+
"contractspec:data-view",
|
|
15
|
+
"contractspec:migration",
|
|
16
|
+
"contractspec:telemetry",
|
|
17
|
+
"contractspec:experiment",
|
|
18
|
+
"contractspec:app-config",
|
|
19
|
+
"contractspec:knowledge"
|
|
20
|
+
];
|
|
21
|
+
const ContractRegistryItemTypeSchema = z.enum(ContractRegistryItemTypeValues);
|
|
22
|
+
const ContractRegistryFileSchema = z.object({
|
|
23
|
+
path: z.string().min(1),
|
|
24
|
+
type: z.string().min(1),
|
|
25
|
+
content: z.string().optional()
|
|
26
|
+
});
|
|
27
|
+
const ContractRegistryItemSchema = z.object({
|
|
28
|
+
key: z.string().min(1),
|
|
29
|
+
type: ContractRegistryItemTypeSchema,
|
|
30
|
+
version: z.number().int().nonnegative(),
|
|
31
|
+
title: z.string().min(1),
|
|
32
|
+
description: z.string().min(1),
|
|
33
|
+
meta: z.object({
|
|
34
|
+
stability: z.enum([
|
|
35
|
+
StabilityEnum.Idea,
|
|
36
|
+
StabilityEnum.InCreation,
|
|
37
|
+
StabilityEnum.Experimental,
|
|
38
|
+
StabilityEnum.Beta,
|
|
39
|
+
StabilityEnum.Stable,
|
|
40
|
+
StabilityEnum.Deprecated
|
|
41
|
+
]),
|
|
42
|
+
owners: z.array(z.string().min(1)).default([]),
|
|
43
|
+
tags: z.array(z.string().min(1)).default([])
|
|
44
|
+
}),
|
|
45
|
+
dependencies: z.array(z.string().min(1)).optional(),
|
|
46
|
+
registryDependencies: z.array(z.string().min(1)).optional(),
|
|
47
|
+
files: z.array(ContractRegistryFileSchema).min(1),
|
|
48
|
+
schema: z.object({
|
|
49
|
+
input: z.unknown().optional(),
|
|
50
|
+
output: z.unknown().optional()
|
|
51
|
+
}).optional()
|
|
52
|
+
});
|
|
53
|
+
const ContractRegistryManifestSchema = z.object({
|
|
54
|
+
$schema: z.string().min(1).optional(),
|
|
55
|
+
name: z.string().min(1),
|
|
56
|
+
homepage: z.string().min(1).optional(),
|
|
57
|
+
items: z.array(ContractRegistryItemSchema)
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
export { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Owner, Stability, Tag } from "../ownership.js";
|
|
2
|
+
|
|
3
|
+
//#region src/contract-registry/types.d.ts
|
|
4
|
+
type ContractRegistryItemType = 'contractspec:operation' | 'contractspec:event' | 'contractspec:presentation' | 'contractspec:form' | 'contractspec:feature' | 'contractspec:workflow' | 'contractspec:template' | 'contractspec:integration' | 'contractspec:data-view' | 'contractspec:migration' | 'contractspec:telemetry' | 'contractspec:experiment' | 'contractspec:app-config' | 'contractspec:knowledge';
|
|
5
|
+
type JsonSchema = unknown;
|
|
6
|
+
interface ContractRegistryFile {
|
|
7
|
+
/** Path relative to the registry project root */
|
|
8
|
+
path: string;
|
|
9
|
+
/**
|
|
10
|
+
* File classification (kept open-ended to remain ejectable and compatible
|
|
11
|
+
* with multiple consumers).
|
|
12
|
+
*
|
|
13
|
+
* Examples: 'registry:component', 'contractspec:spec', 'registry:lib'
|
|
14
|
+
*/
|
|
15
|
+
type: string;
|
|
16
|
+
/** Optional inline content (if serving without file hosting) */
|
|
17
|
+
content?: string;
|
|
18
|
+
}
|
|
19
|
+
interface ContractRegistryItem {
|
|
20
|
+
key: string;
|
|
21
|
+
type: ContractRegistryItemType;
|
|
22
|
+
version: number;
|
|
23
|
+
title: string;
|
|
24
|
+
description: string;
|
|
25
|
+
meta: {
|
|
26
|
+
stability: Stability;
|
|
27
|
+
owners: Owner[];
|
|
28
|
+
tags: Tag[];
|
|
29
|
+
};
|
|
30
|
+
dependencies?: string[];
|
|
31
|
+
registryDependencies?: string[];
|
|
32
|
+
files: ContractRegistryFile[];
|
|
33
|
+
schema?: {
|
|
34
|
+
input?: JsonSchema;
|
|
35
|
+
output?: JsonSchema;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
interface ContractRegistryManifest {
|
|
39
|
+
/** Optional JSON-schema reference for tooling */
|
|
40
|
+
$schema?: string;
|
|
41
|
+
name: string;
|
|
42
|
+
homepage?: string;
|
|
43
|
+
items: ContractRegistryItem[];
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { ContractRegistryFile, ContractRegistryItem, ContractRegistryItemType, ContractRegistryManifest, JsonSchema };
|