@getlatedev/node 0.2.1806 → 0.2.1807

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 CHANGED
@@ -78169,6 +78169,9 @@ type ListFormLeadsData = {
78169
78169
  };
78170
78170
  query: {
78171
78171
  accountId: string;
78172
+ /**
78173
+ * The pagination.cursor of the previous page.
78174
+ */
78172
78175
  cursor?: string;
78173
78176
  limit?: number;
78174
78177
  /**
@@ -78205,6 +78208,9 @@ type ListFormLeadsResponse = ({
78205
78208
  }>;
78206
78209
  pagination?: {
78207
78210
  hasMore?: boolean;
78211
+ /**
78212
+ * Send it as cursor to read the next page. Absent when hasMore is false.
78213
+ */
78208
78214
  cursor?: (string) | null;
78209
78215
  };
78210
78216
  meta?: {
@@ -78212,11 +78218,11 @@ type ListFormLeadsResponse = ({
78212
78218
  accountId?: string;
78213
78219
  formId?: string;
78214
78220
  /**
78215
- * persisted: leads stored from the webhook and the reconcile pass. live: read from Meta because none are stored for this form yet.
78221
+ * persisted: leads stored from the webhook and the recovery pass. live: read from Meta because none are stored for this form yet, or because content is not retained.
78216
78222
  */
78217
78223
  source?: 'persisted' | 'live';
78218
78224
  /**
78219
- * When Zernio last read this form's leads from Meta. For persisted leads, the last reconcile pass for the Page (null before the first one). For live reads, when the cached Graph read was made.
78225
+ * For persisted leads, when the recovery pass last finished for the Page (null before the first one). It does not prove every lead is stored. For live reads, when Meta was read.
78220
78226
  */
78221
78227
  lastCheckedAt?: (string) | null;
78222
78228
  lastUpdated?: string;
package/dist/index.d.ts CHANGED
@@ -78169,6 +78169,9 @@ type ListFormLeadsData = {
78169
78169
  };
78170
78170
  query: {
78171
78171
  accountId: string;
78172
+ /**
78173
+ * The pagination.cursor of the previous page.
78174
+ */
78172
78175
  cursor?: string;
78173
78176
  limit?: number;
78174
78177
  /**
@@ -78205,6 +78208,9 @@ type ListFormLeadsResponse = ({
78205
78208
  }>;
78206
78209
  pagination?: {
78207
78210
  hasMore?: boolean;
78211
+ /**
78212
+ * Send it as cursor to read the next page. Absent when hasMore is false.
78213
+ */
78208
78214
  cursor?: (string) | null;
78209
78215
  };
78210
78216
  meta?: {
@@ -78212,11 +78218,11 @@ type ListFormLeadsResponse = ({
78212
78218
  accountId?: string;
78213
78219
  formId?: string;
78214
78220
  /**
78215
- * persisted: leads stored from the webhook and the reconcile pass. live: read from Meta because none are stored for this form yet.
78221
+ * persisted: leads stored from the webhook and the recovery pass. live: read from Meta because none are stored for this form yet, or because content is not retained.
78216
78222
  */
78217
78223
  source?: 'persisted' | 'live';
78218
78224
  /**
78219
- * When Zernio last read this form's leads from Meta. For persisted leads, the last reconcile pass for the Page (null before the first one). For live reads, when the cached Graph read was made.
78225
+ * For persisted leads, when the recovery pass last finished for the Page (null before the first one). It does not prove every lead is stored. For live reads, when Meta was read.
78220
78226
  */
78221
78227
  lastCheckedAt?: (string) | null;
78222
78228
  lastUpdated?: string;
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.1806",
39
+ version: "0.2.1807",
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.1806",
8
+ version: "0.2.1807",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.1806",
3
+ "version": "0.2.1807",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -14325,7 +14325,7 @@ export const listCommentAutomations = <ThrowOnError extends boolean = false>(opt
14325
14325
  *
14326
14326
  * How fast the reply follows the comment:
14327
14327
  *
14328
- * - TikTok (business accounts only) and Threads: within seconds, since their comments arrive by webhook. Threads keeps the comment poll as a fallback.
14328
+ * - TikTok (business accounts only) and Threads: within seconds, since their comments arrive by webhook.
14329
14329
  * - LinkedIn and YouTube: up to the comment poll interval, 10 minutes on posts from the last 24 hours and longer on older posts.
14330
14330
  *
14331
14331
  * `repeatPolicy` applies there too: with the default `once`, a person gets one public reply per automation, and their later comments get none.
@@ -20208,7 +20208,7 @@ export const archiveLeadForm = <ThrowOnError extends boolean = false>(options: O
20208
20208
  * List leads for a single form
20209
20209
  * Lists the leads submitted through one Meta lead form.
20210
20210
  *
20211
- * It serves persisted leads (ingested via the leadgen webhook) when available, falling back to a live Graph read.
20211
+ * It serves the leads Zernio stored when the form has any, newest stored first. Otherwise it reads them live from Meta. No parameter forces a live read.
20212
20212
  *
20213
20213
  * ### Accounts
20214
20214
  *
@@ -20219,11 +20219,27 @@ export const archiveLeadForm = <ThrowOnError extends boolean = false>(options: O
20219
20219
  *
20220
20220
  * ### Freshness
20221
20221
  *
20222
- * Persisted leads arrive in real time through Meta's webhook. A background pass re-reads every Page from Meta to catch the leads the webhook misses: every 15 minutes for Pages that received a lead in the last 7 days.
20222
+ * Leads are stored within seconds through Meta's webhook. A recovery pass stores the leads the webhook missed and sends them as `lead.received` too.
20223
20223
  *
20224
- * `meta.lastCheckedAt` says when that pass last ran, so polling this endpoint faster than that returns nothing new. Subscribe to the `lead.received` webhook instead.
20224
+ * Recovered leads usually arrive within 15 minutes for Pages with a lead in the last 7 days, up to 4 hours for Pages with forms but no recent lead, and up to 3 days for a Page's first lead form. Failing Meta reads add up to 24 hours.
20225
20225
  *
20226
- * The live Graph read is cached for 5 minutes, and `meta.lastCheckedAt` is when it was read.
20226
+ * Reading this endpoint does not trigger that pass. A live read that finds leads only moves the Page's next pass forward.
20227
+ *
20228
+ * ### What recovery skips
20229
+ *
20230
+ * For a form with no stored lead, recovery reaches back 7 days. It reads only the first 200 forms Meta lists for a Page and skips archived or deleted forms. It stores at most 50 new leads per form per pass, leaving the rest for the next pass.
20231
+ *
20232
+ * A form whose missed backlog is too deep to page through is skipped and logged, so recovery is not proof that every lead is stored.
20233
+ *
20234
+ * ### meta.lastCheckedAt
20235
+ *
20236
+ * For stored leads, it is when the recovery pass last finished for the Page. That pass can skip forms, so the value can be recent while leads are missing, including on an empty page.
20237
+ *
20238
+ * For live reads, it is when Meta was read. With content retained, that read is cached for 5 minutes. With zero content retention, every read is live and uncached.
20239
+ *
20240
+ * ### Paging
20241
+ *
20242
+ * Pass `pagination.cursor` back as `cursor` while `hasMore` is true. Pages are not a snapshot: leads stored after the first page, recovered ones included, sort first and appear only when you read from the start again. Deduplicate on `id`.
20227
20243
  *
20228
20244
  */
20229
20245
  export const listFormLeads = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListFormLeadsData, ThrowOnError>) => {
@@ -80010,6 +80010,9 @@ export type ListFormLeadsData = {
80010
80010
  };
80011
80011
  query: {
80012
80012
  accountId: string;
80013
+ /**
80014
+ * The pagination.cursor of the previous page.
80015
+ */
80013
80016
  cursor?: string;
80014
80017
  limit?: number;
80015
80018
  /**
@@ -80047,6 +80050,9 @@ export type ListFormLeadsResponse = ({
80047
80050
  }>;
80048
80051
  pagination?: {
80049
80052
  hasMore?: boolean;
80053
+ /**
80054
+ * Send it as cursor to read the next page. Absent when hasMore is false.
80055
+ */
80050
80056
  cursor?: (string) | null;
80051
80057
  };
80052
80058
  meta?: {
@@ -80054,11 +80060,11 @@ export type ListFormLeadsResponse = ({
80054
80060
  accountId?: string;
80055
80061
  formId?: string;
80056
80062
  /**
80057
- * persisted: leads stored from the webhook and the reconcile pass. live: read from Meta because none are stored for this form yet.
80063
+ * persisted: leads stored from the webhook and the recovery pass. live: read from Meta because none are stored for this form yet, or because content is not retained.
80058
80064
  */
80059
80065
  source?: 'persisted' | 'live';
80060
80066
  /**
80061
- * When Zernio last read this form's leads from Meta. For persisted leads, the last reconcile pass for the Page (null before the first one). For live reads, when the cached Graph read was made.
80067
+ * For persisted leads, when the recovery pass last finished for the Page (null before the first one). It does not prove every lead is stored. For live reads, when Meta was read.
80062
80068
  */
80063
80069
  lastCheckedAt?: (string) | null;
80064
80070
  lastUpdated?: string;