import type { PlatformAdapter, Conversation, Message, Participant } from "../index.js"; /** LinkedIn's text wrapper — everything is wrapped in this */ export interface LinkedInAttributedText { text: string; } /** GraphQL conversation response */ export interface LinkedInConversationsResponse { data: { messengerConversationsBySyncToken: { elements: LinkedInRawConversation[]; }; }; } export interface LinkedInRawConversation { /** Compound URN: urn:li:msg_conversation:(urn:li:fsd_profile:...,threadId) */ entityUrn: string; /** Backend URN (different from entityUrn) */ backendUrn: string; /** Last message preview */ descriptionText: LinkedInAttributedText; /** Epoch ms */ lastActivityAt: number; /** Unread count */ unreadCount: number; /** Participants */ conversationParticipants: LinkedInRawParticipant[]; } export interface LinkedInRawParticipant { entityUrn: string; participantType: { member?: { firstName: LinkedInAttributedText; lastName: LinkedInAttributedText; profileUrl?: string; profilePicture?: { rootUrl: string; artifacts: Array<{ fileIdentifyingUrlPathSegment: string; width: number; height: number; }>; }; }; }; } /** GraphQL messages response */ export interface LinkedInMessagesResponse { data: { messengerMessagesBySyncToken: { elements: LinkedInRawMessage[]; }; }; } export interface LinkedInRawMessage { backendUrn: string; body: LinkedInAttributedText; deliveredAt: number; actor: LinkedInRawParticipant; } /** Extract text from LinkedIn's AttributedText wrapper */ export declare function attrText(obj: unknown): string; /** * Extract the web-friendly thread ID from a compound conversation URN. * * Input: urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAA...,2-NDE3Zj...) * Output: 2-NDE3Zj... * * The thread ID is used in the web URL: * https://www.linkedin.com/messaging/thread/{threadId}/ */ export declare function extractThreadId(entityUrn: string): string; /** Parse a participant from the GraphQL response */ export declare function normalizeParticipant(p: LinkedInRawParticipant): Participant | null; /** Normalize a LinkedIn conversation */ export declare function normalizeConversation(conv: LinkedInRawConversation): Conversation; /** Normalize a LinkedIn message */ export declare function normalizeMessage(msg: LinkedInRawMessage): Message; /** * ⚠️ VOLATILE — these query IDs change when LinkedIn deploys new code. * When the adapter stops working, capture new IDs from the Network tab * on linkedin.com/messaging and update here. */ export declare const QUERY_IDS: { readonly conversations: "messengerConversations.0d5e6781bbee71c3e51c8843c6519f48"; readonly messages: "messengerMessages.5846eeb71c981f11e0134cb6626cc314"; }; export declare const linkedinAdapter: PlatformAdapter; //# sourceMappingURL=linkedin.d.ts.map