planvortex 0.8.0 → 0.9.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-DteI6Aqt.d.cts → index-Cgvnq4LI.d.cts} +24 -22
- package/dist/{index-DteI6Aqt.d.ts → index-Cgvnq4LI.d.ts} +24 -22
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- 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 +2 -2
|
@@ -172,7 +172,7 @@ interface paths {
|
|
|
172
172
|
get?: never;
|
|
173
173
|
/**
|
|
174
174
|
* Configure the client's own AI models (BYOK)
|
|
175
|
-
* @description Set the client's Bring-Your-Own-Key AI provider configuration per scope. The request body is an object keyed by scope (orchestrator, text, image); a scope set to null clears it. Providers and capabilities are validated against a fixed catalogue. When a scope uses BYOK, its calls are billed to the client's own provider and do NOT consume PlanVortex AI credits, but the
|
|
175
|
+
* @description Set the client's Bring-Your-Own-Key AI provider configuration per scope. The request body is an object keyed by scope (orchestrator, text, image); a scope set to null clears it. Providers and capabilities are validated against a fixed catalogue. When a scope uses BYOK, its calls are billed to the client's own provider and do NOT consume PlanVortex AI credits, but the plan still has to include AI credits to use the feature. API keys are stored encrypted and never returned; the response client only exposes provider, model and has_api_key per scope. Requires the client:update permission.
|
|
176
176
|
*/
|
|
177
177
|
put: operations["updateAiSettings"];
|
|
178
178
|
post?: never;
|
|
@@ -193,7 +193,7 @@ interface paths {
|
|
|
193
193
|
* List the client's apps
|
|
194
194
|
* @description The apps of a client. Secrets never travel here: to read one, ask for it explicitly with the `secret` endpoint.
|
|
195
195
|
*
|
|
196
|
-
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`.
|
|
196
|
+
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`. **No plan is required**: apps are on all four plans, the free one included — what the plan decides is how many you can hold at once and how fast you can call.
|
|
197
197
|
*/
|
|
198
198
|
get: operations["getClientApps"];
|
|
199
199
|
put?: never;
|
|
@@ -201,15 +201,15 @@ interface paths {
|
|
|
201
201
|
* Create an app
|
|
202
202
|
* @description Creates the app and its credentials.
|
|
203
203
|
*
|
|
204
|
-
* **
|
|
204
|
+
* **How many apps fit is decided by the plan**, not by a fixed limit of one: 1 on free, 2 on basic, 5 on pro and 10 on custom. Going over answers `ERROR_CODE_1308`, which carries `limit` and `used` in its `data`. Deleting an app frees its slot immediately, because only live apps count. If you just need to rotate credentials, update the existing app rather than creating another.
|
|
205
|
+
*
|
|
206
|
+
* **The user's email must be verified** (`ERROR_CODE_546`). This is the only route in `/apps` that asks for it: an app is a key to the whole public API, and this is what stops a throwaway address from minting them in bulk. Reading, updating and deleting an app you already own do not check it.
|
|
205
207
|
*
|
|
206
208
|
* Every URL is validated: a bad entry in `allowed_domains` answers 531, in `redirect_urls` 532, and a bad `webhook_url` answers 535.
|
|
207
209
|
*
|
|
208
210
|
* **The secret is not in the response.** Read it with `GET /clients/{id_client}/apps/{id_app}/secret`.
|
|
209
211
|
*
|
|
210
|
-
* **
|
|
211
|
-
*
|
|
212
|
-
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`. It also needs the **Custom plan** (`ERROR_CODE_542`): apps are what that plan adds, and they are the door to this whole API.
|
|
212
|
+
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`. **No plan is required**: apps are on all four plans, the free one included — what the plan decides is how many you can hold at once and how fast you can call.
|
|
213
213
|
*/
|
|
214
214
|
post: operations["createClientApp"];
|
|
215
215
|
delete?: never;
|
|
@@ -229,7 +229,7 @@ interface paths {
|
|
|
229
229
|
* Get one app
|
|
230
230
|
* @description The app's record, without its secret. Note the envelope: `{client_app}` here, `{client_apps, total}` in the list.
|
|
231
231
|
*
|
|
232
|
-
* **An app token works here.** This is the one part of `/apps` that does: an app can read and update its own record, but it cannot list, create, delete, or read the secret.
|
|
232
|
+
* **An app token works here.** This is the one part of `/apps` that does: an app can read and update its own record, but it cannot list, create, delete, or read the secret. **No plan is required**: apps are on all four plans, the free one included.
|
|
233
233
|
*/
|
|
234
234
|
get: operations["getClientApp"];
|
|
235
235
|
/**
|
|
@@ -240,7 +240,7 @@ interface paths {
|
|
|
240
240
|
*
|
|
241
241
|
* **It replaces every field with what the body carries.** `name`, `keycloak_client_idenfifier`, `allowed_domains`, `redirect_urls` and `webhook_url` are all written as sent, so omitting one erases it — sending an update without `webhook_url` turns the webhook off. Read the app first and send it back whole.
|
|
242
242
|
*
|
|
243
|
-
* **An app token works here.** This is the one part of `/apps` that does: an app can read and update its own record, but it cannot list, create, delete, or read the secret.
|
|
243
|
+
* **An app token works here.** This is the one part of `/apps` that does: an app can read and update its own record, but it cannot list, create, delete, or read the secret. **No plan is required**: apps are on all four plans, the free one included.
|
|
244
244
|
*/
|
|
245
245
|
put: operations["updateClientApp"];
|
|
246
246
|
post?: never;
|
|
@@ -248,7 +248,7 @@ interface paths {
|
|
|
248
248
|
* Delete an app
|
|
249
249
|
* @description Revokes the credentials and marks the app as deleted. **Tokens already issued stop working**: the token endpoint checks that the app still exists before answering, and requests carrying an old token no longer resolve to an app.
|
|
250
250
|
*
|
|
251
|
-
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`.
|
|
251
|
+
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`. **No plan is required**: apps are on all four plans, the free one included — what the plan decides is how many you can hold at once and how fast you can call.
|
|
252
252
|
*/
|
|
253
253
|
delete: operations["deleteClientApp"];
|
|
254
254
|
options?: never;
|
|
@@ -269,7 +269,7 @@ interface paths {
|
|
|
269
269
|
*
|
|
270
270
|
* The same secret is what signs the outgoing webhooks (`x-hub-signature`, `x-hub-signature-256`).
|
|
271
271
|
*
|
|
272
|
-
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`.
|
|
272
|
+
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`. **No plan is required**: apps are on all four plans, the free one included — what the plan decides is how many you can hold at once and how fast you can call.
|
|
273
273
|
*
|
|
274
274
|
* It comes straight from Keycloak, so it is the live secret and not a copy: treat the response as a credential and never log it.
|
|
275
275
|
*/
|
|
@@ -351,7 +351,7 @@ interface paths {
|
|
|
351
351
|
put?: never;
|
|
352
352
|
/**
|
|
353
353
|
* Create an AI publication plan
|
|
354
|
-
* @description Create a weekly AI publication plan. The plan is queued in state 'pending' and generated asynchronously by the generate-ai-plans job; poll GET by id while state is pending or generating. Validations at creation: the client plan allows AI (
|
|
354
|
+
* @description Create a weekly AI publication plan. The plan is queued in state 'pending' and generated asynchronously by the generate-ai-plans job; poll GET by id while state is pending or generating. Validations at creation: the client plan allows AI (it contracts AI credits; Free does not), the accounts belong to the organization, there are enough AI credits for the deterministic base cost (orchestration + target texts), and there is room in the organization's monthly publication limit. Returns the created plan together with the deterministic cost estimate. Requires the ai_plans:create permission. Since the plan can be generated from a SOURCE (`template` + `source`), part of that validation is the source itself: the article is downloaded, the catalogue is read live and the product pictures are copied — all of it inside this request, so what does not work fails with the user in front of it. A plan whose source did not fit in the week is still created, and says so in ai_plan.warnings (2117).
|
|
355
355
|
*/
|
|
356
356
|
post: operations["addAiPlan"];
|
|
357
357
|
delete?: never;
|
|
@@ -752,6 +752,8 @@ interface paths {
|
|
|
752
752
|
* **A temporal connect token is spent here.** Once this call succeeds, that token cannot connect anything else and answers error 543; the `enable` calls that finish the same connection still work until it expires. And if the token was issued for one network, calling this for another answers error 544.
|
|
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
|
+
*
|
|
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.
|
|
755
757
|
*/
|
|
756
758
|
get: operations["connectAccount"];
|
|
757
759
|
put?: never;
|
|
@@ -896,6 +898,8 @@ interface paths {
|
|
|
896
898
|
* @description Brings back an account that was removed, without going through the authorization again — as long as its stored token still works.
|
|
897
899
|
*
|
|
898
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
|
+
*
|
|
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.
|
|
899
903
|
*/
|
|
900
904
|
post: operations["enableAccount"];
|
|
901
905
|
delete?: never;
|
|
@@ -4030,33 +4034,31 @@ interface components {
|
|
|
4030
4034
|
total?: number;
|
|
4031
4035
|
users?: components["schemas"]["OrganizationsUser"][];
|
|
4032
4036
|
};
|
|
4033
|
-
/**
|
|
4037
|
+
/**
|
|
4038
|
+
* @description The resources a plan grants. On a client it is what was contracted; on an organization, the slice of it that was assigned. The sum across all the organizations of a client can never exceed what the client has contracted.
|
|
4039
|
+
*
|
|
4040
|
+
* Users are NOT here: every plan has unlimited users, so they are neither charged nor split between organizations. They are still counted, in `PlanUseData.users`. There are no `artificial_inteligence`, `whatsapp` or `stats` flags either: statistics and WhatsApp are on every plan, and what gates AI is `ai_credits` — a plan with credits has AI, and Free has zero.
|
|
4041
|
+
*/
|
|
4034
4042
|
PlanData: {
|
|
4035
4043
|
/** @description Social accounts that may be connected. */
|
|
4036
4044
|
accounts: number;
|
|
4037
4045
|
/** @description Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope. */
|
|
4038
4046
|
ai_credits?: number;
|
|
4039
|
-
/** @description Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a `client_id` with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts
|
|
4047
|
+
/** @description Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a `client_id` with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now. */
|
|
4040
4048
|
apps?: number;
|
|
4041
|
-
/** @description Whether AI generation is enabled. */
|
|
4042
|
-
artificial_inteligence?: boolean;
|
|
4043
4049
|
/** @description Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in `apps`. */
|
|
4044
4050
|
integrations: number;
|
|
4045
4051
|
/** @description Storage, in GB. */
|
|
4046
4052
|
space: number;
|
|
4047
|
-
/** @description Whether statistics collection is enabled. */
|
|
4048
|
-
stats?: boolean;
|
|
4049
4053
|
/** @description Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over. */
|
|
4050
4054
|
twitter_credits?: number;
|
|
4051
|
-
/** @description Users with access. */
|
|
4052
|
-
users: number;
|
|
4053
|
-
/** @description Whether WhatsApp may be connected. */
|
|
4054
|
-
whatsapp?: boolean;
|
|
4055
4055
|
};
|
|
4056
|
-
/** @description What is being consumed right now. Same shape as PlanData plus `publications`, which
|
|
4056
|
+
/** @description What is being consumed right now. Same shape as PlanData plus `publications` and `users`, which are counted but neither charged nor split between organizations. */
|
|
4057
4057
|
PlanUseData: {
|
|
4058
4058
|
/** @description Publications created in the current calendar month. A METRIC, not a quota: publications are unlimited on every plan, so there is no limit to compare it against. What throttles publishing is rate, not plan — see the per-hour and per-network daily caps. */
|
|
4059
4059
|
publications?: number;
|
|
4060
|
+
/** @description Users with access right now. A METRIC, not a quota: users are unlimited on every plan, so there is no limit to compare it against. */
|
|
4061
|
+
users?: number;
|
|
4060
4062
|
} & components["schemas"]["PlanData"];
|
|
4061
4063
|
/** @description A product as the network returns it. `id` is always present here. */
|
|
4062
4064
|
ProductsProduct: components["schemas"]["ProductsProductInput"];
|
|
@@ -172,7 +172,7 @@ interface paths {
|
|
|
172
172
|
get?: never;
|
|
173
173
|
/**
|
|
174
174
|
* Configure the client's own AI models (BYOK)
|
|
175
|
-
* @description Set the client's Bring-Your-Own-Key AI provider configuration per scope. The request body is an object keyed by scope (orchestrator, text, image); a scope set to null clears it. Providers and capabilities are validated against a fixed catalogue. When a scope uses BYOK, its calls are billed to the client's own provider and do NOT consume PlanVortex AI credits, but the
|
|
175
|
+
* @description Set the client's Bring-Your-Own-Key AI provider configuration per scope. The request body is an object keyed by scope (orchestrator, text, image); a scope set to null clears it. Providers and capabilities are validated against a fixed catalogue. When a scope uses BYOK, its calls are billed to the client's own provider and do NOT consume PlanVortex AI credits, but the plan still has to include AI credits to use the feature. API keys are stored encrypted and never returned; the response client only exposes provider, model and has_api_key per scope. Requires the client:update permission.
|
|
176
176
|
*/
|
|
177
177
|
put: operations["updateAiSettings"];
|
|
178
178
|
post?: never;
|
|
@@ -193,7 +193,7 @@ interface paths {
|
|
|
193
193
|
* List the client's apps
|
|
194
194
|
* @description The apps of a client. Secrets never travel here: to read one, ask for it explicitly with the `secret` endpoint.
|
|
195
195
|
*
|
|
196
|
-
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`.
|
|
196
|
+
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`. **No plan is required**: apps are on all four plans, the free one included — what the plan decides is how many you can hold at once and how fast you can call.
|
|
197
197
|
*/
|
|
198
198
|
get: operations["getClientApps"];
|
|
199
199
|
put?: never;
|
|
@@ -201,15 +201,15 @@ interface paths {
|
|
|
201
201
|
* Create an app
|
|
202
202
|
* @description Creates the app and its credentials.
|
|
203
203
|
*
|
|
204
|
-
* **
|
|
204
|
+
* **How many apps fit is decided by the plan**, not by a fixed limit of one: 1 on free, 2 on basic, 5 on pro and 10 on custom. Going over answers `ERROR_CODE_1308`, which carries `limit` and `used` in its `data`. Deleting an app frees its slot immediately, because only live apps count. If you just need to rotate credentials, update the existing app rather than creating another.
|
|
205
|
+
*
|
|
206
|
+
* **The user's email must be verified** (`ERROR_CODE_546`). This is the only route in `/apps` that asks for it: an app is a key to the whole public API, and this is what stops a throwaway address from minting them in bulk. Reading, updating and deleting an app you already own do not check it.
|
|
205
207
|
*
|
|
206
208
|
* Every URL is validated: a bad entry in `allowed_domains` answers 531, in `redirect_urls` 532, and a bad `webhook_url` answers 535.
|
|
207
209
|
*
|
|
208
210
|
* **The secret is not in the response.** Read it with `GET /clients/{id_client}/apps/{id_app}/secret`.
|
|
209
211
|
*
|
|
210
|
-
* **
|
|
211
|
-
*
|
|
212
|
-
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`. It also needs the **Custom plan** (`ERROR_CODE_542`): apps are what that plan adds, and they are the door to this whole API.
|
|
212
|
+
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`. **No plan is required**: apps are on all four plans, the free one included — what the plan decides is how many you can hold at once and how fast you can call.
|
|
213
213
|
*/
|
|
214
214
|
post: operations["createClientApp"];
|
|
215
215
|
delete?: never;
|
|
@@ -229,7 +229,7 @@ interface paths {
|
|
|
229
229
|
* Get one app
|
|
230
230
|
* @description The app's record, without its secret. Note the envelope: `{client_app}` here, `{client_apps, total}` in the list.
|
|
231
231
|
*
|
|
232
|
-
* **An app token works here.** This is the one part of `/apps` that does: an app can read and update its own record, but it cannot list, create, delete, or read the secret.
|
|
232
|
+
* **An app token works here.** This is the one part of `/apps` that does: an app can read and update its own record, but it cannot list, create, delete, or read the secret. **No plan is required**: apps are on all four plans, the free one included.
|
|
233
233
|
*/
|
|
234
234
|
get: operations["getClientApp"];
|
|
235
235
|
/**
|
|
@@ -240,7 +240,7 @@ interface paths {
|
|
|
240
240
|
*
|
|
241
241
|
* **It replaces every field with what the body carries.** `name`, `keycloak_client_idenfifier`, `allowed_domains`, `redirect_urls` and `webhook_url` are all written as sent, so omitting one erases it — sending an update without `webhook_url` turns the webhook off. Read the app first and send it back whole.
|
|
242
242
|
*
|
|
243
|
-
* **An app token works here.** This is the one part of `/apps` that does: an app can read and update its own record, but it cannot list, create, delete, or read the secret.
|
|
243
|
+
* **An app token works here.** This is the one part of `/apps` that does: an app can read and update its own record, but it cannot list, create, delete, or read the secret. **No plan is required**: apps are on all four plans, the free one included.
|
|
244
244
|
*/
|
|
245
245
|
put: operations["updateClientApp"];
|
|
246
246
|
post?: never;
|
|
@@ -248,7 +248,7 @@ interface paths {
|
|
|
248
248
|
* Delete an app
|
|
249
249
|
* @description Revokes the credentials and marks the app as deleted. **Tokens already issued stop working**: the token endpoint checks that the app still exists before answering, and requests carrying an old token no longer resolve to an app.
|
|
250
250
|
*
|
|
251
|
-
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`.
|
|
251
|
+
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`. **No plan is required**: apps are on all four plans, the free one included — what the plan decides is how many you can hold at once and how fast you can call.
|
|
252
252
|
*/
|
|
253
253
|
delete: operations["deleteClientApp"];
|
|
254
254
|
options?: never;
|
|
@@ -269,7 +269,7 @@ interface paths {
|
|
|
269
269
|
*
|
|
270
270
|
* The same secret is what signs the outgoing webhooks (`x-hub-signature`, `x-hub-signature-256`).
|
|
271
271
|
*
|
|
272
|
-
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`.
|
|
272
|
+
* **Needs a USER token, not an app token.** With client credentials it answers `ERROR_CODE_512`. **No plan is required**: apps are on all four plans, the free one included — what the plan decides is how many you can hold at once and how fast you can call.
|
|
273
273
|
*
|
|
274
274
|
* It comes straight from Keycloak, so it is the live secret and not a copy: treat the response as a credential and never log it.
|
|
275
275
|
*/
|
|
@@ -351,7 +351,7 @@ interface paths {
|
|
|
351
351
|
put?: never;
|
|
352
352
|
/**
|
|
353
353
|
* Create an AI publication plan
|
|
354
|
-
* @description Create a weekly AI publication plan. The plan is queued in state 'pending' and generated asynchronously by the generate-ai-plans job; poll GET by id while state is pending or generating. Validations at creation: the client plan allows AI (
|
|
354
|
+
* @description Create a weekly AI publication plan. The plan is queued in state 'pending' and generated asynchronously by the generate-ai-plans job; poll GET by id while state is pending or generating. Validations at creation: the client plan allows AI (it contracts AI credits; Free does not), the accounts belong to the organization, there are enough AI credits for the deterministic base cost (orchestration + target texts), and there is room in the organization's monthly publication limit. Returns the created plan together with the deterministic cost estimate. Requires the ai_plans:create permission. Since the plan can be generated from a SOURCE (`template` + `source`), part of that validation is the source itself: the article is downloaded, the catalogue is read live and the product pictures are copied — all of it inside this request, so what does not work fails with the user in front of it. A plan whose source did not fit in the week is still created, and says so in ai_plan.warnings (2117).
|
|
355
355
|
*/
|
|
356
356
|
post: operations["addAiPlan"];
|
|
357
357
|
delete?: never;
|
|
@@ -752,6 +752,8 @@ interface paths {
|
|
|
752
752
|
* **A temporal connect token is spent here.** Once this call succeeds, that token cannot connect anything else and answers error 543; the `enable` calls that finish the same connection still work until it expires. And if the token was issued for one network, calling this for another answers error 544.
|
|
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
|
+
*
|
|
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.
|
|
755
757
|
*/
|
|
756
758
|
get: operations["connectAccount"];
|
|
757
759
|
put?: never;
|
|
@@ -896,6 +898,8 @@ interface paths {
|
|
|
896
898
|
* @description Brings back an account that was removed, without going through the authorization again — as long as its stored token still works.
|
|
897
899
|
*
|
|
898
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
|
+
*
|
|
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.
|
|
899
903
|
*/
|
|
900
904
|
post: operations["enableAccount"];
|
|
901
905
|
delete?: never;
|
|
@@ -4030,33 +4034,31 @@ interface components {
|
|
|
4030
4034
|
total?: number;
|
|
4031
4035
|
users?: components["schemas"]["OrganizationsUser"][];
|
|
4032
4036
|
};
|
|
4033
|
-
/**
|
|
4037
|
+
/**
|
|
4038
|
+
* @description The resources a plan grants. On a client it is what was contracted; on an organization, the slice of it that was assigned. The sum across all the organizations of a client can never exceed what the client has contracted.
|
|
4039
|
+
*
|
|
4040
|
+
* Users are NOT here: every plan has unlimited users, so they are neither charged nor split between organizations. They are still counted, in `PlanUseData.users`. There are no `artificial_inteligence`, `whatsapp` or `stats` flags either: statistics and WhatsApp are on every plan, and what gates AI is `ai_credits` — a plan with credits has AI, and Free has zero.
|
|
4041
|
+
*/
|
|
4034
4042
|
PlanData: {
|
|
4035
4043
|
/** @description Social accounts that may be connected. */
|
|
4036
4044
|
accounts: number;
|
|
4037
4045
|
/** @description Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope. */
|
|
4038
4046
|
ai_credits?: number;
|
|
4039
|
-
/** @description Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a `client_id` with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts
|
|
4047
|
+
/** @description Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a `client_id` with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now. */
|
|
4040
4048
|
apps?: number;
|
|
4041
|
-
/** @description Whether AI generation is enabled. */
|
|
4042
|
-
artificial_inteligence?: boolean;
|
|
4043
4049
|
/** @description Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in `apps`. */
|
|
4044
4050
|
integrations: number;
|
|
4045
4051
|
/** @description Storage, in GB. */
|
|
4046
4052
|
space: number;
|
|
4047
|
-
/** @description Whether statistics collection is enabled. */
|
|
4048
|
-
stats?: boolean;
|
|
4049
4053
|
/** @description Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over. */
|
|
4050
4054
|
twitter_credits?: number;
|
|
4051
|
-
/** @description Users with access. */
|
|
4052
|
-
users: number;
|
|
4053
|
-
/** @description Whether WhatsApp may be connected. */
|
|
4054
|
-
whatsapp?: boolean;
|
|
4055
4055
|
};
|
|
4056
|
-
/** @description What is being consumed right now. Same shape as PlanData plus `publications`, which
|
|
4056
|
+
/** @description What is being consumed right now. Same shape as PlanData plus `publications` and `users`, which are counted but neither charged nor split between organizations. */
|
|
4057
4057
|
PlanUseData: {
|
|
4058
4058
|
/** @description Publications created in the current calendar month. A METRIC, not a quota: publications are unlimited on every plan, so there is no limit to compare it against. What throttles publishing is rate, not plan — see the per-hour and per-network daily caps. */
|
|
4059
4059
|
publications?: number;
|
|
4060
|
+
/** @description Users with access right now. A METRIC, not a quota: users are unlimited on every plan, so there is no limit to compare it against. */
|
|
4061
|
+
users?: number;
|
|
4060
4062
|
} & components["schemas"]["PlanData"];
|
|
4061
4063
|
/** @description A product as the network returns it. `id` is always present here. */
|
|
4062
4064
|
ProductsProduct: components["schemas"]["ProductsProductInput"];
|