context.dev 2.18.0 → 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 (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -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 +906 -0
  12. data/lib/context_dev/models/web_scrape_response.rb +659 -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 +106 -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 +2000 -0
  29. data/rbi/context_dev/models/{web_web_scrape_html_response.rbi → web_scrape_response.rbi} +539 -510
  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 +135 -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 +834 -0
  44. data/sig/context_dev/models/web_scrape_response.rbs +552 -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 +30 -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_images_params.rbi +0 -728
  87. data/rbi/context_dev/models/web_web_scrape_images_response.rbi +0 -910
  88. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +0 -1052
  89. data/rbi/context_dev/models/web_web_scrape_md_response.rbi +0 -1088
  90. data/rbi/context_dev/models/web_web_scrape_screenshot_params.rbi +0 -1580
  91. data/rbi/context_dev/models/web_web_scrape_screenshot_response.rbi +0 -332
  92. data/rbi/context_dev/models/web_web_scrape_sitemap_response.rbi +0 -258
  93. data/rbi/context_dev/resources/ai.rbi +0 -63
  94. data/sig/context_dev/models/ai_extract_product_params.rbs +0 -106
  95. data/sig/context_dev/models/ai_extract_product_response.rbs +0 -314
  96. data/sig/context_dev/models/ai_extract_products_params.rbs +0 -202
  97. data/sig/context_dev/models/ai_extract_products_response.rbs +0 -293
  98. data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +0 -104
  99. data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +0 -413
  100. data/sig/context_dev/models/web_extract_fonts_params.rbs +0 -93
  101. data/sig/context_dev/models/web_extract_fonts_response.rbs +0 -230
  102. data/sig/context_dev/models/web_extract_params.rbs +0 -324
  103. data/sig/context_dev/models/web_extract_response.rbs +0 -239
  104. data/sig/context_dev/models/web_web_scrape_bytes_params.rbs +0 -531
  105. data/sig/context_dev/models/web_web_scrape_bytes_response.rbs +0 -108
  106. data/sig/context_dev/models/web_web_scrape_html_params.rbs +0 -878
  107. data/sig/context_dev/models/web_web_scrape_html_response.rbs +0 -525
  108. data/sig/context_dev/models/web_web_scrape_images_params.rbs +0 -281
  109. data/sig/context_dev/models/web_web_scrape_images_response.rbs +0 -371
  110. data/sig/context_dev/models/web_web_scrape_md_params.rbs +0 -758
  111. data/sig/context_dev/models/web_web_scrape_md_response.rbs +0 -465
  112. data/sig/context_dev/models/web_web_scrape_screenshot_params.rbs +0 -619
  113. data/sig/context_dev/models/web_web_scrape_screenshot_response.rbs +0 -127
  114. data/sig/context_dev/models/web_web_scrape_sitemap_response.rbs +0 -117
  115. data/sig/context_dev/resources/ai.rbs +0 -21
@@ -1,370 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ContextDev
4
- module Models
5
- # @see ContextDev::Resources::AI#extract_products
6
- class AIExtractProductsResponse < ContextDev::Internal::Type::BaseModel
7
- # @!attribute cache_metadata
8
- # Cache outcome for this response. Composite responses are hits only when every
9
- # cache-controlled fetch contributing to the output was a hit; age_ms is the
10
- # oldest contributing hit.
11
- #
12
- # @return [ContextDev::Models::AIExtractProductsResponse::CacheMetadata]
13
- required :cache_metadata, -> { ContextDev::Models::AIExtractProductsResponse::CacheMetadata }
14
-
15
- # @!attribute request_id
16
- # Unique id of this API call, also sent in the X-Request-Id response header. Quote
17
- # it when contacting support about a failed request.
18
- #
19
- # @return [String]
20
- required :request_id, String
21
-
22
- # @!attribute key_metadata
23
- # Credit usage, included whenever a valid API key is provided.
24
- #
25
- # @return [ContextDev::Models::AIExtractProductsResponse::KeyMetadata, nil]
26
- optional :key_metadata, -> { ContextDev::Models::AIExtractProductsResponse::KeyMetadata }
27
-
28
- # @!attribute partial
29
- # True when timeoutOpts.behavior=return-partial returned the usable results
30
- # collected before the deadline. Partial collections are not cached as complete
31
- # results.
32
- #
33
- # @return [Boolean, nil]
34
- optional :partial, ContextDev::Internal::Type::Boolean
35
-
36
- # @!attribute products
37
- # Array of products extracted from the website
38
- #
39
- # @return [Array<ContextDev::Models::AIExtractProductsResponse::Product>, nil]
40
- optional :products,
41
- -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::AIExtractProductsResponse::Product] }
42
-
43
- # @!method initialize(cache_metadata:, request_id:, key_metadata: nil, partial: nil, products: nil)
44
- # Some parameter documentations has been truncated, see
45
- # {ContextDev::Models::AIExtractProductsResponse} for more details.
46
- #
47
- # @param cache_metadata [ContextDev::Models::AIExtractProductsResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
48
- #
49
- # @param request_id [String] Unique id of this API call, also sent in the X-Request-Id response header. Quote
50
- #
51
- # @param key_metadata [ContextDev::Models::AIExtractProductsResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
52
- #
53
- # @param partial [Boolean] True when timeoutOpts.behavior=return-partial returned the usable results collec
54
- #
55
- # @param products [Array<ContextDev::Models::AIExtractProductsResponse::Product>] Array of products extracted from the website
56
-
57
- # @see ContextDev::Models::AIExtractProductsResponse#cache_metadata
58
- class CacheMetadata < ContextDev::Internal::Type::BaseModel
59
- # @!attribute age_ms
60
- # Age of the cached data in milliseconds. Zero for miss and zdr responses.
61
- #
62
- # @return [Integer]
63
- required :age_ms, Integer
64
-
65
- # @!attribute status
66
- # Whether the response was served from cache, required fresh work, or honored
67
- # zero-data-retention cache bypass.
68
- #
69
- # @return [Symbol, ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status]
70
- required :status, enum: -> { ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status }
71
-
72
- # @!method initialize(age_ms:, status:)
73
- # Some parameter documentations has been truncated, see
74
- # {ContextDev::Models::AIExtractProductsResponse::CacheMetadata} for more details.
75
- #
76
- # Cache outcome for this response. Composite responses are hits only when every
77
- # cache-controlled fetch contributing to the output was a hit; age_ms is the
78
- # oldest contributing hit.
79
- #
80
- # @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
81
- #
82
- # @param status [Symbol, ContextDev::Models::AIExtractProductsResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
83
-
84
- # Whether the response was served from cache, required fresh work, or honored
85
- # zero-data-retention cache bypass.
86
- #
87
- # @see ContextDev::Models::AIExtractProductsResponse::CacheMetadata#status
88
- module Status
89
- extend ContextDev::Internal::Type::Enum
90
-
91
- HIT = :hit
92
- MISS = :miss
93
- ZDR = :zdr
94
-
95
- # @!method self.values
96
- # @return [Array<Symbol>]
97
- end
98
- end
99
-
100
- # @see ContextDev::Models::AIExtractProductsResponse#key_metadata
101
- class KeyMetadata < ContextDev::Internal::Type::BaseModel
102
- # @!attribute credits_consumed
103
- # Credits used by this request.
104
- #
105
- # @return [Integer]
106
- required :credits_consumed, Integer
107
-
108
- # @!attribute credits_remaining
109
- # Credits remaining for your organization.
110
- #
111
- # @return [Integer]
112
- required :credits_remaining, Integer
113
-
114
- # @!method initialize(credits_consumed:, credits_remaining:)
115
- # Credit usage, included whenever a valid API key is provided.
116
- #
117
- # @param credits_consumed [Integer] Credits used by this request.
118
- #
119
- # @param credits_remaining [Integer] Credits remaining for your organization.
120
- end
121
-
122
- class Product < ContextDev::Internal::Type::BaseModel
123
- # @!attribute description
124
- # Description of the product
125
- #
126
- # @return [String]
127
- required :description, String
128
-
129
- # @!attribute features
130
- # List of product features
131
- #
132
- # @return [Array<String>]
133
- required :features, ContextDev::Internal::Type::ArrayOf[String]
134
-
135
- # @!attribute images
136
- # URLs to product images on the page (up to 7)
137
- #
138
- # @return [Array<String>]
139
- required :images, ContextDev::Internal::Type::ArrayOf[String]
140
-
141
- # @!attribute name
142
- # Name of the product
143
- #
144
- # @return [String]
145
- required :name, String
146
-
147
- # @!attribute sku
148
- # Stock Keeping Unit (product identifier). Null if no identifier is found.
149
- #
150
- # @return [String, nil]
151
- required :sku, String, nil?: true
152
-
153
- # @!attribute tags
154
- # Tags associated with the product
155
- #
156
- # @return [Array<String>]
157
- required :tags, ContextDev::Internal::Type::ArrayOf[String]
158
-
159
- # @!attribute target_audience
160
- # Target audience for the product (array of strings)
161
- #
162
- # @return [Array<String>]
163
- required :target_audience, ContextDev::Internal::Type::ArrayOf[String]
164
-
165
- # @!attribute availability
166
- # Normalized stock or ordering availability
167
- #
168
- # @return [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::Availability, nil]
169
- optional :availability,
170
- enum: -> { ContextDev::Models::AIExtractProductsResponse::Product::Availability },
171
- nil?: true
172
-
173
- # @!attribute billing_frequency
174
- # Billing frequency for the product
175
- #
176
- # @return [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::BillingFrequency, nil]
177
- optional :billing_frequency,
178
- enum: -> { ContextDev::Models::AIExtractProductsResponse::Product::BillingFrequency },
179
- nil?: true
180
-
181
- # @!attribute category
182
- # Category of the product
183
- #
184
- # @return [String, nil]
185
- optional :category, String, nil?: true
186
-
187
- # @!attribute currency
188
- # Currency code for the price (e.g., USD, EUR)
189
- #
190
- # @return [String, nil]
191
- optional :currency, String, nil?: true
192
-
193
- # @!attribute dimensions
194
- # Dimension statements shown for the product, preserving labels, values, and units
195
- #
196
- # @return [Array<String>, nil]
197
- optional :dimensions, ContextDev::Internal::Type::ArrayOf[String]
198
-
199
- # @!attribute image_url
200
- # URL to the product image
201
- #
202
- # @return [String, nil]
203
- optional :image_url, String, nil?: true
204
-
205
- # @!attribute price
206
- # Price of the product
207
- #
208
- # @return [Float, nil]
209
- optional :price, Float, nil?: true
210
-
211
- # @!attribute pricing_model
212
- # Pricing model for the product
213
- #
214
- # @return [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::PricingModel, nil]
215
- optional :pricing_model,
216
- enum: -> { ContextDev::Models::AIExtractProductsResponse::Product::PricingModel },
217
- nil?: true
218
-
219
- # @!attribute regular_price
220
- # Original or regular price before a displayed discount
221
- #
222
- # @return [Float, nil]
223
- optional :regular_price, Float, nil?: true
224
-
225
- # @!attribute url
226
- # URL to the product page
227
- #
228
- # @return [String, nil]
229
- optional :url, String, nil?: true
230
-
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)
241
- # Some parameter documentations has been truncated, see
242
- # {ContextDev::Models::AIExtractProductsResponse::Product} for more details.
243
- #
244
- # @param description [String] Description of the product
245
- #
246
- # @param features [Array<String>] List of product features
247
- #
248
- # @param images [Array<String>] URLs to product images on the page (up to 7)
249
- #
250
- # @param name [String] Name of the product
251
- #
252
- # @param sku [String, nil] Stock Keeping Unit (product identifier). Null if no identifier is found.
253
- #
254
- # @param tags [Array<String>] Tags associated with the product
255
- #
256
- # @param target_audience [Array<String>] Target audience for the product (array of strings)
257
- #
258
- # @param availability [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::Availability, nil] Normalized stock or ordering availability
259
- #
260
- # @param billing_frequency [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::BillingFrequency, nil] Billing frequency for the product
261
- #
262
- # @param category [String, nil] Category of the product
263
- #
264
- # @param currency [String, nil] Currency code for the price (e.g., USD, EUR)
265
- #
266
- # @param dimensions [Array<String>] Dimension statements shown for the product, preserving labels, values, and units
267
- #
268
- # @param image_url [String, nil] URL to the product image
269
- #
270
- # @param price [Float, nil] Price of the product
271
- #
272
- # @param pricing_model [Symbol, ContextDev::Models::AIExtractProductsResponse::Product::PricingModel, nil] Pricing model for the product
273
- #
274
- # @param regular_price [Float, nil] Original or regular price before a displayed discount
275
- #
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
279
-
280
- # Normalized stock or ordering availability
281
- #
282
- # @see ContextDev::Models::AIExtractProductsResponse::Product#availability
283
- module Availability
284
- extend ContextDev::Internal::Type::Enum
285
-
286
- IN_STOCK = :in_stock
287
- OUT_OF_STOCK = :out_of_stock
288
- LIMITED_AVAILABILITY = :limited_availability
289
- PREORDER = :preorder
290
- BACKORDER = :backorder
291
- MADE_TO_ORDER = :made_to_order
292
- DISCONTINUED = :discontinued
293
-
294
- # @!method self.values
295
- # @return [Array<Symbol>]
296
- end
297
-
298
- # Billing frequency for the product
299
- #
300
- # @see ContextDev::Models::AIExtractProductsResponse::Product#billing_frequency
301
- module BillingFrequency
302
- extend ContextDev::Internal::Type::Enum
303
-
304
- MONTHLY = :monthly
305
- YEARLY = :yearly
306
- ONE_TIME = :one_time
307
- USAGE_BASED = :usage_based
308
-
309
- # @!method self.values
310
- # @return [Array<Symbol>]
311
- end
312
-
313
- # Pricing model for the product
314
- #
315
- # @see ContextDev::Models::AIExtractProductsResponse::Product#pricing_model
316
- module PricingModel
317
- extend ContextDev::Internal::Type::Enum
318
-
319
- PER_SEAT = :per_seat
320
- FLAT = :flat
321
- TIERED = :tiered
322
- FREEMIUM = :freemium
323
- CUSTOM = :custom
324
-
325
- # @!method self.values
326
- # @return [Array<Symbol>]
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
367
- end
368
- end
369
- end
370
- end
@@ -1,120 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ContextDev
4
- module Models
5
- # @see ContextDev::Resources::Brand#retrieve_simplified
6
- class BrandRetrieveSimplifiedParams < ContextDev::Internal::Type::BaseModel
7
- extend ContextDev::Internal::Type::RequestParameters::Converter
8
- include ContextDev::Internal::Type::RequestParameters
9
-
10
- # @!attribute domain
11
- # Domain name to retrieve simplified brand data for
12
- #
13
- # @return [String]
14
- required :domain, String
15
-
16
- # @!attribute max_age_ms
17
- # Maximum age in milliseconds for cached brand data before the API performs a hard
18
- # refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
19
- # refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
20
- # are clamped to 1 year.
21
- #
22
- # @return [Integer, nil]
23
- optional :max_age_ms, Integer, nil?: true
24
-
25
- # @!attribute tags
26
- # Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
27
- # characters.
28
- #
29
- # @return [Array<String>, nil]
30
- optional :tags, ContextDev::Internal::Type::ArrayOf[String]
31
-
32
- # @!attribute theme
33
- # Optional theme preference used when selecting brand assets.
34
- #
35
- # @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedParams::Theme, nil]
36
- optional :theme, enum: -> { ContextDev::BrandRetrieveSimplifiedParams::Theme }
37
-
38
- # @!attribute timeout_opts
39
- # Optional request deadline and behavior on timeout. For GET requests, use
40
- # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
41
- # timeoutOpts object.
42
- #
43
- # @return [ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts, nil]
44
- optional :timeout_opts, -> { ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts }
45
-
46
- # @!method initialize(domain:, max_age_ms: nil, tags: nil, theme: nil, timeout_opts: nil, request_options: {})
47
- # Some parameter documentations has been truncated, see
48
- # {ContextDev::Models::BrandRetrieveSimplifiedParams} for more details.
49
- #
50
- # @param domain [String] Domain name to retrieve simplified brand data for
51
- #
52
- # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard
53
- #
54
- # @param tags [Array<String>] Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 charac
55
- #
56
- # @param theme [Symbol, ContextDev::Models::BrandRetrieveSimplifiedParams::Theme] Optional theme preference used when selecting brand assets.
57
- #
58
- # @param timeout_opts [ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
59
- #
60
- # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
61
-
62
- # Optional theme preference used when selecting brand assets.
63
- module Theme
64
- extend ContextDev::Internal::Type::Enum
65
-
66
- LIGHT = :light
67
- DARK = :dark
68
-
69
- # @!method self.values
70
- # @return [Array<Symbol>]
71
- end
72
-
73
- class TimeoutOpts < ContextDev::Internal::Type::BaseModel
74
- # @!attribute milliseconds
75
- # Request deadline in milliseconds. Maximum: 300000 (5 minutes).
76
- #
77
- # @return [Integer]
78
- required :milliseconds, Integer
79
-
80
- # @!attribute behavior
81
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
82
- # credits. "return-partial" returns usable results collected so far; if none are
83
- # available, the request still fails without charging credits. Partial results are
84
- # not cached as complete results.
85
- #
86
- # @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior, nil]
87
- optional :behavior, enum: -> { ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior }
88
-
89
- # @!method initialize(milliseconds:, behavior: nil)
90
- # Some parameter documentations has been truncated, see
91
- # {ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts} for more
92
- # details.
93
- #
94
- # Optional request deadline and behavior on timeout. For GET requests, use
95
- # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
96
- # timeoutOpts object.
97
- #
98
- # @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
99
- #
100
- # @param behavior [Symbol, ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
101
-
102
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
103
- # credits. "return-partial" returns usable results collected so far; if none are
104
- # available, the request still fails without charging credits. Partial results are
105
- # not cached as complete results.
106
- #
107
- # @see ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts#behavior
108
- module Behavior
109
- extend ContextDev::Internal::Type::Enum
110
-
111
- FAIL = :fail
112
- RETURN_PARTIAL = :"return-partial"
113
-
114
- # @!method self.values
115
- # @return [Array<Symbol>]
116
- end
117
- end
118
- end
119
- end
120
- end