planvortex 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -372,7 +372,7 @@ if you would rather branch on `error.family`.
372
372
  | 601-612 | Users | `UserError` |
373
373
  | 700-715 | Social accounts — disconnected, revoked, no slot left | `AccountError` |
374
374
  | 800-810 | Files | `FileError` |
375
- | 900-979 | Publications, every per-network limit and the two rate brakes | `PublicationError` |
375
+ | 900-986 | Publications, every per-network limit, the two rate brakes and Slack | `PublicationError` |
376
376
  | 1000-1003 | General | `PlanVortexError` |
377
377
  | 1100-1111 | Organizations | `OrganizationError` |
378
378
  | 1200-1207 | Roles | `PlanVortexError` |
@@ -9,8 +9,8 @@ var PLANVORTEX_ERROR_RANGES = [
9
9
  //El techo sube con el catalogo del servidor, y subir tarde no da un error: da un consejo
10
10
  //equivocado. Los codigos de Bluesky, Discord, Telegram y Threads (961-977) y los dos frenos
11
11
  //de ritmo de la fase de publicaciones ilimitadas (978, 979) nacieron por encima de 960 y
12
- //caian fuera de toda familia.
13
- { from: 900, to: 979, family: "publication" },
12
+ //caian fuera de toda familia. Slack estreno el 980-986, que es el mismo caso otra vez.
13
+ { from: 900, to: 986, family: "publication" },
14
14
  { from: 1e3, to: 1003, family: "general" },
15
15
  { from: 1100, to: 1111, family: "organization" },
16
16
  { from: 1200, to: 1207, family: "role" },
@@ -143,5 +143,5 @@ function isTokenError(error) {
143
143
  }
144
144
 
145
145
  export { AccountError, AiPlanError, AuthError, ContactError, FileError, IntegrationError, MessagingError, NO_ERROR_CODE, OrganizationError, PLANVORTEX_ERROR_RANGES, PlanLimitError, PlanVortexAuthenticationError, PlanVortexConfigError, PlanVortexConnectionError, PlanVortexError, ProductError, PublicationError, TOKEN_ERROR_CODES, UserError, createErrorFromResponse, errorFamilyForCode, isPlanVortexError, isTokenError };
146
- //# sourceMappingURL=chunk-IIAKKH3S.js.map
147
- //# sourceMappingURL=chunk-I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EA,EAAA,IAAI,cAAA,CAAe,KAAA,CAAM,IAAI,CAAA,EAAG;AAC5B,IAAA,MAAM,MAAA,GAAS,kBAAA,CAAmB,KAAA,CAAM,IAAA,CAAK,IAAI,CAAA;AACjD,IAAA,MAAM,cAAc,MAAA,KAAW,MAAA,GAAY,MAAA,GAAY,cAAA,CAAe,MAAM,CAAA,KAAM,eAAA;AAClF,IAAA,OAAO,IAAI,WAAW,KAAA,CAAM,IAAA,CAAK,MAAM,KAAA,CAAM,IAAA,CAAK,WAAW,kBAAA,EAAoB;AAAA,MAC7E,GAAG,OAAA;AAAA,MACH,IAAA,EAAM,KAAA,CAAM,IAAA,CAAK,IAAA,IAAQ;AAAC,KAC7B,CAAA;AAAA,EACL;AAEA,EAAA,OAAO,IAAI,eAAA,CAAgB,aAAA,EAAe,CAAA,KAAA,EAAQ,KAAA,CAAM,MAAM,CAAA,CAAA,EAAI;AAAA,IAC9D,GAAG,OAAA;AAAA,IACH,MAAA,EAAQ,MAAA;AAAA,IACR,IAAA,EACI,OAAO,KAAA,CAAM,IAAA,KAAS,QAAA,IAAY,KAAA,CAAM,IAAA,KAAS,IAAA,GAC1C,KAAA,CAAM,IAAA,GACP,EAAE,IAAA,EAAM,MAAM,IAAA;AAAK,GAChC,CAAA;AACL;AAGO,SAAS,kBAAkB,KAAA,EAA0C;AACxE,EAAA,OAAO,KAAA,YAAiB,eAAA;AAC5B;AAOO,SAAS,aAAa,KAAA,EAAyB;AAClD,EAAA,OAAO,kBAAkB,KAAK,CAAA,IAAK,iBAAA,CAAkB,QAAA,CAAS,MAAM,IAAI,CAAA;AAC5E","file":"chunk-RK2OR6IV.js","sourcesContent":["/**\n * El catálogo de errores de PlanVortex, por rangos, y las clases que salen de él.\n *\n * LA REGLA, y no es negociable: **los errores se clasifican por `body.code`, nunca por el status\n * HTTP.** Todo error de dominio viaja con un 400 — un token caducado, una cuenta desconectada, el\n * cupo del plan agotado y un texto demasiado largo son los cuatro un 400. Sólo el 520 (permisos)\n * sale 401 y un fallo inesperado sale 500. Un `if (response.status === 401) refreshToken()` sería\n * un bug silencioso: los códigos de token, 501 y 522, viajan dentro de un 400.\n *\n * El catálogo del servidor crece cada mes, así que un código fuera de estos rangos NO es un error\n * del cliente: cae en la clase base con su `code` y su `message` intactos. Nunca se traga y nunca\n * se renombra.\n */\n\nexport type PlanVortexErrorRange = {\n /** Primer código del rango, incluido */\n from: number;\n /** Último código del rango, incluido */\n to: number;\n /** Qué familia de problemas es */\n family: string;\n};\n\nexport const PLANVORTEX_ERROR_RANGES: readonly PlanVortexErrorRange[] = [\n //Hasta 546, no 544: la API publica se abrio a todos los planes y trajo dos codigos nuevos\n //—545 (ritmo por plan, que sale 429) y 546 (correo sin verificar al crear una app)—.\n { from: 500, to: 546, family: \"auth\" },\n { from: 601, to: 612, family: \"user\" },\n { from: 700, to: 715, family: \"account\" },\n { from: 800, to: 810, family: \"file\" },\n //El techo sube con el catalogo del servidor, y subir tarde no da un error: da un consejo\n //equivocado. Los codigos de Bluesky, Discord, Telegram y Threads (961-977) y los dos frenos\n //de ritmo de la fase de publicaciones ilimitadas (978, 979) nacieron por encima de 960 y\n //caian fuera de toda familia. Slack estreno el 980-986, que es el mismo caso otra vez.\n { from: 900, to: 986, family: \"publication\" },\n { from: 1000, to: 1003, family: \"general\" },\n { from: 1100, to: 1111, family: \"organization\" },\n { from: 1200, to: 1207, family: \"role\" },\n //1308 es el tope de APPS del plan, que nacio al quitar el candado de precio de la API.\n { from: 1300, to: 1308, family: \"plan_limit\" },\n { from: 1400, to: 1408, family: \"plan_limit\" },\n { from: 1500, to: 1512, family: \"messaging\" },\n { from: 1600, to: 1601, family: \"contact\" },\n { from: 1900, to: 1906, family: \"payment\" },\n { from: 2000, to: 2099, family: \"product\" },\n { from: 2100, to: 2199, family: \"ai_plan\" },\n { from: 2200, to: 2299, family: \"integration\" },\n] as const;\n\n/**\n * El `code` que lleva un error que **no** trae código del servidor: un fallo de red, un timeout, un\n * 502 de un proxy con cuerpo HTML, o el propio constructor quejándose de la configuración.\n *\n * El servidor no emite nunca el 0, así que sirve de centinela sin pisar el catálogo. Cuál de esos\n * casos es se distingue por `family`: `connection`, `http`, `oauth`, `config` o `webhook`.\n */\nexport const NO_ERROR_CODE = 0;\n\n/**\n * Los dos códigos que significan \"tu token ya no sirve\". Los dos llegan **dentro de un 400**, que es\n * justo por lo que existe esta constante: quien mire el status no los va a encontrar.\n *\n * El 520 (permisos) NO está aquí a propósito: sale 401, pero pedir un token nuevo no lo arregla — a\n * la app le faltan permisos, y con un token recién emitido le seguirán faltando.\n */\nexport const TOKEN_ERROR_CODES: readonly number[] = [501, 522];\n\n/** Opciones de construcción de un error. Todas opcionales: un error siempre se puede construir. */\nexport interface PlanVortexErrorOptions {\n /** El `data` del cuerpo — lo que el servidor adjuntó con `.withData({...})`. `{}` si no vino nada. */\n data?: Record<string, unknown>;\n /** Status HTTP. `undefined` cuando la petición no llegó a tener respuesta. */\n status?: number;\n /** `x-request-id` de la respuesta, si el despliegue lo pone delante. */\n requestId?: string;\n /** Segundos de la cabecera `Retry-After`, cuando la hay. */\n retryAfter?: number;\n /** El error original (un `TypeError` de `fetch`, por ejemplo). */\n cause?: unknown;\n /**\n * Familia, sólo para los errores que NO salen del catálogo: `connection`, `http`, `oauth`,\n * `config` y `webhook`. Los de dominio la deducen de su `code` y no la pasan nunca.\n */\n family?: string;\n}\n\n/**\n * La base de todo lo que lanza esta librería.\n *\n * Un `catch (e) { if (e instanceof PlanVortexError) }` los coge todos: los de dominio, los de red y\n * los de configuración. Para afinar están las subclases y el `code`.\n */\nexport class PlanVortexError extends Error {\n /** El `code` del cuerpo, tal cual. {@link NO_ERROR_CODE} si el error no viene del catálogo. */\n readonly code: number;\n /** La familia del rango: `auth`, `publication`, `plan_limit`... Ver {@link PLANVORTEX_ERROR_RANGES}. */\n readonly family: string;\n /** El `data` del cuerpo. */\n readonly data: Record<string, unknown>;\n /** Status HTTP, o `undefined` si nunca hubo respuesta. */\n readonly status: number | undefined;\n /** `x-request-id`, si el despliegue lo pone. Hoy el servidor no lo emite; un proxy delante sí. */\n readonly requestId: string | undefined;\n /** Segundos que pidió esperar la cabecera `Retry-After`, si llegó. */\n readonly retryAfter: number | undefined;\n\n constructor(code: number, message: string, options: PlanVortexErrorOptions = {}) {\n super(message, options.cause === undefined ? undefined : { cause: options.cause });\n this.name = new.target.name;\n this.code = code;\n this.family = options.family ?? errorFamilyForCode(code) ?? \"unknown\";\n this.data = options.data ?? {};\n this.status = options.status;\n this.requestId = options.requestId;\n this.retryAfter = options.retryAfter;\n }\n}\n\n/** 500-546 — tokens, apps de cliente, permisos. Incluye el 501 y el 522, los de token caducado. */\nexport class AuthError extends PlanVortexError {}\n/** 601-612 — el usuario final. */\nexport class UserError extends PlanVortexError {}\n/** 700-715 — cuentas sociales: desconectada, sin permisos en la red, sin refrescar. */\nexport class AccountError extends PlanVortexError {}\n/** 800-810 — ficheros: formato no admitido, demasiado grande, conversión fallida. */\nexport class FileError extends PlanVortexError {}\n/** 900-986 — publicaciones, incluidos los límites por red (caracteres, imágenes, duración), los\n * dos frenos de ritmo —978 (demasiado rápido en esta cuenta) y 979 (tope diario de esa red)— y\n * los de Slack (980-986), que empiezan por el más común: 980, la app no está en el canal. */\nexport class PublicationError extends PlanVortexError {}\n/** 1100-1111 — organizaciones, y el token temporal atado a una sola de ellas (1101). */\nexport class OrganizationError extends PlanVortexError {}\n/**\n * 1300-1308 y 1400-1408 — el cupo del plan, del cliente o de la organización.\n *\n * Es el error que un integrador **sí** quiere distinguir: no se arregla reintentando, se arregla\n * cambiando de plan. Por eso los dos rangos comparten clase.\n */\nexport class PlanLimitError extends PlanVortexError {}\n/** 1500-1512 — conversaciones, mensajes y plantillas. Exige plan de pago. */\nexport class MessagingError extends PlanVortexError {}\n/** 1600-1601 — contactos. */\nexport class ContactError extends PlanVortexError {}\n/** 2000-2099 — catálogos y productos (sólo Facebook e Instagram). */\nexport class ProductError extends PlanVortexError {}\n/** 2100-2199 — planes de publicaciones generados con IA. */\nexport class AiPlanError extends PlanVortexError {}\n/** 2200-2299 — integraciones: Google Drive, RSS. */\nexport class IntegrationError extends PlanVortexError {}\n\n/**\n * La petición no llegó a tener respuesta: DNS, conexión rechazada, socket cortado o timeout.\n *\n * No lleva código del catálogo porque el servidor nunca llegó a opinar.\n */\nexport class PlanVortexConnectionError extends PlanVortexError {\n /** `true` si lo que se agotó fue nuestro propio timeout, no la red. */\n readonly timeout: boolean;\n\n constructor(message: string, options: PlanVortexErrorOptions & { timeout?: boolean } = {}) {\n super(NO_ERROR_CODE, message, { ...options, family: \"connection\" });\n this.timeout = options.timeout ?? false;\n }\n}\n\n/**\n * `POST /oauth/token` rechazó las credenciales.\n *\n * Es el ÚNICO sitio del API con forma de error distinta: `{error, error_description}` de OAuth2, no\n * el `{code, message, data}` de todo lo demás. Y por eso el `code` es {@link NO_ERROR_CODE}: el\n * servidor tiene códigos para esto (538-541) pero **no los manda en el cuerpo**, así que ponerlos\n * aquí sería inventarse algo que nadie dijo. Lo que sí viaja es `oauthError`.\n */\nexport class PlanVortexAuthenticationError extends PlanVortexError {\n /** `invalid_client`, `invalid_request`, `unsupported_grant_type`, `slow_down` o `server_error`. */\n readonly oauthError: string;\n\n constructor(oauthError: string, description: string, options: PlanVortexErrorOptions = {}) {\n super(NO_ERROR_CODE, description, { ...options, family: \"oauth\" });\n this.oauthError = oauthError;\n }\n}\n\n/**\n * La librería está mal configurada y no ha llegado a salir de casa: sin credenciales, o instanciada\n * en un navegador (§ trampa 9 del roadmap).\n */\nexport class PlanVortexConfigError extends PlanVortexError {\n constructor(message: string) {\n super(NO_ERROR_CODE, message, { family: \"config\" });\n }\n}\n\n/** La familia a la que pertenece un código, o `undefined` si cae fuera del catálogo conocido. */\nexport function errorFamilyForCode(code: number): string | undefined {\n return PLANVORTEX_ERROR_RANGES.find((range) => code >= range.from && code <= range.to)?.family;\n}\n\n/**\n * Familia -> clase. Las que faltan —`general`, `role`, `payment` y cualquier rango nuevo— caen a\n * propósito en la clase base: existen en el servidor pero no son superficie de integración, y darles\n * clase propia sería prometer un `instanceof` que luego habría que mantener.\n */\nconst FAMILY_CLASSES: Record<string, typeof PlanVortexError> = {\n auth: AuthError,\n user: UserError,\n account: AccountError,\n file: FileError,\n publication: PublicationError,\n organization: OrganizationError,\n plan_limit: PlanLimitError,\n messaging: MessagingError,\n contact: ContactError,\n product: ProductError,\n ai_plan: AiPlanError,\n integration: IntegrationError,\n};\n\n/** El cuerpo de error del API: `{code, message, data}`. */\nexport interface ApiErrorBody {\n code: number;\n message?: string;\n data?: Record<string, unknown>;\n}\n\nfunction isApiErrorBody(body: unknown): body is ApiErrorBody {\n return typeof body === \"object\" && body !== null && typeof (body as ApiErrorBody).code === \"number\";\n}\n\n/**\n * Convierte una respuesta de error en la clase que le toca.\n *\n * Un cuerpo sin `code` —un 502 de un proxy, la página HTML de un balanceador— no es un error de\n * dominio: sale como clase base con `family: \"http\"` y el cuerpo entero en `data`, que es además lo\n * que necesita `auth.ts` para reconocer el `{error, error_description}` de OAuth2.\n */\nexport function createErrorFromResponse(input: {\n body: unknown;\n status: number;\n requestId?: string | undefined;\n retryAfter?: number | undefined;\n}): PlanVortexError {\n const options: PlanVortexErrorOptions = {\n status: input.status,\n ...(input.requestId === undefined ? {} : { requestId: input.requestId }),\n ...(input.retryAfter === undefined ? {} : { retryAfter: input.retryAfter }),\n };\n\n if (isApiErrorBody(input.body)) {\n const family = errorFamilyForCode(input.body.code);\n const ErrorClass = (family === undefined ? undefined : FAMILY_CLASSES[family]) ?? PlanVortexError;\n return new ErrorClass(input.body.code, input.body.message ?? \"PlanVortex error\", {\n ...options,\n data: input.body.data ?? {},\n });\n }\n\n return new PlanVortexError(NO_ERROR_CODE, `HTTP ${input.status}`, {\n ...options,\n family: \"http\",\n data:\n typeof input.body === \"object\" && input.body !== null\n ? (input.body as Record<string, unknown>)\n : { body: input.body },\n });\n}\n\n/** ¿Es un error de esta librería? Útil en un `catch` donde no apetece importar la clase. */\nexport function isPlanVortexError(error: unknown): error is PlanVortexError {\n return error instanceof PlanVortexError;\n}\n\n/**\n * ¿Dice este error que el token ya no sirve? (los códigos 501 y 522, los dos dentro de un 400).\n *\n * Es lo que dispara el único reintento con token nuevo del cliente.\n */\nexport function isTokenError(error: unknown): boolean {\n return isPlanVortexError(error) && TOKEN_ERROR_CODES.includes(error.code);\n}\n"]}
@@ -753,7 +753,7 @@ interface paths {
753
753
  *
754
754
  * **Telegram does not come through here, and cannot be made to.** That network has no callback: the account is created by PlanVortex when the bot is added to a channel, and what authorizes it is a single-use voucher minted at that moment and spent in the same breath — it never leaves the server, so calling this endpoint for `telegram` answers error 700. It is deliberate: the bot is shared, so without it anyone could hang any channel where that bot is an admin off their own organization by passing a chat id by hand. What an integration listens for instead is the `new_account` webhook notification.
755
755
  *
756
- * **And a Telegram account arrives already active.** In the other eleven networks this endpoint hands you accounts that are still off, and you pick which ones spend a plan slot with `POST .../accounts/{id_account}/enable`. Here there is nothing to call: one channel arrives — the one the person picked in Telegram — and PlanVortex takes the slot for it right then. If the plan has no free slot the account is still created, off, and the person is told so in the bot chat; `GET /organizations/{id_organization}/accounts` will not list it, because that listing only returns active accounts, but naming it in the `accounts` filter does return it.
756
+ * **And a Telegram account arrives already active.** In the other twelve networks this endpoint hands you accounts that are still off, and you pick which ones spend a plan slot with `POST .../accounts/{id_account}/enable`. Here there is nothing to call: one channel arrives — the one the person picked in Telegram — and PlanVortex takes the slot for it right then. If the plan has no free slot the account is still created, off, and the person is told so in the bot chat; `GET /organizations/{id_organization}/accounts` will not list it, because that listing only returns active accounts, but naming it in the `accounts` filter does return it.
757
757
  */
758
758
  get: operations["connectAccount"];
759
759
  put?: never;
@@ -900,6 +900,8 @@ interface paths {
900
900
  * It takes a **slot of the plan**, so it fails with error 706 when the organization is already at its account limit. It also turns the network's webhooks back on, on any plan but the free one.
901
901
  *
902
902
  * **On `telegram` you normally never call this.** That network's accounts are born active — there is no authorization return in which to choose them, so PlanVortex takes the slot when the bot is added to the channel. The one case left is a channel that arrived while the plan was full: it stays off until a slot frees up, and this is what turns it on.
903
+ *
904
+ * **On `slack` this is also what puts the PlanVortex app inside the channel**, with `conversations.join`. It works on a **public** channel and it cannot work on a private one: Slack has no API for joining one. The account is enabled all the same and the connection looks healthy, and then the first publication fails with error 980 — so a private channel has to be told to the person **before** they pick it, together with the `/invite @PlanVortex` they have to run in that channel. Whether the app is inside travels in `extra_data.is_member`, and it can turn `false` later, the day somebody removes the app from an already connected channel.
903
905
  */
904
906
  post: operations["enableAccount"];
905
907
  delete?: never;
@@ -1362,7 +1364,7 @@ interface paths {
1362
1364
  *
1363
1365
  * **An app cannot call this.** Connecting a social account is an OAuth flow with a person in front of it, so this endpoint only accepts a user token or a temporal connect token; with app credentials it answers error 519. The way an integration does it is to issue a temporal connect token with `GET /organizations/{id_organization}/temporal_connect_token` and hand it to its end user.
1364
1366
  *
1365
- * **Read `authorization`, not `link`.** Ten of the twelve networks are `redirect` and you send the person to `link`. Two are not, and neither of them fails visibly if you treat it as one:
1367
+ * **Read `authorization`, not `link`.** Eleven of the thirteen networks are `redirect` and you send the person to `link`. Two are not, and neither of them fails visibly if you treat it as one:
1366
1368
  *
1367
1369
  * • **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.
1368
1370
  * • **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.
@@ -2506,9 +2508,9 @@ interface components {
2506
2508
  /**
2507
2509
  * @description A social account connected to an organization.
2508
2510
  *
2509
- * On `discord` and on `telegram` an account is a **channel**, not a profile: publishing to two Discord channels of the same server — or to two Telegram channels of the same brand — costs two accounts of the plan.
2511
+ * On `discord`, on `telegram` and on `slack` an account is a **channel**, not a profile: publishing to two Discord channels of the same server — or to two Telegram channels of the same brand, or to `#anuncios` and `#general` of the same Slack workspace — costs two accounts of the plan.
2510
2512
  *
2511
- * `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).
2513
+ * `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).
2512
2514
  */
2513
2515
  Account: {
2514
2516
  _id: string;
@@ -2516,7 +2518,7 @@ interface components {
2516
2518
  creation_date: string;
2517
2519
  /** @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. */
2518
2520
  error_code: number;
2519
- /** @description Followers the network reports. Absent on an account that has never been measured. On `telegram` it is the channel's member count, and it is the **only** audience figure that network publishes: there are no views, no impressions and no reach anywhere in the Bot API. */
2521
+ /** @description Followers the network reports. Absent on an account that has never been measured. On `telegram` and on `slack` it is the channel's member count, and it is the **only** audience figure either network publishes: there are no views, no impressions and no reach anywhere in the Bot API nor in the Slack Web API. */
2520
2522
  followers_count?: number;
2521
2523
  /** @description The client the organization hangs from. Denormalized here for the plan checks. */
2522
2524
  id_client: string;
@@ -2585,7 +2587,7 @@ interface components {
2585
2587
  /**
2586
2588
  * @description **How** an account of this network is authorized, which is not always "send the user to this URL".
2587
2589
  *
2588
- * Ten of the twelve networks are `redirect`: open `link` and the network sends the person back to PlanVortex with a code. Two are not:
2590
+ * Eleven of the thirteen networks are `redirect`: open `link` and the network sends the person back to PlanVortex with a code. Two are not:
2589
2591
  *
2590
2592
  * • **WhatsApp.** Its sign-up is Meta's *Embedded Signup*: a popup raised by the Facebook JavaScript SDK from your own page, which returns — over `postMessage` — session data (`waba_id`, `phone_number_id`) that no query string carries. Its `link` is therefore an empty string.
2591
2593
  * • **Telegram.** There is no OAuth here: no consent screen, no `code`, no account token. `link` opens a private chat with the PlanVortex bot, the person then adds that bot to their channel, and **the account is created from that event**, not from any request of yours. Which means the connection cannot be finished by calling `GET /organizations/{id_organization}/account-connect/telegram` — see that endpoint.
@@ -3052,13 +3054,21 @@ interface components {
3052
3054
  characters: components["schemas"]["CatalogSocialLimitsMap"];
3053
3055
  /** @description Maximum length of a reply to a comment. `0` means the network has no comments. */
3054
3056
  comment_characters: components["schemas"]["CatalogSocialLimitsMap"];
3055
- /** @description Maximum size of one file, in megabytes. */
3057
+ /**
3058
+ * @description Maximum size of one file, in megabytes.
3059
+ *
3060
+ * **On `slack` this one is a ceiling, not a promise.** 1.024 MB is what the network allows; the real limit is the lesser of that and the storage the client's own workspace plan still has, which no API exposes. A file inside this number can still come back as error 986. It is the only key in this map with that property.
3061
+ */
3056
3062
  max_file_size_mb: components["schemas"]["CatalogSocialLimitsMap"];
3057
3063
  /** @description Second text limit, in UTF-8 bytes. `0` means the network does not measure text in bytes; only Bluesky does, at 3.000. */
3058
3064
  max_post_bytes: components["schemas"]["CatalogSocialLimitsMap"];
3059
3065
  /** @description Maximum length of the title. `0` means the network has no title field at all. */
3060
3066
  title_characters: components["schemas"]["CatalogSocialLimitsMap"];
3061
- /** @description How many images one publication accepts. `0` means images are not a publication on that network. */
3067
+ /**
3068
+ * @description How many images one publication accepts. `0` means images are not a publication on that network.
3069
+ *
3070
+ * **On `discord`, `threads` and `slack` it counts images and videos together**, because there the carousel is one message carrying several attachments and not several publications: what is validated is the total number of files. Over it, the publication is created in state `withErrors` — on `slack` with `publication_errors[].code = 982`.
3071
+ */
3062
3072
  total_images: components["schemas"]["CatalogSocialLimitsMap"];
3063
3073
  /** @description Maximum video duration. A network that limits weight instead of duration is not here but in `max_file_size_mb`. */
3064
3074
  video_duration_in_seconds: components["schemas"]["CatalogSocialLimitsMap"];
@@ -3649,7 +3659,7 @@ interface components {
3649
3659
  * The catalogue grows with the product, so treat an unknown `code` as a generic failure instead of rejecting it.
3650
3660
  */
3651
3661
  Error: {
3652
- /** @description PlanVortex error code. Ranges: 500-546 auth, tokens and client apps · 601-612 user · 700-715 social accounts · 800-810 files · 900-979 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. */
3662
+ /** @description PlanVortex error code. Ranges: 500-546 auth, tokens and client apps · 601-612 user · 700-715 social accounts · 800-810 files · 900-986 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. */
3653
3663
  code: number;
3654
3664
  /** @description Extra context attached to the error, when there is any. */
3655
3665
  data?: {
@@ -4175,7 +4185,11 @@ interface components {
4175
4185
  };
4176
4186
  /** @description Body accepted when creating or updating a publication. Only these properties are read; anything else in the payload is ignored. */
4177
4187
  PublicationsPublicationInput: {
4178
- /** @description Identifiers of uploads previously created through the uploads endpoints, attached to this publication. */
4188
+ /**
4189
+ * @description Identifiers of uploads previously created through the uploads endpoints, attached to this publication.
4190
+ *
4191
+ * **On Slack the files travel inside the message**, not as publications of their own: up to 10 attachments counting images and videos together (`publication_errors[].code = 982` over it), each one under the `max_file_size_mb.slack` ceiling (code 983), and anything the upload itself refuses comes back as code 986.
4192
+ */
4179
4193
  files?: string[];
4180
4194
  /** @description Internal name for the publication. Useful for grouping; never shown on the social network. */
4181
4195
  name?: string;
@@ -4195,7 +4209,7 @@ interface components {
4195
4209
  * Not every connectable network publishes — a local business listing receives reviews, not posts — so this list is shorter than the one in `GET /social_networks`. Ask `GET /allowed_social_publications` rather than hardcoding it, because it grows.
4196
4210
  * @enum {string}
4197
4211
  */
4198
- social_network?: "facebook" | "instagram" | "twitter" | "linkedin" | "tiktok" | "whatsapp" | "youtube" | "bluesky" | "discord" | "telegram" | "threads";
4212
+ social_network?: "facebook" | "instagram" | "twitter" | "linkedin" | "tiktok" | "whatsapp" | "youtube" | "bluesky" | "discord" | "telegram" | "threads" | "slack";
4199
4213
  /**
4200
4214
  * @description Send `draft` to store the publication without publishing it. If omitted, the state is resolved automatically: `ready` when everything validates, `withErrors` otherwise. Forcing `sended` marks it as published without actually sending it.
4201
4215
  * @enum {string}
@@ -4205,6 +4219,8 @@ interface components {
4205
4219
  * @description Body text of the publication. Either `text` or at least one entry in `files` is required: if both are empty the publication is still created, but in state `withErrors` with `publication_errors[].code = 915`. Maximum length depends on the network. On YouTube this is the video **description** (5,000 characters), and the publication must carry exactly one video file and no images — otherwise it is created in state `withErrors` with `publication_errors[].code = 943`. For X (Twitter), a text containing a link costs 200 credits instead of 15.
4206
4220
  *
4207
4221
  * **On Telegram the limit depends on what else the publication carries**: 4.096 characters while it is text only, and **1.024** the moment it has an image or a video, because then the text is the caption of a photo, a video or an album and no longer a message. Over the limit it is created in state `withErrors` with `publication_errors[].code = 967`, whose `data` carries `characters`, `max_characters` and `has_media`. Both numbers are published, as `characters.telegram` and `characters.telegram_media` in `GET /social_limits`.
4222
+ *
4223
+ * **On Slack the limit is 4.000 characters** and it is counted over the text you send, not over what travels: `&`, `<` and `>` are escaped before publishing, so a text made of ampersands grows on the wire and is still measured here. Over the limit the publication is created in state `withErrors` with `publication_errors[].code = 981`. And because the escaped text is what is measured on the wire, a text that passed at 4.000 characters and is full of `&` is **trimmed** before going out — Slack does not reject a long `text`, it truncates it or splits it into several messages, and one publication showing up as two posts is worse. The text goes out **plain**: Slack speaks *mrkdwn* and not Markdown, and PlanVortex sends no `blocks`, so `**bold**` is published literally.
4208
4224
  */
4209
4225
  text?: string;
4210
4226
  /** @description Title for the publication. Only some networks use it: optional on LinkedIn, and **required on YouTube**, where it is the video title and must be 100 characters or fewer — a publication without it, or with a longer one, is created in state `withErrors` with `publication_errors[].code = 944`. */
@@ -4310,6 +4326,8 @@ interface components {
4310
4326
  * On `threads` there are six, and the one that matters is `views`: it is the only one of the four newest networks with something like impressions, so its engagement rate is computed over a real base and not over followers. Sharing arrives split in three — `reposts`, `quotes` and `shares` (outside Threads) — and the three are added into one figure, the same criterion as on X; the breakdown stays in `raw`. A reply is what every other network calls a comment.
4311
4327
  *
4312
4328
  * On `telegram` there are two as well, and **neither of them is asked for**: the Bot API has no method that returns a message's metrics, so `reactions` arrives on its own through the bot and `comments` is counted in PlanVortex's own inbox. There are no impressions, no reach, no views and no forwards to be had anywhere in it, so engagement is computed over followers.
4329
+ *
4330
+ * On `slack` there is exactly **one**, `reactions`, and the other absences are the informative part: the Web API publishes no impressions, no reach, no views and no clicks for a message, so those keys are missing rather than zero. There is no `comments` either — Slack threads are not read at all (`comments` is `false` in `GET /social_capabilities`). Engagement is computed over the channel's members.
4313
4331
  */
4314
4332
  PublicationStats: {
4315
4333
  angers?: number;
@@ -4340,7 +4358,7 @@ interface components {
4340
4358
  profile_visits?: number;
4341
4359
  quotes?: number;
4342
4360
  reach?: number;
4343
- /** @description Telegram. Every reaction on the post, all emoji together. It is the **complete state and not an increment**: it goes down when somebody takes theirs back. Normalised as `likes`. */
4361
+ /** @description Telegram and Slack. Every reaction on the post, all emoji together. It is the **complete state and not an increment**: it goes down when somebody takes theirs back. Normalised as `likes`. On `slack` it is the only metric the network gives. */
4344
4362
  reactions?: number;
4345
4363
  /** @description Telegram. The same total broken down by emoji. Reactions with a custom emoji are grouped under a single key: their identifier means nothing outside the server that created it. */
4346
4364
  reactions_by_emoji?: {
@@ -4394,7 +4412,7 @@ interface components {
4394
4412
  * **This list grows.** Treat it as an open enumeration: a client that rejects an unknown value breaks the day a network is added, which happens several times a year. Not every network does everything — ask `GET /social_capabilities`.
4395
4413
  * @enum {string}
4396
4414
  */
4397
- SocialNetwork: "facebook" | "instagram" | "linkedin" | "tiktok" | "twitter" | "whatsapp" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram" | "threads";
4415
+ SocialNetwork: "facebook" | "instagram" | "linkedin" | "tiktok" | "twitter" | "whatsapp" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram" | "threads" | "slack";
4398
4416
  /** @description Statistics collection settings. Only `auto_refresh_twitter` is read; any other key is ignored. */
4399
4417
  StatsSettings: {
4400
4418
  /**
@@ -7172,11 +7190,11 @@ interface operations {
7172
7190
  };
7173
7191
  deleteMessageTemplate: {
7174
7192
  parameters: {
7175
- query?: {
7193
+ query: {
7176
7194
  /** @description Identifier of the template on the network. */
7177
- template_id?: string;
7195
+ template_id: string;
7178
7196
  /** @description Name of the template on the network. */
7179
- template_name?: string;
7197
+ template_name: string;
7180
7198
  };
7181
7199
  header?: never;
7182
7200
  path: {
@@ -10898,7 +10916,8 @@ interface operations {
10898
10916
  * "bluesky",
10899
10917
  * "discord",
10900
10918
  * "telegram",
10901
- * "threads"
10919
+ * "threads",
10920
+ * "slack"
10902
10921
  * ]
10903
10922
  */
10904
10923
  "application/json": components["schemas"]["SocialNetwork"][];
@@ -10980,9 +10999,9 @@ interface operations {
10980
10999
  * de una organizacion. Aqui se llama `PublicationInput`. Los que describen LO MISMO en varias
10981
11000
  * secciones viven en `common.json` y conservan su nombre —`Publication`, `Account`, `Upload`,
10982
11001
  * `Message`, `Contact`, `NormalizedMetrics`—: es lo que evita dos tipos para un solo objeto.
10983
- * 2. **Abre las enumeraciones que crecen** (§ trampa 8 del roadmap). `ALLOWED_RRSS` va por diez
11002
+ * 2. **Abre las enumeraciones que crecen** (§ trampa 8 del roadmap). `ALLOWED_RRSS` va por trece
10984
11003
  * redes y sube varias veces al ano. Si `social_network` fuera una union cerrada, el dia que
10985
- * entre la undecima **dejaria de compilar el codigo de todos los integradores** hasta que
11004
+ * entre la siguiente **dejaria de compilar el codigo de todos los integradores** hasta que
10986
11005
  * actualizasen el paquete, y lo unico que habria pasado es que la API devuelve un valor mas.
10987
11006
  * Con `T | (string & {})` se autocompletan las conocidas y una nueva sigue compilando.
10988
11007
  * 3. **Avisa de lo que el tipo no puede decir por si solo**, como que `public_path` caduca.
@@ -11061,8 +11080,9 @@ type FileFormat = OpenEnum<Schemas["Upload"]["file_format"]>;
11061
11080
  * Sobre que se divide el engagement de una publicacion.
11062
11081
  *
11063
11082
  * No todas las redes dan alcance, asi que se cae en cascada: `reach`, si no `impressions`, si no
11064
- * `followers` (que es lo unico que hay en Bluesky, en Discord y en Telegram — la Bot API no
11065
- * publica impresiones, ni alcance, ni siquiera las vistas de un post). **Dos filas con base
11083
+ * `followers` (que es lo unico que hay en Bluesky, en Discord, en Telegram y en Slack — ni la
11084
+ * Bot API ni la Web API publican impresiones, ni alcance, ni siquiera las vistas de un post).
11085
+ * **Dos filas con base
11066
11086
  * distinta no son comparables**: si las pones en la misma tabla, di cual es.
11067
11087
  */
11068
11088
  type EngagementBase = OpenEnum<NonNullable<Schemas["PublicationsPublicationStatsPoint"]["engagement_base"]>>;
@@ -11201,8 +11221,9 @@ type ClientWithOrganizations = Operations["getClientsWithOrganizations"]["respon
11201
11221
  /**
11202
11222
  * Una cuenta social conectada a una organizacion.
11203
11223
  *
11204
- * En Discord y en Telegram una cuenta es un **canal**, no un perfil: publicar en dos canales del
11205
- * mismo servidor —o en dos canales de la misma marca— gasta dos cuentas del plan. `error_code`
11224
+ * En Discord, en Telegram y en Slack una cuenta es un **canal**, no un perfil: publicar en dos
11225
+ * canales del mismo servidor —o en dos canales de la misma marca, o en `#anuncios` y `#general`
11226
+ * del mismo workspace— gasta dos cuentas del plan. `error_code`
11206
11227
  * distinto de 0 significa que la conexion se rompio —token caducado, permisos retirados— y hay que
11207
11228
  * reconectarla; en Telegram no caduca nada, porque no hay token de cuenta, y lo que la rompe es que
11208
11229
  * saquen al bot del canal o le quiten el permiso de publicar (error 968).
@@ -11253,7 +11274,7 @@ type ConnectToken = Operations["createTemporalConnectToken"]["responses"][200]["
11253
11274
  */
11254
11275
  type ConnectLink = Schemas["AccountsSocialLinksList"]["links"][number];
11255
11276
  /**
11256
- * Con que se autoriza una red: `redirect` (nueve de las once), `meta_embedded_signup` (WhatsApp) o
11277
+ * Con que se autoriza una red: `redirect` (once de las trece), `meta_embedded_signup` (WhatsApp) o
11257
11278
  * `telegram_bot` (Telegram). Se saca de {@link ConnectLink} y esta aqui para poder nombrarlo en un
11258
11279
  * `switch`.
11259
11280
  *
@@ -11870,8 +11891,9 @@ declare class AccountError extends PlanVortexError {
11870
11891
  /** 800-810 — ficheros: formato no admitido, demasiado grande, conversión fallida. */
11871
11892
  declare class FileError extends PlanVortexError {
11872
11893
  }
11873
- /** 900-979 — publicaciones, incluidos los límites por red (caracteres, imágenes, duración) y los
11874
- * dos frenos de ritmo: 978 (demasiado rápido en esta cuenta) y 979 (tope diario de esa red). */
11894
+ /** 900-986 — publicaciones, incluidos los límites por red (caracteres, imágenes, duración), los
11895
+ * dos frenos de ritmo —978 (demasiado rápido en esta cuenta) y 979 (tope diario de esa red)— y
11896
+ * los de Slack (980-986), que empiezan por el más común: 980, la app no está en el canal. */
11875
11897
  declare class PublicationError extends PlanVortexError {
11876
11898
  }
11877
11899
  /** 1100-1111 — organizaciones, y el token temporal atado a una sola de ellas (1101). */
@@ -753,7 +753,7 @@ interface paths {
753
753
  *
754
754
  * **Telegram does not come through here, and cannot be made to.** That network has no callback: the account is created by PlanVortex when the bot is added to a channel, and what authorizes it is a single-use voucher minted at that moment and spent in the same breath — it never leaves the server, so calling this endpoint for `telegram` answers error 700. It is deliberate: the bot is shared, so without it anyone could hang any channel where that bot is an admin off their own organization by passing a chat id by hand. What an integration listens for instead is the `new_account` webhook notification.
755
755
  *
756
- * **And a Telegram account arrives already active.** In the other eleven networks this endpoint hands you accounts that are still off, and you pick which ones spend a plan slot with `POST .../accounts/{id_account}/enable`. Here there is nothing to call: one channel arrives — the one the person picked in Telegram — and PlanVortex takes the slot for it right then. If the plan has no free slot the account is still created, off, and the person is told so in the bot chat; `GET /organizations/{id_organization}/accounts` will not list it, because that listing only returns active accounts, but naming it in the `accounts` filter does return it.
756
+ * **And a Telegram account arrives already active.** In the other twelve networks this endpoint hands you accounts that are still off, and you pick which ones spend a plan slot with `POST .../accounts/{id_account}/enable`. Here there is nothing to call: one channel arrives — the one the person picked in Telegram — and PlanVortex takes the slot for it right then. If the plan has no free slot the account is still created, off, and the person is told so in the bot chat; `GET /organizations/{id_organization}/accounts` will not list it, because that listing only returns active accounts, but naming it in the `accounts` filter does return it.
757
757
  */
758
758
  get: operations["connectAccount"];
759
759
  put?: never;
@@ -900,6 +900,8 @@ interface paths {
900
900
  * It takes a **slot of the plan**, so it fails with error 706 when the organization is already at its account limit. It also turns the network's webhooks back on, on any plan but the free one.
901
901
  *
902
902
  * **On `telegram` you normally never call this.** That network's accounts are born active — there is no authorization return in which to choose them, so PlanVortex takes the slot when the bot is added to the channel. The one case left is a channel that arrived while the plan was full: it stays off until a slot frees up, and this is what turns it on.
903
+ *
904
+ * **On `slack` this is also what puts the PlanVortex app inside the channel**, with `conversations.join`. It works on a **public** channel and it cannot work on a private one: Slack has no API for joining one. The account is enabled all the same and the connection looks healthy, and then the first publication fails with error 980 — so a private channel has to be told to the person **before** they pick it, together with the `/invite @PlanVortex` they have to run in that channel. Whether the app is inside travels in `extra_data.is_member`, and it can turn `false` later, the day somebody removes the app from an already connected channel.
903
905
  */
904
906
  post: operations["enableAccount"];
905
907
  delete?: never;
@@ -1362,7 +1364,7 @@ interface paths {
1362
1364
  *
1363
1365
  * **An app cannot call this.** Connecting a social account is an OAuth flow with a person in front of it, so this endpoint only accepts a user token or a temporal connect token; with app credentials it answers error 519. The way an integration does it is to issue a temporal connect token with `GET /organizations/{id_organization}/temporal_connect_token` and hand it to its end user.
1364
1366
  *
1365
- * **Read `authorization`, not `link`.** Ten of the twelve networks are `redirect` and you send the person to `link`. Two are not, and neither of them fails visibly if you treat it as one:
1367
+ * **Read `authorization`, not `link`.** Eleven of the thirteen networks are `redirect` and you send the person to `link`. Two are not, and neither of them fails visibly if you treat it as one:
1366
1368
  *
1367
1369
  * • **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.
1368
1370
  * • **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.
@@ -2506,9 +2508,9 @@ interface components {
2506
2508
  /**
2507
2509
  * @description A social account connected to an organization.
2508
2510
  *
2509
- * On `discord` and on `telegram` an account is a **channel**, not a profile: publishing to two Discord channels of the same server — or to two Telegram channels of the same brand — costs two accounts of the plan.
2511
+ * On `discord`, on `telegram` and on `slack` an account is a **channel**, not a profile: publishing to two Discord channels of the same server — or to two Telegram channels of the same brand, or to `#anuncios` and `#general` of the same Slack workspace — costs two accounts of the plan.
2510
2512
  *
2511
- * `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).
2513
+ * `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).
2512
2514
  */
2513
2515
  Account: {
2514
2516
  _id: string;
@@ -2516,7 +2518,7 @@ interface components {
2516
2518
  creation_date: string;
2517
2519
  /** @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. */
2518
2520
  error_code: number;
2519
- /** @description Followers the network reports. Absent on an account that has never been measured. On `telegram` it is the channel's member count, and it is the **only** audience figure that network publishes: there are no views, no impressions and no reach anywhere in the Bot API. */
2521
+ /** @description Followers the network reports. Absent on an account that has never been measured. On `telegram` and on `slack` it is the channel's member count, and it is the **only** audience figure either network publishes: there are no views, no impressions and no reach anywhere in the Bot API nor in the Slack Web API. */
2520
2522
  followers_count?: number;
2521
2523
  /** @description The client the organization hangs from. Denormalized here for the plan checks. */
2522
2524
  id_client: string;
@@ -2585,7 +2587,7 @@ interface components {
2585
2587
  /**
2586
2588
  * @description **How** an account of this network is authorized, which is not always "send the user to this URL".
2587
2589
  *
2588
- * Ten of the twelve networks are `redirect`: open `link` and the network sends the person back to PlanVortex with a code. Two are not:
2590
+ * Eleven of the thirteen networks are `redirect`: open `link` and the network sends the person back to PlanVortex with a code. Two are not:
2589
2591
  *
2590
2592
  * • **WhatsApp.** Its sign-up is Meta's *Embedded Signup*: a popup raised by the Facebook JavaScript SDK from your own page, which returns — over `postMessage` — session data (`waba_id`, `phone_number_id`) that no query string carries. Its `link` is therefore an empty string.
2591
2593
  * • **Telegram.** There is no OAuth here: no consent screen, no `code`, no account token. `link` opens a private chat with the PlanVortex bot, the person then adds that bot to their channel, and **the account is created from that event**, not from any request of yours. Which means the connection cannot be finished by calling `GET /organizations/{id_organization}/account-connect/telegram` — see that endpoint.
@@ -3052,13 +3054,21 @@ interface components {
3052
3054
  characters: components["schemas"]["CatalogSocialLimitsMap"];
3053
3055
  /** @description Maximum length of a reply to a comment. `0` means the network has no comments. */
3054
3056
  comment_characters: components["schemas"]["CatalogSocialLimitsMap"];
3055
- /** @description Maximum size of one file, in megabytes. */
3057
+ /**
3058
+ * @description Maximum size of one file, in megabytes.
3059
+ *
3060
+ * **On `slack` this one is a ceiling, not a promise.** 1.024 MB is what the network allows; the real limit is the lesser of that and the storage the client's own workspace plan still has, which no API exposes. A file inside this number can still come back as error 986. It is the only key in this map with that property.
3061
+ */
3056
3062
  max_file_size_mb: components["schemas"]["CatalogSocialLimitsMap"];
3057
3063
  /** @description Second text limit, in UTF-8 bytes. `0` means the network does not measure text in bytes; only Bluesky does, at 3.000. */
3058
3064
  max_post_bytes: components["schemas"]["CatalogSocialLimitsMap"];
3059
3065
  /** @description Maximum length of the title. `0` means the network has no title field at all. */
3060
3066
  title_characters: components["schemas"]["CatalogSocialLimitsMap"];
3061
- /** @description How many images one publication accepts. `0` means images are not a publication on that network. */
3067
+ /**
3068
+ * @description How many images one publication accepts. `0` means images are not a publication on that network.
3069
+ *
3070
+ * **On `discord`, `threads` and `slack` it counts images and videos together**, because there the carousel is one message carrying several attachments and not several publications: what is validated is the total number of files. Over it, the publication is created in state `withErrors` — on `slack` with `publication_errors[].code = 982`.
3071
+ */
3062
3072
  total_images: components["schemas"]["CatalogSocialLimitsMap"];
3063
3073
  /** @description Maximum video duration. A network that limits weight instead of duration is not here but in `max_file_size_mb`. */
3064
3074
  video_duration_in_seconds: components["schemas"]["CatalogSocialLimitsMap"];
@@ -3649,7 +3659,7 @@ interface components {
3649
3659
  * The catalogue grows with the product, so treat an unknown `code` as a generic failure instead of rejecting it.
3650
3660
  */
3651
3661
  Error: {
3652
- /** @description PlanVortex error code. Ranges: 500-546 auth, tokens and client apps · 601-612 user · 700-715 social accounts · 800-810 files · 900-979 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. */
3662
+ /** @description PlanVortex error code. Ranges: 500-546 auth, tokens and client apps · 601-612 user · 700-715 social accounts · 800-810 files · 900-986 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. */
3653
3663
  code: number;
3654
3664
  /** @description Extra context attached to the error, when there is any. */
3655
3665
  data?: {
@@ -4175,7 +4185,11 @@ interface components {
4175
4185
  };
4176
4186
  /** @description Body accepted when creating or updating a publication. Only these properties are read; anything else in the payload is ignored. */
4177
4187
  PublicationsPublicationInput: {
4178
- /** @description Identifiers of uploads previously created through the uploads endpoints, attached to this publication. */
4188
+ /**
4189
+ * @description Identifiers of uploads previously created through the uploads endpoints, attached to this publication.
4190
+ *
4191
+ * **On Slack the files travel inside the message**, not as publications of their own: up to 10 attachments counting images and videos together (`publication_errors[].code = 982` over it), each one under the `max_file_size_mb.slack` ceiling (code 983), and anything the upload itself refuses comes back as code 986.
4192
+ */
4179
4193
  files?: string[];
4180
4194
  /** @description Internal name for the publication. Useful for grouping; never shown on the social network. */
4181
4195
  name?: string;
@@ -4195,7 +4209,7 @@ interface components {
4195
4209
  * Not every connectable network publishes — a local business listing receives reviews, not posts — so this list is shorter than the one in `GET /social_networks`. Ask `GET /allowed_social_publications` rather than hardcoding it, because it grows.
4196
4210
  * @enum {string}
4197
4211
  */
4198
- social_network?: "facebook" | "instagram" | "twitter" | "linkedin" | "tiktok" | "whatsapp" | "youtube" | "bluesky" | "discord" | "telegram" | "threads";
4212
+ social_network?: "facebook" | "instagram" | "twitter" | "linkedin" | "tiktok" | "whatsapp" | "youtube" | "bluesky" | "discord" | "telegram" | "threads" | "slack";
4199
4213
  /**
4200
4214
  * @description Send `draft` to store the publication without publishing it. If omitted, the state is resolved automatically: `ready` when everything validates, `withErrors` otherwise. Forcing `sended` marks it as published without actually sending it.
4201
4215
  * @enum {string}
@@ -4205,6 +4219,8 @@ interface components {
4205
4219
  * @description Body text of the publication. Either `text` or at least one entry in `files` is required: if both are empty the publication is still created, but in state `withErrors` with `publication_errors[].code = 915`. Maximum length depends on the network. On YouTube this is the video **description** (5,000 characters), and the publication must carry exactly one video file and no images — otherwise it is created in state `withErrors` with `publication_errors[].code = 943`. For X (Twitter), a text containing a link costs 200 credits instead of 15.
4206
4220
  *
4207
4221
  * **On Telegram the limit depends on what else the publication carries**: 4.096 characters while it is text only, and **1.024** the moment it has an image or a video, because then the text is the caption of a photo, a video or an album and no longer a message. Over the limit it is created in state `withErrors` with `publication_errors[].code = 967`, whose `data` carries `characters`, `max_characters` and `has_media`. Both numbers are published, as `characters.telegram` and `characters.telegram_media` in `GET /social_limits`.
4222
+ *
4223
+ * **On Slack the limit is 4.000 characters** and it is counted over the text you send, not over what travels: `&`, `<` and `>` are escaped before publishing, so a text made of ampersands grows on the wire and is still measured here. Over the limit the publication is created in state `withErrors` with `publication_errors[].code = 981`. And because the escaped text is what is measured on the wire, a text that passed at 4.000 characters and is full of `&` is **trimmed** before going out — Slack does not reject a long `text`, it truncates it or splits it into several messages, and one publication showing up as two posts is worse. The text goes out **plain**: Slack speaks *mrkdwn* and not Markdown, and PlanVortex sends no `blocks`, so `**bold**` is published literally.
4208
4224
  */
4209
4225
  text?: string;
4210
4226
  /** @description Title for the publication. Only some networks use it: optional on LinkedIn, and **required on YouTube**, where it is the video title and must be 100 characters or fewer — a publication without it, or with a longer one, is created in state `withErrors` with `publication_errors[].code = 944`. */
@@ -4310,6 +4326,8 @@ interface components {
4310
4326
  * On `threads` there are six, and the one that matters is `views`: it is the only one of the four newest networks with something like impressions, so its engagement rate is computed over a real base and not over followers. Sharing arrives split in three — `reposts`, `quotes` and `shares` (outside Threads) — and the three are added into one figure, the same criterion as on X; the breakdown stays in `raw`. A reply is what every other network calls a comment.
4311
4327
  *
4312
4328
  * On `telegram` there are two as well, and **neither of them is asked for**: the Bot API has no method that returns a message's metrics, so `reactions` arrives on its own through the bot and `comments` is counted in PlanVortex's own inbox. There are no impressions, no reach, no views and no forwards to be had anywhere in it, so engagement is computed over followers.
4329
+ *
4330
+ * On `slack` there is exactly **one**, `reactions`, and the other absences are the informative part: the Web API publishes no impressions, no reach, no views and no clicks for a message, so those keys are missing rather than zero. There is no `comments` either — Slack threads are not read at all (`comments` is `false` in `GET /social_capabilities`). Engagement is computed over the channel's members.
4313
4331
  */
4314
4332
  PublicationStats: {
4315
4333
  angers?: number;
@@ -4340,7 +4358,7 @@ interface components {
4340
4358
  profile_visits?: number;
4341
4359
  quotes?: number;
4342
4360
  reach?: number;
4343
- /** @description Telegram. Every reaction on the post, all emoji together. It is the **complete state and not an increment**: it goes down when somebody takes theirs back. Normalised as `likes`. */
4361
+ /** @description Telegram and Slack. Every reaction on the post, all emoji together. It is the **complete state and not an increment**: it goes down when somebody takes theirs back. Normalised as `likes`. On `slack` it is the only metric the network gives. */
4344
4362
  reactions?: number;
4345
4363
  /** @description Telegram. The same total broken down by emoji. Reactions with a custom emoji are grouped under a single key: their identifier means nothing outside the server that created it. */
4346
4364
  reactions_by_emoji?: {
@@ -4394,7 +4412,7 @@ interface components {
4394
4412
  * **This list grows.** Treat it as an open enumeration: a client that rejects an unknown value breaks the day a network is added, which happens several times a year. Not every network does everything — ask `GET /social_capabilities`.
4395
4413
  * @enum {string}
4396
4414
  */
4397
- SocialNetwork: "facebook" | "instagram" | "linkedin" | "tiktok" | "twitter" | "whatsapp" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram" | "threads";
4415
+ SocialNetwork: "facebook" | "instagram" | "linkedin" | "tiktok" | "twitter" | "whatsapp" | "youtube" | "google_business" | "bluesky" | "discord" | "telegram" | "threads" | "slack";
4398
4416
  /** @description Statistics collection settings. Only `auto_refresh_twitter` is read; any other key is ignored. */
4399
4417
  StatsSettings: {
4400
4418
  /**
@@ -7172,11 +7190,11 @@ interface operations {
7172
7190
  };
7173
7191
  deleteMessageTemplate: {
7174
7192
  parameters: {
7175
- query?: {
7193
+ query: {
7176
7194
  /** @description Identifier of the template on the network. */
7177
- template_id?: string;
7195
+ template_id: string;
7178
7196
  /** @description Name of the template on the network. */
7179
- template_name?: string;
7197
+ template_name: string;
7180
7198
  };
7181
7199
  header?: never;
7182
7200
  path: {
@@ -10898,7 +10916,8 @@ interface operations {
10898
10916
  * "bluesky",
10899
10917
  * "discord",
10900
10918
  * "telegram",
10901
- * "threads"
10919
+ * "threads",
10920
+ * "slack"
10902
10921
  * ]
10903
10922
  */
10904
10923
  "application/json": components["schemas"]["SocialNetwork"][];
@@ -10980,9 +10999,9 @@ interface operations {
10980
10999
  * de una organizacion. Aqui se llama `PublicationInput`. Los que describen LO MISMO en varias
10981
11000
  * secciones viven en `common.json` y conservan su nombre —`Publication`, `Account`, `Upload`,
10982
11001
  * `Message`, `Contact`, `NormalizedMetrics`—: es lo que evita dos tipos para un solo objeto.
10983
- * 2. **Abre las enumeraciones que crecen** (§ trampa 8 del roadmap). `ALLOWED_RRSS` va por diez
11002
+ * 2. **Abre las enumeraciones que crecen** (§ trampa 8 del roadmap). `ALLOWED_RRSS` va por trece
10984
11003
  * redes y sube varias veces al ano. Si `social_network` fuera una union cerrada, el dia que
10985
- * entre la undecima **dejaria de compilar el codigo de todos los integradores** hasta que
11004
+ * entre la siguiente **dejaria de compilar el codigo de todos los integradores** hasta que
10986
11005
  * actualizasen el paquete, y lo unico que habria pasado es que la API devuelve un valor mas.
10987
11006
  * Con `T | (string & {})` se autocompletan las conocidas y una nueva sigue compilando.
10988
11007
  * 3. **Avisa de lo que el tipo no puede decir por si solo**, como que `public_path` caduca.
@@ -11061,8 +11080,9 @@ type FileFormat = OpenEnum<Schemas["Upload"]["file_format"]>;
11061
11080
  * Sobre que se divide el engagement de una publicacion.
11062
11081
  *
11063
11082
  * No todas las redes dan alcance, asi que se cae en cascada: `reach`, si no `impressions`, si no
11064
- * `followers` (que es lo unico que hay en Bluesky, en Discord y en Telegram — la Bot API no
11065
- * publica impresiones, ni alcance, ni siquiera las vistas de un post). **Dos filas con base
11083
+ * `followers` (que es lo unico que hay en Bluesky, en Discord, en Telegram y en Slack — ni la
11084
+ * Bot API ni la Web API publican impresiones, ni alcance, ni siquiera las vistas de un post).
11085
+ * **Dos filas con base
11066
11086
  * distinta no son comparables**: si las pones en la misma tabla, di cual es.
11067
11087
  */
11068
11088
  type EngagementBase = OpenEnum<NonNullable<Schemas["PublicationsPublicationStatsPoint"]["engagement_base"]>>;
@@ -11201,8 +11221,9 @@ type ClientWithOrganizations = Operations["getClientsWithOrganizations"]["respon
11201
11221
  /**
11202
11222
  * Una cuenta social conectada a una organizacion.
11203
11223
  *
11204
- * En Discord y en Telegram una cuenta es un **canal**, no un perfil: publicar en dos canales del
11205
- * mismo servidor —o en dos canales de la misma marca— gasta dos cuentas del plan. `error_code`
11224
+ * En Discord, en Telegram y en Slack una cuenta es un **canal**, no un perfil: publicar en dos
11225
+ * canales del mismo servidor —o en dos canales de la misma marca, o en `#anuncios` y `#general`
11226
+ * del mismo workspace— gasta dos cuentas del plan. `error_code`
11206
11227
  * distinto de 0 significa que la conexion se rompio —token caducado, permisos retirados— y hay que
11207
11228
  * reconectarla; en Telegram no caduca nada, porque no hay token de cuenta, y lo que la rompe es que
11208
11229
  * saquen al bot del canal o le quiten el permiso de publicar (error 968).
@@ -11253,7 +11274,7 @@ type ConnectToken = Operations["createTemporalConnectToken"]["responses"][200]["
11253
11274
  */
11254
11275
  type ConnectLink = Schemas["AccountsSocialLinksList"]["links"][number];
11255
11276
  /**
11256
- * Con que se autoriza una red: `redirect` (nueve de las once), `meta_embedded_signup` (WhatsApp) o
11277
+ * Con que se autoriza una red: `redirect` (once de las trece), `meta_embedded_signup` (WhatsApp) o
11257
11278
  * `telegram_bot` (Telegram). Se saca de {@link ConnectLink} y esta aqui para poder nombrarlo en un
11258
11279
  * `switch`.
11259
11280
  *
@@ -11870,8 +11891,9 @@ declare class AccountError extends PlanVortexError {
11870
11891
  /** 800-810 — ficheros: formato no admitido, demasiado grande, conversión fallida. */
11871
11892
  declare class FileError extends PlanVortexError {
11872
11893
  }
11873
- /** 900-979 — publicaciones, incluidos los límites por red (caracteres, imágenes, duración) y los
11874
- * dos frenos de ritmo: 978 (demasiado rápido en esta cuenta) y 979 (tope diario de esa red). */
11894
+ /** 900-986 — publicaciones, incluidos los límites por red (caracteres, imágenes, duración), los
11895
+ * dos frenos de ritmo —978 (demasiado rápido en esta cuenta) y 979 (tope diario de esa red)— y
11896
+ * los de Slack (980-986), que empiezan por el más común: 980, la app no está en el canal. */
11875
11897
  declare class PublicationError extends PlanVortexError {
11876
11898
  }
11877
11899
  /** 1100-1111 — organizaciones, y el token temporal atado a una sola de ellas (1101). */
package/dist/index.cjs CHANGED
@@ -4,7 +4,7 @@ var path = require('path');
4
4
 
5
5
  // src/version.ts
6
6
  var PLANVORTEX_API_URL = "https://api.planvortex.com/v1.0.0";
7
- var VERSION = "0.9.0";
7
+ var VERSION = "0.10.0";
8
8
 
9
9
  // src/core/errors.ts
10
10
  var PLANVORTEX_ERROR_RANGES = [
@@ -17,8 +17,8 @@ var PLANVORTEX_ERROR_RANGES = [
17
17
  //El techo sube con el catalogo del servidor, y subir tarde no da un error: da un consejo
18
18
  //equivocado. Los codigos de Bluesky, Discord, Telegram y Threads (961-977) y los dos frenos
19
19
  //de ritmo de la fase de publicaciones ilimitadas (978, 979) nacieron por encima de 960 y
20
- //caian fuera de toda familia.
21
- { from: 900, to: 979, family: "publication" },
20
+ //caian fuera de toda familia. Slack estreno el 980-986, que es el mismo caso otra vez.
21
+ { from: 900, to: 986, family: "publication" },
22
22
  { from: 1e3, to: 1003, family: "general" },
23
23
  { from: 1100, to: 1111, family: "organization" },
24
24
  { from: 1200, to: 1207, family: "role" },
@@ -616,7 +616,7 @@ var AccountsResource = class extends Resource {
616
616
  * no un fallo: es lo que pasa con Discord en una organización que todavía no ha guardado sus
617
617
  * propias credenciales de bot.
618
618
  *
619
- * **MIRA `authorization`, NO si `link` está vacío.** Diez de las doce redes son `redirect` y se
619
+ * **MIRA `authorization`, NO si `link` está vacío.** Once de las trece redes son `redirect` y se
620
620
  * manda a la persona a `link`. Las otras dos no, y ninguna de las dos falla de forma visible si
621
621
  * se recorre la lista redirigiendo a `link`:
622
622
  *
@@ -686,6 +686,13 @@ var AccountsResource = class extends Resource {
686
686
  * **Es el paso que ocupa plaza del plan**: con el cupo lleno contesta 706, así que se llama una
687
687
  * a una y se mira el hueco antes (`organizations.limits`). Y es también el que enciende los
688
688
  * webhooks de la red, en cualquier plan que no sea el gratuito.
689
+ *
690
+ * **En Slack es además lo que mete la app dentro del canal**, y ahí hay un caso que no da
691
+ * error aquí y sí en la primera publicación: en un canal **público** la app entra sola, y en
692
+ * uno **privado** no puede —Slack no tiene API para eso— y hace falta que una persona escriba
693
+ * `/invite @PlanVortex` dentro del canal. Esta llamada devuelve bien igual y la cuenta queda
694
+ * conectada; lo que falla es publicar, con el error 980. Avísalo **antes** de que elijan el
695
+ * canal, no después.
689
696
  */
690
697
  async enable(idOrganization, idAccount, options = {}) {
691
698
  const body = await this.httpPost(