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