context.dev 2.9.0 → 2.10.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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/client.rb +5 -0
  5. data/lib/context_dev/models/batch_get_results_response.rb +33 -3
  6. data/lib/context_dev/models/batch_submit_params.rb +44 -316
  7. data/lib/context_dev/models/brand_search_params.rb +41 -3
  8. data/lib/context_dev/models/news_search_params.rb +467 -0
  9. data/lib/context_dev/models/news_search_response.rb +238 -0
  10. data/lib/context_dev/models/parse_handle_params.rb +15 -144
  11. data/lib/context_dev/models/person_enrich_response.rb +61 -1
  12. data/lib/context_dev/models/utility_prefetch_params.rb +19 -16
  13. data/lib/context_dev/models/utility_prefetch_response.rb +4 -5
  14. data/lib/context_dev/models/web_screenshot_params.rb +3 -30
  15. data/lib/context_dev/models/web_web_crawl_md_response.rb +30 -1
  16. data/lib/context_dev/models/web_web_scrape_html_params.rb +15 -153
  17. data/lib/context_dev/models/web_web_scrape_html_response.rb +30 -1
  18. data/lib/context_dev/models/web_web_scrape_images_params.rb +12 -124
  19. data/lib/context_dev/models/web_web_scrape_md_params.rb +35 -238
  20. data/lib/context_dev/models/web_web_scrape_md_response.rb +41 -2
  21. data/lib/context_dev/models.rb +2 -0
  22. data/lib/context_dev/resources/brand.rb +10 -11
  23. data/lib/context_dev/resources/news.rb +51 -0
  24. data/lib/context_dev/resources/parse.rb +5 -5
  25. data/lib/context_dev/resources/utility.rb +7 -6
  26. data/lib/context_dev/resources/web.rb +26 -23
  27. data/lib/context_dev/version.rb +1 -1
  28. data/lib/context_dev.rb +3 -0
  29. data/rbi/context_dev/client.rbi +4 -0
  30. data/rbi/context_dev/models/batch_get_results_response.rbi +71 -2
  31. data/rbi/context_dev/models/batch_submit_params.rbi +58 -592
  32. data/rbi/context_dev/models/brand_search_params.rbi +71 -2
  33. data/rbi/context_dev/models/news_search_params.rbi +1294 -0
  34. data/rbi/context_dev/models/news_search_response.rbi +423 -0
  35. data/rbi/context_dev/models/parse_handle_params.rbi +20 -316
  36. data/rbi/context_dev/models/person_enrich_response.rbi +87 -0
  37. data/rbi/context_dev/models/utility_prefetch_params.rbi +24 -16
  38. data/rbi/context_dev/models/utility_prefetch_response.rbi +8 -6
  39. data/rbi/context_dev/models/web_screenshot_params.rbi +4 -71
  40. data/rbi/context_dev/models/web_web_crawl_md_response.rbi +67 -0
  41. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +20 -356
  42. data/rbi/context_dev/models/web_web_scrape_html_response.rbi +65 -0
  43. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +16 -287
  44. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +47 -551
  45. data/rbi/context_dev/models/web_web_scrape_md_response.rbi +80 -0
  46. data/rbi/context_dev/models.rbi +2 -0
  47. data/rbi/context_dev/resources/brand.rbi +14 -9
  48. data/rbi/context_dev/resources/news.rbi +46 -0
  49. data/rbi/context_dev/resources/parse.rbi +5 -21
  50. data/rbi/context_dev/resources/utility.rbi +8 -6
  51. data/rbi/context_dev/resources/web.rbi +27 -66
  52. data/sig/context_dev/client.rbs +2 -0
  53. data/sig/context_dev/models/batch_get_results_response.rbs +21 -0
  54. data/sig/context_dev/models/batch_submit_params.rbs +54 -144
  55. data/sig/context_dev/models/brand_search_params.rbs +38 -1
  56. data/sig/context_dev/models/news_search_params.rbs +532 -0
  57. data/sig/context_dev/models/news_search_response.rbs +206 -0
  58. data/sig/context_dev/models/parse_handle_params.rbs +25 -90
  59. data/sig/context_dev/models/person_enrich_response.rbs +31 -0
  60. data/sig/context_dev/models/utility_prefetch_params.rbs +2 -1
  61. data/sig/context_dev/models/utility_prefetch_response.rbs +2 -1
  62. data/sig/context_dev/models/web_screenshot_params.rbs +5 -18
  63. data/sig/context_dev/models/web_web_crawl_md_response.rbs +21 -0
  64. data/sig/context_dev/models/web_web_scrape_html_params.rbs +24 -94
  65. data/sig/context_dev/models/web_web_scrape_html_response.rbs +21 -0
  66. data/sig/context_dev/models/web_web_scrape_images_params.rbs +20 -72
  67. data/sig/context_dev/models/web_web_scrape_md_params.rbs +46 -148
  68. data/sig/context_dev/models/web_web_scrape_md_response.rbs +28 -0
  69. data/sig/context_dev/models.rbs +2 -0
  70. data/sig/context_dev/resources/brand.rbs +3 -0
  71. data/sig/context_dev/resources/news.rbs +17 -0
  72. data/sig/context_dev/resources/parse.rbs +5 -5
  73. data/sig/context_dev/resources/web.rbs +12 -11
  74. metadata +11 -2
@@ -8,12 +8,27 @@ module ContextDev
8
8
  include ContextDev::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute query
11
- # Search term, matched against brand names and domains by prefix (e.g. 'nike',
11
+ # Search term, matched against the fields selected by queryBy (e.g. 'nike',
12
12
  # 'nike.com', 'nik').
13
13
  #
14
14
  # @return [String]
15
15
  required :query, String
16
16
 
17
+ # @!attribute autocomplete
18
+ # Whether the search term matches by prefix, so partial words match as they are
19
+ # typed (e.g. 'nik' matches Nike). Set to false to match whole words only.
20
+ #
21
+ # @return [Boolean, nil]
22
+ optional :autocomplete, ContextDev::Internal::Type::Boolean
23
+
24
+ # @!attribute query_by
25
+ # Fields to match the search term against, as a comma-separated list or repeated
26
+ # parameter: 'name', 'domain', or both. Defaults to both.
27
+ #
28
+ # @return [Array<Symbol, ContextDev::Models::BrandSearchParams::QueryBy>, nil]
29
+ optional :query_by,
30
+ -> { ContextDev::Internal::Type::ArrayOf[enum: ContextDev::BrandSearchParams::QueryBy] }
31
+
17
32
  # @!attribute tags
18
33
  # Optional comma-separated caller-defined tags for tracking this request. Tags are
19
34
  # recorded on the request's usage log and can be used to filter usage on the
@@ -22,15 +37,38 @@ module ContextDev
22
37
  # @return [Array<String>, nil]
23
38
  optional :tags, ContextDev::Internal::Type::ArrayOf[String]
24
39
 
25
- # @!method initialize(query:, tags: nil, request_options: {})
40
+ # @!attribute typo_tolerance
41
+ # Maximum number of typos tolerated when matching, from 0 to 2. Defaults to 0 (no
42
+ # typo tolerance).
43
+ #
44
+ # @return [Integer, nil]
45
+ optional :typo_tolerance, Integer
46
+
47
+ # @!method initialize(query:, autocomplete: nil, query_by: nil, tags: nil, typo_tolerance: nil, request_options: {})
26
48
  # Some parameter documentations has been truncated, see
27
49
  # {ContextDev::Models::BrandSearchParams} for more details.
28
50
  #
29
- # @param query [String] Search term, matched against brand names and domains by prefix (e.g. 'nike', 'ni
51
+ # @param query [String] Search term, matched against the fields selected by queryBy (e.g. 'nike', 'nike.
52
+ #
53
+ # @param autocomplete [Boolean] Whether the search term matches by prefix, so partial words match as they are ty
54
+ #
55
+ # @param query_by [Array<Symbol, ContextDev::Models::BrandSearchParams::QueryBy>] Fields to match the search term against, as a comma-separated list or repeated p
30
56
  #
31
57
  # @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
32
58
  #
59
+ # @param typo_tolerance [Integer] Maximum number of typos tolerated when matching, from 0 to 2. Defaults to 0 (no
60
+ #
33
61
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
62
+
63
+ module QueryBy
64
+ extend ContextDev::Internal::Type::Enum
65
+
66
+ NAME = :name
67
+ DOMAIN = :domain
68
+
69
+ # @!method self.values
70
+ # @return [Array<Symbol>]
71
+ end
34
72
  end
35
73
  end
36
74
  end
@@ -0,0 +1,467 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ContextDev
4
+ module Models
5
+ # @see ContextDev::Resources::News#search
6
+ class NewsSearchParams < ContextDev::Internal::Type::BaseModel
7
+ extend ContextDev::Internal::Type::RequestParameters::Converter
8
+ include ContextDev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute search_by
11
+ # What to search for.
12
+ #
13
+ # @return [ContextDev::Models::NewsSearchParams::SearchBy]
14
+ required :search_by, -> { ContextDev::NewsSearchParams::SearchBy }, api_name: :searchBy
15
+
16
+ # @!attribute cursor
17
+ # Opaque next_cursor from the previous response, or null for the first page.
18
+ #
19
+ # @return [String, nil]
20
+ optional :cursor, String, nil?: true
21
+
22
+ # @!attribute filter_by
23
+ # Optional result filters.
24
+ #
25
+ # @return [ContextDev::Models::NewsSearchParams::FilterBy, nil]
26
+ optional :filter_by, -> { ContextDev::NewsSearchParams::FilterBy }, api_name: :filterBy
27
+
28
+ # @!attribute limit
29
+ # Maximum results to return. Defaults to 10.
30
+ #
31
+ # @return [Integer, nil]
32
+ optional :limit, Integer
33
+
34
+ # @!attribute sort_by
35
+ # Result ordering. Defaults to newest.
36
+ #
37
+ # @return [ContextDev::Models::NewsSearchParams::SortBy, nil]
38
+ optional :sort_by, -> { ContextDev::NewsSearchParams::SortBy }, api_name: :sortBy
39
+
40
+ # @!attribute tags
41
+ # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
42
+ #
43
+ # @return [Array<String>, nil]
44
+ optional :tags, ContextDev::Internal::Type::ArrayOf[String]
45
+
46
+ # @!method initialize(search_by:, cursor: nil, filter_by: nil, limit: nil, sort_by: nil, tags: nil, request_options: {})
47
+ # @param search_by [ContextDev::Models::NewsSearchParams::SearchBy] What to search for.
48
+ #
49
+ # @param cursor [String, nil] Opaque next_cursor from the previous response, or null for the first page.
50
+ #
51
+ # @param filter_by [ContextDev::Models::NewsSearchParams::FilterBy] Optional result filters.
52
+ #
53
+ # @param limit [Integer] Maximum results to return. Defaults to 10.
54
+ #
55
+ # @param sort_by [ContextDev::Models::NewsSearchParams::SortBy] Result ordering. Defaults to newest.
56
+ #
57
+ # @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
58
+ #
59
+ # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
60
+
61
+ class SearchBy < ContextDev::Internal::Type::BaseModel
62
+ # @!attribute entity
63
+ # The company to search news for, identified by name, domain, ticker, or ISIN.
64
+ #
65
+ # @return [ContextDev::Models::NewsSearchParams::SearchBy::Entity::Name, ContextDev::Models::NewsSearchParams::SearchBy::Entity::Domain, ContextDev::Models::NewsSearchParams::SearchBy::Entity::Ticker, ContextDev::Models::NewsSearchParams::SearchBy::Entity::Isin]
66
+ required :entity, union: -> { ContextDev::NewsSearchParams::SearchBy::Entity }
67
+
68
+ # @!attribute type
69
+ # How to search. Only entity search is supported.
70
+ #
71
+ # @return [Symbol, ContextDev::Models::NewsSearchParams::SearchBy::Type]
72
+ required :type, enum: -> { ContextDev::NewsSearchParams::SearchBy::Type }
73
+
74
+ # @!method initialize(entity:, type:)
75
+ # What to search for.
76
+ #
77
+ # @param entity [ContextDev::Models::NewsSearchParams::SearchBy::Entity::Name, ContextDev::Models::NewsSearchParams::SearchBy::Entity::Domain, ContextDev::Models::NewsSearchParams::SearchBy::Entity::Ticker, ContextDev::Models::NewsSearchParams::SearchBy::Entity::Isin] The company to search news for, identified by name, domain, ticker, or ISIN.
78
+ #
79
+ # @param type [Symbol, ContextDev::Models::NewsSearchParams::SearchBy::Type] How to search. Only entity search is supported.
80
+
81
+ # The company to search news for, identified by name, domain, ticker, or ISIN.
82
+ #
83
+ # @see ContextDev::Models::NewsSearchParams::SearchBy#entity
84
+ module Entity
85
+ extend ContextDev::Internal::Type::Union
86
+
87
+ discriminator :type
88
+
89
+ # Identify the company by name.
90
+ variant :name, -> { ContextDev::NewsSearchParams::SearchBy::Entity::Name }
91
+
92
+ # Identify the company by website domain.
93
+ variant :domain, -> { ContextDev::NewsSearchParams::SearchBy::Entity::Domain }
94
+
95
+ # Identify the company by stock ticker, optionally scoped to an exchange.
96
+ variant :ticker, -> { ContextDev::NewsSearchParams::SearchBy::Entity::Ticker }
97
+
98
+ # Identify the company by International Securities Identification Number.
99
+ variant :isin, -> { ContextDev::NewsSearchParams::SearchBy::Entity::Isin }
100
+
101
+ class Name < ContextDev::Internal::Type::BaseModel
102
+ # @!attribute name
103
+ # Company name.
104
+ #
105
+ # @return [String]
106
+ required :name, String
107
+
108
+ # @!attribute type
109
+ #
110
+ # @return [Symbol, :name]
111
+ required :type, const: :name
112
+
113
+ # @!method initialize(name:, type: :name)
114
+ # Identify the company by name.
115
+ #
116
+ # @param name [String] Company name.
117
+ #
118
+ # @param type [Symbol, :name]
119
+ end
120
+
121
+ class Domain < ContextDev::Internal::Type::BaseModel
122
+ # @!attribute domain
123
+ # Company website domain, such as apple.com.
124
+ #
125
+ # @return [String]
126
+ required :domain, String
127
+
128
+ # @!attribute type
129
+ #
130
+ # @return [Symbol, :domain]
131
+ required :type, const: :domain
132
+
133
+ # @!method initialize(domain:, type: :domain)
134
+ # Identify the company by website domain.
135
+ #
136
+ # @param domain [String] Company website domain, such as apple.com.
137
+ #
138
+ # @param type [Symbol, :domain]
139
+ end
140
+
141
+ class Ticker < ContextDev::Internal::Type::BaseModel
142
+ # @!attribute ticker
143
+ # Public-company ticker.
144
+ #
145
+ # @return [String]
146
+ required :ticker, String
147
+
148
+ # @!attribute type
149
+ #
150
+ # @return [Symbol, :ticker]
151
+ required :type, const: :ticker
152
+
153
+ # @!attribute exchange
154
+ # Stock exchange the ticker trades on, used to disambiguate tickers listed on
155
+ # multiple exchanges.
156
+ #
157
+ # @return [Symbol, ContextDev::Models::NewsSearchParams::SearchBy::Entity::Ticker::Exchange, nil]
158
+ optional :exchange, enum: -> { ContextDev::NewsSearchParams::SearchBy::Entity::Ticker::Exchange }
159
+
160
+ # @!method initialize(ticker:, exchange: nil, type: :ticker)
161
+ # Some parameter documentations has been truncated, see
162
+ # {ContextDev::Models::NewsSearchParams::SearchBy::Entity::Ticker} for more
163
+ # details.
164
+ #
165
+ # Identify the company by stock ticker, optionally scoped to an exchange.
166
+ #
167
+ # @param ticker [String] Public-company ticker.
168
+ #
169
+ # @param exchange [Symbol, ContextDev::Models::NewsSearchParams::SearchBy::Entity::Ticker::Exchange] Stock exchange the ticker trades on, used to disambiguate tickers listed on mult
170
+ #
171
+ # @param type [Symbol, :ticker]
172
+
173
+ # Stock exchange the ticker trades on, used to disambiguate tickers listed on
174
+ # multiple exchanges.
175
+ #
176
+ # @see ContextDev::Models::NewsSearchParams::SearchBy::Entity::Ticker#exchange
177
+ module Exchange
178
+ extend ContextDev::Internal::Type::Enum
179
+
180
+ AMEX = :AMEX
181
+ AMS = :AMS
182
+ AQS = :AQS
183
+ ASX = :ASX
184
+ ATH = :ATH
185
+ BER = :BER
186
+ BME = :BME
187
+ BRU = :BRU
188
+ BSE = :BSE
189
+ BUD = :BUD
190
+ BUE = :BUE
191
+ BVC = :BVC
192
+ CBOE = :CBOE
193
+ CNQ = :CNQ
194
+ CPH = :CPH
195
+ DFM = :DFM
196
+ DOH = :DOH
197
+ DUB = :DUB
198
+ DUS = :DUS
199
+ DXE = :DXE
200
+ EGX = :EGX
201
+ FSX = :FSX
202
+ HAM = :HAM
203
+ HEL = :HEL
204
+ HKSE = :HKSE
205
+ HOSE = :HOSE
206
+ ICE = :ICE
207
+ IOB = :IOB
208
+ IST = :IST
209
+ JKT = :JKT
210
+ JNB = :JNB
211
+ JPX = :JPX
212
+ KLS = :KLS
213
+ KOE = :KOE
214
+ KSC = :KSC
215
+ KUW = :KUW
216
+ LIS = :LIS
217
+ LSE = :LSE
218
+ MCX = :MCX
219
+ MEX = :MEX
220
+ MIL = :MIL
221
+ MUN = :MUN
222
+ NASDAQ = :NASDAQ
223
+ NEO = :NEO
224
+ NSE = :NSE
225
+ NYSE = :NYSE
226
+ NZE = :NZE
227
+ OSL = :OSL
228
+ OTC = :OTC
229
+ PAR = :PAR
230
+ PNK = :PNK
231
+ PRA = :PRA
232
+ RIS = :RIS
233
+ SAO = :SAO
234
+ SAU = :SAU
235
+ SES = :SES
236
+ SET = :SET
237
+ SGO = :SGO
238
+ SHH = :SHH
239
+ SHZ = :SHZ
240
+ SIX = :SIX
241
+ STO = :STO
242
+ STU = :STU
243
+ TAI = :TAI
244
+ TAL = :TAL
245
+ TLV = :TLV
246
+ TSX = :TSX
247
+ TSXV = :TSXV
248
+ TWO = :TWO
249
+ VIE = :VIE
250
+ WSE = :WSE
251
+ XETRA = :XETRA
252
+
253
+ # @!method self.values
254
+ # @return [Array<Symbol>]
255
+ end
256
+ end
257
+
258
+ class Isin < ContextDev::Internal::Type::BaseModel
259
+ # @!attribute isin
260
+ # International Securities Identification Number.
261
+ #
262
+ # @return [String]
263
+ required :isin, String
264
+
265
+ # @!attribute type
266
+ #
267
+ # @return [Symbol, :isin]
268
+ required :type, const: :isin
269
+
270
+ # @!method initialize(isin:, type: :isin)
271
+ # Identify the company by International Securities Identification Number.
272
+ #
273
+ # @param isin [String] International Securities Identification Number.
274
+ #
275
+ # @param type [Symbol, :isin]
276
+ end
277
+
278
+ # @!method self.variants
279
+ # @return [Array(ContextDev::Models::NewsSearchParams::SearchBy::Entity::Name, ContextDev::Models::NewsSearchParams::SearchBy::Entity::Domain, ContextDev::Models::NewsSearchParams::SearchBy::Entity::Ticker, ContextDev::Models::NewsSearchParams::SearchBy::Entity::Isin)]
280
+ end
281
+
282
+ # How to search. Only entity search is supported.
283
+ #
284
+ # @see ContextDev::Models::NewsSearchParams::SearchBy#type
285
+ module Type
286
+ extend ContextDev::Internal::Type::Enum
287
+
288
+ ENTITY = :entity
289
+
290
+ # @!method self.values
291
+ # @return [Array<Symbol>]
292
+ end
293
+ end
294
+
295
+ class FilterBy < ContextDev::Internal::Type::BaseModel
296
+ # @!attribute article_language
297
+ # Article languages to include. Up to 3.
298
+ #
299
+ # @return [Array<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::ArticleLanguage>, nil]
300
+ optional :article_language,
301
+ -> {
302
+ ContextDev::Internal::Type::ArrayOf[enum: ContextDev::NewsSearchParams::FilterBy::ArticleLanguage]
303
+ },
304
+ api_name: :articleLanguage
305
+
306
+ # @!attribute article_type
307
+ # Article types to include. Up to 3.
308
+ #
309
+ # @return [Array<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::ArticleType>, nil]
310
+ optional :article_type,
311
+ -> {
312
+ ContextDev::Internal::Type::ArrayOf[enum: ContextDev::NewsSearchParams::FilterBy::ArticleType]
313
+ },
314
+ api_name: :articleType
315
+
316
+ # @!attribute date
317
+ # Published-at window in epoch milliseconds.
318
+ #
319
+ # @return [ContextDev::Models::NewsSearchParams::FilterBy::Date, nil]
320
+ optional :date, -> { ContextDev::NewsSearchParams::FilterBy::Date }
321
+
322
+ # @!attribute source_country
323
+ # Publisher countries to include, as lowercase ISO 3166-1 alpha-2 codes. Up to 3.
324
+ #
325
+ # @return [Array<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::SourceCountry>, nil]
326
+ optional :source_country,
327
+ -> {
328
+ ContextDev::Internal::Type::ArrayOf[enum: ContextDev::NewsSearchParams::FilterBy::SourceCountry]
329
+ },
330
+ api_name: :sourceCountry
331
+
332
+ # @!attribute source_domain
333
+ # Publisher domains to include. Up to 3.
334
+ #
335
+ # @return [Array<String>, nil]
336
+ optional :source_domain, ContextDev::Internal::Type::ArrayOf[String], api_name: :sourceDomain
337
+
338
+ # @!method initialize(article_language: nil, article_type: nil, date: nil, source_country: nil, source_domain: nil)
339
+ # Optional result filters.
340
+ #
341
+ # @param article_language [Array<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::ArticleLanguage>] Article languages to include. Up to 3.
342
+ #
343
+ # @param article_type [Array<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::ArticleType>] Article types to include. Up to 3.
344
+ #
345
+ # @param date [ContextDev::Models::NewsSearchParams::FilterBy::Date] Published-at window in epoch milliseconds.
346
+ #
347
+ # @param source_country [Array<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::SourceCountry>] Publisher countries to include, as lowercase ISO 3166-1 alpha-2 codes. Up to 3.
348
+ #
349
+ # @param source_domain [Array<String>] Publisher domains to include. Up to 3.
350
+
351
+ module ArticleLanguage
352
+ extend ContextDev::Internal::Type::Enum
353
+
354
+ AR = :ar
355
+ DE = :de
356
+ EN = :en
357
+ ES = :es
358
+ FR = :fr
359
+ HI = :hi
360
+ IT = :it
361
+ JA = :ja
362
+ KO = :ko
363
+ NL = :nl
364
+ PT = :pt
365
+ RU = :ru
366
+ ZH = :zh
367
+
368
+ # @!method self.values
369
+ # @return [Array<Symbol>]
370
+ end
371
+
372
+ module ArticleType
373
+ extend ContextDev::Internal::Type::Enum
374
+
375
+ EDITORIAL = :editorial
376
+ PRESS_RELEASE = :press_release
377
+ REGULATORY_FILING = :regulatory_filing
378
+ ADVISORY = :advisory
379
+
380
+ # @!method self.values
381
+ # @return [Array<Symbol>]
382
+ end
383
+
384
+ # @see ContextDev::Models::NewsSearchParams::FilterBy#date
385
+ class Date < ContextDev::Internal::Type::BaseModel
386
+ # @!attribute from
387
+ # Inclusive start of the published-at window, in epoch milliseconds.
388
+ #
389
+ # @return [Integer, nil]
390
+ optional :from, Integer
391
+
392
+ # @!attribute to
393
+ # Inclusive end of the published-at window, in epoch milliseconds.
394
+ #
395
+ # @return [Integer, nil]
396
+ optional :to, Integer
397
+
398
+ # @!method initialize(from: nil, to: nil)
399
+ # Published-at window in epoch milliseconds.
400
+ #
401
+ # @param from [Integer] Inclusive start of the published-at window, in epoch milliseconds.
402
+ #
403
+ # @param to [Integer] Inclusive end of the published-at window, in epoch milliseconds.
404
+ end
405
+
406
+ module SourceCountry
407
+ extend ContextDev::Internal::Type::Enum
408
+
409
+ AE = :ae
410
+ AR = :ar
411
+ AU = :au
412
+ CA = :ca
413
+ CG = :cg
414
+ CH = :ch
415
+ CL = :cl
416
+ DE = :de
417
+ FI = :fi
418
+ FR = :fr
419
+ GB = :gb
420
+ HK = :hk
421
+ IL = :il
422
+ IN = :in
423
+ JP = :jp
424
+ KR = :kr
425
+ MX = :mx
426
+ NG = :ng
427
+ NL = :nl
428
+ QA = :qa
429
+ SA = :sa
430
+ SE = :se
431
+ SG = :sg
432
+ US = :us
433
+ ZA = :za
434
+
435
+ # @!method self.values
436
+ # @return [Array<Symbol>]
437
+ end
438
+ end
439
+
440
+ class SortBy < ContextDev::Internal::Type::BaseModel
441
+ # @!attribute type
442
+ # Result ordering.
443
+ #
444
+ # @return [Symbol, ContextDev::Models::NewsSearchParams::SortBy::Type]
445
+ required :type, enum: -> { ContextDev::NewsSearchParams::SortBy::Type }
446
+
447
+ # @!method initialize(type:)
448
+ # Result ordering. Defaults to newest.
449
+ #
450
+ # @param type [Symbol, ContextDev::Models::NewsSearchParams::SortBy::Type] Result ordering.
451
+
452
+ # Result ordering.
453
+ #
454
+ # @see ContextDev::Models::NewsSearchParams::SortBy#type
455
+ module Type
456
+ extend ContextDev::Internal::Type::Enum
457
+
458
+ RELEVANCE = :relevance
459
+ NEWEST = :newest
460
+
461
+ # @!method self.values
462
+ # @return [Array<Symbol>]
463
+ end
464
+ end
465
+ end
466
+ end
467
+ end