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
@@ -0,0 +1,974 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ContextDev
4
+ module Models
5
+ # @see ContextDev::Resources::Web#scrape
6
+ class WebScrapeResponse < ContextDev::Internal::Type::BaseModel
7
+ # @!attribute bytes
8
+ # Original HTTP response body. Waiting, actions, and content filters never change
9
+ # it.
10
+ #
11
+ # @return [ContextDev::Models::WebScrapeResponse::Bytes]
12
+ required :bytes, -> { ContextDev::Models::WebScrapeResponse::Bytes }
13
+
14
+ # @!attribute cache_metadata
15
+ # Cache outcome for this response. Composite responses are hits only when every
16
+ # cache-controlled fetch contributing to the output was a hit; age_ms is the
17
+ # oldest contributing hit.
18
+ #
19
+ # @return [ContextDev::Models::WebScrapeResponse::CacheMetadata]
20
+ required :cache_metadata, -> { ContextDev::Models::WebScrapeResponse::CacheMetadata }
21
+
22
+ # @!attribute highlights
23
+ # Plain-text passages relevant to highlightsParams.query, in page order, each
24
+ # prefixed with its section heading in square brackets. Empty when the page has no
25
+ # text.
26
+ #
27
+ # @return [ContextDev::Models::WebScrapeResponse::Highlights]
28
+ required :highlights, -> { ContextDev::Models::WebScrapeResponse::Highlights }
29
+
30
+ # @!attribute html
31
+ # Rendered HTML after content filters.
32
+ #
33
+ # @return [ContextDev::Models::WebScrapeResponse::HTML]
34
+ required :html, -> { ContextDev::Models::WebScrapeResponse::HTML }
35
+
36
+ # @!attribute images
37
+ # Images after content filters. Empty when none are found.
38
+ #
39
+ # @return [ContextDev::Models::WebScrapeResponse::Images]
40
+ required :images, -> { ContextDev::Models::WebScrapeResponse::Images }
41
+
42
+ # @!attribute json
43
+ # Page data extracted into jsonParams.schema, after shared content filters. Values
44
+ # are grounded in the page; optional fields the page does not state are omitted,
45
+ # or null when their type allows null. An empty object when the filters leave no
46
+ # text.
47
+ #
48
+ # @return [ContextDev::Models::WebScrapeResponse::Json]
49
+ required :json, -> { ContextDev::Models::WebScrapeResponse::Json }
50
+
51
+ # @!attribute markdown
52
+ # Markdown after content filters.
53
+ #
54
+ # @return [ContextDev::Models::WebScrapeResponse::Markdown]
55
+ required :markdown, -> { ContextDev::Models::WebScrapeResponse::Markdown }
56
+
57
+ # @!attribute metadata
58
+ # Page details, when available.
59
+ #
60
+ # @return [ContextDev::Models::WebScrapeResponse::Metadata]
61
+ required :metadata, -> { ContextDev::Models::WebScrapeResponse::Metadata }
62
+
63
+ # @!attribute parsed
64
+ # Fields produced by parseParams.rules, after shared content filters.
65
+ #
66
+ # @return [ContextDev::Models::WebScrapeResponse::Parsed]
67
+ required :parsed, -> { ContextDev::Models::WebScrapeResponse::Parsed }
68
+
69
+ # @!attribute product
70
+ # Product detail page classification and the extracted product.
71
+ #
72
+ # @return [ContextDev::Models::WebScrapeResponse::Product]
73
+ required :product, -> { ContextDev::Models::WebScrapeResponse::Product }
74
+
75
+ # @!attribute request_id
76
+ # Unique id of this API call, also sent in the X-Request-Id response header. Quote
77
+ # it when contacting support about a failed request.
78
+ #
79
+ # @return [String]
80
+ required :request_id, String
81
+
82
+ # @!attribute screenshot
83
+ # An image data URL. Use directly as an image src.
84
+ #
85
+ # @return [ContextDev::Models::WebScrapeResponse::Screenshot]
86
+ required :screenshot, -> { ContextDev::Models::WebScrapeResponse::Screenshot }
87
+
88
+ # @!attribute url
89
+ # Final URL after redirects and browser actions.
90
+ #
91
+ # @return [String]
92
+ required :url, String
93
+
94
+ # @!attribute is_partial
95
+ # Present when return-partial captures a page that is still loading, returns
96
+ # images before image processing finishes, or cuts product AI extraction short.
97
+ # Also present if the optional product AI fallback fails. Partial responses are
98
+ # not cached.
99
+ #
100
+ # @return [Boolean, ContextDev::Models::WebScrapeResponse::IsPartial, nil]
101
+ optional :is_partial, enum: -> { ContextDev::Models::WebScrapeResponse::IsPartial }, api_name: :isPartial
102
+
103
+ # @!attribute key_metadata
104
+ # Credit usage, included whenever a valid API key is provided.
105
+ #
106
+ # @return [ContextDev::Models::WebScrapeResponse::KeyMetadata, nil]
107
+ optional :key_metadata, -> { ContextDev::Models::WebScrapeResponse::KeyMetadata }
108
+
109
+ # @!method initialize(bytes:, cache_metadata:, highlights:, html:, images:, json:, markdown:, metadata:, parsed:, product:, request_id:, screenshot:, url:, is_partial: nil, key_metadata: nil)
110
+ # Some parameter documentations has been truncated, see
111
+ # {ContextDev::Models::WebScrapeResponse} for more details.
112
+ #
113
+ # @param bytes [ContextDev::Models::WebScrapeResponse::Bytes] Original HTTP response body. Waiting, actions, and content filters never change
114
+ #
115
+ # @param cache_metadata [ContextDev::Models::WebScrapeResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
116
+ #
117
+ # @param highlights [ContextDev::Models::WebScrapeResponse::Highlights] Plain-text passages relevant to highlightsParams.query, in page order, each pref
118
+ #
119
+ # @param html [ContextDev::Models::WebScrapeResponse::HTML] Rendered HTML after content filters.
120
+ #
121
+ # @param images [ContextDev::Models::WebScrapeResponse::Images] Images after content filters. Empty when none are found.
122
+ #
123
+ # @param json [ContextDev::Models::WebScrapeResponse::Json] Page data extracted into jsonParams.schema, after shared content filters. Values
124
+ #
125
+ # @param markdown [ContextDev::Models::WebScrapeResponse::Markdown] Markdown after content filters.
126
+ #
127
+ # @param metadata [ContextDev::Models::WebScrapeResponse::Metadata] Page details, when available.
128
+ #
129
+ # @param parsed [ContextDev::Models::WebScrapeResponse::Parsed] Fields produced by parseParams.rules, after shared content filters.
130
+ #
131
+ # @param product [ContextDev::Models::WebScrapeResponse::Product] Product detail page classification and the extracted product.
132
+ #
133
+ # @param request_id [String] Unique id of this API call, also sent in the X-Request-Id response header. Quote
134
+ #
135
+ # @param screenshot [ContextDev::Models::WebScrapeResponse::Screenshot] An image data URL. Use directly as an image src.
136
+ #
137
+ # @param url [String] Final URL after redirects and browser actions.
138
+ #
139
+ # @param is_partial [Boolean, ContextDev::Models::WebScrapeResponse::IsPartial] Present when return-partial captures a page that is still loading, returns image
140
+ #
141
+ # @param key_metadata [ContextDev::Models::WebScrapeResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
142
+
143
+ # @see ContextDev::Models::WebScrapeResponse#bytes
144
+ class Bytes < ContextDev::Internal::Type::BaseModel
145
+ # @!attribute data
146
+ #
147
+ # @return [ContextDev::Models::WebScrapeResponse::Bytes::Data, nil]
148
+ required :data, -> { ContextDev::Models::WebScrapeResponse::Bytes::Data }, nil?: true
149
+
150
+ # @!attribute requested
151
+ #
152
+ # @return [Boolean]
153
+ required :requested, ContextDev::Internal::Type::Boolean
154
+
155
+ # @!method initialize(data:, requested:)
156
+ # Original HTTP response body. Waiting, actions, and content filters never change
157
+ # it.
158
+ #
159
+ # @param data [ContextDev::Models::WebScrapeResponse::Bytes::Data, nil]
160
+ # @param requested [Boolean]
161
+
162
+ # @see ContextDev::Models::WebScrapeResponse::Bytes#data
163
+ class Data < ContextDev::Internal::Type::BaseModel
164
+ # @!attribute base64
165
+ # Original response body as base64, after HTTP decompression. Maximum decoded
166
+ # size: 20 MiB.
167
+ #
168
+ # @return [String]
169
+ required :base64, String
170
+
171
+ # @!attribute content_type
172
+ #
173
+ # @return [String]
174
+ required :content_type, String, api_name: :contentType
175
+
176
+ # @!method initialize(base64:, content_type:)
177
+ # Some parameter documentations has been truncated, see
178
+ # {ContextDev::Models::WebScrapeResponse::Bytes::Data} for more details.
179
+ #
180
+ # @param base64 [String] Original response body as base64, after HTTP decompression. Maximum decoded size
181
+ #
182
+ # @param content_type [String]
183
+ end
184
+ end
185
+
186
+ # @see ContextDev::Models::WebScrapeResponse#cache_metadata
187
+ class CacheMetadata < ContextDev::Internal::Type::BaseModel
188
+ # @!attribute age_ms
189
+ # Age of the cached data in milliseconds. Zero for miss and zdr responses.
190
+ #
191
+ # @return [Integer]
192
+ required :age_ms, Integer
193
+
194
+ # @!attribute status
195
+ # Whether the response was served from cache, required fresh work, or honored
196
+ # zero-data-retention cache bypass.
197
+ #
198
+ # @return [Symbol, ContextDev::Models::WebScrapeResponse::CacheMetadata::Status]
199
+ required :status, enum: -> { ContextDev::Models::WebScrapeResponse::CacheMetadata::Status }
200
+
201
+ # @!method initialize(age_ms:, status:)
202
+ # Some parameter documentations has been truncated, see
203
+ # {ContextDev::Models::WebScrapeResponse::CacheMetadata} for more details.
204
+ #
205
+ # Cache outcome for this response. Composite responses are hits only when every
206
+ # cache-controlled fetch contributing to the output was a hit; age_ms is the
207
+ # oldest contributing hit.
208
+ #
209
+ # @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
210
+ #
211
+ # @param status [Symbol, ContextDev::Models::WebScrapeResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
212
+
213
+ # Whether the response was served from cache, required fresh work, or honored
214
+ # zero-data-retention cache bypass.
215
+ #
216
+ # @see ContextDev::Models::WebScrapeResponse::CacheMetadata#status
217
+ module Status
218
+ extend ContextDev::Internal::Type::Enum
219
+
220
+ HIT = :hit
221
+ MISS = :miss
222
+ ZDR = :zdr
223
+
224
+ # @!method self.values
225
+ # @return [Array<Symbol>]
226
+ end
227
+ end
228
+
229
+ # @see ContextDev::Models::WebScrapeResponse#highlights
230
+ class Highlights < ContextDev::Internal::Type::BaseModel
231
+ # @!attribute data
232
+ #
233
+ # @return [Array<String>, nil]
234
+ required :data, ContextDev::Internal::Type::ArrayOf[String], nil?: true
235
+
236
+ # @!attribute requested
237
+ #
238
+ # @return [Boolean]
239
+ required :requested, ContextDev::Internal::Type::Boolean
240
+
241
+ # @!method initialize(data:, requested:)
242
+ # Plain-text passages relevant to highlightsParams.query, in page order, each
243
+ # prefixed with its section heading in square brackets. Empty when the page has no
244
+ # text.
245
+ #
246
+ # @param data [Array<String>, nil]
247
+ # @param requested [Boolean]
248
+ end
249
+
250
+ # @see ContextDev::Models::WebScrapeResponse#html
251
+ class HTML < ContextDev::Internal::Type::BaseModel
252
+ # @!attribute data
253
+ #
254
+ # @return [String, nil]
255
+ required :data, String, nil?: true
256
+
257
+ # @!attribute requested
258
+ #
259
+ # @return [Boolean]
260
+ required :requested, ContextDev::Internal::Type::Boolean
261
+
262
+ # @!method initialize(data:, requested:)
263
+ # Rendered HTML after content filters.
264
+ #
265
+ # @param data [String, nil]
266
+ # @param requested [Boolean]
267
+ end
268
+
269
+ # @see ContextDev::Models::WebScrapeResponse#images
270
+ class Images < ContextDev::Internal::Type::BaseModel
271
+ # @!attribute data
272
+ #
273
+ # @return [Array<ContextDev::Models::WebScrapeResponse::Images::Data>, nil]
274
+ required :data,
275
+ -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::WebScrapeResponse::Images::Data] },
276
+ nil?: true
277
+
278
+ # @!attribute requested
279
+ #
280
+ # @return [Boolean]
281
+ required :requested, ContextDev::Internal::Type::Boolean
282
+
283
+ # @!method initialize(data:, requested:)
284
+ # Images after content filters. Empty when none are found.
285
+ #
286
+ # @param data [Array<ContextDev::Models::WebScrapeResponse::Images::Data>, nil]
287
+ # @param requested [Boolean]
288
+
289
+ class Data < ContextDev::Internal::Type::BaseModel
290
+ # @!attribute alt
291
+ # Alt text, if present.
292
+ #
293
+ # @return [String, nil]
294
+ required :alt, String, nil?: true
295
+
296
+ # @!attribute url
297
+ # Image URL, or a data URI for inline images.
298
+ #
299
+ # @return [String]
300
+ required :url, String
301
+
302
+ # @!attribute classification
303
+ #
304
+ # @return [Symbol, ContextDev::Models::WebScrapeResponse::Images::Data::Classification, nil]
305
+ optional :classification, enum: -> { ContextDev::Models::WebScrapeResponse::Images::Data::Classification }
306
+
307
+ # @!attribute file_url
308
+ # Hosted copy when file enrichment is requested and zdr is disabled. Valid for 24
309
+ # hours from the original capture.
310
+ #
311
+ # @return [String, nil]
312
+ optional :file_url, String, api_name: :fileUrl
313
+
314
+ # @!attribute height
315
+ #
316
+ # @return [Integer, nil]
317
+ optional :height, Integer
318
+
319
+ # @!attribute width
320
+ #
321
+ # @return [Integer, nil]
322
+ optional :width, Integer
323
+
324
+ # @!method initialize(alt:, url:, classification: nil, file_url: nil, height: nil, width: nil)
325
+ # Some parameter documentations has been truncated, see
326
+ # {ContextDev::Models::WebScrapeResponse::Images::Data} for more details.
327
+ #
328
+ # @param alt [String, nil] Alt text, if present.
329
+ #
330
+ # @param url [String] Image URL, or a data URI for inline images.
331
+ #
332
+ # @param classification [Symbol, ContextDev::Models::WebScrapeResponse::Images::Data::Classification]
333
+ #
334
+ # @param file_url [String] Hosted copy when file enrichment is requested and zdr is disabled. Valid for 24
335
+ #
336
+ # @param height [Integer]
337
+ #
338
+ # @param width [Integer]
339
+
340
+ # @see ContextDev::Models::WebScrapeResponse::Images::Data#classification
341
+ module Classification
342
+ extend ContextDev::Internal::Type::Enum
343
+
344
+ PHOTOGRAPHY = :photography
345
+ ILLUSTRATION = :illustration
346
+ LOGO = :logo
347
+ WORDMARK = :wordmark
348
+ ICON = :icon
349
+ PATTERN = :pattern
350
+ GRAPHIC = :graphic
351
+ OTHER = :other
352
+
353
+ # @!method self.values
354
+ # @return [Array<Symbol>]
355
+ end
356
+ end
357
+ end
358
+
359
+ # @see ContextDev::Models::WebScrapeResponse#json
360
+ class Json < ContextDev::Internal::Type::BaseModel
361
+ # @!attribute data
362
+ #
363
+ # @return [Hash{Symbol=>Object}, nil]
364
+ required :data, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown], nil?: true
365
+
366
+ # @!attribute requested
367
+ #
368
+ # @return [Boolean]
369
+ required :requested, ContextDev::Internal::Type::Boolean
370
+
371
+ # @!method initialize(data:, requested:)
372
+ # Page data extracted into jsonParams.schema, after shared content filters. Values
373
+ # are grounded in the page; optional fields the page does not state are omitted,
374
+ # or null when their type allows null. An empty object when the filters leave no
375
+ # text.
376
+ #
377
+ # @param data [Hash{Symbol=>Object}, nil]
378
+ # @param requested [Boolean]
379
+ end
380
+
381
+ # @see ContextDev::Models::WebScrapeResponse#markdown
382
+ class Markdown < ContextDev::Internal::Type::BaseModel
383
+ # @!attribute data
384
+ #
385
+ # @return [String, nil]
386
+ required :data, String, nil?: true
387
+
388
+ # @!attribute requested
389
+ #
390
+ # @return [Boolean]
391
+ required :requested, ContextDev::Internal::Type::Boolean
392
+
393
+ # @!method initialize(data:, requested:)
394
+ # Markdown after content filters.
395
+ #
396
+ # @param data [String, nil]
397
+ # @param requested [Boolean]
398
+ end
399
+
400
+ # @see ContextDev::Models::WebScrapeResponse#metadata
401
+ class Metadata < ContextDev::Internal::Type::BaseModel
402
+ # @!attribute additional_meta
403
+ # Additional non-social meta tags not promoted to top-level metadata fields.
404
+ #
405
+ # @return [Hash{Symbol=>String, Array<String>}, nil]
406
+ optional :additional_meta,
407
+ -> { ContextDev::Internal::Type::HashOf[union: ContextDev::Models::WebScrapeResponse::Metadata::AdditionalMeta] },
408
+ api_name: :additionalMeta
409
+
410
+ # @!attribute alternates
411
+ # Resolved alternate links from link rel=alternate tags.
412
+ #
413
+ # @return [Array<ContextDev::Models::WebScrapeResponse::Metadata::Alternate>, nil]
414
+ optional :alternates,
415
+ -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::WebScrapeResponse::Metadata::Alternate] }
416
+
417
+ # @!attribute author
418
+ # Author metadata, when present.
419
+ #
420
+ # @return [String, nil]
421
+ optional :author, String
422
+
423
+ # @!attribute canonical_url
424
+ # Resolved canonical URL, when present.
425
+ #
426
+ # @return [String, nil]
427
+ optional :canonical_url, String, api_name: :canonicalUrl
428
+
429
+ # @!attribute description
430
+ # Best description extracted from standard, Open Graph, or Twitter metadata.
431
+ #
432
+ # @return [String, nil]
433
+ optional :description, String
434
+
435
+ # @!attribute favicon
436
+ # Resolved favicon URL, when present.
437
+ #
438
+ # @return [String, nil]
439
+ optional :favicon, String
440
+
441
+ # @!attribute headings
442
+ # Page headings (h1–h6) in document order, extracted from the unfiltered document.
443
+ # Capped at the first 500 headings. Omitted when the page has none.
444
+ #
445
+ # @return [Array<ContextDev::Models::WebScrapeResponse::Metadata::Heading>, nil]
446
+ optional :headings,
447
+ -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::WebScrapeResponse::Metadata::Heading] }
448
+
449
+ # @!attribute image
450
+ # Primary resolved preview image from Open Graph, Twitter, or image metadata.
451
+ #
452
+ # @return [String, nil]
453
+ optional :image, String
454
+
455
+ # @!attribute json_ld
456
+ # JSON-LD structured data blocks parsed from the page.
457
+ #
458
+ # @return [Array<Hash{Symbol=>Object}>, nil]
459
+ optional :json_ld,
460
+ ContextDev::Internal::Type::ArrayOf[ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]],
461
+ api_name: :jsonLd
462
+
463
+ # @!attribute keywords
464
+ # Keywords extracted from the page's keywords meta tag.
465
+ #
466
+ # @return [Array<String>, nil]
467
+ optional :keywords, ContextDev::Internal::Type::ArrayOf[String]
468
+
469
+ # @!attribute language
470
+ # Language extracted from html lang or language meta tags.
471
+ #
472
+ # @return [String, nil]
473
+ optional :language, String
474
+
475
+ # @!attribute modified_time
476
+ # Modified timestamp/date from page metadata, when present.
477
+ #
478
+ # @return [String, nil]
479
+ optional :modified_time, String, api_name: :modifiedTime
480
+
481
+ # @!attribute open_graph
482
+ # Open Graph metadata with the og: prefix removed and keys camel-cased.
483
+ #
484
+ # @return [Hash{Symbol=>String, Array<String>}, nil]
485
+ optional :open_graph,
486
+ -> { ContextDev::Internal::Type::HashOf[union: ContextDev::Models::WebScrapeResponse::Metadata::OpenGraph] },
487
+ api_name: :openGraph
488
+
489
+ # @!attribute published_time
490
+ # Published timestamp/date from page metadata, when present.
491
+ #
492
+ # @return [String, nil]
493
+ optional :published_time, String, api_name: :publishedTime
494
+
495
+ # @!attribute robots
496
+ # Robots meta directive, when present.
497
+ #
498
+ # @return [String, nil]
499
+ optional :robots, String
500
+
501
+ # @!attribute site_name
502
+ # Site or application name from page metadata.
503
+ #
504
+ # @return [String, nil]
505
+ optional :site_name, String, api_name: :siteName
506
+
507
+ # @!attribute title
508
+ # Best title extracted from the page.
509
+ #
510
+ # @return [String, nil]
511
+ optional :title, String
512
+
513
+ # @!attribute twitter
514
+ # Twitter card metadata with the twitter: prefix removed and keys camel-cased.
515
+ #
516
+ # @return [Hash{Symbol=>String, Array<String>}, nil]
517
+ optional :twitter,
518
+ -> { ContextDev::Internal::Type::HashOf[union: ContextDev::Models::WebScrapeResponse::Metadata::Twitter] }
519
+
520
+ # @!method initialize(additional_meta: nil, alternates: nil, author: nil, canonical_url: nil, description: nil, favicon: nil, headings: nil, image: nil, json_ld: nil, keywords: nil, language: nil, modified_time: nil, open_graph: nil, published_time: nil, robots: nil, site_name: nil, title: nil, twitter: nil)
521
+ # Some parameter documentations has been truncated, see
522
+ # {ContextDev::Models::WebScrapeResponse::Metadata} for more details.
523
+ #
524
+ # Page details, when available.
525
+ #
526
+ # @param additional_meta [Hash{Symbol=>String, Array<String>}] Additional non-social meta tags not promoted to top-level metadata fields.
527
+ #
528
+ # @param alternates [Array<ContextDev::Models::WebScrapeResponse::Metadata::Alternate>] Resolved alternate links from link rel=alternate tags.
529
+ #
530
+ # @param author [String] Author metadata, when present.
531
+ #
532
+ # @param canonical_url [String] Resolved canonical URL, when present.
533
+ #
534
+ # @param description [String] Best description extracted from standard, Open Graph, or Twitter metadata.
535
+ #
536
+ # @param favicon [String] Resolved favicon URL, when present.
537
+ #
538
+ # @param headings [Array<ContextDev::Models::WebScrapeResponse::Metadata::Heading>] Page headings (h1–h6) in document order, extracted from the unfiltered document.
539
+ #
540
+ # @param image [String] Primary resolved preview image from Open Graph, Twitter, or image metadata.
541
+ #
542
+ # @param json_ld [Array<Hash{Symbol=>Object}>] JSON-LD structured data blocks parsed from the page.
543
+ #
544
+ # @param keywords [Array<String>] Keywords extracted from the page's keywords meta tag.
545
+ #
546
+ # @param language [String] Language extracted from html lang or language meta tags.
547
+ #
548
+ # @param modified_time [String] Modified timestamp/date from page metadata, when present.
549
+ #
550
+ # @param open_graph [Hash{Symbol=>String, Array<String>}] Open Graph metadata with the og: prefix removed and keys camel-cased.
551
+ #
552
+ # @param published_time [String] Published timestamp/date from page metadata, when present.
553
+ #
554
+ # @param robots [String] Robots meta directive, when present.
555
+ #
556
+ # @param site_name [String] Site or application name from page metadata.
557
+ #
558
+ # @param title [String] Best title extracted from the page.
559
+ #
560
+ # @param twitter [Hash{Symbol=>String, Array<String>}] Twitter card metadata with the twitter: prefix removed and keys camel-cased.
561
+
562
+ module AdditionalMeta
563
+ extend ContextDev::Internal::Type::Union
564
+
565
+ variant String
566
+
567
+ variant -> { ContextDev::Models::WebScrapeResponse::Metadata::AdditionalMeta::StringArray }
568
+
569
+ # @!method self.variants
570
+ # @return [Array(String, Array<String>)]
571
+
572
+ # @type [ContextDev::Internal::Type::Converter]
573
+ StringArray = ContextDev::Internal::Type::ArrayOf[String]
574
+ end
575
+
576
+ class Alternate < ContextDev::Internal::Type::BaseModel
577
+ # @!attribute href
578
+ # Resolved alternate URL.
579
+ #
580
+ # @return [String]
581
+ required :href, String
582
+
583
+ # @!attribute hreflang
584
+ # Language or locale for the alternate URL, when present.
585
+ #
586
+ # @return [String, nil]
587
+ optional :hreflang, String
588
+
589
+ # @!attribute title
590
+ # Alternate resource title, when present.
591
+ #
592
+ # @return [String, nil]
593
+ optional :title, String
594
+
595
+ # @!attribute type
596
+ # Alternate resource MIME type, when present.
597
+ #
598
+ # @return [String, nil]
599
+ optional :type, String
600
+
601
+ # @!method initialize(href:, hreflang: nil, title: nil, type: nil)
602
+ # @param href [String] Resolved alternate URL.
603
+ #
604
+ # @param hreflang [String] Language or locale for the alternate URL, when present.
605
+ #
606
+ # @param title [String] Alternate resource title, when present.
607
+ #
608
+ # @param type [String] Alternate resource MIME type, when present.
609
+ end
610
+
611
+ class Heading < ContextDev::Internal::Type::BaseModel
612
+ # @!attribute level
613
+ # Heading level, 1–6 (from h1–h6).
614
+ #
615
+ # @return [Integer]
616
+ required :level, Integer
617
+
618
+ # @!attribute text
619
+ # Heading text with whitespace collapsed, truncated to 1000 characters.
620
+ #
621
+ # @return [String]
622
+ required :text, String
623
+
624
+ # @!method initialize(level:, text:)
625
+ # @param level [Integer] Heading level, 1–6 (from h1–h6).
626
+ #
627
+ # @param text [String] Heading text with whitespace collapsed, truncated to 1000 characters.
628
+ end
629
+
630
+ module OpenGraph
631
+ extend ContextDev::Internal::Type::Union
632
+
633
+ variant String
634
+
635
+ variant -> { ContextDev::Models::WebScrapeResponse::Metadata::OpenGraph::StringArray }
636
+
637
+ # @!method self.variants
638
+ # @return [Array(String, Array<String>)]
639
+
640
+ # @type [ContextDev::Internal::Type::Converter]
641
+ StringArray = ContextDev::Internal::Type::ArrayOf[String]
642
+ end
643
+
644
+ module Twitter
645
+ extend ContextDev::Internal::Type::Union
646
+
647
+ variant String
648
+
649
+ variant -> { ContextDev::Models::WebScrapeResponse::Metadata::Twitter::StringArray }
650
+
651
+ # @!method self.variants
652
+ # @return [Array(String, Array<String>)]
653
+
654
+ # @type [ContextDev::Internal::Type::Converter]
655
+ StringArray = ContextDev::Internal::Type::ArrayOf[String]
656
+ end
657
+ end
658
+
659
+ # @see ContextDev::Models::WebScrapeResponse#parsed
660
+ class Parsed < ContextDev::Internal::Type::BaseModel
661
+ # @!attribute data
662
+ #
663
+ # @return [Hash{Symbol=>Object}, nil]
664
+ required :data, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown], nil?: true
665
+
666
+ # @!attribute requested
667
+ #
668
+ # @return [Boolean]
669
+ required :requested, ContextDev::Internal::Type::Boolean
670
+
671
+ # @!method initialize(data:, requested:)
672
+ # Fields produced by parseParams.rules, after shared content filters.
673
+ #
674
+ # @param data [Hash{Symbol=>Object}, nil]
675
+ # @param requested [Boolean]
676
+ end
677
+
678
+ # @see ContextDev::Models::WebScrapeResponse#product
679
+ class Product < ContextDev::Internal::Type::BaseModel
680
+ # @!attribute data
681
+ #
682
+ # @return [ContextDev::Models::WebScrapeResponse::Product::Data, nil]
683
+ required :data, -> { ContextDev::Models::WebScrapeResponse::Product::Data }, nil?: true
684
+
685
+ # @!attribute requested
686
+ #
687
+ # @return [Boolean]
688
+ required :requested, ContextDev::Internal::Type::Boolean
689
+
690
+ # @!method initialize(data:, requested:)
691
+ # Product detail page classification and the extracted product.
692
+ #
693
+ # @param data [ContextDev::Models::WebScrapeResponse::Product::Data, nil]
694
+ # @param requested [Boolean]
695
+
696
+ # @see ContextDev::Models::WebScrapeResponse::Product#data
697
+ class Data < ContextDev::Internal::Type::BaseModel
698
+ # @!attribute is_product_page
699
+ # Whether the page is a product detail page.
700
+ #
701
+ # @return [Boolean]
702
+ required :is_product_page, ContextDev::Internal::Type::Boolean, api_name: :isProductPage
703
+
704
+ # @!attribute product
705
+ # The extracted product, or null when the page is not a product detail page.
706
+ #
707
+ # @return [ContextDev::Models::WebScrapeResponse::Product::Data::Product, nil]
708
+ required :product, -> { ContextDev::Models::WebScrapeResponse::Product::Data::Product }, nil?: true
709
+
710
+ # @!method initialize(is_product_page:, product:)
711
+ # @param is_product_page [Boolean] Whether the page is a product detail page.
712
+ #
713
+ # @param product [ContextDev::Models::WebScrapeResponse::Product::Data::Product, nil] The extracted product, or null when the page is not a product detail page.
714
+
715
+ # @see ContextDev::Models::WebScrapeResponse::Product::Data#product
716
+ class Product < ContextDev::Internal::Type::BaseModel
717
+ # @!attribute availability
718
+ # Stock or ordering availability.
719
+ #
720
+ # @return [Symbol, ContextDev::Models::WebScrapeResponse::Product::Data::Product::Availability, nil]
721
+ required :availability,
722
+ enum: -> { ContextDev::Models::WebScrapeResponse::Product::Data::Product::Availability },
723
+ nil?: true
724
+
725
+ # @!attribute brand
726
+ # Brand or vendor.
727
+ #
728
+ # @return [String, nil]
729
+ required :brand, String, nil?: true
730
+
731
+ # @!attribute category
732
+ # Product category.
733
+ #
734
+ # @return [String, nil]
735
+ required :category, String, nil?: true
736
+
737
+ # @!attribute currency
738
+ # ISO 4217 currency code.
739
+ #
740
+ # @return [String, nil]
741
+ required :currency, String, nil?: true
742
+
743
+ # @!attribute description
744
+ # Product description.
745
+ #
746
+ # @return [String, nil]
747
+ required :description, String, nil?: true
748
+
749
+ # @!attribute dimensions
750
+ # Product dimensions as shown on the page.
751
+ #
752
+ # @return [Array<String>]
753
+ required :dimensions, ContextDev::Internal::Type::ArrayOf[String]
754
+
755
+ # @!attribute features
756
+ # Key features and specifications.
757
+ #
758
+ # @return [Array<String>]
759
+ required :features, ContextDev::Internal::Type::ArrayOf[String]
760
+
761
+ # @!attribute images
762
+ # Product image URLs, main image first.
763
+ #
764
+ # @return [Array<String>]
765
+ required :images, ContextDev::Internal::Type::ArrayOf[String]
766
+
767
+ # @!attribute image_url
768
+ # Main product image URL.
769
+ #
770
+ # @return [String, nil]
771
+ required :image_url, String, api_name: :imageUrl, nil?: true
772
+
773
+ # @!attribute name
774
+ # Product name.
775
+ #
776
+ # @return [String]
777
+ required :name, String
778
+
779
+ # @!attribute price
780
+ # Current price.
781
+ #
782
+ # @return [Float, nil]
783
+ required :price, Float, nil?: true
784
+
785
+ # @!attribute regular_price
786
+ # List price before any discount.
787
+ #
788
+ # @return [Float, nil]
789
+ required :regular_price, Float, api_name: :regularPrice, nil?: true
790
+
791
+ # @!attribute sku
792
+ # Product identifier such as a SKU or model number.
793
+ #
794
+ # @return [String, nil]
795
+ required :sku, String, nil?: true
796
+
797
+ # @!attribute tags
798
+ # Product tags.
799
+ #
800
+ # @return [Array<String>]
801
+ required :tags, ContextDev::Internal::Type::ArrayOf[String]
802
+
803
+ # @!attribute target_audience
804
+ # Intended audience.
805
+ #
806
+ # @return [Array<String>]
807
+ required :target_audience, ContextDev::Internal::Type::ArrayOf[String], api_name: :targetAudience
808
+
809
+ # @!attribute variants
810
+ # Product variations, such as different colors or sizes, with their attributes and
811
+ # images. Empty if none are found. May not include every variation offered by the
812
+ # store.
813
+ #
814
+ # @return [Array<ContextDev::Models::WebScrapeResponse::Product::Data::Product::Variant>]
815
+ required :variants,
816
+ -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::WebScrapeResponse::Product::Data::Product::Variant] }
817
+
818
+ # @!method initialize(availability:, brand:, category:, currency:, description:, dimensions:, features:, images:, image_url:, name:, price:, regular_price:, sku:, tags:, target_audience:, variants:)
819
+ # Some parameter documentations has been truncated, see
820
+ # {ContextDev::Models::WebScrapeResponse::Product::Data::Product} for more
821
+ # details.
822
+ #
823
+ # The extracted product, or null when the page is not a product detail page.
824
+ #
825
+ # @param availability [Symbol, ContextDev::Models::WebScrapeResponse::Product::Data::Product::Availability, nil] Stock or ordering availability.
826
+ #
827
+ # @param brand [String, nil] Brand or vendor.
828
+ #
829
+ # @param category [String, nil] Product category.
830
+ #
831
+ # @param currency [String, nil] ISO 4217 currency code.
832
+ #
833
+ # @param description [String, nil] Product description.
834
+ #
835
+ # @param dimensions [Array<String>] Product dimensions as shown on the page.
836
+ #
837
+ # @param features [Array<String>] Key features and specifications.
838
+ #
839
+ # @param images [Array<String>] Product image URLs, main image first.
840
+ #
841
+ # @param image_url [String, nil] Main product image URL.
842
+ #
843
+ # @param name [String] Product name.
844
+ #
845
+ # @param price [Float, nil] Current price.
846
+ #
847
+ # @param regular_price [Float, nil] List price before any discount.
848
+ #
849
+ # @param sku [String, nil] Product identifier such as a SKU or model number.
850
+ #
851
+ # @param tags [Array<String>] Product tags.
852
+ #
853
+ # @param target_audience [Array<String>] Intended audience.
854
+ #
855
+ # @param variants [Array<ContextDev::Models::WebScrapeResponse::Product::Data::Product::Variant>] Product variations, such as different colors or sizes, with their attributes and
856
+
857
+ # Stock or ordering availability.
858
+ #
859
+ # @see ContextDev::Models::WebScrapeResponse::Product::Data::Product#availability
860
+ module Availability
861
+ extend ContextDev::Internal::Type::Enum
862
+
863
+ IN_STOCK = :in_stock
864
+ OUT_OF_STOCK = :out_of_stock
865
+ LIMITED_AVAILABILITY = :limited_availability
866
+ PREORDER = :preorder
867
+ BACKORDER = :backorder
868
+ MADE_TO_ORDER = :made_to_order
869
+ DISCONTINUED = :discontinued
870
+
871
+ # @!method self.values
872
+ # @return [Array<Symbol>]
873
+ end
874
+
875
+ class Variant < ContextDev::Internal::Type::BaseModel
876
+ # @!attribute attributes
877
+ # Explicit variant attributes such as color, size, material, pattern and
878
+ # properties declared by page.
879
+ #
880
+ # @return [Hash{Symbol=>String}]
881
+ required :attributes, ContextDev::Internal::Type::HashOf[String]
882
+
883
+ # @!attribute images
884
+ # Original source image URLs explicitly attached to this variant.
885
+ #
886
+ # @return [Array<String>]
887
+ required :images, ContextDev::Internal::Type::ArrayOf[String]
888
+
889
+ # @!attribute sku
890
+ #
891
+ # @return [String, nil]
892
+ required :sku, String, nil?: true
893
+
894
+ # @!attribute url
895
+ # Variant or offer URL when provided by the source. May be shared by variants.
896
+ #
897
+ # @return [String, nil]
898
+ required :url, String, nil?: true
899
+
900
+ # @!method initialize(attributes:, images:, sku:, url:)
901
+ # Some parameter documentations has been truncated, see
902
+ # {ContextDev::Models::WebScrapeResponse::Product::Data::Product::Variant} for
903
+ # more details.
904
+ #
905
+ # @param attributes [Hash{Symbol=>String}] Explicit variant attributes such as color, size, material, pattern and propertie
906
+ #
907
+ # @param images [Array<String>] Original source image URLs explicitly attached to this variant.
908
+ #
909
+ # @param sku [String, nil]
910
+ #
911
+ # @param url [String, nil] Variant or offer URL when provided by the source. May be shared by variants.
912
+ end
913
+ end
914
+ end
915
+ end
916
+
917
+ # @see ContextDev::Models::WebScrapeResponse#screenshot
918
+ class Screenshot < ContextDev::Internal::Type::BaseModel
919
+ # @!attribute data
920
+ #
921
+ # @return [String, nil]
922
+ required :data, String, nil?: true
923
+
924
+ # @!attribute requested
925
+ #
926
+ # @return [Boolean]
927
+ required :requested, ContextDev::Internal::Type::Boolean
928
+
929
+ # @!method initialize(data:, requested:)
930
+ # An image data URL. Use directly as an image src.
931
+ #
932
+ # @param data [String, nil]
933
+ # @param requested [Boolean]
934
+ end
935
+
936
+ # Present when return-partial captures a page that is still loading, returns
937
+ # images before image processing finishes, or cuts product AI extraction short.
938
+ # Also present if the optional product AI fallback fails. Partial responses are
939
+ # not cached.
940
+ #
941
+ # @see ContextDev::Models::WebScrapeResponse#is_partial
942
+ module IsPartial
943
+ extend ContextDev::Internal::Type::Enum
944
+
945
+ TRUE = true
946
+
947
+ # @!method self.values
948
+ # @return [Array<Boolean>]
949
+ end
950
+
951
+ # @see ContextDev::Models::WebScrapeResponse#key_metadata
952
+ class KeyMetadata < ContextDev::Internal::Type::BaseModel
953
+ # @!attribute credits_consumed
954
+ # Credits used by this request.
955
+ #
956
+ # @return [Integer]
957
+ required :credits_consumed, Integer
958
+
959
+ # @!attribute credits_remaining
960
+ # Credits remaining for your organization.
961
+ #
962
+ # @return [Integer]
963
+ required :credits_remaining, Integer
964
+
965
+ # @!method initialize(credits_consumed:, credits_remaining:)
966
+ # Credit usage, included whenever a valid API key is provided.
967
+ #
968
+ # @param credits_consumed [Integer] Credits used by this request.
969
+ #
970
+ # @param credits_remaining [Integer] Credits remaining for your organization.
971
+ end
972
+ end
973
+ end
974
+ end