UNPKG

systemprompt-mcp-reddit

Version:

A specialized Model Context Protocol (MCP) server that enables you to search, read, and interact with Reddit content, leveraging an AI Agent to help with each operation.

68 lines (67 loc) 2.45 kB
import { RedditPost, RedditComment, RedditSubreddit, RedditNotification as ApiRedditNotification, SubscribedSubreddit } from "../types/reddit.js"; import type { RedditNotification as ConfigRedditNotification, RedditMessage } from "../types/config.js"; /** * Type guards and transformation utilities for Reddit API responses */ export declare const isRedditPostData: (data: unknown) => data is { id: string; title: string; author: string; subreddit: string; selftext?: string; url?: string; score: number | string; created_utc: number | string; num_comments: number | string; permalink: string; }; export declare const transformPost: (data: unknown) => RedditPost; export declare const isRedditCommentData: (data: unknown) => data is { id: string; author: string; body: string; score: number | string; created_utc: number | string; permalink: string; }; export declare const transformComment: (data: unknown) => RedditComment; export declare const isRedditSubredditData: (data: unknown) => data is { display_name: string; title: string; public_description: string; subscribers: number | string; created_utc: number | string; over18: boolean; rules?: Array<{ short_name?: string; title: string; description: string; }>; title_min_length?: number; title_max_length?: number; allowed_title_prefixes?: string[]; banned_title_phrases?: string[]; body_required?: boolean; body_min_length?: number; body_max_length?: number; flair_required?: boolean; [key: string]: unknown; }; export declare const transformSubreddit: (data: unknown) => RedditSubreddit; export declare const transformNotification: (data: Record<string, unknown>) => ApiRedditNotification; export declare const transformMessage: (data: Record<string, unknown>) => RedditMessage; export declare function transformToConfigNotification(notification: ApiRedditNotification): ConfigRedditNotification | RedditMessage; export declare const isSubscribedSubredditData: (data: unknown) => data is { id: string; name: string; display_name: string; title: string; public_description: string; subscribers: number; over18: boolean; url: string; icon_img?: string; created_utc: number; subreddit_type: string; }; export declare const transformSubscribedSubreddit: (data: unknown) => SubscribedSubreddit;