@getlatedev/node 0.2.1375 → 0.2.1377
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 +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +21 -25
- package/src/generated/types.gen.ts +24 -2
package/dist/index.d.mts
CHANGED
|
@@ -57935,9 +57935,31 @@ type EstimateAdReachData = {
|
|
|
57935
57935
|
*/
|
|
57936
57936
|
adAccountId: string;
|
|
57937
57937
|
/**
|
|
57938
|
-
* The targeting spec to estimate. Same shape used by POST /v1/ads/create.
|
|
57938
|
+
* The targeting spec to estimate. Same shape used by POST /v1/ads/create. Required unless `rawTargeting` is sent; with `rawTargeting` it can be omitted or minimal.
|
|
57939
57939
|
*/
|
|
57940
|
-
spec
|
|
57940
|
+
spec?: (TargetingSpec);
|
|
57941
|
+
/**
|
|
57942
|
+
* Meta only. A Meta-native targeting spec (snake_case: `geo_locations`, `age_min`,
|
|
57943
|
+
* `flexible_spec`, `excluded_custom_audiences`, `user_os`, ...), the same field
|
|
57944
|
+
* `POST /v1/ads/create` accepts, so the estimate covers the exact audience the ad
|
|
57945
|
+
* set will use. For layered targeting, send `flexible_spec` here: entries AND
|
|
57946
|
+
* together, ids inside one entry OR.
|
|
57947
|
+
*
|
|
57948
|
+
* It uses the same merge rules as `POST /v1/ads/create`: rawTargeting is the BASE
|
|
57949
|
+
* layer and `spec`, converted to Meta's wire shape, is merged on top key by key,
|
|
57950
|
+
* with `spec` winning on collision. The merge goes one level deep inside
|
|
57951
|
+
* `geo_locations` and `excluded_geo_locations` (spec sub-keys win, raw-only
|
|
57952
|
+
* sub-keys such as `location_types` survive). Array values (`flexible_spec`, ...)
|
|
57953
|
+
* are replaced as a whole key when `spec` builds them, never element-merged, so
|
|
57954
|
+
* `spec.interests` or `spec.behaviors` replace a raw `flexible_spec`. The result is
|
|
57955
|
+
* sent to Meta `delivery_estimate` as `targeting_spec`.
|
|
57956
|
+
*
|
|
57957
|
+
* Sending it for an account on another platform returns 400 naming `rawTargeting`.
|
|
57958
|
+
*
|
|
57959
|
+
*/
|
|
57960
|
+
rawTargeting?: {
|
|
57961
|
+
[key: string]: unknown;
|
|
57962
|
+
};
|
|
57941
57963
|
/**
|
|
57942
57964
|
* Optional. The optimization goal the estimate should assume (platform's
|
|
57943
57965
|
* own vocabulary, e.g. Meta `REACH`, `LINK_CLICKS`, `OFFSITE_CONVERSIONS`).
|
package/dist/index.d.ts
CHANGED
|
@@ -57935,9 +57935,31 @@ type EstimateAdReachData = {
|
|
|
57935
57935
|
*/
|
|
57936
57936
|
adAccountId: string;
|
|
57937
57937
|
/**
|
|
57938
|
-
* The targeting spec to estimate. Same shape used by POST /v1/ads/create.
|
|
57938
|
+
* The targeting spec to estimate. Same shape used by POST /v1/ads/create. Required unless `rawTargeting` is sent; with `rawTargeting` it can be omitted or minimal.
|
|
57939
57939
|
*/
|
|
57940
|
-
spec
|
|
57940
|
+
spec?: (TargetingSpec);
|
|
57941
|
+
/**
|
|
57942
|
+
* Meta only. A Meta-native targeting spec (snake_case: `geo_locations`, `age_min`,
|
|
57943
|
+
* `flexible_spec`, `excluded_custom_audiences`, `user_os`, ...), the same field
|
|
57944
|
+
* `POST /v1/ads/create` accepts, so the estimate covers the exact audience the ad
|
|
57945
|
+
* set will use. For layered targeting, send `flexible_spec` here: entries AND
|
|
57946
|
+
* together, ids inside one entry OR.
|
|
57947
|
+
*
|
|
57948
|
+
* It uses the same merge rules as `POST /v1/ads/create`: rawTargeting is the BASE
|
|
57949
|
+
* layer and `spec`, converted to Meta's wire shape, is merged on top key by key,
|
|
57950
|
+
* with `spec` winning on collision. The merge goes one level deep inside
|
|
57951
|
+
* `geo_locations` and `excluded_geo_locations` (spec sub-keys win, raw-only
|
|
57952
|
+
* sub-keys such as `location_types` survive). Array values (`flexible_spec`, ...)
|
|
57953
|
+
* are replaced as a whole key when `spec` builds them, never element-merged, so
|
|
57954
|
+
* `spec.interests` or `spec.behaviors` replace a raw `flexible_spec`. The result is
|
|
57955
|
+
* sent to Meta `delivery_estimate` as `targeting_spec`.
|
|
57956
|
+
*
|
|
57957
|
+
* Sending it for an account on another platform returns 400 naming `rawTargeting`.
|
|
57958
|
+
*
|
|
57959
|
+
*/
|
|
57960
|
+
rawTargeting?: {
|
|
57961
|
+
[key: string]: unknown;
|
|
57962
|
+
};
|
|
57941
57963
|
/**
|
|
57942
57964
|
* Optional. The optimization goal the estimate should assume (platform's
|
|
57943
57965
|
* own vocabulary, e.g. Meta `REACH`, `LINK_CLICKS`, `OFFSITE_CONVERSIONS`).
|
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.
|
|
39
|
+
version: "0.2.1377",
|
|
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.
|
|
8
|
+
version: "0.2.1377",
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -169,7 +169,7 @@ export const getAnalyticsDelta = <ThrowOnError extends boolean = false>(options?
|
|
|
169
169
|
* Response shape matches /v1/analytics/instagram/account-insights so the same client
|
|
170
170
|
* handling works. Requires yt-analytics.readonly scope (412 with reauthorizeUrl if
|
|
171
171
|
* missing). Data has a 2-3 day delay (endDate is clamped accordingly). Max 89 days,
|
|
172
|
-
* defaults to last 30 days.
|
|
172
|
+
* defaults to last 30 days.
|
|
173
173
|
*
|
|
174
174
|
* NOT exposed: impressions (Studio thumbnail impressions) and impressionsClickThroughRate.
|
|
175
175
|
* YouTube Analytics API v2 does not expose these for any principal type, not channel
|
|
@@ -192,7 +192,7 @@ export const getYouTubeChannelInsights = <ThrowOnError extends boolean = false>(
|
|
|
192
192
|
* organizationalEntityFollowerStatistics, and organizationPageStatistics endpoints.
|
|
193
193
|
*
|
|
194
194
|
* Response shape matches /v1/analytics/instagram/account-insights. Max 89 days,
|
|
195
|
-
* defaults to last 30 days.
|
|
195
|
+
* defaults to last 30 days.
|
|
196
196
|
*
|
|
197
197
|
* Scope requirements: r_organization_social, r_organization_followers, and
|
|
198
198
|
* r_organization_admin must all be present on the account. Accounts connected before
|
|
@@ -223,7 +223,7 @@ export const getLinkedInOrgAggregateAnalytics = <ThrowOnError extends boolean =
|
|
|
223
223
|
* time series joined from Zernio's daily snapshotter (AccountStats).
|
|
224
224
|
*
|
|
225
225
|
* Response shape matches /v1/analytics/instagram/account-insights. Max 89 days,
|
|
226
|
-
* defaults to last 30 days. Requires the
|
|
226
|
+
* defaults to last 30 days. Requires the user.info.stats
|
|
227
227
|
* scope on the account (412 if missing).
|
|
228
228
|
*
|
|
229
229
|
* Scope intentionally narrow: this ACCOUNT-level endpoint exposes only the four
|
|
@@ -302,7 +302,7 @@ export const getYouTubeVideoRetention = <ThrowOnError extends boolean = false>(o
|
|
|
302
302
|
* below. Because Meta did not provide direct adds/removes replacements, Zernio synthesizes
|
|
303
303
|
* followers_gained / followers_lost from the daily follower snapshotter.
|
|
304
304
|
*
|
|
305
|
-
* Max 89 days, defaults to last 30 days.
|
|
305
|
+
* Max 89 days, defaults to last 30 days.
|
|
306
306
|
*
|
|
307
307
|
*/
|
|
308
308
|
export const getFacebookPageInsights = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetFacebookPageInsightsData, ThrowOnError>) => {
|
|
@@ -315,7 +315,7 @@ export const getFacebookPageInsights = <ThrowOnError extends boolean = false>(op
|
|
|
315
315
|
/**
|
|
316
316
|
* Get Facebook post monetization earnings
|
|
317
317
|
* Returns lifetime monetization earnings for ONE Facebook post, read live from Meta on every
|
|
318
|
-
* request.
|
|
318
|
+
* request.
|
|
319
319
|
*
|
|
320
320
|
* Earnings are CUMULATIVE since the post was published, not earnings within a date range, so
|
|
321
321
|
* this endpoint takes no since/until and the totals must not be summed across dates or across
|
|
@@ -344,7 +344,7 @@ export const getFacebookPostEarnings = <ThrowOnError extends boolean = false>(op
|
|
|
344
344
|
* Returns account-level Instagram insights such as reach, views, accounts engaged, and total interactions.
|
|
345
345
|
* These metrics reflect the entire account's performance across all content surfaces (feed, stories, explore, profile),
|
|
346
346
|
* and are fundamentally different from post-level metrics. Data may be delayed up to 48 hours.
|
|
347
|
-
* Max 90 days, defaults to last 30 days.
|
|
347
|
+
* Max 90 days, defaults to last 30 days.
|
|
348
348
|
*
|
|
349
349
|
*/
|
|
350
350
|
export const getInstagramAccountInsights = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInstagramAccountInsightsData, ThrowOnError>) => {
|
|
@@ -362,7 +362,7 @@ export const getInstagramAccountInsights = <ThrowOnError extends boolean = false
|
|
|
362
362
|
* via any public API.
|
|
363
363
|
*
|
|
364
364
|
* Response envelope matches /v1/analytics/instagram/account-insights so the same client
|
|
365
|
-
* handling works. Max 89 days, defaults to last 30 days.
|
|
365
|
+
* handling works. Max 89 days, defaults to last 30 days.
|
|
366
366
|
*
|
|
367
367
|
*/
|
|
368
368
|
export const getInstagramFollowerHistory = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInstagramFollowerHistoryData, ThrowOnError>) => {
|
|
@@ -377,7 +377,7 @@ export const getInstagramFollowerHistory = <ThrowOnError extends boolean = false
|
|
|
377
377
|
* Returns the follower breakdown of a connected Facebook Page by country and/or city, from Meta's latest daily snapshot.
|
|
378
378
|
* Country keys are ISO 3166-1 alpha-2 codes; city keys are "City, Region, Country" strings as Meta returns them.
|
|
379
379
|
* Meta removed age and gender demographics for Pages (page_fans_gender_age) on November 15 2025 with no replacement, so only country and city are available.
|
|
380
|
-
* Meta reports small counts at a privacy floor, so the long tail can show identical low values.
|
|
380
|
+
* Meta reports small counts at a privacy floor, so the long tail can show identical low values.
|
|
381
381
|
*
|
|
382
382
|
*/
|
|
383
383
|
export const getFacebookDemographics = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetFacebookDemographicsData, ThrowOnError>) => {
|
|
@@ -406,7 +406,7 @@ export const getLinkedInDemographics = <ThrowOnError extends boolean = false>(op
|
|
|
406
406
|
* Get Instagram demographics
|
|
407
407
|
* Returns audience demographic insights for an Instagram account, broken down by age, city, country, and/or gender.
|
|
408
408
|
* Requires at least 100 followers. Returns top 45 entries per dimension.
|
|
409
|
-
* Data may be delayed up to 48 hours.
|
|
409
|
+
* Data may be delayed up to 48 hours.
|
|
410
410
|
*
|
|
411
411
|
*/
|
|
412
412
|
export const getInstagramDemographics = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInstagramDemographicsData, ThrowOnError>) => {
|
|
@@ -421,7 +421,7 @@ export const getInstagramDemographics = <ThrowOnError extends boolean = false>(o
|
|
|
421
421
|
* Returns how many of an Instagram account's followers were online in each hour, for every day of the last 30 days that Meta has data for.
|
|
422
422
|
* Hour keys are "0" to "23" as Meta returns them. endTime is the end_time Meta returns for that day. Meta does not document the timezone of the hour keys.
|
|
423
423
|
* Data is delayed up to 48 hours, so the most recent days are left out until Meta fills them.
|
|
424
|
-
* Requires at least 100 followers; for smaller accounts days is empty.
|
|
424
|
+
* Requires at least 100 followers; for smaller accounts days is empty.
|
|
425
425
|
*
|
|
426
426
|
*/
|
|
427
427
|
export const getInstagramOnlineFollowers = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInstagramOnlineFollowersData, ThrowOnError>) => {
|
|
@@ -438,7 +438,6 @@ export const getInstagramOnlineFollowers = <ThrowOnError extends boolean = false
|
|
|
438
438
|
* Age and gender values are viewer percentages (0-100). Country values are view counts.
|
|
439
439
|
* Data is based on signed-in viewers only, with a 2-3 day delay. YouTube suppresses demographics
|
|
440
440
|
* for videos with too few signed-in views, so low-traffic videos can return empty breakdowns.
|
|
441
|
-
* Requires the Analytics add-on.
|
|
442
441
|
*
|
|
443
442
|
*/
|
|
444
443
|
export const getYouTubeDemographics = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetYouTubeDemographicsData, ThrowOnError>) => {
|
|
@@ -452,7 +451,7 @@ export const getYouTubeDemographics = <ThrowOnError extends boolean = false>(opt
|
|
|
452
451
|
* Get daily aggregated metrics
|
|
453
452
|
* Returns daily aggregated analytics metrics and a per-platform breakdown.
|
|
454
453
|
* Each day includes post count, platform distribution, and summed metrics (impressions, reach, likes, comments, shares, saves, clicks, views).
|
|
455
|
-
* Defaults to the last 180 days.
|
|
454
|
+
* Defaults to the last 180 days.
|
|
456
455
|
*
|
|
457
456
|
*/
|
|
458
457
|
export const getDailyMetrics = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetDailyMetricsData, ThrowOnError>) => {
|
|
@@ -467,7 +466,7 @@ export const getDailyMetrics = <ThrowOnError extends boolean = false>(options?:
|
|
|
467
466
|
* Everything an analytics dashboard needs in one call: window totals, follower growth, a per-day series, top posts, recent posts and, optionally, the same figures for the previous period.
|
|
468
467
|
* Daily and total metrics use received attribution: each day holds the engagement that arrived that day, on any post, so `totals` is always the sum of `daily`.
|
|
469
468
|
* `topPosts` and `recentPosts` list posts published in the window with their lifetime metrics. A post cross-posted to several platforms appears once per platform.
|
|
470
|
-
* All dates are UTC days.
|
|
469
|
+
* All dates are UTC days.
|
|
471
470
|
*
|
|
472
471
|
*/
|
|
473
472
|
export const getAnalyticsDashboard = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAnalyticsDashboardData, ThrowOnError>) => {
|
|
@@ -481,7 +480,7 @@ export const getAnalyticsDashboard = <ThrowOnError extends boolean = false>(opti
|
|
|
481
480
|
* Get best times to post
|
|
482
481
|
* Returns the best times to post based on historical engagement data.
|
|
483
482
|
* Groups all published posts by day of week and hour (UTC), calculating average engagement per slot.
|
|
484
|
-
* Use this to auto-schedule posts at optimal times.
|
|
483
|
+
* Use this to auto-schedule posts at optimal times.
|
|
485
484
|
*
|
|
486
485
|
*/
|
|
487
486
|
export const getBestTimeToPost = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetBestTimeToPostData, ThrowOnError>) => {
|
|
@@ -496,7 +495,6 @@ export const getBestTimeToPost = <ThrowOnError extends boolean = false>(options?
|
|
|
496
495
|
* Returns how engagement accumulates over time after a post is published.
|
|
497
496
|
* Each bucket shows what percentage of the post's total engagement had been reached by that time window.
|
|
498
497
|
* Useful for understanding content lifespan (e.g. "posts reach 78% of total engagement within 24 hours").
|
|
499
|
-
* Requires the Analytics add-on.
|
|
500
498
|
*
|
|
501
499
|
*/
|
|
502
500
|
export const getContentDecay = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetContentDecayData, ThrowOnError>) => {
|
|
@@ -511,7 +509,6 @@ export const getContentDecay = <ThrowOnError extends boolean = false>(options?:
|
|
|
511
509
|
* Returns the correlation between posting frequency (posts per week) and engagement rate, broken down by platform.
|
|
512
510
|
* Helps find the optimal posting cadence for each platform. Each row represents a specific (platform, posts_per_week) combination
|
|
513
511
|
* with the average engagement rate observed across all weeks matching that frequency.
|
|
514
|
-
* Requires the Analytics add-on.
|
|
515
512
|
*
|
|
516
513
|
*/
|
|
517
514
|
export const getPostingFrequency = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetPostingFrequencyData, ThrowOnError>) => {
|
|
@@ -817,7 +814,7 @@ export const cancelPayoutBatch = <ThrowOnError extends boolean = false>(options:
|
|
|
817
814
|
* Get post analytics timeline
|
|
818
815
|
* Returns a daily timeline of analytics metrics for a specific post, showing how impressions, likes,
|
|
819
816
|
* and other metrics evolved day-by-day since publishing. Each row represents one day of data per platform.
|
|
820
|
-
* For multi-platform Zernio posts, returns separate rows for each platform.
|
|
817
|
+
* For multi-platform Zernio posts, returns separate rows for each platform.
|
|
821
818
|
*
|
|
822
819
|
*/
|
|
823
820
|
export const getPostTimeline = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPostTimelineData, ThrowOnError>) => {
|
|
@@ -878,7 +875,7 @@ export const getGoogleAnalyticsMetadata = <ThrowOnError extends boolean = false>
|
|
|
878
875
|
* ends with one final read, after which the `post.tracking_completed` webhook fires. Identify the post
|
|
879
876
|
* with `postId` (an external post id from Zernio), or with `accountId` together with the post's `url`.
|
|
880
877
|
* Opening a window for a post that is already tracked returns the existing window with `200`. A new
|
|
881
|
-
* window returns `201`.
|
|
878
|
+
* window returns `201`.
|
|
882
879
|
*
|
|
883
880
|
*/
|
|
884
881
|
export const openTrackingWindow = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<OpenTrackingWindowData, ThrowOnError>) => {
|
|
@@ -891,7 +888,7 @@ export const openTrackingWindow = <ThrowOnError extends boolean = false>(options
|
|
|
891
888
|
/**
|
|
892
889
|
* List tracking windows
|
|
893
890
|
* Lists the tracking windows you can see, newest first. Each window carries the latest verified
|
|
894
|
-
* numbers we read from the platform.
|
|
891
|
+
* numbers we read from the platform.
|
|
895
892
|
*
|
|
896
893
|
*/
|
|
897
894
|
export const listTrackingWindows = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListTrackingWindowsData, ThrowOnError>) => {
|
|
@@ -904,7 +901,7 @@ export const listTrackingWindows = <ThrowOnError extends boolean = false>(option
|
|
|
904
901
|
/**
|
|
905
902
|
* Get a tracking window
|
|
906
903
|
* Returns one tracking window with the latest verified numbers we read from the platform. Once the window
|
|
907
|
-
* has completed, `finalReadAt` and `completionReason` say how it closed.
|
|
904
|
+
* has completed, `finalReadAt` and `completionReason` say how it closed.
|
|
908
905
|
*
|
|
909
906
|
*/
|
|
910
907
|
export const getTrackingWindow = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTrackingWindowData, ThrowOnError>) => {
|
|
@@ -918,7 +915,7 @@ export const getTrackingWindow = <ThrowOnError extends boolean = false>(options:
|
|
|
918
915
|
* Cancel a tracking window
|
|
919
916
|
* Stops tracking and returns the window with its final status. A window that already completed keeps its
|
|
920
917
|
* `completed` status and its final read. A cancelled window gets no final read and fires no
|
|
921
|
-
* `post.tracking_completed` webhook.
|
|
918
|
+
* `post.tracking_completed` webhook.
|
|
922
919
|
*
|
|
923
920
|
*/
|
|
924
921
|
export const cancelTrackingWindow = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CancelTrackingWindowData, ThrowOnError>) => {
|
|
@@ -934,7 +931,7 @@ export const cancelTrackingWindow = <ThrowOnError extends boolean = false>(optio
|
|
|
934
931
|
* views and engagement as the platform reported them at `syncedAt`. Zernio only stores what it fetched from
|
|
935
932
|
* the platform, so nothing here was self-reported. `shares` and `saves` are null on platforms that do not
|
|
936
933
|
* return that counter, which is different from a real zero. `watchSeconds` and `completionRate` are null
|
|
937
|
-
* when the platform gives no watch signal.
|
|
934
|
+
* when the platform gives no watch signal.
|
|
938
935
|
*
|
|
939
936
|
*/
|
|
940
937
|
export const getPostSamples = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPostSamplesData, ThrowOnError>) => {
|
|
@@ -951,7 +948,7 @@ export const getPostSamples = <ThrowOnError extends boolean = false>(options: Op
|
|
|
951
948
|
* samples we fetched from the platform, never from anything the creator or caller reported, and `reasons`
|
|
952
949
|
* lists each factor that lowered it with its weight in points. `confidence` (0 to 1) says how much data
|
|
953
950
|
* the score rests on. A stored score newer than 30 minutes is returned as is, otherwise it is recomputed.
|
|
954
|
-
* The `post.authenticity_changed` webhook fires when a score crosses 40.
|
|
951
|
+
* The `post.authenticity_changed` webhook fires when a score crosses 40.
|
|
955
952
|
*
|
|
956
953
|
*/
|
|
957
954
|
export const getPostAuthenticity = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPostAuthenticityData, ThrowOnError>) => {
|
|
@@ -982,7 +979,6 @@ export const listPostAuthenticity = <ThrowOnError extends boolean = false>(optio
|
|
|
982
979
|
* Metrics include impressions (Maps/Search, desktop/mobile), website clicks,
|
|
983
980
|
* call clicks, direction requests, conversations, bookings, and food orders.
|
|
984
981
|
* Data may be delayed 2-3 days. Max 18 months of historical data.
|
|
985
|
-
* Requires the Analytics add-on.
|
|
986
982
|
*
|
|
987
983
|
*/
|
|
988
984
|
export const getGoogleBusinessPerformance = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGoogleBusinessPerformanceData, ThrowOnError>) => {
|
|
@@ -997,7 +993,7 @@ export const getGoogleBusinessPerformance = <ThrowOnError extends boolean = fals
|
|
|
997
993
|
* Returns search keywords that triggered impressions for a Google Business Profile location.
|
|
998
994
|
* Data is aggregated monthly. Keywords Google reports only as below a threshold have `impressions` 0 and `impressionsThreshold` set to that threshold.
|
|
999
995
|
* Returns up to 100 keywords per page. When `nextPageToken` is not null, pass it as `pageToken` with the same `startMonth` and `endMonth` to get the next page.
|
|
1000
|
-
* Max 18 months of historical data.
|
|
996
|
+
* Max 18 months of historical data.
|
|
1001
997
|
*
|
|
1002
998
|
*/
|
|
1003
999
|
export const getGoogleBusinessSearchKeywords = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGoogleBusinessSearchKeywordsData, ThrowOnError>) => {
|
|
@@ -59162,9 +59162,31 @@ export type EstimateAdReachData = {
|
|
|
59162
59162
|
*/
|
|
59163
59163
|
adAccountId: string;
|
|
59164
59164
|
/**
|
|
59165
|
-
* The targeting spec to estimate. Same shape used by POST /v1/ads/create.
|
|
59165
|
+
* The targeting spec to estimate. Same shape used by POST /v1/ads/create. Required unless `rawTargeting` is sent; with `rawTargeting` it can be omitted or minimal.
|
|
59166
59166
|
*/
|
|
59167
|
-
spec
|
|
59167
|
+
spec?: (TargetingSpec);
|
|
59168
|
+
/**
|
|
59169
|
+
* Meta only. A Meta-native targeting spec (snake_case: `geo_locations`, `age_min`,
|
|
59170
|
+
* `flexible_spec`, `excluded_custom_audiences`, `user_os`, ...), the same field
|
|
59171
|
+
* `POST /v1/ads/create` accepts, so the estimate covers the exact audience the ad
|
|
59172
|
+
* set will use. For layered targeting, send `flexible_spec` here: entries AND
|
|
59173
|
+
* together, ids inside one entry OR.
|
|
59174
|
+
*
|
|
59175
|
+
* It uses the same merge rules as `POST /v1/ads/create`: rawTargeting is the BASE
|
|
59176
|
+
* layer and `spec`, converted to Meta's wire shape, is merged on top key by key,
|
|
59177
|
+
* with `spec` winning on collision. The merge goes one level deep inside
|
|
59178
|
+
* `geo_locations` and `excluded_geo_locations` (spec sub-keys win, raw-only
|
|
59179
|
+
* sub-keys such as `location_types` survive). Array values (`flexible_spec`, ...)
|
|
59180
|
+
* are replaced as a whole key when `spec` builds them, never element-merged, so
|
|
59181
|
+
* `spec.interests` or `spec.behaviors` replace a raw `flexible_spec`. The result is
|
|
59182
|
+
* sent to Meta `delivery_estimate` as `targeting_spec`.
|
|
59183
|
+
*
|
|
59184
|
+
* Sending it for an account on another platform returns 400 naming `rawTargeting`.
|
|
59185
|
+
*
|
|
59186
|
+
*/
|
|
59187
|
+
rawTargeting?: {
|
|
59188
|
+
[key: string]: unknown;
|
|
59189
|
+
};
|
|
59168
59190
|
/**
|
|
59169
59191
|
* Optional. The optimization goal the estimate should assume (platform's
|
|
59170
59192
|
* own vocabulary, e.g. Meta `REACH`, `LINK_CLICKS`, `OFFSITE_CONVERSIONS`).
|