faceless-cli 1.1.25 → 1.1.27
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/package.json +1 -1
- package/src/generated/operations.json +210 -15
- package/src/index.mjs +20 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generatedFrom": "src/backend/api/v1/spec/registry.mjs",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.27",
|
|
4
4
|
"baseUrl": "https://faceless.so/api/v1",
|
|
5
5
|
"operations": [
|
|
6
6
|
{
|
|
@@ -889,7 +889,7 @@
|
|
|
889
889
|
},
|
|
890
890
|
"language": {
|
|
891
891
|
"type": "string",
|
|
892
|
-
"description": "Video language, e.g. English. Full list: GET /options?kind=languages"
|
|
892
|
+
"description": "Video language, e.g. English. Omitted on create, it is the voice's own language when the voice is made for one language (a Spanish voice gives Spanish), else English. Full list: GET /options?kind=languages"
|
|
893
893
|
},
|
|
894
894
|
"duration": {
|
|
895
895
|
"type": "string",
|
|
@@ -905,11 +905,102 @@
|
|
|
905
905
|
"description": "Primary auto-post destination platform, e.g. youtube or tiktok"
|
|
906
906
|
},
|
|
907
907
|
"destinationAccounts": {
|
|
908
|
-
"
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
908
|
+
"anyOf": [
|
|
909
|
+
{
|
|
910
|
+
"anyOf": [
|
|
911
|
+
{
|
|
912
|
+
"type": "object",
|
|
913
|
+
"properties": {
|
|
914
|
+
"youtube": {
|
|
915
|
+
"type": "array",
|
|
916
|
+
"items": {
|
|
917
|
+
"type": "string",
|
|
918
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
919
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
920
|
+
},
|
|
921
|
+
"maxItems": 20,
|
|
922
|
+
"description": "youtube account ids to post through; [] clears the pin so youtube posts through the team's default account"
|
|
923
|
+
},
|
|
924
|
+
"tiktok": {
|
|
925
|
+
"type": "array",
|
|
926
|
+
"items": {
|
|
927
|
+
"type": "string",
|
|
928
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
929
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
930
|
+
},
|
|
931
|
+
"maxItems": 20,
|
|
932
|
+
"description": "tiktok account ids to post through; [] clears the pin so tiktok posts through the team's default account"
|
|
933
|
+
},
|
|
934
|
+
"instagram": {
|
|
935
|
+
"type": "array",
|
|
936
|
+
"items": {
|
|
937
|
+
"type": "string",
|
|
938
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
939
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
940
|
+
},
|
|
941
|
+
"maxItems": 20,
|
|
942
|
+
"description": "instagram account ids to post through; [] clears the pin so instagram posts through the team's default account"
|
|
943
|
+
},
|
|
944
|
+
"facebook": {
|
|
945
|
+
"type": "array",
|
|
946
|
+
"items": {
|
|
947
|
+
"type": "string",
|
|
948
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
949
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
950
|
+
},
|
|
951
|
+
"maxItems": 20,
|
|
952
|
+
"description": "facebook account ids to post through; [] clears the pin so facebook posts through the team's default account"
|
|
953
|
+
},
|
|
954
|
+
"x": {
|
|
955
|
+
"type": "array",
|
|
956
|
+
"items": {
|
|
957
|
+
"type": "string",
|
|
958
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
959
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
960
|
+
},
|
|
961
|
+
"maxItems": 20,
|
|
962
|
+
"description": "x account ids to post through; [] clears the pin so x posts through the team's default account"
|
|
963
|
+
},
|
|
964
|
+
"threads": {
|
|
965
|
+
"type": "array",
|
|
966
|
+
"items": {
|
|
967
|
+
"type": "string",
|
|
968
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
969
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
970
|
+
},
|
|
971
|
+
"maxItems": 20,
|
|
972
|
+
"description": "threads account ids to post through; [] clears the pin so threads posts through the team's default account"
|
|
973
|
+
},
|
|
974
|
+
"linkedin": {
|
|
975
|
+
"type": "array",
|
|
976
|
+
"items": {
|
|
977
|
+
"type": "string",
|
|
978
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
979
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
980
|
+
},
|
|
981
|
+
"maxItems": 20,
|
|
982
|
+
"description": "linkedin account ids to post through; [] clears the pin so linkedin posts through the team's default account"
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
"additionalProperties": false
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"type": "array",
|
|
989
|
+
"items": {
|
|
990
|
+
"type": "string",
|
|
991
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
992
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
993
|
+
},
|
|
994
|
+
"maxItems": 50,
|
|
995
|
+
"description": "Deprecated flat list of account ids; each id is filed under the platform it is an account of"
|
|
996
|
+
}
|
|
997
|
+
]
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"type": "null"
|
|
1001
|
+
}
|
|
1002
|
+
],
|
|
1003
|
+
"description": "Which connected account each platform posts through, by platform, e.g. {\"youtube\":[\"<authId>\"],\"tiktok\":[\"<authId>\"]} with authIds from GET /accounts. Every id must be an account of this team on that platform, or the request is rejected. A platform with no entry posts through the team's default account. On update only the platforms you send change; null clears every pin"
|
|
913
1004
|
},
|
|
914
1005
|
"generateThumbnails": {
|
|
915
1006
|
"type": "boolean",
|
|
@@ -1146,6 +1237,14 @@
|
|
|
1146
1237
|
"source": "Facts & stories",
|
|
1147
1238
|
"niche": "Ocean facts",
|
|
1148
1239
|
"voice": "EXAVITQu4vr4xnSDxMaL",
|
|
1240
|
+
"destination": [
|
|
1241
|
+
"youtube"
|
|
1242
|
+
],
|
|
1243
|
+
"destinationAccounts": {
|
|
1244
|
+
"youtube": [
|
|
1245
|
+
"665f1b2a9c31a2b3c4d5ee01"
|
|
1246
|
+
]
|
|
1247
|
+
},
|
|
1149
1248
|
"autoPostTime": "18:00",
|
|
1150
1249
|
"paused": false
|
|
1151
1250
|
}
|
|
@@ -1157,7 +1256,7 @@
|
|
|
1157
1256
|
"path": "/series/{id}",
|
|
1158
1257
|
"resource": "series",
|
|
1159
1258
|
"summary": "Update a series",
|
|
1160
|
-
"description": "Updates any subset of a series' configuration (niche, voice, schedule, destinations, pause state and so on). Only the fields you send change.",
|
|
1259
|
+
"description": "Updates any subset of a series' configuration (niche, voice, schedule, destinations, pause state and so on). Only the fields you send change; in destinationAccounts only the platforms you send change.",
|
|
1161
1260
|
"scopes": [
|
|
1162
1261
|
"series:write"
|
|
1163
1262
|
],
|
|
@@ -1205,7 +1304,7 @@
|
|
|
1205
1304
|
},
|
|
1206
1305
|
"language": {
|
|
1207
1306
|
"type": "string",
|
|
1208
|
-
"description": "Video language, e.g. English. Full list: GET /options?kind=languages"
|
|
1307
|
+
"description": "Video language, e.g. English. Omitted on create, it is the voice's own language when the voice is made for one language (a Spanish voice gives Spanish), else English. Full list: GET /options?kind=languages"
|
|
1209
1308
|
},
|
|
1210
1309
|
"duration": {
|
|
1211
1310
|
"type": "string",
|
|
@@ -1221,11 +1320,102 @@
|
|
|
1221
1320
|
"description": "Primary auto-post destination platform, e.g. youtube or tiktok"
|
|
1222
1321
|
},
|
|
1223
1322
|
"destinationAccounts": {
|
|
1224
|
-
"
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1323
|
+
"anyOf": [
|
|
1324
|
+
{
|
|
1325
|
+
"anyOf": [
|
|
1326
|
+
{
|
|
1327
|
+
"type": "object",
|
|
1328
|
+
"properties": {
|
|
1329
|
+
"youtube": {
|
|
1330
|
+
"type": "array",
|
|
1331
|
+
"items": {
|
|
1332
|
+
"type": "string",
|
|
1333
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
1334
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
1335
|
+
},
|
|
1336
|
+
"maxItems": 20,
|
|
1337
|
+
"description": "youtube account ids to post through; [] clears the pin so youtube posts through the team's default account"
|
|
1338
|
+
},
|
|
1339
|
+
"tiktok": {
|
|
1340
|
+
"type": "array",
|
|
1341
|
+
"items": {
|
|
1342
|
+
"type": "string",
|
|
1343
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
1344
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
1345
|
+
},
|
|
1346
|
+
"maxItems": 20,
|
|
1347
|
+
"description": "tiktok account ids to post through; [] clears the pin so tiktok posts through the team's default account"
|
|
1348
|
+
},
|
|
1349
|
+
"instagram": {
|
|
1350
|
+
"type": "array",
|
|
1351
|
+
"items": {
|
|
1352
|
+
"type": "string",
|
|
1353
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
1354
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
1355
|
+
},
|
|
1356
|
+
"maxItems": 20,
|
|
1357
|
+
"description": "instagram account ids to post through; [] clears the pin so instagram posts through the team's default account"
|
|
1358
|
+
},
|
|
1359
|
+
"facebook": {
|
|
1360
|
+
"type": "array",
|
|
1361
|
+
"items": {
|
|
1362
|
+
"type": "string",
|
|
1363
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
1364
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
1365
|
+
},
|
|
1366
|
+
"maxItems": 20,
|
|
1367
|
+
"description": "facebook account ids to post through; [] clears the pin so facebook posts through the team's default account"
|
|
1368
|
+
},
|
|
1369
|
+
"x": {
|
|
1370
|
+
"type": "array",
|
|
1371
|
+
"items": {
|
|
1372
|
+
"type": "string",
|
|
1373
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
1374
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
1375
|
+
},
|
|
1376
|
+
"maxItems": 20,
|
|
1377
|
+
"description": "x account ids to post through; [] clears the pin so x posts through the team's default account"
|
|
1378
|
+
},
|
|
1379
|
+
"threads": {
|
|
1380
|
+
"type": "array",
|
|
1381
|
+
"items": {
|
|
1382
|
+
"type": "string",
|
|
1383
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
1384
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
1385
|
+
},
|
|
1386
|
+
"maxItems": 20,
|
|
1387
|
+
"description": "threads account ids to post through; [] clears the pin so threads posts through the team's default account"
|
|
1388
|
+
},
|
|
1389
|
+
"linkedin": {
|
|
1390
|
+
"type": "array",
|
|
1391
|
+
"items": {
|
|
1392
|
+
"type": "string",
|
|
1393
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
1394
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
1395
|
+
},
|
|
1396
|
+
"maxItems": 20,
|
|
1397
|
+
"description": "linkedin account ids to post through; [] clears the pin so linkedin posts through the team's default account"
|
|
1398
|
+
}
|
|
1399
|
+
},
|
|
1400
|
+
"additionalProperties": false
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"type": "array",
|
|
1404
|
+
"items": {
|
|
1405
|
+
"type": "string",
|
|
1406
|
+
"pattern": "^[a-f\\d]{24}$",
|
|
1407
|
+
"description": "Connected account id (authId from GET /accounts)"
|
|
1408
|
+
},
|
|
1409
|
+
"maxItems": 50,
|
|
1410
|
+
"description": "Deprecated flat list of account ids; each id is filed under the platform it is an account of"
|
|
1411
|
+
}
|
|
1412
|
+
]
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
"type": "null"
|
|
1416
|
+
}
|
|
1417
|
+
],
|
|
1418
|
+
"description": "Which connected account each platform posts through, by platform, e.g. {\"youtube\":[\"<authId>\"],\"tiktok\":[\"<authId>\"]} with authIds from GET /accounts. Every id must be an account of this team on that platform, or the request is rejected. A platform with no entry posts through the team's default account. On update only the platforms you send change; null clears every pin"
|
|
1229
1419
|
},
|
|
1230
1420
|
"generateThumbnails": {
|
|
1231
1421
|
"type": "boolean",
|
|
@@ -1375,7 +1565,12 @@
|
|
|
1375
1565
|
},
|
|
1376
1566
|
"requestExample": {
|
|
1377
1567
|
"autoPostTime": "09:00",
|
|
1378
|
-
"paused": false
|
|
1568
|
+
"paused": false,
|
|
1569
|
+
"destinationAccounts": {
|
|
1570
|
+
"youtube": [
|
|
1571
|
+
"665f1b2a9c31a2b3c4d5ee01"
|
|
1572
|
+
]
|
|
1573
|
+
}
|
|
1379
1574
|
},
|
|
1380
1575
|
"responseExample": {
|
|
1381
1576
|
"success": true,
|
package/src/index.mjs
CHANGED
|
@@ -141,7 +141,10 @@ function withSeriesFlags(command) {
|
|
|
141
141
|
.option("--language <language>", "video language, e.g. English")
|
|
142
142
|
.addOption(new Option("--duration <sec>", "target episode length in seconds").choices(["30", "60", "90"]))
|
|
143
143
|
.option("--destination <platform>", "primary auto-post destination, e.g. youtube or tiktok")
|
|
144
|
-
.option(
|
|
144
|
+
.option(
|
|
145
|
+
"--destination-accounts <platform:id[,platform:id...]>",
|
|
146
|
+
"account each platform posts through, e.g. youtube:<authId>,tiktok:<authId> (see: faceless accounts); bare ids are filed under their own platform"
|
|
147
|
+
)
|
|
145
148
|
.option("--auto-post-time <HH:mm>", "daily auto-post time in the series timezone")
|
|
146
149
|
.option(
|
|
147
150
|
"--posting-days <days>",
|
|
@@ -162,6 +165,21 @@ function withSeriesFlags(command) {
|
|
|
162
165
|
.addOption(new Option("--youtube-privacy <p>", "privacy for auto-posted YouTube videos").choices(["public", "unlisted", "private"]));
|
|
163
166
|
}
|
|
164
167
|
|
|
168
|
+
// "youtube:<id>,tiktok:<id>" -> { youtube: ["<id>"], tiktok: ["<id>"] }. Bare ids keep the old flat list,
|
|
169
|
+
// which the API files under each id's own platform. Mixing the two is ambiguous, so it is refused.
|
|
170
|
+
function parseDestinationAccounts(value) {
|
|
171
|
+
const entries = splitList(value);
|
|
172
|
+
const pairs = entries.filter((entry) => entry.includes(":"));
|
|
173
|
+
if (!pairs.length) return entries;
|
|
174
|
+
if (pairs.length !== entries.length) throw new Error("--destination-accounts: write every entry as platform:id, e.g. youtube:<authId>");
|
|
175
|
+
const byPlatform = {};
|
|
176
|
+
for (const pair of pairs) {
|
|
177
|
+
const [platform, id] = pair.split(":").map((part) => part.trim());
|
|
178
|
+
(byPlatform[platform.toLowerCase()] ||= []).push(id);
|
|
179
|
+
}
|
|
180
|
+
return byPlatform;
|
|
181
|
+
}
|
|
182
|
+
|
|
165
183
|
function seriesBody(opts) {
|
|
166
184
|
return compact({
|
|
167
185
|
name: opts.name,
|
|
@@ -173,7 +191,7 @@ function seriesBody(opts) {
|
|
|
173
191
|
language: opts.language,
|
|
174
192
|
duration: opts.duration,
|
|
175
193
|
destination: opts.destination,
|
|
176
|
-
destinationAccounts: opts.destinationAccounts ?
|
|
194
|
+
destinationAccounts: opts.destinationAccounts ? parseDestinationAccounts(opts.destinationAccounts) : undefined,
|
|
177
195
|
autoPostTime: opts.autoPostTime,
|
|
178
196
|
postingDays: opts.postingDays ? parseDays(opts.postingDays) : undefined,
|
|
179
197
|
timezone: opts.timezone,
|