context.dev 1.36.0 → 2.1.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 +35 -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 +1079 -174
  6. data/lib/context_dev/models/monitor_create_params.rb +364 -0
  7. data/lib/context_dev/models/monitor_create_response.rb +608 -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 +631 -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 +264 -0
  22. data/lib/context_dev/models/monitor_retrieve_params.rb +20 -0
  23. data/lib/context_dev/models/monitor_retrieve_response.rb +608 -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 +371 -0
  27. data/lib/context_dev/models/monitor_update_response.rb +608 -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 +9 -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 +3858 -678
  46. data/rbi/context_dev/models/monitor_create_params.rbi +641 -0
  47. data/rbi/context_dev/models/monitor_create_response.rbi +1020 -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 +335 -0
  57. data/rbi/context_dev/models/monitor_list_response.rbi +1089 -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 +469 -0
  62. data/rbi/context_dev/models/monitor_retrieve_params.rbi +38 -0
  63. data/rbi/context_dev/models/monitor_retrieve_response.rbi +1028 -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 +681 -0
  67. data/rbi/context_dev/models/monitor_update_response.rbi +1020 -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 +16 -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 +1586 -281
  84. data/sig/context_dev/models/monitor_create_params.rbs +301 -0
  85. data/sig/context_dev/models/monitor_create_response.rbs +433 -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 +460 -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 +221 -0
  100. data/sig/context_dev/models/monitor_retrieve_params.rbs +23 -0
  101. data/sig/context_dev/models/monitor_retrieve_response.rbs +433 -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 +321 -0
  105. data/sig/context_dev/models/monitor_update_response.rbs +433 -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,371 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ContextDev
4
+ module Models
5
+ # @see ContextDev::Resources::Monitors#update
6
+ class MonitorUpdateParams < ContextDev::Internal::Type::BaseModel
7
+ extend ContextDev::Internal::Type::RequestParameters::Converter
8
+ include ContextDev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute monitor_id
11
+ #
12
+ # @return [String]
13
+ required :monitor_id, String
14
+
15
+ # @!attribute change_detection
16
+ # Discriminated union describing how changes are detected.
17
+ #
18
+ # @return [ContextDev::Models::MonitorUpdateParams::ChangeDetection::Exact, ContextDev::Models::MonitorUpdateParams::ChangeDetection::Semantic, nil]
19
+ optional :change_detection, union: -> { ContextDev::MonitorUpdateParams::ChangeDetection }
20
+
21
+ # @!attribute name
22
+ #
23
+ # @return [String, nil]
24
+ optional :name, String
25
+
26
+ # @!attribute schedule
27
+ # Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
28
+ # every 6 hours or every 2 days. The total interval (frequency × unit) must be
29
+ # between 10 minutes and 1 year.
30
+ #
31
+ # @return [ContextDev::Models::MonitorUpdateParams::Schedule, nil]
32
+ optional :schedule, -> { ContextDev::MonitorUpdateParams::Schedule }
33
+
34
+ # @!attribute status
35
+ #
36
+ # @return [Symbol, ContextDev::Models::MonitorUpdateParams::Status, nil]
37
+ optional :status, enum: -> { ContextDev::MonitorUpdateParams::Status }
38
+
39
+ # @!attribute tags
40
+ # User-defined tags for grouping and filtering monitors and their changes.
41
+ #
42
+ # @return [Array<String>, nil]
43
+ optional :tags, ContextDev::Internal::Type::ArrayOf[String]
44
+
45
+ # @!attribute target
46
+ # Discriminated union describing what the monitor watches.
47
+ #
48
+ # @return [ContextDev::Models::MonitorUpdateParams::Target::Page, ContextDev::Models::MonitorUpdateParams::Target::Sitemap, ContextDev::Models::MonitorUpdateParams::Target::Extract, nil]
49
+ optional :target, union: -> { ContextDev::MonitorUpdateParams::Target }
50
+
51
+ # @!attribute webhook
52
+ # Set to null to remove the webhook.
53
+ #
54
+ # @return [ContextDev::Models::MonitorUpdateParams::Webhook, nil]
55
+ optional :webhook, -> { ContextDev::MonitorUpdateParams::Webhook }, nil?: true
56
+
57
+ # @!method initialize(monitor_id:, change_detection: nil, name: nil, schedule: nil, status: nil, tags: nil, target: nil, webhook: nil, request_options: {})
58
+ # Some parameter documentations has been truncated, see
59
+ # {ContextDev::Models::MonitorUpdateParams} for more details.
60
+ #
61
+ # @param monitor_id [String]
62
+ #
63
+ # @param change_detection [ContextDev::Models::MonitorUpdateParams::ChangeDetection::Exact, ContextDev::Models::MonitorUpdateParams::ChangeDetection::Semantic] Discriminated union describing how changes are detected.
64
+ #
65
+ # @param name [String]
66
+ #
67
+ # @param schedule [ContextDev::Models::MonitorUpdateParams::Schedule] Run the monitor on a fixed interval defined by a frequency and a unit, e.g. ever
68
+ #
69
+ # @param status [Symbol, ContextDev::Models::MonitorUpdateParams::Status]
70
+ #
71
+ # @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
72
+ #
73
+ # @param target [ContextDev::Models::MonitorUpdateParams::Target::Page, ContextDev::Models::MonitorUpdateParams::Target::Sitemap, ContextDev::Models::MonitorUpdateParams::Target::Extract] Discriminated union describing what the monitor watches.
74
+ #
75
+ # @param webhook [ContextDev::Models::MonitorUpdateParams::Webhook, nil] Set to null to remove the webhook.
76
+ #
77
+ # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
78
+
79
+ # Discriminated union describing how changes are detected.
80
+ module ChangeDetection
81
+ extend ContextDev::Internal::Type::Union
82
+
83
+ discriminator :type
84
+
85
+ # Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
86
+ variant :exact, -> { ContextDev::MonitorUpdateParams::ChangeDetection::Exact }
87
+
88
+ # Detect meaning-level changes to the extracted data, ignoring cosmetic or paraphrase-only differences. What is watched is determined by the extract target's `schema` and `instructions`.
89
+ variant :semantic, -> { ContextDev::MonitorUpdateParams::ChangeDetection::Semantic }
90
+
91
+ class Exact < ContextDev::Internal::Type::BaseModel
92
+ # @!attribute type
93
+ #
94
+ # @return [Symbol, :exact]
95
+ required :type, const: :exact
96
+
97
+ # @!method initialize(type: :exact)
98
+ # Detect exact changes. For page targets, this means visible text diffs. For
99
+ # sitemap targets, this means URL additions and removals.
100
+ #
101
+ # @param type [Symbol, :exact]
102
+ end
103
+
104
+ class Semantic < ContextDev::Internal::Type::BaseModel
105
+ # @!attribute type
106
+ #
107
+ # @return [Symbol, :semantic]
108
+ required :type, const: :semantic
109
+
110
+ # @!attribute confidence_threshold
111
+ #
112
+ # @return [Float, nil]
113
+ optional :confidence_threshold, Float
114
+
115
+ # @!method initialize(confidence_threshold: nil, type: :semantic)
116
+ # Detect meaning-level changes to the extracted data, ignoring cosmetic or
117
+ # paraphrase-only differences. What is watched is determined by the extract
118
+ # target's `schema` and `instructions`.
119
+ #
120
+ # @param confidence_threshold [Float]
121
+ # @param type [Symbol, :semantic]
122
+ end
123
+
124
+ # @!method self.variants
125
+ # @return [Array(ContextDev::Models::MonitorUpdateParams::ChangeDetection::Exact, ContextDev::Models::MonitorUpdateParams::ChangeDetection::Semantic)]
126
+ end
127
+
128
+ class Schedule < ContextDev::Internal::Type::BaseModel
129
+ # @!attribute frequency
130
+ # Number of units between runs. The resulting interval (frequency × unit) must be
131
+ # at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes;
132
+ # maximum 365 when unit is days).
133
+ #
134
+ # @return [Integer]
135
+ required :frequency, Integer
136
+
137
+ # @!attribute type
138
+ #
139
+ # @return [Symbol, ContextDev::Models::MonitorUpdateParams::Schedule::Type]
140
+ required :type, enum: -> { ContextDev::MonitorUpdateParams::Schedule::Type }
141
+
142
+ # @!attribute unit
143
+ #
144
+ # @return [Symbol, ContextDev::Models::MonitorUpdateParams::Schedule::Unit]
145
+ required :unit, enum: -> { ContextDev::MonitorUpdateParams::Schedule::Unit }
146
+
147
+ # @!method initialize(frequency:, type:, unit:)
148
+ # Some parameter documentations has been truncated, see
149
+ # {ContextDev::Models::MonitorUpdateParams::Schedule} for more details.
150
+ #
151
+ # Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
152
+ # every 6 hours or every 2 days. The total interval (frequency × unit) must be
153
+ # between 10 minutes and 1 year.
154
+ #
155
+ # @param frequency [Integer] Number of units between runs. The resulting interval (frequency × unit) must be
156
+ #
157
+ # @param type [Symbol, ContextDev::Models::MonitorUpdateParams::Schedule::Type]
158
+ #
159
+ # @param unit [Symbol, ContextDev::Models::MonitorUpdateParams::Schedule::Unit]
160
+
161
+ # @see ContextDev::Models::MonitorUpdateParams::Schedule#type
162
+ module Type
163
+ extend ContextDev::Internal::Type::Enum
164
+
165
+ INTERVAL = :interval
166
+
167
+ # @!method self.values
168
+ # @return [Array<Symbol>]
169
+ end
170
+
171
+ # @see ContextDev::Models::MonitorUpdateParams::Schedule#unit
172
+ module Unit
173
+ extend ContextDev::Internal::Type::Enum
174
+
175
+ MINUTES = :minutes
176
+ HOURS = :hours
177
+ DAYS = :days
178
+
179
+ # @!method self.values
180
+ # @return [Array<Symbol>]
181
+ end
182
+ end
183
+
184
+ module Status
185
+ extend ContextDev::Internal::Type::Enum
186
+
187
+ ACTIVE = :active
188
+ PAUSED = :paused
189
+
190
+ # @!method self.values
191
+ # @return [Array<Symbol>]
192
+ end
193
+
194
+ # Discriminated union describing what the monitor watches.
195
+ module Target
196
+ extend ContextDev::Internal::Type::Union
197
+
198
+ discriminator :type
199
+
200
+ # Watch a single web page.
201
+ variant :page, -> { ContextDev::MonitorUpdateParams::Target::Page }
202
+
203
+ # 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. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
204
+ variant :sitemap, -> { ContextDev::MonitorUpdateParams::Target::Sitemap }
205
+
206
+ # Watch the monitor-relevant pages of a site for meaningful changes. A crawl guided by `schema`/`instructions` selects up to `max_pages` relevant pages to track; each run re-checks exactly those pages, and confirmed content changes are judged against the monitor's instructions. The tracked page set is refreshed by a periodic re-discovery crawl.
207
+ variant :extract, -> { ContextDev::MonitorUpdateParams::Target::Extract }
208
+
209
+ class Page < ContextDev::Internal::Type::BaseModel
210
+ # @!attribute type
211
+ #
212
+ # @return [Symbol, :page]
213
+ required :type, const: :page
214
+
215
+ # @!attribute url
216
+ #
217
+ # @return [String]
218
+ required :url, String
219
+
220
+ # @!attribute normalize_whitespace
221
+ # Normalize whitespace before comparing or analyzing text.
222
+ #
223
+ # @return [Boolean, nil]
224
+ optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
225
+
226
+ # @!method initialize(url:, normalize_whitespace: nil, type: :page)
227
+ # Watch a single web page.
228
+ #
229
+ # @param url [String]
230
+ #
231
+ # @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
232
+ #
233
+ # @param type [Symbol, :page]
234
+ end
235
+
236
+ class Sitemap < ContextDev::Internal::Type::BaseModel
237
+ # @!attribute type
238
+ #
239
+ # @return [Symbol, :sitemap]
240
+ required :type, const: :sitemap
241
+
242
+ # @!attribute url
243
+ # Sitemap URL to monitor.
244
+ #
245
+ # @return [String]
246
+ required :url, String
247
+
248
+ # @!attribute exclude
249
+ # URL path patterns to exclude.
250
+ #
251
+ # @return [Array<String>, nil]
252
+ optional :exclude, ContextDev::Internal::Type::ArrayOf[String]
253
+
254
+ # @!attribute include
255
+ # URL path patterns to include.
256
+ #
257
+ # @return [Array<String>, nil]
258
+ optional :include, ContextDev::Internal::Type::ArrayOf[String]
259
+
260
+ # @!attribute max_urls
261
+ # Maximum number of sitemap URLs to track (capped at 10,000).
262
+ #
263
+ # @return [Integer, nil]
264
+ optional :max_urls, Integer
265
+
266
+ # @!method initialize(url:, exclude: nil, include: nil, max_urls: nil, type: :sitemap)
267
+ # Watch a sitemap for URL additions and removals. Crawled URLs are normalized
268
+ # (lowercased host, no trailing slash/fragment) and scoped to the monitored site
269
+ # and its subdomains before comparison. On a detected difference the sitemap is
270
+ # re-fetched within the same run and only URLs both observations agree on are
271
+ # reported, suppressing transient crawl flaps.
272
+ #
273
+ # @param url [String] Sitemap URL to monitor.
274
+ #
275
+ # @param exclude [Array<String>] URL path patterns to exclude.
276
+ #
277
+ # @param include [Array<String>] URL path patterns to include.
278
+ #
279
+ # @param max_urls [Integer] Maximum number of sitemap URLs to track (capped at 10,000).
280
+ #
281
+ # @param type [Symbol, :sitemap]
282
+ end
283
+
284
+ class Extract < ContextDev::Internal::Type::BaseModel
285
+ # @!attribute instructions
286
+ # Natural-language instructions guiding which pages and facts to track and which
287
+ # changes to report.
288
+ #
289
+ # @return [String]
290
+ required :instructions, String
291
+
292
+ # @!attribute type
293
+ #
294
+ # @return [Symbol, :extract]
295
+ required :type, const: :extract
296
+
297
+ # @!attribute url
298
+ # Root URL to extract structured data from.
299
+ #
300
+ # @return [String]
301
+ required :url, String
302
+
303
+ # @!attribute follow_subdomains
304
+ #
305
+ # @return [Boolean, nil]
306
+ optional :follow_subdomains, ContextDev::Internal::Type::Boolean
307
+
308
+ # @!attribute max_depth
309
+ # Optional maximum link depth from the starting URL (0 = only the starting page).
310
+ #
311
+ # @return [Integer, nil]
312
+ optional :max_depth, Integer
313
+
314
+ # @!attribute max_pages
315
+ # Maximum number of pages to track.
316
+ #
317
+ # @return [Integer, nil]
318
+ optional :max_pages, Integer
319
+
320
+ # @!attribute schema
321
+ # JSON Schema describing the data you care about. It guides which pages are
322
+ # selected for tracking and gives the change judge context on what matters. If
323
+ # omitted, a default summary + key-points schema is used.
324
+ #
325
+ # @return [Hash{Symbol=>Object}, nil]
326
+ optional :schema, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]
327
+
328
+ # @!method initialize(instructions:, url:, follow_subdomains: nil, max_depth: nil, max_pages: nil, schema: nil, type: :extract)
329
+ # Some parameter documentations has been truncated, see
330
+ # {ContextDev::Models::MonitorUpdateParams::Target::Extract} for more details.
331
+ #
332
+ # Watch the monitor-relevant pages of a site for meaningful changes. A crawl
333
+ # guided by `schema`/`instructions` selects up to `max_pages` relevant pages to
334
+ # track; each run re-checks exactly those pages, and confirmed content changes are
335
+ # judged against the monitor's instructions. The tracked page set is refreshed by
336
+ # a periodic re-discovery crawl.
337
+ #
338
+ # @param instructions [String] Natural-language instructions guiding which pages and facts to track and which c
339
+ #
340
+ # @param url [String] Root URL to extract structured data from.
341
+ #
342
+ # @param follow_subdomains [Boolean]
343
+ #
344
+ # @param max_depth [Integer] Optional maximum link depth from the starting URL (0 = only the starting page).
345
+ #
346
+ # @param max_pages [Integer] Maximum number of pages to track.
347
+ #
348
+ # @param schema [Hash{Symbol=>Object}] JSON Schema describing the data you care about. It guides which pages are select
349
+ #
350
+ # @param type [Symbol, :extract]
351
+ end
352
+
353
+ # @!method self.variants
354
+ # @return [Array(ContextDev::Models::MonitorUpdateParams::Target::Page, ContextDev::Models::MonitorUpdateParams::Target::Sitemap, ContextDev::Models::MonitorUpdateParams::Target::Extract)]
355
+ end
356
+
357
+ class Webhook < ContextDev::Internal::Type::BaseModel
358
+ # @!attribute url
359
+ # Webhook URL called when a change is detected.
360
+ #
361
+ # @return [String]
362
+ required :url, String
363
+
364
+ # @!method initialize(url:)
365
+ # Set to null to remove the webhook.
366
+ #
367
+ # @param url [String] Webhook URL called when a change is detected.
368
+ end
369
+ end
370
+ end
371
+ end