import { TrackEvent, UserProvidedData } from '../track/types.cjs'; import '../track/gtag.cjs'; type UserIdType = 'SHA256_EMAIL' | 'LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID' | 'ACXIOM_ID' | 'ORACLE_MOAT_ID'; interface CreateLinkedinEventDTO { /** * For any conversion that you want to send through multiple methods, such as Insight Tag and * Conversions API, you must create a conversion rule for each data source (browser and server). * Then, you can implement a logic to pick up the eventId from the browser and send it with the * corresponding event from your server. If we receive an Insight Tag event and a Conversions API * event from the same account with the same eventId, we discard the Conversions API event and * count only the Insight Tag event in campaign reporting. */ eventId?: string; /** * Replace with the conversion ID extracted when creating the conversion rule * (e.g. urn:lla:llaPartnerConversion:). */ conversion: `urn:lla:llaPartnerConversion:${number}`; /** Epoch timestamp in milliseconds at which the conversion event happened. */ conversionHappenedAt: number; conversionValue: { currencyCode: string; amount: string; }; user: { userIds: { idType: UserIdType; idValue: string; }[]; userInfo?: { firstName?: string; lastName?: string; companyName?: string; countryCode?: string; title?: string; }; /** * The maximum supported size of the list is 1 at the moment. If the list contains multiple * values, only the first value will be used. */ externalIds?: [string, ...string[]]; /** * This is generated when users submit the Linkedin Lead-gen form * (e.g. urn:li:leadGenFormResponse:). */ lead?: `urn:li:leadGenFormResponse:${string}`; }; } interface CreateMultipleLinkedinEventsDTO { elements: CreateLinkedinEventDTO[]; } type LinkedinConversionConfig = Record, number>; declare function sendEvents(accessToken: string, config: LinkedinConversionConfig, events: TrackEvent[], data?: UserProvidedData): Promise; export { type CreateLinkedinEventDTO, type CreateMultipleLinkedinEventsDTO, type LinkedinConversionConfig, sendEvents };