import { ToolBubble } from '../../../../types/tool-bubble-class.js'; import type { BubbleContext } from '../../../../types/bubble.js'; import { CredentialType } from '@bubblelab/shared-schemas'; import { type LinkedInConnectionToolParamsInput, type LinkedInConnectionToolResult } from './schema.js'; /** * Recordable LinkedIn Connection Tool * * A tool bubble for automating LinkedIn connection requests with step recording. * Each major action is decorated with @RecordableStep to capture before/after * screenshots, URLs, and timing information. */ export declare class LinkedInConnectionTool extends ToolBubble { static readonly bubbleName: "linkedin-connection-tool"; static readonly schema: import("zod").ZodObject<{ operation: import("zod").ZodEnum<["send_connection"]>; profile_url: import("zod").ZodString; message: import("zod").ZodOptional; credentials: import("zod").ZodOptional, import("zod").ZodString>>; proxy: import("zod").ZodOptional; }, "strip", import("zod").ZodTypeAny, { type: "none"; }, { type: "none"; }>, import("zod").ZodObject<{ type: import("zod").ZodEnum<["browserbase"]>; }, "strip", import("zod").ZodTypeAny, { type: "browserbase"; }, { type: "browserbase"; }>, import("zod").ZodObject<{ type: import("zod").ZodEnum<["custom"]>; proxy: import("zod").ZodObject<{ id: import("zod").ZodString; server: import("zod").ZodString; username: import("zod").ZodOptional; password: import("zod").ZodOptional; }, "strip", import("zod").ZodTypeAny, { id: string; server: string; password?: string | undefined; username?: string | undefined; }, { id: string; server: string; password?: string | undefined; username?: string | undefined; }>; }, "strip", import("zod").ZodTypeAny, { type: "custom"; proxy: { id: string; server: string; password?: string | undefined; username?: string | undefined; }; }, { type: "custom"; proxy: { id: string; server: string; password?: string | undefined; username?: string | undefined; }; }>]>>; }, "strip", import("zod").ZodTypeAny, { operation: "send_connection"; profile_url: string; message?: string | undefined; credentials?: Partial> | undefined; proxy?: { type: "none"; } | { type: "browserbase"; } | { type: "custom"; proxy: { id: string; server: string; password?: string | undefined; username?: string | undefined; }; } | undefined; }, { operation: "send_connection"; profile_url: string; message?: string | undefined; credentials?: Partial> | undefined; proxy?: { type: "none"; } | { type: "browserbase"; } | { type: "custom"; proxy: { id: string; server: string; password?: string | undefined; username?: string | undefined; }; } | undefined; }>; static readonly resultSchema: import("zod").ZodObject<{ operation: import("zod").ZodEnum<["send_connection"]>; success: import("zod").ZodBoolean; message: import("zod").ZodOptional; profile: import("zod").ZodOptional; location: import("zod").ZodOptional; 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, { error: string; success: boolean; operation: "send_connection"; message?: string | undefined; profile?: { name: string; profile_url: string; location?: string | undefined; headline?: string | undefined; } | undefined; }, { error: string; success: boolean; operation: "send_connection"; message?: string | undefined; profile?: { name: string; profile_url: string; location?: string | undefined; headline?: string | undefined; } | undefined; }>; static readonly shortDescription = "LinkedIn connection automation with step recording"; static readonly longDescription = "\n Recordable LinkedIn Connection Tool for automating connection requests.\n Records each step with screenshots and timing information for debugging.\n "; static readonly alias = "linkedin-recordable"; static readonly type = "tool"; /** JS helper to query elements across main document, iframes, and shadow DOM */ private static readonly CROSS_DOM_QUERY; /** * JS helper to find the profile card's action button container. * * LinkedIn renders sidebar recommendation buttons (e.g. "Invite Dr. David P. * to connect") inside the same
as the profile card, so we * can't rely on section scoping. Instead, we find a known profile-specific * button like "Follow " or "Message " and walk up to the action * button row that also contains the "More" button. */ private static readonly FIND_ACTION_ROW; private sessionId; private contextId; private cookies; constructor(params?: T, context?: BubbleContext); /** Required by RecordableToolBubble - returns the active browser session ID */ protected chooseCredential(): string | undefined; private parseBrowserSessionData; private stepStartBrowserSession; private stepNavigateToProfile; private stepWaitForProfilePage; private stepExtractProfileInfo; private stepClickConnect; /** * Wait for the connection modal OR detect that the connection was sent * directly (no modal). Returns 'modal' if modal appeared, 'pending' if * connection was sent directly, or throws if neither happened. */ private stepWaitForModal; private stepAddNote; private stepSendRequest; private stepEndBrowserSession; /** * Check if the connection was already sent directly (no modal). * LinkedIn sometimes sends connections immediately when clicking Connect * from the More dropdown, skipping the "Add a note" / "Send without a note" modal. * In that case the button changes to "Pending". * * Scoped to the profile card (via h1 ancestor) to avoid matching Pending * buttons on sidebar recommendation profiles. */ private checkIfConnectionPending; /** * Dismiss visible LinkedIn overlay popups (Premium upsell, Sales Navigator, * cookie consent, etc.). Called from inside polling loops so it runs on * every iteration rather than as a one-shot step. */ private dismissPopupsOnce; private evaluate; private detectIPAddress; performAction(): Promise; } //# sourceMappingURL=tool.d.ts.map