@zernio/node 0.2.1025 → 0.2.1026
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 -6
- package/dist/index.d.ts +73 -6
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/types.gen.ts +76 -5
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.
|
|
39
|
+
version: "0.2.1026",
|
|
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.
|
|
8
|
+
version: "0.2.1026",
|
|
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
|
@@ -11237,7 +11237,7 @@ export type Webhook = {
|
|
|
11237
11237
|
/**
|
|
11238
11238
|
* Events subscribed to
|
|
11239
11239
|
*/
|
|
11240
|
-
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
|
|
11240
|
+
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
|
|
11241
11241
|
/**
|
|
11242
11242
|
* Whether webhook delivery is enabled
|
|
11243
11243
|
*/
|
|
@@ -13820,6 +13820,58 @@ export type platform16 = 'whatsapp';
|
|
|
13820
13820
|
*/
|
|
13821
13821
|
export type status33 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
|
|
13822
13822
|
|
|
13823
|
+
/**
|
|
13824
|
+
* Webhook payload for the `whatsapp.contact.identity_changed` event. Fired when
|
|
13825
|
+
* Meta reports that a WhatsApp user is now known by a different identifier: a
|
|
13826
|
+
* `system` message of type `user_changed_number`, `user_changed_user_id` or
|
|
13827
|
+
* `user_identity_changed`, or a `user_id_update` webhook (BSUID regenerated).
|
|
13828
|
+
* Zernio re-keys the inbox conversation and contact channel before firing.
|
|
13829
|
+
*
|
|
13830
|
+
*/
|
|
13831
|
+
export type WebhookPayloadWhatsAppContactIdentityChanged = {
|
|
13832
|
+
/**
|
|
13833
|
+
* Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery. It identifies the event only, never an account or other resource.
|
|
13834
|
+
*/
|
|
13835
|
+
id: string;
|
|
13836
|
+
event: 'whatsapp.contact.identity_changed';
|
|
13837
|
+
account: {
|
|
13838
|
+
accountId: string;
|
|
13839
|
+
profileId: string;
|
|
13840
|
+
platform: 'whatsapp';
|
|
13841
|
+
username: string;
|
|
13842
|
+
displayName?: (string) | null;
|
|
13843
|
+
};
|
|
13844
|
+
/**
|
|
13845
|
+
* Which Meta signal reported the change. `user_changed_number`: new phone number. `user_changed_user_id` and `user_id_update`: new BSUID.
|
|
13846
|
+
*/
|
|
13847
|
+
reason: 'user_changed_number' | 'user_changed_user_id' | 'user_identity_changed' | 'user_id_update';
|
|
13848
|
+
previous: WhatsAppContactIdentity;
|
|
13849
|
+
current: WhatsAppContactIdentity;
|
|
13850
|
+
/**
|
|
13851
|
+
* Zernio contact id matched on the new identity, null when none exists yet.
|
|
13852
|
+
*/
|
|
13853
|
+
contactId: (string) | null;
|
|
13854
|
+
/**
|
|
13855
|
+
* Zernio inbox conversation that was re-keyed, null when there was none.
|
|
13856
|
+
*/
|
|
13857
|
+
conversationId: (string) | null;
|
|
13858
|
+
/**
|
|
13859
|
+
* When Meta reported the change.
|
|
13860
|
+
*/
|
|
13861
|
+
changedAt: string;
|
|
13862
|
+
/**
|
|
13863
|
+
* 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.
|
|
13864
|
+
*/
|
|
13865
|
+
timestamp: string;
|
|
13866
|
+
};
|
|
13867
|
+
|
|
13868
|
+
export type event32 = 'whatsapp.contact.identity_changed';
|
|
13869
|
+
|
|
13870
|
+
/**
|
|
13871
|
+
* Which Meta signal reported the change. `user_changed_number`: new phone number. `user_changed_user_id` and `user_id_update`: new BSUID.
|
|
13872
|
+
*/
|
|
13873
|
+
export type reason = 'user_changed_number' | 'user_changed_user_id' | 'user_identity_changed' | 'user_id_update';
|
|
13874
|
+
|
|
13823
13875
|
/**
|
|
13824
13876
|
* Webhook payload for the `whatsapp.template.category_updated` event.
|
|
13825
13877
|
* Fired when Meta reclassifies a template's category attached to a
|
|
@@ -13882,7 +13934,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
|
|
|
13882
13934
|
timestamp: string;
|
|
13883
13935
|
};
|
|
13884
13936
|
|
|
13885
|
-
export type
|
|
13937
|
+
export type event33 = 'whatsapp.template.category_updated';
|
|
13886
13938
|
|
|
13887
13939
|
/**
|
|
13888
13940
|
* `scheduled` is Meta's 24h advance notice of an upcoming
|
|
@@ -13959,7 +14011,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
|
|
|
13959
14011
|
timestamp: string;
|
|
13960
14012
|
};
|
|
13961
14013
|
|
|
13962
|
-
export type
|
|
14014
|
+
export type event34 = 'whatsapp.template.status_updated';
|
|
13963
14015
|
|
|
13964
14016
|
/**
|
|
13965
14017
|
* New status. Forwarded verbatim from Meta's `event` field.
|
|
@@ -14037,6 +14089,25 @@ export type WhatsAppCommerceSettings = {
|
|
|
14037
14089
|
isCatalogVisible?: boolean;
|
|
14038
14090
|
};
|
|
14039
14091
|
|
|
14092
|
+
export type WhatsAppContactIdentity = {
|
|
14093
|
+
/**
|
|
14094
|
+
* The user's WhatsApp phone number (wa_id), null when Meta did not send it (a username adopter who hides it).
|
|
14095
|
+
*/
|
|
14096
|
+
phoneNumber: (string) | null;
|
|
14097
|
+
/**
|
|
14098
|
+
* Meta business-scoped user id (BSUID), for example `US.13491208655302741918`.
|
|
14099
|
+
*/
|
|
14100
|
+
businessScopedUserId: (string) | null;
|
|
14101
|
+
/**
|
|
14102
|
+
* Parent BSUID, shared across the businesses of one portfolio when Meta sends it.
|
|
14103
|
+
*/
|
|
14104
|
+
parentBusinessScopedUserId: (string) | null;
|
|
14105
|
+
/**
|
|
14106
|
+
* The user's WhatsApp username, when Meta sent one with the change. Null on `previous`.
|
|
14107
|
+
*/
|
|
14108
|
+
whatsappUsername: (string) | null;
|
|
14109
|
+
};
|
|
14110
|
+
|
|
14040
14111
|
export type WhatsAppFooterComponent = {
|
|
14041
14112
|
type: 'footer';
|
|
14042
14113
|
/**
|
|
@@ -24696,7 +24767,7 @@ export type CreateWebhookSettingsData = {
|
|
|
24696
24767
|
/**
|
|
24697
24768
|
* Events to subscribe to (at least one required)
|
|
24698
24769
|
*/
|
|
24699
|
-
events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
|
|
24770
|
+
events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
|
|
24700
24771
|
/**
|
|
24701
24772
|
* Enable or disable webhook delivery. Defaults to `true` when omitted.
|
|
24702
24773
|
*/
|
|
@@ -24764,7 +24835,7 @@ export type UpdateWebhookSettingsData = {
|
|
|
24764
24835
|
/**
|
|
24765
24836
|
* Events to subscribe to. Must contain at least one event if provided.
|
|
24766
24837
|
*/
|
|
24767
|
-
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
|
|
24838
|
+
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
|
|
24768
24839
|
/**
|
|
24769
24840
|
* Enable or disable webhook delivery
|
|
24770
24841
|
*/
|