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
|
@@ -4,6 +4,7 @@ module ContextDev
|
|
|
4
4
|
{
|
|
5
5
|
schema: ::Hash[Symbol, top],
|
|
6
6
|
url: String,
|
|
7
|
+
actions: ::Array[ContextDev::Models::WebExtractParams::action],
|
|
7
8
|
fact_check: bool,
|
|
8
9
|
follow_subdomains: bool,
|
|
9
10
|
include_frames: bool,
|
|
@@ -28,6 +29,12 @@ module ContextDev
|
|
|
28
29
|
|
|
29
30
|
attr_accessor url: String
|
|
30
31
|
|
|
32
|
+
attr_reader actions: ::Array[ContextDev::Models::WebExtractParams::action]?
|
|
33
|
+
|
|
34
|
+
def actions=: (
|
|
35
|
+
::Array[ContextDev::Models::WebExtractParams::action]
|
|
36
|
+
) -> ::Array[ContextDev::Models::WebExtractParams::action]
|
|
37
|
+
|
|
31
38
|
attr_reader fact_check: bool?
|
|
32
39
|
|
|
33
40
|
def fact_check=: (bool) -> bool
|
|
@@ -85,6 +92,7 @@ module ContextDev
|
|
|
85
92
|
def initialize: (
|
|
86
93
|
schema: ::Hash[Symbol, top],
|
|
87
94
|
url: String,
|
|
95
|
+
?actions: ::Array[ContextDev::Models::WebExtractParams::action],
|
|
88
96
|
?fact_check: bool,
|
|
89
97
|
?follow_subdomains: bool,
|
|
90
98
|
?include_frames: bool,
|
|
@@ -104,6 +112,7 @@ module ContextDev
|
|
|
104
112
|
def to_hash: -> {
|
|
105
113
|
schema: ::Hash[Symbol, top],
|
|
106
114
|
url: String,
|
|
115
|
+
actions: ::Array[ContextDev::Models::WebExtractParams::action],
|
|
107
116
|
fact_check: bool,
|
|
108
117
|
follow_subdomains: bool,
|
|
109
118
|
include_frames: bool,
|
|
@@ -120,6 +129,114 @@ module ContextDev
|
|
|
120
129
|
request_options: ContextDev::RequestOptions
|
|
121
130
|
}
|
|
122
131
|
|
|
132
|
+
type action =
|
|
133
|
+
ContextDev::WebExtractParams::Action::Wait
|
|
134
|
+
| ContextDev::WebExtractParams::Action::Perform
|
|
135
|
+
| ContextDev::WebExtractParams::Action::Scroll
|
|
136
|
+
|
|
137
|
+
module Action
|
|
138
|
+
extend ContextDev::Internal::Type::Union
|
|
139
|
+
|
|
140
|
+
type wait = { do_: :wait, time_ms: Integer }
|
|
141
|
+
|
|
142
|
+
class Wait < ContextDev::Internal::Type::BaseModel
|
|
143
|
+
attr_accessor do_: :wait
|
|
144
|
+
|
|
145
|
+
attr_accessor time_ms: Integer
|
|
146
|
+
|
|
147
|
+
def initialize: (time_ms: Integer, ?do_: :wait) -> void
|
|
148
|
+
|
|
149
|
+
def to_hash: -> { do_: :wait, time_ms: Integer }
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
type perform = { action: String, do_: :perform }
|
|
153
|
+
|
|
154
|
+
class Perform < ContextDev::Internal::Type::BaseModel
|
|
155
|
+
attr_accessor action: String
|
|
156
|
+
|
|
157
|
+
attr_accessor do_: :perform
|
|
158
|
+
|
|
159
|
+
def initialize: (action: String, ?do_: :perform) -> void
|
|
160
|
+
|
|
161
|
+
def to_hash: -> { action: String, do_: :perform }
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
type scroll =
|
|
165
|
+
{
|
|
166
|
+
do_: :scroll,
|
|
167
|
+
amount: ContextDev::Models::WebExtractParams::Action::Scroll::amount,
|
|
168
|
+
container: String,
|
|
169
|
+
direction: ContextDev::Models::WebExtractParams::Action::Scroll::direction,
|
|
170
|
+
max_scrolls: Integer
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
class Scroll < ContextDev::Internal::Type::BaseModel
|
|
174
|
+
attr_accessor do_: :scroll
|
|
175
|
+
|
|
176
|
+
attr_reader amount: ContextDev::Models::WebExtractParams::Action::Scroll::amount?
|
|
177
|
+
|
|
178
|
+
def amount=: (
|
|
179
|
+
ContextDev::Models::WebExtractParams::Action::Scroll::amount
|
|
180
|
+
) -> ContextDev::Models::WebExtractParams::Action::Scroll::amount
|
|
181
|
+
|
|
182
|
+
attr_reader container: String?
|
|
183
|
+
|
|
184
|
+
def container=: (String) -> String
|
|
185
|
+
|
|
186
|
+
attr_reader direction: ContextDev::Models::WebExtractParams::Action::Scroll::direction?
|
|
187
|
+
|
|
188
|
+
def direction=: (
|
|
189
|
+
ContextDev::Models::WebExtractParams::Action::Scroll::direction
|
|
190
|
+
) -> ContextDev::Models::WebExtractParams::Action::Scroll::direction
|
|
191
|
+
|
|
192
|
+
attr_reader max_scrolls: Integer?
|
|
193
|
+
|
|
194
|
+
def max_scrolls=: (Integer) -> Integer
|
|
195
|
+
|
|
196
|
+
def initialize: (
|
|
197
|
+
?amount: ContextDev::Models::WebExtractParams::Action::Scroll::amount,
|
|
198
|
+
?container: String,
|
|
199
|
+
?direction: ContextDev::Models::WebExtractParams::Action::Scroll::direction,
|
|
200
|
+
?max_scrolls: Integer,
|
|
201
|
+
?do_: :scroll
|
|
202
|
+
) -> void
|
|
203
|
+
|
|
204
|
+
def to_hash: -> {
|
|
205
|
+
do_: :scroll,
|
|
206
|
+
amount: ContextDev::Models::WebExtractParams::Action::Scroll::amount,
|
|
207
|
+
container: String,
|
|
208
|
+
direction: ContextDev::Models::WebExtractParams::Action::Scroll::direction,
|
|
209
|
+
max_scrolls: Integer
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
type amount = Integer | :viewport | :max
|
|
213
|
+
|
|
214
|
+
module Amount
|
|
215
|
+
extend ContextDev::Internal::Type::Union
|
|
216
|
+
|
|
217
|
+
def self?.variants: -> ::Array[ContextDev::Models::WebExtractParams::Action::Scroll::amount]
|
|
218
|
+
|
|
219
|
+
VIEWPORT: :viewport
|
|
220
|
+
MAX: :max
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
type direction = :up | :down | :left | :right
|
|
224
|
+
|
|
225
|
+
module Direction
|
|
226
|
+
extend ContextDev::Internal::Type::Enum
|
|
227
|
+
|
|
228
|
+
UP: :up
|
|
229
|
+
DOWN: :down
|
|
230
|
+
LEFT: :left
|
|
231
|
+
RIGHT: :right
|
|
232
|
+
|
|
233
|
+
def self?.values: -> ::Array[ContextDev::Models::WebExtractParams::Action::Scroll::direction]
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
def self?.variants: -> ::Array[ContextDev::Models::WebExtractParams::action]
|
|
238
|
+
end
|
|
239
|
+
|
|
123
240
|
type pdf = { end_: Integer, should_parse: bool, start: Integer }
|
|
124
241
|
|
|
125
242
|
class Pdf < ContextDev::Internal::Type::BaseModel
|
|
@@ -52,7 +52,8 @@ module ContextDev
|
|
|
52
52
|
num_failed: Integer,
|
|
53
53
|
num_skipped: Integer,
|
|
54
54
|
num_succeeded: Integer,
|
|
55
|
-
num_urls: Integer
|
|
55
|
+
num_urls: Integer,
|
|
56
|
+
actions_applied: ::Array[ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied]
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
class Metadata < ContextDev::Internal::Type::BaseModel
|
|
@@ -68,13 +69,20 @@ module ContextDev
|
|
|
68
69
|
|
|
69
70
|
attr_accessor num_urls: Integer
|
|
70
71
|
|
|
72
|
+
attr_reader actions_applied: ::Array[ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied]?
|
|
73
|
+
|
|
74
|
+
def actions_applied=: (
|
|
75
|
+
::Array[ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied]
|
|
76
|
+
) -> ::Array[ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied]
|
|
77
|
+
|
|
71
78
|
def initialize: (
|
|
72
79
|
max_crawl_depth: Integer,
|
|
73
80
|
num_blocked: Integer,
|
|
74
81
|
num_failed: Integer,
|
|
75
82
|
num_skipped: Integer,
|
|
76
83
|
num_succeeded: Integer,
|
|
77
|
-
num_urls: Integer
|
|
84
|
+
num_urls: Integer,
|
|
85
|
+
?actions_applied: ::Array[ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied]
|
|
78
86
|
) -> void
|
|
79
87
|
|
|
80
88
|
def to_hash: -> {
|
|
@@ -83,8 +91,78 @@ module ContextDev
|
|
|
83
91
|
num_failed: Integer,
|
|
84
92
|
num_skipped: Integer,
|
|
85
93
|
num_succeeded: Integer,
|
|
86
|
-
num_urls: Integer
|
|
94
|
+
num_urls: Integer,
|
|
95
|
+
actions_applied: ::Array[ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied]
|
|
87
96
|
}
|
|
97
|
+
|
|
98
|
+
type actions_applied =
|
|
99
|
+
{
|
|
100
|
+
instruction: String,
|
|
101
|
+
status: ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied::status,
|
|
102
|
+
completion_evidence: String,
|
|
103
|
+
duration_ms: Float,
|
|
104
|
+
error: String,
|
|
105
|
+
method_: String,
|
|
106
|
+
target_description: String
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
class ActionsApplied < ContextDev::Internal::Type::BaseModel
|
|
110
|
+
attr_accessor instruction: String
|
|
111
|
+
|
|
112
|
+
attr_accessor status: ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied::status
|
|
113
|
+
|
|
114
|
+
attr_reader completion_evidence: String?
|
|
115
|
+
|
|
116
|
+
def completion_evidence=: (String) -> String
|
|
117
|
+
|
|
118
|
+
attr_reader duration_ms: Float?
|
|
119
|
+
|
|
120
|
+
def duration_ms=: (Float) -> Float
|
|
121
|
+
|
|
122
|
+
attr_reader error: String?
|
|
123
|
+
|
|
124
|
+
def error=: (String) -> String
|
|
125
|
+
|
|
126
|
+
attr_reader method_: String?
|
|
127
|
+
|
|
128
|
+
def method_=: (String) -> String
|
|
129
|
+
|
|
130
|
+
attr_reader target_description: String?
|
|
131
|
+
|
|
132
|
+
def target_description=: (String) -> String
|
|
133
|
+
|
|
134
|
+
def initialize: (
|
|
135
|
+
instruction: String,
|
|
136
|
+
status: ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied::status,
|
|
137
|
+
?completion_evidence: String,
|
|
138
|
+
?duration_ms: Float,
|
|
139
|
+
?error: String,
|
|
140
|
+
?method_: String,
|
|
141
|
+
?target_description: String
|
|
142
|
+
) -> void
|
|
143
|
+
|
|
144
|
+
def to_hash: -> {
|
|
145
|
+
instruction: String,
|
|
146
|
+
status: ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied::status,
|
|
147
|
+
completion_evidence: String,
|
|
148
|
+
duration_ms: Float,
|
|
149
|
+
error: String,
|
|
150
|
+
method_: String,
|
|
151
|
+
target_description: String
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
type status = :applied | :failed | :skipped
|
|
155
|
+
|
|
156
|
+
module Status
|
|
157
|
+
extend ContextDev::Internal::Type::Enum
|
|
158
|
+
|
|
159
|
+
APPLIED: :applied
|
|
160
|
+
FAILED: :failed
|
|
161
|
+
SKIPPED: :skipped
|
|
162
|
+
|
|
163
|
+
def self?.values: -> ::Array[ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied::status]
|
|
164
|
+
end
|
|
165
|
+
end
|
|
88
166
|
end
|
|
89
167
|
|
|
90
168
|
type key_metadata =
|
|
@@ -119,6 +119,7 @@ module ContextDev
|
|
|
119
119
|
type action =
|
|
120
120
|
ContextDev::WebWebScrapeHTMLParams::Action::Wait
|
|
121
121
|
| ContextDev::WebWebScrapeHTMLParams::Action::Perform
|
|
122
|
+
| ContextDev::WebWebScrapeHTMLParams::Action::Scroll
|
|
122
123
|
|
|
123
124
|
module Action
|
|
124
125
|
extend ContextDev::Internal::Type::Union
|
|
@@ -147,6 +148,79 @@ module ContextDev
|
|
|
147
148
|
def to_hash: -> { action: String, do_: :perform }
|
|
148
149
|
end
|
|
149
150
|
|
|
151
|
+
type scroll =
|
|
152
|
+
{
|
|
153
|
+
do_: :scroll,
|
|
154
|
+
amount: ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::amount,
|
|
155
|
+
container: String,
|
|
156
|
+
direction: ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::direction,
|
|
157
|
+
max_scrolls: Integer
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
class Scroll < ContextDev::Internal::Type::BaseModel
|
|
161
|
+
attr_accessor do_: :scroll
|
|
162
|
+
|
|
163
|
+
attr_reader amount: ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::amount?
|
|
164
|
+
|
|
165
|
+
def amount=: (
|
|
166
|
+
ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::amount
|
|
167
|
+
) -> ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::amount
|
|
168
|
+
|
|
169
|
+
attr_reader container: String?
|
|
170
|
+
|
|
171
|
+
def container=: (String) -> String
|
|
172
|
+
|
|
173
|
+
attr_reader direction: ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::direction?
|
|
174
|
+
|
|
175
|
+
def direction=: (
|
|
176
|
+
ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::direction
|
|
177
|
+
) -> ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::direction
|
|
178
|
+
|
|
179
|
+
attr_reader max_scrolls: Integer?
|
|
180
|
+
|
|
181
|
+
def max_scrolls=: (Integer) -> Integer
|
|
182
|
+
|
|
183
|
+
def initialize: (
|
|
184
|
+
?amount: ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::amount,
|
|
185
|
+
?container: String,
|
|
186
|
+
?direction: ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::direction,
|
|
187
|
+
?max_scrolls: Integer,
|
|
188
|
+
?do_: :scroll
|
|
189
|
+
) -> void
|
|
190
|
+
|
|
191
|
+
def to_hash: -> {
|
|
192
|
+
do_: :scroll,
|
|
193
|
+
amount: ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::amount,
|
|
194
|
+
container: String,
|
|
195
|
+
direction: ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::direction,
|
|
196
|
+
max_scrolls: Integer
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
type amount = Integer | :viewport | :max
|
|
200
|
+
|
|
201
|
+
module Amount
|
|
202
|
+
extend ContextDev::Internal::Type::Union
|
|
203
|
+
|
|
204
|
+
def self?.variants: -> ::Array[ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::amount]
|
|
205
|
+
|
|
206
|
+
VIEWPORT: :viewport
|
|
207
|
+
MAX: :max
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
type direction = :up | :down | :left | :right
|
|
211
|
+
|
|
212
|
+
module Direction
|
|
213
|
+
extend ContextDev::Internal::Type::Enum
|
|
214
|
+
|
|
215
|
+
UP: :up
|
|
216
|
+
DOWN: :down
|
|
217
|
+
LEFT: :left
|
|
218
|
+
RIGHT: :right
|
|
219
|
+
|
|
220
|
+
def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll::direction]
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
|
|
150
224
|
def self?.variants: -> ::Array[ContextDev::Models::WebWebScrapeHTMLParams::action]
|
|
151
225
|
end
|
|
152
226
|
|
|
@@ -73,6 +73,7 @@ module ContextDev
|
|
|
73
73
|
type action =
|
|
74
74
|
ContextDev::WebWebScrapeImagesParams::Action::Wait
|
|
75
75
|
| ContextDev::WebWebScrapeImagesParams::Action::Perform
|
|
76
|
+
| ContextDev::WebWebScrapeImagesParams::Action::Scroll
|
|
76
77
|
|
|
77
78
|
module Action
|
|
78
79
|
extend ContextDev::Internal::Type::Union
|
|
@@ -101,6 +102,79 @@ module ContextDev
|
|
|
101
102
|
def to_hash: -> { action: String, do_: :perform }
|
|
102
103
|
end
|
|
103
104
|
|
|
105
|
+
type scroll =
|
|
106
|
+
{
|
|
107
|
+
do_: :scroll,
|
|
108
|
+
amount: ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::amount,
|
|
109
|
+
container: String,
|
|
110
|
+
direction: ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::direction,
|
|
111
|
+
max_scrolls: Integer
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
class Scroll < ContextDev::Internal::Type::BaseModel
|
|
115
|
+
attr_accessor do_: :scroll
|
|
116
|
+
|
|
117
|
+
attr_reader amount: ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::amount?
|
|
118
|
+
|
|
119
|
+
def amount=: (
|
|
120
|
+
ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::amount
|
|
121
|
+
) -> ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::amount
|
|
122
|
+
|
|
123
|
+
attr_reader container: String?
|
|
124
|
+
|
|
125
|
+
def container=: (String) -> String
|
|
126
|
+
|
|
127
|
+
attr_reader direction: ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::direction?
|
|
128
|
+
|
|
129
|
+
def direction=: (
|
|
130
|
+
ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::direction
|
|
131
|
+
) -> ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::direction
|
|
132
|
+
|
|
133
|
+
attr_reader max_scrolls: Integer?
|
|
134
|
+
|
|
135
|
+
def max_scrolls=: (Integer) -> Integer
|
|
136
|
+
|
|
137
|
+
def initialize: (
|
|
138
|
+
?amount: ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::amount,
|
|
139
|
+
?container: String,
|
|
140
|
+
?direction: ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::direction,
|
|
141
|
+
?max_scrolls: Integer,
|
|
142
|
+
?do_: :scroll
|
|
143
|
+
) -> void
|
|
144
|
+
|
|
145
|
+
def to_hash: -> {
|
|
146
|
+
do_: :scroll,
|
|
147
|
+
amount: ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::amount,
|
|
148
|
+
container: String,
|
|
149
|
+
direction: ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::direction,
|
|
150
|
+
max_scrolls: Integer
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
type amount = Integer | :viewport | :max
|
|
154
|
+
|
|
155
|
+
module Amount
|
|
156
|
+
extend ContextDev::Internal::Type::Union
|
|
157
|
+
|
|
158
|
+
def self?.variants: -> ::Array[ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::amount]
|
|
159
|
+
|
|
160
|
+
VIEWPORT: :viewport
|
|
161
|
+
MAX: :max
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
type direction = :up | :down | :left | :right
|
|
165
|
+
|
|
166
|
+
module Direction
|
|
167
|
+
extend ContextDev::Internal::Type::Enum
|
|
168
|
+
|
|
169
|
+
UP: :up
|
|
170
|
+
DOWN: :down
|
|
171
|
+
LEFT: :left
|
|
172
|
+
RIGHT: :right
|
|
173
|
+
|
|
174
|
+
def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll::direction]
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
104
178
|
def self?.variants: -> ::Array[ContextDev::Models::WebWebScrapeImagesParams::action]
|
|
105
179
|
end
|
|
106
180
|
|
|
@@ -5,6 +5,7 @@ module ContextDev
|
|
|
5
5
|
images: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::Image],
|
|
6
6
|
success: ContextDev::Models::WebWebScrapeImagesResponse::success,
|
|
7
7
|
url: String,
|
|
8
|
+
actions_applied: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied],
|
|
8
9
|
key_metadata: ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -15,6 +16,12 @@ module ContextDev
|
|
|
15
16
|
|
|
16
17
|
attr_accessor url: String
|
|
17
18
|
|
|
19
|
+
attr_reader actions_applied: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied]?
|
|
20
|
+
|
|
21
|
+
def actions_applied=: (
|
|
22
|
+
::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied]
|
|
23
|
+
) -> ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied]
|
|
24
|
+
|
|
18
25
|
attr_reader key_metadata: ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata?
|
|
19
26
|
|
|
20
27
|
def key_metadata=: (
|
|
@@ -25,6 +32,7 @@ module ContextDev
|
|
|
25
32
|
images: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::Image],
|
|
26
33
|
success: ContextDev::Models::WebWebScrapeImagesResponse::success,
|
|
27
34
|
url: String,
|
|
35
|
+
?actions_applied: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied],
|
|
28
36
|
?key_metadata: ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata
|
|
29
37
|
) -> void
|
|
30
38
|
|
|
@@ -32,6 +40,7 @@ module ContextDev
|
|
|
32
40
|
images: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::Image],
|
|
33
41
|
success: ContextDev::Models::WebWebScrapeImagesResponse::success,
|
|
34
42
|
url: String,
|
|
43
|
+
actions_applied: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied],
|
|
35
44
|
key_metadata: ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata
|
|
36
45
|
}
|
|
37
46
|
|
|
@@ -199,6 +208,75 @@ module ContextDev
|
|
|
199
208
|
def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeImagesResponse::success]
|
|
200
209
|
end
|
|
201
210
|
|
|
211
|
+
type actions_applied =
|
|
212
|
+
{
|
|
213
|
+
instruction: String,
|
|
214
|
+
status: ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::status,
|
|
215
|
+
completion_evidence: String,
|
|
216
|
+
duration_ms: Float,
|
|
217
|
+
error: String,
|
|
218
|
+
method_: String,
|
|
219
|
+
target_description: String
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
class ActionsApplied < ContextDev::Internal::Type::BaseModel
|
|
223
|
+
attr_accessor instruction: String
|
|
224
|
+
|
|
225
|
+
attr_accessor status: ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::status
|
|
226
|
+
|
|
227
|
+
attr_reader completion_evidence: String?
|
|
228
|
+
|
|
229
|
+
def completion_evidence=: (String) -> String
|
|
230
|
+
|
|
231
|
+
attr_reader duration_ms: Float?
|
|
232
|
+
|
|
233
|
+
def duration_ms=: (Float) -> Float
|
|
234
|
+
|
|
235
|
+
attr_reader error: String?
|
|
236
|
+
|
|
237
|
+
def error=: (String) -> String
|
|
238
|
+
|
|
239
|
+
attr_reader method_: String?
|
|
240
|
+
|
|
241
|
+
def method_=: (String) -> String
|
|
242
|
+
|
|
243
|
+
attr_reader target_description: String?
|
|
244
|
+
|
|
245
|
+
def target_description=: (String) -> String
|
|
246
|
+
|
|
247
|
+
def initialize: (
|
|
248
|
+
instruction: String,
|
|
249
|
+
status: ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::status,
|
|
250
|
+
?completion_evidence: String,
|
|
251
|
+
?duration_ms: Float,
|
|
252
|
+
?error: String,
|
|
253
|
+
?method_: String,
|
|
254
|
+
?target_description: String
|
|
255
|
+
) -> void
|
|
256
|
+
|
|
257
|
+
def to_hash: -> {
|
|
258
|
+
instruction: String,
|
|
259
|
+
status: ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::status,
|
|
260
|
+
completion_evidence: String,
|
|
261
|
+
duration_ms: Float,
|
|
262
|
+
error: String,
|
|
263
|
+
method_: String,
|
|
264
|
+
target_description: String
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
type status = :applied | :failed | :skipped
|
|
268
|
+
|
|
269
|
+
module Status
|
|
270
|
+
extend ContextDev::Internal::Type::Enum
|
|
271
|
+
|
|
272
|
+
APPLIED: :applied
|
|
273
|
+
FAILED: :failed
|
|
274
|
+
SKIPPED: :skipped
|
|
275
|
+
|
|
276
|
+
def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::status]
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
202
280
|
type key_metadata =
|
|
203
281
|
{ credits_consumed: Integer, credits_remaining: Integer }
|
|
204
282
|
|
|
@@ -147,6 +147,7 @@ module ContextDev
|
|
|
147
147
|
type action =
|
|
148
148
|
ContextDev::WebWebScrapeMdParams::Action::Wait
|
|
149
149
|
| ContextDev::WebWebScrapeMdParams::Action::Perform
|
|
150
|
+
| ContextDev::WebWebScrapeMdParams::Action::Scroll
|
|
150
151
|
|
|
151
152
|
module Action
|
|
152
153
|
extend ContextDev::Internal::Type::Union
|
|
@@ -175,6 +176,79 @@ module ContextDev
|
|
|
175
176
|
def to_hash: -> { action: String, do_: :perform }
|
|
176
177
|
end
|
|
177
178
|
|
|
179
|
+
type scroll =
|
|
180
|
+
{
|
|
181
|
+
do_: :scroll,
|
|
182
|
+
amount: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount,
|
|
183
|
+
container: String,
|
|
184
|
+
direction: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction,
|
|
185
|
+
max_scrolls: Integer
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
class Scroll < ContextDev::Internal::Type::BaseModel
|
|
189
|
+
attr_accessor do_: :scroll
|
|
190
|
+
|
|
191
|
+
attr_reader amount: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount?
|
|
192
|
+
|
|
193
|
+
def amount=: (
|
|
194
|
+
ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount
|
|
195
|
+
) -> ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount
|
|
196
|
+
|
|
197
|
+
attr_reader container: String?
|
|
198
|
+
|
|
199
|
+
def container=: (String) -> String
|
|
200
|
+
|
|
201
|
+
attr_reader direction: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction?
|
|
202
|
+
|
|
203
|
+
def direction=: (
|
|
204
|
+
ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction
|
|
205
|
+
) -> ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction
|
|
206
|
+
|
|
207
|
+
attr_reader max_scrolls: Integer?
|
|
208
|
+
|
|
209
|
+
def max_scrolls=: (Integer) -> Integer
|
|
210
|
+
|
|
211
|
+
def initialize: (
|
|
212
|
+
?amount: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount,
|
|
213
|
+
?container: String,
|
|
214
|
+
?direction: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction,
|
|
215
|
+
?max_scrolls: Integer,
|
|
216
|
+
?do_: :scroll
|
|
217
|
+
) -> void
|
|
218
|
+
|
|
219
|
+
def to_hash: -> {
|
|
220
|
+
do_: :scroll,
|
|
221
|
+
amount: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount,
|
|
222
|
+
container: String,
|
|
223
|
+
direction: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction,
|
|
224
|
+
max_scrolls: Integer
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
type amount = Integer | :viewport | :max
|
|
228
|
+
|
|
229
|
+
module Amount
|
|
230
|
+
extend ContextDev::Internal::Type::Union
|
|
231
|
+
|
|
232
|
+
def self?.variants: -> ::Array[ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount]
|
|
233
|
+
|
|
234
|
+
VIEWPORT: :viewport
|
|
235
|
+
MAX: :max
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
type direction = :up | :down | :left | :right
|
|
239
|
+
|
|
240
|
+
module Direction
|
|
241
|
+
extend ContextDev::Internal::Type::Enum
|
|
242
|
+
|
|
243
|
+
UP: :up
|
|
244
|
+
DOWN: :down
|
|
245
|
+
LEFT: :left
|
|
246
|
+
RIGHT: :right
|
|
247
|
+
|
|
248
|
+
def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction]
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
178
252
|
def self?.variants: -> ::Array[ContextDev::Models::WebWebScrapeMdParams::action]
|
|
179
253
|
end
|
|
180
254
|
|
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.12.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-08-
|
|
11
|
+
date: 2026-08-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|