@getlatedev/node 0.2.1461 → 0.2.1463

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
@@ -3916,9 +3916,34 @@ type AdRule = {
3916
3916
  };
3917
3917
  type AdRuleAction = {
3918
3918
  /**
3919
- * Send the `ad_rule.triggered` webhook.
3919
+ * Send the `ad_rule.triggered` webhook, and the alert to every `send` destination.
3920
3920
  */
3921
3921
  type: 'notify';
3922
+ /**
3923
+ * Also send a short alert through accounts you connected: what matched, the values and what the rule did. Up to 5 destinations, checked when the rule is saved.
3924
+ *
3925
+ * A destination that fails is reported in the run's `notification`; it never undoes a change.
3926
+ *
3927
+ */
3928
+ send?: Array<({
3929
+ /**
3930
+ * A connected Slack account (`GET /v1/accounts`, platform `slack`).
3931
+ */
3932
+ accountId: string;
3933
+ /**
3934
+ * The Slack channel to post in. Defaults to the channel the account was connected with; the bot joins public channels on its own.
3935
+ */
3936
+ channelId?: string;
3937
+ } | {
3938
+ /**
3939
+ * A connected Gmail or Outlook mailbox with email access.
3940
+ */
3941
+ accountId: string;
3942
+ /**
3943
+ * The address that receives the alert, sent as a new email from that mailbox.
3944
+ */
3945
+ to: string;
3946
+ })>;
3922
3947
  } | {
3923
3948
  /**
3924
3949
  * Pause the campaign, ad set or ad.
@@ -3937,6 +3962,36 @@ type AdRuleAction = {
3937
3962
  * At most this many objects changed in any 24 hours, across runs. Matches over the limit are skipped with `daily_limit_reached` and tried again later.
3938
3963
  */
3939
3964
  maxChangesPerDay?: number;
3965
+ } | {
3966
+ /**
3967
+ * Copy the campaign or ad set with its ads, on Meta and TikTok campaigns and ad sets and LinkedIn campaigns. Not on ad-level rules.
3968
+ */
3969
+ type: 'duplicate';
3970
+ /**
3971
+ * How the copy starts. Defaults to `paused`.
3972
+ */
3973
+ status?: 'paused' | 'active';
3974
+ /**
3975
+ * Text added to the copy's name.
3976
+ */
3977
+ renameSuffix?: string;
3978
+ /**
3979
+ * At most this many objects changed in any 24 hours, across runs. Matches over the limit are skipped with `daily_limit_reached` and tried again later.
3980
+ */
3981
+ maxChangesPerDay?: number;
3982
+ } | {
3983
+ /**
3984
+ * Set the daily budget to an exact amount, such as a reset every midnight. Same level rules as the percent change.
3985
+ */
3986
+ type: 'adjust_budget';
3987
+ /**
3988
+ * The daily budget to set, in the ad account currency. An object already at it is skipped with `already_at_amount`.
3989
+ */
3990
+ amount: number;
3991
+ /**
3992
+ * At most this many objects changed in any 24 hours, across runs. Matches over the limit are skipped with `daily_limit_reached` and tried again later.
3993
+ */
3994
+ maxChangesPerDay?: number;
3940
3995
  } | {
3941
3996
  /**
3942
3997
  * Change the daily budget. Not on ad-level rules (an ad has no budget), and on Google it needs a campaign-level rule (ad groups have no budget of their own).
@@ -3957,12 +4012,12 @@ type AdRuleAction = {
3957
4012
  maxChangesPerDay?: number;
3958
4013
  };
3959
4014
  /**
3960
- * Send the `ad_rule.triggered` webhook.
4015
+ * Send the `ad_rule.triggered` webhook, and the alert to every `send` destination.
3961
4016
  */
3962
4017
  type type2 = 'notify';
3963
4018
  type direction = 'increase' | 'decrease';
3964
4019
  /**
3965
- * Each type at most once, and at most one of `pause`, `activate` and `adjust_budget`.
4020
+ * Each type at most once, and at most one of `pause`, `activate`, `adjust_budget` and `duplicate`.
3966
4021
  */
3967
4022
  type AdRuleActions = Array<AdRuleAction>;
3968
4023
  type AdRuleActivityEntry = {
@@ -3991,7 +4046,7 @@ type AdRuleActivityEntry = {
3991
4046
  * Its name when the rule acted.
3992
4047
  */
3993
4048
  objectName: (string) | null;
3994
- type: 'pause' | 'activate' | 'adjust_budget';
4049
+ type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
3995
4050
  status: 'done' | 'skipped' | 'failed';
3996
4051
  /**
3997
4052
  * Why it was skipped or failed, for example `already_paused`.
@@ -4002,7 +4057,7 @@ type AdRuleActivityEntry = {
4002
4057
  currency: (string) | null;
4003
4058
  };
4004
4059
  type level = 'campaign' | 'adset';
4005
- type type3 = 'pause' | 'activate' | 'adjust_budget';
4060
+ type type3 = 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
4006
4061
  type status3 = 'done' | 'skipped' | 'failed';
4007
4062
  type AdRuleCondition = {
4008
4063
  /**
@@ -4134,7 +4189,7 @@ type AdRuleRun = {
4134
4189
  matched?: Array<AdRuleObjectEvaluation>;
4135
4190
  actions?: Array<{
4136
4191
  objectId: string;
4137
- type: 'pause' | 'activate' | 'adjust_budget';
4192
+ type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
4138
4193
  status: 'done' | 'skipped' | 'failed';
4139
4194
  /**
4140
4195
  * Why it was skipped or failed, for example `already_paused`.
@@ -19134,7 +19189,7 @@ type WebhookPayloadAdRuleTriggered = {
19134
19189
  * What the rule did to the object. Empty on a rule that only notifies.
19135
19190
  */
19136
19191
  actions: Array<{
19137
- type: 'pause' | 'activate' | 'adjust_budget';
19192
+ type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
19138
19193
  /**
19139
19194
  * Action result.
19140
19195
  *
@@ -50447,7 +50502,7 @@ type ListAdRuleActivityData = {
50447
50502
  * ISO 8601 date-time, inclusive.
50448
50503
  */
50449
50504
  to?: string;
50450
- type?: 'pause' | 'activate' | 'adjust_budget';
50505
+ type?: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
50451
50506
  };
50452
50507
  };
50453
50508
  type ListAdRuleActivityResponse = ({
package/dist/index.d.ts CHANGED
@@ -3916,9 +3916,34 @@ type AdRule = {
3916
3916
  };
3917
3917
  type AdRuleAction = {
3918
3918
  /**
3919
- * Send the `ad_rule.triggered` webhook.
3919
+ * Send the `ad_rule.triggered` webhook, and the alert to every `send` destination.
3920
3920
  */
3921
3921
  type: 'notify';
3922
+ /**
3923
+ * Also send a short alert through accounts you connected: what matched, the values and what the rule did. Up to 5 destinations, checked when the rule is saved.
3924
+ *
3925
+ * A destination that fails is reported in the run's `notification`; it never undoes a change.
3926
+ *
3927
+ */
3928
+ send?: Array<({
3929
+ /**
3930
+ * A connected Slack account (`GET /v1/accounts`, platform `slack`).
3931
+ */
3932
+ accountId: string;
3933
+ /**
3934
+ * The Slack channel to post in. Defaults to the channel the account was connected with; the bot joins public channels on its own.
3935
+ */
3936
+ channelId?: string;
3937
+ } | {
3938
+ /**
3939
+ * A connected Gmail or Outlook mailbox with email access.
3940
+ */
3941
+ accountId: string;
3942
+ /**
3943
+ * The address that receives the alert, sent as a new email from that mailbox.
3944
+ */
3945
+ to: string;
3946
+ })>;
3922
3947
  } | {
3923
3948
  /**
3924
3949
  * Pause the campaign, ad set or ad.
@@ -3937,6 +3962,36 @@ type AdRuleAction = {
3937
3962
  * At most this many objects changed in any 24 hours, across runs. Matches over the limit are skipped with `daily_limit_reached` and tried again later.
3938
3963
  */
3939
3964
  maxChangesPerDay?: number;
3965
+ } | {
3966
+ /**
3967
+ * Copy the campaign or ad set with its ads, on Meta and TikTok campaigns and ad sets and LinkedIn campaigns. Not on ad-level rules.
3968
+ */
3969
+ type: 'duplicate';
3970
+ /**
3971
+ * How the copy starts. Defaults to `paused`.
3972
+ */
3973
+ status?: 'paused' | 'active';
3974
+ /**
3975
+ * Text added to the copy's name.
3976
+ */
3977
+ renameSuffix?: string;
3978
+ /**
3979
+ * At most this many objects changed in any 24 hours, across runs. Matches over the limit are skipped with `daily_limit_reached` and tried again later.
3980
+ */
3981
+ maxChangesPerDay?: number;
3982
+ } | {
3983
+ /**
3984
+ * Set the daily budget to an exact amount, such as a reset every midnight. Same level rules as the percent change.
3985
+ */
3986
+ type: 'adjust_budget';
3987
+ /**
3988
+ * The daily budget to set, in the ad account currency. An object already at it is skipped with `already_at_amount`.
3989
+ */
3990
+ amount: number;
3991
+ /**
3992
+ * At most this many objects changed in any 24 hours, across runs. Matches over the limit are skipped with `daily_limit_reached` and tried again later.
3993
+ */
3994
+ maxChangesPerDay?: number;
3940
3995
  } | {
3941
3996
  /**
3942
3997
  * Change the daily budget. Not on ad-level rules (an ad has no budget), and on Google it needs a campaign-level rule (ad groups have no budget of their own).
@@ -3957,12 +4012,12 @@ type AdRuleAction = {
3957
4012
  maxChangesPerDay?: number;
3958
4013
  };
3959
4014
  /**
3960
- * Send the `ad_rule.triggered` webhook.
4015
+ * Send the `ad_rule.triggered` webhook, and the alert to every `send` destination.
3961
4016
  */
3962
4017
  type type2 = 'notify';
3963
4018
  type direction = 'increase' | 'decrease';
3964
4019
  /**
3965
- * Each type at most once, and at most one of `pause`, `activate` and `adjust_budget`.
4020
+ * Each type at most once, and at most one of `pause`, `activate`, `adjust_budget` and `duplicate`.
3966
4021
  */
3967
4022
  type AdRuleActions = Array<AdRuleAction>;
3968
4023
  type AdRuleActivityEntry = {
@@ -3991,7 +4046,7 @@ type AdRuleActivityEntry = {
3991
4046
  * Its name when the rule acted.
3992
4047
  */
3993
4048
  objectName: (string) | null;
3994
- type: 'pause' | 'activate' | 'adjust_budget';
4049
+ type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
3995
4050
  status: 'done' | 'skipped' | 'failed';
3996
4051
  /**
3997
4052
  * Why it was skipped or failed, for example `already_paused`.
@@ -4002,7 +4057,7 @@ type AdRuleActivityEntry = {
4002
4057
  currency: (string) | null;
4003
4058
  };
4004
4059
  type level = 'campaign' | 'adset';
4005
- type type3 = 'pause' | 'activate' | 'adjust_budget';
4060
+ type type3 = 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
4006
4061
  type status3 = 'done' | 'skipped' | 'failed';
4007
4062
  type AdRuleCondition = {
4008
4063
  /**
@@ -4134,7 +4189,7 @@ type AdRuleRun = {
4134
4189
  matched?: Array<AdRuleObjectEvaluation>;
4135
4190
  actions?: Array<{
4136
4191
  objectId: string;
4137
- type: 'pause' | 'activate' | 'adjust_budget';
4192
+ type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
4138
4193
  status: 'done' | 'skipped' | 'failed';
4139
4194
  /**
4140
4195
  * Why it was skipped or failed, for example `already_paused`.
@@ -19134,7 +19189,7 @@ type WebhookPayloadAdRuleTriggered = {
19134
19189
  * What the rule did to the object. Empty on a rule that only notifies.
19135
19190
  */
19136
19191
  actions: Array<{
19137
- type: 'pause' | 'activate' | 'adjust_budget';
19192
+ type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
19138
19193
  /**
19139
19194
  * Action result.
19140
19195
  *
@@ -50447,7 +50502,7 @@ type ListAdRuleActivityData = {
50447
50502
  * ISO 8601 date-time, inclusive.
50448
50503
  */
50449
50504
  to?: string;
50450
- type?: 'pause' | 'activate' | 'adjust_budget';
50505
+ type?: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
50451
50506
  };
50452
50507
  };
50453
50508
  type ListAdRuleActivityResponse = ({
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.1461",
39
+ version: "0.2.1463",
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.1461",
8
+ version: "0.2.1463",
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.1461",
3
+ "version": "0.2.1463",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1691,9 +1691,34 @@ export type AdRule = {
1691
1691
 
1692
1692
  export type AdRuleAction = {
1693
1693
  /**
1694
- * Send the `ad_rule.triggered` webhook.
1694
+ * Send the `ad_rule.triggered` webhook, and the alert to every `send` destination.
1695
1695
  */
1696
1696
  type: 'notify';
1697
+ /**
1698
+ * Also send a short alert through accounts you connected: what matched, the values and what the rule did. Up to 5 destinations, checked when the rule is saved.
1699
+ *
1700
+ * A destination that fails is reported in the run's `notification`; it never undoes a change.
1701
+ *
1702
+ */
1703
+ send?: Array<({
1704
+ /**
1705
+ * A connected Slack account (`GET /v1/accounts`, platform `slack`).
1706
+ */
1707
+ accountId: string;
1708
+ /**
1709
+ * The Slack channel to post in. Defaults to the channel the account was connected with; the bot joins public channels on its own.
1710
+ */
1711
+ channelId?: string;
1712
+ } | {
1713
+ /**
1714
+ * A connected Gmail or Outlook mailbox with email access.
1715
+ */
1716
+ accountId: string;
1717
+ /**
1718
+ * The address that receives the alert, sent as a new email from that mailbox.
1719
+ */
1720
+ to: string;
1721
+ })>;
1697
1722
  } | {
1698
1723
  /**
1699
1724
  * Pause the campaign, ad set or ad.
@@ -1712,6 +1737,36 @@ export type AdRuleAction = {
1712
1737
  * At most this many objects changed in any 24 hours, across runs. Matches over the limit are skipped with `daily_limit_reached` and tried again later.
1713
1738
  */
1714
1739
  maxChangesPerDay?: number;
1740
+ } | {
1741
+ /**
1742
+ * Copy the campaign or ad set with its ads, on Meta and TikTok campaigns and ad sets and LinkedIn campaigns. Not on ad-level rules.
1743
+ */
1744
+ type: 'duplicate';
1745
+ /**
1746
+ * How the copy starts. Defaults to `paused`.
1747
+ */
1748
+ status?: 'paused' | 'active';
1749
+ /**
1750
+ * Text added to the copy's name.
1751
+ */
1752
+ renameSuffix?: string;
1753
+ /**
1754
+ * At most this many objects changed in any 24 hours, across runs. Matches over the limit are skipped with `daily_limit_reached` and tried again later.
1755
+ */
1756
+ maxChangesPerDay?: number;
1757
+ } | {
1758
+ /**
1759
+ * Set the daily budget to an exact amount, such as a reset every midnight. Same level rules as the percent change.
1760
+ */
1761
+ type: 'adjust_budget';
1762
+ /**
1763
+ * The daily budget to set, in the ad account currency. An object already at it is skipped with `already_at_amount`.
1764
+ */
1765
+ amount: number;
1766
+ /**
1767
+ * At most this many objects changed in any 24 hours, across runs. Matches over the limit are skipped with `daily_limit_reached` and tried again later.
1768
+ */
1769
+ maxChangesPerDay?: number;
1715
1770
  } | {
1716
1771
  /**
1717
1772
  * Change the daily budget. Not on ad-level rules (an ad has no budget), and on Google it needs a campaign-level rule (ad groups have no budget of their own).
@@ -1733,14 +1788,14 @@ export type AdRuleAction = {
1733
1788
  };
1734
1789
 
1735
1790
  /**
1736
- * Send the `ad_rule.triggered` webhook.
1791
+ * Send the `ad_rule.triggered` webhook, and the alert to every `send` destination.
1737
1792
  */
1738
1793
  export type type2 = 'notify';
1739
1794
 
1740
1795
  export type direction = 'increase' | 'decrease';
1741
1796
 
1742
1797
  /**
1743
- * Each type at most once, and at most one of `pause`, `activate` and `adjust_budget`.
1798
+ * Each type at most once, and at most one of `pause`, `activate`, `adjust_budget` and `duplicate`.
1744
1799
  */
1745
1800
  export type AdRuleActions = Array<AdRuleAction>;
1746
1801
 
@@ -1770,7 +1825,7 @@ export type AdRuleActivityEntry = {
1770
1825
  * Its name when the rule acted.
1771
1826
  */
1772
1827
  objectName: (string) | null;
1773
- type: 'pause' | 'activate' | 'adjust_budget';
1828
+ type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
1774
1829
  status: 'done' | 'skipped' | 'failed';
1775
1830
  /**
1776
1831
  * Why it was skipped or failed, for example `already_paused`.
@@ -1783,7 +1838,7 @@ export type AdRuleActivityEntry = {
1783
1838
 
1784
1839
  export type level = 'campaign' | 'adset';
1785
1840
 
1786
- export type type3 = 'pause' | 'activate' | 'adjust_budget';
1841
+ export type type3 = 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
1787
1842
 
1788
1843
  export type status3 = 'done' | 'skipped' | 'failed';
1789
1844
 
@@ -1924,7 +1979,7 @@ export type AdRuleRun = {
1924
1979
  matched?: Array<AdRuleObjectEvaluation>;
1925
1980
  actions?: Array<{
1926
1981
  objectId: string;
1927
- type: 'pause' | 'activate' | 'adjust_budget';
1982
+ type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
1928
1983
  status: 'done' | 'skipped' | 'failed';
1929
1984
  /**
1930
1985
  * Why it was skipped or failed, for example `already_paused`.
@@ -17617,7 +17672,7 @@ export type WebhookPayloadAdRuleTriggered = {
17617
17672
  * What the rule did to the object. Empty on a rule that only notifies.
17618
17673
  */
17619
17674
  actions: Array<{
17620
- type: 'pause' | 'activate' | 'adjust_budget';
17675
+ type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
17621
17676
  /**
17622
17677
  * Action result.
17623
17678
  *
@@ -51182,7 +51237,7 @@ export type ListAdRuleActivityData = {
51182
51237
  * ISO 8601 date-time, inclusive.
51183
51238
  */
51184
51239
  to?: string;
51185
- type?: 'pause' | 'activate' | 'adjust_budget';
51240
+ type?: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
51186
51241
  };
51187
51242
  };
51188
51243