import Typesense from "typesense"; import { GetCasefileIndexArguments, GetCasefilePagesArguments, GetLatestPlanArguments, CreateCasefileArguments, SmartCasefileSearchArguments, DeleteCasefileArguments, ToolResponse } from "../../types/generated.js"; import { ImageContent, TextContent } from "@modelcontextprotocol/sdk/types.js"; export declare class CasefileToolsHelperFunctions { static getArtifact(toolName: string, link: string): Promise; static getListOfArtifacts(toolName: string, linkData: Array<{ title: string; url: string | null; }>): Promise; /** * Convert numeric importance to string category for Typesense */ static convertImportanceForTypesense(importance: number): { importance: string; importance_score: number; }; static isValidLink(link: string): boolean; static generateCasefileWeblink(casefileId: string): Promise; /** * Uploads a file to AWS S3 with automatic content type detection * @param fileContent - The file data as a Buffer, Uint8Array, or string * @param destinationPath - The full S3 destination path (e.g., "casefile_docs/casefile_id/filename.pdf") * @returns Promise - The S3 URL of the uploaded file */ static uploadToS3(fileContent: Buffer | Uint8Array | string, destinationPath: string): Promise; static uploadAttachments(attachments: string[], casefileId: string): Promise; static processAttachmentsInUpdate(updateQuery: any, casefileId: string): Promise; static validateAndProcessLinks(updateQuery: any): Promise<{ valid: boolean; errors: string[]; processedQuery: any; }>; static injectDateTimeForAllOperations(updateQuery: any): Promise; static convertCasefileDates(document: any): any; static pushToTypesenseCreateCasefile(casefileData: any): Promise; static pushToTypesenseUpdateCasefile(casefile_id: string, mongo_collection: any): Promise; /** * Simple and reliable Typesense push function */ static simpleTypesensePush(casefileData: any): Promise; static pushToTypesense(res: any, action: 'create' | 'update' | 'upsert' | 'emplace'): Promise; /** * Get or create a shared Typesense client with proper timeout and retry configuration */ static getCustomTypesenseClient(cluster?: string): Typesense.Client | null; /** * Clear Typesense client cache (useful for connection refresh) */ static clearTypesenseClients(): void; /** * Get current number of cached Typesense clients */ static getTypesenseClientCount(): number; static getVesselDetails(query: string): Promise; static getVesselNameFromImo(imo: number): Promise; static generateAlphaNumericId(alphaSize?: number, numericSize?: number): string; static getCasefileArtifacts(functionName: string, results: Array<{ title: string; url: string; }>): Array<{ type: "text"; text: string; title?: string; format?: string; }>; } export declare class CasefileToolHandler { getCasefileIndex(args: GetCasefileIndexArguments): Promise>; getCasefilePages(args: GetCasefilePagesArguments): Promise>; getLatestPlan(args: GetLatestPlanArguments): Promise>; smartCasefileSearch(args: SmartCasefileSearchArguments): Promise>; createCasefile(args: CreateCasefileArguments): Promise>; deleteCasefile(args: DeleteCasefileArguments): Promise; updateCasefileBasicFields(args: { casefile_id: string; current_status?: string; importance?: number; summary?: string; status?: string; }): Promise>; addCasefilePage(args: { casefile_id: string; summary: string; content: string; flag: string; link?: string[]; attachments?: string[]; }): Promise>; addCasefilePlan(args: { casefile_id: string; flag: string; summary: string; plan: string; color?: string; }): Promise>; }