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-BsE8URFA.d.cts → index-BS-kMRg2.d.cts} +30 -11
- package/dist/{index-BsE8URFA.d.ts → index-BS-kMRg2.d.ts} +30 -11
- package/dist/index.cjs +12 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -8
- package/dist/index.d.ts +25 -8
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/webhooks/index.d.cts +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -755,7 +755,9 @@ interface paths {
|
|
|
755
755
|
};
|
|
756
756
|
/**
|
|
757
757
|
* Get an organization by identifier
|
|
758
|
-
* @description Get one organization by its identifier
|
|
758
|
+
* @description Get one organization by its identifier, with what it is using of its plan (`actual_use`) and what it has been assigned (`actual_asigned`).
|
|
759
|
+
*
|
|
760
|
+
* **Anyone with a role in the organization can read it**, whatever that role's permissions are, and so can anyone with a client role, an app of the client and a temporal token of this organization. It used to require `organization:read`, and that left a role allowed to connect accounts, create AI plans or publish without knowing how much of the plan was left. `organization:read` now means seeing the plan consumption: `GET /organizations/{id_organization}/use`, `GET /organizations/{id_organization}/limits` and the `plan_use` block of the dashboard.
|
|
759
761
|
*/
|
|
760
762
|
get: operations["getOrganization"];
|
|
761
763
|
/**
|
|
@@ -991,7 +993,7 @@ interface paths {
|
|
|
991
993
|
* Re-enable a disconnected account
|
|
992
994
|
* @description Brings back an account that was removed, without going through the authorization again — as long as its stored token still works.
|
|
993
995
|
*
|
|
994
|
-
* 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. On the free plan a `whatsapp` account that is not active cannot be enabled (error 516), because
|
|
996
|
+
* 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. On the free plan a `whatsapp` or `google_business` account that is not active cannot be enabled (error 516), because everything those networks do needs a paid plan (chat and templates on WhatsApp, reviews on Google Business). One that is already active can still be reconnected.
|
|
995
997
|
*
|
|
996
998
|
* **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.
|
|
997
999
|
*
|
|
@@ -1436,7 +1438,7 @@ interface paths {
|
|
|
1436
1438
|
* - `read` is **yours**. It touches no social network, costs nothing and can always be set.
|
|
1437
1439
|
* - `hidden` **touches the network**, and not every network allows it — LinkedIn and Google Business have no hide endpoint at all and return error `946`. Check `GET /social_comment_actions` before offering the control.
|
|
1438
1440
|
*
|
|
1439
|
-
*
|
|
1441
|
+
* Setting `read` requires the `comments:read` permission (`client_organization_comments:read` for apps): marking a comment read is part of reading it, as opening a conversation is in the chat. Setting `hidden` also requires `comments:create` (`client_organization_comments:create`), the same as replying, and without it the whole request is refused with `520` and nothing changes, `read` included. Both need a paid plan.
|
|
1440
1442
|
*/
|
|
1441
1443
|
put: operations["updateComment"];
|
|
1442
1444
|
post?: never;
|
|
@@ -1565,7 +1567,7 @@ interface paths {
|
|
|
1565
1567
|
*
|
|
1566
1568
|
* **A network that cannot produce a link simply does not appear.** That is a legitimate answer, not a failure: it is what happens with `discord` in an organization that has not saved its own bot credentials yet (see `PUT /organizations/{id_organization}/social_credentials/{social_network}`).
|
|
1567
1569
|
*
|
|
1568
|
-
* **On the free plan `whatsapp`
|
|
1570
|
+
* **On the free plan `whatsapp` and `google_business` do not appear either**, unless the organization already has an active account of that network, which has to stay reconnectable. WhatsApp only has chat and templates and Google Business only has reviews, and all of that needs a paid plan, so enabling a new account answers error 516. Asking for it by name gets you an empty list, not an error.
|
|
1569
1571
|
*
|
|
1570
1572
|
* **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.
|
|
1571
1573
|
*
|
|
@@ -2414,7 +2416,7 @@ interface paths {
|
|
|
2414
2416
|
*
|
|
2415
2417
|
* **It connects once.** As soon as an `account-connect` succeeds, the token stops being able to connect anything else and answers error 543; the `enable` calls that finish that same connection keep working until it expires. Issue a new one per connection — they are free and immediate.
|
|
2416
2418
|
*
|
|
2417
|
-
* **If you pass `social_network`, the token is bound to that network** and will not connect any other (error 544). Leave it out to let the person pick. On the free plan, asking for `whatsapp` answers error 516 unless the organization already has an active
|
|
2419
|
+
* **If you pass `social_network`, the token is bound to that network** and will not connect any other (error 544). Leave it out to let the person pick. On the free plan, asking for `whatsapp` or `google_business` answers error 516 unless the organization already has an active account of that network to reconnect: everything those networks do needs a paid plan.
|
|
2418
2420
|
*
|
|
2419
2421
|
* **Or show the account picker yourself** with `account_selection=integrator`. By default PlanVortex shows the screen where the person picks which accounts to enable, and only then sends them to your `redirect_uri`. In this mode that screen is yours:
|
|
2420
2422
|
*
|
|
@@ -3684,7 +3686,7 @@ interface components {
|
|
|
3684
3686
|
ClientsClient: {
|
|
3685
3687
|
/** @example 66d04a6a427f4c43b9d97f54 */
|
|
3686
3688
|
_id: string;
|
|
3687
|
-
/** @description What is already handed out to
|
|
3689
|
+
/** @description What is already handed out to organizations with a plan of their own (root organizations, or organizations under a folder), which is not available to the shared pool any more. **Only present with `getUse=true`.** */
|
|
3688
3690
|
actual_asigned?: components["schemas"]["PlanData"];
|
|
3689
3691
|
actual_plan: components["schemas"]["ClientsPlan"];
|
|
3690
3692
|
/** @description Current consumption across every organization of the client. **Only present with `getUse=true`.** `twitter_credits` and `ai_credits` are what has been spent this calendar month. */
|
|
@@ -3696,6 +3698,8 @@ interface components {
|
|
|
3696
3698
|
/** Format: date-time */
|
|
3697
3699
|
creation_date: string;
|
|
3698
3700
|
name: string;
|
|
3701
|
+
/** @description What the client's shared pool is using: the root organizations without a plan of their own and the folders below them, which is the `actual_use` each of them shows. **Only present with `getUse=true`.** Together with `actual_asigned` and the plan it splits the plan in three: used by the shared pool, free in the shared pool, and handed out to organizations with a plan of their own. `apps` is not here: apps belong to the client, not to an organization. */
|
|
3702
|
+
pool_use?: components["schemas"]["PlanUseData"];
|
|
3699
3703
|
/** @description Whether this client has already used its trial. */
|
|
3700
3704
|
trial_tested?: boolean;
|
|
3701
3705
|
};
|
|
@@ -3912,8 +3916,9 @@ interface components {
|
|
|
3912
3916
|
external_id: string;
|
|
3913
3917
|
/** @description Whether the connected account wrote it. This is what separates "delete mine" from "delete theirs", and what keeps your own replies out of the inbox. */
|
|
3914
3918
|
is_own: boolean;
|
|
3915
|
-
/** @description Display name. Always present for a review, including anonymous ones, which get a placeholder rather than an empty string. */
|
|
3919
|
+
/** @description Display name. Always present for a review, including anonymous ones, which get a placeholder rather than an empty string. On LinkedIn it is read from LinkedIn on every request and is not stored by PlanVortex: it is absent when LinkedIn does not return the member's profile, and LinkedIn only lets you cache it for 24 hours (see the LinkedIn section above). */
|
|
3916
3920
|
name?: string;
|
|
3921
|
+
/** @description Link to the author's picture, when the network gives one. On LinkedIn it is read on every request like `name`, it is a signed link that expires after a few weeks, and LinkedIn's servers refuse most downloads that do not come from a browser: show it in an `<img>`, do not copy it. */
|
|
3917
3922
|
profile_pic?: string;
|
|
3918
3923
|
};
|
|
3919
3924
|
/**
|
|
@@ -4571,6 +4576,17 @@ interface components {
|
|
|
4571
4576
|
* @description When the contact **deleted** this message for everyone (WhatsApp allows it for two days). The message stays in the thread with no `text` and no files.
|
|
4572
4577
|
*/
|
|
4573
4578
|
deleted_date?: string;
|
|
4579
|
+
/**
|
|
4580
|
+
* @description Only on messages **we** sent (`contact_id`): how far the message got, like the ticks in WhatsApp. `sent` means the network accepted it, `delivered` that it reached the contact's device, `read` that the contact saw it, and `failed` that the network rejected it (`message_errors` says why).
|
|
4581
|
+
*
|
|
4582
|
+
* It only moves forward, and each network reports what it can. WhatsApp and Messenger report all three steps, Instagram reports `sent` and `read` (it does not report delivery), and Bluesky only `sent`. A read receipt also covers the earlier messages to that contact, the same as opening the chat.
|
|
4583
|
+
*
|
|
4584
|
+
* Absent when PlanVortex does not know: messages from the contact, messages sent before 15 November 2026 and messages imported from the network's history.
|
|
4585
|
+
*
|
|
4586
|
+
* No webhook event is sent for `delivered`: read the field on the message. A `read` arrives as `messaging_seen`.
|
|
4587
|
+
* @enum {string}
|
|
4588
|
+
*/
|
|
4589
|
+
delivery_status?: "sent" | "delivered" | "read" | "failed";
|
|
4574
4590
|
/**
|
|
4575
4591
|
* Format: date-time
|
|
4576
4592
|
* @description When the contact **edited** this message on the network (WhatsApp allows it for 15 minutes). `text` is already the edited text; the original is not kept.
|
|
@@ -4611,6 +4627,7 @@ interface components {
|
|
|
4611
4627
|
*/
|
|
4612
4628
|
emoji: string;
|
|
4613
4629
|
}[];
|
|
4630
|
+
/** @description On a message from the contact, whether someone has read it in PlanVortex. On one of ours it is **not** a read receipt (messages sent from the WhatsApp Business app, or imported from the network, are stored as read): use `delivery_status`. */
|
|
4614
4631
|
read: boolean;
|
|
4615
4632
|
/** @description Absent on the messages that carry no text of their own, such as a `messaging_seen` acknowledgement. */
|
|
4616
4633
|
text?: string;
|
|
@@ -4728,7 +4745,7 @@ interface components {
|
|
|
4728
4745
|
actual_asigned?: components["schemas"]["PlanData"];
|
|
4729
4746
|
/** @description The slice of the client's plan assigned to this organization. **Absent when nothing was assigned**, and then the organization shares whatever its nearest parent with a plan has — or, failing that, the client's unassigned remainder. Ask `GET /organizations/{id_organization}/limits` for the effective numbers instead of reading this. */
|
|
4730
4747
|
actual_plan?: components["schemas"]["PlanData"];
|
|
4731
|
-
/** @description
|
|
4748
|
+
/** @description What the plan this organization draws from is using, which is the figure the server checks before letting one more account or integration in: the owner of that plan (this organization if it has a plan of its own, otherwise its nearest parent with one, otherwise the client's shared pool) plus the folders without a plan below it. Organizations sharing a pool therefore show the same `actual_use`; what each one uses on its own is `own_use`. **Only present with `getUse=true`.** `twitter_credits` and `ai_credits` are what has been spent in the current calendar month; the rest is what exists right now. */
|
|
4732
4749
|
actual_use?: components["schemas"]["PlanUseData"];
|
|
4733
4750
|
ai_context?: components["schemas"]["AiContext"];
|
|
4734
4751
|
/** Format: date-time */
|
|
@@ -4736,6 +4753,8 @@ interface components {
|
|
|
4736
4753
|
/** @description The client this organization belongs to. */
|
|
4737
4754
|
id_client: string;
|
|
4738
4755
|
name: string;
|
|
4756
|
+
/** @description What THIS organization uses on its own, without the folders it shares a plan with. **Only present with `getUse=true`.** `actual_use` is the consumption of the whole pool this organization draws from (the same figure the server checks before letting one more account in), so every organization without a plan of its own shows the same `actual_use`; `own_use` is what hangs from this one. Adding up the `own_use` of the organizations that share a pool gives that pool's `actual_use`. On an organization with a plan of its own and no folders below it, both are the same. */
|
|
4757
|
+
own_use?: components["schemas"]["PlanUseData"];
|
|
4739
4758
|
/** @description The organization this one hangs from. Absent on a root organization. */
|
|
4740
4759
|
parent_organization?: string;
|
|
4741
4760
|
/** @description The organization's own application credentials, by network. A network that is absent is not configured, and then it does not even appear as connectable. */
|
|
@@ -8488,7 +8507,7 @@ interface operations {
|
|
|
8488
8507
|
* | --- | --- |
|
|
8489
8508
|
* | `700` | The account has no usable token: it has to be connected again |
|
|
8490
8509
|
* | `706` | The organization has no account slots left in its plan |
|
|
8491
|
-
* | `516` | The plan is free and this network needs a paid plan (today, `whatsapp`) |
|
|
8510
|
+
* | `516` | The plan is free and this network needs a paid plan (today, `whatsapp` and `google_business`) |
|
|
8492
8511
|
* | `519` | This endpoint does not accept app credentials |
|
|
8493
8512
|
* | `544` | This temporal connect token was issued for a different social network |
|
|
8494
8513
|
*/
|
|
@@ -9850,7 +9869,7 @@ interface operations {
|
|
|
9850
9869
|
* | `553` | Some account is not part of this session. `data.accounts` lists them |
|
|
9851
9870
|
* | `706` | The new accounts do not fit in the plan. `data` carries `limit`, `used` and `requested`, and none was enabled |
|
|
9852
9871
|
* | `1101` | Invalid organization |
|
|
9853
|
-
* | `516` | The plan is free and one of the accounts belongs to a network that needs a paid plan (today, `whatsapp`) |
|
|
9872
|
+
* | `516` | The plan is free and one of the accounts belongs to a network that needs a paid plan (today, `whatsapp` and `google_business`) |
|
|
9854
9873
|
*/
|
|
9855
9874
|
400: {
|
|
9856
9875
|
headers: {
|
|
@@ -11974,7 +11993,7 @@ interface operations {
|
|
|
11974
11993
|
* | Code | Meaning |
|
|
11975
11994
|
* | --- | --- |
|
|
11976
11995
|
* | `514` | This endpoint needs app credentials: neither a user token nor a temporal connect token can issue one |
|
|
11977
|
-
* | `516` | The plan is free, `social_network` needs a paid plan (today, `whatsapp`) and the organization has no active account of it to reconnect |
|
|
11996
|
+
* | `516` | The plan is free, `social_network` needs a paid plan (today, `whatsapp` and `google_business`) and the organization has no active account of it to reconnect |
|
|
11978
11997
|
* | `532` | `redirect_uri` is not one of the app's registered `redirect_urls` |
|
|
11979
11998
|
* | `549` | `account_selection` is not `planvortex` or `integrator`, or it is `integrator` without `redirect_uri` or `social_network`. `data` says which |
|
|
11980
11999
|
* | `550` | `account_selection=integrator` on a network with no return to the browser (`telegram`) |
|
|
@@ -755,7 +755,9 @@ interface paths {
|
|
|
755
755
|
};
|
|
756
756
|
/**
|
|
757
757
|
* Get an organization by identifier
|
|
758
|
-
* @description Get one organization by its identifier
|
|
758
|
+
* @description Get one organization by its identifier, with what it is using of its plan (`actual_use`) and what it has been assigned (`actual_asigned`).
|
|
759
|
+
*
|
|
760
|
+
* **Anyone with a role in the organization can read it**, whatever that role's permissions are, and so can anyone with a client role, an app of the client and a temporal token of this organization. It used to require `organization:read`, and that left a role allowed to connect accounts, create AI plans or publish without knowing how much of the plan was left. `organization:read` now means seeing the plan consumption: `GET /organizations/{id_organization}/use`, `GET /organizations/{id_organization}/limits` and the `plan_use` block of the dashboard.
|
|
759
761
|
*/
|
|
760
762
|
get: operations["getOrganization"];
|
|
761
763
|
/**
|
|
@@ -991,7 +993,7 @@ interface paths {
|
|
|
991
993
|
* Re-enable a disconnected account
|
|
992
994
|
* @description Brings back an account that was removed, without going through the authorization again — as long as its stored token still works.
|
|
993
995
|
*
|
|
994
|
-
* 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. On the free plan a `whatsapp` account that is not active cannot be enabled (error 516), because
|
|
996
|
+
* 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. On the free plan a `whatsapp` or `google_business` account that is not active cannot be enabled (error 516), because everything those networks do needs a paid plan (chat and templates on WhatsApp, reviews on Google Business). One that is already active can still be reconnected.
|
|
995
997
|
*
|
|
996
998
|
* **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.
|
|
997
999
|
*
|
|
@@ -1436,7 +1438,7 @@ interface paths {
|
|
|
1436
1438
|
* - `read` is **yours**. It touches no social network, costs nothing and can always be set.
|
|
1437
1439
|
* - `hidden` **touches the network**, and not every network allows it — LinkedIn and Google Business have no hide endpoint at all and return error `946`. Check `GET /social_comment_actions` before offering the control.
|
|
1438
1440
|
*
|
|
1439
|
-
*
|
|
1441
|
+
* Setting `read` requires the `comments:read` permission (`client_organization_comments:read` for apps): marking a comment read is part of reading it, as opening a conversation is in the chat. Setting `hidden` also requires `comments:create` (`client_organization_comments:create`), the same as replying, and without it the whole request is refused with `520` and nothing changes, `read` included. Both need a paid plan.
|
|
1440
1442
|
*/
|
|
1441
1443
|
put: operations["updateComment"];
|
|
1442
1444
|
post?: never;
|
|
@@ -1565,7 +1567,7 @@ interface paths {
|
|
|
1565
1567
|
*
|
|
1566
1568
|
* **A network that cannot produce a link simply does not appear.** That is a legitimate answer, not a failure: it is what happens with `discord` in an organization that has not saved its own bot credentials yet (see `PUT /organizations/{id_organization}/social_credentials/{social_network}`).
|
|
1567
1569
|
*
|
|
1568
|
-
* **On the free plan `whatsapp`
|
|
1570
|
+
* **On the free plan `whatsapp` and `google_business` do not appear either**, unless the organization already has an active account of that network, which has to stay reconnectable. WhatsApp only has chat and templates and Google Business only has reviews, and all of that needs a paid plan, so enabling a new account answers error 516. Asking for it by name gets you an empty list, not an error.
|
|
1569
1571
|
*
|
|
1570
1572
|
* **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.
|
|
1571
1573
|
*
|
|
@@ -2414,7 +2416,7 @@ interface paths {
|
|
|
2414
2416
|
*
|
|
2415
2417
|
* **It connects once.** As soon as an `account-connect` succeeds, the token stops being able to connect anything else and answers error 543; the `enable` calls that finish that same connection keep working until it expires. Issue a new one per connection — they are free and immediate.
|
|
2416
2418
|
*
|
|
2417
|
-
* **If you pass `social_network`, the token is bound to that network** and will not connect any other (error 544). Leave it out to let the person pick. On the free plan, asking for `whatsapp` answers error 516 unless the organization already has an active
|
|
2419
|
+
* **If you pass `social_network`, the token is bound to that network** and will not connect any other (error 544). Leave it out to let the person pick. On the free plan, asking for `whatsapp` or `google_business` answers error 516 unless the organization already has an active account of that network to reconnect: everything those networks do needs a paid plan.
|
|
2418
2420
|
*
|
|
2419
2421
|
* **Or show the account picker yourself** with `account_selection=integrator`. By default PlanVortex shows the screen where the person picks which accounts to enable, and only then sends them to your `redirect_uri`. In this mode that screen is yours:
|
|
2420
2422
|
*
|
|
@@ -3684,7 +3686,7 @@ interface components {
|
|
|
3684
3686
|
ClientsClient: {
|
|
3685
3687
|
/** @example 66d04a6a427f4c43b9d97f54 */
|
|
3686
3688
|
_id: string;
|
|
3687
|
-
/** @description What is already handed out to
|
|
3689
|
+
/** @description What is already handed out to organizations with a plan of their own (root organizations, or organizations under a folder), which is not available to the shared pool any more. **Only present with `getUse=true`.** */
|
|
3688
3690
|
actual_asigned?: components["schemas"]["PlanData"];
|
|
3689
3691
|
actual_plan: components["schemas"]["ClientsPlan"];
|
|
3690
3692
|
/** @description Current consumption across every organization of the client. **Only present with `getUse=true`.** `twitter_credits` and `ai_credits` are what has been spent this calendar month. */
|
|
@@ -3696,6 +3698,8 @@ interface components {
|
|
|
3696
3698
|
/** Format: date-time */
|
|
3697
3699
|
creation_date: string;
|
|
3698
3700
|
name: string;
|
|
3701
|
+
/** @description What the client's shared pool is using: the root organizations without a plan of their own and the folders below them, which is the `actual_use` each of them shows. **Only present with `getUse=true`.** Together with `actual_asigned` and the plan it splits the plan in three: used by the shared pool, free in the shared pool, and handed out to organizations with a plan of their own. `apps` is not here: apps belong to the client, not to an organization. */
|
|
3702
|
+
pool_use?: components["schemas"]["PlanUseData"];
|
|
3699
3703
|
/** @description Whether this client has already used its trial. */
|
|
3700
3704
|
trial_tested?: boolean;
|
|
3701
3705
|
};
|
|
@@ -3912,8 +3916,9 @@ interface components {
|
|
|
3912
3916
|
external_id: string;
|
|
3913
3917
|
/** @description Whether the connected account wrote it. This is what separates "delete mine" from "delete theirs", and what keeps your own replies out of the inbox. */
|
|
3914
3918
|
is_own: boolean;
|
|
3915
|
-
/** @description Display name. Always present for a review, including anonymous ones, which get a placeholder rather than an empty string. */
|
|
3919
|
+
/** @description Display name. Always present for a review, including anonymous ones, which get a placeholder rather than an empty string. On LinkedIn it is read from LinkedIn on every request and is not stored by PlanVortex: it is absent when LinkedIn does not return the member's profile, and LinkedIn only lets you cache it for 24 hours (see the LinkedIn section above). */
|
|
3916
3920
|
name?: string;
|
|
3921
|
+
/** @description Link to the author's picture, when the network gives one. On LinkedIn it is read on every request like `name`, it is a signed link that expires after a few weeks, and LinkedIn's servers refuse most downloads that do not come from a browser: show it in an `<img>`, do not copy it. */
|
|
3917
3922
|
profile_pic?: string;
|
|
3918
3923
|
};
|
|
3919
3924
|
/**
|
|
@@ -4571,6 +4576,17 @@ interface components {
|
|
|
4571
4576
|
* @description When the contact **deleted** this message for everyone (WhatsApp allows it for two days). The message stays in the thread with no `text` and no files.
|
|
4572
4577
|
*/
|
|
4573
4578
|
deleted_date?: string;
|
|
4579
|
+
/**
|
|
4580
|
+
* @description Only on messages **we** sent (`contact_id`): how far the message got, like the ticks in WhatsApp. `sent` means the network accepted it, `delivered` that it reached the contact's device, `read` that the contact saw it, and `failed` that the network rejected it (`message_errors` says why).
|
|
4581
|
+
*
|
|
4582
|
+
* It only moves forward, and each network reports what it can. WhatsApp and Messenger report all three steps, Instagram reports `sent` and `read` (it does not report delivery), and Bluesky only `sent`. A read receipt also covers the earlier messages to that contact, the same as opening the chat.
|
|
4583
|
+
*
|
|
4584
|
+
* Absent when PlanVortex does not know: messages from the contact, messages sent before 15 November 2026 and messages imported from the network's history.
|
|
4585
|
+
*
|
|
4586
|
+
* No webhook event is sent for `delivered`: read the field on the message. A `read` arrives as `messaging_seen`.
|
|
4587
|
+
* @enum {string}
|
|
4588
|
+
*/
|
|
4589
|
+
delivery_status?: "sent" | "delivered" | "read" | "failed";
|
|
4574
4590
|
/**
|
|
4575
4591
|
* Format: date-time
|
|
4576
4592
|
* @description When the contact **edited** this message on the network (WhatsApp allows it for 15 minutes). `text` is already the edited text; the original is not kept.
|
|
@@ -4611,6 +4627,7 @@ interface components {
|
|
|
4611
4627
|
*/
|
|
4612
4628
|
emoji: string;
|
|
4613
4629
|
}[];
|
|
4630
|
+
/** @description On a message from the contact, whether someone has read it in PlanVortex. On one of ours it is **not** a read receipt (messages sent from the WhatsApp Business app, or imported from the network, are stored as read): use `delivery_status`. */
|
|
4614
4631
|
read: boolean;
|
|
4615
4632
|
/** @description Absent on the messages that carry no text of their own, such as a `messaging_seen` acknowledgement. */
|
|
4616
4633
|
text?: string;
|
|
@@ -4728,7 +4745,7 @@ interface components {
|
|
|
4728
4745
|
actual_asigned?: components["schemas"]["PlanData"];
|
|
4729
4746
|
/** @description The slice of the client's plan assigned to this organization. **Absent when nothing was assigned**, and then the organization shares whatever its nearest parent with a plan has — or, failing that, the client's unassigned remainder. Ask `GET /organizations/{id_organization}/limits` for the effective numbers instead of reading this. */
|
|
4730
4747
|
actual_plan?: components["schemas"]["PlanData"];
|
|
4731
|
-
/** @description
|
|
4748
|
+
/** @description What the plan this organization draws from is using, which is the figure the server checks before letting one more account or integration in: the owner of that plan (this organization if it has a plan of its own, otherwise its nearest parent with one, otherwise the client's shared pool) plus the folders without a plan below it. Organizations sharing a pool therefore show the same `actual_use`; what each one uses on its own is `own_use`. **Only present with `getUse=true`.** `twitter_credits` and `ai_credits` are what has been spent in the current calendar month; the rest is what exists right now. */
|
|
4732
4749
|
actual_use?: components["schemas"]["PlanUseData"];
|
|
4733
4750
|
ai_context?: components["schemas"]["AiContext"];
|
|
4734
4751
|
/** Format: date-time */
|
|
@@ -4736,6 +4753,8 @@ interface components {
|
|
|
4736
4753
|
/** @description The client this organization belongs to. */
|
|
4737
4754
|
id_client: string;
|
|
4738
4755
|
name: string;
|
|
4756
|
+
/** @description What THIS organization uses on its own, without the folders it shares a plan with. **Only present with `getUse=true`.** `actual_use` is the consumption of the whole pool this organization draws from (the same figure the server checks before letting one more account in), so every organization without a plan of its own shows the same `actual_use`; `own_use` is what hangs from this one. Adding up the `own_use` of the organizations that share a pool gives that pool's `actual_use`. On an organization with a plan of its own and no folders below it, both are the same. */
|
|
4757
|
+
own_use?: components["schemas"]["PlanUseData"];
|
|
4739
4758
|
/** @description The organization this one hangs from. Absent on a root organization. */
|
|
4740
4759
|
parent_organization?: string;
|
|
4741
4760
|
/** @description The organization's own application credentials, by network. A network that is absent is not configured, and then it does not even appear as connectable. */
|
|
@@ -8488,7 +8507,7 @@ interface operations {
|
|
|
8488
8507
|
* | --- | --- |
|
|
8489
8508
|
* | `700` | The account has no usable token: it has to be connected again |
|
|
8490
8509
|
* | `706` | The organization has no account slots left in its plan |
|
|
8491
|
-
* | `516` | The plan is free and this network needs a paid plan (today, `whatsapp`) |
|
|
8510
|
+
* | `516` | The plan is free and this network needs a paid plan (today, `whatsapp` and `google_business`) |
|
|
8492
8511
|
* | `519` | This endpoint does not accept app credentials |
|
|
8493
8512
|
* | `544` | This temporal connect token was issued for a different social network |
|
|
8494
8513
|
*/
|
|
@@ -9850,7 +9869,7 @@ interface operations {
|
|
|
9850
9869
|
* | `553` | Some account is not part of this session. `data.accounts` lists them |
|
|
9851
9870
|
* | `706` | The new accounts do not fit in the plan. `data` carries `limit`, `used` and `requested`, and none was enabled |
|
|
9852
9871
|
* | `1101` | Invalid organization |
|
|
9853
|
-
* | `516` | The plan is free and one of the accounts belongs to a network that needs a paid plan (today, `whatsapp`) |
|
|
9872
|
+
* | `516` | The plan is free and one of the accounts belongs to a network that needs a paid plan (today, `whatsapp` and `google_business`) |
|
|
9854
9873
|
*/
|
|
9855
9874
|
400: {
|
|
9856
9875
|
headers: {
|
|
@@ -11974,7 +11993,7 @@ interface operations {
|
|
|
11974
11993
|
* | Code | Meaning |
|
|
11975
11994
|
* | --- | --- |
|
|
11976
11995
|
* | `514` | This endpoint needs app credentials: neither a user token nor a temporal connect token can issue one |
|
|
11977
|
-
* | `516` | The plan is free, `social_network` needs a paid plan (today, `whatsapp`) and the organization has no active account of it to reconnect |
|
|
11996
|
+
* | `516` | The plan is free, `social_network` needs a paid plan (today, `whatsapp` and `google_business`) and the organization has no active account of it to reconnect |
|
|
11978
11997
|
* | `532` | `redirect_uri` is not one of the app's registered `redirect_urls` |
|
|
11979
11998
|
* | `549` | `account_selection` is not `planvortex` or `integrator`, or it is `integrator` without `redirect_uri` or `social_network`. `data` says which |
|
|
11980
11999
|
* | `550` | `account_selection=integrator` on a network with no return to the browser (`telegram`) |
|
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.
|
|
7
|
+
var VERSION = "0.22.0";
|
|
8
8
|
|
|
9
9
|
// src/core/errors.ts
|
|
10
10
|
var PLANVORTEX_ERROR_RANGES = [
|
|
@@ -2488,12 +2488,21 @@ var OrganizationsResource = class extends Resource {
|
|
|
2488
2488
|
/**
|
|
2489
2489
|
* El consumo de esta organización y lo que ya tiene repartido a sus hijas.
|
|
2490
2490
|
*
|
|
2491
|
-
* Es un atajo de `get(id, {getUse: true})` que devuelve sólo
|
|
2491
|
+
* Es un atajo de `get(id, {getUse: true})` que devuelve sólo esas cifras, que es lo que se
|
|
2492
2492
|
* quiere cuando se está pintando una barra de "3 de 5 cuentas".
|
|
2493
|
+
*
|
|
2494
|
+
* Ojo con cuál se pinta: `actual_use` es el de la BOLSA de la que tira la organización (ella
|
|
2495
|
+
* más las carpetas sin plan que gastan de ella), el mismo con el que el servidor decide si
|
|
2496
|
+
* cabe una cuenta más, así que todas las que comparten bolsa dan la misma cifra. Lo de ésta
|
|
2497
|
+
* sola es `own_use`, ausente con un servidor anterior a noviembre de 2026.
|
|
2493
2498
|
*/
|
|
2494
2499
|
async use(idOrganization, options = {}) {
|
|
2495
2500
|
const organization = await this.get(idOrganization, { ...options, getUse: true });
|
|
2496
|
-
return {
|
|
2501
|
+
return {
|
|
2502
|
+
actual_use: organization.actual_use,
|
|
2503
|
+
actual_asigned: organization.actual_asigned,
|
|
2504
|
+
own_use: organization.own_use
|
|
2505
|
+
};
|
|
2497
2506
|
}
|
|
2498
2507
|
/**
|
|
2499
2508
|
* Emite el token temporal con el que **una persona** conecta una cuenta social a esta
|