@getlatedev/node 0.2.1457 → 0.2.1459

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.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.1457",
39
+ version: "0.2.1459",
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.1457",
8
+ version: "0.2.1459",
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.1457",
3
+ "version": "0.2.1459",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1791,24 +1791,39 @@ export type AdRuleCondition = {
1791
1791
  /**
1792
1792
  * `ctr` is a percentage. `spend`, `cpc`, `cpm` and `cpa` are in the ad account currency. `reach` and `frequency` use the platform's de-duplicated reach, so they are accepted on Meta and TikTok only.
1793
1793
  *
1794
+ * `daily_budget` is the object's synced daily budget. `budget_used` is spend over the window as a percent of that budget for each day of the window: `today` `>=` 200 means twice the budget spent.
1795
+ *
1796
+ * Both read campaigns and ad sets with a daily budget of their own. A lifetime budget never matches.
1797
+ *
1794
1798
  * `result:<key>` reads one of your own results (see [Campaign results](/guides/campaign-results)), on campaign rules only: the values you sent for the window, or a formula over them and the platform's numbers. A campaign with no value for it never matches.
1795
1799
  *
1796
1800
  */
1797
- metric: ('spend' | 'impressions' | 'clicks' | 'conversions' | 'ctr' | 'cpc' | 'cpm' | 'cpa' | 'roas' | 'reach' | 'frequency' | unknown);
1801
+ metric: ('spend' | 'impressions' | 'clicks' | 'conversions' | 'ctr' | 'cpc' | 'cpm' | 'cpa' | 'roas' | 'reach' | 'frequency' | 'daily_budget' | 'budget_used' | unknown);
1798
1802
  /**
1799
1803
  * Days in the ad account's own timezone. `last_7d` is the 7 full days before today; only `today` reads the day in progress.
1804
+ *
1805
+ * `<from>_to_<to>_days_ago` is any range of full days, both ends included, such as `8_to_2_days_ago` to skip the 2 most recent days while their conversions still arrive. `from` is at least `to` and at most 90.
1806
+ *
1800
1807
  */
1801
- window: 'today' | 'yesterday' | 'last_3d' | 'last_7d' | 'last_14d' | 'last_30d';
1802
- op: '>' | '>=' | '<' | '<=';
1808
+ window: ('today' | 'yesterday' | 'last_3d' | 'last_7d' | 'last_14d' | 'last_30d' | unknown);
1809
+ /**
1810
+ * `top` and `bottom` rank the rule's objects by the metric over the window, highest first for `top`, and match the first `value` (a whole number from 1 to 100). Objects with no value are not ranked; the run history shows each one's position.
1811
+ */
1812
+ op: '>' | '>=' | '<' | '<=' | 'top' | 'bottom';
1803
1813
  value: number;
1814
+ /**
1815
+ * Makes the condition relative: `value` becomes a ratio of the metric over `window` to the same metric over this window. `previous_period` is the same number of days just before `window`; any other value is a window, such as `30_to_2_days_ago`.
1816
+ *
1817
+ * Spend, impressions, clicks, conversions and reach are compared per day, so windows of different lengths compare fairly; rates such as `cpc` compare as they are. A comparison window with no value never matches.
1818
+ *
1819
+ */
1820
+ compareTo?: string;
1804
1821
  };
1805
1822
 
1806
1823
  /**
1807
- * Days in the ad account's own timezone. `last_7d` is the 7 full days before today; only `today` reads the day in progress.
1824
+ * `top` and `bottom` rank the rule's objects by the metric over the window, highest first for `top`, and match the first `value` (a whole number from 1 to 100). Objects with no value are not ranked; the run history shows each one's position.
1808
1825
  */
1809
- export type window = 'today' | 'yesterday' | 'last_3d' | 'last_7d' | 'last_14d' | 'last_30d';
1810
-
1811
- export type op = '>' | '>=' | '<' | '<=';
1826
+ export type op = '>' | '>=' | '<' | '<=' | 'top' | 'bottom';
1812
1827
 
1813
1828
  export type AdRuleConditionItem = AdRuleCondition | AdRuleConditions;
1814
1829
 
@@ -17574,7 +17589,10 @@ export type WebhookPayloadAdRuleTriggered = {
17574
17589
  * `today`, `yesterday`, `last_3d`, `last_7d`, `last_14d` or `last_30d`, in the account's calendar (see `run.today`). New values may be added.
17575
17590
  */
17576
17591
  window: string;
17577
- op: '>' | '>=' | '<' | '<=';
17592
+ /**
17593
+ * `>`, `>=`, `<`, `<=`, or `top` and `bottom` for a rank condition, whose `actual` is the object's position (1 first).
17594
+ */
17595
+ op: string;
17578
17596
  /**
17579
17597
  * The threshold set on the rule.
17580
17598
  */