@zernio/node 0.2.1833 → 0.2.1835
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 +47 -4
- package/dist/index.d.ts +47 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/types.gen.ts +47 -3
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.1835",
|
|
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.1835",
|
|
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
|
@@ -29919,7 +29919,13 @@ export type WebhookPayloadMessageSent = {
|
|
|
29919
29919
|
* Do not read these to name or update a contact: doing so on an echo
|
|
29920
29920
|
* relabels the customer's record with your business name. The other
|
|
29921
29921
|
* party is `conversation.participantId` / `participantName` /
|
|
29922
|
-
* `participantUsername
|
|
29922
|
+
* `participantUsername`.
|
|
29923
|
+
*
|
|
29924
|
+
* `participantId` is always set. On a thread the business started,
|
|
29925
|
+
* `participantUsername` and `participantName` can be empty on the
|
|
29926
|
+
* first events; Zernio fills them shortly after when Meta returns the
|
|
29927
|
+
* contact (`participantName` then holds the @username until the
|
|
29928
|
+
* contact writes and their profile is read).
|
|
29923
29929
|
*
|
|
29924
29930
|
*/
|
|
29925
29931
|
sender: {
|
|
@@ -30009,12 +30015,44 @@ export type WebhookPayloadMessageSent = {
|
|
|
30009
30015
|
conversation: InboxWebhookConversation;
|
|
30010
30016
|
account: InboxWebhookAccount;
|
|
30011
30017
|
/**
|
|
30012
|
-
* Platform-specific context for the sent message: a quote-reply reference, a WhatsApp location pin, WhatsApp contact cards, Meta's reason a WhatsApp Business app echo has no renderable body, the TikTok message type, or outgoing Instagram/Facebook buttons, quick replies and template.
|
|
30018
|
+
* Platform-specific context for the sent message: a quote-reply reference, a WhatsApp location pin, WhatsApp contact cards, WhatsApp template name, language, header and footer, Meta's reason a WhatsApp Business app echo has no renderable body, the TikTok message type, or outgoing Instagram/Facebook buttons, quick replies and template.
|
|
30013
30019
|
*
|
|
30014
30020
|
* The key is present only when the send carried some context: it is never null and never an empty object. Read it to tell a location or contact-card message from a text one without a GET on the message.
|
|
30015
30021
|
*
|
|
30016
30022
|
*/
|
|
30017
30023
|
metadata?: {
|
|
30024
|
+
/**
|
|
30025
|
+
* WhatsApp template sends only. Name of the approved template that was sent.
|
|
30026
|
+
*/
|
|
30027
|
+
templateName?: string;
|
|
30028
|
+
/**
|
|
30029
|
+
* WhatsApp template sends only. Language code of the approved template that was sent.
|
|
30030
|
+
*/
|
|
30031
|
+
templateLanguage?: string;
|
|
30032
|
+
/**
|
|
30033
|
+
* WhatsApp template sends only. The header as the recipient saw it: a text header filled with the values actually sent, a media header with its format and the link the send gave, or a location header with only its format.
|
|
30034
|
+
*
|
|
30035
|
+
* Absent when the template has no header, and on bulk, broadcast and automation sends, which carry only `templateName` and `templateLanguage`. The message text is the body only.
|
|
30036
|
+
*
|
|
30037
|
+
*/
|
|
30038
|
+
templateHeader?: {
|
|
30039
|
+
/**
|
|
30040
|
+
* Header format.
|
|
30041
|
+
*/
|
|
30042
|
+
format: 'text' | 'image' | 'video' | 'document' | 'location';
|
|
30043
|
+
/**
|
|
30044
|
+
* Text headers only. The header text with its variables filled in.
|
|
30045
|
+
*/
|
|
30046
|
+
text?: string;
|
|
30047
|
+
/**
|
|
30048
|
+
* Image, video and document headers only. The link the send carried. Absent when the media was sent by id or the link is on Meta's CDN (an expiring URL, such as the approval sample).
|
|
30049
|
+
*/
|
|
30050
|
+
mediaUrl?: string;
|
|
30051
|
+
};
|
|
30052
|
+
/**
|
|
30053
|
+
* WhatsApp template sends only. Footer text of the template. Absent when the template has no footer, and on bulk, broadcast and automation sends.
|
|
30054
|
+
*/
|
|
30055
|
+
templateFooter?: string;
|
|
30018
30056
|
/**
|
|
30019
30057
|
* WhatsApp only. Meta's own reason this message has no renderable body. Present on Coexistence echoes of a message sent from the WhatsApp Business app that Meta could not render (for example an album, code 131051: message type currently not supported). Absent otherwise.
|
|
30020
30058
|
*
|
|
@@ -30135,6 +30173,11 @@ export type platform26 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 't
|
|
|
30135
30173
|
*/
|
|
30136
30174
|
export type source10 = 'whatsapp_business_app' | 'cloud_api' | 'meta_business_agent';
|
|
30137
30175
|
|
|
30176
|
+
/**
|
|
30177
|
+
* Header format.
|
|
30178
|
+
*/
|
|
30179
|
+
export type format4 = 'text' | 'image' | 'video' | 'document' | 'location';
|
|
30180
|
+
|
|
30138
30181
|
export type WebhookPayloadNotificationSent = {
|
|
30139
30182
|
/**
|
|
30140
30183
|
* 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.
|
|
@@ -31692,7 +31735,7 @@ export type WhatsAppHeaderComponent = {
|
|
|
31692
31735
|
};
|
|
31693
31736
|
};
|
|
31694
31737
|
|
|
31695
|
-
export type
|
|
31738
|
+
export type format5 = 'text' | 'image' | 'video' | 'gif' | 'document' | 'location';
|
|
31696
31739
|
|
|
31697
31740
|
export type WhatsAppLimitedTimeOfferComponent = {
|
|
31698
31741
|
type: 'limited_time_offer';
|
|
@@ -53970,6 +54013,7 @@ export type GetInboxConversationMessagesResponse = ({
|
|
|
53970
54013
|
* - `quotedMessageId`: the `id` of the message this one replies to (delivered as `message.platformMessageId` on webhooks).
|
|
53971
54014
|
* - `waInteractive`: a compact descriptor of WhatsApp interactive content sent (buttons / list / cta_url / flow / location_request).
|
|
53972
54015
|
* - `metaInteractive`: outgoing Instagram/Facebook buttons, quickReplies and template, as sent.
|
|
54016
|
+
* - `templateName` / `templateLanguage` / `templateHeader` / `templateFooter`: on a WhatsApp template send, the template identity plus its rendered header (`{ format, text?, mediaUrl? }`) and footer; `text` is the body only.
|
|
53973
54017
|
* - `interactiveType` / `interactiveId`: for inbound interactive taps.
|
|
53974
54018
|
* - `source`: where the message reached us from, not who produced it (read `sentVia` for that). `whatsapp_business_app` / `coexistence_history` on a WhatsApp Coexistence number, `bulk-api` on a POST /v1/whatsapp/bulk send.
|
|
53975
54019
|
* - `deliveryChannel`: on an outgoing iMessage, the channel of the latest delivery status (`imessage`, `sms`, `rcs` or `whatsapp`). A message delivered on `imessage` turns `failed` when the provider then reports its `sms` fallback failed.
|