UNPKG

nehonix-uri-processor

Version:

A powerful URI processor for encoding, decoding, and analyzing URI data securely.

67 lines 2.45 kB
import type { NehonixShieldConfig, NehonixShieldContextT } from "../../types/frameworks.type"; import { MaliciousPatternResult, DetectedPattern } from "../../../services/MaliciousPatterns.service"; /** * Hook for accessing threat information * @returns Object with threat detection information and methods */ export declare const useThreats: () => { activeThreats: DetectedPattern[]; threatSeverity: "low" | "medium" | "high" | "none"; threatsByType: Record<string, DetectedPattern[]>; recentThreats: DetectedPattern[]; totalThreatsDetected: number; totalThreatsBlocked: number; scanNow: () => Promise<void>; clearThreatHistory: () => void; }; /** * Interface for shield monitoring data */ interface ShieldMonitoringData { isActive: boolean; lastScanTime: Date | null; nextScanTime: Date | null; scanCount: number; avgScanTime: number; isBackgroundScanningEnabled: boolean; isInterceptionEnabled: boolean; isDeepScanEnabled: boolean; } /** * Hook for monitoring the shield's status * @returns Shield monitoring information */ export declare const useShieldMonitoring: () => ShieldMonitoringData; /** * Hook for working with shield configuration * @returns Configuration objects and update methods */ export declare const useShieldConfig: () => { config: NehonixShieldConfig; updateConfig: (config: Partial<NehonixShieldConfig>) => void; toggleBackgroundScanning: () => void; toggleRequestInterception: () => void; toggleDeepScan: () => void; setScanInterval: (intervalMs: number) => void; pauseScanning: () => void; resumeScanning: () => void; addTrustedDomain: (domain: string) => void; removeTrustedDomain: (domain: string) => void; addBlacklistedPattern: (pattern: string) => void; removeBlacklistedPattern: (pattern: string) => void; }; /** * Hook for creating a protected fetch that uses Nehonix Shield * @returns A secure fetch function that analyzes URLs before fetching */ export declare const useSecureFetch: () => (url: string | URL | Request, options?: RequestInit, securityOptions?: { bypassScan?: boolean; customScanOptions?: Record<string, any>; onBlock?: (result: MaliciousPatternResult) => void; }) => Promise<Response>; /** * Hook to use the Nehonix Shield Context */ export declare const useNehonixShield: () => NehonixShieldContextT; export {}; //# sourceMappingURL=REACT.ShieldHooks.d.ts.map