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