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