import { ApiServiceConfig } from '../types';
import { type ISessionAttributes, type IResourceAttributes, type IUserAttributes } from '@multiplayer-app/session-recorder-common';
import { eventWithTime } from 'rrweb';
export interface StartSessionRequest {
    name?: string;
    stoppedAt?: string | number;
    sessionAttributes?: ISessionAttributes;
    resourceAttributes?: IResourceAttributes;
    userAttributes?: IUserAttributes | null;
    debugSessionData?: Record<string, any>;
    tags?: {
        key?: string;
        value: string;
    }[];
}
export interface StopSessionRequest {
    sessionAttributes?: ISessionAttributes;
    stoppedAt: string | number;
}
export interface CheckRemoteSessionRequest {
    sessionAttributes?: ISessionAttributes;
    resourceAttributes?: IResourceAttributes;
    userAttributes?: IUserAttributes | null;
}
export interface CreateErrorSpanSessionRequest {
    span: any;
}
export declare class ApiService {
    private config;
    constructor();
    /**
     * Initialize the API service
     * @param config - API service configuration
     */
    init(config: ApiServiceConfig): void;
    /**
     * Update the API service configuration
     * @param config - Partial configuration to update
     */
    updateConfigs(config: Partial<ApiServiceConfig>): void;
    /**
     * Start a new debug session
     * @param request - Session start request data
     * @param signal - Optional AbortSignal for request cancellation
     */
    startSession(request: StartSessionRequest, signal?: AbortSignal): Promise<any>;
    /**
     * Create a new error span session
     * @param request - Session create error span request data
     * @param signal - Optional AbortSignal for request cancellation
     */
    createErrorSession(request: CreateErrorSpanSessionRequest, signal?: AbortSignal): Promise<any>;
    /**
     * Stop an active debug session
     * @param sessionId - ID of the session to stop
     * @param request - Session stop request data
     */
    stopSession(sessionId: string, request: StopSessionRequest): Promise<any>;
    /**
     * Cancel an active debug session
     * @param sessionId - ID of the session to cancel
     */
    cancelSession(sessionId: string): Promise<any>;
    /**
     * Start a new debug session
     * @param request - Session start request data
     * @param signal - Optional AbortSignal for request cancellation
     */
    startContinuousDebugSession(request: StartSessionRequest, signal?: AbortSignal): Promise<any>;
    /**
     * Save a continuous debug session
     * @param sessionId - ID of the session to save
     * @param request - Session save request data
     * @param signal - Optional AbortSignal for request cancellation
     */
    saveContinuousDebugSession(sessionId: string, request: StartSessionRequest, signal?: AbortSignal): Promise<any>;
    /**
     * Stop an active continuous debug session
     * @param sessionId - ID of the session to stop
     */
    stopContinuousDebugSession(sessionId: string): Promise<any>;
    /**
     * Check debug session should be started remotely
     */
    checkRemoteSession(requestBody: CheckRemoteSessionRequest, signal?: AbortSignal): Promise<{
        state: 'START' | 'STOP';
    }>;
    updateSessionAttributes(sessionId: string, requestBody: {
        name?: string;
        startedAt?: string;
        stoppedAt?: string;
        userAttributes?: IUserAttributes;
        sessionAttributes?: ISessionAttributes;
        resourceAttributes?: IResourceAttributes;
    }, signal?: AbortSignal): Promise<any>;
    /**
     * Export events to the session debugger API
     */
    exportEvents(sessionId: string, requestBody: {
        events: eventWithTime[];
    }, signal?: AbortSignal): Promise<any>;
    /**
     * Make a request to the session debugger API
     * @param path - API endpoint path (relative to the base URL)
     * @param method - HTTP method (GET, POST, PATCH, etc.)
     * @param body - request payload
     * @param signal - AbortSignal to set request's signal
     */
    private makeRequest;
    private handleRequestError;
}
//# sourceMappingURL=api.service.d.ts.map