@adport/provider-google 0.8.0 → 0.9.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,5 +1,7 @@
1
- import { AdProvider, ProviderCapabilities, StandardActions, Account, NormalizedQuery, Report, WriteOperation, WriteGuard, WritePreview, WriteResult, AnyToolDefinition, CredentialStore, ProviderModule } from '@adport/core';
1
+ import { MediaResolver, WriteOperation, WritePreview, WriteGuard, AdProvider, ProviderCapabilities, StandardActions, Account, NormalizedQuery, Report, WriteResult, AnyToolDefinition, CredentialStore, ProviderModule } from '@adport/core';
2
+ import { z } from 'zod';
2
3
 
4
+ declare const GOOGLE_DATA_MANAGER_SCOPE = "https://www.googleapis.com/auth/datamanager";
3
5
  /**
4
6
  * Matches the google-ads.yaml naming conventions so credentials translate 1:1.
5
7
  */
@@ -19,6 +21,8 @@ interface SearchOptions {
19
21
  maxRows?: number;
20
22
  /** Override the manager context for this search; null explicitly omits it. */
21
23
  loginCustomerId?: string | null;
24
+ /** Explicitly include native in-design experiment campaigns and their children. */
25
+ includeDrafts?: boolean;
22
26
  }
23
27
  declare const DEFAULT_API_VERSION = "v25";
24
28
  declare function normalizeCustomerId(id: string): string;
@@ -35,24 +39,45 @@ declare class GoogleAdsRestClient {
35
39
  constructor(credentials: GoogleCredentials, version?: string, fetchImpl?: typeof fetch);
36
40
  setLoginCustomerId(customerId: string, loginCustomerId: string): void;
37
41
  getAccessToken(): Promise<string>;
42
+ dataManagerLoginAccount(customerId: string): string;
43
+ dataManagerAccess(): Promise<{
44
+ required_scope: string;
45
+ scope_status: "GRANTED" | "MISSING" | "UNKNOWN";
46
+ }>;
47
+ private dataManagerReceiptKey;
48
+ dataManagerReceipt(value: Record<string, unknown>): string;
49
+ verifyDataManagerReceipt(receipt: string): unknown;
50
+ dataManagerRequest(method: 'ingest' | 'status', input: Record<string, unknown>): Promise<Record<string, unknown>>;
38
51
  private request;
39
52
  listAccessibleCustomers(): Promise<string[]>;
53
+ keywordPlanning(customerId: string, method: 'generateKeywordIdeas' | 'generateKeywordHistoricalMetrics', body: Record<string, unknown>): Promise<Record<string, unknown>>;
54
+ fieldMetadata(query: string, pageSize: number, pageToken?: string): Promise<{
55
+ apiVersion: string;
56
+ response: Record<string, unknown>;
57
+ }>;
58
+ uploadConversions(customerId: string, method: 'uploadClickConversions' | 'uploadCallConversions' | 'uploadConversionAdjustments', rows: Array<Record<string, unknown>>, validateOnly: boolean, jobId?: number): Promise<Record<string, unknown>>;
40
59
  /** Paged GAQL search; accumulates rows up to options.maxRows (default 1000). */
41
60
  search(customerId: string, query: string, options?: SearchOptions): Promise<Array<Record<string, unknown>>>;
42
61
  /**
43
62
  * Service-specific mutate (campaigns, campaignBudgets, adGroups, adGroupCriteria, adGroupAds).
44
63
  * validateOnly=true is the server-side dry run.
45
64
  */
46
- mutate(customerId: string, service: string, operations: Array<Record<string, unknown>>, { validateOnly }: {
65
+ mutate(customerId: string, service: string, operations: Array<Record<string, unknown>>, { validateOnly, responseContentType }: {
47
66
  validateOnly: boolean;
67
+ responseContentType?: 'MUTABLE_RESOURCE';
48
68
  }): Promise<{
49
69
  results?: Array<{
50
70
  resourceName?: string;
71
+ experimentArm?: Record<string, unknown>;
51
72
  }>;
52
73
  }>;
74
+ experimentAction(customerId: string, experimentId: string, action: 'endExperiment' | 'scheduleExperiment' | 'promoteExperiment' | 'graduateExperiment', payload: Record<string, unknown>, validateOnly: boolean): Promise<Record<string, unknown>>;
75
+ experimentAsyncErrors(customerId: string, experimentId: string, pageSize: number, pageToken?: string): Promise<Record<string, unknown>>;
76
+ experimentOperation(customerId: string, operationName: string): Promise<Record<string, unknown>>;
53
77
  /** Cross-service atomic mutate (e.g. budget + campaign with temp resource ids). */
54
- googleAdsMutate(customerId: string, mutateOperations: Array<Record<string, unknown>>, { validateOnly }: {
78
+ googleAdsMutate(customerId: string, mutateOperations: Array<Record<string, unknown>>, { validateOnly, responseContentType }: {
55
79
  validateOnly: boolean;
80
+ responseContentType?: 'MUTABLE_RESOURCE';
56
81
  }): Promise<{
57
82
  mutateOperationResponses?: Array<Record<string, {
58
83
  resourceName?: string;
@@ -65,11 +90,600 @@ declare class GoogleAdsRestClient {
65
90
  */
66
91
  declare function formatGoogleAdsError(status: number, raw: string): string;
67
92
 
93
+ type Row$6 = Record<string, unknown>;
94
+ interface GoogleAssetPlan extends Omit<WritePreview, 'serverValidated'> {
95
+ execute: (validateOnly: boolean) => Promise<string[]>;
96
+ }
97
+ /** Assets are shared; their associations, rather than the asset, are removable. */
98
+ declare class GoogleAssetService {
99
+ private readonly client;
100
+ private readonly media;
101
+ constructor(client: GoogleAdsRestClient, media?: MediaResolver);
102
+ private resource;
103
+ owned(account: string, asset: string): Promise<Row$6>;
104
+ list(input: {
105
+ account_id: string;
106
+ asset_ids?: string[];
107
+ types?: string[];
108
+ after_asset_id?: string;
109
+ limit: number;
110
+ }): Promise<{
111
+ creatives: {
112
+ id: string;
113
+ provider: string;
114
+ account_id: string;
115
+ name: string;
116
+ type: string;
117
+ headlines: string[];
118
+ descriptions: string[];
119
+ landing_urls: string[];
120
+ media: {
121
+ type: "image" | "video" | "audio";
122
+ url: string;
123
+ alt?: string | undefined;
124
+ poster_url?: string | undefined;
125
+ open_url?: string | undefined;
126
+ }[];
127
+ actions: {
128
+ label: string;
129
+ tool: string;
130
+ arguments: Record<string, unknown>;
131
+ fields: {
132
+ key: string;
133
+ label: string;
134
+ type: "text" | "text_list" | "url_list" | "select";
135
+ value: string | string[];
136
+ options?: {
137
+ label: string;
138
+ value: string;
139
+ }[] | undefined;
140
+ max_length?: number | undefined;
141
+ }[];
142
+ }[];
143
+ status?: string | undefined;
144
+ campaign_id?: string | undefined;
145
+ ad_group_id?: string | undefined;
146
+ }[];
147
+ truncated: boolean;
148
+ assets: Record<string, unknown>[];
149
+ next_cursor?: string | undefined;
150
+ }>;
151
+ plan(op: WriteOperation): Promise<GoogleAssetPlan>;
152
+ }
153
+
154
+ type Row$5 = Record<string, unknown>;
155
+ declare const target$1: z.ZodObject<{
156
+ scope: z.ZodEnum<{
157
+ CUSTOMER: "CUSTOMER";
158
+ CAMPAIGN: "CAMPAIGN";
159
+ AD_GROUP: "AD_GROUP";
160
+ }>;
161
+ parent_id: z.ZodOptional<z.ZodString>;
162
+ }, z.core.$strip>;
163
+ declare class GoogleAssetLinks {
164
+ private readonly client;
165
+ private readonly assets;
166
+ constructor(client: GoogleAdsRestClient, assets: GoogleAssetService);
167
+ private parent;
168
+ private rows;
169
+ list(input: z.infer<typeof target$1> & {
170
+ account_id: string;
171
+ limit: number;
172
+ }): Promise<{
173
+ links: Row$5[];
174
+ truncated: boolean;
175
+ }>;
176
+ plan(op: WriteOperation, guard: WriteGuard): Promise<GoogleAssetPlan>;
177
+ }
178
+
179
+ type Row$4 = Record<string, unknown>;
180
+ declare const target: z.ZodDiscriminatedUnion<[z.ZodObject<{
181
+ type: z.ZodLiteral<"CAMPAIGN">;
182
+ campaign_id: z.ZodString;
183
+ }, z.core.$strip>, z.ZodObject<{
184
+ type: z.ZodLiteral<"AD_GROUP">;
185
+ campaign_id: z.ZodString;
186
+ ad_group_id: z.ZodString;
187
+ }, z.core.$strip>, z.ZodObject<{
188
+ type: z.ZodLiteral<"AD_GROUP_AD">;
189
+ campaign_id: z.ZodString;
190
+ ad_group_id: z.ZodString;
191
+ ad_id: z.ZodString;
192
+ }, z.core.$strip>, z.ZodObject<{
193
+ type: z.ZodLiteral<"AD_GROUP_CRITERION">;
194
+ campaign_id: z.ZodString;
195
+ ad_group_id: z.ZodString;
196
+ criterion_id: z.ZodString;
197
+ }, z.core.$strip>], "type">;
198
+ type Target = z.infer<typeof target>;
199
+ /** Wire contracts: googleapis/googleapis@57aa4dbc, Google Ads v25. */
200
+ declare class GoogleLabelService {
201
+ private readonly client;
202
+ constructor(client: GoogleAdsRestClient);
203
+ private labelResource;
204
+ private validateLabel;
205
+ list(input: {
206
+ account_id: string;
207
+ after_label_id?: string;
208
+ limit: number;
209
+ }): Promise<{
210
+ next_cursor?: string | undefined;
211
+ labels: Row$4[];
212
+ truncated: boolean;
213
+ }>;
214
+ get(accountId: string, labelId: string): Promise<{
215
+ label: Row$4;
216
+ snapshot_hash: string;
217
+ }>;
218
+ private checkedLabel;
219
+ private entityResource;
220
+ private checkTarget;
221
+ private links;
222
+ listAssociations(input: {
223
+ account_id: string;
224
+ target: Target;
225
+ limit: number;
226
+ }): Promise<{
227
+ associations: Row$4[];
228
+ truncated: boolean;
229
+ }>;
230
+ plan(op: WriteOperation): Promise<GoogleAssetPlan>;
231
+ }
232
+
233
+ type Row$3 = Record<string, unknown>;
234
+ type GoogleConversionPlan = Omit<WritePreview, 'serverValidated'> & {
235
+ execute: (validateOnly: boolean) => Promise<string[]>;
236
+ resultDetails?: () => unknown;
237
+ resultWarnings?: () => string[];
238
+ };
239
+ /** Official v25 wire contracts: googleapis/googleapis@492a18f4, conversion action/upload services. */
240
+ declare class GoogleConversionService {
241
+ private readonly client;
242
+ constructor(client: GoogleAdsRestClient);
243
+ context(accountId: string): Promise<{
244
+ snapshot_hash: string;
245
+ customer: Row$3;
246
+ conversion_customer: string | null;
247
+ }>;
248
+ private action;
249
+ list(input: {
250
+ account_id: string;
251
+ after_action_id?: string;
252
+ limit: number;
253
+ include_removed?: boolean;
254
+ }): Promise<{
255
+ next_cursor?: string | undefined;
256
+ context: {
257
+ snapshot_hash: string;
258
+ customer: Row$3;
259
+ conversion_customer: string | null;
260
+ };
261
+ actions: Row$3[];
262
+ truncated: boolean;
263
+ }>;
264
+ get(accountId: string, actionId: string): Promise<{
265
+ action: Row$3;
266
+ context: {
267
+ snapshot_hash: string;
268
+ customer: Row$3;
269
+ conversion_customer: string | null;
270
+ };
271
+ editable: boolean;
272
+ snapshot_hash: string;
273
+ }>;
274
+ private checked;
275
+ plan(op: WriteOperation): Promise<GoogleConversionPlan>;
276
+ private settings;
277
+ private path;
278
+ private mutate;
279
+ private uploadPlan;
280
+ private uploadErrors;
281
+ }
282
+
283
+ /** Official Data Manager v1 contracts: googleapis/googleapis@492a18f4; guides checked 2026-11-04. */
284
+ declare class GoogleDataManagerService {
285
+ private readonly client;
286
+ private readonly conversions;
287
+ constructor(client: GoogleAdsRestClient, conversions: GoogleConversionService);
288
+ context(accountId: string): Promise<{
289
+ api_enablement: string;
290
+ note: string;
291
+ required_scope: string;
292
+ scope_status: "GRANTED" | "MISSING" | "UNKNOWN";
293
+ account_id: string;
294
+ conversion_context: {
295
+ snapshot_hash: string;
296
+ customer: {
297
+ [x: string]: unknown;
298
+ };
299
+ conversion_customer: string | null;
300
+ };
301
+ login_account_id: string;
302
+ }>;
303
+ plan(op: WriteOperation): Promise<GoogleConversionPlan>;
304
+ status(accountId: string, resourceReceipt: string): Promise<{
305
+ request_id: string;
306
+ batch_sha256: string;
307
+ expected_event_count: number;
308
+ status: string;
309
+ terminal: boolean;
310
+ note: string;
311
+ } | {
312
+ counts_match: boolean | null;
313
+ errors: {
314
+ reason: string;
315
+ record_count: string;
316
+ }[];
317
+ warnings: {
318
+ reason: string;
319
+ record_count: string;
320
+ }[];
321
+ note: string;
322
+ record_count?: string | undefined;
323
+ request_id: string;
324
+ batch_sha256: string;
325
+ expected_event_count: number;
326
+ status: string;
327
+ native_status: string;
328
+ terminal: boolean;
329
+ }>;
330
+ }
331
+
332
+ type Row$2 = Record<string, unknown>;
333
+ type Campaign = {
334
+ campaign: Row$2;
335
+ budget: Row$2;
336
+ budget_micros: number;
337
+ };
338
+ type ExperimentPlan = Omit<WritePreview, 'serverValidated'> & {
339
+ serverValidated?: boolean;
340
+ execute: (validateOnly: boolean) => Promise<string[]>;
341
+ resultDetails?: () => unknown;
342
+ resultWarnings?: () => string[];
343
+ };
344
+ /** Official v25 experiment/arm protos and discovery revision 20261102; live GAQL fields checked. */
345
+ declare class GoogleExperimentService {
346
+ private readonly client;
347
+ constructor(client: GoogleAdsRestClient);
348
+ private account;
349
+ private experiment;
350
+ private campaignName;
351
+ private campaigns;
352
+ list(input: {
353
+ account_id: string;
354
+ limit: number;
355
+ after_experiment_id?: string;
356
+ include_removed?: boolean;
357
+ }): Promise<{
358
+ next_cursor?: string | undefined;
359
+ experiments: Row$2[];
360
+ truncated: boolean;
361
+ }>;
362
+ context(input: {
363
+ account_id: string;
364
+ experiment_id?: string;
365
+ base_campaign_id?: string;
366
+ campaign_budget_id?: string;
367
+ }): Promise<{
368
+ note: string;
369
+ graduation_budget?: Row$2 | undefined;
370
+ budget_snapshot_hash?: string | undefined;
371
+ base_campaign?: Campaign | undefined;
372
+ base_snapshot_hash?: string | undefined;
373
+ experiment?: Row$2 | undefined;
374
+ arms?: Row$2[] | undefined;
375
+ campaigns?: Campaign[] | undefined;
376
+ experiment_snapshot_hash?: string | undefined;
377
+ account: Row$2;
378
+ }>;
379
+ private checked;
380
+ private fields;
381
+ private mutation;
382
+ private armInput;
383
+ private pauseDrafts;
384
+ plan(op: WriteOperation, guard: WriteGuard): Promise<ExperimentPlan>;
385
+ private create;
386
+ private patchedArms;
387
+ private validArms;
388
+ private changeArms;
389
+ asyncErrors(input: {
390
+ account_id: string;
391
+ experiment_id: string;
392
+ page_size: number;
393
+ page_token?: string;
394
+ }): Promise<{
395
+ next_page_token?: string | undefined;
396
+ experiment_id: string;
397
+ status: unknown;
398
+ errors: {
399
+ code: number | null;
400
+ errors: {
401
+ codes: string[];
402
+ fields: unknown[];
403
+ }[];
404
+ }[];
405
+ truncated: boolean;
406
+ }>;
407
+ operation(input: {
408
+ account_id: string;
409
+ experiment_id: string;
410
+ }): Promise<{
411
+ experiment_id: string;
412
+ experiment_status: unknown;
413
+ state: string;
414
+ note: string;
415
+ } | {
416
+ note: string;
417
+ error?: {
418
+ code: number | null;
419
+ errors: {
420
+ codes: string[];
421
+ fields: unknown[];
422
+ }[];
423
+ } | undefined;
424
+ experiment_id: string;
425
+ operation_name: string;
426
+ experiment_status: unknown;
427
+ state: string;
428
+ done: boolean;
429
+ }>;
430
+ }
431
+
432
+ type Row$1 = Record<string, unknown>;
433
+ type Plan$1 = Omit<WritePreview, 'serverValidated'> & {
434
+ execute: (validateOnly: boolean) => Promise<string[]>;
435
+ };
436
+ /** Official v25 resource/service contracts, discovery, and native GAQL checked 2026-11-04. */
437
+ declare class GooglePerformanceMaxService {
438
+ private readonly client;
439
+ constructor(client: GoogleAdsRestClient);
440
+ private resource;
441
+ private customer;
442
+ private group;
443
+ campaignContext(input: {
444
+ account_id: string;
445
+ campaign_id: string;
446
+ }): Promise<{
447
+ account: Row$1;
448
+ campaign: Row$1;
449
+ budget: Row$1;
450
+ brand_assets: {
451
+ link: Row$1;
452
+ asset: Row$1;
453
+ }[];
454
+ campaign_snapshot_hash: string;
455
+ note: string;
456
+ }>;
457
+ private assetIdentity;
458
+ list(input: {
459
+ account_id: string;
460
+ campaign_id: string;
461
+ limit: number;
462
+ after_asset_group_id?: string;
463
+ include_removed?: boolean;
464
+ }): Promise<{
465
+ next_cursor?: string | undefined;
466
+ asset_groups: Row$1[];
467
+ truncated: boolean;
468
+ }>;
469
+ context(input: {
470
+ account_id: string;
471
+ asset_group_id: string;
472
+ }): Promise<{
473
+ asset_group: Row$1;
474
+ assets: {
475
+ link: Row$1;
476
+ asset: Row$1;
477
+ }[];
478
+ signals: Row$1[];
479
+ listing_filters: Row$1[];
480
+ group_snapshot_hash: string;
481
+ assets_snapshot_hash: string;
482
+ signals_snapshot_hash: string;
483
+ listing_snapshot_hash: string;
484
+ account: Row$1;
485
+ campaign: Row$1;
486
+ budget: Row$1;
487
+ brand_assets: {
488
+ link: Row$1;
489
+ asset: Row$1;
490
+ }[];
491
+ campaign_snapshot_hash: string;
492
+ note: string;
493
+ }>;
494
+ creatives(input: {
495
+ account_id: string;
496
+ asset_group_id: string;
497
+ }): Promise<{
498
+ creatives: {
499
+ id: string;
500
+ provider: string;
501
+ account_id: string;
502
+ name: string;
503
+ type: string;
504
+ headlines: string[];
505
+ descriptions: string[];
506
+ landing_urls: string[];
507
+ media: {
508
+ type: "image" | "video" | "audio";
509
+ url: string;
510
+ alt?: string | undefined;
511
+ poster_url?: string | undefined;
512
+ open_url?: string | undefined;
513
+ }[];
514
+ actions: {
515
+ label: string;
516
+ tool: string;
517
+ arguments: Record<string, unknown>;
518
+ fields: {
519
+ key: string;
520
+ label: string;
521
+ type: "text" | "text_list" | "url_list" | "select";
522
+ value: string | string[];
523
+ options?: {
524
+ label: string;
525
+ value: string;
526
+ }[] | undefined;
527
+ max_length?: number | undefined;
528
+ }[];
529
+ }[];
530
+ status?: string | undefined;
531
+ campaign_id?: string | undefined;
532
+ ad_group_id?: string | undefined;
533
+ }[];
534
+ truncated: boolean;
535
+ next_cursor?: string | undefined;
536
+ }>;
537
+ private atomic;
538
+ private resolveAssets;
539
+ private requirements;
540
+ private groupWire;
541
+ private signalOperations;
542
+ private listingOperations;
543
+ private groupOperations;
544
+ private createdStatus;
545
+ private verifyCreation;
546
+ private createCampaign;
547
+ private createGroup;
548
+ private updateAssets;
549
+ plan(op: WriteOperation, guard: WriteGuard): Promise<Plan$1>;
550
+ private updateBrandAssets;
551
+ private changeSignals;
552
+ private replaceFilters;
553
+ }
554
+
555
+ declare const targetingList: z.ZodObject<{
556
+ account_id: z.ZodString;
557
+ campaign_id: z.ZodString;
558
+ page_size: z.ZodDefault<z.ZodNumber>;
559
+ cursor: z.ZodOptional<z.ZodString>;
560
+ }, z.core.$strict>;
561
+
562
+ type Row = Record<string, unknown>;
563
+ interface Plan extends Omit<WritePreview, 'serverValidated'> {
564
+ execute(validateOnly: boolean): Promise<string[]>;
565
+ resultDetails(): unknown;
566
+ }
567
+ /** Native v25 protos googleapis@eecf37ae; current targeting guide checked2026-11-06. */
568
+ declare class GoogleTargetingService {
569
+ private readonly client;
570
+ constructor(client: GoogleAdsRestClient);
571
+ private context;
572
+ private constants;
573
+ list(raw: z.input<typeof targetingList>): Promise<{
574
+ notes: string[];
575
+ warnings: string[];
576
+ next_cursor?: string | undefined;
577
+ account_id: string;
578
+ campaign_id: string;
579
+ campaign: Row;
580
+ customer: Row;
581
+ budget: Row;
582
+ snapshot_hash: string;
583
+ records: {
584
+ serving?: string | undefined;
585
+ bid_multiplier?: string | undefined;
586
+ id: string;
587
+ name: string;
588
+ kind: "LOCATION" | "LANGUAGE" | "DEVICE" | "AD_SCHEDULE" | "LOCATION_GROUP" | "PROXIMITY";
589
+ scope: string;
590
+ status: "PAUSED" | "ENABLED";
591
+ }[];
592
+ criteria: {
593
+ resourceName: string;
594
+ criterionId: string;
595
+ campaign: string;
596
+ type: "LOCATION" | "LANGUAGE" | "DEVICE" | "AD_SCHEDULE" | "LOCATION_GROUP" | "PROXIMITY";
597
+ status: "PAUSED" | "ENABLED";
598
+ negative: boolean;
599
+ bidModifier?: number | undefined;
600
+ location?: {
601
+ geoTargetConstant: string;
602
+ } | undefined;
603
+ language?: {
604
+ languageConstant: string;
605
+ } | undefined;
606
+ device?: {
607
+ type: string;
608
+ } | undefined;
609
+ adSchedule?: {
610
+ dayOfWeek: "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY";
611
+ startHour: number;
612
+ startMinute: "ZERO" | "FIFTEEN" | "THIRTY" | "FORTY_FIVE";
613
+ endHour: number;
614
+ endMinute: "ZERO" | "FIFTEEN" | "THIRTY" | "FORTY_FIVE";
615
+ } | undefined;
616
+ }[];
617
+ total_criteria: number;
618
+ truncated: boolean;
619
+ }>;
620
+ plan(op: WriteOperation): Promise<Plan>;
621
+ }
622
+
68
623
  declare class GoogleAdsProvider implements AdProvider {
69
624
  private readonly client;
70
625
  readonly id = "google";
71
626
  private readonly discoveredLoginCustomerIds;
72
- constructor(client: GoogleAdsRestClient);
627
+ readonly assets: GoogleAssetService;
628
+ readonly assetLinks: GoogleAssetLinks;
629
+ readonly labels: GoogleLabelService;
630
+ readonly conversions: GoogleConversionService;
631
+ readonly dataManager: GoogleDataManagerService;
632
+ readonly experiments: GoogleExperimentService;
633
+ readonly performanceMax: GooglePerformanceMaxService;
634
+ readonly targeting: GoogleTargetingService;
635
+ constructor(client: GoogleAdsRestClient, media?: MediaResolver);
636
+ keywordPlanning(customerId: string, method: 'generateKeywordIdeas' | 'generateKeywordHistoricalMetrics', body: Record<string, unknown>): Promise<Record<string, unknown>>;
637
+ fieldMetadata(query: string, pageSize: number, pageToken?: string): Promise<{
638
+ apiVersion: string;
639
+ response: Record<string, unknown>;
640
+ }>;
641
+ listAds(input: {
642
+ account_id: string;
643
+ campaign_id?: string;
644
+ ad_group_id?: string;
645
+ limit: number;
646
+ include_drafts?: boolean;
647
+ }): Promise<{
648
+ creatives: {
649
+ id: string;
650
+ provider: string;
651
+ account_id: string;
652
+ name: string;
653
+ type: string;
654
+ headlines: string[];
655
+ descriptions: string[];
656
+ landing_urls: string[];
657
+ media: {
658
+ type: "image" | "video" | "audio";
659
+ url: string;
660
+ alt?: string | undefined;
661
+ poster_url?: string | undefined;
662
+ open_url?: string | undefined;
663
+ }[];
664
+ actions: {
665
+ label: string;
666
+ tool: string;
667
+ arguments: Record<string, unknown>;
668
+ fields: {
669
+ key: string;
670
+ label: string;
671
+ type: "text" | "text_list" | "url_list" | "select";
672
+ value: string | string[];
673
+ options?: {
674
+ label: string;
675
+ value: string;
676
+ }[] | undefined;
677
+ max_length?: number | undefined;
678
+ }[];
679
+ }[];
680
+ status?: string | undefined;
681
+ campaign_id?: string | undefined;
682
+ ad_group_id?: string | undefined;
683
+ }[];
684
+ truncated: boolean;
685
+ next_cursor?: string | undefined;
686
+ }>;
73
687
  capabilities(): ProviderCapabilities;
74
688
  standardActions(): StandardActions;
75
689
  listAccounts(): Promise<Account[]>;
@@ -84,6 +698,7 @@ declare class GoogleAdsProvider implements AdProvider {
84
698
  conditions?: string[];
85
699
  order_by?: string[];
86
700
  limit?: number;
701
+ include_drafts?: boolean;
87
702
  }): Promise<Array<Record<string, unknown>>>;
88
703
  previewWrite(op: WriteOperation, guard: WriteGuard): Promise<WritePreview>;
89
704
  applyWrite(op: WriteOperation, guard: WriteGuard): Promise<WriteResult>;
@@ -99,6 +714,8 @@ declare class GoogleAdsProvider implements AdProvider {
99
714
  private planAddKeywords;
100
715
  private planSetKeywordStatus;
101
716
  private planRemoveKeywords;
717
+ private planSetAdStatus;
718
+ private planUpdateRsa;
102
719
  private planCreateRsa;
103
720
  /** CPC ceilings exist on TARGET_SPEND (Maximize clicks) and TARGET_IMPRESSION_SHARE. */
104
721
  private planSetBidCeiling;
@@ -117,4 +734,4 @@ declare function resolveGoogleCredentials(store: CredentialStore): Promise<Googl
117
734
  /** Provider module for createContext(); undefined when Google isn't connected. */
118
735
  declare function createGoogleModule(store: CredentialStore): Promise<ProviderModule | undefined>;
119
736
 
120
- export { DEFAULT_API_VERSION, GoogleAdsProvider, GoogleAdsRestClient, type GoogleCredentials, createGoogleModule, formatGoogleAdsError, googleTools, normalizeCustomerId, resolveGoogleCredentials };
737
+ export { DEFAULT_API_VERSION, GOOGLE_DATA_MANAGER_SCOPE, GoogleAdsProvider, GoogleAdsRestClient, type GoogleCredentials, createGoogleModule, formatGoogleAdsError, googleTools, normalizeCustomerId, resolveGoogleCredentials };