context.dev 2.11.0 → 2.13.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 +18 -0
- data/README.md +4 -4
- data/lib/context_dev/models/ai_extract_product_response.rb +102 -2
- data/lib/context_dev/models/ai_extract_products_response.rb +102 -2
- data/lib/context_dev/models/batch_get_results_response.rb +56 -1
- data/lib/context_dev/models/batch_submit_response.rb +54 -1
- data/lib/context_dev/models/brand_retrieve_response.rb +58 -3
- data/lib/context_dev/models/brand_retrieve_simplified_response.rb +55 -1
- data/lib/context_dev/models/news_search_params.rb +1 -0
- data/lib/context_dev/models/web_extract_fonts_response.rb +54 -1
- data/lib/context_dev/models/web_extract_params.rb +169 -6
- data/lib/context_dev/models/web_extract_response.rb +139 -2
- data/lib/context_dev/models/web_extract_styleguide_response.rb +55 -1
- data/lib/context_dev/models/web_screenshot_response.rb +54 -1
- data/lib/context_dev/models/web_search_response.rb +54 -1
- data/lib/context_dev/models/web_web_crawl_md_params.rb +7 -5
- data/lib/context_dev/models/web_web_crawl_md_response.rb +54 -1
- data/lib/context_dev/models/web_web_scrape_html_params.rb +99 -3
- data/lib/context_dev/models/web_web_scrape_html_response.rb +54 -1
- data/lib/context_dev/models/web_web_scrape_images_params.rb +99 -3
- data/lib/context_dev/models/web_web_scrape_images_response.rb +139 -1
- data/lib/context_dev/models/web_web_scrape_md_params.rb +99 -3
- data/lib/context_dev/models/web_web_scrape_md_response.rb +54 -1
- 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 +218 -0
- data/rbi/context_dev/models/ai_extract_products_response.rbi +218 -0
- data/rbi/context_dev/models/batch_get_results_response.rbi +121 -0
- data/rbi/context_dev/models/batch_submit_response.rbi +117 -0
- data/rbi/context_dev/models/brand_retrieve_response.rbi +123 -2
- data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +121 -0
- data/rbi/context_dev/models/news_search_params.rbi +5 -0
- data/rbi/context_dev/models/web_extract_fonts_response.rbi +119 -0
- data/rbi/context_dev/models/web_extract_params.rbi +353 -8
- data/rbi/context_dev/models/web_extract_response.rbi +289 -3
- data/rbi/context_dev/models/web_extract_styleguide_response.rbi +119 -0
- data/rbi/context_dev/models/web_screenshot_response.rbi +117 -0
- data/rbi/context_dev/models/web_search_response.rbi +117 -0
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +10 -6
- data/rbi/context_dev/models/web_web_crawl_md_response.rbi +117 -0
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +218 -4
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +119 -0
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +218 -4
- data/rbi/context_dev/models/web_web_scrape_images_response.rbi +288 -0
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +218 -4
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +117 -0
- data/rbi/context_dev/resources/web.rbi +31 -10
- data/sig/context_dev/models/ai_extract_product_response.rbs +79 -0
- data/sig/context_dev/models/ai_extract_products_response.rbs +79 -0
- data/sig/context_dev/models/batch_get_results_response.rbs +39 -0
- data/sig/context_dev/models/batch_submit_response.rbs +39 -0
- data/sig/context_dev/models/brand_retrieve_response.rbs +39 -0
- data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +39 -0
- data/sig/context_dev/models/news_search_params.rbs +2 -0
- data/sig/context_dev/models/web_extract_fonts_response.rbs +39 -0
- data/sig/context_dev/models/web_extract_params.rbs +117 -0
- data/sig/context_dev/models/web_extract_response.rbs +120 -3
- data/sig/context_dev/models/web_extract_styleguide_response.rbs +39 -0
- data/sig/context_dev/models/web_screenshot_response.rbs +39 -0
- data/sig/context_dev/models/web_search_response.rbs +39 -0
- data/sig/context_dev/models/web_web_crawl_md_response.rbs +39 -0
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +74 -0
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +39 -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 +117 -0
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +74 -0
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +39 -0
- data/sig/context_dev/resources/web.rbs +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b7dd8a479baecbe8b5b5a3f70afc6b36ac9a4a6fc601efaed7975f7fdd5f0f8d
|
|
4
|
+
data.tar.gz: 24b81ca370c0fa65982b4fd6e1ef32ef8b4c9095ba26e6190848dd3551946e0f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7b014eb4f206b0e8629ef80c8a7ac817ec115694666d631438a2637266cb4cb5abde270c126afab870698c78d24211feb02f1350494816c5a99939cb07b9243
|
|
7
|
+
data.tar.gz: e2923cfd44f29539153438f72e73d7d1543bf85893731fe152afe3bdfdd1b93ea36e4407f69b7998a757c1820d9c8c8d0838539a1b14d522cec63066ea1ac26e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.13.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.12.0...v2.13.0) (2026-08-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* initial stlc build ([bf63ae0](https://github.com/context-dot-dev/context-ruby-sdk/commit/bf63ae0769d9756a0b36480fd0c2d05ae939997c))
|
|
9
|
+
|
|
10
|
+
## 2.12.0 (2026-08-23)
|
|
11
|
+
|
|
12
|
+
Full Changelog: [v2.11.0...v2.12.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.11.0...v2.12.0)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **api:** api update ([f7adbd6](https://github.com/context-dot-dev/context-ruby-sdk/commit/f7adbd63407b697245019ea9483dc090de9ba0ff))
|
|
17
|
+
* **api:** api update ([c26b304](https://github.com/context-dot-dev/context-ruby-sdk/commit/c26b30411607dcc2eaad14962d582f4588f5193f))
|
|
18
|
+
* **api:** api update ([852a96e](https://github.com/context-dot-dev/context-ruby-sdk/commit/852a96e58dab7e6fef53af10093119ffc237f52e))
|
|
19
|
+
* **api:** api update ([c16beb5](https://github.com/context-dot-dev/context-ruby-sdk/commit/c16beb55d66977611c58711b489132f347ab2c96))
|
|
20
|
+
|
|
3
21
|
## 2.11.0 (2026-08-18)
|
|
4
22
|
|
|
5
23
|
Full Changelog: [v2.10.0...v2.11.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.10.0...v2.11.0)
|
data/README.md
CHANGED
|
@@ -8,8 +8,8 @@ It is generated with [Stainless](https://www.stainless.com/).
|
|
|
8
8
|
|
|
9
9
|
Use the Context Dev MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
10
10
|
|
|
11
|
-
[](https://cursor.com/en-US/install-mcp?name=context.dev-mcp&config=
|
|
12
|
-
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22context.dev-mcp%22%2C%
|
|
11
|
+
[](https://cursor.com/en-US/install-mcp?name=context.dev-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImNvbnRleHQuZGV2LW1jcCJdLCJlbnYiOnsiQ09OVEVYVF9ERVZfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)
|
|
12
|
+
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22context.dev-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22context.dev-mcp%22%5D%2C%22env%22%3A%7B%22CONTEXT_DEV_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)
|
|
13
13
|
|
|
14
14
|
> Note: You may need to set environment variables in your MCP client.
|
|
15
15
|
|
|
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
26
26
|
<!-- x-release-please-start-version -->
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
|
-
gem "context.dev", "~> 2.
|
|
29
|
+
gem "context.dev", "~> 2.13.0"
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- x-release-please-end -->
|
|
@@ -43,7 +43,7 @@ context_dev = ContextDev::Client.new(
|
|
|
43
43
|
|
|
44
44
|
brand = context_dev.brand.retrieve(body: {domain: "stripe.com", type: "by_domain"})
|
|
45
45
|
|
|
46
|
-
puts(brand.
|
|
46
|
+
puts(brand.cache_metadata)
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
### Handling errors
|
|
@@ -4,6 +4,14 @@ module ContextDev
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see ContextDev::Resources::AI#extract_product
|
|
6
6
|
class AIExtractProductResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute cache_metadata
|
|
8
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
9
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
10
|
+
# oldest contributing hit.
|
|
11
|
+
#
|
|
12
|
+
# @return [ContextDev::Models::AIExtractProductResponse::CacheMetadata]
|
|
13
|
+
required :cache_metadata, -> { ContextDev::Models::AIExtractProductResponse::CacheMetadata }
|
|
14
|
+
|
|
7
15
|
# @!attribute is_product_page
|
|
8
16
|
# Whether the given URL is a product detail page
|
|
9
17
|
#
|
|
@@ -29,10 +37,12 @@ module ContextDev
|
|
|
29
37
|
# @return [ContextDev::Models::AIExtractProductResponse::Product, nil]
|
|
30
38
|
optional :product, -> { ContextDev::Models::AIExtractProductResponse::Product }, nil?: true
|
|
31
39
|
|
|
32
|
-
# @!method initialize(is_product_page: nil, key_metadata: nil, platform: nil, product: nil)
|
|
40
|
+
# @!method initialize(cache_metadata:, is_product_page: nil, key_metadata: nil, platform: nil, product: nil)
|
|
33
41
|
# Some parameter documentations has been truncated, see
|
|
34
42
|
# {ContextDev::Models::AIExtractProductResponse} for more details.
|
|
35
43
|
#
|
|
44
|
+
# @param cache_metadata [ContextDev::Models::AIExtractProductResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
45
|
+
#
|
|
36
46
|
# @param is_product_page [Boolean] Whether the given URL is a product detail page
|
|
37
47
|
#
|
|
38
48
|
# @param key_metadata [ContextDev::Models::AIExtractProductResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when
|
|
@@ -41,6 +51,49 @@ module ContextDev
|
|
|
41
51
|
#
|
|
42
52
|
# @param product [ContextDev::Models::AIExtractProductResponse::Product, nil] The extracted product data, or null if not a product page
|
|
43
53
|
|
|
54
|
+
# @see ContextDev::Models::AIExtractProductResponse#cache_metadata
|
|
55
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
56
|
+
# @!attribute age_ms
|
|
57
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
58
|
+
#
|
|
59
|
+
# @return [Integer]
|
|
60
|
+
required :age_ms, Integer
|
|
61
|
+
|
|
62
|
+
# @!attribute status
|
|
63
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
64
|
+
# zero-data-retention cache bypass.
|
|
65
|
+
#
|
|
66
|
+
# @return [Symbol, ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status]
|
|
67
|
+
required :status, enum: -> { ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status }
|
|
68
|
+
|
|
69
|
+
# @!method initialize(age_ms:, status:)
|
|
70
|
+
# Some parameter documentations has been truncated, see
|
|
71
|
+
# {ContextDev::Models::AIExtractProductResponse::CacheMetadata} for more details.
|
|
72
|
+
#
|
|
73
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
74
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
75
|
+
# oldest contributing hit.
|
|
76
|
+
#
|
|
77
|
+
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
78
|
+
#
|
|
79
|
+
# @param status [Symbol, ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
80
|
+
|
|
81
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
82
|
+
# zero-data-retention cache bypass.
|
|
83
|
+
#
|
|
84
|
+
# @see ContextDev::Models::AIExtractProductResponse::CacheMetadata#status
|
|
85
|
+
module Status
|
|
86
|
+
extend ContextDev::Internal::Type::Enum
|
|
87
|
+
|
|
88
|
+
HIT = :hit
|
|
89
|
+
MISS = :miss
|
|
90
|
+
ZDR = :zdr
|
|
91
|
+
|
|
92
|
+
# @!method self.values
|
|
93
|
+
# @return [Array<Symbol>]
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
44
97
|
# @see ContextDev::Models::AIExtractProductResponse#key_metadata
|
|
45
98
|
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
46
99
|
# @!attribute credits_consumed
|
|
@@ -123,6 +176,14 @@ module ContextDev
|
|
|
123
176
|
# @return [Array<String>]
|
|
124
177
|
required :target_audience, ContextDev::Internal::Type::ArrayOf[String]
|
|
125
178
|
|
|
179
|
+
# @!attribute availability
|
|
180
|
+
# Normalized stock or ordering availability
|
|
181
|
+
#
|
|
182
|
+
# @return [Symbol, ContextDev::Models::AIExtractProductResponse::Product::Availability, nil]
|
|
183
|
+
optional :availability,
|
|
184
|
+
enum: -> { ContextDev::Models::AIExtractProductResponse::Product::Availability },
|
|
185
|
+
nil?: true
|
|
186
|
+
|
|
126
187
|
# @!attribute billing_frequency
|
|
127
188
|
# Billing frequency for the product
|
|
128
189
|
#
|
|
@@ -143,6 +204,12 @@ module ContextDev
|
|
|
143
204
|
# @return [String, nil]
|
|
144
205
|
optional :currency, String, nil?: true
|
|
145
206
|
|
|
207
|
+
# @!attribute dimensions
|
|
208
|
+
# Dimension statements shown for the product, preserving labels, values, and units
|
|
209
|
+
#
|
|
210
|
+
# @return [Array<String>, nil]
|
|
211
|
+
optional :dimensions, ContextDev::Internal::Type::ArrayOf[String]
|
|
212
|
+
|
|
146
213
|
# @!attribute image_url
|
|
147
214
|
# URL to the product image
|
|
148
215
|
#
|
|
@@ -163,13 +230,22 @@ module ContextDev
|
|
|
163
230
|
enum: -> { ContextDev::Models::AIExtractProductResponse::Product::PricingModel },
|
|
164
231
|
nil?: true
|
|
165
232
|
|
|
233
|
+
# @!attribute regular_price
|
|
234
|
+
# Original or regular price before a displayed discount
|
|
235
|
+
#
|
|
236
|
+
# @return [Float, nil]
|
|
237
|
+
optional :regular_price, Float, nil?: true
|
|
238
|
+
|
|
166
239
|
# @!attribute url
|
|
167
240
|
# URL to the product page
|
|
168
241
|
#
|
|
169
242
|
# @return [String, nil]
|
|
170
243
|
optional :url, String, nil?: true
|
|
171
244
|
|
|
172
|
-
# @!method initialize(description:, features:, images:, name:, sku:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil)
|
|
245
|
+
# @!method initialize(description:, features:, images:, name:, sku:, tags:, target_audience:, availability: nil, billing_frequency: nil, category: nil, currency: nil, dimensions: nil, image_url: nil, price: nil, pricing_model: nil, regular_price: nil, url: nil)
|
|
246
|
+
# Some parameter documentations has been truncated, see
|
|
247
|
+
# {ContextDev::Models::AIExtractProductResponse::Product} for more details.
|
|
248
|
+
#
|
|
173
249
|
# The extracted product data, or null if not a product page
|
|
174
250
|
#
|
|
175
251
|
# @param description [String] Description of the product
|
|
@@ -186,20 +262,44 @@ module ContextDev
|
|
|
186
262
|
#
|
|
187
263
|
# @param target_audience [Array<String>] Target audience for the product (array of strings)
|
|
188
264
|
#
|
|
265
|
+
# @param availability [Symbol, ContextDev::Models::AIExtractProductResponse::Product::Availability, nil] Normalized stock or ordering availability
|
|
266
|
+
#
|
|
189
267
|
# @param billing_frequency [Symbol, ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency, nil] Billing frequency for the product
|
|
190
268
|
#
|
|
191
269
|
# @param category [String, nil] Category of the product
|
|
192
270
|
#
|
|
193
271
|
# @param currency [String, nil] Currency code for the price (e.g., USD, EUR)
|
|
194
272
|
#
|
|
273
|
+
# @param dimensions [Array<String>] Dimension statements shown for the product, preserving labels, values, and units
|
|
274
|
+
#
|
|
195
275
|
# @param image_url [String, nil] URL to the product image
|
|
196
276
|
#
|
|
197
277
|
# @param price [Float, nil] Price of the product
|
|
198
278
|
#
|
|
199
279
|
# @param pricing_model [Symbol, ContextDev::Models::AIExtractProductResponse::Product::PricingModel, nil] Pricing model for the product
|
|
200
280
|
#
|
|
281
|
+
# @param regular_price [Float, nil] Original or regular price before a displayed discount
|
|
282
|
+
#
|
|
201
283
|
# @param url [String, nil] URL to the product page
|
|
202
284
|
|
|
285
|
+
# Normalized stock or ordering availability
|
|
286
|
+
#
|
|
287
|
+
# @see ContextDev::Models::AIExtractProductResponse::Product#availability
|
|
288
|
+
module Availability
|
|
289
|
+
extend ContextDev::Internal::Type::Enum
|
|
290
|
+
|
|
291
|
+
IN_STOCK = :in_stock
|
|
292
|
+
OUT_OF_STOCK = :out_of_stock
|
|
293
|
+
LIMITED_AVAILABILITY = :limited_availability
|
|
294
|
+
PREORDER = :preorder
|
|
295
|
+
BACKORDER = :backorder
|
|
296
|
+
MADE_TO_ORDER = :made_to_order
|
|
297
|
+
DISCONTINUED = :discontinued
|
|
298
|
+
|
|
299
|
+
# @!method self.values
|
|
300
|
+
# @return [Array<Symbol>]
|
|
301
|
+
end
|
|
302
|
+
|
|
203
303
|
# Billing frequency for the product
|
|
204
304
|
#
|
|
205
305
|
# @see ContextDev::Models::AIExtractProductResponse::Product#billing_frequency
|
|
@@ -4,6 +4,14 @@ module ContextDev
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see ContextDev::Resources::AI#extract_products
|
|
6
6
|
class AIExtractProductsResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute cache_metadata
|
|
8
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
9
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
10
|
+
# oldest contributing hit.
|
|
11
|
+
#
|
|
12
|
+
# @return [ContextDev::Models::AIExtractProductsResponse::CacheMetadata]
|
|
13
|
+
required :cache_metadata, -> { ContextDev::Models::AIExtractProductsResponse::CacheMetadata }
|
|
14
|
+
|
|
7
15
|
# @!attribute key_metadata
|
|
8
16
|
# Metadata about the API key used for the request. Included in every response
|
|
9
17
|
# whenever a valid API key is provided, even when the response status is not 200.
|
|
@@ -18,14 +26,59 @@ module ContextDev
|
|
|
18
26
|
optional :products,
|
|
19
27
|
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::AIExtractProductsResponse::Product] }
|
|
20
28
|
|
|
21
|
-
# @!method initialize(key_metadata: nil, products: nil)
|
|
29
|
+
# @!method initialize(cache_metadata:, key_metadata: nil, products: nil)
|
|
22
30
|
# Some parameter documentations has been truncated, see
|
|
23
31
|
# {ContextDev::Models::AIExtractProductsResponse} for more details.
|
|
24
32
|
#
|
|
33
|
+
# @param cache_metadata [ContextDev::Models::AIExtractProductsResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
34
|
+
#
|
|
25
35
|
# @param key_metadata [ContextDev::Models::AIExtractProductsResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when
|
|
26
36
|
#
|
|
27
37
|
# @param products [Array<ContextDev::Models::AIExtractProductsResponse::Product>] Array of products extracted from the website
|
|
28
38
|
|
|
39
|
+
# @see ContextDev::Models::AIExtractProductsResponse#cache_metadata
|
|
40
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
41
|
+
# @!attribute age_ms
|
|
42
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
43
|
+
#
|
|
44
|
+
# @return [Integer]
|
|
45
|
+
required :age_ms, Integer
|
|
46
|
+
|
|
47
|
+
# @!attribute status
|
|
48
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
49
|
+
# zero-data-retention cache bypass.
|
|
50
|
+
#
|
|
51
|
+
# @return [Symbol, ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status]
|
|
52
|
+
required :status, enum: -> { ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status }
|
|
53
|
+
|
|
54
|
+
# @!method initialize(age_ms:, status:)
|
|
55
|
+
# Some parameter documentations has been truncated, see
|
|
56
|
+
# {ContextDev::Models::AIExtractProductsResponse::CacheMetadata} for more details.
|
|
57
|
+
#
|
|
58
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
59
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
60
|
+
# oldest contributing hit.
|
|
61
|
+
#
|
|
62
|
+
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
63
|
+
#
|
|
64
|
+
# @param status [Symbol, ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
65
|
+
|
|
66
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
67
|
+
# zero-data-retention cache bypass.
|
|
68
|
+
#
|
|
69
|
+
# @see ContextDev::Models::AIExtractProductsResponse::CacheMetadata#status
|
|
70
|
+
module Status
|
|
71
|
+
extend ContextDev::Internal::Type::Enum
|
|
72
|
+
|
|
73
|
+
HIT = :hit
|
|
74
|
+
MISS = :miss
|
|
75
|
+
ZDR = :zdr
|
|
76
|
+
|
|
77
|
+
# @!method self.values
|
|
78
|
+
# @return [Array<Symbol>]
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
29
82
|
# @see ContextDev::Models::AIExtractProductsResponse#key_metadata
|
|
30
83
|
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
31
84
|
# @!attribute credits_consumed
|
|
@@ -92,6 +145,14 @@ module ContextDev
|
|
|
92
145
|
# @return [Array<String>]
|
|
93
146
|
required :target_audience, ContextDev::Internal::Type::ArrayOf[String]
|
|
94
147
|
|
|
148
|
+
# @!attribute availability
|
|
149
|
+
# Normalized stock or ordering availability
|
|
150
|
+
#
|
|
151
|
+
# @return [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::Availability, nil]
|
|
152
|
+
optional :availability,
|
|
153
|
+
enum: -> { ContextDev::Models::AIExtractProductsResponse::Product::Availability },
|
|
154
|
+
nil?: true
|
|
155
|
+
|
|
95
156
|
# @!attribute billing_frequency
|
|
96
157
|
# Billing frequency for the product
|
|
97
158
|
#
|
|
@@ -112,6 +173,12 @@ module ContextDev
|
|
|
112
173
|
# @return [String, nil]
|
|
113
174
|
optional :currency, String, nil?: true
|
|
114
175
|
|
|
176
|
+
# @!attribute dimensions
|
|
177
|
+
# Dimension statements shown for the product, preserving labels, values, and units
|
|
178
|
+
#
|
|
179
|
+
# @return [Array<String>, nil]
|
|
180
|
+
optional :dimensions, ContextDev::Internal::Type::ArrayOf[String]
|
|
181
|
+
|
|
115
182
|
# @!attribute image_url
|
|
116
183
|
# URL to the product image
|
|
117
184
|
#
|
|
@@ -132,13 +199,22 @@ module ContextDev
|
|
|
132
199
|
enum: -> { ContextDev::Models::AIExtractProductsResponse::Product::PricingModel },
|
|
133
200
|
nil?: true
|
|
134
201
|
|
|
202
|
+
# @!attribute regular_price
|
|
203
|
+
# Original or regular price before a displayed discount
|
|
204
|
+
#
|
|
205
|
+
# @return [Float, nil]
|
|
206
|
+
optional :regular_price, Float, nil?: true
|
|
207
|
+
|
|
135
208
|
# @!attribute url
|
|
136
209
|
# URL to the product page
|
|
137
210
|
#
|
|
138
211
|
# @return [String, nil]
|
|
139
212
|
optional :url, String, nil?: true
|
|
140
213
|
|
|
141
|
-
# @!method initialize(description:, features:, images:, name:, sku:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil)
|
|
214
|
+
# @!method initialize(description:, features:, images:, name:, sku:, tags:, target_audience:, availability: nil, billing_frequency: nil, category: nil, currency: nil, dimensions: nil, image_url: nil, price: nil, pricing_model: nil, regular_price: nil, url: nil)
|
|
215
|
+
# Some parameter documentations has been truncated, see
|
|
216
|
+
# {ContextDev::Models::AIExtractProductsResponse::Product} for more details.
|
|
217
|
+
#
|
|
142
218
|
# @param description [String] Description of the product
|
|
143
219
|
#
|
|
144
220
|
# @param features [Array<String>] List of product features
|
|
@@ -153,20 +229,44 @@ module ContextDev
|
|
|
153
229
|
#
|
|
154
230
|
# @param target_audience [Array<String>] Target audience for the product (array of strings)
|
|
155
231
|
#
|
|
232
|
+
# @param availability [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::Availability, nil] Normalized stock or ordering availability
|
|
233
|
+
#
|
|
156
234
|
# @param billing_frequency [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::BillingFrequency, nil] Billing frequency for the product
|
|
157
235
|
#
|
|
158
236
|
# @param category [String, nil] Category of the product
|
|
159
237
|
#
|
|
160
238
|
# @param currency [String, nil] Currency code for the price (e.g., USD, EUR)
|
|
161
239
|
#
|
|
240
|
+
# @param dimensions [Array<String>] Dimension statements shown for the product, preserving labels, values, and units
|
|
241
|
+
#
|
|
162
242
|
# @param image_url [String, nil] URL to the product image
|
|
163
243
|
#
|
|
164
244
|
# @param price [Float, nil] Price of the product
|
|
165
245
|
#
|
|
166
246
|
# @param pricing_model [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::PricingModel, nil] Pricing model for the product
|
|
167
247
|
#
|
|
248
|
+
# @param regular_price [Float, nil] Original or regular price before a displayed discount
|
|
249
|
+
#
|
|
168
250
|
# @param url [String, nil] URL to the product page
|
|
169
251
|
|
|
252
|
+
# Normalized stock or ordering availability
|
|
253
|
+
#
|
|
254
|
+
# @see ContextDev::Models::AIExtractProductsResponse::Product#availability
|
|
255
|
+
module Availability
|
|
256
|
+
extend ContextDev::Internal::Type::Enum
|
|
257
|
+
|
|
258
|
+
IN_STOCK = :in_stock
|
|
259
|
+
OUT_OF_STOCK = :out_of_stock
|
|
260
|
+
LIMITED_AVAILABILITY = :limited_availability
|
|
261
|
+
PREORDER = :preorder
|
|
262
|
+
BACKORDER = :backorder
|
|
263
|
+
MADE_TO_ORDER = :made_to_order
|
|
264
|
+
DISCONTINUED = :discontinued
|
|
265
|
+
|
|
266
|
+
# @!method self.values
|
|
267
|
+
# @return [Array<Symbol>]
|
|
268
|
+
end
|
|
269
|
+
|
|
170
270
|
# Billing frequency for the product
|
|
171
271
|
#
|
|
172
272
|
# @see ContextDev::Models::AIExtractProductsResponse::Product#billing_frequency
|
|
@@ -55,6 +55,14 @@ module ContextDev
|
|
|
55
55
|
variant :error, -> { ContextDev::Models::BatchGetResultsResponse::Data::Error }
|
|
56
56
|
|
|
57
57
|
class Ok < ContextDev::Internal::Type::BaseModel
|
|
58
|
+
# @!attribute cache_metadata
|
|
59
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
60
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
61
|
+
# oldest contributing hit.
|
|
62
|
+
#
|
|
63
|
+
# @return [ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata]
|
|
64
|
+
required :cache_metadata, -> { ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata }
|
|
65
|
+
|
|
58
66
|
# @!attribute final_url
|
|
59
67
|
# URL the content was read from, after redirects.
|
|
60
68
|
#
|
|
@@ -117,12 +125,14 @@ module ContextDev
|
|
|
117
125
|
# @return [Integer, nil]
|
|
118
126
|
optional :ocr_pages, Integer
|
|
119
127
|
|
|
120
|
-
# @!method initialize(final_url:, http_status:, metadata:, url:, html: nil, item_id: nil, markdown: nil, meta: nil, ocr_pages: nil, status: :ok)
|
|
128
|
+
# @!method initialize(cache_metadata:, final_url:, http_status:, metadata:, url:, html: nil, item_id: nil, markdown: nil, meta: nil, ocr_pages: nil, status: :ok)
|
|
121
129
|
# Some parameter documentations has been truncated, see
|
|
122
130
|
# {ContextDev::Models::BatchGetResultsResponse::Data::Ok} for more details.
|
|
123
131
|
#
|
|
124
132
|
# A page the batch fetched successfully.
|
|
125
133
|
#
|
|
134
|
+
# @param cache_metadata [ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
135
|
+
#
|
|
126
136
|
# @param final_url [String] URL the content was read from, after redirects.
|
|
127
137
|
#
|
|
128
138
|
# @param http_status [Integer, nil] HTTP status of the final response, when known.
|
|
@@ -143,6 +153,51 @@ module ContextDev
|
|
|
143
153
|
#
|
|
144
154
|
# @param status [Symbol, :ok] The page was scraped.
|
|
145
155
|
|
|
156
|
+
# @see ContextDev::Models::BatchGetResultsResponse::Data::Ok#cache_metadata
|
|
157
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
158
|
+
# @!attribute age_ms
|
|
159
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
160
|
+
#
|
|
161
|
+
# @return [Integer]
|
|
162
|
+
required :age_ms, Integer
|
|
163
|
+
|
|
164
|
+
# @!attribute status
|
|
165
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
166
|
+
# zero-data-retention cache bypass.
|
|
167
|
+
#
|
|
168
|
+
# @return [Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata::Status]
|
|
169
|
+
required :status,
|
|
170
|
+
enum: -> { ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata::Status }
|
|
171
|
+
|
|
172
|
+
# @!method initialize(age_ms:, status:)
|
|
173
|
+
# Some parameter documentations has been truncated, see
|
|
174
|
+
# {ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata} for more
|
|
175
|
+
# details.
|
|
176
|
+
#
|
|
177
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
178
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
179
|
+
# oldest contributing hit.
|
|
180
|
+
#
|
|
181
|
+
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
182
|
+
#
|
|
183
|
+
# @param status [Symbol, ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
184
|
+
|
|
185
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
186
|
+
# zero-data-retention cache bypass.
|
|
187
|
+
#
|
|
188
|
+
# @see ContextDev::Models::BatchGetResultsResponse::Data::Ok::CacheMetadata#status
|
|
189
|
+
module Status
|
|
190
|
+
extend ContextDev::Internal::Type::Enum
|
|
191
|
+
|
|
192
|
+
HIT = :hit
|
|
193
|
+
MISS = :miss
|
|
194
|
+
ZDR = :zdr
|
|
195
|
+
|
|
196
|
+
# @!method self.values
|
|
197
|
+
# @return [Array<Symbol>]
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
146
201
|
# @see ContextDev::Models::BatchGetResultsResponse::Data::Ok#metadata
|
|
147
202
|
class Metadata < ContextDev::Internal::Type::BaseModel
|
|
148
203
|
# @!attribute final_url
|
|
@@ -10,6 +10,14 @@ module ContextDev
|
|
|
10
10
|
# @return [String]
|
|
11
11
|
required :id, String
|
|
12
12
|
|
|
13
|
+
# @!attribute cache_metadata
|
|
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
|
+
#
|
|
18
|
+
# @return [ContextDev::Models::BatchSubmitResponse::CacheMetadata]
|
|
19
|
+
required :cache_metadata, -> { ContextDev::Models::BatchSubmitResponse::CacheMetadata }
|
|
20
|
+
|
|
13
21
|
# @!attribute crawl
|
|
14
22
|
# The crawl controls as submitted, so the limits requested can be compared against
|
|
15
23
|
# what the crawl reached.
|
|
@@ -79,12 +87,14 @@ module ContextDev
|
|
|
79
87
|
# @return [String, nil]
|
|
80
88
|
optional :webhook_secret, String
|
|
81
89
|
|
|
82
|
-
# @!method initialize(id:, crawl:, created_at:, credits:, format_:, input:, invalid_urls:, mode:, status:, tags:, key_metadata: nil, webhook_secret: nil)
|
|
90
|
+
# @!method initialize(id:, cache_metadata:, crawl:, created_at:, credits:, format_:, input:, invalid_urls:, mode:, status:, tags:, key_metadata: nil, webhook_secret: nil)
|
|
83
91
|
# Some parameter documentations has been truncated, see
|
|
84
92
|
# {ContextDev::Models::BatchSubmitResponse} for more details.
|
|
85
93
|
#
|
|
86
94
|
# @param id [String] Batch ID. Poll GET /batch/{batch_id} with it.
|
|
87
95
|
#
|
|
96
|
+
# @param cache_metadata [ContextDev::Models::BatchSubmitResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
97
|
+
#
|
|
88
98
|
# @param crawl [ContextDev::Models::CrawlControls, nil] The crawl controls as submitted, so the limits requested can be compared against
|
|
89
99
|
#
|
|
90
100
|
# @param created_at [String] When the batch was created.
|
|
@@ -107,6 +117,49 @@ module ContextDev
|
|
|
107
117
|
#
|
|
108
118
|
# @param webhook_secret [String] Signing secret for the completion webhook, returned only here and never again. S
|
|
109
119
|
|
|
120
|
+
# @see ContextDev::Models::BatchSubmitResponse#cache_metadata
|
|
121
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
122
|
+
# @!attribute age_ms
|
|
123
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
124
|
+
#
|
|
125
|
+
# @return [Integer]
|
|
126
|
+
required :age_ms, Integer
|
|
127
|
+
|
|
128
|
+
# @!attribute status
|
|
129
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
130
|
+
# zero-data-retention cache bypass.
|
|
131
|
+
#
|
|
132
|
+
# @return [Symbol, ContextDev::Models::BatchSubmitResponse::CacheMetadata::Status]
|
|
133
|
+
required :status, enum: -> { ContextDev::Models::BatchSubmitResponse::CacheMetadata::Status }
|
|
134
|
+
|
|
135
|
+
# @!method initialize(age_ms:, status:)
|
|
136
|
+
# Some parameter documentations has been truncated, see
|
|
137
|
+
# {ContextDev::Models::BatchSubmitResponse::CacheMetadata} for more details.
|
|
138
|
+
#
|
|
139
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
140
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
141
|
+
# oldest contributing hit.
|
|
142
|
+
#
|
|
143
|
+
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
144
|
+
#
|
|
145
|
+
# @param status [Symbol, ContextDev::Models::BatchSubmitResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
146
|
+
|
|
147
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
148
|
+
# zero-data-retention cache bypass.
|
|
149
|
+
#
|
|
150
|
+
# @see ContextDev::Models::BatchSubmitResponse::CacheMetadata#status
|
|
151
|
+
module Status
|
|
152
|
+
extend ContextDev::Internal::Type::Enum
|
|
153
|
+
|
|
154
|
+
HIT = :hit
|
|
155
|
+
MISS = :miss
|
|
156
|
+
ZDR = :zdr
|
|
157
|
+
|
|
158
|
+
# @!method self.values
|
|
159
|
+
# @return [Array<Symbol>]
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
|
|
110
163
|
# @see ContextDev::Models::BatchSubmitResponse#credits
|
|
111
164
|
class Credits < ContextDev::Internal::Type::BaseModel
|
|
112
165
|
# @!attribute reserved
|