@zernio/node 0.2.1854 → 0.2.1856

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
@@ -60239,6 +60239,10 @@ type GetWhatsAppNumberInfoResponse = ({
60239
60239
  * Meta integer timezone-enum id
60240
60240
  */
60241
60241
  timezone_id?: string;
60242
+ /**
60243
+ * ISO 4217 currency of the WABA's payment method (for example USD or BRL). Null when Meta does not return it.
60244
+ */
60245
+ currency?: (string) | null;
60242
60246
  health_status?: {
60243
60247
  [key: string]: unknown;
60244
60248
  };
@@ -60297,6 +60301,10 @@ type GetWhatsAppPricingAnalyticsResponse = ({
60297
60301
  granularity: 'HALF_HOUR' | 'DAILY' | 'MONTHLY';
60298
60302
  start: string;
60299
60303
  end: string;
60304
+ /**
60305
+ * ISO 4217 currency every `cost` is in, from the WABA's payment method (for example USD or BRL). Null when Meta does not return it.
60306
+ */
60307
+ currency: (string) | null;
60300
60308
  dataPoints: Array<{
60301
60309
  start: string;
60302
60310
  end: string;
@@ -60325,7 +60333,7 @@ type GetWhatsAppPricingAnalyticsResponse = ({
60325
60333
  */
60326
60334
  volume: (number) | null;
60327
60335
  /**
60328
- * Approximate charge, in the currency of the WABA's payment method.
60336
+ * Approximate charge, in the currency given by `currency`.
60329
60337
  */
60330
60338
  cost: (number) | null;
60331
60339
  }>;
@@ -78511,7 +78519,7 @@ type ListLeadsResponse = ({
78511
78519
  };
78512
78520
  meta?: {
78513
78521
  /**
78514
- * Meta only, present when `accountId` is passed: when Zernio last re-read the Page's forms from Meta to catch leads the webhook missed. Null when no leads matched or before the first pass.
78522
+ * Meta only, present when `accountId` is passed: when the recovery pass that catches leads the webhook missed last ran for the Page, failed or parked passes included, so not proof the forms were read. Null when no leads matched or before the first pass.
78515
78523
  */
78516
78524
  lastCheckedAt?: (string) | null;
78517
78525
  lastUpdated?: string;
@@ -78999,7 +79007,7 @@ type ListFormLeadsResponse = ({
78999
79007
  */
79000
79008
  source?: 'persisted' | 'live';
79001
79009
  /**
79002
- * 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.
79010
+ * For persisted leads, when the recovery pass last ran for the Page, failed or parked passes included (null before the first one). It does not prove every lead is stored. For live reads, when Meta was read.
79003
79011
  */
79004
79012
  lastCheckedAt?: (string) | null;
79005
79013
  lastUpdated?: string;
package/dist/index.d.ts CHANGED
@@ -60239,6 +60239,10 @@ type GetWhatsAppNumberInfoResponse = ({
60239
60239
  * Meta integer timezone-enum id
60240
60240
  */
60241
60241
  timezone_id?: string;
60242
+ /**
60243
+ * ISO 4217 currency of the WABA's payment method (for example USD or BRL). Null when Meta does not return it.
60244
+ */
60245
+ currency?: (string) | null;
60242
60246
  health_status?: {
60243
60247
  [key: string]: unknown;
60244
60248
  };
@@ -60297,6 +60301,10 @@ type GetWhatsAppPricingAnalyticsResponse = ({
60297
60301
  granularity: 'HALF_HOUR' | 'DAILY' | 'MONTHLY';
60298
60302
  start: string;
60299
60303
  end: string;
60304
+ /**
60305
+ * ISO 4217 currency every `cost` is in, from the WABA's payment method (for example USD or BRL). Null when Meta does not return it.
60306
+ */
60307
+ currency: (string) | null;
60300
60308
  dataPoints: Array<{
60301
60309
  start: string;
60302
60310
  end: string;
@@ -60325,7 +60333,7 @@ type GetWhatsAppPricingAnalyticsResponse = ({
60325
60333
  */
60326
60334
  volume: (number) | null;
60327
60335
  /**
60328
- * Approximate charge, in the currency of the WABA's payment method.
60336
+ * Approximate charge, in the currency given by `currency`.
60329
60337
  */
60330
60338
  cost: (number) | null;
60331
60339
  }>;
@@ -78511,7 +78519,7 @@ type ListLeadsResponse = ({
78511
78519
  };
78512
78520
  meta?: {
78513
78521
  /**
78514
- * Meta only, present when `accountId` is passed: when Zernio last re-read the Page's forms from Meta to catch leads the webhook missed. Null when no leads matched or before the first pass.
78522
+ * Meta only, present when `accountId` is passed: when the recovery pass that catches leads the webhook missed last ran for the Page, failed or parked passes included, so not proof the forms were read. Null when no leads matched or before the first pass.
78515
78523
  */
78516
78524
  lastCheckedAt?: (string) | null;
78517
78525
  lastUpdated?: string;
@@ -78999,7 +79007,7 @@ type ListFormLeadsResponse = ({
78999
79007
  */
79000
79008
  source?: 'persisted' | 'live';
79001
79009
  /**
79002
- * 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.
79010
+ * For persisted leads, when the recovery pass last ran for the Page, failed or parked passes included (null before the first one). It does not prove every lead is stored. For live reads, when Meta was read.
79003
79011
  */
79004
79012
  lastCheckedAt?: (string) | null;
79005
79013
  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: "@zernio/node",
39
- version: "0.2.1854",
39
+ version: "0.2.1856",
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: "@zernio/node",
8
- version: "0.2.1854",
8
+ version: "0.2.1856",
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": "@zernio/node",
3
- "version": "0.2.1854",
3
+ "version": "0.2.1856",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -11906,6 +11906,7 @@ export const getWhatsappBusinessUsernameSuggestions = <ThrowOnError extends bool
11906
11906
  * - name
11907
11907
  * - business verification
11908
11908
  * - timezone
11909
+ * - billing currency
11909
11910
  * - health_status
11910
11911
  *
11911
11912
  * ### Why live
@@ -20385,7 +20386,9 @@ export const archiveLeadForm = <ThrowOnError extends boolean = false>(options: O
20385
20386
  * List leads for a single form
20386
20387
  * Lists the leads submitted through one Meta lead form.
20387
20388
  *
20388
- * 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.
20389
+ * It serves the leads Zernio stored when the form has at least one stored lead matching `since`, newest stored first. Otherwise it reads them live from Meta. No parameter forces a live read, but a `since` later than every stored lead reads the first page live.
20390
+ *
20391
+ * Stored reads are all or nothing per form: once a stored lead matches, a lead the webhook missed appears only after recovery stores it.
20389
20392
  *
20390
20393
  * ### Accounts
20391
20394
  *
@@ -20402,6 +20405,8 @@ export const archiveLeadForm = <ThrowOnError extends boolean = false>(options: O
20402
20405
  *
20403
20406
  * Reading this endpoint does not trigger that pass. A live read that finds leads only moves the Page's next pass forward.
20404
20407
  *
20408
+ * No mode guarantees that every lead submitted in the last few minutes is on a page. To close a recovery window, read again from the start after the Page's next pass and deduplicate on `id`.
20409
+ *
20405
20410
  * ### What recovery skips
20406
20411
  *
20407
20412
  * 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.
@@ -20410,7 +20415,9 @@ export const archiveLeadForm = <ThrowOnError extends boolean = false>(options: O
20410
20415
  *
20411
20416
  * ### meta.lastCheckedAt
20412
20417
  *
20413
- * 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.
20418
+ * For stored leads, it is when the recovery pass last ran for the Page. That includes a pass that failed, and one parked because the account or the Page token is missing, which reads no forms. A pass cut short by the recovery job's time budget is not recorded.
20419
+ *
20420
+ * Passes can also skip forms, so the value can be recent while leads are missing, including on an empty page. It is `null` when the account has had no pass.
20414
20421
  *
20415
20422
  * 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.
20416
20423
  *
@@ -20418,6 +20425,24 @@ export const archiveLeadForm = <ThrowOnError extends boolean = false>(options: O
20418
20425
  *
20419
20426
  * 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`.
20420
20427
  *
20428
+ * Stored pages walk Zernio's own ids, so a resumed cursor neither skips nor repeats leads that were stored when the walk started. `since` filters on Meta's created time.
20429
+ *
20430
+ * Live pages follow Meta's cursor and each page is cached separately for up to 5 minutes, so one walk can mix moments.
20431
+ *
20432
+ * A live cursor stays live even once leads are stored. A stored cursor does not survive a switch to zero content retention mid-walk: start again from the first page.
20433
+ *
20434
+ * ### Zero content retention
20435
+ *
20436
+ * Every page is read live from Meta, uncached, and nothing is stored. Completeness is what Meta returns. As on every live page, leads come without `leadId` and `status`, `createdTime` is Meta's and `lastCheckedAt` is the time of that read.
20437
+ *
20438
+ * The 48-hour sweep in the leads docs is about `lead.received` webhook delivery, not this endpoint.
20439
+ *
20440
+ * ### Limits
20441
+ *
20442
+ * `limit` is 1 to 100 (default 25). The plan's per-minute API rate limit applies, and live reads also count against Meta's own limits.
20443
+ *
20444
+ * The route needs the Ads add-on and has no per-request charge. Zernio does not expire stored leads on a schedule; live reads return what Meta still holds.
20445
+ *
20421
20446
  */
20422
20447
  export const listFormLeads = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListFormLeadsData, ThrowOnError>) => {
20423
20448
  return (options?.client ?? client).get<ListFormLeadsResponse, ListFormLeadsError, ThrowOnError>({
@@ -60910,6 +60910,10 @@ export type GetWhatsAppNumberInfoResponse = ({
60910
60910
  * Meta integer timezone-enum id
60911
60911
  */
60912
60912
  timezone_id?: string;
60913
+ /**
60914
+ * ISO 4217 currency of the WABA's payment method (for example USD or BRL). Null when Meta does not return it.
60915
+ */
60916
+ currency?: (string) | null;
60913
60917
  health_status?: {
60914
60918
  [key: string]: unknown;
60915
60919
  };
@@ -60971,6 +60975,10 @@ export type GetWhatsAppPricingAnalyticsResponse = ({
60971
60975
  granularity: 'HALF_HOUR' | 'DAILY' | 'MONTHLY';
60972
60976
  start: string;
60973
60977
  end: string;
60978
+ /**
60979
+ * ISO 4217 currency every `cost` is in, from the WABA's payment method (for example USD or BRL). Null when Meta does not return it.
60980
+ */
60981
+ currency: (string) | null;
60974
60982
  dataPoints: Array<{
60975
60983
  start: string;
60976
60984
  end: string;
@@ -60999,7 +61007,7 @@ export type GetWhatsAppPricingAnalyticsResponse = ({
60999
61007
  */
61000
61008
  volume: (number) | null;
61001
61009
  /**
61002
- * Approximate charge, in the currency of the WABA's payment method.
61010
+ * Approximate charge, in the currency given by `currency`.
61003
61011
  */
61004
61012
  cost: (number) | null;
61005
61013
  }>;
@@ -80351,7 +80359,7 @@ export type ListLeadsResponse = ({
80351
80359
  };
80352
80360
  meta?: {
80353
80361
  /**
80354
- * Meta only, present when `accountId` is passed: when Zernio last re-read the Page's forms from Meta to catch leads the webhook missed. Null when no leads matched or before the first pass.
80362
+ * Meta only, present when `accountId` is passed: when the recovery pass that catches leads the webhook missed last ran for the Page, failed or parked passes included, so not proof the forms were read. Null when no leads matched or before the first pass.
80355
80363
  */
80356
80364
  lastCheckedAt?: (string) | null;
80357
80365
  lastUpdated?: string;
@@ -80863,7 +80871,7 @@ export type ListFormLeadsResponse = ({
80863
80871
  */
80864
80872
  source?: 'persisted' | 'live';
80865
80873
  /**
80866
- * 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.
80874
+ * For persisted leads, when the recovery pass last ran for the Page, failed or parked passes included (null before the first one). It does not prove every lead is stored. For live reads, when Meta was read.
80867
80875
  */
80868
80876
  lastCheckedAt?: (string) | null;
80869
80877
  lastUpdated?: string;