context.dev 2.21.0 → 2.22.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 +24 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +4 -9
- data/lib/context_dev/models/batch_cancel_params.rb +2 -2
- data/lib/context_dev/models/batch_cancel_response.rb +16 -21
- data/lib/context_dev/models/batch_delete_params.rb +2 -2
- data/lib/context_dev/models/batch_delete_response.rb +8 -8
- data/lib/context_dev/models/batch_get_results_params.rb +2 -2
- data/lib/context_dev/models/batch_get_results_response.rb +17 -22
- data/lib/context_dev/models/batch_list_response.rb +38 -47
- data/lib/context_dev/models/batch_retrieve_params.rb +2 -2
- data/lib/context_dev/models/batch_retrieve_response.rb +37 -46
- data/lib/context_dev/models/batch_submit_params.rb +80 -109
- data/lib/context_dev/models/batch_submit_response.rb +18 -28
- data/lib/context_dev/models/brand_retrieve_params.rb +90 -149
- data/lib/context_dev/models/brand_retrieve_response.rb +18 -22
- data/lib/context_dev/models/brand_search_params.rb +2 -3
- data/lib/context_dev/models/brand_search_response.rb +8 -8
- data/lib/context_dev/models/crawl_controls.rb +1 -2
- data/lib/context_dev/models/feedback_submit_params.rb +2 -2
- data/lib/context_dev/models/feedback_submit_response.rb +8 -8
- data/lib/context_dev/models/industry_retrieve_naics_params.rb +17 -32
- data/lib/context_dev/models/industry_retrieve_naics_response.rb +10 -10
- data/lib/context_dev/models/industry_retrieve_sic_params.rb +20 -39
- data/lib/context_dev/models/industry_retrieve_sic_response.rb +10 -10
- data/lib/context_dev/models/intake.rb +7 -13
- data/lib/context_dev/models/log_list_response.rb +14 -10
- data/lib/context_dev/models/log_retrieve_response.rb +15 -41
- data/lib/context_dev/models/monitor_create_params.rb +238 -72
- data/lib/context_dev/models/monitor_create_response.rb +364 -175
- data/lib/context_dev/models/monitor_delete_params.rb +3 -1
- data/lib/context_dev/models/monitor_delete_response.rb +44 -1
- data/lib/context_dev/models/monitor_get_credit_usage_response.rb +43 -1
- data/lib/context_dev/models/monitor_get_limits_response.rb +47 -7
- data/lib/context_dev/models/monitor_list_account_changes_response.rb +143 -20
- data/lib/context_dev/models/monitor_list_account_runs_response.rb +50 -8
- data/lib/context_dev/models/monitor_list_changes_params.rb +2 -1
- data/lib/context_dev/models/monitor_list_changes_response.rb +143 -20
- data/lib/context_dev/models/monitor_list_params.rb +3 -3
- data/lib/context_dev/models/monitor_list_response.rb +304 -106
- data/lib/context_dev/models/monitor_list_runs_params.rb +2 -1
- data/lib/context_dev/models/monitor_list_runs_response.rb +50 -8
- data/lib/context_dev/models/monitor_retrieve_change_params.rb +3 -1
- data/lib/context_dev/models/monitor_retrieve_change_response.rb +45 -15
- data/lib/context_dev/models/monitor_retrieve_params.rb +3 -1
- data/lib/context_dev/models/monitor_retrieve_response.rb +361 -171
- data/lib/context_dev/models/monitor_retrieve_run_params.rb +6 -2
- data/lib/context_dev/models/monitor_retrieve_run_response.rb +45 -8
- data/lib/context_dev/models/monitor_rotate_webhook_secret_params.rb +3 -1
- data/lib/context_dev/models/monitor_rotate_webhook_secret_response.rb +364 -172
- data/lib/context_dev/models/monitor_run_params.rb +3 -1
- data/lib/context_dev/models/monitor_run_response.rb +42 -4
- data/lib/context_dev/models/monitor_update_params.rb +239 -71
- data/lib/context_dev/models/monitor_update_response.rb +361 -171
- data/lib/context_dev/models/news_search_params.rb +10 -6
- data/lib/context_dev/models/news_search_response.rb +8 -8
- data/lib/context_dev/models/parse_handle_params.rb +9 -20
- data/lib/context_dev/models/parse_handle_response.rb +8 -8
- data/lib/context_dev/models/person_enrich_params.rb +76 -50
- data/lib/context_dev/models/person_enrich_response.rb +8 -8
- data/lib/context_dev/models/utility_prefetch_params.rb +15 -29
- data/lib/context_dev/models/utility_prefetch_response.rb +10 -10
- data/lib/context_dev/models/web_answers_params.rb +28 -47
- data/lib/context_dev/models/web_answers_response.rb +9 -8
- data/lib/context_dev/models/web_extract_competitors_params.rb +17 -32
- data/lib/context_dev/models/web_extract_competitors_response.rb +8 -8
- data/lib/context_dev/models/web_extract_styleguide_params.rb +22 -44
- data/lib/context_dev/models/web_extract_styleguide_response.rb +34 -44
- data/lib/context_dev/models/web_map_urls_params.rb +30 -51
- data/lib/context_dev/models/web_map_urls_response.rb +8 -8
- data/lib/context_dev/models/web_scrape_params.rb +193 -191
- data/lib/context_dev/models/web_scrape_response.rb +219 -95
- data/lib/context_dev/models/web_screenshot_params.rb +20 -39
- data/lib/context_dev/models/web_screenshot_response.rb +18 -28
- data/lib/context_dev/models/web_search_params.rb +76 -65
- data/lib/context_dev/models/web_search_response.rb +68 -27
- data/lib/context_dev/models/web_web_crawl_md_params.rb +41 -70
- data/lib/context_dev/models/web_web_crawl_md_response.rb +11 -15
- data/lib/context_dev/models/webhook_delivery.rb +3 -7
- data/lib/context_dev/models/webhooks/attempt.rb +3 -3
- data/lib/context_dev/models/webhooks/delivery.rb +16 -11
- data/lib/context_dev/models/webhooks/delivery_list_attempts_params.rb +2 -6
- data/lib/context_dev/models/webhooks/delivery_list_attempts_response.rb +8 -8
- data/lib/context_dev/models/webhooks/delivery_list_params.rb +4 -4
- data/lib/context_dev/models/webhooks/delivery_list_response.rb +8 -8
- data/lib/context_dev/models/webhooks/delivery_retrieve_params.rb +2 -6
- data/lib/context_dev/models/webhooks/delivery_retrieve_response.rb +8 -8
- data/lib/context_dev/models/webhooks/delivery_retry_params.rb +4 -4
- data/lib/context_dev/models/webhooks/delivery_retry_response.rb +8 -8
- data/lib/context_dev/models/webhooks/delivery_summary.rb +16 -11
- data/lib/context_dev/resources/batch.rb +17 -16
- data/lib/context_dev/resources/brand.rb +6 -8
- data/lib/context_dev/resources/feedback.rb +4 -5
- data/lib/context_dev/resources/industry.rb +9 -11
- data/lib/context_dev/resources/logs.rb +4 -5
- data/lib/context_dev/resources/monitors.rb +50 -53
- data/lib/context_dev/resources/news.rb +4 -8
- data/lib/context_dev/resources/parse.rb +4 -5
- data/lib/context_dev/resources/people.rb +11 -13
- data/lib/context_dev/resources/utility.rb +4 -11
- data/lib/context_dev/resources/web.rb +69 -94
- data/lib/context_dev/resources/webhooks/deliveries.rb +10 -18
- data/lib/context_dev/resources/webhooks.rb +1 -1
- data/lib/context_dev/version.rb +1 -1
- data/rbi/context_dev/client.rbi +4 -9
- data/rbi/context_dev/models/batch_cancel_params.rbi +2 -2
- data/rbi/context_dev/models/batch_cancel_response.rbi +17 -21
- data/rbi/context_dev/models/batch_delete_params.rbi +2 -2
- data/rbi/context_dev/models/batch_delete_response.rbi +9 -9
- data/rbi/context_dev/models/batch_get_results_params.rbi +2 -2
- data/rbi/context_dev/models/batch_get_results_response.rbi +18 -26
- data/rbi/context_dev/models/batch_list_response.rbi +41 -53
- data/rbi/context_dev/models/batch_retrieve_params.rbi +2 -2
- data/rbi/context_dev/models/batch_retrieve_response.rbi +40 -52
- data/rbi/context_dev/models/batch_submit_params.rbi +87 -147
- data/rbi/context_dev/models/batch_submit_response.rbi +19 -31
- data/rbi/context_dev/models/brand_retrieve_params.rbi +99 -190
- data/rbi/context_dev/models/brand_retrieve_response.rbi +19 -25
- data/rbi/context_dev/models/brand_search_params.rbi +2 -4
- data/rbi/context_dev/models/brand_search_response.rbi +9 -9
- data/rbi/context_dev/models/crawl_controls.rbi +1 -2
- data/rbi/context_dev/models/feedback_submit_params.rbi +2 -2
- data/rbi/context_dev/models/feedback_submit_response.rbi +9 -9
- data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +19 -42
- data/rbi/context_dev/models/industry_retrieve_naics_response.rbi +11 -11
- data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +22 -51
- data/rbi/context_dev/models/industry_retrieve_sic_response.rbi +11 -11
- data/rbi/context_dev/models/intake.rbi +7 -19
- data/rbi/context_dev/models/log_list_response.rbi +13 -11
- data/rbi/context_dev/models/log_retrieve_response.rbi +13 -76
- data/rbi/context_dev/models/monitor_create_params.rbi +418 -78
- data/rbi/context_dev/models/monitor_create_response.rbi +654 -287
- data/rbi/context_dev/models/monitor_delete_params.rbi +6 -1
- data/rbi/context_dev/models/monitor_delete_response.rbi +89 -3
- data/rbi/context_dev/models/monitor_get_credit_usage_response.rbi +77 -3
- data/rbi/context_dev/models/monitor_get_limits_response.rbi +83 -10
- data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +236 -24
- data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +86 -12
- data/rbi/context_dev/models/monitor_list_changes_params.rbi +2 -0
- data/rbi/context_dev/models/monitor_list_changes_response.rbi +234 -24
- data/rbi/context_dev/models/monitor_list_params.rbi +4 -4
- data/rbi/context_dev/models/monitor_list_response.rbi +502 -130
- data/rbi/context_dev/models/monitor_list_runs_params.rbi +2 -0
- data/rbi/context_dev/models/monitor_list_runs_response.rbi +84 -12
- data/rbi/context_dev/models/monitor_retrieve_change_params.rbi +6 -1
- data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +79 -15
- data/rbi/context_dev/models/monitor_retrieve_params.rbi +6 -1
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +654 -283
- data/rbi/context_dev/models/monitor_retrieve_run_params.rbi +9 -1
- data/rbi/context_dev/models/monitor_retrieve_run_response.rbi +77 -9
- data/rbi/context_dev/models/monitor_rotate_webhook_secret_params.rbi +6 -1
- data/rbi/context_dev/models/monitor_rotate_webhook_secret_response.rbi +659 -288
- data/rbi/context_dev/models/monitor_run_params.rbi +6 -1
- data/rbi/context_dev/models/monitor_run_response.rbi +82 -9
- data/rbi/context_dev/models/monitor_update_params.rbi +420 -75
- data/rbi/context_dev/models/monitor_update_response.rbi +650 -281
- data/rbi/context_dev/models/news_search_params.rbi +10 -2
- data/rbi/context_dev/models/news_search_response.rbi +9 -9
- data/rbi/context_dev/models/parse_handle_params.rbi +10 -29
- data/rbi/context_dev/models/parse_handle_response.rbi +9 -9
- data/rbi/context_dev/models/person_enrich_params.rbi +86 -44
- data/rbi/context_dev/models/person_enrich_response.rbi +9 -9
- data/rbi/context_dev/models/utility_prefetch_params.rbi +15 -27
- data/rbi/context_dev/models/utility_prefetch_response.rbi +11 -11
- data/rbi/context_dev/models/web_answers_params.rbi +33 -63
- data/rbi/context_dev/models/web_answers_response.rbi +11 -9
- data/rbi/context_dev/models/web_extract_competitors_params.rbi +19 -42
- data/rbi/context_dev/models/web_extract_competitors_response.rbi +9 -9
- data/rbi/context_dev/models/web_extract_styleguide_params.rbi +25 -61
- data/rbi/context_dev/models/web_extract_styleguide_response.rbi +36 -51
- data/rbi/context_dev/models/web_map_urls_params.rbi +33 -68
- data/rbi/context_dev/models/web_map_urls_response.rbi +9 -9
- data/rbi/context_dev/models/web_scrape_params.rbi +212 -206
- data/rbi/context_dev/models/web_scrape_response.rbi +296 -120
- data/rbi/context_dev/models/web_screenshot_params.rbi +22 -51
- data/rbi/context_dev/models/web_screenshot_response.rbi +20 -35
- data/rbi/context_dev/models/web_search_params.rbi +114 -82
- data/rbi/context_dev/models/web_search_response.rbi +145 -33
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +45 -95
- data/rbi/context_dev/models/web_web_crawl_md_response.rbi +12 -18
- data/rbi/context_dev/models/webhook_delivery.rbi +3 -9
- data/rbi/context_dev/models/webhooks/attempt.rbi +3 -3
- data/rbi/context_dev/models/webhooks/delivery.rbi +14 -11
- data/rbi/context_dev/models/webhooks/delivery_list_attempts_params.rbi +2 -4
- data/rbi/context_dev/models/webhooks/delivery_list_attempts_response.rbi +9 -9
- data/rbi/context_dev/models/webhooks/delivery_list_params.rbi +4 -4
- data/rbi/context_dev/models/webhooks/delivery_list_response.rbi +9 -9
- data/rbi/context_dev/models/webhooks/delivery_retrieve_params.rbi +2 -4
- data/rbi/context_dev/models/webhooks/delivery_retrieve_response.rbi +9 -9
- data/rbi/context_dev/models/webhooks/delivery_retry_params.rbi +4 -4
- data/rbi/context_dev/models/webhooks/delivery_retry_response.rbi +9 -9
- data/rbi/context_dev/models/webhooks/delivery_summary.rbi +14 -11
- data/rbi/context_dev/resources/batch.rbi +19 -18
- data/rbi/context_dev/resources/brand.rbi +6 -9
- data/rbi/context_dev/resources/feedback.rbi +4 -5
- data/rbi/context_dev/resources/industry.rbi +11 -27
- data/rbi/context_dev/resources/logs.rbi +4 -5
- data/rbi/context_dev/resources/monitors.rbi +71 -49
- data/rbi/context_dev/resources/news.rbi +4 -8
- data/rbi/context_dev/resources/parse.rbi +7 -14
- data/rbi/context_dev/resources/people.rbi +15 -13
- data/rbi/context_dev/resources/utility.rbi +4 -11
- data/rbi/context_dev/resources/web.rbi +89 -190
- data/rbi/context_dev/resources/webhooks/deliveries.rbi +10 -12
- data/rbi/context_dev/resources/webhooks.rbi +1 -1
- data/sig/context_dev/models/log_retrieve_response.rbs +0 -28
- data/sig/context_dev/models/monitor_create_params.rbs +113 -0
- data/sig/context_dev/models/monitor_create_response.rbs +203 -53
- data/sig/context_dev/models/monitor_delete_response.rbs +46 -3
- data/sig/context_dev/models/monitor_get_credit_usage_response.rbs +36 -3
- data/sig/context_dev/models/monitor_get_limits_response.rbs +36 -3
- data/sig/context_dev/models/monitor_list_account_changes_response.rbs +111 -8
- data/sig/context_dev/models/monitor_list_account_runs_response.rbs +36 -3
- data/sig/context_dev/models/monitor_list_changes_response.rbs +111 -8
- data/sig/context_dev/models/monitor_list_response.rbs +149 -3
- data/sig/context_dev/models/monitor_list_runs_response.rbs +36 -3
- data/sig/context_dev/models/monitor_retrieve_change_response.rbs +33 -0
- data/sig/context_dev/models/monitor_retrieve_response.rbs +203 -53
- data/sig/context_dev/models/monitor_retrieve_run_response.rbs +33 -0
- data/sig/context_dev/models/monitor_rotate_webhook_secret_response.rbs +203 -53
- data/sig/context_dev/models/monitor_run_response.rbs +48 -3
- data/sig/context_dev/models/monitor_update_params.rbs +113 -0
- data/sig/context_dev/models/monitor_update_response.rbs +203 -53
- data/sig/context_dev/models/web_scrape_response.rbs +204 -27
- data/sig/context_dev/models/web_search_params.rbs +25 -0
- data/sig/context_dev/models/web_search_response.rbs +48 -0
- data/sig/context_dev/resources/web.rbs +1 -0
- metadata +2 -2
|
@@ -10,7 +10,8 @@ module ContextDev
|
|
|
10
10
|
required :id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute change_detection
|
|
13
|
-
#
|
|
13
|
+
# How changes are judged. Defaults to `semantic` for extract targets and page
|
|
14
|
+
# targets with `instructions`, otherwise `exact`.
|
|
14
15
|
#
|
|
15
16
|
# @return [ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Exact, ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Semantic]
|
|
16
17
|
required :change_detection, union: -> { ContextDev::Models::MonitorUpdateResponse::ChangeDetection }
|
|
@@ -21,8 +22,7 @@ module ContextDev
|
|
|
21
22
|
required :created_at, Time
|
|
22
23
|
|
|
23
24
|
# @!attribute mode
|
|
24
|
-
#
|
|
25
|
-
# described by `target` and `change_detection`.
|
|
25
|
+
# Always `web`. Optional.
|
|
26
26
|
#
|
|
27
27
|
# @return [Symbol, ContextDev::Models::MonitorUpdateResponse::Mode]
|
|
28
28
|
required :mode, enum: -> { ContextDev::Models::MonitorUpdateResponse::Mode }
|
|
@@ -32,26 +32,22 @@ module ContextDev
|
|
|
32
32
|
# @return [String]
|
|
33
33
|
required :name, String
|
|
34
34
|
|
|
35
|
-
# @!attribute
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
# between 10 minutes and 1 year.
|
|
35
|
+
# @!attribute request_id
|
|
36
|
+
# Unique ID of this request, also in `X-Request-Id`. Include it when contacting
|
|
37
|
+
# support.
|
|
39
38
|
#
|
|
40
|
-
# @return [
|
|
41
|
-
required :
|
|
39
|
+
# @return [String]
|
|
40
|
+
required :request_id, String
|
|
42
41
|
|
|
43
42
|
# @!attribute status
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
# to `active` on the next successful run. Monitors are auto-`paused` after
|
|
47
|
-
# repeated consecutive failures or insufficient-credit skips; resume by PATCHing
|
|
48
|
-
# status to `active`.
|
|
43
|
+
# Current state. Failed monitors keep running; paused monitors must be resumed
|
|
44
|
+
# with `status: "active"`.
|
|
49
45
|
#
|
|
50
46
|
# @return [Symbol, ContextDev::Models::MonitorUpdateResponse::Status]
|
|
51
47
|
required :status, enum: -> { ContextDev::Models::MonitorUpdateResponse::Status }
|
|
52
48
|
|
|
53
49
|
# @!attribute target
|
|
54
|
-
#
|
|
50
|
+
# What to watch: a page, a sitemap, or data extracted from a site.
|
|
55
51
|
#
|
|
56
52
|
# @return [ContextDev::Models::MonitorUpdateResponse::Target::Page, ContextDev::Models::MonitorUpdateResponse::Target::Sitemap, ContextDev::Models::MonitorUpdateResponse::Target::Extract]
|
|
57
53
|
required :target, union: -> { ContextDev::Models::MonitorUpdateResponse::Target }
|
|
@@ -62,14 +58,18 @@ module ContextDev
|
|
|
62
58
|
required :updated_at, Time
|
|
63
59
|
|
|
64
60
|
# @!attribute baseline
|
|
65
|
-
#
|
|
66
|
-
#
|
|
67
|
-
# on GET /monitors/{monitor_id}; null until the first baseline run completes (and
|
|
68
|
-
# after a target or change_detection update, which resets the baseline).
|
|
61
|
+
# Comparison baseline, included on Retrieve. Null until capture completes or after
|
|
62
|
+
# target changes.
|
|
69
63
|
#
|
|
70
64
|
# @return [ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsPageBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsSitemapBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsExtractBaseline, nil]
|
|
71
65
|
optional :baseline, union: -> { ContextDev::Models::MonitorUpdateResponse::Baseline }, nil?: true
|
|
72
66
|
|
|
67
|
+
# @!attribute key_metadata
|
|
68
|
+
# Credits this request used and your remaining balance.
|
|
69
|
+
#
|
|
70
|
+
# @return [ContextDev::Models::MonitorUpdateResponse::KeyMetadata, nil]
|
|
71
|
+
optional :key_metadata, -> { ContextDev::Models::MonitorUpdateResponse::KeyMetadata }
|
|
72
|
+
|
|
73
73
|
# @!attribute last_change_at
|
|
74
74
|
#
|
|
75
75
|
# @return [Time, nil]
|
|
@@ -87,19 +87,27 @@ module ContextDev
|
|
|
87
87
|
optional :last_run_at, Time, nil?: true
|
|
88
88
|
|
|
89
89
|
# @!attribute next_run_at
|
|
90
|
-
# When the next scheduled run is due.
|
|
90
|
+
# When the next scheduled run is due; null while paused.
|
|
91
91
|
#
|
|
92
92
|
# @return [Time, nil]
|
|
93
93
|
optional :next_run_at, Time, nil?: true
|
|
94
94
|
|
|
95
|
+
# @!attribute schedule
|
|
96
|
+
# Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
|
|
97
|
+
# every 6 hours or every 2 days. The total interval (frequency × unit) must be
|
|
98
|
+
# between 10 minutes and 1 year.
|
|
99
|
+
#
|
|
100
|
+
# @return [ContextDev::Models::MonitorUpdateResponse::Schedule, nil]
|
|
101
|
+
optional :schedule, -> { ContextDev::Models::MonitorUpdateResponse::Schedule }
|
|
102
|
+
|
|
95
103
|
# @!attribute tags
|
|
96
|
-
#
|
|
97
|
-
# Duplicates are removed.
|
|
104
|
+
# Labels for filtering monitors, their changes, and their usage.
|
|
98
105
|
#
|
|
99
106
|
# @return [Array<String>, nil]
|
|
100
107
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
101
108
|
|
|
102
109
|
# @!attribute webhook
|
|
110
|
+
# Webhook destination and delivery settings. Null means no webhook is configured.
|
|
103
111
|
#
|
|
104
112
|
# @return [ContextDev::Models::MonitorUpdateResponse::Webhook, nil]
|
|
105
113
|
optional :webhook, -> { ContextDev::Models::MonitorUpdateResponse::Webhook }, nil?: true
|
|
@@ -112,32 +120,31 @@ module ContextDev
|
|
|
112
120
|
# @return [ContextDev::Models::MonitorUpdateResponse::WebhookFailure, nil]
|
|
113
121
|
optional :webhook_failure, -> { ContextDev::Models::MonitorUpdateResponse::WebhookFailure }, nil?: true
|
|
114
122
|
|
|
115
|
-
# @!method initialize(id:, change_detection:, created_at:, mode:, name:,
|
|
123
|
+
# @!method initialize(id:, change_detection:, created_at:, mode:, name:, request_id:, status:, target:, updated_at:, baseline: nil, key_metadata: nil, last_change_at: nil, last_error: nil, last_run_at: nil, next_run_at: nil, schedule: nil, tags: nil, webhook: nil, webhook_failure: nil)
|
|
116
124
|
# Some parameter documentations has been truncated, see
|
|
117
125
|
# {ContextDev::Models::MonitorUpdateResponse} for more details.
|
|
118
126
|
#
|
|
119
|
-
# A web monitor. `mode` is the constant `web`; behavior is described by `target`
|
|
120
|
-
# (page/sitemap/extract) and `change_detection` (exact/semantic).
|
|
121
|
-
#
|
|
122
127
|
# @param id [String]
|
|
123
128
|
#
|
|
124
|
-
# @param change_detection [ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Exact, ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Semantic]
|
|
129
|
+
# @param change_detection [ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Exact, ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Semantic] How changes are judged. Defaults to `semantic` for extract targets and page targ
|
|
125
130
|
#
|
|
126
131
|
# @param created_at [Time]
|
|
127
132
|
#
|
|
128
|
-
# @param mode [Symbol, ContextDev::Models::MonitorUpdateResponse::Mode]
|
|
133
|
+
# @param mode [Symbol, ContextDev::Models::MonitorUpdateResponse::Mode] Always `web`. Optional.
|
|
129
134
|
#
|
|
130
135
|
# @param name [String]
|
|
131
136
|
#
|
|
132
|
-
# @param
|
|
137
|
+
# @param request_id [String] Unique ID of this request, also in `X-Request-Id`. Include it when contacting su
|
|
133
138
|
#
|
|
134
|
-
# @param status [Symbol, ContextDev::Models::MonitorUpdateResponse::Status]
|
|
139
|
+
# @param status [Symbol, ContextDev::Models::MonitorUpdateResponse::Status] Current state. Failed monitors keep running; paused monitors must be resumed wit
|
|
135
140
|
#
|
|
136
|
-
# @param target [ContextDev::Models::MonitorUpdateResponse::Target::Page, ContextDev::Models::MonitorUpdateResponse::Target::Sitemap, ContextDev::Models::MonitorUpdateResponse::Target::Extract]
|
|
141
|
+
# @param target [ContextDev::Models::MonitorUpdateResponse::Target::Page, ContextDev::Models::MonitorUpdateResponse::Target::Sitemap, ContextDev::Models::MonitorUpdateResponse::Target::Extract] What to watch: a page, a sitemap, or data extracted from a site.
|
|
137
142
|
#
|
|
138
143
|
# @param updated_at [Time]
|
|
139
144
|
#
|
|
140
|
-
# @param baseline [ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsPageBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsSitemapBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsExtractBaseline, nil]
|
|
145
|
+
# @param baseline [ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsPageBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsSitemapBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsExtractBaseline, nil] Comparison baseline, included on Retrieve. Null until capture completes or after
|
|
146
|
+
#
|
|
147
|
+
# @param key_metadata [ContextDev::Models::MonitorUpdateResponse::KeyMetadata] Credits this request used and your remaining balance.
|
|
141
148
|
#
|
|
142
149
|
# @param last_change_at [Time, nil]
|
|
143
150
|
#
|
|
@@ -145,15 +152,18 @@ module ContextDev
|
|
|
145
152
|
#
|
|
146
153
|
# @param last_run_at [Time, nil]
|
|
147
154
|
#
|
|
148
|
-
# @param next_run_at [Time, nil] When the next scheduled run is due.
|
|
155
|
+
# @param next_run_at [Time, nil] When the next scheduled run is due; null while paused.
|
|
156
|
+
#
|
|
157
|
+
# @param schedule [ContextDev::Models::MonitorUpdateResponse::Schedule] Run the monitor on a fixed interval defined by a frequency and a unit, e.g. ever
|
|
149
158
|
#
|
|
150
|
-
# @param tags [Array<String>]
|
|
159
|
+
# @param tags [Array<String>] Labels for filtering monitors, their changes, and their usage.
|
|
151
160
|
#
|
|
152
|
-
# @param webhook [ContextDev::Models::MonitorUpdateResponse::Webhook, nil]
|
|
161
|
+
# @param webhook [ContextDev::Models::MonitorUpdateResponse::Webhook, nil] Webhook destination and delivery settings. Null means no webhook is configured.
|
|
153
162
|
#
|
|
154
163
|
# @param webhook_failure [ContextDev::Models::MonitorUpdateResponse::WebhookFailure, nil] Present while webhook deliveries are failing consecutively; null when deliveries
|
|
155
164
|
|
|
156
|
-
#
|
|
165
|
+
# How changes are judged. Defaults to `semantic` for extract targets and page
|
|
166
|
+
# targets with `instructions`, otherwise `exact`.
|
|
157
167
|
#
|
|
158
168
|
# @see ContextDev::Models::MonitorUpdateResponse#change_detection
|
|
159
169
|
module ChangeDetection
|
|
@@ -164,11 +174,12 @@ module ContextDev
|
|
|
164
174
|
# Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
|
|
165
175
|
variant :exact, -> { ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Exact }
|
|
166
176
|
|
|
167
|
-
# Detect
|
|
177
|
+
# Detect meaningful content changes using the target’s instructions and optional schema.
|
|
168
178
|
variant :semantic, -> { ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Semantic }
|
|
169
179
|
|
|
170
180
|
class Exact < ContextDev::Internal::Type::BaseModel
|
|
171
181
|
# @!attribute type
|
|
182
|
+
# Use `exact` to compare visible text or sitemap URLs.
|
|
172
183
|
#
|
|
173
184
|
# @return [Symbol, :exact]
|
|
174
185
|
required :type, const: :exact
|
|
@@ -177,36 +188,36 @@ module ContextDev
|
|
|
177
188
|
# Detect exact changes. For page targets, this means visible text diffs. For
|
|
178
189
|
# sitemap targets, this means URL additions and removals.
|
|
179
190
|
#
|
|
180
|
-
# @param type [Symbol, :exact]
|
|
191
|
+
# @param type [Symbol, :exact] Use `exact` to compare visible text or sitemap URLs.
|
|
181
192
|
end
|
|
182
193
|
|
|
183
194
|
class Semantic < ContextDev::Internal::Type::BaseModel
|
|
184
195
|
# @!attribute type
|
|
196
|
+
# Use `semantic` to judge changes against the target instructions.
|
|
185
197
|
#
|
|
186
198
|
# @return [Symbol, :semantic]
|
|
187
199
|
required :type, const: :semantic
|
|
188
200
|
|
|
189
201
|
# @!attribute confidence_threshold
|
|
202
|
+
# Minimum confidence required to report a meaningful change, from 0 to 1.
|
|
190
203
|
#
|
|
191
204
|
# @return [Float, nil]
|
|
192
205
|
optional :confidence_threshold, Float
|
|
193
206
|
|
|
194
207
|
# @!method initialize(confidence_threshold: nil, type: :semantic)
|
|
195
|
-
# Detect
|
|
196
|
-
#
|
|
197
|
-
#
|
|
198
|
-
#
|
|
208
|
+
# Detect meaningful content changes using the target’s instructions and optional
|
|
209
|
+
# schema.
|
|
210
|
+
#
|
|
211
|
+
# @param confidence_threshold [Float] Minimum confidence required to report a meaningful change, from 0 to 1.
|
|
199
212
|
#
|
|
200
|
-
# @param
|
|
201
|
-
# @param type [Symbol, :semantic]
|
|
213
|
+
# @param type [Symbol, :semantic] Use `semantic` to judge changes against the target instructions.
|
|
202
214
|
end
|
|
203
215
|
|
|
204
216
|
# @!method self.variants
|
|
205
217
|
# @return [Array(ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Exact, ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Semantic)]
|
|
206
218
|
end
|
|
207
219
|
|
|
208
|
-
#
|
|
209
|
-
# described by `target` and `change_detection`.
|
|
220
|
+
# Always `web`. Optional.
|
|
210
221
|
#
|
|
211
222
|
# @see ContextDev::Models::MonitorUpdateResponse#mode
|
|
212
223
|
module Mode
|
|
@@ -218,68 +229,8 @@ module ContextDev
|
|
|
218
229
|
# @return [Array<Symbol>]
|
|
219
230
|
end
|
|
220
231
|
|
|
221
|
-
#
|
|
222
|
-
|
|
223
|
-
# @!attribute frequency
|
|
224
|
-
# Number of units between runs. The resulting interval (frequency × unit) must be
|
|
225
|
-
# at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes;
|
|
226
|
-
# maximum 365 when unit is days).
|
|
227
|
-
#
|
|
228
|
-
# @return [Integer]
|
|
229
|
-
required :frequency, Integer
|
|
230
|
-
|
|
231
|
-
# @!attribute type
|
|
232
|
-
#
|
|
233
|
-
# @return [Symbol, ContextDev::Models::MonitorUpdateResponse::Schedule::Type]
|
|
234
|
-
required :type, enum: -> { ContextDev::Models::MonitorUpdateResponse::Schedule::Type }
|
|
235
|
-
|
|
236
|
-
# @!attribute unit
|
|
237
|
-
#
|
|
238
|
-
# @return [Symbol, ContextDev::Models::MonitorUpdateResponse::Schedule::Unit]
|
|
239
|
-
required :unit, enum: -> { ContextDev::Models::MonitorUpdateResponse::Schedule::Unit }
|
|
240
|
-
|
|
241
|
-
# @!method initialize(frequency:, type:, unit:)
|
|
242
|
-
# Some parameter documentations has been truncated, see
|
|
243
|
-
# {ContextDev::Models::MonitorUpdateResponse::Schedule} for more details.
|
|
244
|
-
#
|
|
245
|
-
# Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
|
|
246
|
-
# every 6 hours or every 2 days. The total interval (frequency × unit) must be
|
|
247
|
-
# between 10 minutes and 1 year.
|
|
248
|
-
#
|
|
249
|
-
# @param frequency [Integer] Number of units between runs. The resulting interval (frequency × unit) must be
|
|
250
|
-
#
|
|
251
|
-
# @param type [Symbol, ContextDev::Models::MonitorUpdateResponse::Schedule::Type]
|
|
252
|
-
#
|
|
253
|
-
# @param unit [Symbol, ContextDev::Models::MonitorUpdateResponse::Schedule::Unit]
|
|
254
|
-
|
|
255
|
-
# @see ContextDev::Models::MonitorUpdateResponse::Schedule#type
|
|
256
|
-
module Type
|
|
257
|
-
extend ContextDev::Internal::Type::Enum
|
|
258
|
-
|
|
259
|
-
INTERVAL = :interval
|
|
260
|
-
|
|
261
|
-
# @!method self.values
|
|
262
|
-
# @return [Array<Symbol>]
|
|
263
|
-
end
|
|
264
|
-
|
|
265
|
-
# @see ContextDev::Models::MonitorUpdateResponse::Schedule#unit
|
|
266
|
-
module Unit
|
|
267
|
-
extend ContextDev::Internal::Type::Enum
|
|
268
|
-
|
|
269
|
-
MINUTES = :minutes
|
|
270
|
-
HOURS = :hours
|
|
271
|
-
DAYS = :days
|
|
272
|
-
|
|
273
|
-
# @!method self.values
|
|
274
|
-
# @return [Array<Symbol>]
|
|
275
|
-
end
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
# Monitor lifecycle status. `failed` means the most recent run failed (see the
|
|
279
|
-
# monitor's `last_error`); failed monitors keep running on schedule and flip back
|
|
280
|
-
# to `active` on the next successful run. Monitors are auto-`paused` after
|
|
281
|
-
# repeated consecutive failures or insufficient-credit skips; resume by PATCHing
|
|
282
|
-
# status to `active`.
|
|
232
|
+
# Current state. Failed monitors keep running; paused monitors must be resumed
|
|
233
|
+
# with `status: "active"`.
|
|
283
234
|
#
|
|
284
235
|
# @see ContextDev::Models::MonitorUpdateResponse#status
|
|
285
236
|
module Status
|
|
@@ -293,7 +244,7 @@ module ContextDev
|
|
|
293
244
|
# @return [Array<Symbol>]
|
|
294
245
|
end
|
|
295
246
|
|
|
296
|
-
#
|
|
247
|
+
# What to watch: a page, a sitemap, or data extracted from a site.
|
|
297
248
|
#
|
|
298
249
|
# @see ContextDev::Models::MonitorUpdateResponse#target
|
|
299
250
|
module Target
|
|
@@ -304,38 +255,44 @@ module ContextDev
|
|
|
304
255
|
# Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.
|
|
305
256
|
variant :page, -> { ContextDev::Models::MonitorUpdateResponse::Target::Page }
|
|
306
257
|
|
|
307
|
-
# Watch a
|
|
258
|
+
# Watch a site’s URL inventory for confirmed additions and removals.
|
|
308
259
|
variant :sitemap, -> { ContextDev::Models::MonitorUpdateResponse::Target::Sitemap }
|
|
309
260
|
|
|
310
|
-
#
|
|
261
|
+
# Track relevant pages selected by `schema` and `instructions`; refresh the page set periodically.
|
|
311
262
|
variant :extract, -> { ContextDev::Models::MonitorUpdateResponse::Target::Extract }
|
|
312
263
|
|
|
313
264
|
class Page < ContextDev::Internal::Type::BaseModel
|
|
314
265
|
# @!attribute type
|
|
266
|
+
# Use `page` to watch one web page.
|
|
315
267
|
#
|
|
316
268
|
# @return [Symbol, :page]
|
|
317
269
|
required :type, const: :page
|
|
318
270
|
|
|
319
271
|
# @!attribute url
|
|
272
|
+
# Public HTTP(S) page URL to monitor.
|
|
320
273
|
#
|
|
321
274
|
# @return [String]
|
|
322
275
|
required :url, String
|
|
323
276
|
|
|
277
|
+
# @!attribute actions
|
|
278
|
+
# Optional browser actions executed in array order after the page loads, before
|
|
279
|
+
# content is captured, on every run. Requires a paid plan. Maximum: 5 actions.
|
|
280
|
+
# Changes create a new baseline.
|
|
281
|
+
#
|
|
282
|
+
# @return [Array<ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Wait, ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Perform, ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll>, nil]
|
|
283
|
+
optional :actions,
|
|
284
|
+
-> { ContextDev::Internal::Type::ArrayOf[union: ContextDev::Models::MonitorUpdateResponse::Target::Page::Action] },
|
|
285
|
+
nil?: true
|
|
286
|
+
|
|
324
287
|
# @!attribute exclude_selectors
|
|
325
|
-
#
|
|
326
|
-
# include_selectors; exclusion takes precedence when an element matches both. Omit
|
|
327
|
-
# or pass an empty array to apply no explicit exclusions. Changing these selectors
|
|
328
|
-
# creates a new baseline.
|
|
288
|
+
# Remove matching regions after inclusions. Changes create a new baseline.
|
|
329
289
|
#
|
|
330
290
|
# @return [Array<String>, nil]
|
|
331
291
|
optional :exclude_selectors, ContextDev::Internal::Type::ArrayOf[String]
|
|
332
292
|
|
|
333
293
|
# @!attribute include_selectors
|
|
334
|
-
# CSS
|
|
335
|
-
#
|
|
336
|
-
# main-content selection. Omit or pass an empty array to use automatic
|
|
337
|
-
# main-content extraction. If the filtered page has no usable text, the run fails
|
|
338
|
-
# without replacing the baseline. Changing these selectors creates a new baseline.
|
|
294
|
+
# Monitor these CSS-selected regions. Empty or omitted uses main content. Changes
|
|
295
|
+
# create a new baseline.
|
|
339
296
|
#
|
|
340
297
|
# @return [Array<String>, nil]
|
|
341
298
|
optional :include_selectors, ContextDev::Internal::Type::ArrayOf[String]
|
|
@@ -353,28 +310,195 @@ module ContextDev
|
|
|
353
310
|
# @return [Boolean, nil]
|
|
354
311
|
optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
|
|
355
312
|
|
|
356
|
-
# @!method initialize(url:, exclude_selectors: nil, include_selectors: nil, instructions: nil, normalize_whitespace: nil, type: :page)
|
|
313
|
+
# @!method initialize(url:, actions: nil, exclude_selectors: nil, include_selectors: nil, instructions: nil, normalize_whitespace: nil, type: :page)
|
|
357
314
|
# Some parameter documentations has been truncated, see
|
|
358
315
|
# {ContextDev::Models::MonitorUpdateResponse::Target::Page} for more details.
|
|
359
316
|
#
|
|
360
317
|
# Watch a single web page. Exact detection reports visible-text diffs; semantic
|
|
361
318
|
# detection judges confirmed stable diffs against `instructions`.
|
|
362
319
|
#
|
|
363
|
-
# @param url [String]
|
|
320
|
+
# @param url [String] Public HTTP(S) page URL to monitor.
|
|
364
321
|
#
|
|
365
|
-
# @param
|
|
322
|
+
# @param actions [Array<ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Wait, ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Perform, ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll>, nil] Optional browser actions executed in array order after the page loads, before co
|
|
366
323
|
#
|
|
367
|
-
# @param
|
|
324
|
+
# @param exclude_selectors [Array<String>] Remove matching regions after inclusions. Changes create a new baseline.
|
|
325
|
+
#
|
|
326
|
+
# @param include_selectors [Array<String>] Monitor these CSS-selected regions. Empty or omitted uses main content. Changes
|
|
368
327
|
#
|
|
369
328
|
# @param instructions [String] Plain-language goal describing which page changes matter. When provided without
|
|
370
329
|
#
|
|
371
330
|
# @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
|
|
372
331
|
#
|
|
373
|
-
# @param type [Symbol, :page]
|
|
332
|
+
# @param type [Symbol, :page] Use `page` to watch one web page.
|
|
333
|
+
|
|
334
|
+
# Browser action discriminated by `do`. Each variant exposes only its applicable
|
|
335
|
+
# fields.
|
|
336
|
+
module Action
|
|
337
|
+
extend ContextDev::Internal::Type::Union
|
|
338
|
+
|
|
339
|
+
discriminator :do
|
|
340
|
+
|
|
341
|
+
# Pause for a fixed number of milliseconds before continuing to the next action.
|
|
342
|
+
variant :wait, -> { ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Wait }
|
|
343
|
+
|
|
344
|
+
# Resolve and perform one natural-language browser action.
|
|
345
|
+
variant :perform, -> { ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Perform }
|
|
346
|
+
|
|
347
|
+
# Scroll the page or a selected scrollable container, waiting adaptively for content and dimensions to settle after each iteration.
|
|
348
|
+
variant :scroll, -> { ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll }
|
|
349
|
+
|
|
350
|
+
class Wait < ContextDev::Internal::Type::BaseModel
|
|
351
|
+
# @!attribute do_
|
|
352
|
+
# Use `wait` to pause for a fixed duration.
|
|
353
|
+
#
|
|
354
|
+
# @return [Symbol, :wait]
|
|
355
|
+
required :do_, const: :wait, api_name: :do
|
|
356
|
+
|
|
357
|
+
# @!attribute time_ms
|
|
358
|
+
# Time to pause in milliseconds before the next action.
|
|
359
|
+
#
|
|
360
|
+
# @return [Integer]
|
|
361
|
+
required :time_ms, Integer, api_name: :timeMs
|
|
362
|
+
|
|
363
|
+
# @!method initialize(time_ms:, do_: :wait)
|
|
364
|
+
# Pause for a fixed number of milliseconds before continuing to the next action.
|
|
365
|
+
#
|
|
366
|
+
# @param time_ms [Integer] Time to pause in milliseconds before the next action.
|
|
367
|
+
#
|
|
368
|
+
# @param do_ [Symbol, :wait] Use `wait` to pause for a fixed duration.
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
class Perform < ContextDev::Internal::Type::BaseModel
|
|
372
|
+
# @!attribute action
|
|
373
|
+
# One browser instruction, such as clicking a button or entering text.
|
|
374
|
+
#
|
|
375
|
+
# @return [String]
|
|
376
|
+
required :action, String
|
|
377
|
+
|
|
378
|
+
# @!attribute do_
|
|
379
|
+
# Use `perform` for a plain-language browser instruction.
|
|
380
|
+
#
|
|
381
|
+
# @return [Symbol, :perform]
|
|
382
|
+
required :do_, const: :perform, api_name: :do
|
|
383
|
+
|
|
384
|
+
# @!method initialize(action:, do_: :perform)
|
|
385
|
+
# Resolve and perform one natural-language browser action.
|
|
386
|
+
#
|
|
387
|
+
# @param action [String] One browser instruction, such as clicking a button or entering text.
|
|
388
|
+
#
|
|
389
|
+
# @param do_ [Symbol, :perform] Use `perform` for a plain-language browser instruction.
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
class Scroll < ContextDev::Internal::Type::BaseModel
|
|
393
|
+
# @!attribute do_
|
|
394
|
+
# Use `scroll` to move through the page or a container.
|
|
395
|
+
#
|
|
396
|
+
# @return [Symbol, :scroll]
|
|
397
|
+
required :do_, const: :scroll, api_name: :do
|
|
398
|
+
|
|
399
|
+
# @!attribute amount
|
|
400
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
401
|
+
# Defaults to viewport.
|
|
402
|
+
#
|
|
403
|
+
# @return [Integer, Symbol, ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll::Amount, nil]
|
|
404
|
+
optional :amount,
|
|
405
|
+
union: -> { ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll::Amount }
|
|
406
|
+
|
|
407
|
+
# @!attribute container
|
|
408
|
+
# CSS selector for the first matching scroll container. Defaults to the page.
|
|
409
|
+
#
|
|
410
|
+
# @return [String, nil]
|
|
411
|
+
optional :container, String
|
|
412
|
+
|
|
413
|
+
# @!attribute direction
|
|
414
|
+
# Direction to scroll. Defaults to down.
|
|
415
|
+
#
|
|
416
|
+
# @return [Symbol, ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll::Direction, nil]
|
|
417
|
+
optional :direction,
|
|
418
|
+
enum: -> { ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll::Direction }
|
|
419
|
+
|
|
420
|
+
# @!attribute max_scrolls
|
|
421
|
+
# Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
|
|
422
|
+
# changing. Defaults to 1.
|
|
423
|
+
#
|
|
424
|
+
# @return [Integer, nil]
|
|
425
|
+
optional :max_scrolls, Integer, api_name: :maxScrolls
|
|
426
|
+
|
|
427
|
+
# @!method initialize(amount: nil, container: nil, direction: nil, max_scrolls: nil, do_: :scroll)
|
|
428
|
+
# Some parameter documentations has been truncated, see
|
|
429
|
+
# {ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll} for
|
|
430
|
+
# more details.
|
|
431
|
+
#
|
|
432
|
+
# Scroll the page or a selected scrollable container, waiting adaptively for
|
|
433
|
+
# content and dimensions to settle after each iteration.
|
|
434
|
+
#
|
|
435
|
+
# @param amount [Integer, Symbol, ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll::Amount] Pixels per scroll, one visible viewport, or the current scroll boundary. Default
|
|
436
|
+
#
|
|
437
|
+
# @param container [String] CSS selector for the first matching scroll container. Defaults to the page.
|
|
438
|
+
#
|
|
439
|
+
# @param direction [Symbol, ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll::Direction] Direction to scroll. Defaults to down.
|
|
440
|
+
#
|
|
441
|
+
# @param max_scrolls [Integer] Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
|
|
442
|
+
#
|
|
443
|
+
# @param do_ [Symbol, :scroll] Use `scroll` to move through the page or a container.
|
|
444
|
+
|
|
445
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
446
|
+
# Defaults to viewport.
|
|
447
|
+
#
|
|
448
|
+
# @see ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll#amount
|
|
449
|
+
module Amount
|
|
450
|
+
extend ContextDev::Internal::Type::Union
|
|
451
|
+
|
|
452
|
+
variant Integer
|
|
453
|
+
|
|
454
|
+
variant const: -> { ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll::Amount::VIEWPORT }
|
|
455
|
+
|
|
456
|
+
variant const: -> { ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll::Amount::MAX }
|
|
457
|
+
|
|
458
|
+
# @!method self.variants
|
|
459
|
+
# @return [Array(Integer, Symbol)]
|
|
460
|
+
|
|
461
|
+
define_sorbet_constant!(:Variants) do
|
|
462
|
+
T.type_alias do
|
|
463
|
+
T.any(
|
|
464
|
+
Integer,
|
|
465
|
+
ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll::Amount::TaggedSymbol
|
|
466
|
+
)
|
|
467
|
+
end
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# @!group
|
|
471
|
+
|
|
472
|
+
VIEWPORT = :viewport
|
|
473
|
+
MAX = :max
|
|
474
|
+
|
|
475
|
+
# @!endgroup
|
|
476
|
+
end
|
|
477
|
+
|
|
478
|
+
# Direction to scroll. Defaults to down.
|
|
479
|
+
#
|
|
480
|
+
# @see ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll#direction
|
|
481
|
+
module Direction
|
|
482
|
+
extend ContextDev::Internal::Type::Enum
|
|
483
|
+
|
|
484
|
+
UP = :up
|
|
485
|
+
DOWN = :down
|
|
486
|
+
LEFT = :left
|
|
487
|
+
RIGHT = :right
|
|
488
|
+
|
|
489
|
+
# @!method self.values
|
|
490
|
+
# @return [Array<Symbol>]
|
|
491
|
+
end
|
|
492
|
+
end
|
|
493
|
+
|
|
494
|
+
# @!method self.variants
|
|
495
|
+
# @return [Array(ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Wait, ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Perform, ContextDev::Models::MonitorUpdateResponse::Target::Page::Action::Scroll)]
|
|
496
|
+
end
|
|
374
497
|
end
|
|
375
498
|
|
|
376
499
|
class Sitemap < ContextDev::Internal::Type::BaseModel
|
|
377
500
|
# @!attribute type
|
|
501
|
+
# Use `sitemap` to watch a site for added or removed URLs.
|
|
378
502
|
#
|
|
379
503
|
# @return [Symbol, :sitemap]
|
|
380
504
|
required :type, const: :sitemap
|
|
@@ -404,11 +528,7 @@ module ContextDev
|
|
|
404
528
|
optional :max_urls, Integer
|
|
405
529
|
|
|
406
530
|
# @!method initialize(url:, exclude: nil, include: nil, max_urls: nil, type: :sitemap)
|
|
407
|
-
# Watch a
|
|
408
|
-
# (lowercased host, no trailing slash/fragment) and scoped to the monitored site
|
|
409
|
-
# and its subdomains before comparison. On a detected difference the sitemap is
|
|
410
|
-
# re-fetched within the same run and only URLs both observations agree on are
|
|
411
|
-
# reported, suppressing transient crawl flaps.
|
|
531
|
+
# Watch a site’s URL inventory for confirmed additions and removals.
|
|
412
532
|
#
|
|
413
533
|
# @param url [String] Sitemap URL to monitor.
|
|
414
534
|
#
|
|
@@ -418,7 +538,7 @@ module ContextDev
|
|
|
418
538
|
#
|
|
419
539
|
# @param max_urls [Integer] Maximum number of sitemap URLs to track (capped at 10,000).
|
|
420
540
|
#
|
|
421
|
-
# @param type [Symbol, :sitemap]
|
|
541
|
+
# @param type [Symbol, :sitemap] Use `sitemap` to watch a site for added or removed URLs.
|
|
422
542
|
end
|
|
423
543
|
|
|
424
544
|
class Extract < ContextDev::Internal::Type::BaseModel
|
|
@@ -430,6 +550,7 @@ module ContextDev
|
|
|
430
550
|
required :instructions, String
|
|
431
551
|
|
|
432
552
|
# @!attribute type
|
|
553
|
+
# Use `extract` to watch structured data across selected pages.
|
|
433
554
|
#
|
|
434
555
|
# @return [Symbol, :extract]
|
|
435
556
|
required :type, const: :extract
|
|
@@ -441,6 +562,7 @@ module ContextDev
|
|
|
441
562
|
required :url, String
|
|
442
563
|
|
|
443
564
|
# @!attribute follow_subdomains
|
|
565
|
+
# Allow page discovery on subdomains of the target site.
|
|
444
566
|
#
|
|
445
567
|
# @return [Boolean, nil]
|
|
446
568
|
optional :follow_subdomains, ContextDev::Internal::Type::Boolean
|
|
@@ -458,14 +580,8 @@ module ContextDev
|
|
|
458
580
|
optional :max_pages, Integer
|
|
459
581
|
|
|
460
582
|
# @!attribute schema
|
|
461
|
-
# JSON Schema
|
|
462
|
-
#
|
|
463
|
-
# on which changes matter (alongside `instructions`), and it defines the shape of
|
|
464
|
-
# the baseline `data` snapshot on GET /monitors/{monitor_id} (refreshed at most
|
|
465
|
-
# about once a day). It is not a response format for changes: change events and
|
|
466
|
-
# webhook payloads always contain diffs, summaries, and evidence excerpts — never
|
|
467
|
-
# data in this schema's shape. If omitted, a default summary + key-points schema
|
|
468
|
-
# is used.
|
|
583
|
+
# JSON Schema for page selection and the baseline snapshot. Changes return diffs
|
|
584
|
+
# and evidence.
|
|
469
585
|
#
|
|
470
586
|
# @return [Hash{Symbol=>Object}, nil]
|
|
471
587
|
optional :schema, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]
|
|
@@ -474,35 +590,30 @@ module ContextDev
|
|
|
474
590
|
# Some parameter documentations has been truncated, see
|
|
475
591
|
# {ContextDev::Models::MonitorUpdateResponse::Target::Extract} for more details.
|
|
476
592
|
#
|
|
477
|
-
#
|
|
478
|
-
#
|
|
479
|
-
# track; each run re-checks exactly those pages, and confirmed content changes are
|
|
480
|
-
# judged for relevance against the monitor's `instructions` (and `schema`, when
|
|
481
|
-
# provided). The tracked page set is refreshed by a periodic re-discovery crawl.
|
|
593
|
+
# Track relevant pages selected by `schema` and `instructions`; refresh the page
|
|
594
|
+
# set periodically.
|
|
482
595
|
#
|
|
483
596
|
# @param instructions [String] Natural-language instructions guiding which pages and facts to track and which c
|
|
484
597
|
#
|
|
485
598
|
# @param url [String] Root URL to extract structured data from.
|
|
486
599
|
#
|
|
487
|
-
# @param follow_subdomains [Boolean]
|
|
600
|
+
# @param follow_subdomains [Boolean] Allow page discovery on subdomains of the target site.
|
|
488
601
|
#
|
|
489
602
|
# @param max_depth [Integer] Optional maximum link depth from the starting URL (0 = only the starting page).
|
|
490
603
|
#
|
|
491
604
|
# @param max_pages [Integer] Maximum number of pages to track.
|
|
492
605
|
#
|
|
493
|
-
# @param schema [Hash{Symbol=>Object}] JSON Schema
|
|
606
|
+
# @param schema [Hash{Symbol=>Object}] JSON Schema for page selection and the baseline snapshot. Changes return diffs a
|
|
494
607
|
#
|
|
495
|
-
# @param type [Symbol, :extract]
|
|
608
|
+
# @param type [Symbol, :extract] Use `extract` to watch structured data across selected pages.
|
|
496
609
|
end
|
|
497
610
|
|
|
498
611
|
# @!method self.variants
|
|
499
612
|
# @return [Array(ContextDev::Models::MonitorUpdateResponse::Target::Page, ContextDev::Models::MonitorUpdateResponse::Target::Sitemap, ContextDev::Models::MonitorUpdateResponse::Target::Extract)]
|
|
500
613
|
end
|
|
501
614
|
|
|
502
|
-
#
|
|
503
|
-
#
|
|
504
|
-
# on GET /monitors/{monitor_id}; null until the first baseline run completes (and
|
|
505
|
-
# after a target or change_detection update, which resets the baseline).
|
|
615
|
+
# Comparison baseline, included on Retrieve. Null until capture completes or after
|
|
616
|
+
# target changes.
|
|
506
617
|
#
|
|
507
618
|
# @see ContextDev::Models::MonitorUpdateResponse#baseline
|
|
508
619
|
module Baseline
|
|
@@ -576,10 +687,8 @@ module ContextDev
|
|
|
576
687
|
required :captured_at, Time
|
|
577
688
|
|
|
578
689
|
# @!attribute data
|
|
579
|
-
#
|
|
580
|
-
#
|
|
581
|
-
# re-discovers its page set (at most about once a day); `null` when no extraction
|
|
582
|
-
# has been captured yet.
|
|
690
|
+
# Latest structured snapshot matching the extraction schema, refreshed at most
|
|
691
|
+
# daily; `null` before capture.
|
|
583
692
|
#
|
|
584
693
|
# @return [Object]
|
|
585
694
|
required :data, ContextDev::Internal::Type::Unknown
|
|
@@ -600,7 +709,7 @@ module ContextDev
|
|
|
600
709
|
#
|
|
601
710
|
# @param captured_at [Time] When this baseline was last captured or replaced.
|
|
602
711
|
#
|
|
603
|
-
# @param data [Object]
|
|
712
|
+
# @param data [Object] Latest structured snapshot matching the extraction schema, refreshed at most dai
|
|
604
713
|
#
|
|
605
714
|
# @param urls_analyzed [Array<String>] The page URLs the monitor tracks and analyzes for changes.
|
|
606
715
|
end
|
|
@@ -609,6 +718,28 @@ module ContextDev
|
|
|
609
718
|
# @return [Array(ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsPageBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsSitemapBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsExtractBaseline)]
|
|
610
719
|
end
|
|
611
720
|
|
|
721
|
+
# @see ContextDev::Models::MonitorUpdateResponse#key_metadata
|
|
722
|
+
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
723
|
+
# @!attribute credits_consumed
|
|
724
|
+
# Credits charged for this request.
|
|
725
|
+
#
|
|
726
|
+
# @return [Integer]
|
|
727
|
+
required :credits_consumed, Integer
|
|
728
|
+
|
|
729
|
+
# @!attribute credits_remaining
|
|
730
|
+
# Credits remaining for your organization.
|
|
731
|
+
#
|
|
732
|
+
# @return [Integer]
|
|
733
|
+
required :credits_remaining, Integer
|
|
734
|
+
|
|
735
|
+
# @!method initialize(credits_consumed:, credits_remaining:)
|
|
736
|
+
# Credits this request used and your remaining balance.
|
|
737
|
+
#
|
|
738
|
+
# @param credits_consumed [Integer] Credits charged for this request.
|
|
739
|
+
#
|
|
740
|
+
# @param credits_remaining [Integer] Credits remaining for your organization.
|
|
741
|
+
end
|
|
742
|
+
|
|
612
743
|
# @see ContextDev::Models::MonitorUpdateResponse#last_error
|
|
613
744
|
class LastError < ContextDev::Internal::Type::BaseModel
|
|
614
745
|
# @!attribute code
|
|
@@ -628,20 +759,81 @@ module ContextDev
|
|
|
628
759
|
# @param message [String]
|
|
629
760
|
end
|
|
630
761
|
|
|
762
|
+
# @see ContextDev::Models::MonitorUpdateResponse#schedule
|
|
763
|
+
class Schedule < ContextDev::Internal::Type::BaseModel
|
|
764
|
+
# @!attribute frequency
|
|
765
|
+
# Number of units between runs. The resulting interval (frequency × unit) must be
|
|
766
|
+
# at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes;
|
|
767
|
+
# maximum 365 when unit is days).
|
|
768
|
+
#
|
|
769
|
+
# @return [Integer]
|
|
770
|
+
required :frequency, Integer
|
|
771
|
+
|
|
772
|
+
# @!attribute type
|
|
773
|
+
# Use `interval` to run on a repeating schedule.
|
|
774
|
+
#
|
|
775
|
+
# @return [Symbol, ContextDev::Models::MonitorUpdateResponse::Schedule::Type]
|
|
776
|
+
required :type, enum: -> { ContextDev::Models::MonitorUpdateResponse::Schedule::Type }
|
|
777
|
+
|
|
778
|
+
# @!attribute unit
|
|
779
|
+
# Time unit used with `frequency` to set the run interval.
|
|
780
|
+
#
|
|
781
|
+
# @return [Symbol, ContextDev::Models::MonitorUpdateResponse::Schedule::Unit]
|
|
782
|
+
required :unit, enum: -> { ContextDev::Models::MonitorUpdateResponse::Schedule::Unit }
|
|
783
|
+
|
|
784
|
+
# @!method initialize(frequency:, type:, unit:)
|
|
785
|
+
# Some parameter documentations has been truncated, see
|
|
786
|
+
# {ContextDev::Models::MonitorUpdateResponse::Schedule} for more details.
|
|
787
|
+
#
|
|
788
|
+
# Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
|
|
789
|
+
# every 6 hours or every 2 days. The total interval (frequency × unit) must be
|
|
790
|
+
# between 10 minutes and 1 year.
|
|
791
|
+
#
|
|
792
|
+
# @param frequency [Integer] Number of units between runs. The resulting interval (frequency × unit) must be
|
|
793
|
+
#
|
|
794
|
+
# @param type [Symbol, ContextDev::Models::MonitorUpdateResponse::Schedule::Type] Use `interval` to run on a repeating schedule.
|
|
795
|
+
#
|
|
796
|
+
# @param unit [Symbol, ContextDev::Models::MonitorUpdateResponse::Schedule::Unit] Time unit used with `frequency` to set the run interval.
|
|
797
|
+
|
|
798
|
+
# Use `interval` to run on a repeating schedule.
|
|
799
|
+
#
|
|
800
|
+
# @see ContextDev::Models::MonitorUpdateResponse::Schedule#type
|
|
801
|
+
module Type
|
|
802
|
+
extend ContextDev::Internal::Type::Enum
|
|
803
|
+
|
|
804
|
+
INTERVAL = :interval
|
|
805
|
+
|
|
806
|
+
# @!method self.values
|
|
807
|
+
# @return [Array<Symbol>]
|
|
808
|
+
end
|
|
809
|
+
|
|
810
|
+
# Time unit used with `frequency` to set the run interval.
|
|
811
|
+
#
|
|
812
|
+
# @see ContextDev::Models::MonitorUpdateResponse::Schedule#unit
|
|
813
|
+
module Unit
|
|
814
|
+
extend ContextDev::Internal::Type::Enum
|
|
815
|
+
|
|
816
|
+
MINUTES = :minutes
|
|
817
|
+
HOURS = :hours
|
|
818
|
+
DAYS = :days
|
|
819
|
+
|
|
820
|
+
# @!method self.values
|
|
821
|
+
# @return [Array<Symbol>]
|
|
822
|
+
end
|
|
823
|
+
end
|
|
824
|
+
|
|
631
825
|
# @see ContextDev::Models::MonitorUpdateResponse#webhook
|
|
632
826
|
class Webhook < ContextDev::Internal::Type::BaseModel
|
|
633
827
|
# @!attribute url
|
|
634
|
-
#
|
|
635
|
-
#
|
|
828
|
+
# Public HTTP(S) URL that receives events. Slack and GovSlack URLs get formatted
|
|
829
|
+
# messages.
|
|
636
830
|
#
|
|
637
831
|
# @return [String]
|
|
638
832
|
required :url, String
|
|
639
833
|
|
|
640
834
|
# @!attribute events
|
|
641
|
-
# Events
|
|
642
|
-
#
|
|
643
|
-
# that detected no change — and embeds the change when one was detected. Defaults
|
|
644
|
-
# to `["change.detected"]` when omitted.
|
|
835
|
+
# Events to deliver. Defaults to `change.detected`; `run.completed` also includes
|
|
836
|
+
# unchanged runs.
|
|
645
837
|
#
|
|
646
838
|
# @return [Array<Symbol, ContextDev::Models::MonitorUpdateResponse::Webhook::Event>, nil]
|
|
647
839
|
optional :events,
|
|
@@ -655,12 +847,8 @@ module ContextDev
|
|
|
655
847
|
|
|
656
848
|
response_only do
|
|
657
849
|
# @!attribute secret
|
|
658
|
-
#
|
|
659
|
-
#
|
|
660
|
-
# `X-Context-Signature: t=<unix>,v1=<hmac>` header, where the HMAC is SHA-256 over
|
|
661
|
-
# `"{t}.{rawRequestBody}"` keyed by this secret. Recompute it with a constant-time
|
|
662
|
-
# compare and reject stale timestamps to prevent replay. Generated by the API;
|
|
663
|
-
# cannot be set by clients.
|
|
850
|
+
# API-generated signing secret. Visible only with full access or `monitors:write`
|
|
851
|
+
# permission.
|
|
664
852
|
#
|
|
665
853
|
# @return [String, nil]
|
|
666
854
|
optional :secret, String
|
|
@@ -670,13 +858,15 @@ module ContextDev
|
|
|
670
858
|
# Some parameter documentations has been truncated, see
|
|
671
859
|
# {ContextDev::Models::MonitorUpdateResponse::Webhook} for more details.
|
|
672
860
|
#
|
|
673
|
-
#
|
|
861
|
+
# Webhook destination and delivery settings. Null means no webhook is configured.
|
|
862
|
+
#
|
|
863
|
+
# @param url [String] Public HTTP(S) URL that receives events. Slack and GovSlack URLs get formatted m
|
|
674
864
|
#
|
|
675
|
-
# @param events [Array<Symbol, ContextDev::Models::MonitorUpdateResponse::Webhook::Event>] Events
|
|
865
|
+
# @param events [Array<Symbol, ContextDev::Models::MonitorUpdateResponse::Webhook::Event>] Events to deliver. Defaults to `change.detected`; `run.completed` also includes
|
|
676
866
|
#
|
|
677
867
|
# @param retry_ [ContextDev::Models::RetryConfig] Webhook retry settings. Use {} for the default schedule.
|
|
678
868
|
#
|
|
679
|
-
# @param secret [String]
|
|
869
|
+
# @param secret [String] API-generated signing secret. Visible only with full access or `monitors:write`
|
|
680
870
|
|
|
681
871
|
module Event
|
|
682
872
|
extend ContextDev::Internal::Type::Enum
|