@postrun/js 1.2.0 → 2.0.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.
@@ -37,11 +37,12 @@ var zErrorCode = z__namespace.enum([
37
37
  "account_not_available",
38
38
  "connection_reauth_required",
39
39
  "connection_not_pending",
40
- "connection_in_use",
41
40
  "not_implemented",
42
41
  "connection_discovery_failed",
43
42
  "media_processing",
44
43
  "not_publishable",
44
+ "invalid_connection",
45
+ "invalid_media",
45
46
  "profile_scope_invalid",
46
47
  "media_unprobeable",
47
48
  "media_too_large",
@@ -82,6 +83,7 @@ var zErrorCode = z__namespace.enum([
82
83
  "media_failed",
83
84
  "media_unsupported",
84
85
  "media_kind_mismatch",
86
+ "variant_unparseable",
85
87
  "publishing_unavailable",
86
88
  "x_duplicate_content",
87
89
  "x_not_authorized",
@@ -111,7 +113,8 @@ var zErrorCode = z__namespace.enum([
111
113
  "tiktok_not_authorized",
112
114
  "tiktok_rate_limited",
113
115
  "tiktok_publish_failed",
114
- "connection_platform_mismatch"
116
+ "connection_platform_mismatch",
117
+ "connection_removed"
115
118
  ]);
116
119
  var zProfilesListQuery = z__namespace.object({
117
120
  limit: z__namespace.int().gte(1).lte(100).optional().default(20),
@@ -1153,7 +1156,7 @@ var zPostsListResponse = z__namespace.object({
1153
1156
  variants: z__namespace.array(z__namespace.object({
1154
1157
  id: z__namespace.string(),
1155
1158
  object: z__namespace.literal("post_variant"),
1156
- connection_id: z__namespace.string(),
1159
+ connection_id: z__namespace.string().nullable(),
1157
1160
  platform: z__namespace.enum([
1158
1161
  "x",
1159
1162
  "linkedin",
@@ -1432,7 +1435,7 @@ var zPostsCreateResponse = z__namespace.object({
1432
1435
  variants: z__namespace.array(z__namespace.object({
1433
1436
  id: z__namespace.string(),
1434
1437
  object: z__namespace.literal("post_variant"),
1435
- connection_id: z__namespace.string(),
1438
+ connection_id: z__namespace.string().nullable(),
1436
1439
  platform: z__namespace.enum([
1437
1440
  "x",
1438
1441
  "linkedin",
@@ -1514,7 +1517,7 @@ var zPostsGetResponse = z__namespace.object({
1514
1517
  variants: z__namespace.array(z__namespace.object({
1515
1518
  id: z__namespace.string(),
1516
1519
  object: z__namespace.literal("post_variant"),
1517
- connection_id: z__namespace.string(),
1520
+ connection_id: z__namespace.string().nullable(),
1518
1521
  platform: z__namespace.enum([
1519
1522
  "x",
1520
1523
  "linkedin",
@@ -1790,7 +1793,7 @@ var zPostsUpdateResponse = z__namespace.object({
1790
1793
  variants: z__namespace.array(z__namespace.object({
1791
1794
  id: z__namespace.string(),
1792
1795
  object: z__namespace.literal("post_variant"),
1793
- connection_id: z__namespace.string(),
1796
+ connection_id: z__namespace.string().nullable(),
1794
1797
  platform: z__namespace.enum([
1795
1798
  "x",
1796
1799
  "linkedin",
@@ -1837,6 +1840,301 @@ var zPostsUpdateResponse = z__namespace.object({
1837
1840
  dry_run: z__namespace.boolean(),
1838
1841
  executed: z__namespace.boolean()
1839
1842
  });
1843
+ var zPostsValidateBody = z__namespace.object({
1844
+ profile_id: z__namespace.string(),
1845
+ variants: z__namespace.array(z__namespace.union([
1846
+ z__namespace.object({
1847
+ platform: z__namespace.literal("x"),
1848
+ post_type: z__namespace.enum([
1849
+ "text",
1850
+ "single_image",
1851
+ "multi_image",
1852
+ "video"
1853
+ ]),
1854
+ connection_id: z__namespace.string(),
1855
+ body: z__namespace.string().optional(),
1856
+ media: z__namespace.array(z__namespace.object({
1857
+ media_id: z__namespace.string(),
1858
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
1859
+ alt_text_override: z__namespace.string().nullish()
1860
+ })).optional().default([]),
1861
+ settings: z__namespace.object({
1862
+ reply_settings: z__namespace.enum([
1863
+ "everyone",
1864
+ "following",
1865
+ "mentionedUsers",
1866
+ "subscribers",
1867
+ "verified"
1868
+ ]).optional(),
1869
+ quote_tweet_id: z__namespace.string().regex(/^[0-9]{1,19}$/).optional(),
1870
+ poll: z__namespace.object({
1871
+ options: z__namespace.array(z__namespace.string().min(1).max(25)).min(2).max(4),
1872
+ duration_minutes: z__namespace.int().gte(5).lte(10080),
1873
+ reply_settings: z__namespace.enum([
1874
+ "following",
1875
+ "mentionedUsers",
1876
+ "subscribers",
1877
+ "verified"
1878
+ ]).optional()
1879
+ }).optional(),
1880
+ reply: z__namespace.object({
1881
+ in_reply_to_tweet_id: z__namespace.string().regex(/^[0-9]{1,19}$/),
1882
+ exclude_reply_user_ids: z__namespace.array(z__namespace.string().regex(/^[0-9]{1,19}$/)).optional(),
1883
+ auto_populate_reply_metadata: z__namespace.boolean().optional()
1884
+ }).optional(),
1885
+ community_id: z__namespace.string().regex(/^[0-9]{1,19}$/).optional(),
1886
+ for_super_followers_only: z__namespace.boolean().optional(),
1887
+ geo: z__namespace.object({
1888
+ place_id: z__namespace.string()
1889
+ }).optional(),
1890
+ card_uri: z__namespace.string().optional(),
1891
+ media_tagged_user_ids: z__namespace.array(z__namespace.string().regex(/^[0-9]{1,19}$/)).max(10).optional()
1892
+ }).optional().default({})
1893
+ }),
1894
+ z__namespace.object({
1895
+ platform: z__namespace.literal("linkedin"),
1896
+ post_type: z__namespace.enum([
1897
+ "text",
1898
+ "single_image",
1899
+ "multi_image",
1900
+ "video"
1901
+ ]),
1902
+ connection_id: z__namespace.string(),
1903
+ body: z__namespace.string().optional(),
1904
+ media: z__namespace.array(z__namespace.object({
1905
+ media_id: z__namespace.string(),
1906
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
1907
+ alt_text_override: z__namespace.string().nullish()
1908
+ })).optional().default([]),
1909
+ settings: z__namespace.object({
1910
+ visibility: z__namespace.enum(["PUBLIC", "CONNECTIONS"]),
1911
+ content_kind: z__namespace.enum([
1912
+ "text",
1913
+ "single_image",
1914
+ "video",
1915
+ "multi_image",
1916
+ "document",
1917
+ "article",
1918
+ "poll"
1919
+ ]),
1920
+ article: z__namespace.object({
1921
+ source: z__namespace.url(),
1922
+ title: z__namespace.string().max(400).optional(),
1923
+ description: z__namespace.string().max(4086).optional(),
1924
+ thumbnail_media_id: z__namespace.string().optional()
1925
+ }).optional(),
1926
+ poll: z__namespace.object({
1927
+ question: z__namespace.string().min(1).max(140),
1928
+ options: z__namespace.array(z__namespace.string().min(1).max(30)).min(2).max(4),
1929
+ duration: z__namespace.enum([
1930
+ "ONE_DAY",
1931
+ "THREE_DAYS",
1932
+ "SEVEN_DAYS",
1933
+ "FOURTEEN_DAYS"
1934
+ ])
1935
+ }).optional(),
1936
+ document: z__namespace.object({
1937
+ title: z__namespace.string().min(1).max(400)
1938
+ }).optional(),
1939
+ disable_reshare: z__namespace.boolean().optional(),
1940
+ mentions: z__namespace.array(z__namespace.object({
1941
+ type: z__namespace.enum(["person", "organization"]),
1942
+ name: z__namespace.string().min(1),
1943
+ urn: z__namespace.string().regex(/^urn:li:(person|organization):/)
1944
+ })).optional()
1945
+ })
1946
+ }),
1947
+ z__namespace.object({
1948
+ platform: z__namespace.literal("instagram"),
1949
+ post_type: z__namespace.enum([
1950
+ "single_image",
1951
+ "carousel",
1952
+ "reel"
1953
+ ]),
1954
+ connection_id: z__namespace.string(),
1955
+ body: z__namespace.string().optional(),
1956
+ media: z__namespace.array(z__namespace.object({
1957
+ media_id: z__namespace.string(),
1958
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
1959
+ alt_text_override: z__namespace.string().nullish()
1960
+ })).optional().default([]),
1961
+ settings: z__namespace.object({
1962
+ media_type: z__namespace.enum([
1963
+ "IMAGE",
1964
+ "CAROUSEL",
1965
+ "REELS"
1966
+ ]).optional(),
1967
+ location_id: z__namespace.string().optional(),
1968
+ user_tags: z__namespace.array(z__namespace.object({
1969
+ username: z__namespace.string().min(1),
1970
+ x: z__namespace.number().gte(0).lte(1),
1971
+ y: z__namespace.number().gte(0).lte(1)
1972
+ })).optional(),
1973
+ collaborators: z__namespace.array(z__namespace.string().min(1)).max(3).optional(),
1974
+ share_to_feed: z__namespace.boolean().optional(),
1975
+ thumb_offset: z__namespace.int().gte(0).lte(9007199254740991).optional(),
1976
+ cover_url: z__namespace.url().optional(),
1977
+ audio_name: z__namespace.string().optional()
1978
+ })
1979
+ }),
1980
+ z__namespace.object({
1981
+ platform: z__namespace.literal("facebook_page"),
1982
+ post_type: z__namespace.enum([
1983
+ "text",
1984
+ "single_image",
1985
+ "multi_image",
1986
+ "reel"
1987
+ ]),
1988
+ connection_id: z__namespace.string(),
1989
+ body: z__namespace.string().optional(),
1990
+ media: z__namespace.array(z__namespace.object({
1991
+ media_id: z__namespace.string(),
1992
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
1993
+ alt_text_override: z__namespace.string().nullish()
1994
+ })).optional().default([]),
1995
+ settings: z__namespace.object({
1996
+ link: z__namespace.url().optional()
1997
+ }).optional().default({})
1998
+ }),
1999
+ z__namespace.object({
2000
+ platform: z__namespace.literal("tiktok"),
2001
+ post_type: z__namespace.enum([
2002
+ "video",
2003
+ "single_image",
2004
+ "carousel"
2005
+ ]),
2006
+ connection_id: z__namespace.string(),
2007
+ body: z__namespace.string().optional(),
2008
+ media: z__namespace.array(z__namespace.object({
2009
+ media_id: z__namespace.string(),
2010
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
2011
+ alt_text_override: z__namespace.string().nullish()
2012
+ })).optional().default([]),
2013
+ settings: z__namespace.object({
2014
+ privacy_level: z__namespace.enum([
2015
+ "PUBLIC_TO_EVERYONE",
2016
+ "MUTUAL_FOLLOW_FRIENDS",
2017
+ "FOLLOWER_OF_CREATOR",
2018
+ "SELF_ONLY"
2019
+ ]).optional(),
2020
+ disable_comment: z__namespace.boolean().optional(),
2021
+ disable_duet: z__namespace.boolean().optional(),
2022
+ disable_stitch: z__namespace.boolean().optional(),
2023
+ video_cover_timestamp_ms: z__namespace.int().gte(0).lte(9007199254740991).optional(),
2024
+ photo_cover_index: z__namespace.int().gte(0).lte(9007199254740991).optional(),
2025
+ auto_add_music: z__namespace.boolean().optional(),
2026
+ brand_content_toggle: z__namespace.boolean().optional(),
2027
+ brand_organic_toggle: z__namespace.boolean().optional(),
2028
+ is_aigc: z__namespace.boolean().optional()
2029
+ }).optional().default({})
2030
+ })
2031
+ ])).min(1)
2032
+ });
2033
+ var zPostsValidateResponse = z__namespace.object({
2034
+ object: z__namespace.literal("validation"),
2035
+ publishable: z__namespace.boolean(),
2036
+ issues: z__namespace.array(z__namespace.object({
2037
+ code: z__namespace.enum([
2038
+ "unauthorized",
2039
+ "forbidden",
2040
+ "not_found",
2041
+ "conflict",
2042
+ "validation_failed",
2043
+ "rate_limited",
2044
+ "internal_error",
2045
+ "idempotency_key_invalid",
2046
+ "idempotency_key_reused",
2047
+ "idempotency_request_in_progress",
2048
+ "account_not_available",
2049
+ "connection_reauth_required",
2050
+ "connection_not_pending",
2051
+ "not_implemented",
2052
+ "connection_discovery_failed",
2053
+ "media_processing",
2054
+ "not_publishable",
2055
+ "invalid_connection",
2056
+ "invalid_media",
2057
+ "profile_scope_invalid",
2058
+ "media_unprobeable",
2059
+ "media_too_large",
2060
+ "media_aspect_ratio_unsupported",
2061
+ "media_resolution_too_low",
2062
+ "media_gif_unsupported",
2063
+ "media_format_recompressed",
2064
+ "media_resolution_downscaled",
2065
+ "video_container_unsupported",
2066
+ "video_codec_unsupported",
2067
+ "video_audio_codec_unsupported",
2068
+ "video_too_large",
2069
+ "video_too_small",
2070
+ "video_dimensions_unsupported",
2071
+ "video_dimensions_too_large",
2072
+ "video_fps_unsupported",
2073
+ "video_fps_too_low",
2074
+ "video_aspect_unsupported",
2075
+ "video_duration_too_short",
2076
+ "video_duration_exceeds_max",
2077
+ "video_transform_failed",
2078
+ "media_fetch_failed",
2079
+ "document_format_unsupported",
2080
+ "document_too_large",
2081
+ "document_too_many_pages",
2082
+ "media_format_indeterminate",
2083
+ "media_count_invalid",
2084
+ "body_too_long",
2085
+ "content_missing",
2086
+ "content_conflict",
2087
+ "content_incomplete",
2088
+ "content_kind_mismatch",
2089
+ "media_type_mismatch",
2090
+ "tag_limit_exceeded",
2091
+ "reel_field_on_non_reel",
2092
+ "field_placement_invalid",
2093
+ "media_not_ready",
2094
+ "media_failed",
2095
+ "media_unsupported",
2096
+ "media_kind_mismatch",
2097
+ "variant_unparseable",
2098
+ "publishing_unavailable",
2099
+ "x_duplicate_content",
2100
+ "x_not_authorized",
2101
+ "x_rate_limited",
2102
+ "x_publish_failed",
2103
+ "x_media_upload_failed",
2104
+ "linkedin_duplicate_content",
2105
+ "linkedin_auth_expired",
2106
+ "linkedin_permission_denied",
2107
+ "linkedin_media_processing",
2108
+ "linkedin_media_upload_failed",
2109
+ "linkedin_publish_failed",
2110
+ "instagram_media_processing",
2111
+ "instagram_container_expired",
2112
+ "instagram_container_failed",
2113
+ "instagram_rate_limited",
2114
+ "instagram_not_authorized",
2115
+ "instagram_publish_failed",
2116
+ "facebook_reel_processing",
2117
+ "facebook_reel_failed",
2118
+ "facebook_rate_limited",
2119
+ "facebook_not_authorized",
2120
+ "facebook_publish_failed",
2121
+ "tiktok_privacy_not_allowed",
2122
+ "tiktok_duration_exceeds_max",
2123
+ "tiktok_media_processing",
2124
+ "tiktok_not_authorized",
2125
+ "tiktok_rate_limited",
2126
+ "tiktok_publish_failed",
2127
+ "connection_platform_mismatch",
2128
+ "connection_removed"
2129
+ ]),
2130
+ message: z__namespace.string(),
2131
+ hint: z__namespace.string().optional(),
2132
+ allowed: z__namespace.array(z__namespace.string()).optional(),
2133
+ got: z__namespace.string().optional(),
2134
+ variant_index: z__namespace.int().gte(-9007199254740991).lte(9007199254740991),
2135
+ path: z__namespace.array(z__namespace.union([z__namespace.string(), z__namespace.number()]))
2136
+ }))
2137
+ });
1840
2138
  var zMetaAccountPath = z__namespace.object({
1841
2139
  connection_id: z__namespace.string()
1842
2140
  });
@@ -3718,6 +4016,8 @@ exports.zPostsListResponse = zPostsListResponse;
3718
4016
  exports.zPostsUpdateBody = zPostsUpdateBody;
3719
4017
  exports.zPostsUpdatePath = zPostsUpdatePath;
3720
4018
  exports.zPostsUpdateResponse = zPostsUpdateResponse;
4019
+ exports.zPostsValidateBody = zPostsValidateBody;
4020
+ exports.zPostsValidateResponse = zPostsValidateResponse;
3721
4021
  exports.zProfilesCreateBody = zProfilesCreateBody;
3722
4022
  exports.zProfilesCreateResponse = zProfilesCreateResponse;
3723
4023
  exports.zProfilesDeletePath = zProfilesDeletePath;