/** * Input validation utilities to prevent injection and traversal attacks * on external service inputs (Slack, S3, Google Sheets). */ /** * Result of a validation check */ export interface ValidationResult { valid: boolean; error?: string; } /** * Validates a Slack channel name format. * * Valid channel names: * - May optionally start with '#' * - Must start with a lowercase letter or number (after optional '#') * - May contain lowercase letters, numbers, hyphens, and underscores * - Must be between 1 and 80 characters (excluding optional '#' prefix) * * @param channel - The channel name to validate * @returns ValidationResult indicating whether the channel name is valid */ export declare function validateSlackChannel(channel: string): ValidationResult; /** * Validates an S3 key to prevent directory traversal and other attacks. * * Invalid keys: * - Contain '..' (directory traversal) * - Start with '/' (absolute paths) * - Contain null bytes * - Are empty * - Exceed 1024 characters (S3 key limit) * * @param key - The S3 key to validate * @returns ValidationResult indicating whether the key is valid */ export declare function validateS3Key(key: string): ValidationResult; /** * Validates a Google Sheets A1 notation range. * * Valid formats: * - Simple cell: 'A1', 'B2', 'AA100' * - Cell range: 'A1:B10', 'A1:Z999' * - With sheet name: 'Sheet1!A1', 'Sheet1!A1:B10' * - With quoted sheet name: "'My Sheet'!A1:B10" * * @param range - The A1 notation string to validate * @returns ValidationResult indicating whether the range is valid */ export declare function validateGoogleSheetsRange(range: string): ValidationResult;