context.dev 1.35.0 → 2.0.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 +35 -0
- data/README.md +24 -17
- data/lib/context_dev/client.rb +7 -0
- data/lib/context_dev/models/brand_retrieve_params.rb +1036 -174
- data/lib/context_dev/models/monitor_create_params.rb +361 -0
- data/lib/context_dev/models/monitor_create_response.rb +484 -0
- data/lib/context_dev/models/monitor_delete_params.rb +20 -0
- data/lib/context_dev/models/monitor_delete_response.rb +22 -0
- data/lib/context_dev/models/monitor_list_account_changes_params.rb +93 -0
- data/lib/context_dev/models/monitor_list_account_changes_response.rb +199 -0
- data/lib/context_dev/models/monitor_list_account_runs_params.rb +55 -0
- data/lib/context_dev/models/monitor_list_account_runs_response.rb +227 -0
- data/lib/context_dev/models/monitor_list_changes_params.rb +57 -0
- data/lib/context_dev/models/monitor_list_changes_response.rb +198 -0
- data/lib/context_dev/models/monitor_list_params.rb +161 -0
- data/lib/context_dev/models/monitor_list_response.rb +507 -0
- data/lib/context_dev/models/monitor_list_runs_params.rb +62 -0
- data/lib/context_dev/models/monitor_list_runs_response.rb +227 -0
- data/lib/context_dev/models/monitor_retrieve_change_params.rb +20 -0
- data/lib/context_dev/models/monitor_retrieve_change_response.rb +271 -0
- data/lib/context_dev/models/monitor_retrieve_params.rb +20 -0
- data/lib/context_dev/models/monitor_retrieve_response.rb +484 -0
- data/lib/context_dev/models/monitor_run_params.rb +20 -0
- data/lib/context_dev/models/monitor_run_response.rb +35 -0
- data/lib/context_dev/models/monitor_update_params.rb +368 -0
- data/lib/context_dev/models/monitor_update_response.rb +484 -0
- data/lib/context_dev/models/utility_prefetch_params.rb +70 -6
- data/lib/context_dev/models/utility_prefetch_response.rb +23 -1
- data/lib/context_dev/models/web_extract_response.rb +17 -1
- data/lib/context_dev/models/web_extract_styleguide_params.rb +22 -1
- data/lib/context_dev/models/web_screenshot_params.rb +245 -1
- data/lib/context_dev/models/web_search_params.rb +270 -3
- data/lib/context_dev/models/web_web_crawl_md_params.rb +236 -1
- data/lib/context_dev/models/web_web_scrape_html_params.rb +234 -1
- data/lib/context_dev/models/web_web_scrape_html_response.rb +10 -2
- data/lib/context_dev/models/web_web_scrape_images_params.rb +12 -1
- data/lib/context_dev/models/web_web_scrape_md_params.rb +234 -1
- data/lib/context_dev/models.rb +20 -12
- data/lib/context_dev/resources/ai.rb +0 -33
- data/lib/context_dev/resources/brand.rb +7 -204
- data/lib/context_dev/resources/monitors.rb +352 -0
- data/lib/context_dev/resources/utility.rb +9 -35
- data/lib/context_dev/resources/web.rb +36 -8
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +23 -14
- data/rbi/context_dev/client.rbi +6 -0
- data/rbi/context_dev/models/brand_retrieve_params.rbi +3792 -679
- data/rbi/context_dev/models/monitor_create_params.rbi +640 -0
- data/rbi/context_dev/models/monitor_create_response.rbi +820 -0
- data/rbi/context_dev/models/monitor_delete_params.rbi +35 -0
- data/rbi/context_dev/models/monitor_delete_response.rbi +29 -0
- data/rbi/context_dev/models/monitor_list_account_changes_params.rbi +211 -0
- data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +376 -0
- data/rbi/context_dev/models/monitor_list_account_runs_params.rbi +125 -0
- data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +464 -0
- data/rbi/context_dev/models/monitor_list_changes_params.rbi +91 -0
- data/rbi/context_dev/models/monitor_list_changes_response.rbi +372 -0
- data/rbi/context_dev/models/monitor_list_params.rbi +332 -0
- data/rbi/context_dev/models/monitor_list_response.rbi +885 -0
- data/rbi/context_dev/models/monitor_list_runs_params.rbi +125 -0
- data/rbi/context_dev/models/monitor_list_runs_response.rbi +455 -0
- data/rbi/context_dev/models/monitor_retrieve_change_params.rbi +38 -0
- data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +478 -0
- data/rbi/context_dev/models/monitor_retrieve_params.rbi +38 -0
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +828 -0
- data/rbi/context_dev/models/monitor_run_params.rbi +35 -0
- data/rbi/context_dev/models/monitor_run_response.rbi +48 -0
- data/rbi/context_dev/models/monitor_update_params.rbi +680 -0
- data/rbi/context_dev/models/monitor_update_response.rbi +820 -0
- data/rbi/context_dev/models/utility_prefetch_params.rbi +129 -7
- data/rbi/context_dev/models/utility_prefetch_response.rbi +55 -3
- data/rbi/context_dev/models/web_extract_response.rbi +10 -0
- data/rbi/context_dev/models/web_extract_styleguide_params.rbi +59 -0
- data/rbi/context_dev/models/web_screenshot_params.rbi +295 -0
- data/rbi/context_dev/models/web_search_params.rbi +288 -2
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +260 -0
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +465 -0
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +29 -3
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +17 -0
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +259 -0
- data/rbi/context_dev/models.rbi +23 -15
- data/rbi/context_dev/resources/ai.rbi +0 -28
- data/rbi/context_dev/resources/brand.rbi +13 -228
- data/rbi/context_dev/resources/monitors.rbi +286 -0
- data/rbi/context_dev/resources/utility.rbi +14 -29
- data/rbi/context_dev/resources/web.rbi +56 -1
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +1560 -281
- data/sig/context_dev/models/monitor_create_params.rbs +311 -0
- data/sig/context_dev/models/monitor_create_response.rbs +369 -0
- data/sig/context_dev/models/monitor_delete_params.rbs +23 -0
- data/sig/context_dev/models/monitor_delete_response.rbs +15 -0
- data/sig/context_dev/models/monitor_list_account_changes_params.rbs +104 -0
- data/sig/context_dev/models/monitor_list_account_changes_response.rbs +176 -0
- data/sig/context_dev/models/monitor_list_account_runs_params.rbs +58 -0
- data/sig/context_dev/models/monitor_list_account_runs_response.rbs +184 -0
- data/sig/context_dev/models/monitor_list_changes_params.rbs +61 -0
- data/sig/context_dev/models/monitor_list_changes_response.rbs +176 -0
- data/sig/context_dev/models/monitor_list_params.rbs +160 -0
- data/sig/context_dev/models/monitor_list_response.rbs +396 -0
- data/sig/context_dev/models/monitor_list_runs_params.rbs +63 -0
- data/sig/context_dev/models/monitor_list_runs_response.rbs +184 -0
- data/sig/context_dev/models/monitor_retrieve_change_params.rbs +23 -0
- data/sig/context_dev/models/monitor_retrieve_change_response.rbs +228 -0
- data/sig/context_dev/models/monitor_retrieve_params.rbs +23 -0
- data/sig/context_dev/models/monitor_retrieve_response.rbs +369 -0
- data/sig/context_dev/models/monitor_run_params.rbs +23 -0
- data/sig/context_dev/models/monitor_run_response.rbs +18 -0
- data/sig/context_dev/models/monitor_update_params.rbs +331 -0
- data/sig/context_dev/models/monitor_update_response.rbs +369 -0
- data/sig/context_dev/models/utility_prefetch_params.rbs +52 -4
- data/sig/context_dev/models/utility_prefetch_response.rbs +22 -3
- data/sig/context_dev/models/web_extract_response.rbs +5 -0
- data/sig/context_dev/models/web_extract_styleguide_params.rbs +20 -0
- data/sig/context_dev/models/web_screenshot_params.rbs +446 -0
- data/sig/context_dev/models/web_search_params.rbs +503 -0
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +433 -0
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +433 -0
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +8 -0
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +7 -0
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +433 -0
- data/sig/context_dev/models.rbs +20 -12
- data/sig/context_dev/resources/ai.rbs +0 -8
- data/sig/context_dev/resources/brand.rbs +1 -56
- data/sig/context_dev/resources/monitors.rbs +101 -0
- data/sig/context_dev/resources/utility.rbs +2 -7
- data/sig/context_dev/resources/web.rbs +12 -0
- metadata +71 -44
- data/lib/context_dev/models/ai_ai_query_params.rb +0 -235
- data/lib/context_dev/models/ai_ai_query_response.rb +0 -133
- data/lib/context_dev/models/brand_identify_from_transaction_params.rb +0 -474
- data/lib/context_dev/models/brand_identify_from_transaction_response.rb +0 -1074
- data/lib/context_dev/models/brand_retrieve_by_email_params.rb +0 -195
- data/lib/context_dev/models/brand_retrieve_by_email_response.rb +0 -1071
- data/lib/context_dev/models/brand_retrieve_by_isin_params.rb +0 -195
- data/lib/context_dev/models/brand_retrieve_by_isin_response.rb +0 -1070
- data/lib/context_dev/models/brand_retrieve_by_name_params.rb +0 -452
- data/lib/context_dev/models/brand_retrieve_by_name_response.rb +0 -1070
- data/lib/context_dev/models/brand_retrieve_by_ticker_params.rb +0 -283
- data/lib/context_dev/models/brand_retrieve_by_ticker_response.rb +0 -1072
- data/lib/context_dev/models/utility_prefetch_by_email_params.rb +0 -37
- data/lib/context_dev/models/utility_prefetch_by_email_response.rb +0 -68
- data/rbi/context_dev/models/ai_ai_query_params.rbi +0 -504
- data/rbi/context_dev/models/ai_ai_query_response.rbi +0 -267
- data/rbi/context_dev/models/brand_identify_from_transaction_params.rbi +0 -2020
- data/rbi/context_dev/models/brand_identify_from_transaction_response.rbi +0 -3515
- data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +0 -743
- data/rbi/context_dev/models/brand_retrieve_by_email_response.rbi +0 -3511
- data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +0 -743
- data/rbi/context_dev/models/brand_retrieve_by_isin_response.rbi +0 -3510
- data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +0 -1982
- data/rbi/context_dev/models/brand_retrieve_by_name_response.rbi +0 -3510
- data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +0 -1153
- data/rbi/context_dev/models/brand_retrieve_by_ticker_response.rbi +0 -3512
- data/rbi/context_dev/models/utility_prefetch_by_email_params.rbi +0 -65
- data/rbi/context_dev/models/utility_prefetch_by_email_response.rbi +0 -132
- data/sig/context_dev/models/ai_ai_query_params.rbs +0 -218
- data/sig/context_dev/models/ai_ai_query_response.rbs +0 -121
- data/sig/context_dev/models/brand_identify_from_transaction_params.rbs +0 -822
- data/sig/context_dev/models/brand_identify_from_transaction_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +0 -305
- data/sig/context_dev/models/brand_retrieve_by_email_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +0 -305
- data/sig/context_dev/models/brand_retrieve_by_isin_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +0 -801
- data/sig/context_dev/models/brand_retrieve_by_name_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +0 -467
- data/sig/context_dev/models/brand_retrieve_by_ticker_response.rbs +0 -1441
- data/sig/context_dev/models/utility_prefetch_by_email_params.rbs +0 -30
- data/sig/context_dev/models/utility_prefetch_by_email_response.rbs +0 -64
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Resources
|
|
5
|
+
# Monitor pages, sitemaps, and extracted website data for exact or semantic
|
|
6
|
+
# changes. The change.detected webhook payload is documented by the
|
|
7
|
+
# MonitorsChangeDetectedWebhookPayload schema.
|
|
8
|
+
class Monitors
|
|
9
|
+
# Some parameter documentations has been truncated, see
|
|
10
|
+
# {ContextDev::Models::MonitorCreateParams} for more details.
|
|
11
|
+
#
|
|
12
|
+
# Creates a monitor. The request body is a union of the supported target/change
|
|
13
|
+
# detection combinations. The monitor runs immediately after creation to create
|
|
14
|
+
# its initial baseline.
|
|
15
|
+
#
|
|
16
|
+
# @overload create(change_detection:, name:, schedule:, target:, mode: nil, tags: nil, webhook: nil, request_options: {})
|
|
17
|
+
#
|
|
18
|
+
# @param change_detection [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic] Discriminated union describing how changes are detected.
|
|
19
|
+
#
|
|
20
|
+
# @param name [String]
|
|
21
|
+
#
|
|
22
|
+
# @param schedule [ContextDev::Models::MonitorCreateParams::Schedule] Run the monitor on a fixed interval defined by a frequency and a unit, e.g. ever
|
|
23
|
+
#
|
|
24
|
+
# @param target [ContextDev::Models::MonitorCreateParams::Target::Page, ContextDev::Models::MonitorCreateParams::Target::Sitemap, ContextDev::Models::MonitorCreateParams::Target::Extract] Discriminated union describing what the monitor watches.
|
|
25
|
+
#
|
|
26
|
+
# @param mode [Symbol, ContextDev::Models::MonitorCreateParams::Mode] Top-level monitor category. Always `web` today; the concrete behavior is describ
|
|
27
|
+
#
|
|
28
|
+
# @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
|
|
29
|
+
#
|
|
30
|
+
# @param webhook [ContextDev::Models::MonitorCreateParams::Webhook, nil]
|
|
31
|
+
#
|
|
32
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
33
|
+
#
|
|
34
|
+
# @return [ContextDev::Models::MonitorCreateResponse]
|
|
35
|
+
#
|
|
36
|
+
# @see ContextDev::Models::MonitorCreateParams
|
|
37
|
+
def create(params)
|
|
38
|
+
parsed, options = ContextDev::MonitorCreateParams.dump_request(params)
|
|
39
|
+
@client.request(
|
|
40
|
+
method: :post,
|
|
41
|
+
path: "monitors",
|
|
42
|
+
body: parsed,
|
|
43
|
+
model: ContextDev::Models::MonitorCreateResponse,
|
|
44
|
+
options: options
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Get a monitor
|
|
49
|
+
#
|
|
50
|
+
# @overload retrieve(monitor_id, request_options: {})
|
|
51
|
+
#
|
|
52
|
+
# @param monitor_id [String]
|
|
53
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
54
|
+
#
|
|
55
|
+
# @return [ContextDev::Models::MonitorRetrieveResponse]
|
|
56
|
+
#
|
|
57
|
+
# @see ContextDev::Models::MonitorRetrieveParams
|
|
58
|
+
def retrieve(monitor_id, params = {})
|
|
59
|
+
@client.request(
|
|
60
|
+
method: :get,
|
|
61
|
+
path: ["monitors/%1$s", monitor_id],
|
|
62
|
+
model: ContextDev::Models::MonitorRetrieveResponse,
|
|
63
|
+
options: params[:request_options]
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Some parameter documentations has been truncated, see
|
|
68
|
+
# {ContextDev::Models::MonitorUpdateParams} for more details.
|
|
69
|
+
#
|
|
70
|
+
# Updates a monitor. If `target` or `change_detection` changes, the monitor
|
|
71
|
+
# creates a new baseline. Unsupported target/change detection combinations are
|
|
72
|
+
# rejected.
|
|
73
|
+
#
|
|
74
|
+
# @overload update(monitor_id, change_detection: nil, name: nil, schedule: nil, status: nil, tags: nil, target: nil, webhook: nil, request_options: {})
|
|
75
|
+
#
|
|
76
|
+
# @param monitor_id [String]
|
|
77
|
+
#
|
|
78
|
+
# @param change_detection [ContextDev::Models::MonitorUpdateParams::ChangeDetection::Exact, ContextDev::Models::MonitorUpdateParams::ChangeDetection::Semantic] Discriminated union describing how changes are detected.
|
|
79
|
+
#
|
|
80
|
+
# @param name [String]
|
|
81
|
+
#
|
|
82
|
+
# @param schedule [ContextDev::Models::MonitorUpdateParams::Schedule] Run the monitor on a fixed interval defined by a frequency and a unit, e.g. ever
|
|
83
|
+
#
|
|
84
|
+
# @param status [Symbol, ContextDev::Models::MonitorUpdateParams::Status]
|
|
85
|
+
#
|
|
86
|
+
# @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
|
|
87
|
+
#
|
|
88
|
+
# @param target [ContextDev::Models::MonitorUpdateParams::Target::Page, ContextDev::Models::MonitorUpdateParams::Target::Sitemap, ContextDev::Models::MonitorUpdateParams::Target::Extract] Discriminated union describing what the monitor watches.
|
|
89
|
+
#
|
|
90
|
+
# @param webhook [ContextDev::Models::MonitorUpdateParams::Webhook, nil] Set to null to remove the webhook.
|
|
91
|
+
#
|
|
92
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
93
|
+
#
|
|
94
|
+
# @return [ContextDev::Models::MonitorUpdateResponse]
|
|
95
|
+
#
|
|
96
|
+
# @see ContextDev::Models::MonitorUpdateParams
|
|
97
|
+
def update(monitor_id, params = {})
|
|
98
|
+
parsed, options = ContextDev::MonitorUpdateParams.dump_request(params)
|
|
99
|
+
@client.request(
|
|
100
|
+
method: :patch,
|
|
101
|
+
path: ["monitors/%1$s", monitor_id],
|
|
102
|
+
body: parsed,
|
|
103
|
+
model: ContextDev::Models::MonitorUpdateResponse,
|
|
104
|
+
options: options
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Some parameter documentations has been truncated, see
|
|
109
|
+
# {ContextDev::Models::MonitorListParams} for more details.
|
|
110
|
+
#
|
|
111
|
+
# Lists monitors for the authenticated organization. Supports free-text search
|
|
112
|
+
# (`q` over `search_by` fields, `prefix` or `exact` via `search_type`) plus
|
|
113
|
+
# status/type/tag filters. Results are paginated via the opaque `cursor`.
|
|
114
|
+
#
|
|
115
|
+
# @overload list(change_detection_type: nil, cursor: nil, limit: nil, q: nil, search_by: nil, search_type: nil, status: nil, tag: nil, tags: nil, target_type: nil, request_options: {})
|
|
116
|
+
#
|
|
117
|
+
# @param change_detection_type [Symbol, ContextDev::Models::MonitorListParams::ChangeDetectionType]
|
|
118
|
+
#
|
|
119
|
+
# @param cursor [String]
|
|
120
|
+
#
|
|
121
|
+
# @param limit [Integer]
|
|
122
|
+
#
|
|
123
|
+
# @param q [String] Free-text search term, matched against the fields named in `search_by`.
|
|
124
|
+
#
|
|
125
|
+
# @param search_by [Array<Symbol, ContextDev::Models::MonitorListParams::SearchBy>] Comma-separated fields to search with `q`. Defaults to all of them. Note `query`
|
|
126
|
+
#
|
|
127
|
+
# @param search_type [Symbol, ContextDev::Models::MonitorListParams::SearchType] `prefix` for as-you-type prefix matching (default), `exact` for full-token match
|
|
128
|
+
#
|
|
129
|
+
# @param status [Symbol, ContextDev::Models::MonitorListParams::Status] Monitor lifecycle status. `failed` means the most recent run failed (see the mon
|
|
130
|
+
#
|
|
131
|
+
# @param tag [String] Filter to items that have this tag.
|
|
132
|
+
#
|
|
133
|
+
# @param tags [Array<String>] Comma-separated list of tags to filter by (matches monitors having any of them).
|
|
134
|
+
#
|
|
135
|
+
# @param target_type [Symbol, ContextDev::Models::MonitorListParams::TargetType]
|
|
136
|
+
#
|
|
137
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
138
|
+
#
|
|
139
|
+
# @return [ContextDev::Models::MonitorListResponse]
|
|
140
|
+
#
|
|
141
|
+
# @see ContextDev::Models::MonitorListParams
|
|
142
|
+
def list(params = {})
|
|
143
|
+
parsed, options = ContextDev::MonitorListParams.dump_request(params)
|
|
144
|
+
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
145
|
+
@client.request(
|
|
146
|
+
method: :get,
|
|
147
|
+
path: "monitors",
|
|
148
|
+
query: query,
|
|
149
|
+
model: ContextDev::Models::MonitorListResponse,
|
|
150
|
+
options: options
|
|
151
|
+
)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Delete a monitor
|
|
155
|
+
#
|
|
156
|
+
# @overload delete(monitor_id, request_options: {})
|
|
157
|
+
#
|
|
158
|
+
# @param monitor_id [String]
|
|
159
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
160
|
+
#
|
|
161
|
+
# @return [ContextDev::Models::MonitorDeleteResponse]
|
|
162
|
+
#
|
|
163
|
+
# @see ContextDev::Models::MonitorDeleteParams
|
|
164
|
+
def delete(monitor_id, params = {})
|
|
165
|
+
@client.request(
|
|
166
|
+
method: :delete,
|
|
167
|
+
path: ["monitors/%1$s", monitor_id],
|
|
168
|
+
model: ContextDev::Models::MonitorDeleteResponse,
|
|
169
|
+
options: params[:request_options]
|
|
170
|
+
)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns an account-wide feed of detected changes across monitors.
|
|
174
|
+
#
|
|
175
|
+
# @overload list_account_changes(change_detection_type: nil, cursor: nil, limit: nil, monitor_id: nil, since: nil, tag: nil, target_type: nil, until_: nil, request_options: {})
|
|
176
|
+
#
|
|
177
|
+
# @param change_detection_type [Symbol, ContextDev::Models::MonitorListAccountChangesParams::ChangeDetectionType]
|
|
178
|
+
#
|
|
179
|
+
# @param cursor [String]
|
|
180
|
+
#
|
|
181
|
+
# @param limit [Integer]
|
|
182
|
+
#
|
|
183
|
+
# @param monitor_id [String]
|
|
184
|
+
#
|
|
185
|
+
# @param since [Time]
|
|
186
|
+
#
|
|
187
|
+
# @param tag [String] Filter to items that have this tag.
|
|
188
|
+
#
|
|
189
|
+
# @param target_type [Symbol, ContextDev::Models::MonitorListAccountChangesParams::TargetType]
|
|
190
|
+
#
|
|
191
|
+
# @param until_ [Time]
|
|
192
|
+
#
|
|
193
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
194
|
+
#
|
|
195
|
+
# @return [ContextDev::Models::MonitorListAccountChangesResponse]
|
|
196
|
+
#
|
|
197
|
+
# @see ContextDev::Models::MonitorListAccountChangesParams
|
|
198
|
+
def list_account_changes(params = {})
|
|
199
|
+
parsed, options = ContextDev::MonitorListAccountChangesParams.dump_request(params)
|
|
200
|
+
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
201
|
+
@client.request(
|
|
202
|
+
method: :get,
|
|
203
|
+
path: "monitors/changes",
|
|
204
|
+
query: query.transform_keys(until_: "until"),
|
|
205
|
+
model: ContextDev::Models::MonitorListAccountChangesResponse,
|
|
206
|
+
options: options
|
|
207
|
+
)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Some parameter documentations has been truncated, see
|
|
211
|
+
# {ContextDev::Models::MonitorListAccountRunsParams} for more details.
|
|
212
|
+
#
|
|
213
|
+
# Returns an account-wide feed of monitor runs across all monitors.
|
|
214
|
+
#
|
|
215
|
+
# @overload list_account_runs(cursor: nil, limit: nil, status: nil, request_options: {})
|
|
216
|
+
#
|
|
217
|
+
# @param cursor [String]
|
|
218
|
+
#
|
|
219
|
+
# @param limit [Integer]
|
|
220
|
+
#
|
|
221
|
+
# @param status [Symbol, ContextDev::Models::MonitorListAccountRunsParams::Status] Lifecycle status of a run. `skipped` runs never executed — see `skip_reason` (in
|
|
222
|
+
#
|
|
223
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
224
|
+
#
|
|
225
|
+
# @return [ContextDev::Models::MonitorListAccountRunsResponse]
|
|
226
|
+
#
|
|
227
|
+
# @see ContextDev::Models::MonitorListAccountRunsParams
|
|
228
|
+
def list_account_runs(params = {})
|
|
229
|
+
parsed, options = ContextDev::MonitorListAccountRunsParams.dump_request(params)
|
|
230
|
+
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
231
|
+
@client.request(
|
|
232
|
+
method: :get,
|
|
233
|
+
path: "monitors/runs",
|
|
234
|
+
query: query,
|
|
235
|
+
model: ContextDev::Models::MonitorListAccountRunsResponse,
|
|
236
|
+
options: options
|
|
237
|
+
)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# List changes for a monitor
|
|
241
|
+
#
|
|
242
|
+
# @overload list_changes(monitor_id, cursor: nil, limit: nil, since: nil, tag: nil, until_: nil, request_options: {})
|
|
243
|
+
#
|
|
244
|
+
# @param monitor_id [String]
|
|
245
|
+
#
|
|
246
|
+
# @param cursor [String]
|
|
247
|
+
#
|
|
248
|
+
# @param limit [Integer]
|
|
249
|
+
#
|
|
250
|
+
# @param since [Time]
|
|
251
|
+
#
|
|
252
|
+
# @param tag [String] Filter to items that have this tag.
|
|
253
|
+
#
|
|
254
|
+
# @param until_ [Time]
|
|
255
|
+
#
|
|
256
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
257
|
+
#
|
|
258
|
+
# @return [ContextDev::Models::MonitorListChangesResponse]
|
|
259
|
+
#
|
|
260
|
+
# @see ContextDev::Models::MonitorListChangesParams
|
|
261
|
+
def list_changes(monitor_id, params = {})
|
|
262
|
+
parsed, options = ContextDev::MonitorListChangesParams.dump_request(params)
|
|
263
|
+
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
264
|
+
@client.request(
|
|
265
|
+
method: :get,
|
|
266
|
+
path: ["monitors/%1$s/changes", monitor_id],
|
|
267
|
+
query: query.transform_keys(until_: "until"),
|
|
268
|
+
model: ContextDev::Models::MonitorListChangesResponse,
|
|
269
|
+
options: options
|
|
270
|
+
)
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Some parameter documentations has been truncated, see
|
|
274
|
+
# {ContextDev::Models::MonitorListRunsParams} for more details.
|
|
275
|
+
#
|
|
276
|
+
# List monitor runs
|
|
277
|
+
#
|
|
278
|
+
# @overload list_runs(monitor_id, cursor: nil, limit: nil, status: nil, request_options: {})
|
|
279
|
+
#
|
|
280
|
+
# @param monitor_id [String]
|
|
281
|
+
#
|
|
282
|
+
# @param cursor [String]
|
|
283
|
+
#
|
|
284
|
+
# @param limit [Integer]
|
|
285
|
+
#
|
|
286
|
+
# @param status [Symbol, ContextDev::Models::MonitorListRunsParams::Status] Lifecycle status of a run. `skipped` runs never executed — see `skip_reason` (in
|
|
287
|
+
#
|
|
288
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
289
|
+
#
|
|
290
|
+
# @return [ContextDev::Models::MonitorListRunsResponse]
|
|
291
|
+
#
|
|
292
|
+
# @see ContextDev::Models::MonitorListRunsParams
|
|
293
|
+
def list_runs(monitor_id, params = {})
|
|
294
|
+
parsed, options = ContextDev::MonitorListRunsParams.dump_request(params)
|
|
295
|
+
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
296
|
+
@client.request(
|
|
297
|
+
method: :get,
|
|
298
|
+
path: ["monitors/%1$s/runs", monitor_id],
|
|
299
|
+
query: query,
|
|
300
|
+
model: ContextDev::Models::MonitorListRunsResponse,
|
|
301
|
+
options: options
|
|
302
|
+
)
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Get a change
|
|
306
|
+
#
|
|
307
|
+
# @overload retrieve_change(change_id, request_options: {})
|
|
308
|
+
#
|
|
309
|
+
# @param change_id [String]
|
|
310
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
311
|
+
#
|
|
312
|
+
# @return [ContextDev::Models::MonitorRetrieveChangeResponse]
|
|
313
|
+
#
|
|
314
|
+
# @see ContextDev::Models::MonitorRetrieveChangeParams
|
|
315
|
+
def retrieve_change(change_id, params = {})
|
|
316
|
+
@client.request(
|
|
317
|
+
method: :get,
|
|
318
|
+
path: ["monitors/changes/%1$s", change_id],
|
|
319
|
+
model: ContextDev::Models::MonitorRetrieveChangeResponse,
|
|
320
|
+
options: params[:request_options]
|
|
321
|
+
)
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Triggers an immediate run of the monitor outside its normal schedule. The run is
|
|
325
|
+
# queued and processed asynchronously.
|
|
326
|
+
#
|
|
327
|
+
# @overload run(monitor_id, request_options: {})
|
|
328
|
+
#
|
|
329
|
+
# @param monitor_id [String]
|
|
330
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
331
|
+
#
|
|
332
|
+
# @return [ContextDev::Models::MonitorRunResponse]
|
|
333
|
+
#
|
|
334
|
+
# @see ContextDev::Models::MonitorRunParams
|
|
335
|
+
def run(monitor_id, params = {})
|
|
336
|
+
@client.request(
|
|
337
|
+
method: :post,
|
|
338
|
+
path: ["monitors/%1$s/run", monitor_id],
|
|
339
|
+
model: ContextDev::Models::MonitorRunResponse,
|
|
340
|
+
options: params[:request_options]
|
|
341
|
+
)
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# @api private
|
|
345
|
+
#
|
|
346
|
+
# @param client [ContextDev::Client]
|
|
347
|
+
def initialize(client:)
|
|
348
|
+
@client = client
|
|
349
|
+
end
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
end
|
|
@@ -6,12 +6,16 @@ module ContextDev
|
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
|
7
7
|
# {ContextDev::Models::UtilityPrefetchParams} for more details.
|
|
8
8
|
#
|
|
9
|
-
# Signal that you may fetch brand data
|
|
10
|
-
#
|
|
9
|
+
# Signal that you may fetch brand data soon to improve latency. The type field
|
|
10
|
+
# selects what to prefetch (currently only 'brand') and identifier carries exactly
|
|
11
|
+
# one lookup key: a domain, or an email whose domain is extracted and validated
|
|
12
|
+
# (free email providers and disposable email addresses are not allowed).
|
|
11
13
|
#
|
|
12
|
-
# @overload prefetch(
|
|
14
|
+
# @overload prefetch(identifier:, type:, timeout_ms: nil, request_options: {})
|
|
13
15
|
#
|
|
14
|
-
# @param
|
|
16
|
+
# @param identifier [ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier, ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier] Identifier of the brand to prefetch. Provide exactly one of domain or email.
|
|
17
|
+
#
|
|
18
|
+
# @param type [Symbol, ContextDev::Models::UtilityPrefetchParams::Type] What to prefetch. Currently only 'brand' is supported.
|
|
15
19
|
#
|
|
16
20
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
17
21
|
#
|
|
@@ -24,43 +28,13 @@ module ContextDev
|
|
|
24
28
|
parsed, options = ContextDev::UtilityPrefetchParams.dump_request(params)
|
|
25
29
|
@client.request(
|
|
26
30
|
method: :post,
|
|
27
|
-
path: "
|
|
31
|
+
path: "utility/prefetch",
|
|
28
32
|
body: parsed,
|
|
29
33
|
model: ContextDev::Models::UtilityPrefetchResponse,
|
|
30
34
|
options: options
|
|
31
35
|
)
|
|
32
36
|
end
|
|
33
37
|
|
|
34
|
-
# Some parameter documentations has been truncated, see
|
|
35
|
-
# {ContextDev::Models::UtilityPrefetchByEmailParams} for more details.
|
|
36
|
-
#
|
|
37
|
-
# Signal that you may fetch brand data for a particular domain soon to improve
|
|
38
|
-
# latency. This endpoint accepts an email address, extracts the domain from it,
|
|
39
|
-
# validates that it's not a disposable or free email provider, and queues the
|
|
40
|
-
# domain for prefetching.
|
|
41
|
-
#
|
|
42
|
-
# @overload prefetch_by_email(email:, timeout_ms: nil, request_options: {})
|
|
43
|
-
#
|
|
44
|
-
# @param email [String] Email address to prefetch brand data for. The domain will be extracted from the
|
|
45
|
-
#
|
|
46
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
47
|
-
#
|
|
48
|
-
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
49
|
-
#
|
|
50
|
-
# @return [ContextDev::Models::UtilityPrefetchByEmailResponse]
|
|
51
|
-
#
|
|
52
|
-
# @see ContextDev::Models::UtilityPrefetchByEmailParams
|
|
53
|
-
def prefetch_by_email(params)
|
|
54
|
-
parsed, options = ContextDev::UtilityPrefetchByEmailParams.dump_request(params)
|
|
55
|
-
@client.request(
|
|
56
|
-
method: :post,
|
|
57
|
-
path: "brand/prefetch-by-email",
|
|
58
|
-
body: parsed,
|
|
59
|
-
model: ContextDev::Models::UtilityPrefetchByEmailResponse,
|
|
60
|
-
options: options
|
|
61
|
-
)
|
|
62
|
-
end
|
|
63
|
-
|
|
64
38
|
# @api private
|
|
65
39
|
#
|
|
66
40
|
# @param client [ContextDev::Client]
|
|
@@ -127,7 +127,9 @@ module ContextDev
|
|
|
127
127
|
# Extract a comprehensive design system from a website including colors,
|
|
128
128
|
# typography, spacing, shadows, and UI components.
|
|
129
129
|
#
|
|
130
|
-
# @overload extract_styleguide(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
|
|
130
|
+
# @overload extract_styleguide(color_scheme: nil, direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
|
|
131
|
+
#
|
|
132
|
+
# @param color_scheme [Symbol, ContextDev::Models::WebExtractStyleguideParams::ColorScheme] Optional browser color scheme to emulate for websites that respond to prefers-co
|
|
131
133
|
#
|
|
132
134
|
# @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio
|
|
133
135
|
#
|
|
@@ -149,6 +151,7 @@ module ContextDev
|
|
|
149
151
|
method: :get,
|
|
150
152
|
path: "web/styleguide",
|
|
151
153
|
query: query.transform_keys(
|
|
154
|
+
color_scheme: "colorScheme",
|
|
152
155
|
direct_url: "directUrl",
|
|
153
156
|
max_age_ms: "maxAgeMs",
|
|
154
157
|
timeout_ms: "timeoutMS"
|
|
@@ -163,7 +166,11 @@ module ContextDev
|
|
|
163
166
|
#
|
|
164
167
|
# Capture a screenshot of a website.
|
|
165
168
|
#
|
|
166
|
-
# @overload screenshot(direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
|
|
169
|
+
# @overload screenshot(color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
|
|
170
|
+
#
|
|
171
|
+
# @param color_scheme [Symbol, ContextDev::Models::WebScreenshotParams::ColorScheme] Optional parameter to choose the site's visual theme in the screenshot. Use 'lig
|
|
172
|
+
#
|
|
173
|
+
# @param country [Symbol, ContextDev::Models::WebScreenshotParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
|
|
167
174
|
#
|
|
168
175
|
# @param direct_url [String] A specific URL to screenshot directly, bypassing domain resolution (e.g., 'https
|
|
169
176
|
#
|
|
@@ -197,6 +204,7 @@ module ContextDev
|
|
|
197
204
|
method: :get,
|
|
198
205
|
path: "web/screenshot",
|
|
199
206
|
query: query.transform_keys(
|
|
207
|
+
color_scheme: "colorScheme",
|
|
200
208
|
direct_url: "directUrl",
|
|
201
209
|
full_screenshot: "fullScreenshot",
|
|
202
210
|
handle_cookie_popup: "handleCookiePopup",
|
|
@@ -215,9 +223,11 @@ module ContextDev
|
|
|
215
223
|
#
|
|
216
224
|
# Search the web and optionally scrape each result to Markdown in one round-trip.
|
|
217
225
|
#
|
|
218
|
-
# @overload search(query:, exclude_domains: nil, freshness: nil, include_domains: nil, markdown_options: nil, query_fanout: nil, timeout_ms: nil, request_options: {})
|
|
226
|
+
# @overload search(query:, country: nil, exclude_domains: nil, freshness: nil, include_domains: nil, markdown_options: nil, num_results: nil, query_fanout: nil, timeout_ms: nil, request_options: {})
|
|
219
227
|
#
|
|
220
|
-
# @param query [String]
|
|
228
|
+
# @param query [String] Search query. Accepts natural language as well as Google-style search operators
|
|
229
|
+
#
|
|
230
|
+
# @param country [Symbol, ContextDev::Models::WebSearchParams::Country] Two-letter ISO 3166-1 alpha-2 country code to localize results to a specific cou
|
|
221
231
|
#
|
|
222
232
|
# @param exclude_domains [Array<String>] Blocklist — drop results from these domains. Example: ["pinterest.com", "reddit.
|
|
223
233
|
#
|
|
@@ -227,6 +237,8 @@ module ContextDev
|
|
|
227
237
|
#
|
|
228
238
|
# @param markdown_options [ContextDev::Models::WebSearchParams::MarkdownOptions] Inline Markdown scraping for each result. Set `enabled: true` to activate.
|
|
229
239
|
#
|
|
240
|
+
# @param num_results [Integer] Number of results to request and return (10–100). Defaults to 10.
|
|
241
|
+
#
|
|
230
242
|
# @param query_fanout [Boolean] Expand the query into multiple parallel variants for broader recall.
|
|
231
243
|
#
|
|
232
244
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
@@ -253,10 +265,12 @@ module ContextDev
|
|
|
253
265
|
# Performs a crawl starting from a given URL, extracts page content as Markdown,
|
|
254
266
|
# and returns results for all crawled pages.
|
|
255
267
|
#
|
|
256
|
-
# @overload web_crawl_md(url:, exclude_selectors: nil, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
268
|
+
# @overload web_crawl_md(url:, country: nil, exclude_selectors: nil, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, settle_animations: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
257
269
|
#
|
|
258
270
|
# @param url [String] The starting URL for the crawl (must include http:// or https:// protocol)
|
|
259
271
|
#
|
|
272
|
+
# @param country [Symbol, ContextDev::Models::WebWebCrawlMdParams::Country] Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev r
|
|
273
|
+
#
|
|
260
274
|
# @param exclude_selectors [Array<String>] CSS selectors to remove before each crawled page is converted to Markdown. Appli
|
|
261
275
|
#
|
|
262
276
|
# @param follow_subdomains [Boolean] When true, follow links on subdomains of the starting URL's domain (e.g. docs.ex
|
|
@@ -277,6 +291,8 @@ module ContextDev
|
|
|
277
291
|
#
|
|
278
292
|
# @param pdf [ContextDev::Models::WebWebCrawlMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
|
|
279
293
|
#
|
|
294
|
+
# @param settle_animations [Boolean] When true, waits briefly for CSS and transition animations to settle before extr
|
|
295
|
+
#
|
|
280
296
|
# @param shorten_base64_images [Boolean] Truncate base64-encoded image data in the Markdown output
|
|
281
297
|
#
|
|
282
298
|
# @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds. After each scrape, the crawler c
|
|
@@ -310,10 +326,12 @@ module ContextDev
|
|
|
310
326
|
#
|
|
311
327
|
# Scrapes the given URL and returns the raw HTML content of the page.
|
|
312
328
|
#
|
|
313
|
-
# @overload web_scrape_html(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
329
|
+
# @overload web_scrape_html(url:, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, settle_animations: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
314
330
|
#
|
|
315
331
|
# @param url [String] Full URL to scrape (must include http:// or https:// protocol)
|
|
316
332
|
#
|
|
333
|
+
# @param country [Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
|
|
334
|
+
#
|
|
317
335
|
# @param exclude_selectors [Array<String>] CSS selectors to remove from the result. Applied after includeSelectors. Exclusi
|
|
318
336
|
#
|
|
319
337
|
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
|
|
@@ -326,6 +344,8 @@ module ContextDev
|
|
|
326
344
|
#
|
|
327
345
|
# @param pdf [ContextDev::Models::WebWebScrapeHTMLParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
|
|
328
346
|
#
|
|
347
|
+
# @param settle_animations [Boolean] When true, waits briefly for CSS and transition animations to settle before extr
|
|
348
|
+
#
|
|
329
349
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
330
350
|
#
|
|
331
351
|
# @param use_main_content_only [Boolean] When true, return only the page's main content in the HTML response, excluding h
|
|
@@ -348,6 +368,7 @@ module ContextDev
|
|
|
348
368
|
include_frames: "includeFrames",
|
|
349
369
|
include_selectors: "includeSelectors",
|
|
350
370
|
max_age_ms: "maxAgeMs",
|
|
371
|
+
settle_animations: "settleAnimations",
|
|
351
372
|
timeout_ms: "timeoutMS",
|
|
352
373
|
use_main_content_only: "useMainContentOnly",
|
|
353
374
|
wait_for_ms: "waitForMs"
|
|
@@ -365,10 +386,12 @@ module ContextDev
|
|
|
365
386
|
# embeds. The base request costs 1 credit. When enrichment is enabled, the entire
|
|
366
387
|
# call costs 5 credits.
|
|
367
388
|
#
|
|
368
|
-
# @overload web_scrape_images(url:, enrichment: nil, headers: nil, max_age_ms: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
|
|
389
|
+
# @overload web_scrape_images(url:, dedupe: nil, enrichment: nil, headers: nil, max_age_ms: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
|
|
369
390
|
#
|
|
370
391
|
# @param url [String] Page URL to inspect. Must include http:// or https://.
|
|
371
392
|
#
|
|
393
|
+
# @param dedupe [Boolean] When true, visually duplicate images are removed: every image is loaded and perc
|
|
394
|
+
#
|
|
372
395
|
# @param enrichment [ContextDev::Models::WebWebScrapeImagesParams::Enrichment] Optional per-image processing, sent as deep-object query params such as enrichme
|
|
373
396
|
#
|
|
374
397
|
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
|
|
@@ -405,10 +428,12 @@ module ContextDev
|
|
|
405
428
|
#
|
|
406
429
|
# Scrapes the given URL into LLM usable Markdown.
|
|
407
430
|
#
|
|
408
|
-
# @overload web_scrape_md(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
431
|
+
# @overload web_scrape_md(url:, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, settle_animations: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
409
432
|
#
|
|
410
433
|
# @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr
|
|
411
434
|
#
|
|
435
|
+
# @param country [Symbol, ContextDev::Models::WebWebScrapeMdParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
|
|
436
|
+
#
|
|
412
437
|
# @param exclude_selectors [Array<String>] CSS selectors to remove before conversion to Markdown. Applied after includeSele
|
|
413
438
|
#
|
|
414
439
|
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
|
|
@@ -425,6 +450,8 @@ module ContextDev
|
|
|
425
450
|
#
|
|
426
451
|
# @param pdf [ContextDev::Models::WebWebScrapeMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
|
|
427
452
|
#
|
|
453
|
+
# @param settle_animations [Boolean] When true, waits briefly for CSS and transition animations to settle before conv
|
|
454
|
+
#
|
|
428
455
|
# @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output
|
|
429
456
|
#
|
|
430
457
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
@@ -451,6 +478,7 @@ module ContextDev
|
|
|
451
478
|
include_links: "includeLinks",
|
|
452
479
|
include_selectors: "includeSelectors",
|
|
453
480
|
max_age_ms: "maxAgeMs",
|
|
481
|
+
settle_animations: "settleAnimations",
|
|
454
482
|
shorten_base64_images: "shortenBase64Images",
|
|
455
483
|
timeout_ms: "timeoutMS",
|
|
456
484
|
use_main_content_only: "useMainContentOnly",
|
data/lib/context_dev/version.rb
CHANGED
data/lib/context_dev.rb
CHANGED
|
@@ -52,22 +52,10 @@ require_relative "context_dev/errors"
|
|
|
52
52
|
require_relative "context_dev/internal/transport/base_client"
|
|
53
53
|
require_relative "context_dev/internal/transport/pooled_net_requester"
|
|
54
54
|
require_relative "context_dev/client"
|
|
55
|
-
require_relative "context_dev/models/ai_ai_query_params"
|
|
56
|
-
require_relative "context_dev/models/ai_ai_query_response"
|
|
57
55
|
require_relative "context_dev/models/ai_extract_product_params"
|
|
58
56
|
require_relative "context_dev/models/ai_extract_product_response"
|
|
59
57
|
require_relative "context_dev/models/ai_extract_products_params"
|
|
60
58
|
require_relative "context_dev/models/ai_extract_products_response"
|
|
61
|
-
require_relative "context_dev/models/brand_identify_from_transaction_params"
|
|
62
|
-
require_relative "context_dev/models/brand_identify_from_transaction_response"
|
|
63
|
-
require_relative "context_dev/models/brand_retrieve_by_email_params"
|
|
64
|
-
require_relative "context_dev/models/brand_retrieve_by_email_response"
|
|
65
|
-
require_relative "context_dev/models/brand_retrieve_by_isin_params"
|
|
66
|
-
require_relative "context_dev/models/brand_retrieve_by_isin_response"
|
|
67
|
-
require_relative "context_dev/models/brand_retrieve_by_name_params"
|
|
68
|
-
require_relative "context_dev/models/brand_retrieve_by_name_response"
|
|
69
|
-
require_relative "context_dev/models/brand_retrieve_by_ticker_params"
|
|
70
|
-
require_relative "context_dev/models/brand_retrieve_by_ticker_response"
|
|
71
59
|
require_relative "context_dev/models/brand_retrieve_params"
|
|
72
60
|
require_relative "context_dev/models/brand_retrieve_response"
|
|
73
61
|
require_relative "context_dev/models/brand_retrieve_simplified_params"
|
|
@@ -76,8 +64,28 @@ require_relative "context_dev/models/industry_retrieve_naics_params"
|
|
|
76
64
|
require_relative "context_dev/models/industry_retrieve_naics_response"
|
|
77
65
|
require_relative "context_dev/models/industry_retrieve_sic_params"
|
|
78
66
|
require_relative "context_dev/models/industry_retrieve_sic_response"
|
|
79
|
-
require_relative "context_dev/models/
|
|
80
|
-
require_relative "context_dev/models/
|
|
67
|
+
require_relative "context_dev/models/monitor_create_params"
|
|
68
|
+
require_relative "context_dev/models/monitor_create_response"
|
|
69
|
+
require_relative "context_dev/models/monitor_delete_params"
|
|
70
|
+
require_relative "context_dev/models/monitor_delete_response"
|
|
71
|
+
require_relative "context_dev/models/monitor_list_account_changes_params"
|
|
72
|
+
require_relative "context_dev/models/monitor_list_account_changes_response"
|
|
73
|
+
require_relative "context_dev/models/monitor_list_account_runs_params"
|
|
74
|
+
require_relative "context_dev/models/monitor_list_account_runs_response"
|
|
75
|
+
require_relative "context_dev/models/monitor_list_changes_params"
|
|
76
|
+
require_relative "context_dev/models/monitor_list_changes_response"
|
|
77
|
+
require_relative "context_dev/models/monitor_list_params"
|
|
78
|
+
require_relative "context_dev/models/monitor_list_response"
|
|
79
|
+
require_relative "context_dev/models/monitor_list_runs_params"
|
|
80
|
+
require_relative "context_dev/models/monitor_list_runs_response"
|
|
81
|
+
require_relative "context_dev/models/monitor_retrieve_change_params"
|
|
82
|
+
require_relative "context_dev/models/monitor_retrieve_change_response"
|
|
83
|
+
require_relative "context_dev/models/monitor_retrieve_params"
|
|
84
|
+
require_relative "context_dev/models/monitor_retrieve_response"
|
|
85
|
+
require_relative "context_dev/models/monitor_run_params"
|
|
86
|
+
require_relative "context_dev/models/monitor_run_response"
|
|
87
|
+
require_relative "context_dev/models/monitor_update_params"
|
|
88
|
+
require_relative "context_dev/models/monitor_update_response"
|
|
81
89
|
require_relative "context_dev/models/utility_prefetch_params"
|
|
82
90
|
require_relative "context_dev/models/utility_prefetch_response"
|
|
83
91
|
require_relative "context_dev/models/web_extract_competitors_params"
|
|
@@ -106,5 +114,6 @@ require_relative "context_dev/models"
|
|
|
106
114
|
require_relative "context_dev/resources/ai"
|
|
107
115
|
require_relative "context_dev/resources/brand"
|
|
108
116
|
require_relative "context_dev/resources/industry"
|
|
117
|
+
require_relative "context_dev/resources/monitors"
|
|
109
118
|
require_relative "context_dev/resources/utility"
|
|
110
119
|
require_relative "context_dev/resources/web"
|
data/rbi/context_dev/client.rbi
CHANGED
|
@@ -28,6 +28,12 @@ module ContextDev
|
|
|
28
28
|
sig { returns(ContextDev::Resources::Utility) }
|
|
29
29
|
attr_reader :utility
|
|
30
30
|
|
|
31
|
+
# Monitor pages, sitemaps, and extracted website data for exact or semantic
|
|
32
|
+
# changes. The change.detected webhook payload is documented by the
|
|
33
|
+
# MonitorsChangeDetectedWebhookPayload schema.
|
|
34
|
+
sig { returns(ContextDev::Resources::Monitors) }
|
|
35
|
+
attr_reader :monitors
|
|
36
|
+
|
|
31
37
|
# @api private
|
|
32
38
|
sig { override.returns(T::Hash[String, String]) }
|
|
33
39
|
private def auth_headers
|