x-twitter-scraper 0.4.5 → 0.5.2

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.
Files changed (222) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/README.md +8 -41
  4. data/lib/x_twitter_scraper/client.rb +1 -1
  5. data/lib/x_twitter_scraper/internal/type/union.rb +13 -0
  6. data/lib/x_twitter_scraper/models/account_retrieve_response.rb +4 -4
  7. data/lib/x_twitter_scraper/models/compose_create_params.rb +194 -122
  8. data/lib/x_twitter_scraper/models/compose_create_response.rb +326 -33
  9. data/lib/x_twitter_scraper/models/credit_retrieve_topup_status_params.rb +2 -2
  10. data/lib/x_twitter_scraper/models/error.rb +99 -3
  11. data/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb +8 -8
  12. data/lib/x_twitter_scraper/models/guest_wallet_create_params.rb +2 -2
  13. data/lib/x_twitter_scraper/models/guest_wallet_create_response.rb +27 -7
  14. data/lib/x_twitter_scraper/models/guest_wallet_topup_params.rb +2 -2
  15. data/lib/x_twitter_scraper/models/guest_wallet_topup_response.rb +27 -7
  16. data/lib/x_twitter_scraper/models/search_tweet.rb +12 -12
  17. data/lib/x_twitter_scraper/models/support/ticket_create_params.rb +7 -1
  18. data/lib/x_twitter_scraper/models/support/ticket_create_response.rb +40 -3
  19. data/lib/x_twitter_scraper/models/support/ticket_reply_params.rb +7 -1
  20. data/lib/x_twitter_scraper/models/support/ticket_reply_response.rb +40 -3
  21. data/lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb +114 -1
  22. data/lib/x_twitter_scraper/models/x/communities/join_create_params.rb +8 -1
  23. data/lib/x_twitter_scraper/models/x/communities/join_create_response.rb +577 -4
  24. data/lib/x_twitter_scraper/models/x/communities/join_delete_all_params.rb +8 -1
  25. data/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb +585 -4
  26. data/lib/x_twitter_scraper/models/x/community_create_params.rb +8 -1
  27. data/lib/x_twitter_scraper/models/x/community_create_response.rb +568 -8
  28. data/lib/x_twitter_scraper/models/x/community_delete_params.rb +8 -1
  29. data/lib/x_twitter_scraper/models/x/community_delete_response.rb +576 -4
  30. data/lib/x_twitter_scraper/models/x/dm_send_params.rb +8 -1
  31. data/lib/x_twitter_scraper/models/x/dm_send_response.rb +573 -7
  32. data/lib/x_twitter_scraper/models/x/media_upload_params.rb +8 -1
  33. data/lib/x_twitter_scraper/models/x/media_upload_response.rb +568 -11
  34. data/lib/x_twitter_scraper/models/x/profile_update_avatar_params.rb +8 -1
  35. data/lib/x_twitter_scraper/models/x/profile_update_avatar_response.rb +576 -4
  36. data/lib/x_twitter_scraper/models/x/profile_update_banner_params.rb +8 -1
  37. data/lib/x_twitter_scraper/models/x/profile_update_banner_response.rb +576 -4
  38. data/lib/x_twitter_scraper/models/x/profile_update_params.rb +8 -1
  39. data/lib/x_twitter_scraper/models/x/profile_update_response.rb +576 -4
  40. data/lib/x_twitter_scraper/models/x/tweet_author.rb +1 -14
  41. data/lib/x_twitter_scraper/models/x/tweet_create_params.rb +5 -5
  42. data/lib/x_twitter_scraper/models/x/tweet_create_response.rb +551 -12
  43. data/lib/x_twitter_scraper/models/x/tweet_delete_params.rb +8 -1
  44. data/lib/x_twitter_scraper/models/x/tweet_delete_response.rb +576 -4
  45. data/lib/x_twitter_scraper/models/x/tweets/like_create_params.rb +8 -1
  46. data/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb +576 -4
  47. data/lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb +8 -1
  48. data/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb +576 -4
  49. data/lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb +8 -1
  50. data/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb +576 -4
  51. data/lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb +8 -1
  52. data/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb +576 -4
  53. data/lib/x_twitter_scraper/models/x/user_remove_follower_params.rb +8 -1
  54. data/lib/x_twitter_scraper/models/x/user_remove_follower_response.rb +576 -4
  55. data/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb +2 -2
  56. data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +2 -2
  57. data/lib/x_twitter_scraper/models/x/users/follow_create_params.rb +8 -1
  58. data/lib/x_twitter_scraper/models/x/users/follow_create_response.rb +576 -4
  59. data/lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb +8 -1
  60. data/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb +576 -4
  61. data/lib/x_twitter_scraper/models/x/write_action_retrieve_response.rb +469 -52
  62. data/lib/x_twitter_scraper/models/x/x_account.rb +7 -7
  63. data/lib/x_twitter_scraper/models/x/x_account_detail.rb +1 -1
  64. data/lib/x_twitter_scraper/resources/compose.rb +8 -26
  65. data/lib/x_twitter_scraper/resources/credits.rb +1 -1
  66. data/lib/x_twitter_scraper/resources/extractions.rb +4 -4
  67. data/lib/x_twitter_scraper/resources/guest_wallets.rb +2 -2
  68. data/lib/x_twitter_scraper/resources/monitors/keywords.rb +4 -5
  69. data/lib/x_twitter_scraper/resources/monitors.rb +3 -3
  70. data/lib/x_twitter_scraper/resources/support/tickets.rb +24 -8
  71. data/lib/x_twitter_scraper/resources/trends.rb +1 -1
  72. data/lib/x_twitter_scraper/resources/x/communities/join.rb +22 -8
  73. data/lib/x_twitter_scraper/resources/x/communities.rb +25 -11
  74. data/lib/x_twitter_scraper/resources/x/dm.rb +13 -6
  75. data/lib/x_twitter_scraper/resources/x/media.rb +17 -7
  76. data/lib/x_twitter_scraper/resources/x/profile.rb +46 -17
  77. data/lib/x_twitter_scraper/resources/x/tweets/like.rb +22 -8
  78. data/lib/x_twitter_scraper/resources/x/tweets/retweet.rb +22 -8
  79. data/lib/x_twitter_scraper/resources/x/tweets.rb +31 -16
  80. data/lib/x_twitter_scraper/resources/x/users/follow.rb +22 -8
  81. data/lib/x_twitter_scraper/resources/x/users.rb +16 -9
  82. data/lib/x_twitter_scraper/resources/x.rb +1 -2
  83. data/lib/x_twitter_scraper/version.rb +1 -1
  84. data/rbi/x_twitter_scraper/client.rbi +1 -1
  85. data/rbi/x_twitter_scraper/models/account_retrieve_response.rbi +4 -4
  86. data/rbi/x_twitter_scraper/models/compose_create_params.rbi +392 -215
  87. data/rbi/x_twitter_scraper/models/compose_create_response.rbi +537 -48
  88. data/rbi/x_twitter_scraper/models/credit_retrieve_topup_status_params.rbi +2 -2
  89. data/rbi/x_twitter_scraper/models/error.rbi +379 -13
  90. data/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi +8 -8
  91. data/rbi/x_twitter_scraper/models/guest_wallet_create_params.rbi +2 -2
  92. data/rbi/x_twitter_scraper/models/guest_wallet_create_response.rbi +87 -5
  93. data/rbi/x_twitter_scraper/models/guest_wallet_topup_params.rbi +2 -2
  94. data/rbi/x_twitter_scraper/models/guest_wallet_topup_response.rbi +87 -5
  95. data/rbi/x_twitter_scraper/models/search_tweet.rbi +12 -12
  96. data/rbi/x_twitter_scraper/models/support/ticket_create_params.rbi +9 -1
  97. data/rbi/x_twitter_scraper/models/support/ticket_create_response.rbi +113 -7
  98. data/rbi/x_twitter_scraper/models/support/ticket_reply_params.rbi +9 -1
  99. data/rbi/x_twitter_scraper/models/support/ticket_reply_response.rbi +113 -7
  100. data/rbi/x_twitter_scraper/models/support/ticket_retrieve_response.rbi +276 -5
  101. data/rbi/x_twitter_scraper/models/x/communities/join_create_params.rbi +6 -0
  102. data/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi +1154 -3
  103. data/rbi/x_twitter_scraper/models/x/communities/join_delete_all_params.rbi +6 -0
  104. data/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi +1154 -3
  105. data/rbi/x_twitter_scraper/models/x/community_create_params.rbi +6 -0
  106. data/rbi/x_twitter_scraper/models/x/community_create_response.rbi +1127 -5
  107. data/rbi/x_twitter_scraper/models/x/community_delete_params.rbi +6 -0
  108. data/rbi/x_twitter_scraper/models/x/community_delete_response.rbi +1148 -3
  109. data/rbi/x_twitter_scraper/models/x/dm_send_params.rbi +6 -0
  110. data/rbi/x_twitter_scraper/models/x/dm_send_response.rbi +1112 -6
  111. data/rbi/x_twitter_scraper/models/x/media_upload_params.rbi +6 -0
  112. data/rbi/x_twitter_scraper/models/x/media_upload_response.rbi +1124 -9
  113. data/rbi/x_twitter_scraper/models/x/profile_update_avatar_params.rbi +6 -0
  114. data/rbi/x_twitter_scraper/models/x/profile_update_avatar_response.rbi +1152 -3
  115. data/rbi/x_twitter_scraper/models/x/profile_update_banner_params.rbi +6 -0
  116. data/rbi/x_twitter_scraper/models/x/profile_update_banner_response.rbi +1152 -3
  117. data/rbi/x_twitter_scraper/models/x/profile_update_params.rbi +6 -0
  118. data/rbi/x_twitter_scraper/models/x/profile_update_response.rbi +1144 -3
  119. data/rbi/x_twitter_scraper/models/x/tweet_author.rbi +3 -13
  120. data/rbi/x_twitter_scraper/models/x/tweet_create_params.rbi +5 -8
  121. data/rbi/x_twitter_scraper/models/x/tweet_create_response.rbi +1108 -14
  122. data/rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi +6 -0
  123. data/rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi +1140 -3
  124. data/rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi +6 -0
  125. data/rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi +1154 -3
  126. data/rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi +6 -0
  127. data/rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi +1154 -3
  128. data/rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi +6 -0
  129. data/rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi +1154 -3
  130. data/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi +6 -0
  131. data/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi +1154 -3
  132. data/rbi/x_twitter_scraper/models/x/user_remove_follower_params.rbi +6 -0
  133. data/rbi/x_twitter_scraper/models/x/user_remove_follower_response.rbi +1152 -3
  134. data/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi +2 -2
  135. data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +2 -2
  136. data/rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi +6 -0
  137. data/rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi +1154 -3
  138. data/rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi +6 -0
  139. data/rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi +1154 -3
  140. data/rbi/x_twitter_scraper/models/x/write_action_retrieve_response.rbi +930 -66
  141. data/rbi/x_twitter_scraper/models/x/x_account.rbi +9 -9
  142. data/rbi/x_twitter_scraper/models/x/x_account_detail.rbi +1 -1
  143. data/rbi/x_twitter_scraper/resources/compose.rbi +12 -38
  144. data/rbi/x_twitter_scraper/resources/credits.rbi +1 -1
  145. data/rbi/x_twitter_scraper/resources/extractions.rbi +4 -4
  146. data/rbi/x_twitter_scraper/resources/guest_wallets.rbi +2 -2
  147. data/rbi/x_twitter_scraper/resources/monitors/keywords.rbi +4 -5
  148. data/rbi/x_twitter_scraper/resources/monitors.rbi +3 -3
  149. data/rbi/x_twitter_scraper/resources/support/tickets.rbi +17 -2
  150. data/rbi/x_twitter_scraper/resources/trends.rbi +1 -1
  151. data/rbi/x_twitter_scraper/resources/x/communities/join.rbi +16 -4
  152. data/rbi/x_twitter_scraper/resources/x/communities.rbi +19 -7
  153. data/rbi/x_twitter_scraper/resources/x/dm.rbi +10 -3
  154. data/rbi/x_twitter_scraper/resources/x/media.rbi +9 -4
  155. data/rbi/x_twitter_scraper/resources/x/profile.rbi +27 -8
  156. data/rbi/x_twitter_scraper/resources/x/tweets/like.rbi +16 -4
  157. data/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi +16 -4
  158. data/rbi/x_twitter_scraper/resources/x/tweets.rbi +31 -12
  159. data/rbi/x_twitter_scraper/resources/x/users/follow.rbi +16 -4
  160. data/rbi/x_twitter_scraper/resources/x/users.rbi +13 -7
  161. data/rbi/x_twitter_scraper/resources/x.rbi +1 -2
  162. data/sig/x_twitter_scraper/models/compose_create_params.rbs +150 -90
  163. data/sig/x_twitter_scraper/models/compose_create_response.rbs +249 -27
  164. data/sig/x_twitter_scraper/models/error.rbs +170 -7
  165. data/sig/x_twitter_scraper/models/guest_wallet_create_response.rbs +35 -5
  166. data/sig/x_twitter_scraper/models/guest_wallet_topup_response.rbs +35 -5
  167. data/sig/x_twitter_scraper/models/support/ticket_create_params.rbs +7 -1
  168. data/sig/x_twitter_scraper/models/support/ticket_create_response.rbs +49 -5
  169. data/sig/x_twitter_scraper/models/support/ticket_reply_params.rbs +7 -1
  170. data/sig/x_twitter_scraper/models/support/ticket_reply_response.rbs +49 -5
  171. data/sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs +113 -2
  172. data/sig/x_twitter_scraper/models/x/communities/join_create_params.rbs +5 -1
  173. data/sig/x_twitter_scraper/models/x/communities/join_create_response.rbs +540 -4
  174. data/sig/x_twitter_scraper/models/x/communities/join_delete_all_params.rbs +5 -1
  175. data/sig/x_twitter_scraper/models/x/communities/join_delete_all_response.rbs +540 -4
  176. data/sig/x_twitter_scraper/models/x/community_create_params.rbs +10 -1
  177. data/sig/x_twitter_scraper/models/x/community_create_response.rbs +528 -7
  178. data/sig/x_twitter_scraper/models/x/community_delete_params.rbs +10 -1
  179. data/sig/x_twitter_scraper/models/x/community_delete_response.rbs +540 -4
  180. data/sig/x_twitter_scraper/models/x/dm_send_params.rbs +5 -0
  181. data/sig/x_twitter_scraper/models/x/dm_send_response.rbs +539 -5
  182. data/sig/x_twitter_scraper/models/x/media_upload_params.rbs +5 -1
  183. data/sig/x_twitter_scraper/models/x/media_upload_response.rbs +534 -7
  184. data/sig/x_twitter_scraper/models/x/profile_update_avatar_params.rbs +5 -1
  185. data/sig/x_twitter_scraper/models/x/profile_update_avatar_response.rbs +540 -4
  186. data/sig/x_twitter_scraper/models/x/profile_update_banner_params.rbs +5 -1
  187. data/sig/x_twitter_scraper/models/x/profile_update_banner_response.rbs +540 -4
  188. data/sig/x_twitter_scraper/models/x/profile_update_params.rbs +5 -0
  189. data/sig/x_twitter_scraper/models/x/profile_update_response.rbs +540 -4
  190. data/sig/x_twitter_scraper/models/x/tweet_author.rbs +3 -11
  191. data/sig/x_twitter_scraper/models/x/tweet_create_params.rbs +4 -6
  192. data/sig/x_twitter_scraper/models/x/tweet_create_response.rbs +518 -11
  193. data/sig/x_twitter_scraper/models/x/tweet_delete_params.rbs +5 -1
  194. data/sig/x_twitter_scraper/models/x/tweet_delete_response.rbs +540 -4
  195. data/sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs +5 -1
  196. data/sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs +540 -4
  197. data/sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs +5 -1
  198. data/sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs +540 -4
  199. data/sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs +5 -1
  200. data/sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs +540 -4
  201. data/sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs +5 -1
  202. data/sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs +540 -4
  203. data/sig/x_twitter_scraper/models/x/user_remove_follower_params.rbs +5 -1
  204. data/sig/x_twitter_scraper/models/x/user_remove_follower_response.rbs +540 -4
  205. data/sig/x_twitter_scraper/models/x/users/follow_create_params.rbs +5 -1
  206. data/sig/x_twitter_scraper/models/x/users/follow_create_response.rbs +540 -4
  207. data/sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs +5 -1
  208. data/sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs +540 -4
  209. data/sig/x_twitter_scraper/models/x/write_action_retrieve_response.rbs +428 -54
  210. data/sig/x_twitter_scraper/resources/compose.rbs +2 -12
  211. data/sig/x_twitter_scraper/resources/support/tickets.rbs +2 -0
  212. data/sig/x_twitter_scraper/resources/x/communities/join.rbs +2 -0
  213. data/sig/x_twitter_scraper/resources/x/communities.rbs +2 -0
  214. data/sig/x_twitter_scraper/resources/x/dm.rbs +1 -0
  215. data/sig/x_twitter_scraper/resources/x/media.rbs +1 -0
  216. data/sig/x_twitter_scraper/resources/x/profile.rbs +3 -0
  217. data/sig/x_twitter_scraper/resources/x/tweets/like.rbs +2 -0
  218. data/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs +2 -0
  219. data/sig/x_twitter_scraper/resources/x/tweets.rbs +2 -1
  220. data/sig/x_twitter_scraper/resources/x/users/follow.rbs +2 -0
  221. data/sig/x_twitter_scraper/resources/x/users.rbs +1 -0
  222. metadata +17 -26
@@ -13,16 +13,1167 @@ module XTwitterScraper
13
13
  )
14
14
  end
15
15
 
16
+ sig { returns(String) }
17
+ attr_accessor :id
18
+
19
+ # Connected account selected for the write.
20
+ sig do
21
+ returns(
22
+ T.nilable(
23
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Account
24
+ )
25
+ )
26
+ end
27
+ attr_reader :account
28
+
29
+ sig do
30
+ params(
31
+ account:
32
+ T.nilable(
33
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Account::OrHash
34
+ )
35
+ ).void
36
+ end
37
+ attr_writer :account
38
+
39
+ sig do
40
+ returns(
41
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
42
+ )
43
+ end
44
+ attr_accessor :action
45
+
46
+ # plannedCredits is the approved maximum. chargedCredits comes from the settled
47
+ # credit ledger. Pending or failed writes are not charged.
48
+ sig do
49
+ returns(
50
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing
51
+ )
52
+ end
53
+ attr_reader :billing
54
+
55
+ sig do
56
+ params(
57
+ billing:
58
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::OrHash
59
+ ).void
60
+ end
61
+ attr_writer :billing
62
+
63
+ sig { returns(T::Boolean) }
64
+ attr_accessor :charged
65
+
66
+ sig { returns(String) }
67
+ attr_accessor :charged_credits
68
+
69
+ # Exact follow-up an API client or agent should perform.
70
+ sig do
71
+ returns(
72
+ T.nilable(
73
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction
74
+ )
75
+ )
76
+ end
77
+ attr_reader :next_action
78
+
79
+ sig do
80
+ params(
81
+ next_action:
82
+ T.nilable(
83
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction::OrHash
84
+ )
85
+ ).void
86
+ end
87
+ attr_writer :next_action
88
+
89
+ sig { returns(Symbol) }
90
+ attr_accessor :object
91
+
92
+ sig { returns(T.nilable(Integer)) }
93
+ attr_accessor :poll_after_ms
94
+
95
+ # Stable fingerprint and sanitized payload for replay checks.
96
+ sig do
97
+ returns(
98
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Request
99
+ )
100
+ end
101
+ attr_reader :request
102
+
103
+ sig do
104
+ params(
105
+ request:
106
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Request::OrHash
107
+ ).void
108
+ end
109
+ attr_writer :request
110
+
111
+ # Confirmed result produced by the write, when available.
112
+ sig do
113
+ returns(
114
+ T.nilable(
115
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result
116
+ )
117
+ )
118
+ end
119
+ attr_reader :result
120
+
121
+ sig do
122
+ params(
123
+ result:
124
+ T.nilable(
125
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::OrHash
126
+ )
127
+ ).void
128
+ end
129
+ attr_writer :result
130
+
131
+ # True only when a new attempt can reasonably succeed.
132
+ sig { returns(T::Boolean) }
133
+ attr_accessor :retryable
134
+
135
+ # True only when no write was dispatched and a new idempotency key may be used.
136
+ sig { returns(T::Boolean) }
137
+ attr_accessor :safe_to_retry
138
+
139
+ sig { returns(T::Boolean) }
140
+ attr_accessor :send_dispatched
141
+
142
+ sig do
143
+ returns(
144
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Status::TaggedSymbol
145
+ )
146
+ end
147
+ attr_accessor :status
148
+
149
+ sig { returns(String) }
150
+ attr_accessor :status_url
151
+
16
152
  sig { returns(T::Boolean) }
17
153
  attr_accessor :success
18
154
 
19
- sig { params(success: T::Boolean).returns(T.attached_class) }
20
- def self.new(success: true)
155
+ # Existing X resource targeted by the write, when applicable.
156
+ sig do
157
+ returns(
158
+ T.nilable(
159
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target
160
+ )
161
+ )
162
+ end
163
+ attr_reader :target
164
+
165
+ sig do
166
+ params(
167
+ target:
168
+ T.nilable(
169
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target::OrHash
170
+ )
171
+ ).void
172
+ end
173
+ attr_writer :target
174
+
175
+ sig { returns(T.nilable(String)) }
176
+ attr_accessor :target_id
177
+
178
+ sig { returns(T::Boolean) }
179
+ attr_accessor :terminal
180
+
181
+ sig { returns(String) }
182
+ attr_accessor :write_action_id
183
+
184
+ # Compatibility field for a confirmed community ID.
185
+ sig { returns(T.nilable(String)) }
186
+ attr_reader :community_id
187
+
188
+ sig { params(community_id: String).void }
189
+ attr_writer :community_id
190
+
191
+ # Confirmed community name when available.
192
+ sig { returns(T.nilable(String)) }
193
+ attr_reader :community_name
194
+
195
+ sig { params(community_name: String).void }
196
+ attr_writer :community_name
197
+
198
+ sig { returns(T.nilable(Time)) }
199
+ attr_reader :completed_at
200
+
201
+ sig { params(completed_at: Time).void }
202
+ attr_writer :completed_at
203
+
204
+ sig { returns(T.nilable(Integer)) }
205
+ attr_reader :confirmation_attempts
206
+
207
+ sig { params(confirmation_attempts: Integer).void }
208
+ attr_writer :confirmation_attempts
209
+
210
+ sig { returns(T.nilable(Time)) }
211
+ attr_reader :confirmation_checked_at
212
+
213
+ sig { params(confirmation_checked_at: Time).void }
214
+ attr_writer :confirmation_checked_at
215
+
216
+ sig { returns(T.nilable(Time)) }
217
+ attr_reader :confirmed_at
218
+
219
+ sig { params(confirmed_at: Time).void }
220
+ attr_writer :confirmed_at
221
+
222
+ sig { returns(T.nilable(Time)) }
223
+ attr_reader :created_at
224
+
225
+ sig { params(created_at: Time).void }
226
+ attr_writer :created_at
227
+
228
+ # Structured recovery context for a failed write.
229
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
230
+ attr_reader :details
231
+
232
+ sig { params(details: T::Hash[Symbol, T.anything]).void }
233
+ attr_writer :details
234
+
235
+ sig { returns(T.nilable(String)) }
236
+ attr_reader :error
237
+
238
+ sig { params(error: String).void }
239
+ attr_writer :error
240
+
241
+ # Deadline for resolving a non-terminal write. This is not the Idempotency-Key
242
+ # retention deadline.
243
+ sig { returns(T.nilable(Time)) }
244
+ attr_reader :expires_at
245
+
246
+ sig { params(expires_at: Time).void }
247
+ attr_writer :expires_at
248
+
249
+ sig { returns(T.nilable(T::Boolean)) }
250
+ attr_reader :idempotent
251
+
252
+ sig { params(idempotent: T::Boolean).void }
253
+ attr_writer :idempotent
254
+
255
+ # Media count, kind, size, and billing details when used.
256
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
257
+ attr_reader :media
258
+
259
+ sig { params(media: T::Hash[Symbol, T.anything]).void }
260
+ attr_writer :media
261
+
262
+ # Compatibility field for a confirmed media upload ID.
263
+ sig { returns(T.nilable(String)) }
264
+ attr_reader :media_id
265
+
266
+ sig { params(media_id: String).void }
267
+ attr_writer :media_id
268
+
269
+ # Public media URL when the upload creates one.
270
+ sig { returns(T.nilable(String)) }
271
+ attr_reader :media_url
272
+
273
+ sig { params(media_url: String).void }
274
+ attr_writer :media_url
275
+
276
+ sig { returns(T.nilable(String)) }
277
+ attr_reader :message
278
+
279
+ sig { params(message: String).void }
280
+ attr_writer :message
281
+
282
+ # Compatibility field for a confirmed direct message ID.
283
+ sig { returns(T.nilable(String)) }
284
+ attr_reader :message_id
285
+
286
+ sig { params(message_id: String).void }
287
+ attr_writer :message_id
288
+
289
+ sig { returns(T.nilable(String)) }
290
+ attr_reader :request_hash
291
+
292
+ sig { params(request_hash: String).void }
293
+ attr_writer :request_hash
294
+
295
+ sig { returns(T.nilable(String)) }
296
+ attr_reader :request_id
297
+
298
+ sig { params(request_id: String).void }
299
+ attr_writer :request_id
300
+
301
+ # Compatibility result ID for other write actions.
302
+ sig { returns(T.nilable(String)) }
303
+ attr_reader :result_id
304
+
305
+ sig { params(result_id: String).void }
306
+ attr_writer :result_id
307
+
308
+ # Dispatch timestamp when the write reached execution.
309
+ sig { returns(T.nilable(Time)) }
310
+ attr_reader :send_dispatched_at
311
+
312
+ sig { params(send_dispatched_at: Time).void }
313
+ attr_writer :send_dispatched_at
314
+
315
+ # Compatibility field for a confirmed tweet result ID.
316
+ sig { returns(T.nilable(String)) }
317
+ attr_reader :tweet_id
318
+
319
+ sig { params(tweet_id: String).void }
320
+ attr_writer :tweet_id
321
+
322
+ sig { returns(T.nilable(Time)) }
323
+ attr_reader :updated_at
324
+
325
+ sig { params(updated_at: Time).void }
326
+ attr_writer :updated_at
327
+
328
+ # Durable write lifecycle record. Poll statusUrl until terminal is true. Reusing
329
+ # the original Idempotency-Key returns this same record. Submit a new write only
330
+ # when safeToRetry is true, using a new key.
331
+ sig do
332
+ params(
333
+ id: String,
334
+ account:
335
+ T.nilable(
336
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Account::OrHash
337
+ ),
338
+ action:
339
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::OrSymbol,
340
+ billing:
341
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::OrHash,
342
+ charged: T::Boolean,
343
+ charged_credits: String,
344
+ next_action:
345
+ T.nilable(
346
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction::OrHash
347
+ ),
348
+ poll_after_ms: T.nilable(Integer),
349
+ request:
350
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Request::OrHash,
351
+ result:
352
+ T.nilable(
353
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::OrHash
354
+ ),
355
+ retryable: T::Boolean,
356
+ safe_to_retry: T::Boolean,
357
+ send_dispatched: T::Boolean,
358
+ status:
359
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Status::OrSymbol,
360
+ status_url: String,
361
+ success: T::Boolean,
362
+ target:
363
+ T.nilable(
364
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target::OrHash
365
+ ),
366
+ target_id: T.nilable(String),
367
+ terminal: T::Boolean,
368
+ write_action_id: String,
369
+ community_id: String,
370
+ community_name: String,
371
+ completed_at: Time,
372
+ confirmation_attempts: Integer,
373
+ confirmation_checked_at: Time,
374
+ confirmed_at: Time,
375
+ created_at: Time,
376
+ details: T::Hash[Symbol, T.anything],
377
+ error: String,
378
+ expires_at: Time,
379
+ idempotent: T::Boolean,
380
+ media: T::Hash[Symbol, T.anything],
381
+ media_id: String,
382
+ media_url: String,
383
+ message: String,
384
+ message_id: String,
385
+ request_hash: String,
386
+ request_id: String,
387
+ result_id: String,
388
+ send_dispatched_at: Time,
389
+ tweet_id: String,
390
+ updated_at: Time,
391
+ object: Symbol
392
+ ).returns(T.attached_class)
393
+ end
394
+ def self.new(
395
+ id:,
396
+ # Connected account selected for the write.
397
+ account:,
398
+ action:,
399
+ # plannedCredits is the approved maximum. chargedCredits comes from the settled
400
+ # credit ledger. Pending or failed writes are not charged.
401
+ billing:,
402
+ charged:,
403
+ charged_credits:,
404
+ # Exact follow-up an API client or agent should perform.
405
+ next_action:,
406
+ poll_after_ms:,
407
+ # Stable fingerprint and sanitized payload for replay checks.
408
+ request:,
409
+ # Confirmed result produced by the write, when available.
410
+ result:,
411
+ # True only when a new attempt can reasonably succeed.
412
+ retryable:,
413
+ # True only when no write was dispatched and a new idempotency key may be used.
414
+ safe_to_retry:,
415
+ send_dispatched:,
416
+ status:,
417
+ status_url:,
418
+ success:,
419
+ # Existing X resource targeted by the write, when applicable.
420
+ target:,
421
+ target_id:,
422
+ terminal:,
423
+ write_action_id:,
424
+ # Compatibility field for a confirmed community ID.
425
+ community_id: nil,
426
+ # Confirmed community name when available.
427
+ community_name: nil,
428
+ completed_at: nil,
429
+ confirmation_attempts: nil,
430
+ confirmation_checked_at: nil,
431
+ confirmed_at: nil,
432
+ created_at: nil,
433
+ # Structured recovery context for a failed write.
434
+ details: nil,
435
+ error: nil,
436
+ # Deadline for resolving a non-terminal write. This is not the Idempotency-Key
437
+ # retention deadline.
438
+ expires_at: nil,
439
+ idempotent: nil,
440
+ # Media count, kind, size, and billing details when used.
441
+ media: nil,
442
+ # Compatibility field for a confirmed media upload ID.
443
+ media_id: nil,
444
+ # Public media URL when the upload creates one.
445
+ media_url: nil,
446
+ message: nil,
447
+ # Compatibility field for a confirmed direct message ID.
448
+ message_id: nil,
449
+ request_hash: nil,
450
+ request_id: nil,
451
+ # Compatibility result ID for other write actions.
452
+ result_id: nil,
453
+ # Dispatch timestamp when the write reached execution.
454
+ send_dispatched_at: nil,
455
+ # Compatibility field for a confirmed tweet result ID.
456
+ tweet_id: nil,
457
+ updated_at: nil,
458
+ object: :x_write_action
459
+ )
21
460
  end
22
461
 
23
- sig { override.returns({ success: T::Boolean }) }
462
+ sig do
463
+ override.returns(
464
+ {
465
+ id: String,
466
+ account:
467
+ T.nilable(
468
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Account
469
+ ),
470
+ action:
471
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol,
472
+ billing:
473
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing,
474
+ charged: T::Boolean,
475
+ charged_credits: String,
476
+ next_action:
477
+ T.nilable(
478
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction
479
+ ),
480
+ object: Symbol,
481
+ poll_after_ms: T.nilable(Integer),
482
+ request:
483
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Request,
484
+ result:
485
+ T.nilable(
486
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result
487
+ ),
488
+ retryable: T::Boolean,
489
+ safe_to_retry: T::Boolean,
490
+ send_dispatched: T::Boolean,
491
+ status:
492
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Status::TaggedSymbol,
493
+ status_url: String,
494
+ success: T::Boolean,
495
+ target:
496
+ T.nilable(
497
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target
498
+ ),
499
+ target_id: T.nilable(String),
500
+ terminal: T::Boolean,
501
+ write_action_id: String,
502
+ community_id: String,
503
+ community_name: String,
504
+ completed_at: Time,
505
+ confirmation_attempts: Integer,
506
+ confirmation_checked_at: Time,
507
+ confirmed_at: Time,
508
+ created_at: Time,
509
+ details: T::Hash[Symbol, T.anything],
510
+ error: String,
511
+ expires_at: Time,
512
+ idempotent: T::Boolean,
513
+ media: T::Hash[Symbol, T.anything],
514
+ media_id: String,
515
+ media_url: String,
516
+ message: String,
517
+ message_id: String,
518
+ request_hash: String,
519
+ request_id: String,
520
+ result_id: String,
521
+ send_dispatched_at: Time,
522
+ tweet_id: String,
523
+ updated_at: Time
524
+ }
525
+ )
526
+ end
24
527
  def to_hash
25
528
  end
529
+
530
+ class Account < XTwitterScraper::Internal::Type::BaseModel
531
+ OrHash =
532
+ T.type_alias do
533
+ T.any(
534
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Account,
535
+ XTwitterScraper::Internal::AnyHash
536
+ )
537
+ end
538
+
539
+ sig { returns(String) }
540
+ attr_accessor :id
541
+
542
+ sig { returns(String) }
543
+ attr_accessor :username
544
+
545
+ # Connected account selected for the write.
546
+ sig do
547
+ params(id: String, username: String).returns(T.attached_class)
548
+ end
549
+ def self.new(id:, username:)
550
+ end
551
+
552
+ sig { override.returns({ id: String, username: String }) }
553
+ def to_hash
554
+ end
555
+ end
556
+
557
+ module Action
558
+ extend XTwitterScraper::Internal::Type::Enum
559
+
560
+ TaggedSymbol =
561
+ T.type_alias do
562
+ T.all(
563
+ Symbol,
564
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action
565
+ )
566
+ end
567
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
568
+
569
+ CREATE_TWEET =
570
+ T.let(
571
+ :create_tweet,
572
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
573
+ )
574
+ DELETE_TWEET =
575
+ T.let(
576
+ :delete_tweet,
577
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
578
+ )
579
+ LIKE =
580
+ T.let(
581
+ :like,
582
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
583
+ )
584
+ UNLIKE =
585
+ T.let(
586
+ :unlike,
587
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
588
+ )
589
+ RETWEET =
590
+ T.let(
591
+ :retweet,
592
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
593
+ )
594
+ UNRETWEET =
595
+ T.let(
596
+ :unretweet,
597
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
598
+ )
599
+ FOLLOW =
600
+ T.let(
601
+ :follow,
602
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
603
+ )
604
+ UNFOLLOW =
605
+ T.let(
606
+ :unfollow,
607
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
608
+ )
609
+ REMOVE_FOLLOWER =
610
+ T.let(
611
+ :remove_follower,
612
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
613
+ )
614
+ SEND_DM =
615
+ T.let(
616
+ :send_dm,
617
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
618
+ )
619
+ UPLOAD_MEDIA =
620
+ T.let(
621
+ :upload_media,
622
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
623
+ )
624
+ UPDATE_PROFILE =
625
+ T.let(
626
+ :update_profile,
627
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
628
+ )
629
+ UPDATE_AVATAR =
630
+ T.let(
631
+ :update_avatar,
632
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
633
+ )
634
+ UPDATE_BANNER =
635
+ T.let(
636
+ :update_banner,
637
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
638
+ )
639
+ CREATE_COMMUNITY =
640
+ T.let(
641
+ :create_community,
642
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
643
+ )
644
+ DELETE_COMMUNITY =
645
+ T.let(
646
+ :delete_community,
647
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
648
+ )
649
+ JOIN_COMMUNITY =
650
+ T.let(
651
+ :join_community,
652
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
653
+ )
654
+ LEAVE_COMMUNITY =
655
+ T.let(
656
+ :leave_community,
657
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
658
+ )
659
+
660
+ sig do
661
+ override.returns(
662
+ T::Array[
663
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Action::TaggedSymbol
664
+ ]
665
+ )
666
+ end
667
+ def self.values
668
+ end
669
+ end
670
+
671
+ class Billing < XTwitterScraper::Internal::Type::BaseModel
672
+ OrHash =
673
+ T.type_alias do
674
+ T.any(
675
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing,
676
+ XTwitterScraper::Internal::AnyHash
677
+ )
678
+ end
679
+
680
+ sig { returns(T::Boolean) }
681
+ attr_accessor :charged
682
+
683
+ sig { returns(String) }
684
+ attr_accessor :charged_credits
685
+
686
+ sig { returns(String) }
687
+ attr_accessor :planned_credits
688
+
689
+ sig do
690
+ returns(
691
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::Status::TaggedSymbol
692
+ )
693
+ end
694
+ attr_accessor :status
695
+
696
+ # plannedCredits is the approved maximum. chargedCredits comes from the settled
697
+ # credit ledger. Pending or failed writes are not charged.
698
+ sig do
699
+ params(
700
+ charged: T::Boolean,
701
+ charged_credits: String,
702
+ planned_credits: String,
703
+ status:
704
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::Status::OrSymbol
705
+ ).returns(T.attached_class)
706
+ end
707
+ def self.new(charged:, charged_credits:, planned_credits:, status:)
708
+ end
709
+
710
+ sig do
711
+ override.returns(
712
+ {
713
+ charged: T::Boolean,
714
+ charged_credits: String,
715
+ planned_credits: String,
716
+ status:
717
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::Status::TaggedSymbol
718
+ }
719
+ )
720
+ end
721
+ def to_hash
722
+ end
723
+
724
+ module Status
725
+ extend XTwitterScraper::Internal::Type::Enum
726
+
727
+ TaggedSymbol =
728
+ T.type_alias do
729
+ T.all(
730
+ Symbol,
731
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::Status
732
+ )
733
+ end
734
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
735
+
736
+ NOT_CHARGED =
737
+ T.let(
738
+ :not_charged,
739
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::Status::TaggedSymbol
740
+ )
741
+ PENDING =
742
+ T.let(
743
+ :pending,
744
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::Status::TaggedSymbol
745
+ )
746
+ CHARGED =
747
+ T.let(
748
+ :charged,
749
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::Status::TaggedSymbol
750
+ )
751
+ CHARGE_FAILED =
752
+ T.let(
753
+ :charge_failed,
754
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::Status::TaggedSymbol
755
+ )
756
+ REFUNDED =
757
+ T.let(
758
+ :refunded,
759
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::Status::TaggedSymbol
760
+ )
761
+
762
+ sig do
763
+ override.returns(
764
+ T::Array[
765
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Billing::Status::TaggedSymbol
766
+ ]
767
+ )
768
+ end
769
+ def self.values
770
+ end
771
+ end
772
+ end
773
+
774
+ class NextAction < XTwitterScraper::Internal::Type::BaseModel
775
+ OrHash =
776
+ T.type_alias do
777
+ T.any(
778
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction,
779
+ XTwitterScraper::Internal::AnyHash
780
+ )
781
+ end
782
+
783
+ sig do
784
+ returns(
785
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction::Type::TaggedSymbol
786
+ )
787
+ end
788
+ attr_accessor :type
789
+
790
+ sig { returns(T.nilable(Integer)) }
791
+ attr_reader :after_ms
792
+
793
+ sig { params(after_ms: Integer).void }
794
+ attr_writer :after_ms
795
+
796
+ sig { returns(T.nilable(T::Boolean)) }
797
+ attr_reader :requires_new_idempotency_key
798
+
799
+ sig { params(requires_new_idempotency_key: T::Boolean).void }
800
+ attr_writer :requires_new_idempotency_key
801
+
802
+ sig { returns(T.nilable(String)) }
803
+ attr_reader :url
804
+
805
+ sig { params(url: String).void }
806
+ attr_writer :url
807
+
808
+ # Exact follow-up an API client or agent should perform.
809
+ sig do
810
+ params(
811
+ type:
812
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction::Type::OrSymbol,
813
+ after_ms: Integer,
814
+ requires_new_idempotency_key: T::Boolean,
815
+ url: String
816
+ ).returns(T.attached_class)
817
+ end
818
+ def self.new(
819
+ type:,
820
+ after_ms: nil,
821
+ requires_new_idempotency_key: nil,
822
+ url: nil
823
+ )
824
+ end
825
+
826
+ sig do
827
+ override.returns(
828
+ {
829
+ type:
830
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction::Type::TaggedSymbol,
831
+ after_ms: Integer,
832
+ requires_new_idempotency_key: T::Boolean,
833
+ url: String
834
+ }
835
+ )
836
+ end
837
+ def to_hash
838
+ end
839
+
840
+ module Type
841
+ extend XTwitterScraper::Internal::Type::Enum
842
+
843
+ TaggedSymbol =
844
+ T.type_alias do
845
+ T.all(
846
+ Symbol,
847
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction::Type
848
+ )
849
+ end
850
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
851
+
852
+ POLL =
853
+ T.let(
854
+ :poll,
855
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction::Type::TaggedSymbol
856
+ )
857
+ RETRY =
858
+ T.let(
859
+ :retry,
860
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction::Type::TaggedSymbol
861
+ )
862
+ VERIFY_RESULT =
863
+ T.let(
864
+ :verify_result,
865
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction::Type::TaggedSymbol
866
+ )
867
+ FIX_REQUEST =
868
+ T.let(
869
+ :fix_request,
870
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction::Type::TaggedSymbol
871
+ )
872
+
873
+ sig do
874
+ override.returns(
875
+ T::Array[
876
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::NextAction::Type::TaggedSymbol
877
+ ]
878
+ )
879
+ end
880
+ def self.values
881
+ end
882
+ end
883
+ end
884
+
885
+ class Request < XTwitterScraper::Internal::Type::BaseModel
886
+ OrHash =
887
+ T.type_alias do
888
+ T.any(
889
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Request,
890
+ XTwitterScraper::Internal::AnyHash
891
+ )
892
+ end
893
+
894
+ # Stable hash of account, action, target, and payload.
895
+ sig { returns(T.nilable(String)) }
896
+ attr_accessor :hash_
897
+
898
+ # Exact sanitized payload dispatched for this action.
899
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
900
+ attr_accessor :payload
901
+
902
+ # Stable fingerprint and sanitized payload for replay checks.
903
+ sig do
904
+ params(
905
+ hash_: T.nilable(String),
906
+ payload: T.nilable(T::Hash[Symbol, T.anything])
907
+ ).returns(T.attached_class)
908
+ end
909
+ def self.new(
910
+ # Stable hash of account, action, target, and payload.
911
+ hash_:,
912
+ # Exact sanitized payload dispatched for this action.
913
+ payload:
914
+ )
915
+ end
916
+
917
+ sig do
918
+ override.returns(
919
+ {
920
+ hash_: T.nilable(String),
921
+ payload: T.nilable(T::Hash[Symbol, T.anything])
922
+ }
923
+ )
924
+ end
925
+ def to_hash
926
+ end
927
+ end
928
+
929
+ class Result < XTwitterScraper::Internal::Type::BaseModel
930
+ OrHash =
931
+ T.type_alias do
932
+ T.any(
933
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result,
934
+ XTwitterScraper::Internal::AnyHash
935
+ )
936
+ end
937
+
938
+ sig { returns(T.nilable(String)) }
939
+ attr_reader :id
940
+
941
+ sig { params(id: String).void }
942
+ attr_writer :id
943
+
944
+ sig { returns(T.nilable(String)) }
945
+ attr_reader :state
946
+
947
+ sig { params(state: String).void }
948
+ attr_writer :state
949
+
950
+ sig do
951
+ returns(
952
+ T.nilable(
953
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::Type::TaggedSymbol
954
+ )
955
+ )
956
+ end
957
+ attr_reader :type
958
+
959
+ sig do
960
+ params(
961
+ type:
962
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::Type::OrSymbol
963
+ ).void
964
+ end
965
+ attr_writer :type
966
+
967
+ # Confirmed result produced by the write, when available.
968
+ sig do
969
+ params(
970
+ id: String,
971
+ state: String,
972
+ type:
973
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::Type::OrSymbol
974
+ ).returns(T.attached_class)
975
+ end
976
+ def self.new(id: nil, state: nil, type: nil)
977
+ end
978
+
979
+ sig do
980
+ override.returns(
981
+ {
982
+ id: String,
983
+ state: String,
984
+ type:
985
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::Type::TaggedSymbol
986
+ }
987
+ )
988
+ end
989
+ def to_hash
990
+ end
991
+
992
+ module Type
993
+ extend XTwitterScraper::Internal::Type::Enum
994
+
995
+ TaggedSymbol =
996
+ T.type_alias do
997
+ T.all(
998
+ Symbol,
999
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::Type
1000
+ )
1001
+ end
1002
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1003
+
1004
+ TWEET =
1005
+ T.let(
1006
+ :tweet,
1007
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::Type::TaggedSymbol
1008
+ )
1009
+ DIRECT_MESSAGE =
1010
+ T.let(
1011
+ :direct_message,
1012
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::Type::TaggedSymbol
1013
+ )
1014
+ MEDIA =
1015
+ T.let(
1016
+ :media,
1017
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::Type::TaggedSymbol
1018
+ )
1019
+ COMMUNITY =
1020
+ T.let(
1021
+ :community,
1022
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::Type::TaggedSymbol
1023
+ )
1024
+ STATE_CHANGE =
1025
+ T.let(
1026
+ :state_change,
1027
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::Type::TaggedSymbol
1028
+ )
1029
+
1030
+ sig do
1031
+ override.returns(
1032
+ T::Array[
1033
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Result::Type::TaggedSymbol
1034
+ ]
1035
+ )
1036
+ end
1037
+ def self.values
1038
+ end
1039
+ end
1040
+ end
1041
+
1042
+ module Status
1043
+ extend XTwitterScraper::Internal::Type::Enum
1044
+
1045
+ TaggedSymbol =
1046
+ T.type_alias do
1047
+ T.all(
1048
+ Symbol,
1049
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Status
1050
+ )
1051
+ end
1052
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1053
+
1054
+ ACCEPTED =
1055
+ T.let(
1056
+ :accepted,
1057
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Status::TaggedSymbol
1058
+ )
1059
+ DISPATCHING =
1060
+ T.let(
1061
+ :dispatching,
1062
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Status::TaggedSymbol
1063
+ )
1064
+ PENDING_CONFIRMATION =
1065
+ T.let(
1066
+ :pending_confirmation,
1067
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Status::TaggedSymbol
1068
+ )
1069
+ SUCCESS =
1070
+ T.let(
1071
+ :success,
1072
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Status::TaggedSymbol
1073
+ )
1074
+ FAILED =
1075
+ T.let(
1076
+ :failed,
1077
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Status::TaggedSymbol
1078
+ )
1079
+ EXPIRED =
1080
+ T.let(
1081
+ :expired,
1082
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Status::TaggedSymbol
1083
+ )
1084
+
1085
+ sig do
1086
+ override.returns(
1087
+ T::Array[
1088
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Status::TaggedSymbol
1089
+ ]
1090
+ )
1091
+ end
1092
+ def self.values
1093
+ end
1094
+ end
1095
+
1096
+ class Target < XTwitterScraper::Internal::Type::BaseModel
1097
+ OrHash =
1098
+ T.type_alias do
1099
+ T.any(
1100
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target,
1101
+ XTwitterScraper::Internal::AnyHash
1102
+ )
1103
+ end
1104
+
1105
+ sig { returns(String) }
1106
+ attr_accessor :id
1107
+
1108
+ sig do
1109
+ returns(
1110
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target::Type::TaggedSymbol
1111
+ )
1112
+ end
1113
+ attr_accessor :type
1114
+
1115
+ # Existing X resource targeted by the write, when applicable.
1116
+ sig do
1117
+ params(
1118
+ id: String,
1119
+ type:
1120
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target::Type::OrSymbol
1121
+ ).returns(T.attached_class)
1122
+ end
1123
+ def self.new(id:, type:)
1124
+ end
1125
+
1126
+ sig do
1127
+ override.returns(
1128
+ {
1129
+ id: String,
1130
+ type:
1131
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target::Type::TaggedSymbol
1132
+ }
1133
+ )
1134
+ end
1135
+ def to_hash
1136
+ end
1137
+
1138
+ module Type
1139
+ extend XTwitterScraper::Internal::Type::Enum
1140
+
1141
+ TaggedSymbol =
1142
+ T.type_alias do
1143
+ T.all(
1144
+ Symbol,
1145
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target::Type
1146
+ )
1147
+ end
1148
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1149
+
1150
+ TWEET =
1151
+ T.let(
1152
+ :tweet,
1153
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target::Type::TaggedSymbol
1154
+ )
1155
+ USER =
1156
+ T.let(
1157
+ :user,
1158
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target::Type::TaggedSymbol
1159
+ )
1160
+ COMMUNITY =
1161
+ T.let(
1162
+ :community,
1163
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target::Type::TaggedSymbol
1164
+ )
1165
+
1166
+ sig do
1167
+ override.returns(
1168
+ T::Array[
1169
+ XTwitterScraper::Models::X::Tweets::LikeCreateResponse::Target::Type::TaggedSymbol
1170
+ ]
1171
+ )
1172
+ end
1173
+ def self.values
1174
+ end
1175
+ end
1176
+ end
26
1177
  end
27
1178
  end
28
1179
  end