@opentabs-dev/opentabs-plugin-reddit 0.0.75 → 0.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -0
- package/dist/adapter.iife.js +342 -18
- package/dist/adapter.iife.js.map +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/delete-thing.d.ts +7 -0
- package/dist/tools/delete-thing.d.ts.map +1 -0
- package/dist/tools/delete-thing.js +25 -0
- package/dist/tools/delete-thing.js.map +1 -0
- package/dist/tools/edit-text.d.ts +9 -0
- package/dist/tools/edit-text.d.ts.map +1 -0
- package/dist/tools/edit-text.js +38 -0
- package/dist/tools/edit-text.js.map +1 -0
- package/dist/tools/get-comment-thread.d.ts +32 -0
- package/dist/tools/get-comment-thread.d.ts.map +1 -0
- package/dist/tools/get-comment-thread.js +94 -0
- package/dist/tools/get-comment-thread.js.map +1 -0
- package/dist/tools/get-post.d.ts +1 -1
- package/dist/tools/hide.d.ts +8 -0
- package/dist/tools/hide.d.ts.map +1 -0
- package/dist/tools/hide.js +24 -0
- package/dist/tools/hide.js.map +1 -0
- package/dist/tools/list-popular-subreddits.d.ts +22 -0
- package/dist/tools/list-popular-subreddits.d.ts.map +1 -0
- package/dist/tools/list-popular-subreddits.js +55 -0
- package/dist/tools/list-popular-subreddits.js.map +1 -0
- package/dist/tools/list-posts.d.ts +2 -2
- package/dist/tools/list-user-content.d.ts +50 -0
- package/dist/tools/list-user-content.d.ts.map +1 -0
- package/dist/tools/list-user-content.js +78 -0
- package/dist/tools/list-user-content.js.map +1 -0
- package/dist/tools/report.d.ts +8 -0
- package/dist/tools/report.d.ts.map +1 -0
- package/dist/tools/report.js +26 -0
- package/dist/tools/report.js.map +1 -0
- package/dist/tools/search-posts.d.ts +2 -2
- package/dist/tools.json +666 -11
- package/package.json +10 -4
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { redditPost } from '../reddit-api.js';
|
|
2
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const report = defineTool({
|
|
5
|
+
name: 'report',
|
|
6
|
+
displayName: 'Report',
|
|
7
|
+
description: 'Report a post or comment to the subreddit moderators for rule violations.',
|
|
8
|
+
summary: 'Report a post or comment',
|
|
9
|
+
icon: 'flag',
|
|
10
|
+
group: 'Actions',
|
|
11
|
+
input: z.object({
|
|
12
|
+
thing_id: z.string().min(1).describe('Fullname of the post or comment to report (e.g., "t3_abc123" or "t1_xyz")'),
|
|
13
|
+
reason: z.string().min(1).describe('Reason for the report'),
|
|
14
|
+
}),
|
|
15
|
+
output: z.object({
|
|
16
|
+
success: z.boolean().describe('Whether the report was submitted'),
|
|
17
|
+
}),
|
|
18
|
+
handle: async (params) => {
|
|
19
|
+
await redditPost('/api/report', {
|
|
20
|
+
thing_id: params.thing_id,
|
|
21
|
+
reason: params.reason,
|
|
22
|
+
});
|
|
23
|
+
return { success: true };
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/tools/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC;IAC/B,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,2EAA2E;IACxF,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,2EAA2E,CAAC;QACjH,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;KAC5D,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;KAClE,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,UAAU,CAAwB,aAAa,EAAE;YACrD,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -3,11 +3,11 @@ export declare const searchPosts: import("@opentabs-dev/plugin-sdk").ToolDefinit
|
|
|
3
3
|
query: z.ZodString;
|
|
4
4
|
subreddit: z.ZodOptional<z.ZodString>;
|
|
5
5
|
sort: z.ZodOptional<z.ZodEnum<{
|
|
6
|
-
relevance: "relevance";
|
|
7
|
-
hot: "hot";
|
|
8
6
|
top: "top";
|
|
9
7
|
new: "new";
|
|
10
8
|
comments: "comments";
|
|
9
|
+
hot: "hot";
|
|
10
|
+
relevance: "relevance";
|
|
11
11
|
}>>;
|
|
12
12
|
t: z.ZodOptional<z.ZodEnum<{
|
|
13
13
|
hour: "hour";
|