import type { ApiError } from '../../models/interfaces';
import type { OxyServicesBase } from '../OxyServices.base';
export declare function OxyServicesUtilityMixin<T extends typeof OxyServicesBase>(Base: T): {
    new (...args: any[]): {
        /**
         * Fetch link metadata
         */
        fetchLinkMetadata(url: string): Promise<{
            url: string;
            title: string;
            description: string;
            image?: string;
        }>;
        /**
         * Simple Express.js authentication middleware
         *
         * Built-in authentication middleware that validates JWT tokens and adds user data to requests.
         *
         * @example
         * ```typescript
         * // Basic usage - just add it to your routes
         * app.use('/api/protected', oxyServices.auth());
         *
         * // With debug logging
         * app.use('/api/protected', oxyServices.auth({ debug: true }));
         *
         * // With custom error handling
         * app.use('/api/protected', oxyServices.auth({
         *   onError: (error) => console.error('Auth failed:', error)
         * }));
         *
         * // Load full user data
         * app.use('/api/protected', oxyServices.auth({ loadUser: true }));
         * ```
         *
         * @param options Optional configuration
         * @param options.debug Enable debug logging (default: false)
         * @param options.onError Custom error handler
         * @param options.loadUser Load full user data (default: false for performance)
         * @param options.session Use session-based validation (default: false)
         * @returns Express middleware function
         */
        auth(options?: {
            debug?: boolean;
            onError?: (error: ApiError) => any;
            loadUser?: boolean;
            session?: boolean;
        }): (req: any, res: any, next: any) => any;
        httpService: import("../HttpService").HttpService;
        cloudURL: string;
        config: import("../OxyServices.base").OxyConfig;
        makeRequest<T_1>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T_1>;
        getBaseURL(): string;
        getClient(): import("../HttpService").HttpService;
        getMetrics(): {
            totalRequests: number;
            successfulRequests: number;
            failedRequests: number;
            cacheHits: number;
            cacheMisses: number;
            averageResponseTime: number;
        };
        clearCache(): void;
        clearCacheEntry(key: string): void;
        getCacheStats(): {
            size: number;
            hits: number;
            misses: number;
            hitRate: number;
        };
        getCloudURL(): string;
        setTokens(accessToken: string, refreshToken?: string): void;
        clearTokens(): void;
        getCurrentUserId(): string | null;
        hasValidToken(): boolean;
        getAccessToken(): string | null;
        waitForAuth(timeoutMs?: number): Promise<boolean>;
        withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
            maxRetries?: number;
            retryDelay?: number;
            authTimeoutMs?: number;
        }): Promise<T_1>;
        validate(): Promise<boolean>;
        handleError(error: unknown): Error;
        healthCheck(): Promise<{
            status: string;
            users?: number;
            timestamp?: string;
            [key: string]: any;
        }>;
    };
    __resetTokensForTests(): void;
} & T;
//# sourceMappingURL=OxyServices.utility.d.ts.map