import { EnvironmentDTO } from '../models/EnvironmentDTO';
import { AuthenticationManager } from './auth';
import type { TokenStorage } from './auth/types';
/** Handlers for Client method lifecycle events. */
export interface ClientHandlers {
    /** Called before any Client method execution */
    beforeCall?: (methodName: string, args: any[]) => void | Promise<void>;
    /** Called after successful Client method execution */
    afterCall?: (methodName: string, result: any) => void | Promise<void>;
    /** Called when an Client method throws an error */
    onError?: (methodName: string, error: any) => void | Promise<void>;
}
/** Configuration options for the Datalayer Client. */
export interface DatalayerClientConfig {
    /** Authentication token for API requests */
    token?: string;
    /** URL for the IAM service */
    iamRunUrl?: string;
    /** URL for the Runtimes service */
    runtimesRunUrl?: string;
    /** URL for the Spacer service */
    spacerRunUrl?: string;
    /** Custom token storage backend (optional, defaults to auto-detected) */
    storage?: TokenStorage;
    /** Handlers for intercepting Client method calls */
    handlers?: ClientHandlers;
}
/** Base Client class providing core configuration and token management. */
export declare class DatalayerClientBase {
    /** URL for IAM service */
    readonly iamRunUrl: string;
    /** URL for Runtimes service */
    readonly runtimesRunUrl: string;
    /** URL for Spacer service */
    readonly spacerRunUrl: string;
    /** Authentication token */
    token?: string;
    /** Environments */
    readonly environments: EnvironmentDTO[];
    /** Method lifecycle handlers */
    readonly handlers?: ClientHandlers;
    /** Authentication manager */
    readonly auth: AuthenticationManager;
    /**
     * Create a DatalayerClient base instance.
     * @param config - Client configuration options
     */
    constructor(config: DatalayerClientConfig);
    /**
     * Get the current configuration including service URLs and token.
     * @returns Current configuration
     */
    getConfig(): DatalayerClientConfig;
    /** Get the IAM service URL. */
    getIamRunUrl(): string;
    /** Get the Runtimes service URL. */
    getRuntimesRunUrl(): string;
    /** Get the Spacer service URL. */
    getSpacerRunUrl(): string;
    /** Get the current authentication token. */
    getToken(): string | undefined;
    /**
     * set the authentication token for all API requests.
     * @param token - New authentication token
     */
    setToken(token: string): Promise<void>;
    /**
     * Wrap all Client methods with handlers for cross-cutting concerns.
     * Called automatically by the DatalayerClient constructor.
     *
     * @internal
     */
    protected wrapAllMethods(): void;
    /**
     * Get all method names from mixins only.
     * @returns Array of mixin method names to wrap
     * @internal
     */
    private getAllMethodNames;
    calculateCreditsFromMinutes(minutes: number, burningRate: number): number;
}
