casefile-repository-mcp-server
Version:
Vessel casefile management system with MCP integration for maritime operations
47 lines (46 loc) • 1.7 kB
TypeScript
/**
* Initialize company database connection
*/
export declare function initializeCompanyDatabase(): Promise<void>;
/**
* Fetch company IMO numbers from MongoDB
* @param companyName - Name of the company to fetch IMO numbers for
* @returns Array of IMO numbers as strings
*/
export declare function fetchCompanyImoNumbers(companyName: string): Promise<string[]>;
/**
* Set cached company IMO numbers
* @param imos - Array of IMO numbers to cache
*/
export declare function setCompanyImoNumbers(imos: string[]): void;
/**
* Get cached company IMO numbers
* @returns Array of cached IMO numbers
*/
export declare function getCompanyImoNumbers(): string[];
/**
* Check if an IMO number is valid for the current company
* @param imoNumber - IMO number to validate (string or number)
* @returns True if IMO is valid for the company, false otherwise
*/
export declare function isValidImoForCompany(imoNumber: string | number): boolean;
/**
* Check if IMO filtering should be bypassed for admin companies
* @param companyName - Name of the company
* @returns True if filtering should be bypassed, false otherwise
*/
export declare function shouldBypassImoFiltering(companyName: string): boolean;
/**
* Validate IMO number with detailed error messaging
* @param imoNumber - IMO number to validate
* @param companyName - Name of the company (for error messages)
* @returns Validation result with error message if invalid
*/
export declare function validateImoNumber(imoNumber: string | number, companyName?: string): {
isValid: boolean;
errorMessage?: string;
};
/**
* Close company database connection
*/
export declare function closeCompanyDatabase(): Promise<void>;