context.dev 1.36.0 → 2.1.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 +16 -9
- data/lib/context_dev/client.rb +7 -0
- data/lib/context_dev/models/brand_retrieve_params.rb +1079 -174
- data/lib/context_dev/models/monitor_create_params.rb +364 -0
- data/lib/context_dev/models/monitor_create_response.rb +608 -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 +631 -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 +264 -0
- data/lib/context_dev/models/monitor_retrieve_params.rb +20 -0
- data/lib/context_dev/models/monitor_retrieve_response.rb +608 -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 +371 -0
- data/lib/context_dev/models/monitor_update_response.rb +608 -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_web_crawl_md_params.rb +11 -1
- data/lib/context_dev/models/web_web_scrape_html_params.rb +11 -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 +11 -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 +9 -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 +14 -4
- 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 +3858 -678
- data/rbi/context_dev/models/monitor_create_params.rbi +641 -0
- data/rbi/context_dev/models/monitor_create_response.rbi +1020 -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 +335 -0
- data/rbi/context_dev/models/monitor_list_response.rbi +1089 -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 +469 -0
- data/rbi/context_dev/models/monitor_retrieve_params.rbi +38 -0
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +1028 -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 +681 -0
- data/rbi/context_dev/models/monitor_update_response.rbi +1020 -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_web_crawl_md_params.rbi +15 -0
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +15 -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 +15 -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 +16 -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 +21 -0
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +1586 -281
- data/sig/context_dev/models/monitor_create_params.rbs +301 -0
- data/sig/context_dev/models/monitor_create_response.rbs +433 -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 +460 -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 +221 -0
- data/sig/context_dev/models/monitor_retrieve_params.rbs +23 -0
- data/sig/context_dev/models/monitor_retrieve_response.rbs +433 -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 +321 -0
- data/sig/context_dev/models/monitor_update_response.rbs +433 -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_web_crawl_md_params.rbs +7 -0
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +7 -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 +7 -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 +4 -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
|
@@ -7,11 +7,17 @@ module ContextDev
|
|
|
7
7
|
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include ContextDev::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!attribute
|
|
11
|
-
#
|
|
10
|
+
# @!attribute identifier
|
|
11
|
+
# Identifier of the brand to prefetch. Provide exactly one of domain or email.
|
|
12
12
|
#
|
|
13
|
-
# @return [
|
|
14
|
-
required :
|
|
13
|
+
# @return [ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier, ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier]
|
|
14
|
+
required :identifier, union: -> { ContextDev::UtilityPrefetchParams::Identifier }
|
|
15
|
+
|
|
16
|
+
# @!attribute type
|
|
17
|
+
# What to prefetch. Currently only 'brand' is supported.
|
|
18
|
+
#
|
|
19
|
+
# @return [Symbol, ContextDev::Models::UtilityPrefetchParams::Type]
|
|
20
|
+
required :type, enum: -> { ContextDev::UtilityPrefetchParams::Type }
|
|
15
21
|
|
|
16
22
|
# @!attribute timeout_ms
|
|
17
23
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
@@ -21,15 +27,73 @@ module ContextDev
|
|
|
21
27
|
# @return [Integer, nil]
|
|
22
28
|
optional :timeout_ms, Integer, api_name: :timeoutMS
|
|
23
29
|
|
|
24
|
-
# @!method initialize(
|
|
30
|
+
# @!method initialize(identifier:, type:, timeout_ms: nil, request_options: {})
|
|
25
31
|
# Some parameter documentations has been truncated, see
|
|
26
32
|
# {ContextDev::Models::UtilityPrefetchParams} for more details.
|
|
27
33
|
#
|
|
28
|
-
# @param
|
|
34
|
+
# @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.
|
|
35
|
+
#
|
|
36
|
+
# @param type [Symbol, ContextDev::Models::UtilityPrefetchParams::Type] What to prefetch. Currently only 'brand' is supported.
|
|
29
37
|
#
|
|
30
38
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
31
39
|
#
|
|
32
40
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
41
|
+
|
|
42
|
+
# Identifier of the brand to prefetch. Provide exactly one of domain or email.
|
|
43
|
+
module Identifier
|
|
44
|
+
extend ContextDev::Internal::Type::Union
|
|
45
|
+
|
|
46
|
+
# Prefetch brand data by domain.
|
|
47
|
+
variant -> { ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier }
|
|
48
|
+
|
|
49
|
+
# Prefetch brand data by email. The domain will be extracted and validated.
|
|
50
|
+
variant -> { ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier }
|
|
51
|
+
|
|
52
|
+
class UtilityPrefetchDomainIdentifier < ContextDev::Internal::Type::BaseModel
|
|
53
|
+
# @!attribute domain
|
|
54
|
+
# Domain name to prefetch brand data for
|
|
55
|
+
#
|
|
56
|
+
# @return [String]
|
|
57
|
+
required :domain, String
|
|
58
|
+
|
|
59
|
+
# @!method initialize(domain:)
|
|
60
|
+
# Prefetch brand data by domain.
|
|
61
|
+
#
|
|
62
|
+
# @param domain [String] Domain name to prefetch brand data for
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
class UtilityPrefetchEmailIdentifier < ContextDev::Internal::Type::BaseModel
|
|
66
|
+
# @!attribute email
|
|
67
|
+
# Email address to prefetch brand data for. The domain will be extracted from the
|
|
68
|
+
# email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email
|
|
69
|
+
# addresses are not allowed.
|
|
70
|
+
#
|
|
71
|
+
# @return [String]
|
|
72
|
+
required :email, String
|
|
73
|
+
|
|
74
|
+
# @!method initialize(email:)
|
|
75
|
+
# Some parameter documentations has been truncated, see
|
|
76
|
+
# {ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier}
|
|
77
|
+
# for more details.
|
|
78
|
+
#
|
|
79
|
+
# Prefetch brand data by email. The domain will be extracted and validated.
|
|
80
|
+
#
|
|
81
|
+
# @param email [String] Email address to prefetch brand data for. The domain will be extracted from the
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# @!method self.variants
|
|
85
|
+
# @return [Array(ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier, ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier)]
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# What to prefetch. Currently only 'brand' is supported.
|
|
89
|
+
module Type
|
|
90
|
+
extend ContextDev::Internal::Type::Enum
|
|
91
|
+
|
|
92
|
+
BRAND = :brand
|
|
93
|
+
|
|
94
|
+
# @!method self.values
|
|
95
|
+
# @return [Array<Symbol>]
|
|
96
|
+
end
|
|
33
97
|
end
|
|
34
98
|
end
|
|
35
99
|
end
|
|
@@ -29,7 +29,14 @@ module ContextDev
|
|
|
29
29
|
# @return [String, nil]
|
|
30
30
|
optional :status, String
|
|
31
31
|
|
|
32
|
-
# @!
|
|
32
|
+
# @!attribute type
|
|
33
|
+
# The type of prefetch that was queued, echoed from the request (currently always
|
|
34
|
+
# 'brand')
|
|
35
|
+
#
|
|
36
|
+
# @return [Symbol, ContextDev::Models::UtilityPrefetchResponse::Type, nil]
|
|
37
|
+
optional :type, enum: -> { ContextDev::Models::UtilityPrefetchResponse::Type }
|
|
38
|
+
|
|
39
|
+
# @!method initialize(domain: nil, key_metadata: nil, message: nil, status: nil, type: nil)
|
|
33
40
|
# Some parameter documentations has been truncated, see
|
|
34
41
|
# {ContextDev::Models::UtilityPrefetchResponse} for more details.
|
|
35
42
|
#
|
|
@@ -40,6 +47,8 @@ module ContextDev
|
|
|
40
47
|
# @param message [String] Success message
|
|
41
48
|
#
|
|
42
49
|
# @param status [String] Status of the response, e.g., 'ok'
|
|
50
|
+
#
|
|
51
|
+
# @param type [Symbol, ContextDev::Models::UtilityPrefetchResponse::Type] The type of prefetch that was queued, echoed from the request (currently always
|
|
43
52
|
|
|
44
53
|
# @see ContextDev::Models::UtilityPrefetchResponse#key_metadata
|
|
45
54
|
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
@@ -63,6 +72,19 @@ module ContextDev
|
|
|
63
72
|
#
|
|
64
73
|
# @param credits_remaining [Integer] The number of credits remaining for your organization after this request.
|
|
65
74
|
end
|
|
75
|
+
|
|
76
|
+
# The type of prefetch that was queued, echoed from the request (currently always
|
|
77
|
+
# 'brand')
|
|
78
|
+
#
|
|
79
|
+
# @see ContextDev::Models::UtilityPrefetchResponse#type
|
|
80
|
+
module Type
|
|
81
|
+
extend ContextDev::Internal::Type::Enum
|
|
82
|
+
|
|
83
|
+
BRAND = :brand
|
|
84
|
+
|
|
85
|
+
# @!method self.values
|
|
86
|
+
# @return [Array<Symbol>]
|
|
87
|
+
end
|
|
66
88
|
end
|
|
67
89
|
end
|
|
68
90
|
end
|
|
@@ -63,6 +63,13 @@ module ContextDev
|
|
|
63
63
|
# @return [Integer]
|
|
64
64
|
required :max_crawl_depth, Integer, api_name: :maxCrawlDepth
|
|
65
65
|
|
|
66
|
+
# @!attribute num_blocked
|
|
67
|
+
# Number of crawled pages excluded because they were anti-bot challenges, error
|
|
68
|
+
# pages, or parked-domain placeholders.
|
|
69
|
+
#
|
|
70
|
+
# @return [Integer]
|
|
71
|
+
required :num_blocked, Integer, api_name: :numBlocked
|
|
72
|
+
|
|
66
73
|
# @!attribute num_failed
|
|
67
74
|
#
|
|
68
75
|
# @return [Integer]
|
|
@@ -83,11 +90,20 @@ module ContextDev
|
|
|
83
90
|
# @return [Integer]
|
|
84
91
|
required :num_urls, Integer, api_name: :numUrls
|
|
85
92
|
|
|
86
|
-
# @!method initialize(max_crawl_depth:, num_failed:, num_skipped:, num_succeeded:, num_urls:)
|
|
93
|
+
# @!method initialize(max_crawl_depth:, num_blocked:, num_failed:, num_skipped:, num_succeeded:, num_urls:)
|
|
94
|
+
# Some parameter documentations has been truncated, see
|
|
95
|
+
# {ContextDev::Models::WebExtractResponse::Metadata} for more details.
|
|
96
|
+
#
|
|
87
97
|
# @param max_crawl_depth [Integer]
|
|
98
|
+
#
|
|
99
|
+
# @param num_blocked [Integer] Number of crawled pages excluded because they were anti-bot challenges, error pa
|
|
100
|
+
#
|
|
88
101
|
# @param num_failed [Integer]
|
|
102
|
+
#
|
|
89
103
|
# @param num_skipped [Integer]
|
|
104
|
+
#
|
|
90
105
|
# @param num_succeeded [Integer]
|
|
106
|
+
#
|
|
91
107
|
# @param num_urls [Integer]
|
|
92
108
|
end
|
|
93
109
|
|
|
@@ -92,6 +92,14 @@ module ContextDev
|
|
|
92
92
|
# @return [ContextDev::Models::WebWebCrawlMdParams::Pdf, nil]
|
|
93
93
|
optional :pdf, -> { ContextDev::WebWebCrawlMdParams::Pdf }
|
|
94
94
|
|
|
95
|
+
# @!attribute settle_animations
|
|
96
|
+
# When true, waits briefly for CSS and transition animations to settle before
|
|
97
|
+
# extracting each crawled page. Defaults to false. This adds a bit of latency in
|
|
98
|
+
# exchange for more stable output on animated pages.
|
|
99
|
+
#
|
|
100
|
+
# @return [Boolean, nil]
|
|
101
|
+
optional :settle_animations, ContextDev::Internal::Type::Boolean, api_name: :settleAnimations
|
|
102
|
+
|
|
95
103
|
# @!attribute shorten_base64_images
|
|
96
104
|
# Truncate base64-encoded image data in the Markdown output
|
|
97
105
|
#
|
|
@@ -135,7 +143,7 @@ module ContextDev
|
|
|
135
143
|
# @return [Integer, nil]
|
|
136
144
|
optional :wait_for_ms, Integer, api_name: :waitForMs
|
|
137
145
|
|
|
138
|
-
# @!method initialize(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, 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: {})
|
|
146
|
+
# @!method initialize(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: {})
|
|
139
147
|
# Some parameter documentations has been truncated, see
|
|
140
148
|
# {ContextDev::Models::WebWebCrawlMdParams} for more details.
|
|
141
149
|
#
|
|
@@ -163,6 +171,8 @@ module ContextDev
|
|
|
163
171
|
#
|
|
164
172
|
# @param pdf [ContextDev::Models::WebWebCrawlMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
|
|
165
173
|
#
|
|
174
|
+
# @param settle_animations [Boolean] When true, waits briefly for CSS and transition animations to settle before extr
|
|
175
|
+
#
|
|
166
176
|
# @param shorten_base64_images [Boolean] Truncate base64-encoded image data in the Markdown output
|
|
167
177
|
#
|
|
168
178
|
# @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds. After each scrape, the crawler c
|
|
@@ -65,6 +65,14 @@ module ContextDev
|
|
|
65
65
|
# @return [ContextDev::Models::WebWebScrapeHTMLParams::Pdf, nil]
|
|
66
66
|
optional :pdf, -> { ContextDev::WebWebScrapeHTMLParams::Pdf }
|
|
67
67
|
|
|
68
|
+
# @!attribute settle_animations
|
|
69
|
+
# When true, waits briefly for CSS and transition animations to settle before
|
|
70
|
+
# extracting HTML. Defaults to false. This adds a bit of latency in exchange for
|
|
71
|
+
# more stable output on animated pages.
|
|
72
|
+
#
|
|
73
|
+
# @return [Boolean, nil]
|
|
74
|
+
optional :settle_animations, ContextDev::Internal::Type::Boolean
|
|
75
|
+
|
|
68
76
|
# @!attribute timeout_ms
|
|
69
77
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
70
78
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
@@ -87,7 +95,7 @@ module ContextDev
|
|
|
87
95
|
# @return [Integer, nil]
|
|
88
96
|
optional :wait_for_ms, Integer
|
|
89
97
|
|
|
90
|
-
# @!method initialize(url:, country: nil, 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: {})
|
|
98
|
+
# @!method initialize(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: {})
|
|
91
99
|
# Some parameter documentations has been truncated, see
|
|
92
100
|
# {ContextDev::Models::WebWebScrapeHTMLParams} for more details.
|
|
93
101
|
#
|
|
@@ -107,6 +115,8 @@ module ContextDev
|
|
|
107
115
|
#
|
|
108
116
|
# @param pdf [ContextDev::Models::WebWebScrapeHTMLParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
|
|
109
117
|
#
|
|
118
|
+
# @param settle_animations [Boolean] When true, waits briefly for CSS and transition animations to settle before extr
|
|
119
|
+
#
|
|
110
120
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
111
121
|
#
|
|
112
122
|
# @param use_main_content_only [Boolean] When true, return only the page's main content in the HTML response, excluding h
|
|
@@ -26,7 +26,9 @@ module ContextDev
|
|
|
26
26
|
|
|
27
27
|
# @!attribute type
|
|
28
28
|
# Detected content type of the returned `html` field. Sitemaps and feeds are
|
|
29
|
-
# surfaced as `xml`; ordinary pages are `html`.
|
|
29
|
+
# surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as
|
|
30
|
+
# `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations
|
|
31
|
+
# are surfaced as `pptx`/`ppt` with the extracted slides as HTML.
|
|
30
32
|
#
|
|
31
33
|
# @return [Symbol, ContextDev::Models::WebWebScrapeHTMLResponse::Type]
|
|
32
34
|
required :type, enum: -> { ContextDev::Models::WebWebScrapeHTMLResponse::Type }
|
|
@@ -320,7 +322,9 @@ module ContextDev
|
|
|
320
322
|
end
|
|
321
323
|
|
|
322
324
|
# Detected content type of the returned `html` field. Sitemaps and feeds are
|
|
323
|
-
# surfaced as `xml`; ordinary pages are `html`.
|
|
325
|
+
# surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as
|
|
326
|
+
# `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations
|
|
327
|
+
# are surfaced as `pptx`/`ppt` with the extracted slides as HTML.
|
|
324
328
|
#
|
|
325
329
|
# @see ContextDev::Models::WebWebScrapeHTMLResponse#type
|
|
326
330
|
module Type
|
|
@@ -336,6 +340,10 @@ module ContextDev
|
|
|
336
340
|
PDF = :pdf
|
|
337
341
|
DOCX = :docx
|
|
338
342
|
DOC = :doc
|
|
343
|
+
XLSX = :xlsx
|
|
344
|
+
XLS = :xls
|
|
345
|
+
PPTX = :pptx
|
|
346
|
+
PPT = :ppt
|
|
339
347
|
|
|
340
348
|
# @!method self.values
|
|
341
349
|
# @return [Array<Symbol>]
|
|
@@ -13,6 +13,15 @@ module ContextDev
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :url, String
|
|
15
15
|
|
|
16
|
+
# @!attribute dedupe
|
|
17
|
+
# When true, visually duplicate images are removed: every image is loaded and
|
|
18
|
+
# perceptually hashed, and only the highest-resolution copy of each duplicate
|
|
19
|
+
# group is kept. Images that cannot be downloaded or hashed are kept. Default:
|
|
20
|
+
# false.
|
|
21
|
+
#
|
|
22
|
+
# @return [Boolean, nil]
|
|
23
|
+
optional :dedupe, ContextDev::Internal::Type::Boolean
|
|
24
|
+
|
|
16
25
|
# @!attribute enrichment
|
|
17
26
|
# Optional per-image processing, sent as deep-object query params such as
|
|
18
27
|
# enrichment[resolution]=true.
|
|
@@ -50,12 +59,14 @@ module ContextDev
|
|
|
50
59
|
# @return [Integer, nil]
|
|
51
60
|
optional :wait_for_ms, Integer
|
|
52
61
|
|
|
53
|
-
# @!method initialize(url:, enrichment: nil, headers: nil, max_age_ms: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
|
|
62
|
+
# @!method initialize(url:, dedupe: nil, enrichment: nil, headers: nil, max_age_ms: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
|
|
54
63
|
# Some parameter documentations has been truncated, see
|
|
55
64
|
# {ContextDev::Models::WebWebScrapeImagesParams} for more details.
|
|
56
65
|
#
|
|
57
66
|
# @param url [String] Page URL to inspect. Must include http:// or https://.
|
|
58
67
|
#
|
|
68
|
+
# @param dedupe [Boolean] When true, visually duplicate images are removed: every image is loaded and perc
|
|
69
|
+
#
|
|
59
70
|
# @param enrichment [ContextDev::Models::WebWebScrapeImagesParams::Enrichment] Optional per-image processing, sent as deep-object query params such as enrichme
|
|
60
71
|
#
|
|
61
72
|
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
|
|
@@ -78,6 +78,14 @@ module ContextDev
|
|
|
78
78
|
# @return [ContextDev::Models::WebWebScrapeMdParams::Pdf, nil]
|
|
79
79
|
optional :pdf, -> { ContextDev::WebWebScrapeMdParams::Pdf }
|
|
80
80
|
|
|
81
|
+
# @!attribute settle_animations
|
|
82
|
+
# When true, waits briefly for CSS and transition animations to settle before
|
|
83
|
+
# converting to Markdown. Defaults to false. This adds a bit of latency in
|
|
84
|
+
# exchange for more stable output on animated pages.
|
|
85
|
+
#
|
|
86
|
+
# @return [Boolean, nil]
|
|
87
|
+
optional :settle_animations, ContextDev::Internal::Type::Boolean
|
|
88
|
+
|
|
81
89
|
# @!attribute shorten_base64_images
|
|
82
90
|
# Shorten base64-encoded image data in the Markdown output
|
|
83
91
|
#
|
|
@@ -106,7 +114,7 @@ module ContextDev
|
|
|
106
114
|
# @return [Integer, nil]
|
|
107
115
|
optional :wait_for_ms, Integer
|
|
108
116
|
|
|
109
|
-
# @!method initialize(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, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
|
|
117
|
+
# @!method initialize(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: {})
|
|
110
118
|
# Some parameter documentations has been truncated, see
|
|
111
119
|
# {ContextDev::Models::WebWebScrapeMdParams} for more details.
|
|
112
120
|
#
|
|
@@ -130,6 +138,8 @@ module ContextDev
|
|
|
130
138
|
#
|
|
131
139
|
# @param pdf [ContextDev::Models::WebWebScrapeMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
|
|
132
140
|
#
|
|
141
|
+
# @param settle_animations [Boolean] When true, waits briefly for CSS and transition animations to settle before conv
|
|
142
|
+
#
|
|
133
143
|
# @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output
|
|
134
144
|
#
|
|
135
145
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
data/lib/context_dev/models.rb
CHANGED
|
@@ -39,31 +39,39 @@ module ContextDev
|
|
|
39
39
|
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
AIAIQueryParams = ContextDev::Models::AIAIQueryParams
|
|
43
|
-
|
|
44
42
|
AIExtractProductParams = ContextDev::Models::AIExtractProductParams
|
|
45
43
|
|
|
46
44
|
AIExtractProductsParams = ContextDev::Models::AIExtractProductsParams
|
|
47
45
|
|
|
48
|
-
|
|
46
|
+
BrandRetrieveParams = ContextDev::Models::BrandRetrieveParams
|
|
49
47
|
|
|
50
|
-
|
|
48
|
+
BrandRetrieveSimplifiedParams = ContextDev::Models::BrandRetrieveSimplifiedParams
|
|
51
49
|
|
|
52
|
-
|
|
50
|
+
IndustryRetrieveNaicsParams = ContextDev::Models::IndustryRetrieveNaicsParams
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
IndustryRetrieveSicParams = ContextDev::Models::IndustryRetrieveSicParams
|
|
55
53
|
|
|
56
|
-
|
|
54
|
+
MonitorCreateParams = ContextDev::Models::MonitorCreateParams
|
|
57
55
|
|
|
58
|
-
|
|
56
|
+
MonitorDeleteParams = ContextDev::Models::MonitorDeleteParams
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
MonitorListAccountChangesParams = ContextDev::Models::MonitorListAccountChangesParams
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
MonitorListAccountRunsParams = ContextDev::Models::MonitorListAccountRunsParams
|
|
63
61
|
|
|
64
|
-
|
|
62
|
+
MonitorListChangesParams = ContextDev::Models::MonitorListChangesParams
|
|
63
|
+
|
|
64
|
+
MonitorListParams = ContextDev::Models::MonitorListParams
|
|
65
|
+
|
|
66
|
+
MonitorListRunsParams = ContextDev::Models::MonitorListRunsParams
|
|
67
|
+
|
|
68
|
+
MonitorRetrieveChangeParams = ContextDev::Models::MonitorRetrieveChangeParams
|
|
69
|
+
|
|
70
|
+
MonitorRetrieveParams = ContextDev::Models::MonitorRetrieveParams
|
|
71
|
+
|
|
72
|
+
MonitorRunParams = ContextDev::Models::MonitorRunParams
|
|
65
73
|
|
|
66
|
-
|
|
74
|
+
MonitorUpdateParams = ContextDev::Models::MonitorUpdateParams
|
|
67
75
|
|
|
68
76
|
UtilityPrefetchParams = ContextDev::Models::UtilityPrefetchParams
|
|
69
77
|
|
|
@@ -3,39 +3,6 @@
|
|
|
3
3
|
module ContextDev
|
|
4
4
|
module Resources
|
|
5
5
|
class AI
|
|
6
|
-
# Some parameter documentations has been truncated, see
|
|
7
|
-
# {ContextDev::Models::AIAIQueryParams} for more details.
|
|
8
|
-
#
|
|
9
|
-
# Use AI to extract specific data points from a brand's website. The AI will crawl
|
|
10
|
-
# the website and extract the requested information based on the provided data
|
|
11
|
-
# points.
|
|
12
|
-
#
|
|
13
|
-
# @overload ai_query(data_to_extract:, domain:, specific_pages: nil, timeout_ms: nil, request_options: {})
|
|
14
|
-
#
|
|
15
|
-
# @param data_to_extract [Array<ContextDev::Models::AIAIQueryParams::DataToExtract>] Array of data points to extract from the website
|
|
16
|
-
#
|
|
17
|
-
# @param domain [String] The domain name to analyze
|
|
18
|
-
#
|
|
19
|
-
# @param specific_pages [ContextDev::Models::AIAIQueryParams::SpecificPages] Optional object specifying which pages to analyze
|
|
20
|
-
#
|
|
21
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
22
|
-
#
|
|
23
|
-
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
24
|
-
#
|
|
25
|
-
# @return [ContextDev::Models::AIAIQueryResponse]
|
|
26
|
-
#
|
|
27
|
-
# @see ContextDev::Models::AIAIQueryParams
|
|
28
|
-
def ai_query(params)
|
|
29
|
-
parsed, options = ContextDev::AIAIQueryParams.dump_request(params)
|
|
30
|
-
@client.request(
|
|
31
|
-
method: :post,
|
|
32
|
-
path: "brand/ai/query",
|
|
33
|
-
body: parsed,
|
|
34
|
-
model: ContextDev::Models::AIAIQueryResponse,
|
|
35
|
-
options: options
|
|
36
|
-
)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
6
|
# Some parameter documentations has been truncated, see
|
|
40
7
|
# {ContextDev::Models::AIExtractProductParams} for more details.
|
|
41
8
|
#
|