context.dev 1.36.0 → 2.0.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 (162) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +16 -9
  4. data/lib/context_dev/client.rb +7 -0
  5. data/lib/context_dev/models/brand_retrieve_params.rb +1036 -174
  6. data/lib/context_dev/models/monitor_create_params.rb +361 -0
  7. data/lib/context_dev/models/monitor_create_response.rb +484 -0
  8. data/lib/context_dev/models/monitor_delete_params.rb +20 -0
  9. data/lib/context_dev/models/monitor_delete_response.rb +22 -0
  10. data/lib/context_dev/models/monitor_list_account_changes_params.rb +93 -0
  11. data/lib/context_dev/models/monitor_list_account_changes_response.rb +199 -0
  12. data/lib/context_dev/models/monitor_list_account_runs_params.rb +55 -0
  13. data/lib/context_dev/models/monitor_list_account_runs_response.rb +227 -0
  14. data/lib/context_dev/models/monitor_list_changes_params.rb +57 -0
  15. data/lib/context_dev/models/monitor_list_changes_response.rb +198 -0
  16. data/lib/context_dev/models/monitor_list_params.rb +161 -0
  17. data/lib/context_dev/models/monitor_list_response.rb +507 -0
  18. data/lib/context_dev/models/monitor_list_runs_params.rb +62 -0
  19. data/lib/context_dev/models/monitor_list_runs_response.rb +227 -0
  20. data/lib/context_dev/models/monitor_retrieve_change_params.rb +20 -0
  21. data/lib/context_dev/models/monitor_retrieve_change_response.rb +271 -0
  22. data/lib/context_dev/models/monitor_retrieve_params.rb +20 -0
  23. data/lib/context_dev/models/monitor_retrieve_response.rb +484 -0
  24. data/lib/context_dev/models/monitor_run_params.rb +20 -0
  25. data/lib/context_dev/models/monitor_run_response.rb +35 -0
  26. data/lib/context_dev/models/monitor_update_params.rb +368 -0
  27. data/lib/context_dev/models/monitor_update_response.rb +484 -0
  28. data/lib/context_dev/models/utility_prefetch_params.rb +70 -6
  29. data/lib/context_dev/models/utility_prefetch_response.rb +23 -1
  30. data/lib/context_dev/models/web_extract_response.rb +17 -1
  31. data/lib/context_dev/models/web_web_crawl_md_params.rb +11 -1
  32. data/lib/context_dev/models/web_web_scrape_html_params.rb +11 -1
  33. data/lib/context_dev/models/web_web_scrape_html_response.rb +10 -2
  34. data/lib/context_dev/models/web_web_scrape_images_params.rb +12 -1
  35. data/lib/context_dev/models/web_web_scrape_md_params.rb +11 -1
  36. data/lib/context_dev/models.rb +20 -12
  37. data/lib/context_dev/resources/ai.rb +0 -33
  38. data/lib/context_dev/resources/brand.rb +7 -204
  39. data/lib/context_dev/resources/monitors.rb +352 -0
  40. data/lib/context_dev/resources/utility.rb +9 -35
  41. data/lib/context_dev/resources/web.rb +14 -4
  42. data/lib/context_dev/version.rb +1 -1
  43. data/lib/context_dev.rb +23 -14
  44. data/rbi/context_dev/client.rbi +6 -0
  45. data/rbi/context_dev/models/brand_retrieve_params.rbi +3792 -679
  46. data/rbi/context_dev/models/monitor_create_params.rbi +640 -0
  47. data/rbi/context_dev/models/monitor_create_response.rbi +820 -0
  48. data/rbi/context_dev/models/monitor_delete_params.rbi +35 -0
  49. data/rbi/context_dev/models/monitor_delete_response.rbi +29 -0
  50. data/rbi/context_dev/models/monitor_list_account_changes_params.rbi +211 -0
  51. data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +376 -0
  52. data/rbi/context_dev/models/monitor_list_account_runs_params.rbi +125 -0
  53. data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +464 -0
  54. data/rbi/context_dev/models/monitor_list_changes_params.rbi +91 -0
  55. data/rbi/context_dev/models/monitor_list_changes_response.rbi +372 -0
  56. data/rbi/context_dev/models/monitor_list_params.rbi +332 -0
  57. data/rbi/context_dev/models/monitor_list_response.rbi +885 -0
  58. data/rbi/context_dev/models/monitor_list_runs_params.rbi +125 -0
  59. data/rbi/context_dev/models/monitor_list_runs_response.rbi +455 -0
  60. data/rbi/context_dev/models/monitor_retrieve_change_params.rbi +38 -0
  61. data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +478 -0
  62. data/rbi/context_dev/models/monitor_retrieve_params.rbi +38 -0
  63. data/rbi/context_dev/models/monitor_retrieve_response.rbi +828 -0
  64. data/rbi/context_dev/models/monitor_run_params.rbi +35 -0
  65. data/rbi/context_dev/models/monitor_run_response.rbi +48 -0
  66. data/rbi/context_dev/models/monitor_update_params.rbi +680 -0
  67. data/rbi/context_dev/models/monitor_update_response.rbi +820 -0
  68. data/rbi/context_dev/models/utility_prefetch_params.rbi +129 -7
  69. data/rbi/context_dev/models/utility_prefetch_response.rbi +55 -3
  70. data/rbi/context_dev/models/web_extract_response.rbi +10 -0
  71. data/rbi/context_dev/models/web_web_crawl_md_params.rbi +15 -0
  72. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +15 -0
  73. data/rbi/context_dev/models/web_web_scrape_html_response.rbi +29 -3
  74. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +17 -0
  75. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +15 -0
  76. data/rbi/context_dev/models.rbi +23 -15
  77. data/rbi/context_dev/resources/ai.rbi +0 -28
  78. data/rbi/context_dev/resources/brand.rbi +13 -228
  79. data/rbi/context_dev/resources/monitors.rbi +286 -0
  80. data/rbi/context_dev/resources/utility.rbi +14 -29
  81. data/rbi/context_dev/resources/web.rbi +21 -0
  82. data/sig/context_dev/client.rbs +2 -0
  83. data/sig/context_dev/models/brand_retrieve_params.rbs +1560 -281
  84. data/sig/context_dev/models/monitor_create_params.rbs +311 -0
  85. data/sig/context_dev/models/monitor_create_response.rbs +369 -0
  86. data/sig/context_dev/models/monitor_delete_params.rbs +23 -0
  87. data/sig/context_dev/models/monitor_delete_response.rbs +15 -0
  88. data/sig/context_dev/models/monitor_list_account_changes_params.rbs +104 -0
  89. data/sig/context_dev/models/monitor_list_account_changes_response.rbs +176 -0
  90. data/sig/context_dev/models/monitor_list_account_runs_params.rbs +58 -0
  91. data/sig/context_dev/models/monitor_list_account_runs_response.rbs +184 -0
  92. data/sig/context_dev/models/monitor_list_changes_params.rbs +61 -0
  93. data/sig/context_dev/models/monitor_list_changes_response.rbs +176 -0
  94. data/sig/context_dev/models/monitor_list_params.rbs +160 -0
  95. data/sig/context_dev/models/monitor_list_response.rbs +396 -0
  96. data/sig/context_dev/models/monitor_list_runs_params.rbs +63 -0
  97. data/sig/context_dev/models/monitor_list_runs_response.rbs +184 -0
  98. data/sig/context_dev/models/monitor_retrieve_change_params.rbs +23 -0
  99. data/sig/context_dev/models/monitor_retrieve_change_response.rbs +228 -0
  100. data/sig/context_dev/models/monitor_retrieve_params.rbs +23 -0
  101. data/sig/context_dev/models/monitor_retrieve_response.rbs +369 -0
  102. data/sig/context_dev/models/monitor_run_params.rbs +23 -0
  103. data/sig/context_dev/models/monitor_run_response.rbs +18 -0
  104. data/sig/context_dev/models/monitor_update_params.rbs +331 -0
  105. data/sig/context_dev/models/monitor_update_response.rbs +369 -0
  106. data/sig/context_dev/models/utility_prefetch_params.rbs +52 -4
  107. data/sig/context_dev/models/utility_prefetch_response.rbs +22 -3
  108. data/sig/context_dev/models/web_extract_response.rbs +5 -0
  109. data/sig/context_dev/models/web_web_crawl_md_params.rbs +7 -0
  110. data/sig/context_dev/models/web_web_scrape_html_params.rbs +7 -0
  111. data/sig/context_dev/models/web_web_scrape_html_response.rbs +8 -0
  112. data/sig/context_dev/models/web_web_scrape_images_params.rbs +7 -0
  113. data/sig/context_dev/models/web_web_scrape_md_params.rbs +7 -0
  114. data/sig/context_dev/models.rbs +20 -12
  115. data/sig/context_dev/resources/ai.rbs +0 -8
  116. data/sig/context_dev/resources/brand.rbs +1 -56
  117. data/sig/context_dev/resources/monitors.rbs +101 -0
  118. data/sig/context_dev/resources/utility.rbs +2 -7
  119. data/sig/context_dev/resources/web.rbs +4 -0
  120. metadata +71 -44
  121. data/lib/context_dev/models/ai_ai_query_params.rb +0 -235
  122. data/lib/context_dev/models/ai_ai_query_response.rb +0 -133
  123. data/lib/context_dev/models/brand_identify_from_transaction_params.rb +0 -474
  124. data/lib/context_dev/models/brand_identify_from_transaction_response.rb +0 -1074
  125. data/lib/context_dev/models/brand_retrieve_by_email_params.rb +0 -195
  126. data/lib/context_dev/models/brand_retrieve_by_email_response.rb +0 -1071
  127. data/lib/context_dev/models/brand_retrieve_by_isin_params.rb +0 -195
  128. data/lib/context_dev/models/brand_retrieve_by_isin_response.rb +0 -1070
  129. data/lib/context_dev/models/brand_retrieve_by_name_params.rb +0 -452
  130. data/lib/context_dev/models/brand_retrieve_by_name_response.rb +0 -1070
  131. data/lib/context_dev/models/brand_retrieve_by_ticker_params.rb +0 -283
  132. data/lib/context_dev/models/brand_retrieve_by_ticker_response.rb +0 -1072
  133. data/lib/context_dev/models/utility_prefetch_by_email_params.rb +0 -37
  134. data/lib/context_dev/models/utility_prefetch_by_email_response.rb +0 -68
  135. data/rbi/context_dev/models/ai_ai_query_params.rbi +0 -504
  136. data/rbi/context_dev/models/ai_ai_query_response.rbi +0 -267
  137. data/rbi/context_dev/models/brand_identify_from_transaction_params.rbi +0 -2020
  138. data/rbi/context_dev/models/brand_identify_from_transaction_response.rbi +0 -3515
  139. data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +0 -743
  140. data/rbi/context_dev/models/brand_retrieve_by_email_response.rbi +0 -3511
  141. data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +0 -743
  142. data/rbi/context_dev/models/brand_retrieve_by_isin_response.rbi +0 -3510
  143. data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +0 -1982
  144. data/rbi/context_dev/models/brand_retrieve_by_name_response.rbi +0 -3510
  145. data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +0 -1153
  146. data/rbi/context_dev/models/brand_retrieve_by_ticker_response.rbi +0 -3512
  147. data/rbi/context_dev/models/utility_prefetch_by_email_params.rbi +0 -65
  148. data/rbi/context_dev/models/utility_prefetch_by_email_response.rbi +0 -132
  149. data/sig/context_dev/models/ai_ai_query_params.rbs +0 -218
  150. data/sig/context_dev/models/ai_ai_query_response.rbs +0 -121
  151. data/sig/context_dev/models/brand_identify_from_transaction_params.rbs +0 -822
  152. data/sig/context_dev/models/brand_identify_from_transaction_response.rbs +0 -1441
  153. data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +0 -305
  154. data/sig/context_dev/models/brand_retrieve_by_email_response.rbs +0 -1441
  155. data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +0 -305
  156. data/sig/context_dev/models/brand_retrieve_by_isin_response.rbs +0 -1441
  157. data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +0 -801
  158. data/sig/context_dev/models/brand_retrieve_by_name_response.rbs +0 -1441
  159. data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +0 -467
  160. data/sig/context_dev/models/brand_retrieve_by_ticker_response.rbs +0 -1441
  161. data/sig/context_dev/models/utility_prefetch_by_email_params.rbs +0 -30
  162. data/sig/context_dev/models/utility_prefetch_by_email_response.rbs +0 -64
@@ -0,0 +1,361 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ContextDev
4
+ module Models
5
+ # @see ContextDev::Resources::Monitors#create
6
+ class MonitorCreateParams < ContextDev::Internal::Type::BaseModel
7
+ extend ContextDev::Internal::Type::RequestParameters::Converter
8
+ include ContextDev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute change_detection
11
+ # Discriminated union describing how changes are detected.
12
+ #
13
+ # @return [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic]
14
+ required :change_detection, union: -> { ContextDev::MonitorCreateParams::ChangeDetection }
15
+
16
+ # @!attribute name
17
+ #
18
+ # @return [String]
19
+ required :name, String
20
+
21
+ # @!attribute schedule
22
+ # Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
23
+ # every 6 hours or every 2 days. The total interval (frequency × unit) must be
24
+ # between 10 minutes and 1 year.
25
+ #
26
+ # @return [ContextDev::Models::MonitorCreateParams::Schedule]
27
+ required :schedule, -> { ContextDev::MonitorCreateParams::Schedule }
28
+
29
+ # @!attribute target
30
+ # Discriminated union describing what the monitor watches.
31
+ #
32
+ # @return [ContextDev::Models::MonitorCreateParams::Target::Page, ContextDev::Models::MonitorCreateParams::Target::Sitemap, ContextDev::Models::MonitorCreateParams::Target::Extract]
33
+ required :target, union: -> { ContextDev::MonitorCreateParams::Target }
34
+
35
+ # @!attribute mode
36
+ # Top-level monitor category. Always `web` today; the concrete behavior is
37
+ # described by `target` and `change_detection`.
38
+ #
39
+ # @return [Symbol, ContextDev::Models::MonitorCreateParams::Mode, nil]
40
+ optional :mode, enum: -> { ContextDev::MonitorCreateParams::Mode }
41
+
42
+ # @!attribute tags
43
+ # User-defined tags for grouping and filtering monitors and their changes.
44
+ #
45
+ # @return [Array<String>, nil]
46
+ optional :tags, ContextDev::Internal::Type::ArrayOf[String]
47
+
48
+ # @!attribute webhook
49
+ #
50
+ # @return [ContextDev::Models::MonitorCreateParams::Webhook, nil]
51
+ optional :webhook, -> { ContextDev::MonitorCreateParams::Webhook }, nil?: true
52
+
53
+ # @!method initialize(change_detection:, name:, schedule:, target:, mode: nil, tags: nil, webhook: nil, request_options: {})
54
+ # Some parameter documentations has been truncated, see
55
+ # {ContextDev::Models::MonitorCreateParams} for more details.
56
+ #
57
+ # @param change_detection [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic] Discriminated union describing how changes are detected.
58
+ #
59
+ # @param name [String]
60
+ #
61
+ # @param schedule [ContextDev::Models::MonitorCreateParams::Schedule] Run the monitor on a fixed interval defined by a frequency and a unit, e.g. ever
62
+ #
63
+ # @param target [ContextDev::Models::MonitorCreateParams::Target::Page, ContextDev::Models::MonitorCreateParams::Target::Sitemap, ContextDev::Models::MonitorCreateParams::Target::Extract] Discriminated union describing what the monitor watches.
64
+ #
65
+ # @param mode [Symbol, ContextDev::Models::MonitorCreateParams::Mode] Top-level monitor category. Always `web` today; the concrete behavior is describ
66
+ #
67
+ # @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
68
+ #
69
+ # @param webhook [ContextDev::Models::MonitorCreateParams::Webhook, nil]
70
+ #
71
+ # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
72
+
73
+ # Discriminated union describing how changes are detected.
74
+ module ChangeDetection
75
+ extend ContextDev::Internal::Type::Union
76
+
77
+ discriminator :type
78
+
79
+ # Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
80
+ variant :exact, -> { ContextDev::MonitorCreateParams::ChangeDetection::Exact }
81
+
82
+ # Detect meaning-level changes that match a natural language query.
83
+ variant :semantic, -> { ContextDev::MonitorCreateParams::ChangeDetection::Semantic }
84
+
85
+ class Exact < ContextDev::Internal::Type::BaseModel
86
+ # @!attribute type
87
+ #
88
+ # @return [Symbol, :exact]
89
+ required :type, const: :exact
90
+
91
+ # @!method initialize(type: :exact)
92
+ # Detect exact changes. For page targets, this means visible text diffs. For
93
+ # sitemap targets, this means URL additions and removals.
94
+ #
95
+ # @param type [Symbol, :exact]
96
+ end
97
+
98
+ class Semantic < ContextDev::Internal::Type::BaseModel
99
+ # @!attribute query
100
+ #
101
+ # @return [String]
102
+ required :query, String
103
+
104
+ # @!attribute type
105
+ #
106
+ # @return [Symbol, :semantic]
107
+ required :type, const: :semantic
108
+
109
+ # @!attribute confidence_threshold
110
+ #
111
+ # @return [Float, nil]
112
+ optional :confidence_threshold, Float
113
+
114
+ # @!method initialize(query:, confidence_threshold: nil, type: :semantic)
115
+ # Detect meaning-level changes that match a natural language query.
116
+ #
117
+ # @param query [String]
118
+ # @param confidence_threshold [Float]
119
+ # @param type [Symbol, :semantic]
120
+ end
121
+
122
+ # @!method self.variants
123
+ # @return [Array(ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic)]
124
+ end
125
+
126
+ class Schedule < ContextDev::Internal::Type::BaseModel
127
+ # @!attribute frequency
128
+ # Number of units between runs. The resulting interval (frequency × unit) must be
129
+ # at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes;
130
+ # maximum 365 when unit is days).
131
+ #
132
+ # @return [Integer]
133
+ required :frequency, Integer
134
+
135
+ # @!attribute type
136
+ #
137
+ # @return [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Type]
138
+ required :type, enum: -> { ContextDev::MonitorCreateParams::Schedule::Type }
139
+
140
+ # @!attribute unit
141
+ #
142
+ # @return [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Unit]
143
+ required :unit, enum: -> { ContextDev::MonitorCreateParams::Schedule::Unit }
144
+
145
+ # @!method initialize(frequency:, type:, unit:)
146
+ # Some parameter documentations has been truncated, see
147
+ # {ContextDev::Models::MonitorCreateParams::Schedule} for more details.
148
+ #
149
+ # Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
150
+ # every 6 hours or every 2 days. The total interval (frequency × unit) must be
151
+ # between 10 minutes and 1 year.
152
+ #
153
+ # @param frequency [Integer] Number of units between runs. The resulting interval (frequency × unit) must be
154
+ #
155
+ # @param type [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Type]
156
+ #
157
+ # @param unit [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Unit]
158
+
159
+ # @see ContextDev::Models::MonitorCreateParams::Schedule#type
160
+ module Type
161
+ extend ContextDev::Internal::Type::Enum
162
+
163
+ INTERVAL = :interval
164
+
165
+ # @!method self.values
166
+ # @return [Array<Symbol>]
167
+ end
168
+
169
+ # @see ContextDev::Models::MonitorCreateParams::Schedule#unit
170
+ module Unit
171
+ extend ContextDev::Internal::Type::Enum
172
+
173
+ MINUTES = :minutes
174
+ HOURS = :hours
175
+ DAYS = :days
176
+
177
+ # @!method self.values
178
+ # @return [Array<Symbol>]
179
+ end
180
+ end
181
+
182
+ # Discriminated union describing what the monitor watches.
183
+ module Target
184
+ extend ContextDev::Internal::Type::Union
185
+
186
+ discriminator :type
187
+
188
+ # Watch a single web page.
189
+ variant :page, -> { ContextDev::MonitorCreateParams::Target::Page }
190
+
191
+ # Watch a sitemap for URL additions and removals. Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. A new URL set must be observed on two consecutive runs before a change is reported, suppressing one-run crawl flaps.
192
+ variant :sitemap, -> { ContextDev::MonitorCreateParams::Target::Sitemap }
193
+
194
+ # Watch a site's extracted structured data.
195
+ variant :extract, -> { ContextDev::MonitorCreateParams::Target::Extract }
196
+
197
+ class Page < ContextDev::Internal::Type::BaseModel
198
+ # @!attribute type
199
+ #
200
+ # @return [Symbol, :page]
201
+ required :type, const: :page
202
+
203
+ # @!attribute url
204
+ #
205
+ # @return [String]
206
+ required :url, String
207
+
208
+ # @!attribute normalize_whitespace
209
+ # Normalize whitespace before comparing or analyzing text.
210
+ #
211
+ # @return [Boolean, nil]
212
+ optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
213
+
214
+ # @!method initialize(url:, normalize_whitespace: nil, type: :page)
215
+ # Watch a single web page.
216
+ #
217
+ # @param url [String]
218
+ #
219
+ # @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
220
+ #
221
+ # @param type [Symbol, :page]
222
+ end
223
+
224
+ class Sitemap < ContextDev::Internal::Type::BaseModel
225
+ # @!attribute type
226
+ #
227
+ # @return [Symbol, :sitemap]
228
+ required :type, const: :sitemap
229
+
230
+ # @!attribute url
231
+ # Sitemap URL to monitor.
232
+ #
233
+ # @return [String]
234
+ required :url, String
235
+
236
+ # @!attribute exclude
237
+ # URL path patterns to exclude.
238
+ #
239
+ # @return [Array<String>, nil]
240
+ optional :exclude, ContextDev::Internal::Type::ArrayOf[String]
241
+
242
+ # @!attribute include
243
+ # URL path patterns to include.
244
+ #
245
+ # @return [Array<String>, nil]
246
+ optional :include, ContextDev::Internal::Type::ArrayOf[String]
247
+
248
+ # @!attribute max_urls
249
+ # Maximum number of sitemap URLs to track (capped at 10,000).
250
+ #
251
+ # @return [Integer, nil]
252
+ optional :max_urls, Integer
253
+
254
+ # @!method initialize(url:, exclude: nil, include: nil, max_urls: nil, type: :sitemap)
255
+ # Watch a sitemap for URL additions and removals. Crawled URLs are normalized
256
+ # (lowercased host, no trailing slash/fragment) and scoped to the monitored site
257
+ # and its subdomains before comparison. A new URL set must be observed on two
258
+ # consecutive runs before a change is reported, suppressing one-run crawl flaps.
259
+ #
260
+ # @param url [String] Sitemap URL to monitor.
261
+ #
262
+ # @param exclude [Array<String>] URL path patterns to exclude.
263
+ #
264
+ # @param include [Array<String>] URL path patterns to include.
265
+ #
266
+ # @param max_urls [Integer] Maximum number of sitemap URLs to track (capped at 10,000).
267
+ #
268
+ # @param type [Symbol, :sitemap]
269
+ end
270
+
271
+ class Extract < ContextDev::Internal::Type::BaseModel
272
+ # @!attribute type
273
+ #
274
+ # @return [Symbol, :extract]
275
+ required :type, const: :extract
276
+
277
+ # @!attribute url
278
+ # Root URL to extract structured data from.
279
+ #
280
+ # @return [String]
281
+ required :url, String
282
+
283
+ # @!attribute follow_subdomains
284
+ #
285
+ # @return [Boolean, nil]
286
+ optional :follow_subdomains, ContextDev::Internal::Type::Boolean
287
+
288
+ # @!attribute instructions
289
+ # Optional natural-language instructions guiding what to extract.
290
+ #
291
+ # @return [String, nil]
292
+ optional :instructions, String
293
+
294
+ # @!attribute max_depth
295
+ # Optional maximum link depth from the starting URL (0 = only the starting page).
296
+ #
297
+ # @return [Integer, nil]
298
+ optional :max_depth, Integer
299
+
300
+ # @!attribute max_pages
301
+ # Maximum number of pages to analyze during extraction.
302
+ #
303
+ # @return [Integer, nil]
304
+ optional :max_pages, Integer
305
+
306
+ # @!attribute schema
307
+ # JSON Schema describing the structured data to extract and watch for changes. If
308
+ # omitted, a default summary + key-points schema is used.
309
+ #
310
+ # @return [Hash{Symbol=>Object}, nil]
311
+ optional :schema, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]
312
+
313
+ # @!method initialize(url:, follow_subdomains: nil, instructions: nil, max_depth: nil, max_pages: nil, schema: nil, type: :extract)
314
+ # Some parameter documentations has been truncated, see
315
+ # {ContextDev::Models::MonitorCreateParams::Target::Extract} for more details.
316
+ #
317
+ # Watch a site's extracted structured data.
318
+ #
319
+ # @param url [String] Root URL to extract structured data from.
320
+ #
321
+ # @param follow_subdomains [Boolean]
322
+ #
323
+ # @param instructions [String] Optional natural-language instructions guiding what to extract.
324
+ #
325
+ # @param max_depth [Integer] Optional maximum link depth from the starting URL (0 = only the starting page).
326
+ #
327
+ # @param max_pages [Integer] Maximum number of pages to analyze during extraction.
328
+ #
329
+ # @param schema [Hash{Symbol=>Object}] JSON Schema describing the structured data to extract and watch for changes. If
330
+ #
331
+ # @param type [Symbol, :extract]
332
+ end
333
+
334
+ # @!method self.variants
335
+ # @return [Array(ContextDev::Models::MonitorCreateParams::Target::Page, ContextDev::Models::MonitorCreateParams::Target::Sitemap, ContextDev::Models::MonitorCreateParams::Target::Extract)]
336
+ end
337
+
338
+ # Top-level monitor category. Always `web` today; the concrete behavior is
339
+ # described by `target` and `change_detection`.
340
+ module Mode
341
+ extend ContextDev::Internal::Type::Enum
342
+
343
+ WEB = :web
344
+
345
+ # @!method self.values
346
+ # @return [Array<Symbol>]
347
+ end
348
+
349
+ class Webhook < ContextDev::Internal::Type::BaseModel
350
+ # @!attribute url
351
+ # Webhook URL called when a change is detected.
352
+ #
353
+ # @return [String]
354
+ required :url, String
355
+
356
+ # @!method initialize(url:)
357
+ # @param url [String] Webhook URL called when a change is detected.
358
+ end
359
+ end
360
+ end
361
+ end