@zernio/node 0.2.1023 → 0.2.1025

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.1023",
3
+ "version": "0.2.1025",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -11652,6 +11652,12 @@ export type disconnectionType = 'intentional' | 'unintentional';
11652
11652
  * `status.raw` is `WITH_ISSUES` and the `error` block is populated
11653
11653
  * from Meta's `error_code` / `error_summary` / `error_message`.
11654
11654
  *
11655
+ * Review outcomes (an ad leaving `PENDING_REVIEW` for `ACTIVE`,
11656
+ * `DISAPPROVED` and so on) are also emitted from Zernio's own ad sync,
11657
+ * so they arrive even when Meta skips the webhook. `status.raw` is Meta's
11658
+ * `effective_status`. An ad-level outcome is delivered once per status:
11659
+ * whichever source sees it first sends it.
11660
+ *
11655
11661
  */
11656
11662
  export type WebhookPayloadAdStatusChanged = {
11657
11663
  /**
@@ -13052,6 +13058,8 @@ export type WebhookPayloadMessageDeliveryStatus = {
13052
13058
  */
13053
13059
  explanation?: (string) | null;
13054
13060
  } | null;
13061
+ pricing?: WhatsAppMessagePricing;
13062
+ billingConversation?: WhatsAppBillingConversation;
13055
13063
  conversation: InboxWebhookConversation;
13056
13064
  account: InboxWebhookAccount;
13057
13065
  /**
@@ -13221,6 +13229,8 @@ export type WebhookPayloadMessageSent = {
13221
13229
  */
13222
13230
  sentVia?: ('human' | 'api' | 'broadcast' | 'sequence' | 'workflow' | 'comment_automation' | 'bulk-api') | null;
13223
13231
  };
13232
+ pricing?: WhatsAppMessagePricing;
13233
+ billingConversation?: WhatsAppBillingConversation;
13224
13234
  conversation: InboxWebhookConversation;
13225
13235
  account: InboxWebhookAccount;
13226
13236
  /**
@@ -13959,6 +13969,27 @@ export type event33 = 'whatsapp.template.status_updated';
13959
13969
  */
13960
13970
  export type status34 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
13961
13971
 
13972
+ /**
13973
+ * WhatsApp only. Meta's `conversation` object from the status webhook (the billing
13974
+ * window, not the Zernio inbox `conversation`). Same presence rules as `pricing`;
13975
+ * from Graph API v24 Meta sends it only inside an open free entry point window.
13976
+ *
13977
+ */
13978
+ export type WhatsAppBillingConversation = {
13979
+ /**
13980
+ * Meta's conversation id.
13981
+ */
13982
+ id: (string) | null;
13983
+ /**
13984
+ * When the window expires. Meta sends it only on the `sent` status.
13985
+ */
13986
+ expiresAt: (string) | null;
13987
+ /**
13988
+ * Meta `origin.type`, for example `marketing`, `utility`, `service`, `referral_conversion`.
13989
+ */
13990
+ originType: (string) | null;
13991
+ } | null;
13992
+
13962
13993
  export type WhatsAppBodyComponent = {
13963
13994
  type: 'body';
13964
13995
  /**
@@ -14059,6 +14090,33 @@ export type WhatsAppLimitedTimeOfferComponent = {
14059
14090
  };
14060
14091
  };
14061
14092
 
14093
+ /**
14094
+ * WhatsApp only. Meta's `pricing` object from the status webhook, camelCased.
14095
+ * Present (possibly null) on every WhatsApp `message.sent`, `message.delivered`,
14096
+ * `message.read` and `message.failed`; absent on other platforms. Meta includes it
14097
+ * on `sent` and on one of `delivered` or `read`, so it is null on the others and
14098
+ * usually on `failed`.
14099
+ *
14100
+ */
14101
+ export type WhatsAppMessagePricing = {
14102
+ /**
14103
+ * Whether Meta bills this message. Meta has announced it will deprecate this field.
14104
+ */
14105
+ billable: (boolean) | null;
14106
+ /**
14107
+ * `PMP` (per-message pricing) or `CBP` (conversation-based, messages before 2025-07-01).
14108
+ */
14109
+ pricingModel: (string) | null;
14110
+ /**
14111
+ * Pricing category as Meta sends it, for example `marketing`, `marketing_lite`, `utility`, `authentication`, `authentication-international`, `service`, `referral_conversion`.
14112
+ */
14113
+ category: (string) | null;
14114
+ /**
14115
+ * `regular` (billable), `free_customer_service` or `free_entry_point`.
14116
+ */
14117
+ type: (string) | null;
14118
+ } | null;
14119
+
14062
14120
  export type WhatsAppNamedParamExample = {
14063
14121
  /**
14064
14122
  * Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).