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
|
@@ -11,6 +11,22 @@ module ContextDev
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
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
|
+
|
|
14
30
|
# Whether the given URL is a product detail page
|
|
15
31
|
sig { returns(T.nilable(T::Boolean)) }
|
|
16
32
|
attr_reader :is_product_page
|
|
@@ -65,6 +81,8 @@ module ContextDev
|
|
|
65
81
|
|
|
66
82
|
sig do
|
|
67
83
|
params(
|
|
84
|
+
cache_metadata:
|
|
85
|
+
ContextDev::Models::AIExtractProductResponse::CacheMetadata::OrHash,
|
|
68
86
|
is_product_page: T::Boolean,
|
|
69
87
|
key_metadata:
|
|
70
88
|
ContextDev::Models::AIExtractProductResponse::KeyMetadata::OrHash,
|
|
@@ -79,6 +97,10 @@ module ContextDev
|
|
|
79
97
|
).returns(T.attached_class)
|
|
80
98
|
end
|
|
81
99
|
def self.new(
|
|
100
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
101
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
102
|
+
# oldest contributing hit.
|
|
103
|
+
cache_metadata:,
|
|
82
104
|
# Whether the given URL is a product detail page
|
|
83
105
|
is_product_page: nil,
|
|
84
106
|
# Metadata about the API key used for the request. Included in every response
|
|
@@ -94,6 +116,8 @@ module ContextDev
|
|
|
94
116
|
sig do
|
|
95
117
|
override.returns(
|
|
96
118
|
{
|
|
119
|
+
cache_metadata:
|
|
120
|
+
ContextDev::Models::AIExtractProductResponse::CacheMetadata,
|
|
97
121
|
is_product_page: T::Boolean,
|
|
98
122
|
key_metadata:
|
|
99
123
|
ContextDev::Models::AIExtractProductResponse::KeyMetadata,
|
|
@@ -109,6 +133,101 @@ module ContextDev
|
|
|
109
133
|
def to_hash
|
|
110
134
|
end
|
|
111
135
|
|
|
136
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
137
|
+
OrHash =
|
|
138
|
+
T.type_alias do
|
|
139
|
+
T.any(
|
|
140
|
+
ContextDev::Models::AIExtractProductResponse::CacheMetadata,
|
|
141
|
+
ContextDev::Internal::AnyHash
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
146
|
+
sig { returns(Integer) }
|
|
147
|
+
attr_accessor :age_ms
|
|
148
|
+
|
|
149
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
150
|
+
# zero-data-retention cache bypass.
|
|
151
|
+
sig do
|
|
152
|
+
returns(
|
|
153
|
+
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
154
|
+
)
|
|
155
|
+
end
|
|
156
|
+
attr_accessor :status
|
|
157
|
+
|
|
158
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
159
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
160
|
+
# oldest contributing hit.
|
|
161
|
+
sig do
|
|
162
|
+
params(
|
|
163
|
+
age_ms: Integer,
|
|
164
|
+
status:
|
|
165
|
+
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::OrSymbol
|
|
166
|
+
).returns(T.attached_class)
|
|
167
|
+
end
|
|
168
|
+
def self.new(
|
|
169
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
170
|
+
age_ms:,
|
|
171
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
172
|
+
# zero-data-retention cache bypass.
|
|
173
|
+
status:
|
|
174
|
+
)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
sig do
|
|
178
|
+
override.returns(
|
|
179
|
+
{
|
|
180
|
+
age_ms: Integer,
|
|
181
|
+
status:
|
|
182
|
+
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
end
|
|
186
|
+
def to_hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
190
|
+
# zero-data-retention cache bypass.
|
|
191
|
+
module Status
|
|
192
|
+
extend ContextDev::Internal::Type::Enum
|
|
193
|
+
|
|
194
|
+
TaggedSymbol =
|
|
195
|
+
T.type_alias do
|
|
196
|
+
T.all(
|
|
197
|
+
Symbol,
|
|
198
|
+
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status
|
|
199
|
+
)
|
|
200
|
+
end
|
|
201
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
202
|
+
|
|
203
|
+
HIT =
|
|
204
|
+
T.let(
|
|
205
|
+
:hit,
|
|
206
|
+
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
207
|
+
)
|
|
208
|
+
MISS =
|
|
209
|
+
T.let(
|
|
210
|
+
:miss,
|
|
211
|
+
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
212
|
+
)
|
|
213
|
+
ZDR =
|
|
214
|
+
T.let(
|
|
215
|
+
:zdr,
|
|
216
|
+
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
sig do
|
|
220
|
+
override.returns(
|
|
221
|
+
T::Array[
|
|
222
|
+
ContextDev::Models::AIExtractProductResponse::CacheMetadata::Status::TaggedSymbol
|
|
223
|
+
]
|
|
224
|
+
)
|
|
225
|
+
end
|
|
226
|
+
def self.values
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
|
|
112
231
|
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
113
232
|
OrHash =
|
|
114
233
|
T.type_alias do
|
|
@@ -232,6 +351,16 @@ module ContextDev
|
|
|
232
351
|
sig { returns(T::Array[String]) }
|
|
233
352
|
attr_accessor :target_audience
|
|
234
353
|
|
|
354
|
+
# Normalized stock or ordering availability
|
|
355
|
+
sig do
|
|
356
|
+
returns(
|
|
357
|
+
T.nilable(
|
|
358
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
359
|
+
)
|
|
360
|
+
)
|
|
361
|
+
end
|
|
362
|
+
attr_accessor :availability
|
|
363
|
+
|
|
235
364
|
# Billing frequency for the product
|
|
236
365
|
sig do
|
|
237
366
|
returns(
|
|
@@ -250,6 +379,13 @@ module ContextDev
|
|
|
250
379
|
sig { returns(T.nilable(String)) }
|
|
251
380
|
attr_accessor :currency
|
|
252
381
|
|
|
382
|
+
# Dimension statements shown for the product, preserving labels, values, and units
|
|
383
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
384
|
+
attr_reader :dimensions
|
|
385
|
+
|
|
386
|
+
sig { params(dimensions: T::Array[String]).void }
|
|
387
|
+
attr_writer :dimensions
|
|
388
|
+
|
|
253
389
|
# URL to the product image
|
|
254
390
|
sig { returns(T.nilable(String)) }
|
|
255
391
|
attr_accessor :image_url
|
|
@@ -268,6 +404,10 @@ module ContextDev
|
|
|
268
404
|
end
|
|
269
405
|
attr_accessor :pricing_model
|
|
270
406
|
|
|
407
|
+
# Original or regular price before a displayed discount
|
|
408
|
+
sig { returns(T.nilable(Float)) }
|
|
409
|
+
attr_accessor :regular_price
|
|
410
|
+
|
|
271
411
|
# URL to the product page
|
|
272
412
|
sig { returns(T.nilable(String)) }
|
|
273
413
|
attr_accessor :url
|
|
@@ -282,18 +422,24 @@ module ContextDev
|
|
|
282
422
|
sku: T.nilable(String),
|
|
283
423
|
tags: T::Array[String],
|
|
284
424
|
target_audience: T::Array[String],
|
|
425
|
+
availability:
|
|
426
|
+
T.nilable(
|
|
427
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::OrSymbol
|
|
428
|
+
),
|
|
285
429
|
billing_frequency:
|
|
286
430
|
T.nilable(
|
|
287
431
|
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::OrSymbol
|
|
288
432
|
),
|
|
289
433
|
category: T.nilable(String),
|
|
290
434
|
currency: T.nilable(String),
|
|
435
|
+
dimensions: T::Array[String],
|
|
291
436
|
image_url: T.nilable(String),
|
|
292
437
|
price: T.nilable(Float),
|
|
293
438
|
pricing_model:
|
|
294
439
|
T.nilable(
|
|
295
440
|
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::OrSymbol
|
|
296
441
|
),
|
|
442
|
+
regular_price: T.nilable(Float),
|
|
297
443
|
url: T.nilable(String)
|
|
298
444
|
).returns(T.attached_class)
|
|
299
445
|
end
|
|
@@ -312,18 +458,24 @@ module ContextDev
|
|
|
312
458
|
tags:,
|
|
313
459
|
# Target audience for the product (array of strings)
|
|
314
460
|
target_audience:,
|
|
461
|
+
# Normalized stock or ordering availability
|
|
462
|
+
availability: nil,
|
|
315
463
|
# Billing frequency for the product
|
|
316
464
|
billing_frequency: nil,
|
|
317
465
|
# Category of the product
|
|
318
466
|
category: nil,
|
|
319
467
|
# Currency code for the price (e.g., USD, EUR)
|
|
320
468
|
currency: nil,
|
|
469
|
+
# Dimension statements shown for the product, preserving labels, values, and units
|
|
470
|
+
dimensions: nil,
|
|
321
471
|
# URL to the product image
|
|
322
472
|
image_url: nil,
|
|
323
473
|
# Price of the product
|
|
324
474
|
price: nil,
|
|
325
475
|
# Pricing model for the product
|
|
326
476
|
pricing_model: nil,
|
|
477
|
+
# Original or regular price before a displayed discount
|
|
478
|
+
regular_price: nil,
|
|
327
479
|
# URL to the product page
|
|
328
480
|
url: nil
|
|
329
481
|
)
|
|
@@ -339,18 +491,24 @@ module ContextDev
|
|
|
339
491
|
sku: T.nilable(String),
|
|
340
492
|
tags: T::Array[String],
|
|
341
493
|
target_audience: T::Array[String],
|
|
494
|
+
availability:
|
|
495
|
+
T.nilable(
|
|
496
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
497
|
+
),
|
|
342
498
|
billing_frequency:
|
|
343
499
|
T.nilable(
|
|
344
500
|
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::TaggedSymbol
|
|
345
501
|
),
|
|
346
502
|
category: T.nilable(String),
|
|
347
503
|
currency: T.nilable(String),
|
|
504
|
+
dimensions: T::Array[String],
|
|
348
505
|
image_url: T.nilable(String),
|
|
349
506
|
price: T.nilable(Float),
|
|
350
507
|
pricing_model:
|
|
351
508
|
T.nilable(
|
|
352
509
|
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::TaggedSymbol
|
|
353
510
|
),
|
|
511
|
+
regular_price: T.nilable(Float),
|
|
354
512
|
url: T.nilable(String)
|
|
355
513
|
}
|
|
356
514
|
)
|
|
@@ -358,6 +516,66 @@ module ContextDev
|
|
|
358
516
|
def to_hash
|
|
359
517
|
end
|
|
360
518
|
|
|
519
|
+
# Normalized stock or ordering availability
|
|
520
|
+
module Availability
|
|
521
|
+
extend ContextDev::Internal::Type::Enum
|
|
522
|
+
|
|
523
|
+
TaggedSymbol =
|
|
524
|
+
T.type_alias do
|
|
525
|
+
T.all(
|
|
526
|
+
Symbol,
|
|
527
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability
|
|
528
|
+
)
|
|
529
|
+
end
|
|
530
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
531
|
+
|
|
532
|
+
IN_STOCK =
|
|
533
|
+
T.let(
|
|
534
|
+
:in_stock,
|
|
535
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
536
|
+
)
|
|
537
|
+
OUT_OF_STOCK =
|
|
538
|
+
T.let(
|
|
539
|
+
:out_of_stock,
|
|
540
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
541
|
+
)
|
|
542
|
+
LIMITED_AVAILABILITY =
|
|
543
|
+
T.let(
|
|
544
|
+
:limited_availability,
|
|
545
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
546
|
+
)
|
|
547
|
+
PREORDER =
|
|
548
|
+
T.let(
|
|
549
|
+
:preorder,
|
|
550
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
551
|
+
)
|
|
552
|
+
BACKORDER =
|
|
553
|
+
T.let(
|
|
554
|
+
:backorder,
|
|
555
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
556
|
+
)
|
|
557
|
+
MADE_TO_ORDER =
|
|
558
|
+
T.let(
|
|
559
|
+
:made_to_order,
|
|
560
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
561
|
+
)
|
|
562
|
+
DISCONTINUED =
|
|
563
|
+
T.let(
|
|
564
|
+
:discontinued,
|
|
565
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
566
|
+
)
|
|
567
|
+
|
|
568
|
+
sig do
|
|
569
|
+
override.returns(
|
|
570
|
+
T::Array[
|
|
571
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
572
|
+
]
|
|
573
|
+
)
|
|
574
|
+
end
|
|
575
|
+
def self.values
|
|
576
|
+
end
|
|
577
|
+
end
|
|
578
|
+
|
|
361
579
|
# Billing frequency for the product
|
|
362
580
|
module BillingFrequency
|
|
363
581
|
extend ContextDev::Internal::Type::Enum
|
|
@@ -11,6 +11,22 @@ module ContextDev
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
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::AIExtractProductsResponse::CacheMetadata)
|
|
19
|
+
end
|
|
20
|
+
attr_reader :cache_metadata
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
cache_metadata:
|
|
25
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata::OrHash
|
|
26
|
+
).void
|
|
27
|
+
end
|
|
28
|
+
attr_writer :cache_metadata
|
|
29
|
+
|
|
14
30
|
# Metadata about the API key used for the request. Included in every response
|
|
15
31
|
# whenever a valid API key is provided, even when the response status is not 200.
|
|
16
32
|
sig do
|
|
@@ -50,6 +66,8 @@ module ContextDev
|
|
|
50
66
|
|
|
51
67
|
sig do
|
|
52
68
|
params(
|
|
69
|
+
cache_metadata:
|
|
70
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata::OrHash,
|
|
53
71
|
key_metadata:
|
|
54
72
|
ContextDev::Models::AIExtractProductsResponse::KeyMetadata::OrHash,
|
|
55
73
|
products:
|
|
@@ -59,6 +77,10 @@ module ContextDev
|
|
|
59
77
|
).returns(T.attached_class)
|
|
60
78
|
end
|
|
61
79
|
def self.new(
|
|
80
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
81
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
82
|
+
# oldest contributing hit.
|
|
83
|
+
cache_metadata:,
|
|
62
84
|
# Metadata about the API key used for the request. Included in every response
|
|
63
85
|
# whenever a valid API key is provided, even when the response status is not 200.
|
|
64
86
|
key_metadata: nil,
|
|
@@ -70,6 +92,8 @@ module ContextDev
|
|
|
70
92
|
sig do
|
|
71
93
|
override.returns(
|
|
72
94
|
{
|
|
95
|
+
cache_metadata:
|
|
96
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata,
|
|
73
97
|
key_metadata:
|
|
74
98
|
ContextDev::Models::AIExtractProductsResponse::KeyMetadata,
|
|
75
99
|
products:
|
|
@@ -80,6 +104,101 @@ module ContextDev
|
|
|
80
104
|
def to_hash
|
|
81
105
|
end
|
|
82
106
|
|
|
107
|
+
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
108
|
+
OrHash =
|
|
109
|
+
T.type_alias do
|
|
110
|
+
T.any(
|
|
111
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata,
|
|
112
|
+
ContextDev::Internal::AnyHash
|
|
113
|
+
)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
117
|
+
sig { returns(Integer) }
|
|
118
|
+
attr_accessor :age_ms
|
|
119
|
+
|
|
120
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
121
|
+
# zero-data-retention cache bypass.
|
|
122
|
+
sig do
|
|
123
|
+
returns(
|
|
124
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status::TaggedSymbol
|
|
125
|
+
)
|
|
126
|
+
end
|
|
127
|
+
attr_accessor :status
|
|
128
|
+
|
|
129
|
+
# Cache outcome for this response. Composite responses are hits only when every
|
|
130
|
+
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
131
|
+
# oldest contributing hit.
|
|
132
|
+
sig do
|
|
133
|
+
params(
|
|
134
|
+
age_ms: Integer,
|
|
135
|
+
status:
|
|
136
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status::OrSymbol
|
|
137
|
+
).returns(T.attached_class)
|
|
138
|
+
end
|
|
139
|
+
def self.new(
|
|
140
|
+
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
141
|
+
age_ms:,
|
|
142
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
143
|
+
# zero-data-retention cache bypass.
|
|
144
|
+
status:
|
|
145
|
+
)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
sig do
|
|
149
|
+
override.returns(
|
|
150
|
+
{
|
|
151
|
+
age_ms: Integer,
|
|
152
|
+
status:
|
|
153
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status::TaggedSymbol
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
def to_hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Whether the response was served from cache, required fresh work, or honored
|
|
161
|
+
# zero-data-retention cache bypass.
|
|
162
|
+
module Status
|
|
163
|
+
extend ContextDev::Internal::Type::Enum
|
|
164
|
+
|
|
165
|
+
TaggedSymbol =
|
|
166
|
+
T.type_alias do
|
|
167
|
+
T.all(
|
|
168
|
+
Symbol,
|
|
169
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status
|
|
170
|
+
)
|
|
171
|
+
end
|
|
172
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
173
|
+
|
|
174
|
+
HIT =
|
|
175
|
+
T.let(
|
|
176
|
+
:hit,
|
|
177
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status::TaggedSymbol
|
|
178
|
+
)
|
|
179
|
+
MISS =
|
|
180
|
+
T.let(
|
|
181
|
+
:miss,
|
|
182
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status::TaggedSymbol
|
|
183
|
+
)
|
|
184
|
+
ZDR =
|
|
185
|
+
T.let(
|
|
186
|
+
:zdr,
|
|
187
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status::TaggedSymbol
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
sig do
|
|
191
|
+
override.returns(
|
|
192
|
+
T::Array[
|
|
193
|
+
ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status::TaggedSymbol
|
|
194
|
+
]
|
|
195
|
+
)
|
|
196
|
+
end
|
|
197
|
+
def self.values
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
83
202
|
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
84
203
|
OrHash =
|
|
85
204
|
T.type_alias do
|
|
@@ -158,6 +277,16 @@ module ContextDev
|
|
|
158
277
|
sig { returns(T::Array[String]) }
|
|
159
278
|
attr_accessor :target_audience
|
|
160
279
|
|
|
280
|
+
# Normalized stock or ordering availability
|
|
281
|
+
sig do
|
|
282
|
+
returns(
|
|
283
|
+
T.nilable(
|
|
284
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability::TaggedSymbol
|
|
285
|
+
)
|
|
286
|
+
)
|
|
287
|
+
end
|
|
288
|
+
attr_accessor :availability
|
|
289
|
+
|
|
161
290
|
# Billing frequency for the product
|
|
162
291
|
sig do
|
|
163
292
|
returns(
|
|
@@ -176,6 +305,13 @@ module ContextDev
|
|
|
176
305
|
sig { returns(T.nilable(String)) }
|
|
177
306
|
attr_accessor :currency
|
|
178
307
|
|
|
308
|
+
# Dimension statements shown for the product, preserving labels, values, and units
|
|
309
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
310
|
+
attr_reader :dimensions
|
|
311
|
+
|
|
312
|
+
sig { params(dimensions: T::Array[String]).void }
|
|
313
|
+
attr_writer :dimensions
|
|
314
|
+
|
|
179
315
|
# URL to the product image
|
|
180
316
|
sig { returns(T.nilable(String)) }
|
|
181
317
|
attr_accessor :image_url
|
|
@@ -194,6 +330,10 @@ module ContextDev
|
|
|
194
330
|
end
|
|
195
331
|
attr_accessor :pricing_model
|
|
196
332
|
|
|
333
|
+
# Original or regular price before a displayed discount
|
|
334
|
+
sig { returns(T.nilable(Float)) }
|
|
335
|
+
attr_accessor :regular_price
|
|
336
|
+
|
|
197
337
|
# URL to the product page
|
|
198
338
|
sig { returns(T.nilable(String)) }
|
|
199
339
|
attr_accessor :url
|
|
@@ -207,18 +347,24 @@ module ContextDev
|
|
|
207
347
|
sku: T.nilable(String),
|
|
208
348
|
tags: T::Array[String],
|
|
209
349
|
target_audience: T::Array[String],
|
|
350
|
+
availability:
|
|
351
|
+
T.nilable(
|
|
352
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability::OrSymbol
|
|
353
|
+
),
|
|
210
354
|
billing_frequency:
|
|
211
355
|
T.nilable(
|
|
212
356
|
ContextDev::Models::AIExtractProductsResponse::Product::BillingFrequency::OrSymbol
|
|
213
357
|
),
|
|
214
358
|
category: T.nilable(String),
|
|
215
359
|
currency: T.nilable(String),
|
|
360
|
+
dimensions: T::Array[String],
|
|
216
361
|
image_url: T.nilable(String),
|
|
217
362
|
price: T.nilable(Float),
|
|
218
363
|
pricing_model:
|
|
219
364
|
T.nilable(
|
|
220
365
|
ContextDev::Models::AIExtractProductsResponse::Product::PricingModel::OrSymbol
|
|
221
366
|
),
|
|
367
|
+
regular_price: T.nilable(Float),
|
|
222
368
|
url: T.nilable(String)
|
|
223
369
|
).returns(T.attached_class)
|
|
224
370
|
end
|
|
@@ -237,18 +383,24 @@ module ContextDev
|
|
|
237
383
|
tags:,
|
|
238
384
|
# Target audience for the product (array of strings)
|
|
239
385
|
target_audience:,
|
|
386
|
+
# Normalized stock or ordering availability
|
|
387
|
+
availability: nil,
|
|
240
388
|
# Billing frequency for the product
|
|
241
389
|
billing_frequency: nil,
|
|
242
390
|
# Category of the product
|
|
243
391
|
category: nil,
|
|
244
392
|
# Currency code for the price (e.g., USD, EUR)
|
|
245
393
|
currency: nil,
|
|
394
|
+
# Dimension statements shown for the product, preserving labels, values, and units
|
|
395
|
+
dimensions: nil,
|
|
246
396
|
# URL to the product image
|
|
247
397
|
image_url: nil,
|
|
248
398
|
# Price of the product
|
|
249
399
|
price: nil,
|
|
250
400
|
# Pricing model for the product
|
|
251
401
|
pricing_model: nil,
|
|
402
|
+
# Original or regular price before a displayed discount
|
|
403
|
+
regular_price: nil,
|
|
252
404
|
# URL to the product page
|
|
253
405
|
url: nil
|
|
254
406
|
)
|
|
@@ -264,18 +416,24 @@ module ContextDev
|
|
|
264
416
|
sku: T.nilable(String),
|
|
265
417
|
tags: T::Array[String],
|
|
266
418
|
target_audience: T::Array[String],
|
|
419
|
+
availability:
|
|
420
|
+
T.nilable(
|
|
421
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability::TaggedSymbol
|
|
422
|
+
),
|
|
267
423
|
billing_frequency:
|
|
268
424
|
T.nilable(
|
|
269
425
|
ContextDev::Models::AIExtractProductsResponse::Product::BillingFrequency::TaggedSymbol
|
|
270
426
|
),
|
|
271
427
|
category: T.nilable(String),
|
|
272
428
|
currency: T.nilable(String),
|
|
429
|
+
dimensions: T::Array[String],
|
|
273
430
|
image_url: T.nilable(String),
|
|
274
431
|
price: T.nilable(Float),
|
|
275
432
|
pricing_model:
|
|
276
433
|
T.nilable(
|
|
277
434
|
ContextDev::Models::AIExtractProductsResponse::Product::PricingModel::TaggedSymbol
|
|
278
435
|
),
|
|
436
|
+
regular_price: T.nilable(Float),
|
|
279
437
|
url: T.nilable(String)
|
|
280
438
|
}
|
|
281
439
|
)
|
|
@@ -283,6 +441,66 @@ module ContextDev
|
|
|
283
441
|
def to_hash
|
|
284
442
|
end
|
|
285
443
|
|
|
444
|
+
# Normalized stock or ordering availability
|
|
445
|
+
module Availability
|
|
446
|
+
extend ContextDev::Internal::Type::Enum
|
|
447
|
+
|
|
448
|
+
TaggedSymbol =
|
|
449
|
+
T.type_alias do
|
|
450
|
+
T.all(
|
|
451
|
+
Symbol,
|
|
452
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability
|
|
453
|
+
)
|
|
454
|
+
end
|
|
455
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
456
|
+
|
|
457
|
+
IN_STOCK =
|
|
458
|
+
T.let(
|
|
459
|
+
:in_stock,
|
|
460
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability::TaggedSymbol
|
|
461
|
+
)
|
|
462
|
+
OUT_OF_STOCK =
|
|
463
|
+
T.let(
|
|
464
|
+
:out_of_stock,
|
|
465
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability::TaggedSymbol
|
|
466
|
+
)
|
|
467
|
+
LIMITED_AVAILABILITY =
|
|
468
|
+
T.let(
|
|
469
|
+
:limited_availability,
|
|
470
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability::TaggedSymbol
|
|
471
|
+
)
|
|
472
|
+
PREORDER =
|
|
473
|
+
T.let(
|
|
474
|
+
:preorder,
|
|
475
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability::TaggedSymbol
|
|
476
|
+
)
|
|
477
|
+
BACKORDER =
|
|
478
|
+
T.let(
|
|
479
|
+
:backorder,
|
|
480
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability::TaggedSymbol
|
|
481
|
+
)
|
|
482
|
+
MADE_TO_ORDER =
|
|
483
|
+
T.let(
|
|
484
|
+
:made_to_order,
|
|
485
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability::TaggedSymbol
|
|
486
|
+
)
|
|
487
|
+
DISCONTINUED =
|
|
488
|
+
T.let(
|
|
489
|
+
:discontinued,
|
|
490
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability::TaggedSymbol
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
sig do
|
|
494
|
+
override.returns(
|
|
495
|
+
T::Array[
|
|
496
|
+
ContextDev::Models::AIExtractProductsResponse::Product::Availability::TaggedSymbol
|
|
497
|
+
]
|
|
498
|
+
)
|
|
499
|
+
end
|
|
500
|
+
def self.values
|
|
501
|
+
end
|
|
502
|
+
end
|
|
503
|
+
|
|
286
504
|
# Billing frequency for the product
|
|
287
505
|
module BillingFrequency
|
|
288
506
|
extend ContextDev::Internal::Type::Enum
|