context.dev 2.16.0 → 2.17.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.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/models/ai_extract_product_params.rb +53 -8
  5. data/lib/context_dev/models/ai_extract_product_response.rb +10 -1
  6. data/lib/context_dev/models/ai_extract_products_params.rb +116 -16
  7. data/lib/context_dev/models/ai_extract_products_response.rb +11 -1
  8. data/lib/context_dev/models/brand_retrieve_params.rb +355 -60
  9. data/lib/context_dev/models/brand_retrieve_response.rb +10 -1
  10. data/lib/context_dev/models/brand_retrieve_simplified_params.rb +57 -11
  11. data/lib/context_dev/models/brand_retrieve_simplified_response.rb +10 -1
  12. data/lib/context_dev/models/industry_retrieve_naics_params.rb +53 -8
  13. data/lib/context_dev/models/industry_retrieve_naics_response.rb +10 -1
  14. data/lib/context_dev/models/industry_retrieve_sic_params.rb +53 -8
  15. data/lib/context_dev/models/industry_retrieve_sic_response.rb +10 -1
  16. data/lib/context_dev/models/monitor_create_params.rb +27 -3
  17. data/lib/context_dev/models/monitor_create_response.rb +30 -5
  18. data/lib/context_dev/models/monitor_list_response.rb +30 -5
  19. data/lib/context_dev/models/monitor_retrieve_response.rb +30 -5
  20. data/lib/context_dev/models/monitor_update_params.rb +27 -3
  21. data/lib/context_dev/models/monitor_update_response.rb +30 -5
  22. data/lib/context_dev/models/person_enrich_params.rb +53 -8
  23. data/lib/context_dev/models/person_enrich_response.rb +10 -1
  24. data/lib/context_dev/models/utility_prefetch_params.rb +48 -8
  25. data/lib/context_dev/models/web_answers_params.rb +124 -0
  26. data/lib/context_dev/models/web_answers_response.rb +68 -0
  27. data/lib/context_dev/models/web_extract_competitors_params.rb +53 -8
  28. data/lib/context_dev/models/web_extract_competitors_response.rb +10 -1
  29. data/lib/context_dev/models/web_extract_fonts_params.rb +58 -11
  30. data/lib/context_dev/models/web_extract_fonts_response.rb +32 -1
  31. data/lib/context_dev/models/web_extract_params.rb +53 -8
  32. data/lib/context_dev/models/web_extract_response.rb +10 -1
  33. data/lib/context_dev/models/web_extract_styleguide_params.rb +58 -11
  34. data/lib/context_dev/models/web_extract_styleguide_response.rb +32 -1
  35. data/lib/context_dev/models/web_screenshot_params.rb +58 -10
  36. data/lib/context_dev/models/web_screenshot_response.rb +32 -1
  37. data/lib/context_dev/models/web_search_params.rb +112 -16
  38. data/lib/context_dev/models/web_search_response.rb +43 -2
  39. data/lib/context_dev/models/web_web_crawl_md_params.rb +53 -8
  40. data/lib/context_dev/models/web_web_crawl_md_response.rb +11 -1
  41. data/lib/context_dev/models/web_web_scrape_bytes_params.rb +344 -0
  42. data/lib/context_dev/models/web_web_scrape_bytes_response.rb +135 -0
  43. data/lib/context_dev/models/web_web_scrape_html_params.rb +57 -10
  44. data/lib/context_dev/models/web_web_scrape_html_response.rb +32 -1
  45. data/lib/context_dev/models/web_web_scrape_images_params.rb +57 -10
  46. data/lib/context_dev/models/web_web_scrape_images_response.rb +42 -1
  47. data/lib/context_dev/models/web_web_scrape_md_params.rb +57 -10
  48. data/lib/context_dev/models/web_web_scrape_md_response.rb +32 -1
  49. data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +53 -8
  50. data/lib/context_dev/models/web_web_scrape_sitemap_response.rb +11 -1
  51. data/lib/context_dev/models.rb +4 -0
  52. data/lib/context_dev/resources/ai.rb +2 -2
  53. data/lib/context_dev/resources/brand.rb +3 -3
  54. data/lib/context_dev/resources/industry.rb +6 -6
  55. data/lib/context_dev/resources/people.rb +2 -2
  56. data/lib/context_dev/resources/utility.rb +2 -2
  57. data/lib/context_dev/resources/web.rb +119 -33
  58. data/lib/context_dev/version.rb +1 -1
  59. data/lib/context_dev.rb +4 -0
  60. data/rbi/context_dev/models/ai_extract_product_params.rbi +125 -13
  61. data/rbi/context_dev/models/ai_extract_product_response.rbi +13 -0
  62. data/rbi/context_dev/models/ai_extract_products_params.rbi +264 -26
  63. data/rbi/context_dev/models/ai_extract_products_response.rbi +15 -0
  64. data/rbi/context_dev/models/brand_retrieve_params.rbi +816 -102
  65. data/rbi/context_dev/models/brand_retrieve_response.rbi +13 -0
  66. data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +136 -19
  67. data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +13 -0
  68. data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +127 -13
  69. data/rbi/context_dev/models/industry_retrieve_naics_response.rbi +13 -0
  70. data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +127 -13
  71. data/rbi/context_dev/models/industry_retrieve_sic_response.rbi +13 -0
  72. data/rbi/context_dev/models/monitor_create_params.rbi +40 -2
  73. data/rbi/context_dev/models/monitor_create_response.rbi +44 -4
  74. data/rbi/context_dev/models/monitor_list_response.rbi +44 -4
  75. data/rbi/context_dev/models/monitor_retrieve_response.rbi +44 -4
  76. data/rbi/context_dev/models/monitor_update_params.rbi +40 -2
  77. data/rbi/context_dev/models/monitor_update_response.rbi +44 -4
  78. data/rbi/context_dev/models/person_enrich_params.rbi +123 -13
  79. data/rbi/context_dev/models/person_enrich_response.rbi +16 -3
  80. data/rbi/context_dev/models/utility_prefetch_params.rbi +112 -13
  81. data/rbi/context_dev/models/web_answers_params.rbi +234 -0
  82. data/rbi/context_dev/models/web_answers_response.rbi +122 -0
  83. data/rbi/context_dev/models/web_extract_competitors_params.rbi +127 -13
  84. data/rbi/context_dev/models/web_extract_competitors_response.rbi +16 -3
  85. data/rbi/context_dev/models/web_extract_fonts_params.rbi +132 -19
  86. data/rbi/context_dev/models/web_extract_fonts_response.rbi +71 -0
  87. data/rbi/context_dev/models/web_extract_params.rbi +120 -13
  88. data/rbi/context_dev/models/web_extract_response.rbi +16 -3
  89. data/rbi/context_dev/models/web_extract_styleguide_params.rbi +136 -19
  90. data/rbi/context_dev/models/web_extract_styleguide_response.rbi +71 -0
  91. data/rbi/context_dev/models/web_screenshot_params.rbi +132 -17
  92. data/rbi/context_dev/models/web_screenshot_response.rbi +71 -0
  93. data/rbi/context_dev/models/web_search_params.rbi +253 -26
  94. data/rbi/context_dev/models/web_search_response.rbi +92 -6
  95. data/rbi/context_dev/models/web_web_crawl_md_params.rbi +123 -13
  96. data/rbi/context_dev/models/web_web_crawl_md_response.rbi +19 -3
  97. data/rbi/context_dev/models/web_web_scrape_bytes_params.rbi +699 -0
  98. data/rbi/context_dev/models/web_web_scrape_bytes_response.rbi +238 -0
  99. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +132 -17
  100. data/rbi/context_dev/models/web_web_scrape_html_response.rbi +61 -0
  101. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +134 -17
  102. data/rbi/context_dev/models/web_web_scrape_images_response.rbi +89 -3
  103. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +130 -17
  104. data/rbi/context_dev/models/web_web_scrape_md_response.rbi +61 -0
  105. data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +127 -13
  106. data/rbi/context_dev/models/web_web_scrape_sitemap_response.rbi +18 -3
  107. data/rbi/context_dev/models.rbi +4 -0
  108. data/rbi/context_dev/resources/ai.rbi +5 -5
  109. data/rbi/context_dev/resources/brand.rbi +9 -8
  110. data/rbi/context_dev/resources/industry.rbi +12 -10
  111. data/rbi/context_dev/resources/people.rbi +5 -5
  112. data/rbi/context_dev/resources/utility.rbi +5 -5
  113. data/rbi/context_dev/resources/web.rbi +170 -72
  114. data/sig/context_dev/models/ai_extract_product_params.rbs +44 -5
  115. data/sig/context_dev/models/ai_extract_product_response.rbs +7 -0
  116. data/sig/context_dev/models/ai_extract_products_params.rbs +88 -10
  117. data/sig/context_dev/models/ai_extract_products_response.rbs +7 -0
  118. data/sig/context_dev/models/brand_retrieve_params.rbs +264 -30
  119. data/sig/context_dev/models/brand_retrieve_response.rbs +7 -0
  120. data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +44 -5
  121. data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +7 -0
  122. data/sig/context_dev/models/industry_retrieve_naics_params.rbs +44 -5
  123. data/sig/context_dev/models/industry_retrieve_naics_response.rbs +7 -0
  124. data/sig/context_dev/models/industry_retrieve_sic_params.rbs +44 -5
  125. data/sig/context_dev/models/industry_retrieve_sic_response.rbs +7 -0
  126. data/sig/context_dev/models/monitor_create_params.rbs +14 -0
  127. data/sig/context_dev/models/monitor_create_response.rbs +14 -0
  128. data/sig/context_dev/models/monitor_list_response.rbs +14 -0
  129. data/sig/context_dev/models/monitor_retrieve_response.rbs +14 -0
  130. data/sig/context_dev/models/monitor_update_params.rbs +14 -0
  131. data/sig/context_dev/models/monitor_update_response.rbs +14 -0
  132. data/sig/context_dev/models/person_enrich_params.rbs +44 -5
  133. data/sig/context_dev/models/person_enrich_response.rbs +10 -3
  134. data/sig/context_dev/models/utility_prefetch_params.rbs +43 -5
  135. data/sig/context_dev/models/web_answers_params.rbs +106 -0
  136. data/sig/context_dev/models/web_answers_response.rbs +60 -0
  137. data/sig/context_dev/models/web_extract_competitors_params.rbs +44 -5
  138. data/sig/context_dev/models/web_extract_competitors_response.rbs +10 -3
  139. data/sig/context_dev/models/web_extract_fonts_params.rbs +44 -5
  140. data/sig/context_dev/models/web_extract_fonts_response.rbs +20 -0
  141. data/sig/context_dev/models/web_extract_params.rbs +44 -5
  142. data/sig/context_dev/models/web_extract_response.rbs +10 -3
  143. data/sig/context_dev/models/web_extract_styleguide_params.rbs +44 -5
  144. data/sig/context_dev/models/web_extract_styleguide_response.rbs +20 -0
  145. data/sig/context_dev/models/web_screenshot_params.rbs +44 -5
  146. data/sig/context_dev/models/web_screenshot_response.rbs +20 -0
  147. data/sig/context_dev/models/web_search_params.rbs +88 -10
  148. data/sig/context_dev/models/web_search_response.rbs +33 -6
  149. data/sig/context_dev/models/web_web_crawl_md_params.rbs +44 -5
  150. data/sig/context_dev/models/web_web_crawl_md_response.rbs +10 -3
  151. data/sig/context_dev/models/web_web_scrape_bytes_params.rbs +531 -0
  152. data/sig/context_dev/models/web_web_scrape_bytes_response.rbs +108 -0
  153. data/sig/context_dev/models/web_web_scrape_html_params.rbs +44 -5
  154. data/sig/context_dev/models/web_web_scrape_html_response.rbs +16 -0
  155. data/sig/context_dev/models/web_web_scrape_images_params.rbs +44 -5
  156. data/sig/context_dev/models/web_web_scrape_images_response.rbs +30 -3
  157. data/sig/context_dev/models/web_web_scrape_md_params.rbs +44 -5
  158. data/sig/context_dev/models/web_web_scrape_md_response.rbs +16 -0
  159. data/sig/context_dev/models/web_web_scrape_sitemap_params.rbs +44 -5
  160. data/sig/context_dev/models/web_web_scrape_sitemap_response.rbs +10 -3
  161. data/sig/context_dev/models.rbs +4 -0
  162. data/sig/context_dev/resources/ai.rbs +1 -1
  163. data/sig/context_dev/resources/brand.rbs +1 -1
  164. data/sig/context_dev/resources/industry.rbs +2 -2
  165. data/sig/context_dev/resources/people.rbs +1 -1
  166. data/sig/context_dev/resources/utility.rbs +1 -1
  167. data/sig/context_dev/resources/web.rbs +30 -11
  168. metadata +14 -2
@@ -15,9 +15,9 @@ module ContextDev
15
15
 
16
16
  # @!attribute max_age_ms
17
17
  # Maximum age in milliseconds for cached brand data before the API performs a hard
18
- # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
19
- # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
20
- # year.
18
+ # refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
19
+ # refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
20
+ # are clamped to 1 year.
21
21
  #
22
22
  # @return [Integer, nil]
23
23
  optional :max_age_ms, Integer, nil?: true
@@ -35,15 +35,15 @@ module ContextDev
35
35
  # @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedParams::Theme, nil]
36
36
  optional :theme, enum: -> { ContextDev::BrandRetrieveSimplifiedParams::Theme }
37
37
 
38
- # @!attribute timeout_ms
39
- # Optional timeout in milliseconds for the request. If the request takes longer
40
- # than this value, it will be aborted with a 408 status code. Maximum allowed
41
- # value is 300000ms (5 minutes).
38
+ # @!attribute timeout_opts
39
+ # Optional request deadline and behavior on timeout. For GET requests, use
40
+ # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
41
+ # timeoutOpts object.
42
42
  #
43
- # @return [Integer, nil]
44
- optional :timeout_ms, Integer
43
+ # @return [ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts, nil]
44
+ optional :timeout_opts, -> { ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts }
45
45
 
46
- # @!method initialize(domain:, max_age_ms: nil, tags: nil, theme: nil, timeout_ms: nil, request_options: {})
46
+ # @!method initialize(domain:, max_age_ms: nil, tags: nil, theme: nil, timeout_opts: nil, request_options: {})
47
47
  # Some parameter documentations has been truncated, see
48
48
  # {ContextDev::Models::BrandRetrieveSimplifiedParams} for more details.
49
49
  #
@@ -55,7 +55,7 @@ module ContextDev
55
55
  #
56
56
  # @param theme [Symbol, ContextDev::Models::BrandRetrieveSimplifiedParams::Theme] Optional theme preference used when selecting brand assets.
57
57
  #
58
- # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
58
+ # @param timeout_opts [ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
59
59
  #
60
60
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
61
61
 
@@ -69,6 +69,52 @@ module ContextDev
69
69
  # @!method self.values
70
70
  # @return [Array<Symbol>]
71
71
  end
72
+
73
+ class TimeoutOpts < ContextDev::Internal::Type::BaseModel
74
+ # @!attribute milliseconds
75
+ # Request deadline in milliseconds. Maximum: 300000 (5 minutes).
76
+ #
77
+ # @return [Integer]
78
+ required :milliseconds, Integer
79
+
80
+ # @!attribute behavior
81
+ # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
82
+ # credits. "return-partial" returns usable results collected so far; if none are
83
+ # available, the request still fails without charging credits. Partial results are
84
+ # not cached as complete results.
85
+ #
86
+ # @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior, nil]
87
+ optional :behavior, enum: -> { ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior }
88
+
89
+ # @!method initialize(milliseconds:, behavior: nil)
90
+ # Some parameter documentations has been truncated, see
91
+ # {ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts} for more
92
+ # details.
93
+ #
94
+ # Optional request deadline and behavior on timeout. For GET requests, use
95
+ # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
96
+ # timeoutOpts object.
97
+ #
98
+ # @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
99
+ #
100
+ # @param behavior [Symbol, ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
101
+
102
+ # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
103
+ # credits. "return-partial" returns usable results collected so far; if none are
104
+ # available, the request still fails without charging credits. Partial results are
105
+ # not cached as complete results.
106
+ #
107
+ # @see ContextDev::Models::BrandRetrieveSimplifiedParams::TimeoutOpts#behavior
108
+ module Behavior
109
+ extend ContextDev::Internal::Type::Enum
110
+
111
+ FAIL = :fail
112
+ RETURN_PARTIAL = :"return-partial"
113
+
114
+ # @!method self.values
115
+ # @return [Array<Symbol>]
116
+ end
117
+ end
72
118
  end
73
119
  end
74
120
  end
@@ -37,13 +37,20 @@ module ContextDev
37
37
  # @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata, nil]
38
38
  optional :key_metadata, -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata }
39
39
 
40
+ # @!attribute partial
41
+ # True when the timeout ended processing and only completed brand data is
42
+ # returned.
43
+ #
44
+ # @return [Boolean, nil]
45
+ optional :partial, ContextDev::Internal::Type::Boolean
46
+
40
47
  # @!attribute status
41
48
  # Status of the response, e.g., 'ok'
42
49
  #
43
50
  # @return [String, nil]
44
51
  optional :status, String
45
52
 
46
- # @!method initialize(cache_metadata:, request_id:, brand: nil, code: nil, key_metadata: nil, status: nil)
53
+ # @!method initialize(cache_metadata:, request_id:, brand: nil, code: nil, key_metadata: nil, partial: nil, status: nil)
47
54
  # Some parameter documentations has been truncated, see
48
55
  # {ContextDev::Models::BrandRetrieveSimplifiedResponse} for more details.
49
56
  #
@@ -57,6 +64,8 @@ module ContextDev
57
64
  #
58
65
  # @param key_metadata [ContextDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
59
66
  #
67
+ # @param partial [Boolean] True when the timeout ended processing and only completed brand data is returned
68
+ #
60
69
  # @param status [String] Status of the response, e.g., 'ok'
61
70
 
62
71
  # @see ContextDev::Models::BrandRetrieveSimplifiedResponse#cache_metadata
@@ -35,15 +35,15 @@ module ContextDev
35
35
  # @return [Array<String>, nil]
36
36
  optional :tags, ContextDev::Internal::Type::ArrayOf[String]
37
37
 
38
- # @!attribute timeout_ms
39
- # Optional timeout in milliseconds for the request. If the request takes longer
40
- # than this value, it will be aborted with a 408 status code. Maximum allowed
41
- # value is 300000ms (5 minutes).
38
+ # @!attribute timeout_opts
39
+ # Optional request deadline and behavior on timeout. For GET requests, use
40
+ # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
41
+ # timeoutOpts object.
42
42
  #
43
- # @return [Integer, nil]
44
- optional :timeout_ms, Integer
43
+ # @return [ContextDev::Models::IndustryRetrieveNaicsParams::TimeoutOpts, nil]
44
+ optional :timeout_opts, -> { ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts }
45
45
 
46
- # @!method initialize(input:, max_results: nil, min_results: nil, tags: nil, timeout_ms: nil, request_options: {})
46
+ # @!method initialize(input:, max_results: nil, min_results: nil, tags: nil, timeout_opts: nil, request_options: {})
47
47
  # Some parameter documentations has been truncated, see
48
48
  # {ContextDev::Models::IndustryRetrieveNaicsParams} for more details.
49
49
  #
@@ -55,9 +55,54 @@ module ContextDev
55
55
  #
56
56
  # @param tags [Array<String>] Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 charac
57
57
  #
58
- # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
58
+ # @param timeout_opts [ContextDev::Models::IndustryRetrieveNaicsParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
59
59
  #
60
60
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
61
+
62
+ class TimeoutOpts < ContextDev::Internal::Type::BaseModel
63
+ # @!attribute milliseconds
64
+ # Request deadline in milliseconds. Maximum: 300000 (5 minutes).
65
+ #
66
+ # @return [Integer]
67
+ required :milliseconds, Integer
68
+
69
+ # @!attribute behavior
70
+ # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
71
+ # credits. "return-partial" returns usable results collected so far; if none are
72
+ # available, the request still fails without charging credits. Partial results are
73
+ # not cached as complete results.
74
+ #
75
+ # @return [Symbol, ContextDev::Models::IndustryRetrieveNaicsParams::TimeoutOpts::Behavior, nil]
76
+ optional :behavior, enum: -> { ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts::Behavior }
77
+
78
+ # @!method initialize(milliseconds:, behavior: nil)
79
+ # Some parameter documentations has been truncated, see
80
+ # {ContextDev::Models::IndustryRetrieveNaicsParams::TimeoutOpts} for more details.
81
+ #
82
+ # Optional request deadline and behavior on timeout. For GET requests, use
83
+ # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
84
+ # timeoutOpts object.
85
+ #
86
+ # @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
87
+ #
88
+ # @param behavior [Symbol, ContextDev::Models::IndustryRetrieveNaicsParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
89
+
90
+ # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
91
+ # credits. "return-partial" returns usable results collected so far; if none are
92
+ # available, the request still fails without charging credits. Partial results are
93
+ # not cached as complete results.
94
+ #
95
+ # @see ContextDev::Models::IndustryRetrieveNaicsParams::TimeoutOpts#behavior
96
+ module Behavior
97
+ extend ContextDev::Internal::Type::Enum
98
+
99
+ FAIL = :fail
100
+ RETURN_PARTIAL = :"return-partial"
101
+
102
+ # @!method self.values
103
+ # @return [Array<Symbol>]
104
+ end
105
+ end
61
106
  end
62
107
  end
63
108
  end
@@ -30,6 +30,13 @@ module ContextDev
30
30
  # @return [ContextDev::Models::IndustryRetrieveNaicsResponse::KeyMetadata, nil]
31
31
  optional :key_metadata, -> { ContextDev::Models::IndustryRetrieveNaicsResponse::KeyMetadata }
32
32
 
33
+ # @!attribute partial
34
+ # True when the timeout ended processing and this response contains only usable
35
+ # results completed so far. Unfinished results are omitted.
36
+ #
37
+ # @return [Boolean, nil]
38
+ optional :partial, ContextDev::Internal::Type::Boolean
39
+
33
40
  # @!attribute status
34
41
  # Status of the response, e.g., 'ok'
35
42
  #
@@ -42,7 +49,7 @@ module ContextDev
42
49
  # @return [String, nil]
43
50
  optional :type, String
44
51
 
45
- # @!method initialize(request_id:, codes: nil, domain: nil, key_metadata: nil, status: nil, type: nil)
52
+ # @!method initialize(request_id:, codes: nil, domain: nil, key_metadata: nil, partial: nil, status: nil, type: nil)
46
53
  # Some parameter documentations has been truncated, see
47
54
  # {ContextDev::Models::IndustryRetrieveNaicsResponse} for more details.
48
55
  #
@@ -54,6 +61,8 @@ module ContextDev
54
61
  #
55
62
  # @param key_metadata [ContextDev::Models::IndustryRetrieveNaicsResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
56
63
  #
64
+ # @param partial [Boolean] True when the timeout ended processing and this response contains only usable re
65
+ #
57
66
  # @param status [String] Status of the response, e.g., 'ok'
58
67
  #
59
68
  # @param type [String] Industry classification type, for naics api it will be `naics`
@@ -34,13 +34,13 @@ module ContextDev
34
34
  # @return [Array<String>, nil]
35
35
  optional :tags, ContextDev::Internal::Type::ArrayOf[String]
36
36
 
37
- # @!attribute timeout_ms
38
- # Optional timeout in milliseconds for the request. If the request takes longer
39
- # than this value, it will be aborted with a 408 status code. Maximum allowed
40
- # value is 300000ms (5 minutes).
37
+ # @!attribute timeout_opts
38
+ # Optional request deadline and behavior on timeout. For GET requests, use
39
+ # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
40
+ # timeoutOpts object.
41
41
  #
42
- # @return [Integer, nil]
43
- optional :timeout_ms, Integer
42
+ # @return [ContextDev::Models::IndustryRetrieveSicParams::TimeoutOpts, nil]
43
+ optional :timeout_opts, -> { ContextDev::IndustryRetrieveSicParams::TimeoutOpts }
44
44
 
45
45
  # @!attribute type
46
46
  # Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
@@ -50,7 +50,7 @@ module ContextDev
50
50
  # @return [Symbol, ContextDev::Models::IndustryRetrieveSicParams::Type, nil]
51
51
  optional :type, enum: -> { ContextDev::IndustryRetrieveSicParams::Type }
52
52
 
53
- # @!method initialize(input:, max_results: nil, min_results: nil, tags: nil, timeout_ms: nil, type: nil, request_options: {})
53
+ # @!method initialize(input:, max_results: nil, min_results: nil, tags: nil, timeout_opts: nil, type: nil, request_options: {})
54
54
  # Some parameter documentations has been truncated, see
55
55
  # {ContextDev::Models::IndustryRetrieveSicParams} for more details.
56
56
  #
@@ -62,12 +62,57 @@ module ContextDev
62
62
  #
63
63
  # @param tags [Array<String>] Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 charac
64
64
  #
65
- # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
65
+ # @param timeout_opts [ContextDev::Models::IndustryRetrieveSicParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
66
66
  #
67
67
  # @param type [Symbol, ContextDev::Models::IndustryRetrieveSicParams::Type] Which SIC dataset to classify against. `original_sic` uses the 1987 Standard Ind
68
68
  #
69
69
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
70
70
 
71
+ class TimeoutOpts < ContextDev::Internal::Type::BaseModel
72
+ # @!attribute milliseconds
73
+ # Request deadline in milliseconds. Maximum: 300000 (5 minutes).
74
+ #
75
+ # @return [Integer]
76
+ required :milliseconds, Integer
77
+
78
+ # @!attribute behavior
79
+ # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
80
+ # credits. "return-partial" returns usable results collected so far; if none are
81
+ # available, the request still fails without charging credits. Partial results are
82
+ # not cached as complete results.
83
+ #
84
+ # @return [Symbol, ContextDev::Models::IndustryRetrieveSicParams::TimeoutOpts::Behavior, nil]
85
+ optional :behavior, enum: -> { ContextDev::IndustryRetrieveSicParams::TimeoutOpts::Behavior }
86
+
87
+ # @!method initialize(milliseconds:, behavior: nil)
88
+ # Some parameter documentations has been truncated, see
89
+ # {ContextDev::Models::IndustryRetrieveSicParams::TimeoutOpts} for more details.
90
+ #
91
+ # Optional request deadline and behavior on timeout. For GET requests, use
92
+ # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
93
+ # timeoutOpts object.
94
+ #
95
+ # @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
96
+ #
97
+ # @param behavior [Symbol, ContextDev::Models::IndustryRetrieveSicParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
98
+
99
+ # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
100
+ # credits. "return-partial" returns usable results collected so far; if none are
101
+ # available, the request still fails without charging credits. Partial results are
102
+ # not cached as complete results.
103
+ #
104
+ # @see ContextDev::Models::IndustryRetrieveSicParams::TimeoutOpts#behavior
105
+ module Behavior
106
+ extend ContextDev::Internal::Type::Enum
107
+
108
+ FAIL = :fail
109
+ RETURN_PARTIAL = :"return-partial"
110
+
111
+ # @!method self.values
112
+ # @return [Array<Symbol>]
113
+ end
114
+ end
115
+
71
116
  # Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
72
117
  # Industrial Classification system; `latest_sec` uses the current SIC list as
73
118
  # published by the SEC. Defaults to `original_sic`.
@@ -38,6 +38,13 @@ module ContextDev
38
38
  # @return [ContextDev::Models::IndustryRetrieveSicResponse::KeyMetadata, nil]
39
39
  optional :key_metadata, -> { ContextDev::Models::IndustryRetrieveSicResponse::KeyMetadata }
40
40
 
41
+ # @!attribute partial
42
+ # True when the timeout ended processing and this response contains only usable
43
+ # results completed so far. Unfinished results are omitted.
44
+ #
45
+ # @return [Boolean, nil]
46
+ optional :partial, ContextDev::Internal::Type::Boolean
47
+
41
48
  # @!attribute status
42
49
  # Status of the response, e.g., 'ok'
43
50
  #
@@ -50,7 +57,7 @@ module ContextDev
50
57
  # @return [String, nil]
51
58
  optional :type, String
52
59
 
53
- # @!method initialize(request_id:, classification: nil, codes: nil, domain: nil, key_metadata: nil, status: nil, type: nil)
60
+ # @!method initialize(request_id:, classification: nil, codes: nil, domain: nil, key_metadata: nil, partial: nil, status: nil, type: nil)
54
61
  # Some parameter documentations has been truncated, see
55
62
  # {ContextDev::Models::IndustryRetrieveSicResponse} for more details.
56
63
  #
@@ -64,6 +71,8 @@ module ContextDev
64
71
  #
65
72
  # @param key_metadata [ContextDev::Models::IndustryRetrieveSicResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
66
73
  #
74
+ # @param partial [Boolean] True when the timeout ended processing and this response contains only usable re
75
+ #
67
76
  # @param status [String] Status of the response, e.g., 'ok'
68
77
  #
69
78
  # @param type [String] Industry classification type, for sic api it will be `sic`
@@ -97,6 +97,25 @@ module ContextDev
97
97
  # @return [String]
98
98
  required :url, String
99
99
 
100
+ # @!attribute exclude_selectors
101
+ # CSS selectors for HTML regions to remove before text extraction. Applied after
102
+ # include_selectors; exclusion takes precedence when an element matches both. Omit
103
+ # or pass an empty array to apply no explicit exclusions. Changing these selectors
104
+ # creates a new baseline.
105
+ #
106
+ # @return [Array<String>, nil]
107
+ optional :exclude_selectors, ContextDev::Internal::Type::ArrayOf[String]
108
+
109
+ # @!attribute include_selectors
110
+ # CSS selectors defining the HTML regions to monitor. Matching subtrees are
111
+ # combined in document order before text extraction, instead of automatic
112
+ # main-content selection. Omit or pass an empty array to use automatic
113
+ # main-content extraction. If the filtered page has no usable text, the run fails
114
+ # without replacing the baseline. Changing these selectors creates a new baseline.
115
+ #
116
+ # @return [Array<String>, nil]
117
+ optional :include_selectors, ContextDev::Internal::Type::ArrayOf[String]
118
+
100
119
  # @!attribute instructions
101
120
  # Plain-language goal describing which page changes matter. When provided without
102
121
  # change_detection, semantic detection is inferred.
@@ -110,7 +129,7 @@ module ContextDev
110
129
  # @return [Boolean, nil]
111
130
  optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
112
131
 
113
- # @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
132
+ # @!method initialize(url:, exclude_selectors: nil, include_selectors: nil, instructions: nil, normalize_whitespace: nil, type: :page)
114
133
  # Some parameter documentations has been truncated, see
115
134
  # {ContextDev::Models::MonitorCreateParams::Target::Page} for more details.
116
135
  #
@@ -119,6 +138,10 @@ module ContextDev
119
138
  #
120
139
  # @param url [String]
121
140
  #
141
+ # @param exclude_selectors [Array<String>] CSS selectors for HTML regions to remove before text extraction. Applied after i
142
+ #
143
+ # @param include_selectors [Array<String>] CSS selectors defining the HTML regions to monitor. Matching subtrees are combin
144
+ #
122
145
  # @param instructions [String] Plain-language goal describing which page changes matter. When provided without
123
146
  #
124
147
  # @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
@@ -371,7 +394,8 @@ module ContextDev
371
394
 
372
395
  class Webhook < ContextDev::Internal::Type::BaseModel
373
396
  # @!attribute url
374
- # Webhook URL events are delivered to.
397
+ # Webhook URL events are delivered to. Slack incoming webhook URLs are
398
+ # automatically formatted as Slack messages.
375
399
  #
376
400
  # @return [String]
377
401
  required :url, String
@@ -396,7 +420,7 @@ module ContextDev
396
420
  # Some parameter documentations has been truncated, see
397
421
  # {ContextDev::Models::MonitorCreateParams::Webhook} for more details.
398
422
  #
399
- # @param url [String] Webhook URL events are delivered to.
423
+ # @param url [String] Webhook URL events are delivered to. Slack incoming webhook URLs are automatical
400
424
  #
401
425
  # @param events [Array<Symbol, ContextDev::Models::MonitorCreateParams::Webhook::Event>] Events delivered to this endpoint. `change.detected` fires only when a run detec
402
426
  #
@@ -331,6 +331,25 @@ module ContextDev
331
331
  # @return [String]
332
332
  required :url, String
333
333
 
334
+ # @!attribute exclude_selectors
335
+ # CSS selectors for HTML regions to remove before text extraction. Applied after
336
+ # include_selectors; exclusion takes precedence when an element matches both. Omit
337
+ # or pass an empty array to apply no explicit exclusions. Changing these selectors
338
+ # creates a new baseline.
339
+ #
340
+ # @return [Array<String>, nil]
341
+ optional :exclude_selectors, ContextDev::Internal::Type::ArrayOf[String]
342
+
343
+ # @!attribute include_selectors
344
+ # CSS selectors defining the HTML regions to monitor. Matching subtrees are
345
+ # combined in document order before text extraction, instead of automatic
346
+ # main-content selection. Omit or pass an empty array to use automatic
347
+ # main-content extraction. If the filtered page has no usable text, the run fails
348
+ # without replacing the baseline. Changing these selectors creates a new baseline.
349
+ #
350
+ # @return [Array<String>, nil]
351
+ optional :include_selectors, ContextDev::Internal::Type::ArrayOf[String]
352
+
334
353
  # @!attribute instructions
335
354
  # Plain-language goal describing which page changes matter. When provided without
336
355
  # change_detection, semantic detection is inferred.
@@ -344,7 +363,7 @@ module ContextDev
344
363
  # @return [Boolean, nil]
345
364
  optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
346
365
 
347
- # @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
366
+ # @!method initialize(url:, exclude_selectors: nil, include_selectors: nil, instructions: nil, normalize_whitespace: nil, type: :page)
348
367
  # Some parameter documentations has been truncated, see
349
368
  # {ContextDev::Models::MonitorCreateResponse::Target::Page} for more details.
350
369
  #
@@ -353,6 +372,10 @@ module ContextDev
353
372
  #
354
373
  # @param url [String]
355
374
  #
375
+ # @param exclude_selectors [Array<String>] CSS selectors for HTML regions to remove before text extraction. Applied after i
376
+ #
377
+ # @param include_selectors [Array<String>] CSS selectors defining the HTML regions to monitor. Matching subtrees are combin
378
+ #
356
379
  # @param instructions [String] Plain-language goal describing which page changes matter. When provided without
357
380
  #
358
381
  # @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
@@ -618,7 +641,8 @@ module ContextDev
618
641
  # @see ContextDev::Models::MonitorCreateResponse#webhook
619
642
  class Webhook < ContextDev::Internal::Type::BaseModel
620
643
  # @!attribute url
621
- # Webhook URL events are delivered to.
644
+ # Webhook URL events are delivered to. Slack incoming webhook URLs are
645
+ # automatically formatted as Slack messages.
622
646
  #
623
647
  # @return [String]
624
648
  required :url, String
@@ -641,7 +665,8 @@ module ContextDev
641
665
 
642
666
  response_only do
643
667
  # @!attribute secret
644
- # Signing secret used to verify webhook authenticity. Each delivery includes an
668
+ # Signing secret used to verify webhook authenticity. Omitted unless the API key
669
+ # has monitors:write permission or full access. Each delivery includes an
645
670
  # `X-Context-Signature: t=<unix>,v1=<hmac>` header, where the HMAC is SHA-256 over
646
671
  # `"{t}.{rawRequestBody}"` keyed by this secret. Recompute it with a constant-time
647
672
  # compare and reject stale timestamps to prevent replay. Generated by the API;
@@ -655,13 +680,13 @@ module ContextDev
655
680
  # Some parameter documentations has been truncated, see
656
681
  # {ContextDev::Models::MonitorCreateResponse::Webhook} for more details.
657
682
  #
658
- # @param url [String] Webhook URL events are delivered to.
683
+ # @param url [String] Webhook URL events are delivered to. Slack incoming webhook URLs are automatical
659
684
  #
660
685
  # @param events [Array<Symbol, ContextDev::Models::MonitorCreateResponse::Webhook::Event>] Events delivered to this endpoint. `change.detected` fires only when a run detec
661
686
  #
662
687
  # @param retry_ [ContextDev::Models::RetryConfig] Webhook retry settings. Use {} for the default schedule.
663
688
  #
664
- # @param secret [String] Signing secret used to verify webhook authenticity. Each delivery includes an `X
689
+ # @param secret [String] Signing secret used to verify webhook authenticity. Omitted unless the API key h
665
690
 
666
691
  module Event
667
692
  extend ContextDev::Internal::Type::Enum
@@ -344,6 +344,25 @@ module ContextDev
344
344
  # @return [String]
345
345
  required :url, String
346
346
 
347
+ # @!attribute exclude_selectors
348
+ # CSS selectors for HTML regions to remove before text extraction. Applied after
349
+ # include_selectors; exclusion takes precedence when an element matches both. Omit
350
+ # or pass an empty array to apply no explicit exclusions. Changing these selectors
351
+ # creates a new baseline.
352
+ #
353
+ # @return [Array<String>, nil]
354
+ optional :exclude_selectors, ContextDev::Internal::Type::ArrayOf[String]
355
+
356
+ # @!attribute include_selectors
357
+ # CSS selectors defining the HTML regions to monitor. Matching subtrees are
358
+ # combined in document order before text extraction, instead of automatic
359
+ # main-content selection. Omit or pass an empty array to use automatic
360
+ # main-content extraction. If the filtered page has no usable text, the run fails
361
+ # without replacing the baseline. Changing these selectors creates a new baseline.
362
+ #
363
+ # @return [Array<String>, nil]
364
+ optional :include_selectors, ContextDev::Internal::Type::ArrayOf[String]
365
+
347
366
  # @!attribute instructions
348
367
  # Plain-language goal describing which page changes matter. When provided without
349
368
  # change_detection, semantic detection is inferred.
@@ -357,7 +376,7 @@ module ContextDev
357
376
  # @return [Boolean, nil]
358
377
  optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
359
378
 
360
- # @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
379
+ # @!method initialize(url:, exclude_selectors: nil, include_selectors: nil, instructions: nil, normalize_whitespace: nil, type: :page)
361
380
  # Some parameter documentations has been truncated, see
362
381
  # {ContextDev::Models::MonitorListResponse::Data::Target::Page} for more details.
363
382
  #
@@ -366,6 +385,10 @@ module ContextDev
366
385
  #
367
386
  # @param url [String]
368
387
  #
388
+ # @param exclude_selectors [Array<String>] CSS selectors for HTML regions to remove before text extraction. Applied after i
389
+ #
390
+ # @param include_selectors [Array<String>] CSS selectors defining the HTML regions to monitor. Matching subtrees are combin
391
+ #
369
392
  # @param instructions [String] Plain-language goal describing which page changes matter. When provided without
370
393
  #
371
394
  # @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
@@ -632,7 +655,8 @@ module ContextDev
632
655
  # @see ContextDev::Models::MonitorListResponse::Data#webhook
633
656
  class Webhook < ContextDev::Internal::Type::BaseModel
634
657
  # @!attribute url
635
- # Webhook URL events are delivered to.
658
+ # Webhook URL events are delivered to. Slack incoming webhook URLs are
659
+ # automatically formatted as Slack messages.
636
660
  #
637
661
  # @return [String]
638
662
  required :url, String
@@ -655,7 +679,8 @@ module ContextDev
655
679
 
656
680
  response_only do
657
681
  # @!attribute secret
658
- # Signing secret used to verify webhook authenticity. Each delivery includes an
682
+ # Signing secret used to verify webhook authenticity. Omitted unless the API key
683
+ # has monitors:write permission or full access. Each delivery includes an
659
684
  # `X-Context-Signature: t=<unix>,v1=<hmac>` header, where the HMAC is SHA-256 over
660
685
  # `"{t}.{rawRequestBody}"` keyed by this secret. Recompute it with a constant-time
661
686
  # compare and reject stale timestamps to prevent replay. Generated by the API;
@@ -669,13 +694,13 @@ module ContextDev
669
694
  # Some parameter documentations has been truncated, see
670
695
  # {ContextDev::Models::MonitorListResponse::Data::Webhook} for more details.
671
696
  #
672
- # @param url [String] Webhook URL events are delivered to.
697
+ # @param url [String] Webhook URL events are delivered to. Slack incoming webhook URLs are automatical
673
698
  #
674
699
  # @param events [Array<Symbol, ContextDev::Models::MonitorListResponse::Data::Webhook::Event>] Events delivered to this endpoint. `change.detected` fires only when a run detec
675
700
  #
676
701
  # @param retry_ [ContextDev::Models::RetryConfig] Webhook retry settings. Use {} for the default schedule.
677
702
  #
678
- # @param secret [String] Signing secret used to verify webhook authenticity. Each delivery includes an `X
703
+ # @param secret [String] Signing secret used to verify webhook authenticity. Omitted unless the API key h
679
704
 
680
705
  module Event
681
706
  extend ContextDev::Internal::Type::Enum