@adport/provider-linkedin 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import { AdProvider, StandardActions, Account, NormalizedQuery, Report, WriteOperation, WriteGuard, WritePreview, WriteResult, AnyToolDefinition, CredentialStore, ProviderModule } from '@adport/core';
1
+ import { MediaResolver, WriteOperation, WriteGuard, WritePreview, WriteResult, Creative, AdProvider, StandardActions, Account, NormalizedQuery, Report, AnyToolDefinition, CredentialStore, ProviderModule } from '@adport/core';
2
2
  import { z } from 'zod';
3
3
 
4
4
  declare const LINKEDIN_API_BASE = "https://api.linkedin.com/rest/";
5
5
  declare const LINKEDIN_API_VERSION = "202608";
6
+ declare const LINKEDIN_CREATIVE_METADATA_VERSION = "202610";
6
7
  declare const LINKEDIN_TOKEN_URL = "https://www.linkedin.com/oauth/v2/accessToken";
7
8
  interface LinkedInTokens {
8
9
  accessToken: string;
@@ -35,16 +36,1677 @@ declare class LinkedInAdsClient {
35
36
  get<T>(path: string, schema: z.ZodType<T>, params?: Record<string, RestliValue>): Promise<T>;
36
37
  create(path: string, body: unknown): Promise<string>;
37
38
  update(path: string, fields: Record<string, unknown>): Promise<void>;
39
+ partialUpdate(path: string, patch: Record<string, unknown>, params?: Record<string, RestliValue>): Promise<void>;
40
+ createCreative(path: string, body: unknown, params?: Record<string, RestliValue>): Promise<string>;
41
+ createPost(body: unknown): Promise<string>;
42
+ creativeMetadata<T>(path: string, schema: z.ZodType<T>): Promise<T>;
43
+ creativeMediaType(url: string): Promise<'image' | 'video' | undefined>;
44
+ action<T>(path: string, action: string, body: unknown, schema: z.ZodType<T>): Promise<T>;
45
+ remove(path: string): Promise<void>;
46
+ setCampaignConversion(campaignId: string, conversionId: string, associated: boolean): Promise<void>;
47
+ uploadImage(url: string, bytes: Uint8Array<ArrayBuffer>): Promise<void>;
48
+ validateMediaUpload(url: string, kind: 'video' | 'document', resource: string): URL;
49
+ uploadMedia(url: string, bytes: Uint8Array<ArrayBuffer>, kind: 'video' | 'document', resource: string): Promise<string>;
50
+ finalizeVideo(body: unknown): Promise<void>;
38
51
  private request;
39
52
  private canRefresh;
40
53
  private accessToken;
41
54
  private refresh;
42
55
  }
43
56
 
57
+ interface LinkedInCreativePlan extends Omit<WritePreview, 'serverValidated'> {
58
+ execute: () => Promise<WriteResult>;
59
+ }
60
+ declare class LinkedInCreativeService {
61
+ private readonly client;
62
+ private readonly provider;
63
+ private readonly media;
64
+ constructor(client: LinkedInAdsClient, provider: LinkedInAdsProvider, media?: MediaResolver);
65
+ owned(account: string, resource: string): Promise<{
66
+ [x: string]: unknown;
67
+ id: string;
68
+ account: string;
69
+ campaign: string;
70
+ intendedStatus: string;
71
+ content?: Record<string, unknown> | undefined;
72
+ }>;
73
+ image(account: string, resource: string): Promise<{
74
+ [x: string]: unknown;
75
+ id: string;
76
+ owner: string;
77
+ status: string;
78
+ downloadUrlExpiresAt?: number | undefined;
79
+ mediaLibraryMetadata?: {
80
+ [x: string]: unknown;
81
+ associatedAccount: string;
82
+ } | undefined;
83
+ }>;
84
+ images(input: {
85
+ account_id: string;
86
+ library_status: 'ACTIVE' | 'ARCHIVED';
87
+ start: number;
88
+ count: number;
89
+ }): Promise<{
90
+ next_start?: number | undefined;
91
+ items: {
92
+ [x: string]: unknown;
93
+ id: string;
94
+ owner: string;
95
+ status: string;
96
+ downloadUrlExpiresAt?: number | undefined;
97
+ mediaLibraryMetadata?: {
98
+ [x: string]: unknown;
99
+ associatedAccount: string;
100
+ } | undefined;
101
+ }[];
102
+ creatives: {
103
+ id: string;
104
+ provider: string;
105
+ account_id: string;
106
+ name: string;
107
+ type: string;
108
+ headlines: string[];
109
+ descriptions: string[];
110
+ landing_urls: string[];
111
+ media: {
112
+ type: "image" | "video" | "audio";
113
+ url: string;
114
+ alt?: string | undefined;
115
+ poster_url?: string | undefined;
116
+ open_url?: string | undefined;
117
+ }[];
118
+ actions: {
119
+ label: string;
120
+ tool: string;
121
+ arguments: Record<string, unknown>;
122
+ fields: {
123
+ key: string;
124
+ label: string;
125
+ type: "text" | "text_list" | "url_list" | "select";
126
+ value: string | string[];
127
+ options?: {
128
+ label: string;
129
+ value: string;
130
+ }[] | undefined;
131
+ max_length?: number | undefined;
132
+ }[];
133
+ }[];
134
+ status?: string | undefined;
135
+ campaign_id?: string | undefined;
136
+ ad_group_id?: string | undefined;
137
+ }[];
138
+ truncated: boolean;
139
+ }>;
140
+ private libraryPage;
141
+ /** Account-library membership is its own native authorization surface. */
142
+ libraryImage(accountId: string, resource: string): Promise<{
143
+ [x: string]: unknown;
144
+ id: string;
145
+ owner: string;
146
+ status: string;
147
+ downloadUrlExpiresAt?: number | undefined;
148
+ mediaLibraryMetadata?: {
149
+ [x: string]: unknown;
150
+ associatedAccount: string;
151
+ } | undefined;
152
+ }>;
153
+ list(input: {
154
+ account_id: string;
155
+ campaign_ids?: string[];
156
+ creative_ids?: string[];
157
+ statuses?: string[];
158
+ page_size: number;
159
+ page_token?: string;
160
+ include_media: boolean;
161
+ }): Promise<{
162
+ next_page_token?: string | undefined;
163
+ items: {
164
+ [x: string]: unknown;
165
+ id: string;
166
+ account: string;
167
+ campaign: string;
168
+ intendedStatus: string;
169
+ content?: Record<string, unknown> | undefined;
170
+ }[];
171
+ creatives: {
172
+ id: string;
173
+ provider: string;
174
+ account_id: string;
175
+ name: string;
176
+ type: string;
177
+ headlines: string[];
178
+ descriptions: string[];
179
+ landing_urls: string[];
180
+ media: {
181
+ type: "image" | "video" | "audio";
182
+ url: string;
183
+ alt?: string | undefined;
184
+ poster_url?: string | undefined;
185
+ open_url?: string | undefined;
186
+ }[];
187
+ actions: {
188
+ label: string;
189
+ tool: string;
190
+ arguments: Record<string, unknown>;
191
+ fields: {
192
+ key: string;
193
+ label: string;
194
+ type: "text" | "text_list" | "url_list" | "select";
195
+ value: string | string[];
196
+ options?: {
197
+ label: string;
198
+ value: string;
199
+ }[] | undefined;
200
+ max_length?: number | undefined;
201
+ }[];
202
+ }[];
203
+ status?: string | undefined;
204
+ campaign_id?: string | undefined;
205
+ ad_group_id?: string | undefined;
206
+ }[];
207
+ warnings: {
208
+ provider: string;
209
+ message: string;
210
+ }[];
211
+ truncated: boolean;
212
+ }>;
213
+ private update;
214
+ plan(op: WriteOperation, guard: WriteGuard): Promise<LinkedInCreativePlan>;
215
+ }
216
+
217
+ type Plan$6 = Omit<WritePreview, 'serverValidated'> & {
218
+ execute: () => Promise<WriteResult>;
219
+ };
220
+ /** Native version-202608 Videos/Documents contracts reviewed 2026-11-04. */
221
+ declare class LinkedInMediaService {
222
+ private readonly client;
223
+ private readonly provider;
224
+ private readonly media;
225
+ constructor(client: LinkedInAdsClient, provider: LinkedInAdsProvider, media?: MediaResolver);
226
+ context(account: string, campaignId?: string): Promise<{
227
+ document_owner: string;
228
+ video_upload_available: boolean;
229
+ note: string;
230
+ video_owner?: string | undefined;
231
+ campaign_id?: string | undefined;
232
+ account_id: string;
233
+ account_status: string;
234
+ }>;
235
+ private page;
236
+ libraryVideo(account: string, resource: string): Promise<{
237
+ library_snapshot_hash: string;
238
+ id: string;
239
+ owner: string;
240
+ status: "AVAILABLE" | "WAITING_UPLOAD" | "PROCESSING" | "PROCESSING_FAILED";
241
+ mediaLibraryMetadata?: {
242
+ [x: string]: unknown;
243
+ associatedAccount: string;
244
+ assetName: string;
245
+ mediaLibraryStatus: "ACTIVE" | "ARCHIVED";
246
+ } | undefined;
247
+ }>;
248
+ videos(input: {
249
+ account_id: string;
250
+ start: number;
251
+ count: number;
252
+ library_status?: 'ACTIVE' | 'ARCHIVED';
253
+ }): Promise<{
254
+ creatives: {
255
+ id: string;
256
+ provider: string;
257
+ account_id: string;
258
+ name: string;
259
+ type: string;
260
+ status: "AVAILABLE" | "WAITING_UPLOAD" | "PROCESSING" | "PROCESSING_FAILED";
261
+ headlines: never[];
262
+ descriptions: string[];
263
+ landing_urls: never[];
264
+ media: {
265
+ poster_url?: string | undefined;
266
+ type: string;
267
+ url: string;
268
+ }[];
269
+ actions: {
270
+ label: string;
271
+ tool: string;
272
+ arguments: {
273
+ account_id: string;
274
+ video_id: string;
275
+ expected_library_hash: string;
276
+ };
277
+ fields: ({
278
+ key: string;
279
+ label: string;
280
+ type: string;
281
+ value: string;
282
+ options?: undefined;
283
+ } | {
284
+ key: string;
285
+ label: string;
286
+ type: string;
287
+ value: "ACTIVE" | "ARCHIVED";
288
+ options: {
289
+ label: string;
290
+ value: string;
291
+ }[];
292
+ })[];
293
+ }[];
294
+ }[];
295
+ next_start?: number | undefined;
296
+ items: {
297
+ library_snapshot_hash: string;
298
+ id: string;
299
+ owner: string;
300
+ status: "AVAILABLE" | "WAITING_UPLOAD" | "PROCESSING" | "PROCESSING_FAILED";
301
+ mediaLibraryMetadata?: {
302
+ [x: string]: unknown;
303
+ associatedAccount: string;
304
+ assetName: string;
305
+ mediaLibraryStatus: "ACTIVE" | "ARCHIVED";
306
+ } | undefined;
307
+ }[];
308
+ truncated: boolean;
309
+ }>;
310
+ document(account: string, resource: string): Promise<{
311
+ [x: string]: unknown;
312
+ id: string;
313
+ owner: string;
314
+ status: "AVAILABLE" | "WAITING_UPLOAD" | "PROCESSING" | "PROCESSING_FAILED";
315
+ }>;
316
+ plan(op: WriteOperation): Promise<Plan$6>;
317
+ private planResult;
318
+ }
319
+
320
+ declare const targetingEntitiesInput: z.ZodObject<{
321
+ account_id: z.ZodString;
322
+ facet: z.ZodString;
323
+ query: z.ZodOptional<z.ZodString>;
324
+ entity_type: z.ZodOptional<z.ZodEnum<{
325
+ AGE: "AGE";
326
+ COMPANY: "COMPANY";
327
+ COMPANY_SIZE: "COMPANY_SIZE";
328
+ DEGREE: "DEGREE";
329
+ FIELD_OF_STUDY: "FIELD_OF_STUDY";
330
+ FUNCTION: "FUNCTION";
331
+ GENDER: "GENDER";
332
+ GROUP: "GROUP";
333
+ INDUSTRY: "INDUSTRY";
334
+ INTEREST: "INTEREST";
335
+ LOCALE: "LOCALE";
336
+ SCHOOL: "SCHOOL";
337
+ SENIORITY: "SENIORITY";
338
+ SKILL: "SKILL";
339
+ TITLE: "TITLE";
340
+ YEARS_OF_EXPERIENCE: "YEARS_OF_EXPERIENCE";
341
+ MEMBER_BEHAVIOR: "MEMBER_BEHAVIOR";
342
+ }>>;
343
+ use_case: z.ZodOptional<z.ZodLiteral<"CONNECTED_TELEVISION_ONLY_CAMPAIGN">>;
344
+ locale: z.ZodOptional<z.ZodObject<{
345
+ language: z.ZodString;
346
+ country: z.ZodString;
347
+ }, z.core.$strict>>;
348
+ start: z.ZodDefault<z.ZodNumber>;
349
+ count: z.ZodDefault<z.ZodNumber>;
350
+ }, z.core.$strict>;
351
+
352
+ interface Plan$5 extends Omit<WritePreview, 'serverValidated'> {
353
+ execute: () => Promise<WriteResult>;
354
+ }
355
+ declare class LinkedInManagementService {
356
+ private readonly client;
357
+ private readonly provider;
358
+ constructor(client: LinkedInAdsClient, provider: LinkedInAdsProvider);
359
+ group(account: string, resource: string): Promise<{
360
+ [x: string]: unknown;
361
+ id: number;
362
+ name: string;
363
+ account: string;
364
+ status: string;
365
+ budgetOptimization?: {
366
+ [x: string]: unknown;
367
+ budgetOptimizationStrategy?: string | undefined;
368
+ } | undefined;
369
+ }>;
370
+ facets(account: string): Promise<{
371
+ elements: Record<string, unknown>[];
372
+ }>;
373
+ entities(raw: z.input<typeof targetingEntitiesInput>): Promise<{
374
+ notes?: string[] | undefined;
375
+ next_start?: number | undefined;
376
+ complete: boolean | null;
377
+ truncated: boolean | null;
378
+ elements: Record<string, unknown>[];
379
+ paging?: {
380
+ [x: string]: unknown;
381
+ start: number;
382
+ count: number;
383
+ total?: number | undefined;
384
+ links?: {
385
+ [x: string]: unknown;
386
+ rel: string;
387
+ }[] | undefined;
388
+ } | undefined;
389
+ }>;
390
+ private metadata;
391
+ private patch;
392
+ plan(op: WriteOperation, guard: WriteGuard): Promise<Plan$5>;
393
+ }
394
+
395
+ declare const postSelection: z.ZodObject<{
396
+ creative_id: z.ZodOptional<z.ZodString>;
397
+ post_id: z.ZodOptional<z.ZodString>;
398
+ author_organization: z.ZodOptional<z.ZodString>;
399
+ campaign_id: z.ZodOptional<z.ZodString>;
400
+ }, z.core.$strict>;
401
+
402
+ type Plan$4 = Omit<WritePreview, 'serverValidated'> & {
403
+ execute(): Promise<WriteResult>;
404
+ };
405
+ declare const nativeCreative: z.ZodObject<{
406
+ id: z.ZodString;
407
+ account: z.ZodString;
408
+ campaign: z.ZodString;
409
+ intendedStatus: z.ZodString;
410
+ content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
411
+ metadata: z.ZodOptional<z.ZodObject<{
412
+ adFormat: z.ZodOptional<z.ZodString>;
413
+ adHeadline: z.ZodOptional<z.ZodString>;
414
+ adIntroductionText: z.ZodOptional<z.ZodString>;
415
+ adLine: z.ZodOptional<z.ZodString>;
416
+ assetURL: z.ZodOptional<z.ZodString>;
417
+ landingPage: z.ZodOptional<z.ZodString>;
418
+ }, z.core.$loose>>;
419
+ }, z.core.$loose>;
420
+ type CreativeMetadata = z.output<typeof nativeCreative> & {
421
+ primary_media?: {
422
+ type: 'image' | 'video';
423
+ url: string;
424
+ };
425
+ preview_warning?: string;
426
+ };
427
+ /** LinkedIn-owned Posts/Creatives/Document/Carousel contracts reviewed 2026-11-04. */
428
+ declare class LinkedInSponsoredService {
429
+ private readonly client;
430
+ private readonly provider;
431
+ constructor(client: LinkedInAdsClient, provider: LinkedInAdsProvider);
432
+ metadata(account: string, resource: string): Promise<CreativeMetadata>;
433
+ metadataCard(account: string, value: CreativeMetadata): Creative;
434
+ preview(account: string, resource: string): Promise<{
435
+ items: CreativeMetadata[];
436
+ creatives: {
437
+ id: string;
438
+ provider: string;
439
+ account_id: string;
440
+ name: string;
441
+ type: string;
442
+ headlines: string[];
443
+ descriptions: string[];
444
+ landing_urls: string[];
445
+ media: {
446
+ type: "image" | "video" | "audio";
447
+ url: string;
448
+ alt?: string | undefined;
449
+ poster_url?: string | undefined;
450
+ open_url?: string | undefined;
451
+ }[];
452
+ actions: {
453
+ label: string;
454
+ tool: string;
455
+ arguments: Record<string, unknown>;
456
+ fields: {
457
+ key: string;
458
+ label: string;
459
+ type: "text" | "text_list" | "url_list" | "select";
460
+ value: string | string[];
461
+ options?: {
462
+ label: string;
463
+ value: string;
464
+ }[] | undefined;
465
+ max_length?: number | undefined;
466
+ }[];
467
+ }[];
468
+ status?: string | undefined;
469
+ campaign_id?: string | undefined;
470
+ ad_group_id?: string | undefined;
471
+ }[];
472
+ truncated: boolean;
473
+ warnings: {
474
+ provider: string;
475
+ message: string;
476
+ }[];
477
+ }>;
478
+ private associations;
479
+ private readPost;
480
+ private ownDarkPost;
481
+ private organization;
482
+ postContext(account: string, raw: z.input<typeof postSelection>): Promise<{
483
+ creatives: {
484
+ id: string;
485
+ provider: string;
486
+ account_id: string;
487
+ name: string;
488
+ type: string;
489
+ headlines: string[];
490
+ descriptions: string[];
491
+ landing_urls: string[];
492
+ media: {
493
+ type: "image" | "video" | "audio";
494
+ url: string;
495
+ alt?: string | undefined;
496
+ poster_url?: string | undefined;
497
+ open_url?: string | undefined;
498
+ }[];
499
+ actions: {
500
+ label: string;
501
+ tool: string;
502
+ arguments: Record<string, unknown>;
503
+ fields: {
504
+ key: string;
505
+ label: string;
506
+ type: "text" | "text_list" | "url_list" | "select";
507
+ value: string | string[];
508
+ options?: {
509
+ label: string;
510
+ value: string;
511
+ }[] | undefined;
512
+ max_length?: number | undefined;
513
+ }[];
514
+ }[];
515
+ status?: string | undefined;
516
+ campaign_id?: string | undefined;
517
+ ad_group_id?: string | undefined;
518
+ }[];
519
+ warnings: {
520
+ provider: string;
521
+ message: string;
522
+ }[];
523
+ truncated: boolean;
524
+ post_snapshot_hash: string;
525
+ associations_snapshot_hash: string;
526
+ post: {
527
+ [x: string]: unknown;
528
+ id: string;
529
+ author: string;
530
+ commentary: string;
531
+ lifecycleState: string;
532
+ distribution: {
533
+ [x: string]: unknown;
534
+ feedDistribution: string;
535
+ thirdPartyDistributionChannels?: string[] | undefined;
536
+ };
537
+ content?: Record<string, unknown> | undefined;
538
+ };
539
+ associations: {
540
+ id: string;
541
+ campaign: string;
542
+ intendedStatus: string;
543
+ content: Record<string, unknown> | undefined;
544
+ }[];
545
+ }>;
546
+ private campaignFormat;
547
+ plan(op: WriteOperation, guard: WriteGuard): Promise<Plan$4>;
548
+ }
549
+
550
+ declare const pricingInput: z.ZodObject<{
551
+ campaign_type: z.ZodEnum<{
552
+ TEXT_AD: "TEXT_AD";
553
+ SPONSORED_UPDATES: "SPONSORED_UPDATES";
554
+ SPONSORED_INMAILS: "SPONSORED_INMAILS";
555
+ }>;
556
+ bid_type: z.ZodEnum<{
557
+ CPM: "CPM";
558
+ CPC: "CPC";
559
+ CPV: "CPV";
560
+ }>;
561
+ match_type: z.ZodDefault<z.ZodEnum<{
562
+ EXACT: "EXACT";
563
+ AUDIENCE_EXPANDED: "AUDIENCE_EXPANDED";
564
+ }>>;
565
+ country_code: z.ZodOptional<z.ZodString>;
566
+ daily_budget_micros: z.ZodOptional<z.ZodNumber>;
567
+ optimization_target_type: z.ZodOptional<z.ZodEnum<{
568
+ NONE: "NONE";
569
+ WEBSITE_VISIT: "WEBSITE_VISIT";
570
+ MAX_IMPRESSION: "MAX_IMPRESSION";
571
+ MAX_CLICK: "MAX_CLICK";
572
+ MAX_CONVERSION: "MAX_CONVERSION";
573
+ ENHANCED_CONVERSION: "ENHANCED_CONVERSION";
574
+ MAX_VIDEO_VIEW: "MAX_VIDEO_VIEW";
575
+ MAX_LEAD: "MAX_LEAD";
576
+ MAX_QUALIFIED_LEAD: "MAX_QUALIFIED_LEAD";
577
+ TARGET_COST_PER_CLICK: "TARGET_COST_PER_CLICK";
578
+ TARGET_COST_PER_IMPRESSION: "TARGET_COST_PER_IMPRESSION";
579
+ TARGET_COST_PER_VIDEO_VIEW: "TARGET_COST_PER_VIDEO_VIEW";
580
+ CAP_COST_AND_MAXIMIZE_CLICKS: "CAP_COST_AND_MAXIMIZE_CLICKS";
581
+ CAP_COST_AND_MAXIMIZE_IMPRESSIONS: "CAP_COST_AND_MAXIMIZE_IMPRESSIONS";
582
+ CAP_COST_AND_MAXIMIZE_VIDEO_VIEWS: "CAP_COST_AND_MAXIMIZE_VIDEO_VIEWS";
583
+ CAP_COST_AND_MAXIMIZE_LEADS: "CAP_COST_AND_MAXIMIZE_LEADS";
584
+ AWARENESS: "AWARENESS";
585
+ }>>;
586
+ account_id: z.ZodString;
587
+ targeting_criteria: z.ZodObject<{
588
+ include: z.ZodObject<{
589
+ and: z.ZodArray<z.ZodObject<{
590
+ or: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
591
+ }, z.core.$strict>>;
592
+ }, z.core.$strict>;
593
+ exclude: z.ZodOptional<z.ZodObject<{
594
+ or: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
595
+ }, z.core.$strict>>;
596
+ }, z.core.$strict>;
597
+ objective_type: z.ZodOptional<z.ZodEnum<{
598
+ BRAND_AWARENESS: "BRAND_AWARENESS";
599
+ ENGAGEMENT: "ENGAGEMENT";
600
+ LEAD_GENERATION: "LEAD_GENERATION";
601
+ WEBSITE_VISIT: "WEBSITE_VISIT";
602
+ WEBSITE_CONVERSION: "WEBSITE_CONVERSION";
603
+ VIDEO_VIEW: "VIDEO_VIEW";
604
+ WEBSITE_TRAFFIC: "WEBSITE_TRAFFIC";
605
+ CREATIVE_ENGAGEMENT: "CREATIVE_ENGAGEMENT";
606
+ JOB_APPLICATION: "JOB_APPLICATION";
607
+ JOB_APPLICANT: "JOB_APPLICANT";
608
+ TALENT_LEAD: "TALENT_LEAD";
609
+ }>>;
610
+ }, z.core.$strip>;
611
+ declare const forecastInput: z.ZodObject<{
612
+ campaign_type: z.ZodEnum<{
613
+ SPONSORED_UPDATES: "SPONSORED_UPDATES";
614
+ SPONSORED_INMAILS: "SPONSORED_INMAILS";
615
+ DYNAMIC: "DYNAMIC";
616
+ }>;
617
+ campaign_id: z.ZodOptional<z.ZodString>;
618
+ creative_type: z.ZodOptional<z.ZodString>;
619
+ time_range: z.ZodObject<{
620
+ start: z.ZodNumber;
621
+ end: z.ZodNumber;
622
+ }, z.core.$strip>;
623
+ daily_budget_micros: z.ZodOptional<z.ZodNumber>;
624
+ total_budget_micros: z.ZodOptional<z.ZodNumber>;
625
+ competing_bid: z.ZodOptional<z.ZodObject<{
626
+ bid_type: z.ZodEnum<{
627
+ CPM: "CPM";
628
+ CPC: "CPC";
629
+ CPV: "CPV";
630
+ }>;
631
+ bid_micros: z.ZodNumber;
632
+ }, z.core.$strip>>;
633
+ optimization_target: z.ZodDefault<z.ZodEnum<{
634
+ NONE: "NONE";
635
+ MAX_IMPRESSION: "MAX_IMPRESSION";
636
+ MAX_CLICK: "MAX_CLICK";
637
+ MAX_CONVERSION: "MAX_CONVERSION";
638
+ ENHANCED_CONVERSION: "ENHANCED_CONVERSION";
639
+ MAX_VIDEO_VIEW: "MAX_VIDEO_VIEW";
640
+ MAX_LEAD: "MAX_LEAD";
641
+ MAX_QUALIFIED_LEAD: "MAX_QUALIFIED_LEAD";
642
+ TARGET_COST_PER_CLICK: "TARGET_COST_PER_CLICK";
643
+ TARGET_COST_PER_IMPRESSION: "TARGET_COST_PER_IMPRESSION";
644
+ TARGET_COST_PER_VIDEO_VIEW: "TARGET_COST_PER_VIDEO_VIEW";
645
+ CAP_COST_AND_MAXIMIZE_CLICKS: "CAP_COST_AND_MAXIMIZE_CLICKS";
646
+ CAP_COST_AND_MAXIMIZE_IMPRESSIONS: "CAP_COST_AND_MAXIMIZE_IMPRESSIONS";
647
+ CAP_COST_AND_MAXIMIZE_VIDEO_VIEWS: "CAP_COST_AND_MAXIMIZE_VIDEO_VIEWS";
648
+ CAP_COST_AND_MAXIMIZE_LEADS: "CAP_COST_AND_MAXIMIZE_LEADS";
649
+ }>>;
650
+ target_cost_micros: z.ZodOptional<z.ZodNumber>;
651
+ cost_cap_micros: z.ZodOptional<z.ZodNumber>;
652
+ enable_audience_network: z.ZodDefault<z.ZodBoolean>;
653
+ enable_audience_expansion: z.ZodDefault<z.ZodBoolean>;
654
+ connected_television_only: z.ZodDefault<z.ZodBoolean>;
655
+ account_id: z.ZodString;
656
+ targeting_criteria: z.ZodObject<{
657
+ include: z.ZodObject<{
658
+ and: z.ZodArray<z.ZodObject<{
659
+ or: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
660
+ }, z.core.$strict>>;
661
+ }, z.core.$strict>;
662
+ exclude: z.ZodOptional<z.ZodObject<{
663
+ or: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
664
+ }, z.core.$strict>>;
665
+ }, z.core.$strict>;
666
+ objective_type: z.ZodOptional<z.ZodEnum<{
667
+ BRAND_AWARENESS: "BRAND_AWARENESS";
668
+ ENGAGEMENT: "ENGAGEMENT";
669
+ LEAD_GENERATION: "LEAD_GENERATION";
670
+ WEBSITE_VISIT: "WEBSITE_VISIT";
671
+ WEBSITE_CONVERSION: "WEBSITE_CONVERSION";
672
+ VIDEO_VIEW: "VIDEO_VIEW";
673
+ WEBSITE_TRAFFIC: "WEBSITE_TRAFFIC";
674
+ CREATIVE_ENGAGEMENT: "CREATIVE_ENGAGEMENT";
675
+ JOB_APPLICATION: "JOB_APPLICATION";
676
+ JOB_APPLICANT: "JOB_APPLICANT";
677
+ TALENT_LEAD: "TALENT_LEAD";
678
+ }>>;
679
+ }, z.core.$strip>;
680
+ /** LinkedIn Marketing202608 pricing/forecast contracts reviewed 2026-11-04. */
681
+ declare class LinkedInPlanningService {
682
+ private readonly client;
683
+ private readonly provider;
684
+ constructor(client: LinkedInAdsClient, provider: LinkedInAdsProvider);
685
+ private money;
686
+ pricing(raw: z.input<typeof pricingInput>): Promise<{
687
+ request: {
688
+ campaign_type: "TEXT_AD" | "SPONSORED_UPDATES" | "SPONSORED_INMAILS";
689
+ bid_type: "CPM" | "CPC" | "CPV";
690
+ match_type: "EXACT" | "AUDIENCE_EXPANDED";
691
+ account_id: string;
692
+ targeting_criteria: {
693
+ include: {
694
+ and: {
695
+ or: Record<string, string[]>;
696
+ }[];
697
+ };
698
+ exclude?: {
699
+ or: Record<string, string[]>;
700
+ } | undefined;
701
+ };
702
+ country_code?: string | undefined;
703
+ daily_budget_micros?: number | undefined;
704
+ optimization_target_type?: "NONE" | "WEBSITE_VISIT" | "MAX_IMPRESSION" | "MAX_CLICK" | "MAX_CONVERSION" | "ENHANCED_CONVERSION" | "MAX_VIDEO_VIEW" | "MAX_LEAD" | "MAX_QUALIFIED_LEAD" | "TARGET_COST_PER_CLICK" | "TARGET_COST_PER_IMPRESSION" | "TARGET_COST_PER_VIDEO_VIEW" | "CAP_COST_AND_MAXIMIZE_CLICKS" | "CAP_COST_AND_MAXIMIZE_IMPRESSIONS" | "CAP_COST_AND_MAXIMIZE_VIDEO_VIEWS" | "CAP_COST_AND_MAXIMIZE_LEADS" | "AWARENESS" | undefined;
705
+ objective_type?: "BRAND_AWARENESS" | "ENGAGEMENT" | "LEAD_GENERATION" | "WEBSITE_VISIT" | "WEBSITE_CONVERSION" | "VIDEO_VIEW" | "WEBSITE_TRAFFIC" | "CREATIVE_ENGAGEMENT" | "JOB_APPLICATION" | "JOB_APPLICANT" | "TALENT_LEAD" | undefined;
706
+ };
707
+ account_id: string;
708
+ currency: string;
709
+ truncated: boolean;
710
+ planning: {
711
+ title: string;
712
+ columns: {
713
+ key: string;
714
+ label: string;
715
+ }[];
716
+ rows: Record<string, string | null>[];
717
+ notes: string[];
718
+ };
719
+ elements: {
720
+ [x: string]: unknown;
721
+ bidLimits?: {
722
+ min?: {
723
+ currencyCode: string;
724
+ amount: string;
725
+ } | null | undefined;
726
+ max?: {
727
+ currencyCode: string;
728
+ amount: string;
729
+ } | null | undefined;
730
+ default?: {
731
+ currencyCode: string;
732
+ amount: string;
733
+ } | null | undefined;
734
+ } | undefined;
735
+ dailyBudgetLimits?: {
736
+ min?: {
737
+ currencyCode: string;
738
+ amount: string;
739
+ } | null | undefined;
740
+ max?: {
741
+ currencyCode: string;
742
+ amount: string;
743
+ } | null | undefined;
744
+ default?: {
745
+ currencyCode: string;
746
+ amount: string;
747
+ } | null | undefined;
748
+ } | undefined;
749
+ suggestedBid?: {
750
+ min?: {
751
+ currencyCode: string;
752
+ amount: string;
753
+ } | null | undefined;
754
+ max?: {
755
+ currencyCode: string;
756
+ amount: string;
757
+ } | null | undefined;
758
+ default?: {
759
+ currencyCode: string;
760
+ amount: string;
761
+ } | null | undefined;
762
+ } | undefined;
763
+ }[];
764
+ paging?: {
765
+ start: number;
766
+ count: number;
767
+ total?: number | undefined;
768
+ links?: {
769
+ [x: string]: unknown;
770
+ rel: string;
771
+ }[] | undefined;
772
+ } | undefined;
773
+ }>;
774
+ forecast(raw: z.input<typeof forecastInput>): Promise<{
775
+ request: {
776
+ campaign_type: "SPONSORED_UPDATES" | "SPONSORED_INMAILS" | "DYNAMIC";
777
+ time_range: {
778
+ start: number;
779
+ end: number;
780
+ };
781
+ optimization_target: "NONE" | "MAX_IMPRESSION" | "MAX_CLICK" | "MAX_CONVERSION" | "ENHANCED_CONVERSION" | "MAX_VIDEO_VIEW" | "MAX_LEAD" | "MAX_QUALIFIED_LEAD" | "TARGET_COST_PER_CLICK" | "TARGET_COST_PER_IMPRESSION" | "TARGET_COST_PER_VIDEO_VIEW" | "CAP_COST_AND_MAXIMIZE_CLICKS" | "CAP_COST_AND_MAXIMIZE_IMPRESSIONS" | "CAP_COST_AND_MAXIMIZE_VIDEO_VIEWS" | "CAP_COST_AND_MAXIMIZE_LEADS";
782
+ enable_audience_network: boolean;
783
+ enable_audience_expansion: boolean;
784
+ connected_television_only: boolean;
785
+ account_id: string;
786
+ targeting_criteria: {
787
+ include: {
788
+ and: {
789
+ or: Record<string, string[]>;
790
+ }[];
791
+ };
792
+ exclude?: {
793
+ or: Record<string, string[]>;
794
+ } | undefined;
795
+ };
796
+ campaign_id?: string | undefined;
797
+ creative_type?: string | undefined;
798
+ daily_budget_micros?: number | undefined;
799
+ total_budget_micros?: number | undefined;
800
+ competing_bid?: {
801
+ bid_type: "CPM" | "CPC" | "CPV";
802
+ bid_micros: number;
803
+ } | undefined;
804
+ target_cost_micros?: number | undefined;
805
+ cost_cap_micros?: number | undefined;
806
+ objective_type?: "BRAND_AWARENESS" | "ENGAGEMENT" | "LEAD_GENERATION" | "WEBSITE_VISIT" | "WEBSITE_CONVERSION" | "VIDEO_VIEW" | "WEBSITE_TRAFFIC" | "CREATIVE_ENGAGEMENT" | "JOB_APPLICATION" | "JOB_APPLICANT" | "TALENT_LEAD" | undefined;
807
+ };
808
+ account_id: string;
809
+ currency: string;
810
+ truncated: boolean;
811
+ planning: {
812
+ title: string;
813
+ columns: {
814
+ key: string;
815
+ label: string;
816
+ }[];
817
+ rows: Record<string, string | null>[];
818
+ notes: string[];
819
+ };
820
+ elements: {
821
+ [x: string]: unknown;
822
+ metricType: string;
823
+ granularity: "DAILY" | "SEVEN_DAY" | "THIRTY_DAY" | "CUSTOM";
824
+ timeSeries: {
825
+ timestamp: number;
826
+ value?: number | null | undefined;
827
+ adForecastRange?: {
828
+ lowEnd?: number | null | undefined;
829
+ highEnd?: number | null | undefined;
830
+ } | undefined;
831
+ }[];
832
+ }[];
833
+ paging?: {
834
+ start: number;
835
+ count: number;
836
+ total?: number | undefined;
837
+ links?: {
838
+ [x: string]: unknown;
839
+ rel: string;
840
+ }[] | undefined;
841
+ } | undefined;
842
+ }>;
843
+ }
844
+
845
+ type Plan$3 = Omit<WritePreview, 'serverValidated'> & {
846
+ execute(): Promise<WriteResult>;
847
+ };
848
+ declare const listInput$1: z.ZodObject<{
849
+ account_id: z.ZodString;
850
+ start: z.ZodDefault<z.ZodNumber>;
851
+ count: z.ZodDefault<z.ZodNumber>;
852
+ sort_field: z.ZodDefault<z.ZodEnum<{
853
+ ID: "ID";
854
+ NAME: "NAME";
855
+ }>>;
856
+ sort_order: z.ZodDefault<z.ZodEnum<{
857
+ ASCENDING: "ASCENDING";
858
+ DESCENDING: "DESCENDING";
859
+ }>>;
860
+ }, z.core.$strict>;
861
+ /** LinkedIn Marketing202608 adTargetTemplates and Rest.li paging contracts checked2026-11-04. */
862
+ declare class LinkedInAudienceService {
863
+ private readonly client;
864
+ private readonly provider;
865
+ constructor(client: LinkedInAdsClient, provider: LinkedInAdsProvider);
866
+ supports(tool: string): boolean;
867
+ private account;
868
+ private owned;
869
+ list(raw: z.input<typeof listInput$1>): Promise<{
870
+ notes: string[];
871
+ next_start?: number | undefined;
872
+ elements: {
873
+ snapshot_hash: string;
874
+ id: string;
875
+ account: string;
876
+ name: string;
877
+ targetingCriteria: {
878
+ include: {
879
+ and: {
880
+ or: Record<string, string[]>;
881
+ }[];
882
+ };
883
+ exclude?: {
884
+ or: Record<string, string[]>;
885
+ } | undefined;
886
+ };
887
+ description?: string | undefined;
888
+ approximateMemberCount?: number | undefined;
889
+ created?: {
890
+ [x: string]: unknown;
891
+ time: number;
892
+ actor?: string | undefined;
893
+ } | undefined;
894
+ lastModified?: {
895
+ [x: string]: unknown;
896
+ time: number;
897
+ actor?: string | undefined;
898
+ } | undefined;
899
+ }[];
900
+ truncated: boolean;
901
+ complete: boolean | null;
902
+ paging?: {
903
+ [x: string]: unknown;
904
+ start: number;
905
+ count: number;
906
+ total?: number | undefined;
907
+ links?: {
908
+ [x: string]: unknown;
909
+ rel: string;
910
+ }[] | undefined;
911
+ } | undefined;
912
+ account_id: string;
913
+ account_snapshot_hash: string;
914
+ account: {
915
+ [x: string]: unknown;
916
+ id: number;
917
+ name: string;
918
+ currency: string;
919
+ status: string;
920
+ test?: boolean | undefined;
921
+ };
922
+ }>;
923
+ get(account: string, templateId: string): Promise<{
924
+ template: {
925
+ snapshot_hash: string;
926
+ id: string;
927
+ account: string;
928
+ name: string;
929
+ targetingCriteria: {
930
+ include: {
931
+ and: {
932
+ or: Record<string, string[]>;
933
+ }[];
934
+ };
935
+ exclude?: {
936
+ or: Record<string, string[]>;
937
+ } | undefined;
938
+ };
939
+ description?: string | undefined;
940
+ approximateMemberCount?: number | undefined;
941
+ created?: {
942
+ [x: string]: unknown;
943
+ time: number;
944
+ actor?: string | undefined;
945
+ } | undefined;
946
+ lastModified?: {
947
+ [x: string]: unknown;
948
+ time: number;
949
+ actor?: string | undefined;
950
+ } | undefined;
951
+ };
952
+ account_id: string;
953
+ account_snapshot_hash: string;
954
+ account: {
955
+ [x: string]: unknown;
956
+ id: number;
957
+ name: string;
958
+ currency: string;
959
+ status: string;
960
+ test?: boolean | undefined;
961
+ };
962
+ }>;
963
+ plan(op: WriteOperation): Promise<Plan$3>;
964
+ private matches;
965
+ }
966
+
967
+ declare const demographicInput: z.ZodObject<{
968
+ account_id: z.ZodString;
969
+ pivot: z.ZodEnum<{
970
+ MEMBER_COMPANY_SIZE: "MEMBER_COMPANY_SIZE";
971
+ MEMBER_INDUSTRY: "MEMBER_INDUSTRY";
972
+ MEMBER_SENIORITY: "MEMBER_SENIORITY";
973
+ MEMBER_JOB_TITLE: "MEMBER_JOB_TITLE";
974
+ MEMBER_JOB_FUNCTION: "MEMBER_JOB_FUNCTION";
975
+ MEMBER_COUNTRY_V2: "MEMBER_COUNTRY_V2";
976
+ MEMBER_REGION_V2: "MEMBER_REGION_V2";
977
+ MEMBER_COMPANY: "MEMBER_COMPANY";
978
+ }>;
979
+ date_range: z.ZodObject<{
980
+ start: z.ZodISODate;
981
+ end: z.ZodISODate;
982
+ }, z.core.$strict>;
983
+ time_granularity: z.ZodDefault<z.ZodEnum<{
984
+ DAILY: "DAILY";
985
+ ALL: "ALL";
986
+ MONTHLY: "MONTHLY";
987
+ YEARLY: "YEARLY";
988
+ }>>;
989
+ metrics: z.ZodDefault<z.ZodArray<z.ZodEnum<{
990
+ costInLocalCurrency: "costInLocalCurrency";
991
+ impressions: "impressions";
992
+ clicks: "clicks";
993
+ externalWebsiteConversions: "externalWebsiteConversions";
994
+ landingPageClicks: "landingPageClicks";
995
+ costInUsd: "costInUsd";
996
+ externalWebsitePostClickConversions: "externalWebsitePostClickConversions";
997
+ externalWebsitePostViewConversions: "externalWebsitePostViewConversions";
998
+ oneClickLeads: "oneClickLeads";
999
+ oneClickLeadFormOpens: "oneClickLeadFormOpens";
1000
+ totalEngagements: "totalEngagements";
1001
+ reactions: "reactions";
1002
+ comments: "comments";
1003
+ shares: "shares";
1004
+ follows: "follows";
1005
+ videoViews: "videoViews";
1006
+ videoCompletions: "videoCompletions";
1007
+ opens: "opens";
1008
+ sends: "sends";
1009
+ }>>>;
1010
+ campaign_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
1011
+ limit: z.ZodDefault<z.ZodNumber>;
1012
+ resolve_names: z.ZodDefault<z.ZodBoolean>;
1013
+ locale: z.ZodOptional<z.ZodObject<{
1014
+ language: z.ZodString;
1015
+ country: z.ZodString;
1016
+ }, z.core.$strict>>;
1017
+ }, z.core.$strict>;
1018
+ declare const resolveEntitiesInput: z.ZodObject<{
1019
+ account_id: z.ZodString;
1020
+ urns: z.ZodArray<z.ZodString>;
1021
+ locale: z.ZodOptional<z.ZodObject<{
1022
+ language: z.ZodString;
1023
+ country: z.ZodString;
1024
+ }, z.core.$strict>>;
1025
+ }, z.core.$strict>;
1026
+ /** Marketing202608 analytics/URN finder contracts checked against official docs 2026-11-05. */
1027
+ declare class LinkedInReportingService {
1028
+ private readonly client;
1029
+ private readonly provider;
1030
+ constructor(client: LinkedInAdsClient, provider: LinkedInAdsProvider);
1031
+ private names;
1032
+ resolveEntities(raw: z.input<typeof resolveEntitiesInput>): Promise<{
1033
+ records: {
1034
+ facets: string[];
1035
+ names?: string[] | undefined;
1036
+ id: string;
1037
+ name: string;
1038
+ }[];
1039
+ notes: string[];
1040
+ entities: {
1041
+ names: string[];
1042
+ facet_urns: string[];
1043
+ name?: string | undefined;
1044
+ urn: string;
1045
+ }[];
1046
+ unresolved_urns: string[];
1047
+ ambiguous_urns: string[];
1048
+ elements: {
1049
+ urn: string;
1050
+ name: string;
1051
+ facetUrn?: string | undefined;
1052
+ }[];
1053
+ paging?: {
1054
+ start?: number | undefined;
1055
+ count?: number | undefined;
1056
+ total?: number | undefined;
1057
+ links?: {
1058
+ rel: string;
1059
+ }[] | undefined;
1060
+ } | undefined;
1061
+ account_id: string;
1062
+ }>;
1063
+ demographics(raw: z.input<typeof demographicInput>): Promise<{
1064
+ account_id: string;
1065
+ currency: string;
1066
+ request: {
1067
+ account_id: string;
1068
+ pivot: "MEMBER_COMPANY_SIZE" | "MEMBER_INDUSTRY" | "MEMBER_SENIORITY" | "MEMBER_JOB_TITLE" | "MEMBER_JOB_FUNCTION" | "MEMBER_COUNTRY_V2" | "MEMBER_REGION_V2" | "MEMBER_COMPANY";
1069
+ date_range: {
1070
+ start: string;
1071
+ end: string;
1072
+ };
1073
+ time_granularity: "DAILY" | "ALL" | "MONTHLY" | "YEARLY";
1074
+ metrics: ("costInLocalCurrency" | "impressions" | "clicks" | "externalWebsiteConversions" | "landingPageClicks" | "costInUsd" | "externalWebsitePostClickConversions" | "externalWebsitePostViewConversions" | "oneClickLeads" | "oneClickLeadFormOpens" | "totalEngagements" | "reactions" | "comments" | "shares" | "follows" | "videoViews" | "videoCompletions" | "opens" | "sends")[];
1075
+ limit: number;
1076
+ resolve_names: boolean;
1077
+ campaign_ids?: string[] | undefined;
1078
+ locale?: {
1079
+ language: string;
1080
+ country: string;
1081
+ } | undefined;
1082
+ };
1083
+ rows: {
1084
+ name?: string | undefined;
1085
+ urn: string;
1086
+ date_range: {
1087
+ start: string;
1088
+ end: string;
1089
+ };
1090
+ metrics: {
1091
+ [k: string]: string | number | null;
1092
+ };
1093
+ }[];
1094
+ records: {
1095
+ period: string;
1096
+ name: string;
1097
+ }[];
1098
+ returned_native_rows: number;
1099
+ truncated: boolean;
1100
+ complete: boolean;
1101
+ coverage: {
1102
+ approximate: boolean;
1103
+ minimum_events: number;
1104
+ top_values_per_creative_day: number;
1105
+ native_row_limit: number;
1106
+ pagination_supported: boolean;
1107
+ };
1108
+ notes: string[];
1109
+ }>;
1110
+ }
1111
+
1112
+ type Plan$2 = Omit<WritePreview, 'serverValidated'> & {
1113
+ execute(): Promise<WriteResult>;
1114
+ };
1115
+ declare const listInput: z.ZodObject<{
1116
+ include_shared: z.ZodDefault<z.ZodBoolean>;
1117
+ start: z.ZodDefault<z.ZodNumber>;
1118
+ count: z.ZodDefault<z.ZodNumber>;
1119
+ account_id: z.ZodString;
1120
+ }, z.core.$strict>;
1121
+ declare const associationInput: z.ZodObject<{
1122
+ complete_snapshot: z.ZodDefault<z.ZodBoolean>;
1123
+ start: z.ZodDefault<z.ZodNumber>;
1124
+ count: z.ZodDefault<z.ZodNumber>;
1125
+ account_id: z.ZodString;
1126
+ campaign_id: z.ZodString;
1127
+ }, z.core.$strict>;
1128
+ /** Marketing202608 conversion tracking and Conversions API contracts checked2026-11-05. */
1129
+ declare class LinkedInMeasurementService {
1130
+ private readonly client;
1131
+ private readonly provider;
1132
+ constructor(client: LinkedInAdsClient, provider: LinkedInAdsProvider);
1133
+ supports(tool: string): boolean;
1134
+ private account;
1135
+ private owned;
1136
+ private ownedConversion;
1137
+ private conversionRecord;
1138
+ conversions(raw: z.input<typeof listInput>): Promise<{
1139
+ notes?: string[] | undefined;
1140
+ next_start?: number | undefined;
1141
+ truncated: boolean;
1142
+ complete: boolean | null;
1143
+ elements: ({
1144
+ editable: boolean;
1145
+ id: string;
1146
+ account: string;
1147
+ name: string;
1148
+ type: string;
1149
+ enabled: boolean;
1150
+ conversionMethod?: string | undefined;
1151
+ ownershipType?: "OWNED" | "SHARED" | undefined;
1152
+ attributionType?: string | undefined;
1153
+ postClickAttributionWindowSize?: number | undefined;
1154
+ viewThroughAttributionWindowSize?: number | undefined;
1155
+ value?: {
1156
+ currencyCode: string;
1157
+ amount: string;
1158
+ } | undefined;
1159
+ valueType?: string | undefined;
1160
+ urlMatchRuleExpression?: {
1161
+ matchType: "EXACT" | "STARTS_WITH" | "CONTAINS";
1162
+ matchValue: string;
1163
+ }[][] | undefined;
1164
+ campaigns?: string[] | undefined;
1165
+ associatedCampaigns?: {
1166
+ [x: string]: unknown;
1167
+ campaign: string;
1168
+ conversion: string;
1169
+ associatedAt?: number | undefined;
1170
+ }[] | undefined;
1171
+ lastModified?: number | undefined;
1172
+ imagePixelTag?: string | undefined;
1173
+ } | {
1174
+ editable: boolean;
1175
+ snapshot_hash: string;
1176
+ id: string;
1177
+ account: string;
1178
+ name: string;
1179
+ type: string;
1180
+ enabled: boolean;
1181
+ conversionMethod?: string | undefined;
1182
+ ownershipType?: "OWNED" | "SHARED" | undefined;
1183
+ attributionType?: string | undefined;
1184
+ postClickAttributionWindowSize?: number | undefined;
1185
+ viewThroughAttributionWindowSize?: number | undefined;
1186
+ value?: {
1187
+ currencyCode: string;
1188
+ amount: string;
1189
+ } | undefined;
1190
+ valueType?: string | undefined;
1191
+ urlMatchRuleExpression?: {
1192
+ matchType: "EXACT" | "STARTS_WITH" | "CONTAINS";
1193
+ matchValue: string;
1194
+ }[][] | undefined;
1195
+ campaigns?: string[] | undefined;
1196
+ associatedCampaigns?: {
1197
+ [x: string]: unknown;
1198
+ campaign: string;
1199
+ conversion: string;
1200
+ associatedAt?: number | undefined;
1201
+ }[] | undefined;
1202
+ lastModified?: number | undefined;
1203
+ imagePixelTag?: string | undefined;
1204
+ })[];
1205
+ records: {
1206
+ view_window_days?: number | undefined;
1207
+ click_window_days?: number | undefined;
1208
+ value?: string | undefined;
1209
+ id: string;
1210
+ name: string;
1211
+ type: string;
1212
+ status: string;
1213
+ source: string;
1214
+ }[];
1215
+ paging?: {
1216
+ [x: string]: unknown;
1217
+ start: number;
1218
+ count: number;
1219
+ total?: number | undefined;
1220
+ links?: {
1221
+ [x: string]: unknown;
1222
+ rel: string;
1223
+ href?: string | undefined;
1224
+ }[] | undefined;
1225
+ } | undefined;
1226
+ account_id: string;
1227
+ currency: string;
1228
+ account_snapshot_hash: string;
1229
+ }>;
1230
+ getConversion(account: string, conversionId: string): Promise<{
1231
+ conversion: {
1232
+ snapshot_hash: string;
1233
+ id: string;
1234
+ account: string;
1235
+ name: string;
1236
+ type: string;
1237
+ enabled: boolean;
1238
+ conversionMethod?: string | undefined;
1239
+ ownershipType?: "OWNED" | "SHARED" | undefined;
1240
+ attributionType?: string | undefined;
1241
+ postClickAttributionWindowSize?: number | undefined;
1242
+ viewThroughAttributionWindowSize?: number | undefined;
1243
+ value?: {
1244
+ currencyCode: string;
1245
+ amount: string;
1246
+ } | undefined;
1247
+ valueType?: string | undefined;
1248
+ urlMatchRuleExpression?: {
1249
+ matchType: "EXACT" | "STARTS_WITH" | "CONTAINS";
1250
+ matchValue: string;
1251
+ }[][] | undefined;
1252
+ campaigns?: string[] | undefined;
1253
+ associatedCampaigns?: {
1254
+ [x: string]: unknown;
1255
+ campaign: string;
1256
+ conversion: string;
1257
+ associatedAt?: number | undefined;
1258
+ }[] | undefined;
1259
+ lastModified?: number | undefined;
1260
+ imagePixelTag?: string | undefined;
1261
+ };
1262
+ records: {
1263
+ view_window_days?: number | undefined;
1264
+ click_window_days?: number | undefined;
1265
+ value?: string | undefined;
1266
+ id: string;
1267
+ name: string;
1268
+ type: string;
1269
+ status: string;
1270
+ source: string;
1271
+ }[];
1272
+ account_id: string;
1273
+ currency: string;
1274
+ account_snapshot_hash: string;
1275
+ }>;
1276
+ private tags;
1277
+ insightTags(account: string): Promise<{
1278
+ elements: {
1279
+ snapshot_hash: string;
1280
+ id: string;
1281
+ sponsoredAccounts: string[];
1282
+ firstPartyTrackingEnabled: boolean;
1283
+ tag?: string | undefined;
1284
+ }[];
1285
+ records: {
1286
+ id: string;
1287
+ first_party_tracking_enabled: boolean;
1288
+ associated_accounts: string[];
1289
+ shared: boolean;
1290
+ }[];
1291
+ complete: boolean;
1292
+ notes: string[];
1293
+ account_id: string;
1294
+ currency: string;
1295
+ account_snapshot_hash: string;
1296
+ }>;
1297
+ domains(raw: {
1298
+ account_id: string;
1299
+ start?: number;
1300
+ count?: number;
1301
+ }): Promise<{
1302
+ notes?: string[] | undefined;
1303
+ next_start?: number | undefined;
1304
+ truncated: boolean;
1305
+ complete: boolean | null;
1306
+ records: {
1307
+ last_callback_at?: number | undefined;
1308
+ domain: string;
1309
+ status: string;
1310
+ }[];
1311
+ elements: {
1312
+ [x: string]: unknown;
1313
+ domainName: string;
1314
+ insightTag: string;
1315
+ blocked: boolean;
1316
+ created?: number | undefined;
1317
+ lastCallbackAt?: number | undefined;
1318
+ }[];
1319
+ paging?: {
1320
+ [x: string]: unknown;
1321
+ start: number;
1322
+ count: number;
1323
+ total?: number | undefined;
1324
+ links?: {
1325
+ [x: string]: unknown;
1326
+ rel: string;
1327
+ href?: string | undefined;
1328
+ }[] | undefined;
1329
+ } | undefined;
1330
+ account_id: string;
1331
+ currency: string;
1332
+ account_snapshot_hash: string;
1333
+ }>;
1334
+ campaignConversions(raw: z.input<typeof associationInput>): Promise<{
1335
+ associations_snapshot_hash?: string | undefined;
1336
+ notes?: string[] | undefined;
1337
+ next_start?: number | undefined;
1338
+ truncated: boolean;
1339
+ complete: boolean | null;
1340
+ records: {
1341
+ associated_at?: number | undefined;
1342
+ conversion: string;
1343
+ campaign: string;
1344
+ }[];
1345
+ elements: {
1346
+ [x: string]: unknown;
1347
+ campaign: string;
1348
+ conversion: string;
1349
+ associatedAt?: number | undefined;
1350
+ }[];
1351
+ paging?: {
1352
+ [x: string]: unknown;
1353
+ start: number;
1354
+ count: number;
1355
+ total?: number | undefined;
1356
+ links?: {
1357
+ [x: string]: unknown;
1358
+ rel: string;
1359
+ href?: string | undefined;
1360
+ }[] | undefined;
1361
+ } | undefined;
1362
+ campaign_id: string;
1363
+ account_id: string;
1364
+ currency: string;
1365
+ account_snapshot_hash: string;
1366
+ }>;
1367
+ private completeAssociations;
1368
+ private validateConfiguration;
1369
+ private verified;
1370
+ plan(op: WriteOperation): Promise<Plan$2>;
1371
+ }
1372
+
1373
+ type Row = Record<string, unknown>;
1374
+ type Plan$1 = Omit<WritePreview, 'serverValidated'> & {
1375
+ execute(): Promise<WriteResult>;
1376
+ };
1377
+ declare const leadBinding: z.ZodObject<{
1378
+ form_id: z.ZodString;
1379
+ expected_form_hash: z.ZodString;
1380
+ expected_campaign_hash: z.ZodString;
1381
+ label: z.ZodEnum<{
1382
+ LEARN_MORE: "LEARN_MORE";
1383
+ APPLY: "APPLY";
1384
+ DOWNLOAD: "DOWNLOAD";
1385
+ VIEW_QUOTE: "VIEW_QUOTE";
1386
+ SIGN_UP: "SIGN_UP";
1387
+ SUBSCRIBE: "SUBSCRIBE";
1388
+ REGISTER: "REGISTER";
1389
+ REQUEST_DEMO: "REQUEST_DEMO";
1390
+ JOIN: "JOIN";
1391
+ ATTEND: "ATTEND";
1392
+ UNLOCK_FULL_DOCUMENT: "UNLOCK_FULL_DOCUMENT";
1393
+ SHOP_NOW: "SHOP_NOW";
1394
+ BUY_NOW: "BUY_NOW";
1395
+ SEE_MORE: "SEE_MORE";
1396
+ }>;
1397
+ gated_preview_page_count: z.ZodOptional<z.ZodNumber>;
1398
+ confirm_public_post: z.ZodOptional<z.ZodLiteral<true>>;
1399
+ expected_source_hash: z.ZodOptional<z.ZodString>;
1400
+ }, z.core.$strict>;
1401
+ /** LinkedIn-owned Creatives, Lead Forms, Document Ads and campaign-objective contracts, 202608; checked 2026-11-05. */
1402
+ declare class LinkedInLeadCreativeService {
1403
+ private readonly client;
1404
+ private readonly provider;
1405
+ constructor(client: LinkedInAdsClient, provider: LinkedInAdsProvider);
1406
+ supports(tool: string): tool is "linkedin_set_creative_lead_form";
1407
+ campaignHash(campaign: Row): string;
1408
+ creativeHash(creative: Row): string;
1409
+ sourceHash(creative: Row): string;
1410
+ campaign(campaign: Row, contentFormat?: string): void;
1411
+ private form;
1412
+ createBinding(account: string, campaign: Row, raw: z.infer<typeof leadBinding>, contentFormat: string): Promise<{
1413
+ destination: string;
1414
+ label: "LEARN_MORE" | "APPLY" | "DOWNLOAD" | "VIEW_QUOTE" | "SIGN_UP" | "SUBSCRIBE" | "REGISTER" | "REQUEST_DEMO" | "JOIN" | "ATTEND" | "UNLOCK_FULL_DOCUMENT" | "SHOP_NOW" | "BUY_NOW" | "SEE_MORE";
1415
+ }>;
1416
+ context(input: {
1417
+ account_id: string;
1418
+ form_id: string;
1419
+ campaign_id?: string;
1420
+ source_creative_id?: string;
1421
+ }): Promise<{
1422
+ notes: string[];
1423
+ source_creative?: {
1424
+ [x: string]: unknown;
1425
+ id: string;
1426
+ account: string;
1427
+ campaign: string;
1428
+ intendedStatus: string;
1429
+ content?: Record<string, unknown> | undefined;
1430
+ } | undefined;
1431
+ source_snapshot_hash?: string | undefined;
1432
+ campaign?: {
1433
+ [x: string]: unknown;
1434
+ id: number;
1435
+ name: string;
1436
+ account: string;
1437
+ status: string;
1438
+ dailyBudget?: {
1439
+ amount: string;
1440
+ currencyCode: string;
1441
+ } | undefined;
1442
+ totalBudget?: {
1443
+ amount: string;
1444
+ currencyCode: string;
1445
+ } | undefined;
1446
+ campaignGroup?: string | undefined;
1447
+ } | undefined;
1448
+ campaign_snapshot_hash?: string | undefined;
1449
+ form: {
1450
+ snapshot_hash: string;
1451
+ id: string;
1452
+ owner: {
1453
+ sponsoredAccount: string;
1454
+ } | {
1455
+ organization: string;
1456
+ };
1457
+ creationLocale: {
1458
+ country: string;
1459
+ language: string;
1460
+ variant?: string | undefined;
1461
+ };
1462
+ name: string;
1463
+ state: string;
1464
+ content: Record<string, unknown>;
1465
+ hiddenFields?: Record<string, unknown>[] | undefined;
1466
+ versionId?: number | undefined;
1467
+ versionTag?: string | undefined;
1468
+ created?: number | undefined;
1469
+ lastModified?: number | undefined;
1470
+ };
1471
+ records: {
1472
+ version?: number | undefined;
1473
+ questions?: number | undefined;
1474
+ headline?: string | undefined;
1475
+ id: string;
1476
+ name: string;
1477
+ status: string;
1478
+ locale: string;
1479
+ }[];
1480
+ account_id: string;
1481
+ currency: string;
1482
+ account_snapshot_hash: string;
1483
+ }>;
1484
+ get(account: string, creativeId: string, includePreview?: boolean): Promise<{
1485
+ creatives: {
1486
+ id: string;
1487
+ provider: string;
1488
+ account_id: string;
1489
+ name: string;
1490
+ type: string;
1491
+ headlines: string[];
1492
+ descriptions: string[];
1493
+ landing_urls: string[];
1494
+ media: {
1495
+ type: "image" | "video" | "audio";
1496
+ url: string;
1497
+ alt?: string | undefined;
1498
+ poster_url?: string | undefined;
1499
+ open_url?: string | undefined;
1500
+ }[];
1501
+ actions: {
1502
+ label: string;
1503
+ tool: string;
1504
+ arguments: Record<string, unknown>;
1505
+ fields: {
1506
+ key: string;
1507
+ label: string;
1508
+ type: "text" | "text_list" | "url_list" | "select";
1509
+ value: string | string[];
1510
+ options?: {
1511
+ label: string;
1512
+ value: string;
1513
+ }[] | undefined;
1514
+ max_length?: number | undefined;
1515
+ }[];
1516
+ }[];
1517
+ status?: string | undefined;
1518
+ campaign_id?: string | undefined;
1519
+ ad_group_id?: string | undefined;
1520
+ }[];
1521
+ warnings: {
1522
+ provider: string;
1523
+ message: string;
1524
+ }[];
1525
+ truncated: boolean;
1526
+ notes: string[];
1527
+ form?: {
1528
+ snapshot_hash: string;
1529
+ id: string;
1530
+ owner: {
1531
+ sponsoredAccount: string;
1532
+ } | {
1533
+ organization: string;
1534
+ };
1535
+ creationLocale: {
1536
+ country: string;
1537
+ language: string;
1538
+ variant?: string | undefined;
1539
+ };
1540
+ name: string;
1541
+ state: string;
1542
+ content: Record<string, unknown>;
1543
+ hiddenFields?: Record<string, unknown>[] | undefined;
1544
+ versionId?: number | undefined;
1545
+ versionTag?: string | undefined;
1546
+ created?: number | undefined;
1547
+ lastModified?: number | undefined;
1548
+ } | undefined;
1549
+ creative_snapshot_hash: string;
1550
+ campaign_snapshot_hash: string;
1551
+ account_id: string;
1552
+ creative: {
1553
+ [x: string]: unknown;
1554
+ id: string;
1555
+ account: string;
1556
+ campaign: string;
1557
+ intendedStatus: string;
1558
+ content?: Record<string, unknown> | undefined;
1559
+ leadgenCallToAction?: {
1560
+ [x: string]: unknown;
1561
+ destination: string;
1562
+ label: string;
1563
+ } | undefined;
1564
+ };
1565
+ campaign: {
1566
+ [x: string]: unknown;
1567
+ id: number;
1568
+ name: string;
1569
+ account: string;
1570
+ status: string;
1571
+ dailyBudget?: {
1572
+ amount: string;
1573
+ currencyCode: string;
1574
+ } | undefined;
1575
+ totalBudget?: {
1576
+ amount: string;
1577
+ currencyCode: string;
1578
+ } | undefined;
1579
+ campaignGroup?: string | undefined;
1580
+ };
1581
+ }>;
1582
+ assertUnusedDocument(account: string, resource: string): Promise<void>;
1583
+ plan(op: WriteOperation): Promise<Plan$1>;
1584
+ }
1585
+
1586
+ type Plan = Omit<WritePreview, 'serverValidated'> & {
1587
+ execute(): Promise<WriteResult>;
1588
+ };
1589
+ declare const pageInput: z.ZodObject<{
1590
+ account_id: z.ZodString;
1591
+ start: z.ZodDefault<z.ZodNumber>;
1592
+ count: z.ZodDefault<z.ZodNumber>;
1593
+ }, z.core.$strict>;
1594
+ /** Official Marketing202608 leadForms/lead-sync-schema contracts checked2026-11-05. */
1595
+ declare class LinkedInLeadFormService {
1596
+ private readonly client;
1597
+ private readonly provider;
1598
+ constructor(client: LinkedInAdsClient, provider: LinkedInAdsProvider);
1599
+ supports(tool: string): boolean;
1600
+ private context;
1601
+ private owned;
1602
+ private one;
1603
+ private record;
1604
+ list(raw: z.input<typeof pageInput>): Promise<{
1605
+ notes: string[];
1606
+ next_start?: number | undefined;
1607
+ truncated: boolean;
1608
+ complete: boolean | null;
1609
+ elements: {
1610
+ snapshot_hash: string;
1611
+ id: string;
1612
+ owner: {
1613
+ sponsoredAccount: string;
1614
+ } | {
1615
+ organization: string;
1616
+ };
1617
+ creationLocale: {
1618
+ country: string;
1619
+ language: string;
1620
+ variant?: string | undefined;
1621
+ };
1622
+ name: string;
1623
+ state: string;
1624
+ content: Record<string, unknown>;
1625
+ hiddenFields?: Record<string, unknown>[] | undefined;
1626
+ versionId?: number | undefined;
1627
+ versionTag?: string | undefined;
1628
+ created?: number | undefined;
1629
+ lastModified?: number | undefined;
1630
+ }[];
1631
+ records: {
1632
+ version?: number | undefined;
1633
+ questions?: number | undefined;
1634
+ headline?: string | undefined;
1635
+ id: string;
1636
+ name: string;
1637
+ status: string;
1638
+ locale: string;
1639
+ }[];
1640
+ paging?: {
1641
+ [x: string]: unknown;
1642
+ start: number;
1643
+ count: number;
1644
+ total?: number | undefined;
1645
+ links?: {
1646
+ [x: string]: unknown;
1647
+ rel: string;
1648
+ href?: string | undefined;
1649
+ }[] | undefined;
1650
+ } | undefined;
1651
+ account_id: string;
1652
+ currency: string;
1653
+ account_snapshot_hash: string;
1654
+ }>;
1655
+ get(selected: string, form: string): Promise<{
1656
+ form: {
1657
+ snapshot_hash: string;
1658
+ id: string;
1659
+ owner: {
1660
+ sponsoredAccount: string;
1661
+ } | {
1662
+ organization: string;
1663
+ };
1664
+ creationLocale: {
1665
+ country: string;
1666
+ language: string;
1667
+ variant?: string | undefined;
1668
+ };
1669
+ name: string;
1670
+ state: string;
1671
+ content: Record<string, unknown>;
1672
+ hiddenFields?: Record<string, unknown>[] | undefined;
1673
+ versionId?: number | undefined;
1674
+ versionTag?: string | undefined;
1675
+ created?: number | undefined;
1676
+ lastModified?: number | undefined;
1677
+ };
1678
+ records: {
1679
+ version?: number | undefined;
1680
+ questions?: number | undefined;
1681
+ headline?: string | undefined;
1682
+ id: string;
1683
+ name: string;
1684
+ status: string;
1685
+ locale: string;
1686
+ }[];
1687
+ notes: string[];
1688
+ account_id: string;
1689
+ currency: string;
1690
+ account_snapshot_hash: string;
1691
+ }>;
1692
+ private verified;
1693
+ plan(op: WriteOperation): Promise<Plan>;
1694
+ }
1695
+
44
1696
  declare class LinkedInAdsProvider implements AdProvider {
45
1697
  private readonly client;
46
1698
  readonly id = "linkedin";
47
- constructor(client: LinkedInAdsClient);
1699
+ readonly creatives: LinkedInCreativeService;
1700
+ readonly management: LinkedInManagementService;
1701
+ readonly media: LinkedInMediaService;
1702
+ readonly sponsored: LinkedInSponsoredService;
1703
+ readonly planning: LinkedInPlanningService;
1704
+ readonly audiences: LinkedInAudienceService;
1705
+ readonly reporting: LinkedInReportingService;
1706
+ readonly measurement: LinkedInMeasurementService;
1707
+ readonly leadCreatives: LinkedInLeadCreativeService;
1708
+ readonly leadForms: LinkedInLeadFormService;
1709
+ constructor(client: LinkedInAdsClient, media?: MediaResolver);
48
1710
  capabilities(): {
49
1711
  serverDryRun: boolean;
50
1712
  };
@@ -114,4 +1776,4 @@ declare function linkedInTokensData(tokens: LinkedInTokens): Record<string, stri
114
1776
  declare function resolveLinkedInCredentials(store: CredentialStore): Promise<LinkedInCredentials | undefined>;
115
1777
  declare function createLinkedInModule(store: CredentialStore): Promise<ProviderModule | undefined>;
116
1778
 
117
- export { LINKEDIN_API_BASE, LINKEDIN_API_VERSION, LINKEDIN_TOKEN_URL, LinkedInAdsClient, LinkedInAdsProvider, type LinkedInCredentials, type LinkedInTokens, buildLinkedInAuthUrl, createLinkedInModule, exchangeLinkedInCode, linkedInTokensData, linkedinTools, resolveLinkedInCredentials, restli };
1779
+ export { LINKEDIN_API_BASE, LINKEDIN_API_VERSION, LINKEDIN_CREATIVE_METADATA_VERSION, LINKEDIN_TOKEN_URL, LinkedInAdsClient, LinkedInAdsProvider, type LinkedInCredentials, type LinkedInTokens, buildLinkedInAuthUrl, createLinkedInModule, exchangeLinkedInCode, linkedInTokensData, linkedinTools, resolveLinkedInCredentials, restli };