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
|
@@ -25,7 +25,8 @@ module ContextDev
|
|
|
25
25
|
T::Array[
|
|
26
26
|
T.any(
|
|
27
27
|
ContextDev::WebWebScrapeMdParams::Action::Wait,
|
|
28
|
-
ContextDev::WebWebScrapeMdParams::Action::Perform
|
|
28
|
+
ContextDev::WebWebScrapeMdParams::Action::Perform,
|
|
29
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll
|
|
29
30
|
)
|
|
30
31
|
]
|
|
31
32
|
)
|
|
@@ -179,7 +180,8 @@ module ContextDev
|
|
|
179
180
|
T::Array[
|
|
180
181
|
T.any(
|
|
181
182
|
ContextDev::WebWebScrapeMdParams::Action::Wait::OrHash,
|
|
182
|
-
ContextDev::WebWebScrapeMdParams::Action::Perform::OrHash
|
|
183
|
+
ContextDev::WebWebScrapeMdParams::Action::Perform::OrHash,
|
|
184
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::OrHash
|
|
183
185
|
)
|
|
184
186
|
]
|
|
185
187
|
),
|
|
@@ -281,7 +283,8 @@ module ContextDev
|
|
|
281
283
|
T::Array[
|
|
282
284
|
T.any(
|
|
283
285
|
ContextDev::WebWebScrapeMdParams::Action::Wait,
|
|
284
|
-
ContextDev::WebWebScrapeMdParams::Action::Perform
|
|
286
|
+
ContextDev::WebWebScrapeMdParams::Action::Perform,
|
|
287
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll
|
|
285
288
|
)
|
|
286
289
|
]
|
|
287
290
|
),
|
|
@@ -318,7 +321,8 @@ module ContextDev
|
|
|
318
321
|
T.type_alias do
|
|
319
322
|
T.any(
|
|
320
323
|
ContextDev::WebWebScrapeMdParams::Action::Wait,
|
|
321
|
-
ContextDev::WebWebScrapeMdParams::Action::Perform
|
|
324
|
+
ContextDev::WebWebScrapeMdParams::Action::Perform,
|
|
325
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll
|
|
322
326
|
)
|
|
323
327
|
end
|
|
324
328
|
|
|
@@ -374,6 +378,216 @@ module ContextDev
|
|
|
374
378
|
end
|
|
375
379
|
end
|
|
376
380
|
|
|
381
|
+
class Scroll < ContextDev::Internal::Type::BaseModel
|
|
382
|
+
OrHash =
|
|
383
|
+
T.type_alias do
|
|
384
|
+
T.any(
|
|
385
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll,
|
|
386
|
+
ContextDev::Internal::AnyHash
|
|
387
|
+
)
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
sig { returns(Symbol) }
|
|
391
|
+
attr_accessor :do_
|
|
392
|
+
|
|
393
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
394
|
+
# Defaults to viewport.
|
|
395
|
+
sig do
|
|
396
|
+
returns(
|
|
397
|
+
T.nilable(
|
|
398
|
+
T.any(
|
|
399
|
+
Integer,
|
|
400
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Amount::OrSymbol
|
|
401
|
+
)
|
|
402
|
+
)
|
|
403
|
+
)
|
|
404
|
+
end
|
|
405
|
+
attr_reader :amount
|
|
406
|
+
|
|
407
|
+
sig do
|
|
408
|
+
params(
|
|
409
|
+
amount:
|
|
410
|
+
T.any(
|
|
411
|
+
Integer,
|
|
412
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Amount::OrSymbol
|
|
413
|
+
)
|
|
414
|
+
).void
|
|
415
|
+
end
|
|
416
|
+
attr_writer :amount
|
|
417
|
+
|
|
418
|
+
# CSS selector for the first matching scroll container. Defaults to the page.
|
|
419
|
+
sig { returns(T.nilable(String)) }
|
|
420
|
+
attr_reader :container
|
|
421
|
+
|
|
422
|
+
sig { params(container: String).void }
|
|
423
|
+
attr_writer :container
|
|
424
|
+
|
|
425
|
+
# Direction to scroll. Defaults to down.
|
|
426
|
+
sig do
|
|
427
|
+
returns(
|
|
428
|
+
T.nilable(
|
|
429
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Direction::OrSymbol
|
|
430
|
+
)
|
|
431
|
+
)
|
|
432
|
+
end
|
|
433
|
+
attr_reader :direction
|
|
434
|
+
|
|
435
|
+
sig do
|
|
436
|
+
params(
|
|
437
|
+
direction:
|
|
438
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Direction::OrSymbol
|
|
439
|
+
).void
|
|
440
|
+
end
|
|
441
|
+
attr_writer :direction
|
|
442
|
+
|
|
443
|
+
# Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
|
|
444
|
+
# changing. Defaults to 1.
|
|
445
|
+
sig { returns(T.nilable(Integer)) }
|
|
446
|
+
attr_reader :max_scrolls
|
|
447
|
+
|
|
448
|
+
sig { params(max_scrolls: Integer).void }
|
|
449
|
+
attr_writer :max_scrolls
|
|
450
|
+
|
|
451
|
+
# Scroll the page or a selected scrollable container, waiting adaptively for
|
|
452
|
+
# content and dimensions to settle after each iteration.
|
|
453
|
+
sig do
|
|
454
|
+
params(
|
|
455
|
+
amount:
|
|
456
|
+
T.any(
|
|
457
|
+
Integer,
|
|
458
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Amount::OrSymbol
|
|
459
|
+
),
|
|
460
|
+
container: String,
|
|
461
|
+
direction:
|
|
462
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Direction::OrSymbol,
|
|
463
|
+
max_scrolls: Integer,
|
|
464
|
+
do_: Symbol
|
|
465
|
+
).returns(T.attached_class)
|
|
466
|
+
end
|
|
467
|
+
def self.new(
|
|
468
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
469
|
+
# Defaults to viewport.
|
|
470
|
+
amount: nil,
|
|
471
|
+
# CSS selector for the first matching scroll container. Defaults to the page.
|
|
472
|
+
container: nil,
|
|
473
|
+
# Direction to scroll. Defaults to down.
|
|
474
|
+
direction: nil,
|
|
475
|
+
# Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
|
|
476
|
+
# changing. Defaults to 1.
|
|
477
|
+
max_scrolls: nil,
|
|
478
|
+
do_: :scroll
|
|
479
|
+
)
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
sig do
|
|
483
|
+
override.returns(
|
|
484
|
+
{
|
|
485
|
+
do_: Symbol,
|
|
486
|
+
amount:
|
|
487
|
+
T.any(
|
|
488
|
+
Integer,
|
|
489
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Amount::OrSymbol
|
|
490
|
+
),
|
|
491
|
+
container: String,
|
|
492
|
+
direction:
|
|
493
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Direction::OrSymbol,
|
|
494
|
+
max_scrolls: Integer
|
|
495
|
+
}
|
|
496
|
+
)
|
|
497
|
+
end
|
|
498
|
+
def to_hash
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
502
|
+
# Defaults to viewport.
|
|
503
|
+
module Amount
|
|
504
|
+
extend ContextDev::Internal::Type::Union
|
|
505
|
+
|
|
506
|
+
Variants =
|
|
507
|
+
T.type_alias do
|
|
508
|
+
T.any(
|
|
509
|
+
Integer,
|
|
510
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Amount::TaggedSymbol
|
|
511
|
+
)
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
sig do
|
|
515
|
+
override.returns(
|
|
516
|
+
T::Array[
|
|
517
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Amount::Variants
|
|
518
|
+
]
|
|
519
|
+
)
|
|
520
|
+
end
|
|
521
|
+
def self.variants
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
TaggedSymbol =
|
|
525
|
+
T.type_alias do
|
|
526
|
+
T.all(
|
|
527
|
+
Symbol,
|
|
528
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Amount
|
|
529
|
+
)
|
|
530
|
+
end
|
|
531
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
532
|
+
|
|
533
|
+
VIEWPORT =
|
|
534
|
+
T.let(
|
|
535
|
+
:viewport,
|
|
536
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Amount::TaggedSymbol
|
|
537
|
+
)
|
|
538
|
+
MAX =
|
|
539
|
+
T.let(
|
|
540
|
+
:max,
|
|
541
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Amount::TaggedSymbol
|
|
542
|
+
)
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
# Direction to scroll. Defaults to down.
|
|
546
|
+
module Direction
|
|
547
|
+
extend ContextDev::Internal::Type::Enum
|
|
548
|
+
|
|
549
|
+
TaggedSymbol =
|
|
550
|
+
T.type_alias do
|
|
551
|
+
T.all(
|
|
552
|
+
Symbol,
|
|
553
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Direction
|
|
554
|
+
)
|
|
555
|
+
end
|
|
556
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
557
|
+
|
|
558
|
+
UP =
|
|
559
|
+
T.let(
|
|
560
|
+
:up,
|
|
561
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Direction::TaggedSymbol
|
|
562
|
+
)
|
|
563
|
+
DOWN =
|
|
564
|
+
T.let(
|
|
565
|
+
:down,
|
|
566
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Direction::TaggedSymbol
|
|
567
|
+
)
|
|
568
|
+
LEFT =
|
|
569
|
+
T.let(
|
|
570
|
+
:left,
|
|
571
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Direction::TaggedSymbol
|
|
572
|
+
)
|
|
573
|
+
RIGHT =
|
|
574
|
+
T.let(
|
|
575
|
+
:right,
|
|
576
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Direction::TaggedSymbol
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
sig do
|
|
580
|
+
override.returns(
|
|
581
|
+
T::Array[
|
|
582
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::Direction::TaggedSymbol
|
|
583
|
+
]
|
|
584
|
+
)
|
|
585
|
+
end
|
|
586
|
+
def self.values
|
|
587
|
+
end
|
|
588
|
+
end
|
|
589
|
+
end
|
|
590
|
+
|
|
377
591
|
sig do
|
|
378
592
|
override.returns(
|
|
379
593
|
T::Array[ContextDev::WebWebScrapeMdParams::Action::Variants]
|
|
@@ -9,6 +9,14 @@ module ContextDev
|
|
|
9
9
|
params(
|
|
10
10
|
schema: T::Hash[Symbol, T.anything],
|
|
11
11
|
url: String,
|
|
12
|
+
actions:
|
|
13
|
+
T::Array[
|
|
14
|
+
T.any(
|
|
15
|
+
ContextDev::WebExtractParams::Action::Wait::OrHash,
|
|
16
|
+
ContextDev::WebExtractParams::Action::Perform::OrHash,
|
|
17
|
+
ContextDev::WebExtractParams::Action::Scroll::OrHash
|
|
18
|
+
)
|
|
19
|
+
],
|
|
12
20
|
fact_check: T::Boolean,
|
|
13
21
|
follow_subdomains: T::Boolean,
|
|
14
22
|
include_frames: T::Boolean,
|
|
@@ -26,13 +34,20 @@ module ContextDev
|
|
|
26
34
|
).returns(ContextDev::Models::WebExtractResponse)
|
|
27
35
|
end
|
|
28
36
|
def extract(
|
|
29
|
-
# JSON Schema for the returned data object.
|
|
30
|
-
#
|
|
31
|
-
#
|
|
37
|
+
# JSON Schema for the returned data object. Image fields such as `image_urls` or
|
|
38
|
+
# `product_photos` automatically make page image references available to
|
|
39
|
+
# extraction, so product data and photos can be returned in one call. TypeScript
|
|
40
|
+
# Zod users can pass a JSON Schema generated from a Zod object; Python users can
|
|
41
|
+
# pass the equivalent JSON Schema object.
|
|
32
42
|
schema:,
|
|
33
43
|
# The starting website URL to crawl and extract from. Must include http:// or
|
|
34
44
|
# https://.
|
|
35
45
|
url:,
|
|
46
|
+
# Optional browser actions executed in order on the requested page after it loads,
|
|
47
|
+
# before links are discovered or additional pages are crawled. Requires a paid
|
|
48
|
+
# plan. When actions are provided and stopAfterMs is omitted, the crawl budget
|
|
49
|
+
# defaults to 110000 ms.
|
|
50
|
+
actions: nil,
|
|
36
51
|
# When true, every returned value must be grounded in facts stated on the page;
|
|
37
52
|
# fields that cannot be supported by the page are returned as null/empty. When
|
|
38
53
|
# false (default), the model may make reasonable inferences and derivations from
|
|
@@ -61,7 +76,8 @@ module ContextDev
|
|
|
61
76
|
# exchange for more stable output on animated pages.
|
|
62
77
|
settle_animations: nil,
|
|
63
78
|
# Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
|
|
64
|
-
# (110s).
|
|
79
|
+
# (110s). Defaults to 80000 (80s), or 110000 (110s) when browser actions are
|
|
80
|
+
# provided.
|
|
65
81
|
stop_after_ms: nil,
|
|
66
82
|
# Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
67
83
|
tags: nil,
|
|
@@ -408,13 +424,15 @@ module ContextDev
|
|
|
408
424
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
409
425
|
# value is 300000ms (5 minutes).
|
|
410
426
|
timeout_ms: nil,
|
|
411
|
-
# Regex pattern. Only URLs matching this pattern will be followed and scraped.
|
|
427
|
+
# Regex pattern. Only URLs matching this pattern will be followed and scraped. An
|
|
428
|
+
# automatic prefix scope in the form ^<starting URL> follows a redirect of the
|
|
429
|
+
# starting page.
|
|
412
430
|
url_regex: nil,
|
|
413
431
|
# Extract only the main content, stripping headers, footers, sidebars, and
|
|
414
432
|
# navigation
|
|
415
433
|
use_main_content_only: nil,
|
|
416
|
-
#
|
|
417
|
-
#
|
|
434
|
+
# Browser wait time in milliseconds after initial page load for each crawled page.
|
|
435
|
+
# Defaults to 3500 (3.5 seconds). Min: 0. Max: 30000 (30 seconds).
|
|
418
436
|
wait_for_ms: nil,
|
|
419
437
|
# Set to enabled to bypass shared caches and omit request and response content
|
|
420
438
|
# from retained usage logs. Requires zero data retention to be enabled for your
|
|
@@ -435,7 +453,8 @@ module ContextDev
|
|
|
435
453
|
T::Array[
|
|
436
454
|
T.any(
|
|
437
455
|
ContextDev::WebWebScrapeHTMLParams::Action::Wait::OrHash,
|
|
438
|
-
ContextDev::WebWebScrapeHTMLParams::Action::Perform::OrHash
|
|
456
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Perform::OrHash,
|
|
457
|
+
ContextDev::WebWebScrapeHTMLParams::Action::Scroll::OrHash
|
|
439
458
|
)
|
|
440
459
|
]
|
|
441
460
|
),
|
|
@@ -526,7 +545,8 @@ module ContextDev
|
|
|
526
545
|
T::Array[
|
|
527
546
|
T.any(
|
|
528
547
|
ContextDev::WebWebScrapeImagesParams::Action::Wait::OrHash,
|
|
529
|
-
ContextDev::WebWebScrapeImagesParams::Action::Perform::OrHash
|
|
548
|
+
ContextDev::WebWebScrapeImagesParams::Action::Perform::OrHash,
|
|
549
|
+
ContextDev::WebWebScrapeImagesParams::Action::Scroll::OrHash
|
|
530
550
|
)
|
|
531
551
|
]
|
|
532
552
|
),
|
|
@@ -615,7 +635,8 @@ module ContextDev
|
|
|
615
635
|
T::Array[
|
|
616
636
|
T.any(
|
|
617
637
|
ContextDev::WebWebScrapeMdParams::Action::Wait::OrHash,
|
|
618
|
-
ContextDev::WebWebScrapeMdParams::Action::Perform::OrHash
|
|
638
|
+
ContextDev::WebWebScrapeMdParams::Action::Perform::OrHash,
|
|
639
|
+
ContextDev::WebWebScrapeMdParams::Action::Scroll::OrHash
|
|
619
640
|
)
|
|
620
641
|
]
|
|
621
642
|
),
|
|
@@ -78,12 +78,15 @@ module ContextDev
|
|
|
78
78
|
sku: String?,
|
|
79
79
|
tags: ::Array[String],
|
|
80
80
|
target_audience: ::Array[String],
|
|
81
|
+
availability: ContextDev::Models::AIExtractProductResponse::Product::availability?,
|
|
81
82
|
billing_frequency: ContextDev::Models::AIExtractProductResponse::Product::billing_frequency?,
|
|
82
83
|
category: String?,
|
|
83
84
|
currency: String?,
|
|
85
|
+
dimensions: ::Array[String],
|
|
84
86
|
image_url: String?,
|
|
85
87
|
price: Float?,
|
|
86
88
|
pricing_model: ContextDev::Models::AIExtractProductResponse::Product::pricing_model?,
|
|
89
|
+
regular_price: Float?,
|
|
87
90
|
url: String?
|
|
88
91
|
}
|
|
89
92
|
|
|
@@ -102,18 +105,26 @@ module ContextDev
|
|
|
102
105
|
|
|
103
106
|
attr_accessor target_audience: ::Array[String]
|
|
104
107
|
|
|
108
|
+
attr_accessor availability: ContextDev::Models::AIExtractProductResponse::Product::availability?
|
|
109
|
+
|
|
105
110
|
attr_accessor billing_frequency: ContextDev::Models::AIExtractProductResponse::Product::billing_frequency?
|
|
106
111
|
|
|
107
112
|
attr_accessor category: String?
|
|
108
113
|
|
|
109
114
|
attr_accessor currency: String?
|
|
110
115
|
|
|
116
|
+
attr_reader dimensions: ::Array[String]?
|
|
117
|
+
|
|
118
|
+
def dimensions=: (::Array[String]) -> ::Array[String]
|
|
119
|
+
|
|
111
120
|
attr_accessor image_url: String?
|
|
112
121
|
|
|
113
122
|
attr_accessor price: Float?
|
|
114
123
|
|
|
115
124
|
attr_accessor pricing_model: ContextDev::Models::AIExtractProductResponse::Product::pricing_model?
|
|
116
125
|
|
|
126
|
+
attr_accessor regular_price: Float?
|
|
127
|
+
|
|
117
128
|
attr_accessor url: String?
|
|
118
129
|
|
|
119
130
|
def initialize: (
|
|
@@ -124,12 +135,15 @@ module ContextDev
|
|
|
124
135
|
sku: String?,
|
|
125
136
|
tags: ::Array[String],
|
|
126
137
|
target_audience: ::Array[String],
|
|
138
|
+
?availability: ContextDev::Models::AIExtractProductResponse::Product::availability?,
|
|
127
139
|
?billing_frequency: ContextDev::Models::AIExtractProductResponse::Product::billing_frequency?,
|
|
128
140
|
?category: String?,
|
|
129
141
|
?currency: String?,
|
|
142
|
+
?dimensions: ::Array[String],
|
|
130
143
|
?image_url: String?,
|
|
131
144
|
?price: Float?,
|
|
132
145
|
?pricing_model: ContextDev::Models::AIExtractProductResponse::Product::pricing_model?,
|
|
146
|
+
?regular_price: Float?,
|
|
133
147
|
?url: String?
|
|
134
148
|
) -> void
|
|
135
149
|
|
|
@@ -141,15 +155,41 @@ module ContextDev
|
|
|
141
155
|
sku: String?,
|
|
142
156
|
tags: ::Array[String],
|
|
143
157
|
target_audience: ::Array[String],
|
|
158
|
+
availability: ContextDev::Models::AIExtractProductResponse::Product::availability?,
|
|
144
159
|
billing_frequency: ContextDev::Models::AIExtractProductResponse::Product::billing_frequency?,
|
|
145
160
|
category: String?,
|
|
146
161
|
currency: String?,
|
|
162
|
+
dimensions: ::Array[String],
|
|
147
163
|
image_url: String?,
|
|
148
164
|
price: Float?,
|
|
149
165
|
pricing_model: ContextDev::Models::AIExtractProductResponse::Product::pricing_model?,
|
|
166
|
+
regular_price: Float?,
|
|
150
167
|
url: String?
|
|
151
168
|
}
|
|
152
169
|
|
|
170
|
+
type availability =
|
|
171
|
+
:in_stock
|
|
172
|
+
| :out_of_stock
|
|
173
|
+
| :limited_availability
|
|
174
|
+
| :preorder
|
|
175
|
+
| :backorder
|
|
176
|
+
| :made_to_order
|
|
177
|
+
| :discontinued
|
|
178
|
+
|
|
179
|
+
module Availability
|
|
180
|
+
extend ContextDev::Internal::Type::Enum
|
|
181
|
+
|
|
182
|
+
IN_STOCK: :in_stock
|
|
183
|
+
OUT_OF_STOCK: :out_of_stock
|
|
184
|
+
LIMITED_AVAILABILITY: :limited_availability
|
|
185
|
+
PREORDER: :preorder
|
|
186
|
+
BACKORDER: :backorder
|
|
187
|
+
MADE_TO_ORDER: :made_to_order
|
|
188
|
+
DISCONTINUED: :discontinued
|
|
189
|
+
|
|
190
|
+
def self?.values: -> ::Array[ContextDev::Models::AIExtractProductResponse::Product::availability]
|
|
191
|
+
end
|
|
192
|
+
|
|
153
193
|
type billing_frequency = :monthly | :yearly | :one_time | :usage_based
|
|
154
194
|
|
|
155
195
|
module BillingFrequency
|
|
@@ -57,12 +57,15 @@ module ContextDev
|
|
|
57
57
|
sku: String?,
|
|
58
58
|
tags: ::Array[String],
|
|
59
59
|
target_audience: ::Array[String],
|
|
60
|
+
availability: ContextDev::Models::AIExtractProductsResponse::Product::availability?,
|
|
60
61
|
billing_frequency: ContextDev::Models::AIExtractProductsResponse::Product::billing_frequency?,
|
|
61
62
|
category: String?,
|
|
62
63
|
currency: String?,
|
|
64
|
+
dimensions: ::Array[String],
|
|
63
65
|
image_url: String?,
|
|
64
66
|
price: Float?,
|
|
65
67
|
pricing_model: ContextDev::Models::AIExtractProductsResponse::Product::pricing_model?,
|
|
68
|
+
regular_price: Float?,
|
|
66
69
|
url: String?
|
|
67
70
|
}
|
|
68
71
|
|
|
@@ -81,18 +84,26 @@ module ContextDev
|
|
|
81
84
|
|
|
82
85
|
attr_accessor target_audience: ::Array[String]
|
|
83
86
|
|
|
87
|
+
attr_accessor availability: ContextDev::Models::AIExtractProductsResponse::Product::availability?
|
|
88
|
+
|
|
84
89
|
attr_accessor billing_frequency: ContextDev::Models::AIExtractProductsResponse::Product::billing_frequency?
|
|
85
90
|
|
|
86
91
|
attr_accessor category: String?
|
|
87
92
|
|
|
88
93
|
attr_accessor currency: String?
|
|
89
94
|
|
|
95
|
+
attr_reader dimensions: ::Array[String]?
|
|
96
|
+
|
|
97
|
+
def dimensions=: (::Array[String]) -> ::Array[String]
|
|
98
|
+
|
|
90
99
|
attr_accessor image_url: String?
|
|
91
100
|
|
|
92
101
|
attr_accessor price: Float?
|
|
93
102
|
|
|
94
103
|
attr_accessor pricing_model: ContextDev::Models::AIExtractProductsResponse::Product::pricing_model?
|
|
95
104
|
|
|
105
|
+
attr_accessor regular_price: Float?
|
|
106
|
+
|
|
96
107
|
attr_accessor url: String?
|
|
97
108
|
|
|
98
109
|
def initialize: (
|
|
@@ -103,12 +114,15 @@ module ContextDev
|
|
|
103
114
|
sku: String?,
|
|
104
115
|
tags: ::Array[String],
|
|
105
116
|
target_audience: ::Array[String],
|
|
117
|
+
?availability: ContextDev::Models::AIExtractProductsResponse::Product::availability?,
|
|
106
118
|
?billing_frequency: ContextDev::Models::AIExtractProductsResponse::Product::billing_frequency?,
|
|
107
119
|
?category: String?,
|
|
108
120
|
?currency: String?,
|
|
121
|
+
?dimensions: ::Array[String],
|
|
109
122
|
?image_url: String?,
|
|
110
123
|
?price: Float?,
|
|
111
124
|
?pricing_model: ContextDev::Models::AIExtractProductsResponse::Product::pricing_model?,
|
|
125
|
+
?regular_price: Float?,
|
|
112
126
|
?url: String?
|
|
113
127
|
) -> void
|
|
114
128
|
|
|
@@ -120,15 +134,41 @@ module ContextDev
|
|
|
120
134
|
sku: String?,
|
|
121
135
|
tags: ::Array[String],
|
|
122
136
|
target_audience: ::Array[String],
|
|
137
|
+
availability: ContextDev::Models::AIExtractProductsResponse::Product::availability?,
|
|
123
138
|
billing_frequency: ContextDev::Models::AIExtractProductsResponse::Product::billing_frequency?,
|
|
124
139
|
category: String?,
|
|
125
140
|
currency: String?,
|
|
141
|
+
dimensions: ::Array[String],
|
|
126
142
|
image_url: String?,
|
|
127
143
|
price: Float?,
|
|
128
144
|
pricing_model: ContextDev::Models::AIExtractProductsResponse::Product::pricing_model?,
|
|
145
|
+
regular_price: Float?,
|
|
129
146
|
url: String?
|
|
130
147
|
}
|
|
131
148
|
|
|
149
|
+
type availability =
|
|
150
|
+
:in_stock
|
|
151
|
+
| :out_of_stock
|
|
152
|
+
| :limited_availability
|
|
153
|
+
| :preorder
|
|
154
|
+
| :backorder
|
|
155
|
+
| :made_to_order
|
|
156
|
+
| :discontinued
|
|
157
|
+
|
|
158
|
+
module Availability
|
|
159
|
+
extend ContextDev::Internal::Type::Enum
|
|
160
|
+
|
|
161
|
+
IN_STOCK: :in_stock
|
|
162
|
+
OUT_OF_STOCK: :out_of_stock
|
|
163
|
+
LIMITED_AVAILABILITY: :limited_availability
|
|
164
|
+
PREORDER: :preorder
|
|
165
|
+
BACKORDER: :backorder
|
|
166
|
+
MADE_TO_ORDER: :made_to_order
|
|
167
|
+
DISCONTINUED: :discontinued
|
|
168
|
+
|
|
169
|
+
def self?.values: -> ::Array[ContextDev::Models::AIExtractProductsResponse::Product::availability]
|
|
170
|
+
end
|
|
171
|
+
|
|
132
172
|
type billing_frequency = :monthly | :yearly | :one_time | :usage_based
|
|
133
173
|
|
|
134
174
|
module BillingFrequency
|