@getlatedev/node 0.2.1683 → 0.2.1684

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.mts CHANGED
@@ -4662,6 +4662,8 @@ type AdRuleCondition = {
4662
4662
  *
4663
4663
  * For example, `cpc` over `last_complete_hour` `>=` 5 against `last_30d` means the last hour's clicks cost 5 times their 30-day price.
4664
4664
  *
4665
+ * `campaign`, on `keyword` and `search_term` rules only, divides by the object's campaign over the same window, from the synced campaign totals. `cpc` `>=` 5 against `campaign` means a click costs 5 times the campaign's average; `spend` `>=` 0.2 means a fifth of the campaign's spend.
4666
+ *
4665
4667
  */
4666
4668
  compareTo?: string;
4667
4669
  /**
@@ -4734,6 +4736,9 @@ type AdRuleEvaluation = {
4734
4736
  };
4735
4737
  /**
4736
4738
  * Narrows the objects the rule checks. Every filter must hold. A campaign rule reads `name`, `campaign_id`, `goal`, `days_live`, `days_since_change`, `budget_level` and `channel_type`; an ad set rule all but `days_since_change`, plus `campaign_name` and `adset_id`; an ad rule also `adset_name` and `ad_id`.
4739
+ *
4740
+ * A keyword rule reads `name` (the keyword text), `campaign_name`, `adset_name`, `campaign_id`, `adset_id` and `match_type`. A search term rule reads those (`name` is the term) plus `search_term_status` and `blocked_by_negative`.
4741
+ *
4737
4742
  */
4738
4743
  type AdRuleFilters = Array<({
4739
4744
  /**
@@ -4763,6 +4768,18 @@ type AdRuleFilters = Array<({
4763
4768
  change: 'budget' | 'bidding' | 'status' | 'goal';
4764
4769
  op: '>=' | '<';
4765
4770
  value: number;
4771
+ } | {
4772
+ field: 'match_type';
4773
+ op: 'in' | 'not_in';
4774
+ values: Array<('EXACT' | 'PHRASE' | 'BROAD')>;
4775
+ } | {
4776
+ field: 'search_term_status';
4777
+ op: 'in' | 'not_in';
4778
+ values: Array<('ADDED' | 'EXCLUDED' | 'ADDED_EXCLUDED' | 'NONE')>;
4779
+ } | {
4780
+ field: 'blocked_by_negative';
4781
+ op: 'equals';
4782
+ value: boolean;
4766
4783
  })>;
4767
4784
  /**
4768
4785
  * Campaigns judged together, campaign rules only. Each group's numbers and your results are added up across its campaigns, and rates and formulas are computed on the totals: a group's `result:cac_percent` is its total spend over its total revenue.
@@ -4782,9 +4799,20 @@ type AdRuleGroups = Array<{
4782
4799
  filters: AdRuleFilters;
4783
4800
  }> | null;
4784
4801
  /**
4785
- * Whether the rule checks campaigns, ad sets or single ads. Each one is evaluated on its own.
4802
+ * Whether the rule checks campaigns, ad sets, single ads, Google keywords or Google search terms. Each one is evaluated on its own.
4803
+ *
4804
+ * `keyword` and `search_term` read Google Search, on Google Ads accounts only. A keyword's id is `<adGroupId>~<criterionId>`, as `PATCH /v1/ads/keywords/{keywordId}` takes it. A search term is one per ad group, its id `<adGroupId>~<term>`.
4805
+ *
4806
+ * - They read a daily history Zernio fetches from Google. A day keeps its 50,000 rows that spent most.
4807
+ * - Every daily window works, `today` included: today is refreshed at most once an hour.
4808
+ * - A new rule's first runs load its days a few at a time, and fail until all are in.
4809
+ * - Paused keywords are not judged.
4810
+ * - Google lists only what showed at least once, so `impressions` takes `>` or `>=`, never `<` or `<=`.
4811
+ *
4812
+ * They take `spend`, `impressions`, `clicks`, `conversions`, `ctr`, `cpc`, `cpm`, `cpa` and `roas` over whole days, no `usual`, `of`, `top` or `bottom`, and `compareTo` only as `campaign`. A keyword rule can `notify` or `pause`; a search term rule only notifies.
4813
+ *
4786
4814
  */
4787
- type AdRuleLevel = 'campaign' | 'adset' | 'ad';
4815
+ type AdRuleLevel = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
4788
4816
  /**
4789
4817
  * Turns matches into alerts. An object acts and notifies only after `confirmChecks` matching runs in a row; its alert stays open while it matches or `hold` holds, and resolves on its own (a day after the object stops delivering). Cooldown and caps still decide repeat actions.
4790
4818
  *
@@ -4806,11 +4834,18 @@ type AdRuleLifecycle = {
4806
4834
  };
4807
4835
  type AdRuleObjectEvaluation = {
4808
4836
  /**
4809
- * Platform ID of the campaign or ad set.
4837
+ * Platform ID of the campaign, ad set or ad. A keyword is `{adGroupId}~{criterionId}`, a search term `{adGroupId}~{term}`.
4810
4838
  */
4811
4839
  id: string;
4840
+ /**
4841
+ * The object's name: the keyword text or the search term.
4842
+ */
4812
4843
  name: string;
4813
4844
  campaignId: (string) | null;
4845
+ /**
4846
+ * Absent on runs recorded before November 2026.
4847
+ */
4848
+ campaignName?: (string) | null;
4814
4849
  /**
4815
4850
  * True when every condition holds.
4816
4851
  */
@@ -4865,7 +4900,7 @@ type AdRuleRun = {
4865
4900
  accountId?: string;
4866
4901
  platform?: string;
4867
4902
  platformAdAccountId?: string;
4868
- level?: 'campaign' | 'adset';
4903
+ level?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
4869
4904
  };
4870
4905
  today?: string;
4871
4906
  timezone?: string;
@@ -4875,7 +4910,14 @@ type AdRuleRun = {
4875
4910
  * Where the run's hourly windows ended. Absent on runs recorded before November 2026.
4876
4911
  */
4877
4912
  hourlyThrough?: (string) | null;
4913
+ /**
4914
+ * The matched objects, at most 200. `matchedTotal` has the full count.
4915
+ */
4878
4916
  matched?: Array<AdRuleObjectEvaluation>;
4917
+ /**
4918
+ * How many objects matched, including those past the 200 recorded. Absent on runs recorded before November 2026.
4919
+ */
4920
+ matchedTotal?: number;
4879
4921
  actions?: Array<{
4880
4922
  objectId: string;
4881
4923
  type: 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'adjust_target' | 'reallocate_budget' | 'duplicate' | 'edit_name';
@@ -4911,6 +4953,7 @@ type AdRuleRun = {
4911
4953
  } | null;
4912
4954
  error: (string) | null;
4913
4955
  };
4956
+ type level2 = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
4914
4957
  /**
4915
4958
  * Either `everyMinutes` or `times`. Sending a schedule replaces the rule's whole timing. Without one, a new rule runs every 60 minutes.
4916
4959
  */
@@ -4992,7 +5035,7 @@ type AdsAlert = {
4992
5035
  };
4993
5036
  type kind = 'ad_rejected' | 'delivery_issue' | 'payment' | 'budget_limited' | 'spend_no_results' | 'connection_lost' | 'sync_failing';
4994
5037
  type severity = 'error' | 'warning' | 'info';
4995
- type level2 = 'ad_account' | 'campaign' | 'ad_set' | 'ad';
5038
+ type level3 = 'ad_account' | 'campaign' | 'ad_set' | 'ad';
4996
5039
  /**
4997
5040
  * One ad schedule window as Google stores it. Half-open: it is exclusive of the end minute, so 09:00-12:00 and 12:00-17:00 are adjacent, not overlapping.
4998
5041
  */
@@ -6106,7 +6149,7 @@ type AutomationAction = AutomationActionResult & {
6106
6149
  automationName: string;
6107
6150
  checkId: string;
6108
6151
  subject: {
6109
- kind?: 'campaign' | 'adset' | 'ad';
6152
+ kind?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6110
6153
  id?: string;
6111
6154
  name?: (string) | null;
6112
6155
  };
@@ -6118,7 +6161,7 @@ type AutomationAction = AutomationActionResult & {
6118
6161
  currency: (string) | null;
6119
6162
  createdAt: string;
6120
6163
  };
6121
- type kind2 = 'campaign' | 'adset' | 'ad';
6164
+ type kind2 = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6122
6165
  /**
6123
6166
  * What an ad rule did to one object, as an absolute change: a budget change reads as the budget it set.
6124
6167
  */
@@ -6190,6 +6233,18 @@ type AutomationAdFilter = {
6190
6233
  field: "channel_type";
6191
6234
  op: 'in' | 'not_in';
6192
6235
  values: Array<('SEARCH' | 'DISPLAY' | 'SHOPPING' | 'HOTEL' | 'VIDEO' | 'MULTI_CHANNEL' | 'LOCAL' | 'SMART' | 'PERFORMANCE_MAX' | 'LOCAL_SERVICES' | 'TRAVEL' | 'DEMAND_GEN')>;
6236
+ } | {
6237
+ field: "match_type";
6238
+ op: 'in' | 'not_in';
6239
+ values: Array<('EXACT' | 'PHRASE' | 'BROAD')>;
6240
+ } | {
6241
+ field: "search_term_status";
6242
+ op: 'in' | 'not_in';
6243
+ values: Array<('ADDED' | 'EXCLUDED' | 'ADDED_EXCLUDED' | 'NONE')>;
6244
+ } | {
6245
+ field: "blocked_by_negative";
6246
+ op: "equals";
6247
+ value: boolean;
6193
6248
  };
6194
6249
  type field = 'name' | 'campaign_name' | 'adset_name' | 'goal';
6195
6250
  type op2 = 'contains' | 'not_contains' | 'equals' | 'not_equals' | 'starts_with';
@@ -6249,7 +6304,7 @@ type status7 = 'pending' | 'approved' | 'rejected' | 'expired' | 'cancelled';
6249
6304
  type AutomationApprovalChange = {
6250
6305
  actionId: string;
6251
6306
  subject: {
6252
- kind: 'campaign' | 'adset' | 'ad';
6307
+ kind: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6253
6308
  id: string;
6254
6309
  name: (string) | null;
6255
6310
  };
@@ -6396,7 +6451,7 @@ type AutomationBacktestDay = {
6396
6451
  heldBack: number;
6397
6452
  actions: Array<{
6398
6453
  subject: {
6399
- kind: 'campaign' | 'adset' | 'ad';
6454
+ kind: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6400
6455
  id: string;
6401
6456
  name: string;
6402
6457
  campaignId: (string) | null;
@@ -6674,7 +6729,7 @@ type AutomationPreview = {
6674
6729
  */
6675
6730
  subjects: Array<{
6676
6731
  subject: {
6677
- kind?: 'campaign' | 'adset' | 'ad';
6732
+ kind?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6678
6733
  /**
6679
6734
  * Platform ID.
6680
6735
  */
@@ -6908,7 +6963,7 @@ type AutomationSubjects = {
6908
6963
  /**
6909
6964
  * The objects judged one by one.
6910
6965
  */
6911
- each: 'campaign' | 'adset' | 'ad';
6966
+ each: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6912
6967
  /**
6913
6968
  * The ad account to check. One per ad rule, and an edit cannot move it to another.
6914
6969
  */
@@ -6949,7 +7004,7 @@ type AutomationSubjects = {
6949
7004
  /**
6950
7005
  * The objects judged one by one.
6951
7006
  */
6952
- type each = 'campaign' | 'adset' | 'ad';
7007
+ type each = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6953
7008
  type AutomationTemplate = {
6954
7009
  /**
6955
7010
  * A team template's id (24 hex characters), or the id of one of Zernio's templates such as `stop_losers`.
@@ -15023,7 +15078,7 @@ type GoogleListingGroupDimension = {
15023
15078
  index: 'INDEX0' | 'INDEX1' | 'INDEX2' | 'INDEX3' | 'INDEX4';
15024
15079
  };
15025
15080
  };
15026
- type level3 = 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5';
15081
+ type level4 = 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5';
15027
15082
  type condition = 'NEW' | 'REFURBISHED' | 'USED';
15028
15083
  type channel4 = 'ONLINE' | 'LOCAL';
15029
15084
  type index = 'INDEX0' | 'INDEX1' | 'INDEX2' | 'INDEX3' | 'INDEX4';
@@ -23173,7 +23228,7 @@ type event10 = 'ad.created';
23173
23228
  /**
23174
23229
  * Always `AD`.
23175
23230
  */
23176
- type level4 = 'AD';
23231
+ type level5 = 'AD';
23177
23232
  /**
23178
23233
  * Where the ad was created. `zernio` for ads created through Zernio, `platform` for ads the sync detected.
23179
23234
  */
@@ -23336,9 +23391,9 @@ type WebhookPayloadAdRuleTriggered = {
23336
23391
  id: string;
23337
23392
  name: string;
23338
23393
  /**
23339
- * Whether the rule evaluates campaigns, ad sets or ads.
23394
+ * Whether the rule evaluates campaigns, ad sets, ads, Google keywords or Google search terms.
23340
23395
  */
23341
- level: 'campaign' | 'adset' | 'ad';
23396
+ level: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
23342
23397
  /**
23343
23398
  * Platform-native ad account ID the rule watches.
23344
23399
  */
@@ -23477,10 +23532,6 @@ type WebhookPayloadAdRuleTriggered = {
23477
23532
  timestamp: string;
23478
23533
  };
23479
23534
  type event13 = 'ad_rule.triggered';
23480
- /**
23481
- * Whether the rule evaluates campaigns, ad sets or ads.
23482
- */
23483
- type level5 = 'campaign' | 'adset' | 'ad';
23484
23535
  /**
23485
23536
  * Webhook payload for the `ad_set.created` event. Fires when an ad set is created through Zernio (API, MCP or dashboard) or detected by the sync, once per ad set, after its row is recorded so `GET /v1/ads/ad-sets/{adSetId}` finds it.
23486
23537
  *
@@ -58961,7 +59012,7 @@ type GetAutomationCatalogResponse = ({
58961
59012
  * Ad rule subjects.
58962
59013
  */
58963
59014
  subjects: Array<{
58964
- each?: 'campaign' | 'adset' | 'ad';
59015
+ each?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
58965
59016
  platforms?: Array<(string)>;
58966
59017
  metrics?: Array<{
58967
59018
  metric?: string;
@@ -59523,7 +59574,7 @@ type CreateAdRuleData = {
59523
59574
  adAccountId: string;
59524
59575
  level: AdRuleLevel;
59525
59576
  /**
59526
- * Only check these platform campaign IDs (or their ad sets). Leave out to check the whole ad account.
59577
+ * Only check these platform campaign IDs (or what sits in them). Leave out to check the whole ad account.
59527
59578
  */
59528
59579
  campaignIds?: Array<(string)>;
59529
59580
  filters?: AdRuleFilters;
package/dist/index.d.ts CHANGED
@@ -4662,6 +4662,8 @@ type AdRuleCondition = {
4662
4662
  *
4663
4663
  * For example, `cpc` over `last_complete_hour` `>=` 5 against `last_30d` means the last hour's clicks cost 5 times their 30-day price.
4664
4664
  *
4665
+ * `campaign`, on `keyword` and `search_term` rules only, divides by the object's campaign over the same window, from the synced campaign totals. `cpc` `>=` 5 against `campaign` means a click costs 5 times the campaign's average; `spend` `>=` 0.2 means a fifth of the campaign's spend.
4666
+ *
4665
4667
  */
4666
4668
  compareTo?: string;
4667
4669
  /**
@@ -4734,6 +4736,9 @@ type AdRuleEvaluation = {
4734
4736
  };
4735
4737
  /**
4736
4738
  * Narrows the objects the rule checks. Every filter must hold. A campaign rule reads `name`, `campaign_id`, `goal`, `days_live`, `days_since_change`, `budget_level` and `channel_type`; an ad set rule all but `days_since_change`, plus `campaign_name` and `adset_id`; an ad rule also `adset_name` and `ad_id`.
4739
+ *
4740
+ * A keyword rule reads `name` (the keyword text), `campaign_name`, `adset_name`, `campaign_id`, `adset_id` and `match_type`. A search term rule reads those (`name` is the term) plus `search_term_status` and `blocked_by_negative`.
4741
+ *
4737
4742
  */
4738
4743
  type AdRuleFilters = Array<({
4739
4744
  /**
@@ -4763,6 +4768,18 @@ type AdRuleFilters = Array<({
4763
4768
  change: 'budget' | 'bidding' | 'status' | 'goal';
4764
4769
  op: '>=' | '<';
4765
4770
  value: number;
4771
+ } | {
4772
+ field: 'match_type';
4773
+ op: 'in' | 'not_in';
4774
+ values: Array<('EXACT' | 'PHRASE' | 'BROAD')>;
4775
+ } | {
4776
+ field: 'search_term_status';
4777
+ op: 'in' | 'not_in';
4778
+ values: Array<('ADDED' | 'EXCLUDED' | 'ADDED_EXCLUDED' | 'NONE')>;
4779
+ } | {
4780
+ field: 'blocked_by_negative';
4781
+ op: 'equals';
4782
+ value: boolean;
4766
4783
  })>;
4767
4784
  /**
4768
4785
  * Campaigns judged together, campaign rules only. Each group's numbers and your results are added up across its campaigns, and rates and formulas are computed on the totals: a group's `result:cac_percent` is its total spend over its total revenue.
@@ -4782,9 +4799,20 @@ type AdRuleGroups = Array<{
4782
4799
  filters: AdRuleFilters;
4783
4800
  }> | null;
4784
4801
  /**
4785
- * Whether the rule checks campaigns, ad sets or single ads. Each one is evaluated on its own.
4802
+ * Whether the rule checks campaigns, ad sets, single ads, Google keywords or Google search terms. Each one is evaluated on its own.
4803
+ *
4804
+ * `keyword` and `search_term` read Google Search, on Google Ads accounts only. A keyword's id is `<adGroupId>~<criterionId>`, as `PATCH /v1/ads/keywords/{keywordId}` takes it. A search term is one per ad group, its id `<adGroupId>~<term>`.
4805
+ *
4806
+ * - They read a daily history Zernio fetches from Google. A day keeps its 50,000 rows that spent most.
4807
+ * - Every daily window works, `today` included: today is refreshed at most once an hour.
4808
+ * - A new rule's first runs load its days a few at a time, and fail until all are in.
4809
+ * - Paused keywords are not judged.
4810
+ * - Google lists only what showed at least once, so `impressions` takes `>` or `>=`, never `<` or `<=`.
4811
+ *
4812
+ * They take `spend`, `impressions`, `clicks`, `conversions`, `ctr`, `cpc`, `cpm`, `cpa` and `roas` over whole days, no `usual`, `of`, `top` or `bottom`, and `compareTo` only as `campaign`. A keyword rule can `notify` or `pause`; a search term rule only notifies.
4813
+ *
4786
4814
  */
4787
- type AdRuleLevel = 'campaign' | 'adset' | 'ad';
4815
+ type AdRuleLevel = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
4788
4816
  /**
4789
4817
  * Turns matches into alerts. An object acts and notifies only after `confirmChecks` matching runs in a row; its alert stays open while it matches or `hold` holds, and resolves on its own (a day after the object stops delivering). Cooldown and caps still decide repeat actions.
4790
4818
  *
@@ -4806,11 +4834,18 @@ type AdRuleLifecycle = {
4806
4834
  };
4807
4835
  type AdRuleObjectEvaluation = {
4808
4836
  /**
4809
- * Platform ID of the campaign or ad set.
4837
+ * Platform ID of the campaign, ad set or ad. A keyword is `{adGroupId}~{criterionId}`, a search term `{adGroupId}~{term}`.
4810
4838
  */
4811
4839
  id: string;
4840
+ /**
4841
+ * The object's name: the keyword text or the search term.
4842
+ */
4812
4843
  name: string;
4813
4844
  campaignId: (string) | null;
4845
+ /**
4846
+ * Absent on runs recorded before November 2026.
4847
+ */
4848
+ campaignName?: (string) | null;
4814
4849
  /**
4815
4850
  * True when every condition holds.
4816
4851
  */
@@ -4865,7 +4900,7 @@ type AdRuleRun = {
4865
4900
  accountId?: string;
4866
4901
  platform?: string;
4867
4902
  platformAdAccountId?: string;
4868
- level?: 'campaign' | 'adset';
4903
+ level?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
4869
4904
  };
4870
4905
  today?: string;
4871
4906
  timezone?: string;
@@ -4875,7 +4910,14 @@ type AdRuleRun = {
4875
4910
  * Where the run's hourly windows ended. Absent on runs recorded before November 2026.
4876
4911
  */
4877
4912
  hourlyThrough?: (string) | null;
4913
+ /**
4914
+ * The matched objects, at most 200. `matchedTotal` has the full count.
4915
+ */
4878
4916
  matched?: Array<AdRuleObjectEvaluation>;
4917
+ /**
4918
+ * How many objects matched, including those past the 200 recorded. Absent on runs recorded before November 2026.
4919
+ */
4920
+ matchedTotal?: number;
4879
4921
  actions?: Array<{
4880
4922
  objectId: string;
4881
4923
  type: 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'adjust_target' | 'reallocate_budget' | 'duplicate' | 'edit_name';
@@ -4911,6 +4953,7 @@ type AdRuleRun = {
4911
4953
  } | null;
4912
4954
  error: (string) | null;
4913
4955
  };
4956
+ type level2 = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
4914
4957
  /**
4915
4958
  * Either `everyMinutes` or `times`. Sending a schedule replaces the rule's whole timing. Without one, a new rule runs every 60 minutes.
4916
4959
  */
@@ -4992,7 +5035,7 @@ type AdsAlert = {
4992
5035
  };
4993
5036
  type kind = 'ad_rejected' | 'delivery_issue' | 'payment' | 'budget_limited' | 'spend_no_results' | 'connection_lost' | 'sync_failing';
4994
5037
  type severity = 'error' | 'warning' | 'info';
4995
- type level2 = 'ad_account' | 'campaign' | 'ad_set' | 'ad';
5038
+ type level3 = 'ad_account' | 'campaign' | 'ad_set' | 'ad';
4996
5039
  /**
4997
5040
  * One ad schedule window as Google stores it. Half-open: it is exclusive of the end minute, so 09:00-12:00 and 12:00-17:00 are adjacent, not overlapping.
4998
5041
  */
@@ -6106,7 +6149,7 @@ type AutomationAction = AutomationActionResult & {
6106
6149
  automationName: string;
6107
6150
  checkId: string;
6108
6151
  subject: {
6109
- kind?: 'campaign' | 'adset' | 'ad';
6152
+ kind?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6110
6153
  id?: string;
6111
6154
  name?: (string) | null;
6112
6155
  };
@@ -6118,7 +6161,7 @@ type AutomationAction = AutomationActionResult & {
6118
6161
  currency: (string) | null;
6119
6162
  createdAt: string;
6120
6163
  };
6121
- type kind2 = 'campaign' | 'adset' | 'ad';
6164
+ type kind2 = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6122
6165
  /**
6123
6166
  * What an ad rule did to one object, as an absolute change: a budget change reads as the budget it set.
6124
6167
  */
@@ -6190,6 +6233,18 @@ type AutomationAdFilter = {
6190
6233
  field: "channel_type";
6191
6234
  op: 'in' | 'not_in';
6192
6235
  values: Array<('SEARCH' | 'DISPLAY' | 'SHOPPING' | 'HOTEL' | 'VIDEO' | 'MULTI_CHANNEL' | 'LOCAL' | 'SMART' | 'PERFORMANCE_MAX' | 'LOCAL_SERVICES' | 'TRAVEL' | 'DEMAND_GEN')>;
6236
+ } | {
6237
+ field: "match_type";
6238
+ op: 'in' | 'not_in';
6239
+ values: Array<('EXACT' | 'PHRASE' | 'BROAD')>;
6240
+ } | {
6241
+ field: "search_term_status";
6242
+ op: 'in' | 'not_in';
6243
+ values: Array<('ADDED' | 'EXCLUDED' | 'ADDED_EXCLUDED' | 'NONE')>;
6244
+ } | {
6245
+ field: "blocked_by_negative";
6246
+ op: "equals";
6247
+ value: boolean;
6193
6248
  };
6194
6249
  type field = 'name' | 'campaign_name' | 'adset_name' | 'goal';
6195
6250
  type op2 = 'contains' | 'not_contains' | 'equals' | 'not_equals' | 'starts_with';
@@ -6249,7 +6304,7 @@ type status7 = 'pending' | 'approved' | 'rejected' | 'expired' | 'cancelled';
6249
6304
  type AutomationApprovalChange = {
6250
6305
  actionId: string;
6251
6306
  subject: {
6252
- kind: 'campaign' | 'adset' | 'ad';
6307
+ kind: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6253
6308
  id: string;
6254
6309
  name: (string) | null;
6255
6310
  };
@@ -6396,7 +6451,7 @@ type AutomationBacktestDay = {
6396
6451
  heldBack: number;
6397
6452
  actions: Array<{
6398
6453
  subject: {
6399
- kind: 'campaign' | 'adset' | 'ad';
6454
+ kind: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6400
6455
  id: string;
6401
6456
  name: string;
6402
6457
  campaignId: (string) | null;
@@ -6674,7 +6729,7 @@ type AutomationPreview = {
6674
6729
  */
6675
6730
  subjects: Array<{
6676
6731
  subject: {
6677
- kind?: 'campaign' | 'adset' | 'ad';
6732
+ kind?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6678
6733
  /**
6679
6734
  * Platform ID.
6680
6735
  */
@@ -6908,7 +6963,7 @@ type AutomationSubjects = {
6908
6963
  /**
6909
6964
  * The objects judged one by one.
6910
6965
  */
6911
- each: 'campaign' | 'adset' | 'ad';
6966
+ each: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6912
6967
  /**
6913
6968
  * The ad account to check. One per ad rule, and an edit cannot move it to another.
6914
6969
  */
@@ -6949,7 +7004,7 @@ type AutomationSubjects = {
6949
7004
  /**
6950
7005
  * The objects judged one by one.
6951
7006
  */
6952
- type each = 'campaign' | 'adset' | 'ad';
7007
+ type each = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
6953
7008
  type AutomationTemplate = {
6954
7009
  /**
6955
7010
  * A team template's id (24 hex characters), or the id of one of Zernio's templates such as `stop_losers`.
@@ -15023,7 +15078,7 @@ type GoogleListingGroupDimension = {
15023
15078
  index: 'INDEX0' | 'INDEX1' | 'INDEX2' | 'INDEX3' | 'INDEX4';
15024
15079
  };
15025
15080
  };
15026
- type level3 = 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5';
15081
+ type level4 = 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5';
15027
15082
  type condition = 'NEW' | 'REFURBISHED' | 'USED';
15028
15083
  type channel4 = 'ONLINE' | 'LOCAL';
15029
15084
  type index = 'INDEX0' | 'INDEX1' | 'INDEX2' | 'INDEX3' | 'INDEX4';
@@ -23173,7 +23228,7 @@ type event10 = 'ad.created';
23173
23228
  /**
23174
23229
  * Always `AD`.
23175
23230
  */
23176
- type level4 = 'AD';
23231
+ type level5 = 'AD';
23177
23232
  /**
23178
23233
  * Where the ad was created. `zernio` for ads created through Zernio, `platform` for ads the sync detected.
23179
23234
  */
@@ -23336,9 +23391,9 @@ type WebhookPayloadAdRuleTriggered = {
23336
23391
  id: string;
23337
23392
  name: string;
23338
23393
  /**
23339
- * Whether the rule evaluates campaigns, ad sets or ads.
23394
+ * Whether the rule evaluates campaigns, ad sets, ads, Google keywords or Google search terms.
23340
23395
  */
23341
- level: 'campaign' | 'adset' | 'ad';
23396
+ level: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
23342
23397
  /**
23343
23398
  * Platform-native ad account ID the rule watches.
23344
23399
  */
@@ -23477,10 +23532,6 @@ type WebhookPayloadAdRuleTriggered = {
23477
23532
  timestamp: string;
23478
23533
  };
23479
23534
  type event13 = 'ad_rule.triggered';
23480
- /**
23481
- * Whether the rule evaluates campaigns, ad sets or ads.
23482
- */
23483
- type level5 = 'campaign' | 'adset' | 'ad';
23484
23535
  /**
23485
23536
  * Webhook payload for the `ad_set.created` event. Fires when an ad set is created through Zernio (API, MCP or dashboard) or detected by the sync, once per ad set, after its row is recorded so `GET /v1/ads/ad-sets/{adSetId}` finds it.
23486
23537
  *
@@ -58961,7 +59012,7 @@ type GetAutomationCatalogResponse = ({
58961
59012
  * Ad rule subjects.
58962
59013
  */
58963
59014
  subjects: Array<{
58964
- each?: 'campaign' | 'adset' | 'ad';
59015
+ each?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
58965
59016
  platforms?: Array<(string)>;
58966
59017
  metrics?: Array<{
58967
59018
  metric?: string;
@@ -59523,7 +59574,7 @@ type CreateAdRuleData = {
59523
59574
  adAccountId: string;
59524
59575
  level: AdRuleLevel;
59525
59576
  /**
59526
- * Only check these platform campaign IDs (or their ad sets). Leave out to check the whole ad account.
59577
+ * Only check these platform campaign IDs (or what sits in them). Leave out to check the whole ad account.
59527
59578
  */
59528
59579
  campaignIds?: Array<(string)>;
59529
59580
  filters?: AdRuleFilters;
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@getlatedev/node",
39
- version: "0.2.1683",
39
+ version: "0.2.1684",
40
40
  description: "The official Node.js library for the Zernio API",
41
41
  main: "dist/index.js",
42
42
  module: "dist/index.mjs",
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@getlatedev/node",
8
- version: "0.2.1683",
8
+ version: "0.2.1684",
9
9
  description: "The official Node.js library for the Zernio API",
10
10
  main: "dist/index.js",
11
11
  module: "dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.1683",
3
+ "version": "0.2.1684",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -13954,13 +13954,13 @@ export const listAdRules = <ThrowOnError extends boolean = false>(options?: Opti
13954
13954
 
13955
13955
  /**
13956
13956
  * Create an ad rule
13957
- * Creates a rule that checks the campaigns or ad sets of one ad account on a schedule and acts on each one that meets every condition.
13957
+ * Creates a rule that checks the campaigns, ad sets, ads, keywords or search terms of one ad account on a schedule and acts on each one that meets every condition.
13958
13958
  *
13959
- * Rules support Meta, Google, TikTok, LinkedIn, Pinterest, X and Reddit ads connections. Use `POST /v1/ads/rules/{ruleId}/preview` to see what a rule would match before enabling it.
13959
+ * Rules support Meta, Google, TikTok, LinkedIn, Pinterest, X and Reddit ads connections. Keyword and search term rules are Google only. Use `POST /v1/ads/rules/{ruleId}/preview` to see what a rule would match before enabling it.
13960
13960
  *
13961
13961
  * ### Evaluation
13962
13962
  *
13963
- * Each campaign or ad set is evaluated on its own, over the ad account's calendar days, from the metrics Zernio syncs.
13963
+ * Each object is evaluated on its own, over the ad account's calendar days. Campaigns, ad sets and ads read the metrics Zernio syncs; keywords and search terms are summed from the daily history Zernio keeps of them.
13964
13964
  *
13965
13965
  * ### Actions
13966
13966
  *
@@ -13970,6 +13970,8 @@ export const listAdRules = <ThrowOnError extends boolean = false>(options?: Opti
13970
13970
  * - `activate`
13971
13971
  * - `adjust_budget`
13972
13972
  *
13973
+ * A keyword rule can notify and pause; a search term rule only notifies.
13974
+ *
13973
13975
  * ### Cooldown
13974
13976
  *
13975
13977
  * After acting on an object, the rule leaves that object alone for `cooldownMinutes`. A rule that pauses, activates or adjusts budgets needs a cooldown at least as long as its schedule.
@@ -2234,6 +2234,8 @@ export type AdRuleCondition = {
2234
2234
  *
2235
2235
  * For example, `cpc` over `last_complete_hour` `>=` 5 against `last_30d` means the last hour's clicks cost 5 times their 30-day price.
2236
2236
  *
2237
+ * `campaign`, on `keyword` and `search_term` rules only, divides by the object's campaign over the same window, from the synced campaign totals. `cpc` `>=` 5 against `campaign` means a click costs 5 times the campaign's average; `spend` `>=` 0.2 means a fifth of the campaign's spend.
2238
+ *
2237
2239
  */
2238
2240
  compareTo?: string;
2239
2241
  /**
@@ -2312,6 +2314,9 @@ export type AdRuleEvaluation = {
2312
2314
 
2313
2315
  /**
2314
2316
  * Narrows the objects the rule checks. Every filter must hold. A campaign rule reads `name`, `campaign_id`, `goal`, `days_live`, `days_since_change`, `budget_level` and `channel_type`; an ad set rule all but `days_since_change`, plus `campaign_name` and `adset_id`; an ad rule also `adset_name` and `ad_id`.
2317
+ *
2318
+ * A keyword rule reads `name` (the keyword text), `campaign_name`, `adset_name`, `campaign_id`, `adset_id` and `match_type`. A search term rule reads those (`name` is the term) plus `search_term_status` and `blocked_by_negative`.
2319
+ *
2315
2320
  */
2316
2321
  export type AdRuleFilters = Array<({
2317
2322
  /**
@@ -2341,6 +2346,18 @@ export type AdRuleFilters = Array<({
2341
2346
  change: 'budget' | 'bidding' | 'status' | 'goal';
2342
2347
  op: '>=' | '<';
2343
2348
  value: number;
2349
+ } | {
2350
+ field: 'match_type';
2351
+ op: 'in' | 'not_in';
2352
+ values: Array<('EXACT' | 'PHRASE' | 'BROAD')>;
2353
+ } | {
2354
+ field: 'search_term_status';
2355
+ op: 'in' | 'not_in';
2356
+ values: Array<('ADDED' | 'EXCLUDED' | 'ADDED_EXCLUDED' | 'NONE')>;
2357
+ } | {
2358
+ field: 'blocked_by_negative';
2359
+ op: 'equals';
2360
+ value: boolean;
2344
2361
  })>;
2345
2362
 
2346
2363
  /**
@@ -2362,9 +2379,20 @@ export type AdRuleGroups = Array<{
2362
2379
  }> | null;
2363
2380
 
2364
2381
  /**
2365
- * Whether the rule checks campaigns, ad sets or single ads. Each one is evaluated on its own.
2382
+ * Whether the rule checks campaigns, ad sets, single ads, Google keywords or Google search terms. Each one is evaluated on its own.
2383
+ *
2384
+ * `keyword` and `search_term` read Google Search, on Google Ads accounts only. A keyword's id is `<adGroupId>~<criterionId>`, as `PATCH /v1/ads/keywords/{keywordId}` takes it. A search term is one per ad group, its id `<adGroupId>~<term>`.
2385
+ *
2386
+ * - They read a daily history Zernio fetches from Google. A day keeps its 50,000 rows that spent most.
2387
+ * - Every daily window works, `today` included: today is refreshed at most once an hour.
2388
+ * - A new rule's first runs load its days a few at a time, and fail until all are in.
2389
+ * - Paused keywords are not judged.
2390
+ * - Google lists only what showed at least once, so `impressions` takes `>` or `>=`, never `<` or `<=`.
2391
+ *
2392
+ * They take `spend`, `impressions`, `clicks`, `conversions`, `ctr`, `cpc`, `cpm`, `cpa` and `roas` over whole days, no `usual`, `of`, `top` or `bottom`, and `compareTo` only as `campaign`. A keyword rule can `notify` or `pause`; a search term rule only notifies.
2393
+ *
2366
2394
  */
2367
- export type AdRuleLevel = 'campaign' | 'adset' | 'ad';
2395
+ export type AdRuleLevel = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
2368
2396
 
2369
2397
  /**
2370
2398
  * Turns matches into alerts. An object acts and notifies only after `confirmChecks` matching runs in a row; its alert stays open while it matches or `hold` holds, and resolves on its own (a day after the object stops delivering). Cooldown and caps still decide repeat actions.
@@ -2388,11 +2416,18 @@ export type AdRuleLifecycle = {
2388
2416
 
2389
2417
  export type AdRuleObjectEvaluation = {
2390
2418
  /**
2391
- * Platform ID of the campaign or ad set.
2419
+ * Platform ID of the campaign, ad set or ad. A keyword is `{adGroupId}~{criterionId}`, a search term `{adGroupId}~{term}`.
2392
2420
  */
2393
2421
  id: string;
2422
+ /**
2423
+ * The object's name: the keyword text or the search term.
2424
+ */
2394
2425
  name: string;
2395
2426
  campaignId: (string) | null;
2427
+ /**
2428
+ * Absent on runs recorded before November 2026.
2429
+ */
2430
+ campaignName?: (string) | null;
2396
2431
  /**
2397
2432
  * True when every condition holds.
2398
2433
  */
@@ -2448,7 +2483,7 @@ export type AdRuleRun = {
2448
2483
  accountId?: string;
2449
2484
  platform?: string;
2450
2485
  platformAdAccountId?: string;
2451
- level?: 'campaign' | 'adset';
2486
+ level?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
2452
2487
  };
2453
2488
  today?: string;
2454
2489
  timezone?: string;
@@ -2458,7 +2493,14 @@ export type AdRuleRun = {
2458
2493
  * Where the run's hourly windows ended. Absent on runs recorded before November 2026.
2459
2494
  */
2460
2495
  hourlyThrough?: (string) | null;
2496
+ /**
2497
+ * The matched objects, at most 200. `matchedTotal` has the full count.
2498
+ */
2461
2499
  matched?: Array<AdRuleObjectEvaluation>;
2500
+ /**
2501
+ * How many objects matched, including those past the 200 recorded. Absent on runs recorded before November 2026.
2502
+ */
2503
+ matchedTotal?: number;
2462
2504
  actions?: Array<{
2463
2505
  objectId: string;
2464
2506
  type: 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'adjust_target' | 'reallocate_budget' | 'duplicate' | 'edit_name';
@@ -2495,6 +2537,8 @@ export type AdRuleRun = {
2495
2537
  error: (string) | null;
2496
2538
  };
2497
2539
 
2540
+ export type level2 = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
2541
+
2498
2542
  /**
2499
2543
  * Either `everyMinutes` or `times`. Sending a schedule replaces the rule's whole timing. Without one, a new rule runs every 60 minutes.
2500
2544
  */
@@ -2581,7 +2625,7 @@ export type kind = 'ad_rejected' | 'delivery_issue' | 'payment' | 'budget_limite
2581
2625
 
2582
2626
  export type severity = 'error' | 'warning' | 'info';
2583
2627
 
2584
- export type level2 = 'ad_account' | 'campaign' | 'ad_set' | 'ad';
2628
+ export type level3 = 'ad_account' | 'campaign' | 'ad_set' | 'ad';
2585
2629
 
2586
2630
  /**
2587
2631
  * One ad schedule window as Google stores it. Half-open: it is exclusive of the end minute, so 09:00-12:00 and 12:00-17:00 are adjacent, not overlapping.
@@ -3728,7 +3772,7 @@ export type AutomationAction = AutomationActionResult & {
3728
3772
  automationName: string;
3729
3773
  checkId: string;
3730
3774
  subject: {
3731
- kind?: 'campaign' | 'adset' | 'ad';
3775
+ kind?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
3732
3776
  id?: string;
3733
3777
  name?: (string) | null;
3734
3778
  };
@@ -3741,7 +3785,7 @@ export type AutomationAction = AutomationActionResult & {
3741
3785
  createdAt: string;
3742
3786
  };
3743
3787
 
3744
- export type kind2 = 'campaign' | 'adset' | 'ad';
3788
+ export type kind2 = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
3745
3789
 
3746
3790
  /**
3747
3791
  * What an ad rule did to one object, as an absolute change: a budget change reads as the budget it set.
@@ -3818,6 +3862,18 @@ export type AutomationAdFilter = {
3818
3862
  field: "channel_type";
3819
3863
  op: 'in' | 'not_in';
3820
3864
  values: Array<('SEARCH' | 'DISPLAY' | 'SHOPPING' | 'HOTEL' | 'VIDEO' | 'MULTI_CHANNEL' | 'LOCAL' | 'SMART' | 'PERFORMANCE_MAX' | 'LOCAL_SERVICES' | 'TRAVEL' | 'DEMAND_GEN')>;
3865
+ } | {
3866
+ field: "match_type";
3867
+ op: 'in' | 'not_in';
3868
+ values: Array<('EXACT' | 'PHRASE' | 'BROAD')>;
3869
+ } | {
3870
+ field: "search_term_status";
3871
+ op: 'in' | 'not_in';
3872
+ values: Array<('ADDED' | 'EXCLUDED' | 'ADDED_EXCLUDED' | 'NONE')>;
3873
+ } | {
3874
+ field: "blocked_by_negative";
3875
+ op: "equals";
3876
+ value: boolean;
3821
3877
  };
3822
3878
 
3823
3879
  export type field = 'name' | 'campaign_name' | 'adset_name' | 'goal';
@@ -3885,7 +3941,7 @@ export type status7 = 'pending' | 'approved' | 'rejected' | 'expired' | 'cancell
3885
3941
  export type AutomationApprovalChange = {
3886
3942
  actionId: string;
3887
3943
  subject: {
3888
- kind: 'campaign' | 'adset' | 'ad';
3944
+ kind: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
3889
3945
  id: string;
3890
3946
  name: (string) | null;
3891
3947
  };
@@ -4037,7 +4093,7 @@ export type AutomationBacktestDay = {
4037
4093
  heldBack: number;
4038
4094
  actions: Array<{
4039
4095
  subject: {
4040
- kind: 'campaign' | 'adset' | 'ad';
4096
+ kind: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
4041
4097
  id: string;
4042
4098
  name: string;
4043
4099
  campaignId: (string) | null;
@@ -4334,7 +4390,7 @@ export type AutomationPreview = {
4334
4390
  */
4335
4391
  subjects: Array<{
4336
4392
  subject: {
4337
- kind?: 'campaign' | 'adset' | 'ad';
4393
+ kind?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
4338
4394
  /**
4339
4395
  * Platform ID.
4340
4396
  */
@@ -4576,7 +4632,7 @@ export type AutomationSubjects = {
4576
4632
  /**
4577
4633
  * The objects judged one by one.
4578
4634
  */
4579
- each: 'campaign' | 'adset' | 'ad';
4635
+ each: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
4580
4636
  /**
4581
4637
  * The ad account to check. One per ad rule, and an edit cannot move it to another.
4582
4638
  */
@@ -4618,7 +4674,7 @@ export type AutomationSubjects = {
4618
4674
  /**
4619
4675
  * The objects judged one by one.
4620
4676
  */
4621
- export type each = 'campaign' | 'adset' | 'ad';
4677
+ export type each = 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
4622
4678
 
4623
4679
  export type AutomationTemplate = {
4624
4680
  /**
@@ -13077,7 +13133,7 @@ export type GoogleListingGroupDimension = {
13077
13133
  };
13078
13134
  };
13079
13135
 
13080
- export type level3 = 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5';
13136
+ export type level4 = 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5';
13081
13137
 
13082
13138
  export type condition = 'NEW' | 'REFURBISHED' | 'USED';
13083
13139
 
@@ -21619,7 +21675,7 @@ export type event10 = 'ad.created';
21619
21675
  /**
21620
21676
  * Always `AD`.
21621
21677
  */
21622
- export type level4 = 'AD';
21678
+ export type level5 = 'AD';
21623
21679
 
21624
21680
  /**
21625
21681
  * Where the ad was created. `zernio` for ads created through Zernio, `platform` for ads the sync detected.
@@ -21789,9 +21845,9 @@ export type WebhookPayloadAdRuleTriggered = {
21789
21845
  id: string;
21790
21846
  name: string;
21791
21847
  /**
21792
- * Whether the rule evaluates campaigns, ad sets or ads.
21848
+ * Whether the rule evaluates campaigns, ad sets, ads, Google keywords or Google search terms.
21793
21849
  */
21794
- level: 'campaign' | 'adset' | 'ad';
21850
+ level: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
21795
21851
  /**
21796
21852
  * Platform-native ad account ID the rule watches.
21797
21853
  */
@@ -21932,11 +21988,6 @@ export type WebhookPayloadAdRuleTriggered = {
21932
21988
 
21933
21989
  export type event13 = 'ad_rule.triggered';
21934
21990
 
21935
- /**
21936
- * Whether the rule evaluates campaigns, ad sets or ads.
21937
- */
21938
- export type level5 = 'campaign' | 'adset' | 'ad';
21939
-
21940
21991
  /**
21941
21992
  * Webhook payload for the `ad_set.created` event. Fires when an ad set is created through Zernio (API, MCP or dashboard) or detected by the sync, once per ad set, after its row is recorded so `GET /v1/ads/ad-sets/{adSetId}` finds it.
21942
21993
  *
@@ -59916,7 +59967,7 @@ export type GetAutomationCatalogResponse = ({
59916
59967
  * Ad rule subjects.
59917
59968
  */
59918
59969
  subjects: Array<{
59919
- each?: 'campaign' | 'adset' | 'ad';
59970
+ each?: 'campaign' | 'adset' | 'ad' | 'keyword' | 'search_term';
59920
59971
  platforms?: Array<(string)>;
59921
59972
  metrics?: Array<{
59922
59973
  metric?: string;
@@ -60566,7 +60617,7 @@ export type CreateAdRuleData = {
60566
60617
  adAccountId: string;
60567
60618
  level: AdRuleLevel;
60568
60619
  /**
60569
- * Only check these platform campaign IDs (or their ad sets). Leave out to check the whole ad account.
60620
+ * Only check these platform campaign IDs (or what sits in them). Leave out to check the whole ad account.
60570
60621
  */
60571
60622
  campaignIds?: Array<(string)>;
60572
60623
  filters?: AdRuleFilters;