@zernio/node 0.2.890 → 0.2.892

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
@@ -11120,7 +11120,15 @@ type WebhookPayloadMessage = {
11120
11120
  text: (string) | null;
11121
11121
  attachments: Array<{
11122
11122
  /**
11123
- * Attachment type (image, video, file, sticker, audio, share)
11123
+ * Attachment type (image, video, file, sticker, audio, share).
11124
+ *
11125
+ * Instagram and Facebook deliver a shared reel, post or ad with no
11126
+ * type of its own (Meta's `unsupported_type`). Zernio resolves it
11127
+ * from the media's Content-Type at ingest, so it arrives as `image`,
11128
+ * `video`, `audio` or `file` with `originalType: "unsupported_type"`.
11129
+ * `type: "unsupported_type"` itself is emitted only when the CDN
11130
+ * could not be classified in time; the `url` still works.
11131
+ *
11124
11132
  */
11125
11133
  type: string;
11126
11134
  /**
@@ -11135,8 +11143,21 @@ type WebhookPayloadMessage = {
11135
11143
  * unrecognized type as a generic document shows your agent
11136
11144
  * "document received" for what is usually a lead.
11137
11145
  *
11146
+ * `originalType: "unsupported_type"` marks a share Meta did not
11147
+ * classify, resolved by content type. **Download it on receipt**:
11148
+ * Meta answers `is_unsupported` with no attachments when the
11149
+ * message node is read back, so the attachment-resolve endpoint
11150
+ * cannot re-mint this url once it expires.
11151
+ *
11138
11152
  */
11139
11153
  originalType?: string;
11154
+ /**
11155
+ * MIME type of the media when Zernio knows it. On Instagram and
11156
+ * Facebook it is set for shares resolved by content type
11157
+ * (`originalType: "unsupported_type"`).
11158
+ *
11159
+ */
11160
+ mimeType?: string;
11140
11161
  /**
11141
11162
  * Where to fetch the attachment. **The contract differs by platform.**
11142
11163
  *
@@ -16265,6 +16286,10 @@ type GetAccountHealthResponse = ({
16265
16286
  subcode?: number;
16266
16287
  message?: string;
16267
16288
  } | null;
16289
+ /**
16290
+ * From the phone number's Meta health_status. `false` = Meta says Zernio is not subscribed to the message webhook for this number, so inbound messages are not delivered even though the number is CONNECTED and can still send. Fix by re-subscribing (reconnect the number); if it stays `false`, the number is routed to a different WhatsApp Business Account (typically after linking it to a Facebook Page). `true` = Meta reports no such problem. `null` = Meta did not report it (read failed or no health_status), not evidence either way.
16291
+ */
16292
+ inboundWebhookSubscribed?: (boolean) | null;
16268
16293
  };
16269
16294
  });
16270
16295
  type GetAccountHealthError = (ErrorResponse | {
@@ -23441,17 +23466,24 @@ type GetInboxConversationMessagesResponse = ({
23441
23466
  createdAt?: string;
23442
23467
  attachments?: Array<{
23443
23468
  id?: string;
23444
- type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template';
23445
23469
  /**
23446
- * Instagram and Facebook only, and present only when it differs from `type`. Meta's own type before normalization: `ig_reel` and `reel` become `video`, while `ig_post`, `post`, `ig_story` and `story_mention` become `share`. A story mention is `type: "share"` with `originalType: "story_mention"`; render on this field, since `share` alone is ambiguous.
23470
+ * On Instagram and Facebook a shared reel, post or ad reaches Zernio with no type of its own (Meta's `unsupported_type`) and is resolved from the media's Content-Type at ingest into `image`, `video`, `audio` or `file` with `originalType: "unsupported_type"`. `unsupported_type` is returned only when the CDN could not be classified in time.
23471
+ */
23472
+ type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template' | 'unsupported_type';
23473
+ /**
23474
+ * Instagram and Facebook only, and present only when it differs from `type`. Meta's own type before normalization: `ig_reel` and `reel` become `video`, while `ig_post`, `post`, `ig_story` and `story_mention` become `share`. A story mention is `type: "share"` with `originalType: "story_mention"`; render on this field, since `share` alone is ambiguous. `originalType: "unsupported_type"` marks a share Meta did not classify, resolved by content type: `refreshUrl` cannot re-mint it (Meta answers `is_unsupported` with no attachments for the message node), so download it when the `message.received` webhook arrives.
23447
23475
  */
23448
23476
  originalType?: string;
23477
+ /**
23478
+ * MIME type of the media when Zernio knows it. On Instagram and Facebook it is set for shares resolved by content type (`originalType: "unsupported_type"`).
23479
+ */
23480
+ mimeType?: string;
23449
23481
  /**
23450
23482
  * Direct media link. On Instagram and Facebook this is a signed Meta CDN url that EXPIRES: use it now, do not store it. Persist `refreshUrl` instead.
23451
23483
  */
23452
23484
  url?: string;
23453
23485
  /**
23454
- * Instagram and Facebook only. Endpoint that resolves this attachment to a working url every time, re-minting it from Meta when the stored one has expired. Safe to store and render indefinitely.
23486
+ * Instagram and Facebook only. Endpoint that resolves this attachment to a working url every time, re-minting it from Meta when the stored one has expired. Safe to store and render indefinitely, except for an attachment with `originalType: "unsupported_type"`: Meta cannot re-serve those, so the endpoint answers 404 once the url has expired.
23455
23487
  */
23456
23488
  refreshUrl?: (string) | null;
23457
23489
  filename?: (string) | null;
package/dist/index.d.ts CHANGED
@@ -11120,7 +11120,15 @@ type WebhookPayloadMessage = {
11120
11120
  text: (string) | null;
11121
11121
  attachments: Array<{
11122
11122
  /**
11123
- * Attachment type (image, video, file, sticker, audio, share)
11123
+ * Attachment type (image, video, file, sticker, audio, share).
11124
+ *
11125
+ * Instagram and Facebook deliver a shared reel, post or ad with no
11126
+ * type of its own (Meta's `unsupported_type`). Zernio resolves it
11127
+ * from the media's Content-Type at ingest, so it arrives as `image`,
11128
+ * `video`, `audio` or `file` with `originalType: "unsupported_type"`.
11129
+ * `type: "unsupported_type"` itself is emitted only when the CDN
11130
+ * could not be classified in time; the `url` still works.
11131
+ *
11124
11132
  */
11125
11133
  type: string;
11126
11134
  /**
@@ -11135,8 +11143,21 @@ type WebhookPayloadMessage = {
11135
11143
  * unrecognized type as a generic document shows your agent
11136
11144
  * "document received" for what is usually a lead.
11137
11145
  *
11146
+ * `originalType: "unsupported_type"` marks a share Meta did not
11147
+ * classify, resolved by content type. **Download it on receipt**:
11148
+ * Meta answers `is_unsupported` with no attachments when the
11149
+ * message node is read back, so the attachment-resolve endpoint
11150
+ * cannot re-mint this url once it expires.
11151
+ *
11138
11152
  */
11139
11153
  originalType?: string;
11154
+ /**
11155
+ * MIME type of the media when Zernio knows it. On Instagram and
11156
+ * Facebook it is set for shares resolved by content type
11157
+ * (`originalType: "unsupported_type"`).
11158
+ *
11159
+ */
11160
+ mimeType?: string;
11140
11161
  /**
11141
11162
  * Where to fetch the attachment. **The contract differs by platform.**
11142
11163
  *
@@ -16265,6 +16286,10 @@ type GetAccountHealthResponse = ({
16265
16286
  subcode?: number;
16266
16287
  message?: string;
16267
16288
  } | null;
16289
+ /**
16290
+ * From the phone number's Meta health_status. `false` = Meta says Zernio is not subscribed to the message webhook for this number, so inbound messages are not delivered even though the number is CONNECTED and can still send. Fix by re-subscribing (reconnect the number); if it stays `false`, the number is routed to a different WhatsApp Business Account (typically after linking it to a Facebook Page). `true` = Meta reports no such problem. `null` = Meta did not report it (read failed or no health_status), not evidence either way.
16291
+ */
16292
+ inboundWebhookSubscribed?: (boolean) | null;
16268
16293
  };
16269
16294
  });
16270
16295
  type GetAccountHealthError = (ErrorResponse | {
@@ -23441,17 +23466,24 @@ type GetInboxConversationMessagesResponse = ({
23441
23466
  createdAt?: string;
23442
23467
  attachments?: Array<{
23443
23468
  id?: string;
23444
- type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template';
23445
23469
  /**
23446
- * Instagram and Facebook only, and present only when it differs from `type`. Meta's own type before normalization: `ig_reel` and `reel` become `video`, while `ig_post`, `post`, `ig_story` and `story_mention` become `share`. A story mention is `type: "share"` with `originalType: "story_mention"`; render on this field, since `share` alone is ambiguous.
23470
+ * On Instagram and Facebook a shared reel, post or ad reaches Zernio with no type of its own (Meta's `unsupported_type`) and is resolved from the media's Content-Type at ingest into `image`, `video`, `audio` or `file` with `originalType: "unsupported_type"`. `unsupported_type` is returned only when the CDN could not be classified in time.
23471
+ */
23472
+ type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template' | 'unsupported_type';
23473
+ /**
23474
+ * Instagram and Facebook only, and present only when it differs from `type`. Meta's own type before normalization: `ig_reel` and `reel` become `video`, while `ig_post`, `post`, `ig_story` and `story_mention` become `share`. A story mention is `type: "share"` with `originalType: "story_mention"`; render on this field, since `share` alone is ambiguous. `originalType: "unsupported_type"` marks a share Meta did not classify, resolved by content type: `refreshUrl` cannot re-mint it (Meta answers `is_unsupported` with no attachments for the message node), so download it when the `message.received` webhook arrives.
23447
23475
  */
23448
23476
  originalType?: string;
23477
+ /**
23478
+ * MIME type of the media when Zernio knows it. On Instagram and Facebook it is set for shares resolved by content type (`originalType: "unsupported_type"`).
23479
+ */
23480
+ mimeType?: string;
23449
23481
  /**
23450
23482
  * Direct media link. On Instagram and Facebook this is a signed Meta CDN url that EXPIRES: use it now, do not store it. Persist `refreshUrl` instead.
23451
23483
  */
23452
23484
  url?: string;
23453
23485
  /**
23454
- * Instagram and Facebook only. Endpoint that resolves this attachment to a working url every time, re-minting it from Meta when the stored one has expired. Safe to store and render indefinitely.
23486
+ * Instagram and Facebook only. Endpoint that resolves this attachment to a working url every time, re-minting it from Meta when the stored one has expired. Safe to store and render indefinitely, except for an attachment with `originalType: "unsupported_type"`: Meta cannot re-serve those, so the endpoint answers 404 once the url has expired.
23455
23487
  */
23456
23488
  refreshUrl?: (string) | null;
23457
23489
  filename?: (string) | null;
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.890",
39
+ version: "0.2.892",
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.890",
8
+ version: "0.2.892",
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.890",
3
+ "version": "0.2.892",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1386,7 +1386,9 @@ export const verifyWhatsAppNumber = <ThrowOnError extends boolean = false>(optio
1386
1386
  * token can be perfectly valid while Meta refuses to serve the phone-number object (for
1387
1387
  * example after a phone-side coexistence disconnect), so `tokenStatus` alone is not a
1388
1388
  * liveness signal for WhatsApp. When the Meta link is dead, `platformConnection.status` is
1389
- * `disconnected` and the overall `status` is `error`.
1389
+ * `disconnected` and the overall `status` is `error`. When Meta reports that the number's
1390
+ * inbound message webhook does not reach Zernio, `platformConnection.inboundWebhookSubscribed`
1391
+ * is `false`, an entry is added to `issues`, and the overall `status` is at least `warning`.
1390
1392
  *
1391
1393
  */
1392
1394
  export const getAccountHealth = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAccountHealthData, ThrowOnError>) => {
@@ -9824,7 +9824,15 @@ export type WebhookPayloadMessage = {
9824
9824
  text: (string) | null;
9825
9825
  attachments: Array<{
9826
9826
  /**
9827
- * Attachment type (image, video, file, sticker, audio, share)
9827
+ * Attachment type (image, video, file, sticker, audio, share).
9828
+ *
9829
+ * Instagram and Facebook deliver a shared reel, post or ad with no
9830
+ * type of its own (Meta's `unsupported_type`). Zernio resolves it
9831
+ * from the media's Content-Type at ingest, so it arrives as `image`,
9832
+ * `video`, `audio` or `file` with `originalType: "unsupported_type"`.
9833
+ * `type: "unsupported_type"` itself is emitted only when the CDN
9834
+ * could not be classified in time; the `url` still works.
9835
+ *
9828
9836
  */
9829
9837
  type: string;
9830
9838
  /**
@@ -9839,8 +9847,21 @@ export type WebhookPayloadMessage = {
9839
9847
  * unrecognized type as a generic document shows your agent
9840
9848
  * "document received" for what is usually a lead.
9841
9849
  *
9850
+ * `originalType: "unsupported_type"` marks a share Meta did not
9851
+ * classify, resolved by content type. **Download it on receipt**:
9852
+ * Meta answers `is_unsupported` with no attachments when the
9853
+ * message node is read back, so the attachment-resolve endpoint
9854
+ * cannot re-mint this url once it expires.
9855
+ *
9842
9856
  */
9843
9857
  originalType?: string;
9858
+ /**
9859
+ * MIME type of the media when Zernio knows it. On Instagram and
9860
+ * Facebook it is set for shares resolved by content type
9861
+ * (`originalType: "unsupported_type"`).
9862
+ *
9863
+ */
9864
+ mimeType?: string;
9844
9865
  /**
9845
9866
  * Where to fetch the attachment. **The contract differs by platform.**
9846
9867
  *
@@ -15270,6 +15291,10 @@ export type GetAccountHealthResponse = ({
15270
15291
  subcode?: number;
15271
15292
  message?: string;
15272
15293
  } | null;
15294
+ /**
15295
+ * From the phone number's Meta health_status. `false` = Meta says Zernio is not subscribed to the message webhook for this number, so inbound messages are not delivered even though the number is CONNECTED and can still send. Fix by re-subscribing (reconnect the number); if it stays `false`, the number is routed to a different WhatsApp Business Account (typically after linking it to a Facebook Page). `true` = Meta reports no such problem. `null` = Meta did not report it (read failed or no health_status), not evidence either way.
15296
+ */
15297
+ inboundWebhookSubscribed?: (boolean) | null;
15273
15298
  };
15274
15299
  });
15275
15300
 
@@ -22899,17 +22924,24 @@ export type GetInboxConversationMessagesResponse = ({
22899
22924
  createdAt?: string;
22900
22925
  attachments?: Array<{
22901
22926
  id?: string;
22902
- type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template';
22903
22927
  /**
22904
- * Instagram and Facebook only, and present only when it differs from `type`. Meta's own type before normalization: `ig_reel` and `reel` become `video`, while `ig_post`, `post`, `ig_story` and `story_mention` become `share`. A story mention is `type: "share"` with `originalType: "story_mention"`; render on this field, since `share` alone is ambiguous.
22928
+ * On Instagram and Facebook a shared reel, post or ad reaches Zernio with no type of its own (Meta's `unsupported_type`) and is resolved from the media's Content-Type at ingest into `image`, `video`, `audio` or `file` with `originalType: "unsupported_type"`. `unsupported_type` is returned only when the CDN could not be classified in time.
22929
+ */
22930
+ type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template' | 'unsupported_type';
22931
+ /**
22932
+ * Instagram and Facebook only, and present only when it differs from `type`. Meta's own type before normalization: `ig_reel` and `reel` become `video`, while `ig_post`, `post`, `ig_story` and `story_mention` become `share`. A story mention is `type: "share"` with `originalType: "story_mention"`; render on this field, since `share` alone is ambiguous. `originalType: "unsupported_type"` marks a share Meta did not classify, resolved by content type: `refreshUrl` cannot re-mint it (Meta answers `is_unsupported` with no attachments for the message node), so download it when the `message.received` webhook arrives.
22905
22933
  */
22906
22934
  originalType?: string;
22935
+ /**
22936
+ * MIME type of the media when Zernio knows it. On Instagram and Facebook it is set for shares resolved by content type (`originalType: "unsupported_type"`).
22937
+ */
22938
+ mimeType?: string;
22907
22939
  /**
22908
22940
  * Direct media link. On Instagram and Facebook this is a signed Meta CDN url that EXPIRES: use it now, do not store it. Persist `refreshUrl` instead.
22909
22941
  */
22910
22942
  url?: string;
22911
22943
  /**
22912
- * Instagram and Facebook only. Endpoint that resolves this attachment to a working url every time, re-minting it from Meta when the stored one has expired. Safe to store and render indefinitely.
22944
+ * Instagram and Facebook only. Endpoint that resolves this attachment to a working url every time, re-minting it from Meta when the stored one has expired. Safe to store and render indefinitely, except for an attachment with `originalType: "unsupported_type"`: Meta cannot re-serve those, so the endpoint answers 404 once the url has expired.
22913
22945
  */
22914
22946
  refreshUrl?: (string) | null;
22915
22947
  filename?: (string) | null;