@keystrokehq/reddit 0.1.2 → 0.1.3
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/dist/actions/create-reddit-post.cjs +1 -1
- package/dist/actions/create-reddit-post.cjs.map +1 -1
- package/dist/actions/create-reddit-post.d.cts +1 -1
- package/dist/actions/create-reddit-post.d.mts +1 -1
- package/dist/actions/create-reddit-post.mjs +1 -1
- package/dist/actions/create-reddit-post.mjs.map +1 -1
- package/dist/actions/delete-reddit-comment.cjs +1 -1
- package/dist/actions/delete-reddit-comment.cjs.map +1 -1
- package/dist/actions/delete-reddit-comment.d.cts +1 -1
- package/dist/actions/delete-reddit-comment.d.cts.map +1 -1
- package/dist/actions/delete-reddit-comment.d.mts +1 -1
- package/dist/actions/delete-reddit-comment.d.mts.map +1 -1
- package/dist/actions/delete-reddit-comment.mjs +1 -1
- package/dist/actions/delete-reddit-comment.mjs.map +1 -1
- package/dist/actions/delete-reddit-post.cjs +1 -1
- package/dist/actions/delete-reddit-post.cjs.map +1 -1
- package/dist/actions/delete-reddit-post.d.cts +1 -1
- package/dist/actions/delete-reddit-post.d.cts.map +1 -1
- package/dist/actions/delete-reddit-post.d.mts +1 -1
- package/dist/actions/delete-reddit-post.d.mts.map +1 -1
- package/dist/actions/delete-reddit-post.mjs +1 -1
- package/dist/actions/delete-reddit-post.mjs.map +1 -1
- package/dist/actions/edit-reddit-comment-or-post.cjs +3 -3
- package/dist/actions/edit-reddit-comment-or-post.cjs.map +1 -1
- package/dist/actions/edit-reddit-comment-or-post.d.cts +3 -3
- package/dist/actions/edit-reddit-comment-or-post.d.mts +3 -3
- package/dist/actions/edit-reddit-comment-or-post.mjs +3 -3
- package/dist/actions/edit-reddit-comment-or-post.mjs.map +1 -1
- package/dist/actions/get-controversial-posts.cjs +4 -4
- package/dist/actions/get-controversial-posts.cjs.map +1 -1
- package/dist/actions/get-controversial-posts.d.cts +4 -4
- package/dist/actions/get-controversial-posts.d.mts +4 -4
- package/dist/actions/get-controversial-posts.mjs +4 -4
- package/dist/actions/get-controversial-posts.mjs.map +1 -1
- package/dist/actions/get-me-prefs.cjs +1 -1
- package/dist/actions/get-me-prefs.cjs.map +1 -1
- package/dist/actions/get-me-prefs.d.cts +1 -1
- package/dist/actions/get-me-prefs.d.mts +1 -1
- package/dist/actions/get-me-prefs.mjs +1 -1
- package/dist/actions/get-me-prefs.mjs.map +1 -1
- package/dist/actions/get-r-top.cjs +4 -4
- package/dist/actions/get-r-top.cjs.map +1 -1
- package/dist/actions/get-r-top.d.cts +4 -4
- package/dist/actions/get-r-top.d.mts +4 -4
- package/dist/actions/get-r-top.mjs +4 -4
- package/dist/actions/get-r-top.mjs.map +1 -1
- package/dist/actions/get-random.cjs +4 -4
- package/dist/actions/get-random.cjs.map +1 -1
- package/dist/actions/get-random.d.cts +4 -4
- package/dist/actions/get-random.d.mts +4 -4
- package/dist/actions/get-random.mjs +4 -4
- package/dist/actions/get-random.mjs.map +1 -1
- package/dist/actions/get-reddit-user-about.cjs +3 -3
- package/dist/actions/get-reddit-user-about.cjs.map +1 -1
- package/dist/actions/get-reddit-user-about.d.cts +3 -3
- package/dist/actions/get-reddit-user-about.d.mts +3 -3
- package/dist/actions/get-reddit-user-about.mjs +3 -3
- package/dist/actions/get-reddit-user-about.mjs.map +1 -1
- package/dist/actions/get-scopes.cjs +1 -1
- package/dist/actions/get-scopes.cjs.map +1 -1
- package/dist/actions/get-scopes.d.cts +2 -2
- package/dist/actions/get-scopes.d.mts +2 -2
- package/dist/actions/get-scopes.mjs +1 -1
- package/dist/actions/get-scopes.mjs.map +1 -1
- package/dist/actions/get-subreddit-rules.cjs +2 -2
- package/dist/actions/get-subreddit-rules.cjs.map +1 -1
- package/dist/actions/get-subreddit-rules.d.cts +2 -2
- package/dist/actions/get-subreddit-rules.d.mts +2 -2
- package/dist/actions/get-subreddit-rules.mjs +2 -2
- package/dist/actions/get-subreddit-rules.mjs.map +1 -1
- package/dist/actions/get-subreddits-search.cjs +4 -4
- package/dist/actions/get-subreddits-search.cjs.map +1 -1
- package/dist/actions/get-subreddits-search.d.cts +4 -4
- package/dist/actions/get-subreddits-search.d.mts +4 -4
- package/dist/actions/get-subreddits-search.mjs +4 -4
- package/dist/actions/get-subreddits-search.mjs.map +1 -1
- package/dist/actions/get-user-flair.cjs +2 -2
- package/dist/actions/get-user-flair.cjs.map +1 -1
- package/dist/actions/get-user-flair.d.cts +2 -2
- package/dist/actions/get-user-flair.d.mts +2 -2
- package/dist/actions/get-user-flair.mjs +2 -2
- package/dist/actions/get-user-flair.mjs.map +1 -1
- package/dist/actions/get-username-available.cjs +1 -1
- package/dist/actions/get-username-available.cjs.map +1 -1
- package/dist/actions/get-username-available.d.cts +1 -1
- package/dist/actions/get-username-available.d.mts +1 -1
- package/dist/actions/get-username-available.mjs +1 -1
- package/dist/actions/get-username-available.mjs.map +1 -1
- package/dist/actions/get.cjs +4 -4
- package/dist/actions/get.cjs.map +1 -1
- package/dist/actions/get.d.cts +4 -4
- package/dist/actions/get.d.mts +4 -4
- package/dist/actions/get.mjs +4 -4
- package/dist/actions/get.mjs.map +1 -1
- package/dist/actions/list-subreddit-post-flairs.cjs +2 -2
- package/dist/actions/list-subreddit-post-flairs.cjs.map +1 -1
- package/dist/actions/list-subreddit-post-flairs.d.cts +2 -2
- package/dist/actions/list-subreddit-post-flairs.d.mts +2 -2
- package/dist/actions/list-subreddit-post-flairs.mjs +2 -2
- package/dist/actions/list-subreddit-post-flairs.mjs.map +1 -1
- package/dist/actions/post-reddit-comment.cjs +5 -5
- package/dist/actions/post-reddit-comment.cjs.map +1 -1
- package/dist/actions/post-reddit-comment.d.cts +5 -5
- package/dist/actions/post-reddit-comment.d.mts +5 -5
- package/dist/actions/post-reddit-comment.mjs +5 -5
- package/dist/actions/post-reddit-comment.mjs.map +1 -1
- package/dist/actions/retrieve-post-comments.cjs +2 -2
- package/dist/actions/retrieve-post-comments.cjs.map +1 -1
- package/dist/actions/retrieve-post-comments.d.cts +2 -2
- package/dist/actions/retrieve-post-comments.d.mts +2 -2
- package/dist/actions/retrieve-post-comments.mjs +2 -2
- package/dist/actions/retrieve-post-comments.mjs.map +1 -1
- package/dist/actions/retrieve-reddit-post.cjs +4 -4
- package/dist/actions/retrieve-reddit-post.cjs.map +1 -1
- package/dist/actions/retrieve-reddit-post.d.cts +4 -4
- package/dist/actions/retrieve-reddit-post.d.mts +4 -4
- package/dist/actions/retrieve-reddit-post.mjs +4 -4
- package/dist/actions/retrieve-reddit-post.mjs.map +1 -1
- package/dist/actions/retrieve-specific-comment.cjs +6 -6
- package/dist/actions/retrieve-specific-comment.cjs.map +1 -1
- package/dist/actions/retrieve-specific-comment.d.cts +6 -6
- package/dist/actions/retrieve-specific-comment.d.mts +6 -6
- package/dist/actions/retrieve-specific-comment.mjs +6 -6
- package/dist/actions/retrieve-specific-comment.mjs.map +1 -1
- package/dist/actions/search-across-subreddits.cjs +2 -2
- package/dist/actions/search-across-subreddits.cjs.map +1 -1
- package/dist/actions/search-across-subreddits.d.cts +2 -2
- package/dist/actions/search-across-subreddits.d.mts +2 -2
- package/dist/actions/search-across-subreddits.mjs +2 -2
- package/dist/actions/search-across-subreddits.mjs.map +1 -1
- package/dist/actions/toggle-inbox-replies.cjs +1 -1
- package/dist/actions/toggle-inbox-replies.cjs.map +1 -1
- package/dist/actions/toggle-inbox-replies.d.cts +1 -1
- package/dist/actions/toggle-inbox-replies.d.cts.map +1 -1
- package/dist/actions/toggle-inbox-replies.d.mts +1 -1
- package/dist/actions/toggle-inbox-replies.d.mts.map +1 -1
- package/dist/actions/toggle-inbox-replies.mjs +1 -1
- package/dist/actions/toggle-inbox-replies.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-subreddit-post-flairs.mjs","names":[],"sources":["../../src/actions/list-subreddit-post-flairs.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditListSubredditPostFlairsInput = z.object({\n subreddit: z.string().describe(\"The name of the subreddit (without 'r/' prefix) for which to retrieve available post/link flairs.\"),\n});\nconst RedditListSubredditPostFlairs_FlairRichtextElementSchema = z.object({\n a: z.string().describe(\"Emoji shortcode for 'emoji' type elements.\").nullable().optional(),\n e: z.string().describe(\"Element type (e.g., 'text', 'emoji').\").nullable(),\n t: z.string().describe(\"Text content for 'text' type elements.\").nullable().optional(),\n u: z.string().describe(\"URL for emoji image.\").nullable().optional(),\n}).passthrough().describe(\"Element in a richtext flair array.\");\nconst RedditListSubredditPostFlairs_FlairTemplateSchema = z.object({\n id: z.string().describe(\"Unique identifier for the flair template (same as flair_template_id).\").nullable(),\n text: z.string().describe(\"Display text content of the flair.\").nullable(),\n type: z.string().describe(\"Type of the flair template (e.g., 'text', 'richtext').\").nullable().optional(),\n mod_only: z.boolean().describe(\"Whether this flair is restricted to moderators only.\").nullable().optional(),\n richtext: z.array(RedditListSubredditPostFlairs_FlairRichtextElementSchema).describe(\"Rich text formatting information for the flair, containing emoji and text elements.\").nullable().optional(),\n css_class: z.string().describe(\"CSS class name applied to the flair for styling.\").nullable().optional(),\n max_emojis: z.number().int().describe(\"Maximum number of emojis allowed in the flair text.\").nullable().optional(),\n text_color: z.string().describe(\"Color of the flair text (e.g., 'dark', 'light').\").nullable().optional(),\n text_editable: z.boolean().describe(\"Whether users can edit the flair text when applying it to their post.\").nullable(),\n background_color: z.string().describe(\"Background color of the flair (hex color code or named color).\").nullable().optional(),\n allowable_content: z.string().describe(\"Types of content allowed in the flair (e.g., 'all', 'emoji', 'text').\").nullable().optional(),\n flair_template_id: z.string().describe(\"Template identifier used when submitting posts with flair. Pass this value as 'flair_id' parameter when creating posts. If not provided, use the 'id' field instead.\").nullable().optional(),\n}).describe(\"Represents a single link/post flair template available in a subreddit.\");\nexport const RedditListSubredditPostFlairsOutput = z.object({\n flairs: z.array(RedditListSubredditPostFlairs_FlairTemplateSchema).describe(\"Array of flair templates available for posts/links in the subreddit.\"),\n}).describe(\"Response containing the list of available post/link flair templates for a subreddit.\");\n\nexport const redditListSubredditPostFlairs = action(\"REDDIT_LIST_SUBREDDIT_POST_FLAIRS\", {\n slug: \"reddit-list-subreddit-post-flairs\",\n name: \"List subreddit post flairs\",\n description: \"List available link/post flairs for a subreddit (including flair_template_id) so posts can satisfy flair-required validation. Use when you need to discover valid flair IDs before creating a post in a subreddit that requires flair. Note: Reddit may return empty or deny access if the authenticated user cannot set link flair and is not a moderator.\",\n input: RedditListSubredditPostFlairsInput,\n output: RedditListSubredditPostFlairsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAqC,EAAE,OAAO,EACzD,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,mGAAmG,EACpI,CAAC;AACD,MAAM,2DAA2D,EAAE,OAAO;CACxE,GAAG,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzF,GAAG,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS;CACzE,GAAG,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrF,GAAG,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACrE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oCAAoC;AAC9D,MAAM,oDAAoD,EAAE,OAAO;CACjE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CAC1G,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;CACzE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxG,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3G,UAAU,EAAE,MAAM,wDAAwD,CAAC,CAAC,SAAS,qFAAqF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChM,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvG,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjH,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxG,eAAe,EAAE,QAAQ,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CACtH,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5H,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpI,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,sKAAsK,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACrO,CAAC,CAAC,CAAC,SAAS,wEAAwE;
|
|
1
|
+
{"version":3,"file":"list-subreddit-post-flairs.mjs","names":[],"sources":["../../src/actions/list-subreddit-post-flairs.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditListSubredditPostFlairsInput = z.object({\n subreddit: z.string().describe(\"The name of the subreddit (without 'r/' prefix) for which to retrieve available post/link flairs.\"),\n});\nconst RedditListSubredditPostFlairs_FlairRichtextElementSchema = z.object({\n a: z.string().describe(\"Emoji shortcode for 'emoji' type elements.\").nullable().optional(),\n e: z.string().describe(\"Element type (e.g., 'text', 'emoji').\").nullable(),\n t: z.string().describe(\"Text content for 'text' type elements.\").nullable().optional(),\n u: z.string().describe(\"URL for emoji image.\").nullable().optional(),\n}).passthrough().describe(\"Element in a richtext flair array.\");\nconst RedditListSubredditPostFlairs_FlairTemplateSchema = z.object({\n id: z.string().describe(\"Unique identifier for the flair template (same as flair_template_id).\").nullable(),\n text: z.string().describe(\"Display text content of the flair.\").nullable(),\n type: z.string().describe(\"Type of the flair template (e.g., 'text', 'richtext').\").nullable().optional(),\n mod_only: z.boolean().describe(\"Whether this flair is restricted to moderators only.\").nullable().optional(),\n richtext: z.array(RedditListSubredditPostFlairs_FlairRichtextElementSchema).describe(\"Rich text formatting information for the flair, containing emoji and text elements.\").nullable().optional(),\n css_class: z.string().describe(\"CSS class name applied to the flair for styling.\").nullable().optional(),\n max_emojis: z.number().int().describe(\"Maximum number of emojis allowed in the flair text.\").nullable().optional(),\n text_color: z.string().describe(\"Color of the flair text (e.g., 'dark', 'light').\").nullable().optional(),\n text_editable: z.boolean().describe(\"Whether users can edit the flair text when applying it to their post.\").nullable(),\n background_color: z.string().describe(\"Background color of the flair (hex color code or named color).\").nullable().optional(),\n allowable_content: z.string().describe(\"Types of content allowed in the flair (e.g., 'all', 'emoji', 'text').\").nullable().optional(),\n flair_template_id: z.string().describe(\"Template identifier used when submitting posts with flair. Pass this value as 'flair_id' parameter when creating posts. If not provided, use the 'id' field instead.\").nullable().optional(),\n}).passthrough().describe(\"Represents a single link/post flair template available in a subreddit.\");\nexport const RedditListSubredditPostFlairsOutput = z.object({\n flairs: z.array(RedditListSubredditPostFlairs_FlairTemplateSchema).describe(\"Array of flair templates available for posts/links in the subreddit.\"),\n}).passthrough().describe(\"Response containing the list of available post/link flair templates for a subreddit.\");\n\nexport const redditListSubredditPostFlairs = action(\"REDDIT_LIST_SUBREDDIT_POST_FLAIRS\", {\n slug: \"reddit-list-subreddit-post-flairs\",\n name: \"List subreddit post flairs\",\n description: \"List available link/post flairs for a subreddit (including flair_template_id) so posts can satisfy flair-required validation. Use when you need to discover valid flair IDs before creating a post in a subreddit that requires flair. Note: Reddit may return empty or deny access if the authenticated user cannot set link flair and is not a moderator.\",\n input: RedditListSubredditPostFlairsInput,\n output: RedditListSubredditPost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AC,SAAS,CAAC,CAAC,SAAS;CACxG,eAAe,EAAE,QAAQ,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CACtH,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5H,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpI,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,sKAAsK,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACrO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,wEAAwE;AAKlG,MAAa,gCAAgC,OAAO,qCAAqC;CACvF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATiD,EAAE,OAAO,EAC1D,QAAQ,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,sEAAsE,EACpJ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sFAOhB;AACV,CAAC"}
|
|
@@ -39,20 +39,20 @@ const RedditPostRedditComment_CommentDataSchema = zod.z.object({
|
|
|
39
39
|
distinguished: zod.z.string().describe("Moderator status: null (normal user), 'moderator' (green [M]), 'admin' (red [A]), or 'special'").nullable().optional(),
|
|
40
40
|
author_flair_text: zod.z.string().describe("Text content of the author's user flair in this subreddit").nullable().optional(),
|
|
41
41
|
author_flair_css_class: zod.z.string().describe("CSS class for styling the author's user flair").nullable().optional()
|
|
42
|
-
}).describe("The comment object data returned by Reddit API.");
|
|
42
|
+
}).passthrough().describe("The comment object data returned by Reddit API.");
|
|
43
43
|
const RedditPostRedditComment_CommentThingSchema = zod.z.object({
|
|
44
44
|
data: RedditPostRedditComment_CommentDataSchema.nullable(),
|
|
45
45
|
kind: zod.z.string().describe("Type identifier for the object; 't1' for comments").nullable()
|
|
46
|
-
}).describe("A Reddit 'thing' containing a comment.");
|
|
47
|
-
const RedditPostRedditComment_CommentResponseDataSchema = zod.z.object({ things: zod.z.array(RedditPostRedditComment_CommentThingSchema).describe("Array containing the created comment object(s)") }).describe("Container for the created comment objects.");
|
|
46
|
+
}).passthrough().describe("A Reddit 'thing' containing a comment.");
|
|
47
|
+
const RedditPostRedditComment_CommentResponseDataSchema = zod.z.object({ things: zod.z.array(RedditPostRedditComment_CommentThingSchema).describe("Array containing the created comment object(s)") }).passthrough().describe("Container for the created comment objects.");
|
|
48
48
|
const RedditPostRedditComment_CommentJsonWrapperSchema = zod.z.object({
|
|
49
49
|
data: RedditPostRedditComment_CommentResponseDataSchema.nullable(),
|
|
50
50
|
errors: zod.z.array(zod.z.union([zod.z.string(), zod.z.array(zod.z.string())])).describe("Array of errors encountered during the API call; empty array if successful")
|
|
51
|
-
}).describe("Wrapper object containing the API response.");
|
|
51
|
+
}).passthrough().describe("Wrapper object containing the API response.");
|
|
52
52
|
const RedditPostRedditCommentOutput = zod.z.object({
|
|
53
53
|
json: RedditPostRedditComment_CommentJsonWrapperSchema.nullable(),
|
|
54
54
|
composio_execution_message: zod.z.string().describe("Informational message about the execution, such as platform limitations encountered").nullable().optional()
|
|
55
|
-
}).describe("Response from posting a comment on Reddit.");
|
|
55
|
+
}).passthrough().describe("Response from posting a comment on Reddit.");
|
|
56
56
|
const redditPostRedditComment = require_action.action("REDDIT_POST_REDDIT_COMMENT", {
|
|
57
57
|
slug: "reddit-post-reddit-comment",
|
|
58
58
|
name: "Post a comment",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-reddit-comment.cjs","names":["z","action"],"sources":["../../src/actions/post-reddit-comment.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditPostRedditCommentInput = z.object({\n text: z.string().describe(\"REQUIRED. The raw Markdown text of the comment to be submitted. This field must be provided and cannot be empty.\"),\n thing_id: z.string().describe(\"REQUIRED. The ID of the parent post (link) or comment, prefixed with 't3_' for a post (e.g., 't3_10omtdx') or 't1_' for a comment (e.g., 't1_h2g9w8l'). This field must be provided.\"),\n});\nconst RedditPostRedditComment_CommentDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the comment\").nullable(),\n ups: z.number().int().describe(\"Number of upvotes (includes own vote if upvoted)\").nullable(),\n body: z.string().describe(\"Raw comment text content with Markdown formatting; HTML entities are escaped\").nullable(),\n name: z.string().describe(\"Fullname of the comment combining kind and id (e.g., 't1_c3v7f8u')\").nullable(),\n depth: z.number().int().describe(\"Nesting level of the comment; 0 for top-level comments, 1 for first-level replies, etc.\").nullable().optional(),\n downs: z.number().int().describe(\"Number of downvotes (includes own vote if downvoted)\").nullable(),\n likes: z.boolean().describe(\"Vote status: true if upvoted, false if downvoted, null if no vote or not logged in\").nullable().optional(),\n saved: z.boolean().describe(\"Whether the logged-in user has saved this comment\").nullable(),\n score: z.number().int().describe(\"Net score (upvotes minus downvotes) of the comment\").nullable(),\n author: z.string().describe(\"Username of the comment author\").nullable(),\n edited: z.union([z.boolean(), z.number()]),\n gilded: z.number().int().describe(\"Number of Reddit Gold awards the comment has received\").nullable(),\n created: z.number().describe(\"Unix timestamp when the comment was created in local time (epoch seconds)\").nullable(),\n link_id: z.string().describe(\"ID of the parent submission (prefixed with 't3_')\").nullable(),\n replies: z.union([z.record(z.string(), z.unknown()), z.string()]),\n link_url: z.string().describe(\"URL of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n stickied: z.boolean().describe(\"Whether the comment is stickied/pinned\").nullable(),\n banned_by: z.string().describe(\"Username of moderator who removed the comment; null if none or user lacks privileges\").nullable().optional(),\n body_html: z.string().describe(\"Formatted HTML version of the comment text as displayed on Reddit\").nullable(),\n parent_id: z.string().describe(\"ID of the parent comment (prefixed with 't1_') or submission (prefixed with 't3_')\").nullable(),\n permalink: z.string().describe(\"Permanent URL path to the comment\").nullable(),\n subreddit: z.string().describe(\"Name of the subreddit excluding the '/r/' prefix\").nullable(),\n link_title: z.string().describe(\"Title of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n approved_by: z.string().describe(\"Username of moderator who approved the comment; null if none or user lacks privileges\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp when the comment was created in UTC (epoch seconds)\").nullable(),\n link_author: z.string().describe(\"Author of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n num_reports: z.number().int().describe(\"Number of reports on the comment; null if user is not a moderator\").nullable().optional(),\n is_submitter: z.boolean().describe(\"Whether the comment author is also the submission author\").nullable(),\n score_hidden: z.boolean().describe(\"Whether the comment's score is currently hidden\").nullable(),\n subreddit_id: z.string().describe(\"Unique identifier of the subreddit\").nullable(),\n distinguished: z.string().describe(\"Moderator status: null (normal user), 'moderator' (green [M]), 'admin' (red [A]), or 'special'\").nullable().optional(),\n author_flair_text: z.string().describe(\"Text content of the author's user flair in this subreddit\").nullable().optional(),\n author_flair_css_class: z.string().describe(\"CSS class for styling the author's user flair\").nullable().optional(),\n}).describe(\"The comment object data returned by Reddit API.\");\nconst RedditPostRedditComment_CommentThingSchema = z.object({\n data: RedditPostRedditComment_CommentDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier for the object; 't1' for comments\").nullable(),\n}).describe(\"A Reddit 'thing' containing a comment.\");\nconst RedditPostRedditComment_CommentResponseDataSchema = z.object({\n things: z.array(RedditPostRedditComment_CommentThingSchema).describe(\"Array containing the created comment object(s)\"),\n}).describe(\"Container for the created comment objects.\");\nconst RedditPostRedditComment_CommentJsonWrapperSchema = z.object({\n data: RedditPostRedditComment_CommentResponseDataSchema.nullable(),\n errors: z.array(z.union([z.string(), z.array(z.string())])).describe(\"Array of errors encountered during the API call; empty array if successful\"),\n}).describe(\"Wrapper object containing the API response.\");\nexport const RedditPostRedditCommentOutput = z.object({\n json: RedditPostRedditComment_CommentJsonWrapperSchema.nullable(),\n composio_execution_message: z.string().describe(\"Informational message about the execution, such as platform limitations encountered\").nullable().optional(),\n}).describe(\"Response from posting a comment on Reddit.\");\n\nexport const redditPostRedditComment = action(\"REDDIT_POST_REDDIT_COMMENT\", {\n slug: \"reddit-post-reddit-comment\",\n name: \"Post a comment\",\n description: \"Posts a comment on Reddit, replying to an existing submission (post) or another comment. Fails if the target thread is locked, archived, or restricted — verify thread state beforehand. Rapid successive calls trigger Reddit RATELIMIT errors with explicit cooldown hints (e.g., 'take a break for 9 minutes'); honor the specified wait before retrying. A successful API response does not guarantee public visibility — automod or spam filters may silently remove the comment. Publishes immediately and publicly; confirm target and text before executing.\",\n input: RedditPostRedditCommentInput,\n output: RedditPostRedditCommentOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kHAAkH;CAC5I,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sLAAsL;AACtN,CAAC;AACD,MAAM,4CAA4CA,IAAAA,EAAE,OAAO;CACzD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CACrE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC5F,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS;CACnH,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CACzG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yFAAyF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChJ,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS;CAClG,OAAOA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,oFAAoF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtI,OAAOA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mDAAmD,CA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C,CAAC,CAAC,SAAS,wCAAwC;AACpD,MAAM,oDAAoDA,IAAAA,EAAE,OAAO,EACjE,QAAQA,IAAAA,EAAE,MAAM,0CAA0C,CAAC,CAAC,SAAS,gDAAgD,EACvH,CAAC,CAAC,CAAC,SAAS,4CAA4C;AACxD,MAAM,mDAAmDA,IAAAA,EAAE,OAAO;CAChE,MAAM,kDAAkD,SAAS;CACjE,QAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,4EAA4E;AACnJ,CAAC,CAAC,CAAC,SAAS,6CAA6C;AACzD,MAAa,gCAAgCA,IAAAA,EAAE,OAAO;CACpD,MAAM,iDAAiD,SAAS;CAChE,4BAA4BA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qFAAqF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7J,CAAC,CAAC,CAAC,SAAS,4CAA4C;AAExD,MAAa,0BAA0BC,eAAAA,OAAO,8BAA8B;CAC1E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"post-reddit-comment.cjs","names":["z","action"],"sources":["../../src/actions/post-reddit-comment.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditPostRedditCommentInput = z.object({\n text: z.string().describe(\"REQUIRED. The raw Markdown text of the comment to be submitted. This field must be provided and cannot be empty.\"),\n thing_id: z.string().describe(\"REQUIRED. The ID of the parent post (link) or comment, prefixed with 't3_' for a post (e.g., 't3_10omtdx') or 't1_' for a comment (e.g., 't1_h2g9w8l'). This field must be provided.\"),\n});\nconst RedditPostRedditComment_CommentDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the comment\").nullable(),\n ups: z.number().int().describe(\"Number of upvotes (includes own vote if upvoted)\").nullable(),\n body: z.string().describe(\"Raw comment text content with Markdown formatting; HTML entities are escaped\").nullable(),\n name: z.string().describe(\"Fullname of the comment combining kind and id (e.g., 't1_c3v7f8u')\").nullable(),\n depth: z.number().int().describe(\"Nesting level of the comment; 0 for top-level comments, 1 for first-level replies, etc.\").nullable().optional(),\n downs: z.number().int().describe(\"Number of downvotes (includes own vote if downvoted)\").nullable(),\n likes: z.boolean().describe(\"Vote status: true if upvoted, false if downvoted, null if no vote or not logged in\").nullable().optional(),\n saved: z.boolean().describe(\"Whether the logged-in user has saved this comment\").nullable(),\n score: z.number().int().describe(\"Net score (upvotes minus downvotes) of the comment\").nullable(),\n author: z.string().describe(\"Username of the comment author\").nullable(),\n edited: z.union([z.boolean(), z.number()]),\n gilded: z.number().int().describe(\"Number of Reddit Gold awards the comment has received\").nullable(),\n created: z.number().describe(\"Unix timestamp when the comment was created in local time (epoch seconds)\").nullable(),\n link_id: z.string().describe(\"ID of the parent submission (prefixed with 't3_')\").nullable(),\n replies: z.union([z.record(z.string(), z.unknown()), z.string()]),\n link_url: z.string().describe(\"URL of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n stickied: z.boolean().describe(\"Whether the comment is stickied/pinned\").nullable(),\n banned_by: z.string().describe(\"Username of moderator who removed the comment; null if none or user lacks privileges\").nullable().optional(),\n body_html: z.string().describe(\"Formatted HTML version of the comment text as displayed on Reddit\").nullable(),\n parent_id: z.string().describe(\"ID of the parent comment (prefixed with 't1_') or submission (prefixed with 't3_')\").nullable(),\n permalink: z.string().describe(\"Permanent URL path to the comment\").nullable(),\n subreddit: z.string().describe(\"Name of the subreddit excluding the '/r/' prefix\").nullable(),\n link_title: z.string().describe(\"Title of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n approved_by: z.string().describe(\"Username of moderator who approved the comment; null if none or user lacks privileges\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp when the comment was created in UTC (epoch seconds)\").nullable(),\n link_author: z.string().describe(\"Author of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n num_reports: z.number().int().describe(\"Number of reports on the comment; null if user is not a moderator\").nullable().optional(),\n is_submitter: z.boolean().describe(\"Whether the comment author is also the submission author\").nullable(),\n score_hidden: z.boolean().describe(\"Whether the comment's score is currently hidden\").nullable(),\n subreddit_id: z.string().describe(\"Unique identifier of the subreddit\").nullable(),\n distinguished: z.string().describe(\"Moderator status: null (normal user), 'moderator' (green [M]), 'admin' (red [A]), or 'special'\").nullable().optional(),\n author_flair_text: z.string().describe(\"Text content of the author's user flair in this subreddit\").nullable().optional(),\n author_flair_css_class: z.string().describe(\"CSS class for styling the author's user flair\").nullable().optional(),\n}).passthrough().describe(\"The comment object data returned by Reddit API.\");\nconst RedditPostRedditComment_CommentThingSchema = z.object({\n data: RedditPostRedditComment_CommentDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier for the object; 't1' for comments\").nullable(),\n}).passthrough().describe(\"A Reddit 'thing' containing a comment.\");\nconst RedditPostRedditComment_CommentResponseDataSchema = z.object({\n things: z.array(RedditPostRedditComment_CommentThingSchema).describe(\"Array containing the created comment object(s)\"),\n}).passthrough().describe(\"Container for the created comment objects.\");\nconst RedditPostRedditComment_CommentJsonWrapperSchema = z.object({\n data: RedditPostRedditComment_CommentResponseDataSchema.nullable(),\n errors: z.array(z.union([z.string(), z.array(z.string())])).describe(\"Array of errors encountered during the API call; empty array if successful\"),\n}).passthrough().describe(\"Wrapper object containing the API response.\");\nexport const RedditPostRedditCommentOutput = z.object({\n json: RedditPostRedditComment_CommentJsonWrapperSchema.nullable(),\n composio_execution_message: z.string().describe(\"Informational message about the execution, such as platform limitations encountered\").nullable().optional(),\n}).passthrough().describe(\"Response from posting a comment on Reddit.\");\n\nexport const redditPostRedditComment = action(\"REDDIT_POST_REDDIT_COMMENT\", {\n slug: \"reddit-post-reddit-comment\",\n name: \"Post a comment\",\n description: \"Posts a comment on Reddit, replying to an existing submission (post) or another comment. Fails if the target thread is locked, archived, or restricted — verify thread state beforehand. Rapid successive calls trigger Reddit RATELIMIT errors with explicit cooldown hints (e.g., 'take a break for 9 minutes'); honor the specified wait before retrying. A successful API response does not guarantee public visibility — automod or spam filters may silently remove the comment. Publishes immediately and publicly; confirm target and text before executing.\",\n input: RedditPostRedditCommentInput,\n output: RedditPostRedditCommentOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kHAAkH;CAC5I,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sLAAsL;AACtN,CAAC;AACD,MAAM,4CAA4CA,IAAAA,EAAE,OAAO;CACzD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CACrE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC5F,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS;CACnH,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CACzG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yFAAyF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChJ,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS;CAClG,OAAOA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,oFAAoF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtI,OAAOA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;CAC1F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;C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AAQA,IAAAA,EAAE,MAAM,0CAA0C,CAAC,CAAC,SAAS,gDAAgD,EACvH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAA4C;AACtE,MAAM,mDAAmDA,IAAAA,EAAE,OAAO;CAChE,MAAM,kDAAkD,SAAS;CACjE,QAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,4EAA4E;AACnJ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6CAA6C;AACvE,MAAa,gCAAgCA,IAAAA,EAAE,OAAO;CACpD,MAAM,iDAAiD,SAAS;CAChE,4BAA4BA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qFAAqF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7J,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAA4C;AAEtE,MAAa,0BAA0BC,eAAAA,OAAO,8BAA8B;CAC1E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -43,14 +43,14 @@ declare const RedditPostRedditCommentOutput: z.ZodObject<{
|
|
|
43
43
|
distinguished: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
44
44
|
author_flair_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
45
|
author_flair_css_class: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
-
}, z.core.$
|
|
46
|
+
}, z.core.$loose>>;
|
|
47
47
|
kind: z.ZodNullable<z.ZodString>;
|
|
48
|
-
}, z.core.$
|
|
49
|
-
}, z.core.$
|
|
48
|
+
}, z.core.$loose>>;
|
|
49
|
+
}, z.core.$loose>>;
|
|
50
50
|
errors: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
51
|
-
}, z.core.$
|
|
51
|
+
}, z.core.$loose>>;
|
|
52
52
|
composio_execution_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
-
}, z.core.$
|
|
53
|
+
}, z.core.$loose>;
|
|
54
54
|
declare const redditPostRedditComment: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
55
55
|
text: string;
|
|
56
56
|
thing_id: string;
|
|
@@ -43,14 +43,14 @@ declare const RedditPostRedditCommentOutput: z.ZodObject<{
|
|
|
43
43
|
distinguished: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
44
44
|
author_flair_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
45
|
author_flair_css_class: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
-
}, z.core.$
|
|
46
|
+
}, z.core.$loose>>;
|
|
47
47
|
kind: z.ZodNullable<z.ZodString>;
|
|
48
|
-
}, z.core.$
|
|
49
|
-
}, z.core.$
|
|
48
|
+
}, z.core.$loose>>;
|
|
49
|
+
}, z.core.$loose>>;
|
|
50
50
|
errors: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
51
|
-
}, z.core.$
|
|
51
|
+
}, z.core.$loose>>;
|
|
52
52
|
composio_execution_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
-
}, z.core.$
|
|
53
|
+
}, z.core.$loose>;
|
|
54
54
|
declare const redditPostRedditComment: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
55
55
|
text: string;
|
|
56
56
|
thing_id: string;
|
|
@@ -39,16 +39,16 @@ const RedditPostRedditComment_CommentDataSchema = z.object({
|
|
|
39
39
|
distinguished: z.string().describe("Moderator status: null (normal user), 'moderator' (green [M]), 'admin' (red [A]), or 'special'").nullable().optional(),
|
|
40
40
|
author_flair_text: z.string().describe("Text content of the author's user flair in this subreddit").nullable().optional(),
|
|
41
41
|
author_flair_css_class: z.string().describe("CSS class for styling the author's user flair").nullable().optional()
|
|
42
|
-
}).describe("The comment object data returned by Reddit API.");
|
|
42
|
+
}).passthrough().describe("The comment object data returned by Reddit API.");
|
|
43
43
|
const RedditPostRedditComment_CommentThingSchema = z.object({
|
|
44
44
|
data: RedditPostRedditComment_CommentDataSchema.nullable(),
|
|
45
45
|
kind: z.string().describe("Type identifier for the object; 't1' for comments").nullable()
|
|
46
|
-
}).describe("A Reddit 'thing' containing a comment.");
|
|
47
|
-
const RedditPostRedditComment_CommentResponseDataSchema = z.object({ things: z.array(RedditPostRedditComment_CommentThingSchema).describe("Array containing the created comment object(s)") }).describe("Container for the created comment objects.");
|
|
46
|
+
}).passthrough().describe("A Reddit 'thing' containing a comment.");
|
|
47
|
+
const RedditPostRedditComment_CommentResponseDataSchema = z.object({ things: z.array(RedditPostRedditComment_CommentThingSchema).describe("Array containing the created comment object(s)") }).passthrough().describe("Container for the created comment objects.");
|
|
48
48
|
const RedditPostRedditComment_CommentJsonWrapperSchema = z.object({
|
|
49
49
|
data: RedditPostRedditComment_CommentResponseDataSchema.nullable(),
|
|
50
50
|
errors: z.array(z.union([z.string(), z.array(z.string())])).describe("Array of errors encountered during the API call; empty array if successful")
|
|
51
|
-
}).describe("Wrapper object containing the API response.");
|
|
51
|
+
}).passthrough().describe("Wrapper object containing the API response.");
|
|
52
52
|
const redditPostRedditComment = action("REDDIT_POST_REDDIT_COMMENT", {
|
|
53
53
|
slug: "reddit-post-reddit-comment",
|
|
54
54
|
name: "Post a comment",
|
|
@@ -57,7 +57,7 @@ const redditPostRedditComment = action("REDDIT_POST_REDDIT_COMMENT", {
|
|
|
57
57
|
output: z.object({
|
|
58
58
|
json: RedditPostRedditComment_CommentJsonWrapperSchema.nullable(),
|
|
59
59
|
composio_execution_message: z.string().describe("Informational message about the execution, such as platform limitations encountered").nullable().optional()
|
|
60
|
-
}).describe("Response from posting a comment on Reddit.")
|
|
60
|
+
}).passthrough().describe("Response from posting a comment on Reddit.")
|
|
61
61
|
});
|
|
62
62
|
//#endregion
|
|
63
63
|
export { redditPostRedditComment };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-reddit-comment.mjs","names":[],"sources":["../../src/actions/post-reddit-comment.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditPostRedditCommentInput = z.object({\n text: z.string().describe(\"REQUIRED. The raw Markdown text of the comment to be submitted. This field must be provided and cannot be empty.\"),\n thing_id: z.string().describe(\"REQUIRED. The ID of the parent post (link) or comment, prefixed with 't3_' for a post (e.g., 't3_10omtdx') or 't1_' for a comment (e.g., 't1_h2g9w8l'). This field must be provided.\"),\n});\nconst RedditPostRedditComment_CommentDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the comment\").nullable(),\n ups: z.number().int().describe(\"Number of upvotes (includes own vote if upvoted)\").nullable(),\n body: z.string().describe(\"Raw comment text content with Markdown formatting; HTML entities are escaped\").nullable(),\n name: z.string().describe(\"Fullname of the comment combining kind and id (e.g., 't1_c3v7f8u')\").nullable(),\n depth: z.number().int().describe(\"Nesting level of the comment; 0 for top-level comments, 1 for first-level replies, etc.\").nullable().optional(),\n downs: z.number().int().describe(\"Number of downvotes (includes own vote if downvoted)\").nullable(),\n likes: z.boolean().describe(\"Vote status: true if upvoted, false if downvoted, null if no vote or not logged in\").nullable().optional(),\n saved: z.boolean().describe(\"Whether the logged-in user has saved this comment\").nullable(),\n score: z.number().int().describe(\"Net score (upvotes minus downvotes) of the comment\").nullable(),\n author: z.string().describe(\"Username of the comment author\").nullable(),\n edited: z.union([z.boolean(), z.number()]),\n gilded: z.number().int().describe(\"Number of Reddit Gold awards the comment has received\").nullable(),\n created: z.number().describe(\"Unix timestamp when the comment was created in local time (epoch seconds)\").nullable(),\n link_id: z.string().describe(\"ID of the parent submission (prefixed with 't3_')\").nullable(),\n replies: z.union([z.record(z.string(), z.unknown()), z.string()]),\n link_url: z.string().describe(\"URL of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n stickied: z.boolean().describe(\"Whether the comment is stickied/pinned\").nullable(),\n banned_by: z.string().describe(\"Username of moderator who removed the comment; null if none or user lacks privileges\").nullable().optional(),\n body_html: z.string().describe(\"Formatted HTML version of the comment text as displayed on Reddit\").nullable(),\n parent_id: z.string().describe(\"ID of the parent comment (prefixed with 't1_') or submission (prefixed with 't3_')\").nullable(),\n permalink: z.string().describe(\"Permanent URL path to the comment\").nullable(),\n subreddit: z.string().describe(\"Name of the subreddit excluding the '/r/' prefix\").nullable(),\n link_title: z.string().describe(\"Title of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n approved_by: z.string().describe(\"Username of moderator who approved the comment; null if none or user lacks privileges\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp when the comment was created in UTC (epoch seconds)\").nullable(),\n link_author: z.string().describe(\"Author of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n num_reports: z.number().int().describe(\"Number of reports on the comment; null if user is not a moderator\").nullable().optional(),\n is_submitter: z.boolean().describe(\"Whether the comment author is also the submission author\").nullable(),\n score_hidden: z.boolean().describe(\"Whether the comment's score is currently hidden\").nullable(),\n subreddit_id: z.string().describe(\"Unique identifier of the subreddit\").nullable(),\n distinguished: z.string().describe(\"Moderator status: null (normal user), 'moderator' (green [M]), 'admin' (red [A]), or 'special'\").nullable().optional(),\n author_flair_text: z.string().describe(\"Text content of the author's user flair in this subreddit\").nullable().optional(),\n author_flair_css_class: z.string().describe(\"CSS class for styling the author's user flair\").nullable().optional(),\n}).describe(\"The comment object data returned by Reddit API.\");\nconst RedditPostRedditComment_CommentThingSchema = z.object({\n data: RedditPostRedditComment_CommentDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier for the object; 't1' for comments\").nullable(),\n}).describe(\"A Reddit 'thing' containing a comment.\");\nconst RedditPostRedditComment_CommentResponseDataSchema = z.object({\n things: z.array(RedditPostRedditComment_CommentThingSchema).describe(\"Array containing the created comment object(s)\"),\n}).describe(\"Container for the created comment objects.\");\nconst RedditPostRedditComment_CommentJsonWrapperSchema = z.object({\n data: RedditPostRedditComment_CommentResponseDataSchema.nullable(),\n errors: z.array(z.union([z.string(), z.array(z.string())])).describe(\"Array of errors encountered during the API call; empty array if successful\"),\n}).describe(\"Wrapper object containing the API response.\");\nexport const RedditPostRedditCommentOutput = z.object({\n json: RedditPostRedditComment_CommentJsonWrapperSchema.nullable(),\n composio_execution_message: z.string().describe(\"Informational message about the execution, such as platform limitations encountered\").nullable().optional(),\n}).describe(\"Response from posting a comment on Reddit.\");\n\nexport const redditPostRedditComment = action(\"REDDIT_POST_REDDIT_COMMENT\", {\n slug: \"reddit-post-reddit-comment\",\n name: \"Post a comment\",\n description: \"Posts a comment on Reddit, replying to an existing submission (post) or another comment. Fails if the target thread is locked, archived, or restricted — verify thread state beforehand. Rapid successive calls trigger Reddit RATELIMIT errors with explicit cooldown hints (e.g., 'take a break for 9 minutes'); honor the specified wait before retrying. A successful API response does not guarantee public visibility — automod or spam filters may silently remove the comment. Publishes immediately and publicly; confirm target and text before executing.\",\n input: RedditPostRedditCommentInput,\n output: RedditPostRedditCommentOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA+B,EAAE,OAAO;CACnD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kHAAkH;CAC5I,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,sLAAsL;AACtN,CAAC;AACD,MAAM,4CAA4C,EAAE,OAAO;CACzD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CACrE,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC5F,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS;CACnH,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CACzG,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yFAA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AS;CAC9H,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CAC7E,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC5F,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,gFAAgF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtI,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9I,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CAChH,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxI,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChI,cAAc,EAAE,QAAQ,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CACxG,cAAc,EAAE,QAAQ,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;CAC/F,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;CACjF,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,gGAAgG,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzJ,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxH,wBAAwB,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACnH,CAAC,CAAC,CAAC,SAAS,iDAAiD;
|
|
1
|
+
{"version":3,"file":"post-reddit-comment.mjs","names":[],"sources":["../../src/actions/post-reddit-comment.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditPostRedditCommentInput = z.object({\n text: z.string().describe(\"REQUIRED. The raw Markdown text of the comment to be submitted. This field must be provided and cannot be empty.\"),\n thing_id: z.string().describe(\"REQUIRED. The ID of the parent post (link) or comment, prefixed with 't3_' for a post (e.g., 't3_10omtdx') or 't1_' for a comment (e.g., 't1_h2g9w8l'). This field must be provided.\"),\n});\nconst RedditPostRedditComment_CommentDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the comment\").nullable(),\n ups: z.number().int().describe(\"Number of upvotes (includes own vote if upvoted)\").nullable(),\n body: z.string().describe(\"Raw comment text content with Markdown formatting; HTML entities are escaped\").nullable(),\n name: z.string().describe(\"Fullname of the comment combining kind and id (e.g., 't1_c3v7f8u')\").nullable(),\n depth: z.number().int().describe(\"Nesting level of the comment; 0 for top-level comments, 1 for first-level replies, etc.\").nullable().optional(),\n downs: z.number().int().describe(\"Number of downvotes (includes own vote if downvoted)\").nullable(),\n likes: z.boolean().describe(\"Vote status: true if upvoted, false if downvoted, null if no vote or not logged in\").nullable().optional(),\n saved: z.boolean().describe(\"Whether the logged-in user has saved this comment\").nullable(),\n score: z.number().int().describe(\"Net score (upvotes minus downvotes) of the comment\").nullable(),\n author: z.string().describe(\"Username of the comment author\").nullable(),\n edited: z.union([z.boolean(), z.number()]),\n gilded: z.number().int().describe(\"Number of Reddit Gold awards the comment has received\").nullable(),\n created: z.number().describe(\"Unix timestamp when the comment was created in local time (epoch seconds)\").nullable(),\n link_id: z.string().describe(\"ID of the parent submission (prefixed with 't3_')\").nullable(),\n replies: z.union([z.record(z.string(), z.unknown()), z.string()]),\n link_url: z.string().describe(\"URL of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n stickied: z.boolean().describe(\"Whether the comment is stickied/pinned\").nullable(),\n banned_by: z.string().describe(\"Username of moderator who removed the comment; null if none or user lacks privileges\").nullable().optional(),\n body_html: z.string().describe(\"Formatted HTML version of the comment text as displayed on Reddit\").nullable(),\n parent_id: z.string().describe(\"ID of the parent comment (prefixed with 't1_') or submission (prefixed with 't3_')\").nullable(),\n permalink: z.string().describe(\"Permanent URL path to the comment\").nullable(),\n subreddit: z.string().describe(\"Name of the subreddit excluding the '/r/' prefix\").nullable(),\n link_title: z.string().describe(\"Title of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n approved_by: z.string().describe(\"Username of moderator who approved the comment; null if none or user lacks privileges\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp when the comment was created in UTC (epoch seconds)\").nullable(),\n link_author: z.string().describe(\"Author of the parent submission (when comment displayed outside thread context)\").nullable().optional(),\n num_reports: z.number().int().describe(\"Number of reports on the comment; null if user is not a moderator\").nullable().optional(),\n is_submitter: z.boolean().describe(\"Whether the comment author is also the submission author\").nullable(),\n score_hidden: z.boolean().describe(\"Whether the comment's score is currently hidden\").nullable(),\n subreddit_id: z.string().describe(\"Unique identifier of the subreddit\").nullable(),\n distinguished: z.string().describe(\"Moderator status: null (normal user), 'moderator' (green [M]), 'admin' (red [A]), or 'special'\").nullable().optional(),\n author_flair_text: z.string().describe(\"Text content of the author's user flair in this subreddit\").nullable().optional(),\n author_flair_css_class: z.string().describe(\"CSS class for styling the author's user flair\").nullable().optional(),\n}).passthrough().describe(\"The comment object data returned by Reddit API.\");\nconst RedditPostRedditComment_CommentThingSchema = z.object({\n data: RedditPostRedditComment_CommentDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier for the object; 't1' for comments\").nullable(),\n}).passthrough().describe(\"A Reddit 'thing' containing a comment.\");\nconst RedditPostRedditComment_CommentResponseDataSchema = z.object({\n things: z.array(RedditPostRedditComment_CommentThingSchema).describe(\"Array containing the created comment object(s)\"),\n}).passthrough().describe(\"Container for the created comment objects.\");\nconst RedditPostRedditComment_CommentJsonWrapperSchema = z.object({\n data: RedditPostRedditComment_CommentResponseDataSchema.nullable(),\n errors: z.array(z.union([z.string(), z.array(z.string())])).describe(\"Array of errors encountered during the API call; empty array if successful\"),\n}).passthrough().describe(\"Wrapper object containing the API response.\");\nexport const RedditPostRedditCommentOutput = z.object({\n json: RedditPostRedditComment_CommentJsonWrapperSchema.nullable(),\n composio_execution_message: z.string().describe(\"Informational message about the execution, such as platform limitations encountered\").nullable().optional(),\n}).passthrough().describe(\"Response from posting a comment on Reddit.\");\n\nexport const redditPostRedditComment = action(\"REDDIT_POST_REDDIT_COMMENT\", {\n slug: \"reddit-post-reddit-comment\",\n name: \"Post a comment\",\n description: \"Posts a comment on Reddit, replying to an existing submission (post) or another comment. Fails if the target thread is locked, archived, or restricted — verify thread state beforehand. Rapid successive calls trigger Reddit RATELIMIT errors with explicit cooldown hints (e.g., 'take a break for 9 minutes'); honor the specified wait before retrying. A successful API response does not guarantee public visibility — automod or spam filters may silently remove the comment. Publishes immediately and publicly; confirm target and text before executing.\",\n input: RedditPostRedditCommentInput,\n output: RedditPostRedditCommentOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA+B,EAAE,OAAO;CACnD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kHAAkH;CAC5I,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,sLAAsL;AACtN,CAAC;AACD,MAAM,4CAA4C,EAAE,OAAO;CACzD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CACrE,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC5F,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS;CACnH,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CACzG,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yFAAyF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChJ,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS;CAClG,OAAO,EAAE,QAAQ,CAAC,CAAC,SAAS,o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AAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAA4C;AACtE,MAAM,mDAAmD,EAAE,OAAO;CAChE,MAAM,kDAAkD,SAAS;CACjE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,4EAA4E;AACnJ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6CAA6C;AAMvE,MAAa,0BAA0B,OAAO,8BAA8B;CAC1E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV2C,EAAE,OAAO;EACpD,MAAM,iDAAiD,SAAS;EAChE,4BAA4B,EAAE,OAAO,CAAC,CAAC,SAAS,qFAAqF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7J,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAOhB;AACV,CAAC"}
|
|
@@ -15,7 +15,7 @@ const RedditRetrievePostComments_PostDataSchema = zod.z.object({
|
|
|
15
15
|
subreddit: zod.z.string().describe("Name of the subreddit without the /r/ prefix.").nullable().optional(),
|
|
16
16
|
created_utc: zod.z.number().describe("Unix timestamp of post creation in UTC epoch-seconds.").nullable().optional(),
|
|
17
17
|
num_comments: zod.z.number().int().describe("Total number of comments.").nullable().optional()
|
|
18
|
-
}).describe("Optimized data attributes for a Reddit post (t3 kind).");
|
|
18
|
+
}).passthrough().describe("Optimized data attributes for a Reddit post (t3 kind).");
|
|
19
19
|
const RedditRetrievePostComments_PostThingSchema = zod.z.object({
|
|
20
20
|
data: RedditRetrievePostComments_PostDataSchema.nullable(),
|
|
21
21
|
kind: zod.z.string().describe("Type identifier, always 't3' for posts.").nullable()
|
|
@@ -45,7 +45,7 @@ const RedditRetrievePostComments_CommentDataSchema = zod.z.object({
|
|
|
45
45
|
has_replies: zod.z.boolean().describe("Whether this comment has nested replies.").nullable().optional(),
|
|
46
46
|
is_submitter: zod.z.boolean().describe("Whether the author is also the post submitter.").nullable().optional(),
|
|
47
47
|
distinguished: zod.z.string().describe("Special status: null, 'moderator', 'admin', or 'special'.").nullable().optional()
|
|
48
|
-
}).describe("Optimized data attributes for a Reddit comment (t1 kind).");
|
|
48
|
+
}).passthrough().describe("Optimized data attributes for a Reddit comment (t1 kind).");
|
|
49
49
|
const RedditRetrievePostComments_CommentThingSchema = zod.z.object({
|
|
50
50
|
data: RedditRetrievePostComments_CommentDataSchema.nullable(),
|
|
51
51
|
kind: zod.z.string().describe("Type identifier, always 't1' for comments.").nullable()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrieve-post-comments.cjs","names":["z","action"],"sources":["../../src/actions/retrieve-post-comments.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditRetrievePostCommentsInput = z.object({\n article: z.string().describe(\"Base-36 ID of the Reddit post (e.g., 'q5u7q5'), typically found in the post's URL and not including the 't3_' prefix.\"),\n});\nconst RedditRetrievePostComments_PostDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the post in base36 format.\").nullable().optional(),\n url: z.string().describe(\"URL the post links to, or the permalink if a self post.\").nullable().optional(),\n score: z.number().int().describe(\"Net score of the post (upvotes minus downvotes).\").nullable().optional(),\n title: z.string().describe(\"The title of the post.\").nullable().optional(),\n author: z.string().describe(\"Username of the post author, null if deleted.\").nullable().optional(),\n is_self: z.boolean().describe(\"Whether the post is a self/text post (true) or link post (false).\").nullable().optional(),\n over_18: z.boolean().describe(\"Whether the post is marked as NSFW.\").nullable().optional(),\n selftext: z.string().describe(\"Raw body text for self/text posts with markdown.\").nullable().optional(),\n permalink: z.string().describe(\"Relative URL path to the permanent link of the post.\").nullable().optional(),\n subreddit: z.string().describe(\"Name of the subreddit without the /r/ prefix.\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp of post creation in UTC epoch-seconds.\").nullable().optional(),\n num_comments: z.number().int().describe(\"Total number of comments.\").nullable().optional(),\n}).describe(\"Optimized data attributes for a Reddit post (t3 kind).\");\nconst RedditRetrievePostComments_PostThingSchema = z.object({\n data: RedditRetrievePostComments_PostDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 't3' for posts.\").nullable(),\n}).passthrough().describe(\"Wrapped post object with kind and data.\");\nconst RedditRetrievePostComments_PostListingDataSchema = z.object({\n dist: z.number().int().describe(\"Number of items in this listing.\").nullable().optional(),\n after: z.string().describe(\"Fullname of the listing that follows after this page.\").nullable().optional(),\n before: z.string().describe(\"Fullname of the listing that follows before this page.\").nullable().optional(),\n modhash: z.string().describe(\"Modhash for authentication purposes.\").nullable().optional(),\n children: z.array(RedditRetrievePostComments_PostThingSchema).describe(\"Array containing the post object.\"),\n geo_filter: z.string().describe(\"Geographic filter applied to the listing.\").nullable().optional(),\n}).passthrough().describe(\"Container object for the first listing containing the post.\");\nconst RedditRetrievePostComments_PostListingSchema = z.object({\n data: RedditRetrievePostComments_PostListingDataSchema.nullable(),\n kind: z.string().describe(\"Always 'Listing' for this object type.\").nullable(),\n}).passthrough().describe(\"Reddit API Listing object containing the post (first listing in response).\");\nconst RedditRetrievePostComments_CommentDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the comment in base36 format.\").nullable().optional(),\n body: z.string().describe(\"Raw text of the comment with markdown.\").nullable().optional(),\n name: z.string().describe(\"Fullname of the comment (e.g., 't1_abc123').\").nullable().optional(),\n depth: z.number().int().describe(\"Depth level in the comment tree (0 = top-level).\").nullable().optional(),\n score: z.number().int().describe(\"Net score (upvotes minus downvotes).\").nullable().optional(),\n author: z.string().describe(\"Username of the comment author, null if deleted.\").nullable().optional(),\n parent_id: z.string().describe(\"Fullname of the parent comment (t1_) or post (t3_).\").nullable().optional(),\n permalink: z.string().describe(\"Permanent link to the comment.\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp of creation in UTC epoch-seconds.\").nullable().optional(),\n has_replies: z.boolean().describe(\"Whether this comment has nested replies.\").nullable().optional(),\n is_submitter: z.boolean().describe(\"Whether the author is also the post submitter.\").nullable().optional(),\n distinguished: z.string().describe(\"Special status: null, 'moderator', 'admin', or 'special'.\").nullable().optional(),\n}).describe(\"Optimized data attributes for a Reddit comment (t1 kind).\");\nconst RedditRetrievePostComments_CommentThingSchema = z.object({\n data: RedditRetrievePostComments_CommentDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 't1' for comments.\").nullable(),\n}).passthrough().describe(\"Wrapped comment object with kind and data.\");\nconst RedditRetrievePostComments_MoreDataSchema = z.object({\n id: z.string().describe(\"Identifier for this more object.\").nullable().optional(),\n name: z.string().describe(\"Fullname of this more object.\").nullable().optional(),\n count: z.number().int().describe(\"Number of additional comments available.\").nullable().optional(),\n depth: z.number().int().describe(\"Depth level in the comment tree.\").nullable().optional(),\n children: z.array(z.string()).describe(\"Array of comment IDs that can be loaded using the morechildren endpoint.\").nullable().optional(),\n parent_id: z.string().describe(\"Fullname of the parent comment or post.\").nullable().optional(),\n}).passthrough().describe(\"Data for a 'more' object that holds IDs of additional comments to load.\");\nconst RedditRetrievePostComments_MoreThingSchema = z.object({\n data: RedditRetrievePostComments_MoreDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 'more'.\").nullable(),\n}).passthrough().describe(\"Wrapped 'more' object for loading additional comments.\");\nconst RedditRetrievePostComments_CommentListingDataSchema = z.object({\n dist: z.number().int().describe(\"Number of items in this listing.\").nullable().optional(),\n after: z.string().describe(\"Fullname of the listing that follows after this page.\").nullable().optional(),\n before: z.string().describe(\"Fullname of the listing that follows before this page.\").nullable().optional(),\n modhash: z.string().describe(\"Modhash for authentication purposes.\").nullable().optional(),\n children: z.array(z.union([RedditRetrievePostComments_CommentThingSchema, RedditRetrievePostComments_MoreThingSchema])).describe(\"Array of comment objects and 'more' placeholders.\"),\n geo_filter: z.string().describe(\"Geographic filter applied to the listing.\").nullable().optional(),\n}).passthrough().describe(\"Container object for the second listing containing comments.\");\nconst RedditRetrievePostComments_CommentListingSchema = z.object({\n data: RedditRetrievePostComments_CommentListingDataSchema.nullable(),\n kind: z.string().describe(\"Always 'Listing' for this object type.\").nullable(),\n}).passthrough().describe(\"Reddit API Listing object containing comments (second listing in response).\");\nexport const RedditRetrievePostCommentsOutput = z.object({\n post_listing: RedditRetrievePostComments_PostListingSchema.nullable(),\n comments_listing: RedditRetrievePostComments_CommentListingSchema.nullable(),\n}).passthrough().describe(\"Response containing two Listing objects from Reddit API.\\nThe first listing contains the submission/post object, and the second\\nlisting contains the top-level comments with nested replies.\");\n\nexport const redditRetrievePostComments = action(\"REDDIT_RETRIEVE_POST_COMMENTS\", {\n slug: \"reddit-retrieve-post-comments\",\n name: \"Retrieve Comments for a Post\",\n description: \"Retrieves all comments for a Reddit post given its base-36 article ID. Response is a two-element listings array: post metadata in `listings[0]`; comments in `listings[1].data.children` with text at each `[].data.body` and nested replies under each comment's `replies` field. Replies require recursive traversal to capture full discussion. Large, locked, or archived threads may return truncated trees or `more` placeholders rather than full results. Filter out comments where `body` is `[deleted]` or `[removed]`; use `parent_id` to reconstruct conversation flow. No time-filter parameter — compare `created_utc` against a UTC cutoff to filter by date.\",\n input: RedditRetrievePostCommentsInput,\n output: RedditRetrievePostCommentsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkCA,IAAAA,EAAE,OAAO,EACtD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uHAAuH,EACtJ,CAAC;AACD,MAAM,4CAA4CA,IAAAA,EAAE,OAAO;CACzD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzG,OAAOA,IAAA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,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACnG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8DAA8D;AACxF,MAAM,kDAAkDA,IAAAA,EAAE,OAAO;CAC/D,MAAM,oDAAoD,SAAS;CACnE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;AAC/E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6EAA6E;AACvG,MAAa,mCAAmCA,IAAAA,EAAE,OAAO;CACvD,cAAc,6CAA6C,SAAS;CACpE,kBAAkB,gDAAgD,SAAS;AAC7E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+LAA+L;AAEzN,MAAa,6BAA6BC,eAAAA,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"retrieve-post-comments.cjs","names":["z","action"],"sources":["../../src/actions/retrieve-post-comments.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditRetrievePostCommentsInput = z.object({\n article: z.string().describe(\"Base-36 ID of the Reddit post (e.g., 'q5u7q5'), typically found in the post's URL and not including the 't3_' prefix.\"),\n});\nconst RedditRetrievePostComments_PostDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the post in base36 format.\").nullable().optional(),\n url: z.string().describe(\"URL the post links to, or the permalink if a self post.\").nullable().optional(),\n score: z.number().int().describe(\"Net score of the post (upvotes minus downvotes).\").nullable().optional(),\n title: z.string().describe(\"The title of the post.\").nullable().optional(),\n author: z.string().describe(\"Username of the post author, null if deleted.\").nullable().optional(),\n is_self: z.boolean().describe(\"Whether the post is a self/text post (true) or link post (false).\").nullable().optional(),\n over_18: z.boolean().describe(\"Whether the post is marked as NSFW.\").nullable().optional(),\n selftext: z.string().describe(\"Raw body text for self/text posts with markdown.\").nullable().optional(),\n permalink: z.string().describe(\"Relative URL path to the permanent link of the post.\").nullable().optional(),\n subreddit: z.string().describe(\"Name of the subreddit without the /r/ prefix.\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp of post creation in UTC epoch-seconds.\").nullable().optional(),\n num_comments: z.number().int().describe(\"Total number of comments.\").nullable().optional(),\n}).passthrough().describe(\"Optimized data attributes for a Reddit post (t3 kind).\");\nconst RedditRetrievePostComments_PostThingSchema = z.object({\n data: RedditRetrievePostComments_PostDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 't3' for posts.\").nullable(),\n}).passthrough().describe(\"Wrapped post object with kind and data.\");\nconst RedditRetrievePostComments_PostListingDataSchema = z.object({\n dist: z.number().int().describe(\"Number of items in this listing.\").nullable().optional(),\n after: z.string().describe(\"Fullname of the listing that follows after this page.\").nullable().optional(),\n before: z.string().describe(\"Fullname of the listing that follows before this page.\").nullable().optional(),\n modhash: z.string().describe(\"Modhash for authentication purposes.\").nullable().optional(),\n children: z.array(RedditRetrievePostComments_PostThingSchema).describe(\"Array containing the post object.\"),\n geo_filter: z.string().describe(\"Geographic filter applied to the listing.\").nullable().optional(),\n}).passthrough().describe(\"Container object for the first listing containing the post.\");\nconst RedditRetrievePostComments_PostListingSchema = z.object({\n data: RedditRetrievePostComments_PostListingDataSchema.nullable(),\n kind: z.string().describe(\"Always 'Listing' for this object type.\").nullable(),\n}).passthrough().describe(\"Reddit API Listing object containing the post (first listing in response).\");\nconst RedditRetrievePostComments_CommentDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the comment in base36 format.\").nullable().optional(),\n body: z.string().describe(\"Raw text of the comment with markdown.\").nullable().optional(),\n name: z.string().describe(\"Fullname of the comment (e.g., 't1_abc123').\").nullable().optional(),\n depth: z.number().int().describe(\"Depth level in the comment tree (0 = top-level).\").nullable().optional(),\n score: z.number().int().describe(\"Net score (upvotes minus downvotes).\").nullable().optional(),\n author: z.string().describe(\"Username of the comment author, null if deleted.\").nullable().optional(),\n parent_id: z.string().describe(\"Fullname of the parent comment (t1_) or post (t3_).\").nullable().optional(),\n permalink: z.string().describe(\"Permanent link to the comment.\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp of creation in UTC epoch-seconds.\").nullable().optional(),\n has_replies: z.boolean().describe(\"Whether this comment has nested replies.\").nullable().optional(),\n is_submitter: z.boolean().describe(\"Whether the author is also the post submitter.\").nullable().optional(),\n distinguished: z.string().describe(\"Special status: null, 'moderator', 'admin', or 'special'.\").nullable().optional(),\n}).passthrough().describe(\"Optimized data attributes for a Reddit comment (t1 kind).\");\nconst RedditRetrievePostComments_CommentThingSchema = z.object({\n data: RedditRetrievePostComments_CommentDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 't1' for comments.\").nullable(),\n}).passthrough().describe(\"Wrapped comment object with kind and data.\");\nconst RedditRetrievePostComments_MoreDataSchema = z.object({\n id: z.string().describe(\"Identifier for this more object.\").nullable().optional(),\n name: z.string().describe(\"Fullname of this more object.\").nullable().optional(),\n count: z.number().int().describe(\"Number of additional comments available.\").nullable().optional(),\n depth: z.number().int().describe(\"Depth level in the comment tree.\").nullable().optional(),\n children: z.array(z.string()).describe(\"Array of comment IDs that can be loaded using the morechildren endpoint.\").nullable().optional(),\n parent_id: z.string().describe(\"Fullname of the parent comment or post.\").nullable().optional(),\n}).passthrough().describe(\"Data for a 'more' object that holds IDs of additional comments to load.\");\nconst RedditRetrievePostComments_MoreThingSchema = z.object({\n data: RedditRetrievePostComments_MoreDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 'more'.\").nullable(),\n}).passthrough().describe(\"Wrapped 'more' object for loading additional comments.\");\nconst RedditRetrievePostComments_CommentListingDataSchema = z.object({\n dist: z.number().int().describe(\"Number of items in this listing.\").nullable().optional(),\n after: z.string().describe(\"Fullname of the listing that follows after this page.\").nullable().optional(),\n before: z.string().describe(\"Fullname of the listing that follows before this page.\").nullable().optional(),\n modhash: z.string().describe(\"Modhash for authentication purposes.\").nullable().optional(),\n children: z.array(z.union([RedditRetrievePostComments_CommentThingSchema, RedditRetrievePostComments_MoreThingSchema])).describe(\"Array of comment objects and 'more' placeholders.\"),\n geo_filter: z.string().describe(\"Geographic filter applied to the listing.\").nullable().optional(),\n}).passthrough().describe(\"Container object for the second listing containing comments.\");\nconst RedditRetrievePostComments_CommentListingSchema = z.object({\n data: RedditRetrievePostComments_CommentListingDataSchema.nullable(),\n kind: z.string().describe(\"Always 'Listing' for this object type.\").nullable(),\n}).passthrough().describe(\"Reddit API Listing object containing comments (second listing in response).\");\nexport const RedditRetrievePostCommentsOutput = z.object({\n post_listing: RedditRetrievePostComments_PostListingSchema.nullable(),\n comments_listing: RedditRetrievePostComments_CommentListingSchema.nullable(),\n}).passthrough().describe(\"Response containing two Listing objects from Reddit API.\\nThe first listing contains the submission/post object, and the second\\nlisting contains the top-level comments with nested replies.\");\n\nexport const redditRetrievePostComments = action(\"REDDIT_RETRIEVE_POST_COMMENTS\", {\n slug: \"reddit-retrieve-post-comments\",\n name: \"Retrieve Comments for a Post\",\n description: \"Retrieves all comments for a Reddit post given its base-36 article ID. Response is a two-element listings array: post metadata in `listings[0]`; comments in `listings[1].data.children` with text at each `[].data.body` and nested replies under each comment's `replies` field. Replies require recursive traversal to capture full discussion. Large, locked, or archived threads may return truncated trees or `more` placeholders rather than full results. Filter out comments where `body` is `[deleted]` or `[removed]`; use `parent_id` to reconstruct conversation flow. No time-filter parameter — compare `created_utc` against a UTC cutoff to filter by date.\",\n input: RedditRetrievePostCommentsInput,\n output: RedditRetrievePostCommentsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkCA,IAAAA,EAAE,OAAO,EACtD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uHAAuH,EACtJ,CAAC;AACD,MAAM,4CAA4CA,IAAAA,EAAE,OAAO;CACzD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,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AO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1G,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzF,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAM,CAAC,+CAA+C,0CAA0C,CAAC,CAAC,CAAC,CAAC,SAAS,mDAAmD;CACpL,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACnG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8DAA8D;AACxF,MAAM,kDAAkDA,IAAAA,EAAE,OAAO;CAC/D,MAAM,oDAAoD,SAAS;CACnE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;AAC/E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6EAA6E;AACvG,MAAa,mCAAmCA,IAAAA,EAAE,OAAO;CACvD,cAAc,6CAA6C,SAAS;CACpE,kBAAkB,gDAAgD,SAAS;AAC7E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+LAA+L;AAEzN,MAAa,6BAA6BC,eAAAA,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -25,7 +25,7 @@ declare const RedditRetrievePostCommentsOutput: z.ZodObject<{
|
|
|
25
25
|
subreddit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
26
|
created_utc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
27
27
|
num_comments: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
28
|
-
}, z.core.$
|
|
28
|
+
}, z.core.$loose>>;
|
|
29
29
|
kind: z.ZodNullable<z.ZodString>;
|
|
30
30
|
}, z.core.$loose>>;
|
|
31
31
|
geo_filter: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -52,7 +52,7 @@ declare const RedditRetrievePostCommentsOutput: z.ZodObject<{
|
|
|
52
52
|
has_replies: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
53
53
|
is_submitter: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
54
54
|
distinguished: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
-
}, z.core.$
|
|
55
|
+
}, z.core.$loose>>;
|
|
56
56
|
kind: z.ZodNullable<z.ZodString>;
|
|
57
57
|
}, z.core.$loose>, z.ZodObject<{
|
|
58
58
|
data: z.ZodNullable<z.ZodObject<{
|
|
@@ -25,7 +25,7 @@ declare const RedditRetrievePostCommentsOutput: z.ZodObject<{
|
|
|
25
25
|
subreddit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
26
|
created_utc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
27
27
|
num_comments: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
28
|
-
}, z.core.$
|
|
28
|
+
}, z.core.$loose>>;
|
|
29
29
|
kind: z.ZodNullable<z.ZodString>;
|
|
30
30
|
}, z.core.$loose>>;
|
|
31
31
|
geo_filter: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -52,7 +52,7 @@ declare const RedditRetrievePostCommentsOutput: z.ZodObject<{
|
|
|
52
52
|
has_replies: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
53
53
|
is_submitter: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
54
54
|
distinguished: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
-
}, z.core.$
|
|
55
|
+
}, z.core.$loose>>;
|
|
56
56
|
kind: z.ZodNullable<z.ZodString>;
|
|
57
57
|
}, z.core.$loose>, z.ZodObject<{
|
|
58
58
|
data: z.ZodNullable<z.ZodObject<{
|
|
@@ -15,7 +15,7 @@ const RedditRetrievePostComments_PostDataSchema = z.object({
|
|
|
15
15
|
subreddit: z.string().describe("Name of the subreddit without the /r/ prefix.").nullable().optional(),
|
|
16
16
|
created_utc: z.number().describe("Unix timestamp of post creation in UTC epoch-seconds.").nullable().optional(),
|
|
17
17
|
num_comments: z.number().int().describe("Total number of comments.").nullable().optional()
|
|
18
|
-
}).describe("Optimized data attributes for a Reddit post (t3 kind).");
|
|
18
|
+
}).passthrough().describe("Optimized data attributes for a Reddit post (t3 kind).");
|
|
19
19
|
const RedditRetrievePostComments_PostThingSchema = z.object({
|
|
20
20
|
data: RedditRetrievePostComments_PostDataSchema.nullable(),
|
|
21
21
|
kind: z.string().describe("Type identifier, always 't3' for posts.").nullable()
|
|
@@ -45,7 +45,7 @@ const RedditRetrievePostComments_CommentDataSchema = z.object({
|
|
|
45
45
|
has_replies: z.boolean().describe("Whether this comment has nested replies.").nullable().optional(),
|
|
46
46
|
is_submitter: z.boolean().describe("Whether the author is also the post submitter.").nullable().optional(),
|
|
47
47
|
distinguished: z.string().describe("Special status: null, 'moderator', 'admin', or 'special'.").nullable().optional()
|
|
48
|
-
}).describe("Optimized data attributes for a Reddit comment (t1 kind).");
|
|
48
|
+
}).passthrough().describe("Optimized data attributes for a Reddit comment (t1 kind).");
|
|
49
49
|
const RedditRetrievePostComments_CommentThingSchema = z.object({
|
|
50
50
|
data: RedditRetrievePostComments_CommentDataSchema.nullable(),
|
|
51
51
|
kind: z.string().describe("Type identifier, always 't1' for comments.").nullable()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrieve-post-comments.mjs","names":[],"sources":["../../src/actions/retrieve-post-comments.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditRetrievePostCommentsInput = z.object({\n article: z.string().describe(\"Base-36 ID of the Reddit post (e.g., 'q5u7q5'), typically found in the post's URL and not including the 't3_' prefix.\"),\n});\nconst RedditRetrievePostComments_PostDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the post in base36 format.\").nullable().optional(),\n url: z.string().describe(\"URL the post links to, or the permalink if a self post.\").nullable().optional(),\n score: z.number().int().describe(\"Net score of the post (upvotes minus downvotes).\").nullable().optional(),\n title: z.string().describe(\"The title of the post.\").nullable().optional(),\n author: z.string().describe(\"Username of the post author, null if deleted.\").nullable().optional(),\n is_self: z.boolean().describe(\"Whether the post is a self/text post (true) or link post (false).\").nullable().optional(),\n over_18: z.boolean().describe(\"Whether the post is marked as NSFW.\").nullable().optional(),\n selftext: z.string().describe(\"Raw body text for self/text posts with markdown.\").nullable().optional(),\n permalink: z.string().describe(\"Relative URL path to the permanent link of the post.\").nullable().optional(),\n subreddit: z.string().describe(\"Name of the subreddit without the /r/ prefix.\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp of post creation in UTC epoch-seconds.\").nullable().optional(),\n num_comments: z.number().int().describe(\"Total number of comments.\").nullable().optional(),\n}).describe(\"Optimized data attributes for a Reddit post (t3 kind).\");\nconst RedditRetrievePostComments_PostThingSchema = z.object({\n data: RedditRetrievePostComments_PostDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 't3' for posts.\").nullable(),\n}).passthrough().describe(\"Wrapped post object with kind and data.\");\nconst RedditRetrievePostComments_PostListingDataSchema = z.object({\n dist: z.number().int().describe(\"Number of items in this listing.\").nullable().optional(),\n after: z.string().describe(\"Fullname of the listing that follows after this page.\").nullable().optional(),\n before: z.string().describe(\"Fullname of the listing that follows before this page.\").nullable().optional(),\n modhash: z.string().describe(\"Modhash for authentication purposes.\").nullable().optional(),\n children: z.array(RedditRetrievePostComments_PostThingSchema).describe(\"Array containing the post object.\"),\n geo_filter: z.string().describe(\"Geographic filter applied to the listing.\").nullable().optional(),\n}).passthrough().describe(\"Container object for the first listing containing the post.\");\nconst RedditRetrievePostComments_PostListingSchema = z.object({\n data: RedditRetrievePostComments_PostListingDataSchema.nullable(),\n kind: z.string().describe(\"Always 'Listing' for this object type.\").nullable(),\n}).passthrough().describe(\"Reddit API Listing object containing the post (first listing in response).\");\nconst RedditRetrievePostComments_CommentDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the comment in base36 format.\").nullable().optional(),\n body: z.string().describe(\"Raw text of the comment with markdown.\").nullable().optional(),\n name: z.string().describe(\"Fullname of the comment (e.g., 't1_abc123').\").nullable().optional(),\n depth: z.number().int().describe(\"Depth level in the comment tree (0 = top-level).\").nullable().optional(),\n score: z.number().int().describe(\"Net score (upvotes minus downvotes).\").nullable().optional(),\n author: z.string().describe(\"Username of the comment author, null if deleted.\").nullable().optional(),\n parent_id: z.string().describe(\"Fullname of the parent comment (t1_) or post (t3_).\").nullable().optional(),\n permalink: z.string().describe(\"Permanent link to the comment.\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp of creation in UTC epoch-seconds.\").nullable().optional(),\n has_replies: z.boolean().describe(\"Whether this comment has nested replies.\").nullable().optional(),\n is_submitter: z.boolean().describe(\"Whether the author is also the post submitter.\").nullable().optional(),\n distinguished: z.string().describe(\"Special status: null, 'moderator', 'admin', or 'special'.\").nullable().optional(),\n}).describe(\"Optimized data attributes for a Reddit comment (t1 kind).\");\nconst RedditRetrievePostComments_CommentThingSchema = z.object({\n data: RedditRetrievePostComments_CommentDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 't1' for comments.\").nullable(),\n}).passthrough().describe(\"Wrapped comment object with kind and data.\");\nconst RedditRetrievePostComments_MoreDataSchema = z.object({\n id: z.string().describe(\"Identifier for this more object.\").nullable().optional(),\n name: z.string().describe(\"Fullname of this more object.\").nullable().optional(),\n count: z.number().int().describe(\"Number of additional comments available.\").nullable().optional(),\n depth: z.number().int().describe(\"Depth level in the comment tree.\").nullable().optional(),\n children: z.array(z.string()).describe(\"Array of comment IDs that can be loaded using the morechildren endpoint.\").nullable().optional(),\n parent_id: z.string().describe(\"Fullname of the parent comment or post.\").nullable().optional(),\n}).passthrough().describe(\"Data for a 'more' object that holds IDs of additional comments to load.\");\nconst RedditRetrievePostComments_MoreThingSchema = z.object({\n data: RedditRetrievePostComments_MoreDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 'more'.\").nullable(),\n}).passthrough().describe(\"Wrapped 'more' object for loading additional comments.\");\nconst RedditRetrievePostComments_CommentListingDataSchema = z.object({\n dist: z.number().int().describe(\"Number of items in this listing.\").nullable().optional(),\n after: z.string().describe(\"Fullname of the listing that follows after this page.\").nullable().optional(),\n before: z.string().describe(\"Fullname of the listing that follows before this page.\").nullable().optional(),\n modhash: z.string().describe(\"Modhash for authentication purposes.\").nullable().optional(),\n children: z.array(z.union([RedditRetrievePostComments_CommentThingSchema, RedditRetrievePostComments_MoreThingSchema])).describe(\"Array of comment objects and 'more' placeholders.\"),\n geo_filter: z.string().describe(\"Geographic filter applied to the listing.\").nullable().optional(),\n}).passthrough().describe(\"Container object for the second listing containing comments.\");\nconst RedditRetrievePostComments_CommentListingSchema = z.object({\n data: RedditRetrievePostComments_CommentListingDataSchema.nullable(),\n kind: z.string().describe(\"Always 'Listing' for this object type.\").nullable(),\n}).passthrough().describe(\"Reddit API Listing object containing comments (second listing in response).\");\nexport const RedditRetrievePostCommentsOutput = z.object({\n post_listing: RedditRetrievePostComments_PostListingSchema.nullable(),\n comments_listing: RedditRetrievePostComments_CommentListingSchema.nullable(),\n}).passthrough().describe(\"Response containing two Listing objects from Reddit API.\\nThe first listing contains the submission/post object, and the second\\nlisting contains the top-level comments with nested replies.\");\n\nexport const redditRetrievePostComments = action(\"REDDIT_RETRIEVE_POST_COMMENTS\", {\n slug: \"reddit-retrieve-post-comments\",\n name: \"Retrieve Comments for a Post\",\n description: \"Retrieves all comments for a Reddit post given its base-36 article ID. Response is a two-element listings array: post metadata in `listings[0]`; comments in `listings[1].data.children` with text at each `[].data.body` and nested replies under each comment's `replies` field. Replies require recursive traversal to capture full discussion. Large, locked, or archived threads may return truncated trees or `more` placeholders rather than full results. Filter out comments where `body` is `[deleted]` or `[removed]`; use `parent_id` to reconstruct conversation flow. No time-filter parameter — compare `created_utc` against a UTC cutoff to filter by date.\",\n input: RedditRetrievePostCommentsInput,\n output: RedditRetrievePostCommentsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkC,EAAE,OAAO,EACtD,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,uHAAuH,EACtJ,CAAC;AACD,MAAM,4CAA4C,EAAE,OAAO;CACzD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxG,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzE,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjG,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvH,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzF,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtG,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3G,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9G,cAAc,EAA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zF,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,+CAA+C,0CAA0C,CAAC,CAAC,CAAC,CAAC,SAAS,mDAAmD;CACpL,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACnG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8DAA8D;AACxF,MAAM,kDAAkD,EAAE,OAAO;CAC/D,MAAM,oDAAoD,SAAS;CACnE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;AAC/E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6EAA6E;AAMvG,MAAa,6BAA6B,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV8C,EAAE,OAAO;EACvD,cAAc,6CAA6C,SAAS;EACpE,kBAAkB,gDAAgD,SAAS;CAC7E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+LAOhB;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"retrieve-post-comments.mjs","names":[],"sources":["../../src/actions/retrieve-post-comments.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditRetrievePostCommentsInput = z.object({\n article: z.string().describe(\"Base-36 ID of the Reddit post (e.g., 'q5u7q5'), typically found in the post's URL and not including the 't3_' prefix.\"),\n});\nconst RedditRetrievePostComments_PostDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the post in base36 format.\").nullable().optional(),\n url: z.string().describe(\"URL the post links to, or the permalink if a self post.\").nullable().optional(),\n score: z.number().int().describe(\"Net score of the post (upvotes minus downvotes).\").nullable().optional(),\n title: z.string().describe(\"The title of the post.\").nullable().optional(),\n author: z.string().describe(\"Username of the post author, null if deleted.\").nullable().optional(),\n is_self: z.boolean().describe(\"Whether the post is a self/text post (true) or link post (false).\").nullable().optional(),\n over_18: z.boolean().describe(\"Whether the post is marked as NSFW.\").nullable().optional(),\n selftext: z.string().describe(\"Raw body text for self/text posts with markdown.\").nullable().optional(),\n permalink: z.string().describe(\"Relative URL path to the permanent link of the post.\").nullable().optional(),\n subreddit: z.string().describe(\"Name of the subreddit without the /r/ prefix.\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp of post creation in UTC epoch-seconds.\").nullable().optional(),\n num_comments: z.number().int().describe(\"Total number of comments.\").nullable().optional(),\n}).passthrough().describe(\"Optimized data attributes for a Reddit post (t3 kind).\");\nconst RedditRetrievePostComments_PostThingSchema = z.object({\n data: RedditRetrievePostComments_PostDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 't3' for posts.\").nullable(),\n}).passthrough().describe(\"Wrapped post object with kind and data.\");\nconst RedditRetrievePostComments_PostListingDataSchema = z.object({\n dist: z.number().int().describe(\"Number of items in this listing.\").nullable().optional(),\n after: z.string().describe(\"Fullname of the listing that follows after this page.\").nullable().optional(),\n before: z.string().describe(\"Fullname of the listing that follows before this page.\").nullable().optional(),\n modhash: z.string().describe(\"Modhash for authentication purposes.\").nullable().optional(),\n children: z.array(RedditRetrievePostComments_PostThingSchema).describe(\"Array containing the post object.\"),\n geo_filter: z.string().describe(\"Geographic filter applied to the listing.\").nullable().optional(),\n}).passthrough().describe(\"Container object for the first listing containing the post.\");\nconst RedditRetrievePostComments_PostListingSchema = z.object({\n data: RedditRetrievePostComments_PostListingDataSchema.nullable(),\n kind: z.string().describe(\"Always 'Listing' for this object type.\").nullable(),\n}).passthrough().describe(\"Reddit API Listing object containing the post (first listing in response).\");\nconst RedditRetrievePostComments_CommentDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the comment in base36 format.\").nullable().optional(),\n body: z.string().describe(\"Raw text of the comment with markdown.\").nullable().optional(),\n name: z.string().describe(\"Fullname of the comment (e.g., 't1_abc123').\").nullable().optional(),\n depth: z.number().int().describe(\"Depth level in the comment tree (0 = top-level).\").nullable().optional(),\n score: z.number().int().describe(\"Net score (upvotes minus downvotes).\").nullable().optional(),\n author: z.string().describe(\"Username of the comment author, null if deleted.\").nullable().optional(),\n parent_id: z.string().describe(\"Fullname of the parent comment (t1_) or post (t3_).\").nullable().optional(),\n permalink: z.string().describe(\"Permanent link to the comment.\").nullable().optional(),\n created_utc: z.number().describe(\"Unix timestamp of creation in UTC epoch-seconds.\").nullable().optional(),\n has_replies: z.boolean().describe(\"Whether this comment has nested replies.\").nullable().optional(),\n is_submitter: z.boolean().describe(\"Whether the author is also the post submitter.\").nullable().optional(),\n distinguished: z.string().describe(\"Special status: null, 'moderator', 'admin', or 'special'.\").nullable().optional(),\n}).passthrough().describe(\"Optimized data attributes for a Reddit comment (t1 kind).\");\nconst RedditRetrievePostComments_CommentThingSchema = z.object({\n data: RedditRetrievePostComments_CommentDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 't1' for comments.\").nullable(),\n}).passthrough().describe(\"Wrapped comment object with kind and data.\");\nconst RedditRetrievePostComments_MoreDataSchema = z.object({\n id: z.string().describe(\"Identifier for this more object.\").nullable().optional(),\n name: z.string().describe(\"Fullname of this more object.\").nullable().optional(),\n count: z.number().int().describe(\"Number of additional comments available.\").nullable().optional(),\n depth: z.number().int().describe(\"Depth level in the comment tree.\").nullable().optional(),\n children: z.array(z.string()).describe(\"Array of comment IDs that can be loaded using the morechildren endpoint.\").nullable().optional(),\n parent_id: z.string().describe(\"Fullname of the parent comment or post.\").nullable().optional(),\n}).passthrough().describe(\"Data for a 'more' object that holds IDs of additional comments to load.\");\nconst RedditRetrievePostComments_MoreThingSchema = z.object({\n data: RedditRetrievePostComments_MoreDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier, always 'more'.\").nullable(),\n}).passthrough().describe(\"Wrapped 'more' object for loading additional comments.\");\nconst RedditRetrievePostComments_CommentListingDataSchema = z.object({\n dist: z.number().int().describe(\"Number of items in this listing.\").nullable().optional(),\n after: z.string().describe(\"Fullname of the listing that follows after this page.\").nullable().optional(),\n before: z.string().describe(\"Fullname of the listing that follows before this page.\").nullable().optional(),\n modhash: z.string().describe(\"Modhash for authentication purposes.\").nullable().optional(),\n children: z.array(z.union([RedditRetrievePostComments_CommentThingSchema, RedditRetrievePostComments_MoreThingSchema])).describe(\"Array of comment objects and 'more' placeholders.\"),\n geo_filter: z.string().describe(\"Geographic filter applied to the listing.\").nullable().optional(),\n}).passthrough().describe(\"Container object for the second listing containing comments.\");\nconst RedditRetrievePostComments_CommentListingSchema = z.object({\n data: RedditRetrievePostComments_CommentListingDataSchema.nullable(),\n kind: z.string().describe(\"Always 'Listing' for this object type.\").nullable(),\n}).passthrough().describe(\"Reddit API Listing object containing comments (second listing in response).\");\nexport const RedditRetrievePostCommentsOutput = z.object({\n post_listing: RedditRetrievePostComments_PostListingSchema.nullable(),\n comments_listing: RedditRetrievePostComments_CommentListingSchema.nullable(),\n}).passthrough().describe(\"Response containing two Listing objects from Reddit API.\\nThe first listing contains the submission/post object, and the second\\nlisting contains the top-level comments with nested replies.\");\n\nexport const redditRetrievePostComments = action(\"REDDIT_RETRIEVE_POST_COMMENTS\", {\n slug: \"reddit-retrieve-post-comments\",\n name: \"Retrieve Comments for a Post\",\n description: \"Retrieves all comments for a Reddit post given its base-36 article ID. Response is a two-element listings array: post metadata in `listings[0]`; comments in `listings[1].data.children` with text at each `[].data.body` and nested replies under each comment's `replies` field. Replies require recursive traversal to capture full discussion. Large, locked, or archived threads may return truncated trees or `more` placeholders rather than full results. Filter out comments where `body` is `[deleted]` or `[removed]`; use `parent_id` to reconstruct conversation flow. No time-filter parameter — compare `created_utc` against a UTC cutoff to filter by date.\",\n input: RedditRetrievePostCommentsInput,\n output: RedditRetrievePostCommentsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkC,EAAE,OAAO,EACtD,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,uHAAuH,EACtJ,CAAC;AACD,MAAM,4CAA4C,EAAE,OAAO;CACzD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC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,EAAE,OAAO;CAC/D,MAAM,oDAAoD,SAAS;CACnE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;AAC/E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6EAA6E;AAMvG,MAAa,6BAA6B,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAV8C,EAAE,OAAO;EACvD,cAAc,6CAA6C,SAAS;EACpE,kBAAkB,gDAAgD,SAAS;CAC7E,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+LAOhB;AACV,CAAC"}
|
|
@@ -30,22 +30,22 @@ const RedditRetrieveRedditPost_PostDataSchema = zod.z.object({
|
|
|
30
30
|
thumbnail: zod.z.string().describe("Thumbnail URL, or 'self' for self posts, 'image' if link to image but no thumbnail, 'default' if unavailable.").nullable(),
|
|
31
31
|
created_utc: zod.z.number().describe("Unix timestamp of post creation in UTC epoch-seconds.").nullable(),
|
|
32
32
|
num_comments: zod.z.number().int().describe("Total number of comments.").nullable()
|
|
33
|
-
}).describe("Optimized post data object containing only essential fields.");
|
|
33
|
+
}).passthrough().describe("Optimized post data object containing only essential fields.");
|
|
34
34
|
const RedditRetrieveRedditPost_PostChildSchema = zod.z.object({
|
|
35
35
|
data: RedditRetrieveRedditPost_PostDataSchema.nullable(),
|
|
36
36
|
kind: zod.z.string().describe("Type identifier for the post object, always 't3' for links/posts.").nullable()
|
|
37
|
-
}).describe("Wrapper object for each post in the children array.");
|
|
37
|
+
}).passthrough().describe("Wrapper object for each post in the children array.");
|
|
38
38
|
const RedditRetrieveRedditPost_ListingDataSchema = zod.z.object({
|
|
39
39
|
dist: zod.z.number().int().describe("The number of children returned in this listing.").nullable().optional(),
|
|
40
40
|
after: zod.z.string().describe("Fullname of the last item in the listing, used for pagination.").nullable().optional(),
|
|
41
41
|
before: zod.z.string().describe("Fullname of the first item in the listing, used for pagination.").nullable().optional(),
|
|
42
42
|
modhash: zod.z.string().describe("Modhash token for the current session.").nullable().optional(),
|
|
43
43
|
children: zod.z.array(RedditRetrieveRedditPost_PostChildSchema).describe("Array of post objects.")
|
|
44
|
-
}).describe("Container object holding the listing response data.");
|
|
44
|
+
}).passthrough().describe("Container object holding the listing response data.");
|
|
45
45
|
const RedditRetrieveRedditPostOutput = zod.z.object({
|
|
46
46
|
data: RedditRetrieveRedditPost_ListingDataSchema.nullable(),
|
|
47
47
|
kind: zod.z.string().describe("Type identifier for the response wrapper, typically 'Listing' for post queries.").nullable()
|
|
48
|
-
}).describe("Response from retrieving posts from a subreddit.");
|
|
48
|
+
}).passthrough().describe("Response from retrieving posts from a subreddit.");
|
|
49
49
|
const redditRetrieveRedditPost = require_action.action("REDDIT_RETRIEVE_REDDIT_POST", {
|
|
50
50
|
slug: "reddit-retrieve-reddit-post",
|
|
51
51
|
name: "Retrieve posts from subreddit",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrieve-reddit-post.cjs","names":["z","action"],"sources":["../../src/actions/retrieve-reddit-post.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditRetrieveRedditPostInput = z.object({\n sort: z.enum([\"hot\", \"new\", \"top\", \"rising\", \"controversial\"]).default(\"hot\").describe(\"Sort order for posts. Options: 'hot' (default, most active posts), 'new' (newest first), 'top' (highest scoring), 'rising' (trending posts), 'controversial' (most controversial).\").optional(),\n subreddit: z.string().describe(\"The name of the subreddit from which to retrieve posts (e.g., 'popular', 'pics'). Do not include 'r/'. Subreddit names must be 3-21 characters and can only contain letters, numbers, and underscores.\"),\n max_results: z.number().int().default(5).describe(\"The maximum number of posts to return. Default is 5. Set to 0 to retrieve the maximum allowed by the Reddit API (100 posts). Valid range: 0-100.\").optional(),\n});\nconst RedditRetrieveRedditPost_PostDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the post in base36 format.\").nullable(),\n ups: z.number().int().describe(\"Number of upvotes received.\").nullable(),\n url: z.string().describe(\"URL the post links to, or the permalink if a self post.\").nullable(),\n name: z.string().describe(\"Fullname of the post, combining type prefix and ID (e.g., 't3_abc123').\").nullable(),\n score: z.number().int().describe(\"Net score of the post, calculated as upvotes minus downvotes.\").nullable(),\n title: z.string().describe(\"The title of the post.\").nullable(),\n author: z.string().describe(\"Username of the post author.\").nullable().optional(),\n domain: z.string().describe(\"Domain of the linked content, 'self.<subreddit>' for self posts.\").nullable(),\n is_self: z.boolean().describe(\"Whether the post is a self/text post (true) or link post (false).\").nullable(),\n over_18: z.boolean().describe(\"Whether the post is marked as NSFW (Not Safe For Work).\").nullable(),\n is_video: z.boolean().describe(\"Whether the post contains a video hosted on Reddit.\").nullable().optional(),\n selftext: z.string().describe(\"Raw body text for self/text posts, empty string for link posts.\").nullable(),\n permalink: z.string().describe(\"Relative URL path to the permanent link of the post.\").nullable(),\n subreddit: z.string().describe(\"Name of the subreddit without the /r/ prefix.\").nullable(),\n thumbnail: z.string().describe(\"Thumbnail URL, or 'self' for self posts, 'image' if link to image but no thumbnail, 'default' if unavailable.\").nullable(),\n created_utc: z.number().describe(\"Unix timestamp of post creation in UTC epoch-seconds.\").nullable(),\n num_comments: z.number().int().describe(\"Total number of comments.\").nullable(),\n}).describe(\"Optimized post data object containing only essential fields.\");\nconst RedditRetrieveRedditPost_PostChildSchema = z.object({\n data: RedditRetrieveRedditPost_PostDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier for the post object, always 't3' for links/posts.\").nullable(),\n}).describe(\"Wrapper object for each post in the children array.\");\nconst RedditRetrieveRedditPost_ListingDataSchema = z.object({\n dist: z.number().int().describe(\"The number of children returned in this listing.\").nullable().optional(),\n after: z.string().describe(\"Fullname of the last item in the listing, used for pagination.\").nullable().optional(),\n before: z.string().describe(\"Fullname of the first item in the listing, used for pagination.\").nullable().optional(),\n modhash: z.string().describe(\"Modhash token for the current session.\").nullable().optional(),\n children: z.array(RedditRetrieveRedditPost_PostChildSchema).describe(\"Array of post objects.\"),\n}).describe(\"Container object holding the listing response data.\");\nexport const RedditRetrieveRedditPostOutput = z.object({\n data: RedditRetrieveRedditPost_ListingDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier for the response wrapper, typically 'Listing' for post queries.\").nullable(),\n}).describe(\"Response from retrieving posts from a subreddit.\");\n\nexport const redditRetrieveRedditPost = action(\"REDDIT_RETRIEVE_REDDIT_POST\", {\n slug: \"reddit-retrieve-reddit-post\",\n name: \"Retrieve posts from subreddit\",\n description: \"Retrieves posts from a specified, publicly accessible subreddit. Responses nest post data under `data.children[].data`; inspect the structure before parsing. Pagination uses a `data.after` cursor; deduplicate across pages by post `id`. No built-in date filtering; compare `created_utc` (Unix seconds, UTC) client-side. Rate limit: ~1–2 requests/second; back off on HTTP 429.\",\n input: RedditRetrieveRedditPostInput,\n output: RedditRetrieveRedditPostOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAAgCA,IAAAA,EAAE,OAAO;CACpD,MAAMA,IAAAA,EAAE,KAAK;EAAC;EAAO;EAAO;EAAO;EAAU;CAAe,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,oLAAoL,CAAC,CAAC,SAAS;CACtR,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wMAAwM;CACvO,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,kJAAkJ,CAAC,CAAC,SAAS;AACjN,CAAC;AACD,MAAM,0CAA0CA,IAAAA,EAAE,OAAO;CACvD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;CACpF,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS;CACvE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;CAC7F,MAAMA,IAAAA,EAAE,O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src/actions/retrieve-reddit-post.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const RedditRetrieveRedditPostInput = z.object({\n sort: z.enum([\"hot\", \"new\", \"top\", \"rising\", \"controversial\"]).default(\"hot\").describe(\"Sort order for posts. Options: 'hot' (default, most active posts), 'new' (newest first), 'top' (highest scoring), 'rising' (trending posts), 'controversial' (most controversial).\").optional(),\n subreddit: z.string().describe(\"The name of the subreddit from which to retrieve posts (e.g., 'popular', 'pics'). Do not include 'r/'. Subreddit names must be 3-21 characters and can only contain letters, numbers, and underscores.\"),\n max_results: z.number().int().default(5).describe(\"The maximum number of posts to return. Default is 5. Set to 0 to retrieve the maximum allowed by the Reddit API (100 posts). Valid range: 0-100.\").optional(),\n});\nconst RedditRetrieveRedditPost_PostDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the post in base36 format.\").nullable(),\n ups: z.number().int().describe(\"Number of upvotes received.\").nullable(),\n url: z.string().describe(\"URL the post links to, or the permalink if a self post.\").nullable(),\n name: z.string().describe(\"Fullname of the post, combining type prefix and ID (e.g., 't3_abc123').\").nullable(),\n score: z.number().int().describe(\"Net score of the post, calculated as upvotes minus downvotes.\").nullable(),\n title: z.string().describe(\"The title of the post.\").nullable(),\n author: z.string().describe(\"Username of the post author.\").nullable().optional(),\n domain: z.string().describe(\"Domain of the linked content, 'self.<subreddit>' for self posts.\").nullable(),\n is_self: z.boolean().describe(\"Whether the post is a self/text post (true) or link post (false).\").nullable(),\n over_18: z.boolean().describe(\"Whether the post is marked as NSFW (Not Safe For Work).\").nullable(),\n is_video: z.boolean().describe(\"Whether the post contains a video hosted on Reddit.\").nullable().optional(),\n selftext: z.string().describe(\"Raw body text for self/text posts, empty string for link posts.\").nullable(),\n permalink: z.string().describe(\"Relative URL path to the permanent link of the post.\").nullable(),\n subreddit: z.string().describe(\"Name of the subreddit without the /r/ prefix.\").nullable(),\n thumbnail: z.string().describe(\"Thumbnail URL, or 'self' for self posts, 'image' if link to image but no thumbnail, 'default' if unavailable.\").nullable(),\n created_utc: z.number().describe(\"Unix timestamp of post creation in UTC epoch-seconds.\").nullable(),\n num_comments: z.number().int().describe(\"Total number of comments.\").nullable(),\n}).passthrough().describe(\"Optimized post data object containing only essential fields.\");\nconst RedditRetrieveRedditPost_PostChildSchema = z.object({\n data: RedditRetrieveRedditPost_PostDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier for the post object, always 't3' for links/posts.\").nullable(),\n}).passthrough().describe(\"Wrapper object for each post in the children array.\");\nconst RedditRetrieveRedditPost_ListingDataSchema = z.object({\n dist: z.number().int().describe(\"The number of children returned in this listing.\").nullable().optional(),\n after: z.string().describe(\"Fullname of the last item in the listing, used for pagination.\").nullable().optional(),\n before: z.string().describe(\"Fullname of the first item in the listing, used for pagination.\").nullable().optional(),\n modhash: z.string().describe(\"Modhash token for the current session.\").nullable().optional(),\n children: z.array(RedditRetrieveRedditPost_PostChildSchema).describe(\"Array of post objects.\"),\n}).passthrough().describe(\"Container object holding the listing response data.\");\nexport const RedditRetrieveRedditPostOutput = z.object({\n data: RedditRetrieveRedditPost_ListingDataSchema.nullable(),\n kind: z.string().describe(\"Type identifier for the response wrapper, typically 'Listing' for post queries.\").nullable(),\n}).passthrough().describe(\"Response from retrieving posts from a subreddit.\");\n\nexport const redditRetrieveRedditPost = action(\"REDDIT_RETRIEVE_REDDIT_POST\", {\n slug: \"reddit-retrieve-reddit-post\",\n name: \"Retrieve posts from subreddit\",\n description: \"Retrieves posts from a specified, publicly accessible subreddit. Responses nest post data under `data.children[].data`; inspect the structure before parsing. Pagination uses a `data.after` cursor; deduplicate across pages by post `id`. No built-in date filtering; compare `created_utc` (Unix seconds, UTC) client-side. Rate limit: ~1–2 requests/second; back off on HTTP 429.\",\n input: RedditRetrieveRedditPostInput,\n output: RedditRetrieveRedditPostOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAAgCA,IAAAA,EAAE,OAAO;CACpD,MAAMA,IAAAA,EAAE,KAAK;EAAC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AAAA,EAAE,MAAM,wCAAwC,CAAC,CAAC,SAAS,wBAAwB;AAC/F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,qDAAqD;AAC/E,MAAa,iCAAiCA,IAAAA,EAAE,OAAO;CACrD,MAAM,2CAA2C,SAAS;CAC1D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;AACxH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,kDAAkD;AAE5E,MAAa,2BAA2BC,eAAAA,OAAO,+BAA+B;CAC5E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -37,12 +37,12 @@ declare const RedditRetrieveRedditPostOutput: z.ZodObject<{
|
|
|
37
37
|
thumbnail: z.ZodNullable<z.ZodString>;
|
|
38
38
|
created_utc: z.ZodNullable<z.ZodNumber>;
|
|
39
39
|
num_comments: z.ZodNullable<z.ZodNumber>;
|
|
40
|
-
}, z.core.$
|
|
40
|
+
}, z.core.$loose>>;
|
|
41
41
|
kind: z.ZodNullable<z.ZodString>;
|
|
42
|
-
}, z.core.$
|
|
43
|
-
}, z.core.$
|
|
42
|
+
}, z.core.$loose>>;
|
|
43
|
+
}, z.core.$loose>>;
|
|
44
44
|
kind: z.ZodNullable<z.ZodString>;
|
|
45
|
-
}, z.core.$
|
|
45
|
+
}, z.core.$loose>;
|
|
46
46
|
declare const redditRetrieveRedditPost: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
47
47
|
subreddit: string;
|
|
48
48
|
sort?: "hot" | "new" | "top" | "rising" | "controversial" | undefined;
|
|
@@ -37,12 +37,12 @@ declare const RedditRetrieveRedditPostOutput: z.ZodObject<{
|
|
|
37
37
|
thumbnail: z.ZodNullable<z.ZodString>;
|
|
38
38
|
created_utc: z.ZodNullable<z.ZodNumber>;
|
|
39
39
|
num_comments: z.ZodNullable<z.ZodNumber>;
|
|
40
|
-
}, z.core.$
|
|
40
|
+
}, z.core.$loose>>;
|
|
41
41
|
kind: z.ZodNullable<z.ZodString>;
|
|
42
|
-
}, z.core.$
|
|
43
|
-
}, z.core.$
|
|
42
|
+
}, z.core.$loose>>;
|
|
43
|
+
}, z.core.$loose>>;
|
|
44
44
|
kind: z.ZodNullable<z.ZodString>;
|
|
45
|
-
}, z.core.$
|
|
45
|
+
}, z.core.$loose>;
|
|
46
46
|
declare const redditRetrieveRedditPost: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
47
47
|
subreddit: string;
|
|
48
48
|
sort?: "hot" | "new" | "top" | "rising" | "controversial" | undefined;
|
|
@@ -30,18 +30,18 @@ const RedditRetrieveRedditPost_PostDataSchema = z.object({
|
|
|
30
30
|
thumbnail: z.string().describe("Thumbnail URL, or 'self' for self posts, 'image' if link to image but no thumbnail, 'default' if unavailable.").nullable(),
|
|
31
31
|
created_utc: z.number().describe("Unix timestamp of post creation in UTC epoch-seconds.").nullable(),
|
|
32
32
|
num_comments: z.number().int().describe("Total number of comments.").nullable()
|
|
33
|
-
}).describe("Optimized post data object containing only essential fields.");
|
|
33
|
+
}).passthrough().describe("Optimized post data object containing only essential fields.");
|
|
34
34
|
const RedditRetrieveRedditPost_PostChildSchema = z.object({
|
|
35
35
|
data: RedditRetrieveRedditPost_PostDataSchema.nullable(),
|
|
36
36
|
kind: z.string().describe("Type identifier for the post object, always 't3' for links/posts.").nullable()
|
|
37
|
-
}).describe("Wrapper object for each post in the children array.");
|
|
37
|
+
}).passthrough().describe("Wrapper object for each post in the children array.");
|
|
38
38
|
const RedditRetrieveRedditPost_ListingDataSchema = z.object({
|
|
39
39
|
dist: z.number().int().describe("The number of children returned in this listing.").nullable().optional(),
|
|
40
40
|
after: z.string().describe("Fullname of the last item in the listing, used for pagination.").nullable().optional(),
|
|
41
41
|
before: z.string().describe("Fullname of the first item in the listing, used for pagination.").nullable().optional(),
|
|
42
42
|
modhash: z.string().describe("Modhash token for the current session.").nullable().optional(),
|
|
43
43
|
children: z.array(RedditRetrieveRedditPost_PostChildSchema).describe("Array of post objects.")
|
|
44
|
-
}).describe("Container object holding the listing response data.");
|
|
44
|
+
}).passthrough().describe("Container object holding the listing response data.");
|
|
45
45
|
const redditRetrieveRedditPost = action("REDDIT_RETRIEVE_REDDIT_POST", {
|
|
46
46
|
slug: "reddit-retrieve-reddit-post",
|
|
47
47
|
name: "Retrieve posts from subreddit",
|
|
@@ -50,7 +50,7 @@ const redditRetrieveRedditPost = action("REDDIT_RETRIEVE_REDDIT_POST", {
|
|
|
50
50
|
output: z.object({
|
|
51
51
|
data: RedditRetrieveRedditPost_ListingDataSchema.nullable(),
|
|
52
52
|
kind: z.string().describe("Type identifier for the response wrapper, typically 'Listing' for post queries.").nullable()
|
|
53
|
-
}).describe("Response from retrieving posts from a subreddit.")
|
|
53
|
+
}).passthrough().describe("Response from retrieving posts from a subreddit.")
|
|
54
54
|
});
|
|
55
55
|
//#endregion
|
|
56
56
|
export { redditRetrieveRedditPost };
|