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,1028 @@
1
+ # typed: strong
2
+
3
+ module ContextDev
4
+ module Models
5
+ class MonitorRetrieveResponse < ContextDev::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ ContextDev::Models::MonitorRetrieveResponse,
10
+ ContextDev::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :id
16
+
17
+ # Discriminated union describing how changes are detected.
18
+ sig do
19
+ returns(
20
+ ContextDev::Models::MonitorRetrieveResponse::ChangeDetection::Variants
21
+ )
22
+ end
23
+ attr_accessor :change_detection
24
+
25
+ sig { returns(Time) }
26
+ attr_accessor :created_at
27
+
28
+ # Top-level monitor category. Always `web` today; the concrete behavior is
29
+ # described by `target` and `change_detection`.
30
+ sig do
31
+ returns(ContextDev::Models::MonitorRetrieveResponse::Mode::TaggedSymbol)
32
+ end
33
+ attr_accessor :mode
34
+
35
+ sig { returns(String) }
36
+ attr_accessor :name
37
+
38
+ # Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
39
+ # every 6 hours or every 2 days. The total interval (frequency × unit) must be
40
+ # between 10 minutes and 1 year.
41
+ sig { returns(ContextDev::Models::MonitorRetrieveResponse::Schedule) }
42
+ attr_reader :schedule
43
+
44
+ sig do
45
+ params(
46
+ schedule:
47
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::OrHash
48
+ ).void
49
+ end
50
+ attr_writer :schedule
51
+
52
+ # Monitor lifecycle status. `failed` means the most recent run failed (see the
53
+ # monitor's `last_error`); failed monitors keep running on schedule and flip back
54
+ # to `active` on the next successful run. Monitors are auto-`paused` after
55
+ # repeated consecutive failures or insufficient-credit skips; resume by PATCHing
56
+ # status to `active`.
57
+ sig do
58
+ returns(
59
+ ContextDev::Models::MonitorRetrieveResponse::Status::TaggedSymbol
60
+ )
61
+ end
62
+ attr_accessor :status
63
+
64
+ # Discriminated union describing what the monitor watches.
65
+ sig do
66
+ returns(ContextDev::Models::MonitorRetrieveResponse::Target::Variants)
67
+ end
68
+ attr_accessor :target
69
+
70
+ sig { returns(Time) }
71
+ attr_accessor :updated_at
72
+
73
+ # Current baseline: the last observed value the monitor compares new snapshots
74
+ # against. Its shape follows `target.type` (page/sitemap/extract). Only populated
75
+ # on GET /monitors/{monitor_id}; null until the first baseline run completes (and
76
+ # after a target or change_detection update, which resets the baseline).
77
+ sig do
78
+ returns(
79
+ T.nilable(
80
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::Variants
81
+ )
82
+ )
83
+ end
84
+ attr_accessor :baseline
85
+
86
+ sig { returns(T.nilable(Time)) }
87
+ attr_accessor :last_change_at
88
+
89
+ # Error from the most recent failed run; null when the last run succeeded.
90
+ sig do
91
+ returns(
92
+ T.nilable(ContextDev::Models::MonitorRetrieveResponse::LastError)
93
+ )
94
+ end
95
+ attr_reader :last_error
96
+
97
+ sig do
98
+ params(
99
+ last_error:
100
+ T.nilable(
101
+ ContextDev::Models::MonitorRetrieveResponse::LastError::OrHash
102
+ )
103
+ ).void
104
+ end
105
+ attr_writer :last_error
106
+
107
+ sig { returns(T.nilable(Time)) }
108
+ attr_accessor :last_run_at
109
+
110
+ # When the next scheduled run is due.
111
+ sig { returns(T.nilable(Time)) }
112
+ attr_accessor :next_run_at
113
+
114
+ # User-defined tags for grouping and filtering monitors and their changes.
115
+ sig { returns(T.nilable(T::Array[String])) }
116
+ attr_reader :tags
117
+
118
+ sig { params(tags: T::Array[String]).void }
119
+ attr_writer :tags
120
+
121
+ sig do
122
+ returns(T.nilable(ContextDev::Models::MonitorRetrieveResponse::Webhook))
123
+ end
124
+ attr_reader :webhook
125
+
126
+ sig do
127
+ params(
128
+ webhook:
129
+ T.nilable(
130
+ ContextDev::Models::MonitorRetrieveResponse::Webhook::OrHash
131
+ )
132
+ ).void
133
+ end
134
+ attr_writer :webhook
135
+
136
+ # A web monitor. `mode` is the constant `web`; behavior is described by `target`
137
+ # (page/sitemap/extract) and `change_detection` (exact/semantic).
138
+ sig do
139
+ params(
140
+ id: String,
141
+ change_detection:
142
+ T.any(
143
+ ContextDev::Models::MonitorRetrieveResponse::ChangeDetection::Exact::OrHash,
144
+ ContextDev::Models::MonitorRetrieveResponse::ChangeDetection::Semantic::OrHash
145
+ ),
146
+ created_at: Time,
147
+ mode: ContextDev::Models::MonitorRetrieveResponse::Mode::OrSymbol,
148
+ name: String,
149
+ schedule:
150
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::OrHash,
151
+ status: ContextDev::Models::MonitorRetrieveResponse::Status::OrSymbol,
152
+ target:
153
+ T.any(
154
+ ContextDev::Models::MonitorRetrieveResponse::Target::Page::OrHash,
155
+ ContextDev::Models::MonitorRetrieveResponse::Target::Sitemap::OrHash,
156
+ ContextDev::Models::MonitorRetrieveResponse::Target::Extract::OrHash
157
+ ),
158
+ updated_at: Time,
159
+ baseline:
160
+ T.nilable(
161
+ T.any(
162
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::MonitorsPageBaseline::OrHash,
163
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::MonitorsSitemapBaseline::OrHash,
164
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::MonitorsExtractBaseline::OrHash
165
+ )
166
+ ),
167
+ last_change_at: T.nilable(Time),
168
+ last_error:
169
+ T.nilable(
170
+ ContextDev::Models::MonitorRetrieveResponse::LastError::OrHash
171
+ ),
172
+ last_run_at: T.nilable(Time),
173
+ next_run_at: T.nilable(Time),
174
+ tags: T::Array[String],
175
+ webhook:
176
+ T.nilable(
177
+ ContextDev::Models::MonitorRetrieveResponse::Webhook::OrHash
178
+ )
179
+ ).returns(T.attached_class)
180
+ end
181
+ def self.new(
182
+ id:,
183
+ # Discriminated union describing how changes are detected.
184
+ change_detection:,
185
+ created_at:,
186
+ # Top-level monitor category. Always `web` today; the concrete behavior is
187
+ # described by `target` and `change_detection`.
188
+ mode:,
189
+ name:,
190
+ # Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
191
+ # every 6 hours or every 2 days. The total interval (frequency × unit) must be
192
+ # between 10 minutes and 1 year.
193
+ schedule:,
194
+ # Monitor lifecycle status. `failed` means the most recent run failed (see the
195
+ # monitor's `last_error`); failed monitors keep running on schedule and flip back
196
+ # to `active` on the next successful run. Monitors are auto-`paused` after
197
+ # repeated consecutive failures or insufficient-credit skips; resume by PATCHing
198
+ # status to `active`.
199
+ status:,
200
+ # Discriminated union describing what the monitor watches.
201
+ target:,
202
+ updated_at:,
203
+ # Current baseline: the last observed value the monitor compares new snapshots
204
+ # against. Its shape follows `target.type` (page/sitemap/extract). Only populated
205
+ # on GET /monitors/{monitor_id}; null until the first baseline run completes (and
206
+ # after a target or change_detection update, which resets the baseline).
207
+ baseline: nil,
208
+ last_change_at: nil,
209
+ # Error from the most recent failed run; null when the last run succeeded.
210
+ last_error: nil,
211
+ last_run_at: nil,
212
+ # When the next scheduled run is due.
213
+ next_run_at: nil,
214
+ # User-defined tags for grouping and filtering monitors and their changes.
215
+ tags: nil,
216
+ webhook: nil
217
+ )
218
+ end
219
+
220
+ sig do
221
+ override.returns(
222
+ {
223
+ id: String,
224
+ change_detection:
225
+ ContextDev::Models::MonitorRetrieveResponse::ChangeDetection::Variants,
226
+ created_at: Time,
227
+ mode:
228
+ ContextDev::Models::MonitorRetrieveResponse::Mode::TaggedSymbol,
229
+ name: String,
230
+ schedule: ContextDev::Models::MonitorRetrieveResponse::Schedule,
231
+ status:
232
+ ContextDev::Models::MonitorRetrieveResponse::Status::TaggedSymbol,
233
+ target:
234
+ ContextDev::Models::MonitorRetrieveResponse::Target::Variants,
235
+ updated_at: Time,
236
+ baseline:
237
+ T.nilable(
238
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::Variants
239
+ ),
240
+ last_change_at: T.nilable(Time),
241
+ last_error:
242
+ T.nilable(ContextDev::Models::MonitorRetrieveResponse::LastError),
243
+ last_run_at: T.nilable(Time),
244
+ next_run_at: T.nilable(Time),
245
+ tags: T::Array[String],
246
+ webhook:
247
+ T.nilable(ContextDev::Models::MonitorRetrieveResponse::Webhook)
248
+ }
249
+ )
250
+ end
251
+ def to_hash
252
+ end
253
+
254
+ # Discriminated union describing how changes are detected.
255
+ module ChangeDetection
256
+ extend ContextDev::Internal::Type::Union
257
+
258
+ Variants =
259
+ T.type_alias do
260
+ T.any(
261
+ ContextDev::Models::MonitorRetrieveResponse::ChangeDetection::Exact,
262
+ ContextDev::Models::MonitorRetrieveResponse::ChangeDetection::Semantic
263
+ )
264
+ end
265
+
266
+ class Exact < ContextDev::Internal::Type::BaseModel
267
+ OrHash =
268
+ T.type_alias do
269
+ T.any(
270
+ ContextDev::Models::MonitorRetrieveResponse::ChangeDetection::Exact,
271
+ ContextDev::Internal::AnyHash
272
+ )
273
+ end
274
+
275
+ sig { returns(Symbol) }
276
+ attr_accessor :type
277
+
278
+ # Detect exact changes. For page targets, this means visible text diffs. For
279
+ # sitemap targets, this means URL additions and removals.
280
+ sig { params(type: Symbol).returns(T.attached_class) }
281
+ def self.new(type: :exact)
282
+ end
283
+
284
+ sig { override.returns({ type: Symbol }) }
285
+ def to_hash
286
+ end
287
+ end
288
+
289
+ class Semantic < ContextDev::Internal::Type::BaseModel
290
+ OrHash =
291
+ T.type_alias do
292
+ T.any(
293
+ ContextDev::Models::MonitorRetrieveResponse::ChangeDetection::Semantic,
294
+ ContextDev::Internal::AnyHash
295
+ )
296
+ end
297
+
298
+ sig { returns(Symbol) }
299
+ attr_accessor :type
300
+
301
+ sig { returns(T.nilable(Float)) }
302
+ attr_reader :confidence_threshold
303
+
304
+ sig { params(confidence_threshold: Float).void }
305
+ attr_writer :confidence_threshold
306
+
307
+ # Detect meaning-level changes to the extracted data, ignoring cosmetic or
308
+ # paraphrase-only differences. What is watched is determined by the extract
309
+ # target's `schema` and `instructions`.
310
+ sig do
311
+ params(confidence_threshold: Float, type: Symbol).returns(
312
+ T.attached_class
313
+ )
314
+ end
315
+ def self.new(confidence_threshold: nil, type: :semantic)
316
+ end
317
+
318
+ sig do
319
+ override.returns({ type: Symbol, confidence_threshold: Float })
320
+ end
321
+ def to_hash
322
+ end
323
+ end
324
+
325
+ sig do
326
+ override.returns(
327
+ T::Array[
328
+ ContextDev::Models::MonitorRetrieveResponse::ChangeDetection::Variants
329
+ ]
330
+ )
331
+ end
332
+ def self.variants
333
+ end
334
+ end
335
+
336
+ # Top-level monitor category. Always `web` today; the concrete behavior is
337
+ # described by `target` and `change_detection`.
338
+ module Mode
339
+ extend ContextDev::Internal::Type::Enum
340
+
341
+ TaggedSymbol =
342
+ T.type_alias do
343
+ T.all(Symbol, ContextDev::Models::MonitorRetrieveResponse::Mode)
344
+ end
345
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
346
+
347
+ WEB =
348
+ T.let(
349
+ :web,
350
+ ContextDev::Models::MonitorRetrieveResponse::Mode::TaggedSymbol
351
+ )
352
+
353
+ sig do
354
+ override.returns(
355
+ T::Array[
356
+ ContextDev::Models::MonitorRetrieveResponse::Mode::TaggedSymbol
357
+ ]
358
+ )
359
+ end
360
+ def self.values
361
+ end
362
+ end
363
+
364
+ class Schedule < ContextDev::Internal::Type::BaseModel
365
+ OrHash =
366
+ T.type_alias do
367
+ T.any(
368
+ ContextDev::Models::MonitorRetrieveResponse::Schedule,
369
+ ContextDev::Internal::AnyHash
370
+ )
371
+ end
372
+
373
+ # Number of units between runs. The resulting interval (frequency × unit) must be
374
+ # at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes;
375
+ # maximum 365 when unit is days).
376
+ sig { returns(Integer) }
377
+ attr_accessor :frequency
378
+
379
+ sig do
380
+ returns(
381
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Type::TaggedSymbol
382
+ )
383
+ end
384
+ attr_accessor :type
385
+
386
+ sig do
387
+ returns(
388
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Unit::TaggedSymbol
389
+ )
390
+ end
391
+ attr_accessor :unit
392
+
393
+ # Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
394
+ # every 6 hours or every 2 days. The total interval (frequency × unit) must be
395
+ # between 10 minutes and 1 year.
396
+ sig do
397
+ params(
398
+ frequency: Integer,
399
+ type:
400
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Type::OrSymbol,
401
+ unit:
402
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Unit::OrSymbol
403
+ ).returns(T.attached_class)
404
+ end
405
+ def self.new(
406
+ # Number of units between runs. The resulting interval (frequency × unit) must be
407
+ # at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes;
408
+ # maximum 365 when unit is days).
409
+ frequency:,
410
+ type:,
411
+ unit:
412
+ )
413
+ end
414
+
415
+ sig do
416
+ override.returns(
417
+ {
418
+ frequency: Integer,
419
+ type:
420
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Type::TaggedSymbol,
421
+ unit:
422
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Unit::TaggedSymbol
423
+ }
424
+ )
425
+ end
426
+ def to_hash
427
+ end
428
+
429
+ module Type
430
+ extend ContextDev::Internal::Type::Enum
431
+
432
+ TaggedSymbol =
433
+ T.type_alias do
434
+ T.all(
435
+ Symbol,
436
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Type
437
+ )
438
+ end
439
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
440
+
441
+ INTERVAL =
442
+ T.let(
443
+ :interval,
444
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Type::TaggedSymbol
445
+ )
446
+
447
+ sig do
448
+ override.returns(
449
+ T::Array[
450
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Type::TaggedSymbol
451
+ ]
452
+ )
453
+ end
454
+ def self.values
455
+ end
456
+ end
457
+
458
+ module Unit
459
+ extend ContextDev::Internal::Type::Enum
460
+
461
+ TaggedSymbol =
462
+ T.type_alias do
463
+ T.all(
464
+ Symbol,
465
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Unit
466
+ )
467
+ end
468
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
469
+
470
+ MINUTES =
471
+ T.let(
472
+ :minutes,
473
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Unit::TaggedSymbol
474
+ )
475
+ HOURS =
476
+ T.let(
477
+ :hours,
478
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Unit::TaggedSymbol
479
+ )
480
+ DAYS =
481
+ T.let(
482
+ :days,
483
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Unit::TaggedSymbol
484
+ )
485
+
486
+ sig do
487
+ override.returns(
488
+ T::Array[
489
+ ContextDev::Models::MonitorRetrieveResponse::Schedule::Unit::TaggedSymbol
490
+ ]
491
+ )
492
+ end
493
+ def self.values
494
+ end
495
+ end
496
+ end
497
+
498
+ # Monitor lifecycle status. `failed` means the most recent run failed (see the
499
+ # monitor's `last_error`); failed monitors keep running on schedule and flip back
500
+ # to `active` on the next successful run. Monitors are auto-`paused` after
501
+ # repeated consecutive failures or insufficient-credit skips; resume by PATCHing
502
+ # status to `active`.
503
+ module Status
504
+ extend ContextDev::Internal::Type::Enum
505
+
506
+ TaggedSymbol =
507
+ T.type_alias do
508
+ T.all(Symbol, ContextDev::Models::MonitorRetrieveResponse::Status)
509
+ end
510
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
511
+
512
+ ACTIVE =
513
+ T.let(
514
+ :active,
515
+ ContextDev::Models::MonitorRetrieveResponse::Status::TaggedSymbol
516
+ )
517
+ PAUSED =
518
+ T.let(
519
+ :paused,
520
+ ContextDev::Models::MonitorRetrieveResponse::Status::TaggedSymbol
521
+ )
522
+ FAILED =
523
+ T.let(
524
+ :failed,
525
+ ContextDev::Models::MonitorRetrieveResponse::Status::TaggedSymbol
526
+ )
527
+
528
+ sig do
529
+ override.returns(
530
+ T::Array[
531
+ ContextDev::Models::MonitorRetrieveResponse::Status::TaggedSymbol
532
+ ]
533
+ )
534
+ end
535
+ def self.values
536
+ end
537
+ end
538
+
539
+ # Discriminated union describing what the monitor watches.
540
+ module Target
541
+ extend ContextDev::Internal::Type::Union
542
+
543
+ Variants =
544
+ T.type_alias do
545
+ T.any(
546
+ ContextDev::Models::MonitorRetrieveResponse::Target::Page,
547
+ ContextDev::Models::MonitorRetrieveResponse::Target::Sitemap,
548
+ ContextDev::Models::MonitorRetrieveResponse::Target::Extract
549
+ )
550
+ end
551
+
552
+ class Page < ContextDev::Internal::Type::BaseModel
553
+ OrHash =
554
+ T.type_alias do
555
+ T.any(
556
+ ContextDev::Models::MonitorRetrieveResponse::Target::Page,
557
+ ContextDev::Internal::AnyHash
558
+ )
559
+ end
560
+
561
+ sig { returns(Symbol) }
562
+ attr_accessor :type
563
+
564
+ sig { returns(String) }
565
+ attr_accessor :url
566
+
567
+ # Normalize whitespace before comparing or analyzing text.
568
+ sig { returns(T.nilable(T::Boolean)) }
569
+ attr_reader :normalize_whitespace
570
+
571
+ sig { params(normalize_whitespace: T::Boolean).void }
572
+ attr_writer :normalize_whitespace
573
+
574
+ # Watch a single web page.
575
+ sig do
576
+ params(
577
+ url: String,
578
+ normalize_whitespace: T::Boolean,
579
+ type: Symbol
580
+ ).returns(T.attached_class)
581
+ end
582
+ def self.new(
583
+ url:,
584
+ # Normalize whitespace before comparing or analyzing text.
585
+ normalize_whitespace: nil,
586
+ type: :page
587
+ )
588
+ end
589
+
590
+ sig do
591
+ override.returns(
592
+ { type: Symbol, url: String, normalize_whitespace: T::Boolean }
593
+ )
594
+ end
595
+ def to_hash
596
+ end
597
+ end
598
+
599
+ class Sitemap < ContextDev::Internal::Type::BaseModel
600
+ OrHash =
601
+ T.type_alias do
602
+ T.any(
603
+ ContextDev::Models::MonitorRetrieveResponse::Target::Sitemap,
604
+ ContextDev::Internal::AnyHash
605
+ )
606
+ end
607
+
608
+ sig { returns(Symbol) }
609
+ attr_accessor :type
610
+
611
+ # Sitemap URL to monitor.
612
+ sig { returns(String) }
613
+ attr_accessor :url
614
+
615
+ # URL path patterns to exclude.
616
+ sig { returns(T.nilable(T::Array[String])) }
617
+ attr_reader :exclude
618
+
619
+ sig { params(exclude: T::Array[String]).void }
620
+ attr_writer :exclude
621
+
622
+ # URL path patterns to include.
623
+ sig { returns(T.nilable(T::Array[String])) }
624
+ attr_reader :include
625
+
626
+ sig { params(include: T::Array[String]).void }
627
+ attr_writer :include
628
+
629
+ # Maximum number of sitemap URLs to track (capped at 10,000).
630
+ sig { returns(T.nilable(Integer)) }
631
+ attr_reader :max_urls
632
+
633
+ sig { params(max_urls: Integer).void }
634
+ attr_writer :max_urls
635
+
636
+ # Watch a sitemap for URL additions and removals. Crawled URLs are normalized
637
+ # (lowercased host, no trailing slash/fragment) and scoped to the monitored site
638
+ # and its subdomains before comparison. On a detected difference the sitemap is
639
+ # re-fetched within the same run and only URLs both observations agree on are
640
+ # reported, suppressing transient crawl flaps.
641
+ sig do
642
+ params(
643
+ url: String,
644
+ exclude: T::Array[String],
645
+ include: T::Array[String],
646
+ max_urls: Integer,
647
+ type: Symbol
648
+ ).returns(T.attached_class)
649
+ end
650
+ def self.new(
651
+ # Sitemap URL to monitor.
652
+ url:,
653
+ # URL path patterns to exclude.
654
+ exclude: nil,
655
+ # URL path patterns to include.
656
+ include: nil,
657
+ # Maximum number of sitemap URLs to track (capped at 10,000).
658
+ max_urls: nil,
659
+ type: :sitemap
660
+ )
661
+ end
662
+
663
+ sig do
664
+ override.returns(
665
+ {
666
+ type: Symbol,
667
+ url: String,
668
+ exclude: T::Array[String],
669
+ include: T::Array[String],
670
+ max_urls: Integer
671
+ }
672
+ )
673
+ end
674
+ def to_hash
675
+ end
676
+ end
677
+
678
+ class Extract < ContextDev::Internal::Type::BaseModel
679
+ OrHash =
680
+ T.type_alias do
681
+ T.any(
682
+ ContextDev::Models::MonitorRetrieveResponse::Target::Extract,
683
+ ContextDev::Internal::AnyHash
684
+ )
685
+ end
686
+
687
+ # Natural-language instructions guiding which pages and facts to track and which
688
+ # changes to report.
689
+ sig { returns(String) }
690
+ attr_accessor :instructions
691
+
692
+ sig { returns(Symbol) }
693
+ attr_accessor :type
694
+
695
+ # Root URL to extract structured data from.
696
+ sig { returns(String) }
697
+ attr_accessor :url
698
+
699
+ sig { returns(T.nilable(T::Boolean)) }
700
+ attr_reader :follow_subdomains
701
+
702
+ sig { params(follow_subdomains: T::Boolean).void }
703
+ attr_writer :follow_subdomains
704
+
705
+ # Optional maximum link depth from the starting URL (0 = only the starting page).
706
+ sig { returns(T.nilable(Integer)) }
707
+ attr_reader :max_depth
708
+
709
+ sig { params(max_depth: Integer).void }
710
+ attr_writer :max_depth
711
+
712
+ # Maximum number of pages to track.
713
+ sig { returns(T.nilable(Integer)) }
714
+ attr_reader :max_pages
715
+
716
+ sig { params(max_pages: Integer).void }
717
+ attr_writer :max_pages
718
+
719
+ # JSON Schema describing the data you care about. It guides which pages are
720
+ # selected for tracking and gives the change judge context on what matters. If
721
+ # omitted, a default summary + key-points schema is used.
722
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
723
+ attr_reader :schema
724
+
725
+ sig { params(schema: T::Hash[Symbol, T.anything]).void }
726
+ attr_writer :schema
727
+
728
+ # Watch the monitor-relevant pages of a site for meaningful changes. A crawl
729
+ # guided by `schema`/`instructions` selects up to `max_pages` relevant pages to
730
+ # track; each run re-checks exactly those pages, and confirmed content changes are
731
+ # judged against the monitor's instructions. The tracked page set is refreshed by
732
+ # a periodic re-discovery crawl.
733
+ sig do
734
+ params(
735
+ instructions: String,
736
+ url: String,
737
+ follow_subdomains: T::Boolean,
738
+ max_depth: Integer,
739
+ max_pages: Integer,
740
+ schema: T::Hash[Symbol, T.anything],
741
+ type: Symbol
742
+ ).returns(T.attached_class)
743
+ end
744
+ def self.new(
745
+ # Natural-language instructions guiding which pages and facts to track and which
746
+ # changes to report.
747
+ instructions:,
748
+ # Root URL to extract structured data from.
749
+ url:,
750
+ follow_subdomains: nil,
751
+ # Optional maximum link depth from the starting URL (0 = only the starting page).
752
+ max_depth: nil,
753
+ # Maximum number of pages to track.
754
+ max_pages: nil,
755
+ # JSON Schema describing the data you care about. It guides which pages are
756
+ # selected for tracking and gives the change judge context on what matters. If
757
+ # omitted, a default summary + key-points schema is used.
758
+ schema: nil,
759
+ type: :extract
760
+ )
761
+ end
762
+
763
+ sig do
764
+ override.returns(
765
+ {
766
+ instructions: String,
767
+ type: Symbol,
768
+ url: String,
769
+ follow_subdomains: T::Boolean,
770
+ max_depth: Integer,
771
+ max_pages: Integer,
772
+ schema: T::Hash[Symbol, T.anything]
773
+ }
774
+ )
775
+ end
776
+ def to_hash
777
+ end
778
+ end
779
+
780
+ sig do
781
+ override.returns(
782
+ T::Array[
783
+ ContextDev::Models::MonitorRetrieveResponse::Target::Variants
784
+ ]
785
+ )
786
+ end
787
+ def self.variants
788
+ end
789
+ end
790
+
791
+ # Current baseline: the last observed value the monitor compares new snapshots
792
+ # against. Its shape follows `target.type` (page/sitemap/extract). Only populated
793
+ # on GET /monitors/{monitor_id}; null until the first baseline run completes (and
794
+ # after a target or change_detection update, which resets the baseline).
795
+ module Baseline
796
+ extend ContextDev::Internal::Type::Union
797
+
798
+ Variants =
799
+ T.type_alias do
800
+ T.any(
801
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::MonitorsPageBaseline,
802
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::MonitorsSitemapBaseline,
803
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::MonitorsExtractBaseline
804
+ )
805
+ end
806
+
807
+ class MonitorsPageBaseline < ContextDev::Internal::Type::BaseModel
808
+ OrHash =
809
+ T.type_alias do
810
+ T.any(
811
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::MonitorsPageBaseline,
812
+ ContextDev::Internal::AnyHash
813
+ )
814
+ end
815
+
816
+ # When this baseline was last captured or replaced.
817
+ sig { returns(Time) }
818
+ attr_accessor :captured_at
819
+
820
+ # The page's visible text as last observed.
821
+ sig { returns(String) }
822
+ attr_accessor :text
823
+
824
+ # Current baseline of a `page` monitor: the visible page text as last observed.
825
+ sig do
826
+ params(captured_at: Time, text: String).returns(T.attached_class)
827
+ end
828
+ def self.new(
829
+ # When this baseline was last captured or replaced.
830
+ captured_at:,
831
+ # The page's visible text as last observed.
832
+ text:
833
+ )
834
+ end
835
+
836
+ sig { override.returns({ captured_at: Time, text: String }) }
837
+ def to_hash
838
+ end
839
+ end
840
+
841
+ class MonitorsSitemapBaseline < ContextDev::Internal::Type::BaseModel
842
+ OrHash =
843
+ T.type_alias do
844
+ T.any(
845
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::MonitorsSitemapBaseline,
846
+ ContextDev::Internal::AnyHash
847
+ )
848
+ end
849
+
850
+ # When this baseline was last captured or replaced.
851
+ sig { returns(Time) }
852
+ attr_accessor :captured_at
853
+
854
+ # Number of URLs in the baseline.
855
+ sig { returns(Integer) }
856
+ attr_accessor :url_count
857
+
858
+ # The sitemap URLs as last observed (sorted, normalized).
859
+ sig { returns(T::Array[String]) }
860
+ attr_accessor :urls
861
+
862
+ # Current baseline of a `sitemap` monitor: the normalized URL set as last
863
+ # observed.
864
+ sig do
865
+ params(
866
+ captured_at: Time,
867
+ url_count: Integer,
868
+ urls: T::Array[String]
869
+ ).returns(T.attached_class)
870
+ end
871
+ def self.new(
872
+ # When this baseline was last captured or replaced.
873
+ captured_at:,
874
+ # Number of URLs in the baseline.
875
+ url_count:,
876
+ # The sitemap URLs as last observed (sorted, normalized).
877
+ urls:
878
+ )
879
+ end
880
+
881
+ sig do
882
+ override.returns(
883
+ { captured_at: Time, url_count: Integer, urls: T::Array[String] }
884
+ )
885
+ end
886
+ def to_hash
887
+ end
888
+ end
889
+
890
+ class MonitorsExtractBaseline < ContextDev::Internal::Type::BaseModel
891
+ OrHash =
892
+ T.type_alias do
893
+ T.any(
894
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::MonitorsExtractBaseline,
895
+ ContextDev::Internal::AnyHash
896
+ )
897
+ end
898
+
899
+ # When this baseline was last captured or replaced.
900
+ sig { returns(Time) }
901
+ attr_accessor :captured_at
902
+
903
+ # The extracted structured data, matching the monitor's extraction schema (same
904
+ # shape as the /web/extract endpoint's `data`). Refreshed when the monitor
905
+ # re-discovers its page set (at most about once a day); `null` when no extraction
906
+ # has been captured yet.
907
+ sig { returns(T.anything) }
908
+ attr_accessor :data
909
+
910
+ # The page URLs the monitor tracks and analyzes for changes.
911
+ sig { returns(T::Array[String]) }
912
+ attr_accessor :urls_analyzed
913
+
914
+ # Current baseline of an `extract` monitor: the pages it tracks and the structured
915
+ # data as last extracted.
916
+ sig do
917
+ params(
918
+ captured_at: Time,
919
+ data: T.anything,
920
+ urls_analyzed: T::Array[String]
921
+ ).returns(T.attached_class)
922
+ end
923
+ def self.new(
924
+ # When this baseline was last captured or replaced.
925
+ captured_at:,
926
+ # The extracted structured data, matching the monitor's extraction schema (same
927
+ # shape as the /web/extract endpoint's `data`). Refreshed when the monitor
928
+ # re-discovers its page set (at most about once a day); `null` when no extraction
929
+ # has been captured yet.
930
+ data:,
931
+ # The page URLs the monitor tracks and analyzes for changes.
932
+ urls_analyzed:
933
+ )
934
+ end
935
+
936
+ sig do
937
+ override.returns(
938
+ {
939
+ captured_at: Time,
940
+ data: T.anything,
941
+ urls_analyzed: T::Array[String]
942
+ }
943
+ )
944
+ end
945
+ def to_hash
946
+ end
947
+ end
948
+
949
+ sig do
950
+ override.returns(
951
+ T::Array[
952
+ ContextDev::Models::MonitorRetrieveResponse::Baseline::Variants
953
+ ]
954
+ )
955
+ end
956
+ def self.variants
957
+ end
958
+ end
959
+
960
+ class LastError < ContextDev::Internal::Type::BaseModel
961
+ OrHash =
962
+ T.type_alias do
963
+ T.any(
964
+ ContextDev::Models::MonitorRetrieveResponse::LastError,
965
+ ContextDev::Internal::AnyHash
966
+ )
967
+ end
968
+
969
+ sig { returns(String) }
970
+ attr_accessor :code
971
+
972
+ sig { returns(String) }
973
+ attr_accessor :message
974
+
975
+ # Error from the most recent failed run; null when the last run succeeded.
976
+ sig { params(code: String, message: String).returns(T.attached_class) }
977
+ def self.new(code:, message:)
978
+ end
979
+
980
+ sig { override.returns({ code: String, message: String }) }
981
+ def to_hash
982
+ end
983
+ end
984
+
985
+ class Webhook < ContextDev::Internal::Type::BaseModel
986
+ OrHash =
987
+ T.type_alias do
988
+ T.any(
989
+ ContextDev::Models::MonitorRetrieveResponse::Webhook,
990
+ ContextDev::Internal::AnyHash
991
+ )
992
+ end
993
+
994
+ # Webhook URL called when a change is detected.
995
+ sig { returns(String) }
996
+ attr_accessor :url
997
+
998
+ # Signing secret used to verify webhook authenticity. Each delivery includes an
999
+ # `X-Context-Signature: t=<unix>,v1=<hmac>` header, where the HMAC is SHA-256 over
1000
+ # `"{t}.{rawRequestBody}"` keyed by this secret. Recompute it with a constant-time
1001
+ # compare and reject stale timestamps to prevent replay. Generated by the API;
1002
+ # cannot be set by clients.
1003
+ sig { returns(T.nilable(String)) }
1004
+ attr_reader :secret
1005
+
1006
+ sig { params(secret: String).void }
1007
+ attr_writer :secret
1008
+
1009
+ sig { params(url: String, secret: String).returns(T.attached_class) }
1010
+ def self.new(
1011
+ # Webhook URL called when a change is detected.
1012
+ url:,
1013
+ # Signing secret used to verify webhook authenticity. Each delivery includes an
1014
+ # `X-Context-Signature: t=<unix>,v1=<hmac>` header, where the HMAC is SHA-256 over
1015
+ # `"{t}.{rawRequestBody}"` keyed by this secret. Recompute it with a constant-time
1016
+ # compare and reject stale timestamps to prevent replay. Generated by the API;
1017
+ # cannot be set by clients.
1018
+ secret: nil
1019
+ )
1020
+ end
1021
+
1022
+ sig { override.returns({ url: String, secret: String }) }
1023
+ def to_hash
1024
+ end
1025
+ end
1026
+ end
1027
+ end
1028
+ end