context.dev 2.11.0 → 2.12.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +1 -1
- data/lib/context_dev/models/ai_extract_product_response.rb +48 -1
- data/lib/context_dev/models/ai_extract_products_response.rb +48 -1
- data/lib/context_dev/models/news_search_params.rb +1 -0
- data/lib/context_dev/models/web_extract_params.rb +169 -6
- data/lib/context_dev/models/web_extract_response.rb +85 -1
- data/lib/context_dev/models/web_web_crawl_md_params.rb +7 -5
- data/lib/context_dev/models/web_web_scrape_html_params.rb +99 -3
- data/lib/context_dev/models/web_web_scrape_images_params.rb +99 -3
- data/lib/context_dev/models/web_web_scrape_images_response.rb +85 -1
- data/lib/context_dev/models/web_web_scrape_md_params.rb +99 -3
- data/lib/context_dev/resources/web.rb +9 -7
- data/lib/context_dev/version.rb +1 -1
- data/rbi/context_dev/models/ai_extract_product_response.rbi +99 -0
- data/rbi/context_dev/models/ai_extract_products_response.rbi +99 -0
- data/rbi/context_dev/models/news_search_params.rbi +5 -0
- data/rbi/context_dev/models/web_extract_params.rbi +353 -8
- data/rbi/context_dev/models/web_extract_response.rbi +172 -3
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +10 -6
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +218 -4
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +218 -4
- data/rbi/context_dev/models/web_web_scrape_images_response.rbi +169 -0
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +218 -4
- data/rbi/context_dev/resources/web.rbi +31 -10
- data/sig/context_dev/models/ai_extract_product_response.rbs +40 -0
- data/sig/context_dev/models/ai_extract_products_response.rbs +40 -0
- data/sig/context_dev/models/news_search_params.rbs +2 -0
- data/sig/context_dev/models/web_extract_params.rbs +117 -0
- data/sig/context_dev/models/web_extract_response.rbs +81 -3
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +74 -0
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +74 -0
- data/sig/context_dev/models/web_web_scrape_images_response.rbs +78 -0
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +74 -0
- data/sig/context_dev/resources/web.rbs +1 -0
- metadata +2 -2
|
@@ -27,7 +27,8 @@ module ContextDev
|
|
|
27
27
|
T::Array[
|
|
28
28
|
T.any(
|
|
29
29
|
ContextDev::WebWebScrapeHTMLParams::Action::Wait,
|
|
30
|
-
ContextDev::WebWebScrapeHTMLParams::Action::Perform
|
|
30
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Perform,
|
|
31
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll
|
|
31
32
|
)
|
|
32
33
|
]
|
|
33
34
|
)
|
|
@@ -155,7 +156,8 @@ module ContextDev
|
|
|
155
156
|
T::Array[
|
|
156
157
|
T.any(
|
|
157
158
|
ContextDev::WebWebScrapeHTMLParams::Action::Wait::OrHash,
|
|
158
|
-
ContextDev::WebWebScrapeHTMLParams::Action::Perform::OrHash
|
|
159
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Perform::OrHash,
|
|
160
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::OrHash
|
|
159
161
|
)
|
|
160
162
|
]
|
|
161
163
|
),
|
|
@@ -242,7 +244,8 @@ module ContextDev
|
|
|
242
244
|
T::Array[
|
|
243
245
|
T.any(
|
|
244
246
|
ContextDev::WebWebScrapeHTMLParams::Action::Wait,
|
|
245
|
-
ContextDev::WebWebScrapeHTMLParams::Action::Perform
|
|
247
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Perform,
|
|
248
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll
|
|
246
249
|
)
|
|
247
250
|
]
|
|
248
251
|
),
|
|
@@ -275,7 +278,8 @@ module ContextDev
|
|
|
275
278
|
T.type_alias do
|
|
276
279
|
T.any(
|
|
277
280
|
ContextDev::WebWebScrapeHTMLParams::Action::Wait,
|
|
278
|
-
ContextDev::WebWebScrapeHTMLParams::Action::Perform
|
|
281
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Perform,
|
|
282
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll
|
|
279
283
|
)
|
|
280
284
|
end
|
|
281
285
|
|
|
@@ -331,6 +335,216 @@ module ContextDev
|
|
|
331
335
|
end
|
|
332
336
|
end
|
|
333
337
|
|
|
338
|
+
class Scroll < ContextDev::Internal::Type::BaseModel
|
|
339
|
+
OrHash =
|
|
340
|
+
T.type_alias do
|
|
341
|
+
T.any(
|
|
342
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll,
|
|
343
|
+
ContextDev::Internal::AnyHash
|
|
344
|
+
)
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
sig { returns(Symbol) }
|
|
348
|
+
attr_accessor :do_
|
|
349
|
+
|
|
350
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
351
|
+
# Defaults to viewport.
|
|
352
|
+
sig do
|
|
353
|
+
returns(
|
|
354
|
+
T.nilable(
|
|
355
|
+
T.any(
|
|
356
|
+
Integer,
|
|
357
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Amount::OrSymbol
|
|
358
|
+
)
|
|
359
|
+
)
|
|
360
|
+
)
|
|
361
|
+
end
|
|
362
|
+
attr_reader :amount
|
|
363
|
+
|
|
364
|
+
sig do
|
|
365
|
+
params(
|
|
366
|
+
amount:
|
|
367
|
+
T.any(
|
|
368
|
+
Integer,
|
|
369
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Amount::OrSymbol
|
|
370
|
+
)
|
|
371
|
+
).void
|
|
372
|
+
end
|
|
373
|
+
attr_writer :amount
|
|
374
|
+
|
|
375
|
+
# CSS selector for the first matching scroll container. Defaults to the page.
|
|
376
|
+
sig { returns(T.nilable(String)) }
|
|
377
|
+
attr_reader :container
|
|
378
|
+
|
|
379
|
+
sig { params(container: String).void }
|
|
380
|
+
attr_writer :container
|
|
381
|
+
|
|
382
|
+
# Direction to scroll. Defaults to down.
|
|
383
|
+
sig do
|
|
384
|
+
returns(
|
|
385
|
+
T.nilable(
|
|
386
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Direction::OrSymbol
|
|
387
|
+
)
|
|
388
|
+
)
|
|
389
|
+
end
|
|
390
|
+
attr_reader :direction
|
|
391
|
+
|
|
392
|
+
sig do
|
|
393
|
+
params(
|
|
394
|
+
direction:
|
|
395
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Direction::OrSymbol
|
|
396
|
+
).void
|
|
397
|
+
end
|
|
398
|
+
attr_writer :direction
|
|
399
|
+
|
|
400
|
+
# Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
|
|
401
|
+
# changing. Defaults to 1.
|
|
402
|
+
sig { returns(T.nilable(Integer)) }
|
|
403
|
+
attr_reader :max_scrolls
|
|
404
|
+
|
|
405
|
+
sig { params(max_scrolls: Integer).void }
|
|
406
|
+
attr_writer :max_scrolls
|
|
407
|
+
|
|
408
|
+
# Scroll the page or a selected scrollable container, waiting adaptively for
|
|
409
|
+
# content and dimensions to settle after each iteration.
|
|
410
|
+
sig do
|
|
411
|
+
params(
|
|
412
|
+
amount:
|
|
413
|
+
T.any(
|
|
414
|
+
Integer,
|
|
415
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Amount::OrSymbol
|
|
416
|
+
),
|
|
417
|
+
container: String,
|
|
418
|
+
direction:
|
|
419
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Direction::OrSymbol,
|
|
420
|
+
max_scrolls: Integer,
|
|
421
|
+
do_: Symbol
|
|
422
|
+
).returns(T.attached_class)
|
|
423
|
+
end
|
|
424
|
+
def self.new(
|
|
425
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
426
|
+
# Defaults to viewport.
|
|
427
|
+
amount: nil,
|
|
428
|
+
# CSS selector for the first matching scroll container. Defaults to the page.
|
|
429
|
+
container: nil,
|
|
430
|
+
# Direction to scroll. Defaults to down.
|
|
431
|
+
direction: nil,
|
|
432
|
+
# Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
|
|
433
|
+
# changing. Defaults to 1.
|
|
434
|
+
max_scrolls: nil,
|
|
435
|
+
do_: :scroll
|
|
436
|
+
)
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
sig do
|
|
440
|
+
override.returns(
|
|
441
|
+
{
|
|
442
|
+
do_: Symbol,
|
|
443
|
+
amount:
|
|
444
|
+
T.any(
|
|
445
|
+
Integer,
|
|
446
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Amount::OrSymbol
|
|
447
|
+
),
|
|
448
|
+
container: String,
|
|
449
|
+
direction:
|
|
450
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Direction::OrSymbol,
|
|
451
|
+
max_scrolls: Integer
|
|
452
|
+
}
|
|
453
|
+
)
|
|
454
|
+
end
|
|
455
|
+
def to_hash
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
459
|
+
# Defaults to viewport.
|
|
460
|
+
module Amount
|
|
461
|
+
extend ContextDev::Internal::Type::Union
|
|
462
|
+
|
|
463
|
+
Variants =
|
|
464
|
+
T.type_alias do
|
|
465
|
+
T.any(
|
|
466
|
+
Integer,
|
|
467
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Amount::TaggedSymbol
|
|
468
|
+
)
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
sig do
|
|
472
|
+
override.returns(
|
|
473
|
+
T::Array[
|
|
474
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Amount::Variants
|
|
475
|
+
]
|
|
476
|
+
)
|
|
477
|
+
end
|
|
478
|
+
def self.variants
|
|
479
|
+
end
|
|
480
|
+
|
|
481
|
+
TaggedSymbol =
|
|
482
|
+
T.type_alias do
|
|
483
|
+
T.all(
|
|
484
|
+
Symbol,
|
|
485
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Amount
|
|
486
|
+
)
|
|
487
|
+
end
|
|
488
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
489
|
+
|
|
490
|
+
VIEWPORT =
|
|
491
|
+
T.let(
|
|
492
|
+
:viewport,
|
|
493
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Amount::TaggedSymbol
|
|
494
|
+
)
|
|
495
|
+
MAX =
|
|
496
|
+
T.let(
|
|
497
|
+
:max,
|
|
498
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Amount::TaggedSymbol
|
|
499
|
+
)
|
|
500
|
+
end
|
|
501
|
+
|
|
502
|
+
# Direction to scroll. Defaults to down.
|
|
503
|
+
module Direction
|
|
504
|
+
extend ContextDev::Internal::Type::Enum
|
|
505
|
+
|
|
506
|
+
TaggedSymbol =
|
|
507
|
+
T.type_alias do
|
|
508
|
+
T.all(
|
|
509
|
+
Symbol,
|
|
510
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Direction
|
|
511
|
+
)
|
|
512
|
+
end
|
|
513
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
514
|
+
|
|
515
|
+
UP =
|
|
516
|
+
T.let(
|
|
517
|
+
:up,
|
|
518
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Direction::TaggedSymbol
|
|
519
|
+
)
|
|
520
|
+
DOWN =
|
|
521
|
+
T.let(
|
|
522
|
+
:down,
|
|
523
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Direction::TaggedSymbol
|
|
524
|
+
)
|
|
525
|
+
LEFT =
|
|
526
|
+
T.let(
|
|
527
|
+
:left,
|
|
528
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Direction::TaggedSymbol
|
|
529
|
+
)
|
|
530
|
+
RIGHT =
|
|
531
|
+
T.let(
|
|
532
|
+
:right,
|
|
533
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Direction::TaggedSymbol
|
|
534
|
+
)
|
|
535
|
+
|
|
536
|
+
sig do
|
|
537
|
+
override.returns(
|
|
538
|
+
T::Array[
|
|
539
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Direction::TaggedSymbol
|
|
540
|
+
]
|
|
541
|
+
)
|
|
542
|
+
end
|
|
543
|
+
def self.values
|
|
544
|
+
end
|
|
545
|
+
end
|
|
546
|
+
end
|
|
547
|
+
|
|
334
548
|
sig do
|
|
335
549
|
override.returns(
|
|
336
550
|
T::Array[ContextDev::WebWebScrapeHTMLParams::Action::Variants]
|
|
@@ -27,7 +27,8 @@ module ContextDev
|
|
|
27
27
|
T::Array[
|
|
28
28
|
T.any(
|
|
29
29
|
ContextDev::WebWebScrapeImagesParams::Action::Wait,
|
|
30
|
-
ContextDev::WebWebScrapeImagesParams::Action::Perform
|
|
30
|
+
ContextDev::WebWebScrapeImagesParams::Action::Perform,
|
|
31
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll
|
|
31
32
|
)
|
|
32
33
|
]
|
|
33
34
|
)
|
|
@@ -105,7 +106,8 @@ module ContextDev
|
|
|
105
106
|
T::Array[
|
|
106
107
|
T.any(
|
|
107
108
|
ContextDev::WebWebScrapeImagesParams::Action::Wait::OrHash,
|
|
108
|
-
ContextDev::WebWebScrapeImagesParams::Action::Perform::OrHash
|
|
109
|
+
ContextDev::WebWebScrapeImagesParams::Action::Perform::OrHash,
|
|
110
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::OrHash
|
|
109
111
|
)
|
|
110
112
|
]
|
|
111
113
|
),
|
|
@@ -166,7 +168,8 @@ module ContextDev
|
|
|
166
168
|
T::Array[
|
|
167
169
|
T.any(
|
|
168
170
|
ContextDev::WebWebScrapeImagesParams::Action::Wait,
|
|
169
|
-
ContextDev::WebWebScrapeImagesParams::Action::Perform
|
|
171
|
+
ContextDev::WebWebScrapeImagesParams::Action::Perform,
|
|
172
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll
|
|
170
173
|
)
|
|
171
174
|
]
|
|
172
175
|
),
|
|
@@ -194,7 +197,8 @@ module ContextDev
|
|
|
194
197
|
T.type_alias do
|
|
195
198
|
T.any(
|
|
196
199
|
ContextDev::WebWebScrapeImagesParams::Action::Wait,
|
|
197
|
-
ContextDev::WebWebScrapeImagesParams::Action::Perform
|
|
200
|
+
ContextDev::WebWebScrapeImagesParams::Action::Perform,
|
|
201
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll
|
|
198
202
|
)
|
|
199
203
|
end
|
|
200
204
|
|
|
@@ -250,6 +254,216 @@ module ContextDev
|
|
|
250
254
|
end
|
|
251
255
|
end
|
|
252
256
|
|
|
257
|
+
class Scroll < ContextDev::Internal::Type::BaseModel
|
|
258
|
+
OrHash =
|
|
259
|
+
T.type_alias do
|
|
260
|
+
T.any(
|
|
261
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll,
|
|
262
|
+
ContextDev::Internal::AnyHash
|
|
263
|
+
)
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
sig { returns(Symbol) }
|
|
267
|
+
attr_accessor :do_
|
|
268
|
+
|
|
269
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
270
|
+
# Defaults to viewport.
|
|
271
|
+
sig do
|
|
272
|
+
returns(
|
|
273
|
+
T.nilable(
|
|
274
|
+
T.any(
|
|
275
|
+
Integer,
|
|
276
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Amount::OrSymbol
|
|
277
|
+
)
|
|
278
|
+
)
|
|
279
|
+
)
|
|
280
|
+
end
|
|
281
|
+
attr_reader :amount
|
|
282
|
+
|
|
283
|
+
sig do
|
|
284
|
+
params(
|
|
285
|
+
amount:
|
|
286
|
+
T.any(
|
|
287
|
+
Integer,
|
|
288
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Amount::OrSymbol
|
|
289
|
+
)
|
|
290
|
+
).void
|
|
291
|
+
end
|
|
292
|
+
attr_writer :amount
|
|
293
|
+
|
|
294
|
+
# CSS selector for the first matching scroll container. Defaults to the page.
|
|
295
|
+
sig { returns(T.nilable(String)) }
|
|
296
|
+
attr_reader :container
|
|
297
|
+
|
|
298
|
+
sig { params(container: String).void }
|
|
299
|
+
attr_writer :container
|
|
300
|
+
|
|
301
|
+
# Direction to scroll. Defaults to down.
|
|
302
|
+
sig do
|
|
303
|
+
returns(
|
|
304
|
+
T.nilable(
|
|
305
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Direction::OrSymbol
|
|
306
|
+
)
|
|
307
|
+
)
|
|
308
|
+
end
|
|
309
|
+
attr_reader :direction
|
|
310
|
+
|
|
311
|
+
sig do
|
|
312
|
+
params(
|
|
313
|
+
direction:
|
|
314
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Direction::OrSymbol
|
|
315
|
+
).void
|
|
316
|
+
end
|
|
317
|
+
attr_writer :direction
|
|
318
|
+
|
|
319
|
+
# Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
|
|
320
|
+
# changing. Defaults to 1.
|
|
321
|
+
sig { returns(T.nilable(Integer)) }
|
|
322
|
+
attr_reader :max_scrolls
|
|
323
|
+
|
|
324
|
+
sig { params(max_scrolls: Integer).void }
|
|
325
|
+
attr_writer :max_scrolls
|
|
326
|
+
|
|
327
|
+
# Scroll the page or a selected scrollable container, waiting adaptively for
|
|
328
|
+
# content and dimensions to settle after each iteration.
|
|
329
|
+
sig do
|
|
330
|
+
params(
|
|
331
|
+
amount:
|
|
332
|
+
T.any(
|
|
333
|
+
Integer,
|
|
334
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Amount::OrSymbol
|
|
335
|
+
),
|
|
336
|
+
container: String,
|
|
337
|
+
direction:
|
|
338
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Direction::OrSymbol,
|
|
339
|
+
max_scrolls: Integer,
|
|
340
|
+
do_: Symbol
|
|
341
|
+
).returns(T.attached_class)
|
|
342
|
+
end
|
|
343
|
+
def self.new(
|
|
344
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
345
|
+
# Defaults to viewport.
|
|
346
|
+
amount: nil,
|
|
347
|
+
# CSS selector for the first matching scroll container. Defaults to the page.
|
|
348
|
+
container: nil,
|
|
349
|
+
# Direction to scroll. Defaults to down.
|
|
350
|
+
direction: nil,
|
|
351
|
+
# Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
|
|
352
|
+
# changing. Defaults to 1.
|
|
353
|
+
max_scrolls: nil,
|
|
354
|
+
do_: :scroll
|
|
355
|
+
)
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
sig do
|
|
359
|
+
override.returns(
|
|
360
|
+
{
|
|
361
|
+
do_: Symbol,
|
|
362
|
+
amount:
|
|
363
|
+
T.any(
|
|
364
|
+
Integer,
|
|
365
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Amount::OrSymbol
|
|
366
|
+
),
|
|
367
|
+
container: String,
|
|
368
|
+
direction:
|
|
369
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Direction::OrSymbol,
|
|
370
|
+
max_scrolls: Integer
|
|
371
|
+
}
|
|
372
|
+
)
|
|
373
|
+
end
|
|
374
|
+
def to_hash
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
378
|
+
# Defaults to viewport.
|
|
379
|
+
module Amount
|
|
380
|
+
extend ContextDev::Internal::Type::Union
|
|
381
|
+
|
|
382
|
+
Variants =
|
|
383
|
+
T.type_alias do
|
|
384
|
+
T.any(
|
|
385
|
+
Integer,
|
|
386
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Amount::TaggedSymbol
|
|
387
|
+
)
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
sig do
|
|
391
|
+
override.returns(
|
|
392
|
+
T::Array[
|
|
393
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Amount::Variants
|
|
394
|
+
]
|
|
395
|
+
)
|
|
396
|
+
end
|
|
397
|
+
def self.variants
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
TaggedSymbol =
|
|
401
|
+
T.type_alias do
|
|
402
|
+
T.all(
|
|
403
|
+
Symbol,
|
|
404
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Amount
|
|
405
|
+
)
|
|
406
|
+
end
|
|
407
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
408
|
+
|
|
409
|
+
VIEWPORT =
|
|
410
|
+
T.let(
|
|
411
|
+
:viewport,
|
|
412
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Amount::TaggedSymbol
|
|
413
|
+
)
|
|
414
|
+
MAX =
|
|
415
|
+
T.let(
|
|
416
|
+
:max,
|
|
417
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Amount::TaggedSymbol
|
|
418
|
+
)
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
# Direction to scroll. Defaults to down.
|
|
422
|
+
module Direction
|
|
423
|
+
extend ContextDev::Internal::Type::Enum
|
|
424
|
+
|
|
425
|
+
TaggedSymbol =
|
|
426
|
+
T.type_alias do
|
|
427
|
+
T.all(
|
|
428
|
+
Symbol,
|
|
429
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Direction
|
|
430
|
+
)
|
|
431
|
+
end
|
|
432
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
433
|
+
|
|
434
|
+
UP =
|
|
435
|
+
T.let(
|
|
436
|
+
:up,
|
|
437
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Direction::TaggedSymbol
|
|
438
|
+
)
|
|
439
|
+
DOWN =
|
|
440
|
+
T.let(
|
|
441
|
+
:down,
|
|
442
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Direction::TaggedSymbol
|
|
443
|
+
)
|
|
444
|
+
LEFT =
|
|
445
|
+
T.let(
|
|
446
|
+
:left,
|
|
447
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Direction::TaggedSymbol
|
|
448
|
+
)
|
|
449
|
+
RIGHT =
|
|
450
|
+
T.let(
|
|
451
|
+
:right,
|
|
452
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Direction::TaggedSymbol
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
sig do
|
|
456
|
+
override.returns(
|
|
457
|
+
T::Array[
|
|
458
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::Direction::TaggedSymbol
|
|
459
|
+
]
|
|
460
|
+
)
|
|
461
|
+
end
|
|
462
|
+
def self.values
|
|
463
|
+
end
|
|
464
|
+
end
|
|
465
|
+
end
|
|
466
|
+
|
|
253
467
|
sig do
|
|
254
468
|
override.returns(
|
|
255
469
|
T::Array[ContextDev::WebWebScrapeImagesParams::Action::Variants]
|
|
@@ -29,6 +29,28 @@ module ContextDev
|
|
|
29
29
|
sig { returns(String) }
|
|
30
30
|
attr_accessor :url
|
|
31
31
|
|
|
32
|
+
# One verified outcome per requested browser action, in request order.
|
|
33
|
+
sig do
|
|
34
|
+
returns(
|
|
35
|
+
T.nilable(
|
|
36
|
+
T::Array[
|
|
37
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied
|
|
38
|
+
]
|
|
39
|
+
)
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
attr_reader :actions_applied
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
params(
|
|
46
|
+
actions_applied:
|
|
47
|
+
T::Array[
|
|
48
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::OrHash
|
|
49
|
+
]
|
|
50
|
+
).void
|
|
51
|
+
end
|
|
52
|
+
attr_writer :actions_applied
|
|
53
|
+
|
|
32
54
|
# Metadata about the API key used for the request. Included in every response
|
|
33
55
|
# whenever a valid API key is provided, even when the response status is not 200.
|
|
34
56
|
sig do
|
|
@@ -55,6 +77,10 @@ module ContextDev
|
|
|
55
77
|
success:
|
|
56
78
|
ContextDev::Models::WebWebScrapeImagesResponse::Success::OrBoolean,
|
|
57
79
|
url: String,
|
|
80
|
+
actions_applied:
|
|
81
|
+
T::Array[
|
|
82
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::OrHash
|
|
83
|
+
],
|
|
58
84
|
key_metadata:
|
|
59
85
|
ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata::OrHash
|
|
60
86
|
).returns(T.attached_class)
|
|
@@ -66,6 +92,8 @@ module ContextDev
|
|
|
66
92
|
success:,
|
|
67
93
|
# Page URL that was scraped.
|
|
68
94
|
url:,
|
|
95
|
+
# One verified outcome per requested browser action, in request order.
|
|
96
|
+
actions_applied: nil,
|
|
69
97
|
# Metadata about the API key used for the request. Included in every response
|
|
70
98
|
# whenever a valid API key is provided, even when the response status is not 200.
|
|
71
99
|
key_metadata: nil
|
|
@@ -80,6 +108,10 @@ module ContextDev
|
|
|
80
108
|
success:
|
|
81
109
|
ContextDev::Models::WebWebScrapeImagesResponse::Success::TaggedBoolean,
|
|
82
110
|
url: String,
|
|
111
|
+
actions_applied:
|
|
112
|
+
T::Array[
|
|
113
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied
|
|
114
|
+
],
|
|
83
115
|
key_metadata:
|
|
84
116
|
ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata
|
|
85
117
|
}
|
|
@@ -484,6 +516,143 @@ module ContextDev
|
|
|
484
516
|
end
|
|
485
517
|
end
|
|
486
518
|
|
|
519
|
+
class ActionsApplied < ContextDev::Internal::Type::BaseModel
|
|
520
|
+
OrHash =
|
|
521
|
+
T.type_alias do
|
|
522
|
+
T.any(
|
|
523
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied,
|
|
524
|
+
ContextDev::Internal::AnyHash
|
|
525
|
+
)
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
sig { returns(String) }
|
|
529
|
+
attr_accessor :instruction
|
|
530
|
+
|
|
531
|
+
# Applied means the requested page state was visibly verified. Failed means it was
|
|
532
|
+
# not verified. Skipped means it was not attempted.
|
|
533
|
+
sig do
|
|
534
|
+
returns(
|
|
535
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::Status::TaggedSymbol
|
|
536
|
+
)
|
|
537
|
+
end
|
|
538
|
+
attr_accessor :status
|
|
539
|
+
|
|
540
|
+
# Visible page evidence used to verify an applied action.
|
|
541
|
+
sig { returns(T.nilable(String)) }
|
|
542
|
+
attr_reader :completion_evidence
|
|
543
|
+
|
|
544
|
+
sig { params(completion_evidence: String).void }
|
|
545
|
+
attr_writer :completion_evidence
|
|
546
|
+
|
|
547
|
+
sig { returns(T.nilable(Float)) }
|
|
548
|
+
attr_reader :duration_ms
|
|
549
|
+
|
|
550
|
+
sig { params(duration_ms: Float).void }
|
|
551
|
+
attr_writer :duration_ms
|
|
552
|
+
|
|
553
|
+
sig { returns(T.nilable(String)) }
|
|
554
|
+
attr_reader :error
|
|
555
|
+
|
|
556
|
+
sig { params(error: String).void }
|
|
557
|
+
attr_writer :error
|
|
558
|
+
|
|
559
|
+
sig { returns(T.nilable(String)) }
|
|
560
|
+
attr_reader :method_
|
|
561
|
+
|
|
562
|
+
sig { params(method_: String).void }
|
|
563
|
+
attr_writer :method_
|
|
564
|
+
|
|
565
|
+
sig { returns(T.nilable(String)) }
|
|
566
|
+
attr_reader :target_description
|
|
567
|
+
|
|
568
|
+
sig { params(target_description: String).void }
|
|
569
|
+
attr_writer :target_description
|
|
570
|
+
|
|
571
|
+
sig do
|
|
572
|
+
params(
|
|
573
|
+
instruction: String,
|
|
574
|
+
status:
|
|
575
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::Status::OrSymbol,
|
|
576
|
+
completion_evidence: String,
|
|
577
|
+
duration_ms: Float,
|
|
578
|
+
error: String,
|
|
579
|
+
method_: String,
|
|
580
|
+
target_description: String
|
|
581
|
+
).returns(T.attached_class)
|
|
582
|
+
end
|
|
583
|
+
def self.new(
|
|
584
|
+
instruction:,
|
|
585
|
+
# Applied means the requested page state was visibly verified. Failed means it was
|
|
586
|
+
# not verified. Skipped means it was not attempted.
|
|
587
|
+
status:,
|
|
588
|
+
# Visible page evidence used to verify an applied action.
|
|
589
|
+
completion_evidence: nil,
|
|
590
|
+
duration_ms: nil,
|
|
591
|
+
error: nil,
|
|
592
|
+
method_: nil,
|
|
593
|
+
target_description: nil
|
|
594
|
+
)
|
|
595
|
+
end
|
|
596
|
+
|
|
597
|
+
sig do
|
|
598
|
+
override.returns(
|
|
599
|
+
{
|
|
600
|
+
instruction: String,
|
|
601
|
+
status:
|
|
602
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::Status::TaggedSymbol,
|
|
603
|
+
completion_evidence: String,
|
|
604
|
+
duration_ms: Float,
|
|
605
|
+
error: String,
|
|
606
|
+
method_: String,
|
|
607
|
+
target_description: String
|
|
608
|
+
}
|
|
609
|
+
)
|
|
610
|
+
end
|
|
611
|
+
def to_hash
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
# Applied means the requested page state was visibly verified. Failed means it was
|
|
615
|
+
# not verified. Skipped means it was not attempted.
|
|
616
|
+
module Status
|
|
617
|
+
extend ContextDev::Internal::Type::Enum
|
|
618
|
+
|
|
619
|
+
TaggedSymbol =
|
|
620
|
+
T.type_alias do
|
|
621
|
+
T.all(
|
|
622
|
+
Symbol,
|
|
623
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::Status
|
|
624
|
+
)
|
|
625
|
+
end
|
|
626
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
627
|
+
|
|
628
|
+
APPLIED =
|
|
629
|
+
T.let(
|
|
630
|
+
:applied,
|
|
631
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::Status::TaggedSymbol
|
|
632
|
+
)
|
|
633
|
+
FAILED =
|
|
634
|
+
T.let(
|
|
635
|
+
:failed,
|
|
636
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::Status::TaggedSymbol
|
|
637
|
+
)
|
|
638
|
+
SKIPPED =
|
|
639
|
+
T.let(
|
|
640
|
+
:skipped,
|
|
641
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::Status::TaggedSymbol
|
|
642
|
+
)
|
|
643
|
+
|
|
644
|
+
sig do
|
|
645
|
+
override.returns(
|
|
646
|
+
T::Array[
|
|
647
|
+
ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::Status::TaggedSymbol
|
|
648
|
+
]
|
|
649
|
+
)
|
|
650
|
+
end
|
|
651
|
+
def self.values
|
|
652
|
+
end
|
|
653
|
+
end
|
|
654
|
+
end
|
|
655
|
+
|
|
487
656
|
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
488
657
|
OrHash =
|
|
489
658
|
T.type_alias do
|