@omnisocials/mcp-server 1.39.0 → 1.48.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.
package/build/types.d.ts CHANGED
@@ -11,6 +11,12 @@ export interface ApiResponse<T = unknown> {
11
11
  credits_balance?: number | null;
12
12
  enforced?: boolean;
13
13
  enforce_from?: string;
14
+ platform?: string;
15
+ media_url?: string;
16
+ ratio?: string;
17
+ target?: string;
18
+ action?: "cropped" | "kept" | "crop_failed";
19
+ crop_url?: string;
14
20
  }>;
15
21
  pagination?: {
16
22
  next_cursor: string | null;
@@ -115,6 +121,17 @@ export type ApiPostMediaEntry = string | {
115
121
  id?: string | number;
116
122
  url?: string;
117
123
  alt?: string;
124
+ /** Image fit of this channel's copy: 'crop' = url is a crop of crop.of. */
125
+ fit?: "crop" | "keep";
126
+ crop?: {
127
+ of: string;
128
+ id?: string;
129
+ ratio: string;
130
+ focus: {
131
+ x: number;
132
+ y: number;
133
+ } | null;
134
+ };
118
135
  [k: string]: unknown;
119
136
  };
120
137
  /** A thread part as echoed back by the API (X / Bluesky / Mastodon / Threads). */
@@ -180,6 +197,10 @@ export interface ApiPost {
180
197
  status: string;
181
198
  /** "post" | "story" | "reel" */
182
199
  type?: string;
200
+ /** The comment-to-DM automations bound to this post (get_post on a post
201
+ * that goes to Instagram or Facebook, create/update when the request
202
+ * carried it); null = none. */
203
+ comment_dm_automation?: PostCommentDmAutomation | null;
183
204
  /** Per-platform captions keyed by platform id plus "default". Legacy
184
205
  * servers returned a plain string. */
185
206
  content?: Record<string, string> | string;
@@ -247,6 +268,12 @@ export interface ApiPost {
247
268
  bluesky?: ApiPlatformOptionsOut;
248
269
  mastodon?: ApiPlatformOptionsOut;
249
270
  threads?: ApiPlatformOptionsOut;
271
+ /** Telegram options (silent, pin, buttons, poll ...) and, once sent,
272
+ * `result` with the message ids and the links. */
273
+ telegram?: ApiPlatformOptionsOut;
274
+ /** Discord options (silent, thread_name, buttons, poll ...) and, once
275
+ * sent, `result` with the message id and the link. */
276
+ discord?: ApiPlatformOptionsOut;
250
277
  /** platform → user-friendly error message; only failed platforms appear.
251
278
  * null while draft/scheduled/processing or when every platform succeeded. */
252
279
  errors?: Record<string, string> | null;
@@ -412,6 +439,8 @@ export interface PinterestProductsResult {
412
439
  bookmark?: string | null;
413
440
  source?: "catalog" | "pins";
414
441
  catalog_access?: boolean;
442
+ /** The connection has catalog access but the account has no catalog yet. */
443
+ no_catalog?: boolean;
415
444
  product_groups?: Array<{
416
445
  id: string;
417
446
  name?: string | null;
@@ -487,6 +516,8 @@ export interface MediaItem {
487
516
  filename: string;
488
517
  folder_id?: string | null;
489
518
  size: string;
519
+ width?: number | null;
520
+ height?: number | null;
490
521
  status?: string;
491
522
  created_at: string;
492
523
  pdf?: {
@@ -549,6 +580,29 @@ export interface Account {
549
580
  }[];
550
581
  platform_details?: {
551
582
  subscription_type?: string;
583
+ /** Telegram: "channel", "supergroup" or "group". */
584
+ chat_type?: string | null;
585
+ /** Telegram chat id (a negative number as a string). */
586
+ chat_id?: string | null;
587
+ /** Telegram: subscribers of a channel, members of a group. */
588
+ subscribers?: number | null;
589
+ /** Telegram: t.me link of a public chat, else the chat's private link.
590
+ * Discord: discord.com/channels link to the channel. */
591
+ url?: string | null;
592
+ /** Discord: the server id. */
593
+ guild_id?: string | null;
594
+ /** Discord: the server name (Continue with Discord, or a pasted URL in a server the OmniSocials bot is in). */
595
+ guild_name?: string | null;
596
+ /** Discord: the channel id. */
597
+ channel_id?: string | null;
598
+ /** Discord: the channel name without the # (read by the OmniSocials bot, or given by the person); null when unknown. */
599
+ channel_name?: string | null;
600
+ /** Discord: text, voice, announcement, stage, forum or media, as the bot read it; null when it cannot see the channel. */
601
+ channel_type?: "text" | "voice" | "announcement" | "stage" | "forum" | "media" | null;
602
+ /** Discord: the webhook's name, shown as the sender of every post. */
603
+ webhook_name?: string | null;
604
+ /** Discord: "oauth" (Continue with Discord) or "url" (a pasted webhook URL). */
605
+ connect_method?: string | null;
552
606
  };
553
607
  }
554
608
  export interface Webhook {
@@ -577,6 +631,186 @@ export interface HashtagSet {
577
631
  created_at: string;
578
632
  updated_at: string;
579
633
  }
634
+ /** The channel an automation runs on: the Instagram account, the Facebook Page or the X account. */
635
+ export type AutomationPlatform = "instagram" | "facebook" | "x";
636
+ /** The channels a post-bound automation (`comment_dm_automation`) can run on: X has no comment trigger. */
637
+ export type CommentDmPlatform = "instagram" | "facebook";
638
+ /** `story_reply` is Instagram only: Facebook has no story replies. X has `dm` only. */
639
+ export type AutomationTriggerKind = "comment" | "dm" | "story_reply";
640
+ /**
641
+ * `queued` = the answer waits for a free slot under the send cap (X 15 per 15
642
+ * minutes and 450 a day, Instagram and Facebook 180 an hour), or for X's
643
+ * reset time after X answered 429, and goes out within the hour, else it
644
+ * becomes `skipped` with `rate_limited`. `opted_out` = the person replied
645
+ * STOP on X (the stop list of that X account).
646
+ */
647
+ export type AutomationEventOutcome = "sent" | "skipped" | "failed" | "pending" | "queued" | "opted_out";
648
+ export type AutomationScope = "post" | "next_post" | "any";
649
+ export type AutomationMatch = "word" | "contains" | "any";
650
+ export interface AutomationPost {
651
+ /** `omnisocials` = a post of this workspace, `instagram` / `facebook` = read from that platform */
652
+ source: "omnisocials" | "instagram" | "facebook";
653
+ id: string;
654
+ caption: string;
655
+ thumbnail_url: string | null;
656
+ permalink: string | null;
657
+ media_type: string | null;
658
+ status?: string;
659
+ post_date_time?: string | null;
660
+ /** omnisocials source only: the post is live on the automation's platform */
661
+ live?: boolean;
662
+ timestamp?: string | null;
663
+ }
664
+ export interface Automation {
665
+ id: string;
666
+ type: "comment_to_dm";
667
+ platform: AutomationPlatform;
668
+ status: "active" | "paused" | "completed";
669
+ name: string | null;
670
+ /** The OmniSocials post the automation listens on (scope post), else null */
671
+ post_id: string | null;
672
+ /** The Instagram media id, set once the post is live (null on Facebook) */
673
+ instagram_media_id: string | null;
674
+ /** The Facebook Page post id ({page-id}_{post-id}), set once the post is live (null on Instagram) */
675
+ facebook_post_id: string | null;
676
+ post: AutomationPost | null;
677
+ trigger: {
678
+ kinds: AutomationTriggerKind[];
679
+ scope: AutomationScope | null;
680
+ keywords: string[];
681
+ match: AutomationMatch;
682
+ };
683
+ actions: {
684
+ dm: {
685
+ text: string;
686
+ };
687
+ public_reply: {
688
+ enabled: boolean;
689
+ variations: string[];
690
+ };
691
+ };
692
+ limits: {
693
+ max_sends: number | null;
694
+ stop_at: string | null;
695
+ };
696
+ stats: {
697
+ matched: number;
698
+ sent: number;
699
+ skipped: number;
700
+ failed: number;
701
+ last_event_at: string | null;
702
+ };
703
+ created_at: string;
704
+ updated_at: string;
705
+ }
706
+ /** The body of POST /automations; every section is optional on PATCH. */
707
+ export interface AutomationInput {
708
+ name?: string | null;
709
+ /**
710
+ * Default instagram; cannot change on PATCH (400 platform_immutable). `x`
711
+ * takes trigger.kinds ["dm"] only, needs X DMs on for an active automation
712
+ * (409 x_dms_off; `status: "paused"` always saves) and has no post fields.
713
+ */
714
+ platform?: AutomationPlatform;
715
+ post_id?: string;
716
+ instagram_media_id?: string;
717
+ /** A Page post published outside OmniSocials; implies platform facebook */
718
+ facebook_post_id?: string;
719
+ trigger?: {
720
+ kinds?: AutomationTriggerKind[];
721
+ scope?: AutomationScope;
722
+ keywords?: string[];
723
+ match?: AutomationMatch;
724
+ };
725
+ actions?: {
726
+ dm: {
727
+ text: string;
728
+ };
729
+ public_reply?: {
730
+ enabled?: boolean;
731
+ variations?: string[];
732
+ };
733
+ };
734
+ limits?: {
735
+ max_sends?: number | null;
736
+ stop_at?: string | null;
737
+ };
738
+ status?: "active" | "paused";
739
+ }
740
+ /** `comment_dm_automation` on a post: the automations bound to that post. */
741
+ export interface CommentDmAutomationInput {
742
+ /** One automation per listed channel; default Instagram when the post goes there, else Facebook */
743
+ platforms?: CommentDmPlatform[];
744
+ trigger?: {
745
+ keywords?: string[];
746
+ match?: AutomationMatch;
747
+ };
748
+ actions: {
749
+ dm: {
750
+ text: string;
751
+ };
752
+ public_reply?: {
753
+ enabled?: boolean;
754
+ variations?: string[];
755
+ };
756
+ };
757
+ limits?: {
758
+ max_sends?: number | null;
759
+ stop_at?: string | null;
760
+ };
761
+ }
762
+ /** `comment_dm_automation` on a post: the first automation's fields (Instagram
763
+ * first), plus the channels and the id of each automation. */
764
+ export interface PostCommentDmAutomation extends Automation {
765
+ platforms?: CommentDmPlatform[];
766
+ automations?: Array<{
767
+ id: string;
768
+ platform: CommentDmPlatform;
769
+ status: Automation["status"];
770
+ }>;
771
+ }
772
+ export interface AutomationEvent {
773
+ id: string;
774
+ automation_id: string;
775
+ kind: AutomationTriggerKind;
776
+ outcome: AutomationEventOutcome;
777
+ /**
778
+ * `skipped`: already_sent, limit_reached, stopped, window_passed,
779
+ * rate_limited (the send cap stayed full for an hour), cannot_message,
780
+ * already_replied, dm_window_passed, dms_closed (X: the person does not
781
+ * accept DMs from the account), no_credits (credits ran out before the
782
+ * answer), opted_out (the person replied STOP before, also while the
783
+ * answer waited), automation_off (paused or finished while the answer
784
+ * waited). `failed`: the platform's error text. A `queued` row carries
785
+ * the reason it waits, an `opted_out` row the reason `opted_out`.
786
+ */
787
+ reason: string | null;
788
+ reason_label: string | null;
789
+ /** `username` = the Instagram or X @handle, or the person's name on Facebook */
790
+ person: {
791
+ id: string;
792
+ username: string | null;
793
+ };
794
+ trigger_id: string | null;
795
+ /** The comment; a DM's text only with the inbox:read scope */
796
+ trigger_text: string | null;
797
+ /** The DM that was sent */
798
+ message: string | null;
799
+ public_reply: string | null;
800
+ platform_message_id: string | null;
801
+ created_at: string;
802
+ sent_at: string | null;
803
+ }
804
+ export interface AutomationEventsResult {
805
+ data: AutomationEvent[];
806
+ counts: Record<string, number>;
807
+ pagination: {
808
+ total: number;
809
+ limit: number;
810
+ offset: number;
811
+ has_more: boolean;
812
+ };
813
+ }
580
814
  /** Per-platform stats block inside AnalyticsOverview.platform_breakdown.
581
815
  * Shape from backend/routes/api/v1/analytics.js (overview route). */
582
816
  export interface AnalyticsPlatformBreakdown {
@@ -618,6 +852,16 @@ export interface MediaCompatibility {
618
852
  /** POST /media/check response — the compatibility block is spread top-level
619
853
  * next to `file` and `connected_platforms`; there is no `data` key
620
854
  * (backend/routes/api/v1/media.js check route). */
855
+ export interface MediaFitRow {
856
+ platform: string;
857
+ display_name: string;
858
+ fits: boolean;
859
+ ratio: string;
860
+ shown: "whole" | "cut";
861
+ target: string | null;
862
+ default_action: "crop" | "keep" | null;
863
+ message: string | null;
864
+ }
621
865
  export interface MediaCheckResult {
622
866
  error?: {
623
867
  code: string;
@@ -627,11 +871,15 @@ export interface MediaCheckResult {
627
871
  size_bytes: number | null;
628
872
  mime: string | null;
629
873
  size_known: boolean;
874
+ width?: number | null;
875
+ height?: number | null;
630
876
  };
631
877
  connected_platforms?: string[];
632
878
  compatible?: boolean;
633
879
  warnings?: MediaCompatWarning[];
634
880
  summary?: string | null;
881
+ /** How each connected channel with a fit rule shows this image as a feed post. */
882
+ fit?: MediaFitRow[];
635
883
  }
636
884
  /** One folder from GET /folders — formatFolder in
637
885
  * backend/routes/api/v1/folders.js (:15-23). */
@@ -709,6 +957,11 @@ export interface PostAnalyticsStorySlide {
709
957
  export interface PostAnalyticsPlatformEntry {
710
958
  platform: string;
711
959
  platform_post_id: string;
960
+ /** Numbers and strings, plus objects this type leaves out: breakdowns
961
+ * (`reactions`, `impression_sources`, ...) and, on TikTok and Facebook
962
+ * videos, `retention_curve` (RetentionCurve in client.ts). `hold_rate_3s`
963
+ * is the % of viewers still watching at second 3 (TikTok, Facebook Reels,
964
+ * Instagram Reels as 100 - skip_rate). */
712
965
  metrics: Record<string, number | string>;
713
966
  thread_parts: number;
714
967
  collected_at: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnisocials/mcp-server",
3
- "version": "1.39.0",
3
+ "version": "1.48.0",
4
4
  "mcpName": "io.github.omnisocials/mcp-server",
5
5
  "description": "MCP server for OmniSocials API - manage social media posts, media, accounts, analytics, and webhooks",
6
6
  "type": "module",
@@ -45,14 +45,14 @@
45
45
  },
46
46
  "license": "MIT",
47
47
  "dependencies": {
48
- "@modelcontextprotocol/sdk": "^1.12.1"
48
+ "@modelcontextprotocol/sdk": "^1.32.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^25.3.3",
52
52
  "typescript": "^5.8.2"
53
53
  },
54
54
  "overrides": {
55
- "zod": "4.4.0",
55
+ "zod": "4.6.7",
56
56
  "fast-uri": "^3.1.8",
57
57
  "hono": "^4.13.7",
58
58
  "qs": "^6.16.0"