@zernio/node 0.2.889 → 0.2.891
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 +49 -8
- package/dist/index.d.ts +49 -8
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/types.gen.ts +49 -8
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
|
*
|
|
@@ -23441,17 +23462,24 @@ type GetInboxConversationMessagesResponse = ({
|
|
|
23441
23462
|
createdAt?: string;
|
|
23442
23463
|
attachments?: Array<{
|
|
23443
23464
|
id?: string;
|
|
23444
|
-
type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template';
|
|
23445
23465
|
/**
|
|
23446
|
-
* Instagram and Facebook
|
|
23466
|
+
* 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.
|
|
23467
|
+
*/
|
|
23468
|
+
type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template' | 'unsupported_type';
|
|
23469
|
+
/**
|
|
23470
|
+
* 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
23471
|
*/
|
|
23448
23472
|
originalType?: string;
|
|
23473
|
+
/**
|
|
23474
|
+
* 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"`).
|
|
23475
|
+
*/
|
|
23476
|
+
mimeType?: string;
|
|
23449
23477
|
/**
|
|
23450
23478
|
* 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
23479
|
*/
|
|
23452
23480
|
url?: string;
|
|
23453
23481
|
/**
|
|
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.
|
|
23482
|
+
* 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
23483
|
*/
|
|
23456
23484
|
refreshUrl?: (string) | null;
|
|
23457
23485
|
filename?: (string) | null;
|
|
@@ -23468,13 +23496,26 @@ type GetInboxConversationMessagesResponse = ({
|
|
|
23468
23496
|
*/
|
|
23469
23497
|
subject?: (string) | null;
|
|
23470
23498
|
/**
|
|
23471
|
-
* Instagram story
|
|
23499
|
+
* Instagram only. Present when the message replies to one of the account's stories. Also set on history imported after connecting, read off Meta's `story.reply_to`.
|
|
23472
23500
|
*/
|
|
23473
|
-
storyReply?:
|
|
23501
|
+
storyReply?: {
|
|
23502
|
+
/**
|
|
23503
|
+
* The Instagram story ID the user replied to.
|
|
23504
|
+
*/
|
|
23505
|
+
storyId?: string;
|
|
23506
|
+
/**
|
|
23507
|
+
* Meta CDN URL for the story media. Expires roughly 24 hours after the story posted; fetch promptly or treat 404s as expected.
|
|
23508
|
+
*/
|
|
23509
|
+
storyUrl?: string;
|
|
23510
|
+
};
|
|
23511
|
+
/**
|
|
23512
|
+
* Instagram only. True when the message is the user mentioning the account in their own story. The story itself is the `share` attachment with `originalType: "story_mention"`. Also set on imported history, read off Meta's `story.mention`.
|
|
23513
|
+
*/
|
|
23514
|
+
isStoryMention?: boolean;
|
|
23474
23515
|
/**
|
|
23475
|
-
* Instagram story
|
|
23516
|
+
* Instagram and Facebook Messenger only. True when Meta withholds the content of this message from the API (its `is_unsupported` flag): `message` is empty, `attachments` is empty, and there is nothing to fetch, now or later. Distinguishes such a message from an ordinary empty one such as a story reply with no text. Absent on other platforms.
|
|
23476
23517
|
*/
|
|
23477
|
-
|
|
23518
|
+
noRenderableContent?: boolean;
|
|
23478
23519
|
/**
|
|
23479
23520
|
* True if the sender has edited this message at least once.
|
|
23480
23521
|
*/
|
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
|
*
|
|
@@ -23441,17 +23462,24 @@ type GetInboxConversationMessagesResponse = ({
|
|
|
23441
23462
|
createdAt?: string;
|
|
23442
23463
|
attachments?: Array<{
|
|
23443
23464
|
id?: string;
|
|
23444
|
-
type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template';
|
|
23445
23465
|
/**
|
|
23446
|
-
* Instagram and Facebook
|
|
23466
|
+
* 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.
|
|
23467
|
+
*/
|
|
23468
|
+
type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template' | 'unsupported_type';
|
|
23469
|
+
/**
|
|
23470
|
+
* 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
23471
|
*/
|
|
23448
23472
|
originalType?: string;
|
|
23473
|
+
/**
|
|
23474
|
+
* 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"`).
|
|
23475
|
+
*/
|
|
23476
|
+
mimeType?: string;
|
|
23449
23477
|
/**
|
|
23450
23478
|
* 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
23479
|
*/
|
|
23452
23480
|
url?: string;
|
|
23453
23481
|
/**
|
|
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.
|
|
23482
|
+
* 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
23483
|
*/
|
|
23456
23484
|
refreshUrl?: (string) | null;
|
|
23457
23485
|
filename?: (string) | null;
|
|
@@ -23468,13 +23496,26 @@ type GetInboxConversationMessagesResponse = ({
|
|
|
23468
23496
|
*/
|
|
23469
23497
|
subject?: (string) | null;
|
|
23470
23498
|
/**
|
|
23471
|
-
* Instagram story
|
|
23499
|
+
* Instagram only. Present when the message replies to one of the account's stories. Also set on history imported after connecting, read off Meta's `story.reply_to`.
|
|
23472
23500
|
*/
|
|
23473
|
-
storyReply?:
|
|
23501
|
+
storyReply?: {
|
|
23502
|
+
/**
|
|
23503
|
+
* The Instagram story ID the user replied to.
|
|
23504
|
+
*/
|
|
23505
|
+
storyId?: string;
|
|
23506
|
+
/**
|
|
23507
|
+
* Meta CDN URL for the story media. Expires roughly 24 hours after the story posted; fetch promptly or treat 404s as expected.
|
|
23508
|
+
*/
|
|
23509
|
+
storyUrl?: string;
|
|
23510
|
+
};
|
|
23511
|
+
/**
|
|
23512
|
+
* Instagram only. True when the message is the user mentioning the account in their own story. The story itself is the `share` attachment with `originalType: "story_mention"`. Also set on imported history, read off Meta's `story.mention`.
|
|
23513
|
+
*/
|
|
23514
|
+
isStoryMention?: boolean;
|
|
23474
23515
|
/**
|
|
23475
|
-
* Instagram story
|
|
23516
|
+
* Instagram and Facebook Messenger only. True when Meta withholds the content of this message from the API (its `is_unsupported` flag): `message` is empty, `attachments` is empty, and there is nothing to fetch, now or later. Distinguishes such a message from an ordinary empty one such as a story reply with no text. Absent on other platforms.
|
|
23476
23517
|
*/
|
|
23477
|
-
|
|
23518
|
+
noRenderableContent?: boolean;
|
|
23478
23519
|
/**
|
|
23479
23520
|
* True if the sender has edited this message at least once.
|
|
23480
23521
|
*/
|
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.
|
|
39
|
+
version: "0.2.891",
|
|
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.
|
|
8
|
+
version: "0.2.891",
|
|
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
|
@@ -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
|
*
|
|
@@ -22899,17 +22920,24 @@ export type GetInboxConversationMessagesResponse = ({
|
|
|
22899
22920
|
createdAt?: string;
|
|
22900
22921
|
attachments?: Array<{
|
|
22901
22922
|
id?: string;
|
|
22902
|
-
type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template';
|
|
22903
22923
|
/**
|
|
22904
|
-
* Instagram and Facebook
|
|
22924
|
+
* 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.
|
|
22925
|
+
*/
|
|
22926
|
+
type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share' | 'template' | 'unsupported_type';
|
|
22927
|
+
/**
|
|
22928
|
+
* 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
22929
|
*/
|
|
22906
22930
|
originalType?: string;
|
|
22931
|
+
/**
|
|
22932
|
+
* 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"`).
|
|
22933
|
+
*/
|
|
22934
|
+
mimeType?: string;
|
|
22907
22935
|
/**
|
|
22908
22936
|
* 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
22937
|
*/
|
|
22910
22938
|
url?: string;
|
|
22911
22939
|
/**
|
|
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.
|
|
22940
|
+
* 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
22941
|
*/
|
|
22914
22942
|
refreshUrl?: (string) | null;
|
|
22915
22943
|
filename?: (string) | null;
|
|
@@ -22926,13 +22954,26 @@ export type GetInboxConversationMessagesResponse = ({
|
|
|
22926
22954
|
*/
|
|
22927
22955
|
subject?: (string) | null;
|
|
22928
22956
|
/**
|
|
22929
|
-
* Instagram story
|
|
22957
|
+
* Instagram only. Present when the message replies to one of the account's stories. Also set on history imported after connecting, read off Meta's `story.reply_to`.
|
|
22930
22958
|
*/
|
|
22931
|
-
storyReply?:
|
|
22959
|
+
storyReply?: {
|
|
22960
|
+
/**
|
|
22961
|
+
* The Instagram story ID the user replied to.
|
|
22962
|
+
*/
|
|
22963
|
+
storyId?: string;
|
|
22964
|
+
/**
|
|
22965
|
+
* Meta CDN URL for the story media. Expires roughly 24 hours after the story posted; fetch promptly or treat 404s as expected.
|
|
22966
|
+
*/
|
|
22967
|
+
storyUrl?: string;
|
|
22968
|
+
};
|
|
22969
|
+
/**
|
|
22970
|
+
* Instagram only. True when the message is the user mentioning the account in their own story. The story itself is the `share` attachment with `originalType: "story_mention"`. Also set on imported history, read off Meta's `story.mention`.
|
|
22971
|
+
*/
|
|
22972
|
+
isStoryMention?: boolean;
|
|
22932
22973
|
/**
|
|
22933
|
-
* Instagram story
|
|
22974
|
+
* Instagram and Facebook Messenger only. True when Meta withholds the content of this message from the API (its `is_unsupported` flag): `message` is empty, `attachments` is empty, and there is nothing to fetch, now or later. Distinguishes such a message from an ordinary empty one such as a story reply with no text. Absent on other platforms.
|
|
22934
22975
|
*/
|
|
22935
|
-
|
|
22976
|
+
noRenderableContent?: boolean;
|
|
22936
22977
|
/**
|
|
22937
22978
|
* True if the sender has edited this message at least once.
|
|
22938
22979
|
*/
|