Skip to content

Commit b959adc

Browse files
feat(api): propagate durable write actions
1 parent 9ad8d7c commit b959adc

16 files changed

Lines changed: 332 additions & 98 deletions

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 122
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-4665e942135459ff435542ae46122294c910986fdf19a0d2d33bc301817cf36f.yml
3-
openapi_spec_hash: 564b37a7cb3edf100a82799631e287d9
4-
config_hash: 7a9e1c37c84d207c5ee312091fffd2b0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-d053a3e575a411e23fdd316b0b97626192c13564ef91814a4831e20a809cfdc5.yml
3+
openapi_spec_hash: 0dc9eb7d023b1a16c08c6fec5a231957
4+
config_hash: 4b64fbd16fd09008417c5a460d27f053

lib/x_twitter_scraper/models/guest_wallet_create_response.rb

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,37 @@ class GuestWalletCreateResponse < XTwitterScraper::Internal::Type::BaseModel
128128
class Authorization < XTwitterScraper::Internal::Type::BaseModel
129129
# @!attribute header
130130
#
131-
# @return [Symbol, :Authorization]
132-
required :header, const: :Authorization
131+
# @return [Symbol, XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header]
132+
required :header, enum: -> { XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header }
133133

134134
# @!attribute scheme
135135
#
136-
# @return [Symbol, :Bearer]
137-
required :scheme, const: :Bearer
136+
# @return [Symbol, XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme]
137+
required :scheme, enum: -> { XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme }
138138

139-
# @!method initialize(header: :Authorization, scheme: :Bearer)
140-
# @param header [Symbol, :Authorization]
141-
# @param scheme [Symbol, :Bearer]
139+
# @!method initialize(header:, scheme:)
140+
# @param header [Symbol, XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header]
141+
# @param scheme [Symbol, XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme]
142+
143+
# @see XTwitterScraper::Models::GuestWalletCreateResponse::Authorization#header
144+
module Header
145+
extend XTwitterScraper::Internal::Type::Enum
146+
147+
AUTHORIZATION = :Authorization
148+
149+
# @!method self.values
150+
# @return [Array<Symbol>]
151+
end
152+
153+
# @see XTwitterScraper::Models::GuestWalletCreateResponse::Authorization#scheme
154+
module Scheme
155+
extend XTwitterScraper::Internal::Type::Enum
156+
157+
BEARER = :Bearer
158+
159+
# @!method self.values
160+
# @return [Array<Symbol>]
161+
end
142162
end
143163

144164
# @see XTwitterScraper::Models::GuestWalletCreateResponse#status

lib/x_twitter_scraper/models/guest_wallet_topup_response.rb

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,37 @@ module Status
144144
class Authorization < XTwitterScraper::Internal::Type::BaseModel
145145
# @!attribute header
146146
#
147-
# @return [Symbol, :Authorization]
148-
required :header, const: :Authorization
147+
# @return [Symbol, XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header]
148+
required :header, enum: -> { XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header }
149149

150150
# @!attribute scheme
151151
#
152-
# @return [Symbol, :Bearer]
153-
required :scheme, const: :Bearer
152+
# @return [Symbol, XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme]
153+
required :scheme, enum: -> { XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme }
154154

155-
# @!method initialize(header: :Authorization, scheme: :Bearer)
156-
# @param header [Symbol, :Authorization]
157-
# @param scheme [Symbol, :Bearer]
155+
# @!method initialize(header:, scheme:)
156+
# @param header [Symbol, XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header]
157+
# @param scheme [Symbol, XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme]
158+
159+
# @see XTwitterScraper::Models::GuestWalletTopupResponse::Authorization#header
160+
module Header
161+
extend XTwitterScraper::Internal::Type::Enum
162+
163+
AUTHORIZATION = :Authorization
164+
165+
# @!method self.values
166+
# @return [Array<Symbol>]
167+
end
168+
169+
# @see XTwitterScraper::Models::GuestWalletTopupResponse::Authorization#scheme
170+
module Scheme
171+
extend XTwitterScraper::Internal::Type::Enum
172+
173+
BEARER = :Bearer
174+
175+
# @!method self.values
176+
# @return [Array<Symbol>]
177+
end
158178
end
159179

160180
# @see XTwitterScraper::Models::GuestWalletTopupResponse#credential_notice

lib/x_twitter_scraper/models/x/tweet_author.rb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,9 @@ module XTwitterScraper
44
module Models
55
module X
66
class TweetAuthor < XTwitterScraper::Models::UserProfile
7-
# @!attribute followers
8-
#
9-
# @return [Integer]
10-
required :followers, Integer
11-
12-
# @!attribute verified
13-
#
14-
# @return [Boolean]
15-
required :verified, XTwitterScraper::Internal::Type::Boolean
16-
17-
# @!method initialize(followers:, verified:)
7+
# @!method initialize
188
# Tweet author profile. The lookup route always includes follower count and
199
# verification state. Other profile fields appear when available.
20-
#
21-
# @param followers [Integer]
22-
# @param verified [Boolean]
2310
end
2411
end
2512
end

lib/x_twitter_scraper/models/x/x_account.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ class XAccount < XTwitterScraper::Internal::Type::BaseModel
1515
required :created_at, Time, api_name: :createdAt
1616

1717
# @!attribute health
18-
# Derived login/cookie health. `healthy` = cookies valid. `needsReauth` = user
19-
# must submit fresh credentials. `locked` = X locked the account; unlock on x.com
18+
# Derived connection health. `healthy` = session active. `needsReauth` = user must
19+
# submit fresh credentials. `locked` = X locked the account; unlock on x.com
2020
# first. `suspended` = X banned the account. `recovering` = past cooldown, will
21-
# auto-retry on next use. `temporaryIssue` = transient backend problem; retry
21+
# auto-retry on next use. `temporaryIssue` = temporary connection problem; retry
2222
# shortly.
2323
#
2424
# @return [Symbol, XTwitterScraper::Models::X::XAccount::Health]
@@ -59,7 +59,7 @@ class XAccount < XTwitterScraper::Internal::Type::BaseModel
5959
#
6060
# @param created_at [Time]
6161
#
62-
# @param health [Symbol, XTwitterScraper::Models::X::XAccount::Health] Derived login/cookie health. `healthy` = cookies valid. `needsReauth` = user mus
62+
# @param health [Symbol, XTwitterScraper::Models::X::XAccount::Health] Derived connection health. `healthy` = session active. `needsReauth` = user must
6363
#
6464
# @param status [String]
6565
#
@@ -71,10 +71,10 @@ class XAccount < XTwitterScraper::Internal::Type::BaseModel
7171
#
7272
# @param cookies_obtained_at [Time]
7373

74-
# Derived login/cookie health. `healthy` = cookies valid. `needsReauth` = user
75-
# must submit fresh credentials. `locked` = X locked the account; unlock on x.com
74+
# Derived connection health. `healthy` = session active. `needsReauth` = user must
75+
# submit fresh credentials. `locked` = X locked the account; unlock on x.com
7676
# first. `suspended` = X banned the account. `recovering` = past cooldown, will
77-
# auto-retry on next use. `temporaryIssue` = transient backend problem; retry
77+
# auto-retry on next use. `temporaryIssue` = temporary connection problem; retry
7878
# shortly.
7979
#
8080
# @see XTwitterScraper::Models::X::XAccount#health

lib/x_twitter_scraper/models/x/x_account_detail.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class XAccountDetail < XTwitterScraper::Internal::Type::BaseModel
4646
optional :updated_at, Time, api_name: :updatedAt
4747

4848
# @!method initialize(id:, created_at:, health:, status:, x_user_id:, x_username:, cookies_obtained_at: nil, updated_at: nil)
49-
# Full X account details with status, cookies, and update timestamp.
49+
# Connected X account details with health and timestamp metadata.
5050
#
5151
# @param id [String]
5252
# @param created_at [Time]

rbi/x_twitter_scraper/models/guest_wallet_create_response.rbi

Lines changed: 87 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,101 @@ module XTwitterScraper
165165
)
166166
end
167167

168-
sig { returns(Symbol) }
168+
sig do
169+
returns(
170+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header::TaggedSymbol
171+
)
172+
end
169173
attr_accessor :header
170174

171-
sig { returns(Symbol) }
175+
sig do
176+
returns(
177+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme::TaggedSymbol
178+
)
179+
end
172180
attr_accessor :scheme
173181

174-
sig { params(header: Symbol, scheme: Symbol).returns(T.attached_class) }
175-
def self.new(header: :Authorization, scheme: :Bearer)
182+
sig do
183+
params(
184+
header:
185+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header::OrSymbol,
186+
scheme:
187+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme::OrSymbol
188+
).returns(T.attached_class)
189+
end
190+
def self.new(header:, scheme:)
176191
end
177192

178-
sig { override.returns({ header: Symbol, scheme: Symbol }) }
193+
sig do
194+
override.returns(
195+
{
196+
header:
197+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header::TaggedSymbol,
198+
scheme:
199+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme::TaggedSymbol
200+
}
201+
)
202+
end
179203
def to_hash
180204
end
205+
206+
module Header
207+
extend XTwitterScraper::Internal::Type::Enum
208+
209+
TaggedSymbol =
210+
T.type_alias do
211+
T.all(
212+
Symbol,
213+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header
214+
)
215+
end
216+
OrSymbol = T.type_alias { T.any(Symbol, String) }
217+
218+
AUTHORIZATION =
219+
T.let(
220+
:Authorization,
221+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header::TaggedSymbol
222+
)
223+
224+
sig do
225+
override.returns(
226+
T::Array[
227+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Header::TaggedSymbol
228+
]
229+
)
230+
end
231+
def self.values
232+
end
233+
end
234+
235+
module Scheme
236+
extend XTwitterScraper::Internal::Type::Enum
237+
238+
TaggedSymbol =
239+
T.type_alias do
240+
T.all(
241+
Symbol,
242+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme
243+
)
244+
end
245+
OrSymbol = T.type_alias { T.any(Symbol, String) }
246+
247+
BEARER =
248+
T.let(
249+
:Bearer,
250+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme::TaggedSymbol
251+
)
252+
253+
sig do
254+
override.returns(
255+
T::Array[
256+
XTwitterScraper::Models::GuestWalletCreateResponse::Authorization::Scheme::TaggedSymbol
257+
]
258+
)
259+
end
260+
def self.values
261+
end
262+
end
181263
end
182264

183265
module Status

rbi/x_twitter_scraper/models/guest_wallet_topup_response.rbi

Lines changed: 87 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,19 +245,101 @@ module XTwitterScraper
245245
)
246246
end
247247

248-
sig { returns(Symbol) }
248+
sig do
249+
returns(
250+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header::TaggedSymbol
251+
)
252+
end
249253
attr_accessor :header
250254

251-
sig { returns(Symbol) }
255+
sig do
256+
returns(
257+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme::TaggedSymbol
258+
)
259+
end
252260
attr_accessor :scheme
253261

254-
sig { params(header: Symbol, scheme: Symbol).returns(T.attached_class) }
255-
def self.new(header: :Authorization, scheme: :Bearer)
262+
sig do
263+
params(
264+
header:
265+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header::OrSymbol,
266+
scheme:
267+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme::OrSymbol
268+
).returns(T.attached_class)
269+
end
270+
def self.new(header:, scheme:)
256271
end
257272

258-
sig { override.returns({ header: Symbol, scheme: Symbol }) }
273+
sig do
274+
override.returns(
275+
{
276+
header:
277+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header::TaggedSymbol,
278+
scheme:
279+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme::TaggedSymbol
280+
}
281+
)
282+
end
259283
def to_hash
260284
end
285+
286+
module Header
287+
extend XTwitterScraper::Internal::Type::Enum
288+
289+
TaggedSymbol =
290+
T.type_alias do
291+
T.all(
292+
Symbol,
293+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header
294+
)
295+
end
296+
OrSymbol = T.type_alias { T.any(Symbol, String) }
297+
298+
AUTHORIZATION =
299+
T.let(
300+
:Authorization,
301+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header::TaggedSymbol
302+
)
303+
304+
sig do
305+
override.returns(
306+
T::Array[
307+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header::TaggedSymbol
308+
]
309+
)
310+
end
311+
def self.values
312+
end
313+
end
314+
315+
module Scheme
316+
extend XTwitterScraper::Internal::Type::Enum
317+
318+
TaggedSymbol =
319+
T.type_alias do
320+
T.all(
321+
Symbol,
322+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme
323+
)
324+
end
325+
OrSymbol = T.type_alias { T.any(Symbol, String) }
326+
327+
BEARER =
328+
T.let(
329+
:Bearer,
330+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme::TaggedSymbol
331+
)
332+
333+
sig do
334+
override.returns(
335+
T::Array[
336+
XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme::TaggedSymbol
337+
]
338+
)
339+
end
340+
def self.values
341+
end
342+
end
261343
end
262344

263345
module CredentialNotice

0 commit comments

Comments
 (0)