@getlatedev/node 0.2.1409 → 0.2.1411
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/README.md +1 -0
- package/dist/index.d.mts +51 -20
- package/dist/index.d.ts +51 -20
- package/dist/index.js +8 -1
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
- package/src/client.ts +2 -0
- package/src/generated/sdk.gen.ts +17 -2
- package/src/generated/types.gen.ts +52 -19
|
@@ -1660,17 +1660,25 @@ export type AdRuleAction = {
|
|
|
1660
1660
|
type: 'notify';
|
|
1661
1661
|
} | {
|
|
1662
1662
|
/**
|
|
1663
|
-
* Pause the campaign or ad
|
|
1663
|
+
* Pause the campaign, ad set or ad.
|
|
1664
1664
|
*/
|
|
1665
1665
|
type: 'pause';
|
|
1666
|
+
/**
|
|
1667
|
+
* 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.
|
|
1668
|
+
*/
|
|
1669
|
+
maxChangesPerDay?: number;
|
|
1666
1670
|
} | {
|
|
1667
1671
|
/**
|
|
1668
|
-
* Reactivate a campaign or ad
|
|
1672
|
+
* Reactivate a campaign, ad set or ad a rule paused, once `cooldownMinutes` has passed since the pause. Objects you paused yourself are never touched.
|
|
1669
1673
|
*/
|
|
1670
1674
|
type: 'activate';
|
|
1675
|
+
/**
|
|
1676
|
+
* 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.
|
|
1677
|
+
*/
|
|
1678
|
+
maxChangesPerDay?: number;
|
|
1671
1679
|
} | {
|
|
1672
1680
|
/**
|
|
1673
|
-
* Change the daily budget.
|
|
1681
|
+
* 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).
|
|
1674
1682
|
*/
|
|
1675
1683
|
type: 'adjust_budget';
|
|
1676
1684
|
direction: 'increase' | 'decrease';
|
|
@@ -1682,6 +1690,10 @@ export type AdRuleAction = {
|
|
|
1682
1690
|
* The budget never goes above this on an increase, or below it on a decrease, in the ad account currency.
|
|
1683
1691
|
*/
|
|
1684
1692
|
limit: number;
|
|
1693
|
+
/**
|
|
1694
|
+
* 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.
|
|
1695
|
+
*/
|
|
1696
|
+
maxChangesPerDay?: number;
|
|
1685
1697
|
};
|
|
1686
1698
|
|
|
1687
1699
|
/**
|
|
@@ -1741,9 +1753,9 @@ export type status3 = 'done' | 'skipped' | 'failed';
|
|
|
1741
1753
|
|
|
1742
1754
|
export type AdRuleCondition = {
|
|
1743
1755
|
/**
|
|
1744
|
-
* `ctr` is a percentage. `spend`, `cpc`, `cpm` and `cpa` are in the ad account currency.
|
|
1756
|
+
* `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.
|
|
1745
1757
|
*/
|
|
1746
|
-
metric: 'spend' | 'impressions' | 'clicks' | 'conversions' | 'ctr' | 'cpc' | 'cpm' | 'cpa' | 'roas';
|
|
1758
|
+
metric: 'spend' | 'impressions' | 'clicks' | 'conversions' | 'ctr' | 'cpc' | 'cpm' | 'cpa' | 'roas' | 'reach' | 'frequency';
|
|
1747
1759
|
/**
|
|
1748
1760
|
* Days in the ad account's own timezone. `last_7d` includes today.
|
|
1749
1761
|
*/
|
|
@@ -1753,9 +1765,9 @@ export type AdRuleCondition = {
|
|
|
1753
1765
|
};
|
|
1754
1766
|
|
|
1755
1767
|
/**
|
|
1756
|
-
* `ctr` is a percentage. `spend`, `cpc`, `cpm` and `cpa` are in the ad account currency.
|
|
1768
|
+
* `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.
|
|
1757
1769
|
*/
|
|
1758
|
-
export type metric = 'spend' | 'impressions' | 'clicks' | 'conversions' | 'ctr' | 'cpc' | 'cpm' | 'cpa' | 'roas';
|
|
1770
|
+
export type metric = 'spend' | 'impressions' | 'clicks' | 'conversions' | 'ctr' | 'cpc' | 'cpm' | 'cpa' | 'roas' | 'reach' | 'frequency';
|
|
1759
1771
|
|
|
1760
1772
|
/**
|
|
1761
1773
|
* Days in the ad account's own timezone. `last_7d` includes today.
|
|
@@ -1797,9 +1809,9 @@ export type AdRuleEvaluation = {
|
|
|
1797
1809
|
};
|
|
1798
1810
|
|
|
1799
1811
|
/**
|
|
1800
|
-
* Whether the rule checks campaigns or
|
|
1812
|
+
* Whether the rule checks campaigns, ad sets or single ads. Each one is evaluated on its own.
|
|
1801
1813
|
*/
|
|
1802
|
-
export type AdRuleLevel = 'campaign' | 'adset';
|
|
1814
|
+
export type AdRuleLevel = 'campaign' | 'adset' | 'ad';
|
|
1803
1815
|
|
|
1804
1816
|
export type AdRuleObjectEvaluation = {
|
|
1805
1817
|
/**
|
|
@@ -17130,7 +17142,7 @@ export type status52 = 'approved' | 'rejected';
|
|
|
17130
17142
|
/**
|
|
17131
17143
|
* Webhook payload for the `ad_rule.triggered` event.
|
|
17132
17144
|
*
|
|
17133
|
-
* Fires when a scheduled run of a rule with a `notify` action finds campaigns
|
|
17145
|
+
* Fires when a scheduled run of a rule with a `notify` action finds campaigns, ad sets or ads that meet every condition of the rule.
|
|
17134
17146
|
*
|
|
17135
17147
|
* Each object is announced at most once per rule cooldown, so `objects` lists only the objects the run acted on, never the ones still in cooldown. A run where every matching object is still in cooldown sends nothing.
|
|
17136
17148
|
*
|
|
@@ -17156,9 +17168,9 @@ export type WebhookPayloadAdRuleTriggered = {
|
|
|
17156
17168
|
id: string;
|
|
17157
17169
|
name: string;
|
|
17158
17170
|
/**
|
|
17159
|
-
* Whether the rule evaluates campaigns
|
|
17171
|
+
* Whether the rule evaluates campaigns, ad sets or ads.
|
|
17160
17172
|
*/
|
|
17161
|
-
level: 'campaign' | 'adset';
|
|
17173
|
+
level: 'campaign' | 'adset' | 'ad';
|
|
17162
17174
|
/**
|
|
17163
17175
|
* Platform-native ad account ID the rule watches.
|
|
17164
17176
|
*/
|
|
@@ -17191,7 +17203,7 @@ export type WebhookPayloadAdRuleTriggered = {
|
|
|
17191
17203
|
currency: (string) | null;
|
|
17192
17204
|
};
|
|
17193
17205
|
/**
|
|
17194
|
-
* The campaigns
|
|
17206
|
+
* The campaigns, ad sets or ads this run acted on, at the rule's `level`, including those whose action failed. Objects still in cooldown are left out.
|
|
17195
17207
|
*/
|
|
17196
17208
|
objects: Array<{
|
|
17197
17209
|
/**
|
|
@@ -17241,7 +17253,7 @@ export type WebhookPayloadAdRuleTriggered = {
|
|
|
17241
17253
|
*/
|
|
17242
17254
|
status: 'done' | 'skipped' | 'failed';
|
|
17243
17255
|
/**
|
|
17244
|
-
* Why the action was skipped or failed: `already_paused`, `already_active`, `at_limit`, `budget_unknown`, `budget_not_daily`, `budget_level_mismatch`, `no_live_ads`, `ads_allowance_exceeded` (a reactivation or budget increase for a team past its free live-ads allowance), or the platform's message. Null when done.
|
|
17256
|
+
* Why the action was skipped or failed: `already_paused`, `already_active`, `at_limit`, `budget_unknown`, `budget_not_daily`, `budget_level_mismatch`, `no_live_ads`, `daily_limit_reached` (held back by the action's `maxChangesPerDay`), `ads_allowance_exceeded` (a reactivation or budget increase for a team past its free live-ads allowance), or the platform's message. Null when done.
|
|
17245
17257
|
*/
|
|
17246
17258
|
reason: (string) | null;
|
|
17247
17259
|
/**
|
|
@@ -17262,6 +17274,11 @@ export type WebhookPayloadAdRuleTriggered = {
|
|
|
17262
17274
|
|
|
17263
17275
|
export type event11 = 'ad_rule.triggered';
|
|
17264
17276
|
|
|
17277
|
+
/**
|
|
17278
|
+
* Whether the rule evaluates campaigns, ad sets or ads.
|
|
17279
|
+
*/
|
|
17280
|
+
export type level5 = 'campaign' | 'adset' | 'ad';
|
|
17281
|
+
|
|
17265
17282
|
/**
|
|
17266
17283
|
* Webhook payload for the `ad.status_changed` event. Currently emitted
|
|
17267
17284
|
* only for Meta (`metaads`).
|
|
@@ -17392,7 +17409,7 @@ export type event12 = 'ad.status_changed';
|
|
|
17392
17409
|
/**
|
|
17393
17410
|
* Hierarchy level the status applies to. Mirrors Meta's `level`. Creative-level events are not forwarded.
|
|
17394
17411
|
*/
|
|
17395
|
-
export type
|
|
17412
|
+
export type level6 = 'CAMPAIGN' | 'AD_SET' | 'AD';
|
|
17396
17413
|
|
|
17397
17414
|
/**
|
|
17398
17415
|
* Webhook payload for the `ad.video.processed` event. Fires once per
|
|
@@ -17851,7 +17868,7 @@ export type event21 = 'campaign.budget.depleted';
|
|
|
17851
17868
|
/**
|
|
17852
17869
|
* Always `CAMPAIGN`.
|
|
17853
17870
|
*/
|
|
17854
|
-
export type
|
|
17871
|
+
export type level7 = 'CAMPAIGN';
|
|
17855
17872
|
|
|
17856
17873
|
/**
|
|
17857
17874
|
* Webhook payload for `campaign_participant.joined`, `campaign_participant.suspended` and
|
|
@@ -22799,8 +22816,8 @@ export type GetLinkedInDemographicsData = {
|
|
|
22799
22816
|
*/
|
|
22800
22817
|
accountId: string;
|
|
22801
22818
|
/**
|
|
22802
|
-
* Comma-separated list of demographic dimensions: function, seniority, industry, company_size.
|
|
22803
|
-
* Defaults to
|
|
22819
|
+
* Comma-separated list of demographic dimensions: function, seniority, industry, company_size, country, region.
|
|
22820
|
+
* Defaults to function, seniority, industry and company_size if omitted. Country and region are returned only when requested.
|
|
22804
22821
|
*
|
|
22805
22822
|
*/
|
|
22806
22823
|
breakdown?: string;
|
|
@@ -22822,7 +22839,7 @@ export type GetLinkedInDemographicsResponse = ({
|
|
|
22822
22839
|
*/
|
|
22823
22840
|
dimension?: string;
|
|
22824
22841
|
/**
|
|
22825
|
-
* LinkedIn URN (urn:li:function:8) or staff count range (SIZE_2_TO_10)
|
|
22842
|
+
* LinkedIn URN (urn:li:function:8 or urn:li:geo:103644278) or staff count range (SIZE_2_TO_10)
|
|
22826
22843
|
*/
|
|
22827
22844
|
id?: string;
|
|
22828
22845
|
/**
|
|
@@ -50462,6 +50479,22 @@ export type CreateAdRuleResponse = ({
|
|
|
50462
50479
|
|
|
50463
50480
|
export type CreateAdRuleError = (ErrorResponse);
|
|
50464
50481
|
|
|
50482
|
+
export type ListAdRuleTemplatesResponse = ({
|
|
50483
|
+
templates: Array<{
|
|
50484
|
+
id: string;
|
|
50485
|
+
name: string;
|
|
50486
|
+
description: string;
|
|
50487
|
+
level: AdRuleLevel;
|
|
50488
|
+
conditions: AdRuleConditions;
|
|
50489
|
+
actions: AdRuleActions;
|
|
50490
|
+
schedule: AdRuleSchedule;
|
|
50491
|
+
cooldownMinutes: number;
|
|
50492
|
+
platforms: Array<(string)> | null;
|
|
50493
|
+
}>;
|
|
50494
|
+
});
|
|
50495
|
+
|
|
50496
|
+
export type ListAdRuleTemplatesError = (ErrorResponse);
|
|
50497
|
+
|
|
50465
50498
|
export type ListAdRuleActivityData = {
|
|
50466
50499
|
query?: {
|
|
50467
50500
|
/**
|