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