@zernio/node 0.2.661 → 0.2.662
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 +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +1 -1
- package/src/generated/types.gen.ts +21 -0
package/dist/index.d.mts
CHANGED
|
@@ -18832,6 +18832,27 @@ type CreateInboxConversationData = {
|
|
|
18832
18832
|
*/
|
|
18833
18833
|
filename?: string;
|
|
18834
18834
|
};
|
|
18835
|
+
/**
|
|
18836
|
+
* WhatsApp only. Required to send a template whose approved header format is LOCATION: Meta only accepts the location's lat/long at send time, never at template creation, so there is nothing to fill in automatically. Cannot be combined with headerMedia (a template has exactly one header).
|
|
18837
|
+
*/
|
|
18838
|
+
headerLocation?: {
|
|
18839
|
+
/**
|
|
18840
|
+
* Latitude in decimal degrees.
|
|
18841
|
+
*/
|
|
18842
|
+
latitude: number;
|
|
18843
|
+
/**
|
|
18844
|
+
* Longitude in decimal degrees.
|
|
18845
|
+
*/
|
|
18846
|
+
longitude: number;
|
|
18847
|
+
/**
|
|
18848
|
+
* Location name shown to the recipient (e.g. a business name).
|
|
18849
|
+
*/
|
|
18850
|
+
name?: string;
|
|
18851
|
+
/**
|
|
18852
|
+
* Location address shown to the recipient.
|
|
18853
|
+
*/
|
|
18854
|
+
address?: string;
|
|
18855
|
+
};
|
|
18835
18856
|
};
|
|
18836
18857
|
};
|
|
18837
18858
|
type CreateInboxConversationResponse = ({
|
package/dist/index.d.ts
CHANGED
|
@@ -18832,6 +18832,27 @@ type CreateInboxConversationData = {
|
|
|
18832
18832
|
*/
|
|
18833
18833
|
filename?: string;
|
|
18834
18834
|
};
|
|
18835
|
+
/**
|
|
18836
|
+
* WhatsApp only. Required to send a template whose approved header format is LOCATION: Meta only accepts the location's lat/long at send time, never at template creation, so there is nothing to fill in automatically. Cannot be combined with headerMedia (a template has exactly one header).
|
|
18837
|
+
*/
|
|
18838
|
+
headerLocation?: {
|
|
18839
|
+
/**
|
|
18840
|
+
* Latitude in decimal degrees.
|
|
18841
|
+
*/
|
|
18842
|
+
latitude: number;
|
|
18843
|
+
/**
|
|
18844
|
+
* Longitude in decimal degrees.
|
|
18845
|
+
*/
|
|
18846
|
+
longitude: number;
|
|
18847
|
+
/**
|
|
18848
|
+
* Location name shown to the recipient (e.g. a business name).
|
|
18849
|
+
*/
|
|
18850
|
+
name?: string;
|
|
18851
|
+
/**
|
|
18852
|
+
* Location address shown to the recipient.
|
|
18853
|
+
*/
|
|
18854
|
+
address?: string;
|
|
18855
|
+
};
|
|
18835
18856
|
};
|
|
18836
18857
|
};
|
|
18837
18858
|
type CreateInboxConversationResponse = ({
|
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.662",
|
|
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.662",
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -3305,7 +3305,7 @@ export const listInboxConversations = <ThrowOnError extends boolean = false>(opt
|
|
|
3305
3305
|
*
|
|
3306
3306
|
* Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace.
|
|
3307
3307
|
*
|
|
3308
|
-
* WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below.
|
|
3308
|
+
* WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below.
|
|
3309
3309
|
*
|
|
3310
3310
|
* DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility.
|
|
3311
3311
|
*
|
|
@@ -18471,6 +18471,27 @@ export type CreateInboxConversationData = {
|
|
|
18471
18471
|
*/
|
|
18472
18472
|
filename?: string;
|
|
18473
18473
|
};
|
|
18474
|
+
/**
|
|
18475
|
+
* WhatsApp only. Required to send a template whose approved header format is LOCATION: Meta only accepts the location's lat/long at send time, never at template creation, so there is nothing to fill in automatically. Cannot be combined with headerMedia (a template has exactly one header).
|
|
18476
|
+
*/
|
|
18477
|
+
headerLocation?: {
|
|
18478
|
+
/**
|
|
18479
|
+
* Latitude in decimal degrees.
|
|
18480
|
+
*/
|
|
18481
|
+
latitude: number;
|
|
18482
|
+
/**
|
|
18483
|
+
* Longitude in decimal degrees.
|
|
18484
|
+
*/
|
|
18485
|
+
longitude: number;
|
|
18486
|
+
/**
|
|
18487
|
+
* Location name shown to the recipient (e.g. a business name).
|
|
18488
|
+
*/
|
|
18489
|
+
name?: string;
|
|
18490
|
+
/**
|
|
18491
|
+
* Location address shown to the recipient.
|
|
18492
|
+
*/
|
|
18493
|
+
address?: string;
|
|
18494
|
+
};
|
|
18474
18495
|
};
|
|
18475
18496
|
};
|
|
18476
18497
|
|