@getlatedev/node 0.2.1154 → 0.2.1156
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 +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +10 -8
- package/src/generated/types.gen.ts +9 -3
package/dist/index.d.mts
CHANGED
|
@@ -12242,7 +12242,7 @@ type SupportRun = {
|
|
|
12242
12242
|
*/
|
|
12243
12243
|
threadId: string;
|
|
12244
12244
|
/**
|
|
12245
|
-
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering.
|
|
12245
|
+
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
|
|
12246
12246
|
*/
|
|
12247
12247
|
status: 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
|
|
12248
12248
|
/**
|
|
@@ -12265,13 +12265,19 @@ type SupportRun = {
|
|
|
12265
12265
|
createdAt: string;
|
|
12266
12266
|
startedAt: (string) | null;
|
|
12267
12267
|
finishedAt: (string) | null;
|
|
12268
|
+
/**
|
|
12269
|
+
* Set when Ana opened a support ticket with the Zernio team. Null otherwise. A teammate follows up by email with the user whose API key started the run.
|
|
12270
|
+
*/
|
|
12271
|
+
supportTicket: {
|
|
12272
|
+
openedAt: string;
|
|
12273
|
+
} | null;
|
|
12268
12274
|
/**
|
|
12269
12275
|
* Seconds to wait before polling again. Present only while the run is queued or running.
|
|
12270
12276
|
*/
|
|
12271
12277
|
pollAfterSeconds?: number;
|
|
12272
12278
|
};
|
|
12273
12279
|
/**
|
|
12274
|
-
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering.
|
|
12280
|
+
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
|
|
12275
12281
|
*/
|
|
12276
12282
|
type status29 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
|
|
12277
12283
|
/**
|
|
@@ -17289,7 +17295,7 @@ type WorkflowNode = {
|
|
|
17289
17295
|
/**
|
|
17290
17296
|
* Type-specific settings. All string fields support `{{variable}}` interpolation against the run's variable bag (resolved at execution time).
|
|
17291
17297
|
*
|
|
17292
|
-
* **trigger**: `{ triggerType: inbound_message|api_call|whatsapp_event|referral|story_mention|comment|reaction, keywords:[string], matchType: any|contains|exact|regex, onlyFirstMessage:boolean, eventType: message_sent|message_delivered|message_read|message_failed|reaction, referral:{ ref, matchType: exact|prefix|any }, reaction:{ emojis:[string] }, comment:{ keywords:[string], matchType: any|contains|exact|regex, platformPostId }, cooldownHours:int (1-720) }`. Default `triggerType` is `inbound_message` for legacy nodes. A workflow starts only on events of its own trigger type: `inbound_message` on a message, `referral` on an ig.me / m.me / click-to-message ad referral (standalone, or the first message carrying one; the two are deduplicated per conversation within 60 seconds), `story_mention` on an Instagram story mention, `reaction` on a reaction (Instagram, Facebook, WhatsApp, Telegram groups), `comment` on an Instagram or Facebook comment (the run starts with no conversation and its first `send_message`, which must be text (with optional buttons or quick replies) or cards and must follow the trigger directly (checked on save; Instagram
|
|
17298
|
+
* **trigger**: `{ triggerType: inbound_message|api_call|whatsapp_event|referral|story_mention|comment|reaction, keywords:[string], matchType: any|contains|exact|regex, onlyFirstMessage:boolean, eventType: message_sent|message_delivered|message_read|message_failed|reaction, referral:{ ref, matchType: exact|prefix|any }, reaction:{ emojis:[string] }, comment:{ keywords:[string], matchType: any|contains|exact|regex, platformPostId }, cooldownHours:int (1-720) }`. Default `triggerType` is `inbound_message` for legacy nodes. A workflow starts only on events of its own trigger type: `inbound_message` on a message, `referral` on an ig.me / m.me / click-to-message ad referral (standalone, or the first message carrying one; the two are deduplicated per conversation within 60 seconds), `story_mention` on an Instagram story mention, `reaction` on a reaction (Instagram, Facebook, WhatsApp, Telegram groups), `comment` on an Instagram or Facebook comment (the run starts with no conversation and its first `send_message`, which must be text (with optional buttons or quick replies) or cards and must follow the trigger directly (checked on save; on some Instagram accounts Meta refuses buttons and cards to commenters who do not follow the account), is sent as a private reply to the comment; the run then continues in the conversation that reply opens; when an active comment automation's keywords match the comment, the automation answers and the workflow does not start), `whatsapp_event` on a WhatsApp status of a message we sent (filtered by `eventType`), `api_call` only via `POST /v1/workflows/{workflowId}/trigger`. `referral.matchType` defaults to `any`. `cooldownHours` (inbound_message, referral, story_mention, reaction and whatsapp_event) stops the same contact from starting the workflow again inside the window. A `whatsapp_event` workflow never starts on the status of a message a workflow, sequence or comment automation sent. A redelivered platform event never starts the same workflow twice.
|
|
17293
17299
|
*
|
|
17294
17300
|
* **Variables** available from the start of every run (absent values are `''`): `lastMessage`, `inboundText`, `triggerText`, `conversationId`, `contact.name`, `contact.phone`, `contact.handle`, `contact.tags` (array), `contact.fields` (the contact's custom fields object), `contact.lastInteractionAt` (ISO date), `contact.lastInteractionHoursAgo` (number), `contact.isFollower` (Instagram, from the stored profile: true, false or `''` when unknown), `referral.ref`, `referral.source`, `referral.type`, `referral.adId`, `postback.payload`, `postback.title`, `quickReply.payload`, `quickReply.title`, `story.id`, `story.url`, `comment.id`, `comment.text`, `comment.platformPostId`, `reaction.emoji`, `reaction.action` (added|removed). `api_call` runs also get the request's `variables`, merged over these. An array or object interpolated into text renders as JSON.
|
|
17295
17301
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -12242,7 +12242,7 @@ type SupportRun = {
|
|
|
12242
12242
|
*/
|
|
12243
12243
|
threadId: string;
|
|
12244
12244
|
/**
|
|
12245
|
-
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering.
|
|
12245
|
+
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
|
|
12246
12246
|
*/
|
|
12247
12247
|
status: 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
|
|
12248
12248
|
/**
|
|
@@ -12265,13 +12265,19 @@ type SupportRun = {
|
|
|
12265
12265
|
createdAt: string;
|
|
12266
12266
|
startedAt: (string) | null;
|
|
12267
12267
|
finishedAt: (string) | null;
|
|
12268
|
+
/**
|
|
12269
|
+
* Set when Ana opened a support ticket with the Zernio team. Null otherwise. A teammate follows up by email with the user whose API key started the run.
|
|
12270
|
+
*/
|
|
12271
|
+
supportTicket: {
|
|
12272
|
+
openedAt: string;
|
|
12273
|
+
} | null;
|
|
12268
12274
|
/**
|
|
12269
12275
|
* Seconds to wait before polling again. Present only while the run is queued or running.
|
|
12270
12276
|
*/
|
|
12271
12277
|
pollAfterSeconds?: number;
|
|
12272
12278
|
};
|
|
12273
12279
|
/**
|
|
12274
|
-
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering.
|
|
12280
|
+
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
|
|
12275
12281
|
*/
|
|
12276
12282
|
type status29 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
|
|
12277
12283
|
/**
|
|
@@ -17289,7 +17295,7 @@ type WorkflowNode = {
|
|
|
17289
17295
|
/**
|
|
17290
17296
|
* Type-specific settings. All string fields support `{{variable}}` interpolation against the run's variable bag (resolved at execution time).
|
|
17291
17297
|
*
|
|
17292
|
-
* **trigger**: `{ triggerType: inbound_message|api_call|whatsapp_event|referral|story_mention|comment|reaction, keywords:[string], matchType: any|contains|exact|regex, onlyFirstMessage:boolean, eventType: message_sent|message_delivered|message_read|message_failed|reaction, referral:{ ref, matchType: exact|prefix|any }, reaction:{ emojis:[string] }, comment:{ keywords:[string], matchType: any|contains|exact|regex, platformPostId }, cooldownHours:int (1-720) }`. Default `triggerType` is `inbound_message` for legacy nodes. A workflow starts only on events of its own trigger type: `inbound_message` on a message, `referral` on an ig.me / m.me / click-to-message ad referral (standalone, or the first message carrying one; the two are deduplicated per conversation within 60 seconds), `story_mention` on an Instagram story mention, `reaction` on a reaction (Instagram, Facebook, WhatsApp, Telegram groups), `comment` on an Instagram or Facebook comment (the run starts with no conversation and its first `send_message`, which must be text (with optional buttons or quick replies) or cards and must follow the trigger directly (checked on save; Instagram
|
|
17298
|
+
* **trigger**: `{ triggerType: inbound_message|api_call|whatsapp_event|referral|story_mention|comment|reaction, keywords:[string], matchType: any|contains|exact|regex, onlyFirstMessage:boolean, eventType: message_sent|message_delivered|message_read|message_failed|reaction, referral:{ ref, matchType: exact|prefix|any }, reaction:{ emojis:[string] }, comment:{ keywords:[string], matchType: any|contains|exact|regex, platformPostId }, cooldownHours:int (1-720) }`. Default `triggerType` is `inbound_message` for legacy nodes. A workflow starts only on events of its own trigger type: `inbound_message` on a message, `referral` on an ig.me / m.me / click-to-message ad referral (standalone, or the first message carrying one; the two are deduplicated per conversation within 60 seconds), `story_mention` on an Instagram story mention, `reaction` on a reaction (Instagram, Facebook, WhatsApp, Telegram groups), `comment` on an Instagram or Facebook comment (the run starts with no conversation and its first `send_message`, which must be text (with optional buttons or quick replies) or cards and must follow the trigger directly (checked on save; on some Instagram accounts Meta refuses buttons and cards to commenters who do not follow the account), is sent as a private reply to the comment; the run then continues in the conversation that reply opens; when an active comment automation's keywords match the comment, the automation answers and the workflow does not start), `whatsapp_event` on a WhatsApp status of a message we sent (filtered by `eventType`), `api_call` only via `POST /v1/workflows/{workflowId}/trigger`. `referral.matchType` defaults to `any`. `cooldownHours` (inbound_message, referral, story_mention, reaction and whatsapp_event) stops the same contact from starting the workflow again inside the window. A `whatsapp_event` workflow never starts on the status of a message a workflow, sequence or comment automation sent. A redelivered platform event never starts the same workflow twice.
|
|
17293
17299
|
*
|
|
17294
17300
|
* **Variables** available from the start of every run (absent values are `''`): `lastMessage`, `inboundText`, `triggerText`, `conversationId`, `contact.name`, `contact.phone`, `contact.handle`, `contact.tags` (array), `contact.fields` (the contact's custom fields object), `contact.lastInteractionAt` (ISO date), `contact.lastInteractionHoursAgo` (number), `contact.isFollower` (Instagram, from the stored profile: true, false or `''` when unknown), `referral.ref`, `referral.source`, `referral.type`, `referral.adId`, `postback.payload`, `postback.title`, `quickReply.payload`, `quickReply.title`, `story.id`, `story.url`, `comment.id`, `comment.text`, `comment.platformPostId`, `reaction.emoji`, `reaction.action` (added|removed). `api_call` runs also get the request's `variables`, merged over these. An array or object interpolated into text renders as JSON.
|
|
17295
17301
|
*
|
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.1156",
|
|
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.1156",
|
|
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
|
@@ -4927,13 +4927,15 @@ export const unlikePost = <ThrowOnError extends boolean = false>(options: Option
|
|
|
4927
4927
|
* One reply per comment, must be sent within 7 days. Optionally attach interactive elements:
|
|
4928
4928
|
* `quickReplies` (chips above the keyboard, max 13) or `buttons` (1-3 inline postback/url
|
|
4929
4929
|
* buttons rendered in the same bubble via Meta's button_template). Chips do not render in
|
|
4930
|
-
* the Instagram Message Requests folder.
|
|
4931
|
-
*
|
|
4932
|
-
*
|
|
4933
|
-
*
|
|
4934
|
-
*
|
|
4935
|
-
*
|
|
4936
|
-
*
|
|
4930
|
+
* the Instagram Message Requests folder. Instagram can refuse buttons, cards and
|
|
4931
|
+
* attachments to commenters who do not follow the account (Meta code 2, subcode 1545133,
|
|
4932
|
+
* returned here as a non-retryable 400 that says so). The refusal is uneven: most accounts
|
|
4933
|
+
* do not get it, an affected account gets it on many of its non-followers, and only that
|
|
4934
|
+
* account's own past refusals show whether it is affected. The failed call still consumes the
|
|
4935
|
+
* comment's single private reply. On an affected account, send plain text to reach
|
|
4936
|
+
* non-followers and add buttons once they reply. `quickReplies` and `buttons` are mutually
|
|
4937
|
+
* exclusive. When the comment's single private reply is spent (by this call or an earlier
|
|
4938
|
+
* one) the 400 carries `details.privateReplyConsumed: true`; never retry it.
|
|
4937
4939
|
*
|
|
4938
4940
|
*/
|
|
4939
4941
|
export const sendPrivateReplyToComment = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SendPrivateReplyToCommentData, ThrowOnError>) => {
|
|
@@ -8999,7 +9001,7 @@ export const addBroadcastRecipients = <ThrowOnError extends boolean = false>(opt
|
|
|
8999
9001
|
|
|
9000
9002
|
/**
|
|
9001
9003
|
* Start a support run (private beta)
|
|
9002
|
-
* Private beta: returns 403 `feature_not_available` unless enabled for your account. Asks Ana, the Zernio support agent, a question about your workspace. The run is asynchronous: this returns 202 with a `runId`, and the answer arrives through the `support.run.completed` and `support.run.failed` webhooks. `GET /v1/support/runs/{runId}` is the fallback. Pass `threadId` to continue an earlier conversation, and `context` to point Ana at a post, account or profile. Billed when the run finishes at the model cost plus 20%, never above `maxCostUsd`; failed runs are free. Requires an unrestricted API key, usage-based billing and a card on file. Limits per account: 3 active runs and $100 of runs per UTC month. Send an Idempotency-Key header to make retries safe.
|
|
9004
|
+
* Private beta: returns 403 `feature_not_available` unless enabled for your account. Asks Ana, the Zernio support agent, a question about your workspace. The run is asynchronous: this returns 202 with a `runId`, and the answer arrives through the `support.run.completed` and `support.run.failed` webhooks. `GET /v1/support/runs/{runId}` is the fallback. Pass `threadId` to continue an earlier conversation, and `context` to point Ana at a post, account or profile. Billed when the run finishes at the model cost plus 20%, never above `maxCostUsd`; failed runs are free. When Ana finds a problem on Zernio's side she opens a support ticket with the team (see `supportTicket` on the run) and the run ends as `needs_human`. Requires an unrestricted API key, usage-based billing and a card on file. Limits per account: 3 active runs and $100 of runs per UTC month. Send an Idempotency-Key header to make retries safe.
|
|
9003
9005
|
*/
|
|
9004
9006
|
export const createSupportRun = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateSupportRunData, ThrowOnError>) => {
|
|
9005
9007
|
return (options?.client ?? client).post<CreateSupportRunResponse, CreateSupportRunError, ThrowOnError>({
|
|
@@ -10705,7 +10705,7 @@ export type SupportRun = {
|
|
|
10705
10705
|
*/
|
|
10706
10706
|
threadId: string;
|
|
10707
10707
|
/**
|
|
10708
|
-
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering.
|
|
10708
|
+
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
|
|
10709
10709
|
*/
|
|
10710
10710
|
status: 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
|
|
10711
10711
|
/**
|
|
@@ -10728,6 +10728,12 @@ export type SupportRun = {
|
|
|
10728
10728
|
createdAt: string;
|
|
10729
10729
|
startedAt: (string) | null;
|
|
10730
10730
|
finishedAt: (string) | null;
|
|
10731
|
+
/**
|
|
10732
|
+
* Set when Ana opened a support ticket with the Zernio team. Null otherwise. A teammate follows up by email with the user whose API key started the run.
|
|
10733
|
+
*/
|
|
10734
|
+
supportTicket: {
|
|
10735
|
+
openedAt: string;
|
|
10736
|
+
} | null;
|
|
10731
10737
|
/**
|
|
10732
10738
|
* Seconds to wait before polling again. Present only while the run is queued or running.
|
|
10733
10739
|
*/
|
|
@@ -10735,7 +10741,7 @@ export type SupportRun = {
|
|
|
10735
10741
|
};
|
|
10736
10742
|
|
|
10737
10743
|
/**
|
|
10738
|
-
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering.
|
|
10744
|
+
* queued and running are in progress. needs_human means Ana handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
|
|
10739
10745
|
*/
|
|
10740
10746
|
export type status29 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
|
|
10741
10747
|
|
|
@@ -15956,7 +15962,7 @@ export type WorkflowNode = {
|
|
|
15956
15962
|
/**
|
|
15957
15963
|
* Type-specific settings. All string fields support `{{variable}}` interpolation against the run's variable bag (resolved at execution time).
|
|
15958
15964
|
*
|
|
15959
|
-
* **trigger**: `{ triggerType: inbound_message|api_call|whatsapp_event|referral|story_mention|comment|reaction, keywords:[string], matchType: any|contains|exact|regex, onlyFirstMessage:boolean, eventType: message_sent|message_delivered|message_read|message_failed|reaction, referral:{ ref, matchType: exact|prefix|any }, reaction:{ emojis:[string] }, comment:{ keywords:[string], matchType: any|contains|exact|regex, platformPostId }, cooldownHours:int (1-720) }`. Default `triggerType` is `inbound_message` for legacy nodes. A workflow starts only on events of its own trigger type: `inbound_message` on a message, `referral` on an ig.me / m.me / click-to-message ad referral (standalone, or the first message carrying one; the two are deduplicated per conversation within 60 seconds), `story_mention` on an Instagram story mention, `reaction` on a reaction (Instagram, Facebook, WhatsApp, Telegram groups), `comment` on an Instagram or Facebook comment (the run starts with no conversation and its first `send_message`, which must be text (with optional buttons or quick replies) or cards and must follow the trigger directly (checked on save; Instagram
|
|
15965
|
+
* **trigger**: `{ triggerType: inbound_message|api_call|whatsapp_event|referral|story_mention|comment|reaction, keywords:[string], matchType: any|contains|exact|regex, onlyFirstMessage:boolean, eventType: message_sent|message_delivered|message_read|message_failed|reaction, referral:{ ref, matchType: exact|prefix|any }, reaction:{ emojis:[string] }, comment:{ keywords:[string], matchType: any|contains|exact|regex, platformPostId }, cooldownHours:int (1-720) }`. Default `triggerType` is `inbound_message` for legacy nodes. A workflow starts only on events of its own trigger type: `inbound_message` on a message, `referral` on an ig.me / m.me / click-to-message ad referral (standalone, or the first message carrying one; the two are deduplicated per conversation within 60 seconds), `story_mention` on an Instagram story mention, `reaction` on a reaction (Instagram, Facebook, WhatsApp, Telegram groups), `comment` on an Instagram or Facebook comment (the run starts with no conversation and its first `send_message`, which must be text (with optional buttons or quick replies) or cards and must follow the trigger directly (checked on save; on some Instagram accounts Meta refuses buttons and cards to commenters who do not follow the account), is sent as a private reply to the comment; the run then continues in the conversation that reply opens; when an active comment automation's keywords match the comment, the automation answers and the workflow does not start), `whatsapp_event` on a WhatsApp status of a message we sent (filtered by `eventType`), `api_call` only via `POST /v1/workflows/{workflowId}/trigger`. `referral.matchType` defaults to `any`. `cooldownHours` (inbound_message, referral, story_mention, reaction and whatsapp_event) stops the same contact from starting the workflow again inside the window. A `whatsapp_event` workflow never starts on the status of a message a workflow, sequence or comment automation sent. A redelivered platform event never starts the same workflow twice.
|
|
15960
15966
|
*
|
|
15961
15967
|
* **Variables** available from the start of every run (absent values are `''`): `lastMessage`, `inboundText`, `triggerText`, `conversationId`, `contact.name`, `contact.phone`, `contact.handle`, `contact.tags` (array), `contact.fields` (the contact's custom fields object), `contact.lastInteractionAt` (ISO date), `contact.lastInteractionHoursAgo` (number), `contact.isFollower` (Instagram, from the stored profile: true, false or `''` when unknown), `referral.ref`, `referral.source`, `referral.type`, `referral.adId`, `postback.payload`, `postback.title`, `quickReply.payload`, `quickReply.title`, `story.id`, `story.url`, `comment.id`, `comment.text`, `comment.platformPostId`, `reaction.emoji`, `reaction.action` (added|removed). `api_call` runs also get the request's `variables`, merged over these. An array or object interpolated into text renders as JSON.
|
|
15962
15968
|
*
|