context.dev 2.4.0 → 2.6.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 +29 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +4 -0
- data/lib/context_dev/models/ai_extract_product_params.rb +9 -1
- data/lib/context_dev/models/ai_extract_products_params.rb +18 -2
- data/lib/context_dev/models/batch_cancel_params.rb +22 -0
- data/lib/context_dev/models/batch_cancel_response.rb +354 -0
- data/lib/context_dev/models/batch_get_results_params.rb +42 -0
- data/lib/context_dev/models/batch_get_results_response.rb +463 -0
- data/lib/context_dev/models/batch_list_params.rb +94 -0
- data/lib/context_dev/models/batch_list_response.rb +388 -0
- data/lib/context_dev/models/batch_retrieve_params.rb +22 -0
- data/lib/context_dev/models/batch_retrieve_response.rb +390 -0
- data/lib/context_dev/models/batch_submit_params.rb +56 -0
- data/lib/context_dev/models/batch_submit_response.rb +614 -0
- data/lib/context_dev/models/brand_retrieve_params.rb +109 -22
- data/lib/context_dev/models/brand_retrieve_response.rb +4 -6
- data/lib/context_dev/models/brand_retrieve_simplified_params.rb +32 -3
- data/lib/context_dev/models/error.rb +26 -0
- data/lib/context_dev/models/error_count.rb +26 -0
- data/lib/context_dev/models/industry_retrieve_naics_params.rb +11 -1
- data/lib/context_dev/models/industry_retrieve_sic_params.rb +11 -1
- data/lib/context_dev/models/monitor_create_params.rb +147 -132
- data/lib/context_dev/models/monitor_create_response.rb +40 -15
- data/lib/context_dev/models/monitor_get_credit_usage_params.rb +30 -0
- data/lib/context_dev/models/monitor_get_credit_usage_response.rb +59 -0
- data/lib/context_dev/models/monitor_get_limits_params.rb +14 -0
- data/lib/context_dev/models/monitor_get_limits_response.rb +52 -0
- data/lib/context_dev/models/monitor_list_account_changes_params.rb +16 -7
- data/lib/context_dev/models/monitor_list_account_changes_response.rb +2 -1
- data/lib/context_dev/models/monitor_list_account_runs_params.rb +7 -10
- data/lib/context_dev/models/monitor_list_changes_params.rb +8 -4
- data/lib/context_dev/models/monitor_list_changes_response.rb +2 -1
- data/lib/context_dev/models/monitor_list_params.rb +18 -19
- data/lib/context_dev/models/monitor_list_response.rb +27 -12
- data/lib/context_dev/models/monitor_list_runs_params.rb +7 -10
- data/lib/context_dev/models/monitor_retrieve_change_response.rb +2 -1
- data/lib/context_dev/models/monitor_retrieve_response.rb +27 -12
- data/lib/context_dev/models/monitor_update_params.rb +27 -12
- data/lib/context_dev/models/monitor_update_response.rb +27 -12
- data/lib/context_dev/models/parse_handle_params.rb +199 -33
- data/lib/context_dev/models/utility_prefetch_params.rb +9 -1
- data/lib/context_dev/models/web_extract_competitors_params.rb +11 -1
- data/lib/context_dev/models/web_extract_fonts_params.rb +14 -4
- data/lib/context_dev/models/web_extract_params.rb +19 -1
- data/lib/context_dev/models/web_extract_styleguide_params.rb +14 -4
- data/lib/context_dev/models/web_screenshot_params.rb +69 -18
- data/lib/context_dev/models/web_screenshot_response.rb +3 -2
- data/lib/context_dev/models/web_search_params.rb +9 -1
- data/lib/context_dev/models/web_web_crawl_md_params.rb +34 -1
- data/lib/context_dev/models/web_web_scrape_html_params.rb +268 -29
- data/lib/context_dev/models/web_web_scrape_html_response.rb +93 -1
- data/lib/context_dev/models/web_web_scrape_images_params.rb +208 -19
- data/lib/context_dev/models/web_web_scrape_md_params.rb +352 -38
- data/lib/context_dev/models/web_web_scrape_md_response.rb +93 -1
- data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +45 -1
- data/lib/context_dev/models.rb +18 -0
- data/lib/context_dev/resources/ai.rb +3 -1
- data/lib/context_dev/resources/batch.rb +155 -0
- data/lib/context_dev/resources/brand.rb +6 -2
- data/lib/context_dev/resources/industry.rb +6 -2
- data/lib/context_dev/resources/monitors.rb +75 -37
- data/lib/context_dev/resources/parse.rb +15 -11
- data/lib/context_dev/resources/utility.rb +3 -1
- data/lib/context_dev/resources/web.rb +104 -55
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +17 -0
- data/rbi/context_dev/client.rbi +3 -0
- data/rbi/context_dev/models/ai_extract_product_params.rbi +11 -0
- data/rbi/context_dev/models/ai_extract_products_params.rbi +22 -0
- data/rbi/context_dev/models/batch_cancel_params.rbi +40 -0
- data/rbi/context_dev/models/batch_cancel_response.rbi +642 -0
- data/rbi/context_dev/models/batch_get_results_params.rbi +70 -0
- data/rbi/context_dev/models/batch_get_results_response.rbi +848 -0
- data/rbi/context_dev/models/batch_list_params.rbi +166 -0
- data/rbi/context_dev/models/batch_list_response.rbi +738 -0
- data/rbi/context_dev/models/batch_retrieve_params.rbi +40 -0
- data/rbi/context_dev/models/batch_retrieve_response.rbi +707 -0
- data/rbi/context_dev/models/batch_submit_params.rbi +105 -0
- data/rbi/context_dev/models/batch_submit_response.rbi +1330 -0
- data/rbi/context_dev/models/brand_retrieve_params.rbi +175 -64
- data/rbi/context_dev/models/brand_retrieve_response.rbi +8 -11
- data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +68 -5
- data/rbi/context_dev/models/error.rbi +32 -0
- data/rbi/context_dev/models/error_count.rbi +34 -0
- data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +15 -0
- data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +15 -0
- data/rbi/context_dev/models/monitor_create_params.rbi +280 -246
- data/rbi/context_dev/models/monitor_create_response.rbi +44 -11
- data/rbi/context_dev/models/monitor_get_credit_usage_params.rbi +60 -0
- data/rbi/context_dev/models/monitor_get_credit_usage_response.rbi +111 -0
- data/rbi/context_dev/models/monitor_get_limits_params.rbi +30 -0
- data/rbi/context_dev/models/monitor_get_limits_response.rbi +105 -0
- data/rbi/context_dev/models/monitor_list_account_changes_params.rbi +16 -0
- data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +2 -0
- data/rbi/context_dev/models/monitor_list_account_runs_params.rbi +7 -6
- data/rbi/context_dev/models/monitor_list_changes_params.rbi +8 -0
- data/rbi/context_dev/models/monitor_list_changes_response.rbi +2 -0
- data/rbi/context_dev/models/monitor_list_params.rbi +23 -31
- data/rbi/context_dev/models/monitor_list_response.rbi +30 -9
- data/rbi/context_dev/models/monitor_list_runs_params.rbi +7 -6
- data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +2 -0
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +30 -9
- data/rbi/context_dev/models/monitor_update_params.rbi +30 -9
- data/rbi/context_dev/models/monitor_update_response.rbi +30 -9
- data/rbi/context_dev/models/parse_handle_params.rbi +400 -46
- data/rbi/context_dev/models/utility_prefetch_params.rbi +11 -0
- data/rbi/context_dev/models/web_extract_competitors_params.rbi +15 -0
- data/rbi/context_dev/models/web_extract_fonts_params.rbi +19 -7
- data/rbi/context_dev/models/web_extract_params.rbi +26 -0
- data/rbi/context_dev/models/web_extract_styleguide_params.rbi +19 -7
- data/rbi/context_dev/models/web_screenshot_params.rbi +108 -37
- data/rbi/context_dev/models/web_screenshot_response.rbi +4 -2
- data/rbi/context_dev/models/web_search_params.rbi +11 -0
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +53 -0
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +554 -49
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +182 -0
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +426 -30
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +742 -61
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +180 -0
- data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +82 -0
- data/rbi/context_dev/models.rbi +18 -0
- data/rbi/context_dev/resources/ai.rbi +3 -0
- data/rbi/context_dev/resources/batch.rbi +120 -0
- data/rbi/context_dev/resources/brand.rbi +9 -1
- data/rbi/context_dev/resources/industry.rbi +10 -0
- data/rbi/context_dev/resources/monitors.rbi +67 -23
- data/rbi/context_dev/resources/parse.rbi +46 -19
- data/rbi/context_dev/resources/utility.rbi +3 -0
- data/rbi/context_dev/resources/web.rbi +224 -48
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/ai_extract_product_params.rbs +12 -1
- data/sig/context_dev/models/ai_extract_products_params.rbs +14 -0
- data/sig/context_dev/models/batch_cancel_params.rbs +23 -0
- data/sig/context_dev/models/batch_cancel_response.rbs +266 -0
- data/sig/context_dev/models/batch_get_results_params.rbs +36 -0
- data/sig/context_dev/models/batch_get_results_response.rbs +399 -0
- data/sig/context_dev/models/batch_list_params.rbs +94 -0
- data/sig/context_dev/models/batch_list_response.rbs +304 -0
- data/sig/context_dev/models/batch_retrieve_params.rbs +23 -0
- data/sig/context_dev/models/batch_retrieve_response.rbs +290 -0
- data/sig/context_dev/models/batch_submit_params.rbs +52 -0
- data/sig/context_dev/models/batch_submit_response.rbs +542 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +97 -51
- data/sig/context_dev/models/brand_retrieve_response.rbs +2 -2
- data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +34 -5
- data/sig/context_dev/models/error.rbs +15 -0
- data/sig/context_dev/models/error_count.rbs +15 -0
- data/sig/context_dev/models/industry_retrieve_naics_params.rbs +7 -0
- data/sig/context_dev/models/industry_retrieve_sic_params.rbs +7 -0
- data/sig/context_dev/models/monitor_create_params.rbs +117 -97
- data/sig/context_dev/models/monitor_create_response.rbs +18 -1
- data/sig/context_dev/models/monitor_get_credit_usage_params.rbs +32 -0
- data/sig/context_dev/models/monitor_get_credit_usage_response.rbs +52 -0
- data/sig/context_dev/models/monitor_get_limits_params.rbs +15 -0
- data/sig/context_dev/models/monitor_get_limits_response.rbs +43 -0
- data/sig/context_dev/models/monitor_list_params.rbs +8 -14
- data/sig/context_dev/models/monitor_list_response.rbs +13 -1
- data/sig/context_dev/models/monitor_retrieve_response.rbs +13 -1
- data/sig/context_dev/models/monitor_update_params.rbs +13 -1
- data/sig/context_dev/models/monitor_update_response.rbs +13 -1
- data/sig/context_dev/models/parse_handle_params.rbs +124 -25
- data/sig/context_dev/models/utility_prefetch_params.rbs +7 -0
- data/sig/context_dev/models/web_extract_competitors_params.rbs +12 -1
- data/sig/context_dev/models/web_extract_fonts_params.rbs +10 -5
- data/sig/context_dev/models/web_extract_params.rbs +14 -0
- data/sig/context_dev/models/web_extract_styleguide_params.rbs +10 -5
- data/sig/context_dev/models/web_screenshot_params.rbs +41 -20
- data/sig/context_dev/models/web_search_params.rbs +7 -0
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +28 -1
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +175 -47
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +85 -0
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +128 -38
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +229 -62
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +85 -0
- data/sig/context_dev/models/web_web_scrape_sitemap_params.rbs +35 -1
- data/sig/context_dev/models.rbs +18 -0
- data/sig/context_dev/resources/ai.rbs +1 -0
- data/sig/context_dev/resources/batch.rbs +41 -0
- data/sig/context_dev/resources/brand.rbs +3 -1
- data/sig/context_dev/resources/industry.rbs +2 -0
- data/sig/context_dev/resources/monitors.rbs +14 -4
- data/sig/context_dev/resources/parse.rbs +8 -5
- data/sig/context_dev/resources/utility.rbs +1 -0
- data/sig/context_dev/resources/web.rbs +47 -26
- metadata +53 -2
|
@@ -7,31 +7,23 @@ module ContextDev
|
|
|
7
7
|
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include ContextDev::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!attribute change_detection
|
|
11
|
-
# Discriminated union describing how changes are detected.
|
|
12
|
-
#
|
|
13
|
-
# @return [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic]
|
|
14
|
-
required :change_detection, union: -> { ContextDev::MonitorCreateParams::ChangeDetection }
|
|
15
|
-
|
|
16
10
|
# @!attribute name
|
|
17
11
|
#
|
|
18
12
|
# @return [String]
|
|
19
13
|
required :name, String
|
|
20
14
|
|
|
21
|
-
# @!attribute schedule
|
|
22
|
-
# Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
|
|
23
|
-
# every 6 hours or every 2 days. The total interval (frequency × unit) must be
|
|
24
|
-
# between 10 minutes and 1 year.
|
|
25
|
-
#
|
|
26
|
-
# @return [ContextDev::Models::MonitorCreateParams::Schedule]
|
|
27
|
-
required :schedule, -> { ContextDev::MonitorCreateParams::Schedule }
|
|
28
|
-
|
|
29
15
|
# @!attribute target
|
|
30
16
|
# Discriminated union describing what the monitor watches.
|
|
31
17
|
#
|
|
32
18
|
# @return [ContextDev::Models::MonitorCreateParams::Target::Page, ContextDev::Models::MonitorCreateParams::Target::Sitemap, ContextDev::Models::MonitorCreateParams::Target::Extract]
|
|
33
19
|
required :target, union: -> { ContextDev::MonitorCreateParams::Target }
|
|
34
20
|
|
|
21
|
+
# @!attribute change_detection
|
|
22
|
+
# Discriminated union describing how changes are detected.
|
|
23
|
+
#
|
|
24
|
+
# @return [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic, nil]
|
|
25
|
+
optional :change_detection, union: -> { ContextDev::MonitorCreateParams::ChangeDetection }
|
|
26
|
+
|
|
35
27
|
# @!attribute mode
|
|
36
28
|
# Top-level monitor category. Always `web` today; the concrete behavior is
|
|
37
29
|
# described by `target` and `change_detection`.
|
|
@@ -39,8 +31,17 @@ module ContextDev
|
|
|
39
31
|
# @return [Symbol, ContextDev::Models::MonitorCreateParams::Mode, nil]
|
|
40
32
|
optional :mode, enum: -> { ContextDev::MonitorCreateParams::Mode }
|
|
41
33
|
|
|
34
|
+
# @!attribute schedule
|
|
35
|
+
# Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
|
|
36
|
+
# every 6 hours or every 2 days. The total interval (frequency × unit) must be
|
|
37
|
+
# between 10 minutes and 1 year.
|
|
38
|
+
#
|
|
39
|
+
# @return [ContextDev::Models::MonitorCreateParams::Schedule, nil]
|
|
40
|
+
optional :schedule, -> { ContextDev::MonitorCreateParams::Schedule }
|
|
41
|
+
|
|
42
42
|
# @!attribute tags
|
|
43
43
|
# User-defined tags for grouping and filtering monitors and their changes.
|
|
44
|
+
# Duplicates are removed.
|
|
44
45
|
#
|
|
45
46
|
# @return [Array<String>, nil]
|
|
46
47
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
@@ -50,138 +51,33 @@ module ContextDev
|
|
|
50
51
|
# @return [ContextDev::Models::MonitorCreateParams::Webhook, nil]
|
|
51
52
|
optional :webhook, -> { ContextDev::MonitorCreateParams::Webhook }, nil?: true
|
|
52
53
|
|
|
53
|
-
# @!method initialize(
|
|
54
|
+
# @!method initialize(name:, target:, change_detection: nil, mode: nil, schedule: nil, tags: nil, webhook: nil, request_options: {})
|
|
54
55
|
# Some parameter documentations has been truncated, see
|
|
55
56
|
# {ContextDev::Models::MonitorCreateParams} for more details.
|
|
56
57
|
#
|
|
57
|
-
# @param change_detection [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic] Discriminated union describing how changes are detected.
|
|
58
|
-
#
|
|
59
58
|
# @param name [String]
|
|
60
59
|
#
|
|
61
|
-
# @param schedule [ContextDev::Models::MonitorCreateParams::Schedule] Run the monitor on a fixed interval defined by a frequency and a unit, e.g. ever
|
|
62
|
-
#
|
|
63
60
|
# @param target [ContextDev::Models::MonitorCreateParams::Target::Page, ContextDev::Models::MonitorCreateParams::Target::Sitemap, ContextDev::Models::MonitorCreateParams::Target::Extract] Discriminated union describing what the monitor watches.
|
|
64
61
|
#
|
|
62
|
+
# @param change_detection [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic] Discriminated union describing how changes are detected.
|
|
63
|
+
#
|
|
65
64
|
# @param mode [Symbol, ContextDev::Models::MonitorCreateParams::Mode] Top-level monitor category. Always `web` today; the concrete behavior is describ
|
|
66
65
|
#
|
|
67
|
-
# @param
|
|
66
|
+
# @param schedule [ContextDev::Models::MonitorCreateParams::Schedule] Run the monitor on a fixed interval defined by a frequency and a unit, e.g. ever
|
|
67
|
+
#
|
|
68
|
+
# @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes. Duplica
|
|
68
69
|
#
|
|
69
70
|
# @param webhook [ContextDev::Models::MonitorCreateParams::Webhook, nil]
|
|
70
71
|
#
|
|
71
72
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
72
73
|
|
|
73
|
-
# Discriminated union describing how changes are detected.
|
|
74
|
-
module ChangeDetection
|
|
75
|
-
extend ContextDev::Internal::Type::Union
|
|
76
|
-
|
|
77
|
-
discriminator :type
|
|
78
|
-
|
|
79
|
-
# Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
|
|
80
|
-
variant :exact, -> { ContextDev::MonitorCreateParams::ChangeDetection::Exact }
|
|
81
|
-
|
|
82
|
-
# Detect meaning-level changes to tracked page content, ignoring cosmetic or paraphrase-only differences. Which changes are meaningful is judged against the extract target's `instructions` (and `schema`, when provided).
|
|
83
|
-
variant :semantic, -> { ContextDev::MonitorCreateParams::ChangeDetection::Semantic }
|
|
84
|
-
|
|
85
|
-
class Exact < ContextDev::Internal::Type::BaseModel
|
|
86
|
-
# @!attribute type
|
|
87
|
-
#
|
|
88
|
-
# @return [Symbol, :exact]
|
|
89
|
-
required :type, const: :exact
|
|
90
|
-
|
|
91
|
-
# @!method initialize(type: :exact)
|
|
92
|
-
# Detect exact changes. For page targets, this means visible text diffs. For
|
|
93
|
-
# sitemap targets, this means URL additions and removals.
|
|
94
|
-
#
|
|
95
|
-
# @param type [Symbol, :exact]
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
class Semantic < ContextDev::Internal::Type::BaseModel
|
|
99
|
-
# @!attribute type
|
|
100
|
-
#
|
|
101
|
-
# @return [Symbol, :semantic]
|
|
102
|
-
required :type, const: :semantic
|
|
103
|
-
|
|
104
|
-
# @!attribute confidence_threshold
|
|
105
|
-
#
|
|
106
|
-
# @return [Float, nil]
|
|
107
|
-
optional :confidence_threshold, Float
|
|
108
|
-
|
|
109
|
-
# @!method initialize(confidence_threshold: nil, type: :semantic)
|
|
110
|
-
# Detect meaning-level changes to tracked page content, ignoring cosmetic or
|
|
111
|
-
# paraphrase-only differences. Which changes are meaningful is judged against the
|
|
112
|
-
# extract target's `instructions` (and `schema`, when provided).
|
|
113
|
-
#
|
|
114
|
-
# @param confidence_threshold [Float]
|
|
115
|
-
# @param type [Symbol, :semantic]
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
# @!method self.variants
|
|
119
|
-
# @return [Array(ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic)]
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
class Schedule < ContextDev::Internal::Type::BaseModel
|
|
123
|
-
# @!attribute frequency
|
|
124
|
-
# Number of units between runs. The resulting interval (frequency × unit) must be
|
|
125
|
-
# at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes;
|
|
126
|
-
# maximum 365 when unit is days).
|
|
127
|
-
#
|
|
128
|
-
# @return [Integer]
|
|
129
|
-
required :frequency, Integer
|
|
130
|
-
|
|
131
|
-
# @!attribute type
|
|
132
|
-
#
|
|
133
|
-
# @return [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Type]
|
|
134
|
-
required :type, enum: -> { ContextDev::MonitorCreateParams::Schedule::Type }
|
|
135
|
-
|
|
136
|
-
# @!attribute unit
|
|
137
|
-
#
|
|
138
|
-
# @return [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Unit]
|
|
139
|
-
required :unit, enum: -> { ContextDev::MonitorCreateParams::Schedule::Unit }
|
|
140
|
-
|
|
141
|
-
# @!method initialize(frequency:, type:, unit:)
|
|
142
|
-
# Some parameter documentations has been truncated, see
|
|
143
|
-
# {ContextDev::Models::MonitorCreateParams::Schedule} for more details.
|
|
144
|
-
#
|
|
145
|
-
# Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
|
|
146
|
-
# every 6 hours or every 2 days. The total interval (frequency × unit) must be
|
|
147
|
-
# between 10 minutes and 1 year.
|
|
148
|
-
#
|
|
149
|
-
# @param frequency [Integer] Number of units between runs. The resulting interval (frequency × unit) must be
|
|
150
|
-
#
|
|
151
|
-
# @param type [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Type]
|
|
152
|
-
#
|
|
153
|
-
# @param unit [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Unit]
|
|
154
|
-
|
|
155
|
-
# @see ContextDev::Models::MonitorCreateParams::Schedule#type
|
|
156
|
-
module Type
|
|
157
|
-
extend ContextDev::Internal::Type::Enum
|
|
158
|
-
|
|
159
|
-
INTERVAL = :interval
|
|
160
|
-
|
|
161
|
-
# @!method self.values
|
|
162
|
-
# @return [Array<Symbol>]
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
# @see ContextDev::Models::MonitorCreateParams::Schedule#unit
|
|
166
|
-
module Unit
|
|
167
|
-
extend ContextDev::Internal::Type::Enum
|
|
168
|
-
|
|
169
|
-
MINUTES = :minutes
|
|
170
|
-
HOURS = :hours
|
|
171
|
-
DAYS = :days
|
|
172
|
-
|
|
173
|
-
# @!method self.values
|
|
174
|
-
# @return [Array<Symbol>]
|
|
175
|
-
end
|
|
176
|
-
end
|
|
177
|
-
|
|
178
74
|
# Discriminated union describing what the monitor watches.
|
|
179
75
|
module Target
|
|
180
76
|
extend ContextDev::Internal::Type::Union
|
|
181
77
|
|
|
182
78
|
discriminator :type
|
|
183
79
|
|
|
184
|
-
# Watch a single web page.
|
|
80
|
+
# Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.
|
|
185
81
|
variant :page, -> { ContextDev::MonitorCreateParams::Target::Page }
|
|
186
82
|
|
|
187
83
|
# Watch a sitemap for URL additions and removals. Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
|
|
@@ -201,17 +97,30 @@ module ContextDev
|
|
|
201
97
|
# @return [String]
|
|
202
98
|
required :url, String
|
|
203
99
|
|
|
100
|
+
# @!attribute instructions
|
|
101
|
+
# Plain-language goal describing which page changes matter. When provided without
|
|
102
|
+
# change_detection, semantic detection is inferred.
|
|
103
|
+
#
|
|
104
|
+
# @return [String, nil]
|
|
105
|
+
optional :instructions, String
|
|
106
|
+
|
|
204
107
|
# @!attribute normalize_whitespace
|
|
205
108
|
# Normalize whitespace before comparing or analyzing text.
|
|
206
109
|
#
|
|
207
110
|
# @return [Boolean, nil]
|
|
208
111
|
optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
|
|
209
112
|
|
|
210
|
-
# @!method initialize(url:, normalize_whitespace: nil, type: :page)
|
|
211
|
-
#
|
|
113
|
+
# @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
|
|
114
|
+
# Some parameter documentations has been truncated, see
|
|
115
|
+
# {ContextDev::Models::MonitorCreateParams::Target::Page} for more details.
|
|
116
|
+
#
|
|
117
|
+
# Watch a single web page. Exact detection reports visible-text diffs; semantic
|
|
118
|
+
# detection judges confirmed stable diffs against `instructions`.
|
|
212
119
|
#
|
|
213
120
|
# @param url [String]
|
|
214
121
|
#
|
|
122
|
+
# @param instructions [String] Plain-language goal describing which page changes matter. When provided without
|
|
123
|
+
#
|
|
215
124
|
# @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
|
|
216
125
|
#
|
|
217
126
|
# @param type [Symbol, :page]
|
|
@@ -230,13 +139,13 @@ module ContextDev
|
|
|
230
139
|
required :url, String
|
|
231
140
|
|
|
232
141
|
# @!attribute exclude
|
|
233
|
-
# URL path patterns to exclude.
|
|
142
|
+
# URL path patterns to exclude (max 50).
|
|
234
143
|
#
|
|
235
144
|
# @return [Array<String>, nil]
|
|
236
145
|
optional :exclude, ContextDev::Internal::Type::ArrayOf[String]
|
|
237
146
|
|
|
238
147
|
# @!attribute include
|
|
239
|
-
# URL path patterns to include.
|
|
148
|
+
# URL path patterns to include (max 50).
|
|
240
149
|
#
|
|
241
150
|
# @return [Array<String>, nil]
|
|
242
151
|
optional :include, ContextDev::Internal::Type::ArrayOf[String]
|
|
@@ -256,9 +165,9 @@ module ContextDev
|
|
|
256
165
|
#
|
|
257
166
|
# @param url [String] Sitemap URL to monitor.
|
|
258
167
|
#
|
|
259
|
-
# @param exclude [Array<String>] URL path patterns to exclude.
|
|
168
|
+
# @param exclude [Array<String>] URL path patterns to exclude (max 50).
|
|
260
169
|
#
|
|
261
|
-
# @param include [Array<String>] URL path patterns to include.
|
|
170
|
+
# @param include [Array<String>] URL path patterns to include (max 50).
|
|
262
171
|
#
|
|
263
172
|
# @param max_urls [Integer] Maximum number of sitemap URLs to track (capped at 10,000).
|
|
264
173
|
#
|
|
@@ -343,6 +252,56 @@ module ContextDev
|
|
|
343
252
|
# @return [Array(ContextDev::Models::MonitorCreateParams::Target::Page, ContextDev::Models::MonitorCreateParams::Target::Sitemap, ContextDev::Models::MonitorCreateParams::Target::Extract)]
|
|
344
253
|
end
|
|
345
254
|
|
|
255
|
+
# Discriminated union describing how changes are detected.
|
|
256
|
+
module ChangeDetection
|
|
257
|
+
extend ContextDev::Internal::Type::Union
|
|
258
|
+
|
|
259
|
+
discriminator :type
|
|
260
|
+
|
|
261
|
+
# Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
|
|
262
|
+
variant :exact, -> { ContextDev::MonitorCreateParams::ChangeDetection::Exact }
|
|
263
|
+
|
|
264
|
+
# Detect meaning-level changes to page content, ignoring cosmetic or instruction-irrelevant differences. Which changes are meaningful is judged against the page or extract target's `instructions` (and an extract target's `schema`, when provided).
|
|
265
|
+
variant :semantic, -> { ContextDev::MonitorCreateParams::ChangeDetection::Semantic }
|
|
266
|
+
|
|
267
|
+
class Exact < ContextDev::Internal::Type::BaseModel
|
|
268
|
+
# @!attribute type
|
|
269
|
+
#
|
|
270
|
+
# @return [Symbol, :exact]
|
|
271
|
+
required :type, const: :exact
|
|
272
|
+
|
|
273
|
+
# @!method initialize(type: :exact)
|
|
274
|
+
# Detect exact changes. For page targets, this means visible text diffs. For
|
|
275
|
+
# sitemap targets, this means URL additions and removals.
|
|
276
|
+
#
|
|
277
|
+
# @param type [Symbol, :exact]
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
class Semantic < ContextDev::Internal::Type::BaseModel
|
|
281
|
+
# @!attribute type
|
|
282
|
+
#
|
|
283
|
+
# @return [Symbol, :semantic]
|
|
284
|
+
required :type, const: :semantic
|
|
285
|
+
|
|
286
|
+
# @!attribute confidence_threshold
|
|
287
|
+
#
|
|
288
|
+
# @return [Float, nil]
|
|
289
|
+
optional :confidence_threshold, Float
|
|
290
|
+
|
|
291
|
+
# @!method initialize(confidence_threshold: nil, type: :semantic)
|
|
292
|
+
# Detect meaning-level changes to page content, ignoring cosmetic or
|
|
293
|
+
# instruction-irrelevant differences. Which changes are meaningful is judged
|
|
294
|
+
# against the page or extract target's `instructions` (and an extract target's
|
|
295
|
+
# `schema`, when provided).
|
|
296
|
+
#
|
|
297
|
+
# @param confidence_threshold [Float]
|
|
298
|
+
# @param type [Symbol, :semantic]
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# @!method self.variants
|
|
302
|
+
# @return [Array(ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic)]
|
|
303
|
+
end
|
|
304
|
+
|
|
346
305
|
# Top-level monitor category. Always `web` today; the concrete behavior is
|
|
347
306
|
# described by `target` and `change_detection`.
|
|
348
307
|
module Mode
|
|
@@ -354,6 +313,62 @@ module ContextDev
|
|
|
354
313
|
# @return [Array<Symbol>]
|
|
355
314
|
end
|
|
356
315
|
|
|
316
|
+
class Schedule < ContextDev::Internal::Type::BaseModel
|
|
317
|
+
# @!attribute frequency
|
|
318
|
+
# Number of units between runs. The resulting interval (frequency × unit) must be
|
|
319
|
+
# at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes;
|
|
320
|
+
# maximum 365 when unit is days).
|
|
321
|
+
#
|
|
322
|
+
# @return [Integer]
|
|
323
|
+
required :frequency, Integer
|
|
324
|
+
|
|
325
|
+
# @!attribute type
|
|
326
|
+
#
|
|
327
|
+
# @return [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Type]
|
|
328
|
+
required :type, enum: -> { ContextDev::MonitorCreateParams::Schedule::Type }
|
|
329
|
+
|
|
330
|
+
# @!attribute unit
|
|
331
|
+
#
|
|
332
|
+
# @return [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Unit]
|
|
333
|
+
required :unit, enum: -> { ContextDev::MonitorCreateParams::Schedule::Unit }
|
|
334
|
+
|
|
335
|
+
# @!method initialize(frequency:, type:, unit:)
|
|
336
|
+
# Some parameter documentations has been truncated, see
|
|
337
|
+
# {ContextDev::Models::MonitorCreateParams::Schedule} for more details.
|
|
338
|
+
#
|
|
339
|
+
# Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
|
|
340
|
+
# every 6 hours or every 2 days. The total interval (frequency × unit) must be
|
|
341
|
+
# between 10 minutes and 1 year.
|
|
342
|
+
#
|
|
343
|
+
# @param frequency [Integer] Number of units between runs. The resulting interval (frequency × unit) must be
|
|
344
|
+
#
|
|
345
|
+
# @param type [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Type]
|
|
346
|
+
#
|
|
347
|
+
# @param unit [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Unit]
|
|
348
|
+
|
|
349
|
+
# @see ContextDev::Models::MonitorCreateParams::Schedule#type
|
|
350
|
+
module Type
|
|
351
|
+
extend ContextDev::Internal::Type::Enum
|
|
352
|
+
|
|
353
|
+
INTERVAL = :interval
|
|
354
|
+
|
|
355
|
+
# @!method self.values
|
|
356
|
+
# @return [Array<Symbol>]
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
# @see ContextDev::Models::MonitorCreateParams::Schedule#unit
|
|
360
|
+
module Unit
|
|
361
|
+
extend ContextDev::Internal::Type::Enum
|
|
362
|
+
|
|
363
|
+
MINUTES = :minutes
|
|
364
|
+
HOURS = :hours
|
|
365
|
+
DAYS = :days
|
|
366
|
+
|
|
367
|
+
# @!method self.values
|
|
368
|
+
# @return [Array<Symbol>]
|
|
369
|
+
end
|
|
370
|
+
end
|
|
371
|
+
|
|
357
372
|
class Webhook < ContextDev::Internal::Type::BaseModel
|
|
358
373
|
# @!attribute url
|
|
359
374
|
# Webhook URL events are delivered to.
|
|
@@ -20,6 +20,14 @@ module ContextDev
|
|
|
20
20
|
# @return [Time]
|
|
21
21
|
required :created_at, Time
|
|
22
22
|
|
|
23
|
+
# @!attribute initial_run_id
|
|
24
|
+
# The baseline run queued by this create call, or null if it could not be queued
|
|
25
|
+
# immediately (in which case the baseline runs on the next scheduled tick). Poll
|
|
26
|
+
# GET /monitors/{monitor_id}/runs/{run_id}.
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
required :initial_run_id, String, nil?: true
|
|
30
|
+
|
|
23
31
|
# @!attribute mode
|
|
24
32
|
# Top-level monitor category. Always `web` today; the concrete behavior is
|
|
25
33
|
# described by `target` and `change_detection`.
|
|
@@ -94,6 +102,7 @@ module ContextDev
|
|
|
94
102
|
|
|
95
103
|
# @!attribute tags
|
|
96
104
|
# User-defined tags for grouping and filtering monitors and their changes.
|
|
105
|
+
# Duplicates are removed.
|
|
97
106
|
#
|
|
98
107
|
# @return [Array<String>, nil]
|
|
99
108
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
@@ -111,12 +120,12 @@ module ContextDev
|
|
|
111
120
|
# @return [ContextDev::Models::MonitorCreateResponse::WebhookFailure, nil]
|
|
112
121
|
optional :webhook_failure, -> { ContextDev::Models::MonitorCreateResponse::WebhookFailure }, nil?: true
|
|
113
122
|
|
|
114
|
-
# @!method initialize(id:, change_detection:, created_at:, mode:, name:, schedule:, status:, target:, updated_at:, baseline: nil, last_change_at: nil, last_error: nil, last_run_at: nil, next_run_at: nil, tags: nil, webhook: nil, webhook_failure: nil)
|
|
123
|
+
# @!method initialize(id:, change_detection:, created_at:, initial_run_id:, mode:, name:, schedule:, status:, target:, updated_at:, baseline: nil, last_change_at: nil, last_error: nil, last_run_at: nil, next_run_at: nil, tags: nil, webhook: nil, webhook_failure: nil)
|
|
115
124
|
# Some parameter documentations has been truncated, see
|
|
116
125
|
# {ContextDev::Models::MonitorCreateResponse} for more details.
|
|
117
126
|
#
|
|
118
|
-
# A
|
|
119
|
-
#
|
|
127
|
+
# A newly created monitor plus `initial_run_id`, the id of the baseline run queued
|
|
128
|
+
# at creation.
|
|
120
129
|
#
|
|
121
130
|
# @param id [String]
|
|
122
131
|
#
|
|
@@ -124,6 +133,8 @@ module ContextDev
|
|
|
124
133
|
#
|
|
125
134
|
# @param created_at [Time]
|
|
126
135
|
#
|
|
136
|
+
# @param initial_run_id [String, nil] The baseline run queued by this create call, or null if it could not be queued i
|
|
137
|
+
#
|
|
127
138
|
# @param mode [Symbol, ContextDev::Models::MonitorCreateResponse::Mode] Top-level monitor category. Always `web` today; the concrete behavior is describ
|
|
128
139
|
#
|
|
129
140
|
# @param name [String]
|
|
@@ -146,7 +157,7 @@ module ContextDev
|
|
|
146
157
|
#
|
|
147
158
|
# @param next_run_at [Time, nil] When the next scheduled run is due.
|
|
148
159
|
#
|
|
149
|
-
# @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
|
|
160
|
+
# @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes. Duplica
|
|
150
161
|
#
|
|
151
162
|
# @param webhook [ContextDev::Models::MonitorCreateResponse::Webhook, nil]
|
|
152
163
|
#
|
|
@@ -163,7 +174,7 @@ module ContextDev
|
|
|
163
174
|
# Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
|
|
164
175
|
variant :exact, -> { ContextDev::Models::MonitorCreateResponse::ChangeDetection::Exact }
|
|
165
176
|
|
|
166
|
-
# Detect meaning-level changes to
|
|
177
|
+
# Detect meaning-level changes to page content, ignoring cosmetic or instruction-irrelevant differences. Which changes are meaningful is judged against the page or extract target's `instructions` (and an extract target's `schema`, when provided).
|
|
167
178
|
variant :semantic, -> { ContextDev::Models::MonitorCreateResponse::ChangeDetection::Semantic }
|
|
168
179
|
|
|
169
180
|
class Exact < ContextDev::Internal::Type::BaseModel
|
|
@@ -191,9 +202,10 @@ module ContextDev
|
|
|
191
202
|
optional :confidence_threshold, Float
|
|
192
203
|
|
|
193
204
|
# @!method initialize(confidence_threshold: nil, type: :semantic)
|
|
194
|
-
# Detect meaning-level changes to
|
|
195
|
-
#
|
|
196
|
-
# extract target's `instructions` (and
|
|
205
|
+
# Detect meaning-level changes to page content, ignoring cosmetic or
|
|
206
|
+
# instruction-irrelevant differences. Which changes are meaningful is judged
|
|
207
|
+
# against the page or extract target's `instructions` (and an extract target's
|
|
208
|
+
# `schema`, when provided).
|
|
197
209
|
#
|
|
198
210
|
# @param confidence_threshold [Float]
|
|
199
211
|
# @param type [Symbol, :semantic]
|
|
@@ -299,7 +311,7 @@ module ContextDev
|
|
|
299
311
|
|
|
300
312
|
discriminator :type
|
|
301
313
|
|
|
302
|
-
# Watch a single web page.
|
|
314
|
+
# Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.
|
|
303
315
|
variant :page, -> { ContextDev::Models::MonitorCreateResponse::Target::Page }
|
|
304
316
|
|
|
305
317
|
# Watch a sitemap for URL additions and removals. Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
|
|
@@ -319,17 +331,30 @@ module ContextDev
|
|
|
319
331
|
# @return [String]
|
|
320
332
|
required :url, String
|
|
321
333
|
|
|
334
|
+
# @!attribute instructions
|
|
335
|
+
# Plain-language goal describing which page changes matter. When provided without
|
|
336
|
+
# change_detection, semantic detection is inferred.
|
|
337
|
+
#
|
|
338
|
+
# @return [String, nil]
|
|
339
|
+
optional :instructions, String
|
|
340
|
+
|
|
322
341
|
# @!attribute normalize_whitespace
|
|
323
342
|
# Normalize whitespace before comparing or analyzing text.
|
|
324
343
|
#
|
|
325
344
|
# @return [Boolean, nil]
|
|
326
345
|
optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
|
|
327
346
|
|
|
328
|
-
# @!method initialize(url:, normalize_whitespace: nil, type: :page)
|
|
329
|
-
#
|
|
347
|
+
# @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
|
|
348
|
+
# Some parameter documentations has been truncated, see
|
|
349
|
+
# {ContextDev::Models::MonitorCreateResponse::Target::Page} for more details.
|
|
350
|
+
#
|
|
351
|
+
# Watch a single web page. Exact detection reports visible-text diffs; semantic
|
|
352
|
+
# detection judges confirmed stable diffs against `instructions`.
|
|
330
353
|
#
|
|
331
354
|
# @param url [String]
|
|
332
355
|
#
|
|
356
|
+
# @param instructions [String] Plain-language goal describing which page changes matter. When provided without
|
|
357
|
+
#
|
|
333
358
|
# @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
|
|
334
359
|
#
|
|
335
360
|
# @param type [Symbol, :page]
|
|
@@ -348,13 +373,13 @@ module ContextDev
|
|
|
348
373
|
required :url, String
|
|
349
374
|
|
|
350
375
|
# @!attribute exclude
|
|
351
|
-
# URL path patterns to exclude.
|
|
376
|
+
# URL path patterns to exclude (max 50).
|
|
352
377
|
#
|
|
353
378
|
# @return [Array<String>, nil]
|
|
354
379
|
optional :exclude, ContextDev::Internal::Type::ArrayOf[String]
|
|
355
380
|
|
|
356
381
|
# @!attribute include
|
|
357
|
-
# URL path patterns to include.
|
|
382
|
+
# URL path patterns to include (max 50).
|
|
358
383
|
#
|
|
359
384
|
# @return [Array<String>, nil]
|
|
360
385
|
optional :include, ContextDev::Internal::Type::ArrayOf[String]
|
|
@@ -374,9 +399,9 @@ module ContextDev
|
|
|
374
399
|
#
|
|
375
400
|
# @param url [String] Sitemap URL to monitor.
|
|
376
401
|
#
|
|
377
|
-
# @param exclude [Array<String>] URL path patterns to exclude.
|
|
402
|
+
# @param exclude [Array<String>] URL path patterns to exclude (max 50).
|
|
378
403
|
#
|
|
379
|
-
# @param include [Array<String>] URL path patterns to include.
|
|
404
|
+
# @param include [Array<String>] URL path patterns to include (max 50).
|
|
380
405
|
#
|
|
381
406
|
# @param max_urls [Integer] Maximum number of sitemap URLs to track (capped at 10,000).
|
|
382
407
|
#
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Monitors#get_credit_usage
|
|
6
|
+
class MonitorGetCreditUsageParams < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute since
|
|
11
|
+
# Only include items at or after this ISO 8601 timestamp.
|
|
12
|
+
#
|
|
13
|
+
# @return [Time, nil]
|
|
14
|
+
optional :since, Time
|
|
15
|
+
|
|
16
|
+
# @!attribute until_
|
|
17
|
+
# Only include items before this ISO 8601 timestamp.
|
|
18
|
+
#
|
|
19
|
+
# @return [Time, nil]
|
|
20
|
+
optional :until_, Time
|
|
21
|
+
|
|
22
|
+
# @!method initialize(since: nil, until_: nil, request_options: {})
|
|
23
|
+
# @param since [Time] Only include items at or after this ISO 8601 timestamp.
|
|
24
|
+
#
|
|
25
|
+
# @param until_ [Time] Only include items before this ISO 8601 timestamp.
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Monitors#get_credit_usage
|
|
6
|
+
class MonitorGetCreditUsageResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<ContextDev::Models::MonitorGetCreditUsageResponse::Data>]
|
|
10
|
+
required :data,
|
|
11
|
+
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::MonitorGetCreditUsageResponse::Data] }
|
|
12
|
+
|
|
13
|
+
# @!attribute total_credits
|
|
14
|
+
# Sum of credits across all monitors in the window.
|
|
15
|
+
#
|
|
16
|
+
# @return [Integer]
|
|
17
|
+
required :total_credits, Integer
|
|
18
|
+
|
|
19
|
+
# @!method initialize(data:, total_credits:)
|
|
20
|
+
# @param data [Array<ContextDev::Models::MonitorGetCreditUsageResponse::Data>]
|
|
21
|
+
#
|
|
22
|
+
# @param total_credits [Integer] Sum of credits across all monitors in the window.
|
|
23
|
+
|
|
24
|
+
class Data < ContextDev::Internal::Type::BaseModel
|
|
25
|
+
# @!attribute credits
|
|
26
|
+
# Credits charged to this monitor over the window.
|
|
27
|
+
#
|
|
28
|
+
# @return [Integer]
|
|
29
|
+
required :credits, Integer
|
|
30
|
+
|
|
31
|
+
# @!attribute monitor_id
|
|
32
|
+
#
|
|
33
|
+
# @return [String]
|
|
34
|
+
required :monitor_id, String
|
|
35
|
+
|
|
36
|
+
# @!attribute name
|
|
37
|
+
# Monitor name (falls back to the id when the monitor was deleted).
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
required :name, String
|
|
41
|
+
|
|
42
|
+
# @!attribute runs
|
|
43
|
+
# Number of billed runs over the window.
|
|
44
|
+
#
|
|
45
|
+
# @return [Integer]
|
|
46
|
+
required :runs, Integer
|
|
47
|
+
|
|
48
|
+
# @!method initialize(credits:, monitor_id:, name:, runs:)
|
|
49
|
+
# @param credits [Integer] Credits charged to this monitor over the window.
|
|
50
|
+
#
|
|
51
|
+
# @param monitor_id [String]
|
|
52
|
+
#
|
|
53
|
+
# @param name [String] Monitor name (falls back to the id when the monitor was deleted).
|
|
54
|
+
#
|
|
55
|
+
# @param runs [Integer] Number of billed runs over the window.
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Monitors#get_limits
|
|
6
|
+
class MonitorGetLimitsParams < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|