@getlatedev/node 0.1.7 → 0.1.9

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/index.d.mts CHANGED
@@ -457,6 +457,7 @@ type ErrorResponse = {
457
457
  * - Multiple videos in the same post are not supported.
458
458
  * - Stories require media (single image or video); text captions are not displayed with stories.
459
459
  * - Stories are ephemeral (disappear after 24 hours).
460
+ * - Use pageId to post to multiple pages from the same account connection.
460
461
  *
461
462
  */
462
463
  type FacebookPlatformData = {
@@ -469,7 +470,10 @@ type FacebookPlatformData = {
469
470
  */
470
471
  firstComment?: string;
471
472
  /**
472
- * Target Facebook Page ID. If omitted, uses the selected/default page on the connection.
473
+ * Target Facebook Page ID for multi-page posting.
474
+ * If omitted, uses the selected/default page on the connection.
475
+ * Use GET /api/v1/accounts/{id}/facebook-page to list available pages.
476
+ *
473
477
  */
474
478
  pageId?: string;
475
479
  };
@@ -492,9 +496,18 @@ type aggregation = 'daily' | 'weekly' | 'monthly';
492
496
  * - Images must be publicly accessible URLs
493
497
  * - Call-to-action buttons drive user engagement
494
498
  * - Posts appear on your Google Business Profile and in Google Search/Maps
499
+ * - Use locationId to post to multiple locations from the same account connection
495
500
  *
496
501
  */
497
502
  type GoogleBusinessPlatformData = {
503
+ /**
504
+ * Target Google Business location ID for multi-location posting.
505
+ * Format: "locations/123456789"
506
+ * If omitted, uses the selected/default location on the connection.
507
+ * Use GET /api/v1/accounts/{id}/gmb-locations to list available locations.
508
+ *
509
+ */
510
+ locationId?: string;
498
511
  /**
499
512
  * Optional call-to-action button displayed on the post
500
513
  */
@@ -720,9 +733,18 @@ type aggregation3 = 'TOTAL';
720
733
  * - Single PDF document posts are supported (max 100MB, ~300 pages). Documents cannot be mixed with other media.
721
734
  * - Post ID is returned in the x-restli-id response header.
722
735
  * - Link previews are automatically generated for URLs when no media is attached (can be disabled with disableLinkPreview).
736
+ * - Use organizationUrn to post to multiple organizations from the same account connection.
723
737
  *
724
738
  */
725
739
  type LinkedInPlatformData = {
740
+ /**
741
+ * Target LinkedIn Organization URN for multi-organization posting.
742
+ * Format: "urn:li:organization:123456789"
743
+ * If omitted, uses the selected/default organization on the connection.
744
+ * Use GET /api/v1/accounts/{id}/linkedin-organizations to list available organizations.
745
+ *
746
+ */
747
+ organizationUrn?: string;
726
748
  /**
727
749
  * Optional first comment to add after the post is created
728
750
  */
@@ -891,7 +913,60 @@ type PlatformTarget = {
891
913
  * Timestamp when the post was published to this platform
892
914
  */
893
915
  publishedAt?: string;
916
+ /**
917
+ * Human-readable error message when status is 'failed'.
918
+ * Contains platform-specific error details explaining why the publish failed.
919
+ * Examples:
920
+ * - "Instagram access token has expired. Please reconnect your account."
921
+ * - "Post text exceeds the 500 character limit for Threads."
922
+ * - "You do not have enough karma to post in this subreddit."
923
+ * - "Video is too long for Reels. Facebook Reels must be 90 seconds or less."
924
+ *
925
+ */
926
+ errorMessage?: string;
927
+ /**
928
+ * Error category for programmatic handling:
929
+ * - auth_expired: Token expired or revoked, account needs reconnection
930
+ * - user_content: Content doesn't meet platform requirements (too long, wrong format, etc.)
931
+ * - user_abuse: Rate limits, spam detection, excessive posting
932
+ * - account_issue: Account configuration problems (missing board, inactive account)
933
+ * - platform_rejected: Platform rules violated (banned, suspended, policy violation)
934
+ * - platform_error: Platform-side issues (5xx errors, maintenance)
935
+ * - system_error: Late infrastructure issues (timeouts, network errors)
936
+ * - unknown: Unclassified error
937
+ *
938
+ */
939
+ errorCategory?: 'auth_expired' | 'user_content' | 'user_abuse' | 'account_issue' | 'platform_rejected' | 'platform_error' | 'system_error' | 'unknown';
940
+ /**
941
+ * Who/what caused the error:
942
+ * - user: User action required (fix content, reconnect account)
943
+ * - platform: Platform-side issue (outage, API change)
944
+ * - system: Late system issue (rare)
945
+ *
946
+ */
947
+ errorSource?: 'user' | 'platform' | 'system';
894
948
  };
949
+ /**
950
+ * Error category for programmatic handling:
951
+ * - auth_expired: Token expired or revoked, account needs reconnection
952
+ * - user_content: Content doesn't meet platform requirements (too long, wrong format, etc.)
953
+ * - user_abuse: Rate limits, spam detection, excessive posting
954
+ * - account_issue: Account configuration problems (missing board, inactive account)
955
+ * - platform_rejected: Platform rules violated (banned, suspended, policy violation)
956
+ * - platform_error: Platform-side issues (5xx errors, maintenance)
957
+ * - system_error: Late infrastructure issues (timeouts, network errors)
958
+ * - unknown: Unclassified error
959
+ *
960
+ */
961
+ type errorCategory = 'auth_expired' | 'user_content' | 'user_abuse' | 'account_issue' | 'platform_rejected' | 'platform_error' | 'system_error' | 'unknown';
962
+ /**
963
+ * Who/what caused the error:
964
+ * - user: User action required (fix content, reconnect account)
965
+ * - platform: Platform-side issue (outage, API change)
966
+ * - system: Late system issue (rare)
967
+ *
968
+ */
969
+ type errorSource = 'user' | 'platform' | 'system';
895
970
  type Post = {
896
971
  _id?: string;
897
972
  userId?: (string | User);
@@ -1830,6 +1905,15 @@ type YouTubePlatformData = {
1830
1905
  *
1831
1906
  */
1832
1907
  containsSyntheticMedia?: boolean;
1908
+ /**
1909
+ * YouTube video category ID. Defaults to '22' (People & Blogs).
1910
+ * Common categories: 1 (Film & Animation), 2 (Autos & Vehicles), 10 (Music),
1911
+ * 15 (Pets & Animals), 17 (Sports), 20 (Gaming), 22 (People & Blogs),
1912
+ * 23 (Comedy), 24 (Entertainment), 25 (News & Politics), 26 (Howto & Style),
1913
+ * 27 (Education), 28 (Science & Technology).
1914
+ *
1915
+ */
1916
+ categoryId?: string;
1833
1917
  };
1834
1918
  type YouTubeScopeMissingResponse = {
1835
1919
  success?: boolean;
@@ -2067,6 +2151,14 @@ type GetAnalyticsData = {
2067
2151
  * Sort by date or engagement
2068
2152
  */
2069
2153
  sortBy?: 'date' | 'engagement';
2154
+ /**
2155
+ * Filter by post source:
2156
+ * - `late` - Only posts scheduled/published via Late API
2157
+ * - `external` - Only posts synced from the platform (not posted via Late)
2158
+ * - `all` - All posts (default)
2159
+ *
2160
+ */
2161
+ source?: 'all' | 'late' | 'external';
2070
2162
  /**
2071
2163
  * Inclusive upper bound
2072
2164
  */
@@ -2280,6 +2372,11 @@ type ListPostsError = ({
2280
2372
  type CreatePostData = {
2281
2373
  body: {
2282
2374
  title?: string;
2375
+ /**
2376
+ * Post caption/text content. Optional when media is attached (images, videos, etc.).
2377
+ * Required for text-only posts. Can also be omitted if all platforms have customContent set.
2378
+ *
2379
+ */
2283
2380
  content?: string;
2284
2381
  mediaItems?: Array<{
2285
2382
  type?: 'image' | 'video' | 'gif' | 'document';
@@ -4397,7 +4494,7 @@ type ListInboxConversationsData = {
4397
4494
  /**
4398
4495
  * Filter by platform
4399
4496
  */
4400
- platform?: 'facebook' | 'instagram' | 'bluesky' | 'reddit' | 'telegram';
4497
+ platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram';
4401
4498
  /**
4402
4499
  * Filter by profile ID
4403
4500
  */
@@ -4462,6 +4559,9 @@ type ListInboxConversationsError = ({
4462
4559
  } | unknown);
4463
4560
  type GetInboxConversationData = {
4464
4561
  path: {
4562
+ /**
4563
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4564
+ */
4465
4565
  conversationId: string;
4466
4566
  };
4467
4567
  query: {
@@ -4501,6 +4601,9 @@ type UpdateInboxConversationData = {
4501
4601
  status: 'active' | 'archived';
4502
4602
  };
4503
4603
  path: {
4604
+ /**
4605
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4606
+ */
4504
4607
  conversationId: string;
4505
4608
  };
4506
4609
  };
@@ -4519,6 +4622,9 @@ type UpdateInboxConversationError = ({
4519
4622
  } | unknown);
4520
4623
  type GetInboxConversationMessagesData = {
4521
4624
  path: {
4625
+ /**
4626
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4627
+ */
4522
4628
  conversationId: string;
4523
4629
  };
4524
4630
  query: {
@@ -4577,6 +4683,9 @@ type SendInboxMessageData = {
4577
4683
  message: string;
4578
4684
  };
4579
4685
  path: {
4686
+ /**
4687
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4688
+ */
4580
4689
  conversationId: string;
4581
4690
  };
4582
4691
  };
@@ -4622,7 +4731,7 @@ type ListInboxCommentsData = {
4622
4731
  /**
4623
4732
  * Filter by platform
4624
4733
  */
4625
- platform?: 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'reddit' | 'bluesky' | 'tiktok';
4734
+ platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'threads' | 'youtube' | 'linkedin' | 'reddit' | 'tiktok';
4626
4735
  /**
4627
4736
  * Filter by profile ID
4628
4737
  */
@@ -5102,4 +5211,4 @@ type DeleteInboxReviewReplyError = ({
5102
5211
  error?: string;
5103
5212
  } | unknown);
5104
5213
 
5105
- export { type AccountGetResponse, type AccountWithFollowerStats, type AccountsListResponse, type AnalyticsListResponse, type AnalyticsOverview, type AnalyticsSinglePostResponse, type ApiKey, type BulkUploadPostsData, type BulkUploadPostsError, type BulkUploadPostsResponse, type CaptionResponse, type CheckInstagramHashtagsData, type CheckInstagramHashtagsError, type CheckInstagramHashtagsResponse, type ClientOptions, type CompleteTelegramConnectData, type CompleteTelegramConnectError, type CompleteTelegramConnectResponse, type ConnectBlueskyCredentialsData, type ConnectBlueskyCredentialsError, type ConnectBlueskyCredentialsResponse, type CreateAccountGroupData, type CreateAccountGroupError, type CreateAccountGroupResponse, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyResponse, type CreateInviteTokenData, type CreateInviteTokenError, type CreateInviteTokenResponse, type CreatePostData, type CreatePostError, type CreatePostResponse, type CreateProfileData, type CreateProfileError, type CreateProfileResponse, type CreateQueueSlotData, type CreateQueueSlotError, type CreateQueueSlotResponse, type CreateWebhookSettingsData, type CreateWebhookSettingsError, type CreateWebhookSettingsResponse, type DeleteAccountData, type DeleteAccountError, type DeleteAccountGroupData, type DeleteAccountGroupError, type DeleteAccountGroupResponse, type DeleteAccountResponse, type DeleteApiKeyData, type DeleteApiKeyError, type DeleteApiKeyResponse, type DeleteInboxCommentData, type DeleteInboxCommentError, type DeleteInboxCommentResponse, type DeleteInboxReviewReplyData, type DeleteInboxReviewReplyError, type DeleteInboxReviewReplyResponse, type DeletePostData, type DeletePostError, type DeletePostResponse, type DeleteProfileData, type DeleteProfileError, type DeleteProfileResponse, type DeleteQueueSlotData, type DeleteQueueSlotError, type DeleteQueueSlotResponse, type DeleteWebhookSettingsData, type DeleteWebhookSettingsError, type DeleteWebhookSettingsResponse, type DownloadBlueskyMediaData, type DownloadBlueskyMediaError, type DownloadBlueskyMediaResponse, type DownloadFacebookVideoData, type DownloadFacebookVideoError, type DownloadFacebookVideoResponse, type DownloadFormat, type DownloadInstagramMediaData, type DownloadInstagramMediaError, type DownloadInstagramMediaResponse, type DownloadLinkedInVideoData, type DownloadLinkedInVideoError, type DownloadLinkedInVideoResponse, type DownloadResponse, type DownloadTikTokVideoData, type DownloadTikTokVideoError, type DownloadTikTokVideoResponse, type DownloadTwitterMediaData, type DownloadTwitterMediaError, type DownloadTwitterMediaResponse, type DownloadYouTubeVideoData, type DownloadYouTubeVideoError, type DownloadYouTubeVideoResponse, type ErrorResponse, type FacebookPlatformData, type FollowerStatsResponse, type GetAccountHealthData, type GetAccountHealthError, type GetAccountHealthResponse, type GetAllAccountsHealthData, type GetAllAccountsHealthError, type GetAllAccountsHealthResponse, type GetAnalyticsData, type GetAnalyticsError, type GetAnalyticsResponse, type GetConnectUrlData, type GetConnectUrlError, type GetConnectUrlResponse, type GetFacebookPagesData, type GetFacebookPagesError, type GetFacebookPagesResponse, type GetFollowerStatsData, type GetFollowerStatsError, type GetFollowerStatsResponse, type GetGmbLocationsData, type GetGmbLocationsError, type GetGmbLocationsResponse, type GetGoogleBusinessReviewsData, type GetGoogleBusinessReviewsError, type GetGoogleBusinessReviewsResponse, type GetInboxConversationData, type GetInboxConversationError, type GetInboxConversationMessagesData, type GetInboxConversationMessagesError, type GetInboxConversationMessagesResponse, type GetInboxConversationResponse, type GetInboxPostCommentsData, type GetInboxPostCommentsError, type GetInboxPostCommentsResponse, type GetLinkedInAggregateAnalyticsData, type GetLinkedInAggregateAnalyticsError, type GetLinkedInAggregateAnalyticsResponse, type GetLinkedInMentionsData, type GetLinkedInMentionsError, type GetLinkedInMentionsResponse, type GetLinkedInOrganizationsData, type GetLinkedInOrganizationsError, type GetLinkedInOrganizationsResponse, type GetLinkedInPostAnalyticsData, type GetLinkedInPostAnalyticsError, type GetLinkedInPostAnalyticsResponse, type GetLogData, type GetLogError, type GetLogResponse, type GetMediaPresignedUrlData, type GetMediaPresignedUrlError, type GetMediaPresignedUrlResponse, type GetNextQueueSlotData, type GetNextQueueSlotError, type GetNextQueueSlotResponse, type GetPendingOAuthDataData, type GetPendingOAuthDataError, type GetPendingOAuthDataResponse, type GetPinterestBoardsData, type GetPinterestBoardsError, type GetPinterestBoardsResponse, type GetPostData, type GetPostError, type GetPostLogsData, type GetPostLogsError, type GetPostLogsResponse, type GetPostResponse, type GetProfileData, type GetProfileError, type GetProfileResponse, type GetRedditFeedData, type GetRedditFeedError, type GetRedditFeedResponse, type GetRedditSubredditsData, type GetRedditSubredditsError, type GetRedditSubredditsResponse, type GetTelegramConnectStatusData, type GetTelegramConnectStatusError, type GetTelegramConnectStatusResponse, type GetUsageStatsError, type GetUsageStatsResponse, type GetUserData, type GetUserError, type GetUserResponse, type GetWebhookLogsData, type GetWebhookLogsError, type GetWebhookLogsResponse, type GetWebhookSettingsError, type GetWebhookSettingsResponse, type GetYouTubeDailyViewsData, type GetYouTubeDailyViewsError, type GetYouTubeDailyViewsResponse, type GetYouTubeTranscriptData, type GetYouTubeTranscriptError, type GetYouTubeTranscriptResponse, type GoogleBusinessPlatformData, type HandleOAuthCallbackData, type HandleOAuthCallbackError, type HandleOAuthCallbackResponse, type HashtagCheckResponse, type HashtagInfo, type HideInboxCommentData, type HideInboxCommentError, type HideInboxCommentResponse, type InitiateTelegramConnectData, type InitiateTelegramConnectError, type InitiateTelegramConnectResponse, type InstagramPlatformData, Late, LateApiError, type LikeInboxCommentData, type LikeInboxCommentError, type LikeInboxCommentResponse, type LinkedInAggregateAnalyticsDailyResponse, type LinkedInAggregateAnalyticsTotalResponse, type LinkedInPlatformData, type ListAccountGroupsError, type ListAccountGroupsResponse, type ListAccountsData, type ListAccountsError, type ListAccountsResponse, type ListApiKeysError, type ListApiKeysResponse, type ListFacebookPagesData, type ListFacebookPagesError, type ListFacebookPagesResponse, type ListGoogleBusinessLocationsData, type ListGoogleBusinessLocationsError, type ListGoogleBusinessLocationsResponse, type ListInboxCommentsData, type ListInboxCommentsError, type ListInboxCommentsResponse, type ListInboxConversationsData, type ListInboxConversationsError, type ListInboxConversationsResponse, type ListInboxReviewsData, type ListInboxReviewsError, type ListInboxReviewsResponse, type ListLinkedInOrganizationsData, type ListLinkedInOrganizationsError, type ListLinkedInOrganizationsResponse, type ListLogsData, type ListLogsError, type ListLogsResponse, type ListPinterestBoardsForSelectionData, type ListPinterestBoardsForSelectionError, type ListPinterestBoardsForSelectionResponse, type ListPostsData, type ListPostsError, type ListPostsResponse, type ListProfilesData, type ListProfilesError, type ListProfilesResponse, type ListQueueSlotsData, type ListQueueSlotsError, type ListQueueSlotsResponse, type ListSnapchatProfilesData, type ListSnapchatProfilesError, type ListSnapchatProfilesResponse, type ListUsersError, type ListUsersResponse, type MediaItem, type MediaUploadResponse, type Pagination, type ParameterLimitParam, type ParameterPageParam, type PinterestPlatformData, type PlatformAnalytics, type PlatformTarget, type Post, type PostAnalytics, type PostCreateResponse, type PostDeleteResponse, type PostGetResponse, type PostLog, type PostLogDetail, type PostRetryResponse, type PostUpdateResponse, type PostsListResponse, type PreviewQueueData, type PreviewQueueError, type PreviewQueueResponse, type Profile, type ProfileCreateResponse, type ProfileDeleteResponse, type ProfileGetResponse, type ProfileUpdateResponse, type ProfilesListResponse, type QueueDeleteResponse, type QueueNextSlotResponse, type QueuePreviewResponse, type QueueSchedule, type QueueSlot, type QueueSlotsResponse, type QueueUpdateResponse, RateLimitError, type ReplyToInboxPostData, type ReplyToInboxPostError, type ReplyToInboxPostResponse, type ReplyToInboxReviewData, type ReplyToInboxReviewError, type ReplyToInboxReviewResponse, type RetryPostData, type RetryPostError, type RetryPostResponse, type SearchRedditData, type SearchRedditError, type SearchRedditResponse, type SelectFacebookPageData, type SelectFacebookPageError, type SelectFacebookPageResponse, type SelectGoogleBusinessLocationData, type SelectGoogleBusinessLocationError, type SelectGoogleBusinessLocationResponse, type SelectLinkedInOrganizationData, type SelectLinkedInOrganizationError, type SelectLinkedInOrganizationResponse, type SelectPinterestBoardData, type SelectPinterestBoardError, type SelectPinterestBoardResponse, type SelectSnapchatProfileData, type SelectSnapchatProfileError, type SelectSnapchatProfileResponse, type SendInboxMessageData, type SendInboxMessageError, type SendInboxMessageResponse, type SendPrivateReplyToCommentData, type SendPrivateReplyToCommentError, type SendPrivateReplyToCommentResponse, type SnapchatPlatformData, type SocialAccount, type TelegramPlatformData, type TestWebhookData, type TestWebhookError, type TestWebhookResponse, type ThreadsPlatformData, type TikTokPlatformData, type TikTokSettings, type TranscriptResponse, type TranscriptSegment, type TwitterPlatformData, type UnhideInboxCommentData, type UnhideInboxCommentError, type UnhideInboxCommentResponse, type UnlikeInboxCommentData, type UnlikeInboxCommentError, type UnlikeInboxCommentResponse, type UpdateAccountData, type UpdateAccountError, type UpdateAccountGroupData, type UpdateAccountGroupError, type UpdateAccountGroupResponse, type UpdateAccountResponse, type UpdateFacebookPageData, type UpdateFacebookPageError, type UpdateFacebookPageResponse, type UpdateGmbLocationData, type UpdateGmbLocationError, type UpdateGmbLocationResponse, type UpdateInboxConversationData, type UpdateInboxConversationError, type UpdateInboxConversationResponse, type UpdateLinkedInOrganizationData, type UpdateLinkedInOrganizationError, type UpdateLinkedInOrganizationResponse, type UpdatePinterestBoardsData, type UpdatePinterestBoardsError, type UpdatePinterestBoardsResponse, type UpdatePostData, type UpdatePostError, type UpdatePostResponse, type UpdateProfileData, type UpdateProfileError, type UpdateProfileResponse, type UpdateQueueSlotData, type UpdateQueueSlotError, type UpdateQueueSlotResponse, type UpdateRedditSubredditsData, type UpdateRedditSubredditsError, type UpdateRedditSubredditsResponse, type UpdateWebhookSettingsData, type UpdateWebhookSettingsError, type UpdateWebhookSettingsResponse, type UploadTokenResponse, type UploadTokenStatusResponse, type UploadedFile, type UsageStats, type User, type UserGetResponse, type UsersListResponse, ValidationError, type Webhook, type WebhookLog, type WebhookPayloadAccountConnected, type WebhookPayloadAccountDisconnected, type WebhookPayloadMessage, type WebhookPayloadPost, type YouTubeDailyViewsResponse, type YouTubePlatformData, type YouTubeScopeMissingResponse, type action, type aggregation, type aggregation2, type aggregation3, type billingPeriod, type commercialContentType, type contentType, type contentType2, Late as default, type direction, type disconnectionType, type event, type event2, type event3, type event4, type event5, type graduationStrategy, type mediaType, parseApiError, type parseMode, type platform, type platform2, type status, type status2, type status3, type status4, type status5, type status6, type type, type type2, type type3, type visibility };
5214
+ export { type AccountGetResponse, type AccountWithFollowerStats, type AccountsListResponse, type AnalyticsListResponse, type AnalyticsOverview, type AnalyticsSinglePostResponse, type ApiKey, type BulkUploadPostsData, type BulkUploadPostsError, type BulkUploadPostsResponse, type CaptionResponse, type CheckInstagramHashtagsData, type CheckInstagramHashtagsError, type CheckInstagramHashtagsResponse, type ClientOptions, type CompleteTelegramConnectData, type CompleteTelegramConnectError, type CompleteTelegramConnectResponse, type ConnectBlueskyCredentialsData, type ConnectBlueskyCredentialsError, type ConnectBlueskyCredentialsResponse, type CreateAccountGroupData, type CreateAccountGroupError, type CreateAccountGroupResponse, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyResponse, type CreateInviteTokenData, type CreateInviteTokenError, type CreateInviteTokenResponse, type CreatePostData, type CreatePostError, type CreatePostResponse, type CreateProfileData, type CreateProfileError, type CreateProfileResponse, type CreateQueueSlotData, type CreateQueueSlotError, type CreateQueueSlotResponse, type CreateWebhookSettingsData, type CreateWebhookSettingsError, type CreateWebhookSettingsResponse, type DeleteAccountData, type DeleteAccountError, type DeleteAccountGroupData, type DeleteAccountGroupError, type DeleteAccountGroupResponse, type DeleteAccountResponse, type DeleteApiKeyData, type DeleteApiKeyError, type DeleteApiKeyResponse, type DeleteInboxCommentData, type DeleteInboxCommentError, type DeleteInboxCommentResponse, type DeleteInboxReviewReplyData, type DeleteInboxReviewReplyError, type DeleteInboxReviewReplyResponse, type DeletePostData, type DeletePostError, type DeletePostResponse, type DeleteProfileData, type DeleteProfileError, type DeleteProfileResponse, type DeleteQueueSlotData, type DeleteQueueSlotError, type DeleteQueueSlotResponse, type DeleteWebhookSettingsData, type DeleteWebhookSettingsError, type DeleteWebhookSettingsResponse, type DownloadBlueskyMediaData, type DownloadBlueskyMediaError, type DownloadBlueskyMediaResponse, type DownloadFacebookVideoData, type DownloadFacebookVideoError, type DownloadFacebookVideoResponse, type DownloadFormat, type DownloadInstagramMediaData, type DownloadInstagramMediaError, type DownloadInstagramMediaResponse, type DownloadLinkedInVideoData, type DownloadLinkedInVideoError, type DownloadLinkedInVideoResponse, type DownloadResponse, type DownloadTikTokVideoData, type DownloadTikTokVideoError, type DownloadTikTokVideoResponse, type DownloadTwitterMediaData, type DownloadTwitterMediaError, type DownloadTwitterMediaResponse, type DownloadYouTubeVideoData, type DownloadYouTubeVideoError, type DownloadYouTubeVideoResponse, type ErrorResponse, type FacebookPlatformData, type FollowerStatsResponse, type GetAccountHealthData, type GetAccountHealthError, type GetAccountHealthResponse, type GetAllAccountsHealthData, type GetAllAccountsHealthError, type GetAllAccountsHealthResponse, type GetAnalyticsData, type GetAnalyticsError, type GetAnalyticsResponse, type GetConnectUrlData, type GetConnectUrlError, type GetConnectUrlResponse, type GetFacebookPagesData, type GetFacebookPagesError, type GetFacebookPagesResponse, type GetFollowerStatsData, type GetFollowerStatsError, type GetFollowerStatsResponse, type GetGmbLocationsData, type GetGmbLocationsError, type GetGmbLocationsResponse, type GetGoogleBusinessReviewsData, type GetGoogleBusinessReviewsError, type GetGoogleBusinessReviewsResponse, type GetInboxConversationData, type GetInboxConversationError, type GetInboxConversationMessagesData, type GetInboxConversationMessagesError, type GetInboxConversationMessagesResponse, type GetInboxConversationResponse, type GetInboxPostCommentsData, type GetInboxPostCommentsError, type GetInboxPostCommentsResponse, type GetLinkedInAggregateAnalyticsData, type GetLinkedInAggregateAnalyticsError, type GetLinkedInAggregateAnalyticsResponse, type GetLinkedInMentionsData, type GetLinkedInMentionsError, type GetLinkedInMentionsResponse, type GetLinkedInOrganizationsData, type GetLinkedInOrganizationsError, type GetLinkedInOrganizationsResponse, type GetLinkedInPostAnalyticsData, type GetLinkedInPostAnalyticsError, type GetLinkedInPostAnalyticsResponse, type GetLogData, type GetLogError, type GetLogResponse, type GetMediaPresignedUrlData, type GetMediaPresignedUrlError, type GetMediaPresignedUrlResponse, type GetNextQueueSlotData, type GetNextQueueSlotError, type GetNextQueueSlotResponse, type GetPendingOAuthDataData, type GetPendingOAuthDataError, type GetPendingOAuthDataResponse, type GetPinterestBoardsData, type GetPinterestBoardsError, type GetPinterestBoardsResponse, type GetPostData, type GetPostError, type GetPostLogsData, type GetPostLogsError, type GetPostLogsResponse, type GetPostResponse, type GetProfileData, type GetProfileError, type GetProfileResponse, type GetRedditFeedData, type GetRedditFeedError, type GetRedditFeedResponse, type GetRedditSubredditsData, type GetRedditSubredditsError, type GetRedditSubredditsResponse, type GetTelegramConnectStatusData, type GetTelegramConnectStatusError, type GetTelegramConnectStatusResponse, type GetUsageStatsError, type GetUsageStatsResponse, type GetUserData, type GetUserError, type GetUserResponse, type GetWebhookLogsData, type GetWebhookLogsError, type GetWebhookLogsResponse, type GetWebhookSettingsError, type GetWebhookSettingsResponse, type GetYouTubeDailyViewsData, type GetYouTubeDailyViewsError, type GetYouTubeDailyViewsResponse, type GetYouTubeTranscriptData, type GetYouTubeTranscriptError, type GetYouTubeTranscriptResponse, type GoogleBusinessPlatformData, type HandleOAuthCallbackData, type HandleOAuthCallbackError, type HandleOAuthCallbackResponse, type HashtagCheckResponse, type HashtagInfo, type HideInboxCommentData, type HideInboxCommentError, type HideInboxCommentResponse, type InitiateTelegramConnectData, type InitiateTelegramConnectError, type InitiateTelegramConnectResponse, type InstagramPlatformData, Late, LateApiError, type LikeInboxCommentData, type LikeInboxCommentError, type LikeInboxCommentResponse, type LinkedInAggregateAnalyticsDailyResponse, type LinkedInAggregateAnalyticsTotalResponse, type LinkedInPlatformData, type ListAccountGroupsError, type ListAccountGroupsResponse, type ListAccountsData, type ListAccountsError, type ListAccountsResponse, type ListApiKeysError, type ListApiKeysResponse, type ListFacebookPagesData, type ListFacebookPagesError, type ListFacebookPagesResponse, type ListGoogleBusinessLocationsData, type ListGoogleBusinessLocationsError, type ListGoogleBusinessLocationsResponse, type ListInboxCommentsData, type ListInboxCommentsError, type ListInboxCommentsResponse, type ListInboxConversationsData, type ListInboxConversationsError, type ListInboxConversationsResponse, type ListInboxReviewsData, type ListInboxReviewsError, type ListInboxReviewsResponse, type ListLinkedInOrganizationsData, type ListLinkedInOrganizationsError, type ListLinkedInOrganizationsResponse, type ListLogsData, type ListLogsError, type ListLogsResponse, type ListPinterestBoardsForSelectionData, type ListPinterestBoardsForSelectionError, type ListPinterestBoardsForSelectionResponse, type ListPostsData, type ListPostsError, type ListPostsResponse, type ListProfilesData, type ListProfilesError, type ListProfilesResponse, type ListQueueSlotsData, type ListQueueSlotsError, type ListQueueSlotsResponse, type ListSnapchatProfilesData, type ListSnapchatProfilesError, type ListSnapchatProfilesResponse, type ListUsersError, type ListUsersResponse, type MediaItem, type MediaUploadResponse, type Pagination, type ParameterLimitParam, type ParameterPageParam, type PinterestPlatformData, type PlatformAnalytics, type PlatformTarget, type Post, type PostAnalytics, type PostCreateResponse, type PostDeleteResponse, type PostGetResponse, type PostLog, type PostLogDetail, type PostRetryResponse, type PostUpdateResponse, type PostsListResponse, type PreviewQueueData, type PreviewQueueError, type PreviewQueueResponse, type Profile, type ProfileCreateResponse, type ProfileDeleteResponse, type ProfileGetResponse, type ProfileUpdateResponse, type ProfilesListResponse, type QueueDeleteResponse, type QueueNextSlotResponse, type QueuePreviewResponse, type QueueSchedule, type QueueSlot, type QueueSlotsResponse, type QueueUpdateResponse, RateLimitError, type ReplyToInboxPostData, type ReplyToInboxPostError, type ReplyToInboxPostResponse, type ReplyToInboxReviewData, type ReplyToInboxReviewError, type ReplyToInboxReviewResponse, type RetryPostData, type RetryPostError, type RetryPostResponse, type SearchRedditData, type SearchRedditError, type SearchRedditResponse, type SelectFacebookPageData, type SelectFacebookPageError, type SelectFacebookPageResponse, type SelectGoogleBusinessLocationData, type SelectGoogleBusinessLocationError, type SelectGoogleBusinessLocationResponse, type SelectLinkedInOrganizationData, type SelectLinkedInOrganizationError, type SelectLinkedInOrganizationResponse, type SelectPinterestBoardData, type SelectPinterestBoardError, type SelectPinterestBoardResponse, type SelectSnapchatProfileData, type SelectSnapchatProfileError, type SelectSnapchatProfileResponse, type SendInboxMessageData, type SendInboxMessageError, type SendInboxMessageResponse, type SendPrivateReplyToCommentData, type SendPrivateReplyToCommentError, type SendPrivateReplyToCommentResponse, type SnapchatPlatformData, type SocialAccount, type TelegramPlatformData, type TestWebhookData, type TestWebhookError, type TestWebhookResponse, type ThreadsPlatformData, type TikTokPlatformData, type TikTokSettings, type TranscriptResponse, type TranscriptSegment, type TwitterPlatformData, type UnhideInboxCommentData, type UnhideInboxCommentError, type UnhideInboxCommentResponse, type UnlikeInboxCommentData, type UnlikeInboxCommentError, type UnlikeInboxCommentResponse, type UpdateAccountData, type UpdateAccountError, type UpdateAccountGroupData, type UpdateAccountGroupError, type UpdateAccountGroupResponse, type UpdateAccountResponse, type UpdateFacebookPageData, type UpdateFacebookPageError, type UpdateFacebookPageResponse, type UpdateGmbLocationData, type UpdateGmbLocationError, type UpdateGmbLocationResponse, type UpdateInboxConversationData, type UpdateInboxConversationError, type UpdateInboxConversationResponse, type UpdateLinkedInOrganizationData, type UpdateLinkedInOrganizationError, type UpdateLinkedInOrganizationResponse, type UpdatePinterestBoardsData, type UpdatePinterestBoardsError, type UpdatePinterestBoardsResponse, type UpdatePostData, type UpdatePostError, type UpdatePostResponse, type UpdateProfileData, type UpdateProfileError, type UpdateProfileResponse, type UpdateQueueSlotData, type UpdateQueueSlotError, type UpdateQueueSlotResponse, type UpdateRedditSubredditsData, type UpdateRedditSubredditsError, type UpdateRedditSubredditsResponse, type UpdateWebhookSettingsData, type UpdateWebhookSettingsError, type UpdateWebhookSettingsResponse, type UploadTokenResponse, type UploadTokenStatusResponse, type UploadedFile, type UsageStats, type User, type UserGetResponse, type UsersListResponse, ValidationError, type Webhook, type WebhookLog, type WebhookPayloadAccountConnected, type WebhookPayloadAccountDisconnected, type WebhookPayloadMessage, type WebhookPayloadPost, type YouTubeDailyViewsResponse, type YouTubePlatformData, type YouTubeScopeMissingResponse, type action, type aggregation, type aggregation2, type aggregation3, type billingPeriod, type commercialContentType, type contentType, type contentType2, Late as default, type direction, type disconnectionType, type errorCategory, type errorSource, type event, type event2, type event3, type event4, type event5, type graduationStrategy, type mediaType, parseApiError, type parseMode, type platform, type platform2, type status, type status2, type status3, type status4, type status5, type status6, type type, type type2, type type3, type visibility };
package/dist/index.d.ts CHANGED
@@ -457,6 +457,7 @@ type ErrorResponse = {
457
457
  * - Multiple videos in the same post are not supported.
458
458
  * - Stories require media (single image or video); text captions are not displayed with stories.
459
459
  * - Stories are ephemeral (disappear after 24 hours).
460
+ * - Use pageId to post to multiple pages from the same account connection.
460
461
  *
461
462
  */
462
463
  type FacebookPlatformData = {
@@ -469,7 +470,10 @@ type FacebookPlatformData = {
469
470
  */
470
471
  firstComment?: string;
471
472
  /**
472
- * Target Facebook Page ID. If omitted, uses the selected/default page on the connection.
473
+ * Target Facebook Page ID for multi-page posting.
474
+ * If omitted, uses the selected/default page on the connection.
475
+ * Use GET /api/v1/accounts/{id}/facebook-page to list available pages.
476
+ *
473
477
  */
474
478
  pageId?: string;
475
479
  };
@@ -492,9 +496,18 @@ type aggregation = 'daily' | 'weekly' | 'monthly';
492
496
  * - Images must be publicly accessible URLs
493
497
  * - Call-to-action buttons drive user engagement
494
498
  * - Posts appear on your Google Business Profile and in Google Search/Maps
499
+ * - Use locationId to post to multiple locations from the same account connection
495
500
  *
496
501
  */
497
502
  type GoogleBusinessPlatformData = {
503
+ /**
504
+ * Target Google Business location ID for multi-location posting.
505
+ * Format: "locations/123456789"
506
+ * If omitted, uses the selected/default location on the connection.
507
+ * Use GET /api/v1/accounts/{id}/gmb-locations to list available locations.
508
+ *
509
+ */
510
+ locationId?: string;
498
511
  /**
499
512
  * Optional call-to-action button displayed on the post
500
513
  */
@@ -720,9 +733,18 @@ type aggregation3 = 'TOTAL';
720
733
  * - Single PDF document posts are supported (max 100MB, ~300 pages). Documents cannot be mixed with other media.
721
734
  * - Post ID is returned in the x-restli-id response header.
722
735
  * - Link previews are automatically generated for URLs when no media is attached (can be disabled with disableLinkPreview).
736
+ * - Use organizationUrn to post to multiple organizations from the same account connection.
723
737
  *
724
738
  */
725
739
  type LinkedInPlatformData = {
740
+ /**
741
+ * Target LinkedIn Organization URN for multi-organization posting.
742
+ * Format: "urn:li:organization:123456789"
743
+ * If omitted, uses the selected/default organization on the connection.
744
+ * Use GET /api/v1/accounts/{id}/linkedin-organizations to list available organizations.
745
+ *
746
+ */
747
+ organizationUrn?: string;
726
748
  /**
727
749
  * Optional first comment to add after the post is created
728
750
  */
@@ -891,7 +913,60 @@ type PlatformTarget = {
891
913
  * Timestamp when the post was published to this platform
892
914
  */
893
915
  publishedAt?: string;
916
+ /**
917
+ * Human-readable error message when status is 'failed'.
918
+ * Contains platform-specific error details explaining why the publish failed.
919
+ * Examples:
920
+ * - "Instagram access token has expired. Please reconnect your account."
921
+ * - "Post text exceeds the 500 character limit for Threads."
922
+ * - "You do not have enough karma to post in this subreddit."
923
+ * - "Video is too long for Reels. Facebook Reels must be 90 seconds or less."
924
+ *
925
+ */
926
+ errorMessage?: string;
927
+ /**
928
+ * Error category for programmatic handling:
929
+ * - auth_expired: Token expired or revoked, account needs reconnection
930
+ * - user_content: Content doesn't meet platform requirements (too long, wrong format, etc.)
931
+ * - user_abuse: Rate limits, spam detection, excessive posting
932
+ * - account_issue: Account configuration problems (missing board, inactive account)
933
+ * - platform_rejected: Platform rules violated (banned, suspended, policy violation)
934
+ * - platform_error: Platform-side issues (5xx errors, maintenance)
935
+ * - system_error: Late infrastructure issues (timeouts, network errors)
936
+ * - unknown: Unclassified error
937
+ *
938
+ */
939
+ errorCategory?: 'auth_expired' | 'user_content' | 'user_abuse' | 'account_issue' | 'platform_rejected' | 'platform_error' | 'system_error' | 'unknown';
940
+ /**
941
+ * Who/what caused the error:
942
+ * - user: User action required (fix content, reconnect account)
943
+ * - platform: Platform-side issue (outage, API change)
944
+ * - system: Late system issue (rare)
945
+ *
946
+ */
947
+ errorSource?: 'user' | 'platform' | 'system';
894
948
  };
949
+ /**
950
+ * Error category for programmatic handling:
951
+ * - auth_expired: Token expired or revoked, account needs reconnection
952
+ * - user_content: Content doesn't meet platform requirements (too long, wrong format, etc.)
953
+ * - user_abuse: Rate limits, spam detection, excessive posting
954
+ * - account_issue: Account configuration problems (missing board, inactive account)
955
+ * - platform_rejected: Platform rules violated (banned, suspended, policy violation)
956
+ * - platform_error: Platform-side issues (5xx errors, maintenance)
957
+ * - system_error: Late infrastructure issues (timeouts, network errors)
958
+ * - unknown: Unclassified error
959
+ *
960
+ */
961
+ type errorCategory = 'auth_expired' | 'user_content' | 'user_abuse' | 'account_issue' | 'platform_rejected' | 'platform_error' | 'system_error' | 'unknown';
962
+ /**
963
+ * Who/what caused the error:
964
+ * - user: User action required (fix content, reconnect account)
965
+ * - platform: Platform-side issue (outage, API change)
966
+ * - system: Late system issue (rare)
967
+ *
968
+ */
969
+ type errorSource = 'user' | 'platform' | 'system';
895
970
  type Post = {
896
971
  _id?: string;
897
972
  userId?: (string | User);
@@ -1830,6 +1905,15 @@ type YouTubePlatformData = {
1830
1905
  *
1831
1906
  */
1832
1907
  containsSyntheticMedia?: boolean;
1908
+ /**
1909
+ * YouTube video category ID. Defaults to '22' (People & Blogs).
1910
+ * Common categories: 1 (Film & Animation), 2 (Autos & Vehicles), 10 (Music),
1911
+ * 15 (Pets & Animals), 17 (Sports), 20 (Gaming), 22 (People & Blogs),
1912
+ * 23 (Comedy), 24 (Entertainment), 25 (News & Politics), 26 (Howto & Style),
1913
+ * 27 (Education), 28 (Science & Technology).
1914
+ *
1915
+ */
1916
+ categoryId?: string;
1833
1917
  };
1834
1918
  type YouTubeScopeMissingResponse = {
1835
1919
  success?: boolean;
@@ -2067,6 +2151,14 @@ type GetAnalyticsData = {
2067
2151
  * Sort by date or engagement
2068
2152
  */
2069
2153
  sortBy?: 'date' | 'engagement';
2154
+ /**
2155
+ * Filter by post source:
2156
+ * - `late` - Only posts scheduled/published via Late API
2157
+ * - `external` - Only posts synced from the platform (not posted via Late)
2158
+ * - `all` - All posts (default)
2159
+ *
2160
+ */
2161
+ source?: 'all' | 'late' | 'external';
2070
2162
  /**
2071
2163
  * Inclusive upper bound
2072
2164
  */
@@ -2280,6 +2372,11 @@ type ListPostsError = ({
2280
2372
  type CreatePostData = {
2281
2373
  body: {
2282
2374
  title?: string;
2375
+ /**
2376
+ * Post caption/text content. Optional when media is attached (images, videos, etc.).
2377
+ * Required for text-only posts. Can also be omitted if all platforms have customContent set.
2378
+ *
2379
+ */
2283
2380
  content?: string;
2284
2381
  mediaItems?: Array<{
2285
2382
  type?: 'image' | 'video' | 'gif' | 'document';
@@ -4397,7 +4494,7 @@ type ListInboxConversationsData = {
4397
4494
  /**
4398
4495
  * Filter by platform
4399
4496
  */
4400
- platform?: 'facebook' | 'instagram' | 'bluesky' | 'reddit' | 'telegram';
4497
+ platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram';
4401
4498
  /**
4402
4499
  * Filter by profile ID
4403
4500
  */
@@ -4462,6 +4559,9 @@ type ListInboxConversationsError = ({
4462
4559
  } | unknown);
4463
4560
  type GetInboxConversationData = {
4464
4561
  path: {
4562
+ /**
4563
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4564
+ */
4465
4565
  conversationId: string;
4466
4566
  };
4467
4567
  query: {
@@ -4501,6 +4601,9 @@ type UpdateInboxConversationData = {
4501
4601
  status: 'active' | 'archived';
4502
4602
  };
4503
4603
  path: {
4604
+ /**
4605
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4606
+ */
4504
4607
  conversationId: string;
4505
4608
  };
4506
4609
  };
@@ -4519,6 +4622,9 @@ type UpdateInboxConversationError = ({
4519
4622
  } | unknown);
4520
4623
  type GetInboxConversationMessagesData = {
4521
4624
  path: {
4625
+ /**
4626
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4627
+ */
4522
4628
  conversationId: string;
4523
4629
  };
4524
4630
  query: {
@@ -4577,6 +4683,9 @@ type SendInboxMessageData = {
4577
4683
  message: string;
4578
4684
  };
4579
4685
  path: {
4686
+ /**
4687
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4688
+ */
4580
4689
  conversationId: string;
4581
4690
  };
4582
4691
  };
@@ -4622,7 +4731,7 @@ type ListInboxCommentsData = {
4622
4731
  /**
4623
4732
  * Filter by platform
4624
4733
  */
4625
- platform?: 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'reddit' | 'bluesky' | 'tiktok';
4734
+ platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'threads' | 'youtube' | 'linkedin' | 'reddit' | 'tiktok';
4626
4735
  /**
4627
4736
  * Filter by profile ID
4628
4737
  */
@@ -5102,4 +5211,4 @@ type DeleteInboxReviewReplyError = ({
5102
5211
  error?: string;
5103
5212
  } | unknown);
5104
5213
 
5105
- export { type AccountGetResponse, type AccountWithFollowerStats, type AccountsListResponse, type AnalyticsListResponse, type AnalyticsOverview, type AnalyticsSinglePostResponse, type ApiKey, type BulkUploadPostsData, type BulkUploadPostsError, type BulkUploadPostsResponse, type CaptionResponse, type CheckInstagramHashtagsData, type CheckInstagramHashtagsError, type CheckInstagramHashtagsResponse, type ClientOptions, type CompleteTelegramConnectData, type CompleteTelegramConnectError, type CompleteTelegramConnectResponse, type ConnectBlueskyCredentialsData, type ConnectBlueskyCredentialsError, type ConnectBlueskyCredentialsResponse, type CreateAccountGroupData, type CreateAccountGroupError, type CreateAccountGroupResponse, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyResponse, type CreateInviteTokenData, type CreateInviteTokenError, type CreateInviteTokenResponse, type CreatePostData, type CreatePostError, type CreatePostResponse, type CreateProfileData, type CreateProfileError, type CreateProfileResponse, type CreateQueueSlotData, type CreateQueueSlotError, type CreateQueueSlotResponse, type CreateWebhookSettingsData, type CreateWebhookSettingsError, type CreateWebhookSettingsResponse, type DeleteAccountData, type DeleteAccountError, type DeleteAccountGroupData, type DeleteAccountGroupError, type DeleteAccountGroupResponse, type DeleteAccountResponse, type DeleteApiKeyData, type DeleteApiKeyError, type DeleteApiKeyResponse, type DeleteInboxCommentData, type DeleteInboxCommentError, type DeleteInboxCommentResponse, type DeleteInboxReviewReplyData, type DeleteInboxReviewReplyError, type DeleteInboxReviewReplyResponse, type DeletePostData, type DeletePostError, type DeletePostResponse, type DeleteProfileData, type DeleteProfileError, type DeleteProfileResponse, type DeleteQueueSlotData, type DeleteQueueSlotError, type DeleteQueueSlotResponse, type DeleteWebhookSettingsData, type DeleteWebhookSettingsError, type DeleteWebhookSettingsResponse, type DownloadBlueskyMediaData, type DownloadBlueskyMediaError, type DownloadBlueskyMediaResponse, type DownloadFacebookVideoData, type DownloadFacebookVideoError, type DownloadFacebookVideoResponse, type DownloadFormat, type DownloadInstagramMediaData, type DownloadInstagramMediaError, type DownloadInstagramMediaResponse, type DownloadLinkedInVideoData, type DownloadLinkedInVideoError, type DownloadLinkedInVideoResponse, type DownloadResponse, type DownloadTikTokVideoData, type DownloadTikTokVideoError, type DownloadTikTokVideoResponse, type DownloadTwitterMediaData, type DownloadTwitterMediaError, type DownloadTwitterMediaResponse, type DownloadYouTubeVideoData, type DownloadYouTubeVideoError, type DownloadYouTubeVideoResponse, type ErrorResponse, type FacebookPlatformData, type FollowerStatsResponse, type GetAccountHealthData, type GetAccountHealthError, type GetAccountHealthResponse, type GetAllAccountsHealthData, type GetAllAccountsHealthError, type GetAllAccountsHealthResponse, type GetAnalyticsData, type GetAnalyticsError, type GetAnalyticsResponse, type GetConnectUrlData, type GetConnectUrlError, type GetConnectUrlResponse, type GetFacebookPagesData, type GetFacebookPagesError, type GetFacebookPagesResponse, type GetFollowerStatsData, type GetFollowerStatsError, type GetFollowerStatsResponse, type GetGmbLocationsData, type GetGmbLocationsError, type GetGmbLocationsResponse, type GetGoogleBusinessReviewsData, type GetGoogleBusinessReviewsError, type GetGoogleBusinessReviewsResponse, type GetInboxConversationData, type GetInboxConversationError, type GetInboxConversationMessagesData, type GetInboxConversationMessagesError, type GetInboxConversationMessagesResponse, type GetInboxConversationResponse, type GetInboxPostCommentsData, type GetInboxPostCommentsError, type GetInboxPostCommentsResponse, type GetLinkedInAggregateAnalyticsData, type GetLinkedInAggregateAnalyticsError, type GetLinkedInAggregateAnalyticsResponse, type GetLinkedInMentionsData, type GetLinkedInMentionsError, type GetLinkedInMentionsResponse, type GetLinkedInOrganizationsData, type GetLinkedInOrganizationsError, type GetLinkedInOrganizationsResponse, type GetLinkedInPostAnalyticsData, type GetLinkedInPostAnalyticsError, type GetLinkedInPostAnalyticsResponse, type GetLogData, type GetLogError, type GetLogResponse, type GetMediaPresignedUrlData, type GetMediaPresignedUrlError, type GetMediaPresignedUrlResponse, type GetNextQueueSlotData, type GetNextQueueSlotError, type GetNextQueueSlotResponse, type GetPendingOAuthDataData, type GetPendingOAuthDataError, type GetPendingOAuthDataResponse, type GetPinterestBoardsData, type GetPinterestBoardsError, type GetPinterestBoardsResponse, type GetPostData, type GetPostError, type GetPostLogsData, type GetPostLogsError, type GetPostLogsResponse, type GetPostResponse, type GetProfileData, type GetProfileError, type GetProfileResponse, type GetRedditFeedData, type GetRedditFeedError, type GetRedditFeedResponse, type GetRedditSubredditsData, type GetRedditSubredditsError, type GetRedditSubredditsResponse, type GetTelegramConnectStatusData, type GetTelegramConnectStatusError, type GetTelegramConnectStatusResponse, type GetUsageStatsError, type GetUsageStatsResponse, type GetUserData, type GetUserError, type GetUserResponse, type GetWebhookLogsData, type GetWebhookLogsError, type GetWebhookLogsResponse, type GetWebhookSettingsError, type GetWebhookSettingsResponse, type GetYouTubeDailyViewsData, type GetYouTubeDailyViewsError, type GetYouTubeDailyViewsResponse, type GetYouTubeTranscriptData, type GetYouTubeTranscriptError, type GetYouTubeTranscriptResponse, type GoogleBusinessPlatformData, type HandleOAuthCallbackData, type HandleOAuthCallbackError, type HandleOAuthCallbackResponse, type HashtagCheckResponse, type HashtagInfo, type HideInboxCommentData, type HideInboxCommentError, type HideInboxCommentResponse, type InitiateTelegramConnectData, type InitiateTelegramConnectError, type InitiateTelegramConnectResponse, type InstagramPlatformData, Late, LateApiError, type LikeInboxCommentData, type LikeInboxCommentError, type LikeInboxCommentResponse, type LinkedInAggregateAnalyticsDailyResponse, type LinkedInAggregateAnalyticsTotalResponse, type LinkedInPlatformData, type ListAccountGroupsError, type ListAccountGroupsResponse, type ListAccountsData, type ListAccountsError, type ListAccountsResponse, type ListApiKeysError, type ListApiKeysResponse, type ListFacebookPagesData, type ListFacebookPagesError, type ListFacebookPagesResponse, type ListGoogleBusinessLocationsData, type ListGoogleBusinessLocationsError, type ListGoogleBusinessLocationsResponse, type ListInboxCommentsData, type ListInboxCommentsError, type ListInboxCommentsResponse, type ListInboxConversationsData, type ListInboxConversationsError, type ListInboxConversationsResponse, type ListInboxReviewsData, type ListInboxReviewsError, type ListInboxReviewsResponse, type ListLinkedInOrganizationsData, type ListLinkedInOrganizationsError, type ListLinkedInOrganizationsResponse, type ListLogsData, type ListLogsError, type ListLogsResponse, type ListPinterestBoardsForSelectionData, type ListPinterestBoardsForSelectionError, type ListPinterestBoardsForSelectionResponse, type ListPostsData, type ListPostsError, type ListPostsResponse, type ListProfilesData, type ListProfilesError, type ListProfilesResponse, type ListQueueSlotsData, type ListQueueSlotsError, type ListQueueSlotsResponse, type ListSnapchatProfilesData, type ListSnapchatProfilesError, type ListSnapchatProfilesResponse, type ListUsersError, type ListUsersResponse, type MediaItem, type MediaUploadResponse, type Pagination, type ParameterLimitParam, type ParameterPageParam, type PinterestPlatformData, type PlatformAnalytics, type PlatformTarget, type Post, type PostAnalytics, type PostCreateResponse, type PostDeleteResponse, type PostGetResponse, type PostLog, type PostLogDetail, type PostRetryResponse, type PostUpdateResponse, type PostsListResponse, type PreviewQueueData, type PreviewQueueError, type PreviewQueueResponse, type Profile, type ProfileCreateResponse, type ProfileDeleteResponse, type ProfileGetResponse, type ProfileUpdateResponse, type ProfilesListResponse, type QueueDeleteResponse, type QueueNextSlotResponse, type QueuePreviewResponse, type QueueSchedule, type QueueSlot, type QueueSlotsResponse, type QueueUpdateResponse, RateLimitError, type ReplyToInboxPostData, type ReplyToInboxPostError, type ReplyToInboxPostResponse, type ReplyToInboxReviewData, type ReplyToInboxReviewError, type ReplyToInboxReviewResponse, type RetryPostData, type RetryPostError, type RetryPostResponse, type SearchRedditData, type SearchRedditError, type SearchRedditResponse, type SelectFacebookPageData, type SelectFacebookPageError, type SelectFacebookPageResponse, type SelectGoogleBusinessLocationData, type SelectGoogleBusinessLocationError, type SelectGoogleBusinessLocationResponse, type SelectLinkedInOrganizationData, type SelectLinkedInOrganizationError, type SelectLinkedInOrganizationResponse, type SelectPinterestBoardData, type SelectPinterestBoardError, type SelectPinterestBoardResponse, type SelectSnapchatProfileData, type SelectSnapchatProfileError, type SelectSnapchatProfileResponse, type SendInboxMessageData, type SendInboxMessageError, type SendInboxMessageResponse, type SendPrivateReplyToCommentData, type SendPrivateReplyToCommentError, type SendPrivateReplyToCommentResponse, type SnapchatPlatformData, type SocialAccount, type TelegramPlatformData, type TestWebhookData, type TestWebhookError, type TestWebhookResponse, type ThreadsPlatformData, type TikTokPlatformData, type TikTokSettings, type TranscriptResponse, type TranscriptSegment, type TwitterPlatformData, type UnhideInboxCommentData, type UnhideInboxCommentError, type UnhideInboxCommentResponse, type UnlikeInboxCommentData, type UnlikeInboxCommentError, type UnlikeInboxCommentResponse, type UpdateAccountData, type UpdateAccountError, type UpdateAccountGroupData, type UpdateAccountGroupError, type UpdateAccountGroupResponse, type UpdateAccountResponse, type UpdateFacebookPageData, type UpdateFacebookPageError, type UpdateFacebookPageResponse, type UpdateGmbLocationData, type UpdateGmbLocationError, type UpdateGmbLocationResponse, type UpdateInboxConversationData, type UpdateInboxConversationError, type UpdateInboxConversationResponse, type UpdateLinkedInOrganizationData, type UpdateLinkedInOrganizationError, type UpdateLinkedInOrganizationResponse, type UpdatePinterestBoardsData, type UpdatePinterestBoardsError, type UpdatePinterestBoardsResponse, type UpdatePostData, type UpdatePostError, type UpdatePostResponse, type UpdateProfileData, type UpdateProfileError, type UpdateProfileResponse, type UpdateQueueSlotData, type UpdateQueueSlotError, type UpdateQueueSlotResponse, type UpdateRedditSubredditsData, type UpdateRedditSubredditsError, type UpdateRedditSubredditsResponse, type UpdateWebhookSettingsData, type UpdateWebhookSettingsError, type UpdateWebhookSettingsResponse, type UploadTokenResponse, type UploadTokenStatusResponse, type UploadedFile, type UsageStats, type User, type UserGetResponse, type UsersListResponse, ValidationError, type Webhook, type WebhookLog, type WebhookPayloadAccountConnected, type WebhookPayloadAccountDisconnected, type WebhookPayloadMessage, type WebhookPayloadPost, type YouTubeDailyViewsResponse, type YouTubePlatformData, type YouTubeScopeMissingResponse, type action, type aggregation, type aggregation2, type aggregation3, type billingPeriod, type commercialContentType, type contentType, type contentType2, Late as default, type direction, type disconnectionType, type event, type event2, type event3, type event4, type event5, type graduationStrategy, type mediaType, parseApiError, type parseMode, type platform, type platform2, type status, type status2, type status3, type status4, type status5, type status6, type type, type type2, type type3, type visibility };
5214
+ export { type AccountGetResponse, type AccountWithFollowerStats, type AccountsListResponse, type AnalyticsListResponse, type AnalyticsOverview, type AnalyticsSinglePostResponse, type ApiKey, type BulkUploadPostsData, type BulkUploadPostsError, type BulkUploadPostsResponse, type CaptionResponse, type CheckInstagramHashtagsData, type CheckInstagramHashtagsError, type CheckInstagramHashtagsResponse, type ClientOptions, type CompleteTelegramConnectData, type CompleteTelegramConnectError, type CompleteTelegramConnectResponse, type ConnectBlueskyCredentialsData, type ConnectBlueskyCredentialsError, type ConnectBlueskyCredentialsResponse, type CreateAccountGroupData, type CreateAccountGroupError, type CreateAccountGroupResponse, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyResponse, type CreateInviteTokenData, type CreateInviteTokenError, type CreateInviteTokenResponse, type CreatePostData, type CreatePostError, type CreatePostResponse, type CreateProfileData, type CreateProfileError, type CreateProfileResponse, type CreateQueueSlotData, type CreateQueueSlotError, type CreateQueueSlotResponse, type CreateWebhookSettingsData, type CreateWebhookSettingsError, type CreateWebhookSettingsResponse, type DeleteAccountData, type DeleteAccountError, type DeleteAccountGroupData, type DeleteAccountGroupError, type DeleteAccountGroupResponse, type DeleteAccountResponse, type DeleteApiKeyData, type DeleteApiKeyError, type DeleteApiKeyResponse, type DeleteInboxCommentData, type DeleteInboxCommentError, type DeleteInboxCommentResponse, type DeleteInboxReviewReplyData, type DeleteInboxReviewReplyError, type DeleteInboxReviewReplyResponse, type DeletePostData, type DeletePostError, type DeletePostResponse, type DeleteProfileData, type DeleteProfileError, type DeleteProfileResponse, type DeleteQueueSlotData, type DeleteQueueSlotError, type DeleteQueueSlotResponse, type DeleteWebhookSettingsData, type DeleteWebhookSettingsError, type DeleteWebhookSettingsResponse, type DownloadBlueskyMediaData, type DownloadBlueskyMediaError, type DownloadBlueskyMediaResponse, type DownloadFacebookVideoData, type DownloadFacebookVideoError, type DownloadFacebookVideoResponse, type DownloadFormat, type DownloadInstagramMediaData, type DownloadInstagramMediaError, type DownloadInstagramMediaResponse, type DownloadLinkedInVideoData, type DownloadLinkedInVideoError, type DownloadLinkedInVideoResponse, type DownloadResponse, type DownloadTikTokVideoData, type DownloadTikTokVideoError, type DownloadTikTokVideoResponse, type DownloadTwitterMediaData, type DownloadTwitterMediaError, type DownloadTwitterMediaResponse, type DownloadYouTubeVideoData, type DownloadYouTubeVideoError, type DownloadYouTubeVideoResponse, type ErrorResponse, type FacebookPlatformData, type FollowerStatsResponse, type GetAccountHealthData, type GetAccountHealthError, type GetAccountHealthResponse, type GetAllAccountsHealthData, type GetAllAccountsHealthError, type GetAllAccountsHealthResponse, type GetAnalyticsData, type GetAnalyticsError, type GetAnalyticsResponse, type GetConnectUrlData, type GetConnectUrlError, type GetConnectUrlResponse, type GetFacebookPagesData, type GetFacebookPagesError, type GetFacebookPagesResponse, type GetFollowerStatsData, type GetFollowerStatsError, type GetFollowerStatsResponse, type GetGmbLocationsData, type GetGmbLocationsError, type GetGmbLocationsResponse, type GetGoogleBusinessReviewsData, type GetGoogleBusinessReviewsError, type GetGoogleBusinessReviewsResponse, type GetInboxConversationData, type GetInboxConversationError, type GetInboxConversationMessagesData, type GetInboxConversationMessagesError, type GetInboxConversationMessagesResponse, type GetInboxConversationResponse, type GetInboxPostCommentsData, type GetInboxPostCommentsError, type GetInboxPostCommentsResponse, type GetLinkedInAggregateAnalyticsData, type GetLinkedInAggregateAnalyticsError, type GetLinkedInAggregateAnalyticsResponse, type GetLinkedInMentionsData, type GetLinkedInMentionsError, type GetLinkedInMentionsResponse, type GetLinkedInOrganizationsData, type GetLinkedInOrganizationsError, type GetLinkedInOrganizationsResponse, type GetLinkedInPostAnalyticsData, type GetLinkedInPostAnalyticsError, type GetLinkedInPostAnalyticsResponse, type GetLogData, type GetLogError, type GetLogResponse, type GetMediaPresignedUrlData, type GetMediaPresignedUrlError, type GetMediaPresignedUrlResponse, type GetNextQueueSlotData, type GetNextQueueSlotError, type GetNextQueueSlotResponse, type GetPendingOAuthDataData, type GetPendingOAuthDataError, type GetPendingOAuthDataResponse, type GetPinterestBoardsData, type GetPinterestBoardsError, type GetPinterestBoardsResponse, type GetPostData, type GetPostError, type GetPostLogsData, type GetPostLogsError, type GetPostLogsResponse, type GetPostResponse, type GetProfileData, type GetProfileError, type GetProfileResponse, type GetRedditFeedData, type GetRedditFeedError, type GetRedditFeedResponse, type GetRedditSubredditsData, type GetRedditSubredditsError, type GetRedditSubredditsResponse, type GetTelegramConnectStatusData, type GetTelegramConnectStatusError, type GetTelegramConnectStatusResponse, type GetUsageStatsError, type GetUsageStatsResponse, type GetUserData, type GetUserError, type GetUserResponse, type GetWebhookLogsData, type GetWebhookLogsError, type GetWebhookLogsResponse, type GetWebhookSettingsError, type GetWebhookSettingsResponse, type GetYouTubeDailyViewsData, type GetYouTubeDailyViewsError, type GetYouTubeDailyViewsResponse, type GetYouTubeTranscriptData, type GetYouTubeTranscriptError, type GetYouTubeTranscriptResponse, type GoogleBusinessPlatformData, type HandleOAuthCallbackData, type HandleOAuthCallbackError, type HandleOAuthCallbackResponse, type HashtagCheckResponse, type HashtagInfo, type HideInboxCommentData, type HideInboxCommentError, type HideInboxCommentResponse, type InitiateTelegramConnectData, type InitiateTelegramConnectError, type InitiateTelegramConnectResponse, type InstagramPlatformData, Late, LateApiError, type LikeInboxCommentData, type LikeInboxCommentError, type LikeInboxCommentResponse, type LinkedInAggregateAnalyticsDailyResponse, type LinkedInAggregateAnalyticsTotalResponse, type LinkedInPlatformData, type ListAccountGroupsError, type ListAccountGroupsResponse, type ListAccountsData, type ListAccountsError, type ListAccountsResponse, type ListApiKeysError, type ListApiKeysResponse, type ListFacebookPagesData, type ListFacebookPagesError, type ListFacebookPagesResponse, type ListGoogleBusinessLocationsData, type ListGoogleBusinessLocationsError, type ListGoogleBusinessLocationsResponse, type ListInboxCommentsData, type ListInboxCommentsError, type ListInboxCommentsResponse, type ListInboxConversationsData, type ListInboxConversationsError, type ListInboxConversationsResponse, type ListInboxReviewsData, type ListInboxReviewsError, type ListInboxReviewsResponse, type ListLinkedInOrganizationsData, type ListLinkedInOrganizationsError, type ListLinkedInOrganizationsResponse, type ListLogsData, type ListLogsError, type ListLogsResponse, type ListPinterestBoardsForSelectionData, type ListPinterestBoardsForSelectionError, type ListPinterestBoardsForSelectionResponse, type ListPostsData, type ListPostsError, type ListPostsResponse, type ListProfilesData, type ListProfilesError, type ListProfilesResponse, type ListQueueSlotsData, type ListQueueSlotsError, type ListQueueSlotsResponse, type ListSnapchatProfilesData, type ListSnapchatProfilesError, type ListSnapchatProfilesResponse, type ListUsersError, type ListUsersResponse, type MediaItem, type MediaUploadResponse, type Pagination, type ParameterLimitParam, type ParameterPageParam, type PinterestPlatformData, type PlatformAnalytics, type PlatformTarget, type Post, type PostAnalytics, type PostCreateResponse, type PostDeleteResponse, type PostGetResponse, type PostLog, type PostLogDetail, type PostRetryResponse, type PostUpdateResponse, type PostsListResponse, type PreviewQueueData, type PreviewQueueError, type PreviewQueueResponse, type Profile, type ProfileCreateResponse, type ProfileDeleteResponse, type ProfileGetResponse, type ProfileUpdateResponse, type ProfilesListResponse, type QueueDeleteResponse, type QueueNextSlotResponse, type QueuePreviewResponse, type QueueSchedule, type QueueSlot, type QueueSlotsResponse, type QueueUpdateResponse, RateLimitError, type ReplyToInboxPostData, type ReplyToInboxPostError, type ReplyToInboxPostResponse, type ReplyToInboxReviewData, type ReplyToInboxReviewError, type ReplyToInboxReviewResponse, type RetryPostData, type RetryPostError, type RetryPostResponse, type SearchRedditData, type SearchRedditError, type SearchRedditResponse, type SelectFacebookPageData, type SelectFacebookPageError, type SelectFacebookPageResponse, type SelectGoogleBusinessLocationData, type SelectGoogleBusinessLocationError, type SelectGoogleBusinessLocationResponse, type SelectLinkedInOrganizationData, type SelectLinkedInOrganizationError, type SelectLinkedInOrganizationResponse, type SelectPinterestBoardData, type SelectPinterestBoardError, type SelectPinterestBoardResponse, type SelectSnapchatProfileData, type SelectSnapchatProfileError, type SelectSnapchatProfileResponse, type SendInboxMessageData, type SendInboxMessageError, type SendInboxMessageResponse, type SendPrivateReplyToCommentData, type SendPrivateReplyToCommentError, type SendPrivateReplyToCommentResponse, type SnapchatPlatformData, type SocialAccount, type TelegramPlatformData, type TestWebhookData, type TestWebhookError, type TestWebhookResponse, type ThreadsPlatformData, type TikTokPlatformData, type TikTokSettings, type TranscriptResponse, type TranscriptSegment, type TwitterPlatformData, type UnhideInboxCommentData, type UnhideInboxCommentError, type UnhideInboxCommentResponse, type UnlikeInboxCommentData, type UnlikeInboxCommentError, type UnlikeInboxCommentResponse, type UpdateAccountData, type UpdateAccountError, type UpdateAccountGroupData, type UpdateAccountGroupError, type UpdateAccountGroupResponse, type UpdateAccountResponse, type UpdateFacebookPageData, type UpdateFacebookPageError, type UpdateFacebookPageResponse, type UpdateGmbLocationData, type UpdateGmbLocationError, type UpdateGmbLocationResponse, type UpdateInboxConversationData, type UpdateInboxConversationError, type UpdateInboxConversationResponse, type UpdateLinkedInOrganizationData, type UpdateLinkedInOrganizationError, type UpdateLinkedInOrganizationResponse, type UpdatePinterestBoardsData, type UpdatePinterestBoardsError, type UpdatePinterestBoardsResponse, type UpdatePostData, type UpdatePostError, type UpdatePostResponse, type UpdateProfileData, type UpdateProfileError, type UpdateProfileResponse, type UpdateQueueSlotData, type UpdateQueueSlotError, type UpdateQueueSlotResponse, type UpdateRedditSubredditsData, type UpdateRedditSubredditsError, type UpdateRedditSubredditsResponse, type UpdateWebhookSettingsData, type UpdateWebhookSettingsError, type UpdateWebhookSettingsResponse, type UploadTokenResponse, type UploadTokenStatusResponse, type UploadedFile, type UsageStats, type User, type UserGetResponse, type UsersListResponse, ValidationError, type Webhook, type WebhookLog, type WebhookPayloadAccountConnected, type WebhookPayloadAccountDisconnected, type WebhookPayloadMessage, type WebhookPayloadPost, type YouTubeDailyViewsResponse, type YouTubePlatformData, type YouTubeScopeMissingResponse, type action, type aggregation, type aggregation2, type aggregation3, type billingPeriod, type commercialContentType, type contentType, type contentType2, Late as default, type direction, type disconnectionType, type errorCategory, type errorSource, type event, type event2, type event3, type event4, type event5, type graduationStrategy, type mediaType, parseApiError, type parseMode, type platform, type platform2, type status, type status2, type status3, type status4, type status5, type status6, type type, type type2, type type3, type visibility };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "The official Node.js library for the Late API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -346,6 +346,15 @@ export const listPosts = <ThrowOnError extends boolean = false>(options?: Option
346
346
  * - For immediate posts (`publishNow: true`): The response includes `platformPostUrl` in each platform entry under `post.platforms[]`.
347
347
  * - For scheduled posts: Fetch the post via `GET /v1/posts/{postId}` after the scheduled time; `platformPostUrl` will be populated once published.
348
348
  *
349
+ * **Content/Caption requirements:**
350
+ * - `content` (caption/description) is optional when:
351
+ * - Media is attached (`mediaItems` or per-platform `customMedia`)
352
+ * - All platforms have `customContent` set
353
+ * - Posting only to YouTube (title is used instead)
354
+ * - Text-only posts (no media) require `content`
355
+ * - Stories do not use captions (content is ignored)
356
+ * - Reels, feed posts, and other media posts can have optional captions
357
+ *
349
358
  * Platform constraints:
350
359
  * - YouTube requires a video in mediaItems; optional custom thumbnail via MediaItem.thumbnail.
351
360
  * - Instagram and TikTok require media; do not mix videos and images for TikTok.
@@ -357,6 +366,14 @@ export const listPosts = <ThrowOnError extends boolean = false>(options?: Option
357
366
  * - Bluesky supports up to 4 images per post. Images may be automatically recompressed to ≤ ~1MB to satisfy Bluesky's blob limit. When no media is attached, a link preview may be generated for URLs in the text.
358
367
  * - Snapchat requires media (single image or video); set contentType to 'story', 'saved_story', or 'spotlight' in platformSpecificData. Stories are ephemeral (24h), Saved Stories are permanent, Spotlight is for video content.
359
368
  *
369
+ * **Multi-page/multi-location posting:**
370
+ * Some platforms allow posting to multiple pages, organizations, or locations from a single account connection.
371
+ * Use the same accountId multiple times with different targets in platformSpecificData:
372
+ * - Facebook: `pageId` - post to multiple Facebook Pages (list via GET /v1/accounts/{id}/facebook-page)
373
+ * - LinkedIn: `organizationUrn` - post to multiple organizations (list via GET /v1/accounts/{id}/linkedin-organizations)
374
+ * - Google Business: `locationId` - post to multiple locations (list via GET /v1/accounts/{id}/gmb-locations)
375
+ * - Reddit: `subreddit` - post to multiple subreddits from the same account
376
+ *
360
377
  */
361
378
  export const createPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreatePostData, ThrowOnError>) => {
362
379
  return (options?.client ?? client).post<CreatePostResponse, CreatePostError, ThrowOnError>({
@@ -1467,7 +1484,7 @@ export const getPostLogs = <ThrowOnError extends boolean = false>(options: Optio
1467
1484
  * Fetch conversations (DMs) from all connected messaging accounts in a single API call.
1468
1485
  * Supports filtering by profile and platform. Results are aggregated and deduplicated.
1469
1486
  *
1470
- * **Supported platforms:** Facebook, Instagram, Bluesky, Reddit, Telegram
1487
+ * **Supported platforms:** Facebook, Instagram, Twitter/X, Bluesky, Reddit, Telegram
1471
1488
  *
1472
1489
  */
1473
1490
  export const listInboxConversations = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListInboxConversationsData, ThrowOnError>) => {
@@ -1535,7 +1552,7 @@ export const sendInboxMessage = <ThrowOnError extends boolean = false>(options:
1535
1552
  * Fetch posts with their comment counts from all connected accounts.
1536
1553
  * Aggregates data from multiple accounts in a single API call.
1537
1554
  *
1538
- * **Supported platforms:** Facebook, Instagram, Bluesky, YouTube, LinkedIn, Reddit, TikTok (write-only)
1555
+ * **Supported platforms:** Facebook, Instagram, Twitter/X, Bluesky, Threads, YouTube, LinkedIn, Reddit, TikTok (write-only)
1539
1556
  *
1540
1557
  */
1541
1558
  export const listInboxComments = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListInboxCommentsData, ThrowOnError>) => {
@@ -1609,7 +1626,7 @@ export const unhideInboxComment = <ThrowOnError extends boolean = false>(options
1609
1626
  * Like a comment
1610
1627
  * Like or upvote a comment on a post.
1611
1628
  *
1612
- * **Supported platforms:** Facebook, Bluesky, Reddit
1629
+ * **Supported platforms:** Facebook, Twitter/X, Bluesky, Reddit
1613
1630
  *
1614
1631
  * For Bluesky, the `cid` (content identifier) is required in the request body.
1615
1632
  *
@@ -1625,7 +1642,7 @@ export const likeInboxComment = <ThrowOnError extends boolean = false>(options:
1625
1642
  * Unlike a comment
1626
1643
  * Remove a like from a comment.
1627
1644
  *
1628
- * **Supported platforms:** Facebook, Bluesky, Reddit
1645
+ * **Supported platforms:** Facebook, Twitter/X, Bluesky, Reddit
1629
1646
  *
1630
1647
  * For Bluesky, the `likeUri` query parameter is required.
1631
1648
  *
@@ -127,6 +127,7 @@ export type ErrorResponse = {
127
127
  * - Multiple videos in the same post are not supported.
128
128
  * - Stories require media (single image or video); text captions are not displayed with stories.
129
129
  * - Stories are ephemeral (disappear after 24 hours).
130
+ * - Use pageId to post to multiple pages from the same account connection.
130
131
  *
131
132
  */
132
133
  export type FacebookPlatformData = {
@@ -139,7 +140,10 @@ export type FacebookPlatformData = {
139
140
  */
140
141
  firstComment?: string;
141
142
  /**
142
- * Target Facebook Page ID. If omitted, uses the selected/default page on the connection.
143
+ * Target Facebook Page ID for multi-page posting.
144
+ * If omitted, uses the selected/default page on the connection.
145
+ * Use GET /api/v1/accounts/{id}/facebook-page to list available pages.
146
+ *
143
147
  */
144
148
  pageId?: string;
145
149
  };
@@ -166,9 +170,18 @@ export type aggregation = 'daily' | 'weekly' | 'monthly';
166
170
  * - Images must be publicly accessible URLs
167
171
  * - Call-to-action buttons drive user engagement
168
172
  * - Posts appear on your Google Business Profile and in Google Search/Maps
173
+ * - Use locationId to post to multiple locations from the same account connection
169
174
  *
170
175
  */
171
176
  export type GoogleBusinessPlatformData = {
177
+ /**
178
+ * Target Google Business location ID for multi-location posting.
179
+ * Format: "locations/123456789"
180
+ * If omitted, uses the selected/default location on the connection.
181
+ * Use GET /api/v1/accounts/{id}/gmb-locations to list available locations.
182
+ *
183
+ */
184
+ locationId?: string;
172
185
  /**
173
186
  * Optional call-to-action button displayed on the post
174
187
  */
@@ -405,9 +418,18 @@ export type aggregation3 = 'TOTAL';
405
418
  * - Single PDF document posts are supported (max 100MB, ~300 pages). Documents cannot be mixed with other media.
406
419
  * - Post ID is returned in the x-restli-id response header.
407
420
  * - Link previews are automatically generated for URLs when no media is attached (can be disabled with disableLinkPreview).
421
+ * - Use organizationUrn to post to multiple organizations from the same account connection.
408
422
  *
409
423
  */
410
424
  export type LinkedInPlatformData = {
425
+ /**
426
+ * Target LinkedIn Organization URN for multi-organization posting.
427
+ * Format: "urn:li:organization:123456789"
428
+ * If omitted, uses the selected/default organization on the connection.
429
+ * Use GET /api/v1/accounts/{id}/linkedin-organizations to list available organizations.
430
+ *
431
+ */
432
+ organizationUrn?: string;
411
433
  /**
412
434
  * Optional first comment to add after the post is created
413
435
  */
@@ -585,8 +607,63 @@ export type PlatformTarget = {
585
607
  * Timestamp when the post was published to this platform
586
608
  */
587
609
  publishedAt?: string;
610
+ /**
611
+ * Human-readable error message when status is 'failed'.
612
+ * Contains platform-specific error details explaining why the publish failed.
613
+ * Examples:
614
+ * - "Instagram access token has expired. Please reconnect your account."
615
+ * - "Post text exceeds the 500 character limit for Threads."
616
+ * - "You do not have enough karma to post in this subreddit."
617
+ * - "Video is too long for Reels. Facebook Reels must be 90 seconds or less."
618
+ *
619
+ */
620
+ errorMessage?: string;
621
+ /**
622
+ * Error category for programmatic handling:
623
+ * - auth_expired: Token expired or revoked, account needs reconnection
624
+ * - user_content: Content doesn't meet platform requirements (too long, wrong format, etc.)
625
+ * - user_abuse: Rate limits, spam detection, excessive posting
626
+ * - account_issue: Account configuration problems (missing board, inactive account)
627
+ * - platform_rejected: Platform rules violated (banned, suspended, policy violation)
628
+ * - platform_error: Platform-side issues (5xx errors, maintenance)
629
+ * - system_error: Late infrastructure issues (timeouts, network errors)
630
+ * - unknown: Unclassified error
631
+ *
632
+ */
633
+ errorCategory?: 'auth_expired' | 'user_content' | 'user_abuse' | 'account_issue' | 'platform_rejected' | 'platform_error' | 'system_error' | 'unknown';
634
+ /**
635
+ * Who/what caused the error:
636
+ * - user: User action required (fix content, reconnect account)
637
+ * - platform: Platform-side issue (outage, API change)
638
+ * - system: Late system issue (rare)
639
+ *
640
+ */
641
+ errorSource?: 'user' | 'platform' | 'system';
588
642
  };
589
643
 
644
+ /**
645
+ * Error category for programmatic handling:
646
+ * - auth_expired: Token expired or revoked, account needs reconnection
647
+ * - user_content: Content doesn't meet platform requirements (too long, wrong format, etc.)
648
+ * - user_abuse: Rate limits, spam detection, excessive posting
649
+ * - account_issue: Account configuration problems (missing board, inactive account)
650
+ * - platform_rejected: Platform rules violated (banned, suspended, policy violation)
651
+ * - platform_error: Platform-side issues (5xx errors, maintenance)
652
+ * - system_error: Late infrastructure issues (timeouts, network errors)
653
+ * - unknown: Unclassified error
654
+ *
655
+ */
656
+ export type errorCategory = 'auth_expired' | 'user_content' | 'user_abuse' | 'account_issue' | 'platform_rejected' | 'platform_error' | 'system_error' | 'unknown';
657
+
658
+ /**
659
+ * Who/what caused the error:
660
+ * - user: User action required (fix content, reconnect account)
661
+ * - platform: Platform-side issue (outage, API change)
662
+ * - system: Late system issue (rare)
663
+ *
664
+ */
665
+ export type errorSource = 'user' | 'platform' | 'system';
666
+
590
667
  export type Post = {
591
668
  _id?: string;
592
669
  userId?: (string | User);
@@ -1593,6 +1670,15 @@ export type YouTubePlatformData = {
1593
1670
  *
1594
1671
  */
1595
1672
  containsSyntheticMedia?: boolean;
1673
+ /**
1674
+ * YouTube video category ID. Defaults to '22' (People & Blogs).
1675
+ * Common categories: 1 (Film & Animation), 2 (Autos & Vehicles), 10 (Music),
1676
+ * 15 (Pets & Animals), 17 (Sports), 20 (Gaming), 22 (People & Blogs),
1677
+ * 23 (Comedy), 24 (Entertainment), 25 (News & Politics), 26 (Howto & Style),
1678
+ * 27 (Education), 28 (Science & Technology).
1679
+ *
1680
+ */
1681
+ categoryId?: string;
1596
1682
  };
1597
1683
 
1598
1684
  export type YouTubeScopeMissingResponse = {
@@ -1859,6 +1945,14 @@ export type GetAnalyticsData = {
1859
1945
  * Sort by date or engagement
1860
1946
  */
1861
1947
  sortBy?: 'date' | 'engagement';
1948
+ /**
1949
+ * Filter by post source:
1950
+ * - `late` - Only posts scheduled/published via Late API
1951
+ * - `external` - Only posts synced from the platform (not posted via Late)
1952
+ * - `all` - All posts (default)
1953
+ *
1954
+ */
1955
+ source?: 'all' | 'late' | 'external';
1862
1956
  /**
1863
1957
  * Inclusive upper bound
1864
1958
  */
@@ -2103,6 +2197,11 @@ export type ListPostsError = ({
2103
2197
  export type CreatePostData = {
2104
2198
  body: {
2105
2199
  title?: string;
2200
+ /**
2201
+ * Post caption/text content. Optional when media is attached (images, videos, etc.).
2202
+ * Required for text-only posts. Can also be omitted if all platforms have customContent set.
2203
+ *
2204
+ */
2106
2205
  content?: string;
2107
2206
  mediaItems?: Array<{
2108
2207
  type?: 'image' | 'video' | 'gif' | 'document';
@@ -4424,7 +4523,7 @@ export type ListInboxConversationsData = {
4424
4523
  /**
4425
4524
  * Filter by platform
4426
4525
  */
4427
- platform?: 'facebook' | 'instagram' | 'bluesky' | 'reddit' | 'telegram';
4526
+ platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram';
4428
4527
  /**
4429
4528
  * Filter by profile ID
4430
4529
  */
@@ -4492,6 +4591,9 @@ export type ListInboxConversationsError = ({
4492
4591
 
4493
4592
  export type GetInboxConversationData = {
4494
4593
  path: {
4594
+ /**
4595
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4596
+ */
4495
4597
  conversationId: string;
4496
4598
  };
4497
4599
  query: {
@@ -4534,6 +4636,9 @@ export type UpdateInboxConversationData = {
4534
4636
  status: 'active' | 'archived';
4535
4637
  };
4536
4638
  path: {
4639
+ /**
4640
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4641
+ */
4537
4642
  conversationId: string;
4538
4643
  };
4539
4644
  };
@@ -4555,6 +4660,9 @@ export type UpdateInboxConversationError = ({
4555
4660
 
4556
4661
  export type GetInboxConversationMessagesData = {
4557
4662
  path: {
4663
+ /**
4664
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4665
+ */
4558
4666
  conversationId: string;
4559
4667
  };
4560
4668
  query: {
@@ -4616,6 +4724,9 @@ export type SendInboxMessageData = {
4616
4724
  message: string;
4617
4725
  };
4618
4726
  path: {
4727
+ /**
4728
+ * The conversation ID (id field from list conversations endpoint). This is the platform-specific conversation identifier, not an internal database ID.
4729
+ */
4619
4730
  conversationId: string;
4620
4731
  };
4621
4732
  };
@@ -4664,7 +4775,7 @@ export type ListInboxCommentsData = {
4664
4775
  /**
4665
4776
  * Filter by platform
4666
4777
  */
4667
- platform?: 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'reddit' | 'bluesky' | 'tiktok';
4778
+ platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'threads' | 'youtube' | 'linkedin' | 'reddit' | 'tiktok';
4668
4779
  /**
4669
4780
  * Filter by profile ID
4670
4781
  */