@opentabs-dev/opentabs-plugin-reddit 0.0.82 → 0.0.83
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/adapter.iife.js +34 -2
- package/dist/adapter.iife.js.map +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/list-flairs.d.ts +11 -0
- package/dist/tools/list-flairs.d.ts.map +1 -0
- package/dist/tools/list-flairs.js +31 -0
- package/dist/tools/list-flairs.js.map +1 -0
- package/dist/tools.json +58 -1
- package/package.json +3 -3
package/dist/adapter.iife.js
CHANGED
|
@@ -14551,6 +14551,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14551
14551
|
}
|
|
14552
14552
|
});
|
|
14553
14553
|
|
|
14554
|
+
// src/tools/list-flairs.ts
|
|
14555
|
+
var listFlairs = defineTool({
|
|
14556
|
+
name: "list_flairs",
|
|
14557
|
+
displayName: "List Flairs",
|
|
14558
|
+
description: "List available post flairs for a subreddit. Use the returned flair ID with submit_post to satisfy subreddits that require flair.",
|
|
14559
|
+
summary: "List post flairs for a subreddit",
|
|
14560
|
+
icon: "tag",
|
|
14561
|
+
group: "Subreddits",
|
|
14562
|
+
input: external_exports.object({
|
|
14563
|
+
subreddit: external_exports.string().min(1).describe('Subreddit name without r/ prefix (e.g., "ClaudeAI")')
|
|
14564
|
+
}),
|
|
14565
|
+
output: external_exports.object({
|
|
14566
|
+
flairs: external_exports.array(
|
|
14567
|
+
external_exports.object({
|
|
14568
|
+
id: external_exports.string().describe("Flair ID \u2014 pass this as flair_id to submit_post"),
|
|
14569
|
+
text: external_exports.string().describe("Flair display text"),
|
|
14570
|
+
text_editable: external_exports.boolean().describe("Whether the flair text can be customized")
|
|
14571
|
+
})
|
|
14572
|
+
)
|
|
14573
|
+
}),
|
|
14574
|
+
handle: async (params) => {
|
|
14575
|
+
const data = await redditGet(`/r/${params.subreddit}/api/link_flair_v2.json`);
|
|
14576
|
+
const flairs = (Array.isArray(data) ? data : []).map((f) => ({
|
|
14577
|
+
id: f.id,
|
|
14578
|
+
text: f.text,
|
|
14579
|
+
text_editable: f.text_editable ?? false
|
|
14580
|
+
}));
|
|
14581
|
+
return { flairs };
|
|
14582
|
+
}
|
|
14583
|
+
});
|
|
14584
|
+
|
|
14554
14585
|
// src/tools/get-user.ts
|
|
14555
14586
|
var getUser = defineTool({
|
|
14556
14587
|
name: "get_user",
|
|
@@ -15250,6 +15281,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15250
15281
|
report,
|
|
15251
15282
|
listUserContent,
|
|
15252
15283
|
getSubreddit,
|
|
15284
|
+
listFlairs,
|
|
15253
15285
|
searchSubreddits,
|
|
15254
15286
|
listSubscriptions,
|
|
15255
15287
|
listPopularSubreddits,
|
|
@@ -15271,7 +15303,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15271
15303
|
};
|
|
15272
15304
|
var src_default = new RedditPlugin();
|
|
15273
15305
|
|
|
15274
|
-
// dist/
|
|
15306
|
+
// dist/_adapter_entry_100b094f-f7c7-4d2d-92c6-688956e988d1.ts
|
|
15275
15307
|
if (!globalThis.__openTabs) {
|
|
15276
15308
|
globalThis.__openTabs = {};
|
|
15277
15309
|
} else {
|
|
@@ -15487,5 +15519,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15487
15519
|
};
|
|
15488
15520
|
delete src_default.onDeactivate;
|
|
15489
15521
|
}
|
|
15490
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="
|
|
15522
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="ff86ae8510d9cb9e8e37d87ad8a7fdcbc9b9f92b5a93a67666ad4e0fb145e844";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"reddit",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15491
15523
|
//# sourceMappingURL=adapter.iife.js.map
|