upload-post 2.14.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 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
  ```
package/index.d.ts CHANGED
@@ -1406,7 +1406,18 @@ declare module 'upload-post' {
1406
1406
  * @param jobId - Scheduled job ID
1407
1407
  * @param options - Edit options
1408
1408
  */
1409
- editScheduled(jobId: string, options: { scheduledDate?: string; timezone?: string }): Promise<{ success: boolean }>;
1409
+ editScheduled(jobId: string, options: {
1410
+ scheduledDate?: string;
1411
+ timezone?: string;
1412
+ /** New title for every platform */
1413
+ title?: string;
1414
+ /** New caption/description for every platform */
1415
+ caption?: string;
1416
+ /** Alias of caption */
1417
+ description?: string;
1418
+ /** Per-platform text; only the platforms listed are touched */
1419
+ platformContent?: Record<string, { title?: string; caption?: string }>;
1420
+ }): Promise<{ success: boolean }>;
1410
1421
 
1411
1422
  // User Management
1412
1423
  /**
package/index.js CHANGED
@@ -1409,12 +1409,22 @@ export class UploadPost {
1409
1409
  * @param {Object} options - Edit options
1410
1410
  * @param {string} [options.scheduledDate] - New scheduled date (ISO 8601)
1411
1411
  * @param {string} [options.timezone] - New timezone
1412
+ * @param {string} [options.title] - New title for every platform
1413
+ * @param {string} [options.caption] - New caption/description for every platform
1414
+ * @param {string} [options.description] - Alias of caption
1415
+ * @param {Object} [options.platformContent] - Per-platform text, e.g.
1416
+ * { instagram: { caption: '...' }, tiktok: { caption: '...' }, youtube: { title: '...' } }.
1417
+ * Only the platforms listed are touched.
1412
1418
  * @returns {Promise<Object>} Edit result
1413
1419
  */
1414
1420
  async editScheduled(jobId, options) {
1415
1421
  const body = {};
1416
1422
  if (options.scheduledDate) body.scheduled_date = options.scheduledDate;
1417
1423
  if (options.timezone) body.timezone = options.timezone;
1424
+ if (options.title !== undefined) body.title = options.title;
1425
+ if (options.caption !== undefined) body.caption = options.caption;
1426
+ else if (options.description !== undefined) body.description = options.description;
1427
+ if (options.platformContent) body.platform_content = options.platformContent;
1418
1428
  return this._request(`/uploadposts/schedule/${jobId}`, 'PATCH', body);
1419
1429
  }
1420
1430
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "upload-post",
3
- "version": "2.14.0",
3
+ "version": "2.14.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",