Open Issues Need Help
View All on GitHubAI Summary: This issue proposes migrating the project's bundler from `tsup` to `tsdown` because `tsup` is no longer maintained. The migration involves replacing dependencies, updating build scripts, verifying outputs, and updating documentation to use the actively maintained and modern `tsdown`.
AI Summary: This issue proposes adding a new `getMutualReactions` method to a Model. This method will take a `reactableId` and two `userIds`, returning an array of reaction types that both users have applied to the specified document. The implementation should be efficient, using a single database query.
AI Summary: This issue proposes adding two new static methods, `bulkReact` and `bulkUnreact`, to a Model. These methods would allow applying or removing a specific reaction to/from multiple documents identified by `reactableIds` for a given `userId` in a single, optimized database operation.
AI Summary: This issue proposes adding support for various user ID types (Numbers, UUIDs, Strings) beyond the current `ObjectId` for the `user` field. It requires introducing a new plugin option to define the ID type, dynamically updating the reaction schema, refactoring all relevant methods to handle the specified type, updating TypeScript definitions with generics, and adding comprehensive tests and documentation.
AI Summary: This issue requests exporting an existing internal `validateReaction` helper function. This function will allow external users to validate reaction strings against the plugin's whitelist and case sensitivity rules, returning a normalized string if valid or throwing an error otherwise, with accompanying tests and documentation.
AI Summary: This feature request proposes extending the reaction aggregation system to allow grouping and counting reactions based on a specified nested `meta` field (e.g., `meta.source`). It requires a new method, `Model.getReactionCountsByMeta`, that returns counts grouped by both reaction type and the value of the meta field. The output should follow a specific nested format, and the task is labeled as a 'good first issue'.
AI Summary: This enhancement requests exporting an internally created `Reaction` model from a plugin, making it accessible via `MyModel.ReactionModel`. This allows advanced users to perform direct queries or aggregations on the model, and requires documentation with usage examples.
AI Summary: This issue proposes a new plugin option, `preventSelfReactions`, to prevent users from reacting to documents they own. It requires a companion option, `authorIdPath`, to specify the field containing the author's ID for comparison with the reacting user's ID.
AI Summary: This issue proposes adding a static `hasReaction` method to a Model. This method will efficiently check if a specific user has reacted to a document, optionally filtering by a particular reaction type, and return a boolean. It requires full typing, tests, and documentation.
AI Summary: The `toggleReaction` function needs to be refactored to return a consistent object shape, specifically `{ action: 'added' | 'removed', doc: ReactionDoc | null }`, instead of its current varied return types. This task involves updating the function's logic, its TypeScript definitions, all existing tests, and adding usage examples to the documentation.
AI Summary: This issue proposes enhancing the `getReactionCounts` method by adding an optional `reactions` array parameter. This parameter will allow users to filter the returned reaction counts, showing only the counts for the specified reaction types, while maintaining existing behavior if no filter is provided.
AI Summary: This issue proposes adding a new option to customize the field names for `createdAt` and `updatedAt` timestamps within a plugin, moving beyond Mongoose's default naming. Users will be able to define custom names like `reactedAt` or `modifiedAt` via a `timestamps` option, ensuring backward compatibility and updated documentation.
AI Summary: This issue requests the implementation of a new static method, `getReactionTimeline(userId, options)`, to retrieve a paginated history of all reactions made by a specific user. The method should return reaction documents sorted by most recent, including a reference to the reacted document (`reactableId`), and be efficiently indexed.
AI Summary: This issue proposes adding a new static method, `getTopReactions(limit = 5)`, to a model. This method should return an array of the most popular reaction types and their counts across all documents of the model, ordered by popularity, with an optional limit on the number of results.
AI Summary: This enhancement proposes adding real-time notification hooks for reaction events within a Mongoose schema. The goal is to allow applications to push updates (e.g., via websockets) when reactions occur, unoccur, or toggle. The approach involves emitting Mongoose `post` hooks for `react`, `unreact`, and `toggle` events, along with documentation and a `socket.io` example.