@egdesk/next-api-plugin 1.5.22 → 1.5.24

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.
@@ -3374,6 +3374,67 @@ export async function listInstagramSchedules(connectionId?: string): Promise<{
3374
3374
  return callInstagramTool('instagram_list_schedules', connectionId ? { connectionId } : {});
3375
3375
  }
3376
3376
 
3377
+ export type CreateInstagramScheduleOptions = {
3378
+ title: string;
3379
+ connectionId: string;
3380
+ /** manual topics or rotate BI products */
3381
+ topicSource?: 'manual' | 'bi_products';
3382
+ /** Required when topicSource is bi_products */
3383
+ biSnapshotId?: string;
3384
+ /** Manual topics or product names when using bi_products */
3385
+ topics?: string[];
3386
+ /** HH:MM (24h). Default 09:00. NOTE: this is a RECURRING daily/weekly/monthly
3387
+ * cron time, not a one-off timer — if it already passed "today" when the
3388
+ * schedule registers, it won't fire until tomorrow. Use runNow for an
3389
+ * immediate/one-time post instead of a near-term scheduledTime. */
3390
+ scheduledTime?: string;
3391
+ frequencyType?: 'daily' | 'weekly' | 'monthly' | 'custom';
3392
+ frequencyValue?: number;
3393
+ /** 0=Sunday … 6=Saturday (weekly) */
3394
+ weeklyDay?: number;
3395
+ /** 1-31 (monthly) */
3396
+ monthlyDay?: number;
3397
+ aiKeyId?: string;
3398
+ /** Caption generation model (Gemini text model) */
3399
+ textModel?: string;
3400
+ /** Image generation model (Gemini image model) */
3401
+ imageModel?: string;
3402
+ /** Default true */
3403
+ enabled?: boolean;
3404
+ /** If true, immediately generate + post to Instagram after creating the schedule. */
3405
+ runNow?: boolean;
3406
+ };
3407
+
3408
+ /**
3409
+ * Create a recurring Instagram post schedule. Use topicSource='bi_products' with
3410
+ * biSnapshotId + product name topics for product-grounded captions/images using
3411
+ * BI product photos as reference. The response includes an actualNextRun field
3412
+ * (the real cron-computed next fire time) so you can confirm it isn't deferred
3413
+ * to tomorrow — for immediate/one-time testing, pass runNow=true instead.
3414
+ */
3415
+ export async function createInstagramSchedule(options: CreateInstagramScheduleOptions) {
3416
+ return callInstagramTool('instagram_schedule_create', options);
3417
+ }
3418
+
3419
+ /** Enable or disable an Instagram schedule. */
3420
+ export async function toggleInstagramSchedule(scheduleId: string, enabled: boolean) {
3421
+ return callInstagramTool('instagram_schedule_toggle', { scheduleId, enabled });
3422
+ }
3423
+
3424
+ /** Permanently delete an Instagram schedule. */
3425
+ export async function deleteInstagramSchedule(scheduleId: string) {
3426
+ return callInstagramTool('instagram_schedule_delete', { scheduleId });
3427
+ }
3428
+
3429
+ /**
3430
+ * Immediately generate caption + image and post to Instagram for a schedule
3431
+ * (full auto path). May take a minute or more, and may pause for CAPTCHA on
3432
+ * first-time logins.
3433
+ */
3434
+ export async function runInstagramScheduleNow(scheduleId: string) {
3435
+ return callInstagramTool('instagram_schedule_run_now', { scheduleId });
3436
+ }
3437
+
3377
3438
  // ==========================================
3378
3439
  // BLOG (MCP) — WordPress / Naver
3379
3440
  // ==========================================
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  * The minimum EGDesk app version this plugin version is compatible with.
9
9
  * The app checks this at setup time and warns on mismatch.
10
10
  */
11
- export declare const COMPATIBLE_APP_VERSION = "1.4.35";
11
+ export declare const COMPATIBLE_APP_VERSION = "1.4.37";
12
12
  export interface SetupOptions {
13
13
  egdeskUrl?: string;
14
14
  /** Production EGDesk server URL — written to .env.production.local. Falls back to egdeskUrl. */
package/dist/index.js CHANGED
@@ -46,7 +46,7 @@ exports.setupNextApiPlugin = setupNextApiPlugin;
46
46
  * The minimum EGDesk app version this plugin version is compatible with.
47
47
  * The app checks this at setup time and warns on mismatch.
48
48
  */
49
- exports.COMPATIBLE_APP_VERSION = '1.4.35';
49
+ exports.COMPATIBLE_APP_VERSION = '1.4.37';
50
50
  const fs = __importStar(require("fs"));
51
51
  const path = __importStar(require("path"));
52
52
  const setup_userdata_1 = require("./setup-userdata");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egdesk/next-api-plugin",
3
- "version": "1.5.22",
3
+ "version": "1.5.24",
4
4
  "description": "Next.js plugin for EGDesk database proxy integration",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",