@postrun/js 1.2.0 → 1.3.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.
@@ -42,6 +42,8 @@ var zErrorCode = z__namespace.enum([
42
42
  "connection_discovery_failed",
43
43
  "media_processing",
44
44
  "not_publishable",
45
+ "invalid_connection",
46
+ "invalid_media",
45
47
  "profile_scope_invalid",
46
48
  "media_unprobeable",
47
49
  "media_too_large",
@@ -1837,6 +1839,300 @@ var zPostsUpdateResponse = z__namespace.object({
1837
1839
  dry_run: z__namespace.boolean(),
1838
1840
  executed: z__namespace.boolean()
1839
1841
  });
1842
+ var zPostsValidateBody = z__namespace.object({
1843
+ profile_id: z__namespace.string(),
1844
+ variants: z__namespace.array(z__namespace.union([
1845
+ z__namespace.object({
1846
+ platform: z__namespace.literal("x"),
1847
+ post_type: z__namespace.enum([
1848
+ "text",
1849
+ "single_image",
1850
+ "multi_image",
1851
+ "video"
1852
+ ]),
1853
+ connection_id: z__namespace.string(),
1854
+ body: z__namespace.string().optional(),
1855
+ media: z__namespace.array(z__namespace.object({
1856
+ media_id: z__namespace.string(),
1857
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
1858
+ alt_text_override: z__namespace.string().nullish()
1859
+ })).optional().default([]),
1860
+ settings: z__namespace.object({
1861
+ reply_settings: z__namespace.enum([
1862
+ "everyone",
1863
+ "following",
1864
+ "mentionedUsers",
1865
+ "subscribers",
1866
+ "verified"
1867
+ ]).optional(),
1868
+ quote_tweet_id: z__namespace.string().regex(/^[0-9]{1,19}$/).optional(),
1869
+ poll: z__namespace.object({
1870
+ options: z__namespace.array(z__namespace.string().min(1).max(25)).min(2).max(4),
1871
+ duration_minutes: z__namespace.int().gte(5).lte(10080),
1872
+ reply_settings: z__namespace.enum([
1873
+ "following",
1874
+ "mentionedUsers",
1875
+ "subscribers",
1876
+ "verified"
1877
+ ]).optional()
1878
+ }).optional(),
1879
+ reply: z__namespace.object({
1880
+ in_reply_to_tweet_id: z__namespace.string().regex(/^[0-9]{1,19}$/),
1881
+ exclude_reply_user_ids: z__namespace.array(z__namespace.string().regex(/^[0-9]{1,19}$/)).optional(),
1882
+ auto_populate_reply_metadata: z__namespace.boolean().optional()
1883
+ }).optional(),
1884
+ community_id: z__namespace.string().regex(/^[0-9]{1,19}$/).optional(),
1885
+ for_super_followers_only: z__namespace.boolean().optional(),
1886
+ geo: z__namespace.object({
1887
+ place_id: z__namespace.string()
1888
+ }).optional(),
1889
+ card_uri: z__namespace.string().optional(),
1890
+ media_tagged_user_ids: z__namespace.array(z__namespace.string().regex(/^[0-9]{1,19}$/)).max(10).optional()
1891
+ }).optional().default({})
1892
+ }),
1893
+ z__namespace.object({
1894
+ platform: z__namespace.literal("linkedin"),
1895
+ post_type: z__namespace.enum([
1896
+ "text",
1897
+ "single_image",
1898
+ "multi_image",
1899
+ "video"
1900
+ ]),
1901
+ connection_id: z__namespace.string(),
1902
+ body: z__namespace.string().optional(),
1903
+ media: z__namespace.array(z__namespace.object({
1904
+ media_id: z__namespace.string(),
1905
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
1906
+ alt_text_override: z__namespace.string().nullish()
1907
+ })).optional().default([]),
1908
+ settings: z__namespace.object({
1909
+ visibility: z__namespace.enum(["PUBLIC", "CONNECTIONS"]),
1910
+ content_kind: z__namespace.enum([
1911
+ "text",
1912
+ "single_image",
1913
+ "video",
1914
+ "multi_image",
1915
+ "document",
1916
+ "article",
1917
+ "poll"
1918
+ ]),
1919
+ article: z__namespace.object({
1920
+ source: z__namespace.url(),
1921
+ title: z__namespace.string().max(400).optional(),
1922
+ description: z__namespace.string().max(4086).optional(),
1923
+ thumbnail_media_id: z__namespace.string().optional()
1924
+ }).optional(),
1925
+ poll: z__namespace.object({
1926
+ question: z__namespace.string().min(1).max(140),
1927
+ options: z__namespace.array(z__namespace.string().min(1).max(30)).min(2).max(4),
1928
+ duration: z__namespace.enum([
1929
+ "ONE_DAY",
1930
+ "THREE_DAYS",
1931
+ "SEVEN_DAYS",
1932
+ "FOURTEEN_DAYS"
1933
+ ])
1934
+ }).optional(),
1935
+ document: z__namespace.object({
1936
+ title: z__namespace.string().min(1).max(400)
1937
+ }).optional(),
1938
+ disable_reshare: z__namespace.boolean().optional(),
1939
+ mentions: z__namespace.array(z__namespace.object({
1940
+ type: z__namespace.enum(["person", "organization"]),
1941
+ name: z__namespace.string().min(1),
1942
+ urn: z__namespace.string().regex(/^urn:li:(person|organization):/)
1943
+ })).optional()
1944
+ })
1945
+ }),
1946
+ z__namespace.object({
1947
+ platform: z__namespace.literal("instagram"),
1948
+ post_type: z__namespace.enum([
1949
+ "single_image",
1950
+ "carousel",
1951
+ "reel"
1952
+ ]),
1953
+ connection_id: z__namespace.string(),
1954
+ body: z__namespace.string().optional(),
1955
+ media: z__namespace.array(z__namespace.object({
1956
+ media_id: z__namespace.string(),
1957
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
1958
+ alt_text_override: z__namespace.string().nullish()
1959
+ })).optional().default([]),
1960
+ settings: z__namespace.object({
1961
+ media_type: z__namespace.enum([
1962
+ "IMAGE",
1963
+ "CAROUSEL",
1964
+ "REELS"
1965
+ ]).optional(),
1966
+ location_id: z__namespace.string().optional(),
1967
+ user_tags: z__namespace.array(z__namespace.object({
1968
+ username: z__namespace.string().min(1),
1969
+ x: z__namespace.number().gte(0).lte(1),
1970
+ y: z__namespace.number().gte(0).lte(1)
1971
+ })).optional(),
1972
+ collaborators: z__namespace.array(z__namespace.string().min(1)).max(3).optional(),
1973
+ share_to_feed: z__namespace.boolean().optional(),
1974
+ thumb_offset: z__namespace.int().gte(0).lte(9007199254740991).optional(),
1975
+ cover_url: z__namespace.url().optional(),
1976
+ audio_name: z__namespace.string().optional()
1977
+ })
1978
+ }),
1979
+ z__namespace.object({
1980
+ platform: z__namespace.literal("facebook_page"),
1981
+ post_type: z__namespace.enum([
1982
+ "text",
1983
+ "single_image",
1984
+ "multi_image",
1985
+ "reel"
1986
+ ]),
1987
+ connection_id: z__namespace.string(),
1988
+ body: z__namespace.string().optional(),
1989
+ media: z__namespace.array(z__namespace.object({
1990
+ media_id: z__namespace.string(),
1991
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
1992
+ alt_text_override: z__namespace.string().nullish()
1993
+ })).optional().default([]),
1994
+ settings: z__namespace.object({
1995
+ link: z__namespace.url().optional()
1996
+ }).optional().default({})
1997
+ }),
1998
+ z__namespace.object({
1999
+ platform: z__namespace.literal("tiktok"),
2000
+ post_type: z__namespace.enum([
2001
+ "video",
2002
+ "single_image",
2003
+ "carousel"
2004
+ ]),
2005
+ connection_id: z__namespace.string(),
2006
+ body: z__namespace.string().optional(),
2007
+ media: z__namespace.array(z__namespace.object({
2008
+ media_id: z__namespace.string(),
2009
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
2010
+ alt_text_override: z__namespace.string().nullish()
2011
+ })).optional().default([]),
2012
+ settings: z__namespace.object({
2013
+ privacy_level: z__namespace.enum([
2014
+ "PUBLIC_TO_EVERYONE",
2015
+ "MUTUAL_FOLLOW_FRIENDS",
2016
+ "FOLLOWER_OF_CREATOR",
2017
+ "SELF_ONLY"
2018
+ ]).optional(),
2019
+ disable_comment: z__namespace.boolean().optional(),
2020
+ disable_duet: z__namespace.boolean().optional(),
2021
+ disable_stitch: z__namespace.boolean().optional(),
2022
+ video_cover_timestamp_ms: z__namespace.int().gte(0).lte(9007199254740991).optional(),
2023
+ photo_cover_index: z__namespace.int().gte(0).lte(9007199254740991).optional(),
2024
+ auto_add_music: z__namespace.boolean().optional(),
2025
+ brand_content_toggle: z__namespace.boolean().optional(),
2026
+ brand_organic_toggle: z__namespace.boolean().optional(),
2027
+ is_aigc: z__namespace.boolean().optional()
2028
+ }).optional().default({})
2029
+ })
2030
+ ])).min(1)
2031
+ });
2032
+ var zPostsValidateResponse = z__namespace.object({
2033
+ object: z__namespace.literal("validation"),
2034
+ publishable: z__namespace.boolean(),
2035
+ issues: z__namespace.array(z__namespace.object({
2036
+ code: z__namespace.enum([
2037
+ "unauthorized",
2038
+ "forbidden",
2039
+ "not_found",
2040
+ "conflict",
2041
+ "validation_failed",
2042
+ "rate_limited",
2043
+ "internal_error",
2044
+ "idempotency_key_invalid",
2045
+ "idempotency_key_reused",
2046
+ "idempotency_request_in_progress",
2047
+ "account_not_available",
2048
+ "connection_reauth_required",
2049
+ "connection_not_pending",
2050
+ "connection_in_use",
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
+ "publishing_unavailable",
2098
+ "x_duplicate_content",
2099
+ "x_not_authorized",
2100
+ "x_rate_limited",
2101
+ "x_publish_failed",
2102
+ "x_media_upload_failed",
2103
+ "linkedin_duplicate_content",
2104
+ "linkedin_auth_expired",
2105
+ "linkedin_permission_denied",
2106
+ "linkedin_media_processing",
2107
+ "linkedin_media_upload_failed",
2108
+ "linkedin_publish_failed",
2109
+ "instagram_media_processing",
2110
+ "instagram_container_expired",
2111
+ "instagram_container_failed",
2112
+ "instagram_rate_limited",
2113
+ "instagram_not_authorized",
2114
+ "instagram_publish_failed",
2115
+ "facebook_reel_processing",
2116
+ "facebook_reel_failed",
2117
+ "facebook_rate_limited",
2118
+ "facebook_not_authorized",
2119
+ "facebook_publish_failed",
2120
+ "tiktok_privacy_not_allowed",
2121
+ "tiktok_duration_exceeds_max",
2122
+ "tiktok_media_processing",
2123
+ "tiktok_not_authorized",
2124
+ "tiktok_rate_limited",
2125
+ "tiktok_publish_failed",
2126
+ "connection_platform_mismatch"
2127
+ ]),
2128
+ message: z__namespace.string(),
2129
+ hint: z__namespace.string().optional(),
2130
+ allowed: z__namespace.array(z__namespace.string()).optional(),
2131
+ got: z__namespace.string().optional(),
2132
+ variant_index: z__namespace.int().gte(-9007199254740991).lte(9007199254740991),
2133
+ path: z__namespace.array(z__namespace.union([z__namespace.string(), z__namespace.number()]))
2134
+ }))
2135
+ });
1840
2136
  var zMetaAccountPath = z__namespace.object({
1841
2137
  connection_id: z__namespace.string()
1842
2138
  });
@@ -3718,6 +4014,8 @@ exports.zPostsListResponse = zPostsListResponse;
3718
4014
  exports.zPostsUpdateBody = zPostsUpdateBody;
3719
4015
  exports.zPostsUpdatePath = zPostsUpdatePath;
3720
4016
  exports.zPostsUpdateResponse = zPostsUpdateResponse;
4017
+ exports.zPostsValidateBody = zPostsValidateBody;
4018
+ exports.zPostsValidateResponse = zPostsValidateResponse;
3721
4019
  exports.zProfilesCreateBody = zProfilesCreateBody;
3722
4020
  exports.zProfilesCreateResponse = zProfilesCreateResponse;
3723
4021
  exports.zProfilesDeletePath = zProfilesDeletePath;