context.dev 2.17.0 → 2.18.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 (90) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/models/ai_extract_product_params.rb +28 -1
  5. data/lib/context_dev/models/ai_extract_product_response.rb +51 -1
  6. data/lib/context_dev/models/ai_extract_products_response.rb +51 -1
  7. data/lib/context_dev/models/brand_retrieve_response.rb +65 -65
  8. data/lib/context_dev/models/brand_retrieve_simplified_response.rb +66 -66
  9. data/lib/context_dev/models/industry_retrieve_naics_params.rb +28 -1
  10. data/lib/context_dev/models/industry_retrieve_sic_params.rb +28 -1
  11. data/lib/context_dev/models/parse_handle_params.rb +8 -6
  12. data/lib/context_dev/models/person_enrich_params.rb +28 -1
  13. data/lib/context_dev/models/web_answers_params.rb +28 -1
  14. data/lib/context_dev/models/web_extract_competitors_params.rb +28 -1
  15. data/lib/context_dev/models/web_extract_fonts_params.rb +2 -2
  16. data/lib/context_dev/models/web_extract_params.rb +28 -1
  17. data/lib/context_dev/models/web_extract_styleguide_params.rb +30 -3
  18. data/lib/context_dev/models/web_screenshot_params.rb +10 -8
  19. data/lib/context_dev/models/web_search_params.rb +30 -3
  20. data/lib/context_dev/models/web_search_response.rb +6 -2
  21. data/lib/context_dev/models/web_web_scrape_bytes_params.rb +8 -6
  22. data/lib/context_dev/models/web_web_scrape_html_params.rb +188 -9
  23. data/lib/context_dev/models/web_web_scrape_html_response.rb +41 -1
  24. data/lib/context_dev/models/web_web_scrape_images_params.rb +31 -4
  25. data/lib/context_dev/models/web_web_scrape_md_params.rb +10 -8
  26. data/lib/context_dev/models/web_web_scrape_screenshot_params.rb +471 -0
  27. data/lib/context_dev/models/web_web_scrape_screenshot_response.rb +169 -0
  28. data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +8 -6
  29. data/lib/context_dev/models.rb +2 -0
  30. data/lib/context_dev/resources/ai.rb +3 -1
  31. data/lib/context_dev/resources/industry.rb +6 -2
  32. data/lib/context_dev/resources/people.rb +3 -1
  33. data/lib/context_dev/resources/web.rb +96 -13
  34. data/lib/context_dev/version.rb +1 -1
  35. data/lib/context_dev.rb +2 -0
  36. data/rbi/context_dev/models/ai_extract_product_params.rbi +54 -0
  37. data/rbi/context_dev/models/ai_extract_product_response.rbi +98 -3
  38. data/rbi/context_dev/models/ai_extract_products_response.rbi +98 -3
  39. data/rbi/context_dev/models/brand_retrieve_response.rbi +128 -136
  40. data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +132 -140
  41. data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +59 -0
  42. data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +57 -0
  43. data/rbi/context_dev/models/parse_handle_params.rbi +12 -9
  44. data/rbi/context_dev/models/person_enrich_params.rbi +45 -0
  45. data/rbi/context_dev/models/web_answers_params.rbi +45 -0
  46. data/rbi/context_dev/models/web_extract_competitors_params.rbi +59 -0
  47. data/rbi/context_dev/models/web_extract_fonts_params.rbi +3 -3
  48. data/rbi/context_dev/models/web_extract_params.rbi +45 -0
  49. data/rbi/context_dev/models/web_extract_styleguide_params.rbi +62 -3
  50. data/rbi/context_dev/models/web_screenshot_params.rbi +15 -12
  51. data/rbi/context_dev/models/web_search_params.rbi +48 -3
  52. data/rbi/context_dev/models/web_search_response.rbi +4 -2
  53. data/rbi/context_dev/models/web_web_scrape_bytes_params.rbi +12 -9
  54. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +485 -12
  55. data/rbi/context_dev/models/web_web_scrape_html_response.rbi +103 -0
  56. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +62 -5
  57. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +15 -12
  58. data/rbi/context_dev/models/web_web_scrape_screenshot_params.rbi +1580 -0
  59. data/rbi/context_dev/models/web_web_scrape_screenshot_response.rbi +332 -0
  60. data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +12 -9
  61. data/rbi/context_dev/models.rbi +3 -0
  62. data/rbi/context_dev/resources/ai.rbi +7 -0
  63. data/rbi/context_dev/resources/industry.rbi +14 -0
  64. data/rbi/context_dev/resources/parse.rbi +4 -4
  65. data/rbi/context_dev/resources/people.rbi +7 -0
  66. data/rbi/context_dev/resources/web.rbi +173 -21
  67. data/sig/context_dev/models/ai_extract_product_params.rbs +21 -1
  68. data/sig/context_dev/models/ai_extract_product_response.rbs +44 -3
  69. data/sig/context_dev/models/ai_extract_products_response.rbs +44 -3
  70. data/sig/context_dev/models/brand_retrieve_response.rbs +51 -59
  71. data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +51 -59
  72. data/sig/context_dev/models/industry_retrieve_naics_params.rbs +21 -1
  73. data/sig/context_dev/models/industry_retrieve_sic_params.rbs +21 -1
  74. data/sig/context_dev/models/person_enrich_params.rbs +21 -1
  75. data/sig/context_dev/models/web_answers_params.rbs +21 -1
  76. data/sig/context_dev/models/web_extract_competitors_params.rbs +21 -1
  77. data/sig/context_dev/models/web_extract_params.rbs +21 -1
  78. data/sig/context_dev/models/web_extract_styleguide_params.rbs +21 -1
  79. data/sig/context_dev/models/web_search_params.rbs +21 -1
  80. data/sig/context_dev/models/web_web_scrape_html_params.rbs +148 -0
  81. data/sig/context_dev/models/web_web_scrape_html_response.rbs +30 -0
  82. data/sig/context_dev/models/web_web_scrape_images_params.rbs +21 -1
  83. data/sig/context_dev/models/web_web_scrape_screenshot_params.rbs +619 -0
  84. data/sig/context_dev/models/web_web_scrape_screenshot_response.rbs +127 -0
  85. data/sig/context_dev/models.rbs +2 -0
  86. data/sig/context_dev/resources/ai.rbs +1 -0
  87. data/sig/context_dev/resources/industry.rbs +2 -0
  88. data/sig/context_dev/resources/people.rbs +1 -0
  89. data/sig/context_dev/resources/web.rbs +24 -0
  90. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ef06287736220b8406602722c6d4bff1c2301a6224c88308a687b5fe3a0c43b
4
- data.tar.gz: dea8f15506d185c74514659325d1c30d7860b81a0d771b821429502b132096b9
3
+ metadata.gz: e0f065997a3f6bc987b9ef1486e702f79002addef6662ceeed38107340ff8565
4
+ data.tar.gz: d22faf02bd6bdc0ad7ba496b99375be03a07eeb2a8753b93aef39ea8733bbd35
5
5
  SHA512:
6
- metadata.gz: 7a1f4701bf53c53328c5271646e57e81cbd93e0f4f7d909a6d4a7cbc3d21087ebe8b77f2dcfe83b2b8186cf3cce5990cf944aa54b28f44392a6dc32fec078049
7
- data.tar.gz: 7a6ff355e62a1cf5f37f70edc73d86f22d430253e82a0668f82c7162a48d804f20ed4d15e78b21d534e6f9523b1040f4a5135f56991b1bf82c8e74121b2734e2
6
+ metadata.gz: c626610bd4e3070c60ad4db6c0b0c0eb3f0f8ac0eb1bf10f61e4c5dc740f2f3c40ab829309ecaaf5fe4ed232c9d8683bab6872641ccca935ca3eff5a932b0dcc
7
+ data.tar.gz: 8089fb01f3a2ba6dfbab55db9fac2ae0ac3d0555f051f6ec7ae5edaf3d9990e80b17d9d9d3b0588d4fa5ada2a073e5aed03caf1faa907e9dcbe717b136a6c16e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.18.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.17.1...v2.18.0) (2026-09-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** enable ZDR on remaining AI endpoints via OpenAI ([#1099](https://github.com/context-dot-dev/context-ruby-sdk/issues/1099)) ([36e5487](https://github.com/context-dot-dev/context-ruby-sdk/commit/36e548724224b3198e49d248735916f3af6d1b61))
9
+ * **products:** extract ProductGroup variants with images ([#1124](https://github.com/context-dot-dev/context-ruby-sdk/issues/1124)) ([dd14116](https://github.com/context-dot-dev/context-ruby-sdk/commit/dd141167200666c0bbb658f9a83ffa8896411aae))
10
+ * **scrape:** add CSS extraction rules to HTML scraping ([#1146](https://github.com/context-dot-dev/context-ruby-sdk/issues/1146)) ([4ed406d](https://github.com/context-dot-dev/context-ruby-sdk/commit/4ed406dfa5bf0dd2ad8e6652fb85ef9ebe37ff07))
11
+ * **web:** add URL-based scrape screenshot endpoint ([#1150](https://github.com/context-dot-dev/context-ruby-sdk/issues/1150)) ([52c8043](https://github.com/context-dot-dev/context-ruby-sdk/commit/52c80435c9c767bdb6ff782c487ada1263d9f767))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **api:** lower partial scrape timeout minimum to five seconds ([#1118](https://github.com/context-dot-dev/context-ruby-sdk/issues/1118)) ([871982b](https://github.com/context-dot-dev/context-ruby-sdk/commit/871982bff814f9cb698fc59f1e07c2d87c5a6dad))
17
+
18
+ ## [2.17.1](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.17.0...v2.17.1) (2026-09-15)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * **api:** guarantee search descriptions and align response types ([#1089](https://github.com/context-dot-dev/context-ruby-sdk/issues/1089)) ([7ee03fc](https://github.com/context-dot-dev/context-ruby-sdk/commit/7ee03fc233d3e975f01fd3d290defb48a6e6ad56))
24
+
3
25
  ## [2.17.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.16.0...v2.17.0) (2026-09-15)
4
26
 
5
27
 
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "context.dev", "~> 2.17.0"
20
+ gem "context.dev", "~> 2.18.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -35,7 +35,17 @@ module ContextDev
35
35
  # @return [ContextDev::Models::AIExtractProductParams::TimeoutOpts, nil]
36
36
  optional :timeout_opts, -> { ContextDev::AIExtractProductParams::TimeoutOpts }, api_name: :timeoutOpts
37
37
 
38
- # @!method initialize(url:, max_age_ms: nil, tags: nil, timeout_opts: nil, request_options: {})
38
+ # @!attribute zdr
39
+ # Set to enabled to bypass shared caches and omit request and response content
40
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
41
+ # omitted. Requires zero data retention to be enabled for your organization
42
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
43
+ # Successful ZDR responses include X-Context-ZDR: true.
44
+ #
45
+ # @return [Symbol, ContextDev::Models::AIExtractProductParams::Zdr, nil]
46
+ optional :zdr, enum: -> { ContextDev::AIExtractProductParams::Zdr }
47
+
48
+ # @!method initialize(url:, max_age_ms: nil, tags: nil, timeout_opts: nil, zdr: nil, request_options: {})
39
49
  # Some parameter documentations has been truncated, see
40
50
  # {ContextDev::Models::AIExtractProductParams} for more details.
41
51
  #
@@ -47,6 +57,8 @@ module ContextDev
47
57
  #
48
58
  # @param timeout_opts [ContextDev::Models::AIExtractProductParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
49
59
  #
60
+ # @param zdr [Symbol, ContextDev::Models::AIExtractProductParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
61
+ #
50
62
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
51
63
 
52
64
  class TimeoutOpts < ContextDev::Internal::Type::BaseModel
@@ -93,6 +105,21 @@ module ContextDev
93
105
  # @return [Array<Symbol>]
94
106
  end
95
107
  end
108
+
109
+ # Set to enabled to bypass shared caches and omit request and response content
110
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
111
+ # omitted. Requires zero data retention to be enabled for your organization
112
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
113
+ # Successful ZDR responses include X-Context-ZDR: true.
114
+ module Zdr
115
+ extend ContextDev::Internal::Type::Enum
116
+
117
+ ENABLED = :enabled
118
+ DISABLED = :disabled
119
+
120
+ # @!method self.values
121
+ # @return [Array<Symbol>]
122
+ end
96
123
  end
97
124
  end
98
125
  end
@@ -258,7 +258,16 @@ module ContextDev
258
258
  # @return [String, nil]
259
259
  optional :url, String, nil?: true
260
260
 
261
- # @!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)
261
+ # @!attribute variants
262
+ # Product variations, such as different colors or sizes, with their attributes and
263
+ # images. Empty if none are found. May not include every variation offered by the
264
+ # store.
265
+ #
266
+ # @return [Array<ContextDev::Models::AIExtractProductResponse::Product::Variant>, nil]
267
+ optional :variants,
268
+ -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::AIExtractProductResponse::Product::Variant] }
269
+
270
+ # @!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, variants: nil)
262
271
  # Some parameter documentations has been truncated, see
263
272
  # {ContextDev::Models::AIExtractProductResponse::Product} for more details.
264
273
  #
@@ -297,6 +306,8 @@ module ContextDev
297
306
  # @param regular_price [Float, nil] Original or regular price before a displayed discount
298
307
  #
299
308
  # @param url [String, nil] URL to the product page
309
+ #
310
+ # @param variants [Array<ContextDev::Models::AIExtractProductResponse::Product::Variant>] Product variations, such as different colors or sizes, with their attributes and
300
311
 
301
312
  # Normalized stock or ordering availability
302
313
  #
@@ -346,6 +357,45 @@ module ContextDev
346
357
  # @!method self.values
347
358
  # @return [Array<Symbol>]
348
359
  end
360
+
361
+ class Variant < ContextDev::Internal::Type::BaseModel
362
+ # @!attribute attributes
363
+ # Explicit variant attributes such as color, size, material, pattern and
364
+ # properties declared by page.
365
+ #
366
+ # @return [Hash{Symbol=>String}]
367
+ required :attributes, ContextDev::Internal::Type::HashOf[String]
368
+
369
+ # @!attribute images
370
+ # Original source image URLs explicitly attached to this variant.
371
+ #
372
+ # @return [Array<String>]
373
+ required :images, ContextDev::Internal::Type::ArrayOf[String]
374
+
375
+ # @!attribute sku
376
+ #
377
+ # @return [String, nil]
378
+ required :sku, String, nil?: true
379
+
380
+ # @!attribute url
381
+ # Variant or offer URL when provided by the source. May be shared by variants.
382
+ #
383
+ # @return [String, nil]
384
+ required :url, String, nil?: true
385
+
386
+ # @!method initialize(attributes:, images:, sku:, url:)
387
+ # Some parameter documentations has been truncated, see
388
+ # {ContextDev::Models::AIExtractProductResponse::Product::Variant} for more
389
+ # details.
390
+ #
391
+ # @param attributes [Hash{Symbol=>String}] Explicit variant attributes such as color, size, material, pattern and propertie
392
+ #
393
+ # @param images [Array<String>] Original source image URLs explicitly attached to this variant.
394
+ #
395
+ # @param sku [String, nil]
396
+ #
397
+ # @param url [String, nil] Variant or offer URL when provided by the source. May be shared by variants.
398
+ end
349
399
  end
350
400
  end
351
401
  end
@@ -228,7 +228,16 @@ module ContextDev
228
228
  # @return [String, nil]
229
229
  optional :url, String, nil?: true
230
230
 
231
- # @!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)
231
+ # @!attribute variants
232
+ # Product variations, such as different colors or sizes, with their attributes and
233
+ # images. Empty if none are found. May not include every variation offered by the
234
+ # store.
235
+ #
236
+ # @return [Array<ContextDev::Models::AIExtractProductsResponse::Product::Variant>, nil]
237
+ optional :variants,
238
+ -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::AIExtractProductsResponse::Product::Variant] }
239
+
240
+ # @!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, variants: nil)
232
241
  # Some parameter documentations has been truncated, see
233
242
  # {ContextDev::Models::AIExtractProductsResponse::Product} for more details.
234
243
  #
@@ -265,6 +274,8 @@ module ContextDev
265
274
  # @param regular_price [Float, nil] Original or regular price before a displayed discount
266
275
  #
267
276
  # @param url [String, nil] URL to the product page
277
+ #
278
+ # @param variants [Array<ContextDev::Models::AIExtractProductsResponse::Product::Variant>] Product variations, such as different colors or sizes, with their attributes and
268
279
 
269
280
  # Normalized stock or ordering availability
270
281
  #
@@ -314,6 +325,45 @@ module ContextDev
314
325
  # @!method self.values
315
326
  # @return [Array<Symbol>]
316
327
  end
328
+
329
+ class Variant < ContextDev::Internal::Type::BaseModel
330
+ # @!attribute attributes
331
+ # Explicit variant attributes such as color, size, material, pattern and
332
+ # properties declared by page.
333
+ #
334
+ # @return [Hash{Symbol=>String}]
335
+ required :attributes, ContextDev::Internal::Type::HashOf[String]
336
+
337
+ # @!attribute images
338
+ # Original source image URLs explicitly attached to this variant.
339
+ #
340
+ # @return [Array<String>]
341
+ required :images, ContextDev::Internal::Type::ArrayOf[String]
342
+
343
+ # @!attribute sku
344
+ #
345
+ # @return [String, nil]
346
+ required :sku, String, nil?: true
347
+
348
+ # @!attribute url
349
+ # Variant or offer URL when provided by the source. May be shared by variants.
350
+ #
351
+ # @return [String, nil]
352
+ required :url, String, nil?: true
353
+
354
+ # @!method initialize(attributes:, images:, sku:, url:)
355
+ # Some parameter documentations has been truncated, see
356
+ # {ContextDev::Models::AIExtractProductsResponse::Product::Variant} for more
357
+ # details.
358
+ #
359
+ # @param attributes [Hash{Symbol=>String}] Explicit variant attributes such as color, size, material, pattern and propertie
360
+ #
361
+ # @param images [Array<String>] Original source image URLs explicitly attached to this variant.
362
+ #
363
+ # @param sku [String, nil]
364
+ #
365
+ # @param url [String, nil] Variant or offer URL when provided by the source. May be shared by variants.
366
+ end
317
367
  end
318
368
  end
319
369
  end
@@ -4,6 +4,12 @@ module ContextDev
4
4
  module Models
5
5
  # @see ContextDev::Resources::Brand#retrieve
6
6
  class BrandRetrieveResponse < ContextDev::Internal::Type::BaseModel
7
+ # @!attribute brand
8
+ # Detailed brand information
9
+ #
10
+ # @return [ContextDev::Models::BrandRetrieveResponse::Brand]
11
+ required :brand, -> { ContextDev::Models::BrandRetrieveResponse::Brand }
12
+
7
13
  # @!attribute cache_metadata
8
14
  # Cache outcome for this response. Composite responses are hits only when every
9
15
  # cache-controlled fetch contributing to the output was a hit; age_ms is the
@@ -12,6 +18,12 @@ module ContextDev
12
18
  # @return [ContextDev::Models::BrandRetrieveResponse::CacheMetadata]
13
19
  required :cache_metadata, -> { ContextDev::Models::BrandRetrieveResponse::CacheMetadata }
14
20
 
21
+ # @!attribute code
22
+ # HTTP status code
23
+ #
24
+ # @return [Integer]
25
+ required :code, Integer
26
+
15
27
  # @!attribute request_id
16
28
  # Unique id of this API call, also sent in the X-Request-Id response header. Quote
17
29
  # it when contacting support about a failed request.
@@ -19,17 +31,11 @@ module ContextDev
19
31
  # @return [String]
20
32
  required :request_id, String
21
33
 
22
- # @!attribute brand
23
- # Detailed brand information
24
- #
25
- # @return [ContextDev::Models::BrandRetrieveResponse::Brand, nil]
26
- optional :brand, -> { ContextDev::Models::BrandRetrieveResponse::Brand }
27
-
28
- # @!attribute code
29
- # HTTP status code
34
+ # @!attribute status
35
+ # Status of the response, e.g., 'ok'
30
36
  #
31
- # @return [Integer, nil]
32
- optional :code, Integer
37
+ # @return [String]
38
+ required :status, String
33
39
 
34
40
  # @!attribute key_metadata
35
41
  # Credit usage, included whenever a valid API key is provided.
@@ -44,72 +50,23 @@ module ContextDev
44
50
  # @return [Boolean, nil]
45
51
  optional :partial, ContextDev::Internal::Type::Boolean
46
52
 
47
- # @!attribute status
48
- # Status of the response, e.g., 'ok'
49
- #
50
- # @return [String, nil]
51
- optional :status, String
52
-
53
- # @!method initialize(cache_metadata:, request_id:, brand: nil, code: nil, key_metadata: nil, partial: nil, status: nil)
53
+ # @!method initialize(brand:, cache_metadata:, code:, request_id:, status:, key_metadata: nil, partial: nil)
54
54
  # Some parameter documentations has been truncated, see
55
55
  # {ContextDev::Models::BrandRetrieveResponse} for more details.
56
56
  #
57
+ # @param brand [ContextDev::Models::BrandRetrieveResponse::Brand] Detailed brand information
58
+ #
57
59
  # @param cache_metadata [ContextDev::Models::BrandRetrieveResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
58
60
  #
59
- # @param request_id [String] Unique id of this API call, also sent in the X-Request-Id response header. Quote
61
+ # @param code [Integer] HTTP status code
60
62
  #
61
- # @param brand [ContextDev::Models::BrandRetrieveResponse::Brand] Detailed brand information
63
+ # @param request_id [String] Unique id of this API call, also sent in the X-Request-Id response header. Quote
62
64
  #
63
- # @param code [Integer] HTTP status code
65
+ # @param status [String] Status of the response, e.g., 'ok'
64
66
  #
65
67
  # @param key_metadata [ContextDev::Models::BrandRetrieveResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
66
68
  #
67
69
  # @param partial [Boolean] True when the timeout ended processing and this response contains the usable dat
68
- #
69
- # @param status [String] Status of the response, e.g., 'ok'
70
-
71
- # @see ContextDev::Models::BrandRetrieveResponse#cache_metadata
72
- class CacheMetadata < ContextDev::Internal::Type::BaseModel
73
- # @!attribute age_ms
74
- # Age of the cached data in milliseconds. Zero for miss and zdr responses.
75
- #
76
- # @return [Integer]
77
- required :age_ms, Integer
78
-
79
- # @!attribute status
80
- # Whether the response was served from cache, required fresh work, or honored
81
- # zero-data-retention cache bypass.
82
- #
83
- # @return [Symbol, ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status]
84
- required :status, enum: -> { ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status }
85
-
86
- # @!method initialize(age_ms:, status:)
87
- # Some parameter documentations has been truncated, see
88
- # {ContextDev::Models::BrandRetrieveResponse::CacheMetadata} for more details.
89
- #
90
- # Cache outcome for this response. Composite responses are hits only when every
91
- # cache-controlled fetch contributing to the output was a hit; age_ms is the
92
- # oldest contributing hit.
93
- #
94
- # @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
95
- #
96
- # @param status [Symbol, ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
97
-
98
- # Whether the response was served from cache, required fresh work, or honored
99
- # zero-data-retention cache bypass.
100
- #
101
- # @see ContextDev::Models::BrandRetrieveResponse::CacheMetadata#status
102
- module Status
103
- extend ContextDev::Internal::Type::Enum
104
-
105
- HIT = :hit
106
- MISS = :miss
107
- ZDR = :zdr
108
-
109
- # @!method self.values
110
- # @return [Array<Symbol>]
111
- end
112
- end
113
70
 
114
71
  # @see ContextDev::Models::BrandRetrieveResponse#brand
115
72
  class Brand < ContextDev::Internal::Type::BaseModel
@@ -1190,6 +1147,49 @@ module ContextDev
1190
1147
  end
1191
1148
  end
1192
1149
 
1150
+ # @see ContextDev::Models::BrandRetrieveResponse#cache_metadata
1151
+ class CacheMetadata < ContextDev::Internal::Type::BaseModel
1152
+ # @!attribute age_ms
1153
+ # Age of the cached data in milliseconds. Zero for miss and zdr responses.
1154
+ #
1155
+ # @return [Integer]
1156
+ required :age_ms, Integer
1157
+
1158
+ # @!attribute status
1159
+ # Whether the response was served from cache, required fresh work, or honored
1160
+ # zero-data-retention cache bypass.
1161
+ #
1162
+ # @return [Symbol, ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status]
1163
+ required :status, enum: -> { ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status }
1164
+
1165
+ # @!method initialize(age_ms:, status:)
1166
+ # Some parameter documentations has been truncated, see
1167
+ # {ContextDev::Models::BrandRetrieveResponse::CacheMetadata} for more details.
1168
+ #
1169
+ # Cache outcome for this response. Composite responses are hits only when every
1170
+ # cache-controlled fetch contributing to the output was a hit; age_ms is the
1171
+ # oldest contributing hit.
1172
+ #
1173
+ # @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
1174
+ #
1175
+ # @param status [Symbol, ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
1176
+
1177
+ # Whether the response was served from cache, required fresh work, or honored
1178
+ # zero-data-retention cache bypass.
1179
+ #
1180
+ # @see ContextDev::Models::BrandRetrieveResponse::CacheMetadata#status
1181
+ module Status
1182
+ extend ContextDev::Internal::Type::Enum
1183
+
1184
+ HIT = :hit
1185
+ MISS = :miss
1186
+ ZDR = :zdr
1187
+
1188
+ # @!method self.values
1189
+ # @return [Array<Symbol>]
1190
+ end
1191
+ end
1192
+
1193
1193
  # @see ContextDev::Models::BrandRetrieveResponse#key_metadata
1194
1194
  class KeyMetadata < ContextDev::Internal::Type::BaseModel
1195
1195
  # @!attribute credits_consumed
@@ -4,6 +4,12 @@ module ContextDev
4
4
  module Models
5
5
  # @see ContextDev::Resources::Brand#retrieve_simplified
6
6
  class BrandRetrieveSimplifiedResponse < ContextDev::Internal::Type::BaseModel
7
+ # @!attribute brand
8
+ # Simplified brand information
9
+ #
10
+ # @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand]
11
+ required :brand, -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand }
12
+
7
13
  # @!attribute cache_metadata
8
14
  # Cache outcome for this response. Composite responses are hits only when every
9
15
  # cache-controlled fetch contributing to the output was a hit; age_ms is the
@@ -12,6 +18,12 @@ module ContextDev
12
18
  # @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata]
13
19
  required :cache_metadata, -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata }
14
20
 
21
+ # @!attribute code
22
+ # HTTP status code of the response
23
+ #
24
+ # @return [Integer]
25
+ required :code, Integer
26
+
15
27
  # @!attribute request_id
16
28
  # Unique id of this API call, also sent in the X-Request-Id response header. Quote
17
29
  # it when contacting support about a failed request.
@@ -19,17 +31,11 @@ module ContextDev
19
31
  # @return [String]
20
32
  required :request_id, String
21
33
 
22
- # @!attribute brand
23
- # Simplified brand information
24
- #
25
- # @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand, nil]
26
- optional :brand, -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand }
27
-
28
- # @!attribute code
29
- # HTTP status code of the response
34
+ # @!attribute status
35
+ # Status of the response, e.g., 'ok'
30
36
  #
31
- # @return [Integer, nil]
32
- optional :code, Integer
37
+ # @return [String]
38
+ required :status, String
33
39
 
34
40
  # @!attribute key_metadata
35
41
  # Credit usage, included whenever a valid API key is provided.
@@ -44,73 +50,23 @@ module ContextDev
44
50
  # @return [Boolean, nil]
45
51
  optional :partial, ContextDev::Internal::Type::Boolean
46
52
 
47
- # @!attribute status
48
- # Status of the response, e.g., 'ok'
49
- #
50
- # @return [String, nil]
51
- optional :status, String
52
-
53
- # @!method initialize(cache_metadata:, request_id:, brand: nil, code: nil, key_metadata: nil, partial: nil, status: nil)
53
+ # @!method initialize(brand:, cache_metadata:, code:, request_id:, status:, key_metadata: nil, partial: nil)
54
54
  # Some parameter documentations has been truncated, see
55
55
  # {ContextDev::Models::BrandRetrieveSimplifiedResponse} for more details.
56
56
  #
57
+ # @param brand [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand] Simplified brand information
58
+ #
57
59
  # @param cache_metadata [ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
58
60
  #
59
- # @param request_id [String] Unique id of this API call, also sent in the X-Request-Id response header. Quote
61
+ # @param code [Integer] HTTP status code of the response
60
62
  #
61
- # @param brand [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand] Simplified brand information
63
+ # @param request_id [String] Unique id of this API call, also sent in the X-Request-Id response header. Quote
62
64
  #
63
- # @param code [Integer] HTTP status code of the response
65
+ # @param status [String] Status of the response, e.g., 'ok'
64
66
  #
65
67
  # @param key_metadata [ContextDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
66
68
  #
67
69
  # @param partial [Boolean] True when the timeout ended processing and only completed brand data is returned
68
- #
69
- # @param status [String] Status of the response, e.g., 'ok'
70
-
71
- # @see ContextDev::Models::BrandRetrieveSimplifiedResponse#cache_metadata
72
- class CacheMetadata < ContextDev::Internal::Type::BaseModel
73
- # @!attribute age_ms
74
- # Age of the cached data in milliseconds. Zero for miss and zdr responses.
75
- #
76
- # @return [Integer]
77
- required :age_ms, Integer
78
-
79
- # @!attribute status
80
- # Whether the response was served from cache, required fresh work, or honored
81
- # zero-data-retention cache bypass.
82
- #
83
- # @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status]
84
- required :status, enum: -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status }
85
-
86
- # @!method initialize(age_ms:, status:)
87
- # Some parameter documentations has been truncated, see
88
- # {ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata} for more
89
- # details.
90
- #
91
- # Cache outcome for this response. Composite responses are hits only when every
92
- # cache-controlled fetch contributing to the output was a hit; age_ms is the
93
- # oldest contributing hit.
94
- #
95
- # @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
96
- #
97
- # @param status [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
98
-
99
- # Whether the response was served from cache, required fresh work, or honored
100
- # zero-data-retention cache bypass.
101
- #
102
- # @see ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata#status
103
- module Status
104
- extend ContextDev::Internal::Type::Enum
105
-
106
- HIT = :hit
107
- MISS = :miss
108
- ZDR = :zdr
109
-
110
- # @!method self.values
111
- # @return [Array<Symbol>]
112
- end
113
- end
114
70
 
115
71
  # @see ContextDev::Models::BrandRetrieveSimplifiedResponse#brand
116
72
  class Brand < ContextDev::Internal::Type::BaseModel
@@ -415,6 +371,50 @@ module ContextDev
415
371
  end
416
372
  end
417
373
 
374
+ # @see ContextDev::Models::BrandRetrieveSimplifiedResponse#cache_metadata
375
+ class CacheMetadata < ContextDev::Internal::Type::BaseModel
376
+ # @!attribute age_ms
377
+ # Age of the cached data in milliseconds. Zero for miss and zdr responses.
378
+ #
379
+ # @return [Integer]
380
+ required :age_ms, Integer
381
+
382
+ # @!attribute status
383
+ # Whether the response was served from cache, required fresh work, or honored
384
+ # zero-data-retention cache bypass.
385
+ #
386
+ # @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status]
387
+ required :status, enum: -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status }
388
+
389
+ # @!method initialize(age_ms:, status:)
390
+ # Some parameter documentations has been truncated, see
391
+ # {ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata} for more
392
+ # details.
393
+ #
394
+ # Cache outcome for this response. Composite responses are hits only when every
395
+ # cache-controlled fetch contributing to the output was a hit; age_ms is the
396
+ # oldest contributing hit.
397
+ #
398
+ # @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
399
+ #
400
+ # @param status [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
401
+
402
+ # Whether the response was served from cache, required fresh work, or honored
403
+ # zero-data-retention cache bypass.
404
+ #
405
+ # @see ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata#status
406
+ module Status
407
+ extend ContextDev::Internal::Type::Enum
408
+
409
+ HIT = :hit
410
+ MISS = :miss
411
+ ZDR = :zdr
412
+
413
+ # @!method self.values
414
+ # @return [Array<Symbol>]
415
+ end
416
+ end
417
+
418
418
  # @see ContextDev::Models::BrandRetrieveSimplifiedResponse#key_metadata
419
419
  class KeyMetadata < ContextDev::Internal::Type::BaseModel
420
420
  # @!attribute credits_consumed
@@ -43,7 +43,17 @@ module ContextDev
43
43
  # @return [ContextDev::Models::IndustryRetrieveNaicsParams::TimeoutOpts, nil]
44
44
  optional :timeout_opts, -> { ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts }
45
45
 
46
- # @!method initialize(input:, max_results: nil, min_results: nil, tags: nil, timeout_opts: nil, request_options: {})
46
+ # @!attribute zdr
47
+ # Set to enabled to bypass shared caches and omit request and response content
48
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
49
+ # omitted. Requires zero data retention to be enabled for your organization
50
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
51
+ # Successful ZDR responses include X-Context-ZDR: true.
52
+ #
53
+ # @return [Symbol, ContextDev::Models::IndustryRetrieveNaicsParams::Zdr, nil]
54
+ optional :zdr, enum: -> { ContextDev::IndustryRetrieveNaicsParams::Zdr }
55
+
56
+ # @!method initialize(input:, max_results: nil, min_results: nil, tags: nil, timeout_opts: nil, zdr: nil, request_options: {})
47
57
  # Some parameter documentations has been truncated, see
48
58
  # {ContextDev::Models::IndustryRetrieveNaicsParams} for more details.
49
59
  #
@@ -57,6 +67,8 @@ module ContextDev
57
67
  #
58
68
  # @param timeout_opts [ContextDev::Models::IndustryRetrieveNaicsParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
59
69
  #
70
+ # @param zdr [Symbol, ContextDev::Models::IndustryRetrieveNaicsParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
71
+ #
60
72
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
61
73
 
62
74
  class TimeoutOpts < ContextDev::Internal::Type::BaseModel
@@ -103,6 +115,21 @@ module ContextDev
103
115
  # @return [Array<Symbol>]
104
116
  end
105
117
  end
118
+
119
+ # Set to enabled to bypass shared caches and omit request and response content
120
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
121
+ # omitted. Requires zero data retention to be enabled for your organization
122
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
123
+ # Successful ZDR responses include X-Context-ZDR: true.
124
+ module Zdr
125
+ extend ContextDev::Internal::Type::Enum
126
+
127
+ ENABLED = :enabled
128
+ DISABLED = :disabled
129
+
130
+ # @!method self.values
131
+ # @return [Array<Symbol>]
132
+ end
106
133
  end
107
134
  end
108
135
  end