@getlatedev/node 0.2.1350 → 0.2.1351

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.
@@ -1738,6 +1738,50 @@ export type AdRuleSchedule = {
1738
1738
  */
1739
1739
  export type everyMinutes = 60 | 180 | 360 | 720 | 1440;
1740
1740
 
1741
+ export type AdsAlert = {
1742
+ /**
1743
+ * Stable for the same problem on the same entity. Pass it to POST /v1/ads/alerts/{alertId}/dismiss.
1744
+ */
1745
+ id?: string;
1746
+ kind?: 'ad_rejected' | 'delivery_issue' | 'payment' | 'budget_limited' | 'spend_no_results';
1747
+ severity?: 'error' | 'warning' | 'info';
1748
+ title?: string;
1749
+ /**
1750
+ * What happened, in plain words. For a rejection or delivery issue, the platform's own reason when it gave one.
1751
+ */
1752
+ message?: string;
1753
+ platform?: string;
1754
+ platformAdAccountId?: string;
1755
+ entity?: {
1756
+ level?: 'ad_account' | 'campaign' | 'ad_set' | 'ad';
1757
+ /**
1758
+ * The platform id of the entity.
1759
+ */
1760
+ id?: string;
1761
+ name?: (string) | null;
1762
+ };
1763
+ /**
1764
+ * The Zernio ad id when the entity is an ad, for GET /v1/ads/{adId}.
1765
+ */
1766
+ adId?: string;
1767
+ currency?: (string) | null;
1768
+ detectedAt?: string;
1769
+ /**
1770
+ * Where to fix it on the platform, when there is such a place.
1771
+ */
1772
+ fix?: {
1773
+ label?: string;
1774
+ url?: string;
1775
+ };
1776
+ dismissed?: boolean;
1777
+ };
1778
+
1779
+ export type kind = 'ad_rejected' | 'delivery_issue' | 'payment' | 'budget_limited' | 'spend_no_results';
1780
+
1781
+ export type severity = 'error' | 'warning' | 'info';
1782
+
1783
+ export type level = 'ad_account' | 'campaign' | 'ad_set' | 'ad';
1784
+
1741
1785
  /**
1742
1786
  * 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.
1743
1787
  */
@@ -1783,6 +1827,19 @@ export type AdsTimelineResponse = {
1783
1827
  * Meta only. Present and true while historical data is being backfilled.
1784
1828
  */
1785
1829
  backfillPending?: boolean;
1830
+ /**
1831
+ * Only with `compare=previous`. The daily rows of `previousRange`, in the same shape as `rows`.
1832
+ */
1833
+ previousRows?: Array<{
1834
+ [key: string]: unknown;
1835
+ }>;
1836
+ /**
1837
+ * Only with `compare=previous`. The period of the same length that ends the day before `fromDate`.
1838
+ */
1839
+ previousRange?: {
1840
+ fromDate?: string;
1841
+ toDate?: string;
1842
+ };
1786
1843
  rows?: Array<{
1787
1844
  date?: string;
1788
1845
  /**
@@ -1923,6 +1980,10 @@ export type AdTreeAdSet = {
1923
1980
  pacing?: string;
1924
1981
  } | null;
1925
1982
  metrics?: AdMetrics;
1983
+ /**
1984
+ * Only with `compare=previous`. The same metrics over `previousRange`.
1985
+ */
1986
+ previousMetrics?: (AdMetrics);
1926
1987
  /**
1927
1988
  * What the delivery system optimizes for. Meta ad set optimization goal (e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION), or on LinkedIn the campaign's effective optimizationTargetType (NONE means manual bidding). See the `optimizationGoal` field on `Ad` for the full value spaces.
1928
1989
  */
@@ -2032,6 +2093,10 @@ export type AdTreeCampaign = {
2032
2093
  */
2033
2094
  currency?: (string) | null;
2034
2095
  metrics?: AdMetrics;
2096
+ /**
2097
+ * Only with `compare=previous`. The same metrics over `previousRange`.
2098
+ */
2099
+ previousMetrics?: (AdMetrics);
2035
2100
  platformAdAccountId?: string;
2036
2101
  /**
2037
2102
  * Human-readable advertiser/account name from the platform. Refreshed on every sync.
@@ -2088,6 +2153,17 @@ export type AdTreeCampaign = {
2088
2153
  export type AdTreeResponse = {
2089
2154
  campaigns?: Array<AdTreeCampaign>;
2090
2155
  pagination?: Pagination;
2156
+ /**
2157
+ * When the most recently synced ad on this page was last read from the platform. Null before the first sync.
2158
+ */
2159
+ syncedAt?: (string) | null;
2160
+ /**
2161
+ * Only with `compare=previous`. The range `previousMetrics` covers.
2162
+ */
2163
+ previousRange?: {
2164
+ fromDate?: string;
2165
+ toDate?: string;
2166
+ };
2091
2167
  /**
2092
2168
  * Meta only. Present and true while historical data is being backfilled.
2093
2169
  */
@@ -8081,7 +8157,7 @@ export type GoogleListingGroupDimension = {
8081
8157
  };
8082
8158
  };
8083
8159
 
8084
- export type level = 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5';
8160
+ export type level2 = 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5';
8085
8161
 
8086
8162
  export type condition = 'NEW' | 'REFURBISHED' | 'USED';
8087
8163
 
@@ -8567,7 +8643,7 @@ export type ImessageSenderLifecycle = {
8567
8643
  createdAt?: string;
8568
8644
  };
8569
8645
 
8570
- export type kind = 'phone' | 'email';
8646
+ export type kind2 = 'phone' | 'email';
8571
8647
 
8572
8648
  export type region = 'US' | 'GB';
8573
8649
 
@@ -9494,7 +9570,7 @@ export type InstagramVideoFallback = {
9494
9570
  };
9495
9571
  };
9496
9572
 
9497
- export type kind2 = 'instagram_video_reuploaded' | 'instagram_video_rehosted_copy';
9573
+ export type kind3 = 'instagram_video_reuploaded' | 'instagram_video_rehosted_copy';
9498
9574
 
9499
9575
  /**
9500
9576
  * A Google Search keyword: a bare string (BROAD match), or an object naming the match type.
@@ -13385,7 +13461,7 @@ export type platform14 = 'metaads' | 'openaiads' | 'tiktokads' | 'googleads' | '
13385
13461
  /**
13386
13462
  * Platform-native flavor of the tag (Meta: `pixel`).
13387
13463
  */
13388
- export type kind3 = 'pixel' | 'tag' | 'insight_tag';
13464
+ export type kind4 = 'pixel' | 'tag' | 'insight_tag';
13389
13465
 
13390
13466
  /**
13391
13467
  * One health check the platform runs on a tracking tag.
@@ -14746,7 +14822,7 @@ export type event7 = 'ad.delivery_issue';
14746
14822
  /**
14747
14823
  * Always `AD`.
14748
14824
  */
14749
- export type level2 = 'AD';
14825
+ export type level3 = 'AD';
14750
14826
 
14751
14827
  /**
14752
14828
  * Webhook payload for the `ad.review.approved` and `ad.review.rejected` events.
@@ -14954,7 +15030,7 @@ export type event9 = 'ad_rule.triggered';
14954
15030
  /**
14955
15031
  * Whether the rule evaluates campaigns or ad sets.
14956
15032
  */
14957
- export type level3 = 'campaign' | 'adset';
15033
+ export type level4 = 'campaign' | 'adset';
14958
15034
 
14959
15035
  /**
14960
15036
  * Webhook payload for the `ad.status_changed` event. Currently emitted
@@ -15086,7 +15162,7 @@ export type event10 = 'ad.status_changed';
15086
15162
  /**
15087
15163
  * Hierarchy level the status applies to. Mirrors Meta's `level`. Creative-level events are not forwarded.
15088
15164
  */
15089
- export type level4 = 'CAMPAIGN' | 'AD_SET' | 'AD';
15165
+ export type level5 = 'CAMPAIGN' | 'AD_SET' | 'AD';
15090
15166
 
15091
15167
  /**
15092
15168
  * Webhook payload for the `ad.video.processed` event. Fires once per
@@ -15525,7 +15601,7 @@ export type event18 = 'campaign.budget.depleted';
15525
15601
  /**
15526
15602
  * Always `CAMPAIGN`.
15527
15603
  */
15528
- export type level5 = 'CAMPAIGN';
15604
+ export type level6 = 'CAMPAIGN';
15529
15605
 
15530
15606
  /**
15531
15607
  * Webhook payload for comment received events (Instagram, Facebook, Threads, YouTube, LinkedIn, Bluesky, Reddit, TikTok). X/Twitter does NOT fire this event. TikTok events carry only the author id: the comment.update webhook has no username, picture or owner flag.
@@ -46460,6 +46536,10 @@ export type GetAdTreeData = {
46460
46536
  * Restrict the tree to one or more campaigns by platform campaign id (the id the platform assigns, e.g. Meta's numeric campaign id). Comma-separate up to 100 ids (`?campaignId=123,456`). Filters the campaign set itself, so it works regardless of account size and pagination. Pass this when you already hold campaign ids (for example from an `ad.status_changed` webhook) instead of paging the whole tree.
46461
46537
  */
46462
46538
  campaignId?: string;
46539
+ /**
46540
+ * Set to `previous` to also read the period of the same length that ends the day before `fromDate`. Every campaign, ad set and ad gains `previousMetrics` (same fields as `metrics`) and the response gains `previousRange`, so a table can show the change against the previous period in one call.
46541
+ */
46542
+ compare?: 'previous';
46463
46543
  /**
46464
46544
  * Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only: the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest: a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset.
46465
46545
  */
@@ -46543,6 +46623,10 @@ export type GetAdsTimelineData = {
46543
46623
  * Optional platform-native ad account ID (e.g. Meta `act_…`, TikTok advertiser ID). Use when the connection wraps multiple platform ad accounts and the chart should show one only. Note: rows ingested before 2026-05-13 don't carry this column; the recurring 7-day re-sync repopulates them naturally.
46544
46624
  */
46545
46625
  adAccountId?: string;
46626
+ /**
46627
+ * Set to `previous` to also return `previousRows` for the period of the same length that ends the day before `fromDate`, with that period as `previousRange`. Needs a `fromDate` (sent or defaulted); `toDate` alone answers 400.
46628
+ */
46629
+ compare?: 'previous';
46546
46630
  /**
46547
46631
  * Inclusive start of metrics range (YYYY-MM-DD). Defaults to 90 days ago.
46548
46632
  */
@@ -48301,6 +48385,50 @@ export type ListAdsBusinessCentersResponse = ({
48301
48385
 
48302
48386
  export type ListAdsBusinessCentersError = (ErrorResponse | unknown);
48303
48387
 
48388
+ export type ListAdsAlertsData = {
48389
+ query?: {
48390
+ /**
48391
+ * Only alerts of this ads connection (sibling-expanded like /v1/ads/tree). Omit for every ad account the API key can reach.
48392
+ */
48393
+ accountId?: string;
48394
+ /**
48395
+ * Also return dismissed alerts, with `dismissed: true`.
48396
+ */
48397
+ includeDismissed?: boolean;
48398
+ };
48399
+ };
48400
+
48401
+ export type ListAdsAlertsResponse = ({
48402
+ alerts?: Array<AdsAlert>;
48403
+ /**
48404
+ * Open (not dismissed) alerts per severity.
48405
+ */
48406
+ counts?: {
48407
+ error?: number;
48408
+ warning?: number;
48409
+ info?: number;
48410
+ };
48411
+ });
48412
+
48413
+ export type ListAdsAlertsError = (ErrorResponse | unknown);
48414
+
48415
+ export type DismissAdsAlertData = {
48416
+ path: {
48417
+ /**
48418
+ * The `id` of an alert from GET /v1/ads/alerts.
48419
+ */
48420
+ alertId: string;
48421
+ };
48422
+ };
48423
+
48424
+ export type DismissAdsAlertResponse = ({
48425
+ id?: string;
48426
+ dismissed?: boolean;
48427
+ dismissedUntil?: string;
48428
+ });
48429
+
48430
+ export type DismissAdsAlertError = (ErrorResponse | unknown);
48431
+
48304
48432
  export type GetAdsActivityLogData = {
48305
48433
  query: {
48306
48434
  /**