feat: add engagement mixin for like/unlike/retweet/unretweet/bookmark

Adds a new mixin with programmatic engagement methods:
- like(tweetId) - FavoriteTweet
- unlike(tweetId) - UnfavoriteTweet
- retweet(tweetId) - CreateRetweet
- unretweet(tweetId) - DeleteRetweet
- bookmark(tweetId) - CreateBookmark

Implementation follows existing mixin patterns with:
- Shared performEngagementMutation() helper
- 404 retry with query ID refresh
- Returns BookmarkMutationResult for consistency

Also adds query IDs for the new operations to constants and
the update-query-ids script.

Includes 9 tests covering success cases, error handling, and retry logic.
This commit is contained in:
the-vampiire
2026-06-24 18:44:38 +09:00
committed by yuta
parent 471cd9b26f
commit da013664c8
5 changed files with 307 additions and 1 deletions
+3
View File
@@ -10,9 +10,12 @@ import path from 'node:path';
const TARGET_OPERATIONS = [
'CreateTweet',
'CreateRetweet',
'DeleteRetweet',
'CreateFriendship',
'DestroyFriendship',
'FavoriteTweet',
'UnfavoriteTweet',
'CreateBookmark',
'DeleteBookmark',
'TweetDetail',
'SearchTimeline',