planvortex 0.22.0 → 0.24.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.
@@ -869,9 +869,9 @@ interface paths {
869
869
  * The thread of an account, read live
870
870
  * @description The twin of the publication endpoint, for networks whose comments **do not hang off a publication of yours**.
871
871
  *
872
- * Today that is Google Business: a review hangs off the **listing**, so the account has no publication to ask about. Its `publication_external_id` is the listing itself (`locations/{id}`) and `id_publication` is always absent.
872
+ * There are two. On **Google Business** a review hangs off the **listing**, so the account has no publication to ask about: its `publication_external_id` is the listing itself (`locations/{id}`) and `id_publication` is always absent. On **Discord** this is what people tell the brand in the channel itself, outside the threads of your posts: `publication_external_id` is the id of the channel, and `id_publication` is there when the message answers one of your posts.
873
873
  *
874
- * Same reconciliation, same permissions, same shape of response as the publication thread. Pick between the two by looking at the comment: if it has an `id_publication`, use that one; if it does not, use this.
874
+ * Same reconciliation, same permissions, same shape of response as the publication thread. Pick between the two by looking at the comment: if it hangs off a publication of yours (its `publication_external_id` is that publication's `external_identifier`), use that one; if it does not, use this.
875
875
  *
876
876
  * One behaviour differs underneath, and it matters if you are reasoning about deletions: **reviews are exempt from the deletion sweep**. Google's review listing cannot be ordered by creation date (only by last update or by rating), so the rule that says "newer than the oldest row on this page and missing from it means it is gone" does not hold, and applying it would empty most of a busy listing's inbox in one pass. The trade is deliberate: a review Google removes may linger, which is rare, rather than good rows disappearing, which is not recoverable.
877
877
  *
@@ -1083,7 +1083,9 @@ interface paths {
1083
1083
  * Messages exchanged with one contact
1084
1084
  * @description The thread with one contact, newest first.
1085
1085
  *
1086
- * **Reading the first page marks the thread as read** (`offset=0` only), which is what makes `unread_messages` go down. If PlanVortex has nothing stored for that contact it imports the thread from the network first.
1086
+ * **Reading the first page marks the thread as read in PlanVortex** (`offset=0` only), which is what makes `unread_messages` go down. **It does not tell the network**, so the contact still sees their messages as unread (grey ticks on WhatsApp, no "Seen" on Messenger or Instagram). That is on purpose: an assistant or an automation that reads the inbox should not tell your customers that somebody saw their message. When a person has seen it, call `POST .../messages/{id_contact}/read`.
1087
+ *
1088
+ * If PlanVortex has nothing stored for that contact it imports the thread from the network first.
1087
1089
  */
1088
1090
  get: operations["getMessages"];
1089
1091
  put?: never;
@@ -1091,6 +1093,8 @@ interface paths {
1091
1093
  * Send a message to a contact
1092
1094
  * @description Writes to the contact through the account's network.
1093
1095
  *
1096
+ * **Replying also marks the contact's messages as read on the network**, just before sending, so they see the blue ticks (WhatsApp) or "Seen" (Messenger, Instagram) and then your reply. If marking fails, the message is sent anyway.
1097
+ *
1094
1098
  * What is valid depends on `message_type` and on the network:
1095
1099
  *
1096
1100
  * • `simple_message` needs `text`, and it is validated against `characters` in `GET /social_limits`.
@@ -1107,6 +1111,34 @@ interface paths {
1107
1111
  patch?: never;
1108
1112
  trace?: never;
1109
1113
  };
1114
+ "/organizations/{id_organization}/accounts/{id_account}/messages/{id_contact}/read": {
1115
+ parameters: {
1116
+ query?: never;
1117
+ header?: never;
1118
+ path?: never;
1119
+ cookie?: never;
1120
+ };
1121
+ get?: never;
1122
+ put?: never;
1123
+ /**
1124
+ * Mark a conversation as read, on the network too
1125
+ * @description Marks the thread with this contact as read in PlanVortex, as reading its first page does, **and tells the network, so the contact sees it**: blue ticks on WhatsApp, "Seen" on Messenger and Instagram, and the conversation marked read in the Bluesky app.
1126
+ *
1127
+ * Call it when a person has actually seen the conversation. Reading messages with `GET` never does this, and replying with `POST .../messages/{id_contact}` does it on its own.
1128
+ *
1129
+ * • It marks the contact's **latest** message; the network marks everything before it.
1130
+ * • Calling it again is free: once the network has the latest message as read, no request goes to the network until the contact writes again.
1131
+ * • `network_read` says whether the network has the conversation as read when the call ends. It is `false` when the network has no read receipts, when the network refused the request (calling again retries it), or on WhatsApp when the latest message is more than 30 days old, which WhatsApp does not let anyone mark. The read state in PlanVortex is updated either way.
1132
+ *
1133
+ * Requires `messages:read` (`client_organization_messages:read` for apps), the same as reading the conversation, and a paid plan like the rest of messaging. On a network without conversations it answers error 1502.
1134
+ */
1135
+ post: operations["markConversationRead"];
1136
+ delete?: never;
1137
+ options?: never;
1138
+ head?: never;
1139
+ patch?: never;
1140
+ trace?: never;
1141
+ };
1110
1142
  "/organizations/{id_organization}/accounts/{id_account}/messages/{id_message}/files/{index}": {
1111
1143
  parameters: {
1112
1144
  query?: never;
@@ -1406,7 +1438,7 @@ interface paths {
1406
1438
  * The inbox: first-level comments across the whole organization
1407
1439
  * @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.
1408
1440
  *
1409
- * Ordered by `creation_date` descending — the date on the network, not the date we collected it — so rows from ten networks interleave correctly.
1441
+ * Ordered by `creation_date` descending — the date on the network, not the date we collected it — so rows from every network interleave correctly.
1410
1442
  *
1411
1443
  * **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.
1412
1444
  *
@@ -1436,7 +1468,7 @@ interface paths {
1436
1468
  * @description Two different kinds of change, accepted together because a panel changes them from the same place:
1437
1469
  *
1438
1470
  * - `read` is **yours**. It touches no social network, costs nothing and can always be set.
1439
- * - `hidden` **touches the network**, and not every network allows it — LinkedIn and Google Business have no hide endpoint at all and return error `946`. Check `GET /social_comment_actions` before offering the control.
1471
+ * - `hidden` **touches the network**, and not every network allows it — LinkedIn and Google Business have no hide endpoint at all and return error `946`. Check `GET /social_comment_actions` before offering the control. Hiding is moderating what **others** write: your own comments cannot be hidden on any network (error `2603`), only deleted. On TikTok, showing a comment that TikTok's moderation or its author's privacy settings keep hidden does not work, and the answer is error `2809`.
1440
1472
  *
1441
1473
  * Setting `read` requires the `comments:read` permission (`client_organization_comments:read` for apps): marking a comment read is part of reading it, as opening a conversation is in the chat. Setting `hidden` also requires `comments:create` (`client_organization_comments:create`), the same as replying, and without it the whole request is refused with `520` and nothing changes, `read` included. Both need a paid plan.
1442
1474
  */
@@ -1446,7 +1478,7 @@ interface paths {
1446
1478
  * Delete the comment on the social network
1447
1479
  * @description Deletes it **on the network** and marks the row `deleted: true` here. The row is kept on purpose rather than removed: if it were removed, the next read of the thread — or the webhook, which repeats — would create it again.
1448
1480
  *
1449
- * Which comments you may delete depends on the network and on whose comment it is, and the two cases use different permissions of the network's own: `delete_own` for yours, `delete_others` for somebody else's. Instagram and X refuse the second; **on Google Business the only thing that can be deleted is your own reply**, never a review. Reading `GET /social_comment_actions` first is the difference between a button that works and one that always errors.
1481
+ * Which comments you may delete depends on the network and on whose comment it is, and the two cases use different permissions of the network's own: `delete_own` for yours, `delete_others` for somebody else's. Instagram, X and TikTok refuse the second; **on Google Business the only thing that can be deleted is your own reply**, never a review. Reading `GET /social_comment_actions` first is the difference between a button that works and one that always errors.
1450
1482
  *
1451
1483
  * On X this costs credits.
1452
1484
  *
@@ -1509,6 +1541,8 @@ interface paths {
1509
1541
  *
1510
1542
  * Your own replies written in the last few minutes are injected into the first page even when the network does not list them yet: networks index what you just wrote with a delay, and without this you would post a reply, refresh, and see nothing.
1511
1543
  *
1544
+ * On Discord, the replies to a comment from the channel come from PlanVortex's own inbox and not from a live read: your replies go out through a webhook, and Discord does not say which message they answered. The channel is read every five minutes.
1545
+ *
1512
1546
  * On Google Business a review has **at most one** reply — yours — so this returns zero or one row and there is no tree to walk.
1513
1547
  *
1514
1548
  * Requires the `comments:read` permission (`client_organization_comments:read` for apps) and a paid plan.
@@ -1543,6 +1577,8 @@ interface paths {
1543
1577
  *
1544
1578
  * **On X this costs credits**: 15, or 200 if the text contains a link, charged only on success.
1545
1579
  *
1580
+ * **On `discord` the reply goes where the comment is.** To a comment in a thread, inside the thread. To a comment from the channel, in the channel and mentioning its author, who is the only person notified.
1581
+ *
1546
1582
  * **On `telegram` the reply is signed by the PlanVortex bot**, not by the channel. It is written in the channel's linked discussion group, which is where Telegram keeps the comments on a channel post — and a channel with no discussion group has no comments at all, which is error 965. Publishing is not affected: a channel post is signed by the channel.
1547
1583
  *
1548
1584
  * Requires the `comments:create` permission (`client_organization_comments:create` for apps) and a paid plan.
@@ -2668,7 +2704,7 @@ interface paths {
2668
2704
  *
2669
2705
  * `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.
2670
2706
  *
2671
- * Today ten networks answer `comments: true`: Facebook, Instagram, Threads, LinkedIn, X, YouTube, Google Business, Bluesky, Discord and Telegram. TikTok, WhatsApp, Slack and Pinterest answer `false`, for reasons of theirs and not ours — on Pinterest the API *counts* a pin's comments and offers no way to read them, so the figure shows up in the publication's statistics and there is still no inbox.
2707
+ * Today `comments: true` is the answer of Facebook, Instagram, Threads, LinkedIn, TikTok, X, YouTube, Google Business, Bluesky, Discord and Telegram. WhatsApp, Slack and Pinterest answer `false`, for reasons of theirs and not ours — on Pinterest the API *counts* a pin's comments and offers no way to read them, so the figure shows up in the publication's statistics and there is still no inbox.
2672
2708
  *
2673
2709
  * **Three of the keys are about publishing, not about reading.** `destinations` says the network publishes into places inside the account and every publication has to name one — a Pinterest board, read with `GET /organizations/{id_organization}/accounts/{id_account}/destinations`. `link` says a publication carries a destination link of its own, separate from its text. Both are `false` everywhere but `pinterest` today. `reply_control` says a publication can choose who can reply to it, and is `true` only on `threads`. The three are the reason to ask this matrix instead of keeping a list of your own: a composer with its own copy of which network has which field is exactly what drifted with the character limits.
2674
2710
  *
@@ -2676,7 +2712,7 @@ interface paths {
2676
2712
  *
2677
2713
  * **`statistics` says whether PlanVortex reads any metric of that network.** It is `true` on every network but `whatsapp`, which does not publish and has no metrics to read. Use it to decide which accounts to offer on a statistics screen (or filter the account list with `capability=statistics`) instead of finding out from an empty series.
2678
2714
  *
2679
- * 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.
2715
+ * 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, and a TikTok account answers 2600 until comments are turned on for it in the dashboard.
2680
2716
  *
2681
2717
  * Only needs authentication.
2682
2718
  */
@@ -2714,7 +2750,8 @@ interface paths {
2714
2750
  * | `discord` | yes | **no** — Discord has no hide, only delete | yes | yes |
2715
2751
  * | `telegram` | yes | **no** — Telegram has no hide either | yes | yes — with the bot as an admin of the discussion group, otherwise error 969 |
2716
2752
  * | `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 |
2717
- * | `tiktok`, `whatsapp` | no | no | no | no |
2753
+ * | `tiktok` | yes | yes | yes | **no** — TikTok only lets you hide someone else's |
2754
+ * | `whatsapp`, `slack`, `pinterest` | no | no | no | no |
2718
2755
  *
2719
2756
  * Only needs authentication.
2720
2757
  */
@@ -2800,7 +2837,7 @@ interface webhooks {
2800
2837
  *
2801
2838
  * `field: "comments"` is the one for this section, and the comment itself travels in **`commentObj`** — a property of its own, never in `messageObj`. That is deliberate: a comment is not a message, it has no contact and it hangs off a publication. A consumer that only understands messages sees `commentObj` as absent and ignores the change, which is exactly what should happen.
2802
2839
  *
2803
- * **Which networks arrive this way:** Facebook and Instagram, because Meta pushes them. YouTube, LinkedIn and Google Business have no comment webhook, so those are polled by a background job and appear in the inbox within a few hours rather than instantly. X is polled too, and only when the organization turns it on, because reading replies there is billed per unit.
2840
+ * **Which networks arrive this way:** Facebook and Instagram, because Meta pushes them, and TikTok, which pushes them within a few minutes. YouTube, LinkedIn and Google Business have no comment webhook, so those are polled by a background job and appear in the inbox within a few hours rather than instantly. X is polled too, and only when the organization turns it on, because reading replies there is billed per unit.
2804
2841
  *
2805
2842
  * **Meta repeats deliveries.** The same comment can arrive more than once; the backend is idempotent about it and so should you be — deduplicate on `commentObj.external_id`.
2806
2843
  *
@@ -2846,10 +2883,17 @@ interface components {
2846
2883
  *
2847
2884
  * On `linkedin` one authorization brings two kinds of account: the **personal profile** of whoever authorizes and each **page** they manage. Both publish and both have statistics, but only pages have a comment inbox: LinkedIn does not let any app read the comments on a member's posts, so on a profile every comment endpoint returns error `2600`. `extra_data.is_personal_profile` tells them apart.
2848
2885
  *
2886
+ * On `tiktok` comments need a second authorization of the same account (TikTok API for Business, personal and Business accounts alike), turned on from the PlanVortex dashboard. Until then the account publishes and has statistics, and every comment endpoint returns error `2600`. `extra_data.tiktok_business` says whether comments are on.
2887
+ *
2849
2888
  * `error_code` other than `0` means the connection is broken — an expired token, a permission taken away — and the account has to be connected again. On `telegram` nothing expires, because there is no account token: what breaks the connection is the bot being removed from the channel or losing its permission to post there (error 968). On `slack` the bot token does not expire either: what breaks it is the app being removed from the channel (error 980) or the channel being archived or deleted (error 985).
2850
2889
  */
2851
2890
  Account: {
2852
2891
  _id: string;
2892
+ /** @description What goes into this account's comment inbox. Only `discord` uses it, and its absence means the defaults. */
2893
+ comments_settings?: {
2894
+ /** @description Discord only. `false` (the default): the inbox gets what is addressed to the brand, that is, replies to your posts in the channel and mentions of your bot. `true`: it gets every message a person writes in the channel, which is meant for a support or questions channel where nobody mentions the bot. Turning it off later keeps what already came in. */
2895
+ all_channel_messages?: boolean;
2896
+ };
2853
2897
  /** Format: date-time */
2854
2898
  creation_date: string;
2855
2899
  /** @description `0` is a healthy account. Anything else is a PlanVortex error code explaining why the connection stopped working; the account keeps its data but cannot be used until it is reconnected. */
@@ -2858,6 +2902,23 @@ interface components {
2858
2902
  extra_data?: {
2859
2903
  /** @description `linkedin` only. `true` on the personal profile of whoever authorized, `false` on a page. A profile publishes and has statistics but no comment inbox (error `2600`). Pages connected before personal profiles existed do not carry it, so treat absent as a page. */
2860
2904
  is_personal_profile?: boolean;
2905
+ /** @description `tiktok` only, and only once somebody has turned comments on for this account in the PlanVortex dashboard. Absent means comments were never turned on: the account publishes, and every comment endpoint answers `2600`. It cannot be turned on through the API, because TikTok sends that authorization back to the dashboard and nowhere else. */
2906
+ tiktok_business?: {
2907
+ /** @description `true` when the comment inbox works for this account. Read it together with `error_code`. */
2908
+ comments?: boolean;
2909
+ /**
2910
+ * Format: date-time
2911
+ * @description When comments were turned on.
2912
+ */
2913
+ connected_at?: string;
2914
+ display_name?: string;
2915
+ /** @description Absent or `0` when it works. `2804` when TikTok no longer accepts the authorization behind comments: they have to be turned on again in the dashboard. It never touches the account's own `error_code`, so publishing keeps working. */
2916
+ error_code?: number;
2917
+ /** @description TikTok direct messages. Always `false` today. */
2918
+ messages?: boolean;
2919
+ /** @description The TikTok @username that authorized, already checked against this account's. Comments are only turned on for the same account that publishes. */
2920
+ username?: string;
2921
+ };
2861
2922
  } & {
2862
2923
  [key: string]: unknown;
2863
2924
  };
@@ -3854,6 +3915,7 @@ interface components {
3854
3915
  *
3855
3916
  * • A Google Business reply has no id of its own — it is a *field* of the review — so PlanVortex fabricates a stable one, `{reviewId}/reply`.
3856
3917
  * • A Telegram comment lives in a **different chat** from the post it answers (the channel's linked discussion group), so it needs two ids at once and travels as `{thread}/{message}`: replying wants the first, deleting wants the second.
3918
+ * • A TikTok comment travels as `{video_id}/{comment_id}`, because TikTok asks for the video to hide a comment or to reply to it.
3857
3919
  */
3858
3920
  external_id: string;
3859
3921
  /**
@@ -3862,7 +3924,11 @@ interface components {
3862
3924
  * Facebook, Threads, LinkedIn, X, Bluesky, Discord and Telegram give a comment's files, and on Google Business they are the photos and videos of a review. Instagram and YouTube do not expose them in their APIs, so there the list is always empty. A comment that is only a photo has an empty `text` and one file here.
3863
3925
  */
3864
3926
  files_urls?: components["schemas"]["SocialFileUrl"][];
3865
- /** @description Hidden on the network. A hidden comment is never swept as deleted: on YouTube, hiding one makes the API stop returning it forever, and without that exception hiding would be indistinguishable from deleting. */
3927
+ /**
3928
+ * @description Hidden on the network. A hidden comment is never swept as deleted: on YouTube, hiding one makes the API stop returning it forever, and without that exception hiding would be indistinguishable from deleting.
3929
+ *
3930
+ * On TikTok every new comment is hidden for a few minutes while TikTok reviews it. That state is not reported here: during a comment's first ten minutes this keeps the value it already had.
3931
+ */
3866
3932
  hidden: boolean;
3867
3933
  /**
3868
3934
  * @description The connected account it arrived on.
@@ -3874,6 +3940,8 @@ interface components {
3874
3940
  /**
3875
3941
  * @description **Your** publication, when there is one — and there often is not: a video uploaded to the channel by hand, a post that predates PlanVortex, and every Google Business review have comments with no publication of ours behind them. What always identifies the target is `publication_external_id`.
3876
3942
  *
3943
+ * On Discord, a comment written in the channel itself hangs off the channel and not off this publication: here it says which of your posts it answers.
3944
+ *
3877
3945
  * Same asymmetry as `id_account`: the inbox listing resolves it into the whole publication, every other operation returns the identifier as a string.
3878
3946
  */
3879
3947
  id_publication?: string | components["schemas"]["Publication"];
@@ -3883,7 +3951,7 @@ interface components {
3883
3951
  our_reply_external_id?: string;
3884
3952
  /** @description Present only when this is a reply to another comment */
3885
3953
  parent_external_id?: string;
3886
- /** @description What the comment hangs off, on the network: the post/video id in most networks, the **listing** (`locations/{id}`) for a Google Business review, and the published message's id on Telegram — where the thread that holds the comments *is* the forwarded post. */
3954
+ /** @description What the comment hangs off, on the network: the post/video id in most networks, the **listing** (`locations/{id}`) for a Google Business review, the **channel** for what is written in a Discord channel outside the threads of your posts, and the published message's id on Telegram — where the thread that holds the comments *is* the forwarded post. */
3887
3955
  publication_external_id: string;
3888
3956
  /**
3889
3957
  * @description Star rating of a **review**. Present only on review networks — today Google Business. Its absence means "this network has no such thing", never zero.
@@ -3925,7 +3993,7 @@ interface components {
3925
3993
  * @description A network that has comments. Treat it as an open list: a new one is added before your integration hears about it.
3926
3994
  * @enum {string}
3927
3995
  */
3928
- CommentsCommentNetworkName: "facebook" | "instagram" | "twitter" | "linkedin" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram" | "threads";
3996
+ CommentsCommentNetworkName: "facebook" | "instagram" | "twitter" | "linkedin" | "youtube" | "tiktok" | "google_business" | "bluesky" | "discord" | "telegram" | "threads";
3929
3997
  /** @description A live read: asked of the network and reconciled with what was stored. */
3930
3998
  CommentsCommentThread: {
3931
3999
  comments: components["schemas"]["CommentsComment"][];
@@ -4337,7 +4405,7 @@ interface components {
4337
4405
  * The catalogue grows with the product, so treat an unknown `code` as a generic failure instead of rejecting it.
4338
4406
  */
4339
4407
  Error: {
4340
- /** @description PlanVortex error code. Ranges: 500-554 auth, tokens, client apps and connect sessions · 601-612 user · 700-716 social accounts · 800-810 files · 900-996 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1309 client plan · 1400-1408 organization plan · 1500-1517 messaging · 1600-1601 contacts · 1900-1906 payments · 2000-2099 products · 2100-2199 AI plans · 2200-2299 integrations · 2500-2599 publication fields, the ones that no longer fit in 900-996 (visibility, made for kids, TikTok's interactions and commercial content) · 2600-2699 comments, the ones that no longer fit in 945-948. */
4408
+ /** @description PlanVortex error code. Ranges: 500-554 auth, tokens, client apps and connect sessions · 601-612 user · 700-716 social accounts · 800-810 files · 900-996 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1309 client plan · 1400-1408 organization plan · 1500-1517 messaging · 1600-1601 contacts · 1900-1906 payments · 2000-2099 products · 2100-2199 AI plans · 2200-2299 integrations · 2500-2599 publication fields, the ones that no longer fit in 900-996 (visibility, made for kids, TikTok's interactions and commercial content) · 2600-2699 comments, the ones that no longer fit in 945-948 · 2700-2799 Discord · 2800-2899 TikTok comments, the ones that go through TikTok API for Business. */
4341
4409
  code: number;
4342
4410
  /** @description Extra context attached to the error, when there is any. */
4343
4411
  data?: {
@@ -4670,6 +4738,18 @@ interface components {
4670
4738
  /** @description Unread messages **from the contact**. Ours never count. */
4671
4739
  unread_messages: number;
4672
4740
  };
4741
+ /**
4742
+ * @example {
4743
+ * "success": true,
4744
+ * "network_read": true
4745
+ * }
4746
+ */
4747
+ MessagesConversationRead: {
4748
+ /** @description Whether the contact now sees the conversation as read on the network. `false` when the network has no read receipts, refused the request (call again to retry), or the latest WhatsApp message is older than 30 days. */
4749
+ network_read: boolean;
4750
+ /** @constant */
4751
+ success: true;
4752
+ };
4673
4753
  /** @description Two different answers, not one with optional fields: **without** `group_by` you get `{total}`, **with** it you get `{stats, group}`. Never both. */
4674
4754
  MessagesConversationTotals: {
4675
4755
  /** @description Conversations in the range. A conversation is one contact on one day, so the same person writing on Monday and on Tuesday counts twice. */
@@ -5616,8 +5696,8 @@ interface components {
5616
5696
  * | `700` | The account is not connected — no valid token, or nothing to ask the network about. |
5617
5697
  * | `936` | The publication was never sent, so it has no thread to read. |
5618
5698
  * | `940` | The client's monthly X credits are exhausted. Only X. |
5619
- * | `945` | This network has no comments (TikTok, WhatsApp). Carries `social_network` in `data`. |
5620
- * | `946` | The network has comments but does not allow **this action**: hiding on LinkedIn or Google Business, deleting someone else's on Instagram or X, deleting a review. Carries `social_network` and `action` in `data`. See `GET /social_comment_actions`. |
5699
+ * | `945` | This network has no comments (WhatsApp, Slack, Pinterest). Carries `social_network` in `data`. |
5700
+ * | `946` | The network has comments but does not allow **this action**: hiding on LinkedIn or Google Business, deleting someone else's on Instagram, X or TikTok, deleting a review. Carries `social_network` and `action` in `data`. See `GET /social_comment_actions`. |
5621
5701
  * | `947` | The comment no longer exists on the network. What is stored is a photograph; the network always wins. Carries `external_id` in `data`. |
5622
5702
  * | `948` | The reply is empty or longer than the network allows. Carries the limit in `data.max`; the same number is published in `comment_characters` of `GET /social_limits`. |
5623
5703
  * | `951` | The Google Business listing is not verified, so it cannot reply to its reviews. It is the state of the customer's profile, not of your token. |
@@ -5627,7 +5707,12 @@ interface components {
5627
5707
  * | `970` | Telegram is rate limiting the bot and the wait was longer than PlanVortex is willing to hold the request for. Carries `retry_after_seconds` in `data`: retry after it. |
5628
5708
  * | `1101` | Invalid organization. |
5629
5709
  * | `1501` | The comment's account could not be resolved. |
5630
- * | `2600` | The network has comments but **this account** has none: a LinkedIn personal profile. LinkedIn does not let any app read a member's comments, so only pages have an inbox. Carries `social_network` and `id_account` in `data`. |
5710
+ * | `2600` | The network has comments but **this account** has none: a LinkedIn personal profile (LinkedIn does not let any app read a member's comments, so only pages have an inbox), or a TikTok account whose comments have not been turned on in the dashboard. Carries `social_network` and `id_account` in `data`. |
5711
+ * | `2601` | The network refused the action on the comment: a permission the app lacks, a comment that does not accept replies, an account that lost its access. |
5712
+ * | `2603` | Hiding or showing one of **your own** comments. No network allows it: delete it instead. |
5713
+ * | `2804` | TikTok: the authorization behind this account's comments expired or was revoked. Comments have to be turned on again in the dashboard; publishing is not affected. |
5714
+ * | `2805` | TikTok is rate limiting PlanVortex's app. Temporary: retry shortly. |
5715
+ * | `2809` | TikTok keeps this comment hidden (its moderation, or the privacy settings of whoever wrote it), so showing it had no effect. |
5631
5716
  */
5632
5717
  CommentsCommentError: {
5633
5718
  headers: {
@@ -7993,7 +8078,7 @@ interface operations {
7993
8078
  /**
7994
8079
  * @description Only accounts whose network can do this. It is the same matrix `GET /social_capabilities` publishes, applied server-side: the way to ask for 'the accounts I can publish with' without keeping your own table of which network does what.
7995
8080
  *
7996
- * `comments` also looks at each account, not only at its network: a LinkedIn **personal profile** is left out, because only LinkedIn pages have a comment inbox. `total` counts the same way.
8081
+ * `comments` also looks at each account, not only at its network: a LinkedIn **personal profile** is left out, because only LinkedIn pages have a comment inbox, and so is a TikTok account whose comments have not been turned on (or stopped working, `extra_data.tiktok_business.error_code`). `total` counts the same way.
7997
8082
  *
7998
8083
  * `statistics` leaves out the networks PlanVortex reads no metric from (today `whatsapp`): the accounts worth offering on a statistics screen.
7999
8084
  */
@@ -8114,6 +8199,11 @@ interface operations {
8114
8199
  requestBody: {
8115
8200
  content: {
8116
8201
  "application/json": {
8202
+ /** @description What goes into this account's comment inbox. Only `discord` uses it: on any other network it is ignored, and the account comes back without it. */
8203
+ comments_settings?: {
8204
+ /** @description Discord only. `false` (the default): the inbox gets what is addressed to the brand, that is, replies to your posts in the channel and mentions of your bot. `true`: it gets every message a person writes in the channel, which is meant for a support or questions channel where nobody mentions the bot. Turning it off later keeps what already came in. */
8205
+ all_channel_messages?: boolean;
8206
+ };
8117
8207
  /** @description Display name for the connected account inside PlanVortex. It does not rename anything on the social network. If omitted, the current name is kept. */
8118
8208
  name?: string;
8119
8209
  };
@@ -8744,6 +8834,34 @@ interface operations {
8744
8834
  400: components["responses"]["MessagesError"];
8745
8835
  };
8746
8836
  };
8837
+ markConversationRead: {
8838
+ parameters: {
8839
+ query?: never;
8840
+ header?: never;
8841
+ path: {
8842
+ /** @description Connected account identifier */
8843
+ id_account: components["parameters"]["MessagesidAccount"];
8844
+ /** @description Contact identifier */
8845
+ id_contact: components["parameters"]["MessagesidContact"];
8846
+ /** @description Organization identifier */
8847
+ id_organization: components["parameters"]["MessagesidOrganization"];
8848
+ };
8849
+ cookie?: never;
8850
+ };
8851
+ requestBody?: never;
8852
+ responses: {
8853
+ /** @description Marked as read in PlanVortex, and `network_read` says whether the network has it too */
8854
+ 200: {
8855
+ headers: {
8856
+ [name: string]: unknown;
8857
+ };
8858
+ content: {
8859
+ "application/json": components["schemas"]["MessagesConversationRead"];
8860
+ };
8861
+ };
8862
+ 400: components["responses"]["MessagesError"];
8863
+ };
8864
+ };
8747
8865
  getMessageFile: {
8748
8866
  parameters: {
8749
8867
  query?: {
@@ -13127,6 +13245,13 @@ type ClientWithOrganizations = Operations["getClientsWithOrganizations"]["respon
13127
13245
  * paginas tienen bandeja de comentarios: LinkedIn no deja a ninguna app leer los comentarios de un
13128
13246
  * perfil, y ahi todo `comments.*` devuelve el error 2600. Se distinguen por
13129
13247
  * `extra_data.is_personal_profile`; ausente es pagina (las conectadas antes de que hubiera perfiles).
13248
+ *
13249
+ * En TikTok los comentarios piden una segunda autorizacion de la misma cuenta (TikTok API for
13250
+ * Business, vale una cuenta personal o una Business), que se activa desde el panel de PlanVortex.
13251
+ * Hasta entonces la
13252
+ * cuenta publica y tiene estadisticas, y todo `comments.*` devuelve el 2600.
13253
+ * `extra_data.tiktok_business` dice si estan activos (`comments`) y lleva `error_code` 2804
13254
+ * cuando hay que volver a activarlos, sin tocar el `error_code` de la cuenta.
13130
13255
  */
13131
13256
  type Account = Override<Schemas["Account"], {
13132
13257
  social_network: SocialNetwork;
@@ -13398,7 +13523,9 @@ type PublicationStatsPoint = Override<Schemas["PublicationsPublicationStatsPoint
13398
13523
  * - **`id_publication` falta** cuando el comentario no cuelga de una publicacion nuestra, y eso
13399
13524
  * no es raro: la resena de Google Business cuelga de la FICHA (ahi `publication_external_id`
13400
13525
  * es `locations/{id}`), y un video subido a mano al canal o un post anterior a PlanVortex
13401
- * tambien reciben comentarios. Lo que identifica siempre es `publication_external_id`.
13526
+ * tambien reciben comentarios. Lo que identifica siempre es `publication_external_id`. Y al
13527
+ * reves en Discord: lo que se escribe en el propio canal cuelga del CANAL, y ahi
13528
+ * `id_publication`, si esta, dice a que publicacion contesta y no de que cuelga.
13402
13529
  * - **`id_account` e `id_publication` cambian de forma segun la operacion**: LA BANDEJA los
13403
13530
  * devuelve poblados —el objeto entero— y todo lo demas —los hilos en vivo, responder,
13404
13531
  * actualizar— como cadena. Es la misma asimetria que `Publication.id_account` y se tapa igual,
@@ -13466,6 +13593,15 @@ type Conversation = Override<Schemas["MessagesConversation"], {
13466
13593
  * 2026—, no una fecha. Con `group_by: "day"` dos anos del mismo rango caen en el mismo valor.
13467
13594
  */
13468
13595
  type ConversationTotals = Schemas["MessagesConversationTotals"];
13596
+ /**
13597
+ * Lo que devuelve marcar una conversacion como leida EN LA RED (`messages.markConversationRead`).
13598
+ *
13599
+ * `network_read` dice si, al terminar, la red la tiene por leida: el contacto ve los ticks azules
13600
+ * (WhatsApp) o el «Visto» (Messenger, Instagram). Es `false` si la red no tiene acuse de lectura,
13601
+ * si fallo (llamar otra vez lo reintenta) o, en WhatsApp, si el ultimo mensaje tiene mas de 30
13602
+ * dias. En PlanVortex queda leida de todas formas.
13603
+ */
13604
+ type ConversationRead = Schemas["MessagesConversationRead"];
13469
13605
  /**
13470
13606
  * Lo que se manda para escribir un mensaje.
13471
13607
  *
@@ -14402,4 +14538,4 @@ interface PlanVortexWebhooksOptions {
14402
14538
  */
14403
14539
  declare function planvortexWebhooks(options: PlanVortexWebhooksOptions): (request: WebhookRequestLike, response: WebhookResponseLike, next: (error?: unknown) => void) => void;
14404
14540
 
14405
- export { type Client as $, type Account as A, type Comment as B, type ConnectLink as C, type Destination as D, type EnableResult as E, type CommentThread as F, type CommentReplyResult as G, type ContactExtraData as H, type Contact as I, type ContactCreate as J, type ContactUpdate as K, type IntegrationProviderName as L, type MetricName as M, type IntegrationProvider as N, type Integration as O, type Paginated as P, type IntegrationConnectRequest as Q, type IntegrationUpdate as R, type SocialNetwork as S, type TopPublicationsResult as T, type IntegrationPickerConfig as U, type IntegrationCatalogPage as V, type MessageTemplate as W, type Conversation as X, type ConversationTotals as Y, type Message as Z, type MessageInput as _, type ConnectResult as a, type MessageType as a$, type Organization as a0, type AiSettings as a1, type ClientWithOrganizations as a2, type AccountSelection as a3, type PlanData as a4, type PlanUseData as a5, type ConnectToken as a6, type AiContext as a7, type SocialCredentialsInput as a8, type Product as a9, type AiPlanSourceProduct as aA, type AiPlanState as aB, type ApiErrorBody as aC, type AspectRatios as aD, AuthError as aE, type ClientPlan as aF, type CommentAuthor as aG, type CommentChange as aH, type ConnectSessionAccount as aI, type ContactChannel as aJ, ContactError as aK, type DashboardAiPlanRef as aL, type DashboardPublicationRef as aM, type DashboardRange as aN, type EngagementBase as aO, FileError as aP, type FileFormat as aQ, type FileProperties as aR, type FileType as aS, type IntegrationCatalogProduct as aT, type IntegrationConfig as aU, IntegrationError as aV, type IntegrationErrorChange as aW, type IntegrationFormField as aX, type MessageChange as aY, type MessageEchoChange as aZ, type MessageOptions as a_, type ProductInput as aa, type ProductCatalog as ab, type ProductCatalogInput as ac, type PublicationInput as ad, type PublicationState as ae, type PublicationStats as af, type PublicationStatsHistory as ag, type Upload as ah, AccountError as ai, type AccountMetricRow as aj, type AccountStateChange as ak, type AccountWebhookChangeBase as al, type AccountWithError as am, type AiImageOrigin as an, type AiPlanCostEstimate as ao, type AiPlanDestination as ap, AiPlanError as aq, type AiPlanNotice as ar, type AiPlanOptions as as, type AiPlanOptionsInput as at, type AiPlanResult as au, type AiPlanResultsGroup as av, type AiPlanResultsTemplateGroup as aw, type AiPlanSource as ax, type AiPlanSourceImageInput as ay, type AiPlanSourceInput as az, type ConnectSession as b, WEBHOOK_SIGNATURE_HEADERS as b$, MessagingError as b0, type MetricRow as b1, NO_ERROR_CODE as b2, type components as b3, type operations as b4, type paths as b5, type webhooks as b6, type OpenEnum as b7, OrganizationError as b8, PLANVORTEX_ERROR_RANGES as b9, type TopPublication as bA, type UnknownWebhookChange as bB, UserError as bC, type WebhookAlgorithm as bD, type WebhookChange as bE, type WebhookEvent as bF, type WithAccount as bG, type WithPublication as bH, type WooCommerceConnectRequest as bI, account as bJ, accountId as bK, errorFamilyForCode as bL, isPlanVortexError as bM, isTokenError as bN, messageContact as bO, messageContactId as bP, messageDirection as bQ, messageFileIds as bR, messageFiles as bS, publication as bT, publicationId as bU, type AiPlanChange as bV, type HandleWebhookRequestOptions as bW, type PlanVortexWebhooksOptions as bX, type RawWebhookBody as bY, type VerifyWebhookSignatureOptions as bZ, WEBHOOK_EVENTS as b_, PlanLimitError as ba, PlanVortexAuthenticationError as bb, PlanVortexConfigError as bc, PlanVortexConnectionError as bd, PlanVortexError as be, type PlanVortexErrorOptions as bf, type PlanVortexErrorRange as bg, type PlannerTemplateField as bh, type PlannerTemplateFieldType as bi, ProductError as bj, type PublicationAiGenerated as bk, type PublicationDestination as bl, PublicationError as bm, type PublicationErrorDetail as bn, type PublicationMetrics as bo, type PublicationPending as bp, type PublicationStatsPoint as bq, type PublicationType as br, type PublicationsSummary as bs, type RssConfig as bt, type SocialAuthorizationMethod as bu, type SocialCredentials as bv, type SocialIdentifier as bw, type SocialIdentifierInput as bx, type SocialLimitsMap as by, TOKEN_ERROR_CODES as bz, type AccountMetrics as c, WebhookBodyError as c0, type WebhookHeaders as c1, type WebhookRequestLike as c2, type WebhookResponseLike as c3, WebhookSignatureError as c4, handleWebhookRequest as c5, isAccountStateChange as c6, isAiPlanChange as c7, isCommentChange as c8, isIntegrationErrorChange as c9, isMessageChange as ca, isMessageEchoChange as cb, parseWebhookPayload as cc, planvortexWebhooks as cd, verifyWebhookSignature as ce, type PublishSettings as d, type PersistentMenu as e, type Dashboard as f, type DashboardMetricsResult as g, type PublicationsSummaryResult as h, type PublicationsStatsResult as i, type PlanUse as j, type Publication as k, type AiPlanResultsSort as l, type PlannerTemplateName as m, type AiPlanCreateRequest as n, type AiPlanCreateResult as o, type AiPlan as p, type AiPlanResults as q, type ClientApp as r, type ClientAppInput as s, type SocialCapabilities as t, type CommentActions as u, type SocialLimits as v, type PublicationLimits as w, type AspectRatiosByNetwork as x, type PlannerTemplate as y, type CommentNetwork as z };
14541
+ export { type ConversationRead as $, type Account as A, type Comment as B, type ConnectLink as C, type Destination as D, type EnableResult as E, type CommentThread as F, type CommentReplyResult as G, type ContactExtraData as H, type Contact as I, type ContactCreate as J, type ContactUpdate as K, type IntegrationProviderName as L, type MetricName as M, type IntegrationProvider as N, type Integration as O, type Paginated as P, type IntegrationConnectRequest as Q, type IntegrationUpdate as R, type SocialNetwork as S, type TopPublicationsResult as T, type IntegrationPickerConfig as U, type IntegrationCatalogPage as V, type MessageTemplate as W, type Conversation as X, type ConversationTotals as Y, type Message as Z, type MessageInput as _, type ConnectResult as a, type MessageOptions as a$, type Client as a0, type Organization as a1, type AiSettings as a2, type ClientWithOrganizations as a3, type AccountSelection as a4, type PlanData as a5, type PlanUseData as a6, type ConnectToken as a7, type AiContext as a8, type SocialCredentialsInput as a9, type AiPlanSourceInput as aA, type AiPlanSourceProduct as aB, type AiPlanState as aC, type ApiErrorBody as aD, type AspectRatios as aE, AuthError as aF, type ClientPlan as aG, type CommentAuthor as aH, type CommentChange as aI, type ConnectSessionAccount as aJ, type ContactChannel as aK, ContactError as aL, type DashboardAiPlanRef as aM, type DashboardPublicationRef as aN, type DashboardRange as aO, type EngagementBase as aP, FileError as aQ, type FileFormat as aR, type FileProperties as aS, type FileType as aT, type IntegrationCatalogProduct as aU, type IntegrationConfig as aV, IntegrationError as aW, type IntegrationErrorChange as aX, type IntegrationFormField as aY, type MessageChange as aZ, type MessageEchoChange as a_, type Product as aa, type ProductInput as ab, type ProductCatalog as ac, type ProductCatalogInput as ad, type PublicationInput as ae, type PublicationState as af, type PublicationStats as ag, type PublicationStatsHistory as ah, type Upload as ai, AccountError as aj, type AccountMetricRow as ak, type AccountStateChange as al, type AccountWebhookChangeBase as am, type AccountWithError as an, type AiImageOrigin as ao, type AiPlanCostEstimate as ap, type AiPlanDestination as aq, AiPlanError as ar, type AiPlanNotice as as, type AiPlanOptions as at, type AiPlanOptionsInput as au, type AiPlanResult as av, type AiPlanResultsGroup as aw, type AiPlanResultsTemplateGroup as ax, type AiPlanSource as ay, type AiPlanSourceImageInput as az, type ConnectSession as b, WEBHOOK_EVENTS as b$, type MessageType as b0, MessagingError as b1, type MetricRow as b2, NO_ERROR_CODE as b3, type components as b4, type operations as b5, type paths as b6, type webhooks as b7, type OpenEnum as b8, OrganizationError as b9, TOKEN_ERROR_CODES as bA, type TopPublication as bB, type UnknownWebhookChange as bC, UserError as bD, type WebhookAlgorithm as bE, type WebhookChange as bF, type WebhookEvent as bG, type WithAccount as bH, type WithPublication as bI, type WooCommerceConnectRequest as bJ, account as bK, accountId as bL, errorFamilyForCode as bM, isPlanVortexError as bN, isTokenError as bO, messageContact as bP, messageContactId as bQ, messageDirection as bR, messageFileIds as bS, messageFiles as bT, publication as bU, publicationId as bV, type AiPlanChange as bW, type HandleWebhookRequestOptions as bX, type PlanVortexWebhooksOptions as bY, type RawWebhookBody as bZ, type VerifyWebhookSignatureOptions as b_, PLANVORTEX_ERROR_RANGES as ba, PlanLimitError as bb, PlanVortexAuthenticationError as bc, PlanVortexConfigError as bd, PlanVortexConnectionError as be, PlanVortexError as bf, type PlanVortexErrorOptions as bg, type PlanVortexErrorRange as bh, type PlannerTemplateField as bi, type PlannerTemplateFieldType as bj, ProductError as bk, type PublicationAiGenerated as bl, type PublicationDestination as bm, PublicationError as bn, type PublicationErrorDetail as bo, type PublicationMetrics as bp, type PublicationPending as bq, type PublicationStatsPoint as br, type PublicationType as bs, type PublicationsSummary as bt, type RssConfig as bu, type SocialAuthorizationMethod as bv, type SocialCredentials as bw, type SocialIdentifier as bx, type SocialIdentifierInput as by, type SocialLimitsMap as bz, type AccountMetrics as c, WEBHOOK_SIGNATURE_HEADERS as c0, WebhookBodyError as c1, type WebhookHeaders as c2, type WebhookRequestLike as c3, type WebhookResponseLike as c4, WebhookSignatureError as c5, handleWebhookRequest as c6, isAccountStateChange as c7, isAiPlanChange as c8, isCommentChange as c9, isIntegrationErrorChange as ca, isMessageChange as cb, isMessageEchoChange as cc, parseWebhookPayload as cd, planvortexWebhooks as ce, verifyWebhookSignature as cf, type PublishSettings as d, type PersistentMenu as e, type Dashboard as f, type DashboardMetricsResult as g, type PublicationsSummaryResult as h, type PublicationsStatsResult as i, type PlanUse as j, type Publication as k, type AiPlanResultsSort as l, type PlannerTemplateName as m, type AiPlanCreateRequest as n, type AiPlanCreateResult as o, type AiPlan as p, type AiPlanResults as q, type ClientApp as r, type ClientAppInput as s, type SocialCapabilities as t, type CommentActions as u, type SocialLimits as v, type PublicationLimits as w, type AspectRatiosByNetwork as x, type PlannerTemplate as y, type CommentNetwork as z };