/** * Copyright 2023 Kapeta Inc. * SPDX-License-Identifier: BUSL-1.1 */ import { StormEventFileDone, StormEventPage, StormImage } from './events'; import { Response } from 'express'; import { ConversationItem } from './stream'; import { ImagePrompt } from './PageGenerator'; export declare const SystemIdHeader = "System-Id"; export declare function normalizePath(path: string): string; export declare function writePageToDisk(systemId: string, event: StormEventPage): Promise<{ path: string; }>; export declare function writeAssetToDisk(systemId: string, event: StormEventFileDone): Promise<{ path: string; }>; export declare function writeImageToDisk(systemId: string, event: StormImage, prompt: ImagePrompt): Promise<{ path: string; }>; export declare function hasPageOnDisk(systemId: string, path: string, method: string): boolean; export declare function getSystemBaseDir(systemId: string): string; export declare function getSystemBaseImplDir(systemId: string): string; export declare function resolveReadPath(systemId: string, path: string, method: string): string | null; export declare function readPageFromDiskAsString(systemId: string, path: string, method: string): string | null; export declare function readPageFromDisk(systemId: string, path: string, method: string, res: Response): void; export interface Conversation { messages: ConversationItem[]; variantId: string; type: 'page'; filename: string; } export declare function readConversationFromFile(filename: string): Conversation[]; export declare function writeConversationToFile(filename: string, conversations: Conversation[]): void;