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