@defoai/ads-client 1.4.0 → 1.4.1

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.
Files changed (129) hide show
  1. package/dist/index.cjs +2914 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +2226 -0
  4. package/dist/index.d.ts +2061 -12
  5. package/dist/index.js +2892 -198
  6. package/dist/index.js.map +1 -0
  7. package/package.json +10 -7
  8. package/dist/generated/apis/AdAssetsApi.d.ts +0 -140
  9. package/dist/generated/apis/AdAssetsApi.js +0 -173
  10. package/dist/generated/apis/AdGroupsApi.d.ts +0 -165
  11. package/dist/generated/apis/AdGroupsApi.js +0 -205
  12. package/dist/generated/apis/AdsApi.d.ts +0 -160
  13. package/dist/generated/apis/AdsApi.js +0 -200
  14. package/dist/generated/apis/AssetsApi.d.ts +0 -162
  15. package/dist/generated/apis/AssetsApi.js +0 -203
  16. package/dist/generated/apis/CampaignAssetsApi.d.ts +0 -136
  17. package/dist/generated/apis/CampaignAssetsApi.js +0 -167
  18. package/dist/generated/apis/CampaignsApi.d.ts +0 -169
  19. package/dist/generated/apis/CampaignsApi.js +0 -206
  20. package/dist/generated/apis/KeywordsApi.d.ts +0 -160
  21. package/dist/generated/apis/KeywordsApi.js +0 -200
  22. package/dist/generated/apis/MediaApi.d.ts +0 -50
  23. package/dist/generated/apis/MediaApi.js +0 -51
  24. package/dist/generated/apis/MetaApi.d.ts +0 -86
  25. package/dist/generated/apis/MetaApi.js +0 -104
  26. package/dist/generated/apis/ReportsApi.d.ts +0 -50
  27. package/dist/generated/apis/ReportsApi.js +0 -51
  28. package/dist/generated/apis/SitesApi.d.ts +0 -163
  29. package/dist/generated/apis/SitesApi.js +0 -202
  30. package/dist/generated/apis/SyncApi.d.ts +0 -199
  31. package/dist/generated/apis/SyncApi.js +0 -241
  32. package/dist/generated/apis/index.d.ts +0 -12
  33. package/dist/generated/apis/index.js +0 -14
  34. package/dist/generated/index.d.ts +0 -3
  35. package/dist/generated/index.js +0 -5
  36. package/dist/generated/models/AdAssetCreate.d.ts +0 -83
  37. package/dist/generated/models/AdAssetCreate.js +0 -76
  38. package/dist/generated/models/AdCreate.d.ts +0 -147
  39. package/dist/generated/models/AdCreate.js +0 -97
  40. package/dist/generated/models/AdGroupAudience.d.ts +0 -44
  41. package/dist/generated/models/AdGroupAudience.js +0 -49
  42. package/dist/generated/models/AdGroupCreate.d.ts +0 -104
  43. package/dist/generated/models/AdGroupCreate.js +0 -74
  44. package/dist/generated/models/AdGroupUpdate.d.ts +0 -104
  45. package/dist/generated/models/AdGroupUpdate.js +0 -70
  46. package/dist/generated/models/AdUpdate.d.ts +0 -147
  47. package/dist/generated/models/AdUpdate.js +0 -85
  48. package/dist/generated/models/AssetCreate.d.ts +0 -117
  49. package/dist/generated/models/AssetCreate.js +0 -80
  50. package/dist/generated/models/AssetUpdate.d.ts +0 -79
  51. package/dist/generated/models/AssetUpdate.js +0 -61
  52. package/dist/generated/models/BiddingStrategy.d.ts +0 -70
  53. package/dist/generated/models/BiddingStrategy.js +0 -62
  54. package/dist/generated/models/CampaignAdScheduleField.d.ts +0 -12
  55. package/dist/generated/models/CampaignAdScheduleField.js +0 -4
  56. package/dist/generated/models/CampaignAssetCreate.d.ts +0 -57
  57. package/dist/generated/models/CampaignAssetCreate.js +0 -63
  58. package/dist/generated/models/CampaignCreate.d.ts +0 -161
  59. package/dist/generated/models/CampaignCreate.js +0 -102
  60. package/dist/generated/models/CampaignTargeting.d.ts +0 -50
  61. package/dist/generated/models/CampaignTargeting.js +0 -47
  62. package/dist/generated/models/CampaignUpdate.d.ts +0 -161
  63. package/dist/generated/models/CampaignUpdate.js +0 -98
  64. package/dist/generated/models/CampaignsListCursorParameter.d.ts +0 -26
  65. package/dist/generated/models/CampaignsListCursorParameter.js +0 -31
  66. package/dist/generated/models/ErrorEnvelope.d.ts +0 -33
  67. package/dist/generated/models/ErrorEnvelope.js +0 -44
  68. package/dist/generated/models/ErrorEnvelopeError.d.ts +0 -44
  69. package/dist/generated/models/ErrorEnvelopeError.js +0 -49
  70. package/dist/generated/models/KeywordCreate.d.ts +0 -86
  71. package/dist/generated/models/KeywordCreate.js +0 -73
  72. package/dist/generated/models/KeywordUpdate.d.ts +0 -86
  73. package/dist/generated/models/KeywordUpdate.js +0 -69
  74. package/dist/generated/models/Location.d.ts +0 -61
  75. package/dist/generated/models/Location.js +0 -61
  76. package/dist/generated/models/NegativeKeywordEntry.d.ts +0 -47
  77. package/dist/generated/models/NegativeKeywordEntry.js +0 -55
  78. package/dist/generated/models/ScheduleWindow.d.ts +0 -95
  79. package/dist/generated/models/ScheduleWindow.js +0 -87
  80. package/dist/generated/models/SiteCreate.d.ts +0 -99
  81. package/dist/generated/models/SiteCreate.js +0 -78
  82. package/dist/generated/models/SiteCreateSeoKeywords.d.ts +0 -11
  83. package/dist/generated/models/SiteCreateSeoKeywords.js +0 -12
  84. package/dist/generated/models/SiteCreateTargetGroups.d.ts +0 -11
  85. package/dist/generated/models/SiteCreateTargetGroups.js +0 -12
  86. package/dist/generated/models/SiteLinkEntry.d.ts +0 -50
  87. package/dist/generated/models/SiteLinkEntry.js +0 -47
  88. package/dist/generated/models/SiteUpdate.d.ts +0 -99
  89. package/dist/generated/models/SiteUpdate.js +0 -74
  90. package/dist/generated/models/Sitelink.d.ts +0 -64
  91. package/dist/generated/models/Sitelink.js +0 -51
  92. package/dist/generated/models/StructuredSchedule.d.ts +0 -39
  93. package/dist/generated/models/StructuredSchedule.js +0 -46
  94. package/dist/generated/models/StructuredSnippet.d.ts +0 -38
  95. package/dist/generated/models/StructuredSnippet.js +0 -47
  96. package/dist/generated/models/SuccessEnvelope.d.ts +0 -39
  97. package/dist/generated/models/SuccessEnvelope.js +0 -46
  98. package/dist/generated/models/SuccessEnvelopeMeta.d.ts +0 -39
  99. package/dist/generated/models/SuccessEnvelopeMeta.js +0 -44
  100. package/dist/generated/models/SuccessEnvelopeMetaNextCursor.d.ts +0 -26
  101. package/dist/generated/models/SuccessEnvelopeMetaNextCursor.js +0 -31
  102. package/dist/generated/models/SyncCampaignDetail.d.ts +0 -88
  103. package/dist/generated/models/SyncCampaignDetail.js +0 -71
  104. package/dist/generated/models/SyncPlan.d.ts +0 -35
  105. package/dist/generated/models/SyncPlan.js +0 -43
  106. package/dist/generated/models/SyncPlanPlatformsValue.d.ts +0 -33
  107. package/dist/generated/models/SyncPlanPlatformsValue.js +0 -42
  108. package/dist/generated/models/SyncPlanPlatformsValueTotals.d.ts +0 -44
  109. package/dist/generated/models/SyncPlanPlatformsValueTotals.js +0 -45
  110. package/dist/generated/models/SyncProgress.d.ts +0 -57
  111. package/dist/generated/models/SyncProgress.js +0 -50
  112. package/dist/generated/models/SyncRecord.d.ts +0 -103
  113. package/dist/generated/models/SyncRecord.js +0 -73
  114. package/dist/generated/models/SyncRecordErrorsInner.d.ts +0 -38
  115. package/dist/generated/models/SyncRecordErrorsInner.js +0 -43
  116. package/dist/generated/models/SyncTotals.d.ts +0 -68
  117. package/dist/generated/models/SyncTotals.js +0 -53
  118. package/dist/generated/models/SyncTriggerRequest.d.ts +0 -39
  119. package/dist/generated/models/SyncTriggerRequest.js +0 -44
  120. package/dist/generated/models/SyncTriggerRequestOptions.d.ts +0 -56
  121. package/dist/generated/models/SyncTriggerRequestOptions.js +0 -49
  122. package/dist/generated/models/SyncTriggerResponse.d.ts +0 -59
  123. package/dist/generated/models/SyncTriggerResponse.js +0 -55
  124. package/dist/generated/models/SyncUnlinkRequest.d.ts +0 -44
  125. package/dist/generated/models/SyncUnlinkRequest.js +0 -47
  126. package/dist/generated/models/index.d.ts +0 -45
  127. package/dist/generated/models/index.js +0 -47
  128. package/dist/generated/runtime.d.ts +0 -182
  129. package/dist/generated/runtime.js +0 -318
@@ -0,0 +1,2226 @@
1
+ /**
2
+ * Defo Ads Public API
3
+ * Stable public API for managing campaigns, ads, keywords, and sites.
4
+ *
5
+ * The version of the OpenAPI document: 1.4.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Bind an asset to an ad (scope=AD, adId required) or ad group (scope=AD_GROUP, adGroupId required). campaignId is derived from the ad/ad group when omitted.
14
+ * @export
15
+ * @interface AdAssetCreate
16
+ */
17
+ interface AdAssetCreate {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AdAssetCreate
22
+ */
23
+ scope: AdAssetCreateScopeEnum;
24
+ /**
25
+ * Required when scope=AD.
26
+ * @type {string}
27
+ * @memberof AdAssetCreate
28
+ */
29
+ adId?: string;
30
+ /**
31
+ * Required when scope=AD_GROUP.
32
+ * @type {string}
33
+ * @memberof AdAssetCreate
34
+ */
35
+ adGroupId?: string;
36
+ /**
37
+ * Optional; derived from the ad/ad group when omitted.
38
+ * @type {string}
39
+ * @memberof AdAssetCreate
40
+ */
41
+ campaignId?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof AdAssetCreate
46
+ */
47
+ assetId: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof AdAssetCreate
52
+ */
53
+ role: AdAssetCreateRoleEnum;
54
+ }
55
+ /**
56
+ * @export
57
+ */
58
+ declare const AdAssetCreateScopeEnum: {
59
+ readonly AD: "AD";
60
+ readonly AD_GROUP: "AD_GROUP";
61
+ };
62
+ type AdAssetCreateScopeEnum = typeof AdAssetCreateScopeEnum[keyof typeof AdAssetCreateScopeEnum];
63
+ /**
64
+ * @export
65
+ */
66
+ declare const AdAssetCreateRoleEnum: {
67
+ readonly MARKETING_IMAGE: "MARKETING_IMAGE";
68
+ readonly SQUARE_MARKETING_IMAGE: "SQUARE_MARKETING_IMAGE";
69
+ readonly PORTRAIT_MARKETING_IMAGE: "PORTRAIT_MARKETING_IMAGE";
70
+ readonly LOGO: "LOGO";
71
+ readonly LANDSCAPE_LOGO: "LANDSCAPE_LOGO";
72
+ readonly YOUTUBE_VIDEO: "YOUTUBE_VIDEO";
73
+ readonly VIDEO: "VIDEO";
74
+ };
75
+ type AdAssetCreateRoleEnum = typeof AdAssetCreateRoleEnum[keyof typeof AdAssetCreateRoleEnum];
76
+
77
+ /**
78
+ * Defo Ads Public API
79
+ * Stable public API for managing campaigns, ads, keywords, and sites.
80
+ *
81
+ * The version of the OpenAPI document: 1.4.0
82
+ *
83
+ *
84
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
85
+ * https://openapi-generator.tech
86
+ * Do not edit the class manually.
87
+ */
88
+ /**
89
+ *
90
+ * @export
91
+ * @interface Sitelink
92
+ */
93
+ interface Sitelink {
94
+ /**
95
+ *
96
+ * @type {string}
97
+ * @memberof Sitelink
98
+ */
99
+ text?: string;
100
+ /**
101
+ *
102
+ * @type {string}
103
+ * @memberof Sitelink
104
+ */
105
+ url?: string;
106
+ /**
107
+ *
108
+ * @type {string}
109
+ * @memberof Sitelink
110
+ */
111
+ description1?: string;
112
+ /**
113
+ *
114
+ * @type {string}
115
+ * @memberof Sitelink
116
+ */
117
+ description2?: string;
118
+ /**
119
+ *
120
+ * @type {string}
121
+ * @memberof Sitelink
122
+ */
123
+ trackingUrlTemplate?: string;
124
+ /**
125
+ *
126
+ * @type {{ [key: string]: string; }}
127
+ * @memberof Sitelink
128
+ */
129
+ urlCustomParameters?: {
130
+ [key: string]: string;
131
+ };
132
+ }
133
+
134
+ /**
135
+ * Defo Ads Public API
136
+ * Stable public API for managing campaigns, ads, keywords, and sites.
137
+ *
138
+ * The version of the OpenAPI document: 1.4.0
139
+ *
140
+ *
141
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
142
+ * https://openapi-generator.tech
143
+ * Do not edit the class manually.
144
+ */
145
+ /**
146
+ *
147
+ * @export
148
+ * @interface StructuredSnippet
149
+ */
150
+ interface StructuredSnippet {
151
+ /**
152
+ *
153
+ * @type {string}
154
+ * @memberof StructuredSnippet
155
+ */
156
+ header: string;
157
+ /**
158
+ *
159
+ * @type {Array<string>}
160
+ * @memberof StructuredSnippet
161
+ */
162
+ values: Array<string>;
163
+ }
164
+
165
+ /**
166
+ * Defo Ads Public API
167
+ * Stable public API for managing campaigns, ads, keywords, and sites.
168
+ *
169
+ * The version of the OpenAPI document: 1.4.0
170
+ *
171
+ *
172
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
173
+ * https://openapi-generator.tech
174
+ * Do not edit the class manually.
175
+ */
176
+
177
+ /**
178
+ *
179
+ * @export
180
+ * @interface AdCreate
181
+ */
182
+ interface AdCreate {
183
+ /**
184
+ *
185
+ * @type {string}
186
+ * @memberof AdCreate
187
+ */
188
+ adGroupId: string;
189
+ /**
190
+ *
191
+ * @type {string}
192
+ * @memberof AdCreate
193
+ */
194
+ campaignId: string;
195
+ /**
196
+ *
197
+ * @type {string}
198
+ * @memberof AdCreate
199
+ */
200
+ headlinePart1: string;
201
+ /**
202
+ *
203
+ * @type {string}
204
+ * @memberof AdCreate
205
+ */
206
+ headlinePart2: string;
207
+ /**
208
+ *
209
+ * @type {string}
210
+ * @memberof AdCreate
211
+ */
212
+ headlinePart3?: string;
213
+ /**
214
+ *
215
+ * @type {string}
216
+ * @memberof AdCreate
217
+ */
218
+ description: string;
219
+ /**
220
+ *
221
+ * @type {string}
222
+ * @memberof AdCreate
223
+ */
224
+ description2?: string;
225
+ /**
226
+ *
227
+ * @type {string}
228
+ * @memberof AdCreate
229
+ */
230
+ finalUrl: string;
231
+ /**
232
+ *
233
+ * @type {string}
234
+ * @memberof AdCreate
235
+ */
236
+ path1?: string;
237
+ /**
238
+ *
239
+ * @type {string}
240
+ * @memberof AdCreate
241
+ */
242
+ path2?: string;
243
+ /**
244
+ *
245
+ * @type {string}
246
+ * @memberof AdCreate
247
+ */
248
+ status?: AdCreateStatusEnum;
249
+ /**
250
+ *
251
+ * @type {Array<Sitelink>}
252
+ * @memberof AdCreate
253
+ */
254
+ sitelinks?: Array<Sitelink>;
255
+ /**
256
+ *
257
+ * @type {Array<string>}
258
+ * @memberof AdCreate
259
+ */
260
+ callouts?: Array<string>;
261
+ /**
262
+ *
263
+ * @type {Array<StructuredSnippet>}
264
+ * @memberof AdCreate
265
+ */
266
+ structuredSnippets?: Array<StructuredSnippet>;
267
+ /**
268
+ *
269
+ * @type {Array<string>}
270
+ * @memberof AdCreate
271
+ */
272
+ customLabels?: Array<string>;
273
+ /**
274
+ *
275
+ * @type {string}
276
+ * @memberof AdCreate
277
+ */
278
+ trackingUrlTemplate?: string;
279
+ /**
280
+ *
281
+ * @type {string}
282
+ * @memberof AdCreate
283
+ */
284
+ finalUrlSuffix?: string;
285
+ /**
286
+ *
287
+ * @type {{ [key: string]: string; }}
288
+ * @memberof AdCreate
289
+ */
290
+ urlCustomParameters?: {
291
+ [key: string]: string;
292
+ };
293
+ }
294
+ /**
295
+ * @export
296
+ */
297
+ declare const AdCreateStatusEnum: {
298
+ readonly ENABLED: "ENABLED";
299
+ readonly PAUSED: "PAUSED";
300
+ readonly REMOVED: "REMOVED";
301
+ };
302
+ type AdCreateStatusEnum = typeof AdCreateStatusEnum[keyof typeof AdCreateStatusEnum];
303
+
304
+ /**
305
+ * Defo Ads Public API
306
+ * Stable public API for managing campaigns, ads, keywords, and sites.
307
+ *
308
+ * The version of the OpenAPI document: 1.4.0
309
+ *
310
+ *
311
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
312
+ * https://openapi-generator.tech
313
+ * Do not edit the class manually.
314
+ */
315
+ /**
316
+ *
317
+ * @export
318
+ * @interface AdGroupAudience
319
+ */
320
+ interface AdGroupAudience {
321
+ /**
322
+ *
323
+ * @type {string}
324
+ * @memberof AdGroupAudience
325
+ */
326
+ type: string;
327
+ /**
328
+ *
329
+ * @type {string}
330
+ * @memberof AdGroupAudience
331
+ */
332
+ id: string;
333
+ /**
334
+ *
335
+ * @type {number}
336
+ * @memberof AdGroupAudience
337
+ */
338
+ bidAdjustment?: number;
339
+ }
340
+
341
+ /**
342
+ * Defo Ads Public API
343
+ * Stable public API for managing campaigns, ads, keywords, and sites.
344
+ *
345
+ * The version of the OpenAPI document: 1.4.0
346
+ *
347
+ *
348
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
349
+ * https://openapi-generator.tech
350
+ * Do not edit the class manually.
351
+ */
352
+
353
+ /**
354
+ *
355
+ * @export
356
+ * @interface AdGroupCreate
357
+ */
358
+ interface AdGroupCreate {
359
+ /**
360
+ *
361
+ * @type {string}
362
+ * @memberof AdGroupCreate
363
+ */
364
+ campaignId: string;
365
+ /**
366
+ *
367
+ * @type {string}
368
+ * @memberof AdGroupCreate
369
+ */
370
+ name: string;
371
+ /**
372
+ *
373
+ * @type {string}
374
+ * @memberof AdGroupCreate
375
+ */
376
+ status?: AdGroupCreateStatusEnum;
377
+ /**
378
+ *
379
+ * @type {string}
380
+ * @memberof AdGroupCreate
381
+ */
382
+ type?: string;
383
+ /**
384
+ *
385
+ * @type {number}
386
+ * @memberof AdGroupCreate
387
+ */
388
+ cpc?: number;
389
+ /**
390
+ *
391
+ * @type {number}
392
+ * @memberof AdGroupCreate
393
+ */
394
+ cpcBid?: number;
395
+ /**
396
+ *
397
+ * @type {Array<AdGroupAudience>}
398
+ * @memberof AdGroupCreate
399
+ */
400
+ audiences?: Array<AdGroupAudience>;
401
+ /**
402
+ *
403
+ * @type {Array<string>}
404
+ * @memberof AdGroupCreate
405
+ */
406
+ customLabels?: Array<string>;
407
+ /**
408
+ *
409
+ * @type {string}
410
+ * @memberof AdGroupCreate
411
+ */
412
+ trackingUrlTemplate?: string;
413
+ /**
414
+ *
415
+ * @type {string}
416
+ * @memberof AdGroupCreate
417
+ */
418
+ finalUrlSuffix?: string;
419
+ /**
420
+ *
421
+ * @type {{ [key: string]: string; }}
422
+ * @memberof AdGroupCreate
423
+ */
424
+ urlCustomParameters?: {
425
+ [key: string]: string;
426
+ };
427
+ }
428
+ /**
429
+ * @export
430
+ */
431
+ declare const AdGroupCreateStatusEnum: {
432
+ readonly ENABLED: "ENABLED";
433
+ readonly PAUSED: "PAUSED";
434
+ readonly REMOVED: "REMOVED";
435
+ };
436
+ type AdGroupCreateStatusEnum = typeof AdGroupCreateStatusEnum[keyof typeof AdGroupCreateStatusEnum];
437
+
438
+ /**
439
+ * Defo Ads Public API
440
+ * Stable public API for managing campaigns, ads, keywords, and sites.
441
+ *
442
+ * The version of the OpenAPI document: 1.4.0
443
+ *
444
+ *
445
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
446
+ * https://openapi-generator.tech
447
+ * Do not edit the class manually.
448
+ */
449
+
450
+ /**
451
+ * Partial AdGroup. Omitted fields are unchanged.
452
+ * @export
453
+ * @interface AdGroupUpdate
454
+ */
455
+ interface AdGroupUpdate {
456
+ /**
457
+ *
458
+ * @type {string}
459
+ * @memberof AdGroupUpdate
460
+ */
461
+ campaignId?: string;
462
+ /**
463
+ *
464
+ * @type {string}
465
+ * @memberof AdGroupUpdate
466
+ */
467
+ name?: string;
468
+ /**
469
+ *
470
+ * @type {string}
471
+ * @memberof AdGroupUpdate
472
+ */
473
+ status?: AdGroupUpdateStatusEnum;
474
+ /**
475
+ *
476
+ * @type {string}
477
+ * @memberof AdGroupUpdate
478
+ */
479
+ type?: string;
480
+ /**
481
+ *
482
+ * @type {number}
483
+ * @memberof AdGroupUpdate
484
+ */
485
+ cpc?: number;
486
+ /**
487
+ *
488
+ * @type {number}
489
+ * @memberof AdGroupUpdate
490
+ */
491
+ cpcBid?: number;
492
+ /**
493
+ *
494
+ * @type {Array<AdGroupAudience>}
495
+ * @memberof AdGroupUpdate
496
+ */
497
+ audiences?: Array<AdGroupAudience>;
498
+ /**
499
+ *
500
+ * @type {Array<string>}
501
+ * @memberof AdGroupUpdate
502
+ */
503
+ customLabels?: Array<string>;
504
+ /**
505
+ *
506
+ * @type {string}
507
+ * @memberof AdGroupUpdate
508
+ */
509
+ trackingUrlTemplate?: string;
510
+ /**
511
+ *
512
+ * @type {string}
513
+ * @memberof AdGroupUpdate
514
+ */
515
+ finalUrlSuffix?: string;
516
+ /**
517
+ *
518
+ * @type {{ [key: string]: string; }}
519
+ * @memberof AdGroupUpdate
520
+ */
521
+ urlCustomParameters?: {
522
+ [key: string]: string;
523
+ };
524
+ }
525
+ /**
526
+ * @export
527
+ */
528
+ declare const AdGroupUpdateStatusEnum: {
529
+ readonly ENABLED: "ENABLED";
530
+ readonly PAUSED: "PAUSED";
531
+ readonly REMOVED: "REMOVED";
532
+ };
533
+ type AdGroupUpdateStatusEnum = typeof AdGroupUpdateStatusEnum[keyof typeof AdGroupUpdateStatusEnum];
534
+
535
+ /**
536
+ * Defo Ads Public API
537
+ * Stable public API for managing campaigns, ads, keywords, and sites.
538
+ *
539
+ * The version of the OpenAPI document: 1.4.0
540
+ *
541
+ *
542
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
543
+ * https://openapi-generator.tech
544
+ * Do not edit the class manually.
545
+ */
546
+
547
+ /**
548
+ * Partial Ad. Omitted fields are unchanged.
549
+ * @export
550
+ * @interface AdUpdate
551
+ */
552
+ interface AdUpdate {
553
+ /**
554
+ *
555
+ * @type {string}
556
+ * @memberof AdUpdate
557
+ */
558
+ adGroupId?: string;
559
+ /**
560
+ *
561
+ * @type {string}
562
+ * @memberof AdUpdate
563
+ */
564
+ campaignId?: string;
565
+ /**
566
+ *
567
+ * @type {string}
568
+ * @memberof AdUpdate
569
+ */
570
+ headlinePart1?: string;
571
+ /**
572
+ *
573
+ * @type {string}
574
+ * @memberof AdUpdate
575
+ */
576
+ headlinePart2?: string;
577
+ /**
578
+ *
579
+ * @type {string}
580
+ * @memberof AdUpdate
581
+ */
582
+ headlinePart3?: string;
583
+ /**
584
+ *
585
+ * @type {string}
586
+ * @memberof AdUpdate
587
+ */
588
+ description?: string;
589
+ /**
590
+ *
591
+ * @type {string}
592
+ * @memberof AdUpdate
593
+ */
594
+ description2?: string;
595
+ /**
596
+ *
597
+ * @type {string}
598
+ * @memberof AdUpdate
599
+ */
600
+ finalUrl?: string;
601
+ /**
602
+ *
603
+ * @type {string}
604
+ * @memberof AdUpdate
605
+ */
606
+ path1?: string;
607
+ /**
608
+ *
609
+ * @type {string}
610
+ * @memberof AdUpdate
611
+ */
612
+ path2?: string;
613
+ /**
614
+ *
615
+ * @type {string}
616
+ * @memberof AdUpdate
617
+ */
618
+ status?: AdUpdateStatusEnum;
619
+ /**
620
+ *
621
+ * @type {Array<Sitelink>}
622
+ * @memberof AdUpdate
623
+ */
624
+ sitelinks?: Array<Sitelink>;
625
+ /**
626
+ *
627
+ * @type {Array<string>}
628
+ * @memberof AdUpdate
629
+ */
630
+ callouts?: Array<string>;
631
+ /**
632
+ *
633
+ * @type {Array<StructuredSnippet>}
634
+ * @memberof AdUpdate
635
+ */
636
+ structuredSnippets?: Array<StructuredSnippet>;
637
+ /**
638
+ *
639
+ * @type {Array<string>}
640
+ * @memberof AdUpdate
641
+ */
642
+ customLabels?: Array<string>;
643
+ /**
644
+ *
645
+ * @type {string}
646
+ * @memberof AdUpdate
647
+ */
648
+ trackingUrlTemplate?: string;
649
+ /**
650
+ *
651
+ * @type {string}
652
+ * @memberof AdUpdate
653
+ */
654
+ finalUrlSuffix?: string;
655
+ /**
656
+ *
657
+ * @type {{ [key: string]: string; }}
658
+ * @memberof AdUpdate
659
+ */
660
+ urlCustomParameters?: {
661
+ [key: string]: string;
662
+ };
663
+ }
664
+ /**
665
+ * @export
666
+ */
667
+ declare const AdUpdateStatusEnum: {
668
+ readonly ENABLED: "ENABLED";
669
+ readonly PAUSED: "PAUSED";
670
+ readonly REMOVED: "REMOVED";
671
+ };
672
+ type AdUpdateStatusEnum = typeof AdUpdateStatusEnum[keyof typeof AdUpdateStatusEnum];
673
+
674
+ /**
675
+ * Defo Ads Public API
676
+ * Stable public API for managing campaigns, ads, keywords, and sites.
677
+ *
678
+ * The version of the OpenAPI document: 1.4.0
679
+ *
680
+ *
681
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
682
+ * https://openapi-generator.tech
683
+ * Do not edit the class manually.
684
+ */
685
+ /**
686
+ * URL-by-reference asset creation. The asset is stored as a pointer to the remote URL and is marked READY immediately. Platform syncs fetch the bytes lazily.
687
+ * @export
688
+ * @interface AssetCreate
689
+ */
690
+ interface AssetCreate {
691
+ /**
692
+ * Public http(s) URL.
693
+ * @type {string}
694
+ * @memberof AssetCreate
695
+ */
696
+ url: string;
697
+ /**
698
+ * Defaults to the URL filename.
699
+ * @type {string}
700
+ * @memberof AssetCreate
701
+ */
702
+ name?: string;
703
+ /**
704
+ *
705
+ * @type {string}
706
+ * @memberof AssetCreate
707
+ */
708
+ type?: AssetCreateTypeEnum;
709
+ /**
710
+ * Generic media bucket. Defaults from `type` when omitted (IMAGE for IMAGE/LOGO, VIDEO for VIDEO).
711
+ * @type {string}
712
+ * @memberof AssetCreate
713
+ */
714
+ mediaType?: AssetCreateMediaTypeEnum;
715
+ /**
716
+ * YouTube video id for VIDEO assets (no hosting/transcoding; referenced by id).
717
+ * @type {string}
718
+ * @memberof AssetCreate
719
+ */
720
+ youtubeVideoId?: string;
721
+ /**
722
+ * MIME type. Inferred from the URL when absent.
723
+ * @type {string}
724
+ * @memberof AssetCreate
725
+ */
726
+ contentType?: string;
727
+ /**
728
+ *
729
+ * @type {number}
730
+ * @memberof AssetCreate
731
+ */
732
+ sizeBytes?: number;
733
+ /**
734
+ *
735
+ * @type {number}
736
+ * @memberof AssetCreate
737
+ */
738
+ width?: number;
739
+ /**
740
+ *
741
+ * @type {number}
742
+ * @memberof AssetCreate
743
+ */
744
+ height?: number;
745
+ /**
746
+ *
747
+ * @type {Array<string>}
748
+ * @memberof AssetCreate
749
+ */
750
+ tags?: Array<string>;
751
+ /**
752
+ *
753
+ * @type {string}
754
+ * @memberof AssetCreate
755
+ */
756
+ altText?: string;
757
+ /**
758
+ *
759
+ * @type {{ [key: string]: any; }}
760
+ * @memberof AssetCreate
761
+ */
762
+ metadata?: {
763
+ [key: string]: any;
764
+ };
765
+ }
766
+ /**
767
+ * @export
768
+ */
769
+ declare const AssetCreateTypeEnum: {
770
+ readonly IMAGE: "IMAGE";
771
+ readonly LOGO: "LOGO";
772
+ readonly VIDEO: "VIDEO";
773
+ };
774
+ type AssetCreateTypeEnum = typeof AssetCreateTypeEnum[keyof typeof AssetCreateTypeEnum];
775
+ /**
776
+ * @export
777
+ */
778
+ declare const AssetCreateMediaTypeEnum: {
779
+ readonly IMAGE: "IMAGE";
780
+ readonly VIDEO: "VIDEO";
781
+ };
782
+ type AssetCreateMediaTypeEnum = typeof AssetCreateMediaTypeEnum[keyof typeof AssetCreateMediaTypeEnum];
783
+
784
+ /**
785
+ * Defo Ads Public API
786
+ * Stable public API for managing campaigns, ads, keywords, and sites.
787
+ *
788
+ * The version of the OpenAPI document: 1.4.0
789
+ *
790
+ *
791
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
792
+ * https://openapi-generator.tech
793
+ * Do not edit the class manually.
794
+ */
795
+ /**
796
+ * Partial Asset. Only the curated fields below are accepted; identity fields (id, url, contentType, sizeBytes, source) are immutable post-creation.
797
+ * @export
798
+ * @interface AssetUpdate
799
+ */
800
+ interface AssetUpdate {
801
+ /**
802
+ *
803
+ * @type {string}
804
+ * @memberof AssetUpdate
805
+ */
806
+ name?: string;
807
+ /**
808
+ *
809
+ * @type {string}
810
+ * @memberof AssetUpdate
811
+ */
812
+ altText?: string;
813
+ /**
814
+ *
815
+ * @type {Array<string>}
816
+ * @memberof AssetUpdate
817
+ */
818
+ tags?: Array<string>;
819
+ /**
820
+ *
821
+ * @type {{ [key: string]: any; }}
822
+ * @memberof AssetUpdate
823
+ */
824
+ metadata?: {
825
+ [key: string]: any;
826
+ };
827
+ /**
828
+ *
829
+ * @type {string}
830
+ * @memberof AssetUpdate
831
+ */
832
+ status?: AssetUpdateStatusEnum;
833
+ /**
834
+ *
835
+ * @type {number}
836
+ * @memberof AssetUpdate
837
+ */
838
+ width?: number;
839
+ /**
840
+ *
841
+ * @type {number}
842
+ * @memberof AssetUpdate
843
+ */
844
+ height?: number;
845
+ }
846
+ /**
847
+ * @export
848
+ */
849
+ declare const AssetUpdateStatusEnum: {
850
+ readonly PROCESSING: "PROCESSING";
851
+ readonly READY: "READY";
852
+ readonly FAILED: "FAILED";
853
+ };
854
+ type AssetUpdateStatusEnum = typeof AssetUpdateStatusEnum[keyof typeof AssetUpdateStatusEnum];
855
+
856
+ /**
857
+ * Defo Ads Public API
858
+ * Stable public API for managing campaigns, ads, keywords, and sites.
859
+ *
860
+ * The version of the OpenAPI document: 1.4.0
861
+ *
862
+ *
863
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
864
+ * https://openapi-generator.tech
865
+ * Do not edit the class manually.
866
+ */
867
+ /**
868
+ *
869
+ * @export
870
+ * @interface BiddingStrategy
871
+ */
872
+ interface BiddingStrategy {
873
+ /**
874
+ *
875
+ * @type {string}
876
+ * @memberof BiddingStrategy
877
+ */
878
+ type?: BiddingStrategyTypeEnum;
879
+ /**
880
+ *
881
+ * @type {number}
882
+ * @memberof BiddingStrategy
883
+ */
884
+ targetCpa?: number;
885
+ /**
886
+ *
887
+ * @type {number}
888
+ * @memberof BiddingStrategy
889
+ */
890
+ targetRoas?: number;
891
+ /**
892
+ *
893
+ * @type {number}
894
+ * @memberof BiddingStrategy
895
+ */
896
+ targetImpressionShare?: number;
897
+ /**
898
+ *
899
+ * @type {number}
900
+ * @memberof BiddingStrategy
901
+ */
902
+ maxCpcBidCeiling?: number;
903
+ }
904
+ /**
905
+ * @export
906
+ */
907
+ declare const BiddingStrategyTypeEnum: {
908
+ readonly MANUAL_CPC: "MANUAL_CPC";
909
+ readonly ENHANCED_CPC: "ENHANCED_CPC";
910
+ readonly MAXIMIZE_CLICKS: "MAXIMIZE_CLICKS";
911
+ readonly MAXIMIZE_CONVERSIONS: "MAXIMIZE_CONVERSIONS";
912
+ readonly MAXIMIZE_CONVERSION_VALUE: "MAXIMIZE_CONVERSION_VALUE";
913
+ readonly TARGET_CPA: "TARGET_CPA";
914
+ readonly TARGET_ROAS: "TARGET_ROAS";
915
+ readonly TARGET_IMPRESSION_SHARE: "TARGET_IMPRESSION_SHARE";
916
+ };
917
+ type BiddingStrategyTypeEnum = typeof BiddingStrategyTypeEnum[keyof typeof BiddingStrategyTypeEnum];
918
+
919
+ /**
920
+ * Defo Ads Public API
921
+ * Stable public API for managing campaigns, ads, keywords, and sites.
922
+ *
923
+ * The version of the OpenAPI document: 1.4.0
924
+ *
925
+ *
926
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
927
+ * https://openapi-generator.tech
928
+ * Do not edit the class manually.
929
+ */
930
+ /**
931
+ *
932
+ * @export
933
+ * @interface ScheduleWindow
934
+ */
935
+ interface ScheduleWindow {
936
+ /**
937
+ *
938
+ * @type {string}
939
+ * @memberof ScheduleWindow
940
+ */
941
+ day: ScheduleWindowDayEnum;
942
+ /**
943
+ *
944
+ * @type {number}
945
+ * @memberof ScheduleWindow
946
+ */
947
+ startHour: number;
948
+ /**
949
+ *
950
+ * @type {string}
951
+ * @memberof ScheduleWindow
952
+ */
953
+ startMinute?: ScheduleWindowStartMinuteEnum;
954
+ /**
955
+ * 24 is the Google end-of-day sentinel and is passed through unchanged.
956
+ * @type {number}
957
+ * @memberof ScheduleWindow
958
+ */
959
+ endHour: number;
960
+ /**
961
+ *
962
+ * @type {string}
963
+ * @memberof ScheduleWindow
964
+ */
965
+ endMinute?: ScheduleWindowEndMinuteEnum;
966
+ /**
967
+ * Platform-neutral bid multiplier. 1.0 = no change. On Microsoft Ads, converted to the native -90..+900 percentage delta with clamping (a clamp emits a BID_ADJUSTMENT_CLAMPED warning).
968
+ * @type {number}
969
+ * @memberof ScheduleWindow
970
+ */
971
+ bidModifier?: number;
972
+ }
973
+ /**
974
+ * @export
975
+ */
976
+ declare const ScheduleWindowDayEnum: {
977
+ readonly MONDAY: "MONDAY";
978
+ readonly TUESDAY: "TUESDAY";
979
+ readonly WEDNESDAY: "WEDNESDAY";
980
+ readonly THURSDAY: "THURSDAY";
981
+ readonly FRIDAY: "FRIDAY";
982
+ readonly SATURDAY: "SATURDAY";
983
+ readonly SUNDAY: "SUNDAY";
984
+ };
985
+ type ScheduleWindowDayEnum = typeof ScheduleWindowDayEnum[keyof typeof ScheduleWindowDayEnum];
986
+ /**
987
+ * @export
988
+ */
989
+ declare const ScheduleWindowStartMinuteEnum: {
990
+ readonly ZERO: "ZERO";
991
+ readonly FIFTEEN: "FIFTEEN";
992
+ readonly THIRTY: "THIRTY";
993
+ readonly FORTY_FIVE: "FORTY_FIVE";
994
+ };
995
+ type ScheduleWindowStartMinuteEnum = typeof ScheduleWindowStartMinuteEnum[keyof typeof ScheduleWindowStartMinuteEnum];
996
+ /**
997
+ * @export
998
+ */
999
+ declare const ScheduleWindowEndMinuteEnum: {
1000
+ readonly ZERO: "ZERO";
1001
+ readonly FIFTEEN: "FIFTEEN";
1002
+ readonly THIRTY: "THIRTY";
1003
+ readonly FORTY_FIVE: "FORTY_FIVE";
1004
+ };
1005
+ type ScheduleWindowEndMinuteEnum = typeof ScheduleWindowEndMinuteEnum[keyof typeof ScheduleWindowEndMinuteEnum];
1006
+
1007
+ /**
1008
+ * Defo Ads Public API
1009
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1010
+ *
1011
+ * The version of the OpenAPI document: 1.4.0
1012
+ *
1013
+ *
1014
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1015
+ * https://openapi-generator.tech
1016
+ * Do not edit the class manually.
1017
+ */
1018
+
1019
+ /**
1020
+ *
1021
+ * @export
1022
+ * @interface StructuredSchedule
1023
+ */
1024
+ interface StructuredSchedule {
1025
+ /**
1026
+ *
1027
+ * @type {Array<ScheduleWindow>}
1028
+ * @memberof StructuredSchedule
1029
+ */
1030
+ windows: Array<ScheduleWindow>;
1031
+ /**
1032
+ * IANA timezone (e.g. "Europe/Berlin"). Defaults to the account timezone if omitted.
1033
+ * @type {string}
1034
+ * @memberof StructuredSchedule
1035
+ */
1036
+ timezone?: string;
1037
+ }
1038
+
1039
+ /**
1040
+ * Patched by scripts/patch-generated.mjs (US-ADS-267).
1041
+ * OpenAPI Generator emits broken codecs for oneOf schemas that mix a primitive
1042
+ * with an object/array. The union type is correct; these identity codecs replace
1043
+ * the broken generated ones (the values are plain JSON — no (de)serialization).
1044
+ */
1045
+
1046
+ type CampaignAdScheduleField = StructuredSchedule | string;
1047
+
1048
+ /**
1049
+ * Defo Ads Public API
1050
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1051
+ *
1052
+ * The version of the OpenAPI document: 1.4.0
1053
+ *
1054
+ *
1055
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1056
+ * https://openapi-generator.tech
1057
+ * Do not edit the class manually.
1058
+ */
1059
+ /**
1060
+ *
1061
+ * @export
1062
+ * @interface CampaignAssetCreate
1063
+ */
1064
+ interface CampaignAssetCreate {
1065
+ /**
1066
+ *
1067
+ * @type {string}
1068
+ * @memberof CampaignAssetCreate
1069
+ */
1070
+ campaignId: string;
1071
+ /**
1072
+ *
1073
+ * @type {string}
1074
+ * @memberof CampaignAssetCreate
1075
+ */
1076
+ assetId: string;
1077
+ /**
1078
+ *
1079
+ * @type {string}
1080
+ * @memberof CampaignAssetCreate
1081
+ */
1082
+ role: CampaignAssetCreateRoleEnum;
1083
+ }
1084
+ /**
1085
+ * @export
1086
+ */
1087
+ declare const CampaignAssetCreateRoleEnum: {
1088
+ readonly MARKETING_IMAGE: "MARKETING_IMAGE";
1089
+ readonly SQUARE_MARKETING_IMAGE: "SQUARE_MARKETING_IMAGE";
1090
+ readonly PORTRAIT_MARKETING_IMAGE: "PORTRAIT_MARKETING_IMAGE";
1091
+ readonly LOGO: "LOGO";
1092
+ readonly LANDSCAPE_LOGO: "LANDSCAPE_LOGO";
1093
+ readonly YOUTUBE_VIDEO: "YOUTUBE_VIDEO";
1094
+ readonly VIDEO: "VIDEO";
1095
+ };
1096
+ type CampaignAssetCreateRoleEnum = typeof CampaignAssetCreateRoleEnum[keyof typeof CampaignAssetCreateRoleEnum];
1097
+
1098
+ /**
1099
+ * Defo Ads Public API
1100
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1101
+ *
1102
+ * The version of the OpenAPI document: 1.4.0
1103
+ *
1104
+ *
1105
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1106
+ * https://openapi-generator.tech
1107
+ * Do not edit the class manually.
1108
+ */
1109
+ /**
1110
+ * US-ADS-132 structured targeting (schedule, devices, radius, LinkedIn).
1111
+ * @export
1112
+ * @interface CampaignTargeting
1113
+ */
1114
+ interface CampaignTargeting {
1115
+ /**
1116
+ *
1117
+ * @type {Array<object>}
1118
+ * @memberof CampaignTargeting
1119
+ */
1120
+ schedule?: Array<object>;
1121
+ /**
1122
+ *
1123
+ * @type {object}
1124
+ * @memberof CampaignTargeting
1125
+ */
1126
+ devices?: object;
1127
+ /**
1128
+ *
1129
+ * @type {object}
1130
+ * @memberof CampaignTargeting
1131
+ */
1132
+ radius?: object;
1133
+ /**
1134
+ *
1135
+ * @type {object}
1136
+ * @memberof CampaignTargeting
1137
+ */
1138
+ linkedin?: object;
1139
+ }
1140
+
1141
+ /**
1142
+ * Defo Ads Public API
1143
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1144
+ *
1145
+ * The version of the OpenAPI document: 1.4.0
1146
+ *
1147
+ *
1148
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1149
+ * https://openapi-generator.tech
1150
+ * Do not edit the class manually.
1151
+ */
1152
+ /**
1153
+ *
1154
+ * @export
1155
+ * @interface NegativeKeywordEntry
1156
+ */
1157
+ interface NegativeKeywordEntry {
1158
+ /**
1159
+ *
1160
+ * @type {string}
1161
+ * @memberof NegativeKeywordEntry
1162
+ */
1163
+ text: string;
1164
+ /**
1165
+ *
1166
+ * @type {string}
1167
+ * @memberof NegativeKeywordEntry
1168
+ */
1169
+ matchType: NegativeKeywordEntryMatchTypeEnum;
1170
+ }
1171
+ /**
1172
+ * @export
1173
+ */
1174
+ declare const NegativeKeywordEntryMatchTypeEnum: {
1175
+ readonly EXACT: "EXACT";
1176
+ readonly PHRASE: "PHRASE";
1177
+ readonly BROAD: "BROAD";
1178
+ };
1179
+ type NegativeKeywordEntryMatchTypeEnum = typeof NegativeKeywordEntryMatchTypeEnum[keyof typeof NegativeKeywordEntryMatchTypeEnum];
1180
+
1181
+ /**
1182
+ * Defo Ads Public API
1183
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1184
+ *
1185
+ * The version of the OpenAPI document: 1.4.0
1186
+ *
1187
+ *
1188
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1189
+ * https://openapi-generator.tech
1190
+ * Do not edit the class manually.
1191
+ */
1192
+ /**
1193
+ *
1194
+ * @export
1195
+ * @interface Location
1196
+ */
1197
+ interface Location {
1198
+ /**
1199
+ * Google Ads geo target constant ID.
1200
+ * @type {string}
1201
+ * @memberof Location
1202
+ */
1203
+ criterionId?: string | null;
1204
+ /**
1205
+ *
1206
+ * @type {string}
1207
+ * @memberof Location
1208
+ */
1209
+ name: string;
1210
+ /**
1211
+ *
1212
+ * @type {string}
1213
+ * @memberof Location
1214
+ */
1215
+ type: LocationTypeEnum;
1216
+ /**
1217
+ * ISO country code; null for GLOBAL.
1218
+ * @type {string}
1219
+ * @memberof Location
1220
+ */
1221
+ countryCode?: string | null;
1222
+ }
1223
+ /**
1224
+ * @export
1225
+ */
1226
+ declare const LocationTypeEnum: {
1227
+ readonly COUNTRY: "COUNTRY";
1228
+ readonly CITY: "CITY";
1229
+ readonly REGION: "REGION";
1230
+ readonly METRO: "METRO";
1231
+ readonly GLOBAL: "GLOBAL";
1232
+ };
1233
+ type LocationTypeEnum = typeof LocationTypeEnum[keyof typeof LocationTypeEnum];
1234
+
1235
+ /**
1236
+ * Defo Ads Public API
1237
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1238
+ *
1239
+ * The version of the OpenAPI document: 1.4.0
1240
+ *
1241
+ *
1242
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1243
+ * https://openapi-generator.tech
1244
+ * Do not edit the class manually.
1245
+ */
1246
+
1247
+ /**
1248
+ *
1249
+ * @export
1250
+ * @interface CampaignCreate
1251
+ */
1252
+ interface CampaignCreate {
1253
+ /**
1254
+ *
1255
+ * @type {string}
1256
+ * @memberof CampaignCreate
1257
+ */
1258
+ name: string;
1259
+ /**
1260
+ *
1261
+ * @type {number}
1262
+ * @memberof CampaignCreate
1263
+ */
1264
+ budget: number;
1265
+ /**
1266
+ * ISO 4217 (USD, EUR, …).
1267
+ * @type {string}
1268
+ * @memberof CampaignCreate
1269
+ */
1270
+ currency?: string;
1271
+ /**
1272
+ *
1273
+ * @type {string}
1274
+ * @memberof CampaignCreate
1275
+ */
1276
+ status?: CampaignCreateStatusEnum;
1277
+ /**
1278
+ *
1279
+ * @type {string}
1280
+ * @memberof CampaignCreate
1281
+ */
1282
+ type?: CampaignCreateTypeEnum;
1283
+ /**
1284
+ *
1285
+ * @type {string}
1286
+ * @memberof CampaignCreate
1287
+ */
1288
+ networks?: string;
1289
+ /**
1290
+ *
1291
+ * @type {string}
1292
+ * @memberof CampaignCreate
1293
+ */
1294
+ languages?: string;
1295
+ /**
1296
+ * String ID link to a Site.
1297
+ * @type {string}
1298
+ * @memberof CampaignCreate
1299
+ */
1300
+ siteId?: string;
1301
+ /**
1302
+ * Free-form goal text consumed by AI.
1303
+ * @type {string}
1304
+ * @memberof CampaignCreate
1305
+ */
1306
+ goal?: string;
1307
+ /**
1308
+ *
1309
+ * @type {Array<Location>}
1310
+ * @memberof CampaignCreate
1311
+ */
1312
+ targetLocations?: Array<Location>;
1313
+ /**
1314
+ *
1315
+ * @type {Array<string>}
1316
+ * @memberof CampaignCreate
1317
+ */
1318
+ customLabels?: Array<string>;
1319
+ /**
1320
+ *
1321
+ * @type {CampaignAdScheduleField}
1322
+ * @memberof CampaignCreate
1323
+ */
1324
+ adSchedule?: CampaignAdScheduleField;
1325
+ /**
1326
+ *
1327
+ * @type {BiddingStrategy}
1328
+ * @memberof CampaignCreate
1329
+ */
1330
+ biddingStrategy?: BiddingStrategy;
1331
+ /**
1332
+ *
1333
+ * @type {CampaignTargeting}
1334
+ * @memberof CampaignCreate
1335
+ */
1336
+ targeting?: CampaignTargeting;
1337
+ /**
1338
+ *
1339
+ * @type {string}
1340
+ * @memberof CampaignCreate
1341
+ */
1342
+ trackingUrlTemplate?: string;
1343
+ /**
1344
+ *
1345
+ * @type {string}
1346
+ * @memberof CampaignCreate
1347
+ */
1348
+ finalUrlSuffix?: string;
1349
+ /**
1350
+ *
1351
+ * @type {{ [key: string]: string; }}
1352
+ * @memberof CampaignCreate
1353
+ */
1354
+ urlCustomParameters?: {
1355
+ [key: string]: string;
1356
+ };
1357
+ /**
1358
+ *
1359
+ * @type {Array<NegativeKeywordEntry>}
1360
+ * @memberof CampaignCreate
1361
+ */
1362
+ negativeKeywords?: Array<NegativeKeywordEntry>;
1363
+ }
1364
+ /**
1365
+ * @export
1366
+ */
1367
+ declare const CampaignCreateStatusEnum: {
1368
+ readonly ENABLED: "ENABLED";
1369
+ readonly PAUSED: "PAUSED";
1370
+ readonly REMOVED: "REMOVED";
1371
+ };
1372
+ type CampaignCreateStatusEnum = typeof CampaignCreateStatusEnum[keyof typeof CampaignCreateStatusEnum];
1373
+ /**
1374
+ * @export
1375
+ */
1376
+ declare const CampaignCreateTypeEnum: {
1377
+ readonly SEARCH: "SEARCH";
1378
+ readonly DISPLAY: "DISPLAY";
1379
+ readonly VIDEO: "VIDEO";
1380
+ readonly SHOPPING: "SHOPPING";
1381
+ readonly PERFORMANCE_MAX: "PERFORMANCE_MAX";
1382
+ };
1383
+ type CampaignCreateTypeEnum = typeof CampaignCreateTypeEnum[keyof typeof CampaignCreateTypeEnum];
1384
+
1385
+ /**
1386
+ * Defo Ads Public API
1387
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1388
+ *
1389
+ * The version of the OpenAPI document: 1.4.0
1390
+ *
1391
+ *
1392
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1393
+ * https://openapi-generator.tech
1394
+ * Do not edit the class manually.
1395
+ */
1396
+
1397
+ /**
1398
+ * Partial Campaign — any subset of CampaignCreate fields. Omitted fields are unchanged.
1399
+ * @export
1400
+ * @interface CampaignUpdate
1401
+ */
1402
+ interface CampaignUpdate {
1403
+ /**
1404
+ *
1405
+ * @type {string}
1406
+ * @memberof CampaignUpdate
1407
+ */
1408
+ name?: string;
1409
+ /**
1410
+ *
1411
+ * @type {number}
1412
+ * @memberof CampaignUpdate
1413
+ */
1414
+ budget?: number;
1415
+ /**
1416
+ * ISO 4217 (USD, EUR, …).
1417
+ * @type {string}
1418
+ * @memberof CampaignUpdate
1419
+ */
1420
+ currency?: string;
1421
+ /**
1422
+ *
1423
+ * @type {string}
1424
+ * @memberof CampaignUpdate
1425
+ */
1426
+ status?: CampaignUpdateStatusEnum;
1427
+ /**
1428
+ *
1429
+ * @type {string}
1430
+ * @memberof CampaignUpdate
1431
+ */
1432
+ type?: CampaignUpdateTypeEnum;
1433
+ /**
1434
+ *
1435
+ * @type {string}
1436
+ * @memberof CampaignUpdate
1437
+ */
1438
+ networks?: string;
1439
+ /**
1440
+ *
1441
+ * @type {string}
1442
+ * @memberof CampaignUpdate
1443
+ */
1444
+ languages?: string;
1445
+ /**
1446
+ * String ID link to a Site.
1447
+ * @type {string}
1448
+ * @memberof CampaignUpdate
1449
+ */
1450
+ siteId?: string;
1451
+ /**
1452
+ * Free-form goal text consumed by AI.
1453
+ * @type {string}
1454
+ * @memberof CampaignUpdate
1455
+ */
1456
+ goal?: string;
1457
+ /**
1458
+ *
1459
+ * @type {Array<Location>}
1460
+ * @memberof CampaignUpdate
1461
+ */
1462
+ targetLocations?: Array<Location>;
1463
+ /**
1464
+ *
1465
+ * @type {Array<string>}
1466
+ * @memberof CampaignUpdate
1467
+ */
1468
+ customLabels?: Array<string>;
1469
+ /**
1470
+ *
1471
+ * @type {CampaignAdScheduleField}
1472
+ * @memberof CampaignUpdate
1473
+ */
1474
+ adSchedule?: CampaignAdScheduleField;
1475
+ /**
1476
+ *
1477
+ * @type {BiddingStrategy}
1478
+ * @memberof CampaignUpdate
1479
+ */
1480
+ biddingStrategy?: BiddingStrategy;
1481
+ /**
1482
+ *
1483
+ * @type {CampaignTargeting}
1484
+ * @memberof CampaignUpdate
1485
+ */
1486
+ targeting?: CampaignTargeting;
1487
+ /**
1488
+ *
1489
+ * @type {string}
1490
+ * @memberof CampaignUpdate
1491
+ */
1492
+ trackingUrlTemplate?: string;
1493
+ /**
1494
+ *
1495
+ * @type {string}
1496
+ * @memberof CampaignUpdate
1497
+ */
1498
+ finalUrlSuffix?: string;
1499
+ /**
1500
+ *
1501
+ * @type {{ [key: string]: string; }}
1502
+ * @memberof CampaignUpdate
1503
+ */
1504
+ urlCustomParameters?: {
1505
+ [key: string]: string;
1506
+ };
1507
+ /**
1508
+ *
1509
+ * @type {Array<NegativeKeywordEntry>}
1510
+ * @memberof CampaignUpdate
1511
+ */
1512
+ negativeKeywords?: Array<NegativeKeywordEntry>;
1513
+ }
1514
+ /**
1515
+ * @export
1516
+ */
1517
+ declare const CampaignUpdateStatusEnum: {
1518
+ readonly ENABLED: "ENABLED";
1519
+ readonly PAUSED: "PAUSED";
1520
+ readonly REMOVED: "REMOVED";
1521
+ };
1522
+ type CampaignUpdateStatusEnum = typeof CampaignUpdateStatusEnum[keyof typeof CampaignUpdateStatusEnum];
1523
+ /**
1524
+ * @export
1525
+ */
1526
+ declare const CampaignUpdateTypeEnum: {
1527
+ readonly SEARCH: "SEARCH";
1528
+ readonly DISPLAY: "DISPLAY";
1529
+ readonly VIDEO: "VIDEO";
1530
+ readonly SHOPPING: "SHOPPING";
1531
+ readonly PERFORMANCE_MAX: "PERFORMANCE_MAX";
1532
+ };
1533
+ type CampaignUpdateTypeEnum = typeof CampaignUpdateTypeEnum[keyof typeof CampaignUpdateTypeEnum];
1534
+
1535
+ /**
1536
+ * Defo Ads Public API
1537
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1538
+ *
1539
+ * The version of the OpenAPI document: 1.4.0
1540
+ *
1541
+ *
1542
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1543
+ * https://openapi-generator.tech
1544
+ * Do not edit the class manually.
1545
+ */
1546
+ /**
1547
+ *
1548
+ * @export
1549
+ * @interface KeywordCreate
1550
+ */
1551
+ interface KeywordCreate {
1552
+ /**
1553
+ *
1554
+ * @type {string}
1555
+ * @memberof KeywordCreate
1556
+ */
1557
+ adGroupId: string;
1558
+ /**
1559
+ * Optional denormalisation.
1560
+ * @type {string}
1561
+ * @memberof KeywordCreate
1562
+ */
1563
+ campaignId?: string;
1564
+ /**
1565
+ *
1566
+ * @type {string}
1567
+ * @memberof KeywordCreate
1568
+ */
1569
+ text: string;
1570
+ /**
1571
+ *
1572
+ * @type {string}
1573
+ * @memberof KeywordCreate
1574
+ */
1575
+ matchType?: KeywordCreateMatchTypeEnum;
1576
+ /**
1577
+ *
1578
+ * @type {string}
1579
+ * @memberof KeywordCreate
1580
+ */
1581
+ status?: KeywordCreateStatusEnum;
1582
+ /**
1583
+ *
1584
+ * @type {boolean}
1585
+ * @memberof KeywordCreate
1586
+ */
1587
+ isNegative?: boolean;
1588
+ /**
1589
+ *
1590
+ * @type {number}
1591
+ * @memberof KeywordCreate
1592
+ */
1593
+ cpcBid?: number | null;
1594
+ }
1595
+ /**
1596
+ * @export
1597
+ */
1598
+ declare const KeywordCreateMatchTypeEnum: {
1599
+ readonly BROAD: "BROAD";
1600
+ readonly PHRASE: "PHRASE";
1601
+ readonly EXACT: "EXACT";
1602
+ };
1603
+ type KeywordCreateMatchTypeEnum = typeof KeywordCreateMatchTypeEnum[keyof typeof KeywordCreateMatchTypeEnum];
1604
+ /**
1605
+ * @export
1606
+ */
1607
+ declare const KeywordCreateStatusEnum: {
1608
+ readonly ENABLED: "ENABLED";
1609
+ readonly PAUSED: "PAUSED";
1610
+ readonly REMOVED: "REMOVED";
1611
+ };
1612
+ type KeywordCreateStatusEnum = typeof KeywordCreateStatusEnum[keyof typeof KeywordCreateStatusEnum];
1613
+
1614
+ /**
1615
+ * Defo Ads Public API
1616
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1617
+ *
1618
+ * The version of the OpenAPI document: 1.4.0
1619
+ *
1620
+ *
1621
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1622
+ * https://openapi-generator.tech
1623
+ * Do not edit the class manually.
1624
+ */
1625
+ /**
1626
+ * Partial Keyword. Omitted fields are unchanged.
1627
+ * @export
1628
+ * @interface KeywordUpdate
1629
+ */
1630
+ interface KeywordUpdate {
1631
+ /**
1632
+ *
1633
+ * @type {string}
1634
+ * @memberof KeywordUpdate
1635
+ */
1636
+ adGroupId?: string;
1637
+ /**
1638
+ * Optional denormalisation.
1639
+ * @type {string}
1640
+ * @memberof KeywordUpdate
1641
+ */
1642
+ campaignId?: string;
1643
+ /**
1644
+ *
1645
+ * @type {string}
1646
+ * @memberof KeywordUpdate
1647
+ */
1648
+ text?: string;
1649
+ /**
1650
+ *
1651
+ * @type {string}
1652
+ * @memberof KeywordUpdate
1653
+ */
1654
+ matchType?: KeywordUpdateMatchTypeEnum;
1655
+ /**
1656
+ *
1657
+ * @type {string}
1658
+ * @memberof KeywordUpdate
1659
+ */
1660
+ status?: KeywordUpdateStatusEnum;
1661
+ /**
1662
+ *
1663
+ * @type {boolean}
1664
+ * @memberof KeywordUpdate
1665
+ */
1666
+ isNegative?: boolean;
1667
+ /**
1668
+ *
1669
+ * @type {number}
1670
+ * @memberof KeywordUpdate
1671
+ */
1672
+ cpcBid?: number | null;
1673
+ }
1674
+ /**
1675
+ * @export
1676
+ */
1677
+ declare const KeywordUpdateMatchTypeEnum: {
1678
+ readonly BROAD: "BROAD";
1679
+ readonly PHRASE: "PHRASE";
1680
+ readonly EXACT: "EXACT";
1681
+ };
1682
+ type KeywordUpdateMatchTypeEnum = typeof KeywordUpdateMatchTypeEnum[keyof typeof KeywordUpdateMatchTypeEnum];
1683
+ /**
1684
+ * @export
1685
+ */
1686
+ declare const KeywordUpdateStatusEnum: {
1687
+ readonly ENABLED: "ENABLED";
1688
+ readonly PAUSED: "PAUSED";
1689
+ readonly REMOVED: "REMOVED";
1690
+ };
1691
+ type KeywordUpdateStatusEnum = typeof KeywordUpdateStatusEnum[keyof typeof KeywordUpdateStatusEnum];
1692
+
1693
+ /**
1694
+ * Defo Ads Public API
1695
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1696
+ *
1697
+ * The version of the OpenAPI document: 1.4.0
1698
+ *
1699
+ *
1700
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1701
+ * https://openapi-generator.tech
1702
+ * Do not edit the class manually.
1703
+ */
1704
+ /**
1705
+ *
1706
+ * @export
1707
+ * @interface SiteLinkEntry
1708
+ */
1709
+ interface SiteLinkEntry {
1710
+ /**
1711
+ *
1712
+ * @type {string}
1713
+ * @memberof SiteLinkEntry
1714
+ */
1715
+ text?: string;
1716
+ /**
1717
+ *
1718
+ * @type {string}
1719
+ * @memberof SiteLinkEntry
1720
+ */
1721
+ url?: string;
1722
+ /**
1723
+ *
1724
+ * @type {string}
1725
+ * @memberof SiteLinkEntry
1726
+ */
1727
+ description1?: string;
1728
+ /**
1729
+ *
1730
+ * @type {string}
1731
+ * @memberof SiteLinkEntry
1732
+ */
1733
+ description2?: string;
1734
+ }
1735
+
1736
+ /**
1737
+ * Patched by scripts/patch-generated.mjs (US-ADS-267).
1738
+ * OpenAPI Generator emits broken codecs for oneOf schemas that mix a primitive
1739
+ * with an object/array. The union type is correct; these identity codecs replace
1740
+ * the broken generated ones (the values are plain JSON — no (de)serialization).
1741
+ */
1742
+ type SiteCreateSeoKeywords = Array<string> | string;
1743
+
1744
+ /**
1745
+ * Patched by scripts/patch-generated.mjs (US-ADS-267).
1746
+ * OpenAPI Generator emits broken codecs for oneOf schemas that mix a primitive
1747
+ * with an object/array. The union type is correct; these identity codecs replace
1748
+ * the broken generated ones (the values are plain JSON — no (de)serialization).
1749
+ */
1750
+ type SiteCreateTargetGroups = Array<string> | string;
1751
+
1752
+ /**
1753
+ * Defo Ads Public API
1754
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1755
+ *
1756
+ * The version of the OpenAPI document: 1.4.0
1757
+ *
1758
+ *
1759
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1760
+ * https://openapi-generator.tech
1761
+ * Do not edit the class manually.
1762
+ */
1763
+
1764
+ /**
1765
+ *
1766
+ * @export
1767
+ * @interface SiteCreate
1768
+ */
1769
+ interface SiteCreate {
1770
+ /**
1771
+ *
1772
+ * @type {string}
1773
+ * @memberof SiteCreate
1774
+ */
1775
+ name: string;
1776
+ /**
1777
+ *
1778
+ * @type {string}
1779
+ * @memberof SiteCreate
1780
+ */
1781
+ url: string;
1782
+ /**
1783
+ *
1784
+ * @type {string}
1785
+ * @memberof SiteCreate
1786
+ */
1787
+ description?: string;
1788
+ /**
1789
+ *
1790
+ * @type {SiteCreateSeoKeywords}
1791
+ * @memberof SiteCreate
1792
+ */
1793
+ seoKeywords?: SiteCreateSeoKeywords;
1794
+ /**
1795
+ *
1796
+ * @type {SiteCreateTargetGroups}
1797
+ * @memberof SiteCreate
1798
+ */
1799
+ targetGroups?: SiteCreateTargetGroups;
1800
+ /**
1801
+ *
1802
+ * @type {string}
1803
+ * @memberof SiteCreate
1804
+ */
1805
+ status?: SiteCreateStatusEnum;
1806
+ /**
1807
+ *
1808
+ * @type {string}
1809
+ * @memberof SiteCreate
1810
+ */
1811
+ logoUrl?: string | null;
1812
+ /**
1813
+ *
1814
+ * @type {string}
1815
+ * @memberof SiteCreate
1816
+ */
1817
+ logoSource?: SiteCreateLogoSourceEnum | null;
1818
+ /**
1819
+ *
1820
+ * @type {Array<SiteLinkEntry>}
1821
+ * @memberof SiteCreate
1822
+ */
1823
+ siteLinks?: Array<SiteLinkEntry>;
1824
+ }
1825
+ /**
1826
+ * @export
1827
+ */
1828
+ declare const SiteCreateStatusEnum: {
1829
+ readonly ENABLED: "ENABLED";
1830
+ readonly REMOVED: "REMOVED";
1831
+ };
1832
+ type SiteCreateStatusEnum = typeof SiteCreateStatusEnum[keyof typeof SiteCreateStatusEnum];
1833
+ /**
1834
+ * @export
1835
+ */
1836
+ declare const SiteCreateLogoSourceEnum: {
1837
+ readonly auto_detected: "auto-detected";
1838
+ readonly uploaded: "uploaded";
1839
+ };
1840
+ type SiteCreateLogoSourceEnum = typeof SiteCreateLogoSourceEnum[keyof typeof SiteCreateLogoSourceEnum];
1841
+
1842
+ /**
1843
+ * Defo Ads Public API
1844
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1845
+ *
1846
+ * The version of the OpenAPI document: 1.4.0
1847
+ *
1848
+ *
1849
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1850
+ * https://openapi-generator.tech
1851
+ * Do not edit the class manually.
1852
+ */
1853
+
1854
+ /**
1855
+ * Partial Site. Omitted fields are unchanged.
1856
+ * @export
1857
+ * @interface SiteUpdate
1858
+ */
1859
+ interface SiteUpdate {
1860
+ /**
1861
+ *
1862
+ * @type {string}
1863
+ * @memberof SiteUpdate
1864
+ */
1865
+ name?: string;
1866
+ /**
1867
+ *
1868
+ * @type {string}
1869
+ * @memberof SiteUpdate
1870
+ */
1871
+ url?: string;
1872
+ /**
1873
+ *
1874
+ * @type {string}
1875
+ * @memberof SiteUpdate
1876
+ */
1877
+ description?: string;
1878
+ /**
1879
+ *
1880
+ * @type {SiteCreateSeoKeywords}
1881
+ * @memberof SiteUpdate
1882
+ */
1883
+ seoKeywords?: SiteCreateSeoKeywords;
1884
+ /**
1885
+ *
1886
+ * @type {SiteCreateTargetGroups}
1887
+ * @memberof SiteUpdate
1888
+ */
1889
+ targetGroups?: SiteCreateTargetGroups;
1890
+ /**
1891
+ *
1892
+ * @type {string}
1893
+ * @memberof SiteUpdate
1894
+ */
1895
+ status?: SiteUpdateStatusEnum;
1896
+ /**
1897
+ *
1898
+ * @type {string}
1899
+ * @memberof SiteUpdate
1900
+ */
1901
+ logoUrl?: string | null;
1902
+ /**
1903
+ *
1904
+ * @type {string}
1905
+ * @memberof SiteUpdate
1906
+ */
1907
+ logoSource?: SiteUpdateLogoSourceEnum | null;
1908
+ /**
1909
+ *
1910
+ * @type {Array<SiteLinkEntry>}
1911
+ * @memberof SiteUpdate
1912
+ */
1913
+ siteLinks?: Array<SiteLinkEntry>;
1914
+ }
1915
+ /**
1916
+ * @export
1917
+ */
1918
+ declare const SiteUpdateStatusEnum: {
1919
+ readonly ENABLED: "ENABLED";
1920
+ readonly REMOVED: "REMOVED";
1921
+ };
1922
+ type SiteUpdateStatusEnum = typeof SiteUpdateStatusEnum[keyof typeof SiteUpdateStatusEnum];
1923
+ /**
1924
+ * @export
1925
+ */
1926
+ declare const SiteUpdateLogoSourceEnum: {
1927
+ readonly auto_detected: "auto-detected";
1928
+ readonly uploaded: "uploaded";
1929
+ };
1930
+ type SiteUpdateLogoSourceEnum = typeof SiteUpdateLogoSourceEnum[keyof typeof SiteUpdateLogoSourceEnum];
1931
+
1932
+ /**
1933
+ * Defo Ads Public API
1934
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1935
+ *
1936
+ * The version of the OpenAPI document: 1.4.0
1937
+ *
1938
+ *
1939
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1940
+ * https://openapi-generator.tech
1941
+ * Do not edit the class manually.
1942
+ */
1943
+ /**
1944
+ * Per-entity-type toggles + force controls.
1945
+ * @export
1946
+ * @interface SyncTriggerRequestOptions
1947
+ */
1948
+ interface SyncTriggerRequestOptions {
1949
+ /**
1950
+ *
1951
+ * @type {boolean}
1952
+ * @memberof SyncTriggerRequestOptions
1953
+ */
1954
+ includeAdGroups?: boolean;
1955
+ /**
1956
+ *
1957
+ * @type {boolean}
1958
+ * @memberof SyncTriggerRequestOptions
1959
+ */
1960
+ includeKeywords?: boolean;
1961
+ /**
1962
+ *
1963
+ * @type {boolean}
1964
+ * @memberof SyncTriggerRequestOptions
1965
+ */
1966
+ includeAds?: boolean;
1967
+ /**
1968
+ * Re-export linked campaigns even when change-detection sees no change — re-runs the full tree + targeting/extensions/labels. Use to repair campaigns synced before a fix. Applies to campaigns whose remote still exists; for campaigns deleted in the ad platform, unlink then sync to recreate.
1969
+ * @type {boolean}
1970
+ * @memberof SyncTriggerRequestOptions
1971
+ */
1972
+ force?: boolean;
1973
+ /**
1974
+ * Restrict `force` to these campaign ids. Omit to force the whole Space.
1975
+ * @type {Array<string>}
1976
+ * @memberof SyncTriggerRequestOptions
1977
+ */
1978
+ campaignIds?: Array<string>;
1979
+ }
1980
+
1981
+ /**
1982
+ * Defo Ads Public API
1983
+ * Stable public API for managing campaigns, ads, keywords, and sites.
1984
+ *
1985
+ * The version of the OpenAPI document: 1.4.0
1986
+ *
1987
+ *
1988
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1989
+ * https://openapi-generator.tech
1990
+ * Do not edit the class manually.
1991
+ */
1992
+
1993
+ /**
1994
+ * All fields optional. Omit `platforms` to sync every connected platform.
1995
+ * @export
1996
+ * @interface SyncTriggerRequest
1997
+ */
1998
+ interface SyncTriggerRequest {
1999
+ /**
2000
+ * Platform ids to sync (e.g. ["google-ads"]). Defaults to all connected.
2001
+ * @type {Array<string>}
2002
+ * @memberof SyncTriggerRequest
2003
+ */
2004
+ platforms?: Array<string>;
2005
+ /**
2006
+ *
2007
+ * @type {SyncTriggerRequestOptions}
2008
+ * @memberof SyncTriggerRequest
2009
+ */
2010
+ options?: SyncTriggerRequestOptions;
2011
+ }
2012
+
2013
+ /**
2014
+ * Defo Ads Public API
2015
+ * Stable public API for managing campaigns, ads, keywords, and sites.
2016
+ *
2017
+ * The version of the OpenAPI document: 1.4.0
2018
+ *
2019
+ *
2020
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2021
+ * https://openapi-generator.tech
2022
+ * Do not edit the class manually.
2023
+ */
2024
+ /**
2025
+ * Clear a platform link from the active Space's campaigns, keeping the local campaigns. After unlinking, a subsequent sync re-creates them on the platform.
2026
+ * @export
2027
+ * @interface SyncUnlinkRequest
2028
+ */
2029
+ interface SyncUnlinkRequest {
2030
+ /**
2031
+ * Platform id, e.g. "microsoft-ads".
2032
+ * @type {string}
2033
+ * @memberof SyncUnlinkRequest
2034
+ */
2035
+ platform: string;
2036
+ /**
2037
+ * Campaigns to unlink. Omit to unlink every campaign linked to the platform.
2038
+ * @type {Array<string>}
2039
+ * @memberof SyncUnlinkRequest
2040
+ */
2041
+ campaignIds?: Array<string>;
2042
+ /**
2043
+ * Also remove the campaign on the ad platform (already-removed counts as success). When false, only the local link is cleared and the remote is untouched.
2044
+ * @type {boolean}
2045
+ * @memberof SyncUnlinkRequest
2046
+ */
2047
+ deleteRemote?: boolean;
2048
+ }
2049
+
2050
+ /** The production base URL. Override via `baseUrl` (e.g. for staging). */
2051
+ declare const PRODUCTION_BASE_URL = "https://api.ads.defoai.com";
2052
+ declare const STAGING_BASE_URL = "https://api-ads-staging.defoai.com";
2053
+ interface DefoAdsOptions {
2054
+ /** A Defo Ads personal access token (`dads_…`). Required. */
2055
+ token: string;
2056
+ /** Default Space id (`spc_…`) sent as `X-Space-Id` on every call. Omit to use your Personal Space. */
2057
+ space?: string;
2058
+ /** Base URL. Defaults to production. Use {@link STAGING_BASE_URL} for staging. */
2059
+ baseUrl?: string;
2060
+ /** Max automatic retries on 429 / 5xx. Default 3. */
2061
+ maxRetries?: number;
2062
+ /** Inject a fetch implementation (handy for tests / non-global-fetch runtimes). */
2063
+ fetch?: typeof fetch;
2064
+ }
2065
+ /** Base error for any non-2xx response; carries the API's `{ code, message, details }`. */
2066
+ declare class DefoAdsError extends Error {
2067
+ readonly status: number;
2068
+ readonly code?: string;
2069
+ readonly details?: unknown;
2070
+ constructor(status: number, code: string | undefined, message: string, details?: unknown);
2071
+ }
2072
+ /** 401 — missing/invalid token. */ declare class AuthError extends DefoAdsError {
2073
+ name: string;
2074
+ }
2075
+ /** 403 — token lacks the required scope or Space membership. */ declare class ForbiddenError extends DefoAdsError {
2076
+ name: string;
2077
+ }
2078
+ /** 404 — resource not found (or outside your Space). */ declare class NotFoundError extends DefoAdsError {
2079
+ name: string;
2080
+ }
2081
+ /** 409 — conflict (e.g. delete blocked by dependents, or a sync already running). */ declare class ConflictError extends DefoAdsError {
2082
+ name: string;
2083
+ }
2084
+ /** 429 — rate limited. The SDK already retried up to `maxRetries`. */ declare class RateLimitError extends DefoAdsError {
2085
+ name: string;
2086
+ }
2087
+ interface ListParams {
2088
+ limit?: number;
2089
+ cursor?: string | number;
2090
+ }
2091
+ /** The Defo Ads client. Construct once, reuse everywhere. */
2092
+ declare class DefoAds {
2093
+ readonly campaigns: {
2094
+ /** List one page (default 50, max 200). */
2095
+ list: (params?: ListParams) => Promise<any[]>;
2096
+ /** Async-iterate EVERY item across all pages (follows `meta.nextCursor`). */
2097
+ listAll(params?: ListParams): AsyncGenerator<any>;
2098
+ /** Fetch one by id. */
2099
+ get: (id: string) => Promise<any>;
2100
+ /** Create. */
2101
+ create: (body: CampaignCreate) => Promise<any>;
2102
+ /** Partial update by id. */
2103
+ update: (id: string, body: CampaignUpdate) => Promise<any>;
2104
+ /** Delete by id. */
2105
+ delete: (id: string) => Promise<any>;
2106
+ };
2107
+ readonly adGroups: {
2108
+ /** List one page (default 50, max 200). */
2109
+ list: (params?: ListParams) => Promise<any[]>;
2110
+ /** Async-iterate EVERY item across all pages (follows `meta.nextCursor`). */
2111
+ listAll(params?: ListParams): AsyncGenerator<any>;
2112
+ /** Fetch one by id. */
2113
+ get: (id: string) => Promise<any>;
2114
+ /** Create. */
2115
+ create: (body: AdGroupCreate) => Promise<any>;
2116
+ /** Partial update by id. */
2117
+ update: (id: string, body: AdGroupUpdate) => Promise<any>;
2118
+ /** Delete by id. */
2119
+ delete: (id: string) => Promise<any>;
2120
+ };
2121
+ readonly ads: {
2122
+ /** List one page (default 50, max 200). */
2123
+ list: (params?: ListParams) => Promise<any[]>;
2124
+ /** Async-iterate EVERY item across all pages (follows `meta.nextCursor`). */
2125
+ listAll(params?: ListParams): AsyncGenerator<any>;
2126
+ /** Fetch one by id. */
2127
+ get: (id: string) => Promise<any>;
2128
+ /** Create. */
2129
+ create: (body: AdCreate) => Promise<any>;
2130
+ /** Partial update by id. */
2131
+ update: (id: string, body: AdUpdate) => Promise<any>;
2132
+ /** Delete by id. */
2133
+ delete: (id: string) => Promise<any>;
2134
+ };
2135
+ readonly keywords: {
2136
+ /** List one page (default 50, max 200). */
2137
+ list: (params?: ListParams) => Promise<any[]>;
2138
+ /** Async-iterate EVERY item across all pages (follows `meta.nextCursor`). */
2139
+ listAll(params?: ListParams): AsyncGenerator<any>;
2140
+ /** Fetch one by id. */
2141
+ get: (id: string) => Promise<any>;
2142
+ /** Create. */
2143
+ create: (body: KeywordCreate) => Promise<any>;
2144
+ /** Partial update by id. */
2145
+ update: (id: string, body: KeywordUpdate) => Promise<any>;
2146
+ /** Delete by id. */
2147
+ delete: (id: string) => Promise<any>;
2148
+ };
2149
+ readonly sites: {
2150
+ /** List one page (default 50, max 200). */
2151
+ list: (params?: ListParams) => Promise<any[]>;
2152
+ /** Async-iterate EVERY item across all pages (follows `meta.nextCursor`). */
2153
+ listAll(params?: ListParams): AsyncGenerator<any>;
2154
+ /** Fetch one by id. */
2155
+ get: (id: string) => Promise<any>;
2156
+ /** Create. */
2157
+ create: (body: SiteCreate) => Promise<any>;
2158
+ /** Partial update by id. */
2159
+ update: (id: string, body: SiteUpdate) => Promise<any>;
2160
+ /** Delete by id. */
2161
+ delete: (id: string) => Promise<any>;
2162
+ };
2163
+ readonly assets: {
2164
+ /** List one page (default 50, max 200). */
2165
+ list: (params?: ListParams) => Promise<any[]>;
2166
+ /** Async-iterate EVERY item across all pages (follows `meta.nextCursor`). */
2167
+ listAll(params?: ListParams): AsyncGenerator<any>;
2168
+ /** Fetch one by id. */
2169
+ get: (id: string) => Promise<any>;
2170
+ /** Create. */
2171
+ create: (body: AssetCreate) => Promise<any>;
2172
+ /** Partial update by id. */
2173
+ update: (id: string, body: AssetUpdate) => Promise<any>;
2174
+ /** Delete by id. */
2175
+ delete: (id: string) => Promise<any>;
2176
+ };
2177
+ readonly campaignAssets: {
2178
+ list: (p?: ListParams & {
2179
+ campaignId?: string;
2180
+ assetId?: string;
2181
+ }) => Promise<any>;
2182
+ get: (id: string) => Promise<any>;
2183
+ create: (body: CampaignAssetCreate) => Promise<any>;
2184
+ delete: (id: string) => Promise<any>;
2185
+ };
2186
+ readonly adAssets: {
2187
+ list: (p?: ListParams & {
2188
+ adId?: string;
2189
+ adGroupId?: string;
2190
+ campaignId?: string;
2191
+ role?: string;
2192
+ }) => Promise<any>;
2193
+ get: (id: string) => Promise<any>;
2194
+ create: (body: AdAssetCreate) => Promise<any>;
2195
+ delete: (id: string) => Promise<any>;
2196
+ };
2197
+ readonly media: {
2198
+ matrix: () => Promise<any>;
2199
+ };
2200
+ readonly reports: {
2201
+ /** Performance stats; see the reference for `date_range`, `group_by`, `metrics`, etc. */
2202
+ stats: (params?: Record<string, any>) => Promise<any>;
2203
+ };
2204
+ readonly sync: {
2205
+ /** Trigger a sync for the active Space (async — poll `get(syncId)`). */
2206
+ trigger: (body?: SyncTriggerRequest) => Promise<any>;
2207
+ list: (p?: ListParams) => Promise<any>;
2208
+ /** Dry-run plan (import/export/remove) without executing. */
2209
+ plan: (p?: {
2210
+ platforms?: string;
2211
+ }) => Promise<any>;
2212
+ get: (id: string) => Promise<any>;
2213
+ cancel: (id: string) => Promise<any>;
2214
+ /** Unlink campaigns from a platform (keeps the local campaign). */
2215
+ unlink: (body: SyncUnlinkRequest) => Promise<any>;
2216
+ };
2217
+ readonly meta: {
2218
+ /** Introspect the authenticated token. */
2219
+ me: () => Promise<any>;
2220
+ /** List Spaces the token can access. */
2221
+ spaces: () => Promise<any>;
2222
+ };
2223
+ constructor(options: DefoAdsOptions);
2224
+ }
2225
+
2226
+ export { AuthError, ConflictError, DefoAds, DefoAdsError, type DefoAdsOptions, ForbiddenError, NotFoundError, PRODUCTION_BASE_URL, RateLimitError, STAGING_BASE_URL, DefoAds as default };