@postrun/js 2.25.0 → 3.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/dist/{chunk-ZKETM7OS.js → chunk-BJ6NXBN5.js} +43 -108
- package/dist/chunk-BJ6NXBN5.js.map +1 -0
- package/dist/{chunk-VDCNJXGG.js → chunk-DT4DW5LA.js} +3 -3
- package/dist/{chunk-VDCNJXGG.js.map → chunk-DT4DW5LA.js.map} +1 -1
- package/dist/index.cjs +47 -158
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -30
- package/dist/index.d.ts +42 -30
- package/dist/index.js +8 -54
- package/dist/index.js.map +1 -1
- package/dist/query.d.cts +64 -61
- package/dist/query.d.ts +64 -61
- package/dist/schemas/index.cjs +65 -106
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +398 -497
- package/dist/schemas/index.d.ts +398 -497
- package/dist/schemas/index.js +27 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/server.cjs +42 -107
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +2 -2
- package/dist/{types.gen-DlTNd9za.d.cts → types.gen-MxJw6FpT.d.cts} +43 -41
- package/dist/{types.gen-DlTNd9za.d.ts → types.gen-MxJw6FpT.d.ts} +43 -41
- package/package.json +1 -1
- package/dist/chunk-ZKETM7OS.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -824,6 +824,7 @@ var zErrorCode = z__namespace.enum([
|
|
|
824
824
|
"media_processing",
|
|
825
825
|
"media_upload_init_failed",
|
|
826
826
|
"media_upload_incomplete",
|
|
827
|
+
"media_upload_invalid_parts",
|
|
827
828
|
"not_publishable",
|
|
828
829
|
"invalid_connection",
|
|
829
830
|
"invalid_media",
|
|
@@ -859,7 +860,6 @@ var zErrorCode = z__namespace.enum([
|
|
|
859
860
|
"content_missing",
|
|
860
861
|
"content_conflict",
|
|
861
862
|
"content_incomplete",
|
|
862
|
-
"content_kind_mismatch",
|
|
863
863
|
"media_type_mismatch",
|
|
864
864
|
"tag_limit_exceeded",
|
|
865
865
|
"reel_field_on_non_reel",
|
|
@@ -1156,7 +1156,7 @@ var zPostPlatform = z__namespace.enum([
|
|
|
1156
1156
|
"instagram",
|
|
1157
1157
|
"tiktok"
|
|
1158
1158
|
]);
|
|
1159
|
-
z__namespace.enum([
|
|
1159
|
+
var zPostType = z__namespace.enum([
|
|
1160
1160
|
"text",
|
|
1161
1161
|
"single_image",
|
|
1162
1162
|
"multi_image",
|
|
@@ -1219,12 +1219,6 @@ var zTikTokPrivacyLevel = z__namespace.enum([
|
|
|
1219
1219
|
var zPostVariant = z__namespace.union([
|
|
1220
1220
|
z__namespace.object({
|
|
1221
1221
|
platform: z__namespace.literal("x"),
|
|
1222
|
-
post_type: z__namespace.enum([
|
|
1223
|
-
"text",
|
|
1224
|
-
"single_image",
|
|
1225
|
-
"multi_image",
|
|
1226
|
-
"video"
|
|
1227
|
-
]),
|
|
1228
1222
|
settings: z__namespace.object({
|
|
1229
1223
|
reply_settings: z__namespace.enum([
|
|
1230
1224
|
"everyone",
|
|
@@ -1259,6 +1253,7 @@ var zPostVariant = z__namespace.union([
|
|
|
1259
1253
|
}),
|
|
1260
1254
|
id: z__namespace.string(),
|
|
1261
1255
|
object: z__namespace.literal("post_variant"),
|
|
1256
|
+
post_type: zPostType.nullable(),
|
|
1262
1257
|
connection_id: z__namespace.string().nullable(),
|
|
1263
1258
|
body: z__namespace.string().nullable(),
|
|
1264
1259
|
status: zPostVariantStatus,
|
|
@@ -1290,6 +1285,7 @@ var zPostVariant = z__namespace.union([
|
|
|
1290
1285
|
"media_processing",
|
|
1291
1286
|
"media_upload_init_failed",
|
|
1292
1287
|
"media_upload_incomplete",
|
|
1288
|
+
"media_upload_invalid_parts",
|
|
1293
1289
|
"not_publishable",
|
|
1294
1290
|
"invalid_connection",
|
|
1295
1291
|
"invalid_media",
|
|
@@ -1325,7 +1321,6 @@ var zPostVariant = z__namespace.union([
|
|
|
1325
1321
|
"content_missing",
|
|
1326
1322
|
"content_conflict",
|
|
1327
1323
|
"content_incomplete",
|
|
1328
|
-
"content_kind_mismatch",
|
|
1329
1324
|
"media_type_mismatch",
|
|
1330
1325
|
"tag_limit_exceeded",
|
|
1331
1326
|
"reel_field_on_non_reel",
|
|
@@ -1409,23 +1404,8 @@ var zPostVariant = z__namespace.union([
|
|
|
1409
1404
|
}),
|
|
1410
1405
|
z__namespace.object({
|
|
1411
1406
|
platform: z__namespace.literal("linkedin"),
|
|
1412
|
-
post_type: z__namespace.enum([
|
|
1413
|
-
"text",
|
|
1414
|
-
"single_image",
|
|
1415
|
-
"multi_image",
|
|
1416
|
-
"video"
|
|
1417
|
-
]),
|
|
1418
1407
|
settings: z__namespace.object({
|
|
1419
1408
|
visibility: z__namespace.enum(["PUBLIC", "CONNECTIONS"]),
|
|
1420
|
-
content_kind: z__namespace.enum([
|
|
1421
|
-
"text",
|
|
1422
|
-
"single_image",
|
|
1423
|
-
"video",
|
|
1424
|
-
"multi_image",
|
|
1425
|
-
"document",
|
|
1426
|
-
"article",
|
|
1427
|
-
"poll"
|
|
1428
|
-
]),
|
|
1429
1409
|
article: z__namespace.object({
|
|
1430
1410
|
source: z__namespace.url(),
|
|
1431
1411
|
title: z__namespace.string().max(400).optional(),
|
|
@@ -1454,6 +1434,7 @@ var zPostVariant = z__namespace.union([
|
|
|
1454
1434
|
}),
|
|
1455
1435
|
id: z__namespace.string(),
|
|
1456
1436
|
object: z__namespace.literal("post_variant"),
|
|
1437
|
+
post_type: zPostType.nullable(),
|
|
1457
1438
|
connection_id: z__namespace.string().nullable(),
|
|
1458
1439
|
body: z__namespace.string().nullable(),
|
|
1459
1440
|
status: zPostVariantStatus,
|
|
@@ -1485,6 +1466,7 @@ var zPostVariant = z__namespace.union([
|
|
|
1485
1466
|
"media_processing",
|
|
1486
1467
|
"media_upload_init_failed",
|
|
1487
1468
|
"media_upload_incomplete",
|
|
1469
|
+
"media_upload_invalid_parts",
|
|
1488
1470
|
"not_publishable",
|
|
1489
1471
|
"invalid_connection",
|
|
1490
1472
|
"invalid_media",
|
|
@@ -1520,7 +1502,6 @@ var zPostVariant = z__namespace.union([
|
|
|
1520
1502
|
"content_missing",
|
|
1521
1503
|
"content_conflict",
|
|
1522
1504
|
"content_incomplete",
|
|
1523
|
-
"content_kind_mismatch",
|
|
1524
1505
|
"media_type_mismatch",
|
|
1525
1506
|
"tag_limit_exceeded",
|
|
1526
1507
|
"reel_field_on_non_reel",
|
|
@@ -1600,21 +1581,25 @@ var zPostVariant = z__namespace.union([
|
|
|
1600
1581
|
position: z__namespace.int().gte(-9007199254740991).lte(9007199254740991),
|
|
1601
1582
|
alt_text_override: z__namespace.string().nullable(),
|
|
1602
1583
|
media: zMedia
|
|
1603
|
-
}))
|
|
1604
|
-
|
|
1605
|
-
z__namespace.object({
|
|
1606
|
-
platform: z__namespace.literal("facebook_page"),
|
|
1607
|
-
post_type: z__namespace.enum([
|
|
1584
|
+
})),
|
|
1585
|
+
content_kind: z__namespace.enum([
|
|
1608
1586
|
"text",
|
|
1609
1587
|
"single_image",
|
|
1588
|
+
"video",
|
|
1610
1589
|
"multi_image",
|
|
1611
|
-
"
|
|
1612
|
-
|
|
1590
|
+
"document",
|
|
1591
|
+
"article",
|
|
1592
|
+
"poll"
|
|
1593
|
+
]).nullable()
|
|
1594
|
+
}),
|
|
1595
|
+
z__namespace.object({
|
|
1596
|
+
platform: z__namespace.literal("facebook_page"),
|
|
1613
1597
|
settings: z__namespace.object({
|
|
1614
1598
|
link: z__namespace.url().optional()
|
|
1615
1599
|
}),
|
|
1616
1600
|
id: z__namespace.string(),
|
|
1617
1601
|
object: z__namespace.literal("post_variant"),
|
|
1602
|
+
post_type: zPostType.nullable(),
|
|
1618
1603
|
connection_id: z__namespace.string().nullable(),
|
|
1619
1604
|
body: z__namespace.string().nullable(),
|
|
1620
1605
|
status: zPostVariantStatus,
|
|
@@ -1646,6 +1631,7 @@ var zPostVariant = z__namespace.union([
|
|
|
1646
1631
|
"media_processing",
|
|
1647
1632
|
"media_upload_init_failed",
|
|
1648
1633
|
"media_upload_incomplete",
|
|
1634
|
+
"media_upload_invalid_parts",
|
|
1649
1635
|
"not_publishable",
|
|
1650
1636
|
"invalid_connection",
|
|
1651
1637
|
"invalid_media",
|
|
@@ -1681,7 +1667,6 @@ var zPostVariant = z__namespace.union([
|
|
|
1681
1667
|
"content_missing",
|
|
1682
1668
|
"content_conflict",
|
|
1683
1669
|
"content_incomplete",
|
|
1684
|
-
"content_kind_mismatch",
|
|
1685
1670
|
"media_type_mismatch",
|
|
1686
1671
|
"tag_limit_exceeded",
|
|
1687
1672
|
"reel_field_on_non_reel",
|
|
@@ -1765,17 +1750,7 @@ var zPostVariant = z__namespace.union([
|
|
|
1765
1750
|
}),
|
|
1766
1751
|
z__namespace.object({
|
|
1767
1752
|
platform: z__namespace.literal("instagram"),
|
|
1768
|
-
post_type: z__namespace.enum([
|
|
1769
|
-
"single_image",
|
|
1770
|
-
"carousel",
|
|
1771
|
-
"reel"
|
|
1772
|
-
]),
|
|
1773
1753
|
settings: z__namespace.object({
|
|
1774
|
-
media_type: z__namespace.enum([
|
|
1775
|
-
"IMAGE",
|
|
1776
|
-
"CAROUSEL",
|
|
1777
|
-
"REELS"
|
|
1778
|
-
]).optional(),
|
|
1779
1754
|
location_id: z__namespace.string().optional(),
|
|
1780
1755
|
user_tags: z__namespace.array(z__namespace.object({
|
|
1781
1756
|
username: z__namespace.string().min(1),
|
|
@@ -1790,6 +1765,7 @@ var zPostVariant = z__namespace.union([
|
|
|
1790
1765
|
}),
|
|
1791
1766
|
id: z__namespace.string(),
|
|
1792
1767
|
object: z__namespace.literal("post_variant"),
|
|
1768
|
+
post_type: zPostType.nullable(),
|
|
1793
1769
|
connection_id: z__namespace.string().nullable(),
|
|
1794
1770
|
body: z__namespace.string().nullable(),
|
|
1795
1771
|
status: zPostVariantStatus,
|
|
@@ -1821,6 +1797,7 @@ var zPostVariant = z__namespace.union([
|
|
|
1821
1797
|
"media_processing",
|
|
1822
1798
|
"media_upload_init_failed",
|
|
1823
1799
|
"media_upload_incomplete",
|
|
1800
|
+
"media_upload_invalid_parts",
|
|
1824
1801
|
"not_publishable",
|
|
1825
1802
|
"invalid_connection",
|
|
1826
1803
|
"invalid_media",
|
|
@@ -1856,7 +1833,6 @@ var zPostVariant = z__namespace.union([
|
|
|
1856
1833
|
"content_missing",
|
|
1857
1834
|
"content_conflict",
|
|
1858
1835
|
"content_incomplete",
|
|
1859
|
-
"content_kind_mismatch",
|
|
1860
1836
|
"media_type_mismatch",
|
|
1861
1837
|
"tag_limit_exceeded",
|
|
1862
1838
|
"reel_field_on_non_reel",
|
|
@@ -1936,15 +1912,15 @@ var zPostVariant = z__namespace.union([
|
|
|
1936
1912
|
position: z__namespace.int().gte(-9007199254740991).lte(9007199254740991),
|
|
1937
1913
|
alt_text_override: z__namespace.string().nullable(),
|
|
1938
1914
|
media: zMedia
|
|
1939
|
-
}))
|
|
1915
|
+
})),
|
|
1916
|
+
media_type: z__namespace.enum([
|
|
1917
|
+
"IMAGE",
|
|
1918
|
+
"CAROUSEL",
|
|
1919
|
+
"REELS"
|
|
1920
|
+
]).nullable()
|
|
1940
1921
|
}),
|
|
1941
1922
|
z__namespace.object({
|
|
1942
1923
|
platform: z__namespace.literal("tiktok"),
|
|
1943
|
-
post_type: z__namespace.enum([
|
|
1944
|
-
"video",
|
|
1945
|
-
"single_image",
|
|
1946
|
-
"carousel"
|
|
1947
|
-
]),
|
|
1948
1924
|
settings: z__namespace.object({
|
|
1949
1925
|
privacy_level: zTikTokPrivacyLevel.optional(),
|
|
1950
1926
|
disable_comment: z__namespace.boolean().optional(),
|
|
@@ -1959,6 +1935,7 @@ var zPostVariant = z__namespace.union([
|
|
|
1959
1935
|
}),
|
|
1960
1936
|
id: z__namespace.string(),
|
|
1961
1937
|
object: z__namespace.literal("post_variant"),
|
|
1938
|
+
post_type: zPostType.nullable(),
|
|
1962
1939
|
connection_id: z__namespace.string().nullable(),
|
|
1963
1940
|
body: z__namespace.string().nullable(),
|
|
1964
1941
|
status: zPostVariantStatus,
|
|
@@ -1990,6 +1967,7 @@ var zPostVariant = z__namespace.union([
|
|
|
1990
1967
|
"media_processing",
|
|
1991
1968
|
"media_upload_init_failed",
|
|
1992
1969
|
"media_upload_incomplete",
|
|
1970
|
+
"media_upload_invalid_parts",
|
|
1993
1971
|
"not_publishable",
|
|
1994
1972
|
"invalid_connection",
|
|
1995
1973
|
"invalid_media",
|
|
@@ -2025,7 +2003,6 @@ var zPostVariant = z__namespace.union([
|
|
|
2025
2003
|
"content_missing",
|
|
2026
2004
|
"content_conflict",
|
|
2027
2005
|
"content_incomplete",
|
|
2028
|
-
"content_kind_mismatch",
|
|
2029
2006
|
"media_type_mismatch",
|
|
2030
2007
|
"tag_limit_exceeded",
|
|
2031
2008
|
"reel_field_on_non_reel",
|
|
@@ -2150,12 +2127,6 @@ z__namespace.object({
|
|
|
2150
2127
|
var zPostVariantInput = z__namespace.union([
|
|
2151
2128
|
z__namespace.object({
|
|
2152
2129
|
platform: z__namespace.literal("x"),
|
|
2153
|
-
post_type: z__namespace.enum([
|
|
2154
|
-
"text",
|
|
2155
|
-
"single_image",
|
|
2156
|
-
"multi_image",
|
|
2157
|
-
"video"
|
|
2158
|
-
]),
|
|
2159
2130
|
settings: z__namespace.object({
|
|
2160
2131
|
reply_settings: z__namespace.enum([
|
|
2161
2132
|
"everyone",
|
|
@@ -2197,23 +2168,8 @@ var zPostVariantInput = z__namespace.union([
|
|
|
2197
2168
|
}),
|
|
2198
2169
|
z__namespace.object({
|
|
2199
2170
|
platform: z__namespace.literal("linkedin"),
|
|
2200
|
-
post_type: z__namespace.enum([
|
|
2201
|
-
"text",
|
|
2202
|
-
"single_image",
|
|
2203
|
-
"multi_image",
|
|
2204
|
-
"video"
|
|
2205
|
-
]),
|
|
2206
2171
|
settings: z__namespace.object({
|
|
2207
2172
|
visibility: z__namespace.enum(["PUBLIC", "CONNECTIONS"]),
|
|
2208
|
-
content_kind: z__namespace.enum([
|
|
2209
|
-
"text",
|
|
2210
|
-
"single_image",
|
|
2211
|
-
"video",
|
|
2212
|
-
"multi_image",
|
|
2213
|
-
"document",
|
|
2214
|
-
"article",
|
|
2215
|
-
"poll"
|
|
2216
|
-
]),
|
|
2217
2173
|
article: z__namespace.object({
|
|
2218
2174
|
source: z__namespace.url(),
|
|
2219
2175
|
title: z__namespace.string().max(400).optional(),
|
|
@@ -2249,17 +2205,7 @@ var zPostVariantInput = z__namespace.union([
|
|
|
2249
2205
|
}),
|
|
2250
2206
|
z__namespace.object({
|
|
2251
2207
|
platform: z__namespace.literal("instagram"),
|
|
2252
|
-
post_type: z__namespace.enum([
|
|
2253
|
-
"single_image",
|
|
2254
|
-
"carousel",
|
|
2255
|
-
"reel"
|
|
2256
|
-
]),
|
|
2257
2208
|
settings: z__namespace.object({
|
|
2258
|
-
media_type: z__namespace.enum([
|
|
2259
|
-
"IMAGE",
|
|
2260
|
-
"CAROUSEL",
|
|
2261
|
-
"REELS"
|
|
2262
|
-
]).optional(),
|
|
2263
2209
|
location_id: z__namespace.string().optional(),
|
|
2264
2210
|
user_tags: z__namespace.array(z__namespace.object({
|
|
2265
2211
|
username: z__namespace.string().min(1),
|
|
@@ -2281,12 +2227,6 @@ var zPostVariantInput = z__namespace.union([
|
|
|
2281
2227
|
}),
|
|
2282
2228
|
z__namespace.object({
|
|
2283
2229
|
platform: z__namespace.literal("facebook_page"),
|
|
2284
|
-
post_type: z__namespace.enum([
|
|
2285
|
-
"text",
|
|
2286
|
-
"single_image",
|
|
2287
|
-
"multi_image",
|
|
2288
|
-
"reel"
|
|
2289
|
-
]),
|
|
2290
2230
|
settings: z__namespace.object({
|
|
2291
2231
|
link: z__namespace.url().optional()
|
|
2292
2232
|
}).optional().default({}),
|
|
@@ -2299,11 +2239,6 @@ var zPostVariantInput = z__namespace.union([
|
|
|
2299
2239
|
}),
|
|
2300
2240
|
z__namespace.object({
|
|
2301
2241
|
platform: z__namespace.literal("tiktok"),
|
|
2302
|
-
post_type: z__namespace.enum([
|
|
2303
|
-
"video",
|
|
2304
|
-
"single_image",
|
|
2305
|
-
"carousel"
|
|
2306
|
-
]),
|
|
2307
2242
|
settings: z__namespace.object({
|
|
2308
2243
|
privacy_level: zTikTokPrivacyLevel.optional(),
|
|
2309
2244
|
disable_comment: z__namespace.boolean().optional(),
|
|
@@ -2331,7 +2266,7 @@ z__namespace.object({
|
|
|
2331
2266
|
"schedule",
|
|
2332
2267
|
"draft"
|
|
2333
2268
|
]).optional().default("draft"),
|
|
2334
|
-
schedule_at: z__namespace.iso.datetime().optional(),
|
|
2269
|
+
schedule_at: z__namespace.iso.datetime({ offset: true }).optional(),
|
|
2335
2270
|
external_id: z__namespace.string().min(1).max(255).optional(),
|
|
2336
2271
|
metadata: z__namespace.record(z__namespace.string(), z__namespace.union([
|
|
2337
2272
|
z__namespace.string().max(500),
|
|
@@ -2998,7 +2933,7 @@ var zGoogleAdsConversionUserIdentifier = z__namespace.object({
|
|
|
2998
2933
|
}).optional()
|
|
2999
2934
|
});
|
|
3000
2935
|
var zGoogleAdsConversionEvent = z__namespace.object({
|
|
3001
|
-
event_timestamp: z__namespace.iso.datetime(),
|
|
2936
|
+
event_timestamp: z__namespace.iso.datetime({ offset: true }),
|
|
3002
2937
|
event_source: z__namespace.enum([
|
|
3003
2938
|
"WEB",
|
|
3004
2939
|
"APP",
|
|
@@ -3046,6 +2981,7 @@ var zGoogleAdsConversionStatusReason = z__namespace.object({
|
|
|
3046
2981
|
"media_processing",
|
|
3047
2982
|
"media_upload_init_failed",
|
|
3048
2983
|
"media_upload_incomplete",
|
|
2984
|
+
"media_upload_invalid_parts",
|
|
3049
2985
|
"not_publishable",
|
|
3050
2986
|
"invalid_connection",
|
|
3051
2987
|
"invalid_media",
|
|
@@ -3081,7 +3017,6 @@ var zGoogleAdsConversionStatusReason = z__namespace.object({
|
|
|
3081
3017
|
"content_missing",
|
|
3082
3018
|
"content_conflict",
|
|
3083
3019
|
"content_incomplete",
|
|
3084
|
-
"content_kind_mismatch",
|
|
3085
3020
|
"media_type_mismatch",
|
|
3086
3021
|
"tag_limit_exceeded",
|
|
3087
3022
|
"reel_field_on_non_reel",
|
|
@@ -3578,9 +3513,9 @@ z__namespace.object({
|
|
|
3578
3513
|
z__namespace.number(),
|
|
3579
3514
|
z__namespace.boolean()
|
|
3580
3515
|
])).optional(),
|
|
3581
|
-
scheduled_after: z__namespace.iso.datetime().optional(),
|
|
3582
|
-
scheduled_before: z__namespace.iso.datetime().optional(),
|
|
3583
|
-
updated_after: z__namespace.iso.datetime().optional(),
|
|
3516
|
+
scheduled_after: z__namespace.iso.datetime({ offset: true }).optional(),
|
|
3517
|
+
scheduled_before: z__namespace.iso.datetime({ offset: true }).optional(),
|
|
3518
|
+
updated_after: z__namespace.iso.datetime({ offset: true }).optional(),
|
|
3584
3519
|
status: z__namespace.array(zPostStatus).optional()
|
|
3585
3520
|
});
|
|
3586
3521
|
z__namespace.object({
|
|
@@ -3638,7 +3573,7 @@ z__namespace.object({
|
|
|
3638
3573
|
"schedule",
|
|
3639
3574
|
"draft"
|
|
3640
3575
|
]).optional(),
|
|
3641
|
-
schedule_at: z__namespace.iso.datetime().nullish(),
|
|
3576
|
+
schedule_at: z__namespace.iso.datetime({ offset: true }).nullish(),
|
|
3642
3577
|
external_id: z__namespace.string().min(1).max(255).nullish(),
|
|
3643
3578
|
metadata: z__namespace.record(z__namespace.string(), z__namespace.union([
|
|
3644
3579
|
z__namespace.string().max(500),
|
|
@@ -3712,6 +3647,7 @@ z__namespace.object({
|
|
|
3712
3647
|
"media_processing",
|
|
3713
3648
|
"media_upload_init_failed",
|
|
3714
3649
|
"media_upload_incomplete",
|
|
3650
|
+
"media_upload_invalid_parts",
|
|
3715
3651
|
"not_publishable",
|
|
3716
3652
|
"invalid_connection",
|
|
3717
3653
|
"invalid_media",
|
|
@@ -3747,7 +3683,6 @@ z__namespace.object({
|
|
|
3747
3683
|
"content_missing",
|
|
3748
3684
|
"content_conflict",
|
|
3749
3685
|
"content_incomplete",
|
|
3750
|
-
"content_kind_mismatch",
|
|
3751
3686
|
"media_type_mismatch",
|
|
3752
3687
|
"tag_limit_exceeded",
|
|
3753
3688
|
"reel_field_on_non_reel",
|
|
@@ -5308,8 +5243,8 @@ z__namespace.object({
|
|
|
5308
5243
|
"scheduler"
|
|
5309
5244
|
]).optional(),
|
|
5310
5245
|
action: z__namespace.string().min(1).optional(),
|
|
5311
|
-
created_after: z__namespace.iso.datetime().optional(),
|
|
5312
|
-
created_before: z__namespace.iso.datetime().optional()
|
|
5246
|
+
created_after: z__namespace.iso.datetime({ offset: true }).optional(),
|
|
5247
|
+
created_before: z__namespace.iso.datetime({ offset: true }).optional()
|
|
5313
5248
|
});
|
|
5314
5249
|
z__namespace.object({
|
|
5315
5250
|
object: z__namespace.literal("list"),
|
|
@@ -5364,6 +5299,7 @@ z__namespace.object({
|
|
|
5364
5299
|
"media_processing",
|
|
5365
5300
|
"media_upload_init_failed",
|
|
5366
5301
|
"media_upload_incomplete",
|
|
5302
|
+
"media_upload_invalid_parts",
|
|
5367
5303
|
"not_publishable",
|
|
5368
5304
|
"invalid_connection",
|
|
5369
5305
|
"invalid_media",
|
|
@@ -5399,7 +5335,6 @@ z__namespace.object({
|
|
|
5399
5335
|
"content_missing",
|
|
5400
5336
|
"content_conflict",
|
|
5401
5337
|
"content_incomplete",
|
|
5402
|
-
"content_kind_mismatch",
|
|
5403
5338
|
"media_type_mismatch",
|
|
5404
5339
|
"tag_limit_exceeded",
|
|
5405
5340
|
"reel_field_on_non_reel",
|
|
@@ -5524,6 +5459,7 @@ z__namespace.object({
|
|
|
5524
5459
|
"media_processing",
|
|
5525
5460
|
"media_upload_init_failed",
|
|
5526
5461
|
"media_upload_incomplete",
|
|
5462
|
+
"media_upload_invalid_parts",
|
|
5527
5463
|
"not_publishable",
|
|
5528
5464
|
"invalid_connection",
|
|
5529
5465
|
"invalid_media",
|
|
@@ -5559,7 +5495,6 @@ z__namespace.object({
|
|
|
5559
5495
|
"content_missing",
|
|
5560
5496
|
"content_conflict",
|
|
5561
5497
|
"content_incomplete",
|
|
5562
|
-
"content_kind_mismatch",
|
|
5563
5498
|
"media_type_mismatch",
|
|
5564
5499
|
"tag_limit_exceeded",
|
|
5565
5500
|
"reel_field_on_non_reel",
|
|
@@ -5705,6 +5640,7 @@ z__namespace.object({
|
|
|
5705
5640
|
"media_processing",
|
|
5706
5641
|
"media_upload_init_failed",
|
|
5707
5642
|
"media_upload_incomplete",
|
|
5643
|
+
"media_upload_invalid_parts",
|
|
5708
5644
|
"not_publishable",
|
|
5709
5645
|
"invalid_connection",
|
|
5710
5646
|
"invalid_media",
|
|
@@ -5740,7 +5676,6 @@ z__namespace.object({
|
|
|
5740
5676
|
"content_missing",
|
|
5741
5677
|
"content_conflict",
|
|
5742
5678
|
"content_incomplete",
|
|
5743
|
-
"content_kind_mismatch",
|
|
5744
5679
|
"media_type_mismatch",
|
|
5745
5680
|
"tag_limit_exceeded",
|
|
5746
5681
|
"reel_field_on_non_reel",
|
|
@@ -5865,6 +5800,7 @@ z__namespace.object({
|
|
|
5865
5800
|
"media_processing",
|
|
5866
5801
|
"media_upload_init_failed",
|
|
5867
5802
|
"media_upload_incomplete",
|
|
5803
|
+
"media_upload_invalid_parts",
|
|
5868
5804
|
"not_publishable",
|
|
5869
5805
|
"invalid_connection",
|
|
5870
5806
|
"invalid_media",
|
|
@@ -5900,7 +5836,6 @@ z__namespace.object({
|
|
|
5900
5836
|
"content_missing",
|
|
5901
5837
|
"content_conflict",
|
|
5902
5838
|
"content_incomplete",
|
|
5903
|
-
"content_kind_mismatch",
|
|
5904
5839
|
"media_type_mismatch",
|
|
5905
5840
|
"tag_limit_exceeded",
|
|
5906
5841
|
"reel_field_on_non_reel",
|
|
@@ -7975,30 +7910,9 @@ var ComposeError = class extends Error {
|
|
|
7975
7910
|
this.name = "ComposeError";
|
|
7976
7911
|
}
|
|
7977
7912
|
};
|
|
7978
|
-
function countKinds(media) {
|
|
7979
|
-
let images = 0;
|
|
7980
|
-
let videos = 0;
|
|
7981
|
-
let documents = 0;
|
|
7982
|
-
for (const item of media) {
|
|
7983
|
-
if (item.kind === "video") videos += 1;
|
|
7984
|
-
else if (item.kind === "document") documents += 1;
|
|
7985
|
-
else images += 1;
|
|
7986
|
-
}
|
|
7987
|
-
return { images, videos, documents };
|
|
7988
|
-
}
|
|
7989
|
-
function deriveSinglePlacement(media, videoType) {
|
|
7990
|
-
const { images, videos } = countKinds(media);
|
|
7991
|
-
if (videos >= 1) return videoType;
|
|
7992
|
-
return images >= 2 ? "multi_image" : "single_image";
|
|
7993
|
-
}
|
|
7994
7913
|
var xHandler = {
|
|
7995
|
-
|
|
7996
|
-
if (media.length === 0) return "text";
|
|
7997
|
-
return deriveSinglePlacement(media, "video");
|
|
7998
|
-
},
|
|
7999
|
-
buildVariant: ({ settings, postType, connectionId, body, media }) => ({
|
|
7914
|
+
buildVariant: ({ settings, connectionId, body, media }) => ({
|
|
8000
7915
|
platform: "x",
|
|
8001
|
-
post_type: postType,
|
|
8002
7916
|
connection_id: connectionId,
|
|
8003
7917
|
body,
|
|
8004
7918
|
media: [...media],
|
|
@@ -8006,16 +7920,8 @@ var xHandler = {
|
|
|
8006
7920
|
})
|
|
8007
7921
|
};
|
|
8008
7922
|
var linkedInHandler = {
|
|
8009
|
-
|
|
8010
|
-
if (media.length === 0) return "text";
|
|
8011
|
-
if (countKinds(media).documents > 0) {
|
|
8012
|
-
return "single_image";
|
|
8013
|
-
}
|
|
8014
|
-
return deriveSinglePlacement(media, "video");
|
|
8015
|
-
},
|
|
8016
|
-
buildVariant: ({ settings, postType, connectionId, body, media }) => ({
|
|
7923
|
+
buildVariant: ({ settings, connectionId, body, media }) => ({
|
|
8017
7924
|
platform: "linkedin",
|
|
8018
|
-
post_type: postType,
|
|
8019
7925
|
connection_id: connectionId,
|
|
8020
7926
|
body,
|
|
8021
7927
|
media: [...media],
|
|
@@ -8023,13 +7929,8 @@ var linkedInHandler = {
|
|
|
8023
7929
|
})
|
|
8024
7930
|
};
|
|
8025
7931
|
var facebookHandler = {
|
|
8026
|
-
|
|
8027
|
-
if (media.length === 0) return "text";
|
|
8028
|
-
return deriveSinglePlacement(media, "reel");
|
|
8029
|
-
},
|
|
8030
|
-
buildVariant: ({ settings, postType, connectionId, body, media }) => ({
|
|
7932
|
+
buildVariant: ({ settings, connectionId, body, media }) => ({
|
|
8031
7933
|
platform: "facebook_page",
|
|
8032
|
-
post_type: postType,
|
|
8033
7934
|
connection_id: connectionId,
|
|
8034
7935
|
body,
|
|
8035
7936
|
media: [...media],
|
|
@@ -8037,13 +7938,8 @@ var facebookHandler = {
|
|
|
8037
7938
|
})
|
|
8038
7939
|
};
|
|
8039
7940
|
var instagramHandler = {
|
|
8040
|
-
|
|
8041
|
-
if (media.length >= 2) return "carousel";
|
|
8042
|
-
return countKinds(media).videos === 1 ? "reel" : "single_image";
|
|
8043
|
-
},
|
|
8044
|
-
buildVariant: ({ settings, postType, connectionId, body, media }) => ({
|
|
7941
|
+
buildVariant: ({ settings, connectionId, body, media }) => ({
|
|
8045
7942
|
platform: "instagram",
|
|
8046
|
-
post_type: postType,
|
|
8047
7943
|
connection_id: connectionId,
|
|
8048
7944
|
body,
|
|
8049
7945
|
media: [...media],
|
|
@@ -8051,14 +7947,8 @@ var instagramHandler = {
|
|
|
8051
7947
|
})
|
|
8052
7948
|
};
|
|
8053
7949
|
var tiktokHandler = {
|
|
8054
|
-
|
|
8055
|
-
const { images, videos } = countKinds(media);
|
|
8056
|
-
if (videos >= 1) return "video";
|
|
8057
|
-
return images >= 2 ? "carousel" : "single_image";
|
|
8058
|
-
},
|
|
8059
|
-
buildVariant: ({ settings, postType, connectionId, body, media }) => ({
|
|
7950
|
+
buildVariant: ({ settings, connectionId, body, media }) => ({
|
|
8060
7951
|
platform: "tiktok",
|
|
8061
|
-
post_type: postType,
|
|
8062
7952
|
connection_id: connectionId,
|
|
8063
7953
|
body,
|
|
8064
7954
|
media: [...media],
|
|
@@ -8090,7 +7980,6 @@ function buildChannel(handler, platform, config, content, connections) {
|
|
|
8090
7980
|
const media = config.media ?? content.media ?? [];
|
|
8091
7981
|
return handler.buildVariant({
|
|
8092
7982
|
settings: config.settings,
|
|
8093
|
-
postType: config.postType ?? handler.derivePostType(media),
|
|
8094
7983
|
connectionId: resolveConnectionId(platform, config.connectionId, connections),
|
|
8095
7984
|
body: config.body ?? content.body,
|
|
8096
7985
|
media: media.map((item) => ({ media_id: item.id }))
|