planvortex 0.21.0 → 0.22.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 PublishSettings, e as PersistentMenu, f as Dashboard, M as MetricName, g as DashboardMetricsResult, h as PublicationsSummaryResult, T as TopPublicationsResult, i as PublicationsStatsResult, j as PlanUse, k as Publication, l as AiPlanResultsSort, m as PlannerTemplateName, n as AiPlanCreateRequest, o as AiPlanCreateResult, p as AiPlan, q as AiPlanResults, r as ClientApp, s as ClientAppInput, t as SocialCapabilities, u as CommentActions, v as SocialLimits, w as PublicationLimits, x as AspectRatiosByNetwork, y as PlannerTemplate, z as CommentNetwork, B as Comment, F as CommentThread, G as CommentReplyResult, H as ContactExtraData, I as Contact, J as ContactCreate, K as ContactUpdate, L as IntegrationProviderName, N as IntegrationProvider, O as Integration, Q as IntegrationConnectRequest, R as IntegrationUpdate, U as IntegrationPickerConfig, V as IntegrationCatalogPage, W as MessageTemplate, X as Conversation, Y as ConversationTotals, Z as Message, _ as MessageInput, $ as Client, a0 as Organization, a1 as AiSettings, a2 as ClientWithOrganizations, a3 as AccountSelection, a4 as PlanData, a5 as PlanUseData, a6 as ConnectToken, a7 as AiContext, a8 as SocialCredentialsInput, a9 as Product, aa as ProductInput, ab as ProductCatalog, ac as ProductCatalogInput, ad as PublicationInput, ae as PublicationState, af as PublicationStats, ag as PublicationStatsHistory, ah as Upload } from './index-BsE8URFA.cjs';
2
- export { ai as AccountError, aj as AccountMetricRow, ak as AccountStateChange, al as AccountWebhookChangeBase, am as AccountWithError, an as AiImageOrigin, ao as AiPlanCostEstimate, ap as AiPlanDestination, aq as AiPlanError, ar as AiPlanNotice, as as AiPlanOptions, at as AiPlanOptionsInput, au as AiPlanResult, av as AiPlanResultsGroup, aw as AiPlanResultsTemplateGroup, ax as AiPlanSource, ay as AiPlanSourceImageInput, az as AiPlanSourceInput, aA as AiPlanSourceProduct, aB as AiPlanState, aC as ApiErrorBody, aD as AspectRatios, aE as AuthError, aF as ClientPlan, aG as CommentAuthor, aH as CommentChange, aI as ConnectSessionAccount, aJ as ContactChannel, aK as ContactError, aL as DashboardAiPlanRef, aM as DashboardPublicationRef, aN as DashboardRange, aO as EngagementBase, aP as FileError, aQ as FileFormat, aR as FileProperties, aS as FileType, aT as IntegrationCatalogProduct, aU as IntegrationConfig, aV as IntegrationError, aW as IntegrationErrorChange, aX as IntegrationFormField, aY as MessageChange, aZ as MessageEchoChange, a_ as MessageOptions, a$ as MessageType, b0 as MessagingError, b1 as MetricRow, b2 as NO_ERROR_CODE, b3 as OpenApiComponents, b4 as OpenApiOperations, b5 as OpenApiPaths, b6 as OpenApiWebhooks, b7 as OpenEnum, b8 as OrganizationError, b9 as PLANVORTEX_ERROR_RANGES, ba as PlanLimitError, bb as PlanVortexAuthenticationError, bc as PlanVortexConfigError, bd as PlanVortexConnectionError, be as PlanVortexError, bf as PlanVortexErrorOptions, bg as PlanVortexErrorRange, bh as PlannerTemplateField, bi as PlannerTemplateFieldType, bj as ProductError, bk as PublicationAiGenerated, bl as PublicationDestination, bm as PublicationError, bn as PublicationErrorDetail, bo as PublicationMetrics, bp as PublicationPending, bq as PublicationStatsPoint, br as PublicationType, bs as PublicationsSummary, bt as RssConfig, bu as SocialAuthorizationMethod, bv as SocialCredentials, bw as SocialIdentifier, bx as SocialIdentifierInput, by as SocialLimitsMap, bz as TOKEN_ERROR_CODES, bA as TopPublication, bB as UnknownWebhookChange, bC as UserError, bD as WebhookAlgorithm, bE as WebhookChange, bF as WebhookEvent, bG as WithAccount, bH as WithPublication, bI as WooCommerceConnectRequest, bJ as account, bK as accountId, bL as errorFamilyForCode, bM as isPlanVortexError, bN as isTokenError, bO as messageContact, bP as messageContactId, bQ as messageDirection, bR as messageFileIds, bS as messageFiles, bT as publication, bU as publicationId } from './index-BsE8URFA.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 PublishSettings, e as PersistentMenu, f as Dashboard, M as MetricName, g as DashboardMetricsResult, h as PublicationsSummaryResult, T as TopPublicationsResult, i as PublicationsStatsResult, j as PlanUse, k as Publication, l as AiPlanResultsSort, m as PlannerTemplateName, n as AiPlanCreateRequest, o as AiPlanCreateResult, p as AiPlan, q as AiPlanResults, r as ClientApp, s as ClientAppInput, t as SocialCapabilities, u as CommentActions, v as SocialLimits, w as PublicationLimits, x as AspectRatiosByNetwork, y as PlannerTemplate, z as CommentNetwork, B as Comment, F as CommentThread, G as CommentReplyResult, H as ContactExtraData, I as Contact, J as ContactCreate, K as ContactUpdate, L as IntegrationProviderName, N as IntegrationProvider, O as Integration, Q as IntegrationConnectRequest, R as IntegrationUpdate, U as IntegrationPickerConfig, V as IntegrationCatalogPage, W as MessageTemplate, X as Conversation, Y as ConversationTotals, Z as Message, _ as MessageInput, $ as Client, a0 as Organization, a1 as AiSettings, a2 as ClientWithOrganizations, a3 as AccountSelection, a4 as PlanData, a5 as PlanUseData, a6 as ConnectToken, a7 as AiContext, a8 as SocialCredentialsInput, a9 as Product, aa as ProductInput, ab as ProductCatalog, ac as ProductCatalogInput, ad as PublicationInput, ae as PublicationState, af as PublicationStats, ag as PublicationStatsHistory, ah as Upload } from './index-BS-kMRg2.cjs';
2
+ export { ai as AccountError, aj as AccountMetricRow, ak as AccountStateChange, al as AccountWebhookChangeBase, am as AccountWithError, an as AiImageOrigin, ao as AiPlanCostEstimate, ap as AiPlanDestination, aq as AiPlanError, ar as AiPlanNotice, as as AiPlanOptions, at as AiPlanOptionsInput, au as AiPlanResult, av as AiPlanResultsGroup, aw as AiPlanResultsTemplateGroup, ax as AiPlanSource, ay as AiPlanSourceImageInput, az as AiPlanSourceInput, aA as AiPlanSourceProduct, aB as AiPlanState, aC as ApiErrorBody, aD as AspectRatios, aE as AuthError, aF as ClientPlan, aG as CommentAuthor, aH as CommentChange, aI as ConnectSessionAccount, aJ as ContactChannel, aK as ContactError, aL as DashboardAiPlanRef, aM as DashboardPublicationRef, aN as DashboardRange, aO as EngagementBase, aP as FileError, aQ as FileFormat, aR as FileProperties, aS as FileType, aT as IntegrationCatalogProduct, aU as IntegrationConfig, aV as IntegrationError, aW as IntegrationErrorChange, aX as IntegrationFormField, aY as MessageChange, aZ as MessageEchoChange, a_ as MessageOptions, a$ as MessageType, b0 as MessagingError, b1 as MetricRow, b2 as NO_ERROR_CODE, b3 as OpenApiComponents, b4 as OpenApiOperations, b5 as OpenApiPaths, b6 as OpenApiWebhooks, b7 as OpenEnum, b8 as OrganizationError, b9 as PLANVORTEX_ERROR_RANGES, ba as PlanLimitError, bb as PlanVortexAuthenticationError, bc as PlanVortexConfigError, bd as PlanVortexConnectionError, be as PlanVortexError, bf as PlanVortexErrorOptions, bg as PlanVortexErrorRange, bh as PlannerTemplateField, bi as PlannerTemplateFieldType, bj as ProductError, bk as PublicationAiGenerated, bl as PublicationDestination, bm as PublicationError, bn as PublicationErrorDetail, bo as PublicationMetrics, bp as PublicationPending, bq as PublicationStatsPoint, br as PublicationType, bs as PublicationsSummary, bt as RssConfig, bu as SocialAuthorizationMethod, bv as SocialCredentials, bw as SocialIdentifier, bx as SocialIdentifierInput, by as SocialLimitsMap, bz as TOKEN_ERROR_CODES, bA as TopPublication, bB as UnknownWebhookChange, bC as UserError, bD as WebhookAlgorithm, bE as WebhookChange, bF as WebhookEvent, bG as WithAccount, bH as WithPublication, bI as WooCommerceConnectRequest, bJ as account, bK as accountId, bL as errorFamilyForCode, bM as isPlanVortexError, bN as isTokenError, bO as messageContact, bP as messageContactId, bQ as messageDirection, bR as messageFileIds, bS as messageFiles, bT as publication, bU as publicationId } from './index-BS-kMRg2.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.21.0";
18
+ declare const VERSION = "0.22.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>;
@@ -1680,12 +1680,20 @@ declare class MessagesResource extends Resource {
1680
1680
  * es, cuándo acaba el periodo), y los números están dentro, en `actual_plan.plan_data`. Mirar
1681
1681
  * `plan_identifier` para saber los límites es el error clásico: un plan `custom` lleva los suyos.
1682
1682
  *
1683
- * Y el CONSUMO no viaja si no se pide: `actual_use` y `actual_asigned` sólo aparecen con
1684
- * `getUse: true`, porque contarlos es una agregación sobre todas las organizaciones del cliente.
1683
+ * Y el CONSUMO no viaja si no se pide: `actual_use`, `pool_use` y `actual_asigned` sólo aparecen
1684
+ * con `getUse: true`, porque contarlos es una agregación sobre todas las organizaciones del cliente.
1685
+ * Entre los tres parten el plan: `actual_use` es lo gastado en TODAS las organizaciones (lo que se
1686
+ * factura), `pool_use` lo gastado en la bolsa común (las organizaciones sin plan propio que tiran
1687
+ * del cliente) y `actual_asigned` lo cedido a las que tienen plan propio. Lo libre en la bolsa es
1688
+ * el plan menos los dos últimos.
1685
1689
  */
1686
1690
 
1687
1691
  interface ClientListOptions extends PageOptions {
1688
- /** Trae también `actual_use` y `actual_asigned`. Cuesta una agregación: no lo pidas por costumbre. */
1692
+ /**
1693
+ * Trae también el consumo (`actual_use`, `pool_use` y `actual_asigned` en un cliente;
1694
+ * `actual_use`, `own_use` y `actual_asigned` en una organización). Cuesta una agregación: no lo
1695
+ * pidas por costumbre.
1696
+ */
1689
1697
  getUse?: boolean | undefined;
1690
1698
  }
1691
1699
  interface OrganizationListOptions extends ClientListOptions {
@@ -1754,7 +1762,10 @@ declare class ClientsResource extends Resource {
1754
1762
  */
1755
1763
 
1756
1764
  interface OrganizationOptions extends RequestOptions {
1757
- /** Trae también `actual_use` y `actual_asigned`. Cuesta una agregación: no lo pidas por costumbre. */
1765
+ /**
1766
+ * Trae también `actual_use`, `own_use` y `actual_asigned`. Cuesta una agregación: no lo pidas
1767
+ * por costumbre.
1768
+ */
1758
1769
  getUse?: boolean | undefined;
1759
1770
  }
1760
1771
  interface ChildOrganizationListOptions extends OrganizationOptions, PageOptions {
@@ -1815,12 +1826,18 @@ declare class OrganizationsResource extends Resource {
1815
1826
  /**
1816
1827
  * El consumo de esta organización y lo que ya tiene repartido a sus hijas.
1817
1828
  *
1818
- * Es un atajo de `get(id, {getUse: true})` que devuelve sólo las dos cifras, que es lo que se
1829
+ * Es un atajo de `get(id, {getUse: true})` que devuelve sólo esas cifras, que es lo que se
1819
1830
  * quiere cuando se está pintando una barra de "3 de 5 cuentas".
1831
+ *
1832
+ * Ojo con cuál se pinta: `actual_use` es el de la BOLSA de la que tira la organización (ella
1833
+ * más las carpetas sin plan que gastan de ella), el mismo con el que el servidor decide si
1834
+ * cabe una cuenta más, así que todas las que comparten bolsa dan la misma cifra. Lo de ésta
1835
+ * sola es `own_use`, ausente con un servidor anterior a noviembre de 2026.
1820
1836
  */
1821
1837
  use(idOrganization: string, options?: RequestOptions): Promise<{
1822
1838
  actual_use: PlanUseData | undefined;
1823
1839
  actual_asigned: PlanData | undefined;
1840
+ own_use: PlanUseData | undefined;
1824
1841
  }>;
1825
1842
  /**
1826
1843
  * Emite el token temporal con el que **una persona** conecta una cuenta social a esta
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 PublishSettings, e as PersistentMenu, f as Dashboard, M as MetricName, g as DashboardMetricsResult, h as PublicationsSummaryResult, T as TopPublicationsResult, i as PublicationsStatsResult, j as PlanUse, k as Publication, l as AiPlanResultsSort, m as PlannerTemplateName, n as AiPlanCreateRequest, o as AiPlanCreateResult, p as AiPlan, q as AiPlanResults, r as ClientApp, s as ClientAppInput, t as SocialCapabilities, u as CommentActions, v as SocialLimits, w as PublicationLimits, x as AspectRatiosByNetwork, y as PlannerTemplate, z as CommentNetwork, B as Comment, F as CommentThread, G as CommentReplyResult, H as ContactExtraData, I as Contact, J as ContactCreate, K as ContactUpdate, L as IntegrationProviderName, N as IntegrationProvider, O as Integration, Q as IntegrationConnectRequest, R as IntegrationUpdate, U as IntegrationPickerConfig, V as IntegrationCatalogPage, W as MessageTemplate, X as Conversation, Y as ConversationTotals, Z as Message, _ as MessageInput, $ as Client, a0 as Organization, a1 as AiSettings, a2 as ClientWithOrganizations, a3 as AccountSelection, a4 as PlanData, a5 as PlanUseData, a6 as ConnectToken, a7 as AiContext, a8 as SocialCredentialsInput, a9 as Product, aa as ProductInput, ab as ProductCatalog, ac as ProductCatalogInput, ad as PublicationInput, ae as PublicationState, af as PublicationStats, ag as PublicationStatsHistory, ah as Upload } from './index-BsE8URFA.js';
2
- export { ai as AccountError, aj as AccountMetricRow, ak as AccountStateChange, al as AccountWebhookChangeBase, am as AccountWithError, an as AiImageOrigin, ao as AiPlanCostEstimate, ap as AiPlanDestination, aq as AiPlanError, ar as AiPlanNotice, as as AiPlanOptions, at as AiPlanOptionsInput, au as AiPlanResult, av as AiPlanResultsGroup, aw as AiPlanResultsTemplateGroup, ax as AiPlanSource, ay as AiPlanSourceImageInput, az as AiPlanSourceInput, aA as AiPlanSourceProduct, aB as AiPlanState, aC as ApiErrorBody, aD as AspectRatios, aE as AuthError, aF as ClientPlan, aG as CommentAuthor, aH as CommentChange, aI as ConnectSessionAccount, aJ as ContactChannel, aK as ContactError, aL as DashboardAiPlanRef, aM as DashboardPublicationRef, aN as DashboardRange, aO as EngagementBase, aP as FileError, aQ as FileFormat, aR as FileProperties, aS as FileType, aT as IntegrationCatalogProduct, aU as IntegrationConfig, aV as IntegrationError, aW as IntegrationErrorChange, aX as IntegrationFormField, aY as MessageChange, aZ as MessageEchoChange, a_ as MessageOptions, a$ as MessageType, b0 as MessagingError, b1 as MetricRow, b2 as NO_ERROR_CODE, b3 as OpenApiComponents, b4 as OpenApiOperations, b5 as OpenApiPaths, b6 as OpenApiWebhooks, b7 as OpenEnum, b8 as OrganizationError, b9 as PLANVORTEX_ERROR_RANGES, ba as PlanLimitError, bb as PlanVortexAuthenticationError, bc as PlanVortexConfigError, bd as PlanVortexConnectionError, be as PlanVortexError, bf as PlanVortexErrorOptions, bg as PlanVortexErrorRange, bh as PlannerTemplateField, bi as PlannerTemplateFieldType, bj as ProductError, bk as PublicationAiGenerated, bl as PublicationDestination, bm as PublicationError, bn as PublicationErrorDetail, bo as PublicationMetrics, bp as PublicationPending, bq as PublicationStatsPoint, br as PublicationType, bs as PublicationsSummary, bt as RssConfig, bu as SocialAuthorizationMethod, bv as SocialCredentials, bw as SocialIdentifier, bx as SocialIdentifierInput, by as SocialLimitsMap, bz as TOKEN_ERROR_CODES, bA as TopPublication, bB as UnknownWebhookChange, bC as UserError, bD as WebhookAlgorithm, bE as WebhookChange, bF as WebhookEvent, bG as WithAccount, bH as WithPublication, bI as WooCommerceConnectRequest, bJ as account, bK as accountId, bL as errorFamilyForCode, bM as isPlanVortexError, bN as isTokenError, bO as messageContact, bP as messageContactId, bQ as messageDirection, bR as messageFileIds, bS as messageFiles, bT as publication, bU as publicationId } from './index-BsE8URFA.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 PublishSettings, e as PersistentMenu, f as Dashboard, M as MetricName, g as DashboardMetricsResult, h as PublicationsSummaryResult, T as TopPublicationsResult, i as PublicationsStatsResult, j as PlanUse, k as Publication, l as AiPlanResultsSort, m as PlannerTemplateName, n as AiPlanCreateRequest, o as AiPlanCreateResult, p as AiPlan, q as AiPlanResults, r as ClientApp, s as ClientAppInput, t as SocialCapabilities, u as CommentActions, v as SocialLimits, w as PublicationLimits, x as AspectRatiosByNetwork, y as PlannerTemplate, z as CommentNetwork, B as Comment, F as CommentThread, G as CommentReplyResult, H as ContactExtraData, I as Contact, J as ContactCreate, K as ContactUpdate, L as IntegrationProviderName, N as IntegrationProvider, O as Integration, Q as IntegrationConnectRequest, R as IntegrationUpdate, U as IntegrationPickerConfig, V as IntegrationCatalogPage, W as MessageTemplate, X as Conversation, Y as ConversationTotals, Z as Message, _ as MessageInput, $ as Client, a0 as Organization, a1 as AiSettings, a2 as ClientWithOrganizations, a3 as AccountSelection, a4 as PlanData, a5 as PlanUseData, a6 as ConnectToken, a7 as AiContext, a8 as SocialCredentialsInput, a9 as Product, aa as ProductInput, ab as ProductCatalog, ac as ProductCatalogInput, ad as PublicationInput, ae as PublicationState, af as PublicationStats, ag as PublicationStatsHistory, ah as Upload } from './index-BS-kMRg2.js';
2
+ export { ai as AccountError, aj as AccountMetricRow, ak as AccountStateChange, al as AccountWebhookChangeBase, am as AccountWithError, an as AiImageOrigin, ao as AiPlanCostEstimate, ap as AiPlanDestination, aq as AiPlanError, ar as AiPlanNotice, as as AiPlanOptions, at as AiPlanOptionsInput, au as AiPlanResult, av as AiPlanResultsGroup, aw as AiPlanResultsTemplateGroup, ax as AiPlanSource, ay as AiPlanSourceImageInput, az as AiPlanSourceInput, aA as AiPlanSourceProduct, aB as AiPlanState, aC as ApiErrorBody, aD as AspectRatios, aE as AuthError, aF as ClientPlan, aG as CommentAuthor, aH as CommentChange, aI as ConnectSessionAccount, aJ as ContactChannel, aK as ContactError, aL as DashboardAiPlanRef, aM as DashboardPublicationRef, aN as DashboardRange, aO as EngagementBase, aP as FileError, aQ as FileFormat, aR as FileProperties, aS as FileType, aT as IntegrationCatalogProduct, aU as IntegrationConfig, aV as IntegrationError, aW as IntegrationErrorChange, aX as IntegrationFormField, aY as MessageChange, aZ as MessageEchoChange, a_ as MessageOptions, a$ as MessageType, b0 as MessagingError, b1 as MetricRow, b2 as NO_ERROR_CODE, b3 as OpenApiComponents, b4 as OpenApiOperations, b5 as OpenApiPaths, b6 as OpenApiWebhooks, b7 as OpenEnum, b8 as OrganizationError, b9 as PLANVORTEX_ERROR_RANGES, ba as PlanLimitError, bb as PlanVortexAuthenticationError, bc as PlanVortexConfigError, bd as PlanVortexConnectionError, be as PlanVortexError, bf as PlanVortexErrorOptions, bg as PlanVortexErrorRange, bh as PlannerTemplateField, bi as PlannerTemplateFieldType, bj as ProductError, bk as PublicationAiGenerated, bl as PublicationDestination, bm as PublicationError, bn as PublicationErrorDetail, bo as PublicationMetrics, bp as PublicationPending, bq as PublicationStatsPoint, br as PublicationType, bs as PublicationsSummary, bt as RssConfig, bu as SocialAuthorizationMethod, bv as SocialCredentials, bw as SocialIdentifier, bx as SocialIdentifierInput, by as SocialLimitsMap, bz as TOKEN_ERROR_CODES, bA as TopPublication, bB as UnknownWebhookChange, bC as UserError, bD as WebhookAlgorithm, bE as WebhookChange, bF as WebhookEvent, bG as WithAccount, bH as WithPublication, bI as WooCommerceConnectRequest, bJ as account, bK as accountId, bL as errorFamilyForCode, bM as isPlanVortexError, bN as isTokenError, bO as messageContact, bP as messageContactId, bQ as messageDirection, bR as messageFileIds, bS as messageFiles, bT as publication, bU as publicationId } from './index-BS-kMRg2.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.21.0";
18
+ declare const VERSION = "0.22.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>;
@@ -1680,12 +1680,20 @@ declare class MessagesResource extends Resource {
1680
1680
  * es, cuándo acaba el periodo), y los números están dentro, en `actual_plan.plan_data`. Mirar
1681
1681
  * `plan_identifier` para saber los límites es el error clásico: un plan `custom` lleva los suyos.
1682
1682
  *
1683
- * Y el CONSUMO no viaja si no se pide: `actual_use` y `actual_asigned` sólo aparecen con
1684
- * `getUse: true`, porque contarlos es una agregación sobre todas las organizaciones del cliente.
1683
+ * Y el CONSUMO no viaja si no se pide: `actual_use`, `pool_use` y `actual_asigned` sólo aparecen
1684
+ * con `getUse: true`, porque contarlos es una agregación sobre todas las organizaciones del cliente.
1685
+ * Entre los tres parten el plan: `actual_use` es lo gastado en TODAS las organizaciones (lo que se
1686
+ * factura), `pool_use` lo gastado en la bolsa común (las organizaciones sin plan propio que tiran
1687
+ * del cliente) y `actual_asigned` lo cedido a las que tienen plan propio. Lo libre en la bolsa es
1688
+ * el plan menos los dos últimos.
1685
1689
  */
1686
1690
 
1687
1691
  interface ClientListOptions extends PageOptions {
1688
- /** Trae también `actual_use` y `actual_asigned`. Cuesta una agregación: no lo pidas por costumbre. */
1692
+ /**
1693
+ * Trae también el consumo (`actual_use`, `pool_use` y `actual_asigned` en un cliente;
1694
+ * `actual_use`, `own_use` y `actual_asigned` en una organización). Cuesta una agregación: no lo
1695
+ * pidas por costumbre.
1696
+ */
1689
1697
  getUse?: boolean | undefined;
1690
1698
  }
1691
1699
  interface OrganizationListOptions extends ClientListOptions {
@@ -1754,7 +1762,10 @@ declare class ClientsResource extends Resource {
1754
1762
  */
1755
1763
 
1756
1764
  interface OrganizationOptions extends RequestOptions {
1757
- /** Trae también `actual_use` y `actual_asigned`. Cuesta una agregación: no lo pidas por costumbre. */
1765
+ /**
1766
+ * Trae también `actual_use`, `own_use` y `actual_asigned`. Cuesta una agregación: no lo pidas
1767
+ * por costumbre.
1768
+ */
1758
1769
  getUse?: boolean | undefined;
1759
1770
  }
1760
1771
  interface ChildOrganizationListOptions extends OrganizationOptions, PageOptions {
@@ -1815,12 +1826,18 @@ declare class OrganizationsResource extends Resource {
1815
1826
  /**
1816
1827
  * El consumo de esta organización y lo que ya tiene repartido a sus hijas.
1817
1828
  *
1818
- * Es un atajo de `get(id, {getUse: true})` que devuelve sólo las dos cifras, que es lo que se
1829
+ * Es un atajo de `get(id, {getUse: true})` que devuelve sólo esas cifras, que es lo que se
1819
1830
  * quiere cuando se está pintando una barra de "3 de 5 cuentas".
1831
+ *
1832
+ * Ojo con cuál se pinta: `actual_use` es el de la BOLSA de la que tira la organización (ella
1833
+ * más las carpetas sin plan que gastan de ella), el mismo con el que el servidor decide si
1834
+ * cabe una cuenta más, así que todas las que comparten bolsa dan la misma cifra. Lo de ésta
1835
+ * sola es `own_use`, ausente con un servidor anterior a noviembre de 2026.
1820
1836
  */
1821
1837
  use(idOrganization: string, options?: RequestOptions): Promise<{
1822
1838
  actual_use: PlanUseData | undefined;
1823
1839
  actual_asigned: PlanData | undefined;
1840
+ own_use: PlanUseData | undefined;
1824
1841
  }>;
1825
1842
  /**
1826
1843
  * Emite el token temporal con el que **una persona** conecta una cuenta social a esta
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ 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.21.0";
7
+ var VERSION = "0.22.0";
8
8
 
9
9
  // src/core/auth.ts
10
10
  var TOKEN_REFRESH_MARGIN_MS = 6e4;
@@ -2325,12 +2325,21 @@ var OrganizationsResource = class extends Resource {
2325
2325
  /**
2326
2326
  * El consumo de esta organización y lo que ya tiene repartido a sus hijas.
2327
2327
  *
2328
- * Es un atajo de `get(id, {getUse: true})` que devuelve sólo las dos cifras, que es lo que se
2328
+ * Es un atajo de `get(id, {getUse: true})` que devuelve sólo esas cifras, que es lo que se
2329
2329
  * quiere cuando se está pintando una barra de "3 de 5 cuentas".
2330
+ *
2331
+ * Ojo con cuál se pinta: `actual_use` es el de la BOLSA de la que tira la organización (ella
2332
+ * más las carpetas sin plan que gastan de ella), el mismo con el que el servidor decide si
2333
+ * cabe una cuenta más, así que todas las que comparten bolsa dan la misma cifra. Lo de ésta
2334
+ * sola es `own_use`, ausente con un servidor anterior a noviembre de 2026.
2330
2335
  */
2331
2336
  async use(idOrganization, options = {}) {
2332
2337
  const organization = await this.get(idOrganization, { ...options, getUse: true });
2333
- return { actual_use: organization.actual_use, actual_asigned: organization.actual_asigned };
2338
+ return {
2339
+ actual_use: organization.actual_use,
2340
+ actual_asigned: organization.actual_asigned,
2341
+ own_use: organization.own_use
2342
+ };
2334
2343
  }
2335
2344
  /**
2336
2345
  * Emite el token temporal con el que **una persona** conecta una cuenta social a esta