@getlatedev/node 0.2.1350 → 0.2.1352
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 +2 -0
- package/dist/index.d.mts +152 -14
- package/dist/index.d.ts +152 -14
- package/dist/index.js +19 -1
- package/dist/index.mjs +19 -1
- package/package.json +1 -1
- package/src/client.ts +8 -0
- package/src/generated/sdk.gen.ts +32 -1
- package/src/generated/types.gen.ts +155 -13
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
/**
|
|
@@ -55822,7 +55950,7 @@ export type SendConversionsData = {
|
|
|
55822
55950
|
destinationId: string;
|
|
55823
55951
|
events: Array<ConversionEvent>;
|
|
55824
55952
|
/**
|
|
55825
|
-
*
|
|
55953
|
+
* Send it at the request root, never inside an event. A root-level `test_event_code` (Meta's own name) is accepted as an alias and must be a non-empty string; sending both with different values is a 400. On Meta it is sent as `test_event_code`: the events show in Events Manager's Test Events tab for the pixel whose current test code matches (Meta rotates the code, so copy it again from that tab), and Meta still processes them like any other event, so remove it in production. On Pinterest any value sends the batch with `test=true` (validated, not recorded). On Reddit, sent as `test_id` so the events show in the pixel's test view. Ignored by Google, LinkedIn, and OpenAI Ads.
|
|
55826
55954
|
*/
|
|
55827
55955
|
testCode?: string;
|
|
55828
55956
|
/**
|
|
@@ -55883,6 +56011,10 @@ export type SendConversionsResponse = ({
|
|
|
55883
56011
|
*
|
|
55884
56012
|
*/
|
|
55885
56013
|
traceId?: string;
|
|
56014
|
+
/**
|
|
56015
|
+
* The test code sent to the platform, as received (from `testCode` or `test_event_code`). `null` when the request carried none, so the events were sent as production events.
|
|
56016
|
+
*/
|
|
56017
|
+
testCode?: (string) | null;
|
|
55886
56018
|
});
|
|
55887
56019
|
|
|
55888
56020
|
export type SendConversionsError = (unknown | ErrorResponse);
|
|
@@ -56346,7 +56478,7 @@ export type SendEventsData = {
|
|
|
56346
56478
|
adPersonalization?: 'GRANTED' | 'DENIED';
|
|
56347
56479
|
};
|
|
56348
56480
|
/**
|
|
56349
|
-
* Forwarded as each platform test code (see POST /v1/ads/conversions). Test events are not stored.
|
|
56481
|
+
* Forwarded as each platform test code (see POST /v1/ads/conversions). A root-level `test_event_code` is accepted as an alias. Test events are not stored.
|
|
56350
56482
|
*/
|
|
56351
56483
|
testCode?: string;
|
|
56352
56484
|
};
|
|
@@ -56361,6 +56493,10 @@ export type SendEventsResponse = ({
|
|
|
56361
56493
|
* Whether the events were stored for reporting (always false with testCode).
|
|
56362
56494
|
*/
|
|
56363
56495
|
stored?: boolean;
|
|
56496
|
+
/**
|
|
56497
|
+
* The test code forwarded to every destination, or `null` when the request carried none.
|
|
56498
|
+
*/
|
|
56499
|
+
testCode?: (string) | null;
|
|
56364
56500
|
destinations?: Array<{
|
|
56365
56501
|
accountId?: string;
|
|
56366
56502
|
destinationId?: string;
|
|
@@ -56968,9 +57104,11 @@ export type SendWhatsAppConversionData = {
|
|
|
56968
57104
|
*/
|
|
56969
57105
|
externalId?: string;
|
|
56970
57106
|
/**
|
|
56971
|
-
* Meta `test_event_code` passthrough
|
|
56972
|
-
*
|
|
56973
|
-
*
|
|
57107
|
+
* Meta `test_event_code` passthrough, sent at the request root
|
|
57108
|
+
* (a root-level `test_event_code` is accepted as an alias). The
|
|
57109
|
+
* event shows in Events Manager's Test Events tab for the
|
|
57110
|
+
* dataset whose current test code matches. Meta still
|
|
57111
|
+
* processes it like any other event, so remove it in production.
|
|
56974
57112
|
*
|
|
56975
57113
|
*/
|
|
56976
57114
|
testCode?: string;
|
|
@@ -57020,6 +57158,10 @@ export type SendWhatsAppConversionResponse = ({
|
|
|
57020
57158
|
*
|
|
57021
57159
|
*/
|
|
57022
57160
|
traceId?: string;
|
|
57161
|
+
/**
|
|
57162
|
+
* The test code sent to Meta, or `null` when the request carried none.
|
|
57163
|
+
*/
|
|
57164
|
+
testCode?: (string) | null;
|
|
57023
57165
|
});
|
|
57024
57166
|
|
|
57025
57167
|
export type SendWhatsAppConversionError = (unknown | ErrorResponse);
|