@getlatedev/node 0.2.1805 → 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
@@ -32115,6 +32115,8 @@ type event85 = 'review.restored';
32115
32115
  *
32116
32116
  * When a reply is present, review.hasReply is true and review.reply is populated.
32117
32117
  *
32118
+ * On Facebook Pages it fires when the reviewer edits their review and when the Page adds or edits a reply, with the review read live from the Page. A reply sent through the API may be followed by a second delivery.
32119
+ *
32118
32120
  */
32119
32121
  type WebhookPayloadReviewUpdated = {
32120
32122
  /**
@@ -78167,6 +78169,9 @@ type ListFormLeadsData = {
78167
78169
  };
78168
78170
  query: {
78169
78171
  accountId: string;
78172
+ /**
78173
+ * The pagination.cursor of the previous page.
78174
+ */
78170
78175
  cursor?: string;
78171
78176
  limit?: number;
78172
78177
  /**
@@ -78203,6 +78208,9 @@ type ListFormLeadsResponse = ({
78203
78208
  }>;
78204
78209
  pagination?: {
78205
78210
  hasMore?: boolean;
78211
+ /**
78212
+ * Send it as cursor to read the next page. Absent when hasMore is false.
78213
+ */
78206
78214
  cursor?: (string) | null;
78207
78215
  };
78208
78216
  meta?: {
@@ -78210,11 +78218,11 @@ type ListFormLeadsResponse = ({
78210
78218
  accountId?: string;
78211
78219
  formId?: string;
78212
78220
  /**
78213
- * 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.
78214
78222
  */
78215
78223
  source?: 'persisted' | 'live';
78216
78224
  /**
78217
- * 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.
78218
78226
  */
78219
78227
  lastCheckedAt?: (string) | null;
78220
78228
  lastUpdated?: string;
package/dist/index.d.ts CHANGED
@@ -32115,6 +32115,8 @@ type event85 = 'review.restored';
32115
32115
  *
32116
32116
  * When a reply is present, review.hasReply is true and review.reply is populated.
32117
32117
  *
32118
+ * On Facebook Pages it fires when the reviewer edits their review and when the Page adds or edits a reply, with the review read live from the Page. A reply sent through the API may be followed by a second delivery.
32119
+ *
32118
32120
  */
32119
32121
  type WebhookPayloadReviewUpdated = {
32120
32122
  /**
@@ -78167,6 +78169,9 @@ type ListFormLeadsData = {
78167
78169
  };
78168
78170
  query: {
78169
78171
  accountId: string;
78172
+ /**
78173
+ * The pagination.cursor of the previous page.
78174
+ */
78170
78175
  cursor?: string;
78171
78176
  limit?: number;
78172
78177
  /**
@@ -78203,6 +78208,9 @@ type ListFormLeadsResponse = ({
78203
78208
  }>;
78204
78209
  pagination?: {
78205
78210
  hasMore?: boolean;
78211
+ /**
78212
+ * Send it as cursor to read the next page. Absent when hasMore is false.
78213
+ */
78206
78214
  cursor?: (string) | null;
78207
78215
  };
78208
78216
  meta?: {
@@ -78210,11 +78218,11 @@ type ListFormLeadsResponse = ({
78210
78218
  accountId?: string;
78211
78219
  formId?: string;
78212
78220
  /**
78213
- * 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.
78214
78222
  */
78215
78223
  source?: 'persisted' | 'live';
78216
78224
  /**
78217
- * 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.
78218
78226
  */
78219
78227
  lastCheckedAt?: (string) | null;
78220
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.1805",
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.1805",
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.1805",
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>) => {
@@ -30778,6 +30778,8 @@ export type event85 = 'review.restored';
30778
30778
  *
30779
30779
  * When a reply is present, review.hasReply is true and review.reply is populated.
30780
30780
  *
30781
+ * On Facebook Pages it fires when the reviewer edits their review and when the Page adds or edits a reply, with the review read live from the Page. A reply sent through the API may be followed by a second delivery.
30782
+ *
30781
30783
  */
30782
30784
  export type WebhookPayloadReviewUpdated = {
30783
30785
  /**
@@ -80008,6 +80010,9 @@ export type ListFormLeadsData = {
80008
80010
  };
80009
80011
  query: {
80010
80012
  accountId: string;
80013
+ /**
80014
+ * The pagination.cursor of the previous page.
80015
+ */
80011
80016
  cursor?: string;
80012
80017
  limit?: number;
80013
80018
  /**
@@ -80045,6 +80050,9 @@ export type ListFormLeadsResponse = ({
80045
80050
  }>;
80046
80051
  pagination?: {
80047
80052
  hasMore?: boolean;
80053
+ /**
80054
+ * Send it as cursor to read the next page. Absent when hasMore is false.
80055
+ */
80048
80056
  cursor?: (string) | null;
80049
80057
  };
80050
80058
  meta?: {
@@ -80052,11 +80060,11 @@ export type ListFormLeadsResponse = ({
80052
80060
  accountId?: string;
80053
80061
  formId?: string;
80054
80062
  /**
80055
- * 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.
80056
80064
  */
80057
80065
  source?: 'persisted' | 'live';
80058
80066
  /**
80059
- * 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.
80060
80068
  */
80061
80069
  lastCheckedAt?: (string) | null;
80062
80070
  lastUpdated?: string;