planvortex 0.14.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as Paginated, S as SocialNetwork, C as ConnectLink, a as ConnectResult, E as EnableResult, b as ConnectSession, A as Account, c as AccountMetrics, D as Destination, d as PersistentMenu, e as Dashboard, M as MetricName, f as DashboardMetricsResult, g as PublicationsSummaryResult, T as TopPublicationsResult, h as PublicationsStatsResult, i as PlanUse, j as Publication, k as AiPlanResultsSort, l as PlannerTemplateName, m as AiPlanCreateRequest, n as AiPlanCreateResult, o as AiPlan, p as AiPlanResults, q as ClientApp, r as ClientAppInput, s as SocialCapabilities, t as CommentActions, u as SocialLimits, v as PublicationLimits, w as AspectRatiosByNetwork, x as PlannerTemplate, y as CommentNetwork, z as Comment, B as CommentThread, F as CommentReplyResult, G as ContactExtraData, H as Contact, I as ContactCreate, J as ContactUpdate, K as IntegrationProviderName, L as IntegrationProvider, N as Integration, O as IntegrationConnectRequest, Q as IntegrationUpdate, R as IntegrationPickerConfig, U as IntegrationCatalogPage, V as MessageTemplate, W as Conversation, X as ConversationTotals, Y as Message, Z as MessageInput, _ as Client, $ as Organization, a0 as AiSettings, a1 as ClientWithOrganizations, a2 as AccountSelection, a3 as PlanData, a4 as PlanUseData, a5 as ConnectToken, a6 as AiContext, a7 as SocialCredentialsInput, a8 as Product, a9 as ProductInput, aa as ProductCatalog, ab as ProductCatalogInput, ac as PublicationInput, ad as PublicationState, ae as PublicationStats, af as PublicationStatsHistory, ag as Upload } from './index-C6-SJxzP.cjs';
2
- export { ah as AccountError, ai as AccountMetricRow, aj as AccountStateChange, ak as AccountWebhookChangeBase, al as AccountWithError, am as AiImageOrigin, an as AiPlanCostEstimate, ao as AiPlanDestination, ap as AiPlanError, aq as AiPlanNotice, ar as AiPlanOptions, as as AiPlanOptionsInput, at as AiPlanResult, au as AiPlanResultsGroup, av as AiPlanResultsTemplateGroup, aw as AiPlanSource, ax as AiPlanSourceImageInput, ay as AiPlanSourceInput, az as AiPlanSourceProduct, aA as AiPlanState, aB as ApiErrorBody, aC as AspectRatios, aD as AuthError, aE as ClientPlan, aF as CommentAuthor, aG as CommentChange, aH as ConnectSessionAccount, aI as ContactChannel, aJ as ContactError, aK as DashboardAiPlanRef, aL as DashboardPublicationRef, aM as DashboardRange, aN as EngagementBase, aO as FileError, aP as FileFormat, aQ as FileProperties, aR as FileType, aS as IntegrationCatalogProduct, aT as IntegrationConfig, aU as IntegrationError, aV as IntegrationErrorChange, aW as IntegrationFormField, aX as MessageChange, aY as MessageOptions, aZ as MessageType, a_ as MessagingError, a$ as MetricRow, b0 as NO_ERROR_CODE, b1 as OpenApiComponents, b2 as OpenApiOperations, b3 as OpenApiPaths, b4 as OpenApiWebhooks, b5 as OpenEnum, b6 as OrganizationError, b7 as PLANVORTEX_ERROR_RANGES, b8 as PlanLimitError, b9 as PlanVortexAuthenticationError, ba as PlanVortexConfigError, bb as PlanVortexConnectionError, bc as PlanVortexError, bd as PlanVortexErrorOptions, be as PlanVortexErrorRange, bf as PlannerTemplateField, bg as PlannerTemplateFieldType, bh as ProductError, bi as PublicationAiGenerated, bj as PublicationDestination, bk as PublicationError, bl as PublicationErrorDetail, bm as PublicationMetrics, bn as PublicationStatsPoint, bo as PublicationType, bp as PublicationsSummary, bq as RssConfig, br as SocialAuthorizationMethod, bs as SocialCredentials, bt as SocialIdentifier, bu as SocialIdentifierInput, bv as SocialLimitsMap, bw as TOKEN_ERROR_CODES, bx as TopPublication, by as UnknownWebhookChange, bz as UserError, bA as WebhookAlgorithm, bB as WebhookChange, bC as WebhookEvent, bD as WithAccount, bE as WithPublication, bF as WooCommerceConnectRequest, bG as account, bH as accountId, bI as errorFamilyForCode, bJ as isPlanVortexError, bK as isTokenError, bL as messageContact, bM as messageContactId, bN as messageDirection, bO as messageFileIds, bP as messageFiles, bQ as publication, bR as publicationId } from './index-C6-SJxzP.cjs';
1
+ import { P as Paginated, S as SocialNetwork, C as ConnectLink, a as ConnectResult, E as EnableResult, b as ConnectSession, A as Account, c as AccountMetrics, D as Destination, d as PersistentMenu, e as Dashboard, M as MetricName, f as DashboardMetricsResult, g as PublicationsSummaryResult, T as TopPublicationsResult, h as PublicationsStatsResult, i as PlanUse, j as Publication, k as AiPlanResultsSort, l as PlannerTemplateName, m as AiPlanCreateRequest, n as AiPlanCreateResult, o as AiPlan, p as AiPlanResults, q as ClientApp, r as ClientAppInput, s as SocialCapabilities, t as CommentActions, u as SocialLimits, v as PublicationLimits, w as AspectRatiosByNetwork, x as PlannerTemplate, y as CommentNetwork, z as Comment, B as CommentThread, F as CommentReplyResult, G as ContactExtraData, H as Contact, I as ContactCreate, J as ContactUpdate, K as IntegrationProviderName, L as IntegrationProvider, N as Integration, O as IntegrationConnectRequest, Q as IntegrationUpdate, R as IntegrationPickerConfig, U as IntegrationCatalogPage, V as MessageTemplate, W as Conversation, X as ConversationTotals, Y as Message, Z as MessageInput, _ as Client, $ as Organization, a0 as AiSettings, a1 as ClientWithOrganizations, a2 as AccountSelection, a3 as PlanData, a4 as PlanUseData, a5 as ConnectToken, a6 as AiContext, a7 as SocialCredentialsInput, a8 as Product, a9 as ProductInput, aa as ProductCatalog, ab as ProductCatalogInput, ac as PublicationInput, ad as PublicationState, ae as PublicationStats, af as PublicationStatsHistory, ag as Upload } from './index-DgRGeYRl.cjs';
2
+ export { ah as AccountError, ai as AccountMetricRow, aj as AccountStateChange, ak as AccountWebhookChangeBase, al as AccountWithError, am as AiImageOrigin, an as AiPlanCostEstimate, ao as AiPlanDestination, ap as AiPlanError, aq as AiPlanNotice, ar as AiPlanOptions, as as AiPlanOptionsInput, at as AiPlanResult, au as AiPlanResultsGroup, av as AiPlanResultsTemplateGroup, aw as AiPlanSource, ax as AiPlanSourceImageInput, ay as AiPlanSourceInput, az as AiPlanSourceProduct, aA as AiPlanState, aB as ApiErrorBody, aC as AspectRatios, aD as AuthError, aE as ClientPlan, aF as CommentAuthor, aG as CommentChange, aH as ConnectSessionAccount, aI as ContactChannel, aJ as ContactError, aK as DashboardAiPlanRef, aL as DashboardPublicationRef, aM as DashboardRange, aN as EngagementBase, aO as FileError, aP as FileFormat, aQ as FileProperties, aR as FileType, aS as IntegrationCatalogProduct, aT as IntegrationConfig, aU as IntegrationError, aV as IntegrationErrorChange, aW as IntegrationFormField, aX as MessageChange, aY as MessageOptions, aZ as MessageType, a_ as MessagingError, a$ as MetricRow, b0 as NO_ERROR_CODE, b1 as OpenApiComponents, b2 as OpenApiOperations, b3 as OpenApiPaths, b4 as OpenApiWebhooks, b5 as OpenEnum, b6 as OrganizationError, b7 as PLANVORTEX_ERROR_RANGES, b8 as PlanLimitError, b9 as PlanVortexAuthenticationError, ba as PlanVortexConfigError, bb as PlanVortexConnectionError, bc as PlanVortexError, bd as PlanVortexErrorOptions, be as PlanVortexErrorRange, bf as PlannerTemplateField, bg as PlannerTemplateFieldType, bh as ProductError, bi as PublicationAiGenerated, bj as PublicationDestination, bk as PublicationError, bl as PublicationErrorDetail, bm as PublicationMetrics, bn as PublicationPending, bo as PublicationStatsPoint, bp as PublicationType, bq as PublicationsSummary, br as RssConfig, bs as SocialAuthorizationMethod, bt as SocialCredentials, bu as SocialIdentifier, bv as SocialIdentifierInput, bw as SocialLimitsMap, bx as TOKEN_ERROR_CODES, by as TopPublication, bz as UnknownWebhookChange, bA as UserError, bB as WebhookAlgorithm, bC as WebhookChange, bD as WebhookEvent, bE as WithAccount, bF as WithPublication, bG as WooCommerceConnectRequest, bH as account, bI as accountId, bJ as errorFamilyForCode, bK as isPlanVortexError, bL as isTokenError, bM as messageContact, bN as messageContactId, bO as messageDirection, bP as messageFileIds, bQ as messageFiles, bR as publication, bS as publicationId } from './index-DgRGeYRl.cjs';
3
3
 
4
4
  /**
5
5
  * Las dos constantes que todo lo demás necesita. Viven aparte de `index.ts` para que `client.ts`
@@ -15,7 +15,7 @@ declare const PLANVORTEX_API_URL = "https://api.planvortex.com/v1.0.0";
15
15
  * de ejecución obliga a empaquetarlo y se rompe distinto en ESM y en CJS. La mantiene sincronizada
16
16
  * un test.
17
17
  */
18
- declare const VERSION = "0.14.0";
18
+ declare const VERSION = "0.16.0";
19
19
 
20
20
  /** `fetch` con la firma que usamos. Se puede sustituir en tests o para meter un proxy. */
21
21
  type FetchLike = (input: string, init: RequestInit) => Promise<Response>;
@@ -179,7 +179,10 @@ interface AccountListOptions extends PageOptions {
179
179
  social_network?: readonly SocialNetwork[] | undefined;
180
180
  /** Sólo estas cuentas, por identificador. */
181
181
  accounts?: readonly string[] | undefined;
182
- /** Sólo las cuentas cuya red sabe hacer esto. */
182
+ /**
183
+ * Sólo las cuentas cuya red sabe hacer esto. `comments` mira además la cuenta: deja fuera los
184
+ * perfiles personales de LinkedIn, que no tienen bandeja aunque las páginas sí.
185
+ */
183
186
  capability?: AccountCapability | undefined;
184
187
  }
185
188
  interface AccountMetricsOptions extends RequestOptions {
@@ -512,8 +515,9 @@ declare class DashboardResource extends Resource {
512
515
  * Y LO QUE SORPRENDE:
513
516
  *
514
517
  * - **`create()` no genera nada**: encola el plan y devuelve el presupuesto. La generación la hace
515
- * un job aparte, así que hay que sondear {@link AiPlansResource.get} mientras el estado sea
516
- * `pending` o `generating`. Puede tardar minutos.
518
+ * un job aparte y puede tardar minutos. Cuando termina, el `webhook_url` de tu app recibe
519
+ * `ai_plan_generated` o `ai_plan_failed` (`isAiPlanChange` de `planvortex/webhooks`); sin
520
+ * webhook, sondea {@link AiPlansResource.get} mientras el estado sea `pending` o `generating`.
517
521
  * - **Lo generado son publicaciones NORMALES en estado `draft`.** Se editan y se borran con
518
522
  * `pv.publications`, no con nada de aquí. Validar es lo que las pasa a `ready`.
519
523
  * - **Se paga en créditos de IA y el precio se sabe ANTES.** El presupuesto lo calcula el
@@ -653,8 +657,9 @@ declare class AiPlansResource extends Resource {
653
657
  /**
654
658
  * Un plan, con sus publicaciones **ya resueltas** y con los ficheros de cada una.
655
659
  *
656
- * Es el endpoint que se sondea mientras `state` sea `pending` o `generating`. No hay webhook de
657
- * esto todavía.
660
+ * Léelo cuando a tu app le llegue `ai_plan_generated` o `ai_plan_failed`. Sin webhook, es el
661
+ * endpoint que se sondea mientras `state` sea `pending` o `generating`. El webhook no se
662
+ * reintenta: si tu endpoint estaba caído cuando el plan terminó, esto sigue diciendo cómo acabó.
658
663
  */
659
664
  get(idClient: string, idOrganization: string, idAiPlan: string, options?: RequestOptions): Promise<AiPlan>;
660
665
  /**
@@ -709,8 +714,8 @@ declare class AiPlansResource extends Resource {
709
714
  */
710
715
  validate(idClient: string, idOrganization: string, idAiPlan: string, options?: RequestOptions): Promise<AiPlan>;
711
716
  /**
712
- * Vuelve a encolar un plan `failed` con los mismos datos. El estado regresa a `pending` y hay
713
- * que volver a sondear.
717
+ * Vuelve a encolar un plan `failed` con los mismos datos. El estado regresa a `pending` y el
718
+ * final vuelve a llegar como tras `create()`: por webhook, o sondeando.
714
719
  *
715
720
  * Usa el contexto de marca copiado al crear el plan, no el actual: el plan es reproducible
716
721
  * aunque alguien haya editado la configuración entretanto.
@@ -970,6 +975,11 @@ declare class CatalogResource extends Resource {
970
975
  * CommentsResource.actions}: Instagram, X y Bluesky no dejan borrar el comentario de otro,
971
976
  * LinkedIn no tiene "ocultar" —ni Discord ni Telegram tampoco— y Google Business sólo deja
972
977
  * borrar **nuestra propia** respuesta.
978
+ * - **Ni todas las CUENTAS.** Un perfil personal de LinkedIn publica pero no tiene bandeja:
979
+ * LinkedIn no deja a ninguna app leer los comentarios de un perfil, sólo los de una página. Ahí
980
+ * todo lo de este recurso devuelve el error 2600. Míralo antes en
981
+ * `account.extra_data?.is_personal_profile`, o pide las cuentas con `capability: "comments"`,
982
+ * que ya los deja fuera.
973
983
  * - **En Telegram la bandeja empieza el día que se conectó el canal.** La Bot API no sabe leer el
974
984
  * pasado: un bot sólo se entera de lo que pasa mientras está dentro, así que nada anterior a la
975
985
  * conexión existe aquí y nunca existirá. Dilo en tu interfaz — una bandeja que abre vacía en un
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as Paginated, S as SocialNetwork, C as ConnectLink, a as ConnectResult, E as EnableResult, b as ConnectSession, A as Account, c as AccountMetrics, D as Destination, d as PersistentMenu, e as Dashboard, M as MetricName, f as DashboardMetricsResult, g as PublicationsSummaryResult, T as TopPublicationsResult, h as PublicationsStatsResult, i as PlanUse, j as Publication, k as AiPlanResultsSort, l as PlannerTemplateName, m as AiPlanCreateRequest, n as AiPlanCreateResult, o as AiPlan, p as AiPlanResults, q as ClientApp, r as ClientAppInput, s as SocialCapabilities, t as CommentActions, u as SocialLimits, v as PublicationLimits, w as AspectRatiosByNetwork, x as PlannerTemplate, y as CommentNetwork, z as Comment, B as CommentThread, F as CommentReplyResult, G as ContactExtraData, H as Contact, I as ContactCreate, J as ContactUpdate, K as IntegrationProviderName, L as IntegrationProvider, N as Integration, O as IntegrationConnectRequest, Q as IntegrationUpdate, R as IntegrationPickerConfig, U as IntegrationCatalogPage, V as MessageTemplate, W as Conversation, X as ConversationTotals, Y as Message, Z as MessageInput, _ as Client, $ as Organization, a0 as AiSettings, a1 as ClientWithOrganizations, a2 as AccountSelection, a3 as PlanData, a4 as PlanUseData, a5 as ConnectToken, a6 as AiContext, a7 as SocialCredentialsInput, a8 as Product, a9 as ProductInput, aa as ProductCatalog, ab as ProductCatalogInput, ac as PublicationInput, ad as PublicationState, ae as PublicationStats, af as PublicationStatsHistory, ag as Upload } from './index-C6-SJxzP.js';
2
- export { ah as AccountError, ai as AccountMetricRow, aj as AccountStateChange, ak as AccountWebhookChangeBase, al as AccountWithError, am as AiImageOrigin, an as AiPlanCostEstimate, ao as AiPlanDestination, ap as AiPlanError, aq as AiPlanNotice, ar as AiPlanOptions, as as AiPlanOptionsInput, at as AiPlanResult, au as AiPlanResultsGroup, av as AiPlanResultsTemplateGroup, aw as AiPlanSource, ax as AiPlanSourceImageInput, ay as AiPlanSourceInput, az as AiPlanSourceProduct, aA as AiPlanState, aB as ApiErrorBody, aC as AspectRatios, aD as AuthError, aE as ClientPlan, aF as CommentAuthor, aG as CommentChange, aH as ConnectSessionAccount, aI as ContactChannel, aJ as ContactError, aK as DashboardAiPlanRef, aL as DashboardPublicationRef, aM as DashboardRange, aN as EngagementBase, aO as FileError, aP as FileFormat, aQ as FileProperties, aR as FileType, aS as IntegrationCatalogProduct, aT as IntegrationConfig, aU as IntegrationError, aV as IntegrationErrorChange, aW as IntegrationFormField, aX as MessageChange, aY as MessageOptions, aZ as MessageType, a_ as MessagingError, a$ as MetricRow, b0 as NO_ERROR_CODE, b1 as OpenApiComponents, b2 as OpenApiOperations, b3 as OpenApiPaths, b4 as OpenApiWebhooks, b5 as OpenEnum, b6 as OrganizationError, b7 as PLANVORTEX_ERROR_RANGES, b8 as PlanLimitError, b9 as PlanVortexAuthenticationError, ba as PlanVortexConfigError, bb as PlanVortexConnectionError, bc as PlanVortexError, bd as PlanVortexErrorOptions, be as PlanVortexErrorRange, bf as PlannerTemplateField, bg as PlannerTemplateFieldType, bh as ProductError, bi as PublicationAiGenerated, bj as PublicationDestination, bk as PublicationError, bl as PublicationErrorDetail, bm as PublicationMetrics, bn as PublicationStatsPoint, bo as PublicationType, bp as PublicationsSummary, bq as RssConfig, br as SocialAuthorizationMethod, bs as SocialCredentials, bt as SocialIdentifier, bu as SocialIdentifierInput, bv as SocialLimitsMap, bw as TOKEN_ERROR_CODES, bx as TopPublication, by as UnknownWebhookChange, bz as UserError, bA as WebhookAlgorithm, bB as WebhookChange, bC as WebhookEvent, bD as WithAccount, bE as WithPublication, bF as WooCommerceConnectRequest, bG as account, bH as accountId, bI as errorFamilyForCode, bJ as isPlanVortexError, bK as isTokenError, bL as messageContact, bM as messageContactId, bN as messageDirection, bO as messageFileIds, bP as messageFiles, bQ as publication, bR as publicationId } from './index-C6-SJxzP.js';
1
+ import { P as Paginated, S as SocialNetwork, C as ConnectLink, a as ConnectResult, E as EnableResult, b as ConnectSession, A as Account, c as AccountMetrics, D as Destination, d as PersistentMenu, e as Dashboard, M as MetricName, f as DashboardMetricsResult, g as PublicationsSummaryResult, T as TopPublicationsResult, h as PublicationsStatsResult, i as PlanUse, j as Publication, k as AiPlanResultsSort, l as PlannerTemplateName, m as AiPlanCreateRequest, n as AiPlanCreateResult, o as AiPlan, p as AiPlanResults, q as ClientApp, r as ClientAppInput, s as SocialCapabilities, t as CommentActions, u as SocialLimits, v as PublicationLimits, w as AspectRatiosByNetwork, x as PlannerTemplate, y as CommentNetwork, z as Comment, B as CommentThread, F as CommentReplyResult, G as ContactExtraData, H as Contact, I as ContactCreate, J as ContactUpdate, K as IntegrationProviderName, L as IntegrationProvider, N as Integration, O as IntegrationConnectRequest, Q as IntegrationUpdate, R as IntegrationPickerConfig, U as IntegrationCatalogPage, V as MessageTemplate, W as Conversation, X as ConversationTotals, Y as Message, Z as MessageInput, _ as Client, $ as Organization, a0 as AiSettings, a1 as ClientWithOrganizations, a2 as AccountSelection, a3 as PlanData, a4 as PlanUseData, a5 as ConnectToken, a6 as AiContext, a7 as SocialCredentialsInput, a8 as Product, a9 as ProductInput, aa as ProductCatalog, ab as ProductCatalogInput, ac as PublicationInput, ad as PublicationState, ae as PublicationStats, af as PublicationStatsHistory, ag as Upload } from './index-DgRGeYRl.js';
2
+ export { ah as AccountError, ai as AccountMetricRow, aj as AccountStateChange, ak as AccountWebhookChangeBase, al as AccountWithError, am as AiImageOrigin, an as AiPlanCostEstimate, ao as AiPlanDestination, ap as AiPlanError, aq as AiPlanNotice, ar as AiPlanOptions, as as AiPlanOptionsInput, at as AiPlanResult, au as AiPlanResultsGroup, av as AiPlanResultsTemplateGroup, aw as AiPlanSource, ax as AiPlanSourceImageInput, ay as AiPlanSourceInput, az as AiPlanSourceProduct, aA as AiPlanState, aB as ApiErrorBody, aC as AspectRatios, aD as AuthError, aE as ClientPlan, aF as CommentAuthor, aG as CommentChange, aH as ConnectSessionAccount, aI as ContactChannel, aJ as ContactError, aK as DashboardAiPlanRef, aL as DashboardPublicationRef, aM as DashboardRange, aN as EngagementBase, aO as FileError, aP as FileFormat, aQ as FileProperties, aR as FileType, aS as IntegrationCatalogProduct, aT as IntegrationConfig, aU as IntegrationError, aV as IntegrationErrorChange, aW as IntegrationFormField, aX as MessageChange, aY as MessageOptions, aZ as MessageType, a_ as MessagingError, a$ as MetricRow, b0 as NO_ERROR_CODE, b1 as OpenApiComponents, b2 as OpenApiOperations, b3 as OpenApiPaths, b4 as OpenApiWebhooks, b5 as OpenEnum, b6 as OrganizationError, b7 as PLANVORTEX_ERROR_RANGES, b8 as PlanLimitError, b9 as PlanVortexAuthenticationError, ba as PlanVortexConfigError, bb as PlanVortexConnectionError, bc as PlanVortexError, bd as PlanVortexErrorOptions, be as PlanVortexErrorRange, bf as PlannerTemplateField, bg as PlannerTemplateFieldType, bh as ProductError, bi as PublicationAiGenerated, bj as PublicationDestination, bk as PublicationError, bl as PublicationErrorDetail, bm as PublicationMetrics, bn as PublicationPending, bo as PublicationStatsPoint, bp as PublicationType, bq as PublicationsSummary, br as RssConfig, bs as SocialAuthorizationMethod, bt as SocialCredentials, bu as SocialIdentifier, bv as SocialIdentifierInput, bw as SocialLimitsMap, bx as TOKEN_ERROR_CODES, by as TopPublication, bz as UnknownWebhookChange, bA as UserError, bB as WebhookAlgorithm, bC as WebhookChange, bD as WebhookEvent, bE as WithAccount, bF as WithPublication, bG as WooCommerceConnectRequest, bH as account, bI as accountId, bJ as errorFamilyForCode, bK as isPlanVortexError, bL as isTokenError, bM as messageContact, bN as messageContactId, bO as messageDirection, bP as messageFileIds, bQ as messageFiles, bR as publication, bS as publicationId } from './index-DgRGeYRl.js';
3
3
 
4
4
  /**
5
5
  * Las dos constantes que todo lo demás necesita. Viven aparte de `index.ts` para que `client.ts`
@@ -15,7 +15,7 @@ declare const PLANVORTEX_API_URL = "https://api.planvortex.com/v1.0.0";
15
15
  * de ejecución obliga a empaquetarlo y se rompe distinto en ESM y en CJS. La mantiene sincronizada
16
16
  * un test.
17
17
  */
18
- declare const VERSION = "0.14.0";
18
+ declare const VERSION = "0.16.0";
19
19
 
20
20
  /** `fetch` con la firma que usamos. Se puede sustituir en tests o para meter un proxy. */
21
21
  type FetchLike = (input: string, init: RequestInit) => Promise<Response>;
@@ -179,7 +179,10 @@ interface AccountListOptions extends PageOptions {
179
179
  social_network?: readonly SocialNetwork[] | undefined;
180
180
  /** Sólo estas cuentas, por identificador. */
181
181
  accounts?: readonly string[] | undefined;
182
- /** Sólo las cuentas cuya red sabe hacer esto. */
182
+ /**
183
+ * Sólo las cuentas cuya red sabe hacer esto. `comments` mira además la cuenta: deja fuera los
184
+ * perfiles personales de LinkedIn, que no tienen bandeja aunque las páginas sí.
185
+ */
183
186
  capability?: AccountCapability | undefined;
184
187
  }
185
188
  interface AccountMetricsOptions extends RequestOptions {
@@ -512,8 +515,9 @@ declare class DashboardResource extends Resource {
512
515
  * Y LO QUE SORPRENDE:
513
516
  *
514
517
  * - **`create()` no genera nada**: encola el plan y devuelve el presupuesto. La generación la hace
515
- * un job aparte, así que hay que sondear {@link AiPlansResource.get} mientras el estado sea
516
- * `pending` o `generating`. Puede tardar minutos.
518
+ * un job aparte y puede tardar minutos. Cuando termina, el `webhook_url` de tu app recibe
519
+ * `ai_plan_generated` o `ai_plan_failed` (`isAiPlanChange` de `planvortex/webhooks`); sin
520
+ * webhook, sondea {@link AiPlansResource.get} mientras el estado sea `pending` o `generating`.
517
521
  * - **Lo generado son publicaciones NORMALES en estado `draft`.** Se editan y se borran con
518
522
  * `pv.publications`, no con nada de aquí. Validar es lo que las pasa a `ready`.
519
523
  * - **Se paga en créditos de IA y el precio se sabe ANTES.** El presupuesto lo calcula el
@@ -653,8 +657,9 @@ declare class AiPlansResource extends Resource {
653
657
  /**
654
658
  * Un plan, con sus publicaciones **ya resueltas** y con los ficheros de cada una.
655
659
  *
656
- * Es el endpoint que se sondea mientras `state` sea `pending` o `generating`. No hay webhook de
657
- * esto todavía.
660
+ * Léelo cuando a tu app le llegue `ai_plan_generated` o `ai_plan_failed`. Sin webhook, es el
661
+ * endpoint que se sondea mientras `state` sea `pending` o `generating`. El webhook no se
662
+ * reintenta: si tu endpoint estaba caído cuando el plan terminó, esto sigue diciendo cómo acabó.
658
663
  */
659
664
  get(idClient: string, idOrganization: string, idAiPlan: string, options?: RequestOptions): Promise<AiPlan>;
660
665
  /**
@@ -709,8 +714,8 @@ declare class AiPlansResource extends Resource {
709
714
  */
710
715
  validate(idClient: string, idOrganization: string, idAiPlan: string, options?: RequestOptions): Promise<AiPlan>;
711
716
  /**
712
- * Vuelve a encolar un plan `failed` con los mismos datos. El estado regresa a `pending` y hay
713
- * que volver a sondear.
717
+ * Vuelve a encolar un plan `failed` con los mismos datos. El estado regresa a `pending` y el
718
+ * final vuelve a llegar como tras `create()`: por webhook, o sondeando.
714
719
  *
715
720
  * Usa el contexto de marca copiado al crear el plan, no el actual: el plan es reproducible
716
721
  * aunque alguien haya editado la configuración entretanto.
@@ -970,6 +975,11 @@ declare class CatalogResource extends Resource {
970
975
  * CommentsResource.actions}: Instagram, X y Bluesky no dejan borrar el comentario de otro,
971
976
  * LinkedIn no tiene "ocultar" —ni Discord ni Telegram tampoco— y Google Business sólo deja
972
977
  * borrar **nuestra propia** respuesta.
978
+ * - **Ni todas las CUENTAS.** Un perfil personal de LinkedIn publica pero no tiene bandeja:
979
+ * LinkedIn no deja a ninguna app leer los comentarios de un perfil, sólo los de una página. Ahí
980
+ * todo lo de este recurso devuelve el error 2600. Míralo antes en
981
+ * `account.extra_data?.is_personal_profile`, o pide las cuentas con `capability: "comments"`,
982
+ * que ya los deja fuera.
973
983
  * - **En Telegram la bandeja empieza el día que se conectó el canal.** La Bot API no sabe leer el
974
984
  * pasado: un bot sólo se entera de lo que pasa mientras está dentro, así que nada anterior a la
975
985
  * conexión existe aquí y nunca existirá. Dilo en tu interfaz — una bandeja que abre vacía en un
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { createErrorFromResponse, NO_ERROR_CODE, PlanVortexError, PlanVortexConfigError, isTokenError, PlanVortexConnectionError, PlanVortexAuthenticationError, isPlanVortexError } from './chunk-4EPTOW4H.js';
2
- 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, errorFamilyForCode, isPlanVortexError, isTokenError } from './chunk-4EPTOW4H.js';
1
+ import { createErrorFromResponse, NO_ERROR_CODE, PlanVortexError, PlanVortexConfigError, isTokenError, PlanVortexConnectionError, PlanVortexAuthenticationError, isPlanVortexError } from './chunk-CXCJAVXQ.js';
2
+ 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, errorFamilyForCode, isPlanVortexError, isTokenError } from './chunk-CXCJAVXQ.js';
3
3
  import { basename } from '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.14.0";
7
+ var VERSION = "0.16.0";
8
8
 
9
9
  // src/core/auth.ts
10
10
  var TOKEN_REFRESH_MARGIN_MS = 6e4;
@@ -796,8 +796,9 @@ var AiPlansResource = class extends Resource {
796
796
  /**
797
797
  * Un plan, con sus publicaciones **ya resueltas** y con los ficheros de cada una.
798
798
  *
799
- * Es el endpoint que se sondea mientras `state` sea `pending` o `generating`. No hay webhook de
800
- * esto todavía.
799
+ * Léelo cuando a tu app le llegue `ai_plan_generated` o `ai_plan_failed`. Sin webhook, es el
800
+ * endpoint que se sondea mientras `state` sea `pending` o `generating`. El webhook no se
801
+ * reintenta: si tu endpoint estaba caído cuando el plan terminó, esto sigue diciendo cómo acabó.
801
802
  */
802
803
  async get(idClient, idOrganization, idAiPlan, options = {}) {
803
804
  return this.getOne(
@@ -898,8 +899,8 @@ var AiPlansResource = class extends Resource {
898
899
  );
899
900
  }
900
901
  /**
901
- * Vuelve a encolar un plan `failed` con los mismos datos. El estado regresa a `pending` y hay
902
- * que volver a sondear.
902
+ * Vuelve a encolar un plan `failed` con los mismos datos. El estado regresa a `pending` y el
903
+ * final vuelve a llegar como tras `create()`: por webhook, o sondeando.
903
904
  *
904
905
  * Usa el contexto de marca copiado al crear el plan, no el actual: el plan es reproducible
905
906
  * aunque alguien haya editado la configuración entretanto.