context.dev 2.0.0 → 2.2.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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/models/brand_retrieve_params.rb +46 -3
  5. data/lib/context_dev/models/monitor_create_params.rb +36 -28
  6. data/lib/context_dev/models/monitor_create_response.rb +158 -29
  7. data/lib/context_dev/models/monitor_list_account_runs_response.rb +102 -1
  8. data/lib/context_dev/models/monitor_list_params.rb +4 -4
  9. data/lib/context_dev/models/monitor_list_response.rb +158 -29
  10. data/lib/context_dev/models/monitor_list_runs_response.rb +100 -1
  11. data/lib/context_dev/models/monitor_retrieve_change_response.rb +1 -8
  12. data/lib/context_dev/models/monitor_retrieve_response.rb +158 -29
  13. data/lib/context_dev/models/monitor_update_params.rb +36 -28
  14. data/lib/context_dev/models/monitor_update_response.rb +158 -29
  15. data/lib/context_dev/resources/brand.rb +4 -2
  16. data/lib/context_dev/resources/monitors.rb +1 -1
  17. data/lib/context_dev/version.rb +1 -1
  18. data/rbi/context_dev/models/brand_retrieve_params.rbi +67 -0
  19. data/rbi/context_dev/models/monitor_create_params.rbi +44 -33
  20. data/rbi/context_dev/models/monitor_create_response.rbi +243 -33
  21. data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +204 -3
  22. data/rbi/context_dev/models/monitor_list_params.rbi +9 -6
  23. data/rbi/context_dev/models/monitor_list_response.rbi +247 -33
  24. data/rbi/context_dev/models/monitor_list_runs_response.rbi +204 -3
  25. data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +0 -9
  26. data/rbi/context_dev/models/monitor_retrieve_response.rbi +243 -33
  27. data/rbi/context_dev/models/monitor_update_params.rbi +44 -33
  28. data/rbi/context_dev/models/monitor_update_response.rbi +243 -33
  29. data/rbi/context_dev/resources/brand.rbi +4 -1
  30. data/rbi/context_dev/resources/monitors.rbi +2 -2
  31. data/sig/context_dev/models/brand_retrieve_params.rbs +26 -0
  32. data/sig/context_dev/models/monitor_create_params.rbs +7 -17
  33. data/sig/context_dev/models/monitor_create_response.rbs +81 -17
  34. data/sig/context_dev/models/monitor_list_account_runs_response.rbs +74 -3
  35. data/sig/context_dev/models/monitor_list_params.rbs +2 -2
  36. data/sig/context_dev/models/monitor_list_response.rbs +81 -17
  37. data/sig/context_dev/models/monitor_list_runs_response.rbs +74 -3
  38. data/sig/context_dev/models/monitor_retrieve_change_response.rbs +0 -7
  39. data/sig/context_dev/models/monitor_retrieve_response.rbs +81 -17
  40. data/sig/context_dev/models/monitor_update_params.rbs +7 -17
  41. data/sig/context_dev/models/monitor_update_response.rbs +81 -17
  42. metadata +2 -2
@@ -114,6 +114,19 @@ module ContextDev
114
114
  sig { returns(Time) }
115
115
  attr_accessor :updated_at
116
116
 
117
+ # Current baseline: the last observed value the monitor compares new snapshots
118
+ # against. Its shape follows `target.type` (page/sitemap/extract). Only populated
119
+ # on GET /monitors/{monitor_id}; null until the first baseline run completes (and
120
+ # after a target or change_detection update, which resets the baseline).
121
+ sig do
122
+ returns(
123
+ T.nilable(
124
+ ContextDev::Models::MonitorListResponse::Data::Baseline::Variants
125
+ )
126
+ )
127
+ end
128
+ attr_accessor :baseline
129
+
117
130
  sig { returns(T.nilable(Time)) }
118
131
  attr_accessor :last_change_at
119
132
 
@@ -190,6 +203,14 @@ module ContextDev
190
203
  ContextDev::Models::MonitorListResponse::Data::Target::Extract::OrHash
191
204
  ),
192
205
  updated_at: Time,
206
+ baseline:
207
+ T.nilable(
208
+ T.any(
209
+ ContextDev::Models::MonitorListResponse::Data::Baseline::MonitorsPageBaseline::OrHash,
210
+ ContextDev::Models::MonitorListResponse::Data::Baseline::MonitorsSitemapBaseline::OrHash,
211
+ ContextDev::Models::MonitorListResponse::Data::Baseline::MonitorsExtractBaseline::OrHash
212
+ )
213
+ ),
193
214
  last_change_at: T.nilable(Time),
194
215
  last_error:
195
216
  T.nilable(
@@ -226,6 +247,11 @@ module ContextDev
226
247
  # Discriminated union describing what the monitor watches.
227
248
  target:,
228
249
  updated_at:,
250
+ # Current baseline: the last observed value the monitor compares new snapshots
251
+ # against. Its shape follows `target.type` (page/sitemap/extract). Only populated
252
+ # on GET /monitors/{monitor_id}; null until the first baseline run completes (and
253
+ # after a target or change_detection update, which resets the baseline).
254
+ baseline: nil,
229
255
  last_change_at: nil,
230
256
  # Error from the most recent failed run; null when the last run succeeded.
231
257
  last_error: nil,
@@ -254,6 +280,10 @@ module ContextDev
254
280
  target:
255
281
  ContextDev::Models::MonitorListResponse::Data::Target::Variants,
256
282
  updated_at: Time,
283
+ baseline:
284
+ T.nilable(
285
+ ContextDev::Models::MonitorListResponse::Data::Baseline::Variants
286
+ ),
257
287
  last_change_at: T.nilable(Time),
258
288
  last_error:
259
289
  T.nilable(
@@ -316,9 +346,6 @@ module ContextDev
316
346
  )
317
347
  end
318
348
 
319
- sig { returns(String) }
320
- attr_accessor :query
321
-
322
349
  sig { returns(Symbol) }
323
350
  attr_accessor :type
324
351
 
@@ -328,21 +355,19 @@ module ContextDev
328
355
  sig { params(confidence_threshold: Float).void }
329
356
  attr_writer :confidence_threshold
330
357
 
331
- # Detect meaning-level changes that match a natural language query.
358
+ # Detect meaning-level changes to tracked page content, ignoring cosmetic or
359
+ # paraphrase-only differences. Which changes are meaningful is judged against the
360
+ # extract target's `instructions` (and `schema`, when provided).
332
361
  sig do
333
- params(
334
- query: String,
335
- confidence_threshold: Float,
336
- type: Symbol
337
- ).returns(T.attached_class)
362
+ params(confidence_threshold: Float, type: Symbol).returns(
363
+ T.attached_class
364
+ )
338
365
  end
339
- def self.new(query:, confidence_threshold: nil, type: :semantic)
366
+ def self.new(confidence_threshold: nil, type: :semantic)
340
367
  end
341
368
 
342
369
  sig do
343
- override.returns(
344
- { query: String, type: Symbol, confidence_threshold: Float }
345
- )
370
+ override.returns({ type: Symbol, confidence_threshold: Float })
346
371
  end
347
372
  def to_hash
348
373
  end
@@ -664,8 +689,9 @@ module ContextDev
664
689
 
665
690
  # Watch a sitemap for URL additions and removals. Crawled URLs are normalized
666
691
  # (lowercased host, no trailing slash/fragment) and scoped to the monitored site
667
- # and its subdomains before comparison. A new URL set must be observed on two
668
- # consecutive runs before a change is reported, suppressing one-run crawl flaps.
692
+ # and its subdomains before comparison. On a detected difference the sitemap is
693
+ # re-fetched within the same run and only URLs both observations agree on are
694
+ # reported, suppressing transient crawl flaps.
669
695
  sig do
670
696
  params(
671
697
  url: String,
@@ -712,6 +738,11 @@ module ContextDev
712
738
  )
713
739
  end
714
740
 
741
+ # Natural-language instructions guiding which pages and facts to track and which
742
+ # changes to report.
743
+ sig { returns(String) }
744
+ attr_accessor :instructions
745
+
715
746
  sig { returns(Symbol) }
716
747
  attr_accessor :type
717
748
 
@@ -725,13 +756,6 @@ module ContextDev
725
756
  sig { params(follow_subdomains: T::Boolean).void }
726
757
  attr_writer :follow_subdomains
727
758
 
728
- # Optional natural-language instructions guiding what to extract.
729
- sig { returns(T.nilable(String)) }
730
- attr_reader :instructions
731
-
732
- sig { params(instructions: String).void }
733
- attr_writer :instructions
734
-
735
759
  # Optional maximum link depth from the starting URL (0 = only the starting page).
736
760
  sig { returns(T.nilable(Integer)) }
737
761
  attr_reader :max_depth
@@ -739,27 +763,37 @@ module ContextDev
739
763
  sig { params(max_depth: Integer).void }
740
764
  attr_writer :max_depth
741
765
 
742
- # Maximum number of pages to analyze during extraction.
766
+ # Maximum number of pages to track.
743
767
  sig { returns(T.nilable(Integer)) }
744
768
  attr_reader :max_pages
745
769
 
746
770
  sig { params(max_pages: Integer).void }
747
771
  attr_writer :max_pages
748
772
 
749
- # JSON Schema describing the structured data to extract and watch for changes. If
750
- # omitted, a default summary + key-points schema is used.
773
+ # JSON Schema describing the data you care about. It is used three ways: it guides
774
+ # which pages are selected for tracking, it gives the change judge extra context
775
+ # on which changes matter (alongside `instructions`), and it defines the shape of
776
+ # the baseline `data` snapshot on GET /monitors/{monitor_id} (refreshed at most
777
+ # about once a day). It is not a response format for changes: change events and
778
+ # webhook payloads always contain diffs, summaries, and evidence excerpts — never
779
+ # data in this schema's shape. If omitted, a default summary + key-points schema
780
+ # is used.
751
781
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
752
782
  attr_reader :schema
753
783
 
754
784
  sig { params(schema: T::Hash[Symbol, T.anything]).void }
755
785
  attr_writer :schema
756
786
 
757
- # Watch a site's extracted structured data.
787
+ # Watch the monitor-relevant pages of a site for meaningful changes. A crawl
788
+ # guided by `schema`/`instructions` selects up to `max_pages` relevant pages to
789
+ # track; each run re-checks exactly those pages, and confirmed content changes are
790
+ # judged for relevance against the monitor's `instructions` (and `schema`, when
791
+ # provided). The tracked page set is refreshed by a periodic re-discovery crawl.
758
792
  sig do
759
793
  params(
794
+ instructions: String,
760
795
  url: String,
761
796
  follow_subdomains: T::Boolean,
762
- instructions: String,
763
797
  max_depth: Integer,
764
798
  max_pages: Integer,
765
799
  schema: T::Hash[Symbol, T.anything],
@@ -767,17 +801,24 @@ module ContextDev
767
801
  ).returns(T.attached_class)
768
802
  end
769
803
  def self.new(
804
+ # Natural-language instructions guiding which pages and facts to track and which
805
+ # changes to report.
806
+ instructions:,
770
807
  # Root URL to extract structured data from.
771
808
  url:,
772
809
  follow_subdomains: nil,
773
- # Optional natural-language instructions guiding what to extract.
774
- instructions: nil,
775
810
  # Optional maximum link depth from the starting URL (0 = only the starting page).
776
811
  max_depth: nil,
777
- # Maximum number of pages to analyze during extraction.
812
+ # Maximum number of pages to track.
778
813
  max_pages: nil,
779
- # JSON Schema describing the structured data to extract and watch for changes. If
780
- # omitted, a default summary + key-points schema is used.
814
+ # JSON Schema describing the data you care about. It is used three ways: it guides
815
+ # which pages are selected for tracking, it gives the change judge extra context
816
+ # on which changes matter (alongside `instructions`), and it defines the shape of
817
+ # the baseline `data` snapshot on GET /monitors/{monitor_id} (refreshed at most
818
+ # about once a day). It is not a response format for changes: change events and
819
+ # webhook payloads always contain diffs, summaries, and evidence excerpts — never
820
+ # data in this schema's shape. If omitted, a default summary + key-points schema
821
+ # is used.
781
822
  schema: nil,
782
823
  type: :extract
783
824
  )
@@ -786,10 +827,10 @@ module ContextDev
786
827
  sig do
787
828
  override.returns(
788
829
  {
830
+ instructions: String,
789
831
  type: Symbol,
790
832
  url: String,
791
833
  follow_subdomains: T::Boolean,
792
- instructions: String,
793
834
  max_depth: Integer,
794
835
  max_pages: Integer,
795
836
  schema: T::Hash[Symbol, T.anything]
@@ -811,6 +852,179 @@ module ContextDev
811
852
  end
812
853
  end
813
854
 
855
+ # Current baseline: the last observed value the monitor compares new snapshots
856
+ # against. Its shape follows `target.type` (page/sitemap/extract). Only populated
857
+ # on GET /monitors/{monitor_id}; null until the first baseline run completes (and
858
+ # after a target or change_detection update, which resets the baseline).
859
+ module Baseline
860
+ extend ContextDev::Internal::Type::Union
861
+
862
+ Variants =
863
+ T.type_alias do
864
+ T.any(
865
+ ContextDev::Models::MonitorListResponse::Data::Baseline::MonitorsPageBaseline,
866
+ ContextDev::Models::MonitorListResponse::Data::Baseline::MonitorsSitemapBaseline,
867
+ ContextDev::Models::MonitorListResponse::Data::Baseline::MonitorsExtractBaseline
868
+ )
869
+ end
870
+
871
+ class MonitorsPageBaseline < ContextDev::Internal::Type::BaseModel
872
+ OrHash =
873
+ T.type_alias do
874
+ T.any(
875
+ ContextDev::Models::MonitorListResponse::Data::Baseline::MonitorsPageBaseline,
876
+ ContextDev::Internal::AnyHash
877
+ )
878
+ end
879
+
880
+ # When this baseline was last captured or replaced.
881
+ sig { returns(Time) }
882
+ attr_accessor :captured_at
883
+
884
+ # The page's visible text as last observed.
885
+ sig { returns(String) }
886
+ attr_accessor :text
887
+
888
+ # Current baseline of a `page` monitor: the visible page text as last observed.
889
+ sig do
890
+ params(captured_at: Time, text: String).returns(T.attached_class)
891
+ end
892
+ def self.new(
893
+ # When this baseline was last captured or replaced.
894
+ captured_at:,
895
+ # The page's visible text as last observed.
896
+ text:
897
+ )
898
+ end
899
+
900
+ sig { override.returns({ captured_at: Time, text: String }) }
901
+ def to_hash
902
+ end
903
+ end
904
+
905
+ class MonitorsSitemapBaseline < ContextDev::Internal::Type::BaseModel
906
+ OrHash =
907
+ T.type_alias do
908
+ T.any(
909
+ ContextDev::Models::MonitorListResponse::Data::Baseline::MonitorsSitemapBaseline,
910
+ ContextDev::Internal::AnyHash
911
+ )
912
+ end
913
+
914
+ # When this baseline was last captured or replaced.
915
+ sig { returns(Time) }
916
+ attr_accessor :captured_at
917
+
918
+ # Number of URLs in the baseline.
919
+ sig { returns(Integer) }
920
+ attr_accessor :url_count
921
+
922
+ # The sitemap URLs as last observed (sorted, normalized).
923
+ sig { returns(T::Array[String]) }
924
+ attr_accessor :urls
925
+
926
+ # Current baseline of a `sitemap` monitor: the normalized URL set as last
927
+ # observed.
928
+ sig do
929
+ params(
930
+ captured_at: Time,
931
+ url_count: Integer,
932
+ urls: T::Array[String]
933
+ ).returns(T.attached_class)
934
+ end
935
+ def self.new(
936
+ # When this baseline was last captured or replaced.
937
+ captured_at:,
938
+ # Number of URLs in the baseline.
939
+ url_count:,
940
+ # The sitemap URLs as last observed (sorted, normalized).
941
+ urls:
942
+ )
943
+ end
944
+
945
+ sig do
946
+ override.returns(
947
+ {
948
+ captured_at: Time,
949
+ url_count: Integer,
950
+ urls: T::Array[String]
951
+ }
952
+ )
953
+ end
954
+ def to_hash
955
+ end
956
+ end
957
+
958
+ class MonitorsExtractBaseline < ContextDev::Internal::Type::BaseModel
959
+ OrHash =
960
+ T.type_alias do
961
+ T.any(
962
+ ContextDev::Models::MonitorListResponse::Data::Baseline::MonitorsExtractBaseline,
963
+ ContextDev::Internal::AnyHash
964
+ )
965
+ end
966
+
967
+ # When this baseline was last captured or replaced.
968
+ sig { returns(Time) }
969
+ attr_accessor :captured_at
970
+
971
+ # The extracted structured data, matching the monitor's extraction schema (same
972
+ # shape as the /web/extract endpoint's `data`). Refreshed when the monitor
973
+ # re-discovers its page set (at most about once a day); `null` when no extraction
974
+ # has been captured yet.
975
+ sig { returns(T.anything) }
976
+ attr_accessor :data
977
+
978
+ # The page URLs the monitor tracks and analyzes for changes.
979
+ sig { returns(T::Array[String]) }
980
+ attr_accessor :urls_analyzed
981
+
982
+ # Current baseline of an `extract` monitor: the pages it tracks and the structured
983
+ # data as last extracted.
984
+ sig do
985
+ params(
986
+ captured_at: Time,
987
+ data: T.anything,
988
+ urls_analyzed: T::Array[String]
989
+ ).returns(T.attached_class)
990
+ end
991
+ def self.new(
992
+ # When this baseline was last captured or replaced.
993
+ captured_at:,
994
+ # The extracted structured data, matching the monitor's extraction schema (same
995
+ # shape as the /web/extract endpoint's `data`). Refreshed when the monitor
996
+ # re-discovers its page set (at most about once a day); `null` when no extraction
997
+ # has been captured yet.
998
+ data:,
999
+ # The page URLs the monitor tracks and analyzes for changes.
1000
+ urls_analyzed:
1001
+ )
1002
+ end
1003
+
1004
+ sig do
1005
+ override.returns(
1006
+ {
1007
+ captured_at: Time,
1008
+ data: T.anything,
1009
+ urls_analyzed: T::Array[String]
1010
+ }
1011
+ )
1012
+ end
1013
+ def to_hash
1014
+ end
1015
+ end
1016
+
1017
+ sig do
1018
+ override.returns(
1019
+ T::Array[
1020
+ ContextDev::Models::MonitorListResponse::Data::Baseline::Variants
1021
+ ]
1022
+ )
1023
+ end
1024
+ def self.variants
1025
+ end
1026
+ end
1027
+
814
1028
  class LastError < ContextDev::Internal::Type::BaseModel
815
1029
  OrHash =
816
1030
  T.type_alias do
@@ -139,6 +139,26 @@ module ContextDev
139
139
  sig { returns(T.nilable(Time)) }
140
140
  attr_accessor :started_at
141
141
 
142
+ # The webhook delivery attempted for a change detected by this run. Omitted when
143
+ # no webhook was attempted, including historical runs created before delivery
144
+ # tracking was added.
145
+ sig do
146
+ returns(
147
+ T.nilable(
148
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery
149
+ )
150
+ )
151
+ end
152
+ attr_reader :webhook_delivery
153
+
154
+ sig do
155
+ params(
156
+ webhook_delivery:
157
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::OrHash
158
+ ).void
159
+ end
160
+ attr_writer :webhook_delivery
161
+
142
162
  sig do
143
163
  params(
144
164
  id: String,
@@ -164,7 +184,9 @@ module ContextDev
164
184
  T.nilable(
165
185
  ContextDev::Models::MonitorListRunsResponse::Data::SkipReason::OrSymbol
166
186
  ),
167
- started_at: T.nilable(Time)
187
+ started_at: T.nilable(Time),
188
+ webhook_delivery:
189
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::OrHash
168
190
  ).returns(T.attached_class)
169
191
  end
170
192
  def self.new(
@@ -188,7 +210,11 @@ module ContextDev
188
210
  error: nil,
189
211
  # Why a skipped run never executed; null unless status is `skipped`.
190
212
  skip_reason: nil,
191
- started_at: nil
213
+ started_at: nil,
214
+ # The webhook delivery attempted for a change detected by this run. Omitted when
215
+ # no webhook was attempted, including historical runs created before delivery
216
+ # tracking was added.
217
+ webhook_delivery: nil
192
218
  )
193
219
  end
194
220
 
@@ -218,7 +244,9 @@ module ContextDev
218
244
  T.nilable(
219
245
  ContextDev::Models::MonitorListRunsResponse::Data::SkipReason::TaggedSymbol
220
246
  ),
221
- started_at: T.nilable(Time)
247
+ started_at: T.nilable(Time),
248
+ webhook_delivery:
249
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery
222
250
  }
223
251
  )
224
252
  end
@@ -449,6 +477,179 @@ module ContextDev
449
477
  def self.values
450
478
  end
451
479
  end
480
+
481
+ class WebhookDelivery < ContextDev::Internal::Type::BaseModel
482
+ OrHash =
483
+ T.type_alias do
484
+ T.any(
485
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery,
486
+ ContextDev::Internal::AnyHash
487
+ )
488
+ end
489
+
490
+ sig { returns(Time) }
491
+ attr_accessor :attempted_at
492
+
493
+ sig do
494
+ returns(
495
+ T.nilable(
496
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Error
497
+ )
498
+ )
499
+ end
500
+ attr_reader :error
501
+
502
+ sig do
503
+ params(
504
+ error:
505
+ T.nilable(
506
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Error::OrHash
507
+ )
508
+ ).void
509
+ end
510
+ attr_writer :error
511
+
512
+ # Identifier sent in the X-Context-Id header.
513
+ sig { returns(String) }
514
+ attr_accessor :event_id
515
+
516
+ # The endpoint's final HTTP response status, or null when no response was
517
+ # received.
518
+ sig { returns(T.nilable(Integer)) }
519
+ attr_accessor :http_status
520
+
521
+ # Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
522
+ # response; failed means no HTTP response was received; skipped_unsafe_url means
523
+ # the URL failed the public-endpoint safety check.
524
+ sig do
525
+ returns(
526
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
527
+ )
528
+ end
529
+ attr_accessor :status
530
+
531
+ # The webhook delivery attempted for a change detected by this run. Omitted when
532
+ # no webhook was attempted, including historical runs created before delivery
533
+ # tracking was added.
534
+ sig do
535
+ params(
536
+ attempted_at: Time,
537
+ error:
538
+ T.nilable(
539
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Error::OrHash
540
+ ),
541
+ event_id: String,
542
+ http_status: T.nilable(Integer),
543
+ status:
544
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::OrSymbol
545
+ ).returns(T.attached_class)
546
+ end
547
+ def self.new(
548
+ attempted_at:,
549
+ error:,
550
+ # Identifier sent in the X-Context-Id header.
551
+ event_id:,
552
+ # The endpoint's final HTTP response status, or null when no response was
553
+ # received.
554
+ http_status:,
555
+ # Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
556
+ # response; failed means no HTTP response was received; skipped_unsafe_url means
557
+ # the URL failed the public-endpoint safety check.
558
+ status:
559
+ )
560
+ end
561
+
562
+ sig do
563
+ override.returns(
564
+ {
565
+ attempted_at: Time,
566
+ error:
567
+ T.nilable(
568
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Error
569
+ ),
570
+ event_id: String,
571
+ http_status: T.nilable(Integer),
572
+ status:
573
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
574
+ }
575
+ )
576
+ end
577
+ def to_hash
578
+ end
579
+
580
+ class Error < ContextDev::Internal::Type::BaseModel
581
+ OrHash =
582
+ T.type_alias do
583
+ T.any(
584
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Error,
585
+ ContextDev::Internal::AnyHash
586
+ )
587
+ end
588
+
589
+ sig { returns(String) }
590
+ attr_accessor :code
591
+
592
+ sig { returns(String) }
593
+ attr_accessor :message
594
+
595
+ sig do
596
+ params(code: String, message: String).returns(T.attached_class)
597
+ end
598
+ def self.new(code:, message:)
599
+ end
600
+
601
+ sig { override.returns({ code: String, message: String }) }
602
+ def to_hash
603
+ end
604
+ end
605
+
606
+ # Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
607
+ # response; failed means no HTTP response was received; skipped_unsafe_url means
608
+ # the URL failed the public-endpoint safety check.
609
+ module Status
610
+ extend ContextDev::Internal::Type::Enum
611
+
612
+ TaggedSymbol =
613
+ T.type_alias do
614
+ T.all(
615
+ Symbol,
616
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status
617
+ )
618
+ end
619
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
620
+
621
+ DELIVERED =
622
+ T.let(
623
+ :delivered,
624
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
625
+ )
626
+ REJECTED =
627
+ T.let(
628
+ :rejected,
629
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
630
+ )
631
+ FAILED =
632
+ T.let(
633
+ :failed,
634
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
635
+ )
636
+ SKIPPED_UNSAFE_URL =
637
+ T.let(
638
+ :skipped_unsafe_url,
639
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
640
+ )
641
+
642
+ sig do
643
+ override.returns(
644
+ T::Array[
645
+ ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
646
+ ]
647
+ )
648
+ end
649
+ def self.values
650
+ end
651
+ end
652
+ end
452
653
  end
453
654
  end
454
655
  end
@@ -145,12 +145,6 @@ module ContextDev
145
145
  sig { params(matched_urls: T::Array[String]).void }
146
146
  attr_writer :matched_urls
147
147
 
148
- sig { returns(T.nilable(String)) }
149
- attr_reader :query
150
-
151
- sig { params(query: String).void }
152
- attr_writer :query
153
-
154
148
  sig { returns(T.nilable(Integer)) }
155
149
  attr_reader :removed_url_count
156
150
 
@@ -205,7 +199,6 @@ module ContextDev
205
199
  ContextDev::Models::MonitorRetrieveChangeResponse::Importance::OrSymbol,
206
200
  matched_url_count: Integer,
207
201
  matched_urls: T::Array[String],
208
- query: String,
209
202
  removed_url_count: Integer,
210
203
  removed_urls: T::Array[String],
211
204
  tags: T::Array[String]
@@ -238,7 +231,6 @@ module ContextDev
238
231
  matched_url_count: nil,
239
232
  # At most 500 URLs are included; the corresponding count field is always exact.
240
233
  matched_urls: nil,
241
- query: nil,
242
234
  removed_url_count: nil,
243
235
  # At most 500 URLs are included; the corresponding count field is always exact.
244
236
  removed_urls: nil,
@@ -277,7 +269,6 @@ module ContextDev
277
269
  ContextDev::Models::MonitorRetrieveChangeResponse::Importance::TaggedSymbol,
278
270
  matched_url_count: Integer,
279
271
  matched_urls: T::Array[String],
280
- query: String,
281
272
  removed_url_count: Integer,
282
273
  removed_urls: T::Array[String],
283
274
  tags: T::Array[String]