@zernio/node 0.2.120 → 0.2.122

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 CHANGED
@@ -3786,6 +3786,32 @@ type WebhookPayloadMessage = {
3786
3786
  flowResponseData?: {
3787
3787
  [key: string]: unknown;
3788
3788
  };
3789
+ /**
3790
+ * Instagram only. Populated when an IG user replies to one of the
3791
+ * account's stories (Meta `messaging_story_replies`). Mutually
3792
+ * exclusive in practice with `isStoryMention`.
3793
+ *
3794
+ */
3795
+ storyReply?: {
3796
+ /**
3797
+ * The Instagram story ID the user replied to.
3798
+ */
3799
+ storyId: string;
3800
+ /**
3801
+ * Meta CDN URL for the story media. Expires approximately
3802
+ * 24 hours after the story posted; consumers must fetch
3803
+ * promptly or treat 404s as expected.
3804
+ *
3805
+ */
3806
+ storyUrl?: string;
3807
+ };
3808
+ /**
3809
+ * Instagram only. True when the message was generated by an IG
3810
+ * user mentioning the account in their own story (`story_mention`
3811
+ * attachment type). Mutually exclusive in practice with `storyReply`.
3812
+ *
3813
+ */
3814
+ isStoryMention?: boolean;
3789
3815
  /**
3790
3816
  * WhatsApp only. Click-to-WhatsApp (CTWA) ad attribution. Present
3791
3817
  * only on the FIRST inbound message after a user reaches the
@@ -8941,7 +8967,7 @@ type CreateWebhookSettingsData = {
8941
8967
  /**
8942
8968
  * Events to subscribe to (at least one required)
8943
8969
  */
8944
- events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
8970
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'comment.received' | 'review.new' | 'review.updated')>;
8945
8971
  /**
8946
8972
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
8947
8973
  */
@@ -8982,7 +9008,7 @@ type UpdateWebhookSettingsData = {
8982
9008
  /**
8983
9009
  * Events to subscribe to. Must contain at least one event if provided.
8984
9010
  */
8985
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
9011
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'comment.received' | 'review.new' | 'review.updated')>;
8986
9012
  /**
8987
9013
  * Enable or disable webhook delivery
8988
9014
  */
@@ -12985,7 +13011,7 @@ type ListAdsData = {
12985
13011
  */
12986
13012
  campaignId?: string;
12987
13013
  /**
12988
- * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago. Ranges older than 90 days trigger an on-demand platform fetch when scoped to a specific accountId.
13014
+ * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
12989
13015
  */
12990
13016
  fromDate?: string;
12991
13017
  limit?: number;
@@ -13293,7 +13319,7 @@ type GetAdTreeData = {
13293
13319
  */
13294
13320
  adAccountId?: string;
13295
13321
  /**
13296
- * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago. Ranges older than 90 days trigger an on-demand platform fetch when scoped to a specific accountId.
13322
+ * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
13297
13323
  */
13298
13324
  fromDate?: string;
13299
13325
  /**
@@ -13427,7 +13453,7 @@ type GetAdAnalyticsData = {
13427
13453
  */
13428
13454
  breakdowns?: string;
13429
13455
  /**
13430
- * Start of date range (YYYY-MM-DD). Defaults to 90 days ago. Ranges older than 90 days trigger an on-demand platform fetch.
13456
+ * Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
13431
13457
  */
13432
13458
  fromDate?: string;
13433
13459
  /**
package/dist/index.d.ts CHANGED
@@ -3786,6 +3786,32 @@ type WebhookPayloadMessage = {
3786
3786
  flowResponseData?: {
3787
3787
  [key: string]: unknown;
3788
3788
  };
3789
+ /**
3790
+ * Instagram only. Populated when an IG user replies to one of the
3791
+ * account's stories (Meta `messaging_story_replies`). Mutually
3792
+ * exclusive in practice with `isStoryMention`.
3793
+ *
3794
+ */
3795
+ storyReply?: {
3796
+ /**
3797
+ * The Instagram story ID the user replied to.
3798
+ */
3799
+ storyId: string;
3800
+ /**
3801
+ * Meta CDN URL for the story media. Expires approximately
3802
+ * 24 hours after the story posted; consumers must fetch
3803
+ * promptly or treat 404s as expected.
3804
+ *
3805
+ */
3806
+ storyUrl?: string;
3807
+ };
3808
+ /**
3809
+ * Instagram only. True when the message was generated by an IG
3810
+ * user mentioning the account in their own story (`story_mention`
3811
+ * attachment type). Mutually exclusive in practice with `storyReply`.
3812
+ *
3813
+ */
3814
+ isStoryMention?: boolean;
3789
3815
  /**
3790
3816
  * WhatsApp only. Click-to-WhatsApp (CTWA) ad attribution. Present
3791
3817
  * only on the FIRST inbound message after a user reaches the
@@ -8941,7 +8967,7 @@ type CreateWebhookSettingsData = {
8941
8967
  /**
8942
8968
  * Events to subscribe to (at least one required)
8943
8969
  */
8944
- events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
8970
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'comment.received' | 'review.new' | 'review.updated')>;
8945
8971
  /**
8946
8972
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
8947
8973
  */
@@ -8982,7 +9008,7 @@ type UpdateWebhookSettingsData = {
8982
9008
  /**
8983
9009
  * Events to subscribe to. Must contain at least one event if provided.
8984
9010
  */
8985
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
9011
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'comment.received' | 'review.new' | 'review.updated')>;
8986
9012
  /**
8987
9013
  * Enable or disable webhook delivery
8988
9014
  */
@@ -12985,7 +13011,7 @@ type ListAdsData = {
12985
13011
  */
12986
13012
  campaignId?: string;
12987
13013
  /**
12988
- * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago. Ranges older than 90 days trigger an on-demand platform fetch when scoped to a specific accountId.
13014
+ * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
12989
13015
  */
12990
13016
  fromDate?: string;
12991
13017
  limit?: number;
@@ -13293,7 +13319,7 @@ type GetAdTreeData = {
13293
13319
  */
13294
13320
  adAccountId?: string;
13295
13321
  /**
13296
- * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago. Ranges older than 90 days trigger an on-demand platform fetch when scoped to a specific accountId.
13322
+ * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
13297
13323
  */
13298
13324
  fromDate?: string;
13299
13325
  /**
@@ -13427,7 +13453,7 @@ type GetAdAnalyticsData = {
13427
13453
  */
13428
13454
  breakdowns?: string;
13429
13455
  /**
13430
- * Start of date range (YYYY-MM-DD). Defaults to 90 days ago. Ranges older than 90 days trigger an on-demand platform fetch.
13456
+ * Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
13431
13457
  */
13432
13458
  fromDate?: string;
13433
13459
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.120",
3
+ "version": "0.2.122",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -3229,7 +3229,6 @@ export const listCommentAutomationLogs = <ThrowOnError extends boolean = false>(
3229
3229
  * Returns a paginated list of ads with metrics computed over an optional date range.
3230
3230
  * Use source=all to include externally-synced ads from platform ad managers.
3231
3231
  * If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.
3232
- * Ranges older than 90 days trigger a one-time on-demand fetch from the platform when scoped to a specific accountId, then serve from cache on subsequent requests.
3233
3232
  *
3234
3233
  */
3235
3234
  export const listAds = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListAdsData, ThrowOnError>) => {
@@ -3392,7 +3391,6 @@ export const updateAdSetStatus = <ThrowOnError extends boolean = false>(options:
3392
3391
  * and campaign levels. Pagination is at the campaign level. Ads without a campaign or ad set
3393
3392
  * ID are grouped into synthetic "Ungrouped" buckets.
3394
3393
  * If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.
3395
- * Ranges older than 90 days trigger a one-time on-demand fetch from the platform when scoped to a specific accountId, then serve from cache on subsequent requests.
3396
3394
  *
3397
3395
  */
3398
3396
  export const getAdTree = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAdTreeData, ThrowOnError>) => {
@@ -3449,7 +3447,6 @@ export const deleteAd = <ThrowOnError extends boolean = false>(options: OptionsL
3449
3447
  * Returns detailed performance analytics for an ad. Includes summary metrics, a daily timeline
3450
3448
  * over the requested date range, and optional demographic breakdowns (Meta and TikTok only).
3451
3449
  * If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.
3452
- * Ranges older than 90 days trigger a one-time on-demand fetch from the platform, then serve from cache on subsequent requests.
3453
3450
  *
3454
3451
  */
3455
3452
  export const getAdAnalytics = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAdAnalyticsData, ThrowOnError>) => {
@@ -3322,6 +3322,32 @@ export type WebhookPayloadMessage = {
3322
3322
  flowResponseData?: {
3323
3323
  [key: string]: unknown;
3324
3324
  };
3325
+ /**
3326
+ * Instagram only. Populated when an IG user replies to one of the
3327
+ * account's stories (Meta `messaging_story_replies`). Mutually
3328
+ * exclusive in practice with `isStoryMention`.
3329
+ *
3330
+ */
3331
+ storyReply?: {
3332
+ /**
3333
+ * The Instagram story ID the user replied to.
3334
+ */
3335
+ storyId: string;
3336
+ /**
3337
+ * Meta CDN URL for the story media. Expires approximately
3338
+ * 24 hours after the story posted; consumers must fetch
3339
+ * promptly or treat 404s as expected.
3340
+ *
3341
+ */
3342
+ storyUrl?: string;
3343
+ };
3344
+ /**
3345
+ * Instagram only. True when the message was generated by an IG
3346
+ * user mentioning the account in their own story (`story_mention`
3347
+ * attachment type). Mutually exclusive in practice with `storyReply`.
3348
+ *
3349
+ */
3350
+ isStoryMention?: boolean;
3325
3351
  /**
3326
3352
  * WhatsApp only. Click-to-WhatsApp (CTWA) ad attribution. Present
3327
3353
  * only on the FIRST inbound message after a user reaches the
@@ -8878,7 +8904,7 @@ export type CreateWebhookSettingsData = {
8878
8904
  /**
8879
8905
  * Events to subscribe to (at least one required)
8880
8906
  */
8881
- events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
8907
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'comment.received' | 'review.new' | 'review.updated')>;
8882
8908
  /**
8883
8909
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
8884
8910
  */
@@ -8922,7 +8948,7 @@ export type UpdateWebhookSettingsData = {
8922
8948
  /**
8923
8949
  * Events to subscribe to. Must contain at least one event if provided.
8924
8950
  */
8925
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
8951
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'comment.received' | 'review.new' | 'review.updated')>;
8926
8952
  /**
8927
8953
  * Enable or disable webhook delivery
8928
8954
  */
@@ -13276,7 +13302,7 @@ export type ListAdsData = {
13276
13302
  */
13277
13303
  campaignId?: string;
13278
13304
  /**
13279
- * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago. Ranges older than 90 days trigger an on-demand platform fetch when scoped to a specific accountId.
13305
+ * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
13280
13306
  */
13281
13307
  fromDate?: string;
13282
13308
  limit?: number;
@@ -13611,7 +13637,7 @@ export type GetAdTreeData = {
13611
13637
  */
13612
13638
  adAccountId?: string;
13613
13639
  /**
13614
- * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago. Ranges older than 90 days trigger an on-demand platform fetch when scoped to a specific accountId.
13640
+ * Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
13615
13641
  */
13616
13642
  fromDate?: string;
13617
13643
  /**
@@ -13757,7 +13783,7 @@ export type GetAdAnalyticsData = {
13757
13783
  */
13758
13784
  breakdowns?: string;
13759
13785
  /**
13760
- * Start of date range (YYYY-MM-DD). Defaults to 90 days ago. Ranges older than 90 days trigger an on-demand platform fetch.
13786
+ * Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
13761
13787
  */
13762
13788
  fromDate?: string;
13763
13789
  /**