import type { DefineVoyantGraphProjectSelection, VoyantGraphProjectDeploymentMigration, VoyantProductBomReference } from "@voyant-travel/core/project"; import { VOYANT_MIGRATION_JOURNAL_LINEAGE } from "@voyant-travel/framework-migrations"; export { VOYANT_MIGRATION_JOURNAL_LINEAGE } from "@voyant-travel/framework-migrations"; import { type ResolvedVoyantDeploymentGraph } from "./deployment-graph.js"; import { STANDARD_NODE_STARTER } from "./standard-node-starter.js"; export declare const VOYANT_SELF_HOST_EXPORT_BUNDLE_SCHEMA_VERSION: "voyant.self-host-export-bundle.v2"; export declare const VOYANT_POSTGRES_EXPORT_SCHEMA_VERSION: "voyant.postgres-export.v1"; export declare const VOYANT_OBJECT_STORAGE_EXPORT_SCHEMA_VERSION: "voyant.object-storage-export.v1"; export declare const VOYANT_SELF_HOST_PROJECTION_SCHEMA_VERSION: "voyant.self-host-projection.v2"; export declare const VOYANT_SELF_HOST_MIGRATION_POLICY: { readonly identity: readonly ["source", "tag"]; readonly matchingEntry: "skip"; readonly contentHashMismatch: "reject-drift"; readonly pendingEntry: "apply"; }; export type VoyantPostgresDumpFormat = "pg-custom" | "pg-directory" | "sql"; export interface VoyantExportArtifactMetadata { path: string; byteLength: number; contentHash: string; } export interface VoyantPostgresExportMetadata { schemaVersion: typeof VOYANT_POSTGRES_EXPORT_SCHEMA_VERSION; engine: "postgresql"; format: VoyantPostgresDumpFormat; dump: VoyantExportArtifactMetadata; migrationJournal: typeof VOYANT_MIGRATION_JOURNAL_LINEAGE; } export interface VoyantObjectStorageExportEntry extends VoyantExportArtifactMetadata { logicalStore: string; key: string; contentType?: string; } export interface VoyantObjectStorageExportManifest { schemaVersion: typeof VOYANT_OBJECT_STORAGE_EXPORT_SCHEMA_VERSION; objects: readonly VoyantObjectStorageExportEntry[]; } /** Canonical, source-independent handoff from Voyant Cloud to self-host tooling. */ export interface VoyantSelfHostExportBundle { schemaVersion: typeof VOYANT_SELF_HOST_EXPORT_BUNDLE_SCHEMA_VERSION; frameworkVersion: string; graphHash: string; productBom: VoyantProductBomReference; resolvedGraph: ResolvedVoyantDeploymentGraph; database: VoyantPostgresExportMetadata; objectStorage: VoyantObjectStorageExportManifest; } export declare const VOYANT_SELF_HOST_EXPORT_BUNDLE_JSON_SCHEMA: { readonly $schema: "https://json-schema.org/draft/2020-12/schema"; readonly $id: "https://schemas.voyant.travel/self-host-export-bundle.v2.json"; readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["schemaVersion", "frameworkVersion", "graphHash", "productBom", "resolvedGraph", "database", "objectStorage"]; readonly properties: { readonly schemaVersion: { readonly const: "voyant.self-host-export-bundle.v2"; }; readonly frameworkVersion: { readonly type: "string"; readonly minLength: 1; }; readonly graphHash: { readonly type: "string"; readonly pattern: "^sha256:[a-f0-9]{64}$"; }; readonly productBom: { readonly type: "object"; }; readonly resolvedGraph: { readonly type: "object"; readonly required: readonly ["schemaVersion", "contentHash", "deployment", "diagnostics"]; readonly properties: { readonly schemaVersion: { readonly const: "voyant.resolved-graph.v1"; }; readonly contentHash: { readonly type: "string"; readonly pattern: "^sha256:[a-f0-9]{64}$"; }; }; }; readonly database: { readonly type: "object"; readonly required: readonly ["schemaVersion", "engine", "format", "dump", "migrationJournal"]; readonly properties: { readonly schemaVersion: { readonly const: "voyant.postgres-export.v1"; }; readonly engine: { readonly const: "postgresql"; }; readonly format: { readonly enum: readonly ["pg-custom", "pg-directory", "sql"]; }; }; }; readonly objectStorage: { readonly type: "object"; readonly required: readonly ["schemaVersion", "objects"]; readonly properties: { readonly schemaVersion: { readonly const: "voyant.object-storage-export.v1"; }; readonly objects: { readonly type: "array"; }; }; }; }; }; export declare const VOYANT_SELF_HOST_PROJECTION_JSON_SCHEMA: { readonly $schema: "https://json-schema.org/draft/2020-12/schema"; readonly $id: "https://schemas.voyant.travel/self-host-projection.v2.json"; readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["schemaVersion", "ready", "frameworkVersion", "sourceGraphHash", "projectedGraphHash", "starter", "project", "graph", "providerRemaps", "provisioning", "packageInstalls", "migrationJournal", "migrationPolicy", "diagnostics"]; readonly properties: { readonly schemaVersion: { readonly const: "voyant.self-host-projection.v2"; }; readonly ready: { readonly type: "boolean"; }; readonly frameworkVersion: { readonly type: "string"; readonly minLength: 1; }; readonly sourceGraphHash: { readonly type: "string"; readonly pattern: "^sha256:[a-f0-9]{64}$"; }; readonly projectedGraphHash: { readonly type: "string"; readonly pattern: "^sha256:[a-f0-9]{64}$"; }; readonly starter: { readonly type: "object"; }; readonly project: { readonly type: "object"; }; readonly graph: { readonly type: "object"; }; readonly providerRemaps: { readonly type: "array"; }; readonly provisioning: { readonly type: "object"; }; readonly packageInstalls: { readonly type: "array"; }; readonly migrationJournal: { readonly type: "object"; }; readonly migrationPolicy: { readonly type: "object"; }; readonly diagnostics: { readonly type: "array"; }; }; }; export type VoyantSelfHostExportValidationIssueCode = "VOYANT_EXPORT_INVALID_BUNDLE" | "VOYANT_EXPORT_INVALID_SCHEMA_VERSION" | "VOYANT_EXPORT_INVALID_FRAMEWORK_VERSION" | "VOYANT_EXPORT_INVALID_GRAPH" | "VOYANT_EXPORT_GRAPH_HASH_MISMATCH" | "VOYANT_EXPORT_GRAPH_NOT_CANONICAL" | "VOYANT_EXPORT_GRAPH_NOT_ADMITTED" | "VOYANT_EXPORT_BOM_MISMATCH" | "VOYANT_EXPORT_INVALID_PACKAGE_PROVENANCE" | "VOYANT_EXPORT_SECRET_IN_PROJECT_CONFIG" | "VOYANT_EXPORT_INVALID_DATABASE_DUMP" | "VOYANT_EXPORT_MIGRATION_LINEAGE_MISMATCH" | "VOYANT_EXPORT_INVALID_STORAGE_MANIFEST"; export interface VoyantSelfHostExportValidationIssue { code: VoyantSelfHostExportValidationIssueCode; path: string; message: string; } export type VoyantSelfHostExportValidationResult = { ok: true; value: VoyantSelfHostExportBundle; issues: readonly []; } | { ok: false; issues: readonly VoyantSelfHostExportValidationIssue[]; }; export declare class VoyantSelfHostExportValidationError extends Error { readonly issues: readonly VoyantSelfHostExportValidationIssue[]; constructor(issues: readonly VoyantSelfHostExportValidationIssue[]); } export type VoyantSelfHostProjectionDiagnosticCode = "VOYANT_SELF_HOST_PROVIDER_UNSUPPORTED" | "VOYANT_SELF_HOST_PACKAGE_INCOMPATIBLE" | "VOYANT_SELF_HOST_PACKAGE_SOURCE_UNAVAILABLE"; export interface VoyantSelfHostProjectionDiagnostic { code: VoyantSelfHostProjectionDiagnosticCode; severity: "error"; path: string; message: string; hint: string; } export interface VoyantSelfHostProviderRemap { role: string; from: string; to: string; reason: "self-host-default" | "explicit-override"; } export interface VoyantSelfHostProjectSelection extends DefineVoyantGraphProjectSelection { id: string; packageName: string; version?: string; } export interface VoyantSelfHostProjectProjection { productBom: VoyantProductBomReference; modules: readonly VoyantSelfHostProjectSelection[]; extensions: readonly VoyantSelfHostProjectSelection[]; plugins: readonly VoyantSelfHostProjectSelection[]; deployment: { target: "node"; mode: "self-hosted"; providers: Readonly>; migrations?: readonly VoyantGraphProjectDeploymentMigration[]; }; } export type VoyantSelfHostPackageInstall = { packageName: string; coordinate: string; source: { kind: "registry"; reference: string; integrity: string; }; } | { packageName: string; coordinate: string; source: { kind: "git"; reference: string; integrity?: string; }; }; export type VoyantSelfHostStarterProjection = Omit & { readonly runtimeDependencyCoordinates: Omit<(typeof STANDARD_NODE_STARTER)["runtimeDependencyCoordinates"], "@voyant-travel/framework"> & { readonly "@voyant-travel/framework": string; }; }; export interface VoyantSelfHostProjection { schemaVersion: typeof VOYANT_SELF_HOST_PROJECTION_SCHEMA_VERSION; ready: boolean; frameworkVersion: string; sourceGraphHash: string; projectedGraphHash: string; starter: VoyantSelfHostStarterProjection; project: VoyantSelfHostProjectProjection; graph: ResolvedVoyantDeploymentGraph; providerRemaps: readonly VoyantSelfHostProviderRemap[]; provisioning: { resources: ResolvedVoyantDeploymentGraph["requirements"]["resources"]; database: VoyantPostgresExportMetadata; objectStorage: VoyantObjectStorageExportManifest; }; packageInstalls: readonly VoyantSelfHostPackageInstall[]; migrationJournal: typeof VOYANT_MIGRATION_JOURNAL_LINEAGE; migrationPolicy: typeof VOYANT_SELF_HOST_MIGRATION_POLICY; diagnostics: readonly VoyantSelfHostProjectionDiagnostic[]; } export interface ProjectVoyantSelfHostExportOptions { providerOverrides?: Readonly>; } export declare const VOYANT_SELF_HOST_PROVIDER_DEFAULTS: { readonly adminAuth: { readonly from: "voyant-cloud"; readonly to: "better-auth"; }; readonly customerAuth: { readonly from: "voyant-cloud"; readonly to: "better-auth"; }; readonly email: { readonly from: "voyant-cloud"; readonly to: "smtp"; }; readonly realtime: { readonly from: "voyant-cloud"; readonly to: "local"; }; readonly scheduledJobs: { readonly from: "cloud-scheduler"; readonly to: "node-cron"; }; }; export declare function validateVoyantSelfHostExportBundle(input: unknown): Promise; export declare function projectVoyantSelfHostExport(input: unknown, options?: ProjectVoyantSelfHostExportOptions): Promise;