context.dev 2.17.1 → 2.19.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 +33 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +0 -4
- data/lib/context_dev/models/industry_retrieve_naics_params.rb +28 -1
- data/lib/context_dev/models/industry_retrieve_sic_params.rb +28 -1
- data/lib/context_dev/models/monitor_retrieve_run_params.rb +26 -0
- data/lib/context_dev/models/monitor_retrieve_run_response.rb +232 -0
- data/lib/context_dev/models/monitor_rotate_webhook_secret_params.rb +20 -0
- data/lib/context_dev/models/monitor_rotate_webhook_secret_response.rb +765 -0
- data/lib/context_dev/models/parse_handle_params.rb +8 -6
- data/lib/context_dev/models/person_enrich_params.rb +28 -1
- data/lib/context_dev/models/web_answers_params.rb +28 -1
- data/lib/context_dev/models/web_extract_competitors_params.rb +28 -1
- data/lib/context_dev/models/web_extract_styleguide_params.rb +30 -3
- data/lib/context_dev/models/{web_web_scrape_sitemap_params.rb → web_map_urls_params.rb} +22 -20
- data/lib/context_dev/models/web_map_urls_response.rb +123 -0
- data/lib/context_dev/models/web_scrape_params.rb +906 -0
- data/lib/context_dev/models/web_scrape_response.rb +659 -0
- data/lib/context_dev/models/web_screenshot_params.rb +25 -9
- data/lib/context_dev/models/web_screenshot_response.rb +3 -3
- data/lib/context_dev/models/web_search_params.rb +30 -3
- data/lib/context_dev/models.rb +8 -20
- data/lib/context_dev/resources/brand.rb +0 -36
- data/lib/context_dev/resources/industry.rb +6 -2
- data/lib/context_dev/resources/monitors.rb +47 -0
- data/lib/context_dev/resources/people.rb +3 -1
- data/lib/context_dev/resources/web.rb +116 -413
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +8 -21
- data/rbi/context_dev/client.rbi +0 -3
- data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +59 -0
- data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +57 -0
- data/rbi/context_dev/models/monitor_retrieve_run_params.rbi +46 -0
- data/rbi/context_dev/models/monitor_retrieve_run_response.rbi +452 -0
- data/rbi/context_dev/models/monitor_rotate_webhook_secret_params.rbi +38 -0
- data/rbi/context_dev/models/monitor_rotate_webhook_secret_response.rbi +1367 -0
- data/rbi/context_dev/models/parse_handle_params.rbi +12 -9
- data/rbi/context_dev/models/person_enrich_params.rbi +45 -0
- data/rbi/context_dev/models/web_answers_params.rbi +45 -0
- data/rbi/context_dev/models/web_extract_competitors_params.rbi +59 -0
- data/rbi/context_dev/models/web_extract_styleguide_params.rbi +62 -3
- data/rbi/context_dev/models/{web_web_scrape_sitemap_params.rbi → web_map_urls_params.rbi} +35 -54
- data/rbi/context_dev/models/web_map_urls_response.rbi +226 -0
- data/rbi/context_dev/models/web_scrape_params.rbi +2000 -0
- data/rbi/context_dev/models/{web_web_scrape_html_response.rbi → web_scrape_response.rbi} +550 -418
- data/rbi/context_dev/models/web_screenshot_params.rbi +38 -12
- data/rbi/context_dev/models/web_screenshot_response.rbi +4 -4
- data/rbi/context_dev/models/web_search_params.rbi +48 -3
- data/rbi/context_dev/models.rbi +9 -21
- data/rbi/context_dev/resources/brand.rbi +0 -35
- data/rbi/context_dev/resources/industry.rbi +14 -0
- data/rbi/context_dev/resources/monitors.rbi +24 -0
- data/rbi/context_dev/resources/parse.rbi +4 -4
- data/rbi/context_dev/resources/people.rbi +7 -0
- data/rbi/context_dev/resources/web.rbi +166 -533
- data/sig/context_dev/client.rbs +0 -2
- data/sig/context_dev/models/industry_retrieve_naics_params.rbs +21 -1
- data/sig/context_dev/models/industry_retrieve_sic_params.rbs +21 -1
- data/sig/context_dev/models/monitor_retrieve_run_params.rbs +28 -0
- data/sig/context_dev/models/monitor_retrieve_run_response.rbs +182 -0
- data/sig/context_dev/models/monitor_rotate_webhook_secret_params.rbs +23 -0
- data/sig/context_dev/models/monitor_rotate_webhook_secret_response.rbs +545 -0
- data/sig/context_dev/models/person_enrich_params.rbs +21 -1
- data/sig/context_dev/models/web_answers_params.rbs +21 -1
- data/sig/context_dev/models/web_extract_competitors_params.rbs +21 -1
- data/sig/context_dev/models/web_extract_styleguide_params.rbs +21 -1
- data/sig/context_dev/models/{web_web_scrape_sitemap_params.rbs → web_map_urls_params.rbs} +22 -22
- data/sig/context_dev/models/web_map_urls_response.rbs +125 -0
- data/sig/context_dev/models/web_scrape_params.rbs +834 -0
- data/sig/context_dev/models/web_scrape_response.rbs +552 -0
- data/sig/context_dev/models/web_screenshot_params.rbs +7 -0
- data/sig/context_dev/models/web_search_params.rbs +21 -1
- data/sig/context_dev/models.rbs +8 -20
- data/sig/context_dev/resources/brand.rbs +0 -9
- data/sig/context_dev/resources/industry.rbs +2 -0
- data/sig/context_dev/resources/monitors.rbs +11 -0
- data/sig/context_dev/resources/people.rbs +1 -0
- data/sig/context_dev/resources/web.rbs +34 -108
- metadata +26 -65
- data/lib/context_dev/models/ai_extract_product_params.rb +0 -98
- data/lib/context_dev/models/ai_extract_product_response.rb +0 -352
- data/lib/context_dev/models/ai_extract_products_params.rb +0 -233
- data/lib/context_dev/models/ai_extract_products_response.rb +0 -320
- data/lib/context_dev/models/brand_retrieve_simplified_params.rb +0 -120
- data/lib/context_dev/models/brand_retrieve_simplified_response.rb +0 -441
- data/lib/context_dev/models/web_extract_fonts_params.rb +0 -114
- data/lib/context_dev/models/web_extract_fonts_response.rb +0 -291
- data/lib/context_dev/models/web_extract_params.rb +0 -392
- data/lib/context_dev/models/web_extract_response.rb +0 -287
- data/lib/context_dev/models/web_web_scrape_bytes_params.rb +0 -344
- data/lib/context_dev/models/web_web_scrape_bytes_response.rb +0 -135
- data/lib/context_dev/models/web_web_scrape_html_params.rb +0 -633
- data/lib/context_dev/models/web_web_scrape_html_response.rb +0 -588
- data/lib/context_dev/models/web_web_scrape_images_params.rb +0 -346
- data/lib/context_dev/models/web_web_scrape_images_response.rb +0 -409
- data/lib/context_dev/models/web_web_scrape_md_params.rb +0 -668
- data/lib/context_dev/models/web_web_scrape_md_response.rb +0 -567
- data/lib/context_dev/models/web_web_scrape_sitemap_response.rb +0 -144
- data/lib/context_dev/resources/ai.rb +0 -69
- data/rbi/context_dev/models/ai_extract_product_params.rbi +0 -199
- data/rbi/context_dev/models/ai_extract_product_response.rbi +0 -696
- data/rbi/context_dev/models/ai_extract_products_params.rbi +0 -490
- data/rbi/context_dev/models/ai_extract_products_response.rbi +0 -623
- data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +0 -256
- data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +0 -1040
- data/rbi/context_dev/models/web_extract_fonts_params.rbi +0 -223
- data/rbi/context_dev/models/web_extract_fonts_response.rbi +0 -563
- data/rbi/context_dev/models/web_extract_params.rbi +0 -736
- data/rbi/context_dev/models/web_extract_response.rbi +0 -512
- data/rbi/context_dev/models/web_web_scrape_bytes_params.rbi +0 -699
- data/rbi/context_dev/models/web_web_scrape_bytes_response.rbi +0 -238
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +0 -1217
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +0 -671
- data/rbi/context_dev/models/web_web_scrape_images_response.rbi +0 -910
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +0 -1049
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +0 -1088
- data/rbi/context_dev/models/web_web_scrape_sitemap_response.rbi +0 -258
- data/rbi/context_dev/resources/ai.rbi +0 -56
- data/sig/context_dev/models/ai_extract_product_params.rbs +0 -86
- data/sig/context_dev/models/ai_extract_product_response.rbs +0 -273
- data/sig/context_dev/models/ai_extract_products_params.rbs +0 -202
- data/sig/context_dev/models/ai_extract_products_response.rbs +0 -252
- data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +0 -104
- data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +0 -413
- data/sig/context_dev/models/web_extract_fonts_params.rbs +0 -93
- data/sig/context_dev/models/web_extract_fonts_response.rbs +0 -230
- data/sig/context_dev/models/web_extract_params.rbs +0 -304
- data/sig/context_dev/models/web_extract_response.rbs +0 -239
- data/sig/context_dev/models/web_web_scrape_bytes_params.rbs +0 -531
- data/sig/context_dev/models/web_web_scrape_bytes_response.rbs +0 -108
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +0 -730
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +0 -495
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +0 -261
- data/sig/context_dev/models/web_web_scrape_images_response.rbs +0 -371
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +0 -758
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +0 -465
- data/sig/context_dev/models/web_web_scrape_sitemap_response.rbs +0 -117
- data/sig/context_dev/resources/ai.rbs +0 -20
|
@@ -2,192 +2,192 @@
|
|
|
2
2
|
|
|
3
3
|
module ContextDev
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WebScrapeResponse < ContextDev::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
ContextDev::Models::
|
|
9
|
+
ContextDev::Models::WebScrapeResponse,
|
|
10
10
|
ContextDev::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# Original HTTP response body. Waiting, actions, and content filters never change
|
|
15
|
+
# it.
|
|
16
|
+
sig { returns(ContextDev::Models::WebScrapeResponse::Bytes) }
|
|
17
|
+
attr_reader :bytes
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(bytes: ContextDev::Models::WebScrapeResponse::Bytes::OrHash).void
|
|
21
|
+
end
|
|
22
|
+
attr_writer :bytes
|
|
23
|
+
|
|
14
24
|
# Cache outcome for this response. Composite responses are hits only when every
|
|
15
25
|
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
16
26
|
# oldest contributing hit.
|
|
17
|
-
sig
|
|
18
|
-
returns(ContextDev::Models::WebWebScrapeHTMLResponse::CacheMetadata)
|
|
19
|
-
end
|
|
27
|
+
sig { returns(ContextDev::Models::WebScrapeResponse::CacheMetadata) }
|
|
20
28
|
attr_reader :cache_metadata
|
|
21
29
|
|
|
22
30
|
sig do
|
|
23
31
|
params(
|
|
24
32
|
cache_metadata:
|
|
25
|
-
ContextDev::Models::
|
|
33
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata::OrHash
|
|
26
34
|
).void
|
|
27
35
|
end
|
|
28
36
|
attr_writer :cache_metadata
|
|
29
37
|
|
|
30
|
-
#
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
# parts may be missing. Partial results are billed at the base request cost.
|
|
38
|
+
# Rendered HTML after content filters.
|
|
39
|
+
sig { returns(ContextDev::Models::WebScrapeResponse::HTML) }
|
|
40
|
+
attr_reader :html
|
|
41
|
+
|
|
35
42
|
sig do
|
|
36
|
-
|
|
37
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::FinalDomState::TaggedSymbol
|
|
38
|
-
)
|
|
43
|
+
params(html: ContextDev::Models::WebScrapeResponse::HTML::OrHash).void
|
|
39
44
|
end
|
|
40
|
-
|
|
45
|
+
attr_writer :html
|
|
41
46
|
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
sig { returns(String) }
|
|
46
|
-
attr_accessor :html
|
|
47
|
+
# Images after content filters. Empty when none are found.
|
|
48
|
+
sig { returns(ContextDev::Models::WebScrapeResponse::Images) }
|
|
49
|
+
attr_reader :images
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
sig do
|
|
52
|
+
params(
|
|
53
|
+
images: ContextDev::Models::WebScrapeResponse::Images::OrHash
|
|
54
|
+
).void
|
|
55
|
+
end
|
|
56
|
+
attr_writer :images
|
|
57
|
+
|
|
58
|
+
# Markdown after content filters.
|
|
59
|
+
sig { returns(ContextDev::Models::WebScrapeResponse::Markdown) }
|
|
60
|
+
attr_reader :markdown
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
params(
|
|
64
|
+
markdown: ContextDev::Models::WebScrapeResponse::Markdown::OrHash
|
|
65
|
+
).void
|
|
66
|
+
end
|
|
67
|
+
attr_writer :markdown
|
|
68
|
+
|
|
69
|
+
# Page details, when available.
|
|
70
|
+
sig { returns(ContextDev::Models::WebScrapeResponse::Metadata) }
|
|
50
71
|
attr_reader :metadata
|
|
51
72
|
|
|
52
73
|
sig do
|
|
53
74
|
params(
|
|
54
|
-
metadata:
|
|
55
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Metadata::OrHash
|
|
75
|
+
metadata: ContextDev::Models::WebScrapeResponse::Metadata::OrHash
|
|
56
76
|
).void
|
|
57
77
|
end
|
|
58
78
|
attr_writer :metadata
|
|
59
79
|
|
|
80
|
+
# Fields produced by parseParams.rules, after shared content filters.
|
|
81
|
+
sig { returns(ContextDev::Models::WebScrapeResponse::Parsed) }
|
|
82
|
+
attr_reader :parsed
|
|
83
|
+
|
|
84
|
+
sig do
|
|
85
|
+
params(
|
|
86
|
+
parsed: ContextDev::Models::WebScrapeResponse::Parsed::OrHash
|
|
87
|
+
).void
|
|
88
|
+
end
|
|
89
|
+
attr_writer :parsed
|
|
90
|
+
|
|
60
91
|
# Unique id of this API call, also sent in the X-Request-Id response header. Quote
|
|
61
92
|
# it when contacting support about a failed request.
|
|
62
93
|
sig { returns(String) }
|
|
63
94
|
attr_accessor :request_id
|
|
64
95
|
|
|
65
|
-
#
|
|
66
|
-
sig
|
|
67
|
-
|
|
68
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Success::TaggedBoolean
|
|
69
|
-
)
|
|
70
|
-
end
|
|
71
|
-
attr_accessor :success
|
|
96
|
+
# An image data URL. Use directly as an image src.
|
|
97
|
+
sig { returns(ContextDev::Models::WebScrapeResponse::Screenshot) }
|
|
98
|
+
attr_reader :screenshot
|
|
72
99
|
|
|
73
|
-
# Detected content type of the returned `html` field. Sitemaps and feeds are
|
|
74
|
-
# surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as
|
|
75
|
-
# `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations
|
|
76
|
-
# are surfaced as `pptx`/`ppt` with the extracted slides as HTML.
|
|
77
100
|
sig do
|
|
78
|
-
|
|
79
|
-
ContextDev::Models::
|
|
80
|
-
)
|
|
101
|
+
params(
|
|
102
|
+
screenshot: ContextDev::Models::WebScrapeResponse::Screenshot::OrHash
|
|
103
|
+
).void
|
|
81
104
|
end
|
|
82
|
-
|
|
105
|
+
attr_writer :screenshot
|
|
83
106
|
|
|
84
|
-
#
|
|
107
|
+
# Final URL after redirects and browser actions.
|
|
85
108
|
sig { returns(String) }
|
|
86
109
|
attr_accessor :url
|
|
87
110
|
|
|
88
|
-
#
|
|
111
|
+
# Present when return-partial captures a page that is still loading or returns
|
|
112
|
+
# images before image processing finishes. Partial responses are not cached.
|
|
89
113
|
sig do
|
|
90
114
|
returns(
|
|
91
115
|
T.nilable(
|
|
92
|
-
|
|
93
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied
|
|
94
|
-
]
|
|
116
|
+
ContextDev::Models::WebScrapeResponse::IsPartial::TaggedBoolean
|
|
95
117
|
)
|
|
96
118
|
)
|
|
97
119
|
end
|
|
98
|
-
attr_reader :
|
|
120
|
+
attr_reader :is_partial
|
|
99
121
|
|
|
100
122
|
sig do
|
|
101
123
|
params(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::OrHash
|
|
105
|
-
]
|
|
124
|
+
is_partial:
|
|
125
|
+
ContextDev::Models::WebScrapeResponse::IsPartial::OrBoolean
|
|
106
126
|
).void
|
|
107
127
|
end
|
|
108
|
-
attr_writer :
|
|
109
|
-
|
|
110
|
-
# True when an action was applied but the returned content could not be refreshed
|
|
111
|
-
# afterward.
|
|
112
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
113
|
-
attr_reader :actions_html_stale
|
|
114
|
-
|
|
115
|
-
sig { params(actions_html_stale: T::Boolean).void }
|
|
116
|
-
attr_writer :actions_html_stale
|
|
128
|
+
attr_writer :is_partial
|
|
117
129
|
|
|
118
130
|
# Credit usage, included whenever a valid API key is provided.
|
|
119
131
|
sig do
|
|
120
|
-
returns(
|
|
121
|
-
T.nilable(ContextDev::Models::WebWebScrapeHTMLResponse::KeyMetadata)
|
|
122
|
-
)
|
|
132
|
+
returns(T.nilable(ContextDev::Models::WebScrapeResponse::KeyMetadata))
|
|
123
133
|
end
|
|
124
134
|
attr_reader :key_metadata
|
|
125
135
|
|
|
126
136
|
sig do
|
|
127
137
|
params(
|
|
128
138
|
key_metadata:
|
|
129
|
-
ContextDev::Models::
|
|
139
|
+
ContextDev::Models::WebScrapeResponse::KeyMetadata::OrHash
|
|
130
140
|
).void
|
|
131
141
|
end
|
|
132
142
|
attr_writer :key_metadata
|
|
133
143
|
|
|
134
144
|
sig do
|
|
135
145
|
params(
|
|
146
|
+
bytes: ContextDev::Models::WebScrapeResponse::Bytes::OrHash,
|
|
136
147
|
cache_metadata:
|
|
137
|
-
ContextDev::Models::
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
metadata:
|
|
142
|
-
|
|
148
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata::OrHash,
|
|
149
|
+
html: ContextDev::Models::WebScrapeResponse::HTML::OrHash,
|
|
150
|
+
images: ContextDev::Models::WebScrapeResponse::Images::OrHash,
|
|
151
|
+
markdown: ContextDev::Models::WebScrapeResponse::Markdown::OrHash,
|
|
152
|
+
metadata: ContextDev::Models::WebScrapeResponse::Metadata::OrHash,
|
|
153
|
+
parsed: ContextDev::Models::WebScrapeResponse::Parsed::OrHash,
|
|
143
154
|
request_id: String,
|
|
144
|
-
|
|
145
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Success::OrBoolean,
|
|
146
|
-
type: ContextDev::Models::WebWebScrapeHTMLResponse::Type::OrSymbol,
|
|
155
|
+
screenshot: ContextDev::Models::WebScrapeResponse::Screenshot::OrHash,
|
|
147
156
|
url: String,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::OrHash
|
|
151
|
-
],
|
|
152
|
-
actions_html_stale: T::Boolean,
|
|
157
|
+
is_partial:
|
|
158
|
+
ContextDev::Models::WebScrapeResponse::IsPartial::OrBoolean,
|
|
153
159
|
key_metadata:
|
|
154
|
-
ContextDev::Models::
|
|
160
|
+
ContextDev::Models::WebScrapeResponse::KeyMetadata::OrHash
|
|
155
161
|
).returns(T.attached_class)
|
|
156
162
|
end
|
|
157
163
|
def self.new(
|
|
164
|
+
# Original HTTP response body. Waiting, actions, and content filters never change
|
|
165
|
+
# it.
|
|
166
|
+
bytes:,
|
|
158
167
|
# Cache outcome for this response. Composite responses are hits only when every
|
|
159
168
|
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
160
169
|
# oldest contributing hit.
|
|
161
170
|
cache_metadata:,
|
|
162
|
-
#
|
|
163
|
-
# the request asked for. `still-loading` only occurs with
|
|
164
|
-
# timeoutOpts.behavior=return-partial: the timeoutOpts.milliseconds deadline was
|
|
165
|
-
# reached first, so the content reflects the DOM at that moment and late-rendering
|
|
166
|
-
# parts may be missing. Partial results are billed at the base request cost.
|
|
167
|
-
final_dom_state:,
|
|
168
|
-
# The scraped content of the page. For normal pages this is the raw HTML. When the
|
|
169
|
-
# page is a sitemap or feed served behind an XSL stylesheet (which browsers render
|
|
170
|
-
# into HTML), this is the underlying XML instead — see the `type` field.
|
|
171
|
+
# Rendered HTML after content filters.
|
|
171
172
|
html:,
|
|
172
|
-
#
|
|
173
|
+
# Images after content filters. Empty when none are found.
|
|
174
|
+
images:,
|
|
175
|
+
# Markdown after content filters.
|
|
176
|
+
markdown:,
|
|
177
|
+
# Page details, when available.
|
|
173
178
|
metadata:,
|
|
179
|
+
# Fields produced by parseParams.rules, after shared content filters.
|
|
180
|
+
parsed:,
|
|
174
181
|
# Unique id of this API call, also sent in the X-Request-Id response header. Quote
|
|
175
182
|
# it when contacting support about a failed request.
|
|
176
183
|
request_id:,
|
|
177
|
-
#
|
|
178
|
-
|
|
179
|
-
#
|
|
180
|
-
# surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as
|
|
181
|
-
# `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations
|
|
182
|
-
# are surfaced as `pptx`/`ppt` with the extracted slides as HTML.
|
|
183
|
-
type:,
|
|
184
|
-
# The URL that was scraped
|
|
184
|
+
# An image data URL. Use directly as an image src.
|
|
185
|
+
screenshot:,
|
|
186
|
+
# Final URL after redirects and browser actions.
|
|
185
187
|
url:,
|
|
186
|
-
#
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
# afterward.
|
|
190
|
-
actions_html_stale: nil,
|
|
188
|
+
# Present when return-partial captures a page that is still loading or returns
|
|
189
|
+
# images before image processing finishes. Partial responses are not cached.
|
|
190
|
+
is_partial: nil,
|
|
191
191
|
# Credit usage, included whenever a valid API key is provided.
|
|
192
192
|
key_metadata: nil
|
|
193
193
|
)
|
|
@@ -196,36 +196,120 @@ module ContextDev
|
|
|
196
196
|
sig do
|
|
197
197
|
override.returns(
|
|
198
198
|
{
|
|
199
|
+
bytes: ContextDev::Models::WebScrapeResponse::Bytes,
|
|
199
200
|
cache_metadata:
|
|
200
|
-
ContextDev::Models::
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
metadata: ContextDev::Models::
|
|
201
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata,
|
|
202
|
+
html: ContextDev::Models::WebScrapeResponse::HTML,
|
|
203
|
+
images: ContextDev::Models::WebScrapeResponse::Images,
|
|
204
|
+
markdown: ContextDev::Models::WebScrapeResponse::Markdown,
|
|
205
|
+
metadata: ContextDev::Models::WebScrapeResponse::Metadata,
|
|
206
|
+
parsed: ContextDev::Models::WebScrapeResponse::Parsed,
|
|
205
207
|
request_id: String,
|
|
206
|
-
|
|
207
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Success::TaggedBoolean,
|
|
208
|
-
type:
|
|
209
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol,
|
|
208
|
+
screenshot: ContextDev::Models::WebScrapeResponse::Screenshot,
|
|
210
209
|
url: String,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
],
|
|
215
|
-
actions_html_stale: T::Boolean,
|
|
216
|
-
key_metadata:
|
|
217
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::KeyMetadata
|
|
210
|
+
is_partial:
|
|
211
|
+
ContextDev::Models::WebScrapeResponse::IsPartial::TaggedBoolean,
|
|
212
|
+
key_metadata: ContextDev::Models::WebScrapeResponse::KeyMetadata
|
|
218
213
|
}
|
|
219
214
|
)
|
|
220
215
|
end
|
|
221
216
|
def to_hash
|
|
222
217
|
end
|
|
223
218
|
|
|
219
|
+
class Bytes < ContextDev::Internal::Type::BaseModel
|
|
220
|
+
OrHash =
|
|
221
|
+
T.type_alias do
|
|
222
|
+
T.any(
|
|
223
|
+
ContextDev::Models::WebScrapeResponse::Bytes,
|
|
224
|
+
ContextDev::Internal::AnyHash
|
|
225
|
+
)
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
sig do
|
|
229
|
+
returns(T.nilable(ContextDev::Models::WebScrapeResponse::Bytes::Data))
|
|
230
|
+
end
|
|
231
|
+
attr_reader :data
|
|
232
|
+
|
|
233
|
+
sig do
|
|
234
|
+
params(
|
|
235
|
+
data:
|
|
236
|
+
T.nilable(
|
|
237
|
+
ContextDev::Models::WebScrapeResponse::Bytes::Data::OrHash
|
|
238
|
+
)
|
|
239
|
+
).void
|
|
240
|
+
end
|
|
241
|
+
attr_writer :data
|
|
242
|
+
|
|
243
|
+
sig { returns(T::Boolean) }
|
|
244
|
+
attr_accessor :requested
|
|
245
|
+
|
|
246
|
+
# Original HTTP response body. Waiting, actions, and content filters never change
|
|
247
|
+
# it.
|
|
248
|
+
sig do
|
|
249
|
+
params(
|
|
250
|
+
data:
|
|
251
|
+
T.nilable(
|
|
252
|
+
ContextDev::Models::WebScrapeResponse::Bytes::Data::OrHash
|
|
253
|
+
),
|
|
254
|
+
requested: T::Boolean
|
|
255
|
+
).returns(T.attached_class)
|
|
256
|
+
end
|
|
257
|
+
def self.new(data:, requested:)
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
sig do
|
|
261
|
+
override.returns(
|
|
262
|
+
{
|
|
263
|
+
data:
|
|
264
|
+
T.nilable(ContextDev::Models::WebScrapeResponse::Bytes::Data),
|
|
265
|
+
requested: T::Boolean
|
|
266
|
+
}
|
|
267
|
+
)
|
|
268
|
+
end
|
|
269
|
+
def to_hash
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
class Data < ContextDev::Internal::Type::BaseModel
|
|
273
|
+
OrHash =
|
|
274
|
+
T.type_alias do
|
|
275
|
+
T.any(
|
|
276
|
+
ContextDev::Models::WebScrapeResponse::Bytes::Data,
|
|
277
|
+
ContextDev::Internal::AnyHash
|
|
278
|
+
)
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Original response body as base64, after HTTP decompression. Maximum decoded
|
|
282
|
+
# size: 20 MiB.
|
|
283
|
+
sig { returns(String) }
|
|
284
|
+
attr_accessor :base64
|
|
285
|
+
|
|
286
|
+
sig { returns(String) }
|
|
287
|
+
attr_accessor :content_type
|
|
288
|
+
|
|
289
|
+
sig do
|
|
290
|
+
params(base64: String, content_type: String).returns(
|
|
291
|
+
T.attached_class
|
|
292
|
+
)
|
|
293
|
+
end
|
|
294
|
+
def self.new(
|
|
295
|
+
# Original response body as base64, after HTTP decompression. Maximum decoded
|
|
296
|
+
# size: 20 MiB.
|
|
297
|
+
base64:,
|
|
298
|
+
content_type:
|
|
299
|
+
)
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
sig { override.returns({ base64: String, content_type: String }) }
|
|
303
|
+
def to_hash
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
end
|
|
307
|
+
|
|
224
308
|
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
225
309
|
OrHash =
|
|
226
310
|
T.type_alias do
|
|
227
311
|
T.any(
|
|
228
|
-
ContextDev::Models::
|
|
312
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata,
|
|
229
313
|
ContextDev::Internal::AnyHash
|
|
230
314
|
)
|
|
231
315
|
end
|
|
@@ -238,7 +322,7 @@ module ContextDev
|
|
|
238
322
|
# zero-data-retention cache bypass.
|
|
239
323
|
sig do
|
|
240
324
|
returns(
|
|
241
|
-
ContextDev::Models::
|
|
325
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata::Status::TaggedSymbol
|
|
242
326
|
)
|
|
243
327
|
end
|
|
244
328
|
attr_accessor :status
|
|
@@ -250,7 +334,7 @@ module ContextDev
|
|
|
250
334
|
params(
|
|
251
335
|
age_ms: Integer,
|
|
252
336
|
status:
|
|
253
|
-
ContextDev::Models::
|
|
337
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata::Status::OrSymbol
|
|
254
338
|
).returns(T.attached_class)
|
|
255
339
|
end
|
|
256
340
|
def self.new(
|
|
@@ -267,7 +351,7 @@ module ContextDev
|
|
|
267
351
|
{
|
|
268
352
|
age_ms: Integer,
|
|
269
353
|
status:
|
|
270
|
-
ContextDev::Models::
|
|
354
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata::Status::TaggedSymbol
|
|
271
355
|
}
|
|
272
356
|
)
|
|
273
357
|
end
|
|
@@ -283,7 +367,7 @@ module ContextDev
|
|
|
283
367
|
T.type_alias do
|
|
284
368
|
T.all(
|
|
285
369
|
Symbol,
|
|
286
|
-
ContextDev::Models::
|
|
370
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata::Status
|
|
287
371
|
)
|
|
288
372
|
end
|
|
289
373
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -291,23 +375,23 @@ module ContextDev
|
|
|
291
375
|
HIT =
|
|
292
376
|
T.let(
|
|
293
377
|
:hit,
|
|
294
|
-
ContextDev::Models::
|
|
378
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata::Status::TaggedSymbol
|
|
295
379
|
)
|
|
296
380
|
MISS =
|
|
297
381
|
T.let(
|
|
298
382
|
:miss,
|
|
299
|
-
ContextDev::Models::
|
|
383
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata::Status::TaggedSymbol
|
|
300
384
|
)
|
|
301
385
|
ZDR =
|
|
302
386
|
T.let(
|
|
303
387
|
:zdr,
|
|
304
|
-
ContextDev::Models::
|
|
388
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata::Status::TaggedSymbol
|
|
305
389
|
)
|
|
306
390
|
|
|
307
391
|
sig do
|
|
308
392
|
override.returns(
|
|
309
393
|
T::Array[
|
|
310
|
-
ContextDev::Models::
|
|
394
|
+
ContextDev::Models::WebScrapeResponse::CacheMetadata::Status::TaggedSymbol
|
|
311
395
|
]
|
|
312
396
|
)
|
|
313
397
|
end
|
|
@@ -316,62 +400,287 @@ module ContextDev
|
|
|
316
400
|
end
|
|
317
401
|
end
|
|
318
402
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
# timeoutOpts.behavior=return-partial: the timeoutOpts.milliseconds deadline was
|
|
322
|
-
# reached first, so the content reflects the DOM at that moment and late-rendering
|
|
323
|
-
# parts may be missing. Partial results are billed at the base request cost.
|
|
324
|
-
module FinalDomState
|
|
325
|
-
extend ContextDev::Internal::Type::Enum
|
|
326
|
-
|
|
327
|
-
TaggedSymbol =
|
|
403
|
+
class HTML < ContextDev::Internal::Type::BaseModel
|
|
404
|
+
OrHash =
|
|
328
405
|
T.type_alias do
|
|
329
|
-
T.
|
|
330
|
-
|
|
331
|
-
ContextDev::
|
|
406
|
+
T.any(
|
|
407
|
+
ContextDev::Models::WebScrapeResponse::HTML,
|
|
408
|
+
ContextDev::Internal::AnyHash
|
|
332
409
|
)
|
|
333
410
|
end
|
|
334
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
335
411
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
412
|
+
sig { returns(T.nilable(String)) }
|
|
413
|
+
attr_accessor :data
|
|
414
|
+
|
|
415
|
+
sig { returns(T::Boolean) }
|
|
416
|
+
attr_accessor :requested
|
|
417
|
+
|
|
418
|
+
# Rendered HTML after content filters.
|
|
419
|
+
sig do
|
|
420
|
+
params(data: T.nilable(String), requested: T::Boolean).returns(
|
|
421
|
+
T.attached_class
|
|
340
422
|
)
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
423
|
+
end
|
|
424
|
+
def self.new(data:, requested:)
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
sig do
|
|
428
|
+
override.returns({ data: T.nilable(String), requested: T::Boolean })
|
|
429
|
+
end
|
|
430
|
+
def to_hash
|
|
431
|
+
end
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
class Images < ContextDev::Internal::Type::BaseModel
|
|
435
|
+
OrHash =
|
|
436
|
+
T.type_alias do
|
|
437
|
+
T.any(
|
|
438
|
+
ContextDev::Models::WebScrapeResponse::Images,
|
|
439
|
+
ContextDev::Internal::AnyHash
|
|
440
|
+
)
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
sig do
|
|
444
|
+
returns(
|
|
445
|
+
T.nilable(
|
|
446
|
+
T::Array[ContextDev::Models::WebScrapeResponse::Images::Data]
|
|
447
|
+
)
|
|
345
448
|
)
|
|
449
|
+
end
|
|
450
|
+
attr_accessor :data
|
|
451
|
+
|
|
452
|
+
sig { returns(T::Boolean) }
|
|
453
|
+
attr_accessor :requested
|
|
454
|
+
|
|
455
|
+
# Images after content filters. Empty when none are found.
|
|
456
|
+
sig do
|
|
457
|
+
params(
|
|
458
|
+
data:
|
|
459
|
+
T.nilable(
|
|
460
|
+
T::Array[
|
|
461
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::OrHash
|
|
462
|
+
]
|
|
463
|
+
),
|
|
464
|
+
requested: T::Boolean
|
|
465
|
+
).returns(T.attached_class)
|
|
466
|
+
end
|
|
467
|
+
def self.new(data:, requested:)
|
|
468
|
+
end
|
|
346
469
|
|
|
347
470
|
sig do
|
|
348
471
|
override.returns(
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
472
|
+
{
|
|
473
|
+
data:
|
|
474
|
+
T.nilable(
|
|
475
|
+
T::Array[ContextDev::Models::WebScrapeResponse::Images::Data]
|
|
476
|
+
),
|
|
477
|
+
requested: T::Boolean
|
|
478
|
+
}
|
|
352
479
|
)
|
|
353
480
|
end
|
|
354
|
-
def
|
|
481
|
+
def to_hash
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
class Data < ContextDev::Internal::Type::BaseModel
|
|
485
|
+
OrHash =
|
|
486
|
+
T.type_alias do
|
|
487
|
+
T.any(
|
|
488
|
+
ContextDev::Models::WebScrapeResponse::Images::Data,
|
|
489
|
+
ContextDev::Internal::AnyHash
|
|
490
|
+
)
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# Alt text, if present.
|
|
494
|
+
sig { returns(T.nilable(String)) }
|
|
495
|
+
attr_accessor :alt
|
|
496
|
+
|
|
497
|
+
# Image URL, or a data URI for inline images.
|
|
498
|
+
sig { returns(String) }
|
|
499
|
+
attr_accessor :url
|
|
500
|
+
|
|
501
|
+
sig do
|
|
502
|
+
returns(
|
|
503
|
+
T.nilable(
|
|
504
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::TaggedSymbol
|
|
505
|
+
)
|
|
506
|
+
)
|
|
507
|
+
end
|
|
508
|
+
attr_reader :classification
|
|
509
|
+
|
|
510
|
+
sig do
|
|
511
|
+
params(
|
|
512
|
+
classification:
|
|
513
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::OrSymbol
|
|
514
|
+
).void
|
|
515
|
+
end
|
|
516
|
+
attr_writer :classification
|
|
517
|
+
|
|
518
|
+
# Hosted copy when file enrichment is requested and zdr is disabled. Valid for 24
|
|
519
|
+
# hours from the original capture.
|
|
520
|
+
sig { returns(T.nilable(String)) }
|
|
521
|
+
attr_reader :file_url
|
|
522
|
+
|
|
523
|
+
sig { params(file_url: String).void }
|
|
524
|
+
attr_writer :file_url
|
|
525
|
+
|
|
526
|
+
sig { returns(T.nilable(Integer)) }
|
|
527
|
+
attr_reader :height
|
|
528
|
+
|
|
529
|
+
sig { params(height: Integer).void }
|
|
530
|
+
attr_writer :height
|
|
531
|
+
|
|
532
|
+
sig { returns(T.nilable(Integer)) }
|
|
533
|
+
attr_reader :width
|
|
534
|
+
|
|
535
|
+
sig { params(width: Integer).void }
|
|
536
|
+
attr_writer :width
|
|
537
|
+
|
|
538
|
+
sig do
|
|
539
|
+
params(
|
|
540
|
+
alt: T.nilable(String),
|
|
541
|
+
url: String,
|
|
542
|
+
classification:
|
|
543
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::OrSymbol,
|
|
544
|
+
file_url: String,
|
|
545
|
+
height: Integer,
|
|
546
|
+
width: Integer
|
|
547
|
+
).returns(T.attached_class)
|
|
548
|
+
end
|
|
549
|
+
def self.new(
|
|
550
|
+
# Alt text, if present.
|
|
551
|
+
alt:,
|
|
552
|
+
# Image URL, or a data URI for inline images.
|
|
553
|
+
url:,
|
|
554
|
+
classification: nil,
|
|
555
|
+
# Hosted copy when file enrichment is requested and zdr is disabled. Valid for 24
|
|
556
|
+
# hours from the original capture.
|
|
557
|
+
file_url: nil,
|
|
558
|
+
height: nil,
|
|
559
|
+
width: nil
|
|
560
|
+
)
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
sig do
|
|
564
|
+
override.returns(
|
|
565
|
+
{
|
|
566
|
+
alt: T.nilable(String),
|
|
567
|
+
url: String,
|
|
568
|
+
classification:
|
|
569
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::TaggedSymbol,
|
|
570
|
+
file_url: String,
|
|
571
|
+
height: Integer,
|
|
572
|
+
width: Integer
|
|
573
|
+
}
|
|
574
|
+
)
|
|
575
|
+
end
|
|
576
|
+
def to_hash
|
|
577
|
+
end
|
|
578
|
+
|
|
579
|
+
module Classification
|
|
580
|
+
extend ContextDev::Internal::Type::Enum
|
|
581
|
+
|
|
582
|
+
TaggedSymbol =
|
|
583
|
+
T.type_alias do
|
|
584
|
+
T.all(
|
|
585
|
+
Symbol,
|
|
586
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification
|
|
587
|
+
)
|
|
588
|
+
end
|
|
589
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
590
|
+
|
|
591
|
+
PHOTOGRAPHY =
|
|
592
|
+
T.let(
|
|
593
|
+
:photography,
|
|
594
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::TaggedSymbol
|
|
595
|
+
)
|
|
596
|
+
ILLUSTRATION =
|
|
597
|
+
T.let(
|
|
598
|
+
:illustration,
|
|
599
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::TaggedSymbol
|
|
600
|
+
)
|
|
601
|
+
LOGO =
|
|
602
|
+
T.let(
|
|
603
|
+
:logo,
|
|
604
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::TaggedSymbol
|
|
605
|
+
)
|
|
606
|
+
WORDMARK =
|
|
607
|
+
T.let(
|
|
608
|
+
:wordmark,
|
|
609
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::TaggedSymbol
|
|
610
|
+
)
|
|
611
|
+
ICON =
|
|
612
|
+
T.let(
|
|
613
|
+
:icon,
|
|
614
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::TaggedSymbol
|
|
615
|
+
)
|
|
616
|
+
PATTERN =
|
|
617
|
+
T.let(
|
|
618
|
+
:pattern,
|
|
619
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::TaggedSymbol
|
|
620
|
+
)
|
|
621
|
+
GRAPHIC =
|
|
622
|
+
T.let(
|
|
623
|
+
:graphic,
|
|
624
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::TaggedSymbol
|
|
625
|
+
)
|
|
626
|
+
OTHER =
|
|
627
|
+
T.let(
|
|
628
|
+
:other,
|
|
629
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::TaggedSymbol
|
|
630
|
+
)
|
|
631
|
+
|
|
632
|
+
sig do
|
|
633
|
+
override.returns(
|
|
634
|
+
T::Array[
|
|
635
|
+
ContextDev::Models::WebScrapeResponse::Images::Data::Classification::TaggedSymbol
|
|
636
|
+
]
|
|
637
|
+
)
|
|
638
|
+
end
|
|
639
|
+
def self.values
|
|
640
|
+
end
|
|
641
|
+
end
|
|
355
642
|
end
|
|
356
643
|
end
|
|
357
644
|
|
|
358
|
-
class
|
|
645
|
+
class Markdown < ContextDev::Internal::Type::BaseModel
|
|
359
646
|
OrHash =
|
|
360
647
|
T.type_alias do
|
|
361
648
|
T.any(
|
|
362
|
-
ContextDev::Models::
|
|
649
|
+
ContextDev::Models::WebScrapeResponse::Markdown,
|
|
363
650
|
ContextDev::Internal::AnyHash
|
|
364
651
|
)
|
|
365
652
|
end
|
|
366
653
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
sig { returns(String) }
|
|
370
|
-
attr_accessor :final_url
|
|
654
|
+
sig { returns(T.nilable(String)) }
|
|
655
|
+
attr_accessor :data
|
|
371
656
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
657
|
+
sig { returns(T::Boolean) }
|
|
658
|
+
attr_accessor :requested
|
|
659
|
+
|
|
660
|
+
# Markdown after content filters.
|
|
661
|
+
sig do
|
|
662
|
+
params(data: T.nilable(String), requested: T::Boolean).returns(
|
|
663
|
+
T.attached_class
|
|
664
|
+
)
|
|
665
|
+
end
|
|
666
|
+
def self.new(data:, requested:)
|
|
667
|
+
end
|
|
668
|
+
|
|
669
|
+
sig do
|
|
670
|
+
override.returns({ data: T.nilable(String), requested: T::Boolean })
|
|
671
|
+
end
|
|
672
|
+
def to_hash
|
|
673
|
+
end
|
|
674
|
+
end
|
|
675
|
+
|
|
676
|
+
class Metadata < ContextDev::Internal::Type::BaseModel
|
|
677
|
+
OrHash =
|
|
678
|
+
T.type_alias do
|
|
679
|
+
T.any(
|
|
680
|
+
ContextDev::Models::WebScrapeResponse::Metadata,
|
|
681
|
+
ContextDev::Internal::AnyHash
|
|
682
|
+
)
|
|
683
|
+
end
|
|
375
684
|
|
|
376
685
|
# Additional non-social meta tags not promoted to top-level metadata fields.
|
|
377
686
|
sig do
|
|
@@ -379,7 +688,7 @@ module ContextDev
|
|
|
379
688
|
T.nilable(
|
|
380
689
|
T::Hash[
|
|
381
690
|
Symbol,
|
|
382
|
-
ContextDev::Models::
|
|
691
|
+
ContextDev::Models::WebScrapeResponse::Metadata::AdditionalMeta::Variants
|
|
383
692
|
]
|
|
384
693
|
)
|
|
385
694
|
)
|
|
@@ -391,7 +700,7 @@ module ContextDev
|
|
|
391
700
|
additional_meta:
|
|
392
701
|
T::Hash[
|
|
393
702
|
Symbol,
|
|
394
|
-
ContextDev::Models::
|
|
703
|
+
ContextDev::Models::WebScrapeResponse::Metadata::AdditionalMeta::Variants
|
|
395
704
|
]
|
|
396
705
|
).void
|
|
397
706
|
end
|
|
@@ -402,7 +711,7 @@ module ContextDev
|
|
|
402
711
|
returns(
|
|
403
712
|
T.nilable(
|
|
404
713
|
T::Array[
|
|
405
|
-
ContextDev::Models::
|
|
714
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Alternate
|
|
406
715
|
]
|
|
407
716
|
)
|
|
408
717
|
)
|
|
@@ -413,7 +722,7 @@ module ContextDev
|
|
|
413
722
|
params(
|
|
414
723
|
alternates:
|
|
415
724
|
T::Array[
|
|
416
|
-
ContextDev::Models::
|
|
725
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Alternate::OrHash
|
|
417
726
|
]
|
|
418
727
|
).void
|
|
419
728
|
end
|
|
@@ -452,9 +761,7 @@ module ContextDev
|
|
|
452
761
|
sig do
|
|
453
762
|
returns(
|
|
454
763
|
T.nilable(
|
|
455
|
-
T::Array[
|
|
456
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Metadata::Heading
|
|
457
|
-
]
|
|
764
|
+
T::Array[ContextDev::Models::WebScrapeResponse::Metadata::Heading]
|
|
458
765
|
)
|
|
459
766
|
)
|
|
460
767
|
end
|
|
@@ -464,7 +771,7 @@ module ContextDev
|
|
|
464
771
|
params(
|
|
465
772
|
headings:
|
|
466
773
|
T::Array[
|
|
467
|
-
ContextDev::Models::
|
|
774
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Heading::OrHash
|
|
468
775
|
]
|
|
469
776
|
).void
|
|
470
777
|
end
|
|
@@ -511,7 +818,7 @@ module ContextDev
|
|
|
511
818
|
T.nilable(
|
|
512
819
|
T::Hash[
|
|
513
820
|
Symbol,
|
|
514
|
-
ContextDev::Models::
|
|
821
|
+
ContextDev::Models::WebScrapeResponse::Metadata::OpenGraph::Variants
|
|
515
822
|
]
|
|
516
823
|
)
|
|
517
824
|
)
|
|
@@ -523,7 +830,7 @@ module ContextDev
|
|
|
523
830
|
open_graph:
|
|
524
831
|
T::Hash[
|
|
525
832
|
Symbol,
|
|
526
|
-
ContextDev::Models::
|
|
833
|
+
ContextDev::Models::WebScrapeResponse::Metadata::OpenGraph::Variants
|
|
527
834
|
]
|
|
528
835
|
).void
|
|
529
836
|
end
|
|
@@ -563,7 +870,7 @@ module ContextDev
|
|
|
563
870
|
T.nilable(
|
|
564
871
|
T::Hash[
|
|
565
872
|
Symbol,
|
|
566
|
-
ContextDev::Models::
|
|
873
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Twitter::Variants
|
|
567
874
|
]
|
|
568
875
|
)
|
|
569
876
|
)
|
|
@@ -575,25 +882,23 @@ module ContextDev
|
|
|
575
882
|
twitter:
|
|
576
883
|
T::Hash[
|
|
577
884
|
Symbol,
|
|
578
|
-
ContextDev::Models::
|
|
885
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Twitter::Variants
|
|
579
886
|
]
|
|
580
887
|
).void
|
|
581
888
|
end
|
|
582
889
|
attr_writer :twitter
|
|
583
890
|
|
|
584
|
-
#
|
|
891
|
+
# Page details, when available.
|
|
585
892
|
sig do
|
|
586
893
|
params(
|
|
587
|
-
final_url: String,
|
|
588
|
-
source_url: String,
|
|
589
894
|
additional_meta:
|
|
590
895
|
T::Hash[
|
|
591
896
|
Symbol,
|
|
592
|
-
ContextDev::Models::
|
|
897
|
+
ContextDev::Models::WebScrapeResponse::Metadata::AdditionalMeta::Variants
|
|
593
898
|
],
|
|
594
899
|
alternates:
|
|
595
900
|
T::Array[
|
|
596
|
-
ContextDev::Models::
|
|
901
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Alternate::OrHash
|
|
597
902
|
],
|
|
598
903
|
author: String,
|
|
599
904
|
canonical_url: String,
|
|
@@ -601,7 +906,7 @@ module ContextDev
|
|
|
601
906
|
favicon: String,
|
|
602
907
|
headings:
|
|
603
908
|
T::Array[
|
|
604
|
-
ContextDev::Models::
|
|
909
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Heading::OrHash
|
|
605
910
|
],
|
|
606
911
|
image: String,
|
|
607
912
|
json_ld: T::Array[T::Hash[Symbol, T.anything]],
|
|
@@ -611,7 +916,7 @@ module ContextDev
|
|
|
611
916
|
open_graph:
|
|
612
917
|
T::Hash[
|
|
613
918
|
Symbol,
|
|
614
|
-
ContextDev::Models::
|
|
919
|
+
ContextDev::Models::WebScrapeResponse::Metadata::OpenGraph::Variants
|
|
615
920
|
],
|
|
616
921
|
published_time: String,
|
|
617
922
|
robots: String,
|
|
@@ -620,16 +925,11 @@ module ContextDev
|
|
|
620
925
|
twitter:
|
|
621
926
|
T::Hash[
|
|
622
927
|
Symbol,
|
|
623
|
-
ContextDev::Models::
|
|
928
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Twitter::Variants
|
|
624
929
|
]
|
|
625
930
|
).returns(T.attached_class)
|
|
626
931
|
end
|
|
627
932
|
def self.new(
|
|
628
|
-
# Final URL scraped after redirects or scraper fallback, when known. Falls back to
|
|
629
|
-
# sourceUrl when unavailable.
|
|
630
|
-
final_url:,
|
|
631
|
-
# Original URL requested by the caller.
|
|
632
|
-
source_url:,
|
|
633
933
|
# Additional non-social meta tags not promoted to top-level metadata fields.
|
|
634
934
|
additional_meta: nil,
|
|
635
935
|
# Resolved alternate links from link rel=alternate tags.
|
|
@@ -673,16 +973,14 @@ module ContextDev
|
|
|
673
973
|
sig do
|
|
674
974
|
override.returns(
|
|
675
975
|
{
|
|
676
|
-
final_url: String,
|
|
677
|
-
source_url: String,
|
|
678
976
|
additional_meta:
|
|
679
977
|
T::Hash[
|
|
680
978
|
Symbol,
|
|
681
|
-
ContextDev::Models::
|
|
979
|
+
ContextDev::Models::WebScrapeResponse::Metadata::AdditionalMeta::Variants
|
|
682
980
|
],
|
|
683
981
|
alternates:
|
|
684
982
|
T::Array[
|
|
685
|
-
ContextDev::Models::
|
|
983
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Alternate
|
|
686
984
|
],
|
|
687
985
|
author: String,
|
|
688
986
|
canonical_url: String,
|
|
@@ -690,7 +988,7 @@ module ContextDev
|
|
|
690
988
|
favicon: String,
|
|
691
989
|
headings:
|
|
692
990
|
T::Array[
|
|
693
|
-
ContextDev::Models::
|
|
991
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Heading
|
|
694
992
|
],
|
|
695
993
|
image: String,
|
|
696
994
|
json_ld: T::Array[T::Hash[Symbol, T.anything]],
|
|
@@ -700,7 +998,7 @@ module ContextDev
|
|
|
700
998
|
open_graph:
|
|
701
999
|
T::Hash[
|
|
702
1000
|
Symbol,
|
|
703
|
-
ContextDev::Models::
|
|
1001
|
+
ContextDev::Models::WebScrapeResponse::Metadata::OpenGraph::Variants
|
|
704
1002
|
],
|
|
705
1003
|
published_time: String,
|
|
706
1004
|
robots: String,
|
|
@@ -709,7 +1007,7 @@ module ContextDev
|
|
|
709
1007
|
twitter:
|
|
710
1008
|
T::Hash[
|
|
711
1009
|
Symbol,
|
|
712
|
-
ContextDev::Models::
|
|
1010
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Twitter::Variants
|
|
713
1011
|
]
|
|
714
1012
|
}
|
|
715
1013
|
)
|
|
@@ -725,7 +1023,7 @@ module ContextDev
|
|
|
725
1023
|
sig do
|
|
726
1024
|
override.returns(
|
|
727
1025
|
T::Array[
|
|
728
|
-
ContextDev::Models::
|
|
1026
|
+
ContextDev::Models::WebScrapeResponse::Metadata::AdditionalMeta::Variants
|
|
729
1027
|
]
|
|
730
1028
|
)
|
|
731
1029
|
end
|
|
@@ -743,7 +1041,7 @@ module ContextDev
|
|
|
743
1041
|
OrHash =
|
|
744
1042
|
T.type_alias do
|
|
745
1043
|
T.any(
|
|
746
|
-
ContextDev::Models::
|
|
1044
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Alternate,
|
|
747
1045
|
ContextDev::Internal::AnyHash
|
|
748
1046
|
)
|
|
749
1047
|
end
|
|
@@ -806,7 +1104,7 @@ module ContextDev
|
|
|
806
1104
|
OrHash =
|
|
807
1105
|
T.type_alias do
|
|
808
1106
|
T.any(
|
|
809
|
-
ContextDev::Models::
|
|
1107
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Heading,
|
|
810
1108
|
ContextDev::Internal::AnyHash
|
|
811
1109
|
)
|
|
812
1110
|
end
|
|
@@ -841,7 +1139,7 @@ module ContextDev
|
|
|
841
1139
|
sig do
|
|
842
1140
|
override.returns(
|
|
843
1141
|
T::Array[
|
|
844
|
-
ContextDev::Models::
|
|
1142
|
+
ContextDev::Models::WebScrapeResponse::Metadata::OpenGraph::Variants
|
|
845
1143
|
]
|
|
846
1144
|
)
|
|
847
1145
|
end
|
|
@@ -863,7 +1161,7 @@ module ContextDev
|
|
|
863
1161
|
sig do
|
|
864
1162
|
override.returns(
|
|
865
1163
|
T::Array[
|
|
866
|
-
ContextDev::Models::
|
|
1164
|
+
ContextDev::Models::WebScrapeResponse::Metadata::Twitter::Variants
|
|
867
1165
|
]
|
|
868
1166
|
)
|
|
869
1167
|
end
|
|
@@ -878,265 +1176,99 @@ module ContextDev
|
|
|
878
1176
|
end
|
|
879
1177
|
end
|
|
880
1178
|
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
extend ContextDev::Internal::Type::Enum
|
|
884
|
-
|
|
885
|
-
TaggedBoolean =
|
|
1179
|
+
class Parsed < ContextDev::Internal::Type::BaseModel
|
|
1180
|
+
OrHash =
|
|
886
1181
|
T.type_alias do
|
|
887
|
-
T.
|
|
888
|
-
|
|
889
|
-
ContextDev::
|
|
1182
|
+
T.any(
|
|
1183
|
+
ContextDev::Models::WebScrapeResponse::Parsed,
|
|
1184
|
+
ContextDev::Internal::AnyHash
|
|
890
1185
|
)
|
|
891
1186
|
end
|
|
892
|
-
OrBoolean = T.type_alias { T::Boolean }
|
|
893
1187
|
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
1188
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
1189
|
+
attr_accessor :data
|
|
1190
|
+
|
|
1191
|
+
sig { returns(T::Boolean) }
|
|
1192
|
+
attr_accessor :requested
|
|
899
1193
|
|
|
1194
|
+
# Fields produced by parseParams.rules, after shared content filters.
|
|
900
1195
|
sig do
|
|
901
|
-
|
|
902
|
-
T::
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
)
|
|
1196
|
+
params(
|
|
1197
|
+
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
1198
|
+
requested: T::Boolean
|
|
1199
|
+
).returns(T.attached_class)
|
|
906
1200
|
end
|
|
907
|
-
def self.
|
|
1201
|
+
def self.new(data:, requested:)
|
|
908
1202
|
end
|
|
909
|
-
end
|
|
910
|
-
|
|
911
|
-
# Detected content type of the returned `html` field. Sitemaps and feeds are
|
|
912
|
-
# surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as
|
|
913
|
-
# `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations
|
|
914
|
-
# are surfaced as `pptx`/`ppt` with the extracted slides as HTML.
|
|
915
|
-
module Type
|
|
916
|
-
extend ContextDev::Internal::Type::Enum
|
|
917
|
-
|
|
918
|
-
TaggedSymbol =
|
|
919
|
-
T.type_alias do
|
|
920
|
-
T.all(Symbol, ContextDev::Models::WebWebScrapeHTMLResponse::Type)
|
|
921
|
-
end
|
|
922
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
923
|
-
|
|
924
|
-
HTML =
|
|
925
|
-
T.let(
|
|
926
|
-
:html,
|
|
927
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
928
|
-
)
|
|
929
|
-
XML =
|
|
930
|
-
T.let(
|
|
931
|
-
:xml,
|
|
932
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
933
|
-
)
|
|
934
|
-
JSON =
|
|
935
|
-
T.let(
|
|
936
|
-
:json,
|
|
937
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
938
|
-
)
|
|
939
|
-
TEXT =
|
|
940
|
-
T.let(
|
|
941
|
-
:text,
|
|
942
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
943
|
-
)
|
|
944
|
-
CSV =
|
|
945
|
-
T.let(
|
|
946
|
-
:csv,
|
|
947
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
948
|
-
)
|
|
949
|
-
MARKDOWN =
|
|
950
|
-
T.let(
|
|
951
|
-
:markdown,
|
|
952
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
953
|
-
)
|
|
954
|
-
SVG =
|
|
955
|
-
T.let(
|
|
956
|
-
:svg,
|
|
957
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
958
|
-
)
|
|
959
|
-
PDF =
|
|
960
|
-
T.let(
|
|
961
|
-
:pdf,
|
|
962
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
963
|
-
)
|
|
964
|
-
DOCX =
|
|
965
|
-
T.let(
|
|
966
|
-
:docx,
|
|
967
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
968
|
-
)
|
|
969
|
-
DOC =
|
|
970
|
-
T.let(
|
|
971
|
-
:doc,
|
|
972
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
973
|
-
)
|
|
974
|
-
XLSX =
|
|
975
|
-
T.let(
|
|
976
|
-
:xlsx,
|
|
977
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
978
|
-
)
|
|
979
|
-
XLS =
|
|
980
|
-
T.let(
|
|
981
|
-
:xls,
|
|
982
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
983
|
-
)
|
|
984
|
-
PPTX =
|
|
985
|
-
T.let(
|
|
986
|
-
:pptx,
|
|
987
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
988
|
-
)
|
|
989
|
-
PPT =
|
|
990
|
-
T.let(
|
|
991
|
-
:ppt,
|
|
992
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
993
|
-
)
|
|
994
1203
|
|
|
995
1204
|
sig do
|
|
996
1205
|
override.returns(
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1206
|
+
{
|
|
1207
|
+
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
1208
|
+
requested: T::Boolean
|
|
1209
|
+
}
|
|
1000
1210
|
)
|
|
1001
1211
|
end
|
|
1002
|
-
def
|
|
1212
|
+
def to_hash
|
|
1003
1213
|
end
|
|
1004
1214
|
end
|
|
1005
1215
|
|
|
1006
|
-
class
|
|
1216
|
+
class Screenshot < ContextDev::Internal::Type::BaseModel
|
|
1007
1217
|
OrHash =
|
|
1008
1218
|
T.type_alias do
|
|
1009
1219
|
T.any(
|
|
1010
|
-
ContextDev::Models::
|
|
1220
|
+
ContextDev::Models::WebScrapeResponse::Screenshot,
|
|
1011
1221
|
ContextDev::Internal::AnyHash
|
|
1012
1222
|
)
|
|
1013
1223
|
end
|
|
1014
1224
|
|
|
1015
|
-
sig { returns(String) }
|
|
1016
|
-
attr_accessor :instruction
|
|
1017
|
-
|
|
1018
|
-
# Applied means the requested page state was visibly verified. Failed means it was
|
|
1019
|
-
# not verified. Skipped means it was not attempted.
|
|
1020
|
-
sig do
|
|
1021
|
-
returns(
|
|
1022
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol
|
|
1023
|
-
)
|
|
1024
|
-
end
|
|
1025
|
-
attr_accessor :status
|
|
1026
|
-
|
|
1027
|
-
# Visible page evidence used to verify an applied action.
|
|
1028
|
-
sig { returns(T.nilable(String)) }
|
|
1029
|
-
attr_reader :completion_evidence
|
|
1030
|
-
|
|
1031
|
-
sig { params(completion_evidence: String).void }
|
|
1032
|
-
attr_writer :completion_evidence
|
|
1033
|
-
|
|
1034
|
-
sig { returns(T.nilable(Float)) }
|
|
1035
|
-
attr_reader :duration_ms
|
|
1036
|
-
|
|
1037
|
-
sig { params(duration_ms: Float).void }
|
|
1038
|
-
attr_writer :duration_ms
|
|
1039
|
-
|
|
1040
1225
|
sig { returns(T.nilable(String)) }
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
sig { params(error: String).void }
|
|
1044
|
-
attr_writer :error
|
|
1226
|
+
attr_accessor :data
|
|
1045
1227
|
|
|
1046
|
-
sig { returns(T
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
sig { params(method_: String).void }
|
|
1050
|
-
attr_writer :method_
|
|
1051
|
-
|
|
1052
|
-
sig { returns(T.nilable(String)) }
|
|
1053
|
-
attr_reader :target_description
|
|
1054
|
-
|
|
1055
|
-
sig { params(target_description: String).void }
|
|
1056
|
-
attr_writer :target_description
|
|
1228
|
+
sig { returns(T::Boolean) }
|
|
1229
|
+
attr_accessor :requested
|
|
1057
1230
|
|
|
1231
|
+
# An image data URL. Use directly as an image src.
|
|
1058
1232
|
sig do
|
|
1059
|
-
params(
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::OrSymbol,
|
|
1063
|
-
completion_evidence: String,
|
|
1064
|
-
duration_ms: Float,
|
|
1065
|
-
error: String,
|
|
1066
|
-
method_: String,
|
|
1067
|
-
target_description: String
|
|
1068
|
-
).returns(T.attached_class)
|
|
1233
|
+
params(data: T.nilable(String), requested: T::Boolean).returns(
|
|
1234
|
+
T.attached_class
|
|
1235
|
+
)
|
|
1069
1236
|
end
|
|
1070
|
-
def self.new(
|
|
1071
|
-
instruction:,
|
|
1072
|
-
# Applied means the requested page state was visibly verified. Failed means it was
|
|
1073
|
-
# not verified. Skipped means it was not attempted.
|
|
1074
|
-
status:,
|
|
1075
|
-
# Visible page evidence used to verify an applied action.
|
|
1076
|
-
completion_evidence: nil,
|
|
1077
|
-
duration_ms: nil,
|
|
1078
|
-
error: nil,
|
|
1079
|
-
method_: nil,
|
|
1080
|
-
target_description: nil
|
|
1081
|
-
)
|
|
1237
|
+
def self.new(data:, requested:)
|
|
1082
1238
|
end
|
|
1083
1239
|
|
|
1084
1240
|
sig do
|
|
1085
|
-
override.returns(
|
|
1086
|
-
{
|
|
1087
|
-
instruction: String,
|
|
1088
|
-
status:
|
|
1089
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol,
|
|
1090
|
-
completion_evidence: String,
|
|
1091
|
-
duration_ms: Float,
|
|
1092
|
-
error: String,
|
|
1093
|
-
method_: String,
|
|
1094
|
-
target_description: String
|
|
1095
|
-
}
|
|
1096
|
-
)
|
|
1241
|
+
override.returns({ data: T.nilable(String), requested: T::Boolean })
|
|
1097
1242
|
end
|
|
1098
1243
|
def to_hash
|
|
1099
1244
|
end
|
|
1245
|
+
end
|
|
1100
1246
|
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1247
|
+
# Present when return-partial captures a page that is still loading or returns
|
|
1248
|
+
# images before image processing finishes. Partial responses are not cached.
|
|
1249
|
+
module IsPartial
|
|
1250
|
+
extend ContextDev::Internal::Type::Enum
|
|
1105
1251
|
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
)
|
|
1112
|
-
end
|
|
1113
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1252
|
+
TaggedBoolean =
|
|
1253
|
+
T.type_alias do
|
|
1254
|
+
T.all(T::Boolean, ContextDev::Models::WebScrapeResponse::IsPartial)
|
|
1255
|
+
end
|
|
1256
|
+
OrBoolean = T.type_alias { T::Boolean }
|
|
1114
1257
|
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
FAILED =
|
|
1121
|
-
T.let(
|
|
1122
|
-
:failed,
|
|
1123
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol
|
|
1124
|
-
)
|
|
1125
|
-
SKIPPED =
|
|
1126
|
-
T.let(
|
|
1127
|
-
:skipped,
|
|
1128
|
-
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol
|
|
1129
|
-
)
|
|
1258
|
+
TRUE =
|
|
1259
|
+
T.let(
|
|
1260
|
+
true,
|
|
1261
|
+
ContextDev::Models::WebScrapeResponse::IsPartial::TaggedBoolean
|
|
1262
|
+
)
|
|
1130
1263
|
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
end
|
|
1264
|
+
sig do
|
|
1265
|
+
override.returns(
|
|
1266
|
+
T::Array[
|
|
1267
|
+
ContextDev::Models::WebScrapeResponse::IsPartial::TaggedBoolean
|
|
1268
|
+
]
|
|
1269
|
+
)
|
|
1270
|
+
end
|
|
1271
|
+
def self.values
|
|
1140
1272
|
end
|
|
1141
1273
|
end
|
|
1142
1274
|
|
|
@@ -1144,7 +1276,7 @@ module ContextDev
|
|
|
1144
1276
|
OrHash =
|
|
1145
1277
|
T.type_alias do
|
|
1146
1278
|
T.any(
|
|
1147
|
-
ContextDev::Models::
|
|
1279
|
+
ContextDev::Models::WebScrapeResponse::KeyMetadata,
|
|
1148
1280
|
ContextDev::Internal::AnyHash
|
|
1149
1281
|
)
|
|
1150
1282
|
end
|