@contractspec/bundle.library 3.7.5 → 3.7.7
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/.turbo/turbo-build.log +144 -142
- package/AGENTS.md +42 -24
- package/CHANGELOG.md +27 -0
- package/README.md +59 -37
- package/dist/application/index.d.ts +1 -1
- package/dist/application/index.js +842 -840
- package/dist/application/mcp/cliMcp.js +30 -30
- package/dist/application/mcp/common.d.ts +2 -2
- package/dist/application/mcp/common.js +2 -2
- package/dist/application/mcp/contractsMcp.d.ts +1 -1
- package/dist/application/mcp/contractsMcp.js +163 -163
- package/dist/application/mcp/docsMcp.js +31 -31
- package/dist/application/mcp/index.d.ts +2 -2
- package/dist/application/mcp/index.js +842 -840
- package/dist/application/mcp/internalMcp.js +30 -30
- package/dist/application/mcp/providerRankingMcp.js +35 -33
- package/dist/components/docs/DocsIndexPage.js +859 -212
- package/dist/components/docs/advanced/AdvancedMCPPage.js +15 -15
- package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +4 -4
- package/dist/components/docs/advanced/AdvancedRenderersPage.js +7 -7
- package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +9 -9
- package/dist/components/docs/advanced/AdvancedTelemetryPage.js +16 -16
- package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +6 -6
- package/dist/components/docs/advanced/index.d.ts +2 -2
- package/dist/components/docs/advanced/index.js +57 -57
- package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +10 -10
- package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +8 -8
- package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +14 -14
- package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +16 -16
- package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +7 -7
- package/dist/components/docs/architecture/ArchitectureOverviewPage.js +90 -411
- package/dist/components/docs/architecture/index.d.ts +3 -3
- package/dist/components/docs/architecture/index.js +145 -466
- package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +6 -6
- package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +7 -7
- package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +6 -6
- package/dist/components/docs/comparison/ComparisonOverviewPage.js +4 -4
- package/dist/components/docs/comparison/ComparisonWindmillPage.js +6 -6
- package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +6 -6
- package/dist/components/docs/comparison/index.d.ts +2 -2
- package/dist/components/docs/comparison/index.js +35 -35
- package/dist/components/docs/docsManifest.d.ts +42 -0
- package/dist/components/docs/docsManifest.js +612 -0
- package/dist/components/docs/ecosystem/IntegrationsPage.js +5 -5
- package/dist/components/docs/ecosystem/PluginsPage.js +7 -7
- package/dist/components/docs/ecosystem/RegistryPage.js +4 -4
- package/dist/components/docs/ecosystem/TemplatesPage.js +11 -11
- package/dist/components/docs/ecosystem/index.d.ts +2 -2
- package/dist/components/docs/ecosystem/index.js +27 -27
- package/dist/components/docs/examples/DocsExamplesPage.js +4 -4
- package/dist/components/docs/examples/index.js +4 -4
- package/dist/components/docs/getting-started/CLIPage.js +9 -9
- package/dist/components/docs/getting-started/CompatibilityPage.js +12 -12
- package/dist/components/docs/getting-started/DataViewTutorialPage.js +7 -7
- package/dist/components/docs/getting-started/DeveloperToolsPage.js +10 -10
- package/dist/components/docs/getting-started/HelloWorldPage.js +8 -8
- package/dist/components/docs/getting-started/InstallationPage.js +10 -10
- package/dist/components/docs/getting-started/StartHerePage.js +8 -8
- package/dist/components/docs/getting-started/TroubleshootingPage.js +12 -12
- package/dist/components/docs/getting-started/VSCodeExtensionPage.js +13 -13
- package/dist/components/docs/getting-started/index.d.ts +5 -5
- package/dist/components/docs/getting-started/index.js +89 -89
- package/dist/components/docs/guides/GuideCIDiffGatingPage.js +13 -13
- package/dist/components/docs/guides/GuideContractTypesPage.js +33 -33
- package/dist/components/docs/guides/GuideDocsPipelinePage.js +13 -13
- package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +13 -13
- package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +35 -35
- package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +15 -15
- package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +13 -13
- package/dist/components/docs/guides/GuidesIndexPage.js +69 -46
- package/dist/components/docs/guides/index.d.ts +4 -4
- package/dist/components/docs/guides/index.js +174 -151
- package/dist/components/docs/index.d.ts +13 -12
- package/dist/components/docs/index.js +14060 -15332
- package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +4 -4
- package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +7 -7
- package/dist/components/docs/integrations/IntegrationsGithubPage.js +11 -11
- package/dist/components/docs/integrations/IntegrationsGmailPage.js +7 -7
- package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +5 -5
- package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +12 -12
- package/dist/components/docs/integrations/IntegrationsMistralPage.js +12 -12
- package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +11 -11
- package/dist/components/docs/integrations/IntegrationsOverviewPage.js +119 -736
- package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +12 -12
- package/dist/components/docs/integrations/IntegrationsPowensPage.js +24 -24
- package/dist/components/docs/integrations/IntegrationsQdrantPage.js +9 -9
- package/dist/components/docs/integrations/IntegrationsResendPage.js +7 -7
- package/dist/components/docs/integrations/IntegrationsS3Page.js +9 -9
- package/dist/components/docs/integrations/IntegrationsSlackPage.js +11 -11
- package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +19 -19
- package/dist/components/docs/integrations/IntegrationsStripePage.js +25 -25
- package/dist/components/docs/integrations/IntegrationsTwilioPage.js +9 -9
- package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +12 -12
- package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +13 -13
- package/dist/components/docs/integrations/index.d.ts +1 -1
- package/dist/components/docs/integrations/index.js +614 -1231
- package/dist/components/docs/intent/ContractFirstApiPage.js +8 -8
- package/dist/components/docs/intent/DeterministicCodegenPage.js +9 -9
- package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +13 -13
- package/dist/components/docs/intent/OpenapiAlternativePage.js +13 -13
- package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +9 -9
- package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +8 -8
- package/dist/components/docs/intent/index.d.ts +3 -3
- package/dist/components/docs/intent/index.js +766 -766
- package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +38 -38
- package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +9 -9
- package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +91 -439
- package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +28 -28
- package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +21 -21
- package/dist/components/docs/knowledge/index.d.ts +1 -1
- package/dist/components/docs/knowledge/index.js +437 -785
- package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +16 -16
- package/dist/components/docs/libraries/LibrariesAiAgentPage.js +8 -8
- package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesContentGenPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesContractsPage.js +16 -16
- package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesDataBackendPage.js +14 -14
- package/dist/components/docs/libraries/LibrariesDataViewsPage.js +7 -7
- package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +13 -13
- package/dist/components/docs/libraries/LibrariesEvolutionPage.js +7 -7
- package/dist/components/docs/libraries/LibrariesGraphQLPage.js +13 -13
- package/dist/components/docs/libraries/LibrariesGrowthPage.js +5 -5
- package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +5 -5
- package/dist/components/docs/libraries/LibrariesObservabilityPage.js +7 -7
- package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +6 -6
- package/dist/components/docs/libraries/LibrariesOverviewPage.js +117 -430
- package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesResiliencePage.js +6 -6
- package/dist/components/docs/libraries/LibrariesRuntimePage.js +13 -13
- package/dist/components/docs/libraries/LibrariesSLOPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesSchemaPage.js +16 -16
- package/dist/components/docs/libraries/LibrariesSupportBotPage.js +7 -7
- package/dist/components/docs/libraries/LibrariesTestingPage.js +7 -7
- package/dist/components/docs/libraries/LibrariesUIKitPage.js +10 -10
- package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +5 -5
- package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +8 -8
- package/dist/components/docs/libraries/index.d.ts +4 -4
- package/dist/components/docs/libraries/index.js +1308 -1621
- package/dist/components/docs/manifesto/ManifestoPage.js +33 -138
- package/dist/components/docs/ops/AutoEvolutionOpsPage.js +9 -9
- package/dist/components/docs/ops/DistributedTracingOpsPage.js +5 -5
- package/dist/components/docs/ops/index.js +14 -14
- package/dist/components/docs/reference/DocsMarkdownContent.js +1 -1
- package/dist/components/docs/reference/DocsReferenceContent.js +2 -2
- package/dist/components/docs/reference/DocsReferenceIndexClient.js +8 -8
- package/dist/components/docs/reference/DocsReferenceIndexPage.js +8 -8
- package/dist/components/docs/reference/DocsReferencePage.js +2 -2
- package/dist/components/docs/reference/index.js +10 -10
- package/dist/components/docs/safety/SafetyAuditingPage.js +16 -16
- package/dist/components/docs/safety/SafetyMigrationsPage.js +15 -15
- package/dist/components/docs/safety/SafetyOverviewPage.js +69 -206
- package/dist/components/docs/safety/SafetyPDPPage.js +12 -12
- package/dist/components/docs/safety/SafetySecurityTrustPage.js +11 -11
- package/dist/components/docs/safety/SafetySigningPage.js +7 -7
- package/dist/components/docs/safety/SafetyTenantIsolationPage.js +6 -6
- package/dist/components/docs/safety/index.d.ts +3 -3
- package/dist/components/docs/safety/index.js +616 -753
- package/dist/components/docs/shared/StudioPrompt.js +5 -5
- package/dist/components/docs/specs/SpecsCapabilitiesPage.js +12 -12
- package/dist/components/docs/specs/SpecsDataViewsPage.js +14 -14
- package/dist/components/docs/specs/SpecsOverlaysPage.js +14 -14
- package/dist/components/docs/specs/SpecsOverviewPage.js +135 -297
- package/dist/components/docs/specs/SpecsPolicyPage.js +29 -29
- package/dist/components/docs/specs/SpecsWorkflowsPage.js +18 -18
- package/dist/components/docs/specs/index.d.ts +3 -3
- package/dist/components/docs/specs/index.js +814 -976
- package/dist/components/docs/studio/StudioBYOKPage.js +1 -1
- package/dist/components/docs/studio/StudioDeploymentsPage.js +1 -1
- package/dist/components/docs/studio/StudioGettingStartedPage.js +1 -1
- package/dist/components/docs/studio/StudioIntegrationsPage.js +1 -1
- package/dist/components/docs/studio/StudioOverviewPage.js +109 -56
- package/dist/components/docs/studio/StudioVisualBuilderPage.js +1 -1
- package/dist/components/docs/studio/index.d.ts +4 -4
- package/dist/components/docs/studio/index.js +170 -117
- package/dist/components/integrations/index.js +25 -25
- package/dist/components/integrations/molecules/IntegrationCard.js +5 -5
- package/dist/components/integrations/organisms/IntegrationMarketplace.js +12 -12
- package/dist/components/integrations/organisms/IntegrationSettings.js +7 -7
- package/dist/components/integrations/organisms/KnowledgeSourceList.js +6 -6
- package/dist/components/legal/PrivacyTemplate.js +67 -67
- package/dist/components/legal/TermsTemplate.js +54 -54
- package/dist/components/legal/index.js +121 -121
- package/dist/components/shared/FeatureGateNotice.js +4 -4
- package/dist/components/shared/index.js +4 -4
- package/dist/components/shell/WorkspaceHeader.js +4 -4
- package/dist/components/shell/WorkspaceProjectShellLayout.d.ts +3 -3
- package/dist/components/shell/WorkspaceProjectShellLayout.js +10 -10
- package/dist/components/shell/WorkspaceShellRenderer.d.ts +4 -4
- package/dist/components/shell/WorkspaceShellRenderer.js +8 -8
- package/dist/components/shell/WorkspaceSidebar.js +2 -2
- package/dist/components/shell/index.d.ts +1 -1
- package/dist/components/shell/index.js +12 -12
- package/dist/components/templates/engine/index.d.ts +1 -1
- package/dist/components/templates/index.d.ts +1 -1
- package/dist/components/templates/index.js +835 -835
- package/dist/components/templates/messaging/ConversationList.js +11 -11
- package/dist/components/templates/messaging/MessageComposer.js +11 -11
- package/dist/components/templates/messaging/MessageThread.js +6 -6
- package/dist/components/templates/messaging/MessagingWorkspace.js +23 -23
- package/dist/components/templates/messaging/index.d.ts +1 -1
- package/dist/components/templates/messaging/index.js +23 -23
- package/dist/components/templates/recipes/LanguageSwitcher.js +1 -1
- package/dist/components/templates/recipes/RecipeCard.js +5 -5
- package/dist/components/templates/recipes/RecipeDetail.js +8 -8
- package/dist/components/templates/recipes/RecipeList.js +17 -17
- package/dist/components/templates/recipes/index.d.ts +2 -2
- package/dist/components/templates/recipes/index.js +17 -17
- package/dist/components/templates/todos/FilterBar.d.ts +1 -1
- package/dist/components/templates/todos/FilterBar.js +9 -9
- package/dist/components/templates/todos/TaskForm.js +14 -14
- package/dist/components/templates/todos/TaskItem.js +4 -4
- package/dist/components/templates/todos/TaskList.js +30 -30
- package/dist/components/templates/todos/index.d.ts +2 -2
- package/dist/components/templates/todos/index.js +30 -30
- package/dist/config/index.d.ts +2 -2
- package/dist/features/contracts-registry.d.ts +3 -3
- package/dist/features/contracts-registry.js +15 -15
- package/dist/features/docs/docs.contracts.d.ts +1 -1
- package/dist/features/docs/docs.contracts.js +2 -2
- package/dist/features/docs/index.d.ts +1 -1
- package/dist/features/docs/index.js +2 -2
- package/dist/features/index.d.ts +4 -4
- package/dist/features/index.js +18 -18
- package/dist/features/registry.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14982 -16254
- package/dist/libs/email/client.js +1 -1
- package/dist/libs/email/contact.js +1 -1
- package/dist/libs/email/newsletter.js +1 -1
- package/dist/libs/email/waitlist-application.js +1 -1
- package/dist/libs/email/waitlist.js +1 -1
- package/dist/libs/email.d.ts +1 -1
- package/dist/libs/email.js +1 -1
- package/dist/node/application/index.js +842 -840
- package/dist/node/application/mcp/cliMcp.js +30 -30
- package/dist/node/application/mcp/common.js +2 -2
- package/dist/node/application/mcp/contractsMcp.js +163 -163
- package/dist/node/application/mcp/docsMcp.js +31 -31
- package/dist/node/application/mcp/index.js +842 -840
- package/dist/node/application/mcp/internalMcp.js +30 -30
- package/dist/node/application/mcp/providerRankingMcp.js +35 -33
- package/dist/node/components/docs/DocsIndexPage.js +859 -212
- package/dist/node/components/docs/advanced/AdvancedMCPPage.js +15 -15
- package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +4 -4
- package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +7 -7
- package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +9 -9
- package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +16 -16
- package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +6 -6
- package/dist/node/components/docs/advanced/index.js +57 -57
- package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +10 -10
- package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +8 -8
- package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +14 -14
- package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +16 -16
- package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +7 -7
- package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +90 -411
- package/dist/node/components/docs/architecture/index.js +145 -466
- package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +6 -6
- package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +7 -7
- package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +6 -6
- package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +4 -4
- package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +6 -6
- package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +6 -6
- package/dist/node/components/docs/comparison/index.js +35 -35
- package/dist/node/components/docs/docsManifest.js +611 -0
- package/dist/node/components/docs/ecosystem/IntegrationsPage.js +5 -5
- package/dist/node/components/docs/ecosystem/PluginsPage.js +7 -7
- package/dist/node/components/docs/ecosystem/RegistryPage.js +4 -4
- package/dist/node/components/docs/ecosystem/TemplatesPage.js +11 -11
- package/dist/node/components/docs/ecosystem/index.js +27 -27
- package/dist/node/components/docs/examples/DocsExamplesPage.js +4 -4
- package/dist/node/components/docs/examples/index.js +4 -4
- package/dist/node/components/docs/getting-started/CLIPage.js +9 -9
- package/dist/node/components/docs/getting-started/CompatibilityPage.js +12 -12
- package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +7 -7
- package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +10 -10
- package/dist/node/components/docs/getting-started/HelloWorldPage.js +8 -8
- package/dist/node/components/docs/getting-started/InstallationPage.js +10 -10
- package/dist/node/components/docs/getting-started/StartHerePage.js +8 -8
- package/dist/node/components/docs/getting-started/TroubleshootingPage.js +12 -12
- package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +13 -13
- package/dist/node/components/docs/getting-started/index.js +89 -89
- package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +13 -13
- package/dist/node/components/docs/guides/GuideContractTypesPage.js +33 -33
- package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +13 -13
- package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +13 -13
- package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +35 -35
- package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +15 -15
- package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +13 -13
- package/dist/node/components/docs/guides/GuidesIndexPage.js +69 -46
- package/dist/node/components/docs/guides/index.js +174 -151
- package/dist/node/components/docs/index.js +14060 -15332
- package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +4 -4
- package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +7 -7
- package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +11 -11
- package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +7 -7
- package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +5 -5
- package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +12 -12
- package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +12 -12
- package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +11 -11
- package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +119 -736
- package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +12 -12
- package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +24 -24
- package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +9 -9
- package/dist/node/components/docs/integrations/IntegrationsResendPage.js +7 -7
- package/dist/node/components/docs/integrations/IntegrationsS3Page.js +9 -9
- package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +11 -11
- package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +19 -19
- package/dist/node/components/docs/integrations/IntegrationsStripePage.js +25 -25
- package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +9 -9
- package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +12 -12
- package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +13 -13
- package/dist/node/components/docs/integrations/index.js +614 -1231
- package/dist/node/components/docs/intent/ContractFirstApiPage.js +8 -8
- package/dist/node/components/docs/intent/DeterministicCodegenPage.js +9 -9
- package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +13 -13
- package/dist/node/components/docs/intent/OpenapiAlternativePage.js +13 -13
- package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +9 -9
- package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +8 -8
- package/dist/node/components/docs/intent/index.js +766 -766
- package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +38 -38
- package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +9 -9
- package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +91 -439
- package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +28 -28
- package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +21 -21
- package/dist/node/components/docs/knowledge/index.js +437 -785
- package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +16 -16
- package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +8 -8
- package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesContractsPage.js +16 -16
- package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +14 -14
- package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +7 -7
- package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +13 -13
- package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +7 -7
- package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +13 -13
- package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +5 -5
- package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +5 -5
- package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +7 -7
- package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +117 -430
- package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +13 -13
- package/dist/node/components/docs/libraries/LibrariesSLOPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +16 -16
- package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +7 -7
- package/dist/node/components/docs/libraries/LibrariesTestingPage.js +7 -7
- package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +10 -10
- package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +5 -5
- package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +8 -8
- package/dist/node/components/docs/libraries/index.js +1308 -1621
- package/dist/node/components/docs/manifesto/ManifestoPage.js +33 -138
- package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +9 -9
- package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +5 -5
- package/dist/node/components/docs/ops/index.js +14 -14
- package/dist/node/components/docs/reference/DocsMarkdownContent.js +1 -1
- package/dist/node/components/docs/reference/DocsReferenceContent.js +2 -2
- package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +8 -8
- package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +8 -8
- package/dist/node/components/docs/reference/DocsReferencePage.js +2 -2
- package/dist/node/components/docs/reference/index.js +10 -10
- package/dist/node/components/docs/safety/SafetyAuditingPage.js +16 -16
- package/dist/node/components/docs/safety/SafetyMigrationsPage.js +15 -15
- package/dist/node/components/docs/safety/SafetyOverviewPage.js +69 -206
- package/dist/node/components/docs/safety/SafetyPDPPage.js +12 -12
- package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +11 -11
- package/dist/node/components/docs/safety/SafetySigningPage.js +7 -7
- package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +6 -6
- package/dist/node/components/docs/safety/index.js +616 -753
- package/dist/node/components/docs/shared/StudioPrompt.js +5 -5
- package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +12 -12
- package/dist/node/components/docs/specs/SpecsDataViewsPage.js +14 -14
- package/dist/node/components/docs/specs/SpecsOverlaysPage.js +14 -14
- package/dist/node/components/docs/specs/SpecsOverviewPage.js +135 -297
- package/dist/node/components/docs/specs/SpecsPolicyPage.js +29 -29
- package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +18 -18
- package/dist/node/components/docs/specs/index.js +814 -976
- package/dist/node/components/docs/studio/StudioBYOKPage.js +1 -1
- package/dist/node/components/docs/studio/StudioDeploymentsPage.js +1 -1
- package/dist/node/components/docs/studio/StudioGettingStartedPage.js +1 -1
- package/dist/node/components/docs/studio/StudioIntegrationsPage.js +1 -1
- package/dist/node/components/docs/studio/StudioOverviewPage.js +109 -56
- package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +1 -1
- package/dist/node/components/docs/studio/index.js +170 -117
- package/dist/node/components/integrations/index.js +25 -25
- package/dist/node/components/integrations/molecules/IntegrationCard.js +5 -5
- package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +12 -12
- package/dist/node/components/integrations/organisms/IntegrationSettings.js +7 -7
- package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +6 -6
- package/dist/node/components/legal/PrivacyTemplate.js +67 -67
- package/dist/node/components/legal/TermsTemplate.js +54 -54
- package/dist/node/components/legal/index.js +121 -121
- package/dist/node/components/shared/FeatureGateNotice.js +4 -4
- package/dist/node/components/shared/index.js +4 -4
- package/dist/node/components/shell/WorkspaceHeader.js +4 -4
- package/dist/node/components/shell/WorkspaceProjectShellLayout.js +10 -10
- package/dist/node/components/shell/WorkspaceShellRenderer.js +8 -8
- package/dist/node/components/shell/WorkspaceSidebar.js +2 -2
- package/dist/node/components/shell/index.js +12 -12
- package/dist/node/components/templates/index.js +835 -835
- package/dist/node/components/templates/messaging/ConversationList.js +11 -11
- package/dist/node/components/templates/messaging/MessageComposer.js +11 -11
- package/dist/node/components/templates/messaging/MessageThread.js +6 -6
- package/dist/node/components/templates/messaging/MessagingWorkspace.js +23 -23
- package/dist/node/components/templates/messaging/index.js +23 -23
- package/dist/node/components/templates/recipes/LanguageSwitcher.js +1 -1
- package/dist/node/components/templates/recipes/RecipeCard.js +5 -5
- package/dist/node/components/templates/recipes/RecipeDetail.js +8 -8
- package/dist/node/components/templates/recipes/RecipeList.js +17 -17
- package/dist/node/components/templates/recipes/index.js +17 -17
- package/dist/node/components/templates/todos/FilterBar.js +9 -9
- package/dist/node/components/templates/todos/TaskForm.js +14 -14
- package/dist/node/components/templates/todos/TaskItem.js +4 -4
- package/dist/node/components/templates/todos/TaskList.js +30 -30
- package/dist/node/components/templates/todos/index.js +30 -30
- package/dist/node/features/contracts-registry.js +15 -15
- package/dist/node/features/docs/docs.contracts.js +2 -2
- package/dist/node/features/docs/index.js +2 -2
- package/dist/node/features/index.js +18 -18
- package/dist/node/features/registry.js +1 -1
- package/dist/node/index.js +14982 -16254
- package/dist/node/libs/email/client.js +1 -1
- package/dist/node/libs/email/contact.js +1 -1
- package/dist/node/libs/email/newsletter.js +1 -1
- package/dist/node/libs/email/waitlist-application.js +1 -1
- package/dist/node/libs/email/waitlist.js +1 -1
- package/dist/node/libs/email.js +1 -1
- package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +7 -7
- package/dist/node/presentation/features/atoms/FeatureIcon/index.js +7 -7
- package/dist/node/presentation/features/atoms/index.js +7 -7
- package/dist/node/presentation/features/hooks/index.js +56 -56
- package/dist/node/presentation/features/hooks/useContractsRegistry.js +18 -18
- package/dist/node/presentation/features/hooks/useFeatureFilters.js +1 -1
- package/dist/node/presentation/features/hooks/useFeatureRegistry.js +1 -1
- package/dist/node/presentation/features/hooks/useRelatedDocs.js +1 -1
- package/dist/node/presentation/features/index.js +1364 -1364
- package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +15 -15
- package/dist/node/presentation/features/molecules/FeatureCard/index.js +15 -15
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +7 -7
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +7 -7
- package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -1
- package/dist/node/presentation/features/molecules/FeatureFilters/index.js +1 -1
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +5 -5
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +5 -5
- package/dist/node/presentation/features/molecules/index.js +77 -77
- package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +18 -18
- package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +121 -121
- package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +121 -121
- package/dist/node/presentation/features/organisms/FeatureEventsList.js +18 -18
- package/dist/node/presentation/features/organisms/FeatureFormsList.js +18 -18
- package/dist/node/presentation/features/organisms/FeatureOperationsList.js +15 -15
- package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +18 -18
- package/dist/node/presentation/features/organisms/index.js +401 -401
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +13 -13
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +13 -13
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +20 -20
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +20 -20
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +12 -12
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +12 -12
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +18 -18
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +18 -18
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +13 -13
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +13 -13
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +20 -20
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +20 -20
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +8 -8
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +8 -8
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +15 -15
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +15 -15
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +2 -2
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +2 -2
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +12 -12
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +12 -12
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +18 -18
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +18 -18
- package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +7 -7
- package/dist/presentation/features/atoms/FeatureIcon/index.d.ts +1 -1
- package/dist/presentation/features/atoms/FeatureIcon/index.js +7 -7
- package/dist/presentation/features/atoms/index.js +7 -7
- package/dist/presentation/features/hooks/index.d.ts +3 -3
- package/dist/presentation/features/hooks/index.js +56 -56
- package/dist/presentation/features/hooks/useContractsRegistry.js +18 -18
- package/dist/presentation/features/hooks/useFeatureFilters.js +1 -1
- package/dist/presentation/features/hooks/useFeatureRegistry.js +1 -1
- package/dist/presentation/features/hooks/useRelatedDocs.js +1 -1
- package/dist/presentation/features/index.d.ts +14 -14
- package/dist/presentation/features/index.js +1364 -1364
- package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +15 -15
- package/dist/presentation/features/molecules/FeatureCard/index.js +15 -15
- package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +7 -7
- package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +7 -7
- package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -1
- package/dist/presentation/features/molecules/FeatureFilters/index.js +1 -1
- package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +5 -5
- package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +5 -5
- package/dist/presentation/features/molecules/index.d.ts +1 -1
- package/dist/presentation/features/molecules/index.js +77 -77
- package/dist/presentation/features/organisms/FeatureDataViewsList.js +18 -18
- package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +121 -121
- package/dist/presentation/features/organisms/FeatureDiscovery/index.d.ts +1 -1
- package/dist/presentation/features/organisms/FeatureDiscovery/index.js +121 -121
- package/dist/presentation/features/organisms/FeatureEventsList.js +18 -18
- package/dist/presentation/features/organisms/FeatureFormsList.js +18 -18
- package/dist/presentation/features/organisms/FeatureOperationsList.js +15 -15
- package/dist/presentation/features/organisms/FeaturePresentationsList.js +18 -18
- package/dist/presentation/features/organisms/index.d.ts +4 -4
- package/dist/presentation/features/organisms/index.js +401 -401
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +13 -13
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +13 -13
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/types.d.ts +1 -1
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +20 -20
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +20 -20
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +12 -12
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +12 -12
- package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +18 -18
- package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +18 -18
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +13 -13
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +13 -13
- package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +20 -20
- package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +20 -20
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +8 -8
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +8 -8
- package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +15 -15
- package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +15 -15
- package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +2 -2
- package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +2 -2
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +12 -12
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +12 -12
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +18 -18
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +18 -18
- package/package.json +46 -32
- package/src/__tests__/env-setup.ts +1 -1
- package/src/__tests__/mocks/prisma.ts +78 -78
- package/src/__tests__/setup.ts +2 -2
- package/src/application/context-storage/index.ts +42 -42
- package/src/application/index.ts +1 -1
- package/src/application/mcp/cliMcp.ts +221 -221
- package/src/application/mcp/common.ts +210 -210
- package/src/application/mcp/contractsMcp.ts +15 -15
- package/src/application/mcp/contractsMcpResources.ts +119 -119
- package/src/application/mcp/contractsMcpTools.ts +218 -218
- package/src/application/mcp/contractsMcpTypes.ts +35 -35
- package/src/application/mcp/docsMcp.ts +173 -173
- package/src/application/mcp/index.ts +2 -2
- package/src/application/mcp/internalMcp.ts +204 -204
- package/src/application/mcp/providerRankingMcp.ts +346 -344
- package/src/bundles/LibraryBundle.ts +136 -136
- package/src/components/docs/DocsIndexPage.tsx +189 -241
- package/src/components/docs/advanced/AdvancedMCPPage.tsx +168 -168
- package/src/components/docs/advanced/AdvancedOverlayEditorPage.tsx +52 -52
- package/src/components/docs/advanced/AdvancedRenderersPage.tsx +53 -53
- package/src/components/docs/advanced/AdvancedSpecExperimentsPage.tsx +48 -48
- package/src/components/docs/advanced/AdvancedTelemetryPage.tsx +205 -205
- package/src/components/docs/advanced/AdvancedWorkflowMonitoringPage.tsx +42 -42
- package/src/components/docs/advanced/index.ts +2 -2
- package/src/components/docs/architecture/ArchitectureAppConfigPage.tsx +127 -127
- package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +79 -79
- package/src/components/docs/architecture/ArchitectureIntegrationBindingPage.tsx +147 -147
- package/src/components/docs/architecture/ArchitectureKnowledgeBindingPage.tsx +193 -193
- package/src/components/docs/architecture/ArchitectureMultiTenancyPage.tsx +73 -73
- package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +98 -273
- package/src/components/docs/architecture/index.ts +3 -3
- package/src/components/docs/comparison/ComparisonAutomationPlatformsPage.tsx +137 -137
- package/src/components/docs/comparison/ComparisonEnterprisePlatformsPage.tsx +138 -138
- package/src/components/docs/comparison/ComparisonInternalToolBuildersPage.tsx +147 -147
- package/src/components/docs/comparison/ComparisonOverviewPage.tsx +106 -106
- package/src/components/docs/comparison/ComparisonWindmillPage.tsx +143 -143
- package/src/components/docs/comparison/ComparisonWorkflowEnginesPage.tsx +168 -168
- package/src/components/docs/comparison/index.ts +2 -2
- package/src/components/docs/docsManifest.ts +720 -0
- package/src/components/docs/ecosystem/IntegrationsPage.tsx +45 -45
- package/src/components/docs/ecosystem/PluginsPage.tsx +77 -77
- package/src/components/docs/ecosystem/RegistryPage.tsx +48 -48
- package/src/components/docs/ecosystem/TemplatesPage.tsx +52 -52
- package/src/components/docs/ecosystem/ecosystem.docblocks.ts +42 -42
- package/src/components/docs/ecosystem/index.ts +2 -2
- package/src/components/docs/examples/DocsExamplesPage.tsx +67 -66
- package/src/components/docs/generated/docs-index._common.json +1757 -1757
- package/src/components/docs/generated/docs-index.agent-console.json +376 -376
- package/src/components/docs/generated/docs-index.ai-chat-assistant.json +8 -8
- package/src/components/docs/generated/docs-index.ai-chat.json +104 -104
- package/src/components/docs/generated/docs-index.ai-support-bot.json +8 -8
- package/src/components/docs/generated/docs-index.analytics-dashboard.json +168 -168
- package/src/components/docs/generated/docs-index.app-config.json +136 -136
- package/src/components/docs/generated/docs-index.audit-trail.json +48 -48
- package/src/components/docs/generated/docs-index.calendar-google.json +8 -8
- package/src/components/docs/generated/docs-index.content-generation.json +8 -8
- package/src/components/docs/generated/docs-index.crm-pipeline.json +160 -160
- package/src/components/docs/generated/docs-index.email-gmail.json +8 -8
- package/src/components/docs/generated/docs-index.feature-flags.json +216 -216
- package/src/components/docs/generated/docs-index.files.json +176 -176
- package/src/components/docs/generated/docs-index.generated.ts +19 -19
- package/src/components/docs/generated/docs-index.health.json +96 -96
- package/src/components/docs/generated/docs-index.identity-rbac.json +312 -312
- package/src/components/docs/generated/docs-index.in-app-docs.json +8 -8
- package/src/components/docs/generated/docs-index.integration-hub.json +264 -264
- package/src/components/docs/generated/docs-index.integration-posthog.json +8 -8
- package/src/components/docs/generated/docs-index.integration-stripe.json +8 -8
- package/src/components/docs/generated/docs-index.integration-supabase.json +8 -8
- package/src/components/docs/generated/docs-index.jobs.json +136 -136
- package/src/components/docs/generated/docs-index.kb-update-pipeline.json +128 -128
- package/src/components/docs/generated/docs-index.knowledge-canon.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-ambient-coach.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-crm-onboarding.json +48 -48
- package/src/components/docs/generated/docs-index.learning-journey-duo-drills.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-platform-tour.json +48 -48
- package/src/components/docs/generated/docs-index.learning-journey-quest-challenges.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-registry.json +32 -32
- package/src/components/docs/generated/docs-index.learning-journey-studio-onboarding.json +48 -48
- package/src/components/docs/generated/docs-index.learning-journey-ui-coaching.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-ui-gamified.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-ui-onboarding.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-ui-shared.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey.json +216 -216
- package/src/components/docs/generated/docs-index.learning-patterns.json +8 -8
- package/src/components/docs/generated/docs-index.lifecycle-cli.json +8 -8
- package/src/components/docs/generated/docs-index.lifecycle-dashboard.json +8 -8
- package/src/components/docs/generated/docs-index.locale-jurisdiction-gate.json +48 -48
- package/src/components/docs/generated/docs-index.manifest.json +376 -376
- package/src/components/docs/generated/docs-index.marketplace.json +336 -336
- package/src/components/docs/generated/docs-index.meeting-recorder-providers.json +8 -8
- package/src/components/docs/generated/docs-index.meeting-recorder.json +48 -48
- package/src/components/docs/generated/docs-index.metrics.json +200 -200
- package/src/components/docs/generated/docs-index.minimal.json +16 -16
- package/src/components/docs/generated/docs-index.notifications.json +64 -64
- package/src/components/docs/generated/docs-index.openbanking-powens.json +8 -8
- package/src/components/docs/generated/docs-index.openbanking.json +64 -64
- package/src/components/docs/generated/docs-index.opencode-cli.json +16 -16
- package/src/components/docs/generated/docs-index.personalization.json +8 -8
- package/src/components/docs/generated/docs-index.platform-acp.json +72 -72
- package/src/components/docs/generated/docs-index.platform-agent.json +96 -96
- package/src/components/docs/generated/docs-index.platform-context.json +56 -56
- package/src/components/docs/generated/docs-index.platform-database.json +48 -48
- package/src/components/docs/generated/docs-index.platform-docs.json +88 -88
- package/src/components/docs/generated/docs-index.platform-integrations.json +320 -320
- package/src/components/docs/generated/docs-index.platform-knowledge.json +56 -56
- package/src/components/docs/generated/docs-index.platform-provider-ranking.json +96 -96
- package/src/components/docs/generated/docs-index.pocket-family-office.json +120 -120
- package/src/components/docs/generated/docs-index.policy-safe-knowledge-assistant.json +8 -8
- package/src/components/docs/generated/docs-index.product-intent.json +8 -8
- package/src/components/docs/generated/docs-index.project-management-sync.json +8 -8
- package/src/components/docs/generated/docs-index.saas-boilerplate.json +208 -208
- package/src/components/docs/generated/docs-index.service-business-os.json +192 -192
- package/src/components/docs/generated/docs-index.team-hub.json +184 -184
- package/src/components/docs/generated/docs-index.unknown.json +512 -512
- package/src/components/docs/generated/docs-index.versioned-knowledge-base.json +80 -80
- package/src/components/docs/generated/docs-index.video-api-showcase.json +32 -32
- package/src/components/docs/generated/docs-index.video-docs-terminal.json +8 -8
- package/src/components/docs/generated/docs-index.video-marketing-clip.json +8 -8
- package/src/components/docs/generated/docs-index.voice-providers.json +8 -8
- package/src/components/docs/generated/docs-index.wealth-snapshot.json +152 -152
- package/src/components/docs/generated/docs-index.workflow-system.json +432 -432
- package/src/components/docs/generated/docs-index.workspace-cli.json +8 -8
- package/src/components/docs/generated/index.ts +6 -6
- package/src/components/docs/generated/loader.ts +49 -49
- package/src/components/docs/getting-started/CLIPage.tsx +157 -157
- package/src/components/docs/getting-started/CompatibilityPage.tsx +69 -69
- package/src/components/docs/getting-started/DataViewTutorialPage.tsx +63 -63
- package/src/components/docs/getting-started/DeveloperToolsPage.tsx +141 -140
- package/src/components/docs/getting-started/HelloWorldPage.tsx +88 -88
- package/src/components/docs/getting-started/InstallationPage.tsx +78 -78
- package/src/components/docs/getting-started/StartHerePage.tsx +64 -64
- package/src/components/docs/getting-started/TroubleshootingPage.tsx +68 -68
- package/src/components/docs/getting-started/VSCodeExtensionPage.tsx +233 -233
- package/src/components/docs/getting-started/getting-started.docblocks.ts +30 -30
- package/src/components/docs/getting-started/index.ts +6 -5
- package/src/components/docs/guides/GuideCIDiffGatingPage.tsx +88 -88
- package/src/components/docs/guides/GuideContractTypesPage.tsx +266 -266
- package/src/components/docs/guides/GuideDocsPipelinePage.tsx +78 -78
- package/src/components/docs/guides/GuideGenerateDocsClientsSchemasPage.tsx +89 -89
- package/src/components/docs/guides/GuideImportExistingCodebasesPage.tsx +360 -360
- package/src/components/docs/guides/GuideNextjsOneEndpointPage.tsx +117 -117
- package/src/components/docs/guides/GuideSpecValidationTypingPage.tsx +82 -82
- package/src/components/docs/guides/GuidesIndexPage.tsx +109 -99
- package/src/components/docs/guides/guides.docblocks.ts +60 -60
- package/src/components/docs/guides/index.ts +4 -4
- package/src/components/docs/index.ts +26 -40
- package/src/components/docs/integrations/IntegrationsCircuitBreakersPage.tsx +22 -22
- package/src/components/docs/integrations/IntegrationsElevenLabsPage.tsx +41 -41
- package/src/components/docs/integrations/IntegrationsGithubPage.tsx +66 -66
- package/src/components/docs/integrations/IntegrationsGmailPage.tsx +44 -44
- package/src/components/docs/integrations/IntegrationsGoogleCalendarPage.tsx +31 -31
- package/src/components/docs/integrations/IntegrationsHealthRoutingPage.tsx +80 -80
- package/src/components/docs/integrations/IntegrationsMistralPage.tsx +65 -65
- package/src/components/docs/integrations/IntegrationsOpenAIPage.tsx +54 -54
- package/src/components/docs/integrations/IntegrationsOverviewPage.tsx +124 -529
- package/src/components/docs/integrations/IntegrationsPostmarkPage.tsx +97 -97
- package/src/components/docs/integrations/IntegrationsPowensPage.tsx +165 -165
- package/src/components/docs/integrations/IntegrationsQdrantPage.tsx +44 -44
- package/src/components/docs/integrations/IntegrationsResendPage.tsx +40 -40
- package/src/components/docs/integrations/IntegrationsS3Page.tsx +48 -48
- package/src/components/docs/integrations/IntegrationsSlackPage.tsx +70 -70
- package/src/components/docs/integrations/IntegrationsSpecModelPage.tsx +139 -139
- package/src/components/docs/integrations/IntegrationsStripePage.tsx +153 -153
- package/src/components/docs/integrations/IntegrationsTwilioPage.tsx +50 -50
- package/src/components/docs/integrations/IntegrationsWhatsappMetaPage.tsx +69 -69
- package/src/components/docs/integrations/IntegrationsWhatsappTwilioPage.tsx +73 -73
- package/src/components/docs/integrations/index.ts +1 -1
- package/src/components/docs/intent/ContractFirstApiPage.tsx +61 -61
- package/src/components/docs/intent/DeterministicCodegenPage.tsx +81 -80
- package/src/components/docs/intent/GenerateClientFromSchemaPage.tsx +108 -108
- package/src/components/docs/intent/OpenapiAlternativePage.tsx +98 -98
- package/src/components/docs/intent/SchemaValidationTypescriptPage.tsx +79 -79
- package/src/components/docs/intent/SpecDrivenDevelopmentPage.tsx +67 -67
- package/src/components/docs/intent/index.ts +3 -3
- package/src/components/docs/intent/intent-pages.docblocks.ts +186 -186
- package/src/components/docs/knowledge/KnowledgeCategoriesPage.tsx +304 -304
- package/src/components/docs/knowledge/KnowledgeExamplesPage.tsx +84 -84
- package/src/components/docs/knowledge/KnowledgeOverviewPage.tsx +76 -285
- package/src/components/docs/knowledge/KnowledgeSourcesPage.tsx +171 -171
- package/src/components/docs/knowledge/KnowledgeSpacesPage.tsx +132 -132
- package/src/components/docs/knowledge/index.ts +1 -1
- package/src/components/docs/libraries/LibrariesAccessibilityPage.tsx +95 -95
- package/src/components/docs/libraries/LibrariesAiAgentPage.tsx +58 -58
- package/src/components/docs/libraries/LibrariesAnalyticsPage.tsx +39 -39
- package/src/components/docs/libraries/LibrariesContentGenPage.tsx +41 -41
- package/src/components/docs/libraries/LibrariesContractsPage.tsx +132 -132
- package/src/components/docs/libraries/LibrariesCostTrackingPage.tsx +47 -47
- package/src/components/docs/libraries/LibrariesDataBackendPage.tsx +73 -73
- package/src/components/docs/libraries/LibrariesDataViewsPage.tsx +76 -76
- package/src/components/docs/libraries/LibrariesDesignSystemPage.tsx +115 -115
- package/src/components/docs/libraries/LibrariesEvolutionPage.tsx +64 -64
- package/src/components/docs/libraries/LibrariesGraphQLPage.tsx +92 -92
- package/src/components/docs/libraries/LibrariesGrowthPage.tsx +37 -37
- package/src/components/docs/libraries/LibrariesMultiTenancyPage.tsx +47 -47
- package/src/components/docs/libraries/LibrariesObservabilityPage.tsx +58 -58
- package/src/components/docs/libraries/LibrariesOverlayEnginePage.tsx +51 -51
- package/src/components/docs/libraries/LibrariesOverviewPage.tsx +137 -301
- package/src/components/docs/libraries/LibrariesPersonalizationPage.tsx +57 -57
- package/src/components/docs/libraries/LibrariesProgressiveDeliveryPage.tsx +51 -51
- package/src/components/docs/libraries/LibrariesResiliencePage.tsx +54 -54
- package/src/components/docs/libraries/LibrariesRuntimePage.tsx +96 -96
- package/src/components/docs/libraries/LibrariesSLOPage.tsx +52 -52
- package/src/components/docs/libraries/LibrariesSchemaPage.tsx +131 -131
- package/src/components/docs/libraries/LibrariesSupportBotPage.tsx +59 -59
- package/src/components/docs/libraries/LibrariesTestingPage.tsx +64 -64
- package/src/components/docs/libraries/LibrariesUIKitPage.tsx +85 -85
- package/src/components/docs/libraries/LibrariesWorkflowComposerPage.tsx +38 -38
- package/src/components/docs/libraries/LibrariesWorkflowsPage.tsx +79 -79
- package/src/components/docs/libraries/index.ts +4 -4
- package/src/components/docs/manifesto/ManifestoPage.tsx +61 -132
- package/src/components/docs/ops/AutoEvolutionOpsPage.tsx +81 -81
- package/src/components/docs/ops/DistributedTracingOpsPage.tsx +28 -28
- package/src/components/docs/ops/ops-lifecycle.docblocks.ts +32 -32
- package/src/components/docs/ops/ops-runbooks-a.docblocks.ts +60 -60
- package/src/components/docs/ops/ops-runbooks-b.docblocks.ts +60 -60
- package/src/components/docs/ops/ops-slo-tenant.docblocks.ts +61 -61
- package/src/components/docs/ops/ops-top.docs.ts +10 -10
- package/src/components/docs/ops/ops.docs.ts +6 -6
- package/src/components/docs/product/product.docblocks.ts +60 -60
- package/src/components/docs/reference/DocsMarkdownContent.tsx +74 -74
- package/src/components/docs/reference/DocsReferenceContent.tsx +51 -51
- package/src/components/docs/reference/DocsReferenceIndexClient.tsx +106 -105
- package/src/components/docs/reference/DocsReferenceIndexPage.tsx +2 -2
- package/src/components/docs/reference/DocsReferencePage.tsx +3 -3
- package/src/components/docs/reference/docsMarkdownParser.ts +90 -90
- package/src/components/docs/safety/SafetyAuditingPage.tsx +189 -189
- package/src/components/docs/safety/SafetyMigrationsPage.tsx +189 -189
- package/src/components/docs/safety/SafetyOverviewPage.tsx +70 -157
- package/src/components/docs/safety/SafetyPDPPage.tsx +163 -163
- package/src/components/docs/safety/SafetySecurityTrustPage.tsx +89 -89
- package/src/components/docs/safety/SafetySigningPage.tsx +38 -38
- package/src/components/docs/safety/SafetyTenantIsolationPage.tsx +39 -39
- package/src/components/docs/safety/index.ts +3 -3
- package/src/components/docs/shared/StudioPrompt.tsx +17 -17
- package/src/components/docs/specs/SpecsCapabilitiesPage.tsx +79 -79
- package/src/components/docs/specs/SpecsDataViewsPage.tsx +142 -142
- package/src/components/docs/specs/SpecsOverlaysPage.tsx +202 -202
- package/src/components/docs/specs/SpecsOverviewPage.tsx +118 -193
- package/src/components/docs/specs/SpecsPolicyPage.tsx +233 -233
- package/src/components/docs/specs/SpecsWorkflowsPage.tsx +156 -156
- package/src/components/docs/specs/index.ts +3 -3
- package/src/components/docs/studio/StudioBYOKPage.tsx +11 -11
- package/src/components/docs/studio/StudioDeploymentsPage.tsx +11 -11
- package/src/components/docs/studio/StudioGettingStartedPage.tsx +11 -11
- package/src/components/docs/studio/StudioIntegrationsPage.tsx +11 -11
- package/src/components/docs/studio/StudioOverviewPage.tsx +94 -73
- package/src/components/docs/studio/StudioVisualBuilderPage.tsx +11 -11
- package/src/components/docs/studio/index.ts +4 -4
- package/src/components/docs/tech/contracts/tech-docs.docblocks.ts +10 -10
- package/src/components/integrations/molecules/IntegrationCard.tsx +71 -72
- package/src/components/integrations/organisms/IntegrationMarketplace.tsx +116 -116
- package/src/components/integrations/organisms/IntegrationSettings.tsx +201 -201
- package/src/components/integrations/organisms/KnowledgeSourceList.tsx +93 -94
- package/src/components/legal/PrivacyTemplate.tsx +611 -611
- package/src/components/legal/TermsTemplate.tsx +675 -675
- package/src/components/shared/FeatureGateNotice.tsx +26 -27
- package/src/components/shell/WorkspaceHeader.tsx +80 -80
- package/src/components/shell/WorkspaceProjectShellLayout.tsx +59 -58
- package/src/components/shell/WorkspaceShellRenderer.tsx +69 -68
- package/src/components/shell/WorkspaceSidebar.tsx +58 -58
- package/src/components/shell/index.ts +1 -1
- package/src/components/templates/engine/index.ts +29 -28
- package/src/components/templates/index.ts +1 -1
- package/src/components/templates/messaging/ConversationList.tsx +68 -69
- package/src/components/templates/messaging/MessageComposer.tsx +59 -59
- package/src/components/templates/messaging/MessageThread.tsx +73 -74
- package/src/components/templates/messaging/MessagingWorkspace.tsx +18 -19
- package/src/components/templates/messaging/index.ts +1 -1
- package/src/components/templates/messaging/types.ts +17 -17
- package/src/components/templates/recipes/LanguageSwitcher.tsx +20 -20
- package/src/components/templates/recipes/RecipeCard.tsx +56 -56
- package/src/components/templates/recipes/RecipeDetail.tsx +43 -43
- package/src/components/templates/recipes/RecipeList.tsx +62 -63
- package/src/components/templates/recipes/index.ts +2 -2
- package/src/components/templates/recipes/types.ts +24 -24
- package/src/components/templates/todos/FilterBar.tsx +84 -84
- package/src/components/templates/todos/TaskForm.tsx +118 -119
- package/src/components/templates/todos/TaskItem.tsx +78 -78
- package/src/components/templates/todos/TaskList.tsx +106 -107
- package/src/components/templates/todos/index.ts +2 -2
- package/src/components/templates/todos/types.ts +11 -11
- package/src/config/contractspec-blueprint.ts +55 -55
- package/src/config/contractspec-branding.ts +37 -37
- package/src/config/contractspec-routes.ts +22 -22
- package/src/config/index.ts +14 -15
- package/src/features/contracts-registry.ts +118 -118
- package/src/features/docs/docs.contracts.ts +6 -6
- package/src/features/docs/index.ts +6 -6
- package/src/features/docs.feature.ts +27 -27
- package/src/features/index.ts +59 -63
- package/src/features/mcp.feature.ts +24 -24
- package/src/features/presentations.feature.ts +27 -27
- package/src/features/registry.ts +14 -14
- package/src/index.ts +2 -2
- package/src/infrastructure/elysia/logger.ts +21 -21
- package/src/libs/email/client.test.ts +81 -81
- package/src/libs/email/client.ts +111 -111
- package/src/libs/email/contact.ts +35 -35
- package/src/libs/email/newsletter.ts +46 -46
- package/src/libs/email/types.ts +29 -29
- package/src/libs/email/utils.ts +5 -5
- package/src/libs/email/waitlist-application.ts +69 -69
- package/src/libs/email/waitlist.ts +46 -46
- package/src/libs/email.ts +7 -7
- package/src/libs/posthog/client.ts +44 -44
- package/src/libs/posthog/native.ts +23 -22
- package/src/libs/posthog/server.ts +7 -7
- package/src/libs/pricing-examples.ts +12 -12
- package/src/presentation/features/atoms/FeatureIcon/FeatureIcon.tsx +90 -90
- package/src/presentation/features/atoms/FeatureIcon/index.ts +3 -3
- package/src/presentation/features/hooks/index.ts +9 -9
- package/src/presentation/features/hooks/useContractsRegistry.ts +23 -23
- package/src/presentation/features/hooks/useFeatureFilters.ts +117 -117
- package/src/presentation/features/hooks/useFeatureRegistry.ts +40 -40
- package/src/presentation/features/hooks/useRelatedDocs.ts +28 -28
- package/src/presentation/features/index.ts +50 -52
- package/src/presentation/features/molecules/FeatureCard/FeatureCard.tsx +80 -80
- package/src/presentation/features/molecules/FeatureCard/types.ts +6 -6
- package/src/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.tsx +54 -54
- package/src/presentation/features/molecules/FeatureCategoryHeader/index.ts +2 -2
- package/src/presentation/features/molecules/FeatureFilters/FeatureFilters.tsx +67 -67
- package/src/presentation/features/molecules/FeatureFilters/types.ts +20 -20
- package/src/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.tsx +120 -121
- package/src/presentation/features/molecules/FeatureHoverPreview/index.ts +2 -2
- package/src/presentation/features/molecules/index.ts +8 -8
- package/src/presentation/features/organisms/FeatureDataViewsList.tsx +21 -21
- package/src/presentation/features/organisms/FeatureDetail/FeatureDetail.tsx +86 -86
- package/src/presentation/features/organisms/FeatureDetail/types.ts +4 -4
- package/src/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.tsx +210 -210
- package/src/presentation/features/organisms/FeatureDiscovery/index.ts +3 -3
- package/src/presentation/features/organisms/FeatureDiscovery/types.ts +10 -10
- package/src/presentation/features/organisms/FeatureEventsList.tsx +19 -19
- package/src/presentation/features/organisms/FeatureFormsList.tsx +19 -19
- package/src/presentation/features/organisms/FeatureOperationsList.tsx +21 -21
- package/src/presentation/features/organisms/FeaturePresentationsList.tsx +21 -21
- package/src/presentation/features/organisms/index.ts +6 -6
- package/src/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.tsx +219 -219
- package/src/presentation/features/templates/FeatureDataViewDetailTemplate/types.ts +7 -7
- package/src/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.tsx +26 -26
- package/src/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.tsx +195 -195
- package/src/presentation/features/templates/FeatureEventDetailTemplate/types.ts +7 -7
- package/src/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.tsx +26 -26
- package/src/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.tsx +216 -216
- package/src/presentation/features/templates/FeatureFormDetailTemplate/types.ts +7 -7
- package/src/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.tsx +26 -26
- package/src/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.tsx +228 -228
- package/src/presentation/features/templates/FeatureOperationDetailTemplate/types.ts +7 -7
- package/src/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.tsx +26 -26
- package/src/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.tsx +24 -24
- package/src/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.tsx +201 -201
- package/src/presentation/features/templates/FeaturePresentationDetailTemplate/types.ts +8 -8
- package/src/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.tsx +26 -26
- package/src/presentation/features/templates/types.ts +2 -2
- package/tsconfig.json +12 -12
- package/tsdown.config.js +5 -5
|
@@ -208,11 +208,11 @@ function ContractFirstApiPage() {
|
|
|
208
208
|
className: "space-y-3",
|
|
209
209
|
children: [
|
|
210
210
|
/* @__PURE__ */ jsx("h1", {
|
|
211
|
-
className: "text-4xl
|
|
211
|
+
className: "font-bold text-4xl",
|
|
212
212
|
children: contractFirstApiBrief2.title
|
|
213
213
|
}),
|
|
214
214
|
/* @__PURE__ */ jsx("p", {
|
|
215
|
-
className: "text-muted-foreground
|
|
215
|
+
className: "text-lg text-muted-foreground",
|
|
216
216
|
children: contractFirstApiBrief2.summary
|
|
217
217
|
})
|
|
218
218
|
]
|
|
@@ -221,11 +221,11 @@ function ContractFirstApiPage() {
|
|
|
221
221
|
className: "card-subtle space-y-4 p-6",
|
|
222
222
|
children: [
|
|
223
223
|
/* @__PURE__ */ jsx("h2", {
|
|
224
|
-
className: "text-2xl
|
|
224
|
+
className: "font-bold text-2xl",
|
|
225
225
|
children: "Problems Solved"
|
|
226
226
|
}),
|
|
227
227
|
/* @__PURE__ */ jsx("ul", {
|
|
228
|
-
className: "
|
|
228
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
229
229
|
children: contractFirstApiBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx("li", {
|
|
230
230
|
children: problem
|
|
231
231
|
}, index))
|
|
@@ -236,11 +236,11 @@ function ContractFirstApiPage() {
|
|
|
236
236
|
className: "card-subtle space-y-4 p-6",
|
|
237
237
|
children: [
|
|
238
238
|
/* @__PURE__ */ jsx("h2", {
|
|
239
|
-
className: "text-2xl
|
|
239
|
+
className: "font-bold text-2xl",
|
|
240
240
|
children: "Solutions"
|
|
241
241
|
}),
|
|
242
242
|
/* @__PURE__ */ jsx("ul", {
|
|
243
|
-
className: "
|
|
243
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
244
244
|
children: contractFirstApiBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx("li", {
|
|
245
245
|
children: solution
|
|
246
246
|
}, index))
|
|
@@ -254,7 +254,7 @@ function ContractFirstApiPage() {
|
|
|
254
254
|
className: "space-y-3",
|
|
255
255
|
children: [
|
|
256
256
|
/* @__PURE__ */ jsx("h2", {
|
|
257
|
-
className: "text-2xl
|
|
257
|
+
className: "font-bold text-2xl",
|
|
258
258
|
children: "Quick Start"
|
|
259
259
|
}),
|
|
260
260
|
/* @__PURE__ */ jsx("p", {
|
|
@@ -306,7 +306,7 @@ export const CreateUserOperation = defineOperation({
|
|
|
306
306
|
className: "space-y-3",
|
|
307
307
|
children: [
|
|
308
308
|
/* @__PURE__ */ jsx("h2", {
|
|
309
|
-
className: "text-2xl
|
|
309
|
+
className: "font-bold text-2xl",
|
|
310
310
|
children: "Generate OpenAPI"
|
|
311
311
|
}),
|
|
312
312
|
/* @__PURE__ */ jsx("p", {
|
|
@@ -348,15 +348,15 @@ export const CreateUserOperation = defineOperation({
|
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
-
// src/components/docs/intent/
|
|
352
|
-
import {
|
|
351
|
+
// src/components/docs/intent/DeterministicCodegenPage.tsx
|
|
352
|
+
import { deterministicCodegenBrief as deterministicCodegenBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
353
353
|
import { SeoOptimizer as SeoOptimizer2 } from "@contractspec/lib.content-gen/seo";
|
|
354
354
|
import { CodeBlock as CodeBlock2 } from "@contractspec/lib.design-system";
|
|
355
355
|
import Link2 from "@contractspec/lib.ui-link";
|
|
356
356
|
import { ChevronRight as ChevronRight2 } from "lucide-react";
|
|
357
357
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
358
|
-
var metadata2 = new SeoOptimizer2().optimize(
|
|
359
|
-
function
|
|
358
|
+
var metadata2 = new SeoOptimizer2().optimize(deterministicCodegenBrief2);
|
|
359
|
+
function DeterministicCodegenPage() {
|
|
360
360
|
return /* @__PURE__ */ jsxs2("div", {
|
|
361
361
|
className: "space-y-8",
|
|
362
362
|
children: [
|
|
@@ -364,12 +364,12 @@ function SpecDrivenDevelopmentPage() {
|
|
|
364
364
|
className: "space-y-3",
|
|
365
365
|
children: [
|
|
366
366
|
/* @__PURE__ */ jsx2("h1", {
|
|
367
|
-
className: "text-4xl
|
|
368
|
-
children:
|
|
367
|
+
className: "font-bold text-4xl",
|
|
368
|
+
children: deterministicCodegenBrief2.title
|
|
369
369
|
}),
|
|
370
370
|
/* @__PURE__ */ jsx2("p", {
|
|
371
|
-
className: "text-muted-foreground
|
|
372
|
-
children:
|
|
371
|
+
className: "text-lg text-muted-foreground",
|
|
372
|
+
children: deterministicCodegenBrief2.summary
|
|
373
373
|
})
|
|
374
374
|
]
|
|
375
375
|
}),
|
|
@@ -377,12 +377,12 @@ function SpecDrivenDevelopmentPage() {
|
|
|
377
377
|
className: "card-subtle space-y-4 p-6",
|
|
378
378
|
children: [
|
|
379
379
|
/* @__PURE__ */ jsx2("h2", {
|
|
380
|
-
className: "text-2xl
|
|
381
|
-
children: "
|
|
380
|
+
className: "font-bold text-2xl",
|
|
381
|
+
children: "Regeneration Challenges"
|
|
382
382
|
}),
|
|
383
383
|
/* @__PURE__ */ jsx2("ul", {
|
|
384
|
-
className: "
|
|
385
|
-
children:
|
|
384
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
385
|
+
children: deterministicCodegenBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx2("li", {
|
|
386
386
|
children: problem
|
|
387
387
|
}, index))
|
|
388
388
|
})
|
|
@@ -392,12 +392,12 @@ function SpecDrivenDevelopmentPage() {
|
|
|
392
392
|
className: "card-subtle space-y-4 p-6",
|
|
393
393
|
children: [
|
|
394
394
|
/* @__PURE__ */ jsx2("h2", {
|
|
395
|
-
className: "text-2xl
|
|
396
|
-
children: "
|
|
395
|
+
className: "font-bold text-2xl",
|
|
396
|
+
children: "Deterministic Solutions"
|
|
397
397
|
}),
|
|
398
398
|
/* @__PURE__ */ jsx2("ul", {
|
|
399
|
-
className: "
|
|
400
|
-
children:
|
|
399
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
400
|
+
children: deterministicCodegenBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx2("li", {
|
|
401
401
|
children: solution
|
|
402
402
|
}, index))
|
|
403
403
|
})
|
|
@@ -410,208 +410,14 @@ function SpecDrivenDevelopmentPage() {
|
|
|
410
410
|
className: "space-y-3",
|
|
411
411
|
children: [
|
|
412
412
|
/* @__PURE__ */ jsx2("h2", {
|
|
413
|
-
className: "text-2xl
|
|
414
|
-
children: "Feature Specification Example"
|
|
415
|
-
}),
|
|
416
|
-
/* @__PURE__ */ jsx2("p", {
|
|
417
|
-
className: "text-muted-foreground text-sm",
|
|
418
|
-
children: "Define a complete feature with operations, events, and data models."
|
|
419
|
-
}),
|
|
420
|
-
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
421
|
-
language: "typescript",
|
|
422
|
-
filename: "src/contracts/user-management.feature.ts",
|
|
423
|
-
code: `import { defineFeature } from '@contractspec/lib.contracts-spec/features';
|
|
424
|
-
import { defineOperation } from '@contractspec/lib.contracts-spec/operations';
|
|
425
|
-
import { defineEvent } from '@contractspec/lib.contracts-spec/events';
|
|
426
|
-
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
427
|
-
|
|
428
|
-
export const UserManagementFeature = defineFeature({
|
|
429
|
-
goal: 'Complete user management system with CRUD operations',
|
|
430
|
-
context: 'Handles user lifecycle from creation to deletion with proper authorization',
|
|
431
|
-
operations: {
|
|
432
|
-
createUser: defineOperation({
|
|
433
|
-
goal: 'Create a new user account',
|
|
434
|
-
input: new SchemaModel({
|
|
435
|
-
type: 'object',
|
|
436
|
-
properties: {
|
|
437
|
-
email: { type: 'string', format: 'email', required: true },
|
|
438
|
-
name: { type: 'string', minLength: 1, required: true },
|
|
439
|
-
},
|
|
440
|
-
}),
|
|
441
|
-
output: new SchemaModel({
|
|
442
|
-
type: 'object',
|
|
443
|
-
properties: {
|
|
444
|
-
id: { type: 'string', required: true },
|
|
445
|
-
email: { type: 'string', required: true },
|
|
446
|
-
name: { type: 'string', required: true },
|
|
447
|
-
},
|
|
448
|
-
}),
|
|
449
|
-
}),
|
|
450
|
-
updateUser: defineOperation({
|
|
451
|
-
goal: 'Update existing user information',
|
|
452
|
-
input: new SchemaModel({
|
|
453
|
-
type: 'object',
|
|
454
|
-
properties: {
|
|
455
|
-
name: { type: 'string', minLength: 1 },
|
|
456
|
-
},
|
|
457
|
-
}),
|
|
458
|
-
output: new SchemaModel({
|
|
459
|
-
type: 'object',
|
|
460
|
-
properties: {
|
|
461
|
-
id: { type: 'string', required: true },
|
|
462
|
-
email: { type: 'string', required: true },
|
|
463
|
-
name: { type: 'string', required: true },
|
|
464
|
-
},
|
|
465
|
-
}),
|
|
466
|
-
}),
|
|
467
|
-
},
|
|
468
|
-
events: {
|
|
469
|
-
userCreated: defineEvent({
|
|
470
|
-
goal: 'Emit when a new user is created',
|
|
471
|
-
payload: new SchemaModel({
|
|
472
|
-
type: 'object',
|
|
473
|
-
properties: {
|
|
474
|
-
userId: { type: 'string', required: true },
|
|
475
|
-
email: { type: 'string', required: true },
|
|
476
|
-
},
|
|
477
|
-
}),
|
|
478
|
-
}),
|
|
479
|
-
userUpdated: defineEvent({
|
|
480
|
-
goal: 'Emit when user information changes',
|
|
481
|
-
payload: new SchemaModel({
|
|
482
|
-
type: 'object',
|
|
483
|
-
properties: {
|
|
484
|
-
userId: { type: 'string', required: true },
|
|
485
|
-
changes: { type: 'array', items: { type: 'string' }, required: true },
|
|
486
|
-
},
|
|
487
|
-
}),
|
|
488
|
-
}),
|
|
489
|
-
},
|
|
490
|
-
metadata: {
|
|
491
|
-
name: 'user-management',
|
|
492
|
-
version: '1.0.0',
|
|
493
|
-
description: 'Complete user management with operations and events',
|
|
494
|
-
},
|
|
495
|
-
});`
|
|
496
|
-
})
|
|
497
|
-
]
|
|
498
|
-
}),
|
|
499
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
500
|
-
className: "space-y-3",
|
|
501
|
-
children: [
|
|
502
|
-
/* @__PURE__ */ jsx2("h2", {
|
|
503
|
-
className: "text-2xl font-bold",
|
|
504
|
-
children: "Generate Type-safe Implementations"
|
|
505
|
-
}),
|
|
506
|
-
/* @__PURE__ */ jsx2("p", {
|
|
507
|
-
className: "text-muted-foreground text-sm",
|
|
508
|
-
children: "Generate validation, types, and API handlers from your feature."
|
|
509
|
-
}),
|
|
510
|
-
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
511
|
-
language: "bash",
|
|
512
|
-
filename: "generate-from-feature",
|
|
513
|
-
code: `contractspec generate \\
|
|
514
|
-
--input ./src/contracts/user-management.feature.ts \\
|
|
515
|
-
--output ./generated/user-management`
|
|
516
|
-
})
|
|
517
|
-
]
|
|
518
|
-
})
|
|
519
|
-
]
|
|
520
|
-
}),
|
|
521
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
522
|
-
className: "flex items-center gap-4 pt-4",
|
|
523
|
-
children: [
|
|
524
|
-
/* @__PURE__ */ jsxs2(Link2, {
|
|
525
|
-
href: "/docs/guides/spec-validation-and-typing",
|
|
526
|
-
className: "btn-primary",
|
|
527
|
-
children: [
|
|
528
|
-
"Type Safety Guide ",
|
|
529
|
-
/* @__PURE__ */ jsx2(ChevronRight2, {
|
|
530
|
-
size: 16
|
|
531
|
-
})
|
|
532
|
-
]
|
|
533
|
-
}),
|
|
534
|
-
/* @__PURE__ */ jsx2(Link2, {
|
|
535
|
-
href: "/docs/intent/deterministic-codegen",
|
|
536
|
-
className: "btn-ghost",
|
|
537
|
-
children: "Deterministic Codegen"
|
|
538
|
-
})
|
|
539
|
-
]
|
|
540
|
-
})
|
|
541
|
-
]
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
// src/components/docs/intent/DeterministicCodegenPage.tsx
|
|
546
|
-
import { deterministicCodegenBrief as deterministicCodegenBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
547
|
-
import { SeoOptimizer as SeoOptimizer3 } from "@contractspec/lib.content-gen/seo";
|
|
548
|
-
import { CodeBlock as CodeBlock3 } from "@contractspec/lib.design-system";
|
|
549
|
-
import Link3 from "@contractspec/lib.ui-link";
|
|
550
|
-
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
551
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
552
|
-
var metadata3 = new SeoOptimizer3().optimize(deterministicCodegenBrief2);
|
|
553
|
-
function DeterministicCodegenPage() {
|
|
554
|
-
return /* @__PURE__ */ jsxs3("div", {
|
|
555
|
-
className: "space-y-8",
|
|
556
|
-
children: [
|
|
557
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
558
|
-
className: "space-y-3",
|
|
559
|
-
children: [
|
|
560
|
-
/* @__PURE__ */ jsx3("h1", {
|
|
561
|
-
className: "text-4xl font-bold",
|
|
562
|
-
children: deterministicCodegenBrief2.title
|
|
563
|
-
}),
|
|
564
|
-
/* @__PURE__ */ jsx3("p", {
|
|
565
|
-
className: "text-muted-foreground text-lg",
|
|
566
|
-
children: deterministicCodegenBrief2.summary
|
|
567
|
-
})
|
|
568
|
-
]
|
|
569
|
-
}),
|
|
570
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
571
|
-
className: "card-subtle space-y-4 p-6",
|
|
572
|
-
children: [
|
|
573
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
574
|
-
className: "text-2xl font-bold",
|
|
575
|
-
children: "Regeneration Challenges"
|
|
576
|
-
}),
|
|
577
|
-
/* @__PURE__ */ jsx3("ul", {
|
|
578
|
-
className: "text-muted-foreground space-y-2 text-sm",
|
|
579
|
-
children: deterministicCodegenBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx3("li", {
|
|
580
|
-
children: problem
|
|
581
|
-
}, index))
|
|
582
|
-
})
|
|
583
|
-
]
|
|
584
|
-
}),
|
|
585
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
586
|
-
className: "card-subtle space-y-4 p-6",
|
|
587
|
-
children: [
|
|
588
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
589
|
-
className: "text-2xl font-bold",
|
|
590
|
-
children: "Deterministic Solutions"
|
|
591
|
-
}),
|
|
592
|
-
/* @__PURE__ */ jsx3("ul", {
|
|
593
|
-
className: "text-muted-foreground space-y-2 text-sm",
|
|
594
|
-
children: deterministicCodegenBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx3("li", {
|
|
595
|
-
children: solution
|
|
596
|
-
}, index))
|
|
597
|
-
})
|
|
598
|
-
]
|
|
599
|
-
}),
|
|
600
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
601
|
-
className: "space-y-6",
|
|
602
|
-
children: [
|
|
603
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
604
|
-
className: "space-y-3",
|
|
605
|
-
children: [
|
|
606
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
607
|
-
className: "text-2xl font-bold",
|
|
413
|
+
className: "font-bold text-2xl",
|
|
608
414
|
children: "Protected Zones"
|
|
609
415
|
}),
|
|
610
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ jsx2("p", {
|
|
611
417
|
className: "text-muted-foreground text-sm",
|
|
612
418
|
children: "Separate generated code from hand-written business logic with clear boundaries."
|
|
613
419
|
}),
|
|
614
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
615
421
|
language: "typescript",
|
|
616
422
|
filename: "src/handlers/user-handlers.ts",
|
|
617
423
|
code: `// Hand-written business logic (protected from regeneration)
|
|
@@ -655,18 +461,18 @@ export const createUserHandler = wrapOperationHandler(
|
|
|
655
461
|
})
|
|
656
462
|
]
|
|
657
463
|
}),
|
|
658
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
659
465
|
className: "space-y-3",
|
|
660
466
|
children: [
|
|
661
|
-
/* @__PURE__ */
|
|
662
|
-
className: "text-2xl
|
|
467
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
468
|
+
className: "font-bold text-2xl",
|
|
663
469
|
children: "Incremental Regeneration"
|
|
664
470
|
}),
|
|
665
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ jsx2("p", {
|
|
666
472
|
className: "text-muted-foreground text-sm",
|
|
667
473
|
children: "Regenerate only what changed while preserving custom logic."
|
|
668
474
|
}),
|
|
669
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
670
476
|
language: "bash",
|
|
671
477
|
filename: "incremental-regen",
|
|
672
478
|
code: `contractspec generate \\
|
|
@@ -677,18 +483,18 @@ export const createUserHandler = wrapOperationHandler(
|
|
|
677
483
|
})
|
|
678
484
|
]
|
|
679
485
|
}),
|
|
680
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
681
487
|
className: "space-y-3",
|
|
682
488
|
children: [
|
|
683
|
-
/* @__PURE__ */
|
|
684
|
-
className: "text-2xl
|
|
489
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
490
|
+
className: "font-bold text-2xl",
|
|
685
491
|
children: "Conflict Detection"
|
|
686
492
|
}),
|
|
687
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ jsx2("p", {
|
|
688
494
|
className: "text-muted-foreground text-sm",
|
|
689
495
|
children: "Automatically detect and report conflicts during regeneration."
|
|
690
496
|
}),
|
|
691
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
692
498
|
language: "bash",
|
|
693
499
|
filename: "check-conflicts",
|
|
694
500
|
code: `contractspec generate \\
|
|
@@ -699,20 +505,20 @@ export const createUserHandler = wrapOperationHandler(
|
|
|
699
505
|
})
|
|
700
506
|
]
|
|
701
507
|
}),
|
|
702
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
703
509
|
className: "flex items-center gap-4 pt-4",
|
|
704
510
|
children: [
|
|
705
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__PURE__ */ jsxs2(Link2, {
|
|
706
512
|
href: "/docs/guides/generate-docs-clients-schemas",
|
|
707
513
|
className: "btn-primary",
|
|
708
514
|
children: [
|
|
709
515
|
"Client Generation ",
|
|
710
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ jsx2(ChevronRight2, {
|
|
711
517
|
size: 16
|
|
712
518
|
})
|
|
713
519
|
]
|
|
714
520
|
}),
|
|
715
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ jsx2(Link2, {
|
|
716
522
|
href: "/docs/intent/schema-validation-typescript",
|
|
717
523
|
className: "btn-ghost",
|
|
718
524
|
children: "Type Safety"
|
|
@@ -723,232 +529,394 @@ export const createUserHandler = wrapOperationHandler(
|
|
|
723
529
|
});
|
|
724
530
|
}
|
|
725
531
|
|
|
726
|
-
// src/components/docs/intent/
|
|
727
|
-
import {
|
|
728
|
-
import { SeoOptimizer as
|
|
729
|
-
import { CodeBlock as
|
|
730
|
-
import
|
|
731
|
-
import { ChevronRight as
|
|
732
|
-
import { jsx as
|
|
733
|
-
var
|
|
734
|
-
function
|
|
735
|
-
return /* @__PURE__ */
|
|
532
|
+
// src/components/docs/intent/GenerateClientFromSchemaPage.tsx
|
|
533
|
+
import { generateClientFromSchemaBrief as generateClientFromSchemaBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
534
|
+
import { SeoOptimizer as SeoOptimizer3 } from "@contractspec/lib.content-gen/seo";
|
|
535
|
+
import { CodeBlock as CodeBlock3 } from "@contractspec/lib.design-system";
|
|
536
|
+
import Link3 from "@contractspec/lib.ui-link";
|
|
537
|
+
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
538
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
539
|
+
var metadata3 = new SeoOptimizer3().optimize(generateClientFromSchemaBrief2);
|
|
540
|
+
function GenerateClientFromSchemaPage() {
|
|
541
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
736
542
|
className: "space-y-8",
|
|
737
543
|
children: [
|
|
738
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
739
545
|
className: "space-y-3",
|
|
740
546
|
children: [
|
|
741
|
-
/* @__PURE__ */
|
|
742
|
-
className: "text-4xl
|
|
743
|
-
children:
|
|
547
|
+
/* @__PURE__ */ jsx3("h1", {
|
|
548
|
+
className: "font-bold text-4xl",
|
|
549
|
+
children: generateClientFromSchemaBrief2.title
|
|
744
550
|
}),
|
|
745
|
-
/* @__PURE__ */
|
|
746
|
-
className: "text-muted-foreground
|
|
747
|
-
children:
|
|
551
|
+
/* @__PURE__ */ jsx3("p", {
|
|
552
|
+
className: "text-lg text-muted-foreground",
|
|
553
|
+
children: generateClientFromSchemaBrief2.summary
|
|
748
554
|
})
|
|
749
555
|
]
|
|
750
556
|
}),
|
|
751
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
752
558
|
className: "card-subtle space-y-4 p-6",
|
|
753
559
|
children: [
|
|
754
|
-
/* @__PURE__ */
|
|
755
|
-
className: "text-2xl
|
|
756
|
-
children: "
|
|
560
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
561
|
+
className: "font-bold text-2xl",
|
|
562
|
+
children: "Client Development Problems"
|
|
757
563
|
}),
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
-
className: "
|
|
760
|
-
children:
|
|
564
|
+
/* @__PURE__ */ jsx3("ul", {
|
|
565
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
566
|
+
children: generateClientFromSchemaBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx3("li", {
|
|
761
567
|
children: problem
|
|
762
568
|
}, index))
|
|
763
569
|
})
|
|
764
570
|
]
|
|
765
571
|
}),
|
|
766
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
767
573
|
className: "card-subtle space-y-4 p-6",
|
|
768
574
|
children: [
|
|
769
|
-
/* @__PURE__ */
|
|
770
|
-
className: "text-2xl
|
|
771
|
-
children: "
|
|
575
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
576
|
+
className: "font-bold text-2xl",
|
|
577
|
+
children: "Automated Solutions"
|
|
772
578
|
}),
|
|
773
|
-
/* @__PURE__ */
|
|
774
|
-
className: "
|
|
775
|
-
children:
|
|
579
|
+
/* @__PURE__ */ jsx3("ul", {
|
|
580
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
581
|
+
children: generateClientFromSchemaBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx3("li", {
|
|
776
582
|
children: solution
|
|
777
583
|
}, index))
|
|
778
584
|
})
|
|
779
585
|
]
|
|
780
586
|
}),
|
|
781
|
-
/* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
782
588
|
className: "space-y-6",
|
|
783
589
|
children: [
|
|
784
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
785
591
|
className: "space-y-3",
|
|
786
592
|
children: [
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
className: "text-2xl
|
|
789
|
-
children: "Contract
|
|
593
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
594
|
+
className: "font-bold text-2xl",
|
|
595
|
+
children: "Contract Definition"
|
|
790
596
|
}),
|
|
791
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ jsx3("p", {
|
|
792
598
|
className: "text-muted-foreground text-sm",
|
|
793
|
-
children: "Define
|
|
599
|
+
children: "Define your API contract once, generate clients for any language."
|
|
794
600
|
}),
|
|
795
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
796
602
|
language: "typescript",
|
|
797
|
-
filename: "src/contracts/
|
|
798
|
-
code: `import {
|
|
603
|
+
filename: "src/contracts/api.contract.ts",
|
|
604
|
+
code: `import { defineContract } from '@contractspec/lib.contracts-spec';
|
|
605
|
+
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
799
606
|
|
|
800
|
-
export const
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
607
|
+
export const ApiContract = defineContract({
|
|
608
|
+
name: 'MyAPI',
|
|
609
|
+
version: '1.0.0',
|
|
610
|
+
baseUrl: 'https://api.example.com',
|
|
611
|
+
operations: {
|
|
612
|
+
getUsers: {
|
|
613
|
+
goal: 'Retrieve paginated list of users',
|
|
614
|
+
method: 'GET',
|
|
615
|
+
path: '/users',
|
|
616
|
+
input: new SchemaModel({
|
|
617
|
+
type: 'object',
|
|
618
|
+
properties: {
|
|
619
|
+
page: { type: 'integer', minimum: 1, default: 1 },
|
|
620
|
+
limit: { type: 'integer', minimum: 1, maximum: 100, default: 20 },
|
|
621
|
+
},
|
|
622
|
+
}),
|
|
623
|
+
output: new SchemaModel({
|
|
624
|
+
type: 'object',
|
|
625
|
+
properties: {
|
|
626
|
+
users: {
|
|
627
|
+
type: 'array',
|
|
628
|
+
items: {
|
|
629
|
+
type: 'object',
|
|
630
|
+
properties: {
|
|
631
|
+
id: { type: 'string', required: true },
|
|
632
|
+
email: { type: 'string', required: true },
|
|
633
|
+
name: { type: 'string', required: true },
|
|
634
|
+
},
|
|
635
|
+
},
|
|
636
|
+
},
|
|
637
|
+
pagination: {
|
|
638
|
+
type: 'object',
|
|
639
|
+
properties: {
|
|
640
|
+
page: { type: 'integer', required: true },
|
|
641
|
+
limit: { type: 'integer', required: true },
|
|
642
|
+
total: { type: 'integer', required: true },
|
|
643
|
+
},
|
|
644
|
+
},
|
|
645
|
+
},
|
|
646
|
+
}),
|
|
827
647
|
},
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
648
|
+
createUser: {
|
|
649
|
+
goal: 'Create a new user account',
|
|
650
|
+
method: 'POST',
|
|
651
|
+
path: '/users',
|
|
652
|
+
input: new SchemaModel({
|
|
653
|
+
type: 'object',
|
|
654
|
+
properties: {
|
|
655
|
+
email: { type: 'string', format: 'email', required: true },
|
|
656
|
+
name: { type: 'string', minLength: 1, required: true },
|
|
657
|
+
},
|
|
658
|
+
}),
|
|
659
|
+
output: new SchemaModel({
|
|
660
|
+
type: 'object',
|
|
661
|
+
properties: {
|
|
662
|
+
id: { type: 'string', required: true },
|
|
663
|
+
email: { type: 'string', required: true },
|
|
664
|
+
name: { type: 'string', required: true },
|
|
665
|
+
createdAt: { type: 'string', format: 'date-time', required: true },
|
|
666
|
+
},
|
|
667
|
+
}),
|
|
833
668
|
},
|
|
834
669
|
},
|
|
835
|
-
required: ['id', 'email', 'name', 'createdAt'],
|
|
836
670
|
metadata: {
|
|
837
|
-
|
|
838
|
-
|
|
671
|
+
description: 'User management API with authentication',
|
|
672
|
+
tags: ['users', 'authentication'],
|
|
839
673
|
},
|
|
840
674
|
});`
|
|
841
675
|
})
|
|
842
676
|
]
|
|
843
677
|
}),
|
|
844
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
845
679
|
className: "space-y-3",
|
|
846
680
|
children: [
|
|
847
|
-
/* @__PURE__ */
|
|
848
|
-
className: "text-2xl
|
|
849
|
-
children: "
|
|
681
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
682
|
+
className: "font-bold text-2xl",
|
|
683
|
+
children: "Generate Multiple Clients"
|
|
850
684
|
}),
|
|
851
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ jsx3("p", {
|
|
852
686
|
className: "text-muted-foreground text-sm",
|
|
853
|
-
children: "
|
|
687
|
+
children: "Generate type-safe clients for any language from the same contract."
|
|
854
688
|
}),
|
|
855
|
-
/* @__PURE__ */
|
|
856
|
-
language: "
|
|
857
|
-
filename: "
|
|
858
|
-
code:
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
role: 'user' | 'admin' | 'moderator';
|
|
864
|
-
createdAt: string;
|
|
865
|
-
}
|
|
689
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
690
|
+
language: "bash",
|
|
691
|
+
filename: "generate-clients",
|
|
692
|
+
code: `# Generate all supported language clients
|
|
693
|
+
contractspec generate clients \\
|
|
694
|
+
--contract ./src/contracts/api.contract.ts \\
|
|
695
|
+
--output ./generated/clients \\
|
|
696
|
+
--languages typescript,python,go,java,csharp
|
|
866
697
|
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
698
|
+
# Generate specific language client
|
|
699
|
+
contractspec generate clients \\
|
|
700
|
+
--contract ./src/contracts/api.contract.ts \\
|
|
701
|
+
--output ./generated/clients \\
|
|
702
|
+
--languages typescript \\
|
|
703
|
+
--format npm-package
|
|
704
|
+
|
|
705
|
+
# Options
|
|
706
|
+
# --with-types: Include TypeScript definitions
|
|
707
|
+
# --with-tests: Generate client test suites
|
|
708
|
+
# --with-docs: Include client documentation
|
|
709
|
+
# --framework: Use specific HTTP client framework`
|
|
710
|
+
})
|
|
711
|
+
]
|
|
712
|
+
}),
|
|
713
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
714
|
+
className: "space-y-3",
|
|
715
|
+
children: [
|
|
716
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
717
|
+
className: "font-bold text-2xl",
|
|
718
|
+
children: "Generated Client Examples"
|
|
719
|
+
}),
|
|
720
|
+
/* @__PURE__ */ jsx3("p", {
|
|
721
|
+
className: "text-muted-foreground text-sm",
|
|
722
|
+
children: "Each generated client is fully type-safe and idiomatic."
|
|
723
|
+
}),
|
|
724
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
725
|
+
className: "space-y-4",
|
|
726
|
+
children: [
|
|
727
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
728
|
+
className: "card-subtle p-4",
|
|
729
|
+
children: [
|
|
730
|
+
/* @__PURE__ */ jsx3("h4", {
|
|
731
|
+
className: "font-semibold text-lg",
|
|
732
|
+
children: "TypeScript Client"
|
|
733
|
+
}),
|
|
734
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
735
|
+
language: "typescript",
|
|
736
|
+
filename: "generated/clients/typescript/index.ts",
|
|
737
|
+
code: `import { MyAPIClient } from './client';
|
|
738
|
+
|
|
739
|
+
const client = new MyAPIClient({
|
|
740
|
+
baseUrl: 'https://api.example.com',
|
|
741
|
+
apiKey: process.env.API_KEY,
|
|
874
742
|
});
|
|
875
743
|
|
|
876
|
-
//
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
744
|
+
// Type-safe method calls
|
|
745
|
+
const users = await client.getUsers({
|
|
746
|
+
page: 1,
|
|
747
|
+
limit: 10,
|
|
748
|
+
});
|
|
880
749
|
|
|
881
|
-
|
|
882
|
-
|
|
750
|
+
const newUser = await client.createUser({
|
|
751
|
+
email: 'user@example.com',
|
|
752
|
+
name: 'John Doe',
|
|
753
|
+
});
|
|
754
|
+
|
|
755
|
+
// Full type inference
|
|
756
|
+
// users: GetUsersResponse
|
|
757
|
+
// newUser: CreateUserResponse`
|
|
758
|
+
})
|
|
759
|
+
]
|
|
760
|
+
}),
|
|
761
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
762
|
+
className: "card-subtle p-4",
|
|
763
|
+
children: [
|
|
764
|
+
/* @__PURE__ */ jsx3("h4", {
|
|
765
|
+
className: "font-semibold text-lg",
|
|
766
|
+
children: "Python Client"
|
|
767
|
+
}),
|
|
768
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
769
|
+
language: "python",
|
|
770
|
+
filename: "generated/clients/python/index.py",
|
|
771
|
+
code: `from myapi_client import MyAPIClient
|
|
772
|
+
|
|
773
|
+
client = MyAPIClient(
|
|
774
|
+
base_url='https://api.example.com',
|
|
775
|
+
api_key=os.getenv('API_KEY')
|
|
776
|
+
)
|
|
777
|
+
|
|
778
|
+
# Type-safe method calls
|
|
779
|
+
users = await client.get_users(
|
|
780
|
+
page=1,
|
|
781
|
+
limit=10
|
|
782
|
+
)
|
|
783
|
+
|
|
784
|
+
new_user = await client.create_user(
|
|
785
|
+
email='user@example.com',
|
|
786
|
+
name='John Doe'
|
|
787
|
+
)
|
|
788
|
+
|
|
789
|
+
# Full type hints
|
|
790
|
+
# users: GetUsersResponse
|
|
791
|
+
# new_user: CreateUserResponse`
|
|
792
|
+
})
|
|
793
|
+
]
|
|
794
|
+
}),
|
|
795
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
796
|
+
className: "card-subtle p-4",
|
|
797
|
+
children: [
|
|
798
|
+
/* @__PURE__ */ jsx3("h4", {
|
|
799
|
+
className: "font-semibold text-lg",
|
|
800
|
+
children: "Go Client"
|
|
801
|
+
}),
|
|
802
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
803
|
+
language: "go",
|
|
804
|
+
filename: "generated/clients/go/client.go",
|
|
805
|
+
code: `package main
|
|
806
|
+
|
|
807
|
+
import (
|
|
808
|
+
"context"
|
|
809
|
+
"myapi_client"
|
|
810
|
+
)
|
|
811
|
+
|
|
812
|
+
func main() {
|
|
813
|
+
client := myapi_client.NewMyAPIClient(
|
|
814
|
+
myapi_client.WithBaseURL("https://api.example.com"),
|
|
815
|
+
myapi_client.WithAPIKey(os.Getenv("API_KEY")),
|
|
816
|
+
)
|
|
817
|
+
|
|
818
|
+
// Type-safe method calls
|
|
819
|
+
users, err := client.GetUsers(&myapi_client.GetUsersParams{
|
|
820
|
+
Page: 1,
|
|
821
|
+
Limit: 10,
|
|
822
|
+
})
|
|
823
|
+
|
|
824
|
+
newUser, err := client.CreateUser(&myapi_client.CreateUserParams{
|
|
825
|
+
Email: "user@example.com",
|
|
826
|
+
Name: "John Doe",
|
|
827
|
+
})
|
|
828
|
+
|
|
829
|
+
// Full type checking at compile time
|
|
830
|
+
// users: *GetUsersResponse
|
|
831
|
+
// newUser: *CreateUserResponse
|
|
883
832
|
}`
|
|
833
|
+
})
|
|
834
|
+
]
|
|
835
|
+
})
|
|
836
|
+
]
|
|
884
837
|
})
|
|
885
838
|
]
|
|
886
839
|
}),
|
|
887
|
-
/* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
888
841
|
className: "space-y-3",
|
|
889
842
|
children: [
|
|
890
|
-
/* @__PURE__ */
|
|
891
|
-
className: "text-2xl
|
|
892
|
-
children: "
|
|
843
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
844
|
+
className: "font-bold text-2xl",
|
|
845
|
+
children: "Advanced Features"
|
|
893
846
|
}),
|
|
894
|
-
/* @__PURE__ */
|
|
847
|
+
/* @__PURE__ */ jsx3("p", {
|
|
895
848
|
className: "text-muted-foreground text-sm",
|
|
896
|
-
children: "
|
|
849
|
+
children: "Generated clients include enterprise-grade features out of the box."
|
|
897
850
|
}),
|
|
898
|
-
/* @__PURE__ */
|
|
851
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
899
852
|
language: "typescript",
|
|
900
|
-
filename: "
|
|
901
|
-
code:
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
return
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
853
|
+
filename: "client-features.ts",
|
|
854
|
+
code: `// Advanced client features
|
|
855
|
+
const client = new MyAPIClient({
|
|
856
|
+
baseUrl: 'https://api.example.com',
|
|
857
|
+
apiKey: 'your-api-key',
|
|
858
|
+
|
|
859
|
+
// Retry configuration
|
|
860
|
+
retryConfig: {
|
|
861
|
+
maxRetries: 3,
|
|
862
|
+
backoffMultiplier: 2,
|
|
863
|
+
maxDelay: 30000,
|
|
864
|
+
},
|
|
865
|
+
|
|
866
|
+
// Request/Response interceptors
|
|
867
|
+
interceptors: {
|
|
868
|
+
request: [(config) => {
|
|
869
|
+
// Add authentication headers
|
|
870
|
+
config.headers.Authorization = \`Bearer \${await getAuthToken()}\`;
|
|
871
|
+
return config;
|
|
872
|
+
}],
|
|
873
|
+
response: [(response) => {
|
|
874
|
+
// Log API calls
|
|
875
|
+
console.log(\`API Call: \${response.config.method} \${response.config.url}\`);
|
|
876
|
+
return response;
|
|
877
|
+
}],
|
|
878
|
+
},
|
|
879
|
+
|
|
880
|
+
// Error handling
|
|
881
|
+
errorHandler: (error) => {
|
|
882
|
+
if (error.status === 401) {
|
|
883
|
+
// Refresh token and retry
|
|
884
|
+
return refreshTokenAndRetry(error.originalRequest);
|
|
925
885
|
}
|
|
926
|
-
|
|
927
886
|
throw error;
|
|
928
|
-
}
|
|
929
|
-
}
|
|
887
|
+
},
|
|
888
|
+
});
|
|
889
|
+
|
|
890
|
+
// Automatic request deduplication
|
|
891
|
+
const user1 = client.getUser({ id: '123' });
|
|
892
|
+
const user2 = client.getUser({ id: '123' }); // Uses cached result
|
|
893
|
+
|
|
894
|
+
// Request cancellation
|
|
895
|
+
const controller = new AbortController();
|
|
896
|
+
const promise = client.getUsers({ page: 1, signal: controller.signal });
|
|
897
|
+
controller.abort(); // Cancels the request`
|
|
930
898
|
})
|
|
931
899
|
]
|
|
932
900
|
})
|
|
933
901
|
]
|
|
934
902
|
}),
|
|
935
|
-
/* @__PURE__ */
|
|
903
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
936
904
|
className: "flex items-center gap-4 pt-4",
|
|
937
905
|
children: [
|
|
938
|
-
/* @__PURE__ */
|
|
939
|
-
href: "/docs/guides/
|
|
906
|
+
/* @__PURE__ */ jsxs3(Link3, {
|
|
907
|
+
href: "/docs/guides/generate-docs-clients-schemas",
|
|
940
908
|
className: "btn-primary",
|
|
941
909
|
children: [
|
|
942
|
-
"
|
|
943
|
-
/* @__PURE__ */
|
|
910
|
+
"Client Generation Guide ",
|
|
911
|
+
/* @__PURE__ */ jsx3(ChevronRight3, {
|
|
944
912
|
size: 16
|
|
945
913
|
})
|
|
946
914
|
]
|
|
947
915
|
}),
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
href: "/docs/intent/
|
|
916
|
+
/* @__PURE__ */ jsx3(Link3, {
|
|
917
|
+
href: "/docs/intent/contract-first-api",
|
|
950
918
|
className: "btn-ghost",
|
|
951
|
-
children: "
|
|
919
|
+
children: "Contract-first API"
|
|
952
920
|
})
|
|
953
921
|
]
|
|
954
922
|
})
|
|
@@ -958,128 +926,128 @@ export async function createUserHandler(request: Request) {
|
|
|
958
926
|
|
|
959
927
|
// src/components/docs/intent/OpenapiAlternativePage.tsx
|
|
960
928
|
import { openapiAlternativeBrief as openapiAlternativeBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
961
|
-
import { SeoOptimizer as
|
|
962
|
-
import { CodeBlock as
|
|
963
|
-
import
|
|
964
|
-
import { ChevronRight as
|
|
965
|
-
import { jsx as
|
|
966
|
-
var
|
|
929
|
+
import { SeoOptimizer as SeoOptimizer4 } from "@contractspec/lib.content-gen/seo";
|
|
930
|
+
import { CodeBlock as CodeBlock4 } from "@contractspec/lib.design-system";
|
|
931
|
+
import Link4 from "@contractspec/lib.ui-link";
|
|
932
|
+
import { ChevronRight as ChevronRight4 } from "lucide-react";
|
|
933
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
934
|
+
var metadata4 = new SeoOptimizer4().optimize(openapiAlternativeBrief2);
|
|
967
935
|
function OpenapiAlternativePage() {
|
|
968
|
-
return /* @__PURE__ */
|
|
936
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
969
937
|
className: "space-y-8",
|
|
970
938
|
children: [
|
|
971
|
-
/* @__PURE__ */
|
|
939
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
972
940
|
className: "space-y-3",
|
|
973
941
|
children: [
|
|
974
|
-
/* @__PURE__ */
|
|
975
|
-
className: "text-4xl
|
|
942
|
+
/* @__PURE__ */ jsx4("h1", {
|
|
943
|
+
className: "font-bold text-4xl",
|
|
976
944
|
children: openapiAlternativeBrief2.title
|
|
977
945
|
}),
|
|
978
|
-
/* @__PURE__ */
|
|
979
|
-
className: "text-muted-foreground
|
|
946
|
+
/* @__PURE__ */ jsx4("p", {
|
|
947
|
+
className: "text-lg text-muted-foreground",
|
|
980
948
|
children: openapiAlternativeBrief2.summary
|
|
981
949
|
})
|
|
982
950
|
]
|
|
983
951
|
}),
|
|
984
|
-
/* @__PURE__ */
|
|
952
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
985
953
|
className: "card-subtle space-y-4 p-6",
|
|
986
954
|
children: [
|
|
987
|
-
/* @__PURE__ */
|
|
988
|
-
className: "text-2xl
|
|
955
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
956
|
+
className: "font-bold text-2xl",
|
|
989
957
|
children: "OpenAPI Limitations"
|
|
990
958
|
}),
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
className: "
|
|
993
|
-
children: openapiAlternativeBrief2.problems.map((problem, index) => /* @__PURE__ */
|
|
959
|
+
/* @__PURE__ */ jsx4("ul", {
|
|
960
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
961
|
+
children: openapiAlternativeBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx4("li", {
|
|
994
962
|
children: problem
|
|
995
963
|
}, index))
|
|
996
964
|
})
|
|
997
965
|
]
|
|
998
966
|
}),
|
|
999
|
-
/* @__PURE__ */
|
|
967
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1000
968
|
className: "card-subtle space-y-4 p-6",
|
|
1001
969
|
children: [
|
|
1002
|
-
/* @__PURE__ */
|
|
1003
|
-
className: "text-2xl
|
|
970
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
971
|
+
className: "font-bold text-2xl",
|
|
1004
972
|
children: "ContractSpec Advantages"
|
|
1005
973
|
}),
|
|
1006
|
-
/* @__PURE__ */
|
|
1007
|
-
className: "
|
|
1008
|
-
children: openapiAlternativeBrief2.solutions.map((solution, index) => /* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ jsx4("ul", {
|
|
975
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
976
|
+
children: openapiAlternativeBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx4("li", {
|
|
1009
977
|
children: solution
|
|
1010
978
|
}, index))
|
|
1011
979
|
})
|
|
1012
980
|
]
|
|
1013
981
|
}),
|
|
1014
|
-
/* @__PURE__ */
|
|
982
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1015
983
|
className: "space-y-6",
|
|
1016
984
|
children: [
|
|
1017
|
-
/* @__PURE__ */
|
|
985
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1018
986
|
className: "space-y-3",
|
|
1019
987
|
children: [
|
|
1020
|
-
/* @__PURE__ */
|
|
1021
|
-
className: "text-2xl
|
|
988
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
989
|
+
className: "font-bold text-2xl",
|
|
1022
990
|
children: "Comparison: OpenAPI vs ContractSpec"
|
|
1023
991
|
}),
|
|
1024
|
-
/* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ jsx4("p", {
|
|
1025
993
|
className: "text-muted-foreground text-sm",
|
|
1026
994
|
children: "Key differences between OpenAPI documentation and ContractSpec executable contracts."
|
|
1027
995
|
}),
|
|
1028
|
-
/* @__PURE__ */
|
|
996
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1029
997
|
className: "grid gap-6 md:grid-cols-2",
|
|
1030
998
|
children: [
|
|
1031
|
-
/* @__PURE__ */
|
|
999
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1032
1000
|
className: "card-subtle space-y-3 p-4",
|
|
1033
1001
|
children: [
|
|
1034
|
-
/* @__PURE__ */
|
|
1035
|
-
className: "text-lg
|
|
1002
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
1003
|
+
className: "font-semibold text-lg",
|
|
1036
1004
|
children: "OpenAPI"
|
|
1037
1005
|
}),
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
className: "
|
|
1006
|
+
/* @__PURE__ */ jsxs4("ul", {
|
|
1007
|
+
className: "space-y-1 text-muted-foreground text-sm",
|
|
1040
1008
|
children: [
|
|
1041
|
-
/* @__PURE__ */
|
|
1009
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1042
1010
|
children: "• Documentation specification only"
|
|
1043
1011
|
}),
|
|
1044
|
-
/* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1045
1013
|
children: "• No runtime validation"
|
|
1046
1014
|
}),
|
|
1047
|
-
/* @__PURE__ */
|
|
1015
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1048
1016
|
children: "• Manual code generation"
|
|
1049
1017
|
}),
|
|
1050
|
-
/* @__PURE__ */
|
|
1018
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1051
1019
|
children: "• Type safety requires tools"
|
|
1052
1020
|
}),
|
|
1053
|
-
/* @__PURE__ */
|
|
1021
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1054
1022
|
children: "• Separate schemas from documentation"
|
|
1055
1023
|
})
|
|
1056
1024
|
]
|
|
1057
1025
|
})
|
|
1058
1026
|
]
|
|
1059
1027
|
}),
|
|
1060
|
-
/* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1061
1029
|
className: "card-subtle space-y-3 p-4",
|
|
1062
1030
|
children: [
|
|
1063
|
-
/* @__PURE__ */
|
|
1064
|
-
className: "text-lg
|
|
1031
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
1032
|
+
className: "font-semibold text-lg",
|
|
1065
1033
|
children: "ContractSpec"
|
|
1066
1034
|
}),
|
|
1067
|
-
/* @__PURE__ */
|
|
1068
|
-
className: "
|
|
1035
|
+
/* @__PURE__ */ jsxs4("ul", {
|
|
1036
|
+
className: "space-y-1 text-muted-foreground text-sm",
|
|
1069
1037
|
children: [
|
|
1070
|
-
/* @__PURE__ */
|
|
1038
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1071
1039
|
children: "• Executable contracts"
|
|
1072
1040
|
}),
|
|
1073
|
-
/* @__PURE__ */
|
|
1041
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1074
1042
|
children: "• Built-in runtime validation"
|
|
1075
1043
|
}),
|
|
1076
|
-
/* @__PURE__ */
|
|
1044
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1077
1045
|
children: "• Automatic code generation"
|
|
1078
1046
|
}),
|
|
1079
|
-
/* @__PURE__ */
|
|
1047
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1080
1048
|
children: "• Type-safe by default"
|
|
1081
1049
|
}),
|
|
1082
|
-
/* @__PURE__ */
|
|
1050
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1083
1051
|
children: "• Unified spec and implementation"
|
|
1084
1052
|
})
|
|
1085
1053
|
]
|
|
@@ -1090,29 +1058,264 @@ function OpenapiAlternativePage() {
|
|
|
1090
1058
|
})
|
|
1091
1059
|
]
|
|
1092
1060
|
}),
|
|
1061
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1062
|
+
className: "space-y-3",
|
|
1063
|
+
children: [
|
|
1064
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
1065
|
+
className: "font-bold text-2xl",
|
|
1066
|
+
children: "Export from Contracts"
|
|
1067
|
+
}),
|
|
1068
|
+
/* @__PURE__ */ jsx4("p", {
|
|
1069
|
+
className: "text-muted-foreground text-sm",
|
|
1070
|
+
children: "Generate OpenAPI documentation from ContractSpec for existing tooling."
|
|
1071
|
+
}),
|
|
1072
|
+
/* @__PURE__ */ jsx4(CodeBlock4, {
|
|
1073
|
+
language: "bash",
|
|
1074
|
+
filename: "export-openapi",
|
|
1075
|
+
code: `# From ContractSpec contracts
|
|
1076
|
+
contractspec openapi export \\
|
|
1077
|
+
--registry ./src/contracts/registry.ts \\
|
|
1078
|
+
--format yaml \\
|
|
1079
|
+
--out ./openapi.yaml
|
|
1080
|
+
|
|
1081
|
+
# Compare: Manual OpenAPI vs Generated
|
|
1082
|
+
# Manual: Write OpenAPI by hand, maintain separately
|
|
1083
|
+
# Generated: Single source of truth, always in sync`
|
|
1084
|
+
})
|
|
1085
|
+
]
|
|
1086
|
+
}),
|
|
1087
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1088
|
+
className: "space-y-3",
|
|
1089
|
+
children: [
|
|
1090
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
1091
|
+
className: "font-bold text-2xl",
|
|
1092
|
+
children: "Beyond Documentation"
|
|
1093
|
+
}),
|
|
1094
|
+
/* @__PURE__ */ jsx4("p", {
|
|
1095
|
+
className: "text-muted-foreground text-sm",
|
|
1096
|
+
children: "ContractSpec provides more than just API documentation."
|
|
1097
|
+
}),
|
|
1098
|
+
/* @__PURE__ */ jsx4(CodeBlock4, {
|
|
1099
|
+
language: "typescript",
|
|
1100
|
+
filename: "multi-output-example.ts",
|
|
1101
|
+
code: `// One contract, multiple outputs
|
|
1102
|
+
import { UserApiContract } from './contracts/user-api.contract';
|
|
1103
|
+
|
|
1104
|
+
// Generated outputs
|
|
1105
|
+
export const outputs = {
|
|
1106
|
+
// API documentation (OpenAPI)
|
|
1107
|
+
openapi: UserApiContract.toOpenAPI(),
|
|
1108
|
+
|
|
1109
|
+
// Client SDKs (TypeScript, Python, etc.)
|
|
1110
|
+
clients: UserApiContract.generateClients({
|
|
1111
|
+
languages: ['typescript', 'python', 'go'],
|
|
1112
|
+
}),
|
|
1113
|
+
|
|
1114
|
+
// Database schemas (Prisma, Drizzle)
|
|
1115
|
+
database: UserApiContract.toDatabase({
|
|
1116
|
+
adapter: 'prisma',
|
|
1117
|
+
}),
|
|
1118
|
+
|
|
1119
|
+
// API handlers (Express, Fastify, Next.js)
|
|
1120
|
+
handlers: UserApiContract.toHandlers({
|
|
1121
|
+
framework: 'express',
|
|
1122
|
+
}),
|
|
1123
|
+
|
|
1124
|
+
// Validation middleware
|
|
1125
|
+
validation: UserApiContract.toValidation({
|
|
1126
|
+
library: 'zod',
|
|
1127
|
+
}),
|
|
1128
|
+
|
|
1129
|
+
// Type definitions
|
|
1130
|
+
types: UserApiContract.toTypescript(),
|
|
1131
|
+
};`
|
|
1132
|
+
})
|
|
1133
|
+
]
|
|
1134
|
+
})
|
|
1135
|
+
]
|
|
1136
|
+
}),
|
|
1137
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1138
|
+
className: "flex items-center gap-4 pt-4",
|
|
1139
|
+
children: [
|
|
1140
|
+
/* @__PURE__ */ jsxs4(Link4, {
|
|
1141
|
+
href: "/docs/guides/generate-docs-clients-schemas",
|
|
1142
|
+
className: "btn-primary",
|
|
1143
|
+
children: [
|
|
1144
|
+
"Generate from Contracts ",
|
|
1145
|
+
/* @__PURE__ */ jsx4(ChevronRight4, {
|
|
1146
|
+
size: 16
|
|
1147
|
+
})
|
|
1148
|
+
]
|
|
1149
|
+
}),
|
|
1150
|
+
/* @__PURE__ */ jsx4(Link4, {
|
|
1151
|
+
href: "/docs/intent/generate-client-from-schema",
|
|
1152
|
+
className: "btn-ghost",
|
|
1153
|
+
children: "Client Generation"
|
|
1154
|
+
})
|
|
1155
|
+
]
|
|
1156
|
+
})
|
|
1157
|
+
]
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
// src/components/docs/intent/SchemaValidationTypescriptPage.tsx
|
|
1162
|
+
import { schemaValidationTypescriptBrief as schemaValidationTypescriptBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
1163
|
+
import { SeoOptimizer as SeoOptimizer5 } from "@contractspec/lib.content-gen/seo";
|
|
1164
|
+
import { CodeBlock as CodeBlock5 } from "@contractspec/lib.design-system";
|
|
1165
|
+
import Link5 from "@contractspec/lib.ui-link";
|
|
1166
|
+
import { ChevronRight as ChevronRight5 } from "lucide-react";
|
|
1167
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1168
|
+
var metadata5 = new SeoOptimizer5().optimize(schemaValidationTypescriptBrief2);
|
|
1169
|
+
function SchemaValidationTypescriptPage() {
|
|
1170
|
+
return /* @__PURE__ */ jsxs5("div", {
|
|
1171
|
+
className: "space-y-8",
|
|
1172
|
+
children: [
|
|
1173
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1174
|
+
className: "space-y-3",
|
|
1175
|
+
children: [
|
|
1176
|
+
/* @__PURE__ */ jsx5("h1", {
|
|
1177
|
+
className: "font-bold text-4xl",
|
|
1178
|
+
children: schemaValidationTypescriptBrief2.title
|
|
1179
|
+
}),
|
|
1180
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1181
|
+
className: "text-lg text-muted-foreground",
|
|
1182
|
+
children: schemaValidationTypescriptBrief2.summary
|
|
1183
|
+
})
|
|
1184
|
+
]
|
|
1185
|
+
}),
|
|
1186
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1187
|
+
className: "card-subtle space-y-4 p-6",
|
|
1188
|
+
children: [
|
|
1189
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1190
|
+
className: "font-bold text-2xl",
|
|
1191
|
+
children: "Validation Pain Points"
|
|
1192
|
+
}),
|
|
1193
|
+
/* @__PURE__ */ jsx5("ul", {
|
|
1194
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
1195
|
+
children: schemaValidationTypescriptBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx5("li", {
|
|
1196
|
+
children: problem
|
|
1197
|
+
}, index))
|
|
1198
|
+
})
|
|
1199
|
+
]
|
|
1200
|
+
}),
|
|
1201
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1202
|
+
className: "card-subtle space-y-4 p-6",
|
|
1203
|
+
children: [
|
|
1204
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1205
|
+
className: "font-bold text-2xl",
|
|
1206
|
+
children: "Type-safe Solutions"
|
|
1207
|
+
}),
|
|
1208
|
+
/* @__PURE__ */ jsx5("ul", {
|
|
1209
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
1210
|
+
children: schemaValidationTypescriptBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx5("li", {
|
|
1211
|
+
children: solution
|
|
1212
|
+
}, index))
|
|
1213
|
+
})
|
|
1214
|
+
]
|
|
1215
|
+
}),
|
|
1216
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1217
|
+
className: "space-y-6",
|
|
1218
|
+
children: [
|
|
1219
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1220
|
+
className: "space-y-3",
|
|
1221
|
+
children: [
|
|
1222
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1223
|
+
className: "font-bold text-2xl",
|
|
1224
|
+
children: "Contract Schema"
|
|
1225
|
+
}),
|
|
1226
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1227
|
+
className: "text-muted-foreground text-sm",
|
|
1228
|
+
children: "Define data models with automatic TypeScript generation."
|
|
1229
|
+
}),
|
|
1230
|
+
/* @__PURE__ */ jsx5(CodeBlock5, {
|
|
1231
|
+
language: "typescript",
|
|
1232
|
+
filename: "src/contracts/user.schema.ts",
|
|
1233
|
+
code: `import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
1234
|
+
|
|
1235
|
+
export const UserSchema = new SchemaModel({
|
|
1236
|
+
type: 'object',
|
|
1237
|
+
properties: {
|
|
1238
|
+
id: {
|
|
1239
|
+
type: 'string',
|
|
1240
|
+
format: 'uuid',
|
|
1241
|
+
required: true,
|
|
1242
|
+
description: 'Unique user identifier',
|
|
1243
|
+
},
|
|
1244
|
+
email: {
|
|
1245
|
+
type: 'string',
|
|
1246
|
+
format: 'email',
|
|
1247
|
+
required: true,
|
|
1248
|
+
description: 'User email address',
|
|
1249
|
+
},
|
|
1250
|
+
name: {
|
|
1251
|
+
type: 'string',
|
|
1252
|
+
minLength: 1,
|
|
1253
|
+
maxLength: 100,
|
|
1254
|
+
required: true,
|
|
1255
|
+
description: 'Display name for the user',
|
|
1256
|
+
},
|
|
1257
|
+
role: {
|
|
1258
|
+
type: 'string',
|
|
1259
|
+
enum: ['user', 'admin', 'moderator'],
|
|
1260
|
+
default: 'user',
|
|
1261
|
+
description: 'User role in the system',
|
|
1262
|
+
},
|
|
1263
|
+
createdAt: {
|
|
1264
|
+
type: 'string',
|
|
1265
|
+
format: 'date-time',
|
|
1266
|
+
required: true,
|
|
1267
|
+
description: 'Account creation timestamp',
|
|
1268
|
+
},
|
|
1269
|
+
},
|
|
1270
|
+
required: ['id', 'email', 'name', 'createdAt'],
|
|
1271
|
+
metadata: {
|
|
1272
|
+
name: 'User',
|
|
1273
|
+
description: 'User account information',
|
|
1274
|
+
},
|
|
1275
|
+
});`
|
|
1276
|
+
})
|
|
1277
|
+
]
|
|
1278
|
+
}),
|
|
1093
1279
|
/* @__PURE__ */ jsxs5("div", {
|
|
1094
1280
|
className: "space-y-3",
|
|
1095
1281
|
children: [
|
|
1096
1282
|
/* @__PURE__ */ jsx5("h2", {
|
|
1097
|
-
className: "text-2xl
|
|
1098
|
-
children: "
|
|
1283
|
+
className: "font-bold text-2xl",
|
|
1284
|
+
children: "Generated Types"
|
|
1099
1285
|
}),
|
|
1100
1286
|
/* @__PURE__ */ jsx5("p", {
|
|
1101
1287
|
className: "text-muted-foreground text-sm",
|
|
1102
|
-
children: "
|
|
1288
|
+
children: "TypeScript types are automatically generated with proper validation."
|
|
1103
1289
|
}),
|
|
1104
1290
|
/* @__PURE__ */ jsx5(CodeBlock5, {
|
|
1105
|
-
language: "
|
|
1106
|
-
filename: "
|
|
1107
|
-
code:
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1291
|
+
language: "typescript",
|
|
1292
|
+
filename: "generated/types/user.ts",
|
|
1293
|
+
code: `// Auto-generated from UserSchema
|
|
1294
|
+
export interface User {
|
|
1295
|
+
id: string;
|
|
1296
|
+
email: string;
|
|
1297
|
+
name: string;
|
|
1298
|
+
role: 'user' | 'admin' | 'moderator';
|
|
1299
|
+
createdAt: string;
|
|
1300
|
+
}
|
|
1112
1301
|
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1302
|
+
// Auto-generated Zod schema for runtime validation
|
|
1303
|
+
export const UserSchemaZod = z.object({
|
|
1304
|
+
id: z.string().uuid(),
|
|
1305
|
+
email: z.string().email(),
|
|
1306
|
+
name: z.string().min(1).max(100),
|
|
1307
|
+
role: z.enum(['user', 'admin', 'moderator']).default('user'),
|
|
1308
|
+
createdAt: z.string().datetime(),
|
|
1309
|
+
});
|
|
1310
|
+
|
|
1311
|
+
// Generated validation utilities
|
|
1312
|
+
export function validateUser(data: unknown): User {
|
|
1313
|
+
return UserSchemaZod.parse(data);
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
export function isUser(data: unknown): data is User {
|
|
1317
|
+
return UserSchemaZod.safeParse(data).success;
|
|
1318
|
+
}`
|
|
1116
1319
|
})
|
|
1117
1320
|
]
|
|
1118
1321
|
}),
|
|
@@ -1120,47 +1323,45 @@ contractspec openapi export \\
|
|
|
1120
1323
|
className: "space-y-3",
|
|
1121
1324
|
children: [
|
|
1122
1325
|
/* @__PURE__ */ jsx5("h2", {
|
|
1123
|
-
className: "text-2xl
|
|
1124
|
-
children: "
|
|
1326
|
+
className: "font-bold text-2xl",
|
|
1327
|
+
children: "Runtime Validation"
|
|
1125
1328
|
}),
|
|
1126
1329
|
/* @__PURE__ */ jsx5("p", {
|
|
1127
1330
|
className: "text-muted-foreground text-sm",
|
|
1128
|
-
children: "
|
|
1331
|
+
children: "Use generated validation in your API handlers with zero boilerplate."
|
|
1129
1332
|
}),
|
|
1130
1333
|
/* @__PURE__ */ jsx5(CodeBlock5, {
|
|
1131
1334
|
language: "typescript",
|
|
1132
|
-
filename: "
|
|
1133
|
-
code:
|
|
1134
|
-
import { UserApiContract } from './contracts/user-api.contract';
|
|
1335
|
+
filename: "src/handlers/user-handler.ts",
|
|
1336
|
+
code: `import { validateUser } from '../generated/types/user';
|
|
1135
1337
|
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
})
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
};`
|
|
1338
|
+
export async function createUserHandler(request: Request) {
|
|
1339
|
+
try {
|
|
1340
|
+
const input = validateUser(await request.json());
|
|
1341
|
+
|
|
1342
|
+
// input is now fully typed as User
|
|
1343
|
+
const user = await db.users.create({
|
|
1344
|
+
data: {
|
|
1345
|
+
...input,
|
|
1346
|
+
createdAt: new Date().toISOString(),
|
|
1347
|
+
},
|
|
1348
|
+
});
|
|
1349
|
+
|
|
1350
|
+
return Response.json({ user });
|
|
1351
|
+
} catch (error) {
|
|
1352
|
+
if (error instanceof z.ZodError) {
|
|
1353
|
+
return Response.json(
|
|
1354
|
+
{
|
|
1355
|
+
error: 'Validation failed',
|
|
1356
|
+
details: error.errors
|
|
1357
|
+
},
|
|
1358
|
+
{ status: 400 }
|
|
1359
|
+
);
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
throw error;
|
|
1363
|
+
}
|
|
1364
|
+
}`
|
|
1164
1365
|
})
|
|
1165
1366
|
]
|
|
1166
1367
|
})
|
|
@@ -1170,10 +1371,10 @@ export const outputs = {
|
|
|
1170
1371
|
className: "flex items-center gap-4 pt-4",
|
|
1171
1372
|
children: [
|
|
1172
1373
|
/* @__PURE__ */ jsxs5(Link5, {
|
|
1173
|
-
href: "/docs/guides/
|
|
1374
|
+
href: "/docs/guides/spec-validation-and-typing",
|
|
1174
1375
|
className: "btn-primary",
|
|
1175
1376
|
children: [
|
|
1176
|
-
"
|
|
1377
|
+
"Type Safety Guide ",
|
|
1177
1378
|
/* @__PURE__ */ jsx5(ChevronRight5, {
|
|
1178
1379
|
size: 16
|
|
1179
1380
|
})
|
|
@@ -1190,15 +1391,15 @@ export const outputs = {
|
|
|
1190
1391
|
});
|
|
1191
1392
|
}
|
|
1192
1393
|
|
|
1193
|
-
// src/components/docs/intent/
|
|
1194
|
-
import {
|
|
1394
|
+
// src/components/docs/intent/SpecDrivenDevelopmentPage.tsx
|
|
1395
|
+
import { specDrivenDevelopmentBrief as specDrivenDevelopmentBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
1195
1396
|
import { SeoOptimizer as SeoOptimizer6 } from "@contractspec/lib.content-gen/seo";
|
|
1196
1397
|
import { CodeBlock as CodeBlock6 } from "@contractspec/lib.design-system";
|
|
1197
1398
|
import Link6 from "@contractspec/lib.ui-link";
|
|
1198
1399
|
import { ChevronRight as ChevronRight6 } from "lucide-react";
|
|
1199
1400
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1200
|
-
var metadata6 = new SeoOptimizer6().optimize(
|
|
1201
|
-
function
|
|
1401
|
+
var metadata6 = new SeoOptimizer6().optimize(specDrivenDevelopmentBrief2);
|
|
1402
|
+
function SpecDrivenDevelopmentPage() {
|
|
1202
1403
|
return /* @__PURE__ */ jsxs6("div", {
|
|
1203
1404
|
className: "space-y-8",
|
|
1204
1405
|
children: [
|
|
@@ -1206,12 +1407,12 @@ function GenerateClientFromSchemaPage() {
|
|
|
1206
1407
|
className: "space-y-3",
|
|
1207
1408
|
children: [
|
|
1208
1409
|
/* @__PURE__ */ jsx6("h1", {
|
|
1209
|
-
className: "text-4xl
|
|
1210
|
-
children:
|
|
1410
|
+
className: "font-bold text-4xl",
|
|
1411
|
+
children: specDrivenDevelopmentBrief2.title
|
|
1211
1412
|
}),
|
|
1212
1413
|
/* @__PURE__ */ jsx6("p", {
|
|
1213
|
-
className: "text-muted-foreground
|
|
1214
|
-
children:
|
|
1414
|
+
className: "text-lg text-muted-foreground",
|
|
1415
|
+
children: specDrivenDevelopmentBrief2.summary
|
|
1215
1416
|
})
|
|
1216
1417
|
]
|
|
1217
1418
|
}),
|
|
@@ -1219,12 +1420,12 @@ function GenerateClientFromSchemaPage() {
|
|
|
1219
1420
|
className: "card-subtle space-y-4 p-6",
|
|
1220
1421
|
children: [
|
|
1221
1422
|
/* @__PURE__ */ jsx6("h2", {
|
|
1222
|
-
className: "text-2xl
|
|
1223
|
-
children: "
|
|
1423
|
+
className: "font-bold text-2xl",
|
|
1424
|
+
children: "Why Spec-driven?"
|
|
1224
1425
|
}),
|
|
1225
1426
|
/* @__PURE__ */ jsx6("ul", {
|
|
1226
|
-
className: "
|
|
1227
|
-
children:
|
|
1427
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
1428
|
+
children: specDrivenDevelopmentBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx6("li", {
|
|
1228
1429
|
children: problem
|
|
1229
1430
|
}, index))
|
|
1230
1431
|
})
|
|
@@ -1234,12 +1435,12 @@ function GenerateClientFromSchemaPage() {
|
|
|
1234
1435
|
className: "card-subtle space-y-4 p-6",
|
|
1235
1436
|
children: [
|
|
1236
1437
|
/* @__PURE__ */ jsx6("h2", {
|
|
1237
|
-
className: "text-2xl
|
|
1238
|
-
children: "
|
|
1438
|
+
className: "font-bold text-2xl",
|
|
1439
|
+
children: "Benefits"
|
|
1239
1440
|
}),
|
|
1240
1441
|
/* @__PURE__ */ jsx6("ul", {
|
|
1241
|
-
className: "
|
|
1242
|
-
children:
|
|
1442
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
1443
|
+
children: specDrivenDevelopmentBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx6("li", {
|
|
1243
1444
|
children: solution
|
|
1244
1445
|
}, index))
|
|
1245
1446
|
})
|
|
@@ -1252,64 +1453,27 @@ function GenerateClientFromSchemaPage() {
|
|
|
1252
1453
|
className: "space-y-3",
|
|
1253
1454
|
children: [
|
|
1254
1455
|
/* @__PURE__ */ jsx6("h2", {
|
|
1255
|
-
className: "text-2xl
|
|
1256
|
-
children: "
|
|
1456
|
+
className: "font-bold text-2xl",
|
|
1457
|
+
children: "Feature Specification Example"
|
|
1257
1458
|
}),
|
|
1258
1459
|
/* @__PURE__ */ jsx6("p", {
|
|
1259
1460
|
className: "text-muted-foreground text-sm",
|
|
1260
|
-
children: "Define
|
|
1461
|
+
children: "Define a complete feature with operations, events, and data models."
|
|
1261
1462
|
}),
|
|
1262
1463
|
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1263
1464
|
language: "typescript",
|
|
1264
|
-
filename: "src/contracts/
|
|
1265
|
-
code: `import {
|
|
1465
|
+
filename: "src/contracts/user-management.feature.ts",
|
|
1466
|
+
code: `import { defineFeature } from '@contractspec/lib.contracts-spec/features';
|
|
1467
|
+
import { defineOperation } from '@contractspec/lib.contracts-spec/operations';
|
|
1468
|
+
import { defineEvent } from '@contractspec/lib.contracts-spec/events';
|
|
1266
1469
|
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
1267
1470
|
|
|
1268
|
-
export const
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
baseUrl: 'https://api.example.com',
|
|
1471
|
+
export const UserManagementFeature = defineFeature({
|
|
1472
|
+
goal: 'Complete user management system with CRUD operations',
|
|
1473
|
+
context: 'Handles user lifecycle from creation to deletion with proper authorization',
|
|
1272
1474
|
operations: {
|
|
1273
|
-
|
|
1274
|
-
goal: '
|
|
1275
|
-
method: 'GET',
|
|
1276
|
-
path: '/users',
|
|
1277
|
-
input: new SchemaModel({
|
|
1278
|
-
type: 'object',
|
|
1279
|
-
properties: {
|
|
1280
|
-
page: { type: 'integer', minimum: 1, default: 1 },
|
|
1281
|
-
limit: { type: 'integer', minimum: 1, maximum: 100, default: 20 },
|
|
1282
|
-
},
|
|
1283
|
-
}),
|
|
1284
|
-
output: new SchemaModel({
|
|
1285
|
-
type: 'object',
|
|
1286
|
-
properties: {
|
|
1287
|
-
users: {
|
|
1288
|
-
type: 'array',
|
|
1289
|
-
items: {
|
|
1290
|
-
type: 'object',
|
|
1291
|
-
properties: {
|
|
1292
|
-
id: { type: 'string', required: true },
|
|
1293
|
-
email: { type: 'string', required: true },
|
|
1294
|
-
name: { type: 'string', required: true },
|
|
1295
|
-
},
|
|
1296
|
-
},
|
|
1297
|
-
},
|
|
1298
|
-
pagination: {
|
|
1299
|
-
type: 'object',
|
|
1300
|
-
properties: {
|
|
1301
|
-
page: { type: 'integer', required: true },
|
|
1302
|
-
limit: { type: 'integer', required: true },
|
|
1303
|
-
total: { type: 'integer', required: true },
|
|
1304
|
-
},
|
|
1305
|
-
},
|
|
1306
|
-
},
|
|
1307
|
-
}),
|
|
1308
|
-
},
|
|
1309
|
-
createUser: {
|
|
1310
|
-
goal: 'Create a new user account',
|
|
1311
|
-
method: 'POST',
|
|
1312
|
-
path: '/users',
|
|
1475
|
+
createUser: defineOperation({
|
|
1476
|
+
goal: 'Create a new user account',
|
|
1313
1477
|
input: new SchemaModel({
|
|
1314
1478
|
type: 'object',
|
|
1315
1479
|
properties: {
|
|
@@ -1323,14 +1487,53 @@ export const ApiContract = defineContract({
|
|
|
1323
1487
|
id: { type: 'string', required: true },
|
|
1324
1488
|
email: { type: 'string', required: true },
|
|
1325
1489
|
name: { type: 'string', required: true },
|
|
1326
|
-
createdAt: { type: 'string', format: 'date-time', required: true },
|
|
1327
1490
|
},
|
|
1328
1491
|
}),
|
|
1329
|
-
},
|
|
1492
|
+
}),
|
|
1493
|
+
updateUser: defineOperation({
|
|
1494
|
+
goal: 'Update existing user information',
|
|
1495
|
+
input: new SchemaModel({
|
|
1496
|
+
type: 'object',
|
|
1497
|
+
properties: {
|
|
1498
|
+
name: { type: 'string', minLength: 1 },
|
|
1499
|
+
},
|
|
1500
|
+
}),
|
|
1501
|
+
output: new SchemaModel({
|
|
1502
|
+
type: 'object',
|
|
1503
|
+
properties: {
|
|
1504
|
+
id: { type: 'string', required: true },
|
|
1505
|
+
email: { type: 'string', required: true },
|
|
1506
|
+
name: { type: 'string', required: true },
|
|
1507
|
+
},
|
|
1508
|
+
}),
|
|
1509
|
+
}),
|
|
1510
|
+
},
|
|
1511
|
+
events: {
|
|
1512
|
+
userCreated: defineEvent({
|
|
1513
|
+
goal: 'Emit when a new user is created',
|
|
1514
|
+
payload: new SchemaModel({
|
|
1515
|
+
type: 'object',
|
|
1516
|
+
properties: {
|
|
1517
|
+
userId: { type: 'string', required: true },
|
|
1518
|
+
email: { type: 'string', required: true },
|
|
1519
|
+
},
|
|
1520
|
+
}),
|
|
1521
|
+
}),
|
|
1522
|
+
userUpdated: defineEvent({
|
|
1523
|
+
goal: 'Emit when user information changes',
|
|
1524
|
+
payload: new SchemaModel({
|
|
1525
|
+
type: 'object',
|
|
1526
|
+
properties: {
|
|
1527
|
+
userId: { type: 'string', required: true },
|
|
1528
|
+
changes: { type: 'array', items: { type: 'string' }, required: true },
|
|
1529
|
+
},
|
|
1530
|
+
}),
|
|
1531
|
+
}),
|
|
1330
1532
|
},
|
|
1331
1533
|
metadata: {
|
|
1332
|
-
|
|
1333
|
-
|
|
1534
|
+
name: 'user-management',
|
|
1535
|
+
version: '1.0.0',
|
|
1536
|
+
description: 'Complete user management with operations and events',
|
|
1334
1537
|
},
|
|
1335
1538
|
});`
|
|
1336
1539
|
})
|
|
@@ -1340,222 +1543,19 @@ export const ApiContract = defineContract({
|
|
|
1340
1543
|
className: "space-y-3",
|
|
1341
1544
|
children: [
|
|
1342
1545
|
/* @__PURE__ */ jsx6("h2", {
|
|
1343
|
-
className: "text-2xl
|
|
1344
|
-
children: "Generate
|
|
1546
|
+
className: "font-bold text-2xl",
|
|
1547
|
+
children: "Generate Type-safe Implementations"
|
|
1345
1548
|
}),
|
|
1346
1549
|
/* @__PURE__ */ jsx6("p", {
|
|
1347
1550
|
className: "text-muted-foreground text-sm",
|
|
1348
|
-
children: "Generate
|
|
1551
|
+
children: "Generate validation, types, and API handlers from your feature."
|
|
1349
1552
|
}),
|
|
1350
1553
|
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1351
1554
|
language: "bash",
|
|
1352
|
-
filename: "generate-
|
|
1353
|
-
code:
|
|
1354
|
-
|
|
1355
|
-
--
|
|
1356
|
-
--output ./generated/clients \\
|
|
1357
|
-
--languages typescript,python,go,java,csharp
|
|
1358
|
-
|
|
1359
|
-
# Generate specific language client
|
|
1360
|
-
contractspec generate clients \\
|
|
1361
|
-
--contract ./src/contracts/api.contract.ts \\
|
|
1362
|
-
--output ./generated/clients \\
|
|
1363
|
-
--languages typescript \\
|
|
1364
|
-
--format npm-package
|
|
1365
|
-
|
|
1366
|
-
# Options
|
|
1367
|
-
# --with-types: Include TypeScript definitions
|
|
1368
|
-
# --with-tests: Generate client test suites
|
|
1369
|
-
# --with-docs: Include client documentation
|
|
1370
|
-
# --framework: Use specific HTTP client framework`
|
|
1371
|
-
})
|
|
1372
|
-
]
|
|
1373
|
-
}),
|
|
1374
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1375
|
-
className: "space-y-3",
|
|
1376
|
-
children: [
|
|
1377
|
-
/* @__PURE__ */ jsx6("h2", {
|
|
1378
|
-
className: "text-2xl font-bold",
|
|
1379
|
-
children: "Generated Client Examples"
|
|
1380
|
-
}),
|
|
1381
|
-
/* @__PURE__ */ jsx6("p", {
|
|
1382
|
-
className: "text-muted-foreground text-sm",
|
|
1383
|
-
children: "Each generated client is fully type-safe and idiomatic."
|
|
1384
|
-
}),
|
|
1385
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1386
|
-
className: "space-y-4",
|
|
1387
|
-
children: [
|
|
1388
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1389
|
-
className: "card-subtle p-4",
|
|
1390
|
-
children: [
|
|
1391
|
-
/* @__PURE__ */ jsx6("h4", {
|
|
1392
|
-
className: "text-lg font-semibold",
|
|
1393
|
-
children: "TypeScript Client"
|
|
1394
|
-
}),
|
|
1395
|
-
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1396
|
-
language: "typescript",
|
|
1397
|
-
filename: "generated/clients/typescript/index.ts",
|
|
1398
|
-
code: `import { MyAPIClient } from './client';
|
|
1399
|
-
|
|
1400
|
-
const client = new MyAPIClient({
|
|
1401
|
-
baseUrl: 'https://api.example.com',
|
|
1402
|
-
apiKey: process.env.API_KEY,
|
|
1403
|
-
});
|
|
1404
|
-
|
|
1405
|
-
// Type-safe method calls
|
|
1406
|
-
const users = await client.getUsers({
|
|
1407
|
-
page: 1,
|
|
1408
|
-
limit: 10,
|
|
1409
|
-
});
|
|
1410
|
-
|
|
1411
|
-
const newUser = await client.createUser({
|
|
1412
|
-
email: 'user@example.com',
|
|
1413
|
-
name: 'John Doe',
|
|
1414
|
-
});
|
|
1415
|
-
|
|
1416
|
-
// Full type inference
|
|
1417
|
-
// users: GetUsersResponse
|
|
1418
|
-
// newUser: CreateUserResponse`
|
|
1419
|
-
})
|
|
1420
|
-
]
|
|
1421
|
-
}),
|
|
1422
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1423
|
-
className: "card-subtle p-4",
|
|
1424
|
-
children: [
|
|
1425
|
-
/* @__PURE__ */ jsx6("h4", {
|
|
1426
|
-
className: "text-lg font-semibold",
|
|
1427
|
-
children: "Python Client"
|
|
1428
|
-
}),
|
|
1429
|
-
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1430
|
-
language: "python",
|
|
1431
|
-
filename: "generated/clients/python/index.py",
|
|
1432
|
-
code: `from myapi_client import MyAPIClient
|
|
1433
|
-
|
|
1434
|
-
client = MyAPIClient(
|
|
1435
|
-
base_url='https://api.example.com',
|
|
1436
|
-
api_key=os.getenv('API_KEY')
|
|
1437
|
-
)
|
|
1438
|
-
|
|
1439
|
-
# Type-safe method calls
|
|
1440
|
-
users = await client.get_users(
|
|
1441
|
-
page=1,
|
|
1442
|
-
limit=10
|
|
1443
|
-
)
|
|
1444
|
-
|
|
1445
|
-
new_user = await client.create_user(
|
|
1446
|
-
email='user@example.com',
|
|
1447
|
-
name='John Doe'
|
|
1448
|
-
)
|
|
1449
|
-
|
|
1450
|
-
# Full type hints
|
|
1451
|
-
# users: GetUsersResponse
|
|
1452
|
-
# new_user: CreateUserResponse`
|
|
1453
|
-
})
|
|
1454
|
-
]
|
|
1455
|
-
}),
|
|
1456
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1457
|
-
className: "card-subtle p-4",
|
|
1458
|
-
children: [
|
|
1459
|
-
/* @__PURE__ */ jsx6("h4", {
|
|
1460
|
-
className: "text-lg font-semibold",
|
|
1461
|
-
children: "Go Client"
|
|
1462
|
-
}),
|
|
1463
|
-
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1464
|
-
language: "go",
|
|
1465
|
-
filename: "generated/clients/go/client.go",
|
|
1466
|
-
code: `package main
|
|
1467
|
-
|
|
1468
|
-
import (
|
|
1469
|
-
"context"
|
|
1470
|
-
"myapi_client"
|
|
1471
|
-
)
|
|
1472
|
-
|
|
1473
|
-
func main() {
|
|
1474
|
-
client := myapi_client.NewMyAPIClient(
|
|
1475
|
-
myapi_client.WithBaseURL("https://api.example.com"),
|
|
1476
|
-
myapi_client.WithAPIKey(os.Getenv("API_KEY")),
|
|
1477
|
-
)
|
|
1478
|
-
|
|
1479
|
-
// Type-safe method calls
|
|
1480
|
-
users, err := client.GetUsers(&myapi_client.GetUsersParams{
|
|
1481
|
-
Page: 1,
|
|
1482
|
-
Limit: 10,
|
|
1483
|
-
})
|
|
1484
|
-
|
|
1485
|
-
newUser, err := client.CreateUser(&myapi_client.CreateUserParams{
|
|
1486
|
-
Email: "user@example.com",
|
|
1487
|
-
Name: "John Doe",
|
|
1488
|
-
})
|
|
1489
|
-
|
|
1490
|
-
// Full type checking at compile time
|
|
1491
|
-
// users: *GetUsersResponse
|
|
1492
|
-
// newUser: *CreateUserResponse
|
|
1493
|
-
}`
|
|
1494
|
-
})
|
|
1495
|
-
]
|
|
1496
|
-
})
|
|
1497
|
-
]
|
|
1498
|
-
})
|
|
1499
|
-
]
|
|
1500
|
-
}),
|
|
1501
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1502
|
-
className: "space-y-3",
|
|
1503
|
-
children: [
|
|
1504
|
-
/* @__PURE__ */ jsx6("h2", {
|
|
1505
|
-
className: "text-2xl font-bold",
|
|
1506
|
-
children: "Advanced Features"
|
|
1507
|
-
}),
|
|
1508
|
-
/* @__PURE__ */ jsx6("p", {
|
|
1509
|
-
className: "text-muted-foreground text-sm",
|
|
1510
|
-
children: "Generated clients include enterprise-grade features out of the box."
|
|
1511
|
-
}),
|
|
1512
|
-
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1513
|
-
language: "typescript",
|
|
1514
|
-
filename: "client-features.ts",
|
|
1515
|
-
code: `// Advanced client features
|
|
1516
|
-
const client = new MyAPIClient({
|
|
1517
|
-
baseUrl: 'https://api.example.com',
|
|
1518
|
-
apiKey: 'your-api-key',
|
|
1519
|
-
|
|
1520
|
-
// Retry configuration
|
|
1521
|
-
retryConfig: {
|
|
1522
|
-
maxRetries: 3,
|
|
1523
|
-
backoffMultiplier: 2,
|
|
1524
|
-
maxDelay: 30000,
|
|
1525
|
-
},
|
|
1526
|
-
|
|
1527
|
-
// Request/Response interceptors
|
|
1528
|
-
interceptors: {
|
|
1529
|
-
request: [(config) => {
|
|
1530
|
-
// Add authentication headers
|
|
1531
|
-
config.headers.Authorization = \`Bearer \${await getAuthToken()}\`;
|
|
1532
|
-
return config;
|
|
1533
|
-
}],
|
|
1534
|
-
response: [(response) => {
|
|
1535
|
-
// Log API calls
|
|
1536
|
-
console.log(\`API Call: \${response.config.method} \${response.config.url}\`);
|
|
1537
|
-
return response;
|
|
1538
|
-
}],
|
|
1539
|
-
},
|
|
1540
|
-
|
|
1541
|
-
// Error handling
|
|
1542
|
-
errorHandler: (error) => {
|
|
1543
|
-
if (error.status === 401) {
|
|
1544
|
-
// Refresh token and retry
|
|
1545
|
-
return refreshTokenAndRetry(error.originalRequest);
|
|
1546
|
-
}
|
|
1547
|
-
throw error;
|
|
1548
|
-
},
|
|
1549
|
-
});
|
|
1550
|
-
|
|
1551
|
-
// Automatic request deduplication
|
|
1552
|
-
const user1 = client.getUser({ id: '123' });
|
|
1553
|
-
const user2 = client.getUser({ id: '123' }); // Uses cached result
|
|
1554
|
-
|
|
1555
|
-
// Request cancellation
|
|
1556
|
-
const controller = new AbortController();
|
|
1557
|
-
const promise = client.getUsers({ page: 1, signal: controller.signal });
|
|
1558
|
-
controller.abort(); // Cancels the request`
|
|
1555
|
+
filename: "generate-from-feature",
|
|
1556
|
+
code: `contractspec generate \\
|
|
1557
|
+
--input ./src/contracts/user-management.feature.ts \\
|
|
1558
|
+
--output ./generated/user-management`
|
|
1559
1559
|
})
|
|
1560
1560
|
]
|
|
1561
1561
|
})
|
|
@@ -1565,19 +1565,19 @@ controller.abort(); // Cancels the request`
|
|
|
1565
1565
|
className: "flex items-center gap-4 pt-4",
|
|
1566
1566
|
children: [
|
|
1567
1567
|
/* @__PURE__ */ jsxs6(Link6, {
|
|
1568
|
-
href: "/docs/guides/
|
|
1568
|
+
href: "/docs/guides/spec-validation-and-typing",
|
|
1569
1569
|
className: "btn-primary",
|
|
1570
1570
|
children: [
|
|
1571
|
-
"
|
|
1571
|
+
"Type Safety Guide ",
|
|
1572
1572
|
/* @__PURE__ */ jsx6(ChevronRight6, {
|
|
1573
1573
|
size: 16
|
|
1574
1574
|
})
|
|
1575
1575
|
]
|
|
1576
1576
|
}),
|
|
1577
1577
|
/* @__PURE__ */ jsx6(Link6, {
|
|
1578
|
-
href: "/docs/intent/
|
|
1578
|
+
href: "/docs/intent/deterministic-codegen",
|
|
1579
1579
|
className: "btn-ghost",
|
|
1580
|
-
children: "
|
|
1580
|
+
children: "Deterministic Codegen"
|
|
1581
1581
|
})
|
|
1582
1582
|
]
|
|
1583
1583
|
})
|