/** * Validation message constants for DomainLang. * * Centralizes all validation messages to ensure consistency * and facilitate internationalization in the future. * * Messages follow VS Code conventions: * - Clear problem statement * - Brief DDD context explaining why it matters * - Inline example showing the fix * - Clickable documentation link via CodeDescription */ import type { CodeDescription } from 'vscode-languageserver-types'; /** * Diagnostic codes used to identify validation issues. * Code actions match on these codes to provide quick fixes. * * Naming convention: CATEGORY_SPECIFIC_ISSUE */ export declare const IssueCodes: { readonly ImportMissingUri: "import-missing-uri"; readonly ImportRequiresManifest: "import-requires-manifest"; readonly ImportNotInManifest: "import-not-in-manifest"; readonly ImportNotInstalled: "import-not-installed"; readonly ImportConflictingSourcePath: "import-conflicting-source-path"; readonly ImportMissingSourceOrPath: "import-missing-source-or-path"; readonly ImportMissingRef: "import-missing-ref"; readonly ImportAbsolutePath: "import-absolute-path"; readonly ImportEscapesWorkspace: "import-escapes-workspace"; readonly ImportUnresolved: "import-unresolved"; readonly ImportCycleDetected: "import-cycle-detected"; readonly DomainNoVision: "domain-no-vision"; readonly DomainCircularHierarchy: "domain-circular-hierarchy"; readonly BoundedContextNoDescription: "bounded-context-no-description"; readonly BoundedContextNoDomain: "bounded-context-no-domain"; readonly BoundedContextClassificationConflict: "bounded-context-classification-conflict"; readonly BoundedContextTeamConflict: "bounded-context-team-conflict"; readonly AclOnWrongSide: "acl-on-wrong-side"; readonly ConformistOnWrongSide: "conformist-on-wrong-side"; readonly OhsOnWrongSide: "ohs-on-wrong-side"; readonly SupplierOnWrongSide: "supplier-on-wrong-side"; readonly CustomerOnWrongSide: "customer-on-wrong-side"; readonly SupplierOnBidirectional: "supplier-on-bidirectional"; readonly CustomerOnBidirectional: "customer-on-bidirectional"; readonly SelfSymmetricRelationship: "self-symmetric-relationship"; readonly TooManyPatterns: "too-many-patterns"; readonly ContextMapNoContexts: "context-map-no-contexts"; readonly ContextMapNoRelationships: "context-map-no-relationships"; readonly ContextMapDuplicateRelationship: "context-map-duplicate-relationship"; readonly DomainMapNoDomains: "domain-map-no-domains"; readonly UnresolvedReference: "unresolved-reference"; readonly MetadataMissingName: "metadata-missing-name"; readonly DuplicateElement: "duplicate-element"; }; export type IssueCode = typeof IssueCodes[keyof typeof IssueCodes]; /** * Creates a CodeDescription for clickable documentation links in VS Code. * @param docPath - Relative path from docs/ folder * @param anchor - Optional section anchor (without #) */ export declare const buildCodeDescription: (docPath: string, anchor?: string) => CodeDescription; export declare const ValidationMessages: { /** * Warning message when a domain lacks a vision statement. * @param name - The name of the domain */ readonly DOMAIN_NO_VISION: (name: string) => string; /** * Error message when a circular domain hierarchy is detected. * @param cycle - Array of domain names forming the cycle */ readonly DOMAIN_CIRCULAR_HIERARCHY: (cycle: string[]) => string; /** * Warning message when a bounded context lacks a description. * @param name - The name of the bounded context */ readonly BOUNDED_CONTEXT_NO_DESCRIPTION: (name: string) => string; /** * Warning message when a bounded context lacks a domain reference. * @param name - The name of the bounded context */ readonly BOUNDED_CONTEXT_NO_DOMAIN: (name: string) => string; /** * Warning when classification is specified both inline and in a block. * Inline value takes precedence. * @param bcName - The name of the bounded context * @param inlineClassification - The inline classification name (from 'as') * @param blockClassification - The block classification name (from 'classification:') */ readonly BOUNDED_CONTEXT_CLASSIFICATION_CONFLICT: (_bcName: string, inlineClassification?: string, blockClassification?: string) => string; /** * Warning when team is specified both inline and in a block. * Inline value takes precedence. * @param bcName - The name of the bounded context * @param inlineTeam - The inline team name (from 'by') * @param blockTeam - The block team name (from 'team:') */ readonly BOUNDED_CONTEXT_TEAM_CONFLICT: (_bcName: string, inlineTeam?: string, blockTeam?: string) => string; /** * Error message when an element is defined multiple times. * @param fqn - The fully qualified name of the duplicate element */ readonly DUPLICATE_ELEMENT: (fqn: string) => string; /** * Warning when Anti-Corruption Layer is on the wrong side of relationship. * ACL should protect the consuming context (downstream). */ readonly ACL_ON_WRONG_SIDE: (context: string, side: "left" | "right") => string; /** * Warning when Conformist pattern is on the wrong side. * Conformist accepts upstream model without translation. */ readonly CONFORMIST_ON_WRONG_SIDE: (context: string, side: "left" | "right") => string; /** * Warning when Open Host Service is on the wrong side of relationship. * OHS should be on the upstream (providing) side. */ readonly OHS_ON_WRONG_SIDE: (context: string, side: "left" | "right") => string; /** * Error when Supplier is on the wrong side of relationship. * Supplier must always be upstream. */ readonly SUPPLIER_ON_WRONG_SIDE: (context: string, _side: "left" | "right") => string; /** * Error when Customer is on the wrong side of relationship. * Customer must always be downstream. */ readonly CUSTOMER_ON_WRONG_SIDE: (context: string, _side: "left" | "right") => string; /** * Error when Supplier is used on a bidirectional relationship. * Customer/Supplier is inherently directional. */ readonly SUPPLIER_ON_BIDIRECTIONAL: () => string; /** * Error when Customer is used on a bidirectional relationship. * Customer/Supplier is inherently directional. */ readonly CUSTOMER_ON_BIDIRECTIONAL: () => string; /** * Warning when a symmetric relationship references the same context on both sides. */ readonly SELF_SYMMETRIC_RELATIONSHIP: (context: string) => string; /** * Info message when relationship has too many integration patterns. * Suggests possible syntax confusion. */ readonly TOO_MANY_PATTERNS: (count: number, side: "left" | "right") => string; /** * Error when import statement has no URI. */ readonly IMPORT_MISSING_URI: () => string; /** * Error when external dependency requires model.yaml but none exists. * @param specifier - The import specifier (e.g., "core", "domainlang/patterns") */ readonly IMPORT_REQUIRES_MANIFEST: (specifier: string) => string; /** * Error when import specifier not found in manifest dependencies. * @param alias - The dependency alias/specifier */ readonly IMPORT_NOT_IN_MANIFEST: (alias: string) => string; /** * Error when dependency not installed (no lock file entry). * @param alias - The dependency alias */ readonly IMPORT_NOT_INSTALLED: (alias: string) => string; /** * Error when dependency has conflicting source and path definitions. * @param alias - The dependency alias */ readonly IMPORT_CONFLICTING_SOURCE_PATH: (alias: string) => string; /** * Error when dependency is missing both source and path. * @param alias - The dependency alias */ readonly IMPORT_MISSING_SOURCE_OR_PATH: (alias: string) => string; /** * Error when git dependency is missing ref (tag, branch, or commit). * @param alias - The dependency alias */ readonly IMPORT_MISSING_REF: (alias: string) => string; /** * Error when local path uses absolute path. * @param alias - The dependency alias * @param absolutePath - The absolute path that was specified */ readonly IMPORT_ABSOLUTE_PATH: (alias: string, absolutePath: string) => string; /** * Error when local path escapes workspace boundary. * @param alias - The dependency alias */ readonly IMPORT_ESCAPES_WORKSPACE: (alias: string) => string; /** * Error when import path cannot be resolved to a file. * @param uri - The import URI that couldn't be resolved */ readonly IMPORT_UNRESOLVED: (uri: string) => string; /** * Error when an import creates a cycle in the dependency graph. * @param cycleDisplay - Human-readable cycle path (e.g., "a.dlang → b.dlang → a.dlang") */ readonly IMPORT_CYCLE_DETECTED: (cycleDisplay: string) => string; /** * Warning when context map contains no bounded contexts. * @param name - The context map name */ readonly CONTEXT_MAP_NO_CONTEXTS: (name: string) => string; /** * Info when context map has multiple contexts but no relationships. * @param name - The context map name * @param count - Number of contexts */ readonly CONTEXT_MAP_NO_RELATIONSHIPS: (name: string, count: number) => string; /** * Warning when a context map contains duplicate relationships. * @param leftContext - Name of the left context * @param rightContext - Name of the right context */ readonly CONTEXT_MAP_DUPLICATE_RELATIONSHIP: (leftContext: string, rightContext: string) => string; /** * Warning when domain map contains no domains. * @param name - The domain map name */ readonly DOMAIN_MAP_NO_DOMAINS: (name: string) => string; /** * Error when a reference cannot be resolved (for MultiReferences). * @param type - The type being referenced (e.g., 'BoundedContext') * @param name - The unresolved name */ readonly UNRESOLVED_REFERENCE: (type: string, name: string) => string; /** * Error when metadata is missing a name. */ readonly METADATA_MISSING_NAME: () => string; };