@getlatedev/node 0.2.1150 → 0.2.1152

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
@@ -15152,7 +15152,7 @@ type WebhookPayloadMessage = {
15152
15152
  */
15153
15153
  metadata?: {
15154
15154
  /**
15155
- * true when this inbound arrived on Meta's standby path because another app owned the conversation: Meta Business Agent on WhatsApp, another handover receiver (such as Page Inbox) on Facebook and Instagram. That app answers it, Zernio only observes, and no automation runs. On WhatsApp sending a reply takes control back; on Facebook and Instagram take control first with POST /v1/inbox/conversations/{conversationId}/thread-control. See conversation.control_changed.
15155
+ * true when this inbound arrived on Meta's standby path because another app owned the conversation: Meta Business Agent on WhatsApp, another handover receiver (such as Page Inbox) on Facebook and Instagram. That app answers it, Zernio only observes, and no automation runs. On WhatsApp sending a reply takes control back; on Facebook, and on Instagram accounts connected through a Facebook Page, take control first with POST /v1/inbox/conversations/{conversationId}/thread-control; an Instagram Login connection cannot take or request and waits for the owner to pass it. See conversation.control_changed.
15156
15156
  */
15157
15157
  standby?: boolean;
15158
15158
  /**
@@ -20728,6 +20728,16 @@ type GetAllAccountsHealthResponse = ({
20728
20728
  */
20729
20729
  needsReconnect?: boolean;
20730
20730
  issues?: Array<(string)>;
20731
+ /**
20732
+ * Absent on platforms without analytics sync. failing: several consecutive sync attempts failed. stalled: a sync was requested over 6 hours ago and never completed. never_synced: no sync has completed yet. Failing and stalled raise the account status to at least warning.
20733
+ */
20734
+ analyticsSync?: {
20735
+ status?: 'ok' | 'failing' | 'stalled' | 'never_synced';
20736
+ /**
20737
+ * Last successful sync. Null when never synced or the latest attempt failed.
20738
+ */
20739
+ lastSyncedAt?: (string) | null;
20740
+ };
20731
20741
  /**
20732
20742
  * Observed from Meta's own errors on our own sends, not a live probe. Facebook/Instagram: error subcodes 2534122, 1893063, 2534029, set on the first refused send and cleared when a later send succeeds. WhatsApp: Cloud API error codes 131042 (payment or eligibility issue), 131031 (Business Account locked) and 368 (policy block), set when a send or a delivery status fails with one and cleared when a later message is delivered. It lags reality by one message in each direction. After subcode 1893063 (Meta refusing the Page's messages), comment automation DMs are held and one is retried at `pausedUntil`: 30 minutes, doubling per refused retry up to 4 hours; held DMs stay pending and are sent once Meta accepts again, within the 7-day private-reply window.
20733
20743
  */
@@ -20882,6 +20892,16 @@ type GetAccountHealthResponse = ({
20882
20892
  * Actionable recommendations to fix issues
20883
20893
  */
20884
20894
  recommendations?: Array<(string)>;
20895
+ /**
20896
+ * Absent on platforms without analytics sync. failing: several consecutive sync attempts failed. stalled: a sync was requested over 6 hours ago and never completed. never_synced: no sync has completed yet. Failing and stalled raise the account status to at least warning.
20897
+ */
20898
+ analyticsSync?: {
20899
+ status?: 'ok' | 'failing' | 'stalled' | 'never_synced';
20900
+ /**
20901
+ * Last successful sync. Null when never synced or the latest attempt failed.
20902
+ */
20903
+ lastSyncedAt?: (string) | null;
20904
+ };
20885
20905
  /**
20886
20906
  * Observed from Meta's own errors on our own sends, not a live probe. Facebook/Instagram: error subcodes 2534122, 1893063, 2534029, set on the first refused send and cleared when a later send succeeds. WhatsApp: Cloud API error codes 131042 (payment or eligibility issue), 131031 (Business Account locked) and 368 (policy block), set when a send or a delivery status fails with one and cleared when a later message is delivered. It lags reality by one message in each direction. After subcode 1893063 (Meta refusing the Page's messages), comment automation DMs are held and one is retried at `pausedUntil`: 30 minutes, doubling per refused retry up to 4 hours; held DMs stay pending and are sent once Meta accepts again, within the 7-day private-reply window.
20887
20907
  */
@@ -29389,7 +29409,7 @@ type SetConversationThreadControlData = {
29389
29409
  */
29390
29410
  accountId: string;
29391
29411
  /**
29392
- * `request` is Facebook and Instagram only.
29412
+ * `request` is Facebook and Instagram only. `take` and `request` are refused with `platform_not_supported` on Instagram accounts connected with Instagram Login.
29393
29413
  */
29394
29414
  action: 'release' | 'take' | 'pass' | 'request';
29395
29415
  /**
package/dist/index.d.ts CHANGED
@@ -15152,7 +15152,7 @@ type WebhookPayloadMessage = {
15152
15152
  */
15153
15153
  metadata?: {
15154
15154
  /**
15155
- * true when this inbound arrived on Meta's standby path because another app owned the conversation: Meta Business Agent on WhatsApp, another handover receiver (such as Page Inbox) on Facebook and Instagram. That app answers it, Zernio only observes, and no automation runs. On WhatsApp sending a reply takes control back; on Facebook and Instagram take control first with POST /v1/inbox/conversations/{conversationId}/thread-control. See conversation.control_changed.
15155
+ * true when this inbound arrived on Meta's standby path because another app owned the conversation: Meta Business Agent on WhatsApp, another handover receiver (such as Page Inbox) on Facebook and Instagram. That app answers it, Zernio only observes, and no automation runs. On WhatsApp sending a reply takes control back; on Facebook, and on Instagram accounts connected through a Facebook Page, take control first with POST /v1/inbox/conversations/{conversationId}/thread-control; an Instagram Login connection cannot take or request and waits for the owner to pass it. See conversation.control_changed.
15156
15156
  */
15157
15157
  standby?: boolean;
15158
15158
  /**
@@ -20728,6 +20728,16 @@ type GetAllAccountsHealthResponse = ({
20728
20728
  */
20729
20729
  needsReconnect?: boolean;
20730
20730
  issues?: Array<(string)>;
20731
+ /**
20732
+ * Absent on platforms without analytics sync. failing: several consecutive sync attempts failed. stalled: a sync was requested over 6 hours ago and never completed. never_synced: no sync has completed yet. Failing and stalled raise the account status to at least warning.
20733
+ */
20734
+ analyticsSync?: {
20735
+ status?: 'ok' | 'failing' | 'stalled' | 'never_synced';
20736
+ /**
20737
+ * Last successful sync. Null when never synced or the latest attempt failed.
20738
+ */
20739
+ lastSyncedAt?: (string) | null;
20740
+ };
20731
20741
  /**
20732
20742
  * Observed from Meta's own errors on our own sends, not a live probe. Facebook/Instagram: error subcodes 2534122, 1893063, 2534029, set on the first refused send and cleared when a later send succeeds. WhatsApp: Cloud API error codes 131042 (payment or eligibility issue), 131031 (Business Account locked) and 368 (policy block), set when a send or a delivery status fails with one and cleared when a later message is delivered. It lags reality by one message in each direction. After subcode 1893063 (Meta refusing the Page's messages), comment automation DMs are held and one is retried at `pausedUntil`: 30 minutes, doubling per refused retry up to 4 hours; held DMs stay pending and are sent once Meta accepts again, within the 7-day private-reply window.
20733
20743
  */
@@ -20882,6 +20892,16 @@ type GetAccountHealthResponse = ({
20882
20892
  * Actionable recommendations to fix issues
20883
20893
  */
20884
20894
  recommendations?: Array<(string)>;
20895
+ /**
20896
+ * Absent on platforms without analytics sync. failing: several consecutive sync attempts failed. stalled: a sync was requested over 6 hours ago and never completed. never_synced: no sync has completed yet. Failing and stalled raise the account status to at least warning.
20897
+ */
20898
+ analyticsSync?: {
20899
+ status?: 'ok' | 'failing' | 'stalled' | 'never_synced';
20900
+ /**
20901
+ * Last successful sync. Null when never synced or the latest attempt failed.
20902
+ */
20903
+ lastSyncedAt?: (string) | null;
20904
+ };
20885
20905
  /**
20886
20906
  * Observed from Meta's own errors on our own sends, not a live probe. Facebook/Instagram: error subcodes 2534122, 1893063, 2534029, set on the first refused send and cleared when a later send succeeds. WhatsApp: Cloud API error codes 131042 (payment or eligibility issue), 131031 (Business Account locked) and 368 (policy block), set when a send or a delivery status fails with one and cleared when a later message is delivered. It lags reality by one message in each direction. After subcode 1893063 (Meta refusing the Page's messages), comment automation DMs are held and one is retried at `pausedUntil`: 30 minutes, doubling per refused retry up to 4 hours; held DMs stay pending and are sent once Meta accepts again, within the 7-day private-reply window.
20887
20907
  */
@@ -29389,7 +29409,7 @@ type SetConversationThreadControlData = {
29389
29409
  */
29390
29410
  accountId: string;
29391
29411
  /**
29392
- * `request` is Facebook and Instagram only.
29412
+ * `request` is Facebook and Instagram only. `take` and `request` are refused with `platform_not_supported` on Instagram accounts connected with Instagram Login.
29393
29413
  */
29394
29414
  action: 'release' | 'take' | 'pass' | 'request';
29395
29415
  /**
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.1150",
39
+ version: "0.2.1152",
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.1150",
8
+ version: "0.2.1152",
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.1150",
3
+ "version": "0.2.1152",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1396,7 +1396,7 @@ export const deleteAccount = <ThrowOnError extends boolean = false>(options: Opt
1396
1396
 
1397
1397
  /**
1398
1398
  * Check accounts health
1399
- * Returns health status of all connected accounts including token validity, permissions, and issues needing attention.
1399
+ * Returns health status of all connected accounts including token validity, permissions, and issues needing attention. A failing or stalled analytics sync (see `analyticsSync`) raises a healthy account to at least warning.
1400
1400
  */
1401
1401
  export const getAllAccountsHealth = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAllAccountsHealthData, ThrowOnError>) => {
1402
1402
  return (options?.client ?? client).get<GetAllAccountsHealthResponse, GetAllAccountsHealthError, ThrowOnError>({
@@ -1456,6 +1456,8 @@ export const verifyWhatsAppNumber = <ThrowOnError extends boolean = false>(optio
1456
1456
  * Check account health
1457
1457
  * Returns detailed health info for a specific account including token status, permissions, and recommendations.
1458
1458
  *
1459
+ * A failing or stalled analytics sync (see `analyticsSync`) raises a healthy account to at least `warning`.
1460
+ *
1459
1461
  * For WhatsApp accounts the response also includes `platformConnection`, a live probe of the
1460
1462
  * Meta link behind the channel (the same read as `GET /v1/whatsapp/number-info`). The OAuth
1461
1463
  * token can be perfectly valid while Meta refuses to serve the phone-number object (for
@@ -4242,8 +4244,8 @@ export const sendTypingIndicator = <ThrowOnError extends boolean = false>(option
4242
4244
  *
4243
4245
  * **Facebook and Instagram** (Messenger Platform handover between the apps on the Page, such as Page Inbox):
4244
4246
  * - `pass` with `targetAppId`: give the thread to another app (`pass_thread_control`). Page Inbox is 263902037430900.
4245
- * - `take`: take the thread back (`take_thread_control`); Meta allows it only to the Page's primary receiver.
4246
- * - `request`: ask the current owner to pass the thread (`request_thread_control`); nothing changes until it does.
4247
+ * - `take`: take the thread back (`take_thread_control`); Meta allows it only to the Page's primary receiver, and only on accounts connected through a Facebook Page. On an Instagram Login connection it answers 400 `platform_not_supported`.
4248
+ * - `request`: ask the current owner to pass the thread (`request_thread_control`); nothing changes until it does. Not available on Instagram Login connections (400 `platform_not_supported`).
4247
4249
  * - `release`: give the thread back to the primary receiver (`release_thread_control`).
4248
4250
  *
4249
4251
  * While another app owns a Facebook or Instagram thread, inbound arrive with `metadata.standby: true` and a send answers 409 `not_thread_owner`. The conversation's `threadControl` follows the result; a `conversation.control_changed` webhook fires when Meta later reports the change.
@@ -13727,7 +13727,7 @@ export type WebhookPayloadMessage = {
13727
13727
  */
13728
13728
  metadata?: {
13729
13729
  /**
13730
- * true when this inbound arrived on Meta's standby path because another app owned the conversation: Meta Business Agent on WhatsApp, another handover receiver (such as Page Inbox) on Facebook and Instagram. That app answers it, Zernio only observes, and no automation runs. On WhatsApp sending a reply takes control back; on Facebook and Instagram take control first with POST /v1/inbox/conversations/{conversationId}/thread-control. See conversation.control_changed.
13730
+ * true when this inbound arrived on Meta's standby path because another app owned the conversation: Meta Business Agent on WhatsApp, another handover receiver (such as Page Inbox) on Facebook and Instagram. That app answers it, Zernio only observes, and no automation runs. On WhatsApp sending a reply takes control back; on Facebook, and on Instagram accounts connected through a Facebook Page, take control first with POST /v1/inbox/conversations/{conversationId}/thread-control; an Instagram Login connection cannot take or request and waits for the owner to pass it. See conversation.control_changed.
13731
13731
  */
13732
13732
  standby?: boolean;
13733
13733
  /**
@@ -19626,6 +19626,16 @@ export type GetAllAccountsHealthResponse = ({
19626
19626
  */
19627
19627
  needsReconnect?: boolean;
19628
19628
  issues?: Array<(string)>;
19629
+ /**
19630
+ * Absent on platforms without analytics sync. failing: several consecutive sync attempts failed. stalled: a sync was requested over 6 hours ago and never completed. never_synced: no sync has completed yet. Failing and stalled raise the account status to at least warning.
19631
+ */
19632
+ analyticsSync?: {
19633
+ status?: 'ok' | 'failing' | 'stalled' | 'never_synced';
19634
+ /**
19635
+ * Last successful sync. Null when never synced or the latest attempt failed.
19636
+ */
19637
+ lastSyncedAt?: (string) | null;
19638
+ };
19629
19639
  /**
19630
19640
  * Observed from Meta's own errors on our own sends, not a live probe. Facebook/Instagram: error subcodes 2534122, 1893063, 2534029, set on the first refused send and cleared when a later send succeeds. WhatsApp: Cloud API error codes 131042 (payment or eligibility issue), 131031 (Business Account locked) and 368 (policy block), set when a send or a delivery status fails with one and cleared when a later message is delivered. It lags reality by one message in each direction. After subcode 1893063 (Meta refusing the Page's messages), comment automation DMs are held and one is retried at `pausedUntil`: 30 minutes, doubling per refused retry up to 4 hours; held DMs stay pending and are sent once Meta accepts again, within the 7-day private-reply window.
19631
19641
  */
@@ -19792,6 +19802,16 @@ export type GetAccountHealthResponse = ({
19792
19802
  * Actionable recommendations to fix issues
19793
19803
  */
19794
19804
  recommendations?: Array<(string)>;
19805
+ /**
19806
+ * Absent on platforms without analytics sync. failing: several consecutive sync attempts failed. stalled: a sync was requested over 6 hours ago and never completed. never_synced: no sync has completed yet. Failing and stalled raise the account status to at least warning.
19807
+ */
19808
+ analyticsSync?: {
19809
+ status?: 'ok' | 'failing' | 'stalled' | 'never_synced';
19810
+ /**
19811
+ * Last successful sync. Null when never synced or the latest attempt failed.
19812
+ */
19813
+ lastSyncedAt?: (string) | null;
19814
+ };
19795
19815
  /**
19796
19816
  * Observed from Meta's own errors on our own sends, not a live probe. Facebook/Instagram: error subcodes 2534122, 1893063, 2534029, set on the first refused send and cleared when a later send succeeds. WhatsApp: Cloud API error codes 131042 (payment or eligibility issue), 131031 (Business Account locked) and 368 (policy block), set when a send or a delivery status fails with one and cleared when a later message is delivered. It lags reality by one message in each direction. After subcode 1893063 (Meta refusing the Page's messages), comment automation DMs are held and one is retried at `pausedUntil`: 30 minutes, doubling per refused retry up to 4 hours; held DMs stay pending and are sent once Meta accepts again, within the 7-day private-reply window.
19797
19817
  */
@@ -28787,7 +28807,7 @@ export type SetConversationThreadControlData = {
28787
28807
  */
28788
28808
  accountId: string;
28789
28809
  /**
28790
- * `request` is Facebook and Instagram only.
28810
+ * `request` is Facebook and Instagram only. `take` and `request` are refused with `platform_not_supported` on Instagram accounts connected with Instagram Login.
28791
28811
  */
28792
28812
  action: 'release' | 'take' | 'pass' | 'request';
28793
28813
  /**