planvortex 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +153 -30
- package/dist/{chunk-B4DEHU6Q.js → chunk-HSMIRBF3.js} +3 -3
- package/dist/{chunk-B4DEHU6Q.js.map → chunk-HSMIRBF3.js.map} +1 -1
- package/dist/{index-CUrq0B7g.d.cts → index-DOC-BT2F.d.cts} +819 -367
- package/dist/{index-CUrq0B7g.d.ts → index-DOC-BT2F.d.ts} +819 -367
- package/dist/index.cjs +1249 -109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +945 -8
- package/dist/index.d.ts +945 -8
- package/dist/index.js +1241 -111
- package/dist/index.js.map +1 -1
- package/dist/webhooks/index.cjs +1 -1
- package/dist/webhooks/index.cjs.map +1 -1
- package/dist/webhooks/index.d.cts +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.js +1 -1
- package/package.json +1 -1
|
@@ -192,6 +192,8 @@ interface paths {
|
|
|
192
192
|
/**
|
|
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
|
+
*
|
|
196
|
+
* **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.
|
|
195
197
|
*/
|
|
196
198
|
get: operations["getClientApps"];
|
|
197
199
|
put?: never;
|
|
@@ -204,6 +206,10 @@ interface paths {
|
|
|
204
206
|
* Every URL is validated: a bad entry in `allowed_domains` answers 531, in `redirect_urls` 532, and a bad `webhook_url` answers 535.
|
|
205
207
|
*
|
|
206
208
|
* **The secret is not in the response.** Read it with `GET /clients/{id_client}/apps/{id_app}/secret`.
|
|
209
|
+
*
|
|
210
|
+
* **A client can only have ONE app.** Creating a second one is rejected with `ERROR_CODE_536`: delete or update the one that exists. The listing is paginated because every listing in this API is, not because there can be more than one.
|
|
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.
|
|
207
213
|
*/
|
|
208
214
|
post: operations["createClientApp"];
|
|
209
215
|
delete?: never;
|
|
@@ -222,6 +228,8 @@ interface paths {
|
|
|
222
228
|
/**
|
|
223
229
|
* Get one app
|
|
224
230
|
* @description The app's record, without its secret. Note the envelope: `{client_app}` here, `{client_apps, total}` in the list.
|
|
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. The **Custom plan** is still required (`ERROR_CODE_542`).
|
|
225
233
|
*/
|
|
226
234
|
get: operations["getClientApp"];
|
|
227
235
|
/**
|
|
@@ -229,12 +237,18 @@ interface paths {
|
|
|
229
237
|
* @description Replaces the app's configuration. **Every field is overwritten with what you send**, so a `redirect_urls` you leave out becomes an empty list — send the whole object, not a patch.
|
|
230
238
|
*
|
|
231
239
|
* Changing `webhook_url` takes effect on the next event; there is no verification handshake.
|
|
240
|
+
*
|
|
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
|
+
*
|
|
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. The **Custom plan** is still required (`ERROR_CODE_542`).
|
|
232
244
|
*/
|
|
233
245
|
put: operations["updateClientApp"];
|
|
234
246
|
post?: never;
|
|
235
247
|
/**
|
|
236
248
|
* Delete an app
|
|
237
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
|
+
*
|
|
251
|
+
* **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.
|
|
238
252
|
*/
|
|
239
253
|
delete: operations["deleteClientApp"];
|
|
240
254
|
options?: never;
|
|
@@ -254,6 +268,10 @@ interface paths {
|
|
|
254
268
|
* @description Returns the `client_secret` in clear. It is a separate endpoint precisely so that the secret never travels inside a listing that gets logged, cached or drawn on a screen by accident.
|
|
255
269
|
*
|
|
256
270
|
* The same secret is what signs the outgoing webhooks (`x-hub-signature`, `x-hub-signature-256`).
|
|
271
|
+
*
|
|
272
|
+
* **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.
|
|
273
|
+
*
|
|
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.
|
|
257
275
|
*/
|
|
258
276
|
get: operations["getClientAppSecret"];
|
|
259
277
|
put?: never;
|
|
@@ -322,6 +340,10 @@ interface paths {
|
|
|
322
340
|
/**
|
|
323
341
|
* List AI publication plans
|
|
324
342
|
* @description Return the organization's AI plans ordered by creation date (desc), paginated. Requires the ai_plans:read permission.
|
|
343
|
+
*
|
|
344
|
+
* **Cancelled plans are not listed.** Deleting a plan sets it to `cancelled` rather than removing it, and this listing filters those out — so a plan you deleted simply stops appearing, while `GET` by id still returns it.
|
|
345
|
+
*
|
|
346
|
+
* Without `limit` the whole list comes back.
|
|
325
347
|
*/
|
|
326
348
|
get: operations["getAiPlans"];
|
|
327
349
|
put?: never;
|
|
@@ -840,6 +862,8 @@ interface paths {
|
|
|
840
862
|
* @description The templates the **network** has approved for this account. They are read live from the network, not from our database, so a template approved a minute ago shows up here.
|
|
841
863
|
*
|
|
842
864
|
* The shape of a template is the network's own: PlanVortex does not normalise it.
|
|
865
|
+
*
|
|
866
|
+
* **WhatsApp only.** No other network implements message templates: asking any of them returns HTTP 500 with `code: 500` (an unhandled server error), not the 1502 you would expect. Check `messages` in `GET /social_capabilities` and that the account is WhatsApp before calling.
|
|
843
867
|
*/
|
|
844
868
|
get: operations["getMessageTemplates"];
|
|
845
869
|
put?: never;
|
|
@@ -848,11 +872,15 @@ interface paths {
|
|
|
848
872
|
* @description Sends a template to the network for approval. The body travels to the network as it is, so its fields are the network's (for WhatsApp: `name`, `language`, `category`, `components`).
|
|
849
873
|
*
|
|
850
874
|
* **Approval is not immediate.** The template comes back in a pending state and only becomes usable when the network approves it, which takes minutes or hours and can be refused.
|
|
875
|
+
*
|
|
876
|
+
* **WhatsApp only.** No other network implements message templates: asking any of them returns HTTP 500 with `code: 500` (an unhandled server error), not the 1502 you would expect. Check `messages` in `GET /social_capabilities` and that the account is WhatsApp before calling.
|
|
851
877
|
*/
|
|
852
878
|
post: operations["createMessageTemplate"];
|
|
853
879
|
/**
|
|
854
880
|
* Delete a message template
|
|
855
881
|
* @description Deletes the template on the network. **The template is identified by query parameters, not by a path segment**, and WhatsApp needs both the id and the name.
|
|
882
|
+
*
|
|
883
|
+
* **WhatsApp only.** No other network implements message templates: asking any of them returns HTTP 500 with `code: 500` (an unhandled server error), not the 1502 you would expect. Check `messages` in `GET /social_capabilities` and that the account is WhatsApp before calling.
|
|
856
884
|
*/
|
|
857
885
|
delete: operations["deleteMessageTemplate"];
|
|
858
886
|
options?: never;
|
|
@@ -992,6 +1020,8 @@ interface paths {
|
|
|
992
1020
|
/**
|
|
993
1021
|
* List products
|
|
994
1022
|
* @description The products of a catalogue, or a single product when `product_id` is sent. As with the catalogues, `total` counts the page.
|
|
1023
|
+
*
|
|
1024
|
+
* **Facebook and Instagram only.** They are the only two networks with `products: true` in `GET /social_capabilities`; WhatsApp does not have it either, despite its own catalogue. Everything here speaks Meta Commerce, with Meta's own field names.
|
|
995
1025
|
*/
|
|
996
1026
|
get: operations["getProducts"];
|
|
997
1027
|
put?: never;
|
|
@@ -1000,6 +1030,8 @@ interface paths {
|
|
|
1000
1030
|
* @description **One endpoint does both.** Send `id` in the body and the existing product is updated; leave it out and a new product is created inside `product_catalog_id`.
|
|
1001
1031
|
*
|
|
1002
1032
|
* `product_catalog_id` travels as a **query parameter** and is required when creating. Without it the call answers error 2000.
|
|
1033
|
+
*
|
|
1034
|
+
* **Facebook and Instagram only.** They are the only two networks with `products: true` in `GET /social_capabilities`; WhatsApp does not have it either, despite its own catalogue. Everything here speaks Meta Commerce, with Meta's own field names.
|
|
1003
1035
|
*/
|
|
1004
1036
|
post: operations["createProduct"];
|
|
1005
1037
|
delete?: never;
|
|
@@ -1020,6 +1052,8 @@ interface paths {
|
|
|
1020
1052
|
* @description The catalogues owned by the business behind this account.
|
|
1021
1053
|
*
|
|
1022
1054
|
* **`total` is the size of the page, not of the collection.** Meta paginates with cursors and does not return a count, so there is nothing better to report: keep asking with a larger `offset` until a page comes back short.
|
|
1055
|
+
*
|
|
1056
|
+
* **Facebook and Instagram only.** They are the only two networks with `products: true` in `GET /social_capabilities`; WhatsApp does not have it either, despite its own catalogue. Everything here speaks Meta Commerce, with Meta's own field names.
|
|
1023
1057
|
*/
|
|
1024
1058
|
get: operations["getProductCatalogs"];
|
|
1025
1059
|
put?: never;
|
|
@@ -1028,6 +1062,8 @@ interface paths {
|
|
|
1028
1062
|
* @description Creates a catalogue under the business behind this account. Only `name` is required.
|
|
1029
1063
|
*
|
|
1030
1064
|
* **The answer carries the identifier, not the object**, even though the field is called `product_catalog`. Read the list back if you need the full catalogue.
|
|
1065
|
+
*
|
|
1066
|
+
* **Facebook and Instagram only.** They are the only two networks with `products: true` in `GET /social_capabilities`; WhatsApp does not have it either, despite its own catalogue. Everything here speaks Meta Commerce, with Meta's own field names.
|
|
1031
1067
|
*/
|
|
1032
1068
|
post: operations["createProductCatalog"];
|
|
1033
1069
|
delete?: never;
|
|
@@ -1684,7 +1720,9 @@ interface paths {
|
|
|
1684
1720
|
};
|
|
1685
1721
|
/**
|
|
1686
1722
|
* Retrieve publication by identifier
|
|
1687
|
-
* @description Retrieve publication by identifier
|
|
1723
|
+
* @description Retrieve publication by identifier.
|
|
1724
|
+
*
|
|
1725
|
+
* A **deleted** publication answers error 917, the same as one that never existed: the delete is soft on our side, but it is a delete for the API.
|
|
1688
1726
|
*/
|
|
1689
1727
|
get: operations["getPublication"];
|
|
1690
1728
|
/**
|
|
@@ -1695,7 +1733,7 @@ interface paths {
|
|
|
1695
1733
|
post?: never;
|
|
1696
1734
|
/**
|
|
1697
1735
|
* Delete publication by identifier
|
|
1698
|
-
* @description Delete publication by identifier. For an already-sent X (Twitter) publication, removing the tweet on X is a paid action that consumes 15 X credits; it is only removed on X when there are enough credits. Returns error 940 when the X credit pool is exhausted.
|
|
1736
|
+
* @description Delete publication by identifier. It stops being readable by identifier afterwards, so deleting twice answers error 917. For an already-sent X (Twitter) publication, removing the tweet on X is a paid action that consumes 15 X credits; it is only removed on X when there are enough credits. Returns error 940 when the X credit pool is exhausted.
|
|
1699
1737
|
*/
|
|
1700
1738
|
delete: operations["deletePublication"];
|
|
1701
1739
|
options?: never;
|
|
@@ -1990,7 +2028,7 @@ interface paths {
|
|
|
1990
2028
|
*
|
|
1991
2029
|
* It exists because **an app cannot connect accounts**: `connect_links` and `account-connect` refuse app credentials with error 519, since authorizing Instagram is an OAuth flow with a human in front of it. The shape of the integration is therefore:
|
|
1992
2030
|
*
|
|
1993
|
-
* 1. Your server asks for this token — **this endpoint is the one that requires app credentials**, and a user token is refused.
|
|
2031
|
+
* 1. Your server asks for this token — **this endpoint is the one that requires app credentials**, and a user token is refused. So is a temporal connect token: it cannot renew itself, which is what keeps the one-hour life a real limit rather than the first link of a chain.
|
|
1994
2032
|
* 2. You send your end user to the `url` that comes back, by redirect or in an iframe. The bare
|
|
1995
2033
|
* `token` comes back too, so a server-side client can authenticate with it directly instead of
|
|
1996
2034
|
* parsing it out of that URL.
|
|
@@ -2469,66 +2507,78 @@ interface components {
|
|
|
2469
2507
|
};
|
|
2470
2508
|
AiPlansAiPlan: {
|
|
2471
2509
|
/** @example 66d04a6a427f4c43b9d97f54 */
|
|
2472
|
-
_id
|
|
2510
|
+
_id: string;
|
|
2473
2511
|
/** @description Accounts the plan was generated for. */
|
|
2474
|
-
accounts
|
|
2512
|
+
accounts: string[];
|
|
2475
2513
|
/** @description Generation attempts consumed (transient failures are retried, max 2). */
|
|
2476
|
-
attempts
|
|
2514
|
+
attempts: number;
|
|
2477
2515
|
/** Format: date-time */
|
|
2478
|
-
creation_date
|
|
2516
|
+
creation_date: string;
|
|
2479
2517
|
/** @description AI credits actually consumed by the generation. */
|
|
2480
|
-
credits_spent
|
|
2481
|
-
/** @description Last generation error
|
|
2482
|
-
error?:
|
|
2518
|
+
credits_spent: number;
|
|
2519
|
+
/** @description Last generation error, in the same shape as an API error. Present only in state `failed`. */
|
|
2520
|
+
error?: {
|
|
2521
|
+
code: number;
|
|
2522
|
+
data?: {
|
|
2523
|
+
[key: string]: unknown;
|
|
2524
|
+
};
|
|
2525
|
+
message: string;
|
|
2526
|
+
};
|
|
2483
2527
|
/** Format: date-time */
|
|
2484
2528
|
generation_end_date?: string;
|
|
2485
|
-
id_client
|
|
2486
|
-
id_organization
|
|
2529
|
+
id_client: string;
|
|
2530
|
+
id_organization: string;
|
|
2487
2531
|
/** @description User who requested the generation. */
|
|
2488
2532
|
keycloak_identifier?: string;
|
|
2489
|
-
options
|
|
2533
|
+
options: components["schemas"]["AiPlansAiPlanOptions"];
|
|
2490
2534
|
/** @description Raw plan returned by the orchestrator, kept for audit (before validation/trimming). */
|
|
2491
2535
|
orchestrator_result?: Record<string, never>;
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2536
|
+
/** @description SNAPSHOT of the organization's brand context taken when the plan was created, so a retry or a regeneration reproduces the same plan even if the configuration changed. Absent when the plan was asked for without context, or when the organization had none. */
|
|
2537
|
+
organization_context?: components["schemas"]["AiContext"];
|
|
2538
|
+
prompt: string;
|
|
2539
|
+
/**
|
|
2540
|
+
* @description The generated publications — ordinary drafts of the publication domain.
|
|
2541
|
+
*
|
|
2542
|
+
* **It is not always the same shape.** Reading one plan (`GET`, `validate`, `retry`) returns whole publications with their files resolved; the LISTING returns their identifiers as strings. Check before using them.
|
|
2543
|
+
*/
|
|
2544
|
+
publications: (string | components["schemas"]["Publication"])[];
|
|
2495
2545
|
/**
|
|
2496
2546
|
* @description State machine: pending -> generating -> generated -> validated | failed | cancelled. Poll the plan while state is pending or generating.
|
|
2497
2547
|
* @enum {string}
|
|
2498
2548
|
*/
|
|
2499
|
-
state
|
|
2549
|
+
state: "pending" | "generating" | "generated" | "validated" | "failed" | "cancelled";
|
|
2500
2550
|
};
|
|
2501
2551
|
/** @description Deterministic cost estimate computed by the backend (never by the model). BYOK scopes cost 0 credits. */
|
|
2502
2552
|
AiPlansAiPlanCostEstimate: {
|
|
2503
|
-
available_credits
|
|
2553
|
+
available_credits: number;
|
|
2504
2554
|
/** @description Mandatory cost (orchestration + target texts). The plan is rejected if this exceeds the available credits. */
|
|
2505
|
-
base_cost
|
|
2555
|
+
base_cost: number;
|
|
2506
2556
|
/** @description Total estimated cost including the financeable images (upper bound). */
|
|
2507
|
-
estimated_cost
|
|
2508
|
-
images_target
|
|
2509
|
-
texts_target
|
|
2557
|
+
estimated_cost: number;
|
|
2558
|
+
images_target: number;
|
|
2559
|
+
texts_target: number;
|
|
2510
2560
|
};
|
|
2511
2561
|
AiPlansAiPlanCreateRequest: {
|
|
2512
2562
|
/** @description Account ids (belonging to the organization) to generate the plan for. */
|
|
2513
2563
|
accounts: string[];
|
|
2514
|
-
options?: components["schemas"]["
|
|
2564
|
+
options?: components["schemas"]["AiPlansAiPlanOptionsInput"];
|
|
2515
2565
|
/** @description Theme prompt written by the user. */
|
|
2516
2566
|
prompt: string;
|
|
2517
2567
|
};
|
|
2518
2568
|
AiPlansAiPlanCreateResponse: {
|
|
2519
|
-
ai_plan
|
|
2520
|
-
estimate
|
|
2569
|
+
ai_plan: components["schemas"]["AiPlansAiPlan"];
|
|
2570
|
+
estimate: components["schemas"]["AiPlansAiPlanCostEstimate"];
|
|
2521
2571
|
/** @description Shortcut to estimate.estimated_cost. */
|
|
2522
|
-
estimated_cost
|
|
2572
|
+
estimated_cost: number;
|
|
2523
2573
|
};
|
|
2524
2574
|
AiPlansAiPlanList: {
|
|
2525
|
-
ai_plans
|
|
2526
|
-
total
|
|
2575
|
+
ai_plans: components["schemas"]["AiPlansAiPlan"][];
|
|
2576
|
+
total: number;
|
|
2527
2577
|
};
|
|
2528
2578
|
AiPlansAiPlanOne: {
|
|
2529
|
-
ai_plan
|
|
2579
|
+
ai_plan: components["schemas"]["AiPlansAiPlan"];
|
|
2530
2580
|
};
|
|
2531
|
-
/** @description Generation options
|
|
2581
|
+
/** @description Generation options as they were STORED, already normalised: `publish_days` comes sorted and deduplicated, and every default has been resolved. */
|
|
2532
2582
|
AiPlansAiPlanOptions: {
|
|
2533
2583
|
/**
|
|
2534
2584
|
* @description Whether images may be generated. Each image costs 70 AI credits.
|
|
@@ -2536,7 +2586,7 @@ interface components {
|
|
|
2536
2586
|
*/
|
|
2537
2587
|
allow_images: boolean;
|
|
2538
2588
|
/** @description Upload ids from the organization's gallery used as visual reference for the generated images. */
|
|
2539
|
-
gallery_uploads
|
|
2589
|
+
gallery_uploads: string[];
|
|
2540
2590
|
/**
|
|
2541
2591
|
* @description Language of the generated texts.
|
|
2542
2592
|
* @default es
|
|
@@ -2557,6 +2607,11 @@ interface components {
|
|
|
2557
2607
|
* ]
|
|
2558
2608
|
*/
|
|
2559
2609
|
publish_days: number[];
|
|
2610
|
+
/**
|
|
2611
|
+
* @description Generate ONE piece of content per day and replicate it across every account, each scheduled at the best hour for ITS network, instead of one publication per account and day. Cheaper — one text and one image per day — and it caps images at 7.
|
|
2612
|
+
* @default false
|
|
2613
|
+
*/
|
|
2614
|
+
shared: boolean;
|
|
2560
2615
|
/**
|
|
2561
2616
|
* @description IANA timezone for the optimal publish slots (typically the user's browser timezone). publish_date is stored in UTC.
|
|
2562
2617
|
* @default Europe/Madrid
|
|
@@ -2564,24 +2619,64 @@ interface components {
|
|
|
2564
2619
|
timezone: string;
|
|
2565
2620
|
/** @description Optional tone (e.g. 'cercano', 'profesional') passed to the prompt. */
|
|
2566
2621
|
tone?: string;
|
|
2622
|
+
/**
|
|
2623
|
+
* @description Use the organization's brand context in the prompts. It is copied into the plan as a SNAPSHOT when the plan is created, so a retry or a regeneration uses the context the plan was asked with even if the configuration changed meanwhile.
|
|
2624
|
+
* @default true
|
|
2625
|
+
*/
|
|
2626
|
+
use_organization_context: boolean;
|
|
2627
|
+
/**
|
|
2628
|
+
* Format: date-time
|
|
2629
|
+
* @description Start of the week to plan (slots are generated between this date and +7 days). Defaults to now.
|
|
2630
|
+
*/
|
|
2631
|
+
week_start: string;
|
|
2632
|
+
};
|
|
2633
|
+
/** @description Generation options, as you SEND them: every one is optional and the server fills in its default. Optimal publish slots are chosen deterministically by the backend from a fixed table per network, converted to this timezone; the model never invents times. */
|
|
2634
|
+
AiPlansAiPlanOptionsInput: {
|
|
2635
|
+
/** @description Whether images may be generated. Each image costs 70 AI credits. Optional; defaults to `true`. */
|
|
2636
|
+
allow_images?: boolean;
|
|
2637
|
+
/** @description Upload ids from the organization's gallery used as visual reference for the generated images. */
|
|
2638
|
+
gallery_uploads?: string[];
|
|
2639
|
+
/** @description Language of the generated texts. Optional; defaults to `"es"`. */
|
|
2640
|
+
language?: string;
|
|
2641
|
+
/** @description Optional cap on the number of images; the credit budget may reduce it further. */
|
|
2642
|
+
max_images?: number;
|
|
2643
|
+
/** @description Days of the week the plan publishes on, in ISO 8601 numbering (1 = Monday ... 7 = Sunday). Defaults to the whole week. There is still at most ONE publication per day and account, so this is what bounds the size and the cost of the plan: the number of generated posts is (selected days x accounts). Must be a non-empty array of unique integers between 1 and 7, or the request is rejected with 2106. The 7-day window starts at week_start, so each ISO day appears exactly once: with a week_start in mid-week, day 1 (Monday) is the FOLLOWING Monday. If the selected days leave no future slot at all, the request is rejected with 2108. Optional; defaults to `[1,2,3,4,5,6,7]`. */
|
|
2644
|
+
publish_days?: number[];
|
|
2645
|
+
/** @description Generate ONE piece of content per day and replicate it across every account, each scheduled at the best hour for ITS network, instead of one publication per account and day. Cheaper — one text and one image per day — and it caps images at 7. Optional; defaults to `false`. */
|
|
2646
|
+
shared?: boolean;
|
|
2647
|
+
/** @description IANA timezone for the optimal publish slots (typically the user's browser timezone). publish_date is stored in UTC. Optional; defaults to `"Europe/Madrid"`. */
|
|
2648
|
+
timezone?: string;
|
|
2649
|
+
/** @description Optional tone (e.g. 'cercano', 'profesional') passed to the prompt. */
|
|
2650
|
+
tone?: string;
|
|
2651
|
+
/** @description Use the organization's brand context in the prompts. It is copied into the plan as a SNAPSHOT when the plan is created, so a retry or a regeneration uses the context the plan was asked with even if the configuration changed meanwhile. Optional; defaults to `true`. */
|
|
2652
|
+
use_organization_context?: boolean;
|
|
2567
2653
|
/**
|
|
2568
2654
|
* Format: date-time
|
|
2569
2655
|
* @description Start of the week to plan (slots are generated between this date and +7 days). Defaults to now.
|
|
2570
2656
|
*/
|
|
2571
2657
|
week_start?: string;
|
|
2572
2658
|
};
|
|
2659
|
+
/**
|
|
2660
|
+
* @description An app: the credentials a third-party integration authenticates with.
|
|
2661
|
+
*
|
|
2662
|
+
* **The secret is not here.** It lives in Keycloak and is read with `GET /clients/{id_client}/apps/{id_app}/secret`, which needs a user token.
|
|
2663
|
+
*/
|
|
2573
2664
|
AppsClientApp: {
|
|
2574
|
-
_id
|
|
2575
|
-
allowed_domains
|
|
2665
|
+
_id: string;
|
|
2666
|
+
allowed_domains: string[];
|
|
2576
2667
|
/** Format: date-time */
|
|
2577
|
-
creation_date
|
|
2578
|
-
|
|
2668
|
+
creation_date: string;
|
|
2669
|
+
/** @description Deleting an app marks it instead of removing it — the Keycloak client is gone, so it can no longer get a token — and the listing filters those out. */
|
|
2670
|
+
deleted: boolean;
|
|
2671
|
+
/** Format: date-time */
|
|
2672
|
+
deleted_date?: string;
|
|
2673
|
+
id_client: string;
|
|
2579
2674
|
/** @description The user who created the app, when it was created from the panel. */
|
|
2580
2675
|
id_user?: string;
|
|
2581
2676
|
/** @description The app's `client_id`. */
|
|
2582
|
-
keycloak_client_idenfifier
|
|
2583
|
-
name
|
|
2584
|
-
redirect_urls
|
|
2677
|
+
keycloak_client_idenfifier: string;
|
|
2678
|
+
name: string;
|
|
2679
|
+
redirect_urls: string[];
|
|
2585
2680
|
/**
|
|
2586
2681
|
* @description Where PlanVortex posts events, when one is configured.
|
|
2587
2682
|
*
|
|
@@ -2606,7 +2701,7 @@ interface components {
|
|
|
2606
2701
|
/** @description The error shape of the token endpoint, and **only** of the token endpoint. Every other endpoint in the API answers with `Error` instead. */
|
|
2607
2702
|
AppsOAuthError: {
|
|
2608
2703
|
/** @enum {string} */
|
|
2609
|
-
error
|
|
2704
|
+
error: "invalid_request" | "invalid_client" | "unsupported_grant_type" | "slow_down" | "server_error";
|
|
2610
2705
|
error_description?: string;
|
|
2611
2706
|
};
|
|
2612
2707
|
AppsTokenRequest: {
|
|
@@ -2624,12 +2719,12 @@ interface components {
|
|
|
2624
2719
|
};
|
|
2625
2720
|
AppsTokenResponse: {
|
|
2626
2721
|
/** @description Send it as `Authorization: Bearer <access_token>`. */
|
|
2627
|
-
access_token
|
|
2722
|
+
access_token: string;
|
|
2628
2723
|
/** @description Seconds the token is valid for. Refresh shortly before it runs out; there is no refresh token. */
|
|
2629
|
-
expires_in
|
|
2724
|
+
expires_in: number;
|
|
2630
2725
|
scope?: string;
|
|
2631
2726
|
/** @description Always `Bearer`. */
|
|
2632
|
-
token_type
|
|
2727
|
+
token_type: string;
|
|
2633
2728
|
};
|
|
2634
2729
|
/** @description Accepted crops. `values` and `text` are parallel arrays: same index, same ratio. */
|
|
2635
2730
|
CatalogAspectRatios: {
|
|
@@ -2665,18 +2760,21 @@ interface components {
|
|
|
2665
2760
|
/** @description Read-only. True when an encrypted API key is stored for this scope. */
|
|
2666
2761
|
readonly has_api_key?: boolean;
|
|
2667
2762
|
/** @description Model identifier at the chosen provider (e.g. google/gemini-3-flash). */
|
|
2668
|
-
model
|
|
2763
|
+
model: string;
|
|
2669
2764
|
/**
|
|
2670
2765
|
* @description Fixed catalogue of allowed providers. The provider must support the capability of the scope (text for orchestrator/text, image for image).
|
|
2671
2766
|
* @enum {string}
|
|
2672
2767
|
*/
|
|
2673
|
-
provider
|
|
2768
|
+
provider: "openrouter" | "openai" | "google" | "anthropic";
|
|
2674
2769
|
};
|
|
2675
|
-
/** @description Per-scope AI provider configuration (BYOK).
|
|
2770
|
+
/** @description Per-scope AI provider configuration (BYOK). Only the scopes you send are touched; a scope set to `null` clears its configuration and returns that scope to PlanVortex credits. `orchestrator` and `text` need a text-capable provider, `image` needs an image-capable one. `video` is reserved for a later phase. */
|
|
2676
2771
|
ClientsAiSettings: {
|
|
2677
|
-
image
|
|
2678
|
-
|
|
2679
|
-
|
|
2772
|
+
/** @description Configuration of the `image` scope. **`null` clears it** and returns the scope to PlanVortex credits. */
|
|
2773
|
+
image?: components["schemas"]["ClientsAiScopeSetting"] | null;
|
|
2774
|
+
/** @description Configuration of the `orchestrator` scope. **`null` clears it** and returns the scope to PlanVortex credits. */
|
|
2775
|
+
orchestrator?: components["schemas"]["ClientsAiScopeSetting"] | null;
|
|
2776
|
+
/** @description Configuration of the `text` scope. **`null` clears it** and returns the scope to PlanVortex credits. */
|
|
2777
|
+
text?: components["schemas"]["ClientsAiScopeSetting"] | null;
|
|
2680
2778
|
};
|
|
2681
2779
|
/** @description Who contracts the plan and whom the organizations hang from. */
|
|
2682
2780
|
ClientsClient: {
|
|
@@ -2788,33 +2886,41 @@ interface components {
|
|
|
2788
2886
|
};
|
|
2789
2887
|
/** @description A comment — or a review — as PlanVortex stores it. Remember it is a **snapshot** of what the network said at `collected_date`; the live thread endpoints return the same shape reconciled against the network. */
|
|
2790
2888
|
CommentsComment: {
|
|
2791
|
-
_id
|
|
2792
|
-
author
|
|
2889
|
+
_id: string;
|
|
2890
|
+
author: components["schemas"]["CommentsCommentAuthor"];
|
|
2793
2891
|
/**
|
|
2794
2892
|
* Format: date-time
|
|
2795
2893
|
* @description When PlanVortex last read it. The inbox is a photograph and this says how old it is.
|
|
2796
2894
|
*/
|
|
2797
|
-
collected_date
|
|
2895
|
+
collected_date: string;
|
|
2798
2896
|
/**
|
|
2799
2897
|
* Format: date-time
|
|
2800
2898
|
* @description When it was written **on the network**. This is what orders the inbox.
|
|
2801
2899
|
*/
|
|
2802
|
-
creation_date
|
|
2900
|
+
creation_date: string;
|
|
2803
2901
|
/** @description Gone from the network. The row is kept so it is not created again by the next read or by a repeated webhook; it stops appearing in the inbox. */
|
|
2804
|
-
deleted
|
|
2902
|
+
deleted: boolean;
|
|
2805
2903
|
/**
|
|
2806
2904
|
* @description The comment's id on the network. Unique per account, and what makes repeated webhook deliveries idempotent.
|
|
2807
2905
|
*
|
|
2808
2906
|
* One exception worth knowing: a Google Business reply has no id of its own — it is a *field* of the review — so PlanVortex fabricates a stable one, `{reviewId}/reply`.
|
|
2809
2907
|
*/
|
|
2810
|
-
external_id
|
|
2908
|
+
external_id: string;
|
|
2811
2909
|
/** @description Hidden on the network. A hidden comment is never swept as deleted: on YouTube, hiding one makes the API stop returning it forever, and without that exception hiding would be indistinguishable from deleting. */
|
|
2812
|
-
hidden
|
|
2813
|
-
/**
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2910
|
+
hidden: boolean;
|
|
2911
|
+
/**
|
|
2912
|
+
* @description The connected account it arrived on.
|
|
2913
|
+
*
|
|
2914
|
+
* **It is not always the same shape.** The inbox listing (`GET /organizations/{id}/comments`) returns the whole account resolved; every other operation — the live threads, the reply, the update — returns its identifier as a string. Check before using it.
|
|
2915
|
+
*/
|
|
2916
|
+
id_account: string | components["schemas"]["Account"];
|
|
2917
|
+
id_organization: string;
|
|
2918
|
+
/**
|
|
2919
|
+
* @description **Your** publication, when there is one — and there often is not: a video uploaded to the channel by hand, a post that predates PlanVortex, and every Google Business review have comments with no publication of ours behind them. What always identifies the target is `publication_external_id`.
|
|
2920
|
+
*
|
|
2921
|
+
* Same asymmetry as `id_account`: the inbox listing resolves it into the whole publication, every other operation returns the identifier as a string.
|
|
2922
|
+
*/
|
|
2923
|
+
id_publication?: string | components["schemas"]["Publication"];
|
|
2818
2924
|
/** @description Absent when the network does not publish it — not zero */
|
|
2819
2925
|
like_count?: number;
|
|
2820
2926
|
/** @description The network id of your reply, so you can find it or delete it later */
|
|
@@ -2822,7 +2928,7 @@ interface components {
|
|
|
2822
2928
|
/** @description Present only when this is a reply to another comment */
|
|
2823
2929
|
parent_external_id?: string;
|
|
2824
2930
|
/** @description What the comment hangs off, on the network: the post/video id in five networks, and the **listing** (`locations/{id}`) for a Google Business review. */
|
|
2825
|
-
publication_external_id
|
|
2931
|
+
publication_external_id: string;
|
|
2826
2932
|
/**
|
|
2827
2933
|
* @description Star rating of a **review**. Present only on review networks — today Google Business. Its absence means "this network has no such thing", never zero.
|
|
2828
2934
|
*
|
|
@@ -2830,14 +2936,14 @@ interface components {
|
|
|
2830
2936
|
*/
|
|
2831
2937
|
rating?: number;
|
|
2832
2938
|
/** @description Yours, not the network's. A live read never overwrites it. */
|
|
2833
|
-
read
|
|
2939
|
+
read: boolean;
|
|
2834
2940
|
/** @description Yours, not the network's. Set when you reply through the API. */
|
|
2835
|
-
replied
|
|
2941
|
+
replied: boolean;
|
|
2836
2942
|
/** @description Absent when the network does not publish it — not zero */
|
|
2837
2943
|
reply_count?: number;
|
|
2838
|
-
social_network
|
|
2944
|
+
social_network: components["schemas"]["CommentsCommentNetworkName"];
|
|
2839
2945
|
/** @description **May legitimately be empty.** A stars-only review carries no text at all, so render `rating` alongside it and never assume a blank comment is a loading failure. */
|
|
2840
|
-
text
|
|
2946
|
+
text: string;
|
|
2841
2947
|
};
|
|
2842
2948
|
/** @description What one network lets you do to a comment. Four booleans and never fewer: an absent key would be indistinguishable from an oversight. */
|
|
2843
2949
|
CommentsCommentActions: {
|
|
@@ -2851,9 +2957,9 @@ interface components {
|
|
|
2851
2957
|
/** @description Who wrote it. Embedded in the comment and **not** a contact: a YouTube commenter has no private inbox you could ever write to, so they get no contact record. */
|
|
2852
2958
|
CommentsCommentAuthor: {
|
|
2853
2959
|
/** @description The author's id on the network. When the network gives none — Google Business publishes no identifier for a reviewer — this falls back to the review's own id, which means two reviews by the same person look like two different authors. There is no way around it from the API. */
|
|
2854
|
-
external_id
|
|
2960
|
+
external_id: string;
|
|
2855
2961
|
/** @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. */
|
|
2856
|
-
is_own
|
|
2962
|
+
is_own: boolean;
|
|
2857
2963
|
/** @description Display name. Always present for a review, including anonymous ones, which get a placeholder rather than an empty string. */
|
|
2858
2964
|
name?: string;
|
|
2859
2965
|
profile_pic?: string;
|
|
@@ -2865,13 +2971,13 @@ interface components {
|
|
|
2865
2971
|
CommentsCommentNetworkName: "facebook" | "instagram" | "twitter" | "linkedin" | "youtube" | "google_business" | "bluesky" | "discord";
|
|
2866
2972
|
/** @description A live read: asked of the network and reconciled with what was stored. */
|
|
2867
2973
|
CommentsCommentThread: {
|
|
2868
|
-
comments
|
|
2974
|
+
comments: components["schemas"]["CommentsComment"][];
|
|
2869
2975
|
/** @description X credits this read spent from the client's monthly pool. `0` on every other network. Charged after the fact and by real units, so a failed read charges nothing. */
|
|
2870
|
-
credits_consumed
|
|
2976
|
+
credits_consumed: number;
|
|
2871
2977
|
/** @description Opaque page token from the network. Pass it back as `offset`; absent means there is no next page. */
|
|
2872
2978
|
next_cursor?: string;
|
|
2873
2979
|
/** @description What the network says the total is. On a Google Business listing it is the number of **reviews**, which is not the length of `comments`: your replies travel in the same array as children of the review they answer. */
|
|
2874
|
-
total
|
|
2980
|
+
total: number;
|
|
2875
2981
|
};
|
|
2876
2982
|
/**
|
|
2877
2983
|
* @description One change in the array PlanVortex posts to your app's `webhook_url`, when an **integration** stopped working: a revoked Google Drive token, a feed that no longer answers, a publication quota that ran out.
|
|
@@ -2981,96 +3087,162 @@ interface components {
|
|
|
2981
3087
|
string_property2?: string;
|
|
2982
3088
|
zip_code?: string | number;
|
|
2983
3089
|
};
|
|
2984
|
-
|
|
3090
|
+
/**
|
|
3091
|
+
* @description A new contact. **At least one identifier is mandatory** (`ERROR_CODE_1601` otherwise): a contact with no channel is a contact nobody can write to.
|
|
3092
|
+
*
|
|
3093
|
+
* Creating is idempotent on the FIRST identifier: if the organization already has a contact with that channel and that `external_identifier`, you get the existing one back untouched — `name`, `profile_image` and `extra_data` of the request are ignored. There is no "already exists" error.
|
|
3094
|
+
*/
|
|
3095
|
+
ContactsContactCreate: {
|
|
3096
|
+
extra_data?: components["schemas"]["ContactExtraData"];
|
|
3097
|
+
name?: string;
|
|
3098
|
+
profile_image?: string;
|
|
3099
|
+
social_identifiers: components["schemas"]["ContactsSocialIdentifierInput"][];
|
|
3100
|
+
};
|
|
3101
|
+
/**
|
|
3102
|
+
* @description Changes to a contact. `name`, `profile_image` and `social_identifiers` are left alone when you omit them.
|
|
3103
|
+
*
|
|
3104
|
+
* **`extra_data` is the exception and it is destructive**: it is written with whatever the body carries, so omitting it ERASES every custom field on the contact. Read the contact, change what you need and send the whole block back.
|
|
3105
|
+
*/
|
|
3106
|
+
ContactsContactUpdate: {
|
|
3107
|
+
/** @description Written as sent. **Omitting it erases the contact's custom fields.** */
|
|
2985
3108
|
extra_data?: components["schemas"]["ContactExtraData"];
|
|
2986
3109
|
name?: string;
|
|
2987
3110
|
profile_image?: string;
|
|
2988
|
-
|
|
3111
|
+
/** @description Replaces the whole list, it does not merge into it. Omit it to keep the current one. */
|
|
3112
|
+
social_identifiers?: components["schemas"]["ContactsSocialIdentifierInput"][];
|
|
3113
|
+
};
|
|
3114
|
+
/** @description The same person on one channel, as you SEND it. `_id` is optional here and PlanVortex mints one when it is missing — which is the difference with `SocialIdentifier`, where it always travels back. */
|
|
3115
|
+
ContactsSocialIdentifierInput: {
|
|
3116
|
+
/** @description Only when you are keeping an identifier the API already gave you. */
|
|
3117
|
+
_id?: string;
|
|
3118
|
+
/** @description The contact id on that channel — the phone number on WhatsApp, the PSID on Messenger. Optional in the model, but a contact without it cannot be written to, and it is what deduplicates on create. */
|
|
3119
|
+
external_identifier?: string;
|
|
3120
|
+
social_network: components["schemas"]["ContactChannel"];
|
|
2989
3121
|
};
|
|
2990
3122
|
/** @description A connected account that has stopped working: an expired token or a revoked permission. Until it is reconnected it neither publishes nor measures. */
|
|
2991
3123
|
DashboardAccountWithError: {
|
|
2992
|
-
_id
|
|
3124
|
+
_id: string;
|
|
2993
3125
|
/** @description PlanVortex error code that broke it. `0` means healthy, so anything here is non-zero. */
|
|
2994
|
-
error_code
|
|
3126
|
+
error_code: number;
|
|
2995
3127
|
image?: string;
|
|
2996
|
-
name
|
|
2997
|
-
social_network
|
|
3128
|
+
name: string;
|
|
3129
|
+
social_network: components["schemas"]["SocialNetwork"];
|
|
2998
3130
|
username?: string;
|
|
2999
3131
|
};
|
|
3132
|
+
/**
|
|
3133
|
+
* @description Everything the home screen needs, in ONE round trip.
|
|
3134
|
+
*
|
|
3135
|
+
* **A missing block is not an error.** Each one is checked against its own permission and omitted when the caller cannot read it, instead of failing the whole request; `available_blocks` says which ones were allowed. A block that is `true` in `available_blocks` and absent from the body means there was no data — except `messages`, which also turns to `false` when the plan does not include chat.
|
|
3136
|
+
*/
|
|
3000
3137
|
DashboardDashboard: {
|
|
3001
3138
|
account_metrics?: {
|
|
3002
|
-
by_day
|
|
3003
|
-
by_network
|
|
3004
|
-
previous_total
|
|
3005
|
-
total
|
|
3139
|
+
by_day: components["schemas"]["DashboardMetricRow"][];
|
|
3140
|
+
by_network: components["schemas"]["DashboardMetricRow"][];
|
|
3141
|
+
previous_total: components["schemas"]["NormalizedMetrics"];
|
|
3142
|
+
total: components["schemas"]["NormalizedMetrics"];
|
|
3006
3143
|
};
|
|
3007
3144
|
ai_plans?: {
|
|
3008
|
-
by_state
|
|
3145
|
+
by_state: {
|
|
3009
3146
|
state?: string;
|
|
3010
3147
|
total?: number;
|
|
3011
3148
|
}[];
|
|
3012
|
-
credits_spent
|
|
3013
|
-
/** @description The most recent plan of the organization, whatever the range. It is what tells you at a glance whether one is still generating, failed, or is waiting to be validated. */
|
|
3014
|
-
last_plan?: {
|
|
3015
|
-
[key: string]: unknown;
|
|
3016
|
-
};
|
|
3149
|
+
credits_spent: number;
|
|
3017
3150
|
/** @description Publications generated by the plans of the range. */
|
|
3018
|
-
|
|
3019
|
-
|
|
3151
|
+
generated_publications: number;
|
|
3152
|
+
/** @description The most recent plan of the organization, **whatever the range**. Absent when there has never been one. */
|
|
3153
|
+
last_plan?: components["schemas"]["DashboardDashboardAiPlanRef"];
|
|
3154
|
+
/** @description Plans already generated and **waiting for someone to validate them**: work paid for that is not publishing anything yet. */
|
|
3155
|
+
pending_validation: number;
|
|
3156
|
+
total: number;
|
|
3020
3157
|
};
|
|
3021
3158
|
/** @description Which blocks the caller was allowed to see. A `false` here is a permission (or plan) answer; a block that is `true` but empty means there is no data. */
|
|
3022
|
-
available_blocks
|
|
3023
|
-
account_metrics
|
|
3024
|
-
ai_plans
|
|
3025
|
-
health
|
|
3026
|
-
messages
|
|
3027
|
-
plan_use
|
|
3028
|
-
publication_metrics
|
|
3029
|
-
publications
|
|
3159
|
+
available_blocks: {
|
|
3160
|
+
account_metrics: boolean;
|
|
3161
|
+
ai_plans: boolean;
|
|
3162
|
+
health: boolean;
|
|
3163
|
+
messages: boolean;
|
|
3164
|
+
plan_use: boolean;
|
|
3165
|
+
publication_metrics: boolean;
|
|
3166
|
+
publications: boolean;
|
|
3030
3167
|
};
|
|
3031
3168
|
/** @description What needs fixing today. Each half has its own permission: somebody who cannot read accounts still sees the failed publications. */
|
|
3032
3169
|
health?: {
|
|
3033
3170
|
accounts_with_errors?: components["schemas"]["DashboardAccountWithError"][];
|
|
3034
3171
|
/** @description Up to ten publications in state `with_errors`, newest first. */
|
|
3035
|
-
publications_with_errors?:
|
|
3036
|
-
[key: string]: unknown;
|
|
3037
|
-
}[];
|
|
3172
|
+
publications_with_errors?: components["schemas"]["DashboardDashboardPublicationRef"][];
|
|
3038
3173
|
total_drafts?: number;
|
|
3039
3174
|
/** @description Up to ten publications due in the next 48 hours. */
|
|
3040
|
-
upcoming_publications?:
|
|
3041
|
-
[key: string]: unknown;
|
|
3042
|
-
}[];
|
|
3175
|
+
upcoming_publications?: components["schemas"]["DashboardDashboardPublicationRef"][];
|
|
3043
3176
|
};
|
|
3044
3177
|
messages?: {
|
|
3045
|
-
unread
|
|
3178
|
+
unread: number;
|
|
3046
3179
|
};
|
|
3047
3180
|
plan_use?: components["schemas"]["DashboardPlanUse"];
|
|
3048
3181
|
publication_metrics?: {
|
|
3049
|
-
by_network
|
|
3050
|
-
metrics?: components["schemas"]["
|
|
3182
|
+
by_network: {
|
|
3183
|
+
metrics?: components["schemas"]["NormalizedMetrics"];
|
|
3051
3184
|
publications?: number;
|
|
3052
3185
|
social_network?: components["schemas"]["SocialNetwork"];
|
|
3053
3186
|
}[];
|
|
3054
|
-
previous_total
|
|
3055
|
-
top
|
|
3056
|
-
total
|
|
3187
|
+
previous_total: components["schemas"]["NormalizedMetrics"];
|
|
3188
|
+
top: components["schemas"]["DashboardTopPublication"][];
|
|
3189
|
+
total: components["schemas"]["NormalizedMetrics"];
|
|
3057
3190
|
};
|
|
3058
3191
|
publications?: components["schemas"]["DashboardPublicationsSummary"] & {
|
|
3059
3192
|
/** @description The same count for the previous period, for the delta. */
|
|
3060
3193
|
previous_total?: number;
|
|
3061
3194
|
};
|
|
3062
|
-
range
|
|
3195
|
+
range: components["schemas"]["DashboardDashboardRange"];
|
|
3196
|
+
};
|
|
3197
|
+
/** @description The most recent AI plan, projected: enough to tell at a glance whether one is still generating, failed, or is waiting to be validated. `publications` are identifiers here. */
|
|
3198
|
+
DashboardDashboardAiPlanRef: {
|
|
3199
|
+
_id: string;
|
|
3200
|
+
/** Format: date-time */
|
|
3201
|
+
creation_date: string;
|
|
3202
|
+
credits_spent?: number;
|
|
3203
|
+
error?: {
|
|
3204
|
+
code: number;
|
|
3205
|
+
data?: {
|
|
3206
|
+
[key: string]: unknown;
|
|
3207
|
+
};
|
|
3208
|
+
message: string;
|
|
3209
|
+
};
|
|
3210
|
+
/** Format: date-time */
|
|
3211
|
+
generation_end_date?: string;
|
|
3212
|
+
prompt?: string;
|
|
3213
|
+
publications?: string[];
|
|
3214
|
+
/** @enum {string} */
|
|
3215
|
+
state: "pending" | "generating" | "generated" | "validated" | "failed" | "cancelled";
|
|
3216
|
+
};
|
|
3217
|
+
/** @description A publication as the health block projects it: a handful of fields, not a whole `Publication`. `state` is not among them — the list it came from already says what state it is in. */
|
|
3218
|
+
DashboardDashboardPublicationRef: {
|
|
3219
|
+
_id: string;
|
|
3220
|
+
/** Format: date-time */
|
|
3221
|
+
creation_date?: string;
|
|
3222
|
+
name?: string;
|
|
3223
|
+
/** @description Only on the failed ones. Same shape as in a full `Publication`. */
|
|
3224
|
+
publication_errors?: {
|
|
3225
|
+
code: number;
|
|
3226
|
+
data?: {
|
|
3227
|
+
[key: string]: unknown;
|
|
3228
|
+
};
|
|
3229
|
+
message: string;
|
|
3230
|
+
}[];
|
|
3231
|
+
/** Format: date-time */
|
|
3232
|
+
publish_date?: string;
|
|
3233
|
+
social_network: components["schemas"]["SocialNetwork"];
|
|
3234
|
+
text?: string;
|
|
3063
3235
|
};
|
|
3064
3236
|
/** @description The range that was actually used, plus the previous period of exactly the same length. The previous one is not "last month": comparing 30 days against a calendar month would move the delta with the calendar. */
|
|
3065
3237
|
DashboardDashboardRange: {
|
|
3066
3238
|
/** Format: date-time */
|
|
3067
|
-
from_date
|
|
3239
|
+
from_date: string;
|
|
3068
3240
|
/** Format: date-time */
|
|
3069
|
-
previous_from_date
|
|
3241
|
+
previous_from_date: string;
|
|
3070
3242
|
/** Format: date-time */
|
|
3071
|
-
previous_to_date
|
|
3243
|
+
previous_to_date: string;
|
|
3072
3244
|
/** Format: date-time */
|
|
3073
|
-
to_date
|
|
3245
|
+
to_date: string;
|
|
3074
3246
|
};
|
|
3075
3247
|
/**
|
|
3076
3248
|
* @description A metric in PlanVortex's common vocabulary. Each network reports what it reports and PlanVortex translates it; a metric a network does not publish is absent, never zero.
|
|
@@ -3078,59 +3250,75 @@ interface components {
|
|
|
3078
3250
|
*/
|
|
3079
3251
|
DashboardMetricName: "impressions" | "reach" | "engagement" | "likes" | "comments" | "shares" | "saves" | "clicks" | "video_views" | "profile_views" | "followers" | "followers_gained";
|
|
3080
3252
|
DashboardMetricRow: {
|
|
3081
|
-
/** @description The value of the axis: the day, the network or the account identifier.
|
|
3082
|
-
group
|
|
3083
|
-
name
|
|
3084
|
-
value
|
|
3085
|
-
};
|
|
3086
|
-
/** @description Metric name to value. A missing key means the network does not publish that metric. */
|
|
3087
|
-
DashboardNormalizedMetrics: {
|
|
3088
|
-
[key: string]: number;
|
|
3253
|
+
/** @description The value of the axis: the day, the network or the account identifier. **`null` when `group_by` was `total`** — the field is always there, the value is not always a string. */
|
|
3254
|
+
group: string | null;
|
|
3255
|
+
name: components["schemas"]["DashboardMetricName"];
|
|
3256
|
+
value: number;
|
|
3089
3257
|
};
|
|
3090
3258
|
DashboardPlanUse: {
|
|
3091
3259
|
/** @description What has been handed down to child organizations out of this organization's plan. */
|
|
3092
|
-
actual_asigned
|
|
3260
|
+
actual_asigned: components["schemas"]["PlanData"];
|
|
3093
3261
|
/** @description What the organization and its children are consuming right now. */
|
|
3094
|
-
actual_use
|
|
3262
|
+
actual_use: components["schemas"]["PlanData"];
|
|
3095
3263
|
/** @description The plan in force. An organization with no plan of its own inherits the closest parent that has one. */
|
|
3096
|
-
limits
|
|
3264
|
+
limits: components["schemas"]["PlanData"];
|
|
3097
3265
|
};
|
|
3098
3266
|
DashboardPublicationsSummary: {
|
|
3099
3267
|
/** @description Publications **created** each day, split by state. */
|
|
3100
|
-
by_day
|
|
3268
|
+
by_day: {
|
|
3101
3269
|
/** @description `YYYY-MM-DD`, in UTC. */
|
|
3102
3270
|
day?: string;
|
|
3103
3271
|
state?: string;
|
|
3104
3272
|
total?: number;
|
|
3105
3273
|
}[];
|
|
3106
|
-
by_network
|
|
3274
|
+
by_network: {
|
|
3107
3275
|
social_network?: components["schemas"]["SocialNetwork"];
|
|
3108
3276
|
total?: number;
|
|
3109
3277
|
}[];
|
|
3110
|
-
by_state
|
|
3278
|
+
by_state: {
|
|
3111
3279
|
state?: string;
|
|
3112
3280
|
total?: number;
|
|
3113
3281
|
}[];
|
|
3114
3282
|
/** @description Publications that actually **went out** each day, split by network. Only the ones in state `sended`. */
|
|
3115
|
-
published_by_day
|
|
3283
|
+
published_by_day: {
|
|
3116
3284
|
/** @description `YYYY-MM-DD`, in UTC. */
|
|
3117
3285
|
day?: string;
|
|
3118
3286
|
social_network?: components["schemas"]["SocialNetwork"];
|
|
3119
3287
|
total?: number;
|
|
3120
3288
|
}[];
|
|
3121
3289
|
/** @description Publications created in the range. */
|
|
3122
|
-
total
|
|
3290
|
+
total: number;
|
|
3123
3291
|
};
|
|
3292
|
+
/**
|
|
3293
|
+
* @description One row of the ranking. It comes out of the stats aggregation, not out of the publications collection, so it does **not** have the shape of a `Publication`: there is no `_id` (the identifier is `id_publication`) and the content travels nested under `publication`.
|
|
3294
|
+
*
|
|
3295
|
+
* Only publications that have already been measured can appear here. For a listing that includes the unmeasured ones, use `GET /organizations/{id}/publications/stats`.
|
|
3296
|
+
*/
|
|
3124
3297
|
DashboardTopPublication: {
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3298
|
+
/**
|
|
3299
|
+
* Format: date-time
|
|
3300
|
+
* @description When this measurement was taken.
|
|
3301
|
+
*/
|
|
3302
|
+
collected_date?: string;
|
|
3303
|
+
/**
|
|
3304
|
+
* @description What this row's engagement rate is divided by. **Two rows with different bases are not comparable**, so say which one it is when you put them in the same table.
|
|
3305
|
+
* @enum {string}
|
|
3306
|
+
*/
|
|
3307
|
+
engagement_base?: "reach" | "impressions" | "followers";
|
|
3308
|
+
id_publication: string;
|
|
3309
|
+
metrics: components["schemas"]["NormalizedMetrics"];
|
|
3310
|
+
/** @description The bit of the publication needed to render the row. Nothing else is projected. */
|
|
3311
|
+
publication: {
|
|
3312
|
+
external_identifier?: string;
|
|
3313
|
+
files?: components["schemas"]["Upload"][];
|
|
3314
|
+
publication_type?: string;
|
|
3315
|
+
text?: string;
|
|
3316
|
+
title?: string;
|
|
3317
|
+
url?: string;
|
|
3318
|
+
};
|
|
3128
3319
|
/** Format: date-time */
|
|
3129
3320
|
publish_date?: string;
|
|
3130
|
-
social_network
|
|
3131
|
-
text?: string;
|
|
3132
|
-
} & {
|
|
3133
|
-
[key: string]: unknown;
|
|
3321
|
+
social_network: components["schemas"]["SocialNetwork"];
|
|
3134
3322
|
};
|
|
3135
3323
|
/**
|
|
3136
3324
|
* @description Error payload returned by every failing request.
|
|
@@ -3140,7 +3328,7 @@ interface components {
|
|
|
3140
3328
|
* The catalogue grows with the product, so treat an unknown `code` as a generic failure instead of rejecting it.
|
|
3141
3329
|
*/
|
|
3142
3330
|
Error: {
|
|
3143
|
-
/** @description PlanVortex error code. Ranges: 500-
|
|
3331
|
+
/** @description PlanVortex error code. Ranges: 500-542 auth, tokens and client apps · 601-612 user · 700-715 social accounts · 800-810 files · 900-960 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1307 client plan · 1400-1408 organization plan · 1500-1512 messaging · 1600-1601 contacts · 1900-1906 payments · 2000-2099 products · 2100-2199 AI plans · 2200-2299 integrations. */
|
|
3144
3332
|
code: number;
|
|
3145
3333
|
/** @description Extra context attached to the error, when there is any. */
|
|
3146
3334
|
data?: {
|
|
@@ -3175,13 +3363,15 @@ interface components {
|
|
|
3175
3363
|
};
|
|
3176
3364
|
/** @description Credentials are never returned. `connected` is the summary the panel paints: false means the connection failed and needs attention. */
|
|
3177
3365
|
IntegrationsIntegration: {
|
|
3178
|
-
_id
|
|
3179
|
-
|
|
3180
|
-
|
|
3366
|
+
_id: string;
|
|
3367
|
+
/** @description Provider-specific configuration. **Empty object for `google_drive`** — the Picker supplies everything — so every field here is optional and only an `rss` integration fills them in. */
|
|
3368
|
+
config: components["schemas"]["IntegrationsRssConfig"];
|
|
3369
|
+
/** @description `error_code` is empty. It is computed on the way out, not stored: the panel needs to know whether the connection is alive, not with which credentials. */
|
|
3370
|
+
connected: boolean;
|
|
3181
3371
|
/** Format: date-time */
|
|
3182
|
-
creation_date
|
|
3372
|
+
creation_date: string;
|
|
3183
3373
|
/** @description Only enabled integrations consume plan allowance. */
|
|
3184
|
-
enabled
|
|
3374
|
+
enabled: boolean;
|
|
3185
3375
|
/** @description PlanVortex error code of the last failure (2203 token revoked, 2205 feed unreachable, 924 no publication allowance left…). */
|
|
3186
3376
|
error_code?: number | null;
|
|
3187
3377
|
/**
|
|
@@ -3189,17 +3379,17 @@ interface components {
|
|
|
3189
3379
|
* @example ana@empresa.com
|
|
3190
3380
|
*/
|
|
3191
3381
|
external_identifier?: string;
|
|
3192
|
-
id_client
|
|
3193
|
-
id_organization
|
|
3382
|
+
id_client: string;
|
|
3383
|
+
id_organization: string;
|
|
3194
3384
|
/** Format: date-time */
|
|
3195
3385
|
last_used_date?: string;
|
|
3196
3386
|
/** @example Drive de ana@empresa.com */
|
|
3197
|
-
name
|
|
3198
|
-
provider
|
|
3387
|
+
name: string;
|
|
3388
|
+
provider: components["schemas"]["IntegrationsIntegrationProviderName"];
|
|
3199
3389
|
};
|
|
3200
3390
|
IntegrationsIntegrationProvider: {
|
|
3201
3391
|
/**
|
|
3202
|
-
* @description File formats accepted at the door. heic/heif are accepted and converted to JPEG on ingestion, so what ends up stored is always jpeg.
|
|
3392
|
+
* @description File formats accepted at the door. **Empty when `file_import` is false** — that is what `rss` returns, and it does not mean "anything goes". heic/heif are accepted and converted to JPEG on ingestion, so what ends up stored is always jpeg.
|
|
3203
3393
|
* @example [
|
|
3204
3394
|
* "mp4",
|
|
3205
3395
|
* "jpeg",
|
|
@@ -3210,22 +3400,22 @@ interface components {
|
|
|
3210
3400
|
* "heif"
|
|
3211
3401
|
* ]
|
|
3212
3402
|
*/
|
|
3213
|
-
accepted_formats
|
|
3214
|
-
config_fields
|
|
3403
|
+
accepted_formats: string[];
|
|
3404
|
+
config_fields: {
|
|
3215
3405
|
default?: unknown;
|
|
3216
|
-
name
|
|
3406
|
+
name: string;
|
|
3217
3407
|
options?: string[];
|
|
3218
3408
|
required?: boolean;
|
|
3219
3409
|
/** @enum {string} */
|
|
3220
|
-
type
|
|
3410
|
+
type: "url" | "text" | "textarea" | "boolean" | "accounts" | "select";
|
|
3221
3411
|
}[];
|
|
3222
3412
|
/** @description Polled by the poll-feeds job, which turns new entries into publications. */
|
|
3223
|
-
content_feed
|
|
3413
|
+
content_feed: boolean;
|
|
3224
3414
|
/** @description Contributes files to the library through POST /uploads/import. */
|
|
3225
|
-
file_import
|
|
3226
|
-
provider
|
|
3415
|
+
file_import: boolean;
|
|
3416
|
+
provider: components["schemas"]["IntegrationsIntegrationProviderName"];
|
|
3227
3417
|
/** @description true = connect with connect_link + code. false = connect with a form built from config_fields. */
|
|
3228
|
-
requires_oauth
|
|
3418
|
+
requires_oauth: boolean;
|
|
3229
3419
|
};
|
|
3230
3420
|
/** @enum {string} */
|
|
3231
3421
|
IntegrationsIntegrationProviderName: "google_drive" | "rss";
|
|
@@ -3243,29 +3433,18 @@ interface components {
|
|
|
3243
3433
|
url?: string;
|
|
3244
3434
|
};
|
|
3245
3435
|
IntegrationsRssConnectRequest: {
|
|
3246
|
-
/**
|
|
3247
|
-
|
|
3248
|
-
* @default false
|
|
3249
|
-
*/
|
|
3250
|
-
auto_publish: boolean;
|
|
3436
|
+
/** @description false (the default) creates each entry as a draft for review. true schedules it a few minutes out, so there is a window to catch it before it goes out on the client's networks. Optional; defaults to `false`. */
|
|
3437
|
+
auto_publish?: boolean;
|
|
3251
3438
|
/** @description Accounts of this organization the entries will be published to. At least one, otherwise 2206. */
|
|
3252
3439
|
id_accounts: string[];
|
|
3253
|
-
/**
|
|
3254
|
-
|
|
3255
|
-
* @default true
|
|
3256
|
-
*/
|
|
3257
|
-
import_image: boolean;
|
|
3440
|
+
/** @description Import the entry's featured image (enclosure, media:content or the first <img> of the content) into the library and attach it. Optional; defaults to `true`. */
|
|
3441
|
+
import_image?: boolean;
|
|
3258
3442
|
/** @enum {string} */
|
|
3259
3443
|
provider: "rss";
|
|
3260
|
-
/** @
|
|
3261
|
-
publication_type
|
|
3262
|
-
/**
|
|
3263
|
-
|
|
3264
|
-
* @default {{title}}
|
|
3265
|
-
*
|
|
3266
|
-
* {{link}}
|
|
3267
|
-
*/
|
|
3268
|
-
template: string;
|
|
3444
|
+
/** @description Optional; defaults to `"profile"`. */
|
|
3445
|
+
publication_type?: string;
|
|
3446
|
+
/** @description Text template. Placeholders: {{title}}, {{link}}, {{summary}}. The result is truncated to the character limit of each network, taken from GET /social_limits. Optional; defaults to `"{{title}}\n\n{{link}}"`. */
|
|
3447
|
+
template?: string;
|
|
3269
3448
|
/**
|
|
3270
3449
|
* @description Public feed URL (RSS 2.0 or Atom). Private or authenticated feeds are not supported.
|
|
3271
3450
|
* @example https://blog.cliente.com/feed
|
|
@@ -3330,34 +3509,38 @@ interface components {
|
|
|
3330
3509
|
};
|
|
3331
3510
|
/** @description One contact's thread, as it looks in an inbox list. */
|
|
3332
3511
|
MessagesConversation: {
|
|
3333
|
-
contact
|
|
3512
|
+
contact: components["schemas"]["Contact"];
|
|
3334
3513
|
/**
|
|
3335
3514
|
* Format: date-time
|
|
3336
3515
|
* @description When the last message of the thread was written, which is what the list is sorted by.
|
|
3337
3516
|
*/
|
|
3338
|
-
date
|
|
3517
|
+
date: string;
|
|
3339
3518
|
/** @description Unread messages **from the contact**. Ours never count. */
|
|
3340
|
-
unread_messages
|
|
3519
|
+
unread_messages: number;
|
|
3341
3520
|
};
|
|
3342
|
-
/** @description
|
|
3521
|
+
/** @description Two different answers, not one with optional fields: **without** `group_by` you get `{total}`, **with** it you get `{stats, group}`. Never both. */
|
|
3343
3522
|
MessagesConversationTotals: {
|
|
3523
|
+
/** @description Conversations in the range. A conversation is one contact on one day, so the same person writing on Monday and on Tuesday counts twice. */
|
|
3524
|
+
total: number;
|
|
3525
|
+
} | {
|
|
3344
3526
|
/**
|
|
3345
3527
|
* @description The grouping that was applied.
|
|
3346
3528
|
* @enum {string}
|
|
3347
3529
|
*/
|
|
3348
|
-
group
|
|
3349
|
-
/** @description The series, sorted ascending.
|
|
3350
|
-
stats
|
|
3351
|
-
/** @description
|
|
3352
|
-
groupValue
|
|
3353
|
-
totalConversations
|
|
3530
|
+
group: "day" | "month" | "year";
|
|
3531
|
+
/** @description The series, sorted ascending. Empty when the range has no conversations. */
|
|
3532
|
+
stats: {
|
|
3533
|
+
/** @description The **number** Mongo's `$dayOfYear` / `$month` / `$year` gives, not a date: 240 for day, 8 for month, 2026 for year. Two years in the same `day` series collide on the same value — narrow the range instead. */
|
|
3534
|
+
groupValue: number;
|
|
3535
|
+
totalConversations: number;
|
|
3354
3536
|
}[];
|
|
3355
|
-
/** @description Conversations in the range. Only when `group_by` was not sent. */
|
|
3356
|
-
total?: number;
|
|
3357
3537
|
};
|
|
3538
|
+
/**
|
|
3539
|
+
* @description What you send to write a message.
|
|
3540
|
+
*
|
|
3541
|
+
* **`comment_message` and `publication_message` cannot be sent through this endpoint today.** Both need `in_response_external_id` — the id of the post or comment being answered — and the endpoint does not read it from the body, so the message would leave with an empty recipient. Use them only through the network's own webhook flow.
|
|
3542
|
+
*/
|
|
3358
3543
|
MessagesMessageInput: {
|
|
3359
|
-
/** @description Identifier of the publication or comment being answered. Required by `comment_message` and `publication_message`. */
|
|
3360
|
-
in_response_external_id?: string;
|
|
3361
3544
|
message_options?: components["schemas"]["MessageOptions"];
|
|
3362
3545
|
message_type: components["schemas"]["MessageType"];
|
|
3363
3546
|
/** @description Required for the text-based types. Validated against `characters` in `GET /social_limits`. */
|
|
@@ -3368,6 +3551,32 @@ interface components {
|
|
|
3368
3551
|
* @enum {string}
|
|
3369
3552
|
*/
|
|
3370
3553
|
MessageType: "simple_message" | "file_message" | "comment_message" | "publication_message" | "quick_reply_message" | "button_message" | "elements_message" | "postback_message" | "template_message" | "interactive_message";
|
|
3554
|
+
/**
|
|
3555
|
+
* @description Metrics translated to a **common vocabulary** shared by every network, which is what makes two networks comparable and summable (each network names them differently: `page_post_engagements`, `total_interactions`, `views`…).
|
|
3556
|
+
*
|
|
3557
|
+
* **A missing key means the network does not publish that metric** — it is never an implicit zero. A key present with value `0` means it was measured and came out zero. Never default a missing key to 0 when displaying it.
|
|
3558
|
+
*
|
|
3559
|
+
* `engagement` is the network's own total when it provides one, and otherwise the sum of likes, comments, shares, saves and clicks. Video views are deliberately excluded from it: a view is not an interaction.
|
|
3560
|
+
*/
|
|
3561
|
+
NormalizedMetrics: {
|
|
3562
|
+
clicks?: number;
|
|
3563
|
+
comments?: number;
|
|
3564
|
+
/** @description Total interactions */
|
|
3565
|
+
engagement?: number;
|
|
3566
|
+
/** @description Followers accumulated at that date, not the day's gain. */
|
|
3567
|
+
followers?: number;
|
|
3568
|
+
/** @description Followers gained that day. */
|
|
3569
|
+
followers_gained?: number;
|
|
3570
|
+
/** @description Times the content was shown (not unique) */
|
|
3571
|
+
impressions?: number;
|
|
3572
|
+
likes?: number;
|
|
3573
|
+
profile_views?: number;
|
|
3574
|
+
/** @description Unique users reached */
|
|
3575
|
+
reach?: number;
|
|
3576
|
+
saves?: number;
|
|
3577
|
+
shares?: number;
|
|
3578
|
+
video_views?: number;
|
|
3579
|
+
};
|
|
3371
3580
|
/** @description The container of accounts, publications and files. Organizations can nest. */
|
|
3372
3581
|
Organization: {
|
|
3373
3582
|
/** @example 66d04a6a427f4c43b9d97f54 */
|
|
@@ -3564,33 +3773,7 @@ interface components {
|
|
|
3564
3773
|
} & {
|
|
3565
3774
|
[key: string]: unknown;
|
|
3566
3775
|
};
|
|
3567
|
-
|
|
3568
|
-
* @description Metrics translated to a **common vocabulary** shared by every network, which is what makes two networks comparable and summable (each network names them differently: `page_post_engagements`, `total_interactions`, `views`…).
|
|
3569
|
-
*
|
|
3570
|
-
* **A missing key means the network does not publish that metric** — it is never an implicit zero. A key present with value `0` means it was measured and came out zero. Never default a missing key to 0 when displaying it.
|
|
3571
|
-
*
|
|
3572
|
-
* `engagement` is the network's own total when it provides one, and otherwise the sum of likes, comments, shares, saves and clicks. Video views are deliberately excluded from it: a view is not an interaction.
|
|
3573
|
-
*/
|
|
3574
|
-
PublicationsNormalizedMetrics: {
|
|
3575
|
-
clicks?: number;
|
|
3576
|
-
comments?: number;
|
|
3577
|
-
/** @description Total interactions */
|
|
3578
|
-
engagement?: number;
|
|
3579
|
-
/** @description Followers accumulated at that date, not the day's gain. */
|
|
3580
|
-
followers?: number;
|
|
3581
|
-
/** @description Followers gained that day. */
|
|
3582
|
-
followers_gained?: number;
|
|
3583
|
-
/** @description Times the content was shown (not unique) */
|
|
3584
|
-
impressions?: number;
|
|
3585
|
-
likes?: number;
|
|
3586
|
-
profile_views?: number;
|
|
3587
|
-
/** @description Unique users reached */
|
|
3588
|
-
reach?: number;
|
|
3589
|
-
saves?: number;
|
|
3590
|
-
shares?: number;
|
|
3591
|
-
video_views?: number;
|
|
3592
|
-
};
|
|
3593
|
-
PublicationsPublication: {
|
|
3776
|
+
Publication: {
|
|
3594
3777
|
_id: string;
|
|
3595
3778
|
/** Format: date-time */
|
|
3596
3779
|
creation_date: string;
|
|
@@ -3613,7 +3796,7 @@ interface components {
|
|
|
3613
3796
|
id_integration?: string;
|
|
3614
3797
|
id_organization: string;
|
|
3615
3798
|
/** @description Last known measurement, in the common vocabulary. Absent until it is measured. */
|
|
3616
|
-
metrics?: components["schemas"]["
|
|
3799
|
+
metrics?: components["schemas"]["NormalizedMetrics"];
|
|
3617
3800
|
/** @description Internal name. Never shown on the social network. */
|
|
3618
3801
|
name?: string;
|
|
3619
3802
|
/** Format: date-time */
|
|
@@ -3643,7 +3826,7 @@ interface components {
|
|
|
3643
3826
|
* @enum {string}
|
|
3644
3827
|
*/
|
|
3645
3828
|
state: "ready" | "withErrors" | "sended" | "draft" | "publishing";
|
|
3646
|
-
statistics?: components["schemas"]["
|
|
3829
|
+
statistics?: components["schemas"]["PublicationStats"];
|
|
3647
3830
|
/** Format: date-time */
|
|
3648
3831
|
stats_updated_date?: string;
|
|
3649
3832
|
text?: string;
|
|
@@ -3686,22 +3869,22 @@ interface components {
|
|
|
3686
3869
|
title?: string;
|
|
3687
3870
|
};
|
|
3688
3871
|
PublicationsPublicationList: {
|
|
3689
|
-
publications: components["schemas"]["
|
|
3872
|
+
publications: components["schemas"]["Publication"][];
|
|
3690
3873
|
total: number;
|
|
3691
3874
|
};
|
|
3692
3875
|
PublicationsPublicationOne: {
|
|
3693
|
-
publication: components["schemas"]["
|
|
3876
|
+
publication: components["schemas"]["Publication"];
|
|
3694
3877
|
};
|
|
3695
3878
|
PublicationsPublicationRetry: {
|
|
3696
3879
|
/** @description Retries a failed publication accepts in total. Read it from here instead of hardcoding it: it is the same number the server enforces. */
|
|
3697
3880
|
max_retries: number;
|
|
3698
|
-
publication: components["schemas"]["
|
|
3881
|
+
publication: components["schemas"]["Publication"];
|
|
3699
3882
|
};
|
|
3700
3883
|
PublicationsPublicationsStatsList: {
|
|
3701
3884
|
/** @description Metric the listing is ordered by */
|
|
3702
3885
|
metric?: string;
|
|
3703
3886
|
/** @description The requested page. Each publication carries its last known `metrics`, `engagement_base` and `stats_updated_date`; a publication that has not been measured yet has none of them. */
|
|
3704
|
-
publications?: components["schemas"]["
|
|
3887
|
+
publications?: components["schemas"]["Publication"][];
|
|
3705
3888
|
/** @description The resolved range and the immediately preceding period of the same length, which is what `summary.previous_total` covers. */
|
|
3706
3889
|
range?: {
|
|
3707
3890
|
/** Format: date-time */
|
|
@@ -3716,16 +3899,63 @@ interface components {
|
|
|
3716
3899
|
/** @description Aggregates for the whole organization in the range. Omitted when `summary=false`. */
|
|
3717
3900
|
summary?: {
|
|
3718
3901
|
by_network?: {
|
|
3719
|
-
metrics?: components["schemas"]["
|
|
3902
|
+
metrics?: components["schemas"]["NormalizedMetrics"];
|
|
3720
3903
|
publications?: number;
|
|
3721
3904
|
social_network?: string;
|
|
3722
3905
|
}[];
|
|
3723
|
-
previous_total?: components["schemas"]["
|
|
3724
|
-
total?: components["schemas"]["
|
|
3906
|
+
previous_total?: components["schemas"]["NormalizedMetrics"];
|
|
3907
|
+
total?: components["schemas"]["NormalizedMetrics"];
|
|
3725
3908
|
};
|
|
3726
3909
|
/** @description Publications matching the filters, for paging */
|
|
3727
3910
|
total?: number;
|
|
3728
3911
|
};
|
|
3912
|
+
/** @description A publication's measured history plus its last known values. */
|
|
3913
|
+
PublicationsPublicationStatsHistory: {
|
|
3914
|
+
/** @enum {string} */
|
|
3915
|
+
engagement_base?: "reach" | "impressions" | "followers";
|
|
3916
|
+
id_publication: string;
|
|
3917
|
+
/** @description The most recent row of the series, with the network's raw payload attached. Absent when the series is empty. */
|
|
3918
|
+
latest?: {
|
|
3919
|
+
/** Format: date-time */
|
|
3920
|
+
collected_date: string;
|
|
3921
|
+
/** @enum {string} */
|
|
3922
|
+
engagement_base?: "reach" | "impressions" | "followers";
|
|
3923
|
+
metrics: components["schemas"]["NormalizedMetrics"];
|
|
3924
|
+
/** @description What the network answered, unprocessed. */
|
|
3925
|
+
raw?: components["schemas"]["PublicationStats"];
|
|
3926
|
+
};
|
|
3927
|
+
metrics?: components["schemas"]["NormalizedMetrics"];
|
|
3928
|
+
/**
|
|
3929
|
+
* Format: date-time
|
|
3930
|
+
* @description When the collector will look again. Absent means the 30-day window is over
|
|
3931
|
+
*/
|
|
3932
|
+
next_stats_update?: string;
|
|
3933
|
+
/** Format: date-time */
|
|
3934
|
+
publish_date?: string;
|
|
3935
|
+
/** @description One row per measured day, oldest first. Empty is valid: nothing has been measured yet. */
|
|
3936
|
+
series: components["schemas"]["PublicationsPublicationStatsPoint"][];
|
|
3937
|
+
social_network: components["schemas"]["SocialNetwork"];
|
|
3938
|
+
statistics?: components["schemas"]["PublicationStats"];
|
|
3939
|
+
/**
|
|
3940
|
+
* Format: date-time
|
|
3941
|
+
* @description Last time it was measured. Absent means never
|
|
3942
|
+
*/
|
|
3943
|
+
stats_updated_date?: string;
|
|
3944
|
+
};
|
|
3945
|
+
/** @description One measurement of a publication. `metrics` is the **running total** at `collected_date`, not that day's increment. */
|
|
3946
|
+
PublicationsPublicationStatsPoint: {
|
|
3947
|
+
/**
|
|
3948
|
+
* Format: date-time
|
|
3949
|
+
* @description Day of the measurement, normalized to 00:00
|
|
3950
|
+
*/
|
|
3951
|
+
collected_date: string;
|
|
3952
|
+
/**
|
|
3953
|
+
* @description What the engagement rate is divided by. Two rows with different bases are not comparable: state the base whenever you put them in the same table.
|
|
3954
|
+
* @enum {string}
|
|
3955
|
+
*/
|
|
3956
|
+
engagement_base?: "reach" | "impressions" | "followers";
|
|
3957
|
+
metrics: components["schemas"]["NormalizedMetrics"];
|
|
3958
|
+
};
|
|
3729
3959
|
/**
|
|
3730
3960
|
* @description Raw, per-network metrics for a publication. Only the fields that belong to the publication's own social network are returned.
|
|
3731
3961
|
*
|
|
@@ -3735,7 +3965,7 @@ interface components {
|
|
|
3735
3965
|
*
|
|
3736
3966
|
* On `bluesky` there are no impressions and no reach either — only the public counters — so engagement is computed over followers.
|
|
3737
3967
|
*/
|
|
3738
|
-
|
|
3968
|
+
PublicationStats: {
|
|
3739
3969
|
angers?: number;
|
|
3740
3970
|
/** @description X (Twitter). Times the post was saved to bookmarks. Always available (`public_metrics`). Normalised as `saves` and counted towards engagement. */
|
|
3741
3971
|
bookmarks?: number;
|
|
@@ -3779,53 +4009,6 @@ interface components {
|
|
|
3779
4009
|
views?: number;
|
|
3780
4010
|
wows?: number;
|
|
3781
4011
|
};
|
|
3782
|
-
/** @description A publication's measured history plus its last known values. */
|
|
3783
|
-
PublicationsPublicationStatsHistory: {
|
|
3784
|
-
/** @enum {string} */
|
|
3785
|
-
engagement_base?: "reach" | "impressions" | "followers";
|
|
3786
|
-
id_publication: string;
|
|
3787
|
-
/** @description The most recent row of the series, with the network's raw payload attached. Absent when the series is empty. */
|
|
3788
|
-
latest?: {
|
|
3789
|
-
/** Format: date-time */
|
|
3790
|
-
collected_date: string;
|
|
3791
|
-
/** @enum {string} */
|
|
3792
|
-
engagement_base?: "reach" | "impressions" | "followers";
|
|
3793
|
-
metrics: components["schemas"]["PublicationsNormalizedMetrics"];
|
|
3794
|
-
/** @description What the network answered, unprocessed. */
|
|
3795
|
-
raw?: components["schemas"]["PublicationsPublicationStats"];
|
|
3796
|
-
};
|
|
3797
|
-
metrics?: components["schemas"]["PublicationsNormalizedMetrics"];
|
|
3798
|
-
/**
|
|
3799
|
-
* Format: date-time
|
|
3800
|
-
* @description When the collector will look again. Absent means the 30-day window is over
|
|
3801
|
-
*/
|
|
3802
|
-
next_stats_update?: string;
|
|
3803
|
-
/** Format: date-time */
|
|
3804
|
-
publish_date?: string;
|
|
3805
|
-
/** @description One row per measured day, oldest first. Empty is valid: nothing has been measured yet. */
|
|
3806
|
-
series: components["schemas"]["PublicationsPublicationStatsPoint"][];
|
|
3807
|
-
social_network: components["schemas"]["SocialNetwork"];
|
|
3808
|
-
statistics?: components["schemas"]["PublicationsPublicationStats"];
|
|
3809
|
-
/**
|
|
3810
|
-
* Format: date-time
|
|
3811
|
-
* @description Last time it was measured. Absent means never
|
|
3812
|
-
*/
|
|
3813
|
-
stats_updated_date?: string;
|
|
3814
|
-
};
|
|
3815
|
-
/** @description One measurement of a publication. `metrics` is the **running total** at `collected_date`, not that day's increment. */
|
|
3816
|
-
PublicationsPublicationStatsPoint: {
|
|
3817
|
-
/**
|
|
3818
|
-
* Format: date-time
|
|
3819
|
-
* @description Day of the measurement, normalized to 00:00
|
|
3820
|
-
*/
|
|
3821
|
-
collected_date: string;
|
|
3822
|
-
/**
|
|
3823
|
-
* @description What the engagement rate is divided by. Two rows with different bases are not comparable: state the base whenever you put them in the same table.
|
|
3824
|
-
* @enum {string}
|
|
3825
|
-
*/
|
|
3826
|
-
engagement_base?: "reach" | "impressions" | "followers";
|
|
3827
|
-
metrics: components["schemas"]["PublicationsNormalizedMetrics"];
|
|
3828
|
-
};
|
|
3829
4012
|
/** @description What can be read back about an organization's own application. The secrets are not here and never will be. */
|
|
3830
4013
|
SocialCredentials: {
|
|
3831
4014
|
/** @description The application's name, as Discord returned it when the credentials were validated. */
|
|
@@ -4511,8 +4694,8 @@ interface operations {
|
|
|
4511
4694
|
};
|
|
4512
4695
|
content: {
|
|
4513
4696
|
"application/json": {
|
|
4514
|
-
client_apps
|
|
4515
|
-
total
|
|
4697
|
+
client_apps: components["schemas"]["AppsClientApp"][];
|
|
4698
|
+
total: number;
|
|
4516
4699
|
};
|
|
4517
4700
|
};
|
|
4518
4701
|
};
|
|
@@ -4542,7 +4725,7 @@ interface operations {
|
|
|
4542
4725
|
};
|
|
4543
4726
|
content: {
|
|
4544
4727
|
"application/json": {
|
|
4545
|
-
client_app
|
|
4728
|
+
client_app: components["schemas"]["AppsClientApp"];
|
|
4546
4729
|
};
|
|
4547
4730
|
};
|
|
4548
4731
|
};
|
|
@@ -4570,7 +4753,7 @@ interface operations {
|
|
|
4570
4753
|
};
|
|
4571
4754
|
content: {
|
|
4572
4755
|
"application/json": {
|
|
4573
|
-
client_app
|
|
4756
|
+
client_app: components["schemas"]["AppsClientApp"];
|
|
4574
4757
|
};
|
|
4575
4758
|
};
|
|
4576
4759
|
};
|
|
@@ -4602,7 +4785,7 @@ interface operations {
|
|
|
4602
4785
|
};
|
|
4603
4786
|
content: {
|
|
4604
4787
|
"application/json": {
|
|
4605
|
-
client_app
|
|
4788
|
+
client_app: components["schemas"]["AppsClientApp"];
|
|
4606
4789
|
};
|
|
4607
4790
|
};
|
|
4608
4791
|
};
|
|
@@ -4656,7 +4839,7 @@ interface operations {
|
|
|
4656
4839
|
};
|
|
4657
4840
|
content: {
|
|
4658
4841
|
"application/json": {
|
|
4659
|
-
secret
|
|
4842
|
+
secret: string;
|
|
4660
4843
|
};
|
|
4661
4844
|
};
|
|
4662
4845
|
};
|
|
@@ -5135,10 +5318,8 @@ interface operations {
|
|
|
5135
5318
|
content: {
|
|
5136
5319
|
"application/json": {
|
|
5137
5320
|
/** @description AI credits this plan has spent in total, this regeneration included. */
|
|
5138
|
-
credits_spent
|
|
5139
|
-
publication
|
|
5140
|
-
[key: string]: unknown;
|
|
5141
|
-
};
|
|
5321
|
+
credits_spent: number;
|
|
5322
|
+
publication: components["schemas"]["Publication"];
|
|
5142
5323
|
};
|
|
5143
5324
|
};
|
|
5144
5325
|
};
|
|
@@ -5757,7 +5938,7 @@ interface operations {
|
|
|
5757
5938
|
};
|
|
5758
5939
|
content: {
|
|
5759
5940
|
"application/json": {
|
|
5760
|
-
providers
|
|
5941
|
+
providers: components["schemas"]["IntegrationsIntegrationProvider"][];
|
|
5761
5942
|
};
|
|
5762
5943
|
};
|
|
5763
5944
|
};
|
|
@@ -6353,9 +6534,9 @@ interface operations {
|
|
|
6353
6534
|
};
|
|
6354
6535
|
content: {
|
|
6355
6536
|
"application/json": {
|
|
6356
|
-
conversations
|
|
6537
|
+
conversations: components["schemas"]["MessagesConversation"][];
|
|
6357
6538
|
/** @description Conversations this account has in total, ignoring the pagination. */
|
|
6358
|
-
total
|
|
6539
|
+
total: number;
|
|
6359
6540
|
};
|
|
6360
6541
|
};
|
|
6361
6542
|
};
|
|
@@ -6474,10 +6655,10 @@ interface operations {
|
|
|
6474
6655
|
content: {
|
|
6475
6656
|
"application/json": {
|
|
6476
6657
|
/** @description Templates as the network returns them. */
|
|
6477
|
-
templates
|
|
6658
|
+
templates: {
|
|
6478
6659
|
[key: string]: unknown;
|
|
6479
6660
|
}[];
|
|
6480
|
-
total
|
|
6661
|
+
total: number;
|
|
6481
6662
|
};
|
|
6482
6663
|
};
|
|
6483
6664
|
};
|
|
@@ -6511,7 +6692,7 @@ interface operations {
|
|
|
6511
6692
|
};
|
|
6512
6693
|
content: {
|
|
6513
6694
|
"application/json": {
|
|
6514
|
-
template
|
|
6695
|
+
template: {
|
|
6515
6696
|
[key: string]: unknown;
|
|
6516
6697
|
};
|
|
6517
6698
|
};
|
|
@@ -6605,8 +6786,8 @@ interface operations {
|
|
|
6605
6786
|
};
|
|
6606
6787
|
content: {
|
|
6607
6788
|
"application/json": {
|
|
6608
|
-
messages
|
|
6609
|
-
total
|
|
6789
|
+
messages: components["schemas"]["Message"][];
|
|
6790
|
+
total: number;
|
|
6610
6791
|
};
|
|
6611
6792
|
};
|
|
6612
6793
|
};
|
|
@@ -6640,7 +6821,7 @@ interface operations {
|
|
|
6640
6821
|
};
|
|
6641
6822
|
content: {
|
|
6642
6823
|
"application/json": {
|
|
6643
|
-
message
|
|
6824
|
+
message: components["schemas"]["Message"];
|
|
6644
6825
|
};
|
|
6645
6826
|
};
|
|
6646
6827
|
};
|
|
@@ -6865,9 +7046,12 @@ interface operations {
|
|
|
6865
7046
|
limit?: components["parameters"]["Productslimit"];
|
|
6866
7047
|
/** @description Records to skip (pagination) */
|
|
6867
7048
|
offset?: components["parameters"]["Productsoffset"];
|
|
6868
|
-
/** @description
|
|
7049
|
+
/** @description The catalogue to list. **Effectively required**: without it the request fails with `ERROR_CODE_2000`. Get one from `GET .../products_catalogs`. */
|
|
6869
7050
|
product_catalog_id?: string;
|
|
6870
|
-
/**
|
|
7051
|
+
/**
|
|
7052
|
+
* @deprecated
|
|
7053
|
+
* @description **Do not use: it does not reach the network.** The server forwards it under a different name than the SDK reads, so a request with only `product_id` fails with `ERROR_CODE_2000` ("catalogue or product identifier required"). Ask for the catalogue and pick the product out of the page.
|
|
7054
|
+
*/
|
|
6871
7055
|
product_id?: string;
|
|
6872
7056
|
};
|
|
6873
7057
|
header?: never;
|
|
@@ -6888,9 +7072,9 @@ interface operations {
|
|
|
6888
7072
|
};
|
|
6889
7073
|
content: {
|
|
6890
7074
|
"application/json": {
|
|
6891
|
-
items
|
|
6892
|
-
/** @description
|
|
6893
|
-
total
|
|
7075
|
+
items: components["schemas"]["ProductsProduct"][];
|
|
7076
|
+
/** @description **Always 0 today.** It is read from Meta's `summary.total_count`, and PlanVortex does not ask for the summary, so the field never arrives. Page until you get a short page instead of trusting this number. */
|
|
7077
|
+
total: number;
|
|
6894
7078
|
};
|
|
6895
7079
|
};
|
|
6896
7080
|
};
|
|
@@ -6925,7 +7109,7 @@ interface operations {
|
|
|
6925
7109
|
};
|
|
6926
7110
|
content: {
|
|
6927
7111
|
"application/json": {
|
|
6928
|
-
product_id
|
|
7112
|
+
product_id: string;
|
|
6929
7113
|
};
|
|
6930
7114
|
};
|
|
6931
7115
|
};
|
|
@@ -6958,9 +7142,9 @@ interface operations {
|
|
|
6958
7142
|
};
|
|
6959
7143
|
content: {
|
|
6960
7144
|
"application/json": {
|
|
6961
|
-
items
|
|
6962
|
-
/** @description How many catalogues came back in this page. */
|
|
6963
|
-
total
|
|
7145
|
+
items: components["schemas"]["ProductsProductCatalog"][];
|
|
7146
|
+
/** @description How many catalogues came back **in this page**, not how many exist. It is the length of `items`, so it can never tell you there is another page. */
|
|
7147
|
+
total: number;
|
|
6964
7148
|
};
|
|
6965
7149
|
};
|
|
6966
7150
|
};
|
|
@@ -6992,8 +7176,8 @@ interface operations {
|
|
|
6992
7176
|
};
|
|
6993
7177
|
content: {
|
|
6994
7178
|
"application/json": {
|
|
6995
|
-
/** @description Identifier of the catalogue on the network. */
|
|
6996
|
-
product_catalog
|
|
7179
|
+
/** @description Identifier of the catalogue on the network. **A string, not the catalogue**: the name says otherwise and it is the id. Read it back with `GET .../products_catalogs` if you need the rest. */
|
|
7180
|
+
product_catalog: string;
|
|
6997
7181
|
};
|
|
6998
7182
|
};
|
|
6999
7183
|
};
|
|
@@ -7212,7 +7396,7 @@ interface operations {
|
|
|
7212
7396
|
};
|
|
7213
7397
|
content: {
|
|
7214
7398
|
"application/json": {
|
|
7215
|
-
publications: components["schemas"]["
|
|
7399
|
+
publications: components["schemas"]["Publication"][];
|
|
7216
7400
|
total: number;
|
|
7217
7401
|
};
|
|
7218
7402
|
};
|
|
@@ -7330,9 +7514,9 @@ interface operations {
|
|
|
7330
7514
|
};
|
|
7331
7515
|
content: {
|
|
7332
7516
|
"application/json": {
|
|
7333
|
-
comments
|
|
7517
|
+
comments: components["schemas"]["CommentsComment"][];
|
|
7334
7518
|
/** @description Rows matching the filters, not rows returned */
|
|
7335
|
-
total
|
|
7519
|
+
total: number;
|
|
7336
7520
|
};
|
|
7337
7521
|
};
|
|
7338
7522
|
};
|
|
@@ -7369,7 +7553,7 @@ interface operations {
|
|
|
7369
7553
|
};
|
|
7370
7554
|
content: {
|
|
7371
7555
|
"application/json": {
|
|
7372
|
-
comment
|
|
7556
|
+
comment: components["schemas"]["CommentsComment"];
|
|
7373
7557
|
};
|
|
7374
7558
|
};
|
|
7375
7559
|
};
|
|
@@ -7397,7 +7581,7 @@ interface operations {
|
|
|
7397
7581
|
};
|
|
7398
7582
|
content: {
|
|
7399
7583
|
"application/json": {
|
|
7400
|
-
success
|
|
7584
|
+
success: boolean;
|
|
7401
7585
|
};
|
|
7402
7586
|
};
|
|
7403
7587
|
};
|
|
@@ -7463,10 +7647,11 @@ interface operations {
|
|
|
7463
7647
|
};
|
|
7464
7648
|
content: {
|
|
7465
7649
|
"application/json": {
|
|
7466
|
-
comment
|
|
7650
|
+
comment: components["schemas"]["CommentsComment"];
|
|
7467
7651
|
/** @description X credits this reply spent. `0` on every other network. */
|
|
7468
|
-
credits_consumed
|
|
7469
|
-
reply
|
|
7652
|
+
credits_consumed: number;
|
|
7653
|
+
/** @description Your reply as it was stored. **It can arrive without `_id`**: the reply is published on the network first and stored afterwards, and storing it is deliberately not allowed to fail the request — the network already published it. When that write fails you get what the network returned, which has no PlanVortex identifier. `comment.our_reply_external_id` is the field that always identifies it. */
|
|
7654
|
+
reply: components["schemas"]["CommentsComment"];
|
|
7470
7655
|
};
|
|
7471
7656
|
};
|
|
7472
7657
|
};
|
|
@@ -7540,7 +7725,10 @@ interface operations {
|
|
|
7540
7725
|
offset?: components["parameters"]["Contactsoffset"];
|
|
7541
7726
|
/** @description Full-text search over the contact's name. */
|
|
7542
7727
|
search?: string;
|
|
7543
|
-
/**
|
|
7728
|
+
/**
|
|
7729
|
+
* @deprecated
|
|
7730
|
+
* @description **Do not use: it always returns an empty list.** The server compares the whole `social_identifiers` array against the network name, and the array holds objects, so nothing ever matches. Filter client-side on `social_identifiers[].social_network` until this is fixed.
|
|
7731
|
+
*/
|
|
7544
7732
|
social_network?: components["schemas"]["SocialNetwork"];
|
|
7545
7733
|
};
|
|
7546
7734
|
header?: never;
|
|
@@ -7559,8 +7747,8 @@ interface operations {
|
|
|
7559
7747
|
};
|
|
7560
7748
|
content: {
|
|
7561
7749
|
"application/json": {
|
|
7562
|
-
contacts
|
|
7563
|
-
total
|
|
7750
|
+
contacts: components["schemas"]["Contact"][];
|
|
7751
|
+
total: number;
|
|
7564
7752
|
};
|
|
7565
7753
|
};
|
|
7566
7754
|
};
|
|
@@ -7579,7 +7767,7 @@ interface operations {
|
|
|
7579
7767
|
};
|
|
7580
7768
|
requestBody: {
|
|
7581
7769
|
content: {
|
|
7582
|
-
"application/json": components["schemas"]["
|
|
7770
|
+
"application/json": components["schemas"]["ContactsContactCreate"];
|
|
7583
7771
|
};
|
|
7584
7772
|
};
|
|
7585
7773
|
responses: {
|
|
@@ -7590,7 +7778,7 @@ interface operations {
|
|
|
7590
7778
|
};
|
|
7591
7779
|
content: {
|
|
7592
7780
|
"application/json": {
|
|
7593
|
-
contact
|
|
7781
|
+
contact: components["schemas"]["Contact"];
|
|
7594
7782
|
};
|
|
7595
7783
|
};
|
|
7596
7784
|
};
|
|
@@ -7642,7 +7830,7 @@ interface operations {
|
|
|
7642
7830
|
};
|
|
7643
7831
|
content: {
|
|
7644
7832
|
"application/json": {
|
|
7645
|
-
contact
|
|
7833
|
+
contact: components["schemas"]["Contact"];
|
|
7646
7834
|
};
|
|
7647
7835
|
};
|
|
7648
7836
|
};
|
|
@@ -7663,11 +7851,11 @@ interface operations {
|
|
|
7663
7851
|
};
|
|
7664
7852
|
requestBody: {
|
|
7665
7853
|
content: {
|
|
7666
|
-
"application/json": components["schemas"]["
|
|
7854
|
+
"application/json": components["schemas"]["ContactsContactUpdate"];
|
|
7667
7855
|
};
|
|
7668
7856
|
};
|
|
7669
7857
|
responses: {
|
|
7670
|
-
/** @description Updated */
|
|
7858
|
+
/** @description Updated. **It does not return the contact**: read it again if you need the new state. */
|
|
7671
7859
|
200: {
|
|
7672
7860
|
headers: {
|
|
7673
7861
|
[name: string]: unknown;
|
|
@@ -7768,6 +7956,7 @@ interface operations {
|
|
|
7768
7956
|
getIntegrations: {
|
|
7769
7957
|
parameters: {
|
|
7770
7958
|
query?: {
|
|
7959
|
+
/** @description How many to return. **Without it there is no limit at all** and the whole list comes back — unlike every other listing in this API, which caps at 10. */
|
|
7771
7960
|
limit?: number;
|
|
7772
7961
|
offset?: number;
|
|
7773
7962
|
/** @description Filter by provider */
|
|
@@ -7789,8 +7978,8 @@ interface operations {
|
|
|
7789
7978
|
};
|
|
7790
7979
|
content: {
|
|
7791
7980
|
"application/json": {
|
|
7792
|
-
integrations
|
|
7793
|
-
total
|
|
7981
|
+
integrations: components["schemas"]["IntegrationsIntegration"][];
|
|
7982
|
+
total: number;
|
|
7794
7983
|
};
|
|
7795
7984
|
};
|
|
7796
7985
|
};
|
|
@@ -7828,7 +8017,7 @@ interface operations {
|
|
|
7828
8017
|
};
|
|
7829
8018
|
content: {
|
|
7830
8019
|
"application/json": {
|
|
7831
|
-
integration
|
|
8020
|
+
integration: components["schemas"]["IntegrationsIntegration"];
|
|
7832
8021
|
};
|
|
7833
8022
|
};
|
|
7834
8023
|
};
|
|
@@ -7875,7 +8064,7 @@ interface operations {
|
|
|
7875
8064
|
};
|
|
7876
8065
|
content: {
|
|
7877
8066
|
"application/json": {
|
|
7878
|
-
integration
|
|
8067
|
+
integration: components["schemas"]["IntegrationsIntegration"];
|
|
7879
8068
|
};
|
|
7880
8069
|
};
|
|
7881
8070
|
};
|
|
@@ -7919,7 +8108,7 @@ interface operations {
|
|
|
7919
8108
|
};
|
|
7920
8109
|
content: {
|
|
7921
8110
|
"application/json": {
|
|
7922
|
-
integration
|
|
8111
|
+
integration: components["schemas"]["IntegrationsIntegration"];
|
|
7923
8112
|
};
|
|
7924
8113
|
};
|
|
7925
8114
|
};
|
|
@@ -7955,7 +8144,7 @@ interface operations {
|
|
|
7955
8144
|
};
|
|
7956
8145
|
content: {
|
|
7957
8146
|
"application/json": {
|
|
7958
|
-
success
|
|
8147
|
+
success: boolean;
|
|
7959
8148
|
};
|
|
7960
8149
|
};
|
|
7961
8150
|
};
|
|
@@ -7991,12 +8180,12 @@ interface operations {
|
|
|
7991
8180
|
};
|
|
7992
8181
|
content: {
|
|
7993
8182
|
"application/json": {
|
|
7994
|
-
access_token
|
|
8183
|
+
access_token: string;
|
|
7995
8184
|
/** @description Google Cloud project NUMBER. With scope drive.file the permission over a picked file is granted to the project that picked it, so this must belong to the same project as the OAuth client. */
|
|
7996
|
-
app_id
|
|
7997
|
-
developer_key
|
|
8185
|
+
app_id: string;
|
|
8186
|
+
developer_key: string;
|
|
7998
8187
|
/** Format: date-time */
|
|
7999
|
-
expires_in
|
|
8188
|
+
expires_in: string;
|
|
8000
8189
|
};
|
|
8001
8190
|
};
|
|
8002
8191
|
};
|
|
@@ -8036,7 +8225,7 @@ interface operations {
|
|
|
8036
8225
|
};
|
|
8037
8226
|
content: {
|
|
8038
8227
|
"application/json": {
|
|
8039
|
-
integration
|
|
8228
|
+
integration: components["schemas"]["IntegrationsIntegration"];
|
|
8040
8229
|
};
|
|
8041
8230
|
};
|
|
8042
8231
|
};
|
|
@@ -8085,7 +8274,7 @@ interface operations {
|
|
|
8085
8274
|
content: {
|
|
8086
8275
|
"application/json": {
|
|
8087
8276
|
/** @example https://accounts.google.com/o/oauth2/v2/auth?response_type=code&... */
|
|
8088
|
-
url
|
|
8277
|
+
url: string;
|
|
8089
8278
|
};
|
|
8090
8279
|
};
|
|
8091
8280
|
};
|
|
@@ -8174,9 +8363,13 @@ interface operations {
|
|
|
8174
8363
|
};
|
|
8175
8364
|
content: {
|
|
8176
8365
|
"application/json": {
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8366
|
+
/**
|
|
8367
|
+
* @description The axis that was applied. Defaults to `day`; anything else is rejected with 1000.
|
|
8368
|
+
* @enum {string}
|
|
8369
|
+
*/
|
|
8370
|
+
group_by: "day" | "network" | "account" | "total";
|
|
8371
|
+
range: components["schemas"]["DashboardDashboardRange"];
|
|
8372
|
+
stats: components["schemas"]["DashboardMetricRow"][];
|
|
8180
8373
|
};
|
|
8181
8374
|
};
|
|
8182
8375
|
};
|
|
@@ -8391,7 +8584,7 @@ interface operations {
|
|
|
8391
8584
|
};
|
|
8392
8585
|
content: {
|
|
8393
8586
|
"application/json": {
|
|
8394
|
-
range
|
|
8587
|
+
range: components["schemas"]["DashboardDashboardRange"];
|
|
8395
8588
|
} & components["schemas"]["DashboardPublicationsSummary"];
|
|
8396
8589
|
};
|
|
8397
8590
|
};
|
|
@@ -8426,9 +8619,9 @@ interface operations {
|
|
|
8426
8619
|
};
|
|
8427
8620
|
content: {
|
|
8428
8621
|
"application/json": {
|
|
8429
|
-
metric
|
|
8430
|
-
publications
|
|
8431
|
-
range
|
|
8622
|
+
metric: components["schemas"]["DashboardMetricName"];
|
|
8623
|
+
publications: components["schemas"]["DashboardTopPublication"][];
|
|
8624
|
+
range: components["schemas"]["DashboardDashboardRange"];
|
|
8432
8625
|
};
|
|
8433
8626
|
};
|
|
8434
8627
|
};
|
|
@@ -8709,7 +8902,7 @@ interface operations {
|
|
|
8709
8902
|
[name: string]: unknown;
|
|
8710
8903
|
};
|
|
8711
8904
|
content: {
|
|
8712
|
-
"application/json": components["schemas"]["
|
|
8905
|
+
"application/json": components["schemas"]["PublicationStats"];
|
|
8713
8906
|
};
|
|
8714
8907
|
};
|
|
8715
8908
|
/**
|
|
@@ -9526,7 +9719,7 @@ interface operations {
|
|
|
9526
9719
|
*
|
|
9527
9720
|
* | Code | Meaning |
|
|
9528
9721
|
* | --- | --- |
|
|
9529
|
-
* | `514` | This endpoint needs app credentials: a user token
|
|
9722
|
+
* | `514` | This endpoint needs app credentials: neither a user token nor a temporal connect token can issue one |
|
|
9530
9723
|
* | `532` | `redirect_uri` is not one of the app's registered `redirect_urls` |
|
|
9531
9724
|
* | `1101` | Invalid organization |
|
|
9532
9725
|
*/
|
|
@@ -9566,7 +9759,7 @@ interface operations {
|
|
|
9566
9759
|
};
|
|
9567
9760
|
content: {
|
|
9568
9761
|
"application/json": {
|
|
9569
|
-
total
|
|
9762
|
+
total: number;
|
|
9570
9763
|
};
|
|
9571
9764
|
};
|
|
9572
9765
|
};
|
|
@@ -9592,7 +9785,7 @@ interface operations {
|
|
|
9592
9785
|
};
|
|
9593
9786
|
content: {
|
|
9594
9787
|
"application/json": {
|
|
9595
|
-
total
|
|
9788
|
+
total: number;
|
|
9596
9789
|
};
|
|
9597
9790
|
};
|
|
9598
9791
|
};
|
|
@@ -10279,9 +10472,11 @@ interface operations {
|
|
|
10279
10472
|
* Debajo de cada uno esta `src/generated/openapi.d.ts`, que sale del OpenAPI publico y no se toca
|
|
10280
10473
|
* a mano. Este fichero es la capa fina que hay encima y hace tres cosas que un generador no puede:
|
|
10281
10474
|
*
|
|
10282
|
-
* 1. **Pone nombres legibles.** En lo generado un esquema se llama `
|
|
10475
|
+
* 1. **Pone nombres legibles.** En lo generado un esquema se llama `PublicationsPublicationInput`,
|
|
10283
10476
|
* porque los 16 documentos del spec se unen en uno y el `Plan` de un cliente no es el `Plan`
|
|
10284
|
-
* de una organizacion. Aqui se llama `
|
|
10477
|
+
* de una organizacion. Aqui se llama `PublicationInput`. Los que describen LO MISMO en varias
|
|
10478
|
+
* secciones viven en `common.json` y conservan su nombre —`Publication`, `Account`, `Upload`,
|
|
10479
|
+
* `Message`, `Contact`, `NormalizedMetrics`—: es lo que evita dos tipos para un solo objeto.
|
|
10285
10480
|
* 2. **Abre las enumeraciones que crecen** (§ trampa 8 del roadmap). `ALLOWED_RRSS` va por diez
|
|
10286
10481
|
* redes y sube varias veces al ano. Si `social_network` fuera una union cerrada, el dia que
|
|
10287
10482
|
* entre la undecima **dejaria de compilar el codigo de todos los integradores** hasta que
|
|
@@ -10352,9 +10547,9 @@ type CommentNetwork = OpenEnum<Schemas["CommentsCommentNetworkName"]>;
|
|
|
10352
10547
|
* `draft` no se envia nunca; `ready` esta programada; `publishing` esta en manos de la red en este
|
|
10353
10548
|
* momento; `sended` salio; `withErrors` fallo y trae el motivo en `publication_errors`.
|
|
10354
10549
|
*/
|
|
10355
|
-
type PublicationState = OpenEnum<Schemas["
|
|
10550
|
+
type PublicationState = OpenEnum<Schemas["Publication"]["state"]>;
|
|
10356
10551
|
/** Donde se publica dentro de la red: perfil, pagina, grupo, reel o story. */
|
|
10357
|
-
type PublicationType = OpenEnum<Schemas["
|
|
10552
|
+
type PublicationType = OpenEnum<Schemas["Publication"]["publication_type"]>;
|
|
10358
10553
|
/** `image` o `video`. Abierto porque el catalogo de formatos se ha ampliado antes (HEIC). */
|
|
10359
10554
|
type FileType = OpenEnum<Schemas["Upload"]["file_type"]>;
|
|
10360
10555
|
/** La extension real del fichero ya guardado. Un HEIC entra pero se convierte a JPEG al subirlo. */
|
|
@@ -10427,6 +10622,20 @@ type Organization = Schemas["Organization"];
|
|
|
10427
10622
|
type AiContext = Schemas["AiContext"];
|
|
10428
10623
|
/** Las credenciales de la aplicacion propia de una organizacion (BYOB). Los secretos nunca salen. */
|
|
10429
10624
|
type SocialCredentials = Schemas["SocialCredentials"];
|
|
10625
|
+
/**
|
|
10626
|
+
* Las credenciales tal y como se MANDAN. Son de solo escritura: nada de lo que va aqui vuelve.
|
|
10627
|
+
*
|
|
10628
|
+
* Las tres hacen falta la primera vez; despues, lo que se omite se conserva.
|
|
10629
|
+
*/
|
|
10630
|
+
type SocialCredentialsInput = Schemas["OrganizationsSocialCredentialsInput"];
|
|
10631
|
+
/**
|
|
10632
|
+
* La configuracion de proveedores de IA de un cliente (BYOK), ambito a ambito.
|
|
10633
|
+
*
|
|
10634
|
+
* Un ambito en `null` borra su configuracion y devuelve ese ambito a los creditos de PlanVortex.
|
|
10635
|
+
*/
|
|
10636
|
+
type AiSettings = Schemas["ClientsAiSettings"];
|
|
10637
|
+
/** Un cliente con sus organizaciones raiz dentro. Es el atajo del arranque: 1 peticion en vez de N. */
|
|
10638
|
+
type ClientWithOrganizations = Operations["getClientsWithOrganizations"]["responses"][200]["content"]["application/json"]["clients"][number];
|
|
10430
10639
|
/**
|
|
10431
10640
|
* Una cuenta social conectada a una organizacion.
|
|
10432
10641
|
*
|
|
@@ -10512,7 +10721,7 @@ type FileProperties = Schemas["FileProperties"];
|
|
|
10512
10721
|
* Si `state` es `withErrors`, el motivo esta en `publication_errors` —que es un ARRAY— y su `code`
|
|
10513
10722
|
* es un codigo del catalogo de PlanVortex, nunca un status HTTP.
|
|
10514
10723
|
*/
|
|
10515
|
-
type Publication = Override<Schemas["
|
|
10724
|
+
type Publication = Override<Schemas["Publication"], {
|
|
10516
10725
|
social_network: SocialNetwork;
|
|
10517
10726
|
state: PublicationState;
|
|
10518
10727
|
publication_type: PublicationType;
|
|
@@ -10541,9 +10750,9 @@ type PublicationInput = Override<Schemas["PublicationsPublicationInput"], {
|
|
|
10541
10750
|
publish_date: string | Date;
|
|
10542
10751
|
}>;
|
|
10543
10752
|
/** El desglose crudo de metricas que da la red, que no es el mismo en dos redes cualesquiera. */
|
|
10544
|
-
type PublicationStats = Schemas["
|
|
10753
|
+
type PublicationStats = Schemas["PublicationStats"];
|
|
10545
10754
|
/** Las metricas comparables entre redes: las que se pueden sumar en una grafica. */
|
|
10546
|
-
type PublicationMetrics = Schemas["
|
|
10755
|
+
type PublicationMetrics = Schemas["NormalizedMetrics"];
|
|
10547
10756
|
/** La serie historica de una publicacion, mas su ultima medicion. */
|
|
10548
10757
|
type PublicationStatsHistory = Override<Schemas["PublicationsPublicationStatsHistory"], {
|
|
10549
10758
|
social_network: SocialNetwork;
|
|
@@ -10556,18 +10765,91 @@ type PublicationStatsPoint = Override<Schemas["PublicationsPublicationStatsPoint
|
|
|
10556
10765
|
/**
|
|
10557
10766
|
* Un comentario, o una resena de Google Business.
|
|
10558
10767
|
*
|
|
10559
|
-
*
|
|
10560
|
-
*
|
|
10561
|
-
*
|
|
10562
|
-
*
|
|
10768
|
+
* TRES COSAS QUE SORPRENDEN, las tres comprobadas contra el servidor en la fase 7:
|
|
10769
|
+
*
|
|
10770
|
+
* - **`id_publication` falta** cuando el comentario no cuelga de una publicacion nuestra, y eso
|
|
10771
|
+
* no es raro: la resena de Google Business cuelga de la FICHA (ahi `publication_external_id`
|
|
10772
|
+
* es `locations/{id}`), y un video subido a mano al canal o un post anterior a PlanVortex
|
|
10773
|
+
* tambien reciben comentarios. Lo que identifica siempre es `publication_external_id`.
|
|
10774
|
+
* - **`id_account` e `id_publication` cambian de forma segun la operacion**: LA BANDEJA los
|
|
10775
|
+
* devuelve poblados —el objeto entero— y todo lo demas —los hilos en vivo, responder,
|
|
10776
|
+
* actualizar— como cadena. Es la misma asimetria que `Publication.id_account` y se tapa igual,
|
|
10777
|
+
* con {@link accountId} / {@link account} y {@link publicationId} / {@link publication}.
|
|
10778
|
+
* - **`text` puede venir vacio y no es un fallo**: una resena de solo estrellas no lleva texto,
|
|
10779
|
+
* asi que se pinta el `rating` al lado en vez de dar la fila por rota.
|
|
10780
|
+
*
|
|
10781
|
+
* De lo nuestro solo son `read` y `replied`. Todo lo demas lo manda la red, y una lectura en vivo
|
|
10782
|
+
* pisa lo guardado.
|
|
10563
10783
|
*/
|
|
10564
10784
|
type Comment = Override<Schemas["CommentsComment"], {
|
|
10565
10785
|
social_network: CommentNetwork;
|
|
10786
|
+
id_account: string | Account;
|
|
10787
|
+
id_publication: string | Publication;
|
|
10566
10788
|
}>;
|
|
10567
10789
|
/** Quien escribio un comentario. `is_own` distingue el nuestro del de un tercero. */
|
|
10568
10790
|
type CommentAuthor = Schemas["CommentsCommentAuthor"];
|
|
10569
|
-
/**
|
|
10570
|
-
|
|
10791
|
+
/**
|
|
10792
|
+
* Un hilo LEIDO EN VIVO: lo que la red dice ahora mismo, ya reconciliado con lo guardado.
|
|
10793
|
+
*
|
|
10794
|
+
* DOS COSAS: `credits_consumed` es dinero de verdad y solo en X —un credito por respuesta
|
|
10795
|
+
* devuelta, `0` en las demas redes—, y `next_cursor` es el token opaco de la red, que se devuelve
|
|
10796
|
+
* TAL CUAL como `offset` en la llamada siguiente. Que falte significa que no hay mas paginas.
|
|
10797
|
+
*/
|
|
10798
|
+
type CommentThread = Override<Schemas["CommentsCommentThread"], {
|
|
10799
|
+
comments: Comment[];
|
|
10800
|
+
}>;
|
|
10801
|
+
/**
|
|
10802
|
+
* Lo que devuelve responder a un comentario: el comentario ya marcado como respondido, la
|
|
10803
|
+
* respuesta, y lo que costo.
|
|
10804
|
+
*
|
|
10805
|
+
* **`reply` puede llegar SIN `_id`.** La respuesta se publica primero en la red y se guarda
|
|
10806
|
+
* despues, y guardarla no puede tumbar la peticion —la red ya la publico—, asi que cuando esa
|
|
10807
|
+
* escritura falla lo que llega es lo que devolvio la red, sin identificador de PlanVortex. El
|
|
10808
|
+
* campo que la identifica siempre es `comment.our_reply_external_id`.
|
|
10809
|
+
*/
|
|
10810
|
+
interface CommentReplyResult {
|
|
10811
|
+
comment: Comment;
|
|
10812
|
+
reply: Comment;
|
|
10813
|
+
credits_consumed: number;
|
|
10814
|
+
}
|
|
10815
|
+
/**
|
|
10816
|
+
* Una conversacion: un contacto, cuando escribio por ultima vez y cuantos mensajes suyos quedan
|
|
10817
|
+
* sin leer.
|
|
10818
|
+
*
|
|
10819
|
+
* No tiene `_id` propio —sale de una agregacion que lo proyecta fuera— porque la conversacion no
|
|
10820
|
+
* es una entidad: lo que existe son los mensajes con ese contacto. El identificador con el que se
|
|
10821
|
+
* abre el hilo es `conversation.contact._id`.
|
|
10822
|
+
*/
|
|
10823
|
+
type Conversation = Override<Schemas["MessagesConversation"], {
|
|
10824
|
+
contact: Contact;
|
|
10825
|
+
}>;
|
|
10826
|
+
/**
|
|
10827
|
+
* Cuantas conversaciones hubo en un rango. Son DOS respuestas distintas, no una con campos de mas:
|
|
10828
|
+
* sin `group_by` llega `{total}` y con el llega `{stats, group}`.
|
|
10829
|
+
*
|
|
10830
|
+
* OJO CON `groupValue`: es el NUMERO que dan `$dayOfYear`, `$month` o `$year` de Mongo —240, 8,
|
|
10831
|
+
* 2026—, no una fecha. Con `group_by: "day"` dos anos del mismo rango caen en el mismo valor.
|
|
10832
|
+
*/
|
|
10833
|
+
type ConversationTotals = Schemas["MessagesConversationTotals"];
|
|
10834
|
+
/**
|
|
10835
|
+
* Lo que se manda para escribir un mensaje.
|
|
10836
|
+
*
|
|
10837
|
+
* `comment_message` y `publication_message` estan en {@link MessageType} pero **no se pueden
|
|
10838
|
+
* enviar por aqui**: las dos necesitan el identificador de lo que responden y el endpoint no lo lee
|
|
10839
|
+
* del cuerpo, asi que el mensaje saldria sin destinatario.
|
|
10840
|
+
*/
|
|
10841
|
+
type MessageInput = Override<Schemas["MessagesMessageInput"], {
|
|
10842
|
+
message_options: Partial<MessageOptions>;
|
|
10843
|
+
}>;
|
|
10844
|
+
/**
|
|
10845
|
+
* Una plantilla de mensaje, **en el formato de la red**: `name`, `status`, `components` y
|
|
10846
|
+
* `language` de Meta.
|
|
10847
|
+
*
|
|
10848
|
+
* No se traduce a un tipo nuestro a proposito. La plantilla que hay que nombrar al enviar
|
|
10849
|
+
* (`message_options.template_name`) es la de la red, asi que inventar aqui otra forma obligaria a
|
|
10850
|
+
* traducir de vuelta en el unico sitio donde se usa. Y es de WhatsApp y de nadie mas.
|
|
10851
|
+
*/
|
|
10852
|
+
type MessageTemplate = Record<string, unknown>;
|
|
10571
10853
|
/**
|
|
10572
10854
|
* Un mensaje intercambiado con un contacto.
|
|
10573
10855
|
*
|
|
@@ -10591,16 +10873,165 @@ type Message = Override<Schemas["Message"], {
|
|
|
10591
10873
|
type MessageOptions = Override<Schemas["MessageOptions"], {
|
|
10592
10874
|
files: (string | Upload)[];
|
|
10593
10875
|
}>;
|
|
10876
|
+
/** Que clase de mensaje es. `simple_message` y `file_message` valen en todas las redes. */
|
|
10877
|
+
type MessageType = Schemas["MessageType"];
|
|
10594
10878
|
/** Un contacto de la agenda de la organizacion. */
|
|
10595
10879
|
type Contact = Schemas["Contact"];
|
|
10596
|
-
/**
|
|
10880
|
+
/**
|
|
10881
|
+
* Lo que se manda para dar de alta un contacto.
|
|
10882
|
+
*
|
|
10883
|
+
* `social_identifiers` NO es opcional: un contacto sin canal es un contacto al que nadie puede
|
|
10884
|
+
* escribir, y el servidor lo rechaza con el error 1601.
|
|
10885
|
+
*/
|
|
10886
|
+
type ContactCreate = Schemas["ContactsContactCreate"];
|
|
10887
|
+
/**
|
|
10888
|
+
* Lo que se manda para cambiar un contacto.
|
|
10889
|
+
*
|
|
10890
|
+
* **`extra_data` es destructivo**: es el unico campo que el servidor escribe con lo que llegue en
|
|
10891
|
+
* vez de conservarlo, asi que omitirlo BORRA los campos propios del contacto. Los otros tres se
|
|
10892
|
+
* respetan cuando no viajan.
|
|
10893
|
+
*/
|
|
10894
|
+
type ContactUpdate = Schemas["ContactsContactUpdate"];
|
|
10895
|
+
/** Los campos propios de un contacto: el bloque de direccion y las seis propiedades libres. */
|
|
10896
|
+
type ContactExtraData = Schemas["ContactExtraData"];
|
|
10897
|
+
/** El mismo contacto, en un canal. Es una red social o `email`. */
|
|
10898
|
+
type SocialIdentifier = Schemas["SocialIdentifier"];
|
|
10899
|
+
/**
|
|
10900
|
+
* El mismo, tal y como se MANDA: aqui `_id` es opcional y el servidor pone uno.
|
|
10901
|
+
*
|
|
10902
|
+
* Son dos tipos y no uno porque el que vuelve siempre trae `_id` y el que se manda casi nunca lo
|
|
10903
|
+
* lleva; con un solo tipo, o se exige un identificador que aun no existe o se deja de garantizar
|
|
10904
|
+
* el que si.
|
|
10905
|
+
*/
|
|
10906
|
+
type SocialIdentifierInput = Schemas["ContactsSocialIdentifierInput"];
|
|
10907
|
+
/** Donde se puede alcanzar a un contacto: cualquier red con mensajeria, o `email`. */
|
|
10908
|
+
type ContactChannel = OpenEnum<Schemas["ContactChannel"]>;
|
|
10909
|
+
/**
|
|
10910
|
+
* Un producto de un catalogo de Meta Commerce. Solo Facebook e Instagram.
|
|
10911
|
+
*
|
|
10912
|
+
* Habla el vocabulario de Meta y no uno nuestro, a diferencia de las estadisticas: lo que hay aqui
|
|
10913
|
+
* son los campos de la Graph API, con sus nombres.
|
|
10914
|
+
*/
|
|
10597
10915
|
type Product = Schemas["ProductsProduct"];
|
|
10598
|
-
/**
|
|
10916
|
+
/** Lo que se manda para crear un producto. Con `id` dentro, ACTUALIZA el que ya existe. */
|
|
10917
|
+
type ProductInput = Schemas["ProductsProductInput"];
|
|
10918
|
+
/** Un catalogo de Meta Commerce: lo que agrupa productos y de donde cuelga todo lo demas. */
|
|
10919
|
+
type ProductCatalog = Schemas["ProductsProductCatalog"];
|
|
10920
|
+
/** Lo que se manda para crear un catalogo. */
|
|
10921
|
+
type ProductCatalogInput = Schemas["ProductsProductCatalogInput"];
|
|
10922
|
+
/**
|
|
10923
|
+
* Una conexion de una ORGANIZACION con una herramienta de la que se trae material: Google Drive,
|
|
10924
|
+
* un feed RSS.
|
|
10925
|
+
*
|
|
10926
|
+
* No confundir con una **app** ({@link ClientApp}), que es el acceso al API de PlanVortex. Son dos
|
|
10927
|
+
* cosas distintas que media web ha llamado igual.
|
|
10928
|
+
*
|
|
10929
|
+
* Las credenciales no salen nunca: para saber si la conexion esta viva esta `connected`, y el
|
|
10930
|
+
* motivo cuando no lo esta, en `error_code`.
|
|
10931
|
+
*/
|
|
10599
10932
|
type Integration = Schemas["IntegrationsIntegration"];
|
|
10600
|
-
/**
|
|
10933
|
+
/** Que sabe hacer un proveedor y que campos lleva su formulario. Es lo que decide como conectar. */
|
|
10934
|
+
type IntegrationProvider = Schemas["IntegrationsIntegrationProvider"];
|
|
10935
|
+
/** Un proveedor soportado. Abierto porque la lista crece. */
|
|
10936
|
+
type IntegrationProviderName = OpenEnum<Schemas["IntegrationsIntegrationProviderName"]>;
|
|
10937
|
+
/** La configuracion de un feed RSS. En Google Drive el `config` es un objeto vacio. */
|
|
10938
|
+
type RssConfig = Schemas["IntegrationsRssConfig"];
|
|
10939
|
+
/**
|
|
10940
|
+
* Lo que se manda para conectar o reconectar. Son dos formas y las distingue `provider`: con OAuth
|
|
10941
|
+
* viaja el `code`, y sin el, el formulario de `config_fields`.
|
|
10942
|
+
*/
|
|
10943
|
+
type IntegrationConnectRequest = Schemas["IntegrationsGoogleDriveConnectRequest"] | Schemas["IntegrationsRssConnectRequest"];
|
|
10944
|
+
/** Lo que se puede cambiar de una integracion ya conectada. */
|
|
10945
|
+
type IntegrationUpdate = Operations["updateIntegration"]["requestBody"]["content"]["application/json"];
|
|
10946
|
+
/**
|
|
10947
|
+
* Lo que el navegador necesita para abrir el Picker de Google. **Lleva un token vivo**: se pide
|
|
10948
|
+
* justo antes de abrirlo y no se guarda en ningun sitio.
|
|
10949
|
+
*/
|
|
10950
|
+
type IntegrationPickerConfig = Operations["getIntegrationPickerConfig"]["responses"][200]["content"]["application/json"];
|
|
10951
|
+
/**
|
|
10952
|
+
* Un plan de publicaciones generado con IA.
|
|
10953
|
+
*
|
|
10954
|
+
* **`publications` cambia de forma segun la operacion**, como `Publication.id_account`: leer un
|
|
10955
|
+
* plan lo devuelve con las publicaciones enteras y sus ficheros, y el LISTADO devuelve sus
|
|
10956
|
+
* identificadores. `organization_context` es una FOTO del contexto de marca de la organizacion en
|
|
10957
|
+
* el momento de crear el plan, no el de ahora: es lo que hace que un reintento sea reproducible.
|
|
10958
|
+
*/
|
|
10601
10959
|
type AiPlan = Schemas["AiPlansAiPlan"];
|
|
10960
|
+
/** El estado de un plan. `pending` y `generating` son los dos que hay que sondear. */
|
|
10961
|
+
type AiPlanState = OpenEnum<AiPlan["state"]>;
|
|
10962
|
+
/** Las opciones con las que se genero un plan, ya normalizadas. */
|
|
10963
|
+
type AiPlanOptions = Schemas["AiPlansAiPlanOptions"];
|
|
10964
|
+
/** Las opciones tal y como se MANDAN: todas opcionales, los defaults los pone el servidor. */
|
|
10965
|
+
type AiPlanOptionsInput = Schemas["AiPlansAiPlanOptionsInput"];
|
|
10966
|
+
/** Lo que se manda para encolar un plan. */
|
|
10967
|
+
type AiPlanCreateRequest = Schemas["AiPlansAiPlanCreateRequest"];
|
|
10968
|
+
/**
|
|
10969
|
+
* El presupuesto DETERMINISTA de un plan, calculado por el servidor y nunca por el modelo.
|
|
10970
|
+
*
|
|
10971
|
+
* `base_cost` es lo imprescindible —orquestacion y textos—: si no cabe en `available_credits`, el
|
|
10972
|
+
* plan se rechaza en vez de generarse a medias. `estimated_cost` incluye ademas las imagenes
|
|
10973
|
+
* financiables y es una cota superior.
|
|
10974
|
+
*/
|
|
10975
|
+
type AiPlanCostEstimate = Schemas["AiPlansAiPlanCostEstimate"];
|
|
10976
|
+
/** Lo que devuelve encolar un plan: el plan en `pending` y lo que se calculo que costaria. */
|
|
10977
|
+
type AiPlanCreateResult = Schemas["AiPlansAiPlanCreateResponse"];
|
|
10602
10978
|
/** Una app de cliente: las credenciales con las que una integracion se autentica. */
|
|
10603
10979
|
type ClientApp = Schemas["AppsClientApp"];
|
|
10980
|
+
/** Lo que se manda para crear o actualizar una app. Al actualizar, REEMPLAZA los cinco campos. */
|
|
10981
|
+
type ClientAppInput = Schemas["AppsClientAppInput"];
|
|
10982
|
+
/**
|
|
10983
|
+
* El rango que se aplico y el periodo anterior con el que se compara, de la MISMA longitud.
|
|
10984
|
+
*
|
|
10985
|
+
* No es "el mes pasado": comparar 30 dias contra un mes natural moveria el delta con el calendario.
|
|
10986
|
+
*/
|
|
10987
|
+
type DashboardRange = Schemas["DashboardDashboardRange"];
|
|
10988
|
+
/**
|
|
10989
|
+
* Una metrica del vocabulario COMUN, la que se puede sumar entre redes.
|
|
10990
|
+
*
|
|
10991
|
+
* Cerrada a proposito, al reves que {@link SocialNetwork}: no es una lista que crezca sola con cada
|
|
10992
|
+
* red nueva, es la traduccion que hace comparables a todas. Un nombre que no este aqui es un nombre
|
|
10993
|
+
* crudo de una red y no se puede sumar con nada.
|
|
10994
|
+
*/
|
|
10995
|
+
type MetricName = Schemas["DashboardMetricName"];
|
|
10996
|
+
/**
|
|
10997
|
+
* Una fila agregada de metricas de cuenta.
|
|
10998
|
+
*
|
|
10999
|
+
* `group` es el valor del eje —el dia, la red, el identificador de cuenta— y **es `null` cuando se
|
|
11000
|
+
* agrupo por `total`**: el campo viaja siempre, el valor no siempre es una cadena.
|
|
11001
|
+
*/
|
|
11002
|
+
type MetricRow = Schemas["DashboardMetricRow"];
|
|
11003
|
+
/** Lo que devuelve {@link DashboardResource.metrics}. */
|
|
11004
|
+
type DashboardMetricsResult = Operations["getOrganizationMetrics"]["responses"][200]["content"]["application/json"];
|
|
11005
|
+
/** Los conteos de publicaciones de un rango. */
|
|
11006
|
+
type PublicationsSummary = Schemas["DashboardPublicationsSummary"];
|
|
11007
|
+
/** Lo que devuelve {@link DashboardResource.publications}: el rango mas los conteos. */
|
|
11008
|
+
type PublicationsSummaryResult = Operations["getPublicationsSummary"]["responses"][200]["content"]["application/json"];
|
|
11009
|
+
/**
|
|
11010
|
+
* Una fila del ranking. **No tiene la forma de una `Publication`**: sale de la agregacion de
|
|
11011
|
+
* estadisticas, asi que el identificador es `id_publication` y el contenido viaja anidado en
|
|
11012
|
+
* `publication`.
|
|
11013
|
+
*/
|
|
11014
|
+
type TopPublication = Schemas["DashboardTopPublication"];
|
|
11015
|
+
/** Lo que devuelve {@link DashboardResource.topPublications}. */
|
|
11016
|
+
type TopPublicationsResult = Operations["getTopPublications"]["responses"][200]["content"]["application/json"];
|
|
11017
|
+
/** Lo que devuelve {@link DashboardResource.publicationStats}: los agregados y la pagina. */
|
|
11018
|
+
type PublicationsStatsResult = Schemas["PublicationsPublicationsStatsList"];
|
|
11019
|
+
/** Lo que gasta una organizacion, lo que ha repartido entre sus hijas, y lo que tiene. */
|
|
11020
|
+
type PlanUse = Schemas["DashboardPlanUse"];
|
|
11021
|
+
/** Una cuenta rota: token caducado o permiso revocado. Ni publica ni mide hasta reconectarla. */
|
|
11022
|
+
type AccountWithError = Schemas["DashboardAccountWithError"];
|
|
11023
|
+
/** Una publicacion tal y como la PROYECTA el bloque de salud: cuatro campos, no una `Publication`. */
|
|
11024
|
+
type DashboardPublicationRef = Schemas["DashboardDashboardPublicationRef"];
|
|
11025
|
+
/** El ultimo plan de IA, proyectado, tal y como lo devuelve el bloque de planes. */
|
|
11026
|
+
type DashboardAiPlanRef = Schemas["DashboardDashboardAiPlanRef"];
|
|
11027
|
+
/**
|
|
11028
|
+
* La pantalla de inicio entera.
|
|
11029
|
+
*
|
|
11030
|
+
* **Un bloque que falta no es un error**: cada uno se comprueba contra su propio permiso y se omite
|
|
11031
|
+
* si quien llama no puede leerlo, en vez de tumbar la peticion. `available_blocks` dice cuales se
|
|
11032
|
+
* permitieron; uno en `true` que no viene es que no habia datos.
|
|
11033
|
+
*/
|
|
11034
|
+
type Dashboard = Schemas["DashboardDashboard"];
|
|
10604
11035
|
/**
|
|
10605
11036
|
* Los cambios que se entregan a la url de webhook de una app NO se tipan aqui.
|
|
10606
11037
|
*
|
|
@@ -10610,19 +11041,40 @@ type ClientApp = Schemas["AppsClientApp"];
|
|
|
10610
11041
|
* firma, que es donde se van a buscar. Los tipos se reexportan desde el punto de entrada
|
|
10611
11042
|
* principal, asi que `import type { WebhookChange } from "planvortex"` sigue valiendo.
|
|
10612
11043
|
*/
|
|
11044
|
+
/** Cualquier cosa que la API devuelve unas veces poblada y otras como identificador. */
|
|
11045
|
+
interface WithAccount {
|
|
11046
|
+
id_account: string | Account;
|
|
11047
|
+
}
|
|
11048
|
+
/** Lo mismo con la publicacion: hoy, un comentario de la bandeja. */
|
|
11049
|
+
interface WithPublication {
|
|
11050
|
+
id_publication?: string | Publication | undefined;
|
|
11051
|
+
}
|
|
11052
|
+
/**
|
|
11053
|
+
* El identificador de la cuenta de una publicacion O de un comentario, venga poblada o no.
|
|
11054
|
+
*
|
|
11055
|
+
* `id_account` llega resuelto en unas operaciones y como cadena en otras —en publicaciones, las
|
|
11056
|
+
* de una sola frente al listado; en comentarios, justo al reves— y esto lo tapa sin obligar a
|
|
11057
|
+
* escribir el `typeof` en cada sitio (§ los avisos de {@link Publication} y {@link Comment}).
|
|
11058
|
+
*/
|
|
11059
|
+
declare function accountId(resource: WithAccount): string;
|
|
11060
|
+
/**
|
|
11061
|
+
* La cuenta cuando viene poblada, y `undefined` cuando la API solo mando el identificador.
|
|
11062
|
+
* Contrapartida de {@link accountId}.
|
|
11063
|
+
*/
|
|
11064
|
+
declare function account(resource: WithAccount): Account | undefined;
|
|
10613
11065
|
/**
|
|
10614
|
-
* El identificador de la
|
|
11066
|
+
* El identificador de la publicacion de un comentario, venga poblada o no.
|
|
10615
11067
|
*
|
|
10616
|
-
* `
|
|
10617
|
-
*
|
|
10618
|
-
* cada sitio.
|
|
11068
|
+
* Devuelve `undefined` en los dos casos en los que de verdad no hay ninguna: la resena que cuelga
|
|
11069
|
+
* de una ficha de Google Business y el post que no se publico desde PlanVortex.
|
|
10619
11070
|
*/
|
|
10620
|
-
declare function
|
|
11071
|
+
declare function publicationId(resource: WithPublication): string | undefined;
|
|
10621
11072
|
/**
|
|
10622
|
-
* La
|
|
10623
|
-
* identificador
|
|
11073
|
+
* La publicacion cuando viene poblada —solo la bandeja de comentarios la resuelve—, y
|
|
11074
|
+
* `undefined` cuando la API mando el identificador o cuando no hay publicacion detras.
|
|
11075
|
+
* Contrapartida de {@link publicationId}.
|
|
10624
11076
|
*/
|
|
10625
|
-
declare function
|
|
11077
|
+
declare function publication(resource: WithPublication): Publication | undefined;
|
|
10626
11078
|
/**
|
|
10627
11079
|
* Hacia donde va un mensaje.
|
|
10628
11080
|
*
|
|
@@ -10729,7 +11181,7 @@ declare class PlanVortexError extends Error {
|
|
|
10729
11181
|
readonly retryAfter: number | undefined;
|
|
10730
11182
|
constructor(code: number, message: string, options?: PlanVortexErrorOptions);
|
|
10731
11183
|
}
|
|
10732
|
-
/** 500-
|
|
11184
|
+
/** 500-542 — tokens, apps de cliente, permisos. Incluye el 501 y el 522, los de token caducado. */
|
|
10733
11185
|
declare class AuthError extends PlanVortexError {
|
|
10734
11186
|
}
|
|
10735
11187
|
/** 601-612 — el usuario final. */
|
|
@@ -11071,4 +11523,4 @@ interface PlanVortexWebhooksOptions {
|
|
|
11071
11523
|
*/
|
|
11072
11524
|
declare function planvortexWebhooks(options: PlanVortexWebhooksOptions): (request: WebhookRequestLike, response: WebhookResponseLike, next: (error?: unknown) => void) => void;
|
|
11073
11525
|
|
|
11074
|
-
export {
|
|
11526
|
+
export { type Product as $, type Account as A, type IntegrationProvider as B, type ConnectLink as C, type Dashboard as D, type EnableResult as E, type Integration as F, type IntegrationConnectRequest as G, type IntegrationUpdate as H, type IntegrationProviderName as I, type IntegrationPickerConfig as J, type MessageTemplate as K, type Conversation as L, type MetricName as M, type ConversationTotals as N, type Message as O, type Paginated as P, type MessageInput as Q, type Client as R, type SocialNetwork as S, type TopPublicationsResult as T, type Organization as U, type AiSettings as V, type ClientWithOrganizations as W, type PlanData as X, type ConnectToken as Y, type AiContext as Z, type SocialCredentialsInput as _, type ConnectResult as a, type RssConfig as a$, type ProductInput as a0, type ProductCatalog as a1, type ProductCatalogInput as a2, type PublicationInput as a3, type PublicationState as a4, type PublicationStats as a5, type PublicationStatsHistory as a6, type Upload as a7, AccountError as a8, type AccountMetricRow as a9, type MessageChange as aA, type MessageOptions as aB, type MessageType as aC, MessagingError as aD, type MetricRow as aE, NO_ERROR_CODE as aF, type components as aG, type operations as aH, type paths as aI, type webhooks as aJ, type OpenEnum as aK, OrganizationError as aL, PLANVORTEX_ERROR_RANGES as aM, PlanLimitError as aN, PlanVortexAuthenticationError as aO, PlanVortexConfigError as aP, PlanVortexConnectionError as aQ, PlanVortexError as aR, type PlanVortexErrorOptions as aS, type PlanVortexErrorRange as aT, ProductError as aU, PublicationError as aV, type PublicationErrorDetail as aW, type PublicationMetrics as aX, type PublicationStatsPoint as aY, type PublicationType as aZ, type PublicationsSummary as a_, type AccountStateChange as aa, type AccountWebhookChangeBase as ab, type AccountWithError as ac, type AiPlanCostEstimate as ad, AiPlanError as ae, type AiPlanOptions as af, type AiPlanOptionsInput as ag, type AiPlanState as ah, type ApiErrorBody as ai, type AspectRatios as aj, AuthError as ak, type ClientPlan as al, type CommentAuthor as am, type CommentChange as an, type ContactChannel as ao, ContactError as ap, type DashboardAiPlanRef as aq, type DashboardPublicationRef as ar, type DashboardRange as as, type EngagementBase as at, FileError as au, type FileFormat as av, type FileProperties as aw, type FileType as ax, IntegrationError as ay, type IntegrationErrorChange as az, type AccountMetrics as b, type SocialCredentials as b0, type SocialIdentifier as b1, type SocialIdentifierInput as b2, type SocialLimitsMap as b3, TOKEN_ERROR_CODES as b4, type TopPublication as b5, type UnknownWebhookChange as b6, UserError as b7, type WebhookAlgorithm as b8, type WebhookChange as b9, handleWebhookRequest as bA, isAccountStateChange as bB, isCommentChange as bC, isIntegrationErrorChange as bD, isMessageChange as bE, parseWebhookPayload as bF, planvortexWebhooks as bG, verifyWebhookSignature as bH, type WebhookEvent as ba, type WithAccount as bb, type WithPublication as bc, account as bd, accountId as be, errorFamilyForCode as bf, isPlanVortexError as bg, isTokenError as bh, messageContact as bi, messageContactId as bj, messageDirection as bk, messageFileIds as bl, messageFiles as bm, publication as bn, publicationId as bo, type HandleWebhookRequestOptions as bp, type PlanVortexWebhooksOptions as bq, type RawWebhookBody as br, type VerifyWebhookSignatureOptions as bs, WEBHOOK_EVENTS as bt, WEBHOOK_SIGNATURE_HEADERS as bu, WebhookBodyError as bv, type WebhookHeaders as bw, type WebhookRequestLike as bx, type WebhookResponseLike as by, WebhookSignatureError as bz, type PersistentMenu as c, type Publication as d, type AiPlanCreateRequest as e, type AiPlanCreateResult as f, type AiPlan as g, type ClientApp as h, type ClientAppInput as i, type SocialCapabilities as j, type CommentActions as k, type SocialLimits as l, type PublicationLimits as m, type AspectRatiosByNetwork as n, type CommentNetwork as o, type Comment as p, type CommentThread as q, type CommentReplyResult as r, type ContactExtraData as s, type Contact as t, type ContactCreate as u, type ContactUpdate as v, type DashboardMetricsResult as w, type PublicationsSummaryResult as x, type PublicationsStatsResult as y, type PlanUse as z };
|