@zernio/node 0.2.556 → 0.2.558

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
@@ -7227,6 +7227,9 @@ type WebhookPayloadAccountAdsInitialSyncCompleted = {
7227
7227
  */
7228
7228
  errorCategory?: 'token_invalid' | 'permission_denied' | 'no_ad_accounts' | 'rate_limited' | 'discovery_failed' | 'unknown';
7229
7229
  };
7230
+ /**
7231
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7232
+ */
7230
7233
  timestamp: string;
7231
7234
  };
7232
7235
  type event = 'account.ads.initial_sync_completed';
@@ -7271,6 +7274,9 @@ type WebhookPayloadAccountConnected = {
7271
7274
  username: string;
7272
7275
  displayName?: string;
7273
7276
  };
7277
+ /**
7278
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7279
+ */
7274
7280
  timestamp: string;
7275
7281
  };
7276
7282
  type event2 = 'account.connected';
@@ -7304,6 +7310,9 @@ type WebhookPayloadAccountDisconnected = {
7304
7310
  */
7305
7311
  reason: string;
7306
7312
  };
7313
+ /**
7314
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7315
+ */
7307
7316
  timestamp: string;
7308
7317
  };
7309
7318
  type event3 = 'account.disconnected';
@@ -7420,7 +7429,7 @@ type WebhookPayloadAdStatusChanged = {
7420
7429
  message?: string;
7421
7430
  };
7422
7431
  /**
7423
- * ISO-8601 timestamp the webhook was produced.
7432
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7424
7433
  */
7425
7434
  timestamp: string;
7426
7435
  };
@@ -7469,6 +7478,9 @@ type WebhookPayloadCallEnded = {
7469
7478
  };
7470
7479
  };
7471
7480
  account: InboxWebhookAccount;
7481
+ /**
7482
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7483
+ */
7472
7484
  timestamp: string;
7473
7485
  };
7474
7486
  type event5 = 'call.ended';
@@ -7495,6 +7507,9 @@ type WebhookPayloadCallFailed = {
7495
7507
  };
7496
7508
  };
7497
7509
  account: InboxWebhookAccount;
7510
+ /**
7511
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7512
+ */
7498
7513
  timestamp: string;
7499
7514
  };
7500
7515
  type event6 = 'call.failed';
@@ -7524,6 +7539,9 @@ type WebhookPayloadCallPermissionRequest = {
7524
7539
  responseSource?: string;
7525
7540
  };
7526
7541
  account: InboxWebhookAccount;
7542
+ /**
7543
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7544
+ */
7527
7545
  timestamp: string;
7528
7546
  };
7529
7547
  type event7 = 'call.permission_request';
@@ -7572,6 +7590,9 @@ type WebhookPayloadCallReceived = {
7572
7590
  startedAt?: string;
7573
7591
  };
7574
7592
  account: InboxWebhookAccount;
7593
+ /**
7594
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7595
+ */
7575
7596
  timestamp: string;
7576
7597
  };
7577
7598
  type event8 = 'call.received';
@@ -7719,6 +7740,9 @@ type WebhookPayloadComment = {
7719
7740
  platform: string;
7720
7741
  username: string;
7721
7742
  };
7743
+ /**
7744
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7745
+ */
7722
7746
  timestamp: string;
7723
7747
  };
7724
7748
  type event9 = 'comment.received';
@@ -7770,6 +7794,9 @@ type WebhookPayloadConversationStarted = {
7770
7794
  * When the conversation document was created.
7771
7795
  */
7772
7796
  startedAt: string;
7797
+ /**
7798
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7799
+ */
7773
7800
  timestamp: string;
7774
7801
  };
7775
7802
  type event10 = 'conversation.started';
@@ -7798,6 +7825,9 @@ type WebhookPayloadExternalPost = {
7798
7825
  platform: string;
7799
7826
  username: string;
7800
7827
  };
7828
+ /**
7829
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7830
+ */
7801
7831
  timestamp: string;
7802
7832
  };
7803
7833
  type event11 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
@@ -7860,6 +7890,9 @@ type WebhookPayloadLead = {
7860
7890
  accountId?: string;
7861
7891
  platform: 'facebook';
7862
7892
  };
7893
+ /**
7894
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7895
+ */
7863
7896
  timestamp: string;
7864
7897
  };
7865
7898
  type event12 = 'lead.received';
@@ -8222,6 +8255,9 @@ type WebhookPayloadMessage = {
8222
8255
  };
8223
8256
  } | null;
8224
8257
  } | null;
8258
+ /**
8259
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8260
+ */
8225
8261
  timestamp: string;
8226
8262
  };
8227
8263
  type event13 = 'message.received';
@@ -8261,6 +8297,9 @@ type WebhookPayloadMessageDeleted = {
8261
8297
  deletedAt: string;
8262
8298
  conversation: InboxWebhookConversation;
8263
8299
  account: InboxWebhookAccount;
8300
+ /**
8301
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8302
+ */
8264
8303
  timestamp: string;
8265
8304
  };
8266
8305
  type event14 = 'message.deleted';
@@ -8302,6 +8341,9 @@ type WebhookPayloadMessageDeliveryStatus = {
8302
8341
  } | null;
8303
8342
  conversation: InboxWebhookConversation;
8304
8343
  account: InboxWebhookAccount;
8344
+ /**
8345
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8346
+ */
8305
8347
  timestamp: string;
8306
8348
  };
8307
8349
  type event15 = 'message.delivered' | 'message.read' | 'message.failed';
@@ -8332,6 +8374,9 @@ type WebhookPayloadMessageEdited = {
8332
8374
  editedAt: string;
8333
8375
  conversation: InboxWebhookConversation;
8334
8376
  account: InboxWebhookAccount;
8377
+ /**
8378
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8379
+ */
8335
8380
  timestamp: string;
8336
8381
  };
8337
8382
  type event16 = 'message.edited';
@@ -8404,6 +8449,9 @@ type WebhookPayloadMessageSent = {
8404
8449
  };
8405
8450
  conversation: InboxWebhookConversation;
8406
8451
  account: InboxWebhookAccount;
8452
+ /**
8453
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8454
+ */
8407
8455
  timestamp: string;
8408
8456
  };
8409
8457
  type event17 = 'message.sent';
@@ -8444,6 +8492,9 @@ type WebhookPayloadPost = {
8444
8492
  [key: string]: unknown;
8445
8493
  };
8446
8494
  };
8495
+ /**
8496
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8497
+ */
8447
8498
  timestamp: string;
8448
8499
  };
8449
8500
  type event18 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
@@ -8538,6 +8589,9 @@ type WebhookPayloadPostPlatform = {
8538
8589
  username: string;
8539
8590
  displayName?: string;
8540
8591
  };
8592
+ /**
8593
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8594
+ */
8541
8595
  timestamp: string;
8542
8596
  };
8543
8597
  type event19 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
@@ -8591,6 +8645,9 @@ type WebhookPayloadReaction = {
8591
8645
  };
8592
8646
  conversation: InboxWebhookConversation;
8593
8647
  account: InboxWebhookAccount;
8648
+ /**
8649
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8650
+ */
8594
8651
  timestamp: string;
8595
8652
  };
8596
8653
  type event20 = 'reaction.received';
@@ -8614,6 +8671,9 @@ type WebhookPayloadReviewNew = {
8614
8671
  platform: string;
8615
8672
  username: string;
8616
8673
  };
8674
+ /**
8675
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8676
+ */
8617
8677
  timestamp: string;
8618
8678
  };
8619
8679
  type event21 = 'review.new';
@@ -8640,6 +8700,9 @@ type WebhookPayloadReviewUpdated = {
8640
8700
  platform: string;
8641
8701
  username: string;
8642
8702
  };
8703
+ /**
8704
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8705
+ */
8643
8706
  timestamp: string;
8644
8707
  };
8645
8708
  type event22 = 'review.updated';
@@ -8656,6 +8719,9 @@ type WebhookPayloadTest = {
8656
8719
  * Human-readable test message
8657
8720
  */
8658
8721
  message: string;
8722
+ /**
8723
+ * UTC time at which Zernio generated this test event (set once when the payload is built). Test fires are sent synchronously as a single attempt; a later redelivery of this event keeps the original value.
8724
+ */
8659
8725
  timestamp: string;
8660
8726
  };
8661
8727
  type event23 = 'webhook.test';
@@ -8707,7 +8773,7 @@ type WebhookPayloadWhatsAppTemplateStatusUpdated = {
8707
8773
  reason: string;
8708
8774
  };
8709
8775
  /**
8710
- * ISO-8601 timestamp the webhook was produced.
8776
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8711
8777
  */
8712
8778
  timestamp: string;
8713
8779
  };
@@ -18659,7 +18725,7 @@ type GetInboxPostCommentsResponse = ({
18659
18725
  */
18660
18726
  cid?: (string) | null;
18661
18727
  /**
18662
- * Parent comment ID for nested replies
18728
+ * ID of the parent comment. Present on entries inside replies[] for Facebook, Instagram and X/Twitter. On X/Twitter it is also present on top-level entries, where it holds the ID of the post replied to. Omitted entirely (key absent, not null) on top-level Facebook and Instagram entries and on every other platform, which express the parent relationship only through replies[] nesting.
18663
18729
  */
18664
18730
  parentId?: (string) | null;
18665
18731
  /**
@@ -29374,6 +29440,12 @@ type BoostPostData = {
29374
29440
  */
29375
29441
  optimizationGoal?: string;
29376
29442
  };
29443
+ headers?: {
29444
+ /**
29445
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
29446
+ */
29447
+ 'Idempotency-Key'?: string;
29448
+ };
29377
29449
  };
29378
29450
  type BoostPostResponse = ({
29379
29451
  ad?: Ad;
package/dist/index.d.ts CHANGED
@@ -7227,6 +7227,9 @@ type WebhookPayloadAccountAdsInitialSyncCompleted = {
7227
7227
  */
7228
7228
  errorCategory?: 'token_invalid' | 'permission_denied' | 'no_ad_accounts' | 'rate_limited' | 'discovery_failed' | 'unknown';
7229
7229
  };
7230
+ /**
7231
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7232
+ */
7230
7233
  timestamp: string;
7231
7234
  };
7232
7235
  type event = 'account.ads.initial_sync_completed';
@@ -7271,6 +7274,9 @@ type WebhookPayloadAccountConnected = {
7271
7274
  username: string;
7272
7275
  displayName?: string;
7273
7276
  };
7277
+ /**
7278
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7279
+ */
7274
7280
  timestamp: string;
7275
7281
  };
7276
7282
  type event2 = 'account.connected';
@@ -7304,6 +7310,9 @@ type WebhookPayloadAccountDisconnected = {
7304
7310
  */
7305
7311
  reason: string;
7306
7312
  };
7313
+ /**
7314
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7315
+ */
7307
7316
  timestamp: string;
7308
7317
  };
7309
7318
  type event3 = 'account.disconnected';
@@ -7420,7 +7429,7 @@ type WebhookPayloadAdStatusChanged = {
7420
7429
  message?: string;
7421
7430
  };
7422
7431
  /**
7423
- * ISO-8601 timestamp the webhook was produced.
7432
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7424
7433
  */
7425
7434
  timestamp: string;
7426
7435
  };
@@ -7469,6 +7478,9 @@ type WebhookPayloadCallEnded = {
7469
7478
  };
7470
7479
  };
7471
7480
  account: InboxWebhookAccount;
7481
+ /**
7482
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7483
+ */
7472
7484
  timestamp: string;
7473
7485
  };
7474
7486
  type event5 = 'call.ended';
@@ -7495,6 +7507,9 @@ type WebhookPayloadCallFailed = {
7495
7507
  };
7496
7508
  };
7497
7509
  account: InboxWebhookAccount;
7510
+ /**
7511
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7512
+ */
7498
7513
  timestamp: string;
7499
7514
  };
7500
7515
  type event6 = 'call.failed';
@@ -7524,6 +7539,9 @@ type WebhookPayloadCallPermissionRequest = {
7524
7539
  responseSource?: string;
7525
7540
  };
7526
7541
  account: InboxWebhookAccount;
7542
+ /**
7543
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7544
+ */
7527
7545
  timestamp: string;
7528
7546
  };
7529
7547
  type event7 = 'call.permission_request';
@@ -7572,6 +7590,9 @@ type WebhookPayloadCallReceived = {
7572
7590
  startedAt?: string;
7573
7591
  };
7574
7592
  account: InboxWebhookAccount;
7593
+ /**
7594
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7595
+ */
7575
7596
  timestamp: string;
7576
7597
  };
7577
7598
  type event8 = 'call.received';
@@ -7719,6 +7740,9 @@ type WebhookPayloadComment = {
7719
7740
  platform: string;
7720
7741
  username: string;
7721
7742
  };
7743
+ /**
7744
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7745
+ */
7722
7746
  timestamp: string;
7723
7747
  };
7724
7748
  type event9 = 'comment.received';
@@ -7770,6 +7794,9 @@ type WebhookPayloadConversationStarted = {
7770
7794
  * When the conversation document was created.
7771
7795
  */
7772
7796
  startedAt: string;
7797
+ /**
7798
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7799
+ */
7773
7800
  timestamp: string;
7774
7801
  };
7775
7802
  type event10 = 'conversation.started';
@@ -7798,6 +7825,9 @@ type WebhookPayloadExternalPost = {
7798
7825
  platform: string;
7799
7826
  username: string;
7800
7827
  };
7828
+ /**
7829
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7830
+ */
7801
7831
  timestamp: string;
7802
7832
  };
7803
7833
  type event11 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
@@ -7860,6 +7890,9 @@ type WebhookPayloadLead = {
7860
7890
  accountId?: string;
7861
7891
  platform: 'facebook';
7862
7892
  };
7893
+ /**
7894
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7895
+ */
7863
7896
  timestamp: string;
7864
7897
  };
7865
7898
  type event12 = 'lead.received';
@@ -8222,6 +8255,9 @@ type WebhookPayloadMessage = {
8222
8255
  };
8223
8256
  } | null;
8224
8257
  } | null;
8258
+ /**
8259
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8260
+ */
8225
8261
  timestamp: string;
8226
8262
  };
8227
8263
  type event13 = 'message.received';
@@ -8261,6 +8297,9 @@ type WebhookPayloadMessageDeleted = {
8261
8297
  deletedAt: string;
8262
8298
  conversation: InboxWebhookConversation;
8263
8299
  account: InboxWebhookAccount;
8300
+ /**
8301
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8302
+ */
8264
8303
  timestamp: string;
8265
8304
  };
8266
8305
  type event14 = 'message.deleted';
@@ -8302,6 +8341,9 @@ type WebhookPayloadMessageDeliveryStatus = {
8302
8341
  } | null;
8303
8342
  conversation: InboxWebhookConversation;
8304
8343
  account: InboxWebhookAccount;
8344
+ /**
8345
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8346
+ */
8305
8347
  timestamp: string;
8306
8348
  };
8307
8349
  type event15 = 'message.delivered' | 'message.read' | 'message.failed';
@@ -8332,6 +8374,9 @@ type WebhookPayloadMessageEdited = {
8332
8374
  editedAt: string;
8333
8375
  conversation: InboxWebhookConversation;
8334
8376
  account: InboxWebhookAccount;
8377
+ /**
8378
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8379
+ */
8335
8380
  timestamp: string;
8336
8381
  };
8337
8382
  type event16 = 'message.edited';
@@ -8404,6 +8449,9 @@ type WebhookPayloadMessageSent = {
8404
8449
  };
8405
8450
  conversation: InboxWebhookConversation;
8406
8451
  account: InboxWebhookAccount;
8452
+ /**
8453
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8454
+ */
8407
8455
  timestamp: string;
8408
8456
  };
8409
8457
  type event17 = 'message.sent';
@@ -8444,6 +8492,9 @@ type WebhookPayloadPost = {
8444
8492
  [key: string]: unknown;
8445
8493
  };
8446
8494
  };
8495
+ /**
8496
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8497
+ */
8447
8498
  timestamp: string;
8448
8499
  };
8449
8500
  type event18 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
@@ -8538,6 +8589,9 @@ type WebhookPayloadPostPlatform = {
8538
8589
  username: string;
8539
8590
  displayName?: string;
8540
8591
  };
8592
+ /**
8593
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8594
+ */
8541
8595
  timestamp: string;
8542
8596
  };
8543
8597
  type event19 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
@@ -8591,6 +8645,9 @@ type WebhookPayloadReaction = {
8591
8645
  };
8592
8646
  conversation: InboxWebhookConversation;
8593
8647
  account: InboxWebhookAccount;
8648
+ /**
8649
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8650
+ */
8594
8651
  timestamp: string;
8595
8652
  };
8596
8653
  type event20 = 'reaction.received';
@@ -8614,6 +8671,9 @@ type WebhookPayloadReviewNew = {
8614
8671
  platform: string;
8615
8672
  username: string;
8616
8673
  };
8674
+ /**
8675
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8676
+ */
8617
8677
  timestamp: string;
8618
8678
  };
8619
8679
  type event21 = 'review.new';
@@ -8640,6 +8700,9 @@ type WebhookPayloadReviewUpdated = {
8640
8700
  platform: string;
8641
8701
  username: string;
8642
8702
  };
8703
+ /**
8704
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8705
+ */
8643
8706
  timestamp: string;
8644
8707
  };
8645
8708
  type event22 = 'review.updated';
@@ -8656,6 +8719,9 @@ type WebhookPayloadTest = {
8656
8719
  * Human-readable test message
8657
8720
  */
8658
8721
  message: string;
8722
+ /**
8723
+ * UTC time at which Zernio generated this test event (set once when the payload is built). Test fires are sent synchronously as a single attempt; a later redelivery of this event keeps the original value.
8724
+ */
8659
8725
  timestamp: string;
8660
8726
  };
8661
8727
  type event23 = 'webhook.test';
@@ -8707,7 +8773,7 @@ type WebhookPayloadWhatsAppTemplateStatusUpdated = {
8707
8773
  reason: string;
8708
8774
  };
8709
8775
  /**
8710
- * ISO-8601 timestamp the webhook was produced.
8776
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8711
8777
  */
8712
8778
  timestamp: string;
8713
8779
  };
@@ -18659,7 +18725,7 @@ type GetInboxPostCommentsResponse = ({
18659
18725
  */
18660
18726
  cid?: (string) | null;
18661
18727
  /**
18662
- * Parent comment ID for nested replies
18728
+ * ID of the parent comment. Present on entries inside replies[] for Facebook, Instagram and X/Twitter. On X/Twitter it is also present on top-level entries, where it holds the ID of the post replied to. Omitted entirely (key absent, not null) on top-level Facebook and Instagram entries and on every other platform, which express the parent relationship only through replies[] nesting.
18663
18729
  */
18664
18730
  parentId?: (string) | null;
18665
18731
  /**
@@ -29374,6 +29440,12 @@ type BoostPostData = {
29374
29440
  */
29375
29441
  optimizationGoal?: string;
29376
29442
  };
29443
+ headers?: {
29444
+ /**
29445
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
29446
+ */
29447
+ 'Idempotency-Key'?: string;
29448
+ };
29377
29449
  };
29378
29450
  type BoostPostResponse = ({
29379
29451
  ad?: Ad;
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: "@zernio/node",
39
- version: "0.2.556",
39
+ version: "0.2.558",
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: "@zernio/node",
8
- version: "0.2.556",
8
+ version: "0.2.558",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.556",
3
+ "version": "0.2.558",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -8098,6 +8098,16 @@ export const getDsaRecommendations = <ThrowOnError extends boolean = false>(opti
8098
8098
  * `instagramAccountId`, `destinationType` and `adSetId` are Meta-only and
8099
8099
  * return 400 on other platforms.
8100
8100
  *
8101
+ * **Retries.** Boosts are NOT idempotent and can take minutes when Meta requires re-hosting an
8102
+ * Instagram video, so do not retry on client timeout. Send an
8103
+ * Idempotency-Key header to make retries safe: same key and body replays
8104
+ * the original 201, and distinct keys always create distinct ads.
8105
+ * Without the header, an identical request is treated as a retry: while
8106
+ * one is in flight it returns 409, and within 10 minutes of a completed
8107
+ * boost it returns the already-created ad instead of creating another.
8108
+ * To intentionally duplicate an ad, send distinct Idempotency-Keys (or
8109
+ * vary the body, e.g. the name).
8110
+ *
8101
8111
  */
8102
8112
  export const boostPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BoostPostData, ThrowOnError>) => {
8103
8113
  return (options?.client ?? client).post<BoostPostResponse, BoostPostError, ThrowOnError>({
@@ -6180,6 +6180,9 @@ export type WebhookPayloadAccountAdsInitialSyncCompleted = {
6180
6180
  */
6181
6181
  errorCategory?: 'token_invalid' | 'permission_denied' | 'no_ad_accounts' | 'rate_limited' | 'discovery_failed' | 'unknown';
6182
6182
  };
6183
+ /**
6184
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6185
+ */
6183
6186
  timestamp: string;
6184
6187
  };
6185
6188
 
@@ -6228,6 +6231,9 @@ export type WebhookPayloadAccountConnected = {
6228
6231
  username: string;
6229
6232
  displayName?: string;
6230
6233
  };
6234
+ /**
6235
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6236
+ */
6231
6237
  timestamp: string;
6232
6238
  };
6233
6239
 
@@ -6263,6 +6269,9 @@ export type WebhookPayloadAccountDisconnected = {
6263
6269
  */
6264
6270
  reason: string;
6265
6271
  };
6272
+ /**
6273
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6274
+ */
6266
6275
  timestamp: string;
6267
6276
  };
6268
6277
 
@@ -6382,7 +6391,7 @@ export type WebhookPayloadAdStatusChanged = {
6382
6391
  message?: string;
6383
6392
  };
6384
6393
  /**
6385
- * ISO-8601 timestamp the webhook was produced.
6394
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6386
6395
  */
6387
6396
  timestamp: string;
6388
6397
  };
@@ -6434,6 +6443,9 @@ export type WebhookPayloadCallEnded = {
6434
6443
  };
6435
6444
  };
6436
6445
  account: InboxWebhookAccount;
6446
+ /**
6447
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6448
+ */
6437
6449
  timestamp: string;
6438
6450
  };
6439
6451
 
@@ -6462,6 +6474,9 @@ export type WebhookPayloadCallFailed = {
6462
6474
  };
6463
6475
  };
6464
6476
  account: InboxWebhookAccount;
6477
+ /**
6478
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6479
+ */
6465
6480
  timestamp: string;
6466
6481
  };
6467
6482
 
@@ -6493,6 +6508,9 @@ export type WebhookPayloadCallPermissionRequest = {
6493
6508
  responseSource?: string;
6494
6509
  };
6495
6510
  account: InboxWebhookAccount;
6511
+ /**
6512
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6513
+ */
6496
6514
  timestamp: string;
6497
6515
  };
6498
6516
 
@@ -6544,6 +6562,9 @@ export type WebhookPayloadCallReceived = {
6544
6562
  startedAt?: string;
6545
6563
  };
6546
6564
  account: InboxWebhookAccount;
6565
+ /**
6566
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6567
+ */
6547
6568
  timestamp: string;
6548
6569
  };
6549
6570
 
@@ -6693,6 +6714,9 @@ export type WebhookPayloadComment = {
6693
6714
  platform: string;
6694
6715
  username: string;
6695
6716
  };
6717
+ /**
6718
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6719
+ */
6696
6720
  timestamp: string;
6697
6721
  };
6698
6722
 
@@ -6747,6 +6771,9 @@ export type WebhookPayloadConversationStarted = {
6747
6771
  * When the conversation document was created.
6748
6772
  */
6749
6773
  startedAt: string;
6774
+ /**
6775
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6776
+ */
6750
6777
  timestamp: string;
6751
6778
  };
6752
6779
 
@@ -6778,6 +6805,9 @@ export type WebhookPayloadExternalPost = {
6778
6805
  platform: string;
6779
6806
  username: string;
6780
6807
  };
6808
+ /**
6809
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6810
+ */
6781
6811
  timestamp: string;
6782
6812
  };
6783
6813
 
@@ -6842,6 +6872,9 @@ export type WebhookPayloadLead = {
6842
6872
  accountId?: string;
6843
6873
  platform: 'facebook';
6844
6874
  };
6875
+ /**
6876
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
6877
+ */
6845
6878
  timestamp: string;
6846
6879
  };
6847
6880
 
@@ -7207,6 +7240,9 @@ export type WebhookPayloadMessage = {
7207
7240
  };
7208
7241
  } | null;
7209
7242
  } | null;
7243
+ /**
7244
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7245
+ */
7210
7246
  timestamp: string;
7211
7247
  };
7212
7248
 
@@ -7250,6 +7286,9 @@ export type WebhookPayloadMessageDeleted = {
7250
7286
  deletedAt: string;
7251
7287
  conversation: InboxWebhookConversation;
7252
7288
  account: InboxWebhookAccount;
7289
+ /**
7290
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7291
+ */
7253
7292
  timestamp: string;
7254
7293
  };
7255
7294
 
@@ -7293,6 +7332,9 @@ export type WebhookPayloadMessageDeliveryStatus = {
7293
7332
  } | null;
7294
7333
  conversation: InboxWebhookConversation;
7295
7334
  account: InboxWebhookAccount;
7335
+ /**
7336
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7337
+ */
7296
7338
  timestamp: string;
7297
7339
  };
7298
7340
 
@@ -7325,6 +7367,9 @@ export type WebhookPayloadMessageEdited = {
7325
7367
  editedAt: string;
7326
7368
  conversation: InboxWebhookConversation;
7327
7369
  account: InboxWebhookAccount;
7370
+ /**
7371
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7372
+ */
7328
7373
  timestamp: string;
7329
7374
  };
7330
7375
 
@@ -7399,6 +7444,9 @@ export type WebhookPayloadMessageSent = {
7399
7444
  };
7400
7445
  conversation: InboxWebhookConversation;
7401
7446
  account: InboxWebhookAccount;
7447
+ /**
7448
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7449
+ */
7402
7450
  timestamp: string;
7403
7451
  };
7404
7452
 
@@ -7442,6 +7490,9 @@ export type WebhookPayloadPost = {
7442
7490
  [key: string]: unknown;
7443
7491
  };
7444
7492
  };
7493
+ /**
7494
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7495
+ */
7445
7496
  timestamp: string;
7446
7497
  };
7447
7498
 
@@ -7538,6 +7589,9 @@ export type WebhookPayloadPostPlatform = {
7538
7589
  username: string;
7539
7590
  displayName?: string;
7540
7591
  };
7592
+ /**
7593
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7594
+ */
7541
7595
  timestamp: string;
7542
7596
  };
7543
7597
 
@@ -7594,6 +7648,9 @@ export type WebhookPayloadReaction = {
7594
7648
  };
7595
7649
  conversation: InboxWebhookConversation;
7596
7650
  account: InboxWebhookAccount;
7651
+ /**
7652
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7653
+ */
7597
7654
  timestamp: string;
7598
7655
  };
7599
7656
 
@@ -7620,6 +7677,9 @@ export type WebhookPayloadReviewNew = {
7620
7677
  platform: string;
7621
7678
  username: string;
7622
7679
  };
7680
+ /**
7681
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7682
+ */
7623
7683
  timestamp: string;
7624
7684
  };
7625
7685
 
@@ -7648,6 +7708,9 @@ export type WebhookPayloadReviewUpdated = {
7648
7708
  platform: string;
7649
7709
  username: string;
7650
7710
  };
7711
+ /**
7712
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7713
+ */
7651
7714
  timestamp: string;
7652
7715
  };
7653
7716
 
@@ -7666,6 +7729,9 @@ export type WebhookPayloadTest = {
7666
7729
  * Human-readable test message
7667
7730
  */
7668
7731
  message: string;
7732
+ /**
7733
+ * UTC time at which Zernio generated this test event (set once when the payload is built). Test fires are sent synchronously as a single attempt; a later redelivery of this event keeps the original value.
7734
+ */
7669
7735
  timestamp: string;
7670
7736
  };
7671
7737
 
@@ -7719,7 +7785,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
7719
7785
  reason: string;
7720
7786
  };
7721
7787
  /**
7722
- * ISO-8601 timestamp the webhook was produced.
7788
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7723
7789
  */
7724
7790
  timestamp: string;
7725
7791
  };
@@ -18359,7 +18425,7 @@ export type GetInboxPostCommentsResponse = ({
18359
18425
  */
18360
18426
  cid?: (string) | null;
18361
18427
  /**
18362
- * Parent comment ID for nested replies
18428
+ * ID of the parent comment. Present on entries inside replies[] for Facebook, Instagram and X/Twitter. On X/Twitter it is also present on top-level entries, where it holds the ID of the post replied to. Omitted entirely (key absent, not null) on top-level Facebook and Instagram entries and on every other platform, which express the parent relationship only through replies[] nesting.
18363
18429
  */
18364
18430
  parentId?: (string) | null;
18365
18431
  /**
@@ -29907,6 +29973,12 @@ export type BoostPostData = {
29907
29973
  */
29908
29974
  optimizationGoal?: string;
29909
29975
  };
29976
+ headers?: {
29977
+ /**
29978
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
29979
+ */
29980
+ 'Idempotency-Key'?: string;
29981
+ };
29910
29982
  };
29911
29983
 
29912
29984
  export type BoostPostResponse = ({