UNPKG

voyage-and-consumption-mcp-server

Version:

Voyage and consumption management server handling vessel voyages, fuel consumption, performance monitoring, and operational data with ERP access for data extraction

57 lines (56 loc) 2.17 kB
export interface ValidationResult { isValid: boolean; errorMessage?: string; } /** * Fetch company IMO numbers from the common_group_details collection * @param companyName - Name of the company to fetch IMO numbers for * @param companyDbUri - MongoDB connection URI for company database * @param companyDbName - MongoDB database name for company data * @returns Array of IMO numbers as strings */ export declare function fetchCompanyImoNumbers(companyName: string, companyDbUri: string, companyDbName: string): Promise<string[]>; /** * Set the cached company IMO numbers * @param imoNumbers - Array of IMO numbers to cache */ export declare function setCompanyImoNumbers(imoNumbers: string[]): void; /** * Get the cached company IMO numbers * @returns Array of cached IMO numbers */ export declare function getCompanyImoNumbers(): string[]; /** * Check if a specific IMO number is valid for the company * @param imoNumber - IMO number to validate (string or number) * @returns Boolean indicating if IMO is authorized */ export declare function isValidImoForCompany(imoNumber: string | number): boolean; /** * Validate IMO number and provide detailed error message * @param imoNumber - IMO number to validate * @param companyName - Company name for error message * @returns Validation result with error message if invalid */ export declare function validateImoNumber(imoNumber: string | number, companyName: string): ValidationResult; /** * Check if IMO filtering should be bypassed for admin companies * @param companyName - Company name to check * @returns Boolean indicating if filtering should be bypassed */ export declare function shouldBypassImoFiltering(companyName: string): boolean; /** * Initialize company IMO numbers from configuration * Should be called during server startup */ export declare function initializeCompanyImoNumbers(): Promise<void>; /** * Get current IMO filtering status for monitoring * @returns Object with filtering status information */ export declare function getImoFilteringStatus(): { companyName: string; isAdminCompany: boolean; imoCount: number; filteringEnabled: boolean; };