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
|
@@ -1,696 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module ContextDev
|
|
4
|
-
module Models
|
|
5
|
-
class AIExtractProductResponse < ContextDev::Internal::Type::BaseModel
|
|
6
|
-
OrHash =
|
|
7
|
-
T.type_alias do
|
|
8
|
-
T.any(
|
|
9
|
-
ContextDev::Models::AIExtractProductResponse,
|
|
10
|
-
ContextDev::Internal::AnyHash
|
|
11
|
-
)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# Cache outcome for this response. Composite responses are hits only when every
|
|
15
|
-
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
16
|
-
# oldest contributing hit.
|
|
17
|
-
sig do
|
|
18
|
-
returns(ContextDev::Models::AIExtractProductResponse::CacheMetadata)
|
|
19
|
-
end
|
|
20
|
-
attr_reader :cache_metadata
|
|
21
|
-
|
|
22
|
-
sig do
|
|
23
|
-
params(
|
|
24
|
-
cache_metadata:
|
|
25
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata::OrHash
|
|
26
|
-
).void
|
|
27
|
-
end
|
|
28
|
-
attr_writer :cache_metadata
|
|
29
|
-
|
|
30
|
-
# Unique id of this API call, also sent in the X-Request-Id response header. Quote
|
|
31
|
-
# it when contacting support about a failed request.
|
|
32
|
-
sig { returns(String) }
|
|
33
|
-
attr_accessor :request_id
|
|
34
|
-
|
|
35
|
-
# Whether the given URL is a product detail page
|
|
36
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
37
|
-
attr_reader :is_product_page
|
|
38
|
-
|
|
39
|
-
sig { params(is_product_page: T::Boolean).void }
|
|
40
|
-
attr_writer :is_product_page
|
|
41
|
-
|
|
42
|
-
# Credit usage, included whenever a valid API key is provided.
|
|
43
|
-
sig do
|
|
44
|
-
returns(
|
|
45
|
-
T.nilable(ContextDev::Models::AIExtractProductResponse::KeyMetadata)
|
|
46
|
-
)
|
|
47
|
-
end
|
|
48
|
-
attr_reader :key_metadata
|
|
49
|
-
|
|
50
|
-
sig do
|
|
51
|
-
params(
|
|
52
|
-
key_metadata:
|
|
53
|
-
ContextDev::Models::AIExtractProductResponse::KeyMetadata::OrHash
|
|
54
|
-
).void
|
|
55
|
-
end
|
|
56
|
-
attr_writer :key_metadata
|
|
57
|
-
|
|
58
|
-
# True when the timeout ended processing and this response contains only usable
|
|
59
|
-
# results completed so far. Unfinished results are omitted.
|
|
60
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
61
|
-
attr_reader :partial
|
|
62
|
-
|
|
63
|
-
sig { params(partial: T::Boolean).void }
|
|
64
|
-
attr_writer :partial
|
|
65
|
-
|
|
66
|
-
# The detected ecommerce platform, or null if not a product page
|
|
67
|
-
sig do
|
|
68
|
-
returns(
|
|
69
|
-
T.nilable(
|
|
70
|
-
ContextDev::Models::AIExtractProductResponse::Platform::TaggedSymbol
|
|
71
|
-
)
|
|
72
|
-
)
|
|
73
|
-
end
|
|
74
|
-
attr_accessor :platform
|
|
75
|
-
|
|
76
|
-
# The extracted product data, or null if not a product page
|
|
77
|
-
sig do
|
|
78
|
-
returns(
|
|
79
|
-
T.nilable(ContextDev::Models::AIExtractProductResponse::Product)
|
|
80
|
-
)
|
|
81
|
-
end
|
|
82
|
-
attr_reader :product
|
|
83
|
-
|
|
84
|
-
sig do
|
|
85
|
-
params(
|
|
86
|
-
product:
|
|
87
|
-
T.nilable(
|
|
88
|
-
ContextDev::Models::AIExtractProductResponse::Product::OrHash
|
|
89
|
-
)
|
|
90
|
-
).void
|
|
91
|
-
end
|
|
92
|
-
attr_writer :product
|
|
93
|
-
|
|
94
|
-
sig do
|
|
95
|
-
params(
|
|
96
|
-
cache_metadata:
|
|
97
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata::OrHash,
|
|
98
|
-
request_id: String,
|
|
99
|
-
is_product_page: T::Boolean,
|
|
100
|
-
key_metadata:
|
|
101
|
-
ContextDev::Models::AIExtractProductResponse::KeyMetadata::OrHash,
|
|
102
|
-
partial: T::Boolean,
|
|
103
|
-
platform:
|
|
104
|
-
T.nilable(
|
|
105
|
-
ContextDev::Models::AIExtractProductResponse::Platform::OrSymbol
|
|
106
|
-
),
|
|
107
|
-
product:
|
|
108
|
-
T.nilable(
|
|
109
|
-
ContextDev::Models::AIExtractProductResponse::Product::OrHash
|
|
110
|
-
)
|
|
111
|
-
).returns(T.attached_class)
|
|
112
|
-
end
|
|
113
|
-
def self.new(
|
|
114
|
-
# Cache outcome for this response. Composite responses are hits only when every
|
|
115
|
-
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
116
|
-
# oldest contributing hit.
|
|
117
|
-
cache_metadata:,
|
|
118
|
-
# Unique id of this API call, also sent in the X-Request-Id response header. Quote
|
|
119
|
-
# it when contacting support about a failed request.
|
|
120
|
-
request_id:,
|
|
121
|
-
# Whether the given URL is a product detail page
|
|
122
|
-
is_product_page: nil,
|
|
123
|
-
# Credit usage, included whenever a valid API key is provided.
|
|
124
|
-
key_metadata: nil,
|
|
125
|
-
# True when the timeout ended processing and this response contains only usable
|
|
126
|
-
# results completed so far. Unfinished results are omitted.
|
|
127
|
-
partial: nil,
|
|
128
|
-
# The detected ecommerce platform, or null if not a product page
|
|
129
|
-
platform: nil,
|
|
130
|
-
# The extracted product data, or null if not a product page
|
|
131
|
-
product: nil
|
|
132
|
-
)
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
sig do
|
|
136
|
-
override.returns(
|
|
137
|
-
{
|
|
138
|
-
cache_metadata:
|
|
139
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata,
|
|
140
|
-
request_id: String,
|
|
141
|
-
is_product_page: T::Boolean,
|
|
142
|
-
key_metadata:
|
|
143
|
-
ContextDev::Models::AIExtractProductResponse::KeyMetadata,
|
|
144
|
-
partial: T::Boolean,
|
|
145
|
-
platform:
|
|
146
|
-
T.nilable(
|
|
147
|
-
ContextDev::Models::AIExtractProductResponse::Platform::TaggedSymbol
|
|
148
|
-
),
|
|
149
|
-
product:
|
|
150
|
-
T.nilable(ContextDev::Models::AIExtractProductResponse::Product)
|
|
151
|
-
}
|
|
152
|
-
)
|
|
153
|
-
end
|
|
154
|
-
def to_hash
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
158
|
-
OrHash =
|
|
159
|
-
T.type_alias do
|
|
160
|
-
T.any(
|
|
161
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata,
|
|
162
|
-
ContextDev::Internal::AnyHash
|
|
163
|
-
)
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
167
|
-
sig { returns(Integer) }
|
|
168
|
-
attr_accessor :age_ms
|
|
169
|
-
|
|
170
|
-
# Whether the response was served from cache, required fresh work, or honored
|
|
171
|
-
# zero-data-retention cache bypass.
|
|
172
|
-
sig do
|
|
173
|
-
returns(
|
|
174
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
175
|
-
)
|
|
176
|
-
end
|
|
177
|
-
attr_accessor :status
|
|
178
|
-
|
|
179
|
-
# Cache outcome for this response. Composite responses are hits only when every
|
|
180
|
-
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
181
|
-
# oldest contributing hit.
|
|
182
|
-
sig do
|
|
183
|
-
params(
|
|
184
|
-
age_ms: Integer,
|
|
185
|
-
status:
|
|
186
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::OrSymbol
|
|
187
|
-
).returns(T.attached_class)
|
|
188
|
-
end
|
|
189
|
-
def self.new(
|
|
190
|
-
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
191
|
-
age_ms:,
|
|
192
|
-
# Whether the response was served from cache, required fresh work, or honored
|
|
193
|
-
# zero-data-retention cache bypass.
|
|
194
|
-
status:
|
|
195
|
-
)
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
sig do
|
|
199
|
-
override.returns(
|
|
200
|
-
{
|
|
201
|
-
age_ms: Integer,
|
|
202
|
-
status:
|
|
203
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
204
|
-
}
|
|
205
|
-
)
|
|
206
|
-
end
|
|
207
|
-
def to_hash
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
# Whether the response was served from cache, required fresh work, or honored
|
|
211
|
-
# zero-data-retention cache bypass.
|
|
212
|
-
module Status
|
|
213
|
-
extend ContextDev::Internal::Type::Enum
|
|
214
|
-
|
|
215
|
-
TaggedSymbol =
|
|
216
|
-
T.type_alias do
|
|
217
|
-
T.all(
|
|
218
|
-
Symbol,
|
|
219
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status
|
|
220
|
-
)
|
|
221
|
-
end
|
|
222
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
223
|
-
|
|
224
|
-
HIT =
|
|
225
|
-
T.let(
|
|
226
|
-
:hit,
|
|
227
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
228
|
-
)
|
|
229
|
-
MISS =
|
|
230
|
-
T.let(
|
|
231
|
-
:miss,
|
|
232
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
233
|
-
)
|
|
234
|
-
ZDR =
|
|
235
|
-
T.let(
|
|
236
|
-
:zdr,
|
|
237
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
238
|
-
)
|
|
239
|
-
|
|
240
|
-
sig do
|
|
241
|
-
override.returns(
|
|
242
|
-
T::Array[
|
|
243
|
-
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
244
|
-
]
|
|
245
|
-
)
|
|
246
|
-
end
|
|
247
|
-
def self.values
|
|
248
|
-
end
|
|
249
|
-
end
|
|
250
|
-
end
|
|
251
|
-
|
|
252
|
-
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
253
|
-
OrHash =
|
|
254
|
-
T.type_alias do
|
|
255
|
-
T.any(
|
|
256
|
-
ContextDev::Models::AIExtractProductResponse::KeyMetadata,
|
|
257
|
-
ContextDev::Internal::AnyHash
|
|
258
|
-
)
|
|
259
|
-
end
|
|
260
|
-
|
|
261
|
-
# Credits used by this request.
|
|
262
|
-
sig { returns(Integer) }
|
|
263
|
-
attr_accessor :credits_consumed
|
|
264
|
-
|
|
265
|
-
# Credits remaining for your organization.
|
|
266
|
-
sig { returns(Integer) }
|
|
267
|
-
attr_accessor :credits_remaining
|
|
268
|
-
|
|
269
|
-
# Credit usage, included whenever a valid API key is provided.
|
|
270
|
-
sig do
|
|
271
|
-
params(credits_consumed: Integer, credits_remaining: Integer).returns(
|
|
272
|
-
T.attached_class
|
|
273
|
-
)
|
|
274
|
-
end
|
|
275
|
-
def self.new(
|
|
276
|
-
# Credits used by this request.
|
|
277
|
-
credits_consumed:,
|
|
278
|
-
# Credits remaining for your organization.
|
|
279
|
-
credits_remaining:
|
|
280
|
-
)
|
|
281
|
-
end
|
|
282
|
-
|
|
283
|
-
sig do
|
|
284
|
-
override.returns(
|
|
285
|
-
{ credits_consumed: Integer, credits_remaining: Integer }
|
|
286
|
-
)
|
|
287
|
-
end
|
|
288
|
-
def to_hash
|
|
289
|
-
end
|
|
290
|
-
end
|
|
291
|
-
|
|
292
|
-
# The detected ecommerce platform, or null if not a product page
|
|
293
|
-
module Platform
|
|
294
|
-
extend ContextDev::Internal::Type::Enum
|
|
295
|
-
|
|
296
|
-
TaggedSymbol =
|
|
297
|
-
T.type_alias do
|
|
298
|
-
T.all(
|
|
299
|
-
Symbol,
|
|
300
|
-
ContextDev::Models::AIExtractProductResponse::Platform
|
|
301
|
-
)
|
|
302
|
-
end
|
|
303
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
304
|
-
|
|
305
|
-
AMAZON =
|
|
306
|
-
T.let(
|
|
307
|
-
:amazon,
|
|
308
|
-
ContextDev::Models::AIExtractProductResponse::Platform::TaggedSymbol
|
|
309
|
-
)
|
|
310
|
-
TIKTOK_SHOP =
|
|
311
|
-
T.let(
|
|
312
|
-
:tiktok_shop,
|
|
313
|
-
ContextDev::Models::AIExtractProductResponse::Platform::TaggedSymbol
|
|
314
|
-
)
|
|
315
|
-
ETSY =
|
|
316
|
-
T.let(
|
|
317
|
-
:etsy,
|
|
318
|
-
ContextDev::Models::AIExtractProductResponse::Platform::TaggedSymbol
|
|
319
|
-
)
|
|
320
|
-
GENERIC =
|
|
321
|
-
T.let(
|
|
322
|
-
:generic,
|
|
323
|
-
ContextDev::Models::AIExtractProductResponse::Platform::TaggedSymbol
|
|
324
|
-
)
|
|
325
|
-
|
|
326
|
-
sig do
|
|
327
|
-
override.returns(
|
|
328
|
-
T::Array[
|
|
329
|
-
ContextDev::Models::AIExtractProductResponse::Platform::TaggedSymbol
|
|
330
|
-
]
|
|
331
|
-
)
|
|
332
|
-
end
|
|
333
|
-
def self.values
|
|
334
|
-
end
|
|
335
|
-
end
|
|
336
|
-
|
|
337
|
-
class Product < ContextDev::Internal::Type::BaseModel
|
|
338
|
-
OrHash =
|
|
339
|
-
T.type_alias do
|
|
340
|
-
T.any(
|
|
341
|
-
ContextDev::Models::AIExtractProductResponse::Product,
|
|
342
|
-
ContextDev::Internal::AnyHash
|
|
343
|
-
)
|
|
344
|
-
end
|
|
345
|
-
|
|
346
|
-
# Description of the product
|
|
347
|
-
sig { returns(String) }
|
|
348
|
-
attr_accessor :description
|
|
349
|
-
|
|
350
|
-
# List of product features
|
|
351
|
-
sig { returns(T::Array[String]) }
|
|
352
|
-
attr_accessor :features
|
|
353
|
-
|
|
354
|
-
# URLs to product images on the page (up to 7)
|
|
355
|
-
sig { returns(T::Array[String]) }
|
|
356
|
-
attr_accessor :images
|
|
357
|
-
|
|
358
|
-
# Name of the product
|
|
359
|
-
sig { returns(String) }
|
|
360
|
-
attr_accessor :name
|
|
361
|
-
|
|
362
|
-
# Stock Keeping Unit (product identifier). Null if no identifier is found.
|
|
363
|
-
sig { returns(T.nilable(String)) }
|
|
364
|
-
attr_accessor :sku
|
|
365
|
-
|
|
366
|
-
# Tags associated with the product
|
|
367
|
-
sig { returns(T::Array[String]) }
|
|
368
|
-
attr_accessor :tags
|
|
369
|
-
|
|
370
|
-
# Target audience for the product (array of strings)
|
|
371
|
-
sig { returns(T::Array[String]) }
|
|
372
|
-
attr_accessor :target_audience
|
|
373
|
-
|
|
374
|
-
# Normalized stock or ordering availability
|
|
375
|
-
sig do
|
|
376
|
-
returns(
|
|
377
|
-
T.nilable(
|
|
378
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
379
|
-
)
|
|
380
|
-
)
|
|
381
|
-
end
|
|
382
|
-
attr_accessor :availability
|
|
383
|
-
|
|
384
|
-
# Billing frequency for the product
|
|
385
|
-
sig do
|
|
386
|
-
returns(
|
|
387
|
-
T.nilable(
|
|
388
|
-
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::TaggedSymbol
|
|
389
|
-
)
|
|
390
|
-
)
|
|
391
|
-
end
|
|
392
|
-
attr_accessor :billing_frequency
|
|
393
|
-
|
|
394
|
-
# Category of the product
|
|
395
|
-
sig { returns(T.nilable(String)) }
|
|
396
|
-
attr_accessor :category
|
|
397
|
-
|
|
398
|
-
# Currency code for the price (e.g., USD, EUR)
|
|
399
|
-
sig { returns(T.nilable(String)) }
|
|
400
|
-
attr_accessor :currency
|
|
401
|
-
|
|
402
|
-
# Dimension statements shown for the product, preserving labels, values, and units
|
|
403
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
404
|
-
attr_reader :dimensions
|
|
405
|
-
|
|
406
|
-
sig { params(dimensions: T::Array[String]).void }
|
|
407
|
-
attr_writer :dimensions
|
|
408
|
-
|
|
409
|
-
# URL to the product image
|
|
410
|
-
sig { returns(T.nilable(String)) }
|
|
411
|
-
attr_accessor :image_url
|
|
412
|
-
|
|
413
|
-
# Price of the product
|
|
414
|
-
sig { returns(T.nilable(Float)) }
|
|
415
|
-
attr_accessor :price
|
|
416
|
-
|
|
417
|
-
# Pricing model for the product
|
|
418
|
-
sig do
|
|
419
|
-
returns(
|
|
420
|
-
T.nilable(
|
|
421
|
-
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::TaggedSymbol
|
|
422
|
-
)
|
|
423
|
-
)
|
|
424
|
-
end
|
|
425
|
-
attr_accessor :pricing_model
|
|
426
|
-
|
|
427
|
-
# Original or regular price before a displayed discount
|
|
428
|
-
sig { returns(T.nilable(Float)) }
|
|
429
|
-
attr_accessor :regular_price
|
|
430
|
-
|
|
431
|
-
# URL to the product page
|
|
432
|
-
sig { returns(T.nilable(String)) }
|
|
433
|
-
attr_accessor :url
|
|
434
|
-
|
|
435
|
-
# The extracted product data, or null if not a product page
|
|
436
|
-
sig do
|
|
437
|
-
params(
|
|
438
|
-
description: String,
|
|
439
|
-
features: T::Array[String],
|
|
440
|
-
images: T::Array[String],
|
|
441
|
-
name: String,
|
|
442
|
-
sku: T.nilable(String),
|
|
443
|
-
tags: T::Array[String],
|
|
444
|
-
target_audience: T::Array[String],
|
|
445
|
-
availability:
|
|
446
|
-
T.nilable(
|
|
447
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability::OrSymbol
|
|
448
|
-
),
|
|
449
|
-
billing_frequency:
|
|
450
|
-
T.nilable(
|
|
451
|
-
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::OrSymbol
|
|
452
|
-
),
|
|
453
|
-
category: T.nilable(String),
|
|
454
|
-
currency: T.nilable(String),
|
|
455
|
-
dimensions: T::Array[String],
|
|
456
|
-
image_url: T.nilable(String),
|
|
457
|
-
price: T.nilable(Float),
|
|
458
|
-
pricing_model:
|
|
459
|
-
T.nilable(
|
|
460
|
-
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::OrSymbol
|
|
461
|
-
),
|
|
462
|
-
regular_price: T.nilable(Float),
|
|
463
|
-
url: T.nilable(String)
|
|
464
|
-
).returns(T.attached_class)
|
|
465
|
-
end
|
|
466
|
-
def self.new(
|
|
467
|
-
# Description of the product
|
|
468
|
-
description:,
|
|
469
|
-
# List of product features
|
|
470
|
-
features:,
|
|
471
|
-
# URLs to product images on the page (up to 7)
|
|
472
|
-
images:,
|
|
473
|
-
# Name of the product
|
|
474
|
-
name:,
|
|
475
|
-
# Stock Keeping Unit (product identifier). Null if no identifier is found.
|
|
476
|
-
sku:,
|
|
477
|
-
# Tags associated with the product
|
|
478
|
-
tags:,
|
|
479
|
-
# Target audience for the product (array of strings)
|
|
480
|
-
target_audience:,
|
|
481
|
-
# Normalized stock or ordering availability
|
|
482
|
-
availability: nil,
|
|
483
|
-
# Billing frequency for the product
|
|
484
|
-
billing_frequency: nil,
|
|
485
|
-
# Category of the product
|
|
486
|
-
category: nil,
|
|
487
|
-
# Currency code for the price (e.g., USD, EUR)
|
|
488
|
-
currency: nil,
|
|
489
|
-
# Dimension statements shown for the product, preserving labels, values, and units
|
|
490
|
-
dimensions: nil,
|
|
491
|
-
# URL to the product image
|
|
492
|
-
image_url: nil,
|
|
493
|
-
# Price of the product
|
|
494
|
-
price: nil,
|
|
495
|
-
# Pricing model for the product
|
|
496
|
-
pricing_model: nil,
|
|
497
|
-
# Original or regular price before a displayed discount
|
|
498
|
-
regular_price: nil,
|
|
499
|
-
# URL to the product page
|
|
500
|
-
url: nil
|
|
501
|
-
)
|
|
502
|
-
end
|
|
503
|
-
|
|
504
|
-
sig do
|
|
505
|
-
override.returns(
|
|
506
|
-
{
|
|
507
|
-
description: String,
|
|
508
|
-
features: T::Array[String],
|
|
509
|
-
images: T::Array[String],
|
|
510
|
-
name: String,
|
|
511
|
-
sku: T.nilable(String),
|
|
512
|
-
tags: T::Array[String],
|
|
513
|
-
target_audience: T::Array[String],
|
|
514
|
-
availability:
|
|
515
|
-
T.nilable(
|
|
516
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
517
|
-
),
|
|
518
|
-
billing_frequency:
|
|
519
|
-
T.nilable(
|
|
520
|
-
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::TaggedSymbol
|
|
521
|
-
),
|
|
522
|
-
category: T.nilable(String),
|
|
523
|
-
currency: T.nilable(String),
|
|
524
|
-
dimensions: T::Array[String],
|
|
525
|
-
image_url: T.nilable(String),
|
|
526
|
-
price: T.nilable(Float),
|
|
527
|
-
pricing_model:
|
|
528
|
-
T.nilable(
|
|
529
|
-
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::TaggedSymbol
|
|
530
|
-
),
|
|
531
|
-
regular_price: T.nilable(Float),
|
|
532
|
-
url: T.nilable(String)
|
|
533
|
-
}
|
|
534
|
-
)
|
|
535
|
-
end
|
|
536
|
-
def to_hash
|
|
537
|
-
end
|
|
538
|
-
|
|
539
|
-
# Normalized stock or ordering availability
|
|
540
|
-
module Availability
|
|
541
|
-
extend ContextDev::Internal::Type::Enum
|
|
542
|
-
|
|
543
|
-
TaggedSymbol =
|
|
544
|
-
T.type_alias do
|
|
545
|
-
T.all(
|
|
546
|
-
Symbol,
|
|
547
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability
|
|
548
|
-
)
|
|
549
|
-
end
|
|
550
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
551
|
-
|
|
552
|
-
IN_STOCK =
|
|
553
|
-
T.let(
|
|
554
|
-
:in_stock,
|
|
555
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
556
|
-
)
|
|
557
|
-
OUT_OF_STOCK =
|
|
558
|
-
T.let(
|
|
559
|
-
:out_of_stock,
|
|
560
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
561
|
-
)
|
|
562
|
-
LIMITED_AVAILABILITY =
|
|
563
|
-
T.let(
|
|
564
|
-
:limited_availability,
|
|
565
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
566
|
-
)
|
|
567
|
-
PREORDER =
|
|
568
|
-
T.let(
|
|
569
|
-
:preorder,
|
|
570
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
571
|
-
)
|
|
572
|
-
BACKORDER =
|
|
573
|
-
T.let(
|
|
574
|
-
:backorder,
|
|
575
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
576
|
-
)
|
|
577
|
-
MADE_TO_ORDER =
|
|
578
|
-
T.let(
|
|
579
|
-
:made_to_order,
|
|
580
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
581
|
-
)
|
|
582
|
-
DISCONTINUED =
|
|
583
|
-
T.let(
|
|
584
|
-
:discontinued,
|
|
585
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
586
|
-
)
|
|
587
|
-
|
|
588
|
-
sig do
|
|
589
|
-
override.returns(
|
|
590
|
-
T::Array[
|
|
591
|
-
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
592
|
-
]
|
|
593
|
-
)
|
|
594
|
-
end
|
|
595
|
-
def self.values
|
|
596
|
-
end
|
|
597
|
-
end
|
|
598
|
-
|
|
599
|
-
# Billing frequency for the product
|
|
600
|
-
module BillingFrequency
|
|
601
|
-
extend ContextDev::Internal::Type::Enum
|
|
602
|
-
|
|
603
|
-
TaggedSymbol =
|
|
604
|
-
T.type_alias do
|
|
605
|
-
T.all(
|
|
606
|
-
Symbol,
|
|
607
|
-
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency
|
|
608
|
-
)
|
|
609
|
-
end
|
|
610
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
611
|
-
|
|
612
|
-
MONTHLY =
|
|
613
|
-
T.let(
|
|
614
|
-
:monthly,
|
|
615
|
-
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::TaggedSymbol
|
|
616
|
-
)
|
|
617
|
-
YEARLY =
|
|
618
|
-
T.let(
|
|
619
|
-
:yearly,
|
|
620
|
-
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::TaggedSymbol
|
|
621
|
-
)
|
|
622
|
-
ONE_TIME =
|
|
623
|
-
T.let(
|
|
624
|
-
:one_time,
|
|
625
|
-
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::TaggedSymbol
|
|
626
|
-
)
|
|
627
|
-
USAGE_BASED =
|
|
628
|
-
T.let(
|
|
629
|
-
:usage_based,
|
|
630
|
-
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::TaggedSymbol
|
|
631
|
-
)
|
|
632
|
-
|
|
633
|
-
sig do
|
|
634
|
-
override.returns(
|
|
635
|
-
T::Array[
|
|
636
|
-
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::TaggedSymbol
|
|
637
|
-
]
|
|
638
|
-
)
|
|
639
|
-
end
|
|
640
|
-
def self.values
|
|
641
|
-
end
|
|
642
|
-
end
|
|
643
|
-
|
|
644
|
-
# Pricing model for the product
|
|
645
|
-
module PricingModel
|
|
646
|
-
extend ContextDev::Internal::Type::Enum
|
|
647
|
-
|
|
648
|
-
TaggedSymbol =
|
|
649
|
-
T.type_alias do
|
|
650
|
-
T.all(
|
|
651
|
-
Symbol,
|
|
652
|
-
ContextDev::Models::AIExtractProductResponse::Product::PricingModel
|
|
653
|
-
)
|
|
654
|
-
end
|
|
655
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
656
|
-
|
|
657
|
-
PER_SEAT =
|
|
658
|
-
T.let(
|
|
659
|
-
:per_seat,
|
|
660
|
-
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::TaggedSymbol
|
|
661
|
-
)
|
|
662
|
-
FLAT =
|
|
663
|
-
T.let(
|
|
664
|
-
:flat,
|
|
665
|
-
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::TaggedSymbol
|
|
666
|
-
)
|
|
667
|
-
TIERED =
|
|
668
|
-
T.let(
|
|
669
|
-
:tiered,
|
|
670
|
-
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::TaggedSymbol
|
|
671
|
-
)
|
|
672
|
-
FREEMIUM =
|
|
673
|
-
T.let(
|
|
674
|
-
:freemium,
|
|
675
|
-
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::TaggedSymbol
|
|
676
|
-
)
|
|
677
|
-
CUSTOM =
|
|
678
|
-
T.let(
|
|
679
|
-
:custom,
|
|
680
|
-
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::TaggedSymbol
|
|
681
|
-
)
|
|
682
|
-
|
|
683
|
-
sig do
|
|
684
|
-
override.returns(
|
|
685
|
-
T::Array[
|
|
686
|
-
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::TaggedSymbol
|
|
687
|
-
]
|
|
688
|
-
)
|
|
689
|
-
end
|
|
690
|
-
def self.values
|
|
691
|
-
end
|
|
692
|
-
end
|
|
693
|
-
end
|
|
694
|
-
end
|
|
695
|
-
end
|
|
696
|
-
end
|