import type { VoyantGraphLinkDeclaration, VoyantGraphSubscriber } from "@voyant-travel/core/project"; import { type ProjectConventionDiscovery, type ProjectConventionFileContribution } from "./project-conventions.js"; export { generateProjectLinksSource, generateProjectSubscribersSource, generateSelectedLinksSource, } from "./project-subscriber-link-generated-source.js"; export declare const PROJECT_SUBSCRIBERS_GENERATED_PATH = "runtime/project-subscribers.generated.ts"; export declare const PROJECT_LINKS_GENERATED_PATH = "runtime/project-links.generated.ts"; export declare const PROJECT_SUBSCRIBER_LINK_DIAGNOSTIC_CODES: { readonly PROJECT_CONVENTION_ID_COLLISION: "Convention files must have unique path-derived identifiers."; readonly PROJECT_CONVENTION_IMPORT_ESCAPE: "Convention file imports cannot escape the project root."; readonly PROJECT_CONVENTION_MISSING_DEFAULT_EXPORT: "Convention files must have one default export."; readonly PROJECT_CONVENTION_MULTIPLE_DEFAULT_EXPORTS: "Convention files cannot have more than one default export."; readonly PROJECT_CONVENTION_UNSUPPORTED_EXPORT: "Convention files cannot have named runtime exports."; readonly PROJECT_LINK_INVALID_DEFINITION: "Link files must default-export a definition created by the imported defineLink helper."; readonly PROJECT_SUBSCRIBER_ID_COLLISION: "Subscriber descriptor ids must be unique."; readonly PROJECT_SUBSCRIBER_INVALID_DESCRIPTOR: "Subscriber files must default-export a SubscriberRuntimeDescriptor object with literal id and eventType fields."; }; export type ProjectSubscriberLinkDiagnosticCode = keyof typeof PROJECT_SUBSCRIBER_LINK_DIAGNOSTIC_CODES; export interface ProjectSubscriberLinkDiagnostic { code: ProjectSubscriberLinkDiagnosticCode; severity: "error"; message: string; sourcePaths: readonly string[]; exportName?: string; subscriberId?: string; } export type ProjectSubscriberLinkConventionDiagnostic = ProjectSubscriberLinkDiagnostic; export interface ProjectSubscriberConvention extends ProjectConventionFileContribution { kind: "subscriber"; subscriberId: string; eventType: string; } export interface ProjectLinkConvention extends ProjectConventionFileContribution { kind: "link"; } export interface ProjectSubscriberLinkConventionAnalysis { subscribers: readonly ProjectSubscriberConvention[]; links: readonly ProjectLinkConvention[]; diagnostics: readonly ProjectSubscriberLinkDiagnostic[]; } export interface ProjectSubscriberLinkGeneratedFile { path: typeof PROJECT_SUBSCRIBERS_GENERATED_PATH | typeof PROJECT_LINKS_GENERATED_PATH; contents: string; } export interface ProjectSubscriberLinkConventionCompilation { subscribers: readonly ProjectSubscriberConvention[]; links: readonly ProjectLinkConvention[]; graphSubscribers: readonly VoyantGraphSubscriber[]; graphLinks: readonly VoyantGraphLinkDeclaration[]; generatedFiles: readonly [ProjectSubscriberLinkGeneratedFile, ProjectSubscriberLinkGeneratedFile]; } export interface ProjectSubscriberLinkConventionsOptions { projectRoot: string; /** Reuse an authoritative discovery snapshot instead of scanning the project again. */ discovery?: ProjectConventionDiscovery; } export declare class ProjectSubscriberLinkConventionError extends Error { readonly diagnostics: readonly ProjectSubscriberLinkDiagnostic[]; constructor(diagnostics: readonly ProjectSubscriberLinkDiagnostic[]); } export declare function analyzeProjectSubscriberLinkConventions(options: ProjectSubscriberLinkConventionsOptions): Promise; export declare function compileProjectSubscriberLinkConventions(options: ProjectSubscriberLinkConventionsOptions): Promise;