@getlatedev/node 0.2.576 → 0.2.578

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
@@ -6148,7 +6148,7 @@ type SnapchatPlatformData = {
6148
6148
  type contentType3 = 'story' | 'saved_story' | 'spotlight';
6149
6149
  type SocialAccount = {
6150
6150
  _id: string;
6151
- platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads';
6151
+ platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
6152
6152
  profileId: (string | Profile);
6153
6153
  username?: string;
6154
6154
  displayName?: string;
@@ -6211,7 +6211,7 @@ type SocialAccount = {
6211
6211
  [key: string]: unknown;
6212
6212
  };
6213
6213
  };
6214
- type platform6 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads';
6214
+ type platform6 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
6215
6215
  /**
6216
6216
  * Normalized, platform-agnostic ad-targeting spec. Every field is optional, an
6217
6217
  * empty object targets the platform's default broadest audience. Field names are
@@ -12283,8 +12283,39 @@ type GetAccountHealthResponse = ({
12283
12283
  * Actionable recommendations to fix issues
12284
12284
  */
12285
12285
  recommendations?: Array<(string)>;
12286
+ /**
12287
+ * WhatsApp accounts only. Live probe of the Meta link behind the channel, performed at request time (the same read as GET /v1/whatsapp/number-info).
12288
+ */
12289
+ platformConnection?: {
12290
+ /**
12291
+ * `connected` = Meta served the channel object. `disconnected` = Meta refused to serve it (Graph error 100, subcode 33), which is how a phone-side coexistence disconnect surfaces. `unknown` = the live read failed for another reason (timeout, transient Meta error), not evidence either way.
12292
+ */
12293
+ status?: 'connected' | 'disconnected' | 'unknown';
12294
+ /**
12295
+ * When this live probe ran (always the current request; never cached)
12296
+ */
12297
+ checkedAt?: string;
12298
+ /**
12299
+ * Meta's own `status` field from the phone-number node (for example CONNECTED), when the object was readable
12300
+ */
12301
+ phoneStatus?: (string) | null;
12302
+ /**
12303
+ * Set only when status is `disconnected`
12304
+ */
12305
+ metaError?: {
12306
+ /**
12307
+ * Meta Graph error code (100)
12308
+ */
12309
+ code?: number;
12310
+ /**
12311
+ * Meta Graph error subcode (33)
12312
+ */
12313
+ subcode?: number;
12314
+ message?: string;
12315
+ } | null;
12316
+ };
12286
12317
  });
12287
- type GetAccountHealthError = ({
12318
+ type GetAccountHealthError = (ErrorResponse | {
12288
12319
  error?: string;
12289
12320
  });
12290
12321
  type GetInstagramFollowStatusData = {
package/dist/index.d.ts CHANGED
@@ -6148,7 +6148,7 @@ type SnapchatPlatformData = {
6148
6148
  type contentType3 = 'story' | 'saved_story' | 'spotlight';
6149
6149
  type SocialAccount = {
6150
6150
  _id: string;
6151
- platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads';
6151
+ platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
6152
6152
  profileId: (string | Profile);
6153
6153
  username?: string;
6154
6154
  displayName?: string;
@@ -6211,7 +6211,7 @@ type SocialAccount = {
6211
6211
  [key: string]: unknown;
6212
6212
  };
6213
6213
  };
6214
- type platform6 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads';
6214
+ type platform6 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
6215
6215
  /**
6216
6216
  * Normalized, platform-agnostic ad-targeting spec. Every field is optional, an
6217
6217
  * empty object targets the platform's default broadest audience. Field names are
@@ -12283,8 +12283,39 @@ type GetAccountHealthResponse = ({
12283
12283
  * Actionable recommendations to fix issues
12284
12284
  */
12285
12285
  recommendations?: Array<(string)>;
12286
+ /**
12287
+ * WhatsApp accounts only. Live probe of the Meta link behind the channel, performed at request time (the same read as GET /v1/whatsapp/number-info).
12288
+ */
12289
+ platformConnection?: {
12290
+ /**
12291
+ * `connected` = Meta served the channel object. `disconnected` = Meta refused to serve it (Graph error 100, subcode 33), which is how a phone-side coexistence disconnect surfaces. `unknown` = the live read failed for another reason (timeout, transient Meta error), not evidence either way.
12292
+ */
12293
+ status?: 'connected' | 'disconnected' | 'unknown';
12294
+ /**
12295
+ * When this live probe ran (always the current request; never cached)
12296
+ */
12297
+ checkedAt?: string;
12298
+ /**
12299
+ * Meta's own `status` field from the phone-number node (for example CONNECTED), when the object was readable
12300
+ */
12301
+ phoneStatus?: (string) | null;
12302
+ /**
12303
+ * Set only when status is `disconnected`
12304
+ */
12305
+ metaError?: {
12306
+ /**
12307
+ * Meta Graph error code (100)
12308
+ */
12309
+ code?: number;
12310
+ /**
12311
+ * Meta Graph error subcode (33)
12312
+ */
12313
+ subcode?: number;
12314
+ message?: string;
12315
+ } | null;
12316
+ };
12286
12317
  });
12287
- type GetAccountHealthError = ({
12318
+ type GetAccountHealthError = (ErrorResponse | {
12288
12319
  error?: string;
12289
12320
  });
12290
12321
  type GetInstagramFollowStatusData = {
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.576",
39
+ version: "0.2.578",
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.576",
8
+ version: "0.2.578",
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.576",
3
+ "version": "0.2.578",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1167,6 +1167,14 @@ export const registerWhatsAppNumber = <ThrowOnError extends boolean = false>(opt
1167
1167
  /**
1168
1168
  * Check account health
1169
1169
  * Returns detailed health info for a specific account including token status, permissions, and recommendations.
1170
+ *
1171
+ * For WhatsApp accounts the response also includes `platformConnection`, a live probe of the
1172
+ * Meta link behind the channel (the same read as `GET /v1/whatsapp/number-info`). The OAuth
1173
+ * token can be perfectly valid while Meta refuses to serve the phone-number object (for
1174
+ * example after a phone-side coexistence disconnect), so `tokenStatus` alone is not a
1175
+ * liveness signal for WhatsApp. When the Meta link is dead, `platformConnection.status` is
1176
+ * `disconnected` and the overall `status` is `error`.
1177
+ *
1170
1178
  */
1171
1179
  export const getAccountHealth = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAccountHealthData, ThrowOnError>) => {
1172
1180
  return (options?.client ?? client).get<GetAccountHealthResponse, GetAccountHealthError, ThrowOnError>({
@@ -5049,7 +5049,7 @@ export type contentType3 = 'story' | 'saved_story' | 'spotlight';
5049
5049
 
5050
5050
  export type SocialAccount = {
5051
5051
  _id: string;
5052
- platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads';
5052
+ platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
5053
5053
  profileId: (string | Profile);
5054
5054
  username?: string;
5055
5055
  displayName?: string;
@@ -5113,7 +5113,7 @@ export type SocialAccount = {
5113
5113
  };
5114
5114
  };
5115
5115
 
5116
- export type platform6 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads';
5116
+ export type platform6 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
5117
5117
 
5118
5118
  /**
5119
5119
  * Normalized, platform-agnostic ad-targeting spec. Every field is optional, an
@@ -11526,9 +11526,40 @@ export type GetAccountHealthResponse = ({
11526
11526
  * Actionable recommendations to fix issues
11527
11527
  */
11528
11528
  recommendations?: Array<(string)>;
11529
+ /**
11530
+ * WhatsApp accounts only. Live probe of the Meta link behind the channel, performed at request time (the same read as GET /v1/whatsapp/number-info).
11531
+ */
11532
+ platformConnection?: {
11533
+ /**
11534
+ * `connected` = Meta served the channel object. `disconnected` = Meta refused to serve it (Graph error 100, subcode 33), which is how a phone-side coexistence disconnect surfaces. `unknown` = the live read failed for another reason (timeout, transient Meta error), not evidence either way.
11535
+ */
11536
+ status?: 'connected' | 'disconnected' | 'unknown';
11537
+ /**
11538
+ * When this live probe ran (always the current request; never cached)
11539
+ */
11540
+ checkedAt?: string;
11541
+ /**
11542
+ * Meta's own `status` field from the phone-number node (for example CONNECTED), when the object was readable
11543
+ */
11544
+ phoneStatus?: (string) | null;
11545
+ /**
11546
+ * Set only when status is `disconnected`
11547
+ */
11548
+ metaError?: {
11549
+ /**
11550
+ * Meta Graph error code (100)
11551
+ */
11552
+ code?: number;
11553
+ /**
11554
+ * Meta Graph error subcode (33)
11555
+ */
11556
+ subcode?: number;
11557
+ message?: string;
11558
+ } | null;
11559
+ };
11529
11560
  });
11530
11561
 
11531
- export type GetAccountHealthError = ({
11562
+ export type GetAccountHealthError = (ErrorResponse | {
11532
11563
  error?: string;
11533
11564
  });
11534
11565