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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +1 -1
- data/lib/context_dev/models/brand_retrieve_params.rb +46 -3
- data/lib/context_dev/models/monitor_create_params.rb +36 -28
- data/lib/context_dev/models/monitor_create_response.rb +158 -29
- data/lib/context_dev/models/monitor_list_account_runs_response.rb +102 -1
- data/lib/context_dev/models/monitor_list_params.rb +4 -4
- data/lib/context_dev/models/monitor_list_response.rb +158 -29
- data/lib/context_dev/models/monitor_list_runs_response.rb +100 -1
- data/lib/context_dev/models/monitor_retrieve_change_response.rb +1 -8
- data/lib/context_dev/models/monitor_retrieve_response.rb +158 -29
- data/lib/context_dev/models/monitor_update_params.rb +36 -28
- data/lib/context_dev/models/monitor_update_response.rb +158 -29
- data/lib/context_dev/resources/brand.rb +4 -2
- data/lib/context_dev/resources/monitors.rb +1 -1
- data/lib/context_dev/version.rb +1 -1
- data/rbi/context_dev/models/brand_retrieve_params.rbi +67 -0
- data/rbi/context_dev/models/monitor_create_params.rbi +44 -33
- data/rbi/context_dev/models/monitor_create_response.rbi +243 -33
- data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +204 -3
- data/rbi/context_dev/models/monitor_list_params.rbi +9 -6
- data/rbi/context_dev/models/monitor_list_response.rbi +247 -33
- data/rbi/context_dev/models/monitor_list_runs_response.rbi +204 -3
- data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +0 -9
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +243 -33
- data/rbi/context_dev/models/monitor_update_params.rbi +44 -33
- data/rbi/context_dev/models/monitor_update_response.rbi +243 -33
- data/rbi/context_dev/resources/brand.rbi +4 -1
- data/rbi/context_dev/resources/monitors.rbi +2 -2
- data/sig/context_dev/models/brand_retrieve_params.rbs +26 -0
- data/sig/context_dev/models/monitor_create_params.rbs +7 -17
- data/sig/context_dev/models/monitor_create_response.rbs +81 -17
- data/sig/context_dev/models/monitor_list_account_runs_response.rbs +74 -3
- data/sig/context_dev/models/monitor_list_params.rbs +2 -2
- data/sig/context_dev/models/monitor_list_response.rbs +81 -17
- data/sig/context_dev/models/monitor_list_runs_response.rbs +74 -3
- data/sig/context_dev/models/monitor_retrieve_change_response.rbs +0 -7
- data/sig/context_dev/models/monitor_retrieve_response.rbs +81 -17
- data/sig/context_dev/models/monitor_update_params.rbs +7 -17
- data/sig/context_dev/models/monitor_update_response.rbs +81 -17
- metadata +2 -2
|
@@ -67,6 +67,19 @@ module ContextDev
|
|
|
67
67
|
sig { returns(Time) }
|
|
68
68
|
attr_accessor :updated_at
|
|
69
69
|
|
|
70
|
+
# Current baseline: the last observed value the monitor compares new snapshots
|
|
71
|
+
# against. Its shape follows `target.type` (page/sitemap/extract). Only populated
|
|
72
|
+
# on GET /monitors/{monitor_id}; null until the first baseline run completes (and
|
|
73
|
+
# after a target or change_detection update, which resets the baseline).
|
|
74
|
+
sig do
|
|
75
|
+
returns(
|
|
76
|
+
T.nilable(
|
|
77
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::Variants
|
|
78
|
+
)
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
attr_accessor :baseline
|
|
82
|
+
|
|
70
83
|
sig { returns(T.nilable(Time)) }
|
|
71
84
|
attr_accessor :last_change_at
|
|
72
85
|
|
|
@@ -137,6 +150,14 @@ module ContextDev
|
|
|
137
150
|
ContextDev::Models::MonitorCreateResponse::Target::Extract::OrHash
|
|
138
151
|
),
|
|
139
152
|
updated_at: Time,
|
|
153
|
+
baseline:
|
|
154
|
+
T.nilable(
|
|
155
|
+
T.any(
|
|
156
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::MonitorsPageBaseline::OrHash,
|
|
157
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::MonitorsSitemapBaseline::OrHash,
|
|
158
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::MonitorsExtractBaseline::OrHash
|
|
159
|
+
)
|
|
160
|
+
),
|
|
140
161
|
last_change_at: T.nilable(Time),
|
|
141
162
|
last_error:
|
|
142
163
|
T.nilable(
|
|
@@ -173,6 +194,11 @@ module ContextDev
|
|
|
173
194
|
# Discriminated union describing what the monitor watches.
|
|
174
195
|
target:,
|
|
175
196
|
updated_at:,
|
|
197
|
+
# Current baseline: the last observed value the monitor compares new snapshots
|
|
198
|
+
# against. Its shape follows `target.type` (page/sitemap/extract). Only populated
|
|
199
|
+
# on GET /monitors/{monitor_id}; null until the first baseline run completes (and
|
|
200
|
+
# after a target or change_detection update, which resets the baseline).
|
|
201
|
+
baseline: nil,
|
|
176
202
|
last_change_at: nil,
|
|
177
203
|
# Error from the most recent failed run; null when the last run succeeded.
|
|
178
204
|
last_error: nil,
|
|
@@ -199,6 +225,10 @@ module ContextDev
|
|
|
199
225
|
ContextDev::Models::MonitorCreateResponse::Status::TaggedSymbol,
|
|
200
226
|
target: ContextDev::Models::MonitorCreateResponse::Target::Variants,
|
|
201
227
|
updated_at: Time,
|
|
228
|
+
baseline:
|
|
229
|
+
T.nilable(
|
|
230
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::Variants
|
|
231
|
+
),
|
|
202
232
|
last_change_at: T.nilable(Time),
|
|
203
233
|
last_error:
|
|
204
234
|
T.nilable(ContextDev::Models::MonitorCreateResponse::LastError),
|
|
@@ -257,9 +287,6 @@ module ContextDev
|
|
|
257
287
|
)
|
|
258
288
|
end
|
|
259
289
|
|
|
260
|
-
sig { returns(String) }
|
|
261
|
-
attr_accessor :query
|
|
262
|
-
|
|
263
290
|
sig { returns(Symbol) }
|
|
264
291
|
attr_accessor :type
|
|
265
292
|
|
|
@@ -269,21 +296,19 @@ module ContextDev
|
|
|
269
296
|
sig { params(confidence_threshold: Float).void }
|
|
270
297
|
attr_writer :confidence_threshold
|
|
271
298
|
|
|
272
|
-
# Detect meaning-level changes
|
|
299
|
+
# Detect meaning-level changes to tracked page content, ignoring cosmetic or
|
|
300
|
+
# paraphrase-only differences. Which changes are meaningful is judged against the
|
|
301
|
+
# extract target's `instructions` (and `schema`, when provided).
|
|
273
302
|
sig do
|
|
274
|
-
params(
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
type: Symbol
|
|
278
|
-
).returns(T.attached_class)
|
|
303
|
+
params(confidence_threshold: Float, type: Symbol).returns(
|
|
304
|
+
T.attached_class
|
|
305
|
+
)
|
|
279
306
|
end
|
|
280
|
-
def self.new(
|
|
307
|
+
def self.new(confidence_threshold: nil, type: :semantic)
|
|
281
308
|
end
|
|
282
309
|
|
|
283
310
|
sig do
|
|
284
|
-
override.returns(
|
|
285
|
-
{ query: String, type: Symbol, confidence_threshold: Float }
|
|
286
|
-
)
|
|
311
|
+
override.returns({ type: Symbol, confidence_threshold: Float })
|
|
287
312
|
end
|
|
288
313
|
def to_hash
|
|
289
314
|
end
|
|
@@ -602,8 +627,9 @@ module ContextDev
|
|
|
602
627
|
|
|
603
628
|
# Watch a sitemap for URL additions and removals. Crawled URLs are normalized
|
|
604
629
|
# (lowercased host, no trailing slash/fragment) and scoped to the monitored site
|
|
605
|
-
# and its subdomains before comparison.
|
|
606
|
-
#
|
|
630
|
+
# and its subdomains before comparison. On a detected difference the sitemap is
|
|
631
|
+
# re-fetched within the same run and only URLs both observations agree on are
|
|
632
|
+
# reported, suppressing transient crawl flaps.
|
|
607
633
|
sig do
|
|
608
634
|
params(
|
|
609
635
|
url: String,
|
|
@@ -650,6 +676,11 @@ module ContextDev
|
|
|
650
676
|
)
|
|
651
677
|
end
|
|
652
678
|
|
|
679
|
+
# Natural-language instructions guiding which pages and facts to track and which
|
|
680
|
+
# changes to report.
|
|
681
|
+
sig { returns(String) }
|
|
682
|
+
attr_accessor :instructions
|
|
683
|
+
|
|
653
684
|
sig { returns(Symbol) }
|
|
654
685
|
attr_accessor :type
|
|
655
686
|
|
|
@@ -663,13 +694,6 @@ module ContextDev
|
|
|
663
694
|
sig { params(follow_subdomains: T::Boolean).void }
|
|
664
695
|
attr_writer :follow_subdomains
|
|
665
696
|
|
|
666
|
-
# Optional natural-language instructions guiding what to extract.
|
|
667
|
-
sig { returns(T.nilable(String)) }
|
|
668
|
-
attr_reader :instructions
|
|
669
|
-
|
|
670
|
-
sig { params(instructions: String).void }
|
|
671
|
-
attr_writer :instructions
|
|
672
|
-
|
|
673
697
|
# Optional maximum link depth from the starting URL (0 = only the starting page).
|
|
674
698
|
sig { returns(T.nilable(Integer)) }
|
|
675
699
|
attr_reader :max_depth
|
|
@@ -677,27 +701,37 @@ module ContextDev
|
|
|
677
701
|
sig { params(max_depth: Integer).void }
|
|
678
702
|
attr_writer :max_depth
|
|
679
703
|
|
|
680
|
-
# Maximum number of pages to
|
|
704
|
+
# Maximum number of pages to track.
|
|
681
705
|
sig { returns(T.nilable(Integer)) }
|
|
682
706
|
attr_reader :max_pages
|
|
683
707
|
|
|
684
708
|
sig { params(max_pages: Integer).void }
|
|
685
709
|
attr_writer :max_pages
|
|
686
710
|
|
|
687
|
-
# JSON Schema describing the
|
|
688
|
-
#
|
|
711
|
+
# JSON Schema describing the data you care about. It is used three ways: it guides
|
|
712
|
+
# which pages are selected for tracking, it gives the change judge extra context
|
|
713
|
+
# on which changes matter (alongside `instructions`), and it defines the shape of
|
|
714
|
+
# the baseline `data` snapshot on GET /monitors/{monitor_id} (refreshed at most
|
|
715
|
+
# about once a day). It is not a response format for changes: change events and
|
|
716
|
+
# webhook payloads always contain diffs, summaries, and evidence excerpts — never
|
|
717
|
+
# data in this schema's shape. If omitted, a default summary + key-points schema
|
|
718
|
+
# is used.
|
|
689
719
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
690
720
|
attr_reader :schema
|
|
691
721
|
|
|
692
722
|
sig { params(schema: T::Hash[Symbol, T.anything]).void }
|
|
693
723
|
attr_writer :schema
|
|
694
724
|
|
|
695
|
-
# Watch a site
|
|
725
|
+
# Watch the monitor-relevant pages of a site for meaningful changes. A crawl
|
|
726
|
+
# guided by `schema`/`instructions` selects up to `max_pages` relevant pages to
|
|
727
|
+
# track; each run re-checks exactly those pages, and confirmed content changes are
|
|
728
|
+
# judged for relevance against the monitor's `instructions` (and `schema`, when
|
|
729
|
+
# provided). The tracked page set is refreshed by a periodic re-discovery crawl.
|
|
696
730
|
sig do
|
|
697
731
|
params(
|
|
732
|
+
instructions: String,
|
|
698
733
|
url: String,
|
|
699
734
|
follow_subdomains: T::Boolean,
|
|
700
|
-
instructions: String,
|
|
701
735
|
max_depth: Integer,
|
|
702
736
|
max_pages: Integer,
|
|
703
737
|
schema: T::Hash[Symbol, T.anything],
|
|
@@ -705,17 +739,24 @@ module ContextDev
|
|
|
705
739
|
).returns(T.attached_class)
|
|
706
740
|
end
|
|
707
741
|
def self.new(
|
|
742
|
+
# Natural-language instructions guiding which pages and facts to track and which
|
|
743
|
+
# changes to report.
|
|
744
|
+
instructions:,
|
|
708
745
|
# Root URL to extract structured data from.
|
|
709
746
|
url:,
|
|
710
747
|
follow_subdomains: nil,
|
|
711
|
-
# Optional natural-language instructions guiding what to extract.
|
|
712
|
-
instructions: nil,
|
|
713
748
|
# Optional maximum link depth from the starting URL (0 = only the starting page).
|
|
714
749
|
max_depth: nil,
|
|
715
|
-
# Maximum number of pages to
|
|
750
|
+
# Maximum number of pages to track.
|
|
716
751
|
max_pages: nil,
|
|
717
|
-
# JSON Schema describing the
|
|
718
|
-
#
|
|
752
|
+
# JSON Schema describing the data you care about. It is used three ways: it guides
|
|
753
|
+
# which pages are selected for tracking, it gives the change judge extra context
|
|
754
|
+
# on which changes matter (alongside `instructions`), and it defines the shape of
|
|
755
|
+
# the baseline `data` snapshot on GET /monitors/{monitor_id} (refreshed at most
|
|
756
|
+
# about once a day). It is not a response format for changes: change events and
|
|
757
|
+
# webhook payloads always contain diffs, summaries, and evidence excerpts — never
|
|
758
|
+
# data in this schema's shape. If omitted, a default summary + key-points schema
|
|
759
|
+
# is used.
|
|
719
760
|
schema: nil,
|
|
720
761
|
type: :extract
|
|
721
762
|
)
|
|
@@ -724,10 +765,10 @@ module ContextDev
|
|
|
724
765
|
sig do
|
|
725
766
|
override.returns(
|
|
726
767
|
{
|
|
768
|
+
instructions: String,
|
|
727
769
|
type: Symbol,
|
|
728
770
|
url: String,
|
|
729
771
|
follow_subdomains: T::Boolean,
|
|
730
|
-
instructions: String,
|
|
731
772
|
max_depth: Integer,
|
|
732
773
|
max_pages: Integer,
|
|
733
774
|
schema: T::Hash[Symbol, T.anything]
|
|
@@ -749,6 +790,175 @@ module ContextDev
|
|
|
749
790
|
end
|
|
750
791
|
end
|
|
751
792
|
|
|
793
|
+
# Current baseline: the last observed value the monitor compares new snapshots
|
|
794
|
+
# against. Its shape follows `target.type` (page/sitemap/extract). Only populated
|
|
795
|
+
# on GET /monitors/{monitor_id}; null until the first baseline run completes (and
|
|
796
|
+
# after a target or change_detection update, which resets the baseline).
|
|
797
|
+
module Baseline
|
|
798
|
+
extend ContextDev::Internal::Type::Union
|
|
799
|
+
|
|
800
|
+
Variants =
|
|
801
|
+
T.type_alias do
|
|
802
|
+
T.any(
|
|
803
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::MonitorsPageBaseline,
|
|
804
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::MonitorsSitemapBaseline,
|
|
805
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::MonitorsExtractBaseline
|
|
806
|
+
)
|
|
807
|
+
end
|
|
808
|
+
|
|
809
|
+
class MonitorsPageBaseline < ContextDev::Internal::Type::BaseModel
|
|
810
|
+
OrHash =
|
|
811
|
+
T.type_alias do
|
|
812
|
+
T.any(
|
|
813
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::MonitorsPageBaseline,
|
|
814
|
+
ContextDev::Internal::AnyHash
|
|
815
|
+
)
|
|
816
|
+
end
|
|
817
|
+
|
|
818
|
+
# When this baseline was last captured or replaced.
|
|
819
|
+
sig { returns(Time) }
|
|
820
|
+
attr_accessor :captured_at
|
|
821
|
+
|
|
822
|
+
# The page's visible text as last observed.
|
|
823
|
+
sig { returns(String) }
|
|
824
|
+
attr_accessor :text
|
|
825
|
+
|
|
826
|
+
# Current baseline of a `page` monitor: the visible page text as last observed.
|
|
827
|
+
sig do
|
|
828
|
+
params(captured_at: Time, text: String).returns(T.attached_class)
|
|
829
|
+
end
|
|
830
|
+
def self.new(
|
|
831
|
+
# When this baseline was last captured or replaced.
|
|
832
|
+
captured_at:,
|
|
833
|
+
# The page's visible text as last observed.
|
|
834
|
+
text:
|
|
835
|
+
)
|
|
836
|
+
end
|
|
837
|
+
|
|
838
|
+
sig { override.returns({ captured_at: Time, text: String }) }
|
|
839
|
+
def to_hash
|
|
840
|
+
end
|
|
841
|
+
end
|
|
842
|
+
|
|
843
|
+
class MonitorsSitemapBaseline < ContextDev::Internal::Type::BaseModel
|
|
844
|
+
OrHash =
|
|
845
|
+
T.type_alias do
|
|
846
|
+
T.any(
|
|
847
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::MonitorsSitemapBaseline,
|
|
848
|
+
ContextDev::Internal::AnyHash
|
|
849
|
+
)
|
|
850
|
+
end
|
|
851
|
+
|
|
852
|
+
# When this baseline was last captured or replaced.
|
|
853
|
+
sig { returns(Time) }
|
|
854
|
+
attr_accessor :captured_at
|
|
855
|
+
|
|
856
|
+
# Number of URLs in the baseline.
|
|
857
|
+
sig { returns(Integer) }
|
|
858
|
+
attr_accessor :url_count
|
|
859
|
+
|
|
860
|
+
# The sitemap URLs as last observed (sorted, normalized).
|
|
861
|
+
sig { returns(T::Array[String]) }
|
|
862
|
+
attr_accessor :urls
|
|
863
|
+
|
|
864
|
+
# Current baseline of a `sitemap` monitor: the normalized URL set as last
|
|
865
|
+
# observed.
|
|
866
|
+
sig do
|
|
867
|
+
params(
|
|
868
|
+
captured_at: Time,
|
|
869
|
+
url_count: Integer,
|
|
870
|
+
urls: T::Array[String]
|
|
871
|
+
).returns(T.attached_class)
|
|
872
|
+
end
|
|
873
|
+
def self.new(
|
|
874
|
+
# When this baseline was last captured or replaced.
|
|
875
|
+
captured_at:,
|
|
876
|
+
# Number of URLs in the baseline.
|
|
877
|
+
url_count:,
|
|
878
|
+
# The sitemap URLs as last observed (sorted, normalized).
|
|
879
|
+
urls:
|
|
880
|
+
)
|
|
881
|
+
end
|
|
882
|
+
|
|
883
|
+
sig do
|
|
884
|
+
override.returns(
|
|
885
|
+
{ captured_at: Time, url_count: Integer, urls: T::Array[String] }
|
|
886
|
+
)
|
|
887
|
+
end
|
|
888
|
+
def to_hash
|
|
889
|
+
end
|
|
890
|
+
end
|
|
891
|
+
|
|
892
|
+
class MonitorsExtractBaseline < ContextDev::Internal::Type::BaseModel
|
|
893
|
+
OrHash =
|
|
894
|
+
T.type_alias do
|
|
895
|
+
T.any(
|
|
896
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::MonitorsExtractBaseline,
|
|
897
|
+
ContextDev::Internal::AnyHash
|
|
898
|
+
)
|
|
899
|
+
end
|
|
900
|
+
|
|
901
|
+
# When this baseline was last captured or replaced.
|
|
902
|
+
sig { returns(Time) }
|
|
903
|
+
attr_accessor :captured_at
|
|
904
|
+
|
|
905
|
+
# The extracted structured data, matching the monitor's extraction schema (same
|
|
906
|
+
# shape as the /web/extract endpoint's `data`). Refreshed when the monitor
|
|
907
|
+
# re-discovers its page set (at most about once a day); `null` when no extraction
|
|
908
|
+
# has been captured yet.
|
|
909
|
+
sig { returns(T.anything) }
|
|
910
|
+
attr_accessor :data
|
|
911
|
+
|
|
912
|
+
# The page URLs the monitor tracks and analyzes for changes.
|
|
913
|
+
sig { returns(T::Array[String]) }
|
|
914
|
+
attr_accessor :urls_analyzed
|
|
915
|
+
|
|
916
|
+
# Current baseline of an `extract` monitor: the pages it tracks and the structured
|
|
917
|
+
# data as last extracted.
|
|
918
|
+
sig do
|
|
919
|
+
params(
|
|
920
|
+
captured_at: Time,
|
|
921
|
+
data: T.anything,
|
|
922
|
+
urls_analyzed: T::Array[String]
|
|
923
|
+
).returns(T.attached_class)
|
|
924
|
+
end
|
|
925
|
+
def self.new(
|
|
926
|
+
# When this baseline was last captured or replaced.
|
|
927
|
+
captured_at:,
|
|
928
|
+
# The extracted structured data, matching the monitor's extraction schema (same
|
|
929
|
+
# shape as the /web/extract endpoint's `data`). Refreshed when the monitor
|
|
930
|
+
# re-discovers its page set (at most about once a day); `null` when no extraction
|
|
931
|
+
# has been captured yet.
|
|
932
|
+
data:,
|
|
933
|
+
# The page URLs the monitor tracks and analyzes for changes.
|
|
934
|
+
urls_analyzed:
|
|
935
|
+
)
|
|
936
|
+
end
|
|
937
|
+
|
|
938
|
+
sig do
|
|
939
|
+
override.returns(
|
|
940
|
+
{
|
|
941
|
+
captured_at: Time,
|
|
942
|
+
data: T.anything,
|
|
943
|
+
urls_analyzed: T::Array[String]
|
|
944
|
+
}
|
|
945
|
+
)
|
|
946
|
+
end
|
|
947
|
+
def to_hash
|
|
948
|
+
end
|
|
949
|
+
end
|
|
950
|
+
|
|
951
|
+
sig do
|
|
952
|
+
override.returns(
|
|
953
|
+
T::Array[
|
|
954
|
+
ContextDev::Models::MonitorCreateResponse::Baseline::Variants
|
|
955
|
+
]
|
|
956
|
+
)
|
|
957
|
+
end
|
|
958
|
+
def self.variants
|
|
959
|
+
end
|
|
960
|
+
end
|
|
961
|
+
|
|
752
962
|
class LastError < ContextDev::Internal::Type::BaseModel
|
|
753
963
|
OrHash =
|
|
754
964
|
T.type_alias do
|
|
@@ -148,6 +148,26 @@ module ContextDev
|
|
|
148
148
|
sig { returns(T.nilable(Time)) }
|
|
149
149
|
attr_accessor :started_at
|
|
150
150
|
|
|
151
|
+
# The webhook delivery attempted for a change detected by this run. Omitted when
|
|
152
|
+
# no webhook was attempted, including historical runs created before delivery
|
|
153
|
+
# tracking was added.
|
|
154
|
+
sig do
|
|
155
|
+
returns(
|
|
156
|
+
T.nilable(
|
|
157
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery
|
|
158
|
+
)
|
|
159
|
+
)
|
|
160
|
+
end
|
|
161
|
+
attr_reader :webhook_delivery
|
|
162
|
+
|
|
163
|
+
sig do
|
|
164
|
+
params(
|
|
165
|
+
webhook_delivery:
|
|
166
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::OrHash
|
|
167
|
+
).void
|
|
168
|
+
end
|
|
169
|
+
attr_writer :webhook_delivery
|
|
170
|
+
|
|
151
171
|
sig do
|
|
152
172
|
params(
|
|
153
173
|
id: String,
|
|
@@ -173,7 +193,9 @@ module ContextDev
|
|
|
173
193
|
T.nilable(
|
|
174
194
|
ContextDev::Models::MonitorListAccountRunsResponse::Data::SkipReason::OrSymbol
|
|
175
195
|
),
|
|
176
|
-
started_at: T.nilable(Time)
|
|
196
|
+
started_at: T.nilable(Time),
|
|
197
|
+
webhook_delivery:
|
|
198
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::OrHash
|
|
177
199
|
).returns(T.attached_class)
|
|
178
200
|
end
|
|
179
201
|
def self.new(
|
|
@@ -197,7 +219,11 @@ module ContextDev
|
|
|
197
219
|
error: nil,
|
|
198
220
|
# Why a skipped run never executed; null unless status is `skipped`.
|
|
199
221
|
skip_reason: nil,
|
|
200
|
-
started_at: nil
|
|
222
|
+
started_at: nil,
|
|
223
|
+
# The webhook delivery attempted for a change detected by this run. Omitted when
|
|
224
|
+
# no webhook was attempted, including historical runs created before delivery
|
|
225
|
+
# tracking was added.
|
|
226
|
+
webhook_delivery: nil
|
|
201
227
|
)
|
|
202
228
|
end
|
|
203
229
|
|
|
@@ -227,7 +253,9 @@ module ContextDev
|
|
|
227
253
|
T.nilable(
|
|
228
254
|
ContextDev::Models::MonitorListAccountRunsResponse::Data::SkipReason::TaggedSymbol
|
|
229
255
|
),
|
|
230
|
-
started_at: T.nilable(Time)
|
|
256
|
+
started_at: T.nilable(Time),
|
|
257
|
+
webhook_delivery:
|
|
258
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery
|
|
231
259
|
}
|
|
232
260
|
)
|
|
233
261
|
end
|
|
@@ -458,6 +486,179 @@ module ContextDev
|
|
|
458
486
|
def self.values
|
|
459
487
|
end
|
|
460
488
|
end
|
|
489
|
+
|
|
490
|
+
class WebhookDelivery < ContextDev::Internal::Type::BaseModel
|
|
491
|
+
OrHash =
|
|
492
|
+
T.type_alias do
|
|
493
|
+
T.any(
|
|
494
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery,
|
|
495
|
+
ContextDev::Internal::AnyHash
|
|
496
|
+
)
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
sig { returns(Time) }
|
|
500
|
+
attr_accessor :attempted_at
|
|
501
|
+
|
|
502
|
+
sig do
|
|
503
|
+
returns(
|
|
504
|
+
T.nilable(
|
|
505
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Error
|
|
506
|
+
)
|
|
507
|
+
)
|
|
508
|
+
end
|
|
509
|
+
attr_reader :error
|
|
510
|
+
|
|
511
|
+
sig do
|
|
512
|
+
params(
|
|
513
|
+
error:
|
|
514
|
+
T.nilable(
|
|
515
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Error::OrHash
|
|
516
|
+
)
|
|
517
|
+
).void
|
|
518
|
+
end
|
|
519
|
+
attr_writer :error
|
|
520
|
+
|
|
521
|
+
# Identifier sent in the X-Context-Id header.
|
|
522
|
+
sig { returns(String) }
|
|
523
|
+
attr_accessor :event_id
|
|
524
|
+
|
|
525
|
+
# The endpoint's final HTTP response status, or null when no response was
|
|
526
|
+
# received.
|
|
527
|
+
sig { returns(T.nilable(Integer)) }
|
|
528
|
+
attr_accessor :http_status
|
|
529
|
+
|
|
530
|
+
# Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
|
|
531
|
+
# response; failed means no HTTP response was received; skipped_unsafe_url means
|
|
532
|
+
# the URL failed the public-endpoint safety check.
|
|
533
|
+
sig do
|
|
534
|
+
returns(
|
|
535
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
536
|
+
)
|
|
537
|
+
end
|
|
538
|
+
attr_accessor :status
|
|
539
|
+
|
|
540
|
+
# The webhook delivery attempted for a change detected by this run. Omitted when
|
|
541
|
+
# no webhook was attempted, including historical runs created before delivery
|
|
542
|
+
# tracking was added.
|
|
543
|
+
sig do
|
|
544
|
+
params(
|
|
545
|
+
attempted_at: Time,
|
|
546
|
+
error:
|
|
547
|
+
T.nilable(
|
|
548
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Error::OrHash
|
|
549
|
+
),
|
|
550
|
+
event_id: String,
|
|
551
|
+
http_status: T.nilable(Integer),
|
|
552
|
+
status:
|
|
553
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status::OrSymbol
|
|
554
|
+
).returns(T.attached_class)
|
|
555
|
+
end
|
|
556
|
+
def self.new(
|
|
557
|
+
attempted_at:,
|
|
558
|
+
error:,
|
|
559
|
+
# Identifier sent in the X-Context-Id header.
|
|
560
|
+
event_id:,
|
|
561
|
+
# The endpoint's final HTTP response status, or null when no response was
|
|
562
|
+
# received.
|
|
563
|
+
http_status:,
|
|
564
|
+
# Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
|
|
565
|
+
# response; failed means no HTTP response was received; skipped_unsafe_url means
|
|
566
|
+
# the URL failed the public-endpoint safety check.
|
|
567
|
+
status:
|
|
568
|
+
)
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
sig do
|
|
572
|
+
override.returns(
|
|
573
|
+
{
|
|
574
|
+
attempted_at: Time,
|
|
575
|
+
error:
|
|
576
|
+
T.nilable(
|
|
577
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Error
|
|
578
|
+
),
|
|
579
|
+
event_id: String,
|
|
580
|
+
http_status: T.nilable(Integer),
|
|
581
|
+
status:
|
|
582
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
583
|
+
}
|
|
584
|
+
)
|
|
585
|
+
end
|
|
586
|
+
def to_hash
|
|
587
|
+
end
|
|
588
|
+
|
|
589
|
+
class Error < ContextDev::Internal::Type::BaseModel
|
|
590
|
+
OrHash =
|
|
591
|
+
T.type_alias do
|
|
592
|
+
T.any(
|
|
593
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Error,
|
|
594
|
+
ContextDev::Internal::AnyHash
|
|
595
|
+
)
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
sig { returns(String) }
|
|
599
|
+
attr_accessor :code
|
|
600
|
+
|
|
601
|
+
sig { returns(String) }
|
|
602
|
+
attr_accessor :message
|
|
603
|
+
|
|
604
|
+
sig do
|
|
605
|
+
params(code: String, message: String).returns(T.attached_class)
|
|
606
|
+
end
|
|
607
|
+
def self.new(code:, message:)
|
|
608
|
+
end
|
|
609
|
+
|
|
610
|
+
sig { override.returns({ code: String, message: String }) }
|
|
611
|
+
def to_hash
|
|
612
|
+
end
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
# Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
|
|
616
|
+
# response; failed means no HTTP response was received; skipped_unsafe_url means
|
|
617
|
+
# the URL failed the public-endpoint safety check.
|
|
618
|
+
module Status
|
|
619
|
+
extend ContextDev::Internal::Type::Enum
|
|
620
|
+
|
|
621
|
+
TaggedSymbol =
|
|
622
|
+
T.type_alias do
|
|
623
|
+
T.all(
|
|
624
|
+
Symbol,
|
|
625
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status
|
|
626
|
+
)
|
|
627
|
+
end
|
|
628
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
629
|
+
|
|
630
|
+
DELIVERED =
|
|
631
|
+
T.let(
|
|
632
|
+
:delivered,
|
|
633
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
634
|
+
)
|
|
635
|
+
REJECTED =
|
|
636
|
+
T.let(
|
|
637
|
+
:rejected,
|
|
638
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
639
|
+
)
|
|
640
|
+
FAILED =
|
|
641
|
+
T.let(
|
|
642
|
+
:failed,
|
|
643
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
644
|
+
)
|
|
645
|
+
SKIPPED_UNSAFE_URL =
|
|
646
|
+
T.let(
|
|
647
|
+
:skipped_unsafe_url,
|
|
648
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
649
|
+
)
|
|
650
|
+
|
|
651
|
+
sig do
|
|
652
|
+
override.returns(
|
|
653
|
+
T::Array[
|
|
654
|
+
ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
655
|
+
]
|
|
656
|
+
)
|
|
657
|
+
end
|
|
658
|
+
def self.values
|
|
659
|
+
end
|
|
660
|
+
end
|
|
661
|
+
end
|
|
461
662
|
end
|
|
462
663
|
end
|
|
463
664
|
end
|
|
@@ -47,8 +47,8 @@ module ContextDev
|
|
|
47
47
|
sig { params(q: String).void }
|
|
48
48
|
attr_writer :q
|
|
49
49
|
|
|
50
|
-
# Comma-separated fields to search with `q`. Defaults to all of them. Note
|
|
51
|
-
# only exists on
|
|
50
|
+
# Comma-separated fields to search with `q`. Defaults to all of them. Note
|
|
51
|
+
# `instructions` only exists on extract monitors.
|
|
52
52
|
sig do
|
|
53
53
|
returns(
|
|
54
54
|
T.nilable(T::Array[ContextDev::MonitorListParams::SearchBy::OrSymbol])
|
|
@@ -141,8 +141,8 @@ module ContextDev
|
|
|
141
141
|
limit: nil,
|
|
142
142
|
# Free-text search term, matched against the fields named in `search_by`.
|
|
143
143
|
q: nil,
|
|
144
|
-
# Comma-separated fields to search with `q`. Defaults to all of them. Note
|
|
145
|
-
# only exists on
|
|
144
|
+
# Comma-separated fields to search with `q`. Defaults to all of them. Note
|
|
145
|
+
# `instructions` only exists on extract monitors.
|
|
146
146
|
search_by: nil,
|
|
147
147
|
# `prefix` for as-you-type prefix matching (default), `exact` for full-token
|
|
148
148
|
# matching.
|
|
@@ -227,8 +227,11 @@ module ContextDev
|
|
|
227
227
|
NAME =
|
|
228
228
|
T.let(:name, ContextDev::MonitorListParams::SearchBy::TaggedSymbol)
|
|
229
229
|
URL = T.let(:url, ContextDev::MonitorListParams::SearchBy::TaggedSymbol)
|
|
230
|
-
|
|
231
|
-
T.let(
|
|
230
|
+
INSTRUCTIONS =
|
|
231
|
+
T.let(
|
|
232
|
+
:instructions,
|
|
233
|
+
ContextDev::MonitorListParams::SearchBy::TaggedSymbol
|
|
234
|
+
)
|
|
232
235
|
TAGS =
|
|
233
236
|
T.let(:tags, ContextDev::MonitorListParams::SearchBy::TaggedSymbol)
|
|
234
237
|
|