upload-post 2.13.0 → 2.14.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.
Files changed (4) hide show
  1. package/README.md +110 -9
  2. package/index.d.ts +364 -17
  3. package/index.js +371 -16
  4. package/package.json +2 -2
package/README.md CHANGED
@@ -539,7 +539,8 @@ await client.upload('./video.mp4', {
539
539
 
540
540
  tiktokCoverImageUrl: 'https://example.com/cover.jpg',
541
541
  tiktokIsAiGenerated: false,
542
- tiktokUploadToDraft: false, // true sends it to drafts and ignores the rest
542
+ tiktokUploadToDraft: true, // same draft as postMode: 'MEDIA_UPLOAD'
543
+ // postMode: 'MEDIA_UPLOAD', // alias of the same draft
543
544
  });
544
545
  ```
545
546
 
@@ -556,8 +557,10 @@ await client.upload('./video.mp4', {
556
557
  | `tiktokLocationName` | string | Required whenever `tiktokLocationId` is set |
557
558
  | `tiktokCoverImageUrl` | string | Custom cover image URL |
558
559
  | `tiktokIsAiGenerated` | boolean | AI-generated content disclosure |
559
- | `tiktokUploadToDraft` | boolean | Publish to drafts; TikTok ignores the rest of the post settings |
560
+ | `tiktokUploadToDraft` | boolean | Publish to drafts (same as `postMode: 'MEDIA_UPLOAD'` / `tiktokPostMode: 'MEDIA_UPLOAD'`). Aliases: `uploadToDraft`, `tiktok_upload_to_draft`, `upload_to_draft`. TikTok ignores the rest of the post settings |
560
561
  | `tiktokPhotoCoverIndex` | number | Cover photo index for photo posts (0-based) |
562
+ | `tiktokIsAdsOnly` | boolean | Only show the video in ads |
563
+ | `tiktokTtoInviteLink` | string | TikTok One invite link (requires branded content) |
561
564
 
562
565
  ## Platform-Specific Options
563
566
 
@@ -568,9 +571,11 @@ await client.upload('./video.mp4', {
568
571
  - `tiktokDisableStitch` - Disable stitch
569
572
  - `tiktokCoverTimestamp` - Timestamp in ms for cover
570
573
  - `tiktokIsAigc` - AI-generated content flag
571
- - `tiktokPostMode` - DIRECT_POST or MEDIA_UPLOAD
574
+ - `tiktokPostMode` / `postMode` - DIRECT_POST or MEDIA_UPLOAD. `MEDIA_UPLOAD` is the same draft as `tiktokUploadToDraft`
572
575
  - `brandContentToggle` - Branded content toggle
573
576
  - `brandOrganicToggle` - Brand organic toggle
577
+ - `tiktokIsAdsOnly` - Only show the video in ads
578
+ - `tiktokTtoInviteLink` - TikTok One invite link (requires branded content)
574
579
 
575
580
  > **Which privacy levels are available is decided by TikTok per account.** A
576
581
  > private account, for example, is offered `FOLLOWER_OF_CREATOR`,
@@ -591,10 +596,13 @@ for those options.
591
596
  - `tiktokMusicId` - Commercial Music Library track id (see `getTiktokTrendingMusic`)
592
597
  - `tiktokLocationId` / `tiktokLocationName` - Location tag, both required together
593
598
  - `tiktokIsAiGenerated` - AI-generated content disclosure
599
+ - `tiktokPostMode` / `postMode` - DIRECT_POST or MEDIA_UPLOAD. `MEDIA_UPLOAD` is the same draft as `tiktokUploadToDraft`
600
+ - `tiktokUploadToDraft` - Publish to drafts (same draft as `postMode: 'MEDIA_UPLOAD'`)
594
601
 
595
602
  > TikTok's photo contract takes the music track id alone: `tiktokMusicVolume`,
596
- > `tiktokMusicStart`, `tiktokMusicEnd`, `tiktokOriginalSoundVolume`,
597
- > `tiktokCoverImageUrl` and `tiktokUploadToDraft` are video-only.
603
+ > `tiktokMusicStart`, `tiktokMusicEnd`, `tiktokOriginalSoundVolume` and
604
+ > `tiktokCoverImageUrl` are video-only. Draft (`tiktokUploadToDraft` /
605
+ > `postMode: 'MEDIA_UPLOAD'`) works on video and photos.
598
606
 
599
607
  ### Instagram
600
608
  - `instagramMediaType` - REELS, STORIES, IMAGE
@@ -605,6 +613,7 @@ for those options.
605
613
  - `instagramUserTags` - Comma-separated user tags
606
614
  - `instagramLocationId` - Location ID
607
615
  - `instagramThumbOffset` - Thumbnail offset
616
+ - `instagramAltText` - Alt text on photos (string or list, ≤1000 chars each)
608
617
 
609
618
  ### YouTube
610
619
  - `youtubeTags` - Array or comma-separated tags
@@ -621,10 +630,19 @@ for those options.
621
630
  - `youtubeAllowedCountries` / `youtubeBlockedCountries` - Country restrictions
622
631
  - `youtubeHasPaidProductPlacement` - Paid placement flag
623
632
  - `youtubeRecordingDate` - Recording date (ISO 8601)
633
+ - `youtubeNotifySubscribers` - Notify subscribers (default true)
634
+ - `youtubePublishAt` - RFC3339 time; video stays private until then
624
635
 
625
636
  ### LinkedIn
626
637
  - `linkedinVisibility` - PUBLIC, CONNECTIONS, LOGGED_IN, CONTAINER
627
638
  - `targetLinkedinPageId` - Page ID for organization posts
639
+ - `linkedinAltText` - Alt text per image
640
+ - `linkedinDisableReshare` - Disable reshare
641
+ - `linkedinLinkTitle` / `linkedinLinkDescription` / `linkedinThumbnailAltText` - Link-share overrides
642
+ - `linkedinTargetGeoLocations` / `linkedinTargetIndustries` / `linkedinTargetSeniorities` / `linkedinTargetJobFunctions` / `linkedinTargetStaffCountRanges` / `linkedinTargetInterfaceLocales` / `linkedinTargetDegrees` / `linkedinTargetFieldsOfStudy` / `linkedinTargetOrganizations` - Organic Page targeting
643
+ - `linkedinTargetEntities` - Raw targeting facets JSON
644
+ - `linkedinTargetCheckAudience` - Reject if LinkedIn reports audience under 300
645
+ - `linkedinSubtitles` / `linkedinSubtitlesUrl` / `linkedinSubtitlesText` - English SRT captions on video
628
646
 
629
647
  ### Facebook
630
648
  - `facebookPageId` - Facebook Page ID (required)
@@ -632,20 +650,31 @@ for those options.
632
650
  - `facebookMediaType` - REELS, STORIES, VIDEO (VIDEO for normal page videos with no 9:16 restriction)
633
651
  - `thumbnailUrl` - URL for custom video thumbnail (only when facebookMediaType is VIDEO)
634
652
  - `facebookLinkUrl` - URL for text posts
653
+ - `facebookAltText` - Alt text per photo
654
+ - `facebookPlaceId` - Place ID
655
+ - `facebookTargeting` / `facebookFeedTargeting` - Audience JSON
656
+ - `facebookCallToAction` / `facebookChildAttachments` / `facebookMultiShareEndCard` - Link posts
657
+ - `facebookIsAiGenerated` - AI disclosure on Reels
658
+ - `facebookUnpublishedContentType` - DRAFT, INLINE_CREATED, ADS_POST, PUBLISHED (do not send SCHEDULED; use `scheduledDate`)
659
+ - `facebookNoStory` / `facebookSecret` - Page video flags
660
+ - `facebookCollaborators` - Page IDs to invite on Reels
635
661
 
636
662
  ### Pinterest
637
663
  - `pinterestBoardId` - Board ID
638
664
  - `pinterestLink` - Destination link
639
665
  - `pinterestAltText` - Alt text for photos
640
666
  - `pinterestCoverImageUrl` - Cover image URL (video)
641
- - `pinterestCoverImageKeyFrameTime` - Key frame time in ms
667
+ - `pinterestCoverImageKeyFrameTime` - Key frame time in seconds (values larger than the video duration are treated as milliseconds)
668
+ - `pinterestBoardSectionId` - Board section ID
669
+ - `pinterestAiDisclosures` - `AI_MODIFIED` and/or `SYNTHETIC_PERFORMER`
670
+ - `pinterestCarouselTitles` / `pinterestCarouselDescriptions` / `pinterestCarouselLinks` / `pinterestCarouselIndex` - 2–5 photo carousel
642
671
 
643
672
  ### X (Twitter)
644
673
  - `xReplySettings` - everyone, following, mentionedUsers, subscribers, verified
645
674
  - `xNullcast` - Promoted-only post
646
675
  - `xTaggedUserIds` - User IDs to tag
647
676
  - `xPlaceId` / `xGeoPlaceId` - Location place ID
648
- - `xQuoteTweetId` - Tweet ID to quote
677
+ - `xQuoteTweetId` - Tweet ID to quote (X API Enterprise plan)
649
678
  - `xPollOptions` - Poll options (2-4)
650
679
  - `xPollDuration` - Poll duration in minutes (5-10080)
651
680
  - `xForSuperFollowersOnly` - Exclusive for super followers
@@ -654,15 +683,87 @@ for those options.
654
683
  - `xCardUri` - Card URI for Twitter Cards
655
684
  - `xLongTextAsPost` - Post long text as single post
656
685
  - `xThreadImageLayout` - Comma-separated image layout for thread (e.g. "4,4" or "2,3,1")
686
+ - `xAltText` - Alt text (≤1000 chars)
687
+ - `xSubtitles` / `xSubtitlesUrl` / `xSubtitlesLanguage` / `xSubtitlesName` - Video captions
688
+ - `xPaidPartnership` - Paid partnership label
689
+ - `xArticleTitle` / `xArticleBody` / `xArticleContentState` / `xArticleDraft` / `xArticleCoverMedia` - X Articles (Premium)
657
690
 
658
691
  ### Threads
659
692
  - `threadsLongTextAsPost` - Post long text as single post (vs thread)
660
- - `threadsThreadMediaLayout` - Comma-separated list of how many media items to include in each Threads post. Each value must be 1-10, and the total must equal the number of files. Example: '5,5' splits 10 items into 2 posts with 5 each. If omitted and more than 10 items are provided, auto-chunks into groups of 10.
693
+ - `threadsThreadMediaLayout` - Comma-separated list of how many media items to include in each Threads post. Each value must be 1-20, and the total must equal the number of files. Example: '5,5' splits 10 items into 2 posts with 5 each. If omitted and more than 20 items are provided, auto-chunks into groups of 20.
661
694
  - `threadsTopicTag` - Topic tag for the Threads post (1-50 characters, no periods or ampersands). One tag per post. Helps increase reach.
695
+ - `threadsReplyControl` - Who can reply (`everyone`, `accounts_you_follow`, `mentioned_only`, `parent_post_author_only`, `followers_only`)
696
+ - `threadsAltText` - Alt text per image/video
697
+ - `threadsReplyToId` / `threadsQuotePostId` - Reply or quote
698
+ - `threadsLinkAttachment` - Force a link preview (text)
699
+ - `threadsPollOptions` - 2–4 poll options (text)
700
+ - `threadsAutoPublishText` - Skip the second publish call on text
662
701
 
663
702
  ### Reddit
703
+
704
+ Reddit is currently unavailable. Uploads, OAuth and comments return HTTP 503 with `error_code=reddit_unavailable`.
705
+
664
706
  - `redditSubreddit` - Subreddit name (without r/)
665
707
  - `redditFlairId` - Flair template ID
708
+ - `redditNsfw` / `redditSpoiler` / `redditResubmit` / `redditSendReplies` - Post flags
709
+ - `redditFlairText` - Custom text for editable flairs
710
+ - `redditGalleryCaptions` / `redditGalleryUrls` - Per-image captions and outbound URLs
711
+
712
+ ### Bluesky
713
+ - `blueskyAltText` - Alt text per image/video
714
+ - `blueskyLangs` - Up to 3 BCP-47 language codes
715
+ - `blueskyLabels` - `porn`, `sexual`, `nudity`, `graphic-media`
716
+ - `blueskyGallery` - Publish up to 20 images as a gallery
717
+ - `blueskyThreadgate` / `blueskyReplySettings` - Who can reply
718
+ - `blueskyPostgate` / `blueskyQuoteSettings` - Block quotes with `disable_quotes`
719
+ - `blueskyQuoteUri` - Quote a post (URL or `at://` URI)
720
+
721
+ ### Discord
722
+ - `discordThreadId` / `discordThreadName` / `discordAppliedTags` - Thread / forum
723
+ - `discordEmbeds` / `discordUsername` / `discordAvatarUrl` / `discordAllowedMentions`
724
+ - `discordAltText` / `discordFlags` / `discordTts` / `discordPoll` / `discordMaxFileMb`
725
+
726
+ ### Telegram
727
+ - `telegramParseMode` - `MarkdownV2` or `HTML`
728
+ - `telegramMessageThreadId` - Forum topic
729
+ - `telegramDisableNotification` / `telegramProtectContent` / `telegramHasSpoiler`
730
+ - `telegramLinkPreview` / `telegramReplyMarkup` / `telegramCaptionOverflow` (`truncate` or `split`)
731
+ - `telegramAsDocument` / `telegramMediaUrls`
732
+
733
+ ### Mastodon
734
+ - `mastodonVisibility` - `public`, `unlisted`, `private`, `direct`
735
+ - `mastodonSensitive` / `mastodonSpoilerText` / `mastodonLanguage` / `mastodonAltText`
736
+ - `mastodonPollOptions` / `mastodonPollExpiresIn` / `mastodonPollMultiple`
737
+ - `mastodonScheduledAt` - ISO 8601, at least 5 minutes ahead
738
+
739
+ ### WordPress
740
+ - `wordpressStatus` / `wordpressDate` / `wordpressCategories` / `wordpressTags`
741
+ - `wordpressExcerpt` / `wordpressSlug` / `wordpressAltText` / `wordpressMediaCaption`
742
+ - `wordpressBlockFormat`
743
+
744
+ ### Lemmy
745
+ - `lemmyUrl` / `lemmyCommunity` / `lemmyNsfw` / `lemmyLanguageId` / `lemmyAltText`
746
+
747
+ ### Slack
748
+ - `slackMarkdown` / `slackBlocks` / `slackMrkdwn` / `slackAltText`
749
+ - `slackFirstCommentMode` - `separate` (default) or `inline`
750
+
751
+ ### Nostr
752
+ - `nostrKind` - `1`, `20`, `22`, `34235`, `30023`
753
+ - `nostrLongForm` - kind 30023
754
+
755
+ ### Dev.to
756
+ - `devtoTags` / `devtoCanonicalUrl` / `devtoDescription` / `devtoMainImage` / `devtoSeries` / `devtoPublished`
757
+
758
+ ### Hashnode
759
+ - `hashnodeTags` / `hashnodeOriginalArticleUrl` / `hashnodeSubtitle` / `hashnodeCoverImageUrl`
760
+ - `hashnodeDraft` / `hashnodeBody` (alias `content`)
761
+
762
+ ### Whop
763
+ - `whopBody` / `whopPinned` / `whopIsMention` / `whopPaywallAmount` / `whopPaywallCurrency` / `whopAttachmentIds`
764
+
765
+ ### Listmonk
766
+ - `listmonkContentType` / `listmonkSendAt` / `listmonkLists` / `listmonkTemplateId` / `listmonkMediaIds`
666
767
 
667
768
  ## Common Options
668
769
 
@@ -714,7 +815,7 @@ await client.uploadText({
714
815
  });
715
816
  ```
716
817
 
717
- Also available: `gbpTopicType: 'EVENT'` with `gbpEventTitle` / `gbpEventStartDate` / `gbpEventStartTime` / `gbpEventEndDate` / `gbpEventEndTime`, a call-to-action via `gbpCtaType` + `gbpCtaUrl`, and `gbpMediaUrl` / `gbpMediaFormat`.
818
+ Also available: `gbpTopicType: 'EVENT'` with `gbpEventTitle` / `gbpEventStartDate` / `gbpEventStartTime` / `gbpEventEndDate` / `gbpEventEndTime`, a call-to-action via `gbpCtaType` + `gbpCtaUrl`, and `gbpMediaUrl` / `gbpMediaFormat`. `gbpLanguageCode` defaults to `en`. Offer aliases: `gbpCouponCode` → `gbpOfferCoupon`, `gbpRedeemUrl` → `gbpOfferRedeemUrl`, `gbpTerms` → `gbpOfferTerms`.
718
819
 
719
820
  ### Gallery photos
720
821