@getlatedev/node 0.2.1806 → 0.2.1808

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
@@ -56249,7 +56249,7 @@ type ReplyToMentionError = (unknown | ErrorResponse);
56249
56249
  type ListInboxReviewsData = {
56250
56250
  query?: {
56251
56251
  /**
56252
- * Filter by specific account ID
56252
+ * One account id, or several comma-separated.
56253
56253
  */
56254
56254
  accountId?: string;
56255
56255
  cursor?: string;
@@ -56347,6 +56347,13 @@ type ListInboxReviewsResponse = ({
56347
56347
  accountId?: string;
56348
56348
  platform?: string;
56349
56349
  }>;
56350
+ /**
56351
+ * Accounts whose listing hit the read budget with pages left: their reviews in data, and the Google Business Profile summary, are partial. Empty when every account was read in full.
56352
+ */
56353
+ truncatedAccounts?: Array<{
56354
+ accountId?: string;
56355
+ platform?: string;
56356
+ }>;
56350
56357
  };
56351
56358
  summary?: {
56352
56359
  totalReviews?: number;
@@ -78169,6 +78176,9 @@ type ListFormLeadsData = {
78169
78176
  };
78170
78177
  query: {
78171
78178
  accountId: string;
78179
+ /**
78180
+ * The pagination.cursor of the previous page.
78181
+ */
78172
78182
  cursor?: string;
78173
78183
  limit?: number;
78174
78184
  /**
@@ -78205,6 +78215,9 @@ type ListFormLeadsResponse = ({
78205
78215
  }>;
78206
78216
  pagination?: {
78207
78217
  hasMore?: boolean;
78218
+ /**
78219
+ * Send it as cursor to read the next page. Absent when hasMore is false.
78220
+ */
78208
78221
  cursor?: (string) | null;
78209
78222
  };
78210
78223
  meta?: {
@@ -78212,11 +78225,11 @@ type ListFormLeadsResponse = ({
78212
78225
  accountId?: string;
78213
78226
  formId?: string;
78214
78227
  /**
78215
- * persisted: leads stored from the webhook and the reconcile pass. live: read from Meta because none are stored for this form yet.
78228
+ * 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
78229
  */
78217
78230
  source?: 'persisted' | 'live';
78218
78231
  /**
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.
78232
+ * 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
78233
  */
78221
78234
  lastCheckedAt?: (string) | null;
78222
78235
  lastUpdated?: string;
package/dist/index.d.ts CHANGED
@@ -56249,7 +56249,7 @@ type ReplyToMentionError = (unknown | ErrorResponse);
56249
56249
  type ListInboxReviewsData = {
56250
56250
  query?: {
56251
56251
  /**
56252
- * Filter by specific account ID
56252
+ * One account id, or several comma-separated.
56253
56253
  */
56254
56254
  accountId?: string;
56255
56255
  cursor?: string;
@@ -56347,6 +56347,13 @@ type ListInboxReviewsResponse = ({
56347
56347
  accountId?: string;
56348
56348
  platform?: string;
56349
56349
  }>;
56350
+ /**
56351
+ * Accounts whose listing hit the read budget with pages left: their reviews in data, and the Google Business Profile summary, are partial. Empty when every account was read in full.
56352
+ */
56353
+ truncatedAccounts?: Array<{
56354
+ accountId?: string;
56355
+ platform?: string;
56356
+ }>;
56350
56357
  };
56351
56358
  summary?: {
56352
56359
  totalReviews?: number;
@@ -78169,6 +78176,9 @@ type ListFormLeadsData = {
78169
78176
  };
78170
78177
  query: {
78171
78178
  accountId: string;
78179
+ /**
78180
+ * The pagination.cursor of the previous page.
78181
+ */
78172
78182
  cursor?: string;
78173
78183
  limit?: number;
78174
78184
  /**
@@ -78205,6 +78215,9 @@ type ListFormLeadsResponse = ({
78205
78215
  }>;
78206
78216
  pagination?: {
78207
78217
  hasMore?: boolean;
78218
+ /**
78219
+ * Send it as cursor to read the next page. Absent when hasMore is false.
78220
+ */
78208
78221
  cursor?: (string) | null;
78209
78222
  };
78210
78223
  meta?: {
@@ -78212,11 +78225,11 @@ type ListFormLeadsResponse = ({
78212
78225
  accountId?: string;
78213
78226
  formId?: string;
78214
78227
  /**
78215
- * persisted: leads stored from the webhook and the reconcile pass. live: read from Meta because none are stored for this form yet.
78228
+ * 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
78229
  */
78217
78230
  source?: 'persisted' | 'live';
78218
78231
  /**
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.
78232
+ * 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
78233
  */
78221
78234
  lastCheckedAt?: (string) | null;
78222
78235
  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.1808",
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.1808",
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.1808",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -9804,7 +9804,7 @@ export const replyToMention = <ThrowOnError extends boolean = false>(options: Op
9804
9804
  * Fetch reviews from all connected Facebook Pages and Google Business Profile accounts. Aggregates data with filtering and sorting options.
9805
9805
  * Supported platforms: Facebook, Google Business Profile.
9806
9806
  *
9807
- * Each account's reviews are read from the platform page by page within a 20-second budget per request, so very large accounts can come back truncated. Each account's listing is cached for up to 60 seconds.
9807
+ * Each account's reviews are read from the platform page by page within a 20-second budget per request, so very large accounts can come back truncated; those accounts are listed in meta.truncatedAccounts. Each account's listing is cached for up to 60 seconds.
9808
9808
  *
9809
9809
  */
9810
9810
  export const listInboxReviews = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListInboxReviewsData, ThrowOnError>) => {
@@ -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>) => {
@@ -56543,7 +56543,7 @@ export type ReplyToMentionError = (unknown | ErrorResponse);
56543
56543
  export type ListInboxReviewsData = {
56544
56544
  query?: {
56545
56545
  /**
56546
- * Filter by specific account ID
56546
+ * One account id, or several comma-separated.
56547
56547
  */
56548
56548
  accountId?: string;
56549
56549
  cursor?: string;
@@ -56642,6 +56642,13 @@ export type ListInboxReviewsResponse = ({
56642
56642
  accountId?: string;
56643
56643
  platform?: string;
56644
56644
  }>;
56645
+ /**
56646
+ * Accounts whose listing hit the read budget with pages left: their reviews in data, and the Google Business Profile summary, are partial. Empty when every account was read in full.
56647
+ */
56648
+ truncatedAccounts?: Array<{
56649
+ accountId?: string;
56650
+ platform?: string;
56651
+ }>;
56645
56652
  };
56646
56653
  summary?: {
56647
56654
  totalReviews?: number;
@@ -80010,6 +80017,9 @@ export type ListFormLeadsData = {
80010
80017
  };
80011
80018
  query: {
80012
80019
  accountId: string;
80020
+ /**
80021
+ * The pagination.cursor of the previous page.
80022
+ */
80013
80023
  cursor?: string;
80014
80024
  limit?: number;
80015
80025
  /**
@@ -80047,6 +80057,9 @@ export type ListFormLeadsResponse = ({
80047
80057
  }>;
80048
80058
  pagination?: {
80049
80059
  hasMore?: boolean;
80060
+ /**
80061
+ * Send it as cursor to read the next page. Absent when hasMore is false.
80062
+ */
80050
80063
  cursor?: (string) | null;
80051
80064
  };
80052
80065
  meta?: {
@@ -80054,11 +80067,11 @@ export type ListFormLeadsResponse = ({
80054
80067
  accountId?: string;
80055
80068
  formId?: string;
80056
80069
  /**
80057
- * persisted: leads stored from the webhook and the reconcile pass. live: read from Meta because none are stored for this form yet.
80070
+ * 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
80071
  */
80059
80072
  source?: 'persisted' | 'live';
80060
80073
  /**
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.
80074
+ * 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
80075
  */
80063
80076
  lastCheckedAt?: (string) | null;
80064
80077
  lastUpdated?: string;