@zernio/node 0.2.74 → 0.2.76
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 +92 -0
- package/dist/index.d.ts +92 -0
- package/package.json +1 -1
- package/src/generated/types.gen.ts +92 -0
package/dist/index.d.mts
CHANGED
|
@@ -857,6 +857,20 @@ type AdMetrics = {
|
|
|
857
857
|
*/
|
|
858
858
|
cpm?: number;
|
|
859
859
|
engagement?: number;
|
|
860
|
+
/**
|
|
861
|
+
* Count of conversion events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.) over the requested date range. 0 for non-conversion campaigns or when no events have fired. Meta-only at time of writing; other platforms return 0.
|
|
862
|
+
*/
|
|
863
|
+
conversions?: number;
|
|
864
|
+
/**
|
|
865
|
+
* Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
|
|
866
|
+
*/
|
|
867
|
+
costPerConversion?: number;
|
|
868
|
+
/**
|
|
869
|
+
* Raw per-action-type counts from Meta's Insights actions[] array, summed over the date range. Keys are Meta action_type strings (e.g. link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped). Use this to extract any conversion event (purchases, leads, add_to_cart, etc.) without relying on the derived conversions field. Empty object when no actions are reported.
|
|
870
|
+
*/
|
|
871
|
+
actions?: {
|
|
872
|
+
[key: string]: (number);
|
|
873
|
+
};
|
|
860
874
|
/**
|
|
861
875
|
* Present on individual ads only, not on campaign aggregations
|
|
862
876
|
*/
|
|
@@ -1674,10 +1688,48 @@ type InboxWebhookMessage = {
|
|
|
1674
1688
|
};
|
|
1675
1689
|
}>;
|
|
1676
1690
|
sender: {
|
|
1691
|
+
/**
|
|
1692
|
+
* Sender's platform identifier. For WhatsApp this is the phone number
|
|
1693
|
+
* (without leading `+`) when available, otherwise the `businessScopedUserId`.
|
|
1694
|
+
* For other platforms, the platform's own user ID.
|
|
1695
|
+
*
|
|
1696
|
+
*/
|
|
1677
1697
|
id: string;
|
|
1678
1698
|
name?: string;
|
|
1679
1699
|
username?: string;
|
|
1680
1700
|
picture?: string;
|
|
1701
|
+
/**
|
|
1702
|
+
* WhatsApp only. Sender's phone number in E.164 format (with leading `+`).
|
|
1703
|
+
*
|
|
1704
|
+
* **Nullable during the BSUID rollout (April 2026+).** WhatsApp users
|
|
1705
|
+
* who adopt a username can message businesses without exposing a phone
|
|
1706
|
+
* number — this field is omitted for them. Match by `businessScopedUserId`
|
|
1707
|
+
* instead. See `docs/whatsapp-bsuid-migration.md`.
|
|
1708
|
+
*
|
|
1709
|
+
*/
|
|
1710
|
+
phoneNumber?: (string) | null;
|
|
1711
|
+
/**
|
|
1712
|
+
* WhatsApp only. Business-scoped user ID (BSUID) — Meta's canonical
|
|
1713
|
+
* identifier for a WhatsApp user within your business. Present when
|
|
1714
|
+
* Meta includes it in the inbound payload (rollout in progress since
|
|
1715
|
+
* early April 2026). **Recommended primary identity anchor** going
|
|
1716
|
+
* forward; fall back to `phoneNumber` only when this field is absent.
|
|
1717
|
+
*
|
|
1718
|
+
*/
|
|
1719
|
+
businessScopedUserId?: string;
|
|
1720
|
+
/**
|
|
1721
|
+
* WhatsApp only. Parent BSUID for businesses with linked business
|
|
1722
|
+
* portfolios. Omitted for standalone portfolios.
|
|
1723
|
+
*
|
|
1724
|
+
*/
|
|
1725
|
+
parentBusinessScopedUserId?: string;
|
|
1726
|
+
/**
|
|
1727
|
+
* WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
|
|
1728
|
+
* stable identifier — users can change it. Useful for display, not
|
|
1729
|
+
* recommended as an identity anchor.
|
|
1730
|
+
*
|
|
1731
|
+
*/
|
|
1732
|
+
whatsappUsername?: string;
|
|
1681
1733
|
/**
|
|
1682
1734
|
* Instagram profile data. Only present for Instagram conversations.
|
|
1683
1735
|
*/
|
|
@@ -3003,10 +3055,50 @@ type WebhookPayloadMessage = {
|
|
|
3003
3055
|
};
|
|
3004
3056
|
}>;
|
|
3005
3057
|
sender: {
|
|
3058
|
+
/**
|
|
3059
|
+
* Sender's platform identifier. For WhatsApp this is the phone
|
|
3060
|
+
* number (without leading `+`) when available, otherwise the
|
|
3061
|
+
* `businessScopedUserId`.
|
|
3062
|
+
*
|
|
3063
|
+
*/
|
|
3006
3064
|
id: string;
|
|
3007
3065
|
name?: string;
|
|
3008
3066
|
username?: string;
|
|
3009
3067
|
picture?: string;
|
|
3068
|
+
/**
|
|
3069
|
+
* WhatsApp only. Sender's phone number in E.164 format (with leading `+`).
|
|
3070
|
+
*
|
|
3071
|
+
* **Nullable during the BSUID rollout (April 2026+).** WhatsApp
|
|
3072
|
+
* users who adopt a username can message businesses without
|
|
3073
|
+
* exposing a phone number — this field is omitted for them.
|
|
3074
|
+
* Match by `businessScopedUserId` instead. See
|
|
3075
|
+
* `docs/whatsapp-bsuid-migration.md`.
|
|
3076
|
+
*
|
|
3077
|
+
*/
|
|
3078
|
+
phoneNumber?: (string) | null;
|
|
3079
|
+
/**
|
|
3080
|
+
* WhatsApp only. Business-scoped user ID (BSUID) — Meta's canonical
|
|
3081
|
+
* identifier for a WhatsApp user within your business. Present
|
|
3082
|
+
* when Meta includes it in the inbound payload (rollout in
|
|
3083
|
+
* progress since early April 2026). **Recommended primary identity
|
|
3084
|
+
* anchor** going forward; fall back to `phoneNumber` only when
|
|
3085
|
+
* this field is absent.
|
|
3086
|
+
*
|
|
3087
|
+
*/
|
|
3088
|
+
businessScopedUserId?: string;
|
|
3089
|
+
/**
|
|
3090
|
+
* WhatsApp only. Parent BSUID for businesses with linked business
|
|
3091
|
+
* portfolios. Omitted for standalone portfolios.
|
|
3092
|
+
*
|
|
3093
|
+
*/
|
|
3094
|
+
parentBusinessScopedUserId?: string;
|
|
3095
|
+
/**
|
|
3096
|
+
* WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
|
|
3097
|
+
* stable identifier — users can change it. Useful for display,
|
|
3098
|
+
* not recommended as an identity anchor.
|
|
3099
|
+
*
|
|
3100
|
+
*/
|
|
3101
|
+
whatsappUsername?: string;
|
|
3010
3102
|
/**
|
|
3011
3103
|
* Instagram profile data for the sender. Only present for Instagram conversations.
|
|
3012
3104
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -857,6 +857,20 @@ type AdMetrics = {
|
|
|
857
857
|
*/
|
|
858
858
|
cpm?: number;
|
|
859
859
|
engagement?: number;
|
|
860
|
+
/**
|
|
861
|
+
* Count of conversion events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.) over the requested date range. 0 for non-conversion campaigns or when no events have fired. Meta-only at time of writing; other platforms return 0.
|
|
862
|
+
*/
|
|
863
|
+
conversions?: number;
|
|
864
|
+
/**
|
|
865
|
+
* Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
|
|
866
|
+
*/
|
|
867
|
+
costPerConversion?: number;
|
|
868
|
+
/**
|
|
869
|
+
* Raw per-action-type counts from Meta's Insights actions[] array, summed over the date range. Keys are Meta action_type strings (e.g. link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped). Use this to extract any conversion event (purchases, leads, add_to_cart, etc.) without relying on the derived conversions field. Empty object when no actions are reported.
|
|
870
|
+
*/
|
|
871
|
+
actions?: {
|
|
872
|
+
[key: string]: (number);
|
|
873
|
+
};
|
|
860
874
|
/**
|
|
861
875
|
* Present on individual ads only, not on campaign aggregations
|
|
862
876
|
*/
|
|
@@ -1674,10 +1688,48 @@ type InboxWebhookMessage = {
|
|
|
1674
1688
|
};
|
|
1675
1689
|
}>;
|
|
1676
1690
|
sender: {
|
|
1691
|
+
/**
|
|
1692
|
+
* Sender's platform identifier. For WhatsApp this is the phone number
|
|
1693
|
+
* (without leading `+`) when available, otherwise the `businessScopedUserId`.
|
|
1694
|
+
* For other platforms, the platform's own user ID.
|
|
1695
|
+
*
|
|
1696
|
+
*/
|
|
1677
1697
|
id: string;
|
|
1678
1698
|
name?: string;
|
|
1679
1699
|
username?: string;
|
|
1680
1700
|
picture?: string;
|
|
1701
|
+
/**
|
|
1702
|
+
* WhatsApp only. Sender's phone number in E.164 format (with leading `+`).
|
|
1703
|
+
*
|
|
1704
|
+
* **Nullable during the BSUID rollout (April 2026+).** WhatsApp users
|
|
1705
|
+
* who adopt a username can message businesses without exposing a phone
|
|
1706
|
+
* number — this field is omitted for them. Match by `businessScopedUserId`
|
|
1707
|
+
* instead. See `docs/whatsapp-bsuid-migration.md`.
|
|
1708
|
+
*
|
|
1709
|
+
*/
|
|
1710
|
+
phoneNumber?: (string) | null;
|
|
1711
|
+
/**
|
|
1712
|
+
* WhatsApp only. Business-scoped user ID (BSUID) — Meta's canonical
|
|
1713
|
+
* identifier for a WhatsApp user within your business. Present when
|
|
1714
|
+
* Meta includes it in the inbound payload (rollout in progress since
|
|
1715
|
+
* early April 2026). **Recommended primary identity anchor** going
|
|
1716
|
+
* forward; fall back to `phoneNumber` only when this field is absent.
|
|
1717
|
+
*
|
|
1718
|
+
*/
|
|
1719
|
+
businessScopedUserId?: string;
|
|
1720
|
+
/**
|
|
1721
|
+
* WhatsApp only. Parent BSUID for businesses with linked business
|
|
1722
|
+
* portfolios. Omitted for standalone portfolios.
|
|
1723
|
+
*
|
|
1724
|
+
*/
|
|
1725
|
+
parentBusinessScopedUserId?: string;
|
|
1726
|
+
/**
|
|
1727
|
+
* WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
|
|
1728
|
+
* stable identifier — users can change it. Useful for display, not
|
|
1729
|
+
* recommended as an identity anchor.
|
|
1730
|
+
*
|
|
1731
|
+
*/
|
|
1732
|
+
whatsappUsername?: string;
|
|
1681
1733
|
/**
|
|
1682
1734
|
* Instagram profile data. Only present for Instagram conversations.
|
|
1683
1735
|
*/
|
|
@@ -3003,10 +3055,50 @@ type WebhookPayloadMessage = {
|
|
|
3003
3055
|
};
|
|
3004
3056
|
}>;
|
|
3005
3057
|
sender: {
|
|
3058
|
+
/**
|
|
3059
|
+
* Sender's platform identifier. For WhatsApp this is the phone
|
|
3060
|
+
* number (without leading `+`) when available, otherwise the
|
|
3061
|
+
* `businessScopedUserId`.
|
|
3062
|
+
*
|
|
3063
|
+
*/
|
|
3006
3064
|
id: string;
|
|
3007
3065
|
name?: string;
|
|
3008
3066
|
username?: string;
|
|
3009
3067
|
picture?: string;
|
|
3068
|
+
/**
|
|
3069
|
+
* WhatsApp only. Sender's phone number in E.164 format (with leading `+`).
|
|
3070
|
+
*
|
|
3071
|
+
* **Nullable during the BSUID rollout (April 2026+).** WhatsApp
|
|
3072
|
+
* users who adopt a username can message businesses without
|
|
3073
|
+
* exposing a phone number — this field is omitted for them.
|
|
3074
|
+
* Match by `businessScopedUserId` instead. See
|
|
3075
|
+
* `docs/whatsapp-bsuid-migration.md`.
|
|
3076
|
+
*
|
|
3077
|
+
*/
|
|
3078
|
+
phoneNumber?: (string) | null;
|
|
3079
|
+
/**
|
|
3080
|
+
* WhatsApp only. Business-scoped user ID (BSUID) — Meta's canonical
|
|
3081
|
+
* identifier for a WhatsApp user within your business. Present
|
|
3082
|
+
* when Meta includes it in the inbound payload (rollout in
|
|
3083
|
+
* progress since early April 2026). **Recommended primary identity
|
|
3084
|
+
* anchor** going forward; fall back to `phoneNumber` only when
|
|
3085
|
+
* this field is absent.
|
|
3086
|
+
*
|
|
3087
|
+
*/
|
|
3088
|
+
businessScopedUserId?: string;
|
|
3089
|
+
/**
|
|
3090
|
+
* WhatsApp only. Parent BSUID for businesses with linked business
|
|
3091
|
+
* portfolios. Omitted for standalone portfolios.
|
|
3092
|
+
*
|
|
3093
|
+
*/
|
|
3094
|
+
parentBusinessScopedUserId?: string;
|
|
3095
|
+
/**
|
|
3096
|
+
* WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
|
|
3097
|
+
* stable identifier — users can change it. Useful for display,
|
|
3098
|
+
* not recommended as an identity anchor.
|
|
3099
|
+
*
|
|
3100
|
+
*/
|
|
3101
|
+
whatsappUsername?: string;
|
|
3010
3102
|
/**
|
|
3011
3103
|
* Instagram profile data for the sender. Only present for Instagram conversations.
|
|
3012
3104
|
*/
|
package/package.json
CHANGED
|
@@ -275,6 +275,20 @@ export type AdMetrics = {
|
|
|
275
275
|
*/
|
|
276
276
|
cpm?: number;
|
|
277
277
|
engagement?: number;
|
|
278
|
+
/**
|
|
279
|
+
* Count of conversion events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.) over the requested date range. 0 for non-conversion campaigns or when no events have fired. Meta-only at time of writing; other platforms return 0.
|
|
280
|
+
*/
|
|
281
|
+
conversions?: number;
|
|
282
|
+
/**
|
|
283
|
+
* Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
|
|
284
|
+
*/
|
|
285
|
+
costPerConversion?: number;
|
|
286
|
+
/**
|
|
287
|
+
* Raw per-action-type counts from Meta's Insights actions[] array, summed over the date range. Keys are Meta action_type strings (e.g. link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped). Use this to extract any conversion event (purchases, leads, add_to_cart, etc.) without relying on the derived conversions field. Empty object when no actions are reported.
|
|
288
|
+
*/
|
|
289
|
+
actions?: {
|
|
290
|
+
[key: string]: (number);
|
|
291
|
+
};
|
|
278
292
|
/**
|
|
279
293
|
* Present on individual ads only, not on campaign aggregations
|
|
280
294
|
*/
|
|
@@ -1128,10 +1142,48 @@ export type InboxWebhookMessage = {
|
|
|
1128
1142
|
};
|
|
1129
1143
|
}>;
|
|
1130
1144
|
sender: {
|
|
1145
|
+
/**
|
|
1146
|
+
* Sender's platform identifier. For WhatsApp this is the phone number
|
|
1147
|
+
* (without leading `+`) when available, otherwise the `businessScopedUserId`.
|
|
1148
|
+
* For other platforms, the platform's own user ID.
|
|
1149
|
+
*
|
|
1150
|
+
*/
|
|
1131
1151
|
id: string;
|
|
1132
1152
|
name?: string;
|
|
1133
1153
|
username?: string;
|
|
1134
1154
|
picture?: string;
|
|
1155
|
+
/**
|
|
1156
|
+
* WhatsApp only. Sender's phone number in E.164 format (with leading `+`).
|
|
1157
|
+
*
|
|
1158
|
+
* **Nullable during the BSUID rollout (April 2026+).** WhatsApp users
|
|
1159
|
+
* who adopt a username can message businesses without exposing a phone
|
|
1160
|
+
* number — this field is omitted for them. Match by `businessScopedUserId`
|
|
1161
|
+
* instead. See `docs/whatsapp-bsuid-migration.md`.
|
|
1162
|
+
*
|
|
1163
|
+
*/
|
|
1164
|
+
phoneNumber?: (string) | null;
|
|
1165
|
+
/**
|
|
1166
|
+
* WhatsApp only. Business-scoped user ID (BSUID) — Meta's canonical
|
|
1167
|
+
* identifier for a WhatsApp user within your business. Present when
|
|
1168
|
+
* Meta includes it in the inbound payload (rollout in progress since
|
|
1169
|
+
* early April 2026). **Recommended primary identity anchor** going
|
|
1170
|
+
* forward; fall back to `phoneNumber` only when this field is absent.
|
|
1171
|
+
*
|
|
1172
|
+
*/
|
|
1173
|
+
businessScopedUserId?: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* WhatsApp only. Parent BSUID for businesses with linked business
|
|
1176
|
+
* portfolios. Omitted for standalone portfolios.
|
|
1177
|
+
*
|
|
1178
|
+
*/
|
|
1179
|
+
parentBusinessScopedUserId?: string;
|
|
1180
|
+
/**
|
|
1181
|
+
* WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
|
|
1182
|
+
* stable identifier — users can change it. Useful for display, not
|
|
1183
|
+
* recommended as an identity anchor.
|
|
1184
|
+
*
|
|
1185
|
+
*/
|
|
1186
|
+
whatsappUsername?: string;
|
|
1135
1187
|
/**
|
|
1136
1188
|
* Instagram profile data. Only present for Instagram conversations.
|
|
1137
1189
|
*/
|
|
@@ -2546,10 +2598,50 @@ export type WebhookPayloadMessage = {
|
|
|
2546
2598
|
};
|
|
2547
2599
|
}>;
|
|
2548
2600
|
sender: {
|
|
2601
|
+
/**
|
|
2602
|
+
* Sender's platform identifier. For WhatsApp this is the phone
|
|
2603
|
+
* number (without leading `+`) when available, otherwise the
|
|
2604
|
+
* `businessScopedUserId`.
|
|
2605
|
+
*
|
|
2606
|
+
*/
|
|
2549
2607
|
id: string;
|
|
2550
2608
|
name?: string;
|
|
2551
2609
|
username?: string;
|
|
2552
2610
|
picture?: string;
|
|
2611
|
+
/**
|
|
2612
|
+
* WhatsApp only. Sender's phone number in E.164 format (with leading `+`).
|
|
2613
|
+
*
|
|
2614
|
+
* **Nullable during the BSUID rollout (April 2026+).** WhatsApp
|
|
2615
|
+
* users who adopt a username can message businesses without
|
|
2616
|
+
* exposing a phone number — this field is omitted for them.
|
|
2617
|
+
* Match by `businessScopedUserId` instead. See
|
|
2618
|
+
* `docs/whatsapp-bsuid-migration.md`.
|
|
2619
|
+
*
|
|
2620
|
+
*/
|
|
2621
|
+
phoneNumber?: (string) | null;
|
|
2622
|
+
/**
|
|
2623
|
+
* WhatsApp only. Business-scoped user ID (BSUID) — Meta's canonical
|
|
2624
|
+
* identifier for a WhatsApp user within your business. Present
|
|
2625
|
+
* when Meta includes it in the inbound payload (rollout in
|
|
2626
|
+
* progress since early April 2026). **Recommended primary identity
|
|
2627
|
+
* anchor** going forward; fall back to `phoneNumber` only when
|
|
2628
|
+
* this field is absent.
|
|
2629
|
+
*
|
|
2630
|
+
*/
|
|
2631
|
+
businessScopedUserId?: string;
|
|
2632
|
+
/**
|
|
2633
|
+
* WhatsApp only. Parent BSUID for businesses with linked business
|
|
2634
|
+
* portfolios. Omitted for standalone portfolios.
|
|
2635
|
+
*
|
|
2636
|
+
*/
|
|
2637
|
+
parentBusinessScopedUserId?: string;
|
|
2638
|
+
/**
|
|
2639
|
+
* WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
|
|
2640
|
+
* stable identifier — users can change it. Useful for display,
|
|
2641
|
+
* not recommended as an identity anchor.
|
|
2642
|
+
*
|
|
2643
|
+
*/
|
|
2644
|
+
whatsappUsername?: string;
|
|
2553
2645
|
/**
|
|
2554
2646
|
* Instagram profile data for the sender. Only present for Instagram conversations.
|
|
2555
2647
|
*/
|