planvortex 0.13.0 → 0.15.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.
@@ -367,7 +367,7 @@ interface paths {
367
367
  put?: never;
368
368
  /**
369
369
  * Create an AI publication plan
370
- * @description Create a weekly AI publication plan. The plan is queued in state 'pending' and generated asynchronously by the generate-ai-plans job; poll GET by id while state is pending or generating. Validations at creation: the client plan allows AI (it contracts AI credits; Free does not), the accounts belong to the organization, there are enough AI credits for the deterministic base cost (orchestration + target texts), and there is room in the organization's monthly publication limit. Returns the created plan together with the deterministic cost estimate. Requires the ai_plans:create permission. Since the plan can be generated from a SOURCE (`template` + `source`), part of that validation is the source itself: the article is downloaded, the catalogue is read live and the product pictures are copied — all of it inside this request, so what does not work fails with the user in front of it. A plan whose source did not fit in the week is still created, and says so in ai_plan.warnings (2117). With a Pinterest account in the plan, two more checks run at creation: every Pinterest account needs its board in `destinations` (2118), and a configuration that would leave pins without an image is refused (2119).
370
+ * @description Create a weekly AI publication plan. The plan is queued in state 'pending' and generated asynchronously by the generate-ai-plans job. When it finishes, your app's `webhook_url` receives `ai_plan_generated` or `ai_plan_failed` (the payload is in the comments specification, `AiPlanWebhookChange`); without a webhook, poll GET by id while state is pending or generating. The webhook is best effort and not retried, so the GET is still the source of truth. Validations at creation: the client plan allows AI (it contracts AI credits; Free does not), the accounts belong to the organization, there are enough AI credits for the deterministic base cost (orchestration + target texts), and there is room in the organization's monthly publication limit. Returns the created plan together with the deterministic cost estimate. Requires the ai_plans:create permission. Since the plan can be generated from a SOURCE (`template` + `source`), part of that validation is the source itself: the article is downloaded, the catalogue is read live and the product pictures are copied — all of it inside this request, so what does not work fails with the user in front of it. A plan whose source did not fit in the week is still created, and says so in ai_plan.warnings (2117). With a Pinterest account in the plan, two more checks run at creation: every Pinterest account needs its board in `destinations` (2118), and a configuration that would leave pins without an image is refused (2119).
371
371
  */
372
372
  post: operations["addAiPlan"];
373
373
  delete?: never;
@@ -385,7 +385,7 @@ interface paths {
385
385
  };
386
386
  /**
387
387
  * Get an AI publication plan by id
388
- * @description Return a single AI plan with its generated publications populated. This is the endpoint clients poll while state is pending or generating to detect when generation finishes. Requires the ai_plans:read permission.
388
+ * @description Return a single AI plan with its generated publications populated. Read it when your app receives `ai_plan_generated` or `ai_plan_failed`. Without a webhook, this is the endpoint to poll while state is pending or generating. The webhook is not retried, so if your endpoint was down when the plan finished, this GET still tells you how it ended. Requires the ai_plans:read permission.
389
389
  */
390
390
  get: operations["getAiPlan"];
391
391
  put?: never;
@@ -463,7 +463,7 @@ interface paths {
463
463
  put?: never;
464
464
  /**
465
465
  * Retry a failed AI publication plan
466
- * @description Re-queue a failed plan: it goes back to state 'pending' (attempts and error reset) and the background job regenerates it with the SAME data (prompt, accounts, options). Poll the plan while state is pending or generating, as after creation. Only valid from state 'failed'. Already-spent credits are NOT refunded and a new generation spends again; drafts left over from the failed attempt are discarded by the generation itself. If the failure was a business error (no AI credits, no monthly publication slots), retrying will fail the same way. Requires the ai_plans:update permission.
466
+ * @description Re-queue a failed plan: it goes back to state 'pending' (attempts and error reset) and the background job regenerates it with the SAME data (prompt, accounts, options). As after creation, the end arrives on your webhook as `ai_plan_generated` or `ai_plan_failed`; without one, poll the plan while state is pending or generating. Only valid from state 'failed'. Already-spent credits are NOT refunded and a new generation spends again; drafts left over from the failed attempt are discarded by the generation itself. If the failure was a business error (no AI credits, no monthly publication slots), retrying will fail the same way. Requires the ai_plans:update permission.
467
467
  */
468
468
  post: operations["retryAiPlan"];
469
469
  delete?: never;
@@ -1085,6 +1085,7 @@ interface paths {
1085
1085
  *
1086
1086
  * • `simple_message` needs `text`, and it is validated against `characters` in `GET /social_limits`.
1087
1087
  * • **WhatsApp only allows a free-form message inside 24 hours** of the contact's last message. Outside that window the only thing that goes through is a `template_message` with a pre-approved template, and anything else answers an error.
1088
+ * • A `template_message` needs `message_options.template_name` and `template_language`, and, if the template's body has variables, `template_parameters` with their values in order (`{{1}}`, `{{2}}`...). That is what turns an approved template into an appointment reminder with the customer's name and time.
1088
1089
  * • `file_message` needs at least one entry in `message_options.files` (an upload of this organization) or in `files_urls`.
1089
1090
  * • Facebook and Instagram accept **one** file per message.
1090
1091
  * • `quick_reply_message`, `button_message`, `elements_message` and `interactive_message` are Meta-only shapes and each one requires its own block inside `message_options`.
@@ -1241,7 +1242,9 @@ interface paths {
1241
1242
  put?: never;
1242
1243
  /**
1243
1244
  * Create new publications
1244
- * @description Create new publications. For X (Twitter) accounts, paid actions consume the client's monthly X credit pool (shared across organizations). When a publication is sent immediately, the required credits are checked before publishing and only charged on success. A tweet costs 15 credits, or 200 credits if its text contains a link. Link detection uses the same rule the backend applies: an http(s):// URL, a www. host, or a bare domain with a recognized TLD (regex TWITTER_LINK_REGEX). A scheduled publication does not consume credits when created; it is charged when the background job publishes it. If there are not enough credits at publish time the scheduled publication is left in state 'withErrors' with publication_errors.code = 940 and the client-app webhook is fired (it is never thrown). Publishing immediately without enough credits returns error 940.
1245
+ * @description Create new publications. For X (Twitter) accounts, paid actions consume the client's monthly X credit pool (shared across organizations). When a publication is sent immediately, the required credits are checked before publishing and only charged on success. A tweet costs 15 credits, or 200 credits if its text contains a link. Link detection uses the same rule the backend applies: an http(s):// URL, a www. host, or a bare domain with a recognized TLD (regex TWITTER_LINK_REGEX). A scheduled publication does not consume credits when created; it is charged when the background job publishes it. If there are not enough credits at publish time the scheduled publication is left in state 'withErrors' with publication_errors.code = 940 (it is never thrown, and no webhook announces it: read the publication to find out). Publishing immediately without enough credits returns error 940.
1246
+ *
1247
+ * **An Instagram video can come back in state `publishing`, and that is not an error.** Instagram processes a video before it can be published, and the request waits about 30 seconds for it. If Meta has not finished by then, the response carries `state: "publishing"` and a `pending_publish` object, and PlanVortex keeps asking Instagram about once a minute in the background, for up to 10 minutes. Read the publication again (`GET /organizations/{id_organization}/publish/{id_publication}`) after `pending_publish.next_check` until it is `sended` or `withErrors`. **Do not retry it or create it again**: the first one is still on its way, and a second one would publish the video twice.
1245
1248
  */
1246
1249
  post: operations["addPublication"];
1247
1250
  delete?: never;
@@ -1462,6 +1465,8 @@ interface paths {
1462
1465
  *
1463
1466
  * • **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.
1464
1467
  * • **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.
1468
+ *
1469
+ * **With a temporal token issued with `account_selection=integrator`** the list has a single entry: the session's network, with the session's `state` inside its link. Any other link would go back through the hosted flow, which that token cannot use (error 554). Once the person has come back from the network the session is no longer waiting for a link, and this answers 551.
1465
1470
  */
1466
1471
  get: operations["getConnectLinks"];
1467
1472
  put?: never;
@@ -1472,6 +1477,56 @@ interface paths {
1472
1477
  patch?: never;
1473
1478
  trace?: never;
1474
1479
  };
1480
+ "/organizations/{id_organization}/connect_sessions/{id_session}": {
1481
+ parameters: {
1482
+ query?: never;
1483
+ header?: never;
1484
+ path?: never;
1485
+ cookie?: never;
1486
+ };
1487
+ /**
1488
+ * Read a connect session
1489
+ * @description What your user authorized, so your app can show its own account picker. It only exists for temporal tokens issued with `account_selection=integrator`.
1490
+ *
1491
+ * **What arrives at your `redirect_uri`**: `connect_session` and `social_network`, never account ids. When the connection did not finish there is also `error`: the network's own value (`access_denied` when the person cancelled), `no_accounts` when the network returned none (on `instagram`, an account that is not a business account linked to a page), or `connect_failed` together with our `error_code`. In those three cases the session is still `pending` and the person can try again with the same link.
1492
+ *
1493
+ * **Only the app that issued the token** can read it, with its own credentials. Any other app gets 551, the same answer as an unknown or expired session: the id travels in a URL and should not confirm to anybody that it exists.
1494
+ *
1495
+ * `already_enabled` marks an account that was already connected (a reconnection), which takes no slot. `accounts_used` and `accounts_limit` are the plan counter. A `returned` session lives **thirty minutes**.
1496
+ */
1497
+ get: operations["getConnectSession"];
1498
+ put?: never;
1499
+ post?: never;
1500
+ delete?: never;
1501
+ options?: never;
1502
+ head?: never;
1503
+ patch?: never;
1504
+ trace?: never;
1505
+ };
1506
+ "/organizations/{id_organization}/connect_sessions/{id_session}/confirm": {
1507
+ parameters: {
1508
+ query?: never;
1509
+ header?: never;
1510
+ path?: never;
1511
+ cookie?: never;
1512
+ };
1513
+ get?: never;
1514
+ put?: never;
1515
+ /**
1516
+ * Confirm the accounts of a connect session
1517
+ * @description Enables the accounts your user picked and closes the session. Send an empty list if they picked none: the session closes and nothing is enabled.
1518
+ *
1519
+ * **All or nothing.** If the new accounts do not fit in the plan, the answer is 706 with `{limit, used, requested}` and **none** of them is enabled, so you can show that number as it is. Accounts with `already_enabled: true` do not count.
1520
+ *
1521
+ * Each enabled account fires the `new_account` webhook to your app, as on any other connection.
1522
+ */
1523
+ post: operations["confirmConnectSession"];
1524
+ delete?: never;
1525
+ options?: never;
1526
+ head?: never;
1527
+ patch?: never;
1528
+ trace?: never;
1529
+ };
1475
1530
  "/organizations/{id_organization}/contacts": {
1476
1531
  parameters: {
1477
1532
  query?: never;
@@ -1939,6 +1994,8 @@ interface paths {
1939
1994
  * @description Delete publication by identifier. It stops being readable by identifier afterwards, so deleting twice answers error 917. For an already-sent X (Twitter) publication, removing the tweet on X is a paid action that consumes 15 X credits; it is only removed on X when there are enough credits. Returns error 940 when the X credit pool is exhausted.
1940
1995
  *
1941
1996
  * **On Telegram there is a 48-hour window.** Past it the Bot API refuses to delete a message whatever the bot's role is, and the answer is error 966 with `published_date` and `max_hours` in `data` — so the sensible thing is to grey the button out rather than offer it and fail. Error 969 is the other case: the bot is no longer allowed to delete there. And an album is several messages: all of them go, or the post would be left half-published in the channel.
1997
+ *
1998
+ * **Deleting a publication that is still `publishing` with `pending_publish` stops it**: PlanVortex stops asking Instagram and never publishes it, unless the check running at that very moment has already done so.
1942
1999
  */
1943
2000
  delete: operations["deletePublication"];
1944
2001
  options?: never;
@@ -2009,7 +2066,9 @@ interface paths {
2009
2066
  * Retry a failed publication
2010
2067
  * @description Sends a publication that ended in state `withErrors` to its social network again, WITHOUT changing its content.
2011
2068
  *
2012
- * The publication is sent during the request, so the response already carries the outcome: `state: "sended"` if it went out, or `state: "withErrors"` with the errors of THIS attempt if it failed again. A scheduled publication whose date has not arrived yet goes back to `ready` and the scheduler picks it up at its time.
2069
+ * The publication is sent during the request, so the response already carries the outcome: `state: "sended"` if it went out, or `state: "withErrors"` with the errors of THIS attempt if it failed again. An Instagram video can also come back in `publishing` with `pending_publish`: the attempt goes on in the background, and the retry is already spent (see `pending_publish` in `Publication`).
2070
+ *
2071
+ * On Instagram, a retry is worth it after a **999** (Meta ran out of time) and pointless after a **998** (Meta rejected the file): change the file with a `PUT` first. A scheduled publication whose date has not arrived yet goes back to `ready` and the scheduler picks it up at its time.
2013
2072
  *
2014
2073
  * Every accepted call spends one retry, even when the publication fails again — what the endpoint promises is an attempt, not a success. The limit is `max_retries`, also served by `GET /publication_limits`. Once it is spent the way to try again is to update the publication (`PUT`), which resets the counter to 0, or to create a new one.
2015
2074
  */
@@ -2247,6 +2306,16 @@ interface paths {
2247
2306
  *
2248
2307
  * **If you pass `social_network`, the token is bound to that network** and will not connect any other (error 544). Leave it out to let the person pick.
2249
2308
  *
2309
+ * **Or show the account picker yourself** with `account_selection=integrator`. By default PlanVortex shows the screen where the person picks which accounts to enable, and only then sends them to your `redirect_uri`. In this mode that screen is yours:
2310
+ *
2311
+ * 1. The `url` that comes back is **the network's own authorization page**, so the person goes there straight from your app. Keep the `connect_session` id next to your user's session.
2312
+ * 2. When they finish, the network sends them through PlanVortex, which renders nothing, to `redirect_uri?connect_session=…&social_network=…`. Check that the id is the one you started.
2313
+ * 3. Read the accounts with `GET /organizations/{id_organization}/connect_sessions/{id_session}`, show your picker, and confirm with `POST /organizations/{id_organization}/connect_sessions/{id_session}/confirm`.
2314
+ *
2315
+ * This mode needs `redirect_uri` and `social_network` (error 549): your app also picks the network. `telegram` cannot use it (error 550), because its link opens a chat that never comes back to the browser. On `whatsapp` the `url` is still a PlanVortex page with one button, because Meta's popup only opens on our domain; the picker after it is yours.
2316
+ *
2317
+ * PlanVortex's domain does show in the address bar on the way back: networks only return to the URLs registered in their own portals.
2318
+ *
2250
2319
  * If you send `redirect_uri` it has to be one of the app's `redirect_urls`, or the call answers error 532.
2251
2320
  */
2252
2321
  get: operations["createTemporalConnectToken"];
@@ -2489,7 +2558,7 @@ interface paths {
2489
2558
  *
2490
2559
  * 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.
2491
2560
  *
2492
- * **Two 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, and both 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.
2561
+ * **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.
2493
2562
  *
2494
2563
  * 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.
2495
2564
  *
@@ -2607,9 +2676,9 @@ interface webhooks {
2607
2676
  * A change happened (notification to your app)
2608
2677
  * @description PlanVortex `POST`s to the `webhook_url` of your client app when something happens. **The body is an array of changes**, and each one carries `field` telling you what it is — switch on it and ignore what you do not handle, because the list grows with the product.
2609
2678
  *
2610
- * Two shapes travel in that array. A change on an **account** (`WebhookChange`) always carries `id_account`, `id_organization` and `social_network`. A change on an **integration** (`IntegrationWebhookChange`) carries none of those, because an integration hangs off the organization and not off any account.
2679
+ * Three shapes travel in that array. A change on an **account** (`WebhookChange`) always carries `id_account`, `id_organization` and `social_network`. A change on an **integration** (`IntegrationWebhookChange`) and the end of an **AI plan** (`AiPlanWebhookChange`) carry none of those, because they hang off the organization and not off any account.
2611
2680
  *
2612
- * The events delivered today are `new_account`, `change_state_account`, `messages`, `messaging_postbacks`, `messaging_seen`, `messaging_error`, `comments` and `integration_error`.
2681
+ * The events delivered today are `new_account`, `change_state_account`, `messages`, `messaging_postbacks`, `messaging_seen`, `messaging_error`, `comments`, `integration_error`, `ai_plan_generated` and `ai_plan_failed`.
2613
2682
  *
2614
2683
  * ### Comments
2615
2684
  *
@@ -2619,6 +2688,14 @@ interface webhooks {
2619
2688
  *
2620
2689
  * **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`.
2621
2690
  *
2691
+ * ### AI plans
2692
+ *
2693
+ * `ai_plan_generated` and `ai_plan_failed` say that a plan has **finished**: it was generated, or it gave up. Instead of polling the plan every few seconds, wait for one of these and then read it once with `GET /clients/{id_client}/organizations/{id_organization}/ai_plans/{id_ai_plan}`. The change carries ids and numbers only, never the prompt or the generated text, so the publications are in that `GET`.
2694
+ *
2695
+ * A plan that hits a transient error goes back to the queue and is retried. That is not an end and sends nothing, so each plan sends **one** of these two events, never a `failed` followed by a `generated`. A plan generated with notices (`warnings` above zero) is still `ai_plan_generated`: it is usable, and the notices are in the plan.
2696
+ *
2697
+ * The event goes to **every** app of the client that has a `webhook_url`, not only to the one that created the plan. And it is not retried: if your endpoint was down when the plan finished, the `GET` still tells you how it ended, so on startup read the plans you were waiting for.
2698
+ *
2622
2699
  * ### Verifying the signature
2623
2700
  *
2624
2701
  * Every delivery carries the body signed with your app's secret, twice:
@@ -2686,6 +2763,39 @@ interface components {
2686
2763
  AccountsAccountOne: {
2687
2764
  account: components["schemas"]["Account"];
2688
2765
  };
2766
+ /** @description A connection in `account_selection=integrator` mode, from the moment the temporal token is issued until your app confirms which accounts stay. */
2767
+ AccountsConnectSession: {
2768
+ /** @description The id that comes back in your `redirect_uri` as `connect_session`. */
2769
+ _id: string;
2770
+ /** @description The accounts **this** authorization brought back, in the order the network returned them. Never other pending accounts of the organization. Empty while `pending`. */
2771
+ accounts: components["schemas"]["AccountsConnectSessionAccount"][];
2772
+ /** @description Accounts the plan allows. New accounts beyond `accounts_limit - accounts_used` answer 706 on confirm. */
2773
+ accounts_limit: number;
2774
+ /** @description Accounts of the plan already in use: the same counter the PlanVortex screen shows. */
2775
+ accounts_used: number;
2776
+ /** Format: date-time */
2777
+ creation_date?: string;
2778
+ /**
2779
+ * Format: date-time
2780
+ * @description While `pending`, the token's expiry. Once `returned`, thirty minutes after the person came back. After it the session answers 551 and its accounts stay unconnected.
2781
+ */
2782
+ expires_at: string;
2783
+ id_client?: string;
2784
+ id_organization?: string;
2785
+ /** @description The app that issued the token. Only that app can read or confirm the session. */
2786
+ keycloak_client_idenfifier?: string;
2787
+ redirect_uri?: string;
2788
+ social_network: components["schemas"]["SocialNetwork"];
2789
+ /**
2790
+ * @description `pending`: the person has not come back from the network yet. `returned`: the accounts are waiting for your choice. `confirmed`: done, the session cannot be used again.
2791
+ * @enum {string}
2792
+ */
2793
+ status: "pending" | "returned" | "confirmed";
2794
+ };
2795
+ AccountsConnectSessionAccount: components["schemas"]["Account"] & {
2796
+ /** @description `true` when the account was already connected before this authorization (a reconnection). Confirming it takes no slot of the plan. */
2797
+ already_enabled: boolean;
2798
+ };
2689
2799
  AccountsMetricList: ("page_total_actions" | "page_call_phone_clicks_logged_in_unique" | "page_get_directions_clicks_logged_in_unique" | "page_website_clicks_logged_in_unique" | "page_post_engagements" | "page_consumptions_unique" | "page_negative_feedback" | "page_negative_feedback_unique" | "page_fans_online_per_day" | "page_impressions" | "page_impressions_unique" | "page_impressions_paid" | "page_impressions_paid_unique" | "page_impressions_organic_v2" | "page_impressions_organic_unique_v2" | "page_impressions_viral" | "page_impressions_viral_unique" | "page_impressions_nonviral" | "page_impressions_nonviral_unique" | "page_posts_impressions" | "page_posts_impressions_unique" | "page_posts_impressions_paid" | "page_posts_impressions_paid_unique" | "page_posts_impressions_organic" | "page_posts_impressions_organic_unique" | "page_posts_served_impressions_organic_unique" | "page_posts_impressions_viral" | "page_posts_impressions_viral_unique" | "page_posts_impressions_nonviral" | "page_posts_impressions_nonviral_unique" | "impressions" | "reach" | "total_interactions" | "accounts_engaged" | "likes" | "comments" | "saves" | "shares" | "replies" | "follows_and_unfollows" | "profile_links_taps" | "website_clicks" | "profile_views" | "paidFollowers" | "organicFollowerGain" | "careersPageBannerPromoClicks" | "careersPagePromoLinksClicks" | "careersPageEmployeesClicks" | "careersPageJobsClicks" | "careersPageViewsUnique" | "careersPageViews" | "overviewPageViewsUnique" | "overviewPageViews" | "allPageViews" | "follows" | "share" | "views")[];
2690
2800
  /** @description A metric series for one account, already grouped. `group` says what each row covers: a range of 31 days or less is grouped by day, up to 720 by month, and beyond that by year. */
2691
2801
  AccountsMetricModel: {
@@ -2744,6 +2854,8 @@ interface components {
2744
2854
  graph_version?: string;
2745
2855
  /** @description `meta_embedded_signup` only. Goes to `extras.sessionInfoVersion`. */
2746
2856
  session_info_version?: string;
2857
+ /** @description `meta_embedded_signup` only, and only with a temporal token issued with `account_selection=integrator`. The popup hands the `code` back in JavaScript, not in a URL from Meta, so whoever builds the return URL has to add this as `state`. The PlanVortex page does it for you. */
2858
+ state?: string;
2747
2859
  /**
2748
2860
  * @description `redirect`: send the user to `link`. `meta_embedded_signup`: open the Meta popup with the fields below. `telegram_bot`: open `link` in another tab and wait for the account to show up.
2749
2861
  * @enum {string}
@@ -2789,6 +2901,23 @@ interface components {
2789
2901
  value_proposition?: string;
2790
2902
  website?: string;
2791
2903
  };
2904
+ /**
2905
+ * @description Where an AI-generated image came from. **Only images a model generated carry it**: a photo the organization uploaded, a product photo pulled from a connected shop or an image imported from an integration never does.
2906
+ *
2907
+ * It is set when the image is generated and cannot be edited. Use it to show your own AI label: under article 50(4) of the EU AI Act, telling the audience that an image is AI-generated is the job of whoever publishes it.
2908
+ *
2909
+ * Images made with the default model also carry a signed C2PA manifest, IPTC metadata and a SynthID watermark in the file itself. PlanVortex keeps the IPTC marker when it crops or recompresses an image for a network; the C2PA signature does not survive a change of pixels.
2910
+ */
2911
+ AiImageOrigin: {
2912
+ /** Format: date-time */
2913
+ generated_at: string;
2914
+ /** @description The AI plan that generated it. */
2915
+ id_ai_plan?: string;
2916
+ /** @description The model, as it was requested, for instance `google/gemini-3.1-flash-image`. */
2917
+ model: string;
2918
+ /** @description The AI provider that answered: `openrouter` unless the client brought its own key. */
2919
+ provider: string;
2920
+ };
2792
2921
  /**
2793
2922
  * @description What ONE AI plan achieved with what it published.
2794
2923
  *
@@ -2929,7 +3058,7 @@ interface components {
2929
3058
  /** @description The source snapshot. Absent on a `standard` plan, which has no source. */
2930
3059
  source?: components["schemas"]["AiPlansAiPlanSource"];
2931
3060
  /**
2932
- * @description State machine: pending -> generating -> generated -> validated | failed | cancelled. Poll the plan while state is pending or generating.
3061
+ * @description State machine: pending -> generating -> generated -> validated | failed | cancelled. Reaching `generated` or `failed` is announced to your app's webhook (`ai_plan_generated`, `ai_plan_failed`); without one, poll the plan while state is pending or generating.
2933
3062
  * @enum {string}
2934
3063
  */
2935
3064
  state: "pending" | "generating" | "generated" | "validated" | "failed" | "cancelled";
@@ -3240,7 +3369,7 @@ interface components {
3240
3369
  *
3241
3370
  * **The body is an array of changes, not a single object**, and it carries two signature headers computed with this app's secret over the **raw** body: `x-hub-signature` (`sha1=<hex>`) and `x-hub-signature-256` (`sha256=<hex>`). Verify against the bytes you received — parsing the JSON and re-serialising it changes them and the signature will not match.
3242
3371
  *
3243
- * The events delivered today are `new_account`, `change_state_account`, `messages`, `messaging_postbacks`, `messaging_seen`, `messaging_error`, `comments` and `integration_error`. The payload is documented in the `comments` specification. Delivery is best effort: PlanVortex does not retry a webhook that fails.
3372
+ * The events delivered today are `new_account`, `change_state_account`, `messages`, `messaging_postbacks`, `messaging_seen`, `messaging_error`, `comments`, `integration_error`, `ai_plan_generated` and `ai_plan_failed`. The payload is documented in the `comments` specification. **Every** app of the client that has a `webhook_url` receives every event, not only the app whose call caused it: with two apps, each event arrives twice. Delivery is best effort: PlanVortex does not retry a webhook that fails.
3244
3373
  */
3245
3374
  webhook_url?: string;
3246
3375
  };
@@ -3530,6 +3659,40 @@ interface components {
3530
3659
  total?: number;
3531
3660
  users?: components["schemas"]["ClientsRolesUser"][];
3532
3661
  };
3662
+ /**
3663
+ * @description One change in the array PlanVortex posts to your app's `webhook_url`, when an **AI plan finished**: `ai_plan_generated` when it came out, `ai_plan_failed` when it gave up.
3664
+ *
3665
+ * Like `IntegrationWebhookChange`, it carries no `id_account` and no `social_network`: a plan can span several networks, and it hangs off the organization. It carries ids and numbers only. Read the plan itself with `GET /clients/{id_client}/organizations/{id_organization}/ai_plans/{id_ai_plan}`.
3666
+ */
3667
+ CommentsAiPlanWebhookChange: {
3668
+ /** @description AI credits the generation consumed, the same figure as `AiPlan.credits_spent`. A failed plan can have spent credits too, and they are not refunded. */
3669
+ credits_spent: number;
3670
+ /** @description Only on `ai_plan_failed`: why the plan failed, the same `code` and `message` as `AiPlan.error`. Its `data` does not travel here; read the plan for it. */
3671
+ error?: components["schemas"]["CommentsAiPlanWebhookError"];
3672
+ /** @enum {string} */
3673
+ field: "ai_plan_generated" | "ai_plan_failed";
3674
+ id_ai_plan: string;
3675
+ id_organization: string;
3676
+ /**
3677
+ * @description The state the plan finished in. It always matches `field`: `generated` with `ai_plan_generated`, `failed` with `ai_plan_failed`.
3678
+ * @enum {string}
3679
+ */
3680
+ state: "generated" | "failed";
3681
+ /**
3682
+ * @description What the plan was generated from, the same value as `AiPlan.template`.
3683
+ * @enum {string}
3684
+ */
3685
+ template: "standard" | "from_images" | "from_text" | "from_catalog" | "campaign";
3686
+ /** @description How many draft publications the plan holds. A failed plan can still hold the drafts of its failed attempt; retrying it discards them. */
3687
+ total_publications: number;
3688
+ /** @description **How many** non-blocking notices the plan has, not the notices themselves: those are in `AiPlan.warnings`. Above zero the plan is still generated and usable. */
3689
+ warnings: number;
3690
+ };
3691
+ /** @description Why an AI plan failed, inside `AiPlanWebhookChange.error`: the same `code` and `message` as `AiPlan.error`. Its `data` is left out, because it can carry what the AI provider answered; read the plan for it. */
3692
+ CommentsAiPlanWebhookError: {
3693
+ code: number;
3694
+ message: string;
3695
+ };
3533
3696
  /** @description A comment — or a review — as PlanVortex stores it. Remember it is a **snapshot** of what the network said at `collected_date`; the live thread endpoints return the same shape reconciled against the network. */
3534
3697
  CommentsComment: {
3535
3698
  _id: string;
@@ -3654,12 +3817,14 @@ interface components {
3654
3817
  persistent_menu: boolean;
3655
3818
  products: boolean;
3656
3819
  publications: boolean;
3820
+ /** @description The publication can say **who can reply** to it (`reply_control`): anyone, the account's followers, the profiles it follows or the profiles mentioned in the text. It is set when the publication goes out and cannot be changed afterwards. On a network that answers `false` the field is deleted on save, so do not offer it. Today only `threads`. */
3821
+ reply_control: boolean;
3657
3822
  webhooks: boolean;
3658
3823
  };
3659
3824
  /**
3660
3825
  * @description One change in the array PlanVortex posts to your app's `webhook_url`, when the change concerns a social **account**.
3661
3826
  *
3662
- * An integration that stopped working has a shape of its own — `IntegrationWebhookChange` — and one delivery can mix both. Switch on `field`, and ignore what you do not handle.
3827
+ * An integration that stopped working has a shape of its own (`IntegrationWebhookChange`), and so does an AI plan that finished (`AiPlanWebhookChange`). One delivery can mix them. Switch on `field`, and ignore what you do not handle.
3663
3828
  */
3664
3829
  CommentsWebhookChange: {
3665
3830
  /** @description The comment. Present only when `field` is `comments`, and absent even then if the author deleted a comment we had never seen. */
@@ -4000,7 +4165,7 @@ interface components {
4000
4165
  * The catalogue grows with the product, so treat an unknown `code` as a generic failure instead of rejecting it.
4001
4166
  */
4002
4167
  Error: {
4003
- /** @description PlanVortex error code. Ranges: 500-548 auth, tokens and client apps · 601-612 user · 700-716 social accounts · 800-810 files · 900-996 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1308 client plan · 1400-1408 organization plan · 1500-1512 messaging · 1600-1601 contacts · 1900-1906 payments · 2000-2099 products · 2100-2199 AI plans · 2200-2299 integrations. */
4168
+ /** @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-1308 client plan · 1400-1408 organization plan · 1500-1512 messaging · 1600-1601 contacts · 1900-1906 payments · 2000-2099 products · 2100-2199 AI plans · 2200-2299 integrations. */
4004
4169
  code: number;
4005
4170
  /** @description Extra context attached to the error, when there is any. */
4006
4171
  data?: {
@@ -4274,6 +4439,8 @@ interface components {
4274
4439
  template_language?: string;
4275
4440
  /** @description Required for `template_message`. */
4276
4441
  template_name?: string;
4442
+ /** @description For a `template_message` whose body has variables: their values, in order. The first one fills `{{1}}`, the second `{{2}}`, and so on. Without them WhatsApp rejects a template that has variables, so a reminder with the customer's name and time needs this. Each value is a non-empty string with no line breaks, no tabs and no more than four consecutive spaces; anything else answers `1511` with `data.field` = `template_parameters` and `data.index` pointing at the bad value. Only positional body variables are supported: named variables (`{{name}}`) and variables in the header or in a button URL are not sent yet. */
4443
+ template_parameters?: string[];
4277
4444
  /** @description WhatsApp interactive list, for `interactive_message`. It needs at least one section. */
4278
4445
  whatsappInteractive?: {
4279
4446
  [key: string]: unknown;
@@ -4556,6 +4723,7 @@ interface components {
4556
4723
  };
4557
4724
  Publication: {
4558
4725
  _id: string;
4726
+ ai_generated?: components["schemas"]["PublicationAiGenerated"];
4559
4727
  /** Format: date-time */
4560
4728
  creation_date: string;
4561
4729
  /** @description Where inside the account this publication goes. Only present on the networks that answer `destinations: true` in `GET /social_capabilities`. */
@@ -4600,10 +4768,13 @@ interface components {
4600
4768
  name?: string;
4601
4769
  /** Format: date-time */
4602
4770
  next_stats_update?: string;
4771
+ pending_publish?: components["schemas"]["PublicationPending"];
4603
4772
  /**
4604
4773
  * @description Why the publication failed, one entry per problem. **It is an array**, and it is empty on a publication that has not failed.
4605
4774
  *
4606
- * For a scheduled X (Twitter) publication that runs out of credits at publish time, `code` is 940 and `data` is `{ used, limit }`; the publication stays in state `withErrors` and the client-app webhook is fired.
4775
+ * For a scheduled X (Twitter) publication that runs out of credits at publish time, `code` is 940 and `data` is `{ used, limit }`; the publication stays in state `withErrors`. No webhook announces it: read the publication to find out.
4776
+ *
4777
+ * On Instagram, two codes tell you whether a retry makes sense. **998**: Meta rejected the media while processing it (a codec, a duration, a URL it could not download). `data` carries `container_id`, `status_code` and, when Meta gives one, its reason in `status`. Retrying the same file fails the same way: change it first. **999**: Meta had not finished processing the media 10 minutes after it was sent. `data` carries `container_ids` and `minutes`. The file is not the problem, and a retry usually works.
4607
4778
  */
4608
4779
  publication_errors: {
4609
4780
  code: number;
@@ -4616,12 +4787,21 @@ interface components {
4616
4787
  publication_type: "profile" | "page" | "group" | "reels" | "stories" | "message";
4617
4788
  /** Format: date-time */
4618
4789
  publish_date?: string;
4790
+ /**
4791
+ * @description **Who can reply** to the publication, on the networks that answer `reply_control: true` in `GET /social_capabilities` (today `threads`). Absent means the network's default, which is anyone. It is set when the publication goes out and cannot be changed afterwards.
4792
+ *
4793
+ * **On every other network the field is deleted on save**, like `link`.
4794
+ * @enum {string}
4795
+ */
4796
+ reply_control?: "everyone" | "accounts_you_follow" | "mentioned_only" | "followers_only";
4619
4797
  /** @description Manual retries already spent on a failed publication, against the `max_retries` published by `GET /publication_limits`. Only `POST .../retry` increases it; updating the publication resets it to 0. */
4620
4798
  retries: number;
4621
4799
  /** @description Always the network of the account in `id_account`. */
4622
4800
  social_network: components["schemas"]["SocialNetwork"];
4623
4801
  /**
4624
4802
  * @description `draft` is never sent; `ready` is scheduled; `publishing` is in the network's hands right now; `sended` went out; `withErrors` failed and carries the reason in `publication_errors`.
4803
+ *
4804
+ * `publishing` usually lasts a few seconds, but it can last **up to 10 minutes** when the network is still processing a video (today, Instagram). Then `pending_publish` is present: wait and read the publication again, do not retry it.
4625
4805
  * @enum {string}
4626
4806
  */
4627
4807
  state: "ready" | "withErrors" | "sended" | "draft" | "publishing";
@@ -4634,6 +4814,17 @@ interface components {
4634
4814
  /** @description Link to the publication on the network, when there is one. A **private** Telegram channel has no public URL, so it comes back empty even though the post went out. */
4635
4815
  url?: string;
4636
4816
  };
4817
+ /**
4818
+ * @description Which part of a publication was generated by AI. **Absent means nothing was.**
4819
+ *
4820
+ * Use it to show your own AI label: under article 50(4) of the EU AI Act, telling the audience is the job of whoever publishes.
4821
+ */
4822
+ PublicationAiGenerated: {
4823
+ /** @description At least one of the files carries `ai_generated`. Recomputed every time the publication is saved, so replacing an AI image with a photo of your own turns it off. */
4824
+ image: boolean;
4825
+ /** @description The text was written by the AI planner. Set when the draft is created and never changed afterwards, not even if the text is rewritten: it says where the text came from, not who reviewed it. */
4826
+ text: boolean;
4827
+ };
4637
4828
  /**
4638
4829
  * @description **Where inside the account** a publication goes, on the networks where choosing the account is not yet choosing the destination. Today that is `pinterest` alone, where it is the board the pin is saved to.
4639
4830
  *
@@ -4655,6 +4846,31 @@ interface components {
4655
4846
  /** @description The section's label, for display. Decides nothing. */
4656
4847
  section_name?: string;
4657
4848
  };
4849
+ /**
4850
+ * @description Present only while the network is still **processing** what was sent, and PlanVortex is waiting to publish it. Today that happens on Instagram alone, when Meta takes longer than the ~30 seconds the request waits to process the media. In practice, that means videos.
4851
+ *
4852
+ * The publication stays in state `publishing`, and the background job asks Instagram again about once a minute until it goes out (`sended`) or fails (`withErrors`). It gives up 10 minutes after the media was sent to Instagram, and then the publication ends in `withErrors` with code 999. The object disappears as soon as the publication is resolved.
4853
+ *
4854
+ * **Wait for it. Do not retry it and do not create it again**: it has not failed, and a second publication would put the same video out twice. There is no webhook for the outcome: read the publication again after `next_check`. While this object is present the publication **cannot be updated** (error 921), for the same reason.
4855
+ */
4856
+ PublicationPending: {
4857
+ /** @description PlanVortex's own bookkeeping to resume the publication (on Instagram, the ids of Meta's containers). Its content may change without notice. */
4858
+ data?: {
4859
+ [key: string]: unknown;
4860
+ };
4861
+ /**
4862
+ * Format: date-time
4863
+ * @description When PlanVortex stops waiting. If the network has not finished by then, the publication ends in `withErrors` (999 on Instagram).
4864
+ */
4865
+ deadline?: string;
4866
+ /**
4867
+ * Format: date-time
4868
+ * @description When PlanVortex will ask the network again. A good moment to read the publication again: asking before it changes nothing.
4869
+ */
4870
+ next_check?: string;
4871
+ /** @description PlanVortex's own bookkeeping: the temporary cropped files the network may still be downloading. Do not rely on it. */
4872
+ temp_keys?: string[];
4873
+ };
4658
4874
  /** @description A place inside the account a publication can be sent to: on Pinterest, a board. */
4659
4875
  PublicationsDestination: {
4660
4876
  /** @description The destination's own description, when the network has one. */
@@ -4711,6 +4927,20 @@ interface components {
4711
4927
  * @description When the publication must go out. If omitted, it is published immediately. An invalid date returns error 938.
4712
4928
  */
4713
4929
  publish_date?: string;
4930
+ /**
4931
+ * @description **Who can reply** to the publication. Only on the networks that answer `reply_control: true` in `GET /social_capabilities` (today `threads`), and **deleted** on every other one.
4932
+ *
4933
+ * - `everyone`: anyone. It is the network's default, and what applies when the field is omitted.
4934
+ * - `followers_only`: only the account's followers.
4935
+ * - `accounts_you_follow`: only the profiles the account follows.
4936
+ * - `mentioned_only`: only the profiles mentioned in the text.
4937
+ *
4938
+ * **It is set when the publication goes out and cannot be changed afterwards**: Threads has no way to change it on a published post through its API. A value the network does not accept does not fail the request: the publication is still created, in state `withErrors` with `publication_errors[].code = 997`, whose `data` carries the `allowed` values. It is checked when the publication is **created**, so a scheduled post does not fail at 3 a.m. over a value that was already wrong.
4939
+ *
4940
+ * On an update: omit it to keep what was there, send `null` or `""` to go back to the network's default.
4941
+ * @enum {string}
4942
+ */
4943
+ reply_control?: "everyone" | "accounts_you_follow" | "mentioned_only" | "followers_only";
4714
4944
  /**
4715
4945
  * @description Network the publication targets. **Required when creating**: the request fails with error 702 if it is missing or not one of these values. It must match the network of the account in the path.
4716
4946
  *
@@ -4954,6 +5184,7 @@ interface components {
4954
5184
  */
4955
5185
  Upload: {
4956
5186
  _id: string;
5187
+ ai_generated?: components["schemas"]["AiImageOrigin"];
4957
5188
  /** @description Cover of a video, which is another upload of its own and comes back already resolved. It never appears on its own in the library listing. */
4958
5189
  cover_image?: components["schemas"]["Upload"];
4959
5190
  /** @description Point of the video, in milliseconds, used as the cover frame. */
@@ -7359,6 +7590,7 @@ interface operations {
7359
7590
  * | `519` | This endpoint does not accept app credentials |
7360
7591
  * | `543` | This temporal connect token has already connected an account. Issue a new one |
7361
7592
  * | `544` | This temporal connect token was issued for a different social network |
7593
+ * | `554` | The temporal token was issued with `account_selection=integrator`. In that mode the return goes through the connect session, which checks the `state` that ties it to whoever started |
7362
7594
  * | `700` | The connection cannot be completed through this endpoint. It is what `telegram` always answers here: that network's accounts are created from the bot being added to a channel, never from a call of yours |
7363
7595
  * | `1101` | Invalid organization, or a temporal token for a different one |
7364
7596
  */
@@ -8637,7 +8869,7 @@ interface operations {
8637
8869
  * | `1101` | Invalid organization |
8638
8870
  * | `917` | Publication doesn't exists |
8639
8871
  * | `935` | Invalid publication |
8640
- * | `921` | Can't update a publication already sended |
8872
+ * | `921` | Can't update a publication already sended, **or one the network is still processing** (state `publishing` with `pending_publish`; then `data.state` is `publishing`). Editing it would publish it twice. It can be edited again if it fails. |
8641
8873
  * | `940` | X (Twitter) credits exhausted. Not enough monthly credits to publish this tweet (same link detection and 15/200 tariff as on create). Response data: { used, limit }. |
8642
8874
  * | `523` | Invalid application |
8643
8875
  */
@@ -8977,9 +9209,122 @@ interface operations {
8977
9209
  *
8978
9210
  * | Code | Meaning |
8979
9211
  * | --- | --- |
8980
- * | `1101` | Invalid organization |
8981
9212
  * | `523` | Invalid application |
8982
9213
  * | `532` | `redirect_uri` is not one of the fronts registered on the server |
9214
+ * | `551` | The temporal token is for `account_selection=integrator` and its connect session has expired or is no longer waiting for the person |
9215
+ * | `1101` | Invalid organization |
9216
+ */
9217
+ 400: {
9218
+ headers: {
9219
+ [name: string]: unknown;
9220
+ };
9221
+ content: {
9222
+ "application/json": components["schemas"]["Error"];
9223
+ };
9224
+ };
9225
+ /** @description Unhandled error by the server */
9226
+ 500: {
9227
+ headers: {
9228
+ [name: string]: unknown;
9229
+ };
9230
+ content?: never;
9231
+ };
9232
+ };
9233
+ };
9234
+ getConnectSession: {
9235
+ parameters: {
9236
+ query?: never;
9237
+ header?: never;
9238
+ path: {
9239
+ /** @description Organization identifier */
9240
+ id_organization: string;
9241
+ /** @description The `connect_session` that came back in your `redirect_uri` */
9242
+ id_session: string;
9243
+ };
9244
+ cookie?: never;
9245
+ };
9246
+ requestBody?: never;
9247
+ responses: {
9248
+ /** @description The session and its accounts. */
9249
+ 200: {
9250
+ headers: {
9251
+ [name: string]: unknown;
9252
+ };
9253
+ content: {
9254
+ "application/json": {
9255
+ connect_session: components["schemas"]["AccountsConnectSession"];
9256
+ };
9257
+ };
9258
+ };
9259
+ /**
9260
+ * @description The request failed. The body carries the PlanVortex error code in `code`:
9261
+ *
9262
+ * | Code | Meaning |
9263
+ * | --- | --- |
9264
+ * | `514` | This endpoint needs app credentials |
9265
+ * | `551` | Connect session not found, expired, or issued by another app |
9266
+ * | `1101` | Invalid organization |
9267
+ */
9268
+ 400: {
9269
+ headers: {
9270
+ [name: string]: unknown;
9271
+ };
9272
+ content: {
9273
+ "application/json": components["schemas"]["Error"];
9274
+ };
9275
+ };
9276
+ /** @description Unhandled error by the server */
9277
+ 500: {
9278
+ headers: {
9279
+ [name: string]: unknown;
9280
+ };
9281
+ content?: never;
9282
+ };
9283
+ };
9284
+ };
9285
+ confirmConnectSession: {
9286
+ parameters: {
9287
+ query?: never;
9288
+ header?: never;
9289
+ path: {
9290
+ /** @description Organization identifier */
9291
+ id_organization: string;
9292
+ /** @description The `connect_session` that came back in your `redirect_uri` */
9293
+ id_session: string;
9294
+ };
9295
+ cookie?: never;
9296
+ };
9297
+ requestBody: {
9298
+ content: {
9299
+ "application/json": {
9300
+ /** @description Ids of the session's accounts to enable. */
9301
+ accounts: string[];
9302
+ };
9303
+ };
9304
+ };
9305
+ responses: {
9306
+ /** @description The accounts that were enabled. */
9307
+ 200: {
9308
+ headers: {
9309
+ [name: string]: unknown;
9310
+ };
9311
+ content: {
9312
+ "application/json": {
9313
+ accounts: components["schemas"]["Account"][];
9314
+ };
9315
+ };
9316
+ };
9317
+ /**
9318
+ * @description The request failed. The body carries the PlanVortex error code in `code`:
9319
+ *
9320
+ * | Code | Meaning |
9321
+ * | --- | --- |
9322
+ * | `514` | This endpoint needs app credentials |
9323
+ * | `551` | Connect session not found, expired, or issued by another app |
9324
+ * | `552` | The session is not waiting for a confirmation: the person has not come back yet, or it was already confirmed. `data.status` says which |
9325
+ * | `553` | Some account is not part of this session. `data.accounts` lists them |
9326
+ * | `706` | The new accounts do not fit in the plan. `data` carries `limit`, `used` and `requested`, and none was enabled |
9327
+ * | `1101` | Invalid organization |
8983
9328
  */
8984
9329
  400: {
8985
9330
  headers: {
@@ -10156,7 +10501,7 @@ interface operations {
10156
10501
  * | `1101` | Invalid organization |
10157
10502
  * | `917` | Publication doesn't exists |
10158
10503
  * | `935` | Invalid publication |
10159
- * | `921` | Can't update a publication already sended |
10504
+ * | `921` | Can't update a publication already sended, **or one the network is still processing** (state `publishing` with `pending_publish`; then `data.state` is `publishing`). Editing it would publish it twice. It can be edited again if it fails. |
10160
10505
  * | `940` | X (Twitter) credits exhausted. Not enough monthly credits to publish this tweet (same link detection and 15/200 tariff as on create). Response data: { used, limit }. |
10161
10506
  * | `523` | Invalid application |
10162
10507
  */
@@ -11060,6 +11405,8 @@ interface operations {
11060
11405
  createTemporalConnectToken: {
11061
11406
  parameters: {
11062
11407
  query?: {
11408
+ /** @description Who shows the screen where the person picks which accounts to enable. `planvortex` (the default) is the PlanVortex screen. `integrator` sends the person back to your `redirect_uri` with a connect session, and the picking is yours: see above. Requires `redirect_uri` and `social_network` (error 549). */
11409
+ account_selection?: "planvortex" | "integrator";
11063
11410
  /** @description Where the user comes back after connecting. Has to be one of the app's `redirect_urls` (error 532). */
11064
11411
  redirect_uri?: string;
11065
11412
  /** @description Network the user is going to connect. It travels inside the returned URL **and inside the token itself**, so the token will only connect that network (error 544 otherwise). A network outside the allowed list is rejected here with error 702. */
@@ -11081,6 +11428,8 @@ interface operations {
11081
11428
  };
11082
11429
  content: {
11083
11430
  "application/json": {
11431
+ /** @description Only with `account_selection=integrator`: the id of the connect session. It comes back in your `redirect_uri` as `connect_session`; compare the two, so a session somebody else started cannot land in your user's browser. */
11432
+ connect_session?: string;
11084
11433
  /**
11085
11434
  * Format: date-time
11086
11435
  * @description When the token stops working. Fifteen minutes after it was issued.
@@ -11088,7 +11437,7 @@ interface operations {
11088
11437
  expires_at: string;
11089
11438
  /** @description The same token, on its own. This is what you pass to a client that authenticates with a temporal token; do not parse it out of `url`. */
11090
11439
  token: string;
11091
- /** @description Ready to redirect to. Carries the token in its `token` query parameter, and the network in `social_network` when one was asked for. */
11440
+ /** @description Ready to redirect to. Carries the token in its `token` query parameter, and the network in `social_network` when one was asked for. With `account_selection=integrator` it is the network's authorization page instead (on `whatsapp`, the PlanVortex page that opens Meta's popup). */
11092
11441
  url: string;
11093
11442
  };
11094
11443
  };
@@ -11100,6 +11449,8 @@ interface operations {
11100
11449
  * | --- | --- |
11101
11450
  * | `514` | This endpoint needs app credentials: neither a user token nor a temporal connect token can issue one |
11102
11451
  * | `532` | `redirect_uri` is not one of the app's registered `redirect_urls` |
11452
+ * | `549` | `account_selection` is not `planvortex` or `integrator`, or it is `integrator` without `redirect_uri` or `social_network`. `data` says which |
11453
+ * | `550` | `account_selection=integrator` on a network with no return to the browser (`telegram`) |
11103
11454
  * | `702` | `social_network` is not one of the networks PlanVortex supports |
11104
11455
  * | `1101` | Invalid organization |
11105
11456
  */
@@ -11678,7 +12029,8 @@ interface operations {
11678
12029
  * "persistent_menu": false,
11679
12030
  * "comments": true,
11680
12031
  * "destinations": false,
11681
- * "link": false
12032
+ * "link": false,
12033
+ * "reply_control": false
11682
12034
  * },
11683
12035
  * "google_business": {
11684
12036
  * "publications": false,
@@ -11688,7 +12040,8 @@ interface operations {
11688
12040
  * "persistent_menu": false,
11689
12041
  * "comments": true,
11690
12042
  * "destinations": false,
11691
- * "link": false
12043
+ * "link": false,
12044
+ * "reply_control": false
11692
12045
  * },
11693
12046
  * "pinterest": {
11694
12047
  * "publications": true,
@@ -11698,7 +12051,19 @@ interface operations {
11698
12051
  * "persistent_menu": false,
11699
12052
  * "comments": false,
11700
12053
  * "destinations": true,
11701
- * "link": true
12054
+ * "link": true,
12055
+ * "reply_control": false
12056
+ * },
12057
+ * "threads": {
12058
+ * "publications": true,
12059
+ * "messages": false,
12060
+ * "products": false,
12061
+ * "webhooks": true,
12062
+ * "persistent_menu": false,
12063
+ * "comments": true,
12064
+ * "destinations": false,
12065
+ * "link": false,
12066
+ * "reply_control": true
11702
12067
  * }
11703
12068
  * }
11704
12069
  */
@@ -11880,7 +12245,7 @@ interface operations {
11880
12245
  * }
11881
12246
  * ]
11882
12247
  */
11883
- "application/json": (components["schemas"]["CommentsWebhookChange"] | components["schemas"]["CommentsIntegrationWebhookChange"])[];
12248
+ "application/json": (components["schemas"]["CommentsWebhookChange"] | components["schemas"]["CommentsIntegrationWebhookChange"] | components["schemas"]["CommentsAiPlanWebhookChange"])[];
11884
12249
  };
11885
12250
  };
11886
12251
  responses: {
@@ -12247,6 +12612,30 @@ interface EnableResult {
12247
12612
  /** A donde mandar al usuario despues, si el token temporal llevaba `redirect_uri`. */
12248
12613
  redirect_uri?: string;
12249
12614
  }
12615
+ /**
12616
+ * Quien ensena la pantalla de elegir cuentas al volver de la red. `planvortex` (lo de siempre) o
12617
+ * `integrator`: el usuario vuelve a tu `redirect_uri` con una sesion de conexion y el selector lo
12618
+ * pones tu. Ver {@link ConnectSession}.
12619
+ */
12620
+ type AccountSelection = "planvortex" | "integrator";
12621
+ /**
12622
+ * Una conexion en el modo `account_selection: "integrator"`: lo que autorizo tu usuario, para que
12623
+ * tu app ensene su propio selector y confirme las elegidas con
12624
+ * `accounts.confirmConnectSession()`.
12625
+ *
12626
+ * Solo la puede leer la app que emitio el token. `accounts` son las de ESTA autorizacion, nunca
12627
+ * otras pendientes de la organizacion; `already_enabled` marca una reconexion, que no gasta plaza;
12628
+ * y `accounts_used`/`accounts_limit` son el contador del plan. Una sesion `returned` vive media
12629
+ * hora.
12630
+ */
12631
+ type ConnectSession = Override<Schemas["AccountsConnectSession"], {
12632
+ social_network: SocialNetwork;
12633
+ accounts: ConnectSessionAccount[];
12634
+ }>;
12635
+ /** Una cuenta de una {@link ConnectSession}: una {@link Account} mas `already_enabled`. */
12636
+ type ConnectSessionAccount = Account & {
12637
+ already_enabled: boolean;
12638
+ };
12250
12639
  /**
12251
12640
  * Un fichero de la biblioteca de la organizacion.
12252
12641
  *
@@ -12261,6 +12650,35 @@ type Upload = Override<Schemas["Upload"], {
12261
12650
  }>;
12262
12651
  /** Ancho, alto, duracion y tamano de un fichero, mas en que redes cabe **por su recorte**. */
12263
12652
  type FileProperties = Schemas["FileProperties"];
12653
+ /**
12654
+ * De que modelo salio una imagen: el `ai_generated` de un {@link Upload}. **Solo lo llevan las
12655
+ * imagenes que genero la IA** —nunca una foto subida, ni la de un producto de una tienda— y no se
12656
+ * puede editar.
12657
+ *
12658
+ * Es lo que necesitas para cumplir TU parte del AI Act: el articulo 50.4 obliga a quien publica a
12659
+ * avisar a su audiencia cuando una imagen generada puede pasar por real, y con este campo pintas la
12660
+ * etiqueta en tu producto. La marca en el propio fichero (C2PA, IPTC y SynthID con el modelo por
12661
+ * defecto) la pone PlanVortex; el C2PA no sobrevive a un recorte, el IPTC si.
12662
+ */
12663
+ type AiImageOrigin = Schemas["AiImageOrigin"];
12664
+ /**
12665
+ * Que parte de una {@link Publication} genero la IA. **Ausente = nada.**
12666
+ *
12667
+ * `text` lo sella el planificador al crear el borrador y no cambia aunque el texto se reescriba:
12668
+ * dice de donde salio, no quien lo reviso. `image` se recalcula con los ficheros cada vez que se
12669
+ * guarda: cambiar la imagen generada por una foto propia lo apaga.
12670
+ */
12671
+ type PublicationAiGenerated = Schemas["PublicationAiGenerated"];
12672
+ /**
12673
+ * La red aun esta PROCESANDO lo que se le mando y PlanVortex espera para publicarlo: hoy, un video
12674
+ * de Instagram que Meta tarda mas de ~30 s en procesar. La {@link Publication} sigue en
12675
+ * `publishing` hasta 10 minutos, y PlanVortex vuelve a preguntar solo una vez por minuto.
12676
+ *
12677
+ * **Hay que esperar, no reintentar ni volver a crearla**: saldria el video dos veces. No hay webhook
12678
+ * del resultado: vuelve a leer la publicacion despues de `next_check`. Mientras esta puesto no se
12679
+ * puede editar (error 921). `temp_keys` y `data` son contabilidad interna de PlanVortex.
12680
+ */
12681
+ type PublicationPending = Schemas["PublicationPending"];
12264
12682
  /**
12265
12683
  * Una publicacion: programada, enviada o fallida.
12266
12684
  *
@@ -12951,7 +13369,7 @@ declare class PlanVortexError extends Error {
12951
13369
  readonly retryAfter: number | undefined;
12952
13370
  constructor(code: number, message: string, options?: PlanVortexErrorOptions);
12953
13371
  }
12954
- /** 500-548 — tokens, apps de cliente, permisos. Incluye el 501 y el 522, los de token caducado. */
13372
+ /** 500-554 — tokens, apps de cliente, permisos, sesiones de conexion. Incluye el 501 y el 522, los de token caducado. */
12955
13373
  declare class AuthError extends PlanVortexError {
12956
13374
  }
12957
13375
  /** 601-612 — el usuario final. */
@@ -13063,11 +13481,12 @@ type WebhookAlgorithm = keyof typeof WEBHOOK_SIGNATURE_HEADERS;
13063
13481
  * Los eventos que hoy se entregan de verdad, comprobados uno a uno contra el servidor.
13064
13482
  *
13065
13483
  * Salen de dos sitios: `ALLOWED_WEBHOOKS_NOTIFICATIONS` para los que levanta PlanVortex
13066
- * (`new_account`, `change_state_account`, `integration_error`) y `WEBHOOKS_TO_HANDLE` para los que
13067
- * llegan de la red y sobreviven al filtro. **La lista crece**, así que un `field` desconocido se
13068
- * ignora en vez de romper: para eso está {@link UnknownWebhookChange}.
13484
+ * (`new_account`, `change_state_account`, `integration_error`, `ai_plan_generated`,
13485
+ * `ai_plan_failed`) y `WEBHOOKS_TO_HANDLE` para los que llegan de la red y sobreviven al filtro.
13486
+ * **La lista crece**, así que un `field` desconocido se ignora en vez de romper: para eso está
13487
+ * {@link UnknownWebhookChange}.
13069
13488
  */
13070
- declare const WEBHOOK_EVENTS: readonly ["new_account", "change_state_account", "messages", "messaging_postbacks", "messaging_seen", "messaging_error", "comments", "integration_error"];
13489
+ declare const WEBHOOK_EVENTS: readonly ["new_account", "change_state_account", "messages", "messaging_postbacks", "messaging_seen", "messaging_error", "comments", "integration_error", "ai_plan_generated", "ai_plan_failed"];
13071
13490
  type WebhookEvent = (typeof WEBHOOK_EVENTS)[number];
13072
13491
  /** Lo que trae todo cambio que cuelga de una CUENTA, pase lo que pase. */
13073
13492
  interface AccountWebhookChangeBase {
@@ -13129,6 +13548,39 @@ interface IntegrationErrorChange {
13129
13548
  /** El código del catálogo de PlanVortex que dice qué pasó. Los de integraciones van del 2200 al 2299. */
13130
13549
  error_code: number;
13131
13550
  }
13551
+ /**
13552
+ * Un plan de IA TERMINÓ: salió (`ai_plan_generated`) o se rindió (`ai_plan_failed`).
13553
+ *
13554
+ * Es lo que te ahorra preguntar por el plan cada pocos segundos: espera a este evento y lee el plan
13555
+ * una vez con `pv.aiPlans.get()`. Sólo trae ids y números, nunca el prompt ni lo generado.
13556
+ *
13557
+ * **No trae `id_account` ni `social_network`**, igual que {@link IntegrationErrorChange}: un plan
13558
+ * puede abarcar varias redes y cuelga de la organización.
13559
+ *
13560
+ * Un fallo transitorio devuelve el plan a la cola y no manda nada, así que cada plan manda **uno**
13561
+ * de los dos, nunca un `failed` seguido de un `generated`. Y no se reintenta: si tu endpoint estaba
13562
+ * caído cuando terminó, `pv.aiPlans.get()` sigue diciendo cómo acabó.
13563
+ */
13564
+ interface AiPlanChange {
13565
+ field: "ai_plan_generated" | "ai_plan_failed";
13566
+ id_ai_plan: string;
13567
+ id_organization: string;
13568
+ /** El estado en que terminó. Siempre cuadra con `field`: `generated` o `failed`. */
13569
+ state: "generated" | "failed";
13570
+ /** De qué salió el plan: el mismo valor que `AiPlan.template`. La lista crece. */
13571
+ template: PlannerTemplateName;
13572
+ /** Cuántas publicaciones en borrador tiene. Uno `failed` puede conservar las del intento fallido. */
13573
+ total_publications: number;
13574
+ /** Los créditos de IA que gastó. Uno `failed` también puede haber gastado, y no se devuelven. */
13575
+ credits_spent: number;
13576
+ /** CUÁNTOS avisos dejó, no los avisos: ésos están en `AiPlan.warnings`. Con avisos sigue siendo usable. */
13577
+ warnings: number;
13578
+ /** Sólo en `ai_plan_failed`: el mismo `code` y `message` que `AiPlan.error`. Su `data`, en el plan. */
13579
+ error?: {
13580
+ code: number;
13581
+ message: string;
13582
+ };
13583
+ }
13132
13584
  /**
13133
13585
  * Un `field` que esta versión del paquete todavía no conoce.
13134
13586
  *
@@ -13147,7 +13599,7 @@ interface UnknownWebhookChange {
13147
13599
  * `CommentChange | UnknownWebhookChange`. Para estrechar de verdad están los predicados
13148
13600
  * {@link isCommentChange} y compañía, que es la forma recomendada.
13149
13601
  */
13150
- type WebhookChange = AccountStateChange | MessageChange | CommentChange | IntegrationErrorChange | UnknownWebhookChange;
13602
+ type WebhookChange = AccountStateChange | MessageChange | CommentChange | IntegrationErrorChange | AiPlanChange | UnknownWebhookChange;
13151
13603
  /** Una cuenta se conectó o cambió de estado. */
13152
13604
  declare function isAccountStateChange(change: WebhookChange): change is AccountStateChange;
13153
13605
  /** Algo pasó en la mensajería. Incluye el visto y el rechazo de la red, no sólo el mensaje nuevo. */
@@ -13156,6 +13608,8 @@ declare function isMessageChange(change: WebhookChange): change is MessageChange
13156
13608
  declare function isCommentChange(change: WebhookChange): change is CommentChange;
13157
13609
  /** Una integración dejó de funcionar. */
13158
13610
  declare function isIntegrationErrorChange(change: WebhookChange): change is IntegrationErrorChange;
13611
+ /** Un plan de IA terminó, bien o mal. Mira `field` (o `state`) para saber cuál. */
13612
+ declare function isAiPlanChange(change: WebhookChange): change is AiPlanChange;
13159
13613
  /**
13160
13614
  * La firma no cuadra, o no venía ninguna.
13161
13615
  *
@@ -13298,4 +13752,4 @@ interface PlanVortexWebhooksOptions {
13298
13752
  */
13299
13753
  declare function planvortexWebhooks(options: PlanVortexWebhooksOptions): (request: WebhookRequestLike, response: WebhookResponseLike, next: (error?: unknown) => void) => void;
13300
13754
 
13301
- export { type AiSettings as $, type Account as A, type CommentReplyResult as B, type ConnectLink as C, type Destination as D, type EnableResult as E, type ContactExtraData as F, type Contact as G, type ContactCreate as H, type ContactUpdate as I, type IntegrationProviderName as J, type IntegrationProvider as K, type Integration as L, type MetricName as M, type IntegrationConnectRequest as N, type IntegrationUpdate as O, type Paginated as P, type IntegrationPickerConfig as Q, type IntegrationCatalogPage as R, type SocialNetwork as S, type TopPublicationsResult as T, type MessageTemplate as U, type Conversation as V, type ConversationTotals as W, type Message as X, type MessageInput as Y, type Client as Z, type Organization as _, type ConnectResult as a, type paths as a$, type ClientWithOrganizations as a0, type PlanData as a1, type PlanUseData as a2, type ConnectToken as a3, type AiContext as a4, type SocialCredentialsInput as a5, type Product as a6, type ProductInput as a7, type ProductCatalog as a8, type ProductCatalogInput as a9, AuthError as aA, type ClientPlan as aB, type CommentAuthor as aC, type CommentChange as aD, type ContactChannel as aE, ContactError as aF, type DashboardAiPlanRef as aG, type DashboardPublicationRef as aH, type DashboardRange as aI, type EngagementBase as aJ, FileError as aK, type FileFormat as aL, type FileProperties as aM, type FileType as aN, type IntegrationCatalogProduct as aO, type IntegrationConfig as aP, IntegrationError as aQ, type IntegrationErrorChange as aR, type IntegrationFormField as aS, type MessageChange as aT, type MessageOptions as aU, type MessageType as aV, MessagingError as aW, type MetricRow as aX, NO_ERROR_CODE as aY, type components as aZ, type operations as a_, type PublicationInput as aa, type PublicationState as ab, type PublicationStats as ac, type PublicationStatsHistory as ad, type Upload as ae, AccountError as af, type AccountMetricRow as ag, type AccountStateChange as ah, type AccountWebhookChangeBase as ai, type AccountWithError as aj, type AiPlanCostEstimate as ak, type AiPlanDestination as al, AiPlanError as am, type AiPlanNotice as an, type AiPlanOptions as ao, type AiPlanOptionsInput as ap, type AiPlanResult as aq, type AiPlanResultsGroup as ar, type AiPlanResultsTemplateGroup as as, type AiPlanSource as at, type AiPlanSourceImageInput as au, type AiPlanSourceInput as av, type AiPlanSourceProduct as aw, type AiPlanState as ax, type ApiErrorBody as ay, type AspectRatios as az, type AccountMetrics as b, isIntegrationErrorChange as b$, type webhooks as b0, type OpenEnum as b1, OrganizationError as b2, PLANVORTEX_ERROR_RANGES as b3, PlanLimitError as b4, PlanVortexAuthenticationError as b5, PlanVortexConfigError as b6, PlanVortexConnectionError as b7, PlanVortexError as b8, type PlanVortexErrorOptions as b9, type WooCommerceConnectRequest as bA, account as bB, accountId as bC, errorFamilyForCode as bD, isPlanVortexError as bE, isTokenError as bF, messageContact as bG, messageContactId as bH, messageDirection as bI, messageFileIds as bJ, messageFiles as bK, publication as bL, publicationId as bM, type HandleWebhookRequestOptions as bN, type PlanVortexWebhooksOptions as bO, type RawWebhookBody as bP, type VerifyWebhookSignatureOptions as bQ, WEBHOOK_EVENTS as bR, WEBHOOK_SIGNATURE_HEADERS as bS, WebhookBodyError as bT, type WebhookHeaders as bU, type WebhookRequestLike as bV, type WebhookResponseLike as bW, WebhookSignatureError as bX, handleWebhookRequest as bY, isAccountStateChange as bZ, isCommentChange as b_, type PlanVortexErrorRange as ba, type PlannerTemplateField as bb, type PlannerTemplateFieldType as bc, ProductError as bd, type PublicationDestination as be, PublicationError as bf, type PublicationErrorDetail as bg, type PublicationMetrics as bh, type PublicationStatsPoint as bi, type PublicationType as bj, type PublicationsSummary as bk, type RssConfig as bl, type SocialAuthorizationMethod as bm, type SocialCredentials as bn, type SocialIdentifier as bo, type SocialIdentifierInput as bp, type SocialLimitsMap as bq, TOKEN_ERROR_CODES as br, type TopPublication as bs, type UnknownWebhookChange as bt, UserError as bu, type WebhookAlgorithm as bv, type WebhookChange as bw, type WebhookEvent as bx, type WithAccount as by, type WithPublication as bz, type PersistentMenu as c, isMessageChange as c0, parseWebhookPayload as c1, planvortexWebhooks as c2, verifyWebhookSignature as c3, type Dashboard as d, type DashboardMetricsResult as e, type PublicationsSummaryResult as f, type PublicationsStatsResult as g, type PlanUse as h, type Publication as i, type AiPlanResultsSort as j, type PlannerTemplateName as k, type AiPlanCreateRequest as l, type AiPlanCreateResult as m, type AiPlan as n, type AiPlanResults as o, type ClientApp as p, type ClientAppInput as q, type SocialCapabilities as r, type CommentActions as s, type SocialLimits as t, type PublicationLimits as u, type AspectRatiosByNetwork as v, type PlannerTemplate as w, type CommentNetwork as x, type Comment as y, type CommentThread as z };
13755
+ export { type Organization as $, type Account as A, type CommentThread as B, type ConnectLink as C, type Destination as D, type EnableResult as E, type CommentReplyResult as F, type ContactExtraData as G, type Contact as H, type ContactCreate as I, type ContactUpdate as J, type IntegrationProviderName as K, type IntegrationProvider as L, type MetricName as M, type Integration as N, type IntegrationConnectRequest as O, type Paginated as P, type IntegrationUpdate as Q, type IntegrationPickerConfig as R, type SocialNetwork as S, type TopPublicationsResult as T, type IntegrationCatalogPage as U, type MessageTemplate as V, type Conversation as W, type ConversationTotals as X, type Message as Y, type MessageInput as Z, type Client as _, type ConnectResult as a, type MetricRow as a$, type AiSettings as a0, type ClientWithOrganizations as a1, type AccountSelection as a2, type PlanData as a3, type PlanUseData as a4, type ConnectToken as a5, type AiContext as a6, type SocialCredentialsInput as a7, type Product as a8, type ProductInput as a9, type AiPlanState as aA, type ApiErrorBody as aB, type AspectRatios as aC, AuthError as aD, type ClientPlan as aE, type CommentAuthor as aF, type CommentChange as aG, type ConnectSessionAccount as aH, type ContactChannel as aI, ContactError as aJ, type DashboardAiPlanRef as aK, type DashboardPublicationRef as aL, type DashboardRange as aM, type EngagementBase as aN, FileError as aO, type FileFormat as aP, type FileProperties as aQ, type FileType as aR, type IntegrationCatalogProduct as aS, type IntegrationConfig as aT, IntegrationError as aU, type IntegrationErrorChange as aV, type IntegrationFormField as aW, type MessageChange as aX, type MessageOptions as aY, type MessageType as aZ, MessagingError as a_, type ProductCatalog as aa, type ProductCatalogInput as ab, type PublicationInput as ac, type PublicationState as ad, type PublicationStats as ae, type PublicationStatsHistory as af, type Upload as ag, AccountError as ah, type AccountMetricRow as ai, type AccountStateChange as aj, type AccountWebhookChangeBase as ak, type AccountWithError as al, type AiImageOrigin as am, type AiPlanCostEstimate as an, type AiPlanDestination as ao, AiPlanError as ap, type AiPlanNotice as aq, type AiPlanOptions as ar, type AiPlanOptionsInput as as, type AiPlanResult as at, type AiPlanResultsGroup as au, type AiPlanResultsTemplateGroup as av, type AiPlanSource as aw, type AiPlanSourceImageInput as ax, type AiPlanSourceInput as ay, type AiPlanSourceProduct as az, type ConnectSession as b, type WebhookHeaders as b$, NO_ERROR_CODE as b0, type components as b1, type operations as b2, type paths as b3, type webhooks as b4, type OpenEnum as b5, OrganizationError as b6, PLANVORTEX_ERROR_RANGES as b7, PlanLimitError as b8, PlanVortexAuthenticationError as b9, UserError as bA, type WebhookAlgorithm as bB, type WebhookChange as bC, type WebhookEvent as bD, type WithAccount as bE, type WithPublication as bF, type WooCommerceConnectRequest as bG, account as bH, accountId as bI, errorFamilyForCode as bJ, isPlanVortexError as bK, isTokenError as bL, messageContact as bM, messageContactId as bN, messageDirection as bO, messageFileIds as bP, messageFiles as bQ, publication as bR, publicationId as bS, type AiPlanChange as bT, type HandleWebhookRequestOptions as bU, type PlanVortexWebhooksOptions as bV, type RawWebhookBody as bW, type VerifyWebhookSignatureOptions as bX, WEBHOOK_EVENTS as bY, WEBHOOK_SIGNATURE_HEADERS as bZ, WebhookBodyError as b_, PlanVortexConfigError as ba, PlanVortexConnectionError as bb, PlanVortexError as bc, type PlanVortexErrorOptions as bd, type PlanVortexErrorRange as be, type PlannerTemplateField as bf, type PlannerTemplateFieldType as bg, ProductError as bh, type PublicationAiGenerated as bi, type PublicationDestination as bj, PublicationError as bk, type PublicationErrorDetail as bl, type PublicationMetrics as bm, type PublicationPending as bn, type PublicationStatsPoint as bo, type PublicationType as bp, type PublicationsSummary as bq, type RssConfig as br, type SocialAuthorizationMethod as bs, type SocialCredentials as bt, type SocialIdentifier as bu, type SocialIdentifierInput as bv, type SocialLimitsMap as bw, TOKEN_ERROR_CODES as bx, type TopPublication as by, type UnknownWebhookChange as bz, type AccountMetrics as c, type WebhookRequestLike as c0, type WebhookResponseLike as c1, WebhookSignatureError as c2, handleWebhookRequest as c3, isAccountStateChange as c4, isAiPlanChange as c5, isCommentChange as c6, isIntegrationErrorChange as c7, isMessageChange as c8, parseWebhookPayload as c9, planvortexWebhooks as ca, verifyWebhookSignature as cb, type PersistentMenu as d, type Dashboard as e, type DashboardMetricsResult as f, type PublicationsSummaryResult as g, type PublicationsStatsResult as h, type PlanUse as i, type Publication as j, type AiPlanResultsSort as k, type PlannerTemplateName as l, type AiPlanCreateRequest as m, type AiPlanCreateResult as n, type AiPlan as o, type AiPlanResults as p, type ClientApp as q, type ClientAppInput as r, type SocialCapabilities as s, type CommentActions as t, type SocialLimits as u, type PublicationLimits as v, type AspectRatiosByNetwork as w, type PlannerTemplate as x, type CommentNetwork as y, type Comment as z };