upload-post 2.7.0 → 2.8.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 +0 -3
- package/index.d.ts +4 -4
- package/index.js +6 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -316,9 +316,6 @@ These options work across all upload methods:
|
|
|
316
316
|
| `addToQueue` | Add to posting queue |
|
|
317
317
|
| `maxPostsPerSlot` | Max posts per queue slot (overrides profile setting) |
|
|
318
318
|
| `asyncUpload` | Process asynchronously (default: true) |
|
|
319
|
-
| `autogenerate` | If true, AI generates native per-platform title/description from the media and fills any field left empty |
|
|
320
|
-
| `autogenerateTitle` / `autogenerateDescription` | Generate only the title or only the description with AI |
|
|
321
|
-
| `autogenerateLanguage` | Force the AI output language (ISO code); omit to auto-detect from the media |
|
|
322
319
|
| `idempotencyKey` | Collapses duplicate uploads within 24h. Reuse the same value when retrying. Alias: `requestId` |
|
|
323
320
|
|
|
324
321
|
## Google Business Profile
|
package/index.d.ts
CHANGED
|
@@ -69,13 +69,9 @@ declare module 'upload-post' {
|
|
|
69
69
|
/** Process upload asynchronously (default: true) */
|
|
70
70
|
asyncUpload?: boolean;
|
|
71
71
|
/** If true, AI generates native per-platform title/description from the media and fills any field left empty */
|
|
72
|
-
autogenerate?: boolean;
|
|
73
72
|
/** Generate only the title with AI */
|
|
74
|
-
autogenerateTitle?: boolean;
|
|
75
73
|
/** Generate only the description with AI */
|
|
76
|
-
autogenerateDescription?: boolean;
|
|
77
74
|
/** Force the AI output language (ISO code); omit to auto-detect from the media */
|
|
78
|
-
autogenerateLanguage?: string;
|
|
79
75
|
|
|
80
76
|
// Platform-specific title overrides
|
|
81
77
|
blueskyTitle?: string;
|
|
@@ -145,6 +141,10 @@ declare module 'upload-post' {
|
|
|
145
141
|
tiktokDisableComment?: boolean;
|
|
146
142
|
/** Index of photo for cover (0-based) */
|
|
147
143
|
tiktokPhotoCoverIndex?: number;
|
|
144
|
+
/** Privacy level, e.g. PUBLIC_TO_EVERYONE, SELF_ONLY, MUTUAL_FOLLOW_FRIENDS */
|
|
145
|
+
tiktokPrivacyLevel?: string;
|
|
146
|
+
/** Post mode, e.g. DIRECT_POST or MEDIA_UPLOAD (inbox) */
|
|
147
|
+
tiktokPostMode?: string;
|
|
148
148
|
/** Branded content toggle */
|
|
149
149
|
brandContentToggle?: boolean;
|
|
150
150
|
/** Brand organic toggle */
|
package/index.js
CHANGED
|
@@ -89,10 +89,6 @@ export class UploadPost {
|
|
|
89
89
|
if (options.maxPostsPerSlot !== undefined) form.append('max_posts_per_slot', String(options.maxPostsPerSlot));
|
|
90
90
|
if (options.asyncUpload !== undefined) form.append('async_upload', String(options.asyncUpload));
|
|
91
91
|
// AI auto-generation of native per-platform copy from the media (fills blank fields)
|
|
92
|
-
if (options.autogenerate !== undefined) form.append('autogenerate', String(options.autogenerate));
|
|
93
|
-
if (options.autogenerateTitle !== undefined) form.append('autogenerate_title', String(options.autogenerateTitle));
|
|
94
|
-
if (options.autogenerateDescription !== undefined) form.append('autogenerate_description', String(options.autogenerateDescription));
|
|
95
|
-
if (options.autogenerateLanguage) form.append('autogenerate_language', String(options.autogenerateLanguage));
|
|
96
92
|
|
|
97
93
|
// Platform-specific title overrides
|
|
98
94
|
if (options.blueskyTitle) form.append('bluesky_title', options.blueskyTitle);
|
|
@@ -160,13 +156,17 @@ export class UploadPost {
|
|
|
160
156
|
if (options.brandContentToggle !== undefined) form.append('brand_content_toggle', String(options.brandContentToggle));
|
|
161
157
|
if (options.brandOrganicToggle !== undefined) form.append('brand_organic_toggle', String(options.brandOrganicToggle));
|
|
162
158
|
|
|
159
|
+
// Shared by TikTok video AND photo uploads: the backend reads privacy_level and
|
|
160
|
+
// post_mode for both /upload and /upload_photos. Gating them behind isVideo made
|
|
161
|
+
// photo carousels always publish as PUBLIC_TO_EVERYONE / DIRECT_POST.
|
|
162
|
+
if (options.tiktokPrivacyLevel) form.append('privacy_level', options.tiktokPrivacyLevel);
|
|
163
|
+
if (options.tiktokPostMode) form.append('post_mode', options.tiktokPostMode);
|
|
164
|
+
|
|
163
165
|
if (isVideo) {
|
|
164
|
-
if (options.tiktokPrivacyLevel) form.append('privacy_level', options.tiktokPrivacyLevel);
|
|
165
166
|
if (options.tiktokDisableDuet !== undefined) form.append('disable_duet', String(options.tiktokDisableDuet));
|
|
166
167
|
if (options.tiktokDisableStitch !== undefined) form.append('disable_stitch', String(options.tiktokDisableStitch));
|
|
167
168
|
if (options.tiktokCoverTimestamp !== undefined) form.append('cover_timestamp', options.tiktokCoverTimestamp);
|
|
168
169
|
if (options.tiktokIsAigc !== undefined) form.append('is_aigc', String(options.tiktokIsAigc));
|
|
169
|
-
if (options.tiktokPostMode) form.append('post_mode', options.tiktokPostMode);
|
|
170
170
|
} else {
|
|
171
171
|
// Photo-specific
|
|
172
172
|
if (options.tiktokAutoAddMusic !== undefined) form.append('auto_add_music', String(options.tiktokAutoAddMusic));
|
|
@@ -695,10 +695,6 @@ export class UploadPost {
|
|
|
695
695
|
if (options.maxPostsPerSlot !== undefined) form.append('max_posts_per_slot', String(options.maxPostsPerSlot));
|
|
696
696
|
if (options.asyncUpload !== undefined) form.append('async_upload', String(options.asyncUpload));
|
|
697
697
|
// AI auto-generation of native per-platform copy from the media (fills blank fields)
|
|
698
|
-
if (options.autogenerate !== undefined) form.append('autogenerate', String(options.autogenerate));
|
|
699
|
-
if (options.autogenerateTitle !== undefined) form.append('autogenerate_title', String(options.autogenerateTitle));
|
|
700
|
-
if (options.autogenerateDescription !== undefined) form.append('autogenerate_description', String(options.autogenerateDescription));
|
|
701
|
-
if (options.autogenerateLanguage) form.append('autogenerate_language', String(options.autogenerateLanguage));
|
|
702
698
|
|
|
703
699
|
this._addLinkedinParams(form, options);
|
|
704
700
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "upload-post",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "Official client library for Upload-Post API - Cross-platform social media upload for TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, and X (Twitter)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|