context.dev 2.18.0 → 2.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +220 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/client.rb +0 -4
  5. data/lib/context_dev/models/monitor_retrieve_run_params.rb +26 -0
  6. data/lib/context_dev/models/monitor_retrieve_run_response.rb +232 -0
  7. data/lib/context_dev/models/monitor_rotate_webhook_secret_params.rb +20 -0
  8. data/lib/context_dev/models/monitor_rotate_webhook_secret_response.rb +765 -0
  9. data/lib/context_dev/models/{web_web_scrape_sitemap_params.rb → web_map_urls_params.rb} +14 -14
  10. data/lib/context_dev/models/web_map_urls_response.rb +123 -0
  11. data/lib/context_dev/models/web_scrape_params.rb +1035 -0
  12. data/lib/context_dev/models/web_scrape_response.rb +974 -0
  13. data/lib/context_dev/models/web_screenshot_params.rb +15 -1
  14. data/lib/context_dev/models/web_screenshot_response.rb +3 -3
  15. data/lib/context_dev/models.rb +8 -22
  16. data/lib/context_dev/resources/brand.rb +0 -36
  17. data/lib/context_dev/resources/monitors.rb +47 -0
  18. data/lib/context_dev/resources/web.rb +118 -486
  19. data/lib/context_dev/version.rb +1 -1
  20. data/lib/context_dev.rb +8 -23
  21. data/rbi/context_dev/client.rbi +0 -3
  22. data/rbi/context_dev/models/monitor_retrieve_run_params.rbi +46 -0
  23. data/rbi/context_dev/models/monitor_retrieve_run_response.rbi +452 -0
  24. data/rbi/context_dev/models/monitor_rotate_webhook_secret_params.rbi +38 -0
  25. data/rbi/context_dev/models/monitor_rotate_webhook_secret_response.rbi +1367 -0
  26. data/rbi/context_dev/models/{web_web_scrape_sitemap_params.rbi → web_map_urls_params.rbi} +23 -45
  27. data/rbi/context_dev/models/web_map_urls_response.rbi +226 -0
  28. data/rbi/context_dev/models/web_scrape_params.rbi +2221 -0
  29. data/rbi/context_dev/models/web_scrape_response.rbi +1874 -0
  30. data/rbi/context_dev/models/web_screenshot_params.rbi +23 -0
  31. data/rbi/context_dev/models/web_screenshot_response.rbi +4 -4
  32. data/rbi/context_dev/models.rbi +9 -24
  33. data/rbi/context_dev/resources/brand.rbi +0 -35
  34. data/rbi/context_dev/resources/monitors.rbi +24 -0
  35. data/rbi/context_dev/resources/web.rbi +152 -654
  36. data/sig/context_dev/client.rbs +0 -2
  37. data/sig/context_dev/models/monitor_retrieve_run_params.rbs +28 -0
  38. data/sig/context_dev/models/monitor_retrieve_run_response.rbs +182 -0
  39. data/sig/context_dev/models/monitor_rotate_webhook_secret_params.rbs +23 -0
  40. data/sig/context_dev/models/monitor_rotate_webhook_secret_response.rbs +545 -0
  41. data/sig/context_dev/models/{web_web_scrape_sitemap_params.rbs → web_map_urls_params.rbs} +22 -22
  42. data/sig/context_dev/models/web_map_urls_response.rbs +125 -0
  43. data/sig/context_dev/models/web_scrape_params.rbs +925 -0
  44. data/sig/context_dev/models/web_scrape_response.rbs +782 -0
  45. data/sig/context_dev/models/web_screenshot_params.rbs +7 -0
  46. data/sig/context_dev/models.rbs +8 -22
  47. data/sig/context_dev/resources/brand.rbs +0 -9
  48. data/sig/context_dev/resources/monitors.rbs +11 -0
  49. data/sig/context_dev/resources/web.rbs +33 -128
  50. metadata +26 -71
  51. data/lib/context_dev/models/ai_extract_product_params.rb +0 -125
  52. data/lib/context_dev/models/ai_extract_product_response.rb +0 -402
  53. data/lib/context_dev/models/ai_extract_products_params.rb +0 -233
  54. data/lib/context_dev/models/ai_extract_products_response.rb +0 -370
  55. data/lib/context_dev/models/brand_retrieve_simplified_params.rb +0 -120
  56. data/lib/context_dev/models/brand_retrieve_simplified_response.rb +0 -441
  57. data/lib/context_dev/models/web_extract_fonts_params.rb +0 -114
  58. data/lib/context_dev/models/web_extract_fonts_response.rb +0 -291
  59. data/lib/context_dev/models/web_extract_params.rb +0 -419
  60. data/lib/context_dev/models/web_extract_response.rb +0 -287
  61. data/lib/context_dev/models/web_web_scrape_bytes_params.rb +0 -346
  62. data/lib/context_dev/models/web_web_scrape_bytes_response.rb +0 -135
  63. data/lib/context_dev/models/web_web_scrape_html_params.rb +0 -812
  64. data/lib/context_dev/models/web_web_scrape_html_response.rb +0 -628
  65. data/lib/context_dev/models/web_web_scrape_images_params.rb +0 -373
  66. data/lib/context_dev/models/web_web_scrape_images_response.rb +0 -409
  67. data/lib/context_dev/models/web_web_scrape_md_params.rb +0 -670
  68. data/lib/context_dev/models/web_web_scrape_md_response.rb +0 -567
  69. data/lib/context_dev/models/web_web_scrape_screenshot_params.rb +0 -471
  70. data/lib/context_dev/models/web_web_scrape_screenshot_response.rb +0 -169
  71. data/lib/context_dev/models/web_web_scrape_sitemap_response.rb +0 -144
  72. data/lib/context_dev/resources/ai.rb +0 -71
  73. data/rbi/context_dev/models/ai_extract_product_params.rbi +0 -253
  74. data/rbi/context_dev/models/ai_extract_product_response.rbi +0 -791
  75. data/rbi/context_dev/models/ai_extract_products_params.rbi +0 -490
  76. data/rbi/context_dev/models/ai_extract_products_response.rbi +0 -718
  77. data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +0 -256
  78. data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +0 -1040
  79. data/rbi/context_dev/models/web_extract_fonts_params.rbi +0 -223
  80. data/rbi/context_dev/models/web_extract_fonts_response.rbi +0 -563
  81. data/rbi/context_dev/models/web_extract_params.rbi +0 -781
  82. data/rbi/context_dev/models/web_extract_response.rbi +0 -512
  83. data/rbi/context_dev/models/web_web_scrape_bytes_params.rbi +0 -702
  84. data/rbi/context_dev/models/web_web_scrape_bytes_response.rbi +0 -238
  85. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +0 -1690
  86. data/rbi/context_dev/models/web_web_scrape_html_response.rbi +0 -1287
  87. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +0 -728
  88. data/rbi/context_dev/models/web_web_scrape_images_response.rbi +0 -910
  89. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +0 -1052
  90. data/rbi/context_dev/models/web_web_scrape_md_response.rbi +0 -1088
  91. data/rbi/context_dev/models/web_web_scrape_screenshot_params.rbi +0 -1580
  92. data/rbi/context_dev/models/web_web_scrape_screenshot_response.rbi +0 -332
  93. data/rbi/context_dev/models/web_web_scrape_sitemap_response.rbi +0 -258
  94. data/rbi/context_dev/resources/ai.rbi +0 -63
  95. data/sig/context_dev/models/ai_extract_product_params.rbs +0 -106
  96. data/sig/context_dev/models/ai_extract_product_response.rbs +0 -314
  97. data/sig/context_dev/models/ai_extract_products_params.rbs +0 -202
  98. data/sig/context_dev/models/ai_extract_products_response.rbs +0 -293
  99. data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +0 -104
  100. data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +0 -413
  101. data/sig/context_dev/models/web_extract_fonts_params.rbs +0 -93
  102. data/sig/context_dev/models/web_extract_fonts_response.rbs +0 -230
  103. data/sig/context_dev/models/web_extract_params.rbs +0 -324
  104. data/sig/context_dev/models/web_extract_response.rbs +0 -239
  105. data/sig/context_dev/models/web_web_scrape_bytes_params.rbs +0 -531
  106. data/sig/context_dev/models/web_web_scrape_bytes_response.rbs +0 -108
  107. data/sig/context_dev/models/web_web_scrape_html_params.rbs +0 -878
  108. data/sig/context_dev/models/web_web_scrape_html_response.rbs +0 -525
  109. data/sig/context_dev/models/web_web_scrape_images_params.rbs +0 -281
  110. data/sig/context_dev/models/web_web_scrape_images_response.rbs +0 -371
  111. data/sig/context_dev/models/web_web_scrape_md_params.rbs +0 -758
  112. data/sig/context_dev/models/web_web_scrape_md_response.rbs +0 -465
  113. data/sig/context_dev/models/web_web_scrape_screenshot_params.rbs +0 -619
  114. data/sig/context_dev/models/web_web_scrape_screenshot_response.rbs +0 -127
  115. data/sig/context_dev/models/web_web_scrape_sitemap_response.rbs +0 -117
  116. data/sig/context_dev/resources/ai.rbs +0 -21
@@ -1,233 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ContextDev
4
- module Models
5
- # @see ContextDev::Resources::AI#extract_products
6
- class AIExtractProductsParams < ContextDev::Internal::Type::BaseModel
7
- extend ContextDev::Internal::Type::RequestParameters::Converter
8
- include ContextDev::Internal::Type::RequestParameters
9
-
10
- # @!attribute body
11
- #
12
- # @return [ContextDev::Models::AIExtractProductsParams::Body::ByDomain, ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL]
13
- required :body, union: -> { ContextDev::AIExtractProductsParams::Body }
14
-
15
- # @!method initialize(body:, request_options: {})
16
- # @param body [ContextDev::Models::AIExtractProductsParams::Body::ByDomain, ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL]
17
- # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
18
-
19
- module Body
20
- extend ContextDev::Internal::Type::Union
21
-
22
- variant -> { ContextDev::AIExtractProductsParams::Body::ByDomain }
23
-
24
- variant -> { ContextDev::AIExtractProductsParams::Body::ByDirectURL }
25
-
26
- class ByDomain < ContextDev::Internal::Type::BaseModel
27
- # @!attribute domain
28
- # The domain name to analyze.
29
- #
30
- # @return [String]
31
- required :domain, String
32
-
33
- # @!attribute max_age_ms
34
- # Return a cached result if a prior scrape for the same parameters exists and is
35
- # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
36
- # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
37
- #
38
- # @return [Integer, nil]
39
- optional :max_age_ms, Integer, api_name: :maxAgeMs
40
-
41
- # @!attribute max_products
42
- # Maximum number of products to extract.
43
- #
44
- # @return [Integer, nil]
45
- optional :max_products, Integer, api_name: :maxProducts
46
-
47
- # @!attribute tags
48
- # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
49
- #
50
- # @return [Array<String>, nil]
51
- optional :tags, ContextDev::Internal::Type::ArrayOf[String]
52
-
53
- # @!attribute timeout_opts
54
- # Optional request deadline and behavior on timeout. For GET requests, use
55
- # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
56
- # timeoutOpts object.
57
- #
58
- # @return [ContextDev::Models::AIExtractProductsParams::Body::ByDomain::TimeoutOpts, nil]
59
- optional :timeout_opts,
60
- -> { ContextDev::AIExtractProductsParams::Body::ByDomain::TimeoutOpts },
61
- api_name: :timeoutOpts
62
-
63
- # @!method initialize(domain:, max_age_ms: nil, max_products: nil, tags: nil, timeout_opts: nil)
64
- # Some parameter documentations has been truncated, see
65
- # {ContextDev::Models::AIExtractProductsParams::Body::ByDomain} for more details.
66
- #
67
- # @param domain [String] The domain name to analyze.
68
- #
69
- # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
70
- #
71
- # @param max_products [Integer] Maximum number of products to extract.
72
- #
73
- # @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
74
- #
75
- # @param timeout_opts [ContextDev::Models::AIExtractProductsParams::Body::ByDomain::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
76
-
77
- # @see ContextDev::Models::AIExtractProductsParams::Body::ByDomain#timeout_opts
78
- class TimeoutOpts < ContextDev::Internal::Type::BaseModel
79
- # @!attribute milliseconds
80
- # Request deadline in milliseconds. Maximum: 300000 (5 minutes).
81
- #
82
- # @return [Integer]
83
- required :milliseconds, Integer
84
-
85
- # @!attribute behavior
86
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
87
- # credits. "return-partial" returns usable results collected so far; if none are
88
- # available, the request still fails without charging credits. Partial results are
89
- # not cached as complete results.
90
- #
91
- # @return [Symbol, ContextDev::Models::AIExtractProductsParams::Body::ByDomain::TimeoutOpts::Behavior, nil]
92
- optional :behavior,
93
- enum: -> { ContextDev::AIExtractProductsParams::Body::ByDomain::TimeoutOpts::Behavior }
94
-
95
- # @!method initialize(milliseconds:, behavior: nil)
96
- # Some parameter documentations has been truncated, see
97
- # {ContextDev::Models::AIExtractProductsParams::Body::ByDomain::TimeoutOpts} for
98
- # more details.
99
- #
100
- # Optional request deadline and behavior on timeout. For GET requests, use
101
- # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
102
- # timeoutOpts object.
103
- #
104
- # @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
105
- #
106
- # @param behavior [Symbol, ContextDev::Models::AIExtractProductsParams::Body::ByDomain::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
107
-
108
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
109
- # credits. "return-partial" returns usable results collected so far; if none are
110
- # available, the request still fails without charging credits. Partial results are
111
- # not cached as complete results.
112
- #
113
- # @see ContextDev::Models::AIExtractProductsParams::Body::ByDomain::TimeoutOpts#behavior
114
- module Behavior
115
- extend ContextDev::Internal::Type::Enum
116
-
117
- FAIL = :fail
118
- RETURN_PARTIAL = :"return-partial"
119
-
120
- # @!method self.values
121
- # @return [Array<Symbol>]
122
- end
123
- end
124
- end
125
-
126
- class ByDirectURL < ContextDev::Internal::Type::BaseModel
127
- # @!attribute direct_url
128
- # A specific URL to use directly as the starting point for extraction without
129
- # domain resolution.
130
- #
131
- # @return [String]
132
- required :direct_url, String, api_name: :directUrl
133
-
134
- # @!attribute max_age_ms
135
- # Return a cached result if a prior scrape for the same parameters exists and is
136
- # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
137
- # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
138
- #
139
- # @return [Integer, nil]
140
- optional :max_age_ms, Integer, api_name: :maxAgeMs
141
-
142
- # @!attribute max_products
143
- # Maximum number of products to extract.
144
- #
145
- # @return [Integer, nil]
146
- optional :max_products, Integer, api_name: :maxProducts
147
-
148
- # @!attribute tags
149
- # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
150
- #
151
- # @return [Array<String>, nil]
152
- optional :tags, ContextDev::Internal::Type::ArrayOf[String]
153
-
154
- # @!attribute timeout_opts
155
- # Optional request deadline and behavior on timeout. For GET requests, use
156
- # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
157
- # timeoutOpts object.
158
- #
159
- # @return [ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL::TimeoutOpts, nil]
160
- optional :timeout_opts,
161
- -> { ContextDev::AIExtractProductsParams::Body::ByDirectURL::TimeoutOpts },
162
- api_name: :timeoutOpts
163
-
164
- # @!method initialize(direct_url:, max_age_ms: nil, max_products: nil, tags: nil, timeout_opts: nil)
165
- # Some parameter documentations has been truncated, see
166
- # {ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL} for more
167
- # details.
168
- #
169
- # @param direct_url [String] A specific URL to use directly as the starting point for extraction without doma
170
- #
171
- # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
172
- #
173
- # @param max_products [Integer] Maximum number of products to extract.
174
- #
175
- # @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
176
- #
177
- # @param timeout_opts [ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
178
-
179
- # @see ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL#timeout_opts
180
- class TimeoutOpts < ContextDev::Internal::Type::BaseModel
181
- # @!attribute milliseconds
182
- # Request deadline in milliseconds. Maximum: 300000 (5 minutes).
183
- #
184
- # @return [Integer]
185
- required :milliseconds, Integer
186
-
187
- # @!attribute behavior
188
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
189
- # credits. "return-partial" returns usable results collected so far; if none are
190
- # available, the request still fails without charging credits. Partial results are
191
- # not cached as complete results.
192
- #
193
- # @return [Symbol, ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL::TimeoutOpts::Behavior, nil]
194
- optional :behavior,
195
- enum: -> { ContextDev::AIExtractProductsParams::Body::ByDirectURL::TimeoutOpts::Behavior }
196
-
197
- # @!method initialize(milliseconds:, behavior: nil)
198
- # Some parameter documentations has been truncated, see
199
- # {ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL::TimeoutOpts}
200
- # for more details.
201
- #
202
- # Optional request deadline and behavior on timeout. For GET requests, use
203
- # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
204
- # timeoutOpts object.
205
- #
206
- # @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
207
- #
208
- # @param behavior [Symbol, ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
209
-
210
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
211
- # credits. "return-partial" returns usable results collected so far; if none are
212
- # available, the request still fails without charging credits. Partial results are
213
- # not cached as complete results.
214
- #
215
- # @see ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL::TimeoutOpts#behavior
216
- module Behavior
217
- extend ContextDev::Internal::Type::Enum
218
-
219
- FAIL = :fail
220
- RETURN_PARTIAL = :"return-partial"
221
-
222
- # @!method self.values
223
- # @return [Array<Symbol>]
224
- end
225
- end
226
- end
227
-
228
- # @!method self.variants
229
- # @return [Array(ContextDev::Models::AIExtractProductsParams::Body::ByDomain, ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL)]
230
- end
231
- end
232
- end
233
- end
@@ -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