planvortex 0.17.0 → 0.18.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 +2 -1
- package/dist/{chunk-CXCJAVXQ.js → chunk-ZHS7FY3T.js} +6 -2
- package/dist/chunk-ZHS7FY3T.js.map +1 -0
- package/dist/{index-Dn1IcGkO.d.cts → index-6DpRjLs4.d.cts} +239 -14
- package/dist/{index-Dn1IcGkO.d.ts → index-6DpRjLs4.d.ts} +239 -14
- package/dist/index.cjs +29 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -4
- package/dist/index.d.ts +19 -4
- package/dist/index.js +27 -3
- package/dist/index.js.map +1 -1
- package/dist/webhooks/index.cjs +4 -0
- 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
- package/dist/chunk-CXCJAVXQ.js.map +0 -1
|
@@ -1253,6 +1253,37 @@ interface paths {
|
|
|
1253
1253
|
patch?: never;
|
|
1254
1254
|
trace?: never;
|
|
1255
1255
|
};
|
|
1256
|
+
"/organizations/{id_organization}/accounts/{id_account}/publish_settings": {
|
|
1257
|
+
parameters: {
|
|
1258
|
+
query?: never;
|
|
1259
|
+
header?: never;
|
|
1260
|
+
path?: never;
|
|
1261
|
+
cookie?: never;
|
|
1262
|
+
};
|
|
1263
|
+
/**
|
|
1264
|
+
* Read what this account allows when publishing
|
|
1265
|
+
* @description What the network says, **right now**, about publishing on this account. Today only TikTok: the networks that answer `publish_settings: true` in `GET /social_capabilities`. Anywhere else this answers error 2508.
|
|
1266
|
+
*
|
|
1267
|
+
* TikTok's content sharing guidelines ask any app that posts to TikTok to show the user, before posting:
|
|
1268
|
+
*
|
|
1269
|
+
* - which account the post goes to (`creator.nickname`);
|
|
1270
|
+
* - a privacy choice limited to `visibility_options`, with **no default**;
|
|
1271
|
+
* - the interactions the creator switched off in the app (`interactions.*.disabled`), greyed out;
|
|
1272
|
+
* - and to check the video length against `max_video_duration_sec`.
|
|
1273
|
+
*
|
|
1274
|
+
* Read it every time your compose screen opens: an account can go from public to private, or reach its daily limit, between one post and the next. `can_post: false` means TikTok will not take a post from this account now (`reason` carries its code): tell the user to try later instead of sending it.
|
|
1275
|
+
*
|
|
1276
|
+
* If TikTok does not answer, this is error 919 with TikTok's detail in `data`, never an empty list: an empty `visibility_options` would read as "this account cannot post at all".
|
|
1277
|
+
*/
|
|
1278
|
+
get: operations["getAccountPublishSettings"];
|
|
1279
|
+
put?: never;
|
|
1280
|
+
post?: never;
|
|
1281
|
+
delete?: never;
|
|
1282
|
+
options?: never;
|
|
1283
|
+
head?: never;
|
|
1284
|
+
patch?: never;
|
|
1285
|
+
trace?: never;
|
|
1286
|
+
};
|
|
1256
1287
|
"/organizations/{id_organization}/accounts/{id_account}/publish/{id_publication}": {
|
|
1257
1288
|
parameters: {
|
|
1258
1289
|
query?: never;
|
|
@@ -2560,6 +2591,8 @@ interface paths {
|
|
|
2560
2591
|
*
|
|
2561
2592
|
* **Three of the keys are about publishing, not about reading.** `destinations` says the network publishes into places inside the account and every publication has to name one — a Pinterest board, read with `GET /organizations/{id_organization}/accounts/{id_account}/destinations`. `link` says a publication carries a destination link of its own, separate from its text. Both are `false` everywhere but `pinterest` today. `reply_control` says a publication can choose who can reply to it, and is `true` only on `threads`. The three are the reason to ask this matrix instead of keeping a list of your own: a composer with its own copy of which network has which field is exactly what drifted with the character limits.
|
|
2562
2593
|
*
|
|
2594
|
+
* **Four more are what TikTok's content sharing guidelines ask a composer to show**, and are `true` only on `tiktok` today: `visibility` (on TikTok, with no default), `interactions`, `commercial_content`, and `publish_settings`, which says the options each account allows must be read from `GET /organizations/{id_organization}/accounts/{id_account}/publish_settings` instead of a fixed list.
|
|
2595
|
+
*
|
|
2563
2596
|
* A `true` here is about the **network**, not about one account of it: a Telegram channel with no linked discussion group answers 965 on its comments even though the network has them.
|
|
2564
2597
|
*
|
|
2565
2598
|
* Only needs authentication.
|
|
@@ -3823,8 +3856,12 @@ interface components {
|
|
|
3823
3856
|
/** @description The coarse gates of one network */
|
|
3824
3857
|
CommentsSocialCapabilities: {
|
|
3825
3858
|
comments: boolean;
|
|
3859
|
+
/** @description The publication can declare that it is **commercial content** (`commercial_content`: your brand, branded content). On a network that answers `false` the field is deleted on save, so do not offer it. Today only `tiktok`. */
|
|
3860
|
+
commercial_content: boolean;
|
|
3826
3861
|
/** @description The network publishes into **places inside the account**, and every publication has to name one: a Pinterest board. When this is `true`, read `GET /organizations/{id_organization}/accounts/{id_account}/destinations` and send one back in `destination` — a publication created without it lands in state `withErrors` with `publication_errors[].code = 987`. Today only `pinterest`. */
|
|
3827
3862
|
destinations: boolean;
|
|
3863
|
+
/** @description The publication can say **what the audience can do** with it (`interactions`: comment, Duet, Stitch). On a network that answers `false` the field is deleted on save, so do not offer it. Today only `tiktok`. */
|
|
3864
|
+
interactions: boolean;
|
|
3828
3865
|
/** @description The publication carries a **destination link of its own** (`link`), separate from its text: where a pin takes whoever clicks it. On a network that answers `false` the field is deleted on save, so do not offer it. Today only `pinterest`. */
|
|
3829
3866
|
link: boolean;
|
|
3830
3867
|
/** @description The publication can say whether it is **made for kids** (`made_for_kids`, COPPA). On a network that answers `false` the field is deleted on save, so do not offer it. Today only `youtube`. */
|
|
@@ -3833,9 +3870,11 @@ interface components {
|
|
|
3833
3870
|
persistent_menu: boolean;
|
|
3834
3871
|
products: boolean;
|
|
3835
3872
|
publications: boolean;
|
|
3873
|
+
/** @description What each **account** allows when publishing is read from the network: `GET /organizations/{id_organization}/accounts/{id_account}/publish_settings` (privacy options, interactions the creator switched off, longest video, whether it can post now). Offer the `visibility` values from there, not a fixed list. Today only `tiktok`. */
|
|
3874
|
+
publish_settings: boolean;
|
|
3836
3875
|
/** @description The publication can say **who can reply** to it (`reply_control`): anyone, the account's followers, the profiles it follows or the profiles mentioned in the text. It is set when the publication goes out and cannot be changed afterwards. On a network that answers `false` the field is deleted on save, so do not offer it. Today only `threads`. */
|
|
3837
3876
|
reply_control: boolean;
|
|
3838
|
-
/** @description The publication can say **who can see it** when it goes out (`visibility`)
|
|
3877
|
+
/** @description The publication can say **who can see it** when it goes out (`visibility`). On a network that answers `false` the field is deleted on save, so do not offer it. Today `youtube` (public, unlisted, private) and `tiktok` (public, friends, followers, private; which ones each account allows comes from `publish_settings`). */
|
|
3839
3878
|
visibility: boolean;
|
|
3840
3879
|
webhooks: boolean;
|
|
3841
3880
|
};
|
|
@@ -4197,7 +4236,7 @@ interface components {
|
|
|
4197
4236
|
* The catalogue grows with the product, so treat an unknown `code` as a generic failure instead of rejecting it.
|
|
4198
4237
|
*/
|
|
4199
4238
|
Error: {
|
|
4200
|
-
/** @description PlanVortex error code. Ranges: 500-554 auth, tokens, client apps and connect sessions · 601-612 user · 700-716 social accounts · 800-810 files · 900-996 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1308 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 · 2600-2699 comments, the ones that no longer fit in 945-948. */
|
|
4239
|
+
/** @description PlanVortex error code. Ranges: 500-554 auth, tokens, client apps and connect sessions · 601-612 user · 700-716 social accounts · 800-810 files · 900-996 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1308 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 · 2500-2599 publication fields, the ones that no longer fit in 900-996 (visibility, made for kids, TikTok's interactions and commercial content) · 2600-2699 comments, the ones that no longer fit in 945-948. */
|
|
4201
4240
|
code: number;
|
|
4202
4241
|
/** @description Extra context attached to the error, when there is any. */
|
|
4203
4242
|
data?: {
|
|
@@ -4756,6 +4795,12 @@ interface components {
|
|
|
4756
4795
|
Publication: {
|
|
4757
4796
|
_id: string;
|
|
4758
4797
|
ai_generated?: components["schemas"]["PublicationAiGenerated"];
|
|
4798
|
+
/**
|
|
4799
|
+
* @description Whether the publication is **commercial content** (`your_brand`, `branded_content`), on the networks that answer `commercial_content: true` in `GET /social_capabilities` (today `tiktok`). Absent means it is not.
|
|
4800
|
+
*
|
|
4801
|
+
* **On every other network the field is deleted on save**, like `reply_control`.
|
|
4802
|
+
*/
|
|
4803
|
+
commercial_content?: components["schemas"]["PublicationCommercialContent"];
|
|
4759
4804
|
/** Format: date-time */
|
|
4760
4805
|
creation_date: string;
|
|
4761
4806
|
/** @description Where inside the account this publication goes. Only present on the networks that answer `destinations: true` in `GET /social_capabilities`. */
|
|
@@ -4786,6 +4831,12 @@ interface components {
|
|
|
4786
4831
|
/** @description The integration this publication came from — an RSS feed, for instance. Set when it is created and never changed afterwards. */
|
|
4787
4832
|
id_integration?: string;
|
|
4788
4833
|
id_organization: string;
|
|
4834
|
+
/**
|
|
4835
|
+
* @description **What the audience can do with the publication** (comment, Duet, Stitch), on the networks that answer `interactions: true` in `GET /social_capabilities` (today `tiktok`). `true` allows it; a missing key is the network's default (allowed).
|
|
4836
|
+
*
|
|
4837
|
+
* **On every other network the field is deleted on save**, like `reply_control`.
|
|
4838
|
+
*/
|
|
4839
|
+
interactions?: components["schemas"]["PublicationInteractions"];
|
|
4789
4840
|
/**
|
|
4790
4841
|
* @description **The destination link**: where the publication takes whoever clicks it. Not to be confused with `url`, which is the link to the publication *on the network* and only exists once it is published.
|
|
4791
4842
|
*
|
|
@@ -4866,12 +4917,14 @@ interface components {
|
|
|
4866
4917
|
/** @description Link to the publication on the network, when there is one. A **private** Telegram channel has no public URL, so it comes back empty even though the post went out. */
|
|
4867
4918
|
url?: string;
|
|
4868
4919
|
/**
|
|
4869
|
-
* @description **Who can see the publication** when it goes out, on the networks that answer `visibility: true` in `GET /social_capabilities` (today `youtube`). Absent means `public`. It is set when the publication goes out.
|
|
4920
|
+
* @description **Who can see the publication** when it goes out, on the networks that answer `visibility: true` in `GET /social_capabilities` (today `youtube` and `tiktok`). Absent means `public`. It is set when the publication goes out.
|
|
4921
|
+
*
|
|
4922
|
+
* `unlisted` exists only on YouTube; `friends` and `followers` only on TikTok.
|
|
4870
4923
|
*
|
|
4871
4924
|
* **On every other network the field is deleted on save**, like `reply_control`.
|
|
4872
4925
|
* @enum {string}
|
|
4873
4926
|
*/
|
|
4874
|
-
visibility?: "public" | "unlisted" | "private";
|
|
4927
|
+
visibility?: "public" | "unlisted" | "friends" | "followers" | "private";
|
|
4875
4928
|
};
|
|
4876
4929
|
/**
|
|
4877
4930
|
* @description Which part of a publication was generated by AI. **Absent means nothing was.**
|
|
@@ -4884,6 +4937,13 @@ interface components {
|
|
|
4884
4937
|
/** @description The text was written by the AI planner. Set when the draft is created and never changed afterwards, not even if the text is rewritten: it says where the text came from, not who reviewed it. */
|
|
4885
4938
|
text: boolean;
|
|
4886
4939
|
};
|
|
4940
|
+
/** @description Whether a publication is commercial content. Both `false` is the same as omitting it. */
|
|
4941
|
+
PublicationCommercialContent: {
|
|
4942
|
+
/** @description It is a paid partnership promoting a third party. TikTok labels it "Paid partnership", and it cannot be private. */
|
|
4943
|
+
branded_content?: boolean;
|
|
4944
|
+
/** @description It promotes the creator or their own business. TikTok labels it "Promotional content". */
|
|
4945
|
+
your_brand?: boolean;
|
|
4946
|
+
};
|
|
4887
4947
|
/**
|
|
4888
4948
|
* @description **Where inside the account** a publication goes, on the networks where choosing the account is not yet choosing the destination. Today that is `pinterest` alone, where it is the board the pin is saved to.
|
|
4889
4949
|
*
|
|
@@ -4905,6 +4965,15 @@ interface components {
|
|
|
4905
4965
|
/** @description The section's label, for display. Decides nothing. */
|
|
4906
4966
|
section_name?: string;
|
|
4907
4967
|
};
|
|
4968
|
+
/** @description What the audience can do with a publication. `true` allows it; a missing key is the network's default. */
|
|
4969
|
+
PublicationInteractions: {
|
|
4970
|
+
/** @description The audience can comment. */
|
|
4971
|
+
comments?: boolean;
|
|
4972
|
+
/** @description The audience can make a Duet with the video. Ignored on a photo post. */
|
|
4973
|
+
duet?: boolean;
|
|
4974
|
+
/** @description The audience can make a Stitch with the video. Ignored on a photo post. */
|
|
4975
|
+
stitch?: boolean;
|
|
4976
|
+
};
|
|
4908
4977
|
/**
|
|
4909
4978
|
* @description Present only while the network is still **processing** what was sent, and PlanVortex is waiting to publish it. Today that happens on Instagram alone, when Meta takes longer than the ~30 seconds the request waits to process the media. In practice, that means videos.
|
|
4910
4979
|
*
|
|
@@ -4950,6 +5019,16 @@ interface components {
|
|
|
4950
5019
|
};
|
|
4951
5020
|
/** @description Body accepted when creating or updating a publication. Only these properties are read; anything else in the payload is ignored. */
|
|
4952
5021
|
PublicationsPublicationInput: {
|
|
5022
|
+
/**
|
|
5023
|
+
* @description Whether the publication is **commercial content**. Only on the networks that answer `commercial_content: true` in `GET /social_capabilities` (today `tiktok`), and **deleted** on every other one. Absent, or both `false`, means it is not.
|
|
5024
|
+
*
|
|
5025
|
+
* TikTok's guidelines ask for a disclosure switch that is **off by default** and, when it is on, for at least one of the two boxes before the post can go out. Send the object only when the user switched it on.
|
|
5026
|
+
*
|
|
5027
|
+
* A paid partnership (`branded_content: true`) **cannot be private**: with `visibility` `private` or `followers` the publication is created in state `withErrors` with `publication_errors[].code = 2504`. Any other key, or a value that is not a JSON boolean, is code 2503.
|
|
5028
|
+
*
|
|
5029
|
+
* On an update: omit it to keep what was there, send `null` or `""` to remove it.
|
|
5030
|
+
*/
|
|
5031
|
+
commercial_content?: components["schemas"]["PublicationCommercialContent"];
|
|
4953
5032
|
/**
|
|
4954
5033
|
* @description Where inside the account the publication goes. **Required on the networks that answer `destinations: true` in `GET /social_capabilities`** — today `pinterest`, where it is the board — and **deleted** on every other one.
|
|
4955
5034
|
*
|
|
@@ -4966,6 +5045,18 @@ interface components {
|
|
|
4966
5045
|
* **On Pinterest a pin is an image or a video, never text alone** (code 922 with neither), and it is of one kind only: two to five images make a carousel — outside that range, code 990 — images and videos are not mixed and there is no more than one video (code 916). The weight ceilings are two orders of magnitude apart, so `max_file_size_mb.pinterest` is the **image** one (~20 MB) while a video is allowed far more; over either, code 996 with `data.max_mb`.
|
|
4967
5046
|
*/
|
|
4968
5047
|
files?: string[];
|
|
5048
|
+
/**
|
|
5049
|
+
* @description **What the audience can do with the publication**: comment and, on a video, Duet and Stitch. Only on the networks that answer `interactions: true` in `GET /social_capabilities` (today `tiktok`), and **deleted** on every other one.
|
|
5050
|
+
*
|
|
5051
|
+
* `true` allows it, `false` turns it off. A missing key, or the whole field missing, leaves the network's default, which on TikTok is allowed.
|
|
5052
|
+
*
|
|
5053
|
+
* TikTok's content sharing guidelines require this to be **the user's choice**, with **nothing ticked in advance**: if your software publishes on behalf of someone, show the three boxes unticked and send what they tick. Whatever the creator has switched off in their TikTok privacy settings is sent switched off, whatever this says (`interactions.*.disabled` in `GET /organizations/{id_organization}/accounts/{id_account}/publish_settings`).
|
|
5054
|
+
*
|
|
5055
|
+
* A key other than these three, or a value that is not a JSON boolean, does not fail the request: the publication is still created, in state `withErrors` with `publication_errors[].code = 2502`.
|
|
5056
|
+
*
|
|
5057
|
+
* On an update: omit it to keep what was there, send `null` or `""` to go back to the network's default.
|
|
5058
|
+
*/
|
|
5059
|
+
interactions?: components["schemas"]["PublicationInteractions"];
|
|
4969
5060
|
/**
|
|
4970
5061
|
* @description **The destination link**: where the publication takes whoever clicks it. Only on the networks that answer `link: true` in `GET /social_capabilities` — today `pinterest`, where it is the whole point of a pin — and **deleted** on every other one. It is not `url`, which is the link to the publication on the network once published.
|
|
4971
5062
|
*
|
|
@@ -5039,20 +5130,24 @@ interface components {
|
|
|
5039
5130
|
*/
|
|
5040
5131
|
title?: string;
|
|
5041
5132
|
/**
|
|
5042
|
-
* @description **Who can see the publication** when it goes out. Only on the networks that answer `visibility: true` in `GET /social_capabilities` (today `youtube`), and **deleted** on every other one.
|
|
5133
|
+
* @description **Who can see the publication** when it goes out. Only on the networks that answer `visibility: true` in `GET /social_capabilities` (today `youtube` and `tiktok`), and **deleted** on every other one.
|
|
5043
5134
|
*
|
|
5044
5135
|
* - `public`: anyone. It is what applies when the field is omitted.
|
|
5045
|
-
* - `unlisted
|
|
5046
|
-
* - `
|
|
5136
|
+
* - `unlisted` (YouTube only): only people with the link. It does not show on the channel or in search.
|
|
5137
|
+
* - `friends` (TikTok only): followers the account follows back.
|
|
5138
|
+
* - `followers` (TikTok only, private accounts): the account's followers.
|
|
5139
|
+
* - `private`: only the owner (on YouTube, also the people they invite from YouTube Studio).
|
|
5140
|
+
*
|
|
5141
|
+
* Both networks require this to be **the user's choice**: if your software publishes on behalf of someone, ask them. On TikTok your interface must have **no default**, and the options to offer are the ones this account allows right now, from `GET /organizations/{id_organization}/accounts/{id_account}/publish_settings`. If, by the time the publication goes out, the account no longer allows the chosen one (it went from public to private), it is not swapped for another: the publication ends in `withErrors` with `publication_errors[].code = 2505`. Omitting it on TikTok keeps the old behaviour (public if the account allows it, otherwise the first value it allows), which is fine for a script but not for a screen a person uses.
|
|
5047
5142
|
*
|
|
5048
|
-
*
|
|
5143
|
+
* A value the network does not accept does not fail the request: the publication is still created, in state `withErrors` with `publication_errors[].code = 2500`, whose `data` carries the `allowed` values. It is checked when the publication is **created**, so a scheduled video does not fail at 3 a.m. over a value that was already wrong.
|
|
5049
5144
|
*
|
|
5050
5145
|
* If YouTube does not leave the video with the visibility that was asked for, the publication still ends up `sended` (the video is on the channel) and carries a warning in `publication_warnings` with `code = 2400`.
|
|
5051
5146
|
*
|
|
5052
5147
|
* On an update: omit it to keep what was there, send `null` or `""` to go back to `public`.
|
|
5053
5148
|
* @enum {string}
|
|
5054
5149
|
*/
|
|
5055
|
-
visibility?: "public" | "unlisted" | "private";
|
|
5150
|
+
visibility?: "public" | "unlisted" | "friends" | "followers" | "private";
|
|
5056
5151
|
};
|
|
5057
5152
|
PublicationsPublicationList: {
|
|
5058
5153
|
publications: components["schemas"]["Publication"][];
|
|
@@ -5142,6 +5237,34 @@ interface components {
|
|
|
5142
5237
|
engagement_base?: "reach" | "impressions" | "followers";
|
|
5143
5238
|
metrics: components["schemas"]["NormalizedMetrics"];
|
|
5144
5239
|
};
|
|
5240
|
+
/** @description What the network says, right now, about publishing on one account. Values are in the publication's vocabulary: what you read here is what you send back. */
|
|
5241
|
+
PublicationsPublishSettings: {
|
|
5242
|
+
/** @description `false` means the network will not take a post from this account now. Ask the user to try later instead of sending it: it would end in `withErrors` with `publication_errors[].code = 2507`. */
|
|
5243
|
+
can_post: boolean;
|
|
5244
|
+
/** @description Who the post goes to. TikTok's guidelines ask to show the creator's nickname on the compose screen. */
|
|
5245
|
+
creator?: {
|
|
5246
|
+
/** @description Expires after about two hours: do not store it. */
|
|
5247
|
+
avatar_url?: string;
|
|
5248
|
+
nickname?: string;
|
|
5249
|
+
username?: string;
|
|
5250
|
+
};
|
|
5251
|
+
/** @description One entry per interaction. `disabled: true` means the creator switched it off in their TikTok privacy settings: show it greyed out. It is sent switched off whatever the publication says. */
|
|
5252
|
+
interactions: {
|
|
5253
|
+
comments?: components["schemas"]["PublicationsPublishSettingsInteraction"];
|
|
5254
|
+
duet?: components["schemas"]["PublicationsPublishSettingsInteraction"];
|
|
5255
|
+
stitch?: components["schemas"]["PublicationsPublishSettingsInteraction"];
|
|
5256
|
+
};
|
|
5257
|
+
/** @description The longest video this account can post, in seconds. A longer one ends in `withErrors` with `publication_errors[].code = 2506`, before anything is uploaded. */
|
|
5258
|
+
max_video_duration_sec?: number;
|
|
5259
|
+
/** @description When `can_post` is `false`, the network's code: `spam_risk_too_many_posts` (daily limit of the creator), `spam_risk_user_banned_from_posting`, `reached_active_user_cap`. */
|
|
5260
|
+
reason?: string;
|
|
5261
|
+
social_network: components["schemas"]["SocialNetwork"];
|
|
5262
|
+
/** @description The `visibility` values this account allows now. A public account gets `public`, `friends` and `private`; a private one gets `followers` instead of `public`. Offer these and nothing else, with no default. */
|
|
5263
|
+
visibility_options: ("public" | "friends" | "followers" | "private")[];
|
|
5264
|
+
};
|
|
5265
|
+
PublicationsPublishSettingsInteraction: {
|
|
5266
|
+
disabled: boolean;
|
|
5267
|
+
};
|
|
5145
5268
|
/**
|
|
5146
5269
|
* @description Raw, per-network metrics for a publication. Only the fields that belong to the publication's own social network are returned.
|
|
5147
5270
|
*
|
|
@@ -8920,6 +9043,89 @@ interface operations {
|
|
|
8920
9043
|
};
|
|
8921
9044
|
};
|
|
8922
9045
|
};
|
|
9046
|
+
getAccountPublishSettings: {
|
|
9047
|
+
parameters: {
|
|
9048
|
+
query?: never;
|
|
9049
|
+
header?: never;
|
|
9050
|
+
path: {
|
|
9051
|
+
/** @description Connected account identifier */
|
|
9052
|
+
id_account: string;
|
|
9053
|
+
/** @description Organization identifier */
|
|
9054
|
+
id_organization: string;
|
|
9055
|
+
};
|
|
9056
|
+
cookie?: never;
|
|
9057
|
+
};
|
|
9058
|
+
requestBody?: never;
|
|
9059
|
+
responses: {
|
|
9060
|
+
/** @description What the account allows now */
|
|
9061
|
+
200: {
|
|
9062
|
+
headers: {
|
|
9063
|
+
[name: string]: unknown;
|
|
9064
|
+
};
|
|
9065
|
+
content: {
|
|
9066
|
+
/**
|
|
9067
|
+
* @example {
|
|
9068
|
+
* "publish_settings": {
|
|
9069
|
+
* "social_network": "tiktok",
|
|
9070
|
+
* "creator": {
|
|
9071
|
+
* "username": "nordwindcafe",
|
|
9072
|
+
* "nickname": "Nordwind Café",
|
|
9073
|
+
* "avatar_url": "https://p16-sign.tiktokcdn.com/…/avatar.jpeg"
|
|
9074
|
+
* },
|
|
9075
|
+
* "visibility_options": [
|
|
9076
|
+
* "public",
|
|
9077
|
+
* "friends",
|
|
9078
|
+
* "private"
|
|
9079
|
+
* ],
|
|
9080
|
+
* "interactions": {
|
|
9081
|
+
* "comments": {
|
|
9082
|
+
* "disabled": false
|
|
9083
|
+
* },
|
|
9084
|
+
* "duet": {
|
|
9085
|
+
* "disabled": false
|
|
9086
|
+
* },
|
|
9087
|
+
* "stitch": {
|
|
9088
|
+
* "disabled": true
|
|
9089
|
+
* }
|
|
9090
|
+
* },
|
|
9091
|
+
* "max_video_duration_sec": 600,
|
|
9092
|
+
* "can_post": true
|
|
9093
|
+
* }
|
|
9094
|
+
* }
|
|
9095
|
+
*/
|
|
9096
|
+
"application/json": {
|
|
9097
|
+
publish_settings: components["schemas"]["PublicationsPublishSettings"];
|
|
9098
|
+
};
|
|
9099
|
+
};
|
|
9100
|
+
};
|
|
9101
|
+
/**
|
|
9102
|
+
* @description The request failed. The body carries the PlanVortex error code in `code`:
|
|
9103
|
+
*
|
|
9104
|
+
* | Code | Meaning |
|
|
9105
|
+
* | --- | --- |
|
|
9106
|
+
* | `2508` | This network has no publish settings to read. `data` carries `social_network` |
|
|
9107
|
+
* | `919` | The network did not answer. `data` carries its detail |
|
|
9108
|
+
* | `701` | Account not found in this organization |
|
|
9109
|
+
* | `700` | Account not connected, missing authorization tokens |
|
|
9110
|
+
* | `1101` | Invalid organization |
|
|
9111
|
+
*/
|
|
9112
|
+
400: {
|
|
9113
|
+
headers: {
|
|
9114
|
+
[name: string]: unknown;
|
|
9115
|
+
};
|
|
9116
|
+
content: {
|
|
9117
|
+
"application/json": components["schemas"]["Error"];
|
|
9118
|
+
};
|
|
9119
|
+
};
|
|
9120
|
+
/** @description Unhandled error by the server */
|
|
9121
|
+
500: {
|
|
9122
|
+
headers: {
|
|
9123
|
+
[name: string]: unknown;
|
|
9124
|
+
};
|
|
9125
|
+
content?: never;
|
|
9126
|
+
};
|
|
9127
|
+
};
|
|
9128
|
+
};
|
|
8923
9129
|
updatePublicationByAccount: {
|
|
8924
9130
|
parameters: {
|
|
8925
9131
|
query?: never;
|
|
@@ -12121,7 +12327,10 @@ interface operations {
|
|
|
12121
12327
|
* "link": false,
|
|
12122
12328
|
* "reply_control": false,
|
|
12123
12329
|
* "visibility": false,
|
|
12124
|
-
* "made_for_kids": false
|
|
12330
|
+
* "made_for_kids": false,
|
|
12331
|
+
* "interactions": false,
|
|
12332
|
+
* "commercial_content": false,
|
|
12333
|
+
* "publish_settings": false
|
|
12125
12334
|
* },
|
|
12126
12335
|
* "google_business": {
|
|
12127
12336
|
* "publications": false,
|
|
@@ -12134,7 +12343,10 @@ interface operations {
|
|
|
12134
12343
|
* "link": false,
|
|
12135
12344
|
* "reply_control": false,
|
|
12136
12345
|
* "visibility": false,
|
|
12137
|
-
* "made_for_kids": false
|
|
12346
|
+
* "made_for_kids": false,
|
|
12347
|
+
* "interactions": false,
|
|
12348
|
+
* "commercial_content": false,
|
|
12349
|
+
* "publish_settings": false
|
|
12138
12350
|
* },
|
|
12139
12351
|
* "pinterest": {
|
|
12140
12352
|
* "publications": true,
|
|
@@ -12147,7 +12359,10 @@ interface operations {
|
|
|
12147
12359
|
* "link": true,
|
|
12148
12360
|
* "reply_control": false,
|
|
12149
12361
|
* "visibility": false,
|
|
12150
|
-
* "made_for_kids": false
|
|
12362
|
+
* "made_for_kids": false,
|
|
12363
|
+
* "interactions": false,
|
|
12364
|
+
* "commercial_content": false,
|
|
12365
|
+
* "publish_settings": false
|
|
12151
12366
|
* },
|
|
12152
12367
|
* "threads": {
|
|
12153
12368
|
* "publications": true,
|
|
@@ -12160,7 +12375,10 @@ interface operations {
|
|
|
12160
12375
|
* "link": false,
|
|
12161
12376
|
* "reply_control": true,
|
|
12162
12377
|
* "visibility": false,
|
|
12163
|
-
* "made_for_kids": false
|
|
12378
|
+
* "made_for_kids": false,
|
|
12379
|
+
* "interactions": false,
|
|
12380
|
+
* "commercial_content": false,
|
|
12381
|
+
* "publish_settings": false
|
|
12164
12382
|
* }
|
|
12165
12383
|
* }
|
|
12166
12384
|
*/
|
|
@@ -12650,6 +12868,13 @@ type Destination = Schemas["PublicationsDestination"];
|
|
|
12650
12868
|
* etiquetas para pintar "Recetas > Postres": el servidor no las comprueba.
|
|
12651
12869
|
*/
|
|
12652
12870
|
type PublicationDestination = Schemas["PublicationDestination"];
|
|
12871
|
+
/**
|
|
12872
|
+
* Lo que una cuenta admite AL PUBLICAR, leído de la red en el momento: lo que devuelve
|
|
12873
|
+
* `accounts.publishSettings()`. Hoy sólo TikTok, cuya guía de contenido pide enseñarlo antes de
|
|
12874
|
+
* publicar. Los valores van en el vocabulario de la publicación: `visibility_options` es lo que
|
|
12875
|
+
* se manda luego en `visibility`.
|
|
12876
|
+
*/
|
|
12877
|
+
type PublishSettings = Schemas["PublicationsPublishSettings"];
|
|
12653
12878
|
/**
|
|
12654
12879
|
* El token temporal con el que UNA PERSONA conecta una cuenta social, y la URL a la que mandarla.
|
|
12655
12880
|
*
|
|
@@ -13855,4 +14080,4 @@ interface PlanVortexWebhooksOptions {
|
|
|
13855
14080
|
*/
|
|
13856
14081
|
declare function planvortexWebhooks(options: PlanVortexWebhooksOptions): (request: WebhookRequestLike, response: WebhookResponseLike, next: (error?: unknown) => void) => void;
|
|
13857
14082
|
|
|
13858
|
-
export { type
|
|
14083
|
+
export { type Client as $, type Account as A, type Comment as B, type ConnectLink as C, type Destination as D, type EnableResult as E, type CommentThread as F, type CommentReplyResult as G, type ContactExtraData as H, type Contact as I, type ContactCreate as J, type ContactUpdate as K, type IntegrationProviderName as L, type MetricName as M, type IntegrationProvider as N, type Integration as O, type Paginated as P, type IntegrationConnectRequest as Q, type IntegrationUpdate as R, type SocialNetwork as S, type TopPublicationsResult as T, type IntegrationPickerConfig as U, type IntegrationCatalogPage as V, type MessageTemplate as W, type Conversation as X, type ConversationTotals as Y, type Message as Z, type MessageInput as _, type ConnectResult as a, MessagingError as a$, type Organization as a0, type AiSettings as a1, type ClientWithOrganizations as a2, type AccountSelection as a3, type PlanData as a4, type PlanUseData as a5, type ConnectToken as a6, type AiContext as a7, type SocialCredentialsInput as a8, type Product as a9, type AiPlanSourceProduct as aA, type AiPlanState as aB, type ApiErrorBody as aC, type AspectRatios as aD, AuthError as aE, type ClientPlan as aF, type CommentAuthor as aG, type CommentChange as aH, type ConnectSessionAccount as aI, type ContactChannel as aJ, ContactError as aK, type DashboardAiPlanRef as aL, type DashboardPublicationRef as aM, type DashboardRange as aN, type EngagementBase as aO, FileError as aP, type FileFormat as aQ, type FileProperties as aR, type FileType as aS, type IntegrationCatalogProduct as aT, type IntegrationConfig as aU, IntegrationError as aV, type IntegrationErrorChange as aW, type IntegrationFormField as aX, type MessageChange as aY, type MessageOptions as aZ, type MessageType as a_, type ProductInput as aa, type ProductCatalog as ab, type ProductCatalogInput as ac, type PublicationInput as ad, type PublicationState as ae, type PublicationStats as af, type PublicationStatsHistory as ag, type Upload as ah, AccountError as ai, type AccountMetricRow as aj, type AccountStateChange as ak, type AccountWebhookChangeBase as al, type AccountWithError as am, type AiImageOrigin as an, type AiPlanCostEstimate as ao, type AiPlanDestination as ap, AiPlanError as aq, type AiPlanNotice as ar, type AiPlanOptions as as, type AiPlanOptionsInput as at, type AiPlanResult as au, type AiPlanResultsGroup as av, type AiPlanResultsTemplateGroup as aw, type AiPlanSource as ax, type AiPlanSourceImageInput as ay, type AiPlanSourceInput as az, type ConnectSession as b, WebhookBodyError as b$, type MetricRow as b0, NO_ERROR_CODE as b1, type components as b2, type operations as b3, type paths as b4, type webhooks as b5, type OpenEnum as b6, OrganizationError as b7, PLANVORTEX_ERROR_RANGES as b8, PlanLimitError as b9, type UnknownWebhookChange as bA, UserError as bB, type WebhookAlgorithm as bC, type WebhookChange as bD, type WebhookEvent as bE, type WithAccount as bF, type WithPublication as bG, type WooCommerceConnectRequest as bH, account as bI, accountId as bJ, errorFamilyForCode as bK, isPlanVortexError as bL, isTokenError as bM, messageContact as bN, messageContactId as bO, messageDirection as bP, messageFileIds as bQ, messageFiles as bR, publication as bS, publicationId as bT, type AiPlanChange as bU, type HandleWebhookRequestOptions as bV, type PlanVortexWebhooksOptions as bW, type RawWebhookBody as bX, type VerifyWebhookSignatureOptions as bY, WEBHOOK_EVENTS as bZ, WEBHOOK_SIGNATURE_HEADERS as b_, PlanVortexAuthenticationError as ba, PlanVortexConfigError as bb, PlanVortexConnectionError as bc, PlanVortexError as bd, type PlanVortexErrorOptions as be, type PlanVortexErrorRange as bf, type PlannerTemplateField as bg, type PlannerTemplateFieldType as bh, ProductError as bi, type PublicationAiGenerated as bj, type PublicationDestination as bk, PublicationError as bl, type PublicationErrorDetail as bm, type PublicationMetrics as bn, type PublicationPending as bo, type PublicationStatsPoint as bp, type PublicationType as bq, type PublicationsSummary as br, type RssConfig as bs, type SocialAuthorizationMethod as bt, type SocialCredentials as bu, type SocialIdentifier as bv, type SocialIdentifierInput as bw, type SocialLimitsMap as bx, TOKEN_ERROR_CODES as by, type TopPublication as bz, type AccountMetrics as c, type WebhookHeaders as c0, type WebhookRequestLike as c1, type WebhookResponseLike as c2, WebhookSignatureError as c3, handleWebhookRequest as c4, isAccountStateChange as c5, isAiPlanChange as c6, isCommentChange as c7, isIntegrationErrorChange as c8, isMessageChange as c9, parseWebhookPayload as ca, planvortexWebhooks as cb, verifyWebhookSignature as cc, type PublishSettings as d, type PersistentMenu as e, type Dashboard as f, type DashboardMetricsResult as g, type PublicationsSummaryResult as h, type PublicationsStatsResult as i, type PlanUse as j, type Publication as k, type AiPlanResultsSort as l, type PlannerTemplateName as m, type AiPlanCreateRequest as n, type AiPlanCreateResult as o, type AiPlan as p, type AiPlanResults as q, type ClientApp as r, type ClientAppInput as s, type SocialCapabilities as t, type CommentActions as u, type SocialLimits as v, type PublicationLimits as w, type AspectRatiosByNetwork as x, type PlannerTemplate as y, type CommentNetwork as z };
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var path = require('path');
|
|
|
4
4
|
|
|
5
5
|
// src/version.ts
|
|
6
6
|
var PLANVORTEX_API_URL = "https://api.planvortex.com/v1.0.0";
|
|
7
|
-
var VERSION = "0.
|
|
7
|
+
var VERSION = "0.18.0";
|
|
8
8
|
|
|
9
9
|
// src/core/errors.ts
|
|
10
10
|
var PLANVORTEX_ERROR_RANGES = [
|
|
@@ -40,6 +40,10 @@ var PLANVORTEX_ERROR_RANGES = [
|
|
|
40
40
|
//Los COMENTARIOS siguen aquí porque sus 945-948 se llenaron, y van con ellos a `publication`:
|
|
41
41
|
//el 2600 (esta cuenta no tiene bandeja, un perfil personal de LinkedIn) es la versión por
|
|
42
42
|
//cuenta del 945, y separarlos daría dos clases para el mismo «aquí no hay comentarios».
|
|
43
|
+
//Los campos de publicación que no cabían en los 9xx (2500-2507: visibilidad, niños, y lo que
|
|
44
|
+
//exige la auditoría de TikTok). Casi todos viajan en `publication_errors`, pero el 2508 se
|
|
45
|
+
//LANZA: `accounts.publishSettings()` en una red que no los tiene.
|
|
46
|
+
{ from: 2500, to: 2599, family: "publication" },
|
|
43
47
|
{ from: 2600, to: 2699, family: "publication" }
|
|
44
48
|
];
|
|
45
49
|
var NO_ERROR_CODE = 0;
|
|
@@ -853,6 +857,30 @@ var AccountsResource = class extends Resource {
|
|
|
853
857
|
"destination"
|
|
854
858
|
);
|
|
855
859
|
}
|
|
860
|
+
/**
|
|
861
|
+
* Lo que la cuenta admite AL PUBLICAR, leído de la red en el momento. Hoy sólo TikTok: las
|
|
862
|
+
* redes con `publish_settings` en `catalog.socialCapabilities()`; en las demás contesta 2508.
|
|
863
|
+
*
|
|
864
|
+
* Es lo que la guía de TikTok pide enseñar antes de publicar: a qué cuenta va
|
|
865
|
+
* (`creator.nickname`), las privacidades que admite AHORA (`visibility_options`, a ofrecer sin
|
|
866
|
+
* ninguna elegida de antemano), las interacciones que el creador tiene cerradas en la app
|
|
867
|
+
* (`interactions.*.disabled`) y el vídeo más largo que puede publicar. Léelo cada vez que se
|
|
868
|
+
* abre tu pantalla de publicar: una cuenta pasa de pública a privada entre medias.
|
|
869
|
+
*
|
|
870
|
+
* `can_post: false` es que TikTok no acepta ahora un post de esta cuenta (`reason` trae su
|
|
871
|
+
* código): di que se intente más tarde en vez de mandarlo. Si TikTok no contesta es el 919,
|
|
872
|
+
* nunca una lista vacía.
|
|
873
|
+
*/
|
|
874
|
+
async publishSettings(idOrganization, idAccount, options = {}) {
|
|
875
|
+
return unwrapOne(
|
|
876
|
+
await this.httpGet(
|
|
877
|
+
`${this.path(idOrganization, idAccount)}/publish_settings`,
|
|
878
|
+
void 0,
|
|
879
|
+
options
|
|
880
|
+
),
|
|
881
|
+
"publish_settings"
|
|
882
|
+
);
|
|
883
|
+
}
|
|
856
884
|
/**
|
|
857
885
|
* El menú fijo del chat, una entrada por idioma.
|
|
858
886
|
*
|