@zernio/node 0.2.131 → 0.2.133
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 +73 -5
- package/dist/index.d.ts +73 -5
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +29 -8
- package/src/generated/types.gen.ts +73 -5
package/dist/index.d.mts
CHANGED
|
@@ -845,6 +845,26 @@ type Ad = {
|
|
|
845
845
|
* Meta creative object_type (e.g. SHARE, VIDEO, PRIVACY_CHECK_FAIL, POST_DELETED). Use this to render state-aware previews — when Meta moderation strips image/video fields, only thumbnailUrl at 64x64 is available.
|
|
846
846
|
*/
|
|
847
847
|
objectType?: string;
|
|
848
|
+
/**
|
|
849
|
+
* Meta creative `object_story_id` (the SHARE reference). Frequently absent — Meta omits it for SHARE creatives. Use effectiveObjectStoryId instead.
|
|
850
|
+
*/
|
|
851
|
+
objectStoryId?: (string) | null;
|
|
852
|
+
/**
|
|
853
|
+
* Meta `effective_object_story_id` — `{pageId}_{postId}` of the Facebook post the ad's engagement (comments) lives on. Pass to GET /v1/ads?effectiveObjectStoryId= to map a Business-Manager-visible post back to this ad; GET /v1/ads/{adId}/comments resolves comments against it.
|
|
854
|
+
*/
|
|
855
|
+
effectiveObjectStoryId?: (string) | null;
|
|
856
|
+
/**
|
|
857
|
+
* Meta `effective_instagram_media_id` — the Instagram media ID of the boosted post the ad's engagement lives on. Pass to GET /v1/ads?effectiveInstagramMediaId= to map a Business-Manager-visible IG post back to this ad.
|
|
858
|
+
*/
|
|
859
|
+
effectiveInstagramMediaId?: (string) | null;
|
|
860
|
+
/**
|
|
861
|
+
* Meta `instagram_user_id` — the Instagram-scoped business ID that owns the boosted media.
|
|
862
|
+
*/
|
|
863
|
+
instagramUserId?: (string) | null;
|
|
864
|
+
/**
|
|
865
|
+
* Meta `instagram_permalink_url` — public Instagram post URL of the boosted media.
|
|
866
|
+
*/
|
|
867
|
+
instagramPermalinkUrl?: (string) | null;
|
|
848
868
|
/**
|
|
849
869
|
* All media URLs for this ad (carousel images, multiple assets). Populated for Meta (carousel child_attachments), Google Ads (responsive display marketing_images), and LinkedIn (multi-image posts).
|
|
850
870
|
*/
|
|
@@ -10391,9 +10411,9 @@ type ListInboxCommentsData = {
|
|
|
10391
10411
|
*/
|
|
10392
10412
|
minComments?: number;
|
|
10393
10413
|
/**
|
|
10394
|
-
* Filter by platform
|
|
10414
|
+
* Filter by platform. `metaads` is a synthetic value meaning the user's ads (boosted/dark posts) only; `facebook`/`instagram` return organic posts only.
|
|
10395
10415
|
*/
|
|
10396
|
-
platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'threads' | 'youtube' | 'linkedin' | 'reddit';
|
|
10416
|
+
platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'threads' | 'youtube' | 'linkedin' | 'reddit' | 'metaads';
|
|
10397
10417
|
/**
|
|
10398
10418
|
* Filter by profile ID
|
|
10399
10419
|
*/
|
|
@@ -10432,6 +10452,18 @@ type ListInboxCommentsResponse = ({
|
|
|
10432
10452
|
* Reddit subreddit name
|
|
10433
10453
|
*/
|
|
10434
10454
|
subreddit?: (string) | null;
|
|
10455
|
+
/**
|
|
10456
|
+
* True when this row is an ad (boosted/dark post). `platform` is then the placement (facebook = the Page dark post / instagram = the IG media), `id` is `{adId}:{placement}`, and the thread is at GET /v1/ads/{adId}/comments?placement={placement}.
|
|
10457
|
+
*/
|
|
10458
|
+
isAd?: boolean;
|
|
10459
|
+
/**
|
|
10460
|
+
* Internal Zernio ad id — only on ad rows.
|
|
10461
|
+
*/
|
|
10462
|
+
adId?: string;
|
|
10463
|
+
/**
|
|
10464
|
+
* Which side of the ad this row's comments are on — only on ad rows.
|
|
10465
|
+
*/
|
|
10466
|
+
placement?: 'facebook' | 'instagram';
|
|
10435
10467
|
}>;
|
|
10436
10468
|
pagination?: {
|
|
10437
10469
|
hasMore?: boolean;
|
|
@@ -10569,11 +10601,24 @@ type GetInboxPostCommentsResponse = ({
|
|
|
10569
10601
|
*/
|
|
10570
10602
|
subreddit?: (string) | null;
|
|
10571
10603
|
lastUpdated?: string;
|
|
10604
|
+
/**
|
|
10605
|
+
* (Facebook/Instagram only) Present when this post has no organic comments but is a boosted post — the engagement lives on the ad. Use the ad-comments endpoint instead.
|
|
10606
|
+
*/
|
|
10607
|
+
adComments?: {
|
|
10608
|
+
/**
|
|
10609
|
+
* Internal Zernio ad ID
|
|
10610
|
+
*/
|
|
10611
|
+
adId?: string;
|
|
10612
|
+
/**
|
|
10613
|
+
* Path to fetch the ad's comments (GET /v1/ads/{adId}/comments)
|
|
10614
|
+
*/
|
|
10615
|
+
adCommentsUrl?: string;
|
|
10616
|
+
} | null;
|
|
10572
10617
|
};
|
|
10573
10618
|
});
|
|
10574
|
-
type GetInboxPostCommentsError = ({
|
|
10619
|
+
type GetInboxPostCommentsError = (unknown | {
|
|
10575
10620
|
error?: string;
|
|
10576
|
-
}
|
|
10621
|
+
});
|
|
10577
10622
|
type ReplyToInboxPostData = {
|
|
10578
10623
|
body: {
|
|
10579
10624
|
accountId: string;
|
|
@@ -13279,6 +13324,14 @@ type ListAdsData = {
|
|
|
13279
13324
|
* Platform campaign ID (filter ads within a campaign)
|
|
13280
13325
|
*/
|
|
13281
13326
|
campaignId?: string;
|
|
13327
|
+
/**
|
|
13328
|
+
* Instagram media ID of the boosted post (Meta `effective_instagram_media_id`). Use to map a Business-Manager-visible IG post back to the Zernio ad.
|
|
13329
|
+
*/
|
|
13330
|
+
effectiveInstagramMediaId?: string;
|
|
13331
|
+
/**
|
|
13332
|
+
* Facebook `{pageId}_{postId}` of the post the ad's engagement lives on (Meta `effective_object_story_id`). Use to map a Business-Manager-visible post back to the Zernio ad.
|
|
13333
|
+
*/
|
|
13334
|
+
effectiveObjectStoryId?: string;
|
|
13282
13335
|
/**
|
|
13283
13336
|
* Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
13284
13337
|
*/
|
|
@@ -13289,6 +13342,10 @@ type ListAdsData = {
|
|
|
13289
13342
|
*/
|
|
13290
13343
|
page?: number;
|
|
13291
13344
|
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
13345
|
+
/**
|
|
13346
|
+
* Meta ad ID. Returns the ad with this platform-side ad ID.
|
|
13347
|
+
*/
|
|
13348
|
+
platformAdId?: string;
|
|
13292
13349
|
/**
|
|
13293
13350
|
* Profile ID
|
|
13294
13351
|
*/
|
|
@@ -13766,6 +13823,10 @@ type GetAdCommentsData = {
|
|
|
13766
13823
|
*/
|
|
13767
13824
|
cursor?: string;
|
|
13768
13825
|
limit?: number;
|
|
13826
|
+
/**
|
|
13827
|
+
* Which side of the ad to return comments for. Omit to default to the Instagram side when present, else Facebook. Returns ad_not_commentable if the ad has no such placement.
|
|
13828
|
+
*/
|
|
13829
|
+
placement?: 'facebook' | 'instagram';
|
|
13769
13830
|
};
|
|
13770
13831
|
};
|
|
13771
13832
|
type GetAdCommentsResponse = ({
|
|
@@ -13778,7 +13839,14 @@ type GetAdCommentsResponse = ({
|
|
|
13778
13839
|
cursor?: string;
|
|
13779
13840
|
};
|
|
13780
13841
|
meta: {
|
|
13842
|
+
/**
|
|
13843
|
+
* Which side these comments are on (same as `placement`).
|
|
13844
|
+
*/
|
|
13781
13845
|
platform: 'facebook' | 'instagram';
|
|
13846
|
+
/**
|
|
13847
|
+
* The placement these comments are for — useful when you didn't pass ?placement= and want to know which one you got.
|
|
13848
|
+
*/
|
|
13849
|
+
placement: 'facebook' | 'instagram';
|
|
13782
13850
|
/**
|
|
13783
13851
|
* Internal Zernio ad ID.
|
|
13784
13852
|
*/
|
|
@@ -13788,7 +13856,7 @@ type GetAdCommentsResponse = ({
|
|
|
13788
13856
|
*/
|
|
13789
13857
|
platformAdId: string;
|
|
13790
13858
|
/**
|
|
13791
|
-
* Underlying post ID the comments belong to. effective_object_story_id for Facebook, effective_instagram_media_id for Instagram.
|
|
13859
|
+
* Underlying post ID the comments belong to. effective_object_story_id for the Facebook side, effective_instagram_media_id for the Instagram side.
|
|
13792
13860
|
*/
|
|
13793
13861
|
effectiveStoryId: string;
|
|
13794
13862
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -845,6 +845,26 @@ type Ad = {
|
|
|
845
845
|
* Meta creative object_type (e.g. SHARE, VIDEO, PRIVACY_CHECK_FAIL, POST_DELETED). Use this to render state-aware previews — when Meta moderation strips image/video fields, only thumbnailUrl at 64x64 is available.
|
|
846
846
|
*/
|
|
847
847
|
objectType?: string;
|
|
848
|
+
/**
|
|
849
|
+
* Meta creative `object_story_id` (the SHARE reference). Frequently absent — Meta omits it for SHARE creatives. Use effectiveObjectStoryId instead.
|
|
850
|
+
*/
|
|
851
|
+
objectStoryId?: (string) | null;
|
|
852
|
+
/**
|
|
853
|
+
* Meta `effective_object_story_id` — `{pageId}_{postId}` of the Facebook post the ad's engagement (comments) lives on. Pass to GET /v1/ads?effectiveObjectStoryId= to map a Business-Manager-visible post back to this ad; GET /v1/ads/{adId}/comments resolves comments against it.
|
|
854
|
+
*/
|
|
855
|
+
effectiveObjectStoryId?: (string) | null;
|
|
856
|
+
/**
|
|
857
|
+
* Meta `effective_instagram_media_id` — the Instagram media ID of the boosted post the ad's engagement lives on. Pass to GET /v1/ads?effectiveInstagramMediaId= to map a Business-Manager-visible IG post back to this ad.
|
|
858
|
+
*/
|
|
859
|
+
effectiveInstagramMediaId?: (string) | null;
|
|
860
|
+
/**
|
|
861
|
+
* Meta `instagram_user_id` — the Instagram-scoped business ID that owns the boosted media.
|
|
862
|
+
*/
|
|
863
|
+
instagramUserId?: (string) | null;
|
|
864
|
+
/**
|
|
865
|
+
* Meta `instagram_permalink_url` — public Instagram post URL of the boosted media.
|
|
866
|
+
*/
|
|
867
|
+
instagramPermalinkUrl?: (string) | null;
|
|
848
868
|
/**
|
|
849
869
|
* All media URLs for this ad (carousel images, multiple assets). Populated for Meta (carousel child_attachments), Google Ads (responsive display marketing_images), and LinkedIn (multi-image posts).
|
|
850
870
|
*/
|
|
@@ -10391,9 +10411,9 @@ type ListInboxCommentsData = {
|
|
|
10391
10411
|
*/
|
|
10392
10412
|
minComments?: number;
|
|
10393
10413
|
/**
|
|
10394
|
-
* Filter by platform
|
|
10414
|
+
* Filter by platform. `metaads` is a synthetic value meaning the user's ads (boosted/dark posts) only; `facebook`/`instagram` return organic posts only.
|
|
10395
10415
|
*/
|
|
10396
|
-
platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'threads' | 'youtube' | 'linkedin' | 'reddit';
|
|
10416
|
+
platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'threads' | 'youtube' | 'linkedin' | 'reddit' | 'metaads';
|
|
10397
10417
|
/**
|
|
10398
10418
|
* Filter by profile ID
|
|
10399
10419
|
*/
|
|
@@ -10432,6 +10452,18 @@ type ListInboxCommentsResponse = ({
|
|
|
10432
10452
|
* Reddit subreddit name
|
|
10433
10453
|
*/
|
|
10434
10454
|
subreddit?: (string) | null;
|
|
10455
|
+
/**
|
|
10456
|
+
* True when this row is an ad (boosted/dark post). `platform` is then the placement (facebook = the Page dark post / instagram = the IG media), `id` is `{adId}:{placement}`, and the thread is at GET /v1/ads/{adId}/comments?placement={placement}.
|
|
10457
|
+
*/
|
|
10458
|
+
isAd?: boolean;
|
|
10459
|
+
/**
|
|
10460
|
+
* Internal Zernio ad id — only on ad rows.
|
|
10461
|
+
*/
|
|
10462
|
+
adId?: string;
|
|
10463
|
+
/**
|
|
10464
|
+
* Which side of the ad this row's comments are on — only on ad rows.
|
|
10465
|
+
*/
|
|
10466
|
+
placement?: 'facebook' | 'instagram';
|
|
10435
10467
|
}>;
|
|
10436
10468
|
pagination?: {
|
|
10437
10469
|
hasMore?: boolean;
|
|
@@ -10569,11 +10601,24 @@ type GetInboxPostCommentsResponse = ({
|
|
|
10569
10601
|
*/
|
|
10570
10602
|
subreddit?: (string) | null;
|
|
10571
10603
|
lastUpdated?: string;
|
|
10604
|
+
/**
|
|
10605
|
+
* (Facebook/Instagram only) Present when this post has no organic comments but is a boosted post — the engagement lives on the ad. Use the ad-comments endpoint instead.
|
|
10606
|
+
*/
|
|
10607
|
+
adComments?: {
|
|
10608
|
+
/**
|
|
10609
|
+
* Internal Zernio ad ID
|
|
10610
|
+
*/
|
|
10611
|
+
adId?: string;
|
|
10612
|
+
/**
|
|
10613
|
+
* Path to fetch the ad's comments (GET /v1/ads/{adId}/comments)
|
|
10614
|
+
*/
|
|
10615
|
+
adCommentsUrl?: string;
|
|
10616
|
+
} | null;
|
|
10572
10617
|
};
|
|
10573
10618
|
});
|
|
10574
|
-
type GetInboxPostCommentsError = ({
|
|
10619
|
+
type GetInboxPostCommentsError = (unknown | {
|
|
10575
10620
|
error?: string;
|
|
10576
|
-
}
|
|
10621
|
+
});
|
|
10577
10622
|
type ReplyToInboxPostData = {
|
|
10578
10623
|
body: {
|
|
10579
10624
|
accountId: string;
|
|
@@ -13279,6 +13324,14 @@ type ListAdsData = {
|
|
|
13279
13324
|
* Platform campaign ID (filter ads within a campaign)
|
|
13280
13325
|
*/
|
|
13281
13326
|
campaignId?: string;
|
|
13327
|
+
/**
|
|
13328
|
+
* Instagram media ID of the boosted post (Meta `effective_instagram_media_id`). Use to map a Business-Manager-visible IG post back to the Zernio ad.
|
|
13329
|
+
*/
|
|
13330
|
+
effectiveInstagramMediaId?: string;
|
|
13331
|
+
/**
|
|
13332
|
+
* Facebook `{pageId}_{postId}` of the post the ad's engagement lives on (Meta `effective_object_story_id`). Use to map a Business-Manager-visible post back to the Zernio ad.
|
|
13333
|
+
*/
|
|
13334
|
+
effectiveObjectStoryId?: string;
|
|
13282
13335
|
/**
|
|
13283
13336
|
* Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
13284
13337
|
*/
|
|
@@ -13289,6 +13342,10 @@ type ListAdsData = {
|
|
|
13289
13342
|
*/
|
|
13290
13343
|
page?: number;
|
|
13291
13344
|
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
13345
|
+
/**
|
|
13346
|
+
* Meta ad ID. Returns the ad with this platform-side ad ID.
|
|
13347
|
+
*/
|
|
13348
|
+
platformAdId?: string;
|
|
13292
13349
|
/**
|
|
13293
13350
|
* Profile ID
|
|
13294
13351
|
*/
|
|
@@ -13766,6 +13823,10 @@ type GetAdCommentsData = {
|
|
|
13766
13823
|
*/
|
|
13767
13824
|
cursor?: string;
|
|
13768
13825
|
limit?: number;
|
|
13826
|
+
/**
|
|
13827
|
+
* Which side of the ad to return comments for. Omit to default to the Instagram side when present, else Facebook. Returns ad_not_commentable if the ad has no such placement.
|
|
13828
|
+
*/
|
|
13829
|
+
placement?: 'facebook' | 'instagram';
|
|
13769
13830
|
};
|
|
13770
13831
|
};
|
|
13771
13832
|
type GetAdCommentsResponse = ({
|
|
@@ -13778,7 +13839,14 @@ type GetAdCommentsResponse = ({
|
|
|
13778
13839
|
cursor?: string;
|
|
13779
13840
|
};
|
|
13780
13841
|
meta: {
|
|
13842
|
+
/**
|
|
13843
|
+
* Which side these comments are on (same as `placement`).
|
|
13844
|
+
*/
|
|
13781
13845
|
platform: 'facebook' | 'instagram';
|
|
13846
|
+
/**
|
|
13847
|
+
* The placement these comments are for — useful when you didn't pass ?placement= and want to know which one you got.
|
|
13848
|
+
*/
|
|
13849
|
+
placement: 'facebook' | 'instagram';
|
|
13782
13850
|
/**
|
|
13783
13851
|
* Internal Zernio ad ID.
|
|
13784
13852
|
*/
|
|
@@ -13788,7 +13856,7 @@ type GetAdCommentsResponse = ({
|
|
|
13788
13856
|
*/
|
|
13789
13857
|
platformAdId: string;
|
|
13790
13858
|
/**
|
|
13791
|
-
* Underlying post ID the comments belong to. effective_object_story_id for Facebook, effective_instagram_media_id for Instagram.
|
|
13859
|
+
* Underlying post ID the comments belong to. effective_object_story_id for the Facebook side, effective_instagram_media_id for the Instagram side.
|
|
13792
13860
|
*/
|
|
13793
13861
|
effectiveStoryId: string;
|
|
13794
13862
|
/**
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -2080,6 +2080,18 @@ export const deleteTelegramCommands = <ThrowOnError extends boolean = false>(opt
|
|
|
2080
2080
|
/**
|
|
2081
2081
|
* List commented posts
|
|
2082
2082
|
* Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts.
|
|
2083
|
+
*
|
|
2084
|
+
* For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads
|
|
2085
|
+
* (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments):
|
|
2086
|
+
* an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the
|
|
2087
|
+
* Page dark post and the IG media have separate comment threads), each flagged
|
|
2088
|
+
* `isAd: true` with `adId` and `placement` (`id` is `{adId}:{placement}`). Use
|
|
2089
|
+
* `?platform=metaads` to return *only* ad rows; passing `facebook`/`instagram` returns
|
|
2090
|
+
* *organic* posts only (no ads); omitting `platform` returns both. Fetch a row's thread
|
|
2091
|
+
* from GET /v1/ads/{adId}/comments?placement={placement}. Ad comment counts are read with
|
|
2092
|
+
* the Marketing API token (Facebook side) or the connected Instagram account's token
|
|
2093
|
+
* (Instagram side); a row whose count can't be read is omitted.
|
|
2094
|
+
*
|
|
2083
2095
|
*/
|
|
2084
2096
|
export const listInboxComments = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListInboxCommentsData, ThrowOnError>) => {
|
|
2085
2097
|
return (options?.client ?? client).get<ListInboxCommentsResponse, ListInboxCommentsError, ThrowOnError>({
|
|
@@ -3237,6 +3249,12 @@ export const listCommentAutomationLogs = <ThrowOnError extends boolean = false>(
|
|
|
3237
3249
|
* Use source=all to include externally-synced ads from platform ad managers.
|
|
3238
3250
|
* If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.
|
|
3239
3251
|
*
|
|
3252
|
+
* To find the Zernio ad behind a comment you see in Meta Business Manager, filter by
|
|
3253
|
+
* platformAdId (the Meta ad ID), effectiveObjectStoryId (Facebook), or
|
|
3254
|
+
* effectiveInstagramMediaId (Instagram) — those are the post/media the ad's engagement
|
|
3255
|
+
* lives on, and are also returned on each ad's `creative` object. Then call
|
|
3256
|
+
* GET /v1/ads/{adId}/comments with the returned ad id.
|
|
3257
|
+
*
|
|
3240
3258
|
*/
|
|
3241
3259
|
export const listAds = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListAdsData, ThrowOnError>) => {
|
|
3242
3260
|
return (options?.client ?? client).get<ListAdsResponse, ListAdsError, ThrowOnError>({
|
|
@@ -3470,14 +3488,17 @@ export const getAdAnalytics = <ThrowOnError extends boolean = false>(options: Op
|
|
|
3470
3488
|
* regular GET /v1/inbox/comments/{postId} endpoint cannot serve because dark posts are
|
|
3471
3489
|
* not in Zernio's post database.
|
|
3472
3490
|
*
|
|
3473
|
-
*
|
|
3474
|
-
*
|
|
3475
|
-
*
|
|
3476
|
-
*
|
|
3477
|
-
*
|
|
3478
|
-
*
|
|
3479
|
-
*
|
|
3480
|
-
*
|
|
3491
|
+
* An ad that runs on both Facebook feed and Instagram feed has two separate underlying
|
|
3492
|
+
* posts with separate comment threads (the creative's effective_object_story_id and
|
|
3493
|
+
* effective_instagram_media_id). Use the `placement` query param to pick one; with no
|
|
3494
|
+
* param the Instagram side is returned when it exists, otherwise Facebook. The
|
|
3495
|
+
* identifiers are read from the ad record (persisted during sync) with a Marketing-API
|
|
3496
|
+
* fallback for ads that predate the field.
|
|
3497
|
+
*
|
|
3498
|
+
* For Instagram-placed comments, the Instagram account that runs the ad must be connected
|
|
3499
|
+
* to Zernio — those comments are read through that account's token. If no connected
|
|
3500
|
+
* Instagram account on the profile can read the ad's media, the call returns
|
|
3501
|
+
* ads_connection_required (the Facebook side, if any, is still readable via ?placement=facebook).
|
|
3481
3502
|
*
|
|
3482
3503
|
* Meta-only. Other ad platforms (TikTok, LinkedIn, Pinterest, Google, X) do not
|
|
3483
3504
|
* expose a public per-ad comments API and return feature_not_available.
|
|
@@ -216,6 +216,26 @@ export type Ad = {
|
|
|
216
216
|
* Meta creative object_type (e.g. SHARE, VIDEO, PRIVACY_CHECK_FAIL, POST_DELETED). Use this to render state-aware previews — when Meta moderation strips image/video fields, only thumbnailUrl at 64x64 is available.
|
|
217
217
|
*/
|
|
218
218
|
objectType?: string;
|
|
219
|
+
/**
|
|
220
|
+
* Meta creative `object_story_id` (the SHARE reference). Frequently absent — Meta omits it for SHARE creatives. Use effectiveObjectStoryId instead.
|
|
221
|
+
*/
|
|
222
|
+
objectStoryId?: (string) | null;
|
|
223
|
+
/**
|
|
224
|
+
* Meta `effective_object_story_id` — `{pageId}_{postId}` of the Facebook post the ad's engagement (comments) lives on. Pass to GET /v1/ads?effectiveObjectStoryId= to map a Business-Manager-visible post back to this ad; GET /v1/ads/{adId}/comments resolves comments against it.
|
|
225
|
+
*/
|
|
226
|
+
effectiveObjectStoryId?: (string) | null;
|
|
227
|
+
/**
|
|
228
|
+
* Meta `effective_instagram_media_id` — the Instagram media ID of the boosted post the ad's engagement lives on. Pass to GET /v1/ads?effectiveInstagramMediaId= to map a Business-Manager-visible IG post back to this ad.
|
|
229
|
+
*/
|
|
230
|
+
effectiveInstagramMediaId?: (string) | null;
|
|
231
|
+
/**
|
|
232
|
+
* Meta `instagram_user_id` — the Instagram-scoped business ID that owns the boosted media.
|
|
233
|
+
*/
|
|
234
|
+
instagramUserId?: (string) | null;
|
|
235
|
+
/**
|
|
236
|
+
* Meta `instagram_permalink_url` — public Instagram post URL of the boosted media.
|
|
237
|
+
*/
|
|
238
|
+
instagramPermalinkUrl?: (string) | null;
|
|
219
239
|
/**
|
|
220
240
|
* All media URLs for this ad (carousel images, multiple assets). Populated for Meta (carousel child_attachments), Google Ads (responsive display marketing_images), and LinkedIn (multi-image posts).
|
|
221
241
|
*/
|
|
@@ -10392,9 +10412,9 @@ export type ListInboxCommentsData = {
|
|
|
10392
10412
|
*/
|
|
10393
10413
|
minComments?: number;
|
|
10394
10414
|
/**
|
|
10395
|
-
* Filter by platform
|
|
10415
|
+
* Filter by platform. `metaads` is a synthetic value meaning the user's ads (boosted/dark posts) only; `facebook`/`instagram` return organic posts only.
|
|
10396
10416
|
*/
|
|
10397
|
-
platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'threads' | 'youtube' | 'linkedin' | 'reddit';
|
|
10417
|
+
platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'threads' | 'youtube' | 'linkedin' | 'reddit' | 'metaads';
|
|
10398
10418
|
/**
|
|
10399
10419
|
* Filter by profile ID
|
|
10400
10420
|
*/
|
|
@@ -10434,6 +10454,18 @@ export type ListInboxCommentsResponse = ({
|
|
|
10434
10454
|
* Reddit subreddit name
|
|
10435
10455
|
*/
|
|
10436
10456
|
subreddit?: (string) | null;
|
|
10457
|
+
/**
|
|
10458
|
+
* True when this row is an ad (boosted/dark post). `platform` is then the placement (facebook = the Page dark post / instagram = the IG media), `id` is `{adId}:{placement}`, and the thread is at GET /v1/ads/{adId}/comments?placement={placement}.
|
|
10459
|
+
*/
|
|
10460
|
+
isAd?: boolean;
|
|
10461
|
+
/**
|
|
10462
|
+
* Internal Zernio ad id — only on ad rows.
|
|
10463
|
+
*/
|
|
10464
|
+
adId?: string;
|
|
10465
|
+
/**
|
|
10466
|
+
* Which side of the ad this row's comments are on — only on ad rows.
|
|
10467
|
+
*/
|
|
10468
|
+
placement?: 'facebook' | 'instagram';
|
|
10437
10469
|
}>;
|
|
10438
10470
|
pagination?: {
|
|
10439
10471
|
hasMore?: boolean;
|
|
@@ -10574,12 +10606,25 @@ export type GetInboxPostCommentsResponse = ({
|
|
|
10574
10606
|
*/
|
|
10575
10607
|
subreddit?: (string) | null;
|
|
10576
10608
|
lastUpdated?: string;
|
|
10609
|
+
/**
|
|
10610
|
+
* (Facebook/Instagram only) Present when this post has no organic comments but is a boosted post — the engagement lives on the ad. Use the ad-comments endpoint instead.
|
|
10611
|
+
*/
|
|
10612
|
+
adComments?: {
|
|
10613
|
+
/**
|
|
10614
|
+
* Internal Zernio ad ID
|
|
10615
|
+
*/
|
|
10616
|
+
adId?: string;
|
|
10617
|
+
/**
|
|
10618
|
+
* Path to fetch the ad's comments (GET /v1/ads/{adId}/comments)
|
|
10619
|
+
*/
|
|
10620
|
+
adCommentsUrl?: string;
|
|
10621
|
+
} | null;
|
|
10577
10622
|
};
|
|
10578
10623
|
});
|
|
10579
10624
|
|
|
10580
|
-
export type GetInboxPostCommentsError = ({
|
|
10625
|
+
export type GetInboxPostCommentsError = (unknown | {
|
|
10581
10626
|
error?: string;
|
|
10582
|
-
}
|
|
10627
|
+
});
|
|
10583
10628
|
|
|
10584
10629
|
export type ReplyToInboxPostData = {
|
|
10585
10630
|
body: {
|
|
@@ -13556,6 +13601,14 @@ export type ListAdsData = {
|
|
|
13556
13601
|
* Platform campaign ID (filter ads within a campaign)
|
|
13557
13602
|
*/
|
|
13558
13603
|
campaignId?: string;
|
|
13604
|
+
/**
|
|
13605
|
+
* Instagram media ID of the boosted post (Meta `effective_instagram_media_id`). Use to map a Business-Manager-visible IG post back to the Zernio ad.
|
|
13606
|
+
*/
|
|
13607
|
+
effectiveInstagramMediaId?: string;
|
|
13608
|
+
/**
|
|
13609
|
+
* Facebook `{pageId}_{postId}` of the post the ad's engagement lives on (Meta `effective_object_story_id`). Use to map a Business-Manager-visible post back to the Zernio ad.
|
|
13610
|
+
*/
|
|
13611
|
+
effectiveObjectStoryId?: string;
|
|
13559
13612
|
/**
|
|
13560
13613
|
* Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
13561
13614
|
*/
|
|
@@ -13566,6 +13619,10 @@ export type ListAdsData = {
|
|
|
13566
13619
|
*/
|
|
13567
13620
|
page?: number;
|
|
13568
13621
|
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
13622
|
+
/**
|
|
13623
|
+
* Meta ad ID. Returns the ad with this platform-side ad ID.
|
|
13624
|
+
*/
|
|
13625
|
+
platformAdId?: string;
|
|
13569
13626
|
/**
|
|
13570
13627
|
* Profile ID
|
|
13571
13628
|
*/
|
|
@@ -14085,6 +14142,10 @@ export type GetAdCommentsData = {
|
|
|
14085
14142
|
*/
|
|
14086
14143
|
cursor?: string;
|
|
14087
14144
|
limit?: number;
|
|
14145
|
+
/**
|
|
14146
|
+
* Which side of the ad to return comments for. Omit to default to the Instagram side when present, else Facebook. Returns ad_not_commentable if the ad has no such placement.
|
|
14147
|
+
*/
|
|
14148
|
+
placement?: 'facebook' | 'instagram';
|
|
14088
14149
|
};
|
|
14089
14150
|
};
|
|
14090
14151
|
|
|
@@ -14098,7 +14159,14 @@ export type GetAdCommentsResponse = ({
|
|
|
14098
14159
|
cursor?: string;
|
|
14099
14160
|
};
|
|
14100
14161
|
meta: {
|
|
14162
|
+
/**
|
|
14163
|
+
* Which side these comments are on (same as `placement`).
|
|
14164
|
+
*/
|
|
14101
14165
|
platform: 'facebook' | 'instagram';
|
|
14166
|
+
/**
|
|
14167
|
+
* The placement these comments are for — useful when you didn't pass ?placement= and want to know which one you got.
|
|
14168
|
+
*/
|
|
14169
|
+
placement: 'facebook' | 'instagram';
|
|
14102
14170
|
/**
|
|
14103
14171
|
* Internal Zernio ad ID.
|
|
14104
14172
|
*/
|
|
@@ -14108,7 +14176,7 @@ export type GetAdCommentsResponse = ({
|
|
|
14108
14176
|
*/
|
|
14109
14177
|
platformAdId: string;
|
|
14110
14178
|
/**
|
|
14111
|
-
* Underlying post ID the comments belong to. effective_object_story_id for Facebook, effective_instagram_media_id for Instagram.
|
|
14179
|
+
* Underlying post ID the comments belong to. effective_object_story_id for the Facebook side, effective_instagram_media_id for the Instagram side.
|
|
14112
14180
|
*/
|
|
14113
14181
|
effectiveStoryId: string;
|
|
14114
14182
|
/**
|