context.dev 1.35.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 (171) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +24 -17
  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_extract_styleguide_params.rb +22 -1
  32. data/lib/context_dev/models/web_screenshot_params.rb +245 -1
  33. data/lib/context_dev/models/web_search_params.rb +270 -3
  34. data/lib/context_dev/models/web_web_crawl_md_params.rb +236 -1
  35. data/lib/context_dev/models/web_web_scrape_html_params.rb +234 -1
  36. data/lib/context_dev/models/web_web_scrape_html_response.rb +10 -2
  37. data/lib/context_dev/models/web_web_scrape_images_params.rb +12 -1
  38. data/lib/context_dev/models/web_web_scrape_md_params.rb +234 -1
  39. data/lib/context_dev/models.rb +20 -12
  40. data/lib/context_dev/resources/ai.rb +0 -33
  41. data/lib/context_dev/resources/brand.rb +7 -204
  42. data/lib/context_dev/resources/monitors.rb +352 -0
  43. data/lib/context_dev/resources/utility.rb +9 -35
  44. data/lib/context_dev/resources/web.rb +36 -8
  45. data/lib/context_dev/version.rb +1 -1
  46. data/lib/context_dev.rb +23 -14
  47. data/rbi/context_dev/client.rbi +6 -0
  48. data/rbi/context_dev/models/brand_retrieve_params.rbi +3792 -679
  49. data/rbi/context_dev/models/monitor_create_params.rbi +640 -0
  50. data/rbi/context_dev/models/monitor_create_response.rbi +820 -0
  51. data/rbi/context_dev/models/monitor_delete_params.rbi +35 -0
  52. data/rbi/context_dev/models/monitor_delete_response.rbi +29 -0
  53. data/rbi/context_dev/models/monitor_list_account_changes_params.rbi +211 -0
  54. data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +376 -0
  55. data/rbi/context_dev/models/monitor_list_account_runs_params.rbi +125 -0
  56. data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +464 -0
  57. data/rbi/context_dev/models/monitor_list_changes_params.rbi +91 -0
  58. data/rbi/context_dev/models/monitor_list_changes_response.rbi +372 -0
  59. data/rbi/context_dev/models/monitor_list_params.rbi +332 -0
  60. data/rbi/context_dev/models/monitor_list_response.rbi +885 -0
  61. data/rbi/context_dev/models/monitor_list_runs_params.rbi +125 -0
  62. data/rbi/context_dev/models/monitor_list_runs_response.rbi +455 -0
  63. data/rbi/context_dev/models/monitor_retrieve_change_params.rbi +38 -0
  64. data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +478 -0
  65. data/rbi/context_dev/models/monitor_retrieve_params.rbi +38 -0
  66. data/rbi/context_dev/models/monitor_retrieve_response.rbi +828 -0
  67. data/rbi/context_dev/models/monitor_run_params.rbi +35 -0
  68. data/rbi/context_dev/models/monitor_run_response.rbi +48 -0
  69. data/rbi/context_dev/models/monitor_update_params.rbi +680 -0
  70. data/rbi/context_dev/models/monitor_update_response.rbi +820 -0
  71. data/rbi/context_dev/models/utility_prefetch_params.rbi +129 -7
  72. data/rbi/context_dev/models/utility_prefetch_response.rbi +55 -3
  73. data/rbi/context_dev/models/web_extract_response.rbi +10 -0
  74. data/rbi/context_dev/models/web_extract_styleguide_params.rbi +59 -0
  75. data/rbi/context_dev/models/web_screenshot_params.rbi +295 -0
  76. data/rbi/context_dev/models/web_search_params.rbi +288 -2
  77. data/rbi/context_dev/models/web_web_crawl_md_params.rbi +260 -0
  78. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +465 -0
  79. data/rbi/context_dev/models/web_web_scrape_html_response.rbi +29 -3
  80. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +17 -0
  81. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +259 -0
  82. data/rbi/context_dev/models.rbi +23 -15
  83. data/rbi/context_dev/resources/ai.rbi +0 -28
  84. data/rbi/context_dev/resources/brand.rbi +13 -228
  85. data/rbi/context_dev/resources/monitors.rbi +286 -0
  86. data/rbi/context_dev/resources/utility.rbi +14 -29
  87. data/rbi/context_dev/resources/web.rbi +56 -1
  88. data/sig/context_dev/client.rbs +2 -0
  89. data/sig/context_dev/models/brand_retrieve_params.rbs +1560 -281
  90. data/sig/context_dev/models/monitor_create_params.rbs +311 -0
  91. data/sig/context_dev/models/monitor_create_response.rbs +369 -0
  92. data/sig/context_dev/models/monitor_delete_params.rbs +23 -0
  93. data/sig/context_dev/models/monitor_delete_response.rbs +15 -0
  94. data/sig/context_dev/models/monitor_list_account_changes_params.rbs +104 -0
  95. data/sig/context_dev/models/monitor_list_account_changes_response.rbs +176 -0
  96. data/sig/context_dev/models/monitor_list_account_runs_params.rbs +58 -0
  97. data/sig/context_dev/models/monitor_list_account_runs_response.rbs +184 -0
  98. data/sig/context_dev/models/monitor_list_changes_params.rbs +61 -0
  99. data/sig/context_dev/models/monitor_list_changes_response.rbs +176 -0
  100. data/sig/context_dev/models/monitor_list_params.rbs +160 -0
  101. data/sig/context_dev/models/monitor_list_response.rbs +396 -0
  102. data/sig/context_dev/models/monitor_list_runs_params.rbs +63 -0
  103. data/sig/context_dev/models/monitor_list_runs_response.rbs +184 -0
  104. data/sig/context_dev/models/monitor_retrieve_change_params.rbs +23 -0
  105. data/sig/context_dev/models/monitor_retrieve_change_response.rbs +228 -0
  106. data/sig/context_dev/models/monitor_retrieve_params.rbs +23 -0
  107. data/sig/context_dev/models/monitor_retrieve_response.rbs +369 -0
  108. data/sig/context_dev/models/monitor_run_params.rbs +23 -0
  109. data/sig/context_dev/models/monitor_run_response.rbs +18 -0
  110. data/sig/context_dev/models/monitor_update_params.rbs +331 -0
  111. data/sig/context_dev/models/monitor_update_response.rbs +369 -0
  112. data/sig/context_dev/models/utility_prefetch_params.rbs +52 -4
  113. data/sig/context_dev/models/utility_prefetch_response.rbs +22 -3
  114. data/sig/context_dev/models/web_extract_response.rbs +5 -0
  115. data/sig/context_dev/models/web_extract_styleguide_params.rbs +20 -0
  116. data/sig/context_dev/models/web_screenshot_params.rbs +446 -0
  117. data/sig/context_dev/models/web_search_params.rbs +503 -0
  118. data/sig/context_dev/models/web_web_crawl_md_params.rbs +433 -0
  119. data/sig/context_dev/models/web_web_scrape_html_params.rbs +433 -0
  120. data/sig/context_dev/models/web_web_scrape_html_response.rbs +8 -0
  121. data/sig/context_dev/models/web_web_scrape_images_params.rbs +7 -0
  122. data/sig/context_dev/models/web_web_scrape_md_params.rbs +433 -0
  123. data/sig/context_dev/models.rbs +20 -12
  124. data/sig/context_dev/resources/ai.rbs +0 -8
  125. data/sig/context_dev/resources/brand.rbs +1 -56
  126. data/sig/context_dev/resources/monitors.rbs +101 -0
  127. data/sig/context_dev/resources/utility.rbs +2 -7
  128. data/sig/context_dev/resources/web.rbs +12 -0
  129. metadata +71 -44
  130. data/lib/context_dev/models/ai_ai_query_params.rb +0 -235
  131. data/lib/context_dev/models/ai_ai_query_response.rb +0 -133
  132. data/lib/context_dev/models/brand_identify_from_transaction_params.rb +0 -474
  133. data/lib/context_dev/models/brand_identify_from_transaction_response.rb +0 -1074
  134. data/lib/context_dev/models/brand_retrieve_by_email_params.rb +0 -195
  135. data/lib/context_dev/models/brand_retrieve_by_email_response.rb +0 -1071
  136. data/lib/context_dev/models/brand_retrieve_by_isin_params.rb +0 -195
  137. data/lib/context_dev/models/brand_retrieve_by_isin_response.rb +0 -1070
  138. data/lib/context_dev/models/brand_retrieve_by_name_params.rb +0 -452
  139. data/lib/context_dev/models/brand_retrieve_by_name_response.rb +0 -1070
  140. data/lib/context_dev/models/brand_retrieve_by_ticker_params.rb +0 -283
  141. data/lib/context_dev/models/brand_retrieve_by_ticker_response.rb +0 -1072
  142. data/lib/context_dev/models/utility_prefetch_by_email_params.rb +0 -37
  143. data/lib/context_dev/models/utility_prefetch_by_email_response.rb +0 -68
  144. data/rbi/context_dev/models/ai_ai_query_params.rbi +0 -504
  145. data/rbi/context_dev/models/ai_ai_query_response.rbi +0 -267
  146. data/rbi/context_dev/models/brand_identify_from_transaction_params.rbi +0 -2020
  147. data/rbi/context_dev/models/brand_identify_from_transaction_response.rbi +0 -3515
  148. data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +0 -743
  149. data/rbi/context_dev/models/brand_retrieve_by_email_response.rbi +0 -3511
  150. data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +0 -743
  151. data/rbi/context_dev/models/brand_retrieve_by_isin_response.rbi +0 -3510
  152. data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +0 -1982
  153. data/rbi/context_dev/models/brand_retrieve_by_name_response.rbi +0 -3510
  154. data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +0 -1153
  155. data/rbi/context_dev/models/brand_retrieve_by_ticker_response.rbi +0 -3512
  156. data/rbi/context_dev/models/utility_prefetch_by_email_params.rbi +0 -65
  157. data/rbi/context_dev/models/utility_prefetch_by_email_response.rbi +0 -132
  158. data/sig/context_dev/models/ai_ai_query_params.rbs +0 -218
  159. data/sig/context_dev/models/ai_ai_query_response.rbs +0 -121
  160. data/sig/context_dev/models/brand_identify_from_transaction_params.rbs +0 -822
  161. data/sig/context_dev/models/brand_identify_from_transaction_response.rbs +0 -1441
  162. data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +0 -305
  163. data/sig/context_dev/models/brand_retrieve_by_email_response.rbs +0 -1441
  164. data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +0 -305
  165. data/sig/context_dev/models/brand_retrieve_by_isin_response.rbs +0 -1441
  166. data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +0 -801
  167. data/sig/context_dev/models/brand_retrieve_by_name_response.rbs +0 -1441
  168. data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +0 -467
  169. data/sig/context_dev/models/brand_retrieve_by_ticker_response.rbs +0 -1441
  170. data/sig/context_dev/models/utility_prefetch_by_email_params.rbs +0 -30
  171. data/sig/context_dev/models/utility_prefetch_by_email_response.rbs +0 -64
@@ -0,0 +1,227 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ContextDev
4
+ module Models
5
+ # @see ContextDev::Resources::Monitors#list_runs
6
+ class MonitorListRunsResponse < ContextDev::Internal::Type::BaseModel
7
+ # @!attribute data
8
+ #
9
+ # @return [Array<ContextDev::Models::MonitorListRunsResponse::Data>]
10
+ required :data,
11
+ -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::MonitorListRunsResponse::Data] }
12
+
13
+ # @!attribute has_more
14
+ #
15
+ # @return [Boolean]
16
+ required :has_more, ContextDev::Internal::Type::Boolean
17
+
18
+ # @!attribute next_cursor
19
+ #
20
+ # @return [String, nil]
21
+ required :next_cursor, String, nil?: true
22
+
23
+ # @!method initialize(data:, has_more:, next_cursor:)
24
+ # @param data [Array<ContextDev::Models::MonitorListRunsResponse::Data>]
25
+ # @param has_more [Boolean]
26
+ # @param next_cursor [String, nil]
27
+
28
+ class Data < ContextDev::Internal::Type::BaseModel
29
+ # @!attribute id
30
+ #
31
+ # @return [String]
32
+ required :id, String
33
+
34
+ # @!attribute baseline_created
35
+ # True when this run established the monitor's initial baseline; baseline runs
36
+ # perform no change detection.
37
+ #
38
+ # @return [Boolean]
39
+ required :baseline_created, ContextDev::Internal::Type::Boolean
40
+
41
+ # @!attribute change_detected
42
+ #
43
+ # @return [Boolean]
44
+ required :change_detected, ContextDev::Internal::Type::Boolean
45
+
46
+ # @!attribute change_detection_type
47
+ #
48
+ # @return [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::ChangeDetectionType]
49
+ required :change_detection_type,
50
+ enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::ChangeDetectionType }
51
+
52
+ # @!attribute credits_charged
53
+ # Credits charged for this run (0 for skipped/failed runs).
54
+ #
55
+ # @return [Integer]
56
+ required :credits_charged, Integer
57
+
58
+ # @!attribute monitor_id
59
+ #
60
+ # @return [String]
61
+ required :monitor_id, String
62
+
63
+ # @!attribute run_type
64
+ # The first run after monitor creation is a baseline run.
65
+ #
66
+ # @return [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::RunType]
67
+ required :run_type, enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::RunType }
68
+
69
+ # @!attribute status
70
+ # Lifecycle status of a run. `skipped` runs never executed — see `skip_reason`
71
+ # (insufficient credits, monitor paused, or superseded by a concurrent run).
72
+ #
73
+ # @return [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::Status]
74
+ required :status, enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::Status }
75
+
76
+ # @!attribute target_type
77
+ #
78
+ # @return [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::TargetType]
79
+ required :target_type, enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::TargetType }
80
+
81
+ # @!attribute change_id
82
+ #
83
+ # @return [String, nil]
84
+ optional :change_id, String, nil?: true
85
+
86
+ # @!attribute completed_at
87
+ #
88
+ # @return [Time, nil]
89
+ optional :completed_at, Time, nil?: true
90
+
91
+ # @!attribute error
92
+ #
93
+ # @return [ContextDev::Models::MonitorListRunsResponse::Data::Error, nil]
94
+ optional :error, -> { ContextDev::Models::MonitorListRunsResponse::Data::Error }, nil?: true
95
+
96
+ # @!attribute skip_reason
97
+ # Why a skipped run never executed; null unless status is `skipped`.
98
+ #
99
+ # @return [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::SkipReason, nil]
100
+ optional :skip_reason,
101
+ enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::SkipReason },
102
+ nil?: true
103
+
104
+ # @!attribute started_at
105
+ #
106
+ # @return [Time, nil]
107
+ optional :started_at, Time, nil?: true
108
+
109
+ # @!method initialize(id:, baseline_created:, change_detected:, change_detection_type:, credits_charged:, monitor_id:, run_type:, status:, target_type:, change_id: nil, completed_at: nil, error: nil, skip_reason: nil, started_at: nil)
110
+ # Some parameter documentations has been truncated, see
111
+ # {ContextDev::Models::MonitorListRunsResponse::Data} for more details.
112
+ #
113
+ # @param id [String]
114
+ #
115
+ # @param baseline_created [Boolean] True when this run established the monitor's initial baseline; baseline runs per
116
+ #
117
+ # @param change_detected [Boolean]
118
+ #
119
+ # @param change_detection_type [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::ChangeDetectionType]
120
+ #
121
+ # @param credits_charged [Integer] Credits charged for this run (0 for skipped/failed runs).
122
+ #
123
+ # @param monitor_id [String]
124
+ #
125
+ # @param run_type [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::RunType] The first run after monitor creation is a baseline run.
126
+ #
127
+ # @param status [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::Status] Lifecycle status of a run. `skipped` runs never executed — see `skip_reason` (in
128
+ #
129
+ # @param target_type [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::TargetType]
130
+ #
131
+ # @param change_id [String, nil]
132
+ #
133
+ # @param completed_at [Time, nil]
134
+ #
135
+ # @param error [ContextDev::Models::MonitorListRunsResponse::Data::Error, nil]
136
+ #
137
+ # @param skip_reason [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::SkipReason, nil] Why a skipped run never executed; null unless status is `skipped`.
138
+ #
139
+ # @param started_at [Time, nil]
140
+
141
+ # @see ContextDev::Models::MonitorListRunsResponse::Data#change_detection_type
142
+ module ChangeDetectionType
143
+ extend ContextDev::Internal::Type::Enum
144
+
145
+ EXACT = :exact
146
+ SEMANTIC = :semantic
147
+
148
+ # @!method self.values
149
+ # @return [Array<Symbol>]
150
+ end
151
+
152
+ # The first run after monitor creation is a baseline run.
153
+ #
154
+ # @see ContextDev::Models::MonitorListRunsResponse::Data#run_type
155
+ module RunType
156
+ extend ContextDev::Internal::Type::Enum
157
+
158
+ BASELINE = :baseline
159
+ SCHEDULED = :scheduled
160
+
161
+ # @!method self.values
162
+ # @return [Array<Symbol>]
163
+ end
164
+
165
+ # Lifecycle status of a run. `skipped` runs never executed — see `skip_reason`
166
+ # (insufficient credits, monitor paused, or superseded by a concurrent run).
167
+ #
168
+ # @see ContextDev::Models::MonitorListRunsResponse::Data#status
169
+ module Status
170
+ extend ContextDev::Internal::Type::Enum
171
+
172
+ QUEUED = :queued
173
+ RUNNING = :running
174
+ COMPLETED = :completed
175
+ FAILED = :failed
176
+ SKIPPED = :skipped
177
+
178
+ # @!method self.values
179
+ # @return [Array<Symbol>]
180
+ end
181
+
182
+ # @see ContextDev::Models::MonitorListRunsResponse::Data#target_type
183
+ module TargetType
184
+ extend ContextDev::Internal::Type::Enum
185
+
186
+ PAGE = :page
187
+ SITEMAP = :sitemap
188
+ EXTRACT = :extract
189
+
190
+ # @!method self.values
191
+ # @return [Array<Symbol>]
192
+ end
193
+
194
+ # @see ContextDev::Models::MonitorListRunsResponse::Data#error
195
+ class Error < ContextDev::Internal::Type::BaseModel
196
+ # @!attribute code
197
+ #
198
+ # @return [String]
199
+ required :code, String
200
+
201
+ # @!attribute message
202
+ #
203
+ # @return [String]
204
+ required :message, String
205
+
206
+ # @!method initialize(code:, message:)
207
+ # @param code [String]
208
+ # @param message [String]
209
+ end
210
+
211
+ # Why a skipped run never executed; null unless status is `skipped`.
212
+ #
213
+ # @see ContextDev::Models::MonitorListRunsResponse::Data#skip_reason
214
+ module SkipReason
215
+ extend ContextDev::Internal::Type::Enum
216
+
217
+ INSUFFICIENT_CREDITS = :insufficient_credits
218
+ MONITOR_PAUSED = :monitor_paused
219
+ SUPERSEDED = :superseded
220
+
221
+ # @!method self.values
222
+ # @return [Array<Symbol>]
223
+ end
224
+ end
225
+ end
226
+ end
227
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ContextDev
4
+ module Models
5
+ # @see ContextDev::Resources::Monitors#retrieve_change
6
+ class MonitorRetrieveChangeParams < ContextDev::Internal::Type::BaseModel
7
+ extend ContextDev::Internal::Type::RequestParameters::Converter
8
+ include ContextDev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute change_id
11
+ #
12
+ # @return [String]
13
+ required :change_id, String
14
+
15
+ # @!method initialize(change_id:, request_options: {})
16
+ # @param change_id [String]
17
+ # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,271 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ContextDev
4
+ module Models
5
+ # @see ContextDev::Resources::Monitors#retrieve_change
6
+ class MonitorRetrieveChangeResponse < ContextDev::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute change_detection_type
13
+ #
14
+ # @return [Symbol, ContextDev::Models::MonitorRetrieveChangeResponse::ChangeDetectionType]
15
+ required :change_detection_type,
16
+ enum: -> { ContextDev::Models::MonitorRetrieveChangeResponse::ChangeDetectionType }
17
+
18
+ # @!attribute detected_at
19
+ #
20
+ # @return [Time]
21
+ required :detected_at, Time
22
+
23
+ # @!attribute mode
24
+ # Top-level monitor category. Always `web` today; the concrete behavior is
25
+ # described by `target` and `change_detection`.
26
+ #
27
+ # @return [Symbol, ContextDev::Models::MonitorRetrieveChangeResponse::Mode]
28
+ required :mode, enum: -> { ContextDev::Models::MonitorRetrieveChangeResponse::Mode }
29
+
30
+ # @!attribute monitor_id
31
+ #
32
+ # @return [String]
33
+ required :monitor_id, String
34
+
35
+ # @!attribute run_id
36
+ # The run that detected this change.
37
+ #
38
+ # @return [String]
39
+ required :run_id, String
40
+
41
+ # @!attribute summary
42
+ #
43
+ # @return [String]
44
+ required :summary, String
45
+
46
+ # @!attribute target_type
47
+ #
48
+ # @return [Symbol, ContextDev::Models::MonitorRetrieveChangeResponse::TargetType]
49
+ required :target_type, enum: -> { ContextDev::Models::MonitorRetrieveChangeResponse::TargetType }
50
+
51
+ # @!attribute title
52
+ #
53
+ # @return [String]
54
+ required :title, String
55
+
56
+ # @!attribute url
57
+ #
58
+ # @return [String]
59
+ required :url, String
60
+
61
+ # @!attribute added_url_count
62
+ #
63
+ # @return [Integer, nil]
64
+ optional :added_url_count, Integer
65
+
66
+ # @!attribute added_urls
67
+ # At most 500 URLs are included; the corresponding count field is always exact.
68
+ #
69
+ # @return [Array<String>, nil]
70
+ optional :added_urls, ContextDev::Internal::Type::ArrayOf[String]
71
+
72
+ # @!attribute after_text_excerpt
73
+ #
74
+ # @return [String, nil]
75
+ optional :after_text_excerpt, String
76
+
77
+ # @!attribute before_text_excerpt
78
+ #
79
+ # @return [String, nil]
80
+ optional :before_text_excerpt, String
81
+
82
+ # @!attribute confidence
83
+ #
84
+ # @return [Float, nil]
85
+ optional :confidence, Float
86
+
87
+ # @!attribute diff
88
+ # Text diff between the previous and current page baseline (page targets).
89
+ #
90
+ # @return [String, nil]
91
+ optional :diff, String
92
+
93
+ # @!attribute evidence
94
+ #
95
+ # @return [Array<ContextDev::Models::MonitorRetrieveChangeResponse::Evidence>, nil]
96
+ optional :evidence,
97
+ -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::MonitorRetrieveChangeResponse::Evidence] }
98
+
99
+ # @!attribute importance
100
+ #
101
+ # @return [Symbol, ContextDev::Models::MonitorRetrieveChangeResponse::Importance, nil]
102
+ optional :importance, enum: -> { ContextDev::Models::MonitorRetrieveChangeResponse::Importance }
103
+
104
+ # @!attribute matched_url_count
105
+ #
106
+ # @return [Integer, nil]
107
+ optional :matched_url_count, Integer
108
+
109
+ # @!attribute matched_urls
110
+ # At most 500 URLs are included; the corresponding count field is always exact.
111
+ #
112
+ # @return [Array<String>, nil]
113
+ optional :matched_urls, ContextDev::Internal::Type::ArrayOf[String]
114
+
115
+ # @!attribute query
116
+ #
117
+ # @return [String, nil]
118
+ optional :query, String
119
+
120
+ # @!attribute removed_url_count
121
+ #
122
+ # @return [Integer, nil]
123
+ optional :removed_url_count, Integer
124
+
125
+ # @!attribute removed_urls
126
+ # At most 500 URLs are included; the corresponding count field is always exact.
127
+ #
128
+ # @return [Array<String>, nil]
129
+ optional :removed_urls, ContextDev::Internal::Type::ArrayOf[String]
130
+
131
+ # @!attribute tags
132
+ # User-defined tags for grouping and filtering monitors and their changes.
133
+ #
134
+ # @return [Array<String>, nil]
135
+ optional :tags, ContextDev::Internal::Type::ArrayOf[String]
136
+
137
+ # @!method initialize(id:, change_detection_type:, detected_at:, mode:, monitor_id:, run_id:, summary:, target_type:, title:, url:, added_url_count: nil, added_urls: nil, after_text_excerpt: nil, before_text_excerpt: nil, confidence: nil, diff: nil, evidence: nil, importance: nil, matched_url_count: nil, matched_urls: nil, query: nil, removed_url_count: nil, removed_urls: nil, tags: nil)
138
+ # Some parameter documentations has been truncated, see
139
+ # {ContextDev::Models::MonitorRetrieveChangeResponse} for more details.
140
+ #
141
+ # A detected change. `mode` is the constant `web`; `target_type` and
142
+ # `change_detection_type` describe the change, and which optional fields are
143
+ # present depends on them (page: `diff` + excerpts; sitemap:
144
+ # `added_urls`/`removed_urls`; semantic:
145
+ # `query`/`confidence`/`importance`/`evidence`/`matched_urls`).
146
+ #
147
+ # @param id [String]
148
+ #
149
+ # @param change_detection_type [Symbol, ContextDev::Models::MonitorRetrieveChangeResponse::ChangeDetectionType]
150
+ #
151
+ # @param detected_at [Time]
152
+ #
153
+ # @param mode [Symbol, ContextDev::Models::MonitorRetrieveChangeResponse::Mode] Top-level monitor category. Always `web` today; the concrete behavior is describ
154
+ #
155
+ # @param monitor_id [String]
156
+ #
157
+ # @param run_id [String] The run that detected this change.
158
+ #
159
+ # @param summary [String]
160
+ #
161
+ # @param target_type [Symbol, ContextDev::Models::MonitorRetrieveChangeResponse::TargetType]
162
+ #
163
+ # @param title [String]
164
+ #
165
+ # @param url [String]
166
+ #
167
+ # @param added_url_count [Integer]
168
+ #
169
+ # @param added_urls [Array<String>] At most 500 URLs are included; the corresponding count field is always exact.
170
+ #
171
+ # @param after_text_excerpt [String]
172
+ #
173
+ # @param before_text_excerpt [String]
174
+ #
175
+ # @param confidence [Float]
176
+ #
177
+ # @param diff [String] Text diff between the previous and current page baseline (page targets).
178
+ #
179
+ # @param evidence [Array<ContextDev::Models::MonitorRetrieveChangeResponse::Evidence>]
180
+ #
181
+ # @param importance [Symbol, ContextDev::Models::MonitorRetrieveChangeResponse::Importance]
182
+ #
183
+ # @param matched_url_count [Integer]
184
+ #
185
+ # @param matched_urls [Array<String>] At most 500 URLs are included; the corresponding count field is always exact.
186
+ #
187
+ # @param query [String]
188
+ #
189
+ # @param removed_url_count [Integer]
190
+ #
191
+ # @param removed_urls [Array<String>] At most 500 URLs are included; the corresponding count field is always exact.
192
+ #
193
+ # @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
194
+
195
+ # @see ContextDev::Models::MonitorRetrieveChangeResponse#change_detection_type
196
+ module ChangeDetectionType
197
+ extend ContextDev::Internal::Type::Enum
198
+
199
+ EXACT = :exact
200
+ SEMANTIC = :semantic
201
+
202
+ # @!method self.values
203
+ # @return [Array<Symbol>]
204
+ end
205
+
206
+ # Top-level monitor category. Always `web` today; the concrete behavior is
207
+ # described by `target` and `change_detection`.
208
+ #
209
+ # @see ContextDev::Models::MonitorRetrieveChangeResponse#mode
210
+ module Mode
211
+ extend ContextDev::Internal::Type::Enum
212
+
213
+ WEB = :web
214
+
215
+ # @!method self.values
216
+ # @return [Array<Symbol>]
217
+ end
218
+
219
+ # @see ContextDev::Models::MonitorRetrieveChangeResponse#target_type
220
+ module TargetType
221
+ extend ContextDev::Internal::Type::Enum
222
+
223
+ PAGE = :page
224
+ SITEMAP = :sitemap
225
+ EXTRACT = :extract
226
+
227
+ # @!method self.values
228
+ # @return [Array<Symbol>]
229
+ end
230
+
231
+ class Evidence < ContextDev::Internal::Type::BaseModel
232
+ # @!attribute after
233
+ # Snapshot of the content after the change.
234
+ #
235
+ # @return [String]
236
+ required :after, String
237
+
238
+ # @!attribute before
239
+ # Snapshot of the content before the change.
240
+ #
241
+ # @return [String]
242
+ required :before, String
243
+
244
+ # @!attribute url
245
+ # Optional URL the evidence relates to. Absent for whole-target diffs.
246
+ #
247
+ # @return [String, nil]
248
+ optional :url, String
249
+
250
+ # @!method initialize(after:, before:, url: nil)
251
+ # @param after [String] Snapshot of the content after the change.
252
+ #
253
+ # @param before [String] Snapshot of the content before the change.
254
+ #
255
+ # @param url [String] Optional URL the evidence relates to. Absent for whole-target diffs.
256
+ end
257
+
258
+ # @see ContextDev::Models::MonitorRetrieveChangeResponse#importance
259
+ module Importance
260
+ extend ContextDev::Internal::Type::Enum
261
+
262
+ LOW = :low
263
+ MEDIUM = :medium
264
+ HIGH = :high
265
+
266
+ # @!method self.values
267
+ # @return [Array<Symbol>]
268
+ end
269
+ end
270
+ end
271
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ContextDev
4
+ module Models
5
+ # @see ContextDev::Resources::Monitors#retrieve
6
+ class MonitorRetrieveParams < 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
+ # @!method initialize(monitor_id:, request_options: {})
16
+ # @param monitor_id [String]
17
+ # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end