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