@getlatedev/node 0.2.342 → 0.2.344
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 +25 -4
- package/dist/index.d.ts +25 -4
- 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 +25 -4
package/dist/index.d.mts
CHANGED
|
@@ -5539,7 +5539,7 @@ type platform7 = 'instagram' | 'facebook' | 'twitter' | 'youtube' | 'linkedin' |
|
|
|
5539
5539
|
* Fired once when a new conversation begins, in either direction. A conversation
|
|
5540
5540
|
* starts the first time an account and a contact exchange a message on any DM
|
|
5541
5541
|
* platform (Instagram, Messenger/Facebook, Telegram, WhatsApp, Twitter, Reddit,
|
|
5542
|
-
* Bluesky). Platform-agnostic — one subscription covers every DM platform.
|
|
5542
|
+
* Bluesky, SMS). Platform-agnostic — one subscription covers every DM platform.
|
|
5543
5543
|
*
|
|
5544
5544
|
*/
|
|
5545
5545
|
type WebhookPayloadConversationStarted = {
|
|
@@ -5553,7 +5553,7 @@ type WebhookPayloadConversationStarted = {
|
|
|
5553
5553
|
* Internal conversation ID
|
|
5554
5554
|
*/
|
|
5555
5555
|
id: string;
|
|
5556
|
-
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky';
|
|
5556
|
+
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms';
|
|
5557
5557
|
platformConversationId: string;
|
|
5558
5558
|
/**
|
|
5559
5559
|
* Contact's platform identifier (IGSID, PSID, wa_id, etc.)
|
|
@@ -5585,7 +5585,7 @@ type WebhookPayloadConversationStarted = {
|
|
|
5585
5585
|
timestamp: string;
|
|
5586
5586
|
};
|
|
5587
5587
|
type event10 = 'conversation.started';
|
|
5588
|
-
type platform8 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky';
|
|
5588
|
+
type platform8 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms';
|
|
5589
5589
|
/**
|
|
5590
5590
|
* Webhook payload for post.external.created / post.external.updated /
|
|
5591
5591
|
* post.external.deleted. Fired by Zernio's background sync when it detects a
|
|
@@ -13864,9 +13864,30 @@ type CreateInboxConversationData = {
|
|
|
13864
13864
|
*/
|
|
13865
13865
|
templateLanguage?: string;
|
|
13866
13866
|
/**
|
|
13867
|
-
* WhatsApp only. Template variable values as one flat array, in the order the variables appear across the whole template: text-header variables first, then body variables, then one value per dynamic URL button (in button order). Works with positional placeholders ({{1}}, {{2}}, ...) and with named placeholders ({{name}}, {{company}} - how Meta Business Manager creates templates), where values fill the named slots in order of appearance. Example - a body with {{1}}, {{2}} plus a URL button https://example.com/{{1}} takes three values: [body1, body2, buttonSuffix]. Media headers (image, video, document) are filled automatically from the approved template and take no value here.
|
|
13867
|
+
* WhatsApp only. Template variable values as one flat array, in the order the variables appear across the whole template: text-header variables first, then body variables, then one value per dynamic URL button (in button order). Works with positional placeholders ({{1}}, {{2}}, ...) and with named placeholders ({{name}}, {{company}} - how Meta Business Manager creates templates), where values fill the named slots in order of appearance. Example - a body with {{1}}, {{2}} plus a URL button https://example.com/{{1}} takes three values: [body1, body2, buttonSuffix]. Media headers (image, video, document) are filled automatically from the approved template and take no value here (use headerMedia to override the header asset per send).
|
|
13868
13868
|
*/
|
|
13869
13869
|
templateParams?: Array<(string)>;
|
|
13870
|
+
/**
|
|
13871
|
+
* WhatsApp only. Overrides a media-header template's header asset for THIS send, so a template with an image/video/document header can carry a different asset per message (e.g. each recipient their own invoice PDF). Without it, the template's approved sample asset is sent. Provide exactly one of link or id.
|
|
13872
|
+
*/
|
|
13873
|
+
headerMedia?: {
|
|
13874
|
+
/**
|
|
13875
|
+
* Must match the template header's media type.
|
|
13876
|
+
*/
|
|
13877
|
+
type: 'image' | 'video' | 'document';
|
|
13878
|
+
/**
|
|
13879
|
+
* Public URL of the asset to send. Must be reachable without auth.
|
|
13880
|
+
*/
|
|
13881
|
+
link?: string;
|
|
13882
|
+
/**
|
|
13883
|
+
* A Meta media id (from the media upload endpoint), as an alternative to link.
|
|
13884
|
+
*/
|
|
13885
|
+
id?: string;
|
|
13886
|
+
/**
|
|
13887
|
+
* Document display name shown to the recipient (e.g. "Factura 0001-123.pdf"). document type only; ignored for image/video.
|
|
13888
|
+
*/
|
|
13889
|
+
filename?: string;
|
|
13890
|
+
};
|
|
13870
13891
|
};
|
|
13871
13892
|
};
|
|
13872
13893
|
type CreateInboxConversationResponse = ({
|
package/dist/index.d.ts
CHANGED
|
@@ -5539,7 +5539,7 @@ type platform7 = 'instagram' | 'facebook' | 'twitter' | 'youtube' | 'linkedin' |
|
|
|
5539
5539
|
* Fired once when a new conversation begins, in either direction. A conversation
|
|
5540
5540
|
* starts the first time an account and a contact exchange a message on any DM
|
|
5541
5541
|
* platform (Instagram, Messenger/Facebook, Telegram, WhatsApp, Twitter, Reddit,
|
|
5542
|
-
* Bluesky). Platform-agnostic — one subscription covers every DM platform.
|
|
5542
|
+
* Bluesky, SMS). Platform-agnostic — one subscription covers every DM platform.
|
|
5543
5543
|
*
|
|
5544
5544
|
*/
|
|
5545
5545
|
type WebhookPayloadConversationStarted = {
|
|
@@ -5553,7 +5553,7 @@ type WebhookPayloadConversationStarted = {
|
|
|
5553
5553
|
* Internal conversation ID
|
|
5554
5554
|
*/
|
|
5555
5555
|
id: string;
|
|
5556
|
-
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky';
|
|
5556
|
+
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms';
|
|
5557
5557
|
platformConversationId: string;
|
|
5558
5558
|
/**
|
|
5559
5559
|
* Contact's platform identifier (IGSID, PSID, wa_id, etc.)
|
|
@@ -5585,7 +5585,7 @@ type WebhookPayloadConversationStarted = {
|
|
|
5585
5585
|
timestamp: string;
|
|
5586
5586
|
};
|
|
5587
5587
|
type event10 = 'conversation.started';
|
|
5588
|
-
type platform8 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky';
|
|
5588
|
+
type platform8 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms';
|
|
5589
5589
|
/**
|
|
5590
5590
|
* Webhook payload for post.external.created / post.external.updated /
|
|
5591
5591
|
* post.external.deleted. Fired by Zernio's background sync when it detects a
|
|
@@ -13864,9 +13864,30 @@ type CreateInboxConversationData = {
|
|
|
13864
13864
|
*/
|
|
13865
13865
|
templateLanguage?: string;
|
|
13866
13866
|
/**
|
|
13867
|
-
* WhatsApp only. Template variable values as one flat array, in the order the variables appear across the whole template: text-header variables first, then body variables, then one value per dynamic URL button (in button order). Works with positional placeholders ({{1}}, {{2}}, ...) and with named placeholders ({{name}}, {{company}} - how Meta Business Manager creates templates), where values fill the named slots in order of appearance. Example - a body with {{1}}, {{2}} plus a URL button https://example.com/{{1}} takes three values: [body1, body2, buttonSuffix]. Media headers (image, video, document) are filled automatically from the approved template and take no value here.
|
|
13867
|
+
* WhatsApp only. Template variable values as one flat array, in the order the variables appear across the whole template: text-header variables first, then body variables, then one value per dynamic URL button (in button order). Works with positional placeholders ({{1}}, {{2}}, ...) and with named placeholders ({{name}}, {{company}} - how Meta Business Manager creates templates), where values fill the named slots in order of appearance. Example - a body with {{1}}, {{2}} plus a URL button https://example.com/{{1}} takes three values: [body1, body2, buttonSuffix]. Media headers (image, video, document) are filled automatically from the approved template and take no value here (use headerMedia to override the header asset per send).
|
|
13868
13868
|
*/
|
|
13869
13869
|
templateParams?: Array<(string)>;
|
|
13870
|
+
/**
|
|
13871
|
+
* WhatsApp only. Overrides a media-header template's header asset for THIS send, so a template with an image/video/document header can carry a different asset per message (e.g. each recipient their own invoice PDF). Without it, the template's approved sample asset is sent. Provide exactly one of link or id.
|
|
13872
|
+
*/
|
|
13873
|
+
headerMedia?: {
|
|
13874
|
+
/**
|
|
13875
|
+
* Must match the template header's media type.
|
|
13876
|
+
*/
|
|
13877
|
+
type: 'image' | 'video' | 'document';
|
|
13878
|
+
/**
|
|
13879
|
+
* Public URL of the asset to send. Must be reachable without auth.
|
|
13880
|
+
*/
|
|
13881
|
+
link?: string;
|
|
13882
|
+
/**
|
|
13883
|
+
* A Meta media id (from the media upload endpoint), as an alternative to link.
|
|
13884
|
+
*/
|
|
13885
|
+
id?: string;
|
|
13886
|
+
/**
|
|
13887
|
+
* Document display name shown to the recipient (e.g. "Factura 0001-123.pdf"). document type only; ignored for image/video.
|
|
13888
|
+
*/
|
|
13889
|
+
filename?: string;
|
|
13890
|
+
};
|
|
13870
13891
|
};
|
|
13871
13892
|
};
|
|
13872
13893
|
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: "@getlatedev/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.344",
|
|
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: "@getlatedev/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.344",
|
|
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
|
@@ -2700,7 +2700,7 @@ export const listInboxConversations = <ThrowOnError extends boolean = false>(opt
|
|
|
2700
2700
|
*
|
|
2701
2701
|
* Supported platforms: X/Twitter, Bluesky, Reddit, and WhatsApp. Other platforms return PLATFORM_NOT_SUPPORTED.
|
|
2702
2702
|
*
|
|
2703
|
-
* 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. 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.
|
|
2703
|
+
* 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. 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.
|
|
2704
2704
|
*
|
|
2705
2705
|
* 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.
|
|
2706
2706
|
*
|
|
@@ -4871,7 +4871,7 @@ export type platform7 = 'instagram' | 'facebook' | 'twitter' | 'youtube' | 'link
|
|
|
4871
4871
|
* Fired once when a new conversation begins, in either direction. A conversation
|
|
4872
4872
|
* starts the first time an account and a contact exchange a message on any DM
|
|
4873
4873
|
* platform (Instagram, Messenger/Facebook, Telegram, WhatsApp, Twitter, Reddit,
|
|
4874
|
-
* Bluesky). Platform-agnostic — one subscription covers every DM platform.
|
|
4874
|
+
* Bluesky, SMS). Platform-agnostic — one subscription covers every DM platform.
|
|
4875
4875
|
*
|
|
4876
4876
|
*/
|
|
4877
4877
|
export type WebhookPayloadConversationStarted = {
|
|
@@ -4885,7 +4885,7 @@ export type WebhookPayloadConversationStarted = {
|
|
|
4885
4885
|
* Internal conversation ID
|
|
4886
4886
|
*/
|
|
4887
4887
|
id: string;
|
|
4888
|
-
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky';
|
|
4888
|
+
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms';
|
|
4889
4889
|
platformConversationId: string;
|
|
4890
4890
|
/**
|
|
4891
4891
|
* Contact's platform identifier (IGSID, PSID, wa_id, etc.)
|
|
@@ -4919,7 +4919,7 @@ export type WebhookPayloadConversationStarted = {
|
|
|
4919
4919
|
|
|
4920
4920
|
export type event10 = 'conversation.started';
|
|
4921
4921
|
|
|
4922
|
-
export type platform8 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky';
|
|
4922
|
+
export type platform8 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms';
|
|
4923
4923
|
|
|
4924
4924
|
/**
|
|
4925
4925
|
* Webhook payload for post.external.created / post.external.updated /
|
|
@@ -13784,9 +13784,30 @@ export type CreateInboxConversationData = {
|
|
|
13784
13784
|
*/
|
|
13785
13785
|
templateLanguage?: string;
|
|
13786
13786
|
/**
|
|
13787
|
-
* WhatsApp only. Template variable values as one flat array, in the order the variables appear across the whole template: text-header variables first, then body variables, then one value per dynamic URL button (in button order). Works with positional placeholders ({{1}}, {{2}}, ...) and with named placeholders ({{name}}, {{company}} - how Meta Business Manager creates templates), where values fill the named slots in order of appearance. Example - a body with {{1}}, {{2}} plus a URL button https://example.com/{{1}} takes three values: [body1, body2, buttonSuffix]. Media headers (image, video, document) are filled automatically from the approved template and take no value here.
|
|
13787
|
+
* WhatsApp only. Template variable values as one flat array, in the order the variables appear across the whole template: text-header variables first, then body variables, then one value per dynamic URL button (in button order). Works with positional placeholders ({{1}}, {{2}}, ...) and with named placeholders ({{name}}, {{company}} - how Meta Business Manager creates templates), where values fill the named slots in order of appearance. Example - a body with {{1}}, {{2}} plus a URL button https://example.com/{{1}} takes three values: [body1, body2, buttonSuffix]. Media headers (image, video, document) are filled automatically from the approved template and take no value here (use headerMedia to override the header asset per send).
|
|
13788
13788
|
*/
|
|
13789
13789
|
templateParams?: Array<(string)>;
|
|
13790
|
+
/**
|
|
13791
|
+
* WhatsApp only. Overrides a media-header template's header asset for THIS send, so a template with an image/video/document header can carry a different asset per message (e.g. each recipient their own invoice PDF). Without it, the template's approved sample asset is sent. Provide exactly one of link or id.
|
|
13792
|
+
*/
|
|
13793
|
+
headerMedia?: {
|
|
13794
|
+
/**
|
|
13795
|
+
* Must match the template header's media type.
|
|
13796
|
+
*/
|
|
13797
|
+
type: 'image' | 'video' | 'document';
|
|
13798
|
+
/**
|
|
13799
|
+
* Public URL of the asset to send. Must be reachable without auth.
|
|
13800
|
+
*/
|
|
13801
|
+
link?: string;
|
|
13802
|
+
/**
|
|
13803
|
+
* A Meta media id (from the media upload endpoint), as an alternative to link.
|
|
13804
|
+
*/
|
|
13805
|
+
id?: string;
|
|
13806
|
+
/**
|
|
13807
|
+
* Document display name shown to the recipient (e.g. "Factura 0001-123.pdf"). document type only; ignored for image/video.
|
|
13808
|
+
*/
|
|
13809
|
+
filename?: string;
|
|
13810
|
+
};
|
|
13790
13811
|
};
|
|
13791
13812
|
};
|
|
13792
13813
|
|