pms-analysis-reports-mcp-server
Version:
PMS analysis reports server handling maintenance reports, equipment analysis, compliance tracking, and performance metrics with ERP access for data extraction
66 lines (65 loc) • 2.31 kB
TypeScript
/**
* Initialize the company database connection for IMO fetching
*/
export declare function initializeCompanyDatabase(): Promise<void>;
/**
* Fetch IMO numbers for a specific company from the database
* @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 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[];
/**
* Clear the cached company IMO numbers
*/
export declare function clearCompanyImoNumbers(): void;
/**
* Check if an IMO number is valid for the current company
* @param imoNumber - IMO number to validate (string or number)
* @returns true if valid, 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 to check
* @returns true if filtering should be bypassed, false otherwise
*/
export declare function shouldBypassImoFiltering(companyName: string): boolean;
/**
* Validate IMO number format and company authorization
* @param imoNumber - IMO number to validate
* @param companyName - Company name for context
* @returns Validation result with error message if invalid
*/
export declare function validateImoNumber(imoNumber: string | number, companyName?: string): {
isValid: boolean;
errorMessage?: string;
};
/**
* Get company IMO numbers with error handling
* @returns Array of IMO numbers or empty array if error
*/
export declare function getCompanyImoNumbersSafe(): string[];
/**
* Close the company database connection
*/
export declare function closeCompanyDatabase(): Promise<void>;
/**
* Get statistics about the current IMO filtering state
* @returns Object containing filtering statistics
*/
export declare function getImoFilteringStats(): {
companyName: string | undefined;
totalImoNumbers: number;
isFilteringEnabled: boolean;
isAdminCompany: boolean;
};