context.dev 2.19.0 → 2.20.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 +202 -0
- data/README.md +1 -1
- data/lib/context_dev/models/web_scrape_params.rb +133 -4
- data/lib/context_dev/models/web_scrape_response.rb +321 -6
- data/lib/context_dev/resources/web.rb +20 -8
- data/lib/context_dev/version.rb +1 -1
- data/rbi/context_dev/models/web_scrape_params.rbi +224 -3
- data/rbi/context_dev/models/web_scrape_response.rbi +564 -6
- data/rbi/context_dev/resources/web.rbi +24 -7
- data/sig/context_dev/models/web_scrape_params.rbs +91 -0
- data/sig/context_dev/models/web_scrape_response.rbs +230 -0
- data/sig/context_dev/resources/web.rbs +3 -0
- metadata +2 -2
|
@@ -201,20 +201,30 @@ module ContextDev
|
|
|
201
201
|
|
|
202
202
|
# Reuse cached outputs independently and capture missing formats in one page
|
|
203
203
|
# visit. Each cache key includes only the settings that affect that output. HTML
|
|
204
|
-
# is shared with Markdown
|
|
205
|
-
# different visits within maxAgeMs; use 0
|
|
206
|
-
# use the existing fast acquisition path.
|
|
207
|
-
#
|
|
208
|
-
#
|
|
209
|
-
#
|
|
204
|
+
# is shared with Markdown, parsed fields, product data, highlights, and JSON
|
|
205
|
+
# extraction. Cached outputs can come from different visits within maxAgeMs; use 0
|
|
206
|
+
# for a fresh capture. HTML-only requests use the existing fast acquisition path.
|
|
207
|
+
# Highlights return the plain-text passages most relevant to
|
|
208
|
+
# highlightsParams.query. One credit per request, including cache hits and missing
|
|
209
|
+
# pages, or two with browser actions; highlights add 3 credits when passages are
|
|
210
|
+
# returned; JSON extraction adds four credits and runs an LLM over the page
|
|
211
|
+
# Markdown on every request that has text to extract; PDF OCR adds one credit per
|
|
212
|
+
# recovered page on fresh extraction; the product output adds one credit, plus six
|
|
213
|
+
# more when the specialized model is used. Original response bytes and screenshots
|
|
214
|
+
# are limited to 20 MiB each, screenshots to 40 megapixels, and the combined
|
|
215
|
+
# browser capture to 60 MiB.
|
|
210
216
|
sig do
|
|
211
217
|
params(
|
|
212
218
|
formats: ContextDev::WebScrapeParams::Formats::OrHash,
|
|
213
219
|
url: String,
|
|
220
|
+
highlights_params:
|
|
221
|
+
ContextDev::WebScrapeParams::HighlightsParams::OrHash,
|
|
214
222
|
image_params: ContextDev::WebScrapeParams::ImageParams::OrHash,
|
|
223
|
+
json_params: ContextDev::WebScrapeParams::JsonParams::OrHash,
|
|
215
224
|
markdown_params: ContextDev::WebScrapeParams::MarkdownParams::OrHash,
|
|
216
225
|
max_age_ms: Integer,
|
|
217
226
|
parse_params: ContextDev::WebScrapeParams::ParseParams::OrHash,
|
|
227
|
+
product_params: ContextDev::WebScrapeParams::ProductParams::OrHash,
|
|
218
228
|
screenshot_params:
|
|
219
229
|
ContextDev::WebScrapeParams::ScreenshotParams::OrHash,
|
|
220
230
|
shared_params: ContextDev::WebScrapeParams::SharedParams::OrHash,
|
|
@@ -229,8 +239,12 @@ module ContextDev
|
|
|
229
239
|
formats:,
|
|
230
240
|
# The URL to scrape.
|
|
231
241
|
url:,
|
|
242
|
+
# Highlight options. Requires formats.highlights: true.
|
|
243
|
+
highlights_params: nil,
|
|
232
244
|
# Image options. Requires formats.images: true.
|
|
233
245
|
image_params: nil,
|
|
246
|
+
# Required when formats.json is true.
|
|
247
|
+
json_params: nil,
|
|
234
248
|
# Markdown options. Requires formats.markdown: true.
|
|
235
249
|
markdown_params: nil,
|
|
236
250
|
# Maximum age of each cached output. Defaults to 1 day; 0 fetches fresh and
|
|
@@ -240,6 +254,8 @@ module ContextDev
|
|
|
240
254
|
max_age_ms: nil,
|
|
241
255
|
# Required when formats.parse is true.
|
|
242
256
|
parse_params: nil,
|
|
257
|
+
# Product options. Requires formats.product: true.
|
|
258
|
+
product_params: nil,
|
|
243
259
|
# Screenshot options. Requires formats.screenshot: true.
|
|
244
260
|
screenshot_params: nil,
|
|
245
261
|
# Shared browser and content settings. Content filters leave screenshots and
|
|
@@ -256,7 +272,8 @@ module ContextDev
|
|
|
256
272
|
# when using return-partial.
|
|
257
273
|
timeout_opts: nil,
|
|
258
274
|
# Zero data retention. Bypasses caches and uploads; excludes request/response
|
|
259
|
-
# content and tags from logs. Must be enabled for your organization.
|
|
275
|
+
# content and tags from logs. Must be enabled for your organization. Not available
|
|
276
|
+
# with the highlights output.
|
|
260
277
|
zdr: nil,
|
|
261
278
|
request_options: {}
|
|
262
279
|
)
|
|
@@ -4,10 +4,13 @@ module ContextDev
|
|
|
4
4
|
{
|
|
5
5
|
formats: ContextDev::WebScrapeParams::Formats,
|
|
6
6
|
url: String,
|
|
7
|
+
highlights_params: ContextDev::WebScrapeParams::HighlightsParams,
|
|
7
8
|
image_params: ContextDev::WebScrapeParams::ImageParams,
|
|
9
|
+
json_params: ContextDev::WebScrapeParams::JsonParams,
|
|
8
10
|
markdown_params: ContextDev::WebScrapeParams::MarkdownParams,
|
|
9
11
|
max_age_ms: Integer,
|
|
10
12
|
parse_params: ContextDev::WebScrapeParams::ParseParams,
|
|
13
|
+
product_params: ContextDev::WebScrapeParams::ProductParams,
|
|
11
14
|
screenshot_params: ContextDev::WebScrapeParams::ScreenshotParams,
|
|
12
15
|
shared_params: ContextDev::WebScrapeParams::SharedParams,
|
|
13
16
|
tags: ::Array[String],
|
|
@@ -24,12 +27,24 @@ module ContextDev
|
|
|
24
27
|
|
|
25
28
|
attr_accessor url: String
|
|
26
29
|
|
|
30
|
+
attr_reader highlights_params: ContextDev::WebScrapeParams::HighlightsParams?
|
|
31
|
+
|
|
32
|
+
def highlights_params=: (
|
|
33
|
+
ContextDev::WebScrapeParams::HighlightsParams
|
|
34
|
+
) -> ContextDev::WebScrapeParams::HighlightsParams
|
|
35
|
+
|
|
27
36
|
attr_reader image_params: ContextDev::WebScrapeParams::ImageParams?
|
|
28
37
|
|
|
29
38
|
def image_params=: (
|
|
30
39
|
ContextDev::WebScrapeParams::ImageParams
|
|
31
40
|
) -> ContextDev::WebScrapeParams::ImageParams
|
|
32
41
|
|
|
42
|
+
attr_reader json_params: ContextDev::WebScrapeParams::JsonParams?
|
|
43
|
+
|
|
44
|
+
def json_params=: (
|
|
45
|
+
ContextDev::WebScrapeParams::JsonParams
|
|
46
|
+
) -> ContextDev::WebScrapeParams::JsonParams
|
|
47
|
+
|
|
33
48
|
attr_reader markdown_params: ContextDev::WebScrapeParams::MarkdownParams?
|
|
34
49
|
|
|
35
50
|
def markdown_params=: (
|
|
@@ -46,6 +61,12 @@ module ContextDev
|
|
|
46
61
|
ContextDev::WebScrapeParams::ParseParams
|
|
47
62
|
) -> ContextDev::WebScrapeParams::ParseParams
|
|
48
63
|
|
|
64
|
+
attr_reader product_params: ContextDev::WebScrapeParams::ProductParams?
|
|
65
|
+
|
|
66
|
+
def product_params=: (
|
|
67
|
+
ContextDev::WebScrapeParams::ProductParams
|
|
68
|
+
) -> ContextDev::WebScrapeParams::ProductParams
|
|
69
|
+
|
|
49
70
|
attr_reader screenshot_params: ContextDev::WebScrapeParams::ScreenshotParams?
|
|
50
71
|
|
|
51
72
|
def screenshot_params=: (
|
|
@@ -77,10 +98,13 @@ module ContextDev
|
|
|
77
98
|
def initialize: (
|
|
78
99
|
formats: ContextDev::WebScrapeParams::Formats,
|
|
79
100
|
url: String,
|
|
101
|
+
?highlights_params: ContextDev::WebScrapeParams::HighlightsParams,
|
|
80
102
|
?image_params: ContextDev::WebScrapeParams::ImageParams,
|
|
103
|
+
?json_params: ContextDev::WebScrapeParams::JsonParams,
|
|
81
104
|
?markdown_params: ContextDev::WebScrapeParams::MarkdownParams,
|
|
82
105
|
?max_age_ms: Integer,
|
|
83
106
|
?parse_params: ContextDev::WebScrapeParams::ParseParams,
|
|
107
|
+
?product_params: ContextDev::WebScrapeParams::ProductParams,
|
|
84
108
|
?screenshot_params: ContextDev::WebScrapeParams::ScreenshotParams,
|
|
85
109
|
?shared_params: ContextDev::WebScrapeParams::SharedParams,
|
|
86
110
|
?tags: ::Array[String],
|
|
@@ -92,10 +116,13 @@ module ContextDev
|
|
|
92
116
|
def to_hash: -> {
|
|
93
117
|
formats: ContextDev::WebScrapeParams::Formats,
|
|
94
118
|
url: String,
|
|
119
|
+
highlights_params: ContextDev::WebScrapeParams::HighlightsParams,
|
|
95
120
|
image_params: ContextDev::WebScrapeParams::ImageParams,
|
|
121
|
+
json_params: ContextDev::WebScrapeParams::JsonParams,
|
|
96
122
|
markdown_params: ContextDev::WebScrapeParams::MarkdownParams,
|
|
97
123
|
max_age_ms: Integer,
|
|
98
124
|
parse_params: ContextDev::WebScrapeParams::ParseParams,
|
|
125
|
+
product_params: ContextDev::WebScrapeParams::ProductParams,
|
|
99
126
|
screenshot_params: ContextDev::WebScrapeParams::ScreenshotParams,
|
|
100
127
|
shared_params: ContextDev::WebScrapeParams::SharedParams,
|
|
101
128
|
tags: ::Array[String],
|
|
@@ -107,10 +134,13 @@ module ContextDev
|
|
|
107
134
|
type formats =
|
|
108
135
|
{
|
|
109
136
|
bytes: bool,
|
|
137
|
+
highlights: bool,
|
|
110
138
|
html: bool,
|
|
111
139
|
images: bool,
|
|
140
|
+
json: bool,
|
|
112
141
|
markdown: bool,
|
|
113
142
|
parse: bool,
|
|
143
|
+
product: bool,
|
|
114
144
|
screenshot: bool
|
|
115
145
|
}
|
|
116
146
|
|
|
@@ -119,6 +149,10 @@ module ContextDev
|
|
|
119
149
|
|
|
120
150
|
def bytes=: (bool) -> bool
|
|
121
151
|
|
|
152
|
+
attr_reader highlights: bool?
|
|
153
|
+
|
|
154
|
+
def highlights=: (bool) -> bool
|
|
155
|
+
|
|
122
156
|
attr_reader html: bool?
|
|
123
157
|
|
|
124
158
|
def html=: (bool) -> bool
|
|
@@ -127,6 +161,10 @@ module ContextDev
|
|
|
127
161
|
|
|
128
162
|
def images=: (bool) -> bool
|
|
129
163
|
|
|
164
|
+
attr_reader json: bool?
|
|
165
|
+
|
|
166
|
+
def json=: (bool) -> bool
|
|
167
|
+
|
|
130
168
|
attr_reader markdown: bool?
|
|
131
169
|
|
|
132
170
|
def markdown=: (bool) -> bool
|
|
@@ -135,29 +173,53 @@ module ContextDev
|
|
|
135
173
|
|
|
136
174
|
def parse=: (bool) -> bool
|
|
137
175
|
|
|
176
|
+
attr_reader product: bool?
|
|
177
|
+
|
|
178
|
+
def product=: (bool) -> bool
|
|
179
|
+
|
|
138
180
|
attr_reader screenshot: bool?
|
|
139
181
|
|
|
140
182
|
def screenshot=: (bool) -> bool
|
|
141
183
|
|
|
142
184
|
def initialize: (
|
|
143
185
|
?bytes: bool,
|
|
186
|
+
?highlights: bool,
|
|
144
187
|
?html: bool,
|
|
145
188
|
?images: bool,
|
|
189
|
+
?json: bool,
|
|
146
190
|
?markdown: bool,
|
|
147
191
|
?parse: bool,
|
|
192
|
+
?product: bool,
|
|
148
193
|
?screenshot: bool
|
|
149
194
|
) -> void
|
|
150
195
|
|
|
151
196
|
def to_hash: -> {
|
|
152
197
|
bytes: bool,
|
|
198
|
+
highlights: bool,
|
|
153
199
|
html: bool,
|
|
154
200
|
images: bool,
|
|
201
|
+
json: bool,
|
|
155
202
|
markdown: bool,
|
|
156
203
|
parse: bool,
|
|
204
|
+
product: bool,
|
|
157
205
|
screenshot: bool
|
|
158
206
|
}
|
|
159
207
|
end
|
|
160
208
|
|
|
209
|
+
type highlights_params = { query: String, max_characters: Integer }
|
|
210
|
+
|
|
211
|
+
class HighlightsParams < ContextDev::Internal::Type::BaseModel
|
|
212
|
+
attr_accessor query: String
|
|
213
|
+
|
|
214
|
+
attr_reader max_characters: Integer?
|
|
215
|
+
|
|
216
|
+
def max_characters=: (Integer) -> Integer
|
|
217
|
+
|
|
218
|
+
def initialize: (query: String, ?max_characters: Integer) -> void
|
|
219
|
+
|
|
220
|
+
def to_hash: -> { query: String, max_characters: Integer }
|
|
221
|
+
end
|
|
222
|
+
|
|
161
223
|
type image_params =
|
|
162
224
|
{
|
|
163
225
|
dedupe: ContextDev::Models::WebScrapeParams::ImageParams::dedupe,
|
|
@@ -211,6 +273,23 @@ module ContextDev
|
|
|
211
273
|
end
|
|
212
274
|
end
|
|
213
275
|
|
|
276
|
+
type json_params = { schema: ::Hash[Symbol, top], instructions: String }
|
|
277
|
+
|
|
278
|
+
class JsonParams < ContextDev::Internal::Type::BaseModel
|
|
279
|
+
attr_accessor schema: ::Hash[Symbol, top]
|
|
280
|
+
|
|
281
|
+
attr_reader instructions: String?
|
|
282
|
+
|
|
283
|
+
def instructions=: (String) -> String
|
|
284
|
+
|
|
285
|
+
def initialize: (
|
|
286
|
+
schema: ::Hash[Symbol, top],
|
|
287
|
+
?instructions: String
|
|
288
|
+
) -> void
|
|
289
|
+
|
|
290
|
+
def to_hash: -> { schema: ::Hash[Symbol, top], instructions: String }
|
|
291
|
+
end
|
|
292
|
+
|
|
214
293
|
type markdown_params =
|
|
215
294
|
{
|
|
216
295
|
include_images: bool,
|
|
@@ -340,6 +419,18 @@ module ContextDev
|
|
|
340
419
|
end
|
|
341
420
|
end
|
|
342
421
|
|
|
422
|
+
type product_params = { use_ai_fallback: bool }
|
|
423
|
+
|
|
424
|
+
class ProductParams < ContextDev::Internal::Type::BaseModel
|
|
425
|
+
attr_reader use_ai_fallback: bool?
|
|
426
|
+
|
|
427
|
+
def use_ai_fallback=: (bool) -> bool
|
|
428
|
+
|
|
429
|
+
def initialize: (?use_ai_fallback: bool) -> void
|
|
430
|
+
|
|
431
|
+
def to_hash: -> { use_ai_fallback: bool }
|
|
432
|
+
end
|
|
433
|
+
|
|
343
434
|
type screenshot_params =
|
|
344
435
|
{
|
|
345
436
|
area: ContextDev::Models::WebScrapeParams::ScreenshotParams::area,
|
|
@@ -4,11 +4,14 @@ module ContextDev
|
|
|
4
4
|
{
|
|
5
5
|
bytes: ContextDev::Models::WebScrapeResponse::Bytes,
|
|
6
6
|
cache_metadata: ContextDev::Models::WebScrapeResponse::CacheMetadata,
|
|
7
|
+
highlights: ContextDev::Models::WebScrapeResponse::Highlights,
|
|
7
8
|
html: ContextDev::Models::WebScrapeResponse::HTML,
|
|
8
9
|
images: ContextDev::Models::WebScrapeResponse::Images,
|
|
10
|
+
json: ContextDev::Models::WebScrapeResponse::Json,
|
|
9
11
|
markdown: ContextDev::Models::WebScrapeResponse::Markdown,
|
|
10
12
|
metadata: ContextDev::Models::WebScrapeResponse::Metadata,
|
|
11
13
|
parsed: ContextDev::Models::WebScrapeResponse::Parsed,
|
|
14
|
+
product: ContextDev::Models::WebScrapeResponse::Product,
|
|
12
15
|
request_id: String,
|
|
13
16
|
screenshot: ContextDev::Models::WebScrapeResponse::Screenshot,
|
|
14
17
|
url: String,
|
|
@@ -21,16 +24,22 @@ module ContextDev
|
|
|
21
24
|
|
|
22
25
|
attr_accessor cache_metadata: ContextDev::Models::WebScrapeResponse::CacheMetadata
|
|
23
26
|
|
|
27
|
+
attr_accessor highlights: ContextDev::Models::WebScrapeResponse::Highlights
|
|
28
|
+
|
|
24
29
|
attr_accessor html: ContextDev::Models::WebScrapeResponse::HTML
|
|
25
30
|
|
|
26
31
|
attr_accessor images: ContextDev::Models::WebScrapeResponse::Images
|
|
27
32
|
|
|
33
|
+
attr_accessor json: ContextDev::Models::WebScrapeResponse::Json
|
|
34
|
+
|
|
28
35
|
attr_accessor markdown: ContextDev::Models::WebScrapeResponse::Markdown
|
|
29
36
|
|
|
30
37
|
attr_accessor metadata: ContextDev::Models::WebScrapeResponse::Metadata
|
|
31
38
|
|
|
32
39
|
attr_accessor parsed: ContextDev::Models::WebScrapeResponse::Parsed
|
|
33
40
|
|
|
41
|
+
attr_accessor product: ContextDev::Models::WebScrapeResponse::Product
|
|
42
|
+
|
|
34
43
|
attr_accessor request_id: String
|
|
35
44
|
|
|
36
45
|
attr_accessor screenshot: ContextDev::Models::WebScrapeResponse::Screenshot
|
|
@@ -52,11 +61,14 @@ module ContextDev
|
|
|
52
61
|
def initialize: (
|
|
53
62
|
bytes: ContextDev::Models::WebScrapeResponse::Bytes,
|
|
54
63
|
cache_metadata: ContextDev::Models::WebScrapeResponse::CacheMetadata,
|
|
64
|
+
highlights: ContextDev::Models::WebScrapeResponse::Highlights,
|
|
55
65
|
html: ContextDev::Models::WebScrapeResponse::HTML,
|
|
56
66
|
images: ContextDev::Models::WebScrapeResponse::Images,
|
|
67
|
+
json: ContextDev::Models::WebScrapeResponse::Json,
|
|
57
68
|
markdown: ContextDev::Models::WebScrapeResponse::Markdown,
|
|
58
69
|
metadata: ContextDev::Models::WebScrapeResponse::Metadata,
|
|
59
70
|
parsed: ContextDev::Models::WebScrapeResponse::Parsed,
|
|
71
|
+
product: ContextDev::Models::WebScrapeResponse::Product,
|
|
60
72
|
request_id: String,
|
|
61
73
|
screenshot: ContextDev::Models::WebScrapeResponse::Screenshot,
|
|
62
74
|
url: String,
|
|
@@ -67,11 +79,14 @@ module ContextDev
|
|
|
67
79
|
def to_hash: -> {
|
|
68
80
|
bytes: ContextDev::Models::WebScrapeResponse::Bytes,
|
|
69
81
|
cache_metadata: ContextDev::Models::WebScrapeResponse::CacheMetadata,
|
|
82
|
+
highlights: ContextDev::Models::WebScrapeResponse::Highlights,
|
|
70
83
|
html: ContextDev::Models::WebScrapeResponse::HTML,
|
|
71
84
|
images: ContextDev::Models::WebScrapeResponse::Images,
|
|
85
|
+
json: ContextDev::Models::WebScrapeResponse::Json,
|
|
72
86
|
markdown: ContextDev::Models::WebScrapeResponse::Markdown,
|
|
73
87
|
metadata: ContextDev::Models::WebScrapeResponse::Metadata,
|
|
74
88
|
parsed: ContextDev::Models::WebScrapeResponse::Parsed,
|
|
89
|
+
product: ContextDev::Models::WebScrapeResponse::Product,
|
|
75
90
|
request_id: String,
|
|
76
91
|
screenshot: ContextDev::Models::WebScrapeResponse::Screenshot,
|
|
77
92
|
url: String,
|
|
@@ -147,6 +162,18 @@ module ContextDev
|
|
|
147
162
|
end
|
|
148
163
|
end
|
|
149
164
|
|
|
165
|
+
type highlights = { data: ::Array[String]?, requested: bool }
|
|
166
|
+
|
|
167
|
+
class Highlights < ContextDev::Internal::Type::BaseModel
|
|
168
|
+
attr_accessor data: ::Array[String]?
|
|
169
|
+
|
|
170
|
+
attr_accessor requested: bool
|
|
171
|
+
|
|
172
|
+
def initialize: (data: ::Array[String]?, requested: bool) -> void
|
|
173
|
+
|
|
174
|
+
def to_hash: -> { data: ::Array[String]?, requested: bool }
|
|
175
|
+
end
|
|
176
|
+
|
|
150
177
|
type html = { data: String?, requested: bool }
|
|
151
178
|
|
|
152
179
|
class HTML < ContextDev::Internal::Type::BaseModel
|
|
@@ -258,6 +285,18 @@ module ContextDev
|
|
|
258
285
|
end
|
|
259
286
|
end
|
|
260
287
|
|
|
288
|
+
type json = { data: ::Hash[Symbol, top]?, requested: bool }
|
|
289
|
+
|
|
290
|
+
class Json < ContextDev::Internal::Type::BaseModel
|
|
291
|
+
attr_accessor data: ::Hash[Symbol, top]?
|
|
292
|
+
|
|
293
|
+
attr_accessor requested: bool
|
|
294
|
+
|
|
295
|
+
def initialize: (data: ::Hash[Symbol, top]?, requested: bool) -> void
|
|
296
|
+
|
|
297
|
+
def to_hash: -> { data: ::Hash[Symbol, top]?, requested: bool }
|
|
298
|
+
end
|
|
299
|
+
|
|
261
300
|
type markdown = { data: String?, requested: bool }
|
|
262
301
|
|
|
263
302
|
class Markdown < ContextDev::Internal::Type::BaseModel
|
|
@@ -507,6 +546,197 @@ module ContextDev
|
|
|
507
546
|
def to_hash: -> { data: ::Hash[Symbol, top]?, requested: bool }
|
|
508
547
|
end
|
|
509
548
|
|
|
549
|
+
type product =
|
|
550
|
+
{
|
|
551
|
+
data: ContextDev::Models::WebScrapeResponse::Product::Data?,
|
|
552
|
+
requested: bool
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
class Product < ContextDev::Internal::Type::BaseModel
|
|
556
|
+
attr_accessor data: ContextDev::Models::WebScrapeResponse::Product::Data?
|
|
557
|
+
|
|
558
|
+
attr_accessor requested: bool
|
|
559
|
+
|
|
560
|
+
def initialize: (
|
|
561
|
+
data: ContextDev::Models::WebScrapeResponse::Product::Data?,
|
|
562
|
+
requested: bool
|
|
563
|
+
) -> void
|
|
564
|
+
|
|
565
|
+
def to_hash: -> {
|
|
566
|
+
data: ContextDev::Models::WebScrapeResponse::Product::Data?,
|
|
567
|
+
requested: bool
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
type data =
|
|
571
|
+
{
|
|
572
|
+
is_product_page: bool,
|
|
573
|
+
product: ContextDev::Models::WebScrapeResponse::Product::Data::Product?
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
class Data < ContextDev::Internal::Type::BaseModel
|
|
577
|
+
attr_accessor is_product_page: bool
|
|
578
|
+
|
|
579
|
+
attr_accessor product: ContextDev::Models::WebScrapeResponse::Product::Data::Product?
|
|
580
|
+
|
|
581
|
+
def initialize: (
|
|
582
|
+
is_product_page: bool,
|
|
583
|
+
product: ContextDev::Models::WebScrapeResponse::Product::Data::Product?
|
|
584
|
+
) -> void
|
|
585
|
+
|
|
586
|
+
def to_hash: -> {
|
|
587
|
+
is_product_page: bool,
|
|
588
|
+
product: ContextDev::Models::WebScrapeResponse::Product::Data::Product?
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
type product =
|
|
592
|
+
{
|
|
593
|
+
availability: ContextDev::Models::WebScrapeResponse::Product::Data::Product::availability?,
|
|
594
|
+
brand: String?,
|
|
595
|
+
category: String?,
|
|
596
|
+
currency: String?,
|
|
597
|
+
description: String?,
|
|
598
|
+
dimensions: ::Array[String],
|
|
599
|
+
features: ::Array[String],
|
|
600
|
+
images: ::Array[String],
|
|
601
|
+
image_url: String?,
|
|
602
|
+
name: String,
|
|
603
|
+
price: Float?,
|
|
604
|
+
regular_price: Float?,
|
|
605
|
+
sku: String?,
|
|
606
|
+
tags: ::Array[String],
|
|
607
|
+
target_audience: ::Array[String],
|
|
608
|
+
variants: ::Array[ContextDev::Models::WebScrapeResponse::Product::Data::Product::Variant]
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
class Product < ContextDev::Internal::Type::BaseModel
|
|
612
|
+
attr_accessor availability: ContextDev::Models::WebScrapeResponse::Product::Data::Product::availability?
|
|
613
|
+
|
|
614
|
+
attr_accessor brand: String?
|
|
615
|
+
|
|
616
|
+
attr_accessor category: String?
|
|
617
|
+
|
|
618
|
+
attr_accessor currency: String?
|
|
619
|
+
|
|
620
|
+
attr_accessor description: String?
|
|
621
|
+
|
|
622
|
+
attr_accessor dimensions: ::Array[String]
|
|
623
|
+
|
|
624
|
+
attr_accessor features: ::Array[String]
|
|
625
|
+
|
|
626
|
+
attr_accessor images: ::Array[String]
|
|
627
|
+
|
|
628
|
+
attr_accessor image_url: String?
|
|
629
|
+
|
|
630
|
+
attr_accessor name: String
|
|
631
|
+
|
|
632
|
+
attr_accessor price: Float?
|
|
633
|
+
|
|
634
|
+
attr_accessor regular_price: Float?
|
|
635
|
+
|
|
636
|
+
attr_accessor sku: String?
|
|
637
|
+
|
|
638
|
+
attr_accessor tags: ::Array[String]
|
|
639
|
+
|
|
640
|
+
attr_accessor target_audience: ::Array[String]
|
|
641
|
+
|
|
642
|
+
attr_accessor variants: ::Array[ContextDev::Models::WebScrapeResponse::Product::Data::Product::Variant]
|
|
643
|
+
|
|
644
|
+
def initialize: (
|
|
645
|
+
availability: ContextDev::Models::WebScrapeResponse::Product::Data::Product::availability?,
|
|
646
|
+
brand: String?,
|
|
647
|
+
category: String?,
|
|
648
|
+
currency: String?,
|
|
649
|
+
description: String?,
|
|
650
|
+
dimensions: ::Array[String],
|
|
651
|
+
features: ::Array[String],
|
|
652
|
+
images: ::Array[String],
|
|
653
|
+
image_url: String?,
|
|
654
|
+
name: String,
|
|
655
|
+
price: Float?,
|
|
656
|
+
regular_price: Float?,
|
|
657
|
+
sku: String?,
|
|
658
|
+
tags: ::Array[String],
|
|
659
|
+
target_audience: ::Array[String],
|
|
660
|
+
variants: ::Array[ContextDev::Models::WebScrapeResponse::Product::Data::Product::Variant]
|
|
661
|
+
) -> void
|
|
662
|
+
|
|
663
|
+
def to_hash: -> {
|
|
664
|
+
availability: ContextDev::Models::WebScrapeResponse::Product::Data::Product::availability?,
|
|
665
|
+
brand: String?,
|
|
666
|
+
category: String?,
|
|
667
|
+
currency: String?,
|
|
668
|
+
description: String?,
|
|
669
|
+
dimensions: ::Array[String],
|
|
670
|
+
features: ::Array[String],
|
|
671
|
+
images: ::Array[String],
|
|
672
|
+
image_url: String?,
|
|
673
|
+
name: String,
|
|
674
|
+
price: Float?,
|
|
675
|
+
regular_price: Float?,
|
|
676
|
+
sku: String?,
|
|
677
|
+
tags: ::Array[String],
|
|
678
|
+
target_audience: ::Array[String],
|
|
679
|
+
variants: ::Array[ContextDev::Models::WebScrapeResponse::Product::Data::Product::Variant]
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
type availability =
|
|
683
|
+
:in_stock
|
|
684
|
+
| :out_of_stock
|
|
685
|
+
| :limited_availability
|
|
686
|
+
| :preorder
|
|
687
|
+
| :backorder
|
|
688
|
+
| :made_to_order
|
|
689
|
+
| :discontinued
|
|
690
|
+
|
|
691
|
+
module Availability
|
|
692
|
+
extend ContextDev::Internal::Type::Enum
|
|
693
|
+
|
|
694
|
+
IN_STOCK: :in_stock
|
|
695
|
+
OUT_OF_STOCK: :out_of_stock
|
|
696
|
+
LIMITED_AVAILABILITY: :limited_availability
|
|
697
|
+
PREORDER: :preorder
|
|
698
|
+
BACKORDER: :backorder
|
|
699
|
+
MADE_TO_ORDER: :made_to_order
|
|
700
|
+
DISCONTINUED: :discontinued
|
|
701
|
+
|
|
702
|
+
def self?.values: -> ::Array[ContextDev::Models::WebScrapeResponse::Product::Data::Product::availability]
|
|
703
|
+
end
|
|
704
|
+
|
|
705
|
+
type variant =
|
|
706
|
+
{
|
|
707
|
+
attributes: ::Hash[Symbol, String],
|
|
708
|
+
images: ::Array[String],
|
|
709
|
+
sku: String?,
|
|
710
|
+
url: String?
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
class Variant < ContextDev::Internal::Type::BaseModel
|
|
714
|
+
attr_accessor attributes: ::Hash[Symbol, String]
|
|
715
|
+
|
|
716
|
+
attr_accessor images: ::Array[String]
|
|
717
|
+
|
|
718
|
+
attr_accessor sku: String?
|
|
719
|
+
|
|
720
|
+
attr_accessor url: String?
|
|
721
|
+
|
|
722
|
+
def initialize: (
|
|
723
|
+
attributes: ::Hash[Symbol, String],
|
|
724
|
+
images: ::Array[String],
|
|
725
|
+
sku: String?,
|
|
726
|
+
url: String?
|
|
727
|
+
) -> void
|
|
728
|
+
|
|
729
|
+
def to_hash: -> {
|
|
730
|
+
attributes: ::Hash[Symbol, String],
|
|
731
|
+
images: ::Array[String],
|
|
732
|
+
sku: String?,
|
|
733
|
+
url: String?
|
|
734
|
+
}
|
|
735
|
+
end
|
|
736
|
+
end
|
|
737
|
+
end
|
|
738
|
+
end
|
|
739
|
+
|
|
510
740
|
type screenshot = { data: String?, requested: bool }
|
|
511
741
|
|
|
512
742
|
class Screenshot < ContextDev::Internal::Type::BaseModel
|
|
@@ -48,10 +48,13 @@ module ContextDev
|
|
|
48
48
|
def scrape: (
|
|
49
49
|
formats: ContextDev::WebScrapeParams::Formats,
|
|
50
50
|
url: String,
|
|
51
|
+
?highlights_params: ContextDev::WebScrapeParams::HighlightsParams,
|
|
51
52
|
?image_params: ContextDev::WebScrapeParams::ImageParams,
|
|
53
|
+
?json_params: ContextDev::WebScrapeParams::JsonParams,
|
|
52
54
|
?markdown_params: ContextDev::WebScrapeParams::MarkdownParams,
|
|
53
55
|
?max_age_ms: Integer,
|
|
54
56
|
?parse_params: ContextDev::WebScrapeParams::ParseParams,
|
|
57
|
+
?product_params: ContextDev::WebScrapeParams::ProductParams,
|
|
55
58
|
?screenshot_params: ContextDev::WebScrapeParams::ScreenshotParams,
|
|
56
59
|
?shared_params: ContextDev::WebScrapeParams::SharedParams,
|
|
57
60
|
?tags: ::Array[String],
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: context.dev
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.20.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Context Dev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|