@contractspec/lib.contracts 1.44.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/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/_virtual/rolldown_runtime.js +37 -0
- package/dist/app-config/app-config.feature.d.ts +12 -0
- package/dist/app-config/app-config.feature.js +54 -0
- package/dist/app-config/branding.d.ts +55 -0
- package/dist/app-config/branding.js +0 -0
- package/dist/app-config/contracts.d.ts +245 -0
- package/dist/app-config/contracts.js +395 -0
- package/dist/app-config/docs/app-config.docblock.d.ts +6 -0
- package/dist/app-config/docs/app-config.docblock.js +21 -0
- package/dist/app-config/events.d.ts +122 -0
- package/dist/app-config/events.js +174 -0
- package/dist/app-config/index.d.ts +9 -0
- package/dist/app-config/index.js +8 -0
- package/dist/app-config/lifecycle-contracts.d.ts +273 -0
- package/dist/app-config/lifecycle-contracts.js +440 -0
- package/dist/app-config/lifecycle.d.ts +27 -0
- package/dist/app-config/lifecycle.js +0 -0
- package/dist/app-config/runtime.d.ts +120 -0
- package/dist/app-config/runtime.js +617 -0
- package/dist/app-config/spec.d.ts +173 -0
- package/dist/app-config/spec.js +36 -0
- package/dist/app-config/validation.d.ts +49 -0
- package/dist/app-config/validation.js +538 -0
- 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 -0
- 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 -0
- package/dist/client/index.d.ts +6 -0
- package/dist/client/index.js +9 -0
- package/dist/client/react/drivers/rn-reusables.d.ts +22 -0
- package/dist/client/react/drivers/rn-reusables.js +21 -0
- package/dist/client/react/drivers/shadcn.d.ts +12 -0
- package/dist/client/react/drivers/shadcn.js +11 -0
- package/dist/client/react/feature-render.d.ts +23 -0
- package/dist/client/react/feature-render.js +44 -0
- package/dist/client/react/form-render.d.ts +92 -0
- package/dist/client/react/form-render.js +298 -0
- package/dist/client/react/index.d.ts +5 -0
- package/dist/client/react/index.js +8 -0
- package/dist/contract-registry/index.d.ts +3 -0
- package/dist/contract-registry/index.js +3 -0
- package/dist/contract-registry/schemas.d.ts +124 -0
- package/dist/contract-registry/schemas.js +61 -0
- package/dist/contract-registry/types.d.ts +46 -0
- package/dist/contract-registry/types.js +0 -0
- package/dist/data-views/data-views.d.ts +5 -0
- package/dist/data-views/data-views.js +4 -0
- package/dist/data-views/docs/data-views.docblock.d.ts +6 -0
- package/dist/data-views/docs/data-views.docblock.js +21 -0
- package/dist/data-views/index.d.ts +4 -0
- package/dist/data-views/index.js +4 -0
- package/dist/data-views/query-generator.d.ts +40 -0
- package/dist/data-views/query-generator.js +48 -0
- package/dist/data-views/registry.d.ts +51 -0
- package/dist/data-views/registry.js +82 -0
- package/dist/data-views/runtime.d.ts +28 -0
- package/dist/data-views/runtime.js +39 -0
- package/dist/data-views/spec.d.ts +32 -0
- package/dist/data-views/spec.js +10 -0
- package/dist/data-views/types.d.ts +157 -0
- package/dist/data-views/types.js +0 -0
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.d.ts +6 -0
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.js +17 -0
- package/dist/docs/index.d.ts +6 -0
- package/dist/docs/index.js +29 -0
- package/dist/docs/meta.docs.d.ts +6 -0
- package/dist/docs/meta.docs.js +29 -0
- package/dist/docs/presentations.d.ts +33 -0
- package/dist/docs/presentations.js +64 -0
- package/dist/docs/registry.d.ts +23 -0
- package/dist/docs/registry.js +51 -0
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.d.ts +6 -0
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.js +81 -0
- package/dist/docs/tech/contracts/README.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/README.docblock.js +21 -0
- package/dist/docs/tech/contracts/create-subscription.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/create-subscription.docblock.js +21 -0
- package/dist/docs/tech/contracts/graphql-typed-outputs.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/graphql-typed-outputs.docblock.js +21 -0
- package/dist/docs/tech/contracts/migrations.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/migrations.docblock.js +21 -0
- package/dist/docs/tech/contracts/openapi-export.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/openapi-export.docblock.js +58 -0
- package/dist/docs/tech/contracts/openapi-import.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/openapi-import.docblock.js +65 -0
- 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 +21 -0
- package/dist/docs/tech/contracts/overlays.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/overlays.docblock.js +21 -0
- package/dist/docs/tech/contracts/tests.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/tests.docblock.js +21 -0
- package/dist/docs/tech/contracts/themes.docblock.d.ts +6 -0
- package/dist/docs/tech/contracts/themes.docblock.js +21 -0
- 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 -0
- package/dist/docs/tech/lifecycle-stage-system.docblock.d.ts +6 -0
- package/dist/docs/tech/lifecycle-stage-system.docblock.js +17 -0
- package/dist/docs/tech/llm/llm-integration.docblock.d.ts +7 -0
- package/dist/docs/tech/llm/llm-integration.docblock.js +358 -0
- package/dist/docs/tech/mcp-endpoints.docblock.d.ts +6 -0
- package/dist/docs/tech/mcp-endpoints.docblock.js +38 -0
- package/dist/docs/tech/presentation-runtime.docblock.d.ts +6 -0
- package/dist/docs/tech/presentation-runtime.docblock.js +17 -0
- package/dist/docs/tech/schema/README.docblock.d.ts +6 -0
- package/dist/docs/tech/schema/README.docblock.js +21 -0
- package/dist/docs/tech/studio/learning-events.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/learning-events.docblock.js +49 -0
- package/dist/docs/tech/studio/learning-journeys.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/learning-journeys.docblock.js +80 -0
- package/dist/docs/tech/studio/platform-admin-panel.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/platform-admin-panel.docblock.js +85 -0
- package/dist/docs/tech/studio/project-access-teams.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/project-access-teams.docblock.js +46 -0
- package/dist/docs/tech/studio/project-routing.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/project-routing.docblock.js +68 -0
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.js +41 -0
- package/dist/docs/tech/studio/team-invitations.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/team-invitations.docblock.js +70 -0
- package/dist/docs/tech/studio/workspace-ops.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/workspace-ops.docblock.js +48 -0
- package/dist/docs/tech/studio/workspaces.docblock.d.ts +6 -0
- package/dist/docs/tech/studio/workspaces.docblock.js +63 -0
- package/dist/docs/tech/telemetry-ingest.docblock.d.ts +6 -0
- package/dist/docs/tech/telemetry-ingest.docblock.js +156 -0
- package/dist/docs/tech/templates/runtime.docblock.d.ts +6 -0
- package/dist/docs/tech/templates/runtime.docblock.js +21 -0
- package/dist/docs/tech/vscode-extension.docblock.d.ts +6 -0
- package/dist/docs/tech/vscode-extension.docblock.js +102 -0
- package/dist/docs/tech-contracts.docs.d.ts +6 -0
- package/dist/docs/tech-contracts.docs.js +96 -0
- package/dist/docs/types.d.ts +41 -0
- package/dist/docs/types.js +0 -0
- package/dist/events.d.ts +47 -0
- package/dist/events.js +19 -0
- package/dist/experiments/docs/experiments.docblock.d.ts +6 -0
- package/dist/experiments/docs/experiments.docblock.js +21 -0
- package/dist/experiments/evaluator.d.ts +37 -0
- package/dist/experiments/evaluator.js +101 -0
- package/dist/experiments/spec-resolver.d.ts +17 -0
- package/dist/experiments/spec-resolver.js +0 -0
- package/dist/experiments/spec.d.ts +82 -0
- package/dist/experiments/spec.js +33 -0
- package/dist/features/index.d.ts +5 -0
- package/dist/features/index.js +5 -0
- package/dist/features/install.d.ts +22 -0
- package/dist/features/install.js +36 -0
- package/dist/features/registry.d.ts +26 -0
- package/dist/features/registry.js +49 -0
- package/dist/features/types.d.ts +88 -0
- package/dist/features/types.js +0 -0
- package/dist/features/validation.d.ts +8 -0
- package/dist/features/validation.js +14 -0
- package/dist/forms/docs/forms.docblock.d.ts +6 -0
- package/dist/forms/docs/forms.docblock.js +21 -0
- 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 +147 -0
- package/dist/index.js +121 -0
- package/dist/install.d.ts +77 -0
- package/dist/install.js +40 -0
- package/dist/integrations/binding.d.ts +17 -0
- package/dist/integrations/binding.js +0 -0
- package/dist/integrations/connection.d.ts +51 -0
- package/dist/integrations/connection.js +0 -0
- package/dist/integrations/docs/integrations.docblock.d.ts +6 -0
- package/dist/integrations/docs/integrations.docblock.js +94 -0
- package/dist/integrations/health.d.ts +21 -0
- package/dist/integrations/health.js +69 -0
- package/dist/integrations/index.d.ts +34 -0
- package/dist/integrations/index.js +23 -0
- package/dist/integrations/integrations.feature.d.ts +12 -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 -0
- package/dist/integrations/openbanking/contracts/balances.d.ts +165 -0
- package/dist/integrations/openbanking/contracts/balances.js +166 -0
- package/dist/integrations/openbanking/contracts/index.d.ts +10 -0
- package/dist/integrations/openbanking/contracts/index.js +12 -0
- package/dist/integrations/openbanking/contracts/transactions.d.ts +213 -0
- package/dist/integrations/openbanking/contracts/transactions.js +217 -0
- package/dist/integrations/openbanking/guards.d.ts +12 -0
- package/dist/integrations/openbanking/guards.js +33 -0
- package/dist/integrations/openbanking/models.d.ts +228 -0
- package/dist/integrations/openbanking/models.js +240 -0
- package/dist/integrations/openbanking/openbanking.feature.d.ts +12 -0
- package/dist/integrations/openbanking/openbanking.feature.js +69 -0
- package/dist/integrations/openbanking/telemetry.d.ts +15 -0
- package/dist/integrations/openbanking/telemetry.js +39 -0
- 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/calendar.js +0 -0
- package/dist/integrations/providers/elevenlabs.d.ts +7 -0
- package/dist/integrations/providers/elevenlabs.js +55 -0
- package/dist/integrations/providers/email.d.ts +86 -0
- package/dist/integrations/providers/email.js +0 -0
- package/dist/integrations/providers/embedding.d.ts +24 -0
- package/dist/integrations/providers/embedding.js +0 -0
- package/dist/integrations/providers/gcs-storage.d.ts +7 -0
- package/dist/integrations/providers/gcs-storage.js +78 -0
- package/dist/integrations/providers/gmail.d.ts +7 -0
- package/dist/integrations/providers/gmail.js +90 -0
- package/dist/integrations/providers/google-calendar.d.ts +7 -0
- package/dist/integrations/providers/google-calendar.js +69 -0
- package/dist/integrations/providers/impls/elevenlabs-voice.d.ts +20 -0
- package/dist/integrations/providers/impls/elevenlabs-voice.js +95 -0
- package/dist/integrations/providers/impls/gcs-storage.d.ts +24 -0
- package/dist/integrations/providers/impls/gcs-storage.js +88 -0
- package/dist/integrations/providers/impls/gmail-inbound.d.ts +26 -0
- package/dist/integrations/providers/impls/gmail-inbound.js +200 -0
- package/dist/integrations/providers/impls/gmail-outbound.d.ts +18 -0
- package/dist/integrations/providers/impls/gmail-outbound.js +105 -0
- package/dist/integrations/providers/impls/google-calendar.d.ts +23 -0
- package/dist/integrations/providers/impls/google-calendar.js +154 -0
- package/dist/integrations/providers/impls/index.d.ts +15 -0
- package/dist/integrations/providers/impls/index.js +16 -0
- package/dist/integrations/providers/impls/mistral-embedding.d.ts +23 -0
- package/dist/integrations/providers/impls/mistral-embedding.js +41 -0
- package/dist/integrations/providers/impls/mistral-llm.d.ts +31 -0
- package/dist/integrations/providers/impls/mistral-llm.js +247 -0
- package/dist/integrations/providers/impls/postmark-email.d.ts +19 -0
- package/dist/integrations/providers/impls/postmark-email.js +55 -0
- package/dist/integrations/providers/impls/powens-client.d.ts +124 -0
- package/dist/integrations/providers/impls/powens-client.js +171 -0
- package/dist/integrations/providers/impls/powens-openbanking.d.ts +27 -0
- package/dist/integrations/providers/impls/powens-openbanking.js +218 -0
- package/dist/integrations/providers/impls/provider-factory.d.ts +26 -0
- package/dist/integrations/providers/impls/provider-factory.js +145 -0
- package/dist/integrations/providers/impls/qdrant-vector.d.ts +24 -0
- package/dist/integrations/providers/impls/qdrant-vector.js +69 -0
- package/dist/integrations/providers/impls/stripe-payments.d.ts +28 -0
- package/dist/integrations/providers/impls/stripe-payments.js +202 -0
- package/dist/integrations/providers/impls/twilio-sms.d.ts +20 -0
- package/dist/integrations/providers/impls/twilio-sms.js +58 -0
- package/dist/integrations/providers/index.d.ts +22 -0
- package/dist/integrations/providers/index.js +13 -0
- package/dist/integrations/providers/llm.d.ts +82 -0
- package/dist/integrations/providers/llm.js +0 -0
- package/dist/integrations/providers/mistral.d.ts +7 -0
- package/dist/integrations/providers/mistral.js +71 -0
- package/dist/integrations/providers/openbanking.d.ts +128 -0
- package/dist/integrations/providers/openbanking.js +0 -0
- package/dist/integrations/providers/payments.d.ts +109 -0
- package/dist/integrations/providers/payments.js +0 -0
- package/dist/integrations/providers/postmark.d.ts +7 -0
- package/dist/integrations/providers/postmark.js +71 -0
- package/dist/integrations/providers/powens.d.ts +7 -0
- package/dist/integrations/providers/powens.js +119 -0
- package/dist/integrations/providers/qdrant.d.ts +7 -0
- package/dist/integrations/providers/qdrant.js +76 -0
- package/dist/integrations/providers/registry.d.ts +11 -0
- package/dist/integrations/providers/registry.js +34 -0
- package/dist/integrations/providers/sms.d.ts +34 -0
- package/dist/integrations/providers/sms.js +0 -0
- package/dist/integrations/providers/storage.d.ts +60 -0
- package/dist/integrations/providers/storage.js +0 -0
- package/dist/integrations/providers/stripe.d.ts +7 -0
- package/dist/integrations/providers/stripe.js +86 -0
- package/dist/integrations/providers/twilio-sms.d.ts +7 -0
- package/dist/integrations/providers/twilio-sms.js +64 -0
- package/dist/integrations/providers/vector-store.d.ts +43 -0
- package/dist/integrations/providers/vector-store.js +0 -0
- package/dist/integrations/providers/voice.d.ts +34 -0
- package/dist/integrations/providers/voice.js +0 -0
- package/dist/integrations/runtime.d.ts +99 -0
- package/dist/integrations/runtime.js +186 -0
- package/dist/integrations/secrets/aws-secret-manager.d.ts +31 -0
- package/dist/integrations/secrets/aws-secret-manager.js +231 -0
- package/dist/integrations/secrets/env-secret-provider.d.ts +31 -0
- package/dist/integrations/secrets/env-secret-provider.js +81 -0
- package/dist/integrations/secrets/gcp-secret-manager.d.ts +32 -0
- package/dist/integrations/secrets/gcp-secret-manager.js +229 -0
- package/dist/integrations/secrets/index.d.ts +7 -0
- package/dist/integrations/secrets/index.js +8 -0
- package/dist/integrations/secrets/manager.d.ts +47 -0
- package/dist/integrations/secrets/manager.js +103 -0
- package/dist/integrations/secrets/provider.d.ts +52 -0
- package/dist/integrations/secrets/provider.js +58 -0
- package/dist/integrations/secrets/scaleway-secret-manager.d.ts +38 -0
- package/dist/integrations/secrets/scaleway-secret-manager.js +247 -0
- package/dist/integrations/secrets-types.d.ts +17 -0
- package/dist/integrations/secrets-types.js +0 -0
- package/dist/integrations/spec.d.ts +75 -0
- package/dist/integrations/spec.js +39 -0
- package/dist/jobs/define-job.d.ts +18 -0
- package/dist/jobs/define-job.js +16 -0
- package/dist/jobs/gcp-cloud-tasks.d.ts +41 -0
- package/dist/jobs/gcp-cloud-tasks.js +53 -0
- package/dist/jobs/gcp-pubsub.d.ts +25 -0
- package/dist/jobs/gcp-pubsub.js +39 -0
- package/dist/jobs/handlers/gmail-sync-handler.d.ts +9 -0
- package/dist/jobs/handlers/gmail-sync-handler.js +9 -0
- package/dist/jobs/handlers/index.d.ts +9 -0
- package/dist/jobs/handlers/index.js +12 -0
- package/dist/jobs/handlers/ping-handler.d.ts +10 -0
- package/dist/jobs/handlers/ping-handler.js +15 -0
- package/dist/jobs/handlers/storage-document-handler.d.ts +12 -0
- package/dist/jobs/handlers/storage-document-handler.js +14 -0
- package/dist/jobs/index.d.ts +3 -0
- package/dist/jobs/index.js +4 -0
- package/dist/jobs/memory-queue.d.ts +18 -0
- package/dist/jobs/memory-queue.js +71 -0
- package/dist/jobs/queue.d.ts +131 -0
- package/dist/jobs/queue.js +33 -0
- package/dist/jobs/scaleway-sqs-queue.d.ts +30 -0
- package/dist/jobs/scaleway-sqs-queue.js +153 -0
- package/dist/jsonschema.d.ts +27 -0
- package/dist/jsonschema.js +32 -0
- package/dist/knowledge/binding.d.ts +25 -0
- package/dist/knowledge/binding.js +0 -0
- package/dist/knowledge/docs/knowledge.docblock.d.ts +6 -0
- package/dist/knowledge/docs/knowledge.docblock.js +21 -0
- package/dist/knowledge/index.d.ts +11 -0
- package/dist/knowledge/index.js +10 -0
- package/dist/knowledge/ingestion/document-processor.d.ts +24 -0
- package/dist/knowledge/ingestion/document-processor.js +54 -0
- package/dist/knowledge/ingestion/embedding-service.d.ts +12 -0
- package/dist/knowledge/ingestion/embedding-service.js +25 -0
- package/dist/knowledge/ingestion/gmail-adapter.d.ts +18 -0
- package/dist/knowledge/ingestion/gmail-adapter.js +51 -0
- package/dist/knowledge/ingestion/index.d.ts +6 -0
- package/dist/knowledge/ingestion/index.js +7 -0
- package/dist/knowledge/ingestion/storage-adapter.d.ts +15 -0
- package/dist/knowledge/ingestion/storage-adapter.js +26 -0
- package/dist/knowledge/ingestion/vector-indexer.d.ts +18 -0
- package/dist/knowledge/ingestion/vector-indexer.js +32 -0
- package/dist/knowledge/knowledge.feature.d.ts +12 -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 -0
- package/dist/knowledge/query/service.d.ts +29 -0
- package/dist/knowledge/query/service.js +65 -0
- package/dist/knowledge/runtime.d.ts +32 -0
- package/dist/knowledge/runtime.js +49 -0
- package/dist/knowledge/source.d.ts +32 -0
- package/dist/knowledge/source.js +0 -0
- package/dist/knowledge/spaces/email-threads.d.ts +7 -0
- package/dist/knowledge/spaces/email-threads.js +37 -0
- package/dist/knowledge/spaces/financial-docs.d.ts +7 -0
- package/dist/knowledge/spaces/financial-docs.js +37 -0
- package/dist/knowledge/spaces/financial-overview.d.ts +7 -0
- package/dist/knowledge/spaces/financial-overview.js +41 -0
- package/dist/knowledge/spaces/index.d.ts +7 -0
- package/dist/knowledge/spaces/index.js +8 -0
- package/dist/knowledge/spaces/product-canon.d.ts +7 -0
- package/dist/knowledge/spaces/product-canon.js +37 -0
- package/dist/knowledge/spaces/support-faq.d.ts +7 -0
- package/dist/knowledge/spaces/support-faq.js +40 -0
- package/dist/knowledge/spaces/uploaded-docs.d.ts +7 -0
- package/dist/knowledge/spaces/uploaded-docs.js +37 -0
- package/dist/knowledge/spec.d.ts +48 -0
- package/dist/knowledge/spec.js +39 -0
- package/dist/llm/exporters.d.ts +70 -0
- package/dist/llm/exporters.js +542 -0
- package/dist/llm/index.d.ts +4 -0
- package/dist/llm/index.js +4 -0
- package/dist/llm/prompts.d.ts +52 -0
- package/dist/llm/prompts.js +410 -0
- package/dist/llm/types.d.ts +215 -0
- package/dist/llm/types.js +0 -0
- package/dist/markdown.d.ts +22 -0
- package/dist/markdown.js +119 -0
- package/dist/migrations.d.ts +52 -0
- package/dist/migrations.js +33 -0
- package/dist/model-registry.d.ts +13 -0
- package/dist/model-registry.js +33 -0
- package/dist/onboarding-base.d.ts +138 -0
- package/dist/onboarding-base.js +195 -0
- package/dist/openapi.d.ts +31 -0
- package/dist/openapi.js +75 -0
- package/dist/operations/index.d.ts +3 -0
- package/dist/operations/index.js +4 -0
- package/dist/operations/operation.d.ts +186 -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 -0
- package/dist/policy/docs/policy.docblock.d.ts +6 -0
- package/dist/policy/docs/policy.docblock.js +21 -0
- package/dist/policy/engine.d.ts +40 -0
- package/dist/policy/engine.js +223 -0
- 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 -0
- 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 -0
- package/dist/presentations/docs/presentations-conventions.docblock.d.ts +6 -0
- package/dist/presentations/docs/presentations-conventions.docblock.js +21 -0
- 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 -0
- package/dist/promptRegistry.d.ts +15 -0
- package/dist/promptRegistry.js +34 -0
- package/dist/regenerator/adapters.d.ts +19 -0
- package/dist/regenerator/adapters.js +0 -0
- package/dist/regenerator/docs/regenerator.docblock.d.ts +6 -0
- package/dist/regenerator/docs/regenerator.docblock.js +21 -0
- package/dist/regenerator/executor.d.ts +70 -0
- package/dist/regenerator/executor.js +86 -0
- package/dist/regenerator/index.d.ts +7 -0
- package/dist/regenerator/index.js +6 -0
- package/dist/regenerator/service.d.ts +33 -0
- package/dist/regenerator/service.js +93 -0
- package/dist/regenerator/sinks.d.ts +26 -0
- package/dist/regenerator/sinks.js +32 -0
- package/dist/regenerator/types.d.ts +107 -0
- package/dist/regenerator/types.js +0 -0
- package/dist/regenerator/utils.d.ts +9 -0
- package/dist/regenerator/utils.js +51 -0
- package/dist/registry-utils.d.ts +106 -0
- package/dist/registry-utils.js +122 -0
- package/dist/registry.d.ts +31 -0
- package/dist/registry.js +61 -0
- package/dist/resources.d.ts +64 -0
- package/dist/resources.js +50 -0
- package/dist/schema-to-markdown.d.ts +54 -0
- package/dist/schema-to-markdown.js +217 -0
- 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 +83 -0
- package/dist/server/graphql-pothos.d.ts +31 -0
- package/dist/server/graphql-pothos.js +134 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +10 -0
- package/dist/server/mcp/createMcpServer.d.ts +15 -0
- package/dist/server/mcp/createMcpServer.js +27 -0
- package/dist/server/mcp/mcpTypes.d.ts +27 -0
- package/dist/server/mcp/mcpTypes.js +0 -0
- package/dist/server/mcp/registerPresentations.d.ts +7 -0
- package/dist/server/mcp/registerPresentations.js +63 -0
- package/dist/server/mcp/registerPrompts.d.ts +8 -0
- package/dist/server/mcp/registerPrompts.js +37 -0
- package/dist/server/mcp/registerResources.d.ts +8 -0
- package/dist/server/mcp/registerResources.js +35 -0
- package/dist/server/mcp/registerTools.d.ts +8 -0
- package/dist/server/mcp/registerTools.js +22 -0
- package/dist/server/provider-mcp.d.ts +2 -0
- package/dist/server/provider-mcp.js +3 -0
- package/dist/server/rest-elysia.d.ts +40 -0
- package/dist/server/rest-elysia.js +20 -0
- package/dist/server/rest-express.d.ts +16 -0
- package/dist/server/rest-express.js +36 -0
- package/dist/server/rest-generic.d.ts +32 -0
- package/dist/server/rest-generic.js +124 -0
- package/dist/server/rest-next-app.d.ts +35 -0
- package/dist/server/rest-next-app.js +38 -0
- package/dist/server/rest-next-mcp.d.ts +11 -0
- package/dist/server/rest-next-mcp.js +45 -0
- package/dist/server/rest-next-pages.d.ts +9 -0
- package/dist/server/rest-next-pages.js +22 -0
- package/dist/telemetry/anomaly.d.ts +27 -0
- package/dist/telemetry/anomaly.js +48 -0
- package/dist/telemetry/docs/telemetry.docblock.d.ts +6 -0
- package/dist/telemetry/docs/telemetry.docblock.js +21 -0
- package/dist/telemetry/index.d.ts +4 -0
- package/dist/telemetry/index.js +5 -0
- package/dist/telemetry/spec.d.ts +91 -0
- package/dist/telemetry/spec.js +69 -0
- package/dist/telemetry/tracker.d.ts +51 -0
- package/dist/telemetry/tracker.js +76 -0
- package/dist/tests/index.d.ts +3 -0
- package/dist/tests/index.js +4 -0
- package/dist/tests/runner.d.ts +43 -0
- package/dist/tests/runner.js +150 -0
- package/dist/tests/spec.d.ts +81 -0
- package/dist/tests/spec.js +33 -0
- package/dist/themes.d.ts +53 -0
- package/dist/themes.js +39 -0
- package/dist/translations/catalog.d.ts +28 -0
- package/dist/translations/catalog.js +0 -0
- package/dist/translations/tenant.d.ts +15 -0
- package/dist/translations/tenant.js +0 -0
- package/dist/types.d.ts +92 -0
- package/dist/types.js +0 -0
- package/dist/workflow/adapters/db-adapter.d.ts +46 -0
- package/dist/workflow/adapters/db-adapter.js +83 -0
- package/dist/workflow/adapters/file-adapter.d.ts +14 -0
- package/dist/workflow/adapters/file-adapter.js +11 -0
- package/dist/workflow/adapters/index.d.ts +4 -0
- package/dist/workflow/adapters/index.js +5 -0
- package/dist/workflow/adapters/memory-store.d.ts +18 -0
- package/dist/workflow/adapters/memory-store.js +58 -0
- package/dist/workflow/expression.d.ts +9 -0
- package/dist/workflow/expression.js +99 -0
- package/dist/workflow/index.d.ts +10 -0
- package/dist/workflow/index.js +9 -0
- package/dist/workflow/overview.docblock.d.ts +6 -0
- package/dist/workflow/overview.docblock.js +21 -0
- package/dist/workflow/runner.d.ts +75 -0
- package/dist/workflow/runner.js +337 -0
- package/dist/workflow/sla-monitor.d.ts +20 -0
- package/dist/workflow/sla-monitor.js +47 -0
- package/dist/workflow/spec.d.ts +106 -0
- package/dist/workflow/spec.js +55 -0
- package/dist/workflow/state.d.ts +35 -0
- package/dist/workflow/state.js +0 -0
- package/dist/workflow/validation.d.ts +29 -0
- package/dist/workflow/validation.js +176 -0
- package/dist/workspace-config/contractsrc-schema.d.ts +862 -0
- package/dist/workspace-config/contractsrc-schema.js +281 -0
- package/dist/workspace-config/index.d.ts +2 -0
- package/dist/workspace-config/index.js +3 -0
- package/dist/workspace-config/workspace-config.docblock.d.ts +6 -0
- package/dist/workspace-config/workspace-config.docblock.js +45 -0
- package/package.json +598 -0
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import { OwnersEnum, StabilityEnum, TagsEnum } from "../ownership.js";
|
|
2
|
+
import { defineCommand, defineQuery } from "../operations/operation.js";
|
|
3
|
+
import "../operations/index.js";
|
|
4
|
+
import { ConfigDraftCreatedEvent, ConfigPromotedToPreviewEvent, ConfigPublishedEvent, ConfigRolledBackEvent } from "./events.js";
|
|
5
|
+
import { ScalarTypeEnum, SchemaModel } from "@contractspec/lib.schema";
|
|
6
|
+
|
|
7
|
+
//#region src/app-config/lifecycle-contracts.ts
|
|
8
|
+
const LifecyclePolicy = {
|
|
9
|
+
auth: "admin",
|
|
10
|
+
policies: [{
|
|
11
|
+
key: "platform.app-config.manage",
|
|
12
|
+
version: 1
|
|
13
|
+
}]
|
|
14
|
+
};
|
|
15
|
+
const LifecycleReadPolicy = {
|
|
16
|
+
auth: "admin",
|
|
17
|
+
policies: [{
|
|
18
|
+
key: "platform.app-config.read",
|
|
19
|
+
version: 1
|
|
20
|
+
}]
|
|
21
|
+
};
|
|
22
|
+
const ConfigVersionRecord = new SchemaModel({
|
|
23
|
+
name: "ConfigVersionRecord",
|
|
24
|
+
fields: {
|
|
25
|
+
meta: {
|
|
26
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
27
|
+
isOptional: false
|
|
28
|
+
},
|
|
29
|
+
config: {
|
|
30
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
31
|
+
isOptional: false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const ConfigTransitionRecord = new SchemaModel({
|
|
36
|
+
name: "ConfigTransitionRecord",
|
|
37
|
+
fields: {
|
|
38
|
+
tenantId: {
|
|
39
|
+
type: ScalarTypeEnum.ID(),
|
|
40
|
+
isOptional: false
|
|
41
|
+
},
|
|
42
|
+
appId: {
|
|
43
|
+
type: ScalarTypeEnum.ID(),
|
|
44
|
+
isOptional: false
|
|
45
|
+
},
|
|
46
|
+
fromStatus: {
|
|
47
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
48
|
+
isOptional: false
|
|
49
|
+
},
|
|
50
|
+
toStatus: {
|
|
51
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
52
|
+
isOptional: false
|
|
53
|
+
},
|
|
54
|
+
version: {
|
|
55
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
56
|
+
isOptional: false
|
|
57
|
+
},
|
|
58
|
+
timestamp: {
|
|
59
|
+
type: ScalarTypeEnum.DateTime(),
|
|
60
|
+
isOptional: false
|
|
61
|
+
},
|
|
62
|
+
actor: {
|
|
63
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
64
|
+
isOptional: false
|
|
65
|
+
},
|
|
66
|
+
reason: {
|
|
67
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
68
|
+
isOptional: true
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const CreateDraftInput = new SchemaModel({
|
|
73
|
+
name: "CreateTenantConfigDraftInput",
|
|
74
|
+
fields: {
|
|
75
|
+
tenantId: {
|
|
76
|
+
type: ScalarTypeEnum.ID(),
|
|
77
|
+
isOptional: false
|
|
78
|
+
},
|
|
79
|
+
appId: {
|
|
80
|
+
type: ScalarTypeEnum.ID(),
|
|
81
|
+
isOptional: false
|
|
82
|
+
},
|
|
83
|
+
blueprintName: {
|
|
84
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
85
|
+
isOptional: false
|
|
86
|
+
},
|
|
87
|
+
blueprintVersion: {
|
|
88
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
89
|
+
isOptional: false
|
|
90
|
+
},
|
|
91
|
+
environment: {
|
|
92
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
93
|
+
isOptional: true
|
|
94
|
+
},
|
|
95
|
+
fromVersion: {
|
|
96
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
97
|
+
isOptional: true
|
|
98
|
+
},
|
|
99
|
+
createdBy: {
|
|
100
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
101
|
+
isOptional: false
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
const CreateDraftOutput = new SchemaModel({
|
|
106
|
+
name: "CreateTenantConfigDraftOutput",
|
|
107
|
+
fields: {
|
|
108
|
+
version: {
|
|
109
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
110
|
+
isOptional: false
|
|
111
|
+
},
|
|
112
|
+
status: {
|
|
113
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
114
|
+
isOptional: false
|
|
115
|
+
},
|
|
116
|
+
createdAt: {
|
|
117
|
+
type: ScalarTypeEnum.DateTime(),
|
|
118
|
+
isOptional: false
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
const CreateTenantConfigDraftCommand = defineCommand({
|
|
123
|
+
meta: {
|
|
124
|
+
key: "appConfig.lifecycle.createDraft",
|
|
125
|
+
version: 1,
|
|
126
|
+
description: "Creates a new draft tenant config version.",
|
|
127
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
128
|
+
tags: [TagsEnum.Hygiene, "app-config"],
|
|
129
|
+
stability: StabilityEnum.Experimental,
|
|
130
|
+
goal: "Allow operators to start editing a new tenant config version.",
|
|
131
|
+
context: "Invoked by the Studio or automation when starting a new configuration run."
|
|
132
|
+
},
|
|
133
|
+
io: {
|
|
134
|
+
input: CreateDraftInput,
|
|
135
|
+
output: CreateDraftOutput
|
|
136
|
+
},
|
|
137
|
+
policy: LifecyclePolicy,
|
|
138
|
+
sideEffects: { emits: [{
|
|
139
|
+
ref: ConfigDraftCreatedEvent.meta,
|
|
140
|
+
when: "after successful draft creation"
|
|
141
|
+
}] }
|
|
142
|
+
});
|
|
143
|
+
const PromotePreviewInput = new SchemaModel({
|
|
144
|
+
name: "PromoteTenantConfigPreviewInput",
|
|
145
|
+
fields: {
|
|
146
|
+
tenantId: {
|
|
147
|
+
type: ScalarTypeEnum.ID(),
|
|
148
|
+
isOptional: false
|
|
149
|
+
},
|
|
150
|
+
appId: {
|
|
151
|
+
type: ScalarTypeEnum.ID(),
|
|
152
|
+
isOptional: false
|
|
153
|
+
},
|
|
154
|
+
version: {
|
|
155
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
156
|
+
isOptional: false
|
|
157
|
+
},
|
|
158
|
+
promotedBy: {
|
|
159
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
160
|
+
isOptional: false
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
const PromotePreviewOutput = new SchemaModel({
|
|
165
|
+
name: "PromoteTenantConfigPreviewOutput",
|
|
166
|
+
fields: {
|
|
167
|
+
version: {
|
|
168
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
169
|
+
isOptional: false
|
|
170
|
+
},
|
|
171
|
+
status: {
|
|
172
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
173
|
+
isOptional: false
|
|
174
|
+
},
|
|
175
|
+
warnings: {
|
|
176
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
177
|
+
isOptional: true,
|
|
178
|
+
isArray: true
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
const PromoteTenantConfigToPreviewCommand = defineCommand({
|
|
183
|
+
meta: {
|
|
184
|
+
key: "appConfig.lifecycle.promoteToPreview",
|
|
185
|
+
version: 1,
|
|
186
|
+
description: "Promotes a draft tenant config to preview/testing state.",
|
|
187
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
188
|
+
tags: [TagsEnum.Hygiene, "app-config"],
|
|
189
|
+
stability: StabilityEnum.Experimental,
|
|
190
|
+
goal: "Enable validation and testing of draft configurations.",
|
|
191
|
+
context: "Called when a draft passes initial checks and should be exposed to preview environments."
|
|
192
|
+
},
|
|
193
|
+
io: {
|
|
194
|
+
input: PromotePreviewInput,
|
|
195
|
+
output: PromotePreviewOutput
|
|
196
|
+
},
|
|
197
|
+
policy: LifecyclePolicy,
|
|
198
|
+
sideEffects: { emits: [{
|
|
199
|
+
ref: ConfigPromotedToPreviewEvent.meta,
|
|
200
|
+
when: "after promotion to preview"
|
|
201
|
+
}] }
|
|
202
|
+
});
|
|
203
|
+
const PublishConfigInput = new SchemaModel({
|
|
204
|
+
name: "PublishTenantConfigInput",
|
|
205
|
+
fields: {
|
|
206
|
+
tenantId: {
|
|
207
|
+
type: ScalarTypeEnum.ID(),
|
|
208
|
+
isOptional: false
|
|
209
|
+
},
|
|
210
|
+
appId: {
|
|
211
|
+
type: ScalarTypeEnum.ID(),
|
|
212
|
+
isOptional: false
|
|
213
|
+
},
|
|
214
|
+
version: {
|
|
215
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
216
|
+
isOptional: false
|
|
217
|
+
},
|
|
218
|
+
environment: {
|
|
219
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
220
|
+
isOptional: true
|
|
221
|
+
},
|
|
222
|
+
publishedBy: {
|
|
223
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
224
|
+
isOptional: false
|
|
225
|
+
},
|
|
226
|
+
changeSummary: {
|
|
227
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
228
|
+
isOptional: true
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
const PublishConfigOutput = new SchemaModel({
|
|
233
|
+
name: "PublishTenantConfigOutput",
|
|
234
|
+
fields: {
|
|
235
|
+
version: {
|
|
236
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
237
|
+
isOptional: false
|
|
238
|
+
},
|
|
239
|
+
status: {
|
|
240
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
241
|
+
isOptional: false
|
|
242
|
+
},
|
|
243
|
+
previousVersion: {
|
|
244
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
245
|
+
isOptional: true
|
|
246
|
+
},
|
|
247
|
+
publishedAt: {
|
|
248
|
+
type: ScalarTypeEnum.DateTime(),
|
|
249
|
+
isOptional: false
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
const PublishTenantConfigCommand = defineCommand({
|
|
254
|
+
meta: {
|
|
255
|
+
key: "appConfig.lifecycle.publish",
|
|
256
|
+
version: 1,
|
|
257
|
+
description: "Publishes a preview tenant config to production.",
|
|
258
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
259
|
+
tags: [TagsEnum.Hygiene, "app-config"],
|
|
260
|
+
stability: StabilityEnum.Experimental,
|
|
261
|
+
goal: "Promote tested configurations to production safely.",
|
|
262
|
+
context: "Triggered after validation passes and change management approvals are complete."
|
|
263
|
+
},
|
|
264
|
+
io: {
|
|
265
|
+
input: PublishConfigInput,
|
|
266
|
+
output: PublishConfigOutput
|
|
267
|
+
},
|
|
268
|
+
policy: LifecyclePolicy,
|
|
269
|
+
sideEffects: { emits: [{
|
|
270
|
+
ref: ConfigPublishedEvent.meta,
|
|
271
|
+
when: "after publish succeeds"
|
|
272
|
+
}] }
|
|
273
|
+
});
|
|
274
|
+
const RollbackConfigInput = new SchemaModel({
|
|
275
|
+
name: "RollbackTenantConfigInput",
|
|
276
|
+
fields: {
|
|
277
|
+
tenantId: {
|
|
278
|
+
type: ScalarTypeEnum.ID(),
|
|
279
|
+
isOptional: false
|
|
280
|
+
},
|
|
281
|
+
appId: {
|
|
282
|
+
type: ScalarTypeEnum.ID(),
|
|
283
|
+
isOptional: false
|
|
284
|
+
},
|
|
285
|
+
toVersion: {
|
|
286
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
287
|
+
isOptional: false
|
|
288
|
+
},
|
|
289
|
+
environment: {
|
|
290
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
291
|
+
isOptional: true
|
|
292
|
+
},
|
|
293
|
+
rolledBackBy: {
|
|
294
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
295
|
+
isOptional: false
|
|
296
|
+
},
|
|
297
|
+
reason: {
|
|
298
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
299
|
+
isOptional: false
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
const RollbackConfigOutput = new SchemaModel({
|
|
304
|
+
name: "RollbackTenantConfigOutput",
|
|
305
|
+
fields: {
|
|
306
|
+
newVersion: {
|
|
307
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
308
|
+
isOptional: false
|
|
309
|
+
},
|
|
310
|
+
status: {
|
|
311
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
312
|
+
isOptional: false
|
|
313
|
+
},
|
|
314
|
+
rolledBackFrom: {
|
|
315
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
316
|
+
isOptional: false
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
const RollbackTenantConfigCommand = defineCommand({
|
|
321
|
+
meta: {
|
|
322
|
+
key: "appConfig.lifecycle.rollback",
|
|
323
|
+
version: 1,
|
|
324
|
+
description: "Rolls back to a previously published tenant config version.",
|
|
325
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
326
|
+
tags: [TagsEnum.Hygiene, "app-config"],
|
|
327
|
+
stability: StabilityEnum.Experimental,
|
|
328
|
+
goal: "Provide rapid recovery when new configs regress production.",
|
|
329
|
+
context: "Called manually or automatically when monitoring detects regression and a rollback is required."
|
|
330
|
+
},
|
|
331
|
+
io: {
|
|
332
|
+
input: RollbackConfigInput,
|
|
333
|
+
output: RollbackConfigOutput
|
|
334
|
+
},
|
|
335
|
+
policy: LifecyclePolicy,
|
|
336
|
+
sideEffects: { emits: [{
|
|
337
|
+
ref: ConfigRolledBackEvent.meta,
|
|
338
|
+
when: "after rollback completes"
|
|
339
|
+
}] }
|
|
340
|
+
});
|
|
341
|
+
const ListVersionsInput = new SchemaModel({
|
|
342
|
+
name: "ListTenantConfigVersionsInput",
|
|
343
|
+
fields: {
|
|
344
|
+
tenantId: {
|
|
345
|
+
type: ScalarTypeEnum.ID(),
|
|
346
|
+
isOptional: false
|
|
347
|
+
},
|
|
348
|
+
appId: {
|
|
349
|
+
type: ScalarTypeEnum.ID(),
|
|
350
|
+
isOptional: false
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
const ListVersionsOutput = new SchemaModel({
|
|
355
|
+
name: "ListTenantConfigVersionsOutput",
|
|
356
|
+
fields: {
|
|
357
|
+
versions: {
|
|
358
|
+
type: ConfigVersionRecord,
|
|
359
|
+
isOptional: false,
|
|
360
|
+
isArray: true
|
|
361
|
+
},
|
|
362
|
+
transitions: {
|
|
363
|
+
type: ConfigTransitionRecord,
|
|
364
|
+
isOptional: true,
|
|
365
|
+
isArray: true
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
const ListTenantConfigVersionsQuery = defineQuery({
|
|
370
|
+
meta: {
|
|
371
|
+
key: "appConfig.lifecycle.listVersions",
|
|
372
|
+
version: 1,
|
|
373
|
+
description: "Lists all versions of a tenant configuration.",
|
|
374
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
375
|
+
tags: ["app-config", TagsEnum.Hygiene],
|
|
376
|
+
stability: StabilityEnum.Experimental,
|
|
377
|
+
goal: "Support lifecycle views and change audit tooling.",
|
|
378
|
+
context: "Used by the Studio to render history timelines and by automation for change tracking."
|
|
379
|
+
},
|
|
380
|
+
io: {
|
|
381
|
+
input: ListVersionsInput,
|
|
382
|
+
output: ListVersionsOutput
|
|
383
|
+
},
|
|
384
|
+
policy: LifecycleReadPolicy
|
|
385
|
+
});
|
|
386
|
+
const GetVersionInput = new SchemaModel({
|
|
387
|
+
name: "GetTenantConfigVersionInput",
|
|
388
|
+
fields: {
|
|
389
|
+
tenantId: {
|
|
390
|
+
type: ScalarTypeEnum.ID(),
|
|
391
|
+
isOptional: false
|
|
392
|
+
},
|
|
393
|
+
appId: {
|
|
394
|
+
type: ScalarTypeEnum.ID(),
|
|
395
|
+
isOptional: false
|
|
396
|
+
},
|
|
397
|
+
version: {
|
|
398
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
399
|
+
isOptional: false
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
const GetVersionOutput = new SchemaModel({
|
|
404
|
+
name: "GetTenantConfigVersionOutput",
|
|
405
|
+
fields: { version: {
|
|
406
|
+
type: ConfigVersionRecord,
|
|
407
|
+
isOptional: false
|
|
408
|
+
} }
|
|
409
|
+
});
|
|
410
|
+
const GetTenantConfigVersionQuery = defineQuery({
|
|
411
|
+
meta: {
|
|
412
|
+
key: "appConfig.lifecycle.getVersion",
|
|
413
|
+
version: 1,
|
|
414
|
+
description: "Fetches a single tenant config version by id.",
|
|
415
|
+
owners: [OwnersEnum.PlatformSigil],
|
|
416
|
+
tags: ["app-config", TagsEnum.Hygiene],
|
|
417
|
+
stability: StabilityEnum.Experimental,
|
|
418
|
+
goal: "Allow detail drill-down for lifecycle entries.",
|
|
419
|
+
context: "Used by automation to fetch config payloads for comparison or export."
|
|
420
|
+
},
|
|
421
|
+
io: {
|
|
422
|
+
input: GetVersionInput,
|
|
423
|
+
output: GetVersionOutput
|
|
424
|
+
},
|
|
425
|
+
policy: LifecycleReadPolicy
|
|
426
|
+
});
|
|
427
|
+
const lifecycleContracts = {
|
|
428
|
+
CreateTenantConfigDraftCommand,
|
|
429
|
+
PromoteTenantConfigToPreviewCommand,
|
|
430
|
+
PublishTenantConfigCommand,
|
|
431
|
+
RollbackTenantConfigCommand,
|
|
432
|
+
ListTenantConfigVersionsQuery,
|
|
433
|
+
GetTenantConfigVersionQuery
|
|
434
|
+
};
|
|
435
|
+
function registerAppConfigLifecycleContracts(registry) {
|
|
436
|
+
return registry.register(CreateTenantConfigDraftCommand).register(PromoteTenantConfigToPreviewCommand).register(PublishTenantConfigCommand).register(RollbackTenantConfigCommand).register(ListTenantConfigVersionsQuery).register(GetTenantConfigVersionQuery);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
//#endregion
|
|
440
|
+
export { CreateTenantConfigDraftCommand, GetTenantConfigVersionQuery, ListTenantConfigVersionsQuery, PromoteTenantConfigToPreviewCommand, PublishTenantConfigCommand, RollbackTenantConfigCommand, lifecycleContracts, registerAppConfigLifecycleContracts };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TenantAppConfig } from "./spec.js";
|
|
2
|
+
|
|
3
|
+
//#region src/app-config/lifecycle.d.ts
|
|
4
|
+
type ConfigStatus = 'draft' | 'preview' | 'published' | 'archived' | 'superseded';
|
|
5
|
+
interface TenantAppConfigVersion {
|
|
6
|
+
meta: TenantAppConfig['meta'];
|
|
7
|
+
config: TenantAppConfig;
|
|
8
|
+
}
|
|
9
|
+
interface ConfigTransition {
|
|
10
|
+
tenantId: string;
|
|
11
|
+
appId: string;
|
|
12
|
+
fromStatus: ConfigStatus;
|
|
13
|
+
toStatus: ConfigStatus;
|
|
14
|
+
version: number;
|
|
15
|
+
timestamp: string | Date;
|
|
16
|
+
actor: string;
|
|
17
|
+
reason?: string;
|
|
18
|
+
}
|
|
19
|
+
interface ConfigVersionHistory {
|
|
20
|
+
tenantId: string;
|
|
21
|
+
appId: string;
|
|
22
|
+
versions: TenantAppConfigVersion[];
|
|
23
|
+
transitions: ConfigTransition[];
|
|
24
|
+
currentPublished?: number;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { ConfigStatus, ConfigTransition, ConfigVersionHistory, TenantAppConfigVersion };
|
|
File without changes
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { CapabilityRef, CapabilityRegistry, CapabilitySpec } from "../capabilities/capabilities.js";
|
|
2
|
+
import "../capabilities/index.js";
|
|
3
|
+
import { PolicyRef, PolicySpec } from "../policy/spec.js";
|
|
4
|
+
import { TelemetryRegistry, TelemetrySpec } from "../telemetry/spec.js";
|
|
5
|
+
import { ExperimentRef, ExperimentRegistry, ExperimentSpec } from "../experiments/spec.js";
|
|
6
|
+
import { DataViewSpec } from "../data-views/spec.js";
|
|
7
|
+
import { DataViewRegistry } from "../data-views/registry.js";
|
|
8
|
+
import "../data-views/index.js";
|
|
9
|
+
import { WorkflowRegistry, WorkflowSpec } from "../workflow/spec.js";
|
|
10
|
+
import { PolicyRegistry } from "../policy/registry.js";
|
|
11
|
+
import { ThemeRegistry, ThemeSpec } from "../themes.js";
|
|
12
|
+
import { IntegrationSpec, IntegrationSpecRegistry } from "../integrations/spec.js";
|
|
13
|
+
import { IntegrationConnection } from "../integrations/connection.js";
|
|
14
|
+
import { AppIntegrationBinding } from "../integrations/binding.js";
|
|
15
|
+
import { KnowledgeSpaceRegistry, KnowledgeSpaceSpec } from "../knowledge/spec.js";
|
|
16
|
+
import { KnowledgeSourceConfig } from "../knowledge/source.js";
|
|
17
|
+
import { AppKnowledgeBinding } from "../knowledge/binding.js";
|
|
18
|
+
import { ResolvedBranding } from "./branding.js";
|
|
19
|
+
import { Locale, TranslationEntry } from "../translations/catalog.js";
|
|
20
|
+
import { AppBlueprintSpec, AppIntegrationSlot, AppRouteConfig, AppThemeBinding, FeatureFlagState, SpecPointer, TelemetryBinding, TenantAppConfig, TranslationCatalogPointer } from "./spec.js";
|
|
21
|
+
import { FeatureModuleSpec, FeatureRef } from "../features/types.js";
|
|
22
|
+
import { FeatureRegistry } from "../features/registry.js";
|
|
23
|
+
import "../features/index.js";
|
|
24
|
+
|
|
25
|
+
//#region src/app-config/runtime.d.ts
|
|
26
|
+
interface ResolvedIntegration {
|
|
27
|
+
slot: AppIntegrationSlot;
|
|
28
|
+
binding: AppIntegrationBinding;
|
|
29
|
+
connection: IntegrationConnection;
|
|
30
|
+
spec: IntegrationSpec;
|
|
31
|
+
}
|
|
32
|
+
interface ResolvedKnowledge {
|
|
33
|
+
binding: AppKnowledgeBinding;
|
|
34
|
+
space: KnowledgeSpaceSpec;
|
|
35
|
+
sources: KnowledgeSourceConfig[];
|
|
36
|
+
}
|
|
37
|
+
interface ResolvedTranslation {
|
|
38
|
+
defaultLocale: Locale;
|
|
39
|
+
supportedLocales: Locale[];
|
|
40
|
+
blueprintCatalog?: TranslationCatalogPointer;
|
|
41
|
+
tenantOverrides: TranslationEntry[];
|
|
42
|
+
}
|
|
43
|
+
interface ResolvedAppConfig {
|
|
44
|
+
appId: string;
|
|
45
|
+
tenantId: string;
|
|
46
|
+
environment?: string;
|
|
47
|
+
blueprintName: string;
|
|
48
|
+
blueprintVersion: number;
|
|
49
|
+
configVersion: number;
|
|
50
|
+
capabilities: {
|
|
51
|
+
enabled: CapabilityRef[];
|
|
52
|
+
disabled: CapabilityRef[];
|
|
53
|
+
};
|
|
54
|
+
features: {
|
|
55
|
+
include: FeatureRef[];
|
|
56
|
+
exclude: FeatureRef[];
|
|
57
|
+
};
|
|
58
|
+
dataViews: Record<string, SpecPointer>;
|
|
59
|
+
workflows: Record<string, SpecPointer>;
|
|
60
|
+
policies: PolicyRef[];
|
|
61
|
+
theme?: AppThemeBinding;
|
|
62
|
+
telemetry?: TelemetryBinding;
|
|
63
|
+
experiments: {
|
|
64
|
+
catalog: ExperimentRef[];
|
|
65
|
+
active: ExperimentRef[];
|
|
66
|
+
paused: ExperimentRef[];
|
|
67
|
+
};
|
|
68
|
+
featureFlags: FeatureFlagState[];
|
|
69
|
+
routes: AppRouteConfig[];
|
|
70
|
+
integrations: ResolvedIntegration[];
|
|
71
|
+
knowledge: ResolvedKnowledge[];
|
|
72
|
+
translation: ResolvedTranslation;
|
|
73
|
+
branding: ResolvedBranding;
|
|
74
|
+
notes?: string;
|
|
75
|
+
}
|
|
76
|
+
interface AppComposition {
|
|
77
|
+
resolved: ResolvedAppConfig;
|
|
78
|
+
capabilities: CapabilitySpec[];
|
|
79
|
+
features: FeatureModuleSpec[];
|
|
80
|
+
dataViews: Record<string, DataViewSpec>;
|
|
81
|
+
workflows: Record<string, WorkflowSpec>;
|
|
82
|
+
policies: PolicySpec[];
|
|
83
|
+
theme?: ThemeSpec;
|
|
84
|
+
themeFallbacks: ThemeSpec[];
|
|
85
|
+
telemetry?: TelemetrySpec;
|
|
86
|
+
experiments: {
|
|
87
|
+
active: ExperimentSpec[];
|
|
88
|
+
paused: ExperimentSpec[];
|
|
89
|
+
};
|
|
90
|
+
integrations: ResolvedIntegration[];
|
|
91
|
+
knowledge: ResolvedKnowledge[];
|
|
92
|
+
missing: MissingReference[];
|
|
93
|
+
}
|
|
94
|
+
interface MissingReference {
|
|
95
|
+
type: 'capability' | 'feature' | 'dataView' | 'workflow' | 'policy' | 'theme' | 'telemetry' | 'experiment' | 'integrationConnection' | 'integrationSpec' | 'integrationSlot' | 'knowledgeSpace' | 'knowledgeSource';
|
|
96
|
+
identifier: string;
|
|
97
|
+
}
|
|
98
|
+
interface ResolveAppConfigDeps {
|
|
99
|
+
integrationSpecs?: IntegrationSpecRegistry;
|
|
100
|
+
integrationConnections?: IntegrationConnection[];
|
|
101
|
+
knowledgeSpaces?: KnowledgeSpaceRegistry;
|
|
102
|
+
knowledgeSources?: KnowledgeSourceConfig[];
|
|
103
|
+
}
|
|
104
|
+
interface AppCompositionDeps extends ResolveAppConfigDeps {
|
|
105
|
+
capabilities?: CapabilityRegistry;
|
|
106
|
+
features?: FeatureRegistry;
|
|
107
|
+
dataViews?: DataViewRegistry;
|
|
108
|
+
workflows?: WorkflowRegistry;
|
|
109
|
+
policies?: PolicyRegistry;
|
|
110
|
+
themes?: ThemeRegistry;
|
|
111
|
+
telemetry?: TelemetryRegistry;
|
|
112
|
+
experiments?: ExperimentRegistry;
|
|
113
|
+
}
|
|
114
|
+
interface ComposeOptions {
|
|
115
|
+
strict?: boolean;
|
|
116
|
+
}
|
|
117
|
+
declare function resolveAppConfig(blueprint: AppBlueprintSpec, tenant: TenantAppConfig, deps?: ResolveAppConfigDeps): ResolvedAppConfig;
|
|
118
|
+
declare function composeAppConfig(blueprint: AppBlueprintSpec, tenant: TenantAppConfig, deps: AppCompositionDeps, options?: ComposeOptions): AppComposition;
|
|
119
|
+
//#endregion
|
|
120
|
+
export { AppComposition, AppCompositionDeps, ComposeOptions, MissingReference, ResolveAppConfigDeps, ResolvedAppConfig, ResolvedIntegration, ResolvedKnowledge, ResolvedTranslation, composeAppConfig, resolveAppConfig };
|