import { ToolBubble } from '../../../types/tool-bubble-class.js';
import type { BubbleContext } from '../../../types/bubble.js';
import { CredentialType, type BubbleName } from '@bubblelab/shared-schemas';
import { type LinkedInConnectionToolParamsInput, type LinkedInConnectionToolResult } from './linkedin-connection-tool.schema.js';
/**
 * LinkedIn Connection Tool
 *
 * A tool bubble for automating LinkedIn connection requests.
 * Handles both profile types:
 * - Profiles with direct "Connect" button
 * - Profiles where "Connect" is under the "More" dropdown
 *
 * Features:
 * - Send connection requests to LinkedIn profiles
 * - Add optional personalized notes
 * - Handle various profile layouts
 *
 * Required Credentials:
 * - LINKEDIN_CRED: Browser session credential with LinkedIn cookies
 *
 * Security:
 * - Uses BrowserBase cloud browsers (isolated)
 * - Credentials are encrypted at rest
 * - Session data is not persisted beyond operation
 */
export declare class LinkedInConnectionTool<T extends LinkedInConnectionToolParamsInput = LinkedInConnectionToolParamsInput> extends ToolBubble<T, LinkedInConnectionToolResult> {
    static readonly bubbleName: BubbleName;
    static readonly schema: import("zod").ZodDiscriminatedUnion<"operation", [import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"send_connection">;
        profile_url: import("zod").ZodString;
        message: import("zod").ZodOptional<import("zod").ZodString>;
        credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
    }, "strip", import("zod").ZodTypeAny, {
        operation: "send_connection";
        profile_url: string;
        message?: string | undefined;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
    }, {
        operation: "send_connection";
        profile_url: string;
        message?: string | undefined;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
    }>]>;
    static readonly resultSchema: import("zod").ZodDiscriminatedUnion<"operation", [import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"send_connection">;
        success: import("zod").ZodBoolean;
        message: import("zod").ZodOptional<import("zod").ZodString>;
        profile: import("zod").ZodOptional<import("zod").ZodObject<{
            name: import("zod").ZodString;
            headline: import("zod").ZodOptional<import("zod").ZodString>;
            location: import("zod").ZodOptional<import("zod").ZodString>;
            profile_url: import("zod").ZodString;
        }, "strip", import("zod").ZodTypeAny, {
            name: string;
            profile_url: string;
            location?: string | undefined;
            headline?: string | undefined;
        }, {
            name: string;
            profile_url: string;
            location?: string | undefined;
            headline?: string | undefined;
        }>>;
        error: import("zod").ZodString;
    }, "strip", import("zod").ZodTypeAny, {
        operation: "send_connection";
        error: string;
        success: boolean;
        message?: string | undefined;
        profile?: {
            name: string;
            profile_url: string;
            location?: string | undefined;
            headline?: string | undefined;
        } | undefined;
    }, {
        operation: "send_connection";
        error: string;
        success: boolean;
        message?: string | undefined;
        profile?: {
            name: string;
            profile_url: string;
            location?: string | undefined;
            headline?: string | undefined;
        } | undefined;
    }>]>;
    static readonly shortDescription = "LinkedIn connection automation - send connection requests with optional notes";
    static readonly longDescription = "\n    LinkedIn Connection Tool for automating connection requests.\n\n    Features:\n    - Send connection requests to LinkedIn profiles\n    - Add optional personalized notes (up to 300 characters)\n    - Handles profiles with direct Connect button\n    - Handles profiles where Connect is under \"More\" dropdown\n\n    Required Credentials:\n    - LINKEDIN_CRED: Browser session credential (authenticate via browser session)\n\n    Note: The tool operates using authenticated browser sessions to ensure security.\n  ";
    static readonly alias = "linkedin";
    static readonly type = "tool";
    private sessionId;
    private contextId;
    private cookies;
    constructor(params?: T, context?: BubbleContext);
    /**
     * Choose the credential to use for LinkedIn operations
     */
    protected chooseCredential(): string | undefined;
    /**
     * Parse the LINKEDIN_CRED to extract contextId and cookies
     */
    private parseBrowserSessionData;
    /**
     * Start a browser session using BrowserBase
     */
    private startBrowserSession;
    /**
     * End the browser session
     */
    private endBrowserSession;
    /**
     * Navigate to a URL
     */
    private navigateTo;
    /**
     * Evaluate JavaScript in page
     */
    private evaluate;
    /**
     * Type text into an input field
     */
    private typeText;
    /**
     * Get current page URL
     */
    private getCurrentUrl;
    /**
     * Poll for an element using evaluate with retries
     * More flexible than waitForSelector as it can use custom JS logic
     */
    private pollForElement;
    /**
     * Wait for page to be ready by checking for key LinkedIn profile elements
     */
    private waitForProfilePageReady;
    /**
     * Wait for modal/dialog to appear after clicking Connect
     */
    private waitForConnectionModal;
    /**
     * Wait for dropdown menu to appear after clicking "More"
     */
    private waitForDropdownMenu;
    /**
     * Save current DOM state to file for debugging
     * Only saves when DEBUG env var is set
     */
    private saveDebugState;
    performAction(): Promise<LinkedInConnectionToolResult>;
    /**
     * Send a connection request to a LinkedIn profile
     */
    private sendConnection;
    /**
     * Extract profile information from the current page
     */
    private extractProfileInfo;
}
//# sourceMappingURL=linkedin-connection-tool.d.ts.map