context.dev 2.17.1 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/client.rb +0 -4
  5. data/lib/context_dev/models/industry_retrieve_naics_params.rb +28 -1
  6. data/lib/context_dev/models/industry_retrieve_sic_params.rb +28 -1
  7. data/lib/context_dev/models/monitor_retrieve_run_params.rb +26 -0
  8. data/lib/context_dev/models/monitor_retrieve_run_response.rb +232 -0
  9. data/lib/context_dev/models/monitor_rotate_webhook_secret_params.rb +20 -0
  10. data/lib/context_dev/models/monitor_rotate_webhook_secret_response.rb +765 -0
  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_styleguide_params.rb +30 -3
  16. data/lib/context_dev/models/{web_web_scrape_sitemap_params.rb → web_map_urls_params.rb} +22 -20
  17. data/lib/context_dev/models/web_map_urls_response.rb +123 -0
  18. data/lib/context_dev/models/web_scrape_params.rb +906 -0
  19. data/lib/context_dev/models/web_scrape_response.rb +659 -0
  20. data/lib/context_dev/models/web_screenshot_params.rb +25 -9
  21. data/lib/context_dev/models/web_screenshot_response.rb +3 -3
  22. data/lib/context_dev/models/web_search_params.rb +30 -3
  23. data/lib/context_dev/models.rb +8 -20
  24. data/lib/context_dev/resources/brand.rb +0 -36
  25. data/lib/context_dev/resources/industry.rb +6 -2
  26. data/lib/context_dev/resources/monitors.rb +47 -0
  27. data/lib/context_dev/resources/people.rb +3 -1
  28. data/lib/context_dev/resources/web.rb +116 -413
  29. data/lib/context_dev/version.rb +1 -1
  30. data/lib/context_dev.rb +8 -21
  31. data/rbi/context_dev/client.rbi +0 -3
  32. data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +59 -0
  33. data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +57 -0
  34. data/rbi/context_dev/models/monitor_retrieve_run_params.rbi +46 -0
  35. data/rbi/context_dev/models/monitor_retrieve_run_response.rbi +452 -0
  36. data/rbi/context_dev/models/monitor_rotate_webhook_secret_params.rbi +38 -0
  37. data/rbi/context_dev/models/monitor_rotate_webhook_secret_response.rbi +1367 -0
  38. data/rbi/context_dev/models/parse_handle_params.rbi +12 -9
  39. data/rbi/context_dev/models/person_enrich_params.rbi +45 -0
  40. data/rbi/context_dev/models/web_answers_params.rbi +45 -0
  41. data/rbi/context_dev/models/web_extract_competitors_params.rbi +59 -0
  42. data/rbi/context_dev/models/web_extract_styleguide_params.rbi +62 -3
  43. data/rbi/context_dev/models/{web_web_scrape_sitemap_params.rbi → web_map_urls_params.rbi} +35 -54
  44. data/rbi/context_dev/models/web_map_urls_response.rbi +226 -0
  45. data/rbi/context_dev/models/web_scrape_params.rbi +2000 -0
  46. data/rbi/context_dev/models/{web_web_scrape_html_response.rbi → web_scrape_response.rbi} +550 -418
  47. data/rbi/context_dev/models/web_screenshot_params.rbi +38 -12
  48. data/rbi/context_dev/models/web_screenshot_response.rbi +4 -4
  49. data/rbi/context_dev/models/web_search_params.rbi +48 -3
  50. data/rbi/context_dev/models.rbi +9 -21
  51. data/rbi/context_dev/resources/brand.rbi +0 -35
  52. data/rbi/context_dev/resources/industry.rbi +14 -0
  53. data/rbi/context_dev/resources/monitors.rbi +24 -0
  54. data/rbi/context_dev/resources/parse.rbi +4 -4
  55. data/rbi/context_dev/resources/people.rbi +7 -0
  56. data/rbi/context_dev/resources/web.rbi +166 -533
  57. data/sig/context_dev/client.rbs +0 -2
  58. data/sig/context_dev/models/industry_retrieve_naics_params.rbs +21 -1
  59. data/sig/context_dev/models/industry_retrieve_sic_params.rbs +21 -1
  60. data/sig/context_dev/models/monitor_retrieve_run_params.rbs +28 -0
  61. data/sig/context_dev/models/monitor_retrieve_run_response.rbs +182 -0
  62. data/sig/context_dev/models/monitor_rotate_webhook_secret_params.rbs +23 -0
  63. data/sig/context_dev/models/monitor_rotate_webhook_secret_response.rbs +545 -0
  64. data/sig/context_dev/models/person_enrich_params.rbs +21 -1
  65. data/sig/context_dev/models/web_answers_params.rbs +21 -1
  66. data/sig/context_dev/models/web_extract_competitors_params.rbs +21 -1
  67. data/sig/context_dev/models/web_extract_styleguide_params.rbs +21 -1
  68. data/sig/context_dev/models/{web_web_scrape_sitemap_params.rbs → web_map_urls_params.rbs} +22 -22
  69. data/sig/context_dev/models/web_map_urls_response.rbs +125 -0
  70. data/sig/context_dev/models/web_scrape_params.rbs +834 -0
  71. data/sig/context_dev/models/web_scrape_response.rbs +552 -0
  72. data/sig/context_dev/models/web_screenshot_params.rbs +7 -0
  73. data/sig/context_dev/models/web_search_params.rbs +21 -1
  74. data/sig/context_dev/models.rbs +8 -20
  75. data/sig/context_dev/resources/brand.rbs +0 -9
  76. data/sig/context_dev/resources/industry.rbs +2 -0
  77. data/sig/context_dev/resources/monitors.rbs +11 -0
  78. data/sig/context_dev/resources/people.rbs +1 -0
  79. data/sig/context_dev/resources/web.rbs +34 -108
  80. metadata +26 -65
  81. data/lib/context_dev/models/ai_extract_product_params.rb +0 -98
  82. data/lib/context_dev/models/ai_extract_product_response.rb +0 -352
  83. data/lib/context_dev/models/ai_extract_products_params.rb +0 -233
  84. data/lib/context_dev/models/ai_extract_products_response.rb +0 -320
  85. data/lib/context_dev/models/brand_retrieve_simplified_params.rb +0 -120
  86. data/lib/context_dev/models/brand_retrieve_simplified_response.rb +0 -441
  87. data/lib/context_dev/models/web_extract_fonts_params.rb +0 -114
  88. data/lib/context_dev/models/web_extract_fonts_response.rb +0 -291
  89. data/lib/context_dev/models/web_extract_params.rb +0 -392
  90. data/lib/context_dev/models/web_extract_response.rb +0 -287
  91. data/lib/context_dev/models/web_web_scrape_bytes_params.rb +0 -344
  92. data/lib/context_dev/models/web_web_scrape_bytes_response.rb +0 -135
  93. data/lib/context_dev/models/web_web_scrape_html_params.rb +0 -633
  94. data/lib/context_dev/models/web_web_scrape_html_response.rb +0 -588
  95. data/lib/context_dev/models/web_web_scrape_images_params.rb +0 -346
  96. data/lib/context_dev/models/web_web_scrape_images_response.rb +0 -409
  97. data/lib/context_dev/models/web_web_scrape_md_params.rb +0 -668
  98. data/lib/context_dev/models/web_web_scrape_md_response.rb +0 -567
  99. data/lib/context_dev/models/web_web_scrape_sitemap_response.rb +0 -144
  100. data/lib/context_dev/resources/ai.rb +0 -69
  101. data/rbi/context_dev/models/ai_extract_product_params.rbi +0 -199
  102. data/rbi/context_dev/models/ai_extract_product_response.rbi +0 -696
  103. data/rbi/context_dev/models/ai_extract_products_params.rbi +0 -490
  104. data/rbi/context_dev/models/ai_extract_products_response.rbi +0 -623
  105. data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +0 -256
  106. data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +0 -1040
  107. data/rbi/context_dev/models/web_extract_fonts_params.rbi +0 -223
  108. data/rbi/context_dev/models/web_extract_fonts_response.rbi +0 -563
  109. data/rbi/context_dev/models/web_extract_params.rbi +0 -736
  110. data/rbi/context_dev/models/web_extract_response.rbi +0 -512
  111. data/rbi/context_dev/models/web_web_scrape_bytes_params.rbi +0 -699
  112. data/rbi/context_dev/models/web_web_scrape_bytes_response.rbi +0 -238
  113. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +0 -1217
  114. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +0 -671
  115. data/rbi/context_dev/models/web_web_scrape_images_response.rbi +0 -910
  116. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +0 -1049
  117. data/rbi/context_dev/models/web_web_scrape_md_response.rbi +0 -1088
  118. data/rbi/context_dev/models/web_web_scrape_sitemap_response.rbi +0 -258
  119. data/rbi/context_dev/resources/ai.rbi +0 -56
  120. data/sig/context_dev/models/ai_extract_product_params.rbs +0 -86
  121. data/sig/context_dev/models/ai_extract_product_response.rbs +0 -273
  122. data/sig/context_dev/models/ai_extract_products_params.rbs +0 -202
  123. data/sig/context_dev/models/ai_extract_products_response.rbs +0 -252
  124. data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +0 -104
  125. data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +0 -413
  126. data/sig/context_dev/models/web_extract_fonts_params.rbs +0 -93
  127. data/sig/context_dev/models/web_extract_fonts_response.rbs +0 -230
  128. data/sig/context_dev/models/web_extract_params.rbs +0 -304
  129. data/sig/context_dev/models/web_extract_response.rbs +0 -239
  130. data/sig/context_dev/models/web_web_scrape_bytes_params.rbs +0 -531
  131. data/sig/context_dev/models/web_web_scrape_bytes_response.rbs +0 -108
  132. data/sig/context_dev/models/web_web_scrape_html_params.rbs +0 -730
  133. data/sig/context_dev/models/web_web_scrape_html_response.rbs +0 -495
  134. data/sig/context_dev/models/web_web_scrape_images_params.rbs +0 -261
  135. data/sig/context_dev/models/web_web_scrape_images_response.rbs +0 -371
  136. data/sig/context_dev/models/web_web_scrape_md_params.rbs +0 -758
  137. data/sig/context_dev/models/web_web_scrape_md_response.rbs +0 -465
  138. data/sig/context_dev/models/web_web_scrape_sitemap_response.rbs +0 -117
  139. data/sig/context_dev/resources/ai.rbs +0 -20
@@ -1,441 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ContextDev
4
- module Models
5
- # @see ContextDev::Resources::Brand#retrieve_simplified
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
-
13
- # @!attribute cache_metadata
14
- # Cache outcome for this response. Composite responses are hits only when every
15
- # cache-controlled fetch contributing to the output was a hit; age_ms is the
16
- # oldest contributing hit.
17
- #
18
- # @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata]
19
- required :cache_metadata, -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata }
20
-
21
- # @!attribute code
22
- # HTTP status code of the response
23
- #
24
- # @return [Integer]
25
- required :code, Integer
26
-
27
- # @!attribute request_id
28
- # Unique id of this API call, also sent in the X-Request-Id response header. Quote
29
- # it when contacting support about a failed request.
30
- #
31
- # @return [String]
32
- required :request_id, String
33
-
34
- # @!attribute status
35
- # Status of the response, e.g., 'ok'
36
- #
37
- # @return [String]
38
- required :status, String
39
-
40
- # @!attribute key_metadata
41
- # Credit usage, included whenever a valid API key is provided.
42
- #
43
- # @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata, nil]
44
- optional :key_metadata, -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata }
45
-
46
- # @!attribute partial
47
- # True when the timeout ended processing and only completed brand data is
48
- # returned.
49
- #
50
- # @return [Boolean, nil]
51
- optional :partial, ContextDev::Internal::Type::Boolean
52
-
53
- # @!method initialize(brand:, cache_metadata:, code:, request_id:, status:, key_metadata: nil, partial: nil)
54
- # Some parameter documentations has been truncated, see
55
- # {ContextDev::Models::BrandRetrieveSimplifiedResponse} for more details.
56
- #
57
- # @param brand [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand] Simplified brand information
58
- #
59
- # @param cache_metadata [ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
60
- #
61
- # @param code [Integer] HTTP status code of the response
62
- #
63
- # @param request_id [String] Unique id of this API call, also sent in the X-Request-Id response header. Quote
64
- #
65
- # @param status [String] Status of the response, e.g., 'ok'
66
- #
67
- # @param key_metadata [ContextDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
68
- #
69
- # @param partial [Boolean] True when the timeout ended processing and only completed brand data is returned
70
-
71
- # @see ContextDev::Models::BrandRetrieveSimplifiedResponse#brand
72
- class Brand < ContextDev::Internal::Type::BaseModel
73
- # @!attribute backdrops
74
- # An array of backdrop images for the brand
75
- #
76
- # @return [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop>, nil]
77
- optional :backdrops,
78
- -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop] }
79
-
80
- # @!attribute colors
81
- # An array of brand colors
82
- #
83
- # @return [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color>, nil]
84
- optional :colors,
85
- -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color] }
86
-
87
- # @!attribute domain
88
- # The domain name of the brand
89
- #
90
- # @return [String, nil]
91
- optional :domain, String
92
-
93
- # @!attribute logos
94
- # An array of logos associated with the brand
95
- #
96
- # @return [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo>, nil]
97
- optional :logos,
98
- -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo] }
99
-
100
- # @!attribute title
101
- # The title or name of the brand
102
- #
103
- # @return [String, nil]
104
- optional :title, String
105
-
106
- # @!method initialize(backdrops: nil, colors: nil, domain: nil, logos: nil, title: nil)
107
- # Simplified brand information
108
- #
109
- # @param backdrops [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop>] An array of backdrop images for the brand
110
- #
111
- # @param colors [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color>] An array of brand colors
112
- #
113
- # @param domain [String] The domain name of the brand
114
- #
115
- # @param logos [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo>] An array of logos associated with the brand
116
- #
117
- # @param title [String] The title or name of the brand
118
-
119
- class Backdrop < ContextDev::Internal::Type::BaseModel
120
- # @!attribute colors
121
- # Array of colors in the backdrop image
122
- #
123
- # @return [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color>, nil]
124
- optional :colors,
125
- -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color] }
126
-
127
- # @!attribute resolution
128
- # Resolution of the backdrop image
129
- #
130
- # @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution, nil]
131
- optional :resolution,
132
- -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution }
133
-
134
- # @!attribute url
135
- # URL of the backdrop image
136
- #
137
- # @return [String, nil]
138
- optional :url, String
139
-
140
- # @!method initialize(colors: nil, resolution: nil, url: nil)
141
- # @param colors [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color>] Array of colors in the backdrop image
142
- #
143
- # @param resolution [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution] Resolution of the backdrop image
144
- #
145
- # @param url [String] URL of the backdrop image
146
-
147
- class Color < ContextDev::Internal::Type::BaseModel
148
- # @!attribute hex
149
- # Color in hexadecimal format
150
- #
151
- # @return [String, nil]
152
- optional :hex, String
153
-
154
- # @!attribute name
155
- # Name of the color
156
- #
157
- # @return [String, nil]
158
- optional :name, String
159
-
160
- # @!method initialize(hex: nil, name: nil)
161
- # @param hex [String] Color in hexadecimal format
162
- #
163
- # @param name [String] Name of the color
164
- end
165
-
166
- # @see ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop#resolution
167
- class Resolution < ContextDev::Internal::Type::BaseModel
168
- # @!attribute aspect_ratio
169
- # Aspect ratio of the image (width/height)
170
- #
171
- # @return [Float, nil]
172
- optional :aspect_ratio, Float
173
-
174
- # @!attribute height
175
- # Height of the image in pixels
176
- #
177
- # @return [Integer, nil]
178
- optional :height, Integer
179
-
180
- # @!attribute width
181
- # Width of the image in pixels
182
- #
183
- # @return [Integer, nil]
184
- optional :width, Integer
185
-
186
- # @!method initialize(aspect_ratio: nil, height: nil, width: nil)
187
- # Resolution of the backdrop image
188
- #
189
- # @param aspect_ratio [Float] Aspect ratio of the image (width/height)
190
- #
191
- # @param height [Integer] Height of the image in pixels
192
- #
193
- # @param width [Integer] Width of the image in pixels
194
- end
195
- end
196
-
197
- class Color < ContextDev::Internal::Type::BaseModel
198
- # @!attribute hex
199
- # Color in hexadecimal format
200
- #
201
- # @return [String, nil]
202
- optional :hex, String
203
-
204
- # @!attribute name
205
- # Name of the color
206
- #
207
- # @return [String, nil]
208
- optional :name, String
209
-
210
- # @!attribute source
211
- # Where the color was observed: 'site' colors come from the website's own theme
212
- # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from
213
- # logo image pixels.
214
- #
215
- # @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source, nil]
216
- optional :source, enum: -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source }
217
-
218
- # @!method initialize(hex: nil, name: nil, source: nil)
219
- # Some parameter documentations has been truncated, see
220
- # {ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color} for more
221
- # details.
222
- #
223
- # @param hex [String] Color in hexadecimal format
224
- #
225
- # @param name [String] Name of the color
226
- #
227
- # @param source [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source] Where the color was observed: 'site' colors come from the website's own theme si
228
-
229
- # Where the color was observed: 'site' colors come from the website's own theme
230
- # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from
231
- # logo image pixels.
232
- #
233
- # @see ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color#source
234
- module Source
235
- extend ContextDev::Internal::Type::Enum
236
-
237
- SITE = :site
238
- LOGO = :logo
239
-
240
- # @!method self.values
241
- # @return [Array<Symbol>]
242
- end
243
- end
244
-
245
- class Logo < ContextDev::Internal::Type::BaseModel
246
- # @!attribute colors
247
- # Array of colors in the logo
248
- #
249
- # @return [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Color>, nil]
250
- optional :colors,
251
- -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Color] }
252
-
253
- # @!attribute mode
254
- # Indicates when this logo is best used: 'light' = best for light mode, 'dark' =
255
- # best for dark mode, 'has_opaque_background' = can be used for either as image
256
- # has its own background
257
- #
258
- # @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Mode, nil]
259
- optional :mode, enum: -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Mode }
260
-
261
- # @!attribute resolution
262
- # Resolution of the logo image
263
- #
264
- # @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Resolution, nil]
265
- optional :resolution, -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Resolution }
266
-
267
- # @!attribute type
268
- # Type of the logo based on resolution (e.g., 'icon', 'logo')
269
- #
270
- # @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Type, nil]
271
- optional :type, enum: -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Type }
272
-
273
- # @!attribute url
274
- # CDN hosted url of the logo (ready for display)
275
- #
276
- # @return [String, nil]
277
- optional :url, String
278
-
279
- # @!method initialize(colors: nil, mode: nil, resolution: nil, type: nil, url: nil)
280
- # Some parameter documentations has been truncated, see
281
- # {ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo} for more
282
- # details.
283
- #
284
- # @param colors [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Color>] Array of colors in the logo
285
- #
286
- # @param mode [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Mode] Indicates when this logo is best used: 'light' = best for light mode, 'dark' = b
287
- #
288
- # @param resolution [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Resolution] Resolution of the logo image
289
- #
290
- # @param type [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Type] Type of the logo based on resolution (e.g., 'icon', 'logo')
291
- #
292
- # @param url [String] CDN hosted url of the logo (ready for display)
293
-
294
- class Color < ContextDev::Internal::Type::BaseModel
295
- # @!attribute hex
296
- # Color in hexadecimal format
297
- #
298
- # @return [String, nil]
299
- optional :hex, String
300
-
301
- # @!attribute name
302
- # Name of the color
303
- #
304
- # @return [String, nil]
305
- optional :name, String
306
-
307
- # @!method initialize(hex: nil, name: nil)
308
- # @param hex [String] Color in hexadecimal format
309
- #
310
- # @param name [String] Name of the color
311
- end
312
-
313
- # Indicates when this logo is best used: 'light' = best for light mode, 'dark' =
314
- # best for dark mode, 'has_opaque_background' = can be used for either as image
315
- # has its own background
316
- #
317
- # @see ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo#mode
318
- module Mode
319
- extend ContextDev::Internal::Type::Enum
320
-
321
- LIGHT = :light
322
- DARK = :dark
323
- HAS_OPAQUE_BACKGROUND = :has_opaque_background
324
-
325
- # @!method self.values
326
- # @return [Array<Symbol>]
327
- end
328
-
329
- # @see ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo#resolution
330
- class Resolution < ContextDev::Internal::Type::BaseModel
331
- # @!attribute aspect_ratio
332
- # Aspect ratio of the image (width/height)
333
- #
334
- # @return [Float, nil]
335
- optional :aspect_ratio, Float
336
-
337
- # @!attribute height
338
- # Height of the image in pixels
339
- #
340
- # @return [Integer, nil]
341
- optional :height, Integer
342
-
343
- # @!attribute width
344
- # Width of the image in pixels
345
- #
346
- # @return [Integer, nil]
347
- optional :width, Integer
348
-
349
- # @!method initialize(aspect_ratio: nil, height: nil, width: nil)
350
- # Resolution of the logo image
351
- #
352
- # @param aspect_ratio [Float] Aspect ratio of the image (width/height)
353
- #
354
- # @param height [Integer] Height of the image in pixels
355
- #
356
- # @param width [Integer] Width of the image in pixels
357
- end
358
-
359
- # Type of the logo based on resolution (e.g., 'icon', 'logo')
360
- #
361
- # @see ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo#type
362
- module Type
363
- extend ContextDev::Internal::Type::Enum
364
-
365
- ICON = :icon
366
- LOGO = :logo
367
-
368
- # @!method self.values
369
- # @return [Array<Symbol>]
370
- end
371
- end
372
- end
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
- # @see ContextDev::Models::BrandRetrieveSimplifiedResponse#key_metadata
419
- class KeyMetadata < ContextDev::Internal::Type::BaseModel
420
- # @!attribute credits_consumed
421
- # Credits used by this request.
422
- #
423
- # @return [Integer]
424
- required :credits_consumed, Integer
425
-
426
- # @!attribute credits_remaining
427
- # Credits remaining for your organization.
428
- #
429
- # @return [Integer]
430
- required :credits_remaining, Integer
431
-
432
- # @!method initialize(credits_consumed:, credits_remaining:)
433
- # Credit usage, included whenever a valid API key is provided.
434
- #
435
- # @param credits_consumed [Integer] Credits used by this request.
436
- #
437
- # @param credits_remaining [Integer] Credits remaining for your organization.
438
- end
439
- end
440
- end
441
- end
@@ -1,114 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ContextDev
4
- module Models
5
- # @see ContextDev::Resources::Web#extract_fonts
6
- class WebExtractFontsParams < ContextDev::Internal::Type::BaseModel
7
- extend ContextDev::Internal::Type::RequestParameters::Converter
8
- include ContextDev::Internal::Type::RequestParameters
9
-
10
- # @!attribute direct_url
11
- # A specific URL to fetch fonts from directly, bypassing domain resolution (e.g.,
12
- # 'https://example.com/design-system'). When provided, fonts are extracted from
13
- # this exact URL. You must provide either 'domain' or 'directUrl', but not both.
14
- #
15
- # @return [String, nil]
16
- optional :direct_url, String
17
-
18
- # @!attribute domain
19
- # Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
20
- # domain will be automatically normalized and validated. You must provide either
21
- # 'domain' or 'directUrl', but not both.
22
- #
23
- # @return [String, nil]
24
- optional :domain, String
25
-
26
- # @!attribute max_age_ms
27
- # Maximum age in milliseconds for cached brand data before the API performs a hard
28
- # refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
29
- # refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
30
- # are clamped to 1 year.
31
- #
32
- # @return [Integer, nil]
33
- optional :max_age_ms, Integer, nil?: true
34
-
35
- # @!attribute tags
36
- # Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
37
- # characters.
38
- #
39
- # @return [Array<String>, nil]
40
- optional :tags, ContextDev::Internal::Type::ArrayOf[String]
41
-
42
- # @!attribute timeout_opts
43
- # Optional request deadline and behavior on timeout. For GET requests, use
44
- # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
45
- # timeoutOpts object.
46
- #
47
- # @return [ContextDev::Models::WebExtractFontsParams::TimeoutOpts, nil]
48
- optional :timeout_opts, -> { ContextDev::WebExtractFontsParams::TimeoutOpts }
49
-
50
- # @!method initialize(direct_url: nil, domain: nil, max_age_ms: nil, tags: nil, timeout_opts: nil, request_options: {})
51
- # Some parameter documentations has been truncated, see
52
- # {ContextDev::Models::WebExtractFontsParams} for more details.
53
- #
54
- # @param direct_url [String] A specific URL to fetch fonts from directly, bypassing domain resolution (e.g.,
55
- #
56
- # @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai
57
- #
58
- # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard
59
- #
60
- # @param tags [Array<String>] Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 charac
61
- #
62
- # @param timeout_opts [ContextDev::Models::WebExtractFontsParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
63
- #
64
- # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
65
-
66
- class TimeoutOpts < ContextDev::Internal::Type::BaseModel
67
- # @!attribute milliseconds
68
- # Request deadline in milliseconds. Maximum: 300000 (5 minutes).
69
- #
70
- # @return [Integer]
71
- required :milliseconds, Integer
72
-
73
- # @!attribute behavior
74
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
75
- # credits. "return-partial" returns usable results collected so far; if none are
76
- # available, the request still fails without charging credits. Partial results are
77
- # not cached as complete results. "return-partial" requires milliseconds of at
78
- # least 15000.
79
- #
80
- # @return [Symbol, ContextDev::Models::WebExtractFontsParams::TimeoutOpts::Behavior, nil]
81
- optional :behavior, enum: -> { ContextDev::WebExtractFontsParams::TimeoutOpts::Behavior }
82
-
83
- # @!method initialize(milliseconds:, behavior: nil)
84
- # Some parameter documentations has been truncated, see
85
- # {ContextDev::Models::WebExtractFontsParams::TimeoutOpts} for more details.
86
- #
87
- # Optional request deadline and behavior on timeout. For GET requests, use
88
- # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
89
- # timeoutOpts object.
90
- #
91
- # @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
92
- #
93
- # @param behavior [Symbol, ContextDev::Models::WebExtractFontsParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
94
-
95
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
96
- # credits. "return-partial" returns usable results collected so far; if none are
97
- # available, the request still fails without charging credits. Partial results are
98
- # not cached as complete results. "return-partial" requires milliseconds of at
99
- # least 15000.
100
- #
101
- # @see ContextDev::Models::WebExtractFontsParams::TimeoutOpts#behavior
102
- module Behavior
103
- extend ContextDev::Internal::Type::Enum
104
-
105
- FAIL = :fail
106
- RETURN_PARTIAL = :"return-partial"
107
-
108
- # @!method self.values
109
- # @return [Array<Symbol>]
110
- end
111
- end
112
- end
113
- end
114
- end