planvortex 0.6.0 → 0.7.0
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-B7gbjlNe.d.cts → index-BX1Kvdqd.d.cts} +13 -9
- package/dist/{index-B7gbjlNe.d.ts → index-BX1Kvdqd.d.ts} +13 -9
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/webhooks/index.d.cts +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1231,7 +1231,7 @@ interface paths {
|
|
|
1231
1231
|
* The inbox: first-level comments across the whole organization
|
|
1232
1232
|
* @description Served from PlanVortex's database, so it costs nothing and calls no social network. It is a **snapshot**: `collected_date` says when each row was last read. Open a thread to see what the network says right now.
|
|
1233
1233
|
*
|
|
1234
|
-
* Ordered by `creation_date` descending — the date on the network, not the date we collected it — so rows from
|
|
1234
|
+
* Ordered by `creation_date` descending — the date on the network, not the date we collected it — so rows from ten networks interleave correctly.
|
|
1235
1235
|
*
|
|
1236
1236
|
* **On `telegram` the inbox starts the day the channel was connected.** The Bot API has no way to read the past: a bot only learns what happens while it is inside, so nothing written before the connection exists here and never will. Say so in your UI — an inbox that opens empty on a busy channel reads like a failure.
|
|
1237
1237
|
*
|
|
@@ -1358,7 +1358,7 @@ interface paths {
|
|
|
1358
1358
|
*
|
|
1359
1359
|
* **An app cannot call this.** Connecting a social account is an OAuth flow with a person in front of it, so this endpoint only accepts a user token or a temporal connect token; with app credentials it answers error 519. The way an integration does it is to issue a temporal connect token with `GET /organizations/{id_organization}/temporal_connect_token` and hand it to its end user.
|
|
1360
1360
|
*
|
|
1361
|
-
* **Read `authorization`, not `link`.**
|
|
1361
|
+
* **Read `authorization`, not `link`.** Ten of the twelve networks are `redirect` and you send the person to `link`. Two are not, and neither of them fails visibly if you treat it as one:
|
|
1362
1362
|
*
|
|
1363
1363
|
* • **WhatsApp is not a URL at all.** Its sign-up is Meta's Embedded Signup, a popup you raise with the Facebook JavaScript SDK, so its `link` is an empty string and everything you need to open that popup travels in `authorization`. A client that loops over the list and redirects to `link` sends its user to its own page.
|
|
1364
1364
|
* • **Telegram has a link and still is not a redirect.** It opens a chat with the PlanVortex bot, and nobody comes back from it: the account is born minutes later, from the bot being added to a channel, and it is announced over the WebSocket. Open it in another tab and keep listening; redirect to it and there is nobody left to tell.
|
|
@@ -2348,7 +2348,7 @@ interface paths {
|
|
|
2348
2348
|
*
|
|
2349
2349
|
* `comments` is the coarse gate — whether the network has comments at all. Which *actions* it allows on one is a finer question and lives in `GET /social_comment_actions`, because the shape here is `{[capability]: boolean}` and nesting an object inside would break it.
|
|
2350
2350
|
*
|
|
2351
|
-
* Today
|
|
2351
|
+
* Today ten networks answer `comments: true`: Facebook, Instagram, Threads, LinkedIn, X, YouTube, Google Business, Bluesky, Discord and Telegram. TikTok and WhatsApp answer `false`, for reasons of theirs and not ours.
|
|
2352
2352
|
*
|
|
2353
2353
|
* A `true` here is about the **network**, not about one account of it: a Telegram channel with no linked discussion group answers 965 on its comments even though the network has them.
|
|
2354
2354
|
*
|
|
@@ -2387,6 +2387,7 @@ interface paths {
|
|
|
2387
2387
|
* | `bluesky` | yes | yes — through the post's `threadgate` | yes | **no** — the reply lives in somebody else's repository |
|
|
2388
2388
|
* | `discord` | yes | **no** — Discord has no hide, only delete | yes | yes |
|
|
2389
2389
|
* | `telegram` | yes | **no** — Telegram has no hide either | yes | yes — with the bot as an admin of the discussion group, otherwise error 969 |
|
|
2390
|
+
* | `threads` | yes | yes | yes | **no** — deleting somebody else's reply is not a permission you lack, it is a call that does not exist in the API |
|
|
2390
2391
|
* | `tiktok`, `whatsapp` | no | no | no | no |
|
|
2391
2392
|
*
|
|
2392
2393
|
* Only needs authentication.
|
|
@@ -2580,7 +2581,7 @@ interface components {
|
|
|
2580
2581
|
/**
|
|
2581
2582
|
* @description **How** an account of this network is authorized, which is not always "send the user to this URL".
|
|
2582
2583
|
*
|
|
2583
|
-
*
|
|
2584
|
+
* Ten of the twelve networks are `redirect`: open `link` and the network sends the person back to PlanVortex with a code. Two are not:
|
|
2584
2585
|
*
|
|
2585
2586
|
* • **WhatsApp.** Its sign-up is Meta's *Embedded Signup*: a popup raised by the Facebook JavaScript SDK from your own page, which returns — over `postMessage` — session data (`waba_id`, `phone_number_id`) that no query string carries. Its `link` is therefore an empty string.
|
|
2586
2587
|
* • **Telegram.** There is no OAuth here: no consent screen, no `code`, no account token. `link` opens a private chat with the PlanVortex bot, the person then adds that bot to their channel, and **the account is created from that event**, not from any request of yours. Which means the connection cannot be finished by calling `GET /organizations/{id_organization}/account-connect/telegram` — see that endpoint.
|
|
@@ -3040,7 +3041,7 @@ interface components {
|
|
|
3040
3041
|
};
|
|
3041
3042
|
CatalogSocialLimits: {
|
|
3042
3043
|
/**
|
|
3043
|
-
* @description Maximum length of a publication's text. Bluesky
|
|
3044
|
+
* @description Maximum length of a publication's text. **Bluesky and Threads count GRAPHEMES**, everyone else counts characters — Telegram included, where `String.length` is exactly the right unit. The difference is not academic: an emoji is one grapheme and two `String.length` units, so counting a Threads post with `.length` rejects at 250 emojis what the network publishes happily at 500.
|
|
3044
3045
|
*
|
|
3045
3046
|
* On Telegram there are **two numbers for the same field**: `telegram` (4.096) while the publication is text only, and `telegram_media` (1.024) the moment it carries an image or a video, because then the text is a media caption and not a message. Switch the counter when the file is attached, not when publish is pressed.
|
|
3046
3047
|
*/
|
|
@@ -3284,7 +3285,7 @@ interface components {
|
|
|
3284
3285
|
* @description A network that has comments. Treat it as an open list: a new one is added before your integration hears about it.
|
|
3285
3286
|
* @enum {string}
|
|
3286
3287
|
*/
|
|
3287
|
-
CommentsCommentNetworkName: "facebook" | "instagram" | "twitter" | "linkedin" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram";
|
|
3288
|
+
CommentsCommentNetworkName: "facebook" | "instagram" | "twitter" | "linkedin" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram" | "threads";
|
|
3288
3289
|
/** @description A live read: asked of the network and reconciled with what was stored. */
|
|
3289
3290
|
CommentsCommentThread: {
|
|
3290
3291
|
comments: components["schemas"]["CommentsComment"][];
|
|
@@ -4187,7 +4188,7 @@ interface components {
|
|
|
4187
4188
|
* Not every connectable network publishes — a local business listing receives reviews, not posts — so this list is shorter than the one in `GET /social_networks`. Ask `GET /allowed_social_publications` rather than hardcoding it, because it grows.
|
|
4188
4189
|
* @enum {string}
|
|
4189
4190
|
*/
|
|
4190
|
-
social_network?: "facebook" | "instagram" | "twitter" | "linkedin" | "tiktok" | "whatsapp" | "youtube" | "bluesky" | "discord" | "telegram";
|
|
4191
|
+
social_network?: "facebook" | "instagram" | "twitter" | "linkedin" | "tiktok" | "whatsapp" | "youtube" | "bluesky" | "discord" | "telegram" | "threads";
|
|
4191
4192
|
/**
|
|
4192
4193
|
* @description Send `draft` to store the publication without publishing it. If omitted, the state is resolved automatically: `ready` when everything validates, `withErrors` otherwise. Forcing `sended` marks it as published without actually sending it.
|
|
4193
4194
|
* @enum {string}
|
|
@@ -4299,6 +4300,8 @@ interface components {
|
|
|
4299
4300
|
*
|
|
4300
4301
|
* On `bluesky` there are no impressions and no reach either — only the public counters — so engagement is computed over followers.
|
|
4301
4302
|
*
|
|
4303
|
+
* On `threads` there are six, and the one that matters is `views`: it is the only one of the four newest networks with something like impressions, so its engagement rate is computed over a real base and not over followers. Sharing arrives split in three — `reposts`, `quotes` and `shares` (outside Threads) — and the three are added into one figure, the same criterion as on X; the breakdown stays in `raw`. A reply is what every other network calls a comment.
|
|
4304
|
+
*
|
|
4302
4305
|
* On `telegram` there are two as well, and **neither of them is asked for**: the Bot API has no method that returns a message's metrics, so `reactions` arrives on its own through the bot and `comments` is counted in PlanVortex's own inbox. There are no impressions, no reach, no views and no forwards to be had anywhere in it, so engagement is computed over followers.
|
|
4303
4306
|
*/
|
|
4304
4307
|
PublicationStats: {
|
|
@@ -4384,7 +4387,7 @@ interface components {
|
|
|
4384
4387
|
* **This list grows.** Treat it as an open enumeration: a client that rejects an unknown value breaks the day a network is added, which happens several times a year. Not every network does everything — ask `GET /social_capabilities`.
|
|
4385
4388
|
* @enum {string}
|
|
4386
4389
|
*/
|
|
4387
|
-
SocialNetwork: "facebook" | "instagram" | "linkedin" | "tiktok" | "twitter" | "whatsapp" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram";
|
|
4390
|
+
SocialNetwork: "facebook" | "instagram" | "linkedin" | "tiktok" | "twitter" | "whatsapp" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram" | "threads";
|
|
4388
4391
|
/** @description Statistics collection settings. Only `auto_refresh_twitter` is read; any other key is ignored. */
|
|
4389
4392
|
StatsSettings: {
|
|
4390
4393
|
/**
|
|
@@ -10887,7 +10890,8 @@ interface operations {
|
|
|
10887
10890
|
* "google_business",
|
|
10888
10891
|
* "bluesky",
|
|
10889
10892
|
* "discord",
|
|
10890
|
-
* "telegram"
|
|
10893
|
+
* "telegram",
|
|
10894
|
+
* "threads"
|
|
10891
10895
|
* ]
|
|
10892
10896
|
*/
|
|
10893
10897
|
"application/json": components["schemas"]["SocialNetwork"][];
|
|
@@ -1231,7 +1231,7 @@ interface paths {
|
|
|
1231
1231
|
* The inbox: first-level comments across the whole organization
|
|
1232
1232
|
* @description Served from PlanVortex's database, so it costs nothing and calls no social network. It is a **snapshot**: `collected_date` says when each row was last read. Open a thread to see what the network says right now.
|
|
1233
1233
|
*
|
|
1234
|
-
* Ordered by `creation_date` descending — the date on the network, not the date we collected it — so rows from
|
|
1234
|
+
* Ordered by `creation_date` descending — the date on the network, not the date we collected it — so rows from ten networks interleave correctly.
|
|
1235
1235
|
*
|
|
1236
1236
|
* **On `telegram` the inbox starts the day the channel was connected.** The Bot API has no way to read the past: a bot only learns what happens while it is inside, so nothing written before the connection exists here and never will. Say so in your UI — an inbox that opens empty on a busy channel reads like a failure.
|
|
1237
1237
|
*
|
|
@@ -1358,7 +1358,7 @@ interface paths {
|
|
|
1358
1358
|
*
|
|
1359
1359
|
* **An app cannot call this.** Connecting a social account is an OAuth flow with a person in front of it, so this endpoint only accepts a user token or a temporal connect token; with app credentials it answers error 519. The way an integration does it is to issue a temporal connect token with `GET /organizations/{id_organization}/temporal_connect_token` and hand it to its end user.
|
|
1360
1360
|
*
|
|
1361
|
-
* **Read `authorization`, not `link`.**
|
|
1361
|
+
* **Read `authorization`, not `link`.** Ten of the twelve networks are `redirect` and you send the person to `link`. Two are not, and neither of them fails visibly if you treat it as one:
|
|
1362
1362
|
*
|
|
1363
1363
|
* • **WhatsApp is not a URL at all.** Its sign-up is Meta's Embedded Signup, a popup you raise with the Facebook JavaScript SDK, so its `link` is an empty string and everything you need to open that popup travels in `authorization`. A client that loops over the list and redirects to `link` sends its user to its own page.
|
|
1364
1364
|
* • **Telegram has a link and still is not a redirect.** It opens a chat with the PlanVortex bot, and nobody comes back from it: the account is born minutes later, from the bot being added to a channel, and it is announced over the WebSocket. Open it in another tab and keep listening; redirect to it and there is nobody left to tell.
|
|
@@ -2348,7 +2348,7 @@ interface paths {
|
|
|
2348
2348
|
*
|
|
2349
2349
|
* `comments` is the coarse gate — whether the network has comments at all. Which *actions* it allows on one is a finer question and lives in `GET /social_comment_actions`, because the shape here is `{[capability]: boolean}` and nesting an object inside would break it.
|
|
2350
2350
|
*
|
|
2351
|
-
* Today
|
|
2351
|
+
* Today ten networks answer `comments: true`: Facebook, Instagram, Threads, LinkedIn, X, YouTube, Google Business, Bluesky, Discord and Telegram. TikTok and WhatsApp answer `false`, for reasons of theirs and not ours.
|
|
2352
2352
|
*
|
|
2353
2353
|
* A `true` here is about the **network**, not about one account of it: a Telegram channel with no linked discussion group answers 965 on its comments even though the network has them.
|
|
2354
2354
|
*
|
|
@@ -2387,6 +2387,7 @@ interface paths {
|
|
|
2387
2387
|
* | `bluesky` | yes | yes — through the post's `threadgate` | yes | **no** — the reply lives in somebody else's repository |
|
|
2388
2388
|
* | `discord` | yes | **no** — Discord has no hide, only delete | yes | yes |
|
|
2389
2389
|
* | `telegram` | yes | **no** — Telegram has no hide either | yes | yes — with the bot as an admin of the discussion group, otherwise error 969 |
|
|
2390
|
+
* | `threads` | yes | yes | yes | **no** — deleting somebody else's reply is not a permission you lack, it is a call that does not exist in the API |
|
|
2390
2391
|
* | `tiktok`, `whatsapp` | no | no | no | no |
|
|
2391
2392
|
*
|
|
2392
2393
|
* Only needs authentication.
|
|
@@ -2580,7 +2581,7 @@ interface components {
|
|
|
2580
2581
|
/**
|
|
2581
2582
|
* @description **How** an account of this network is authorized, which is not always "send the user to this URL".
|
|
2582
2583
|
*
|
|
2583
|
-
*
|
|
2584
|
+
* Ten of the twelve networks are `redirect`: open `link` and the network sends the person back to PlanVortex with a code. Two are not:
|
|
2584
2585
|
*
|
|
2585
2586
|
* • **WhatsApp.** Its sign-up is Meta's *Embedded Signup*: a popup raised by the Facebook JavaScript SDK from your own page, which returns — over `postMessage` — session data (`waba_id`, `phone_number_id`) that no query string carries. Its `link` is therefore an empty string.
|
|
2586
2587
|
* • **Telegram.** There is no OAuth here: no consent screen, no `code`, no account token. `link` opens a private chat with the PlanVortex bot, the person then adds that bot to their channel, and **the account is created from that event**, not from any request of yours. Which means the connection cannot be finished by calling `GET /organizations/{id_organization}/account-connect/telegram` — see that endpoint.
|
|
@@ -3040,7 +3041,7 @@ interface components {
|
|
|
3040
3041
|
};
|
|
3041
3042
|
CatalogSocialLimits: {
|
|
3042
3043
|
/**
|
|
3043
|
-
* @description Maximum length of a publication's text. Bluesky
|
|
3044
|
+
* @description Maximum length of a publication's text. **Bluesky and Threads count GRAPHEMES**, everyone else counts characters — Telegram included, where `String.length` is exactly the right unit. The difference is not academic: an emoji is one grapheme and two `String.length` units, so counting a Threads post with `.length` rejects at 250 emojis what the network publishes happily at 500.
|
|
3044
3045
|
*
|
|
3045
3046
|
* On Telegram there are **two numbers for the same field**: `telegram` (4.096) while the publication is text only, and `telegram_media` (1.024) the moment it carries an image or a video, because then the text is a media caption and not a message. Switch the counter when the file is attached, not when publish is pressed.
|
|
3046
3047
|
*/
|
|
@@ -3284,7 +3285,7 @@ interface components {
|
|
|
3284
3285
|
* @description A network that has comments. Treat it as an open list: a new one is added before your integration hears about it.
|
|
3285
3286
|
* @enum {string}
|
|
3286
3287
|
*/
|
|
3287
|
-
CommentsCommentNetworkName: "facebook" | "instagram" | "twitter" | "linkedin" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram";
|
|
3288
|
+
CommentsCommentNetworkName: "facebook" | "instagram" | "twitter" | "linkedin" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram" | "threads";
|
|
3288
3289
|
/** @description A live read: asked of the network and reconciled with what was stored. */
|
|
3289
3290
|
CommentsCommentThread: {
|
|
3290
3291
|
comments: components["schemas"]["CommentsComment"][];
|
|
@@ -4187,7 +4188,7 @@ interface components {
|
|
|
4187
4188
|
* Not every connectable network publishes — a local business listing receives reviews, not posts — so this list is shorter than the one in `GET /social_networks`. Ask `GET /allowed_social_publications` rather than hardcoding it, because it grows.
|
|
4188
4189
|
* @enum {string}
|
|
4189
4190
|
*/
|
|
4190
|
-
social_network?: "facebook" | "instagram" | "twitter" | "linkedin" | "tiktok" | "whatsapp" | "youtube" | "bluesky" | "discord" | "telegram";
|
|
4191
|
+
social_network?: "facebook" | "instagram" | "twitter" | "linkedin" | "tiktok" | "whatsapp" | "youtube" | "bluesky" | "discord" | "telegram" | "threads";
|
|
4191
4192
|
/**
|
|
4192
4193
|
* @description Send `draft` to store the publication without publishing it. If omitted, the state is resolved automatically: `ready` when everything validates, `withErrors` otherwise. Forcing `sended` marks it as published without actually sending it.
|
|
4193
4194
|
* @enum {string}
|
|
@@ -4299,6 +4300,8 @@ interface components {
|
|
|
4299
4300
|
*
|
|
4300
4301
|
* On `bluesky` there are no impressions and no reach either — only the public counters — so engagement is computed over followers.
|
|
4301
4302
|
*
|
|
4303
|
+
* On `threads` there are six, and the one that matters is `views`: it is the only one of the four newest networks with something like impressions, so its engagement rate is computed over a real base and not over followers. Sharing arrives split in three — `reposts`, `quotes` and `shares` (outside Threads) — and the three are added into one figure, the same criterion as on X; the breakdown stays in `raw`. A reply is what every other network calls a comment.
|
|
4304
|
+
*
|
|
4302
4305
|
* On `telegram` there are two as well, and **neither of them is asked for**: the Bot API has no method that returns a message's metrics, so `reactions` arrives on its own through the bot and `comments` is counted in PlanVortex's own inbox. There are no impressions, no reach, no views and no forwards to be had anywhere in it, so engagement is computed over followers.
|
|
4303
4306
|
*/
|
|
4304
4307
|
PublicationStats: {
|
|
@@ -4384,7 +4387,7 @@ interface components {
|
|
|
4384
4387
|
* **This list grows.** Treat it as an open enumeration: a client that rejects an unknown value breaks the day a network is added, which happens several times a year. Not every network does everything — ask `GET /social_capabilities`.
|
|
4385
4388
|
* @enum {string}
|
|
4386
4389
|
*/
|
|
4387
|
-
SocialNetwork: "facebook" | "instagram" | "linkedin" | "tiktok" | "twitter" | "whatsapp" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram";
|
|
4390
|
+
SocialNetwork: "facebook" | "instagram" | "linkedin" | "tiktok" | "twitter" | "whatsapp" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram" | "threads";
|
|
4388
4391
|
/** @description Statistics collection settings. Only `auto_refresh_twitter` is read; any other key is ignored. */
|
|
4389
4392
|
StatsSettings: {
|
|
4390
4393
|
/**
|
|
@@ -10887,7 +10890,8 @@ interface operations {
|
|
|
10887
10890
|
* "google_business",
|
|
10888
10891
|
* "bluesky",
|
|
10889
10892
|
* "discord",
|
|
10890
|
-
* "telegram"
|
|
10893
|
+
* "telegram",
|
|
10894
|
+
* "threads"
|
|
10891
10895
|
* ]
|
|
10892
10896
|
*/
|
|
10893
10897
|
"application/json": components["schemas"]["SocialNetwork"][];
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var path = require('path');
|
|
|
4
4
|
|
|
5
5
|
// src/version.ts
|
|
6
6
|
var PLANVORTEX_API_URL = "https://api.planvortex.com/v1.0.0";
|
|
7
|
-
var VERSION = "0.
|
|
7
|
+
var VERSION = "0.7.0";
|
|
8
8
|
|
|
9
9
|
// src/core/errors.ts
|
|
10
10
|
var PLANVORTEX_ERROR_RANGES = [
|
|
@@ -609,7 +609,7 @@ var AccountsResource = class extends Resource {
|
|
|
609
609
|
* no un fallo: es lo que pasa con Discord en una organización que todavía no ha guardado sus
|
|
610
610
|
* propias credenciales de bot.
|
|
611
611
|
*
|
|
612
|
-
* **MIRA `authorization`, NO si `link` está vacío.**
|
|
612
|
+
* **MIRA `authorization`, NO si `link` está vacío.** Diez de las doce redes son `redirect` y se
|
|
613
613
|
* manda a la persona a `link`. Las otras dos no, y ninguna de las dos falla de forma visible si
|
|
614
614
|
* se recorre la lista redirigiendo a `link`:
|
|
615
615
|
*
|