context.dev 2.17.0 → 2.17.1

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.
@@ -11,6 +11,17 @@ module ContextDev
11
11
  )
12
12
  end
13
13
 
14
+ # Detailed brand information
15
+ sig { returns(ContextDev::Models::BrandRetrieveResponse::Brand) }
16
+ attr_reader :brand
17
+
18
+ sig do
19
+ params(
20
+ brand: ContextDev::Models::BrandRetrieveResponse::Brand::OrHash
21
+ ).void
22
+ end
23
+ attr_writer :brand
24
+
14
25
  # Cache outcome for this response. Composite responses are hits only when every
15
26
  # cache-controlled fetch contributing to the output was a hit; age_ms is the
16
27
  # oldest contributing hit.
@@ -25,30 +36,18 @@ module ContextDev
25
36
  end
26
37
  attr_writer :cache_metadata
27
38
 
39
+ # HTTP status code
40
+ sig { returns(Integer) }
41
+ attr_accessor :code
42
+
28
43
  # Unique id of this API call, also sent in the X-Request-Id response header. Quote
29
44
  # it when contacting support about a failed request.
30
45
  sig { returns(String) }
31
46
  attr_accessor :request_id
32
47
 
33
- # Detailed brand information
34
- sig do
35
- returns(T.nilable(ContextDev::Models::BrandRetrieveResponse::Brand))
36
- end
37
- attr_reader :brand
38
-
39
- sig do
40
- params(
41
- brand: ContextDev::Models::BrandRetrieveResponse::Brand::OrHash
42
- ).void
43
- end
44
- attr_writer :brand
45
-
46
- # HTTP status code
47
- sig { returns(T.nilable(Integer)) }
48
- attr_reader :code
49
-
50
- sig { params(code: Integer).void }
51
- attr_writer :code
48
+ # Status of the response, e.g., 'ok'
49
+ sig { returns(String) }
50
+ attr_accessor :status
52
51
 
53
52
  # Credit usage, included whenever a valid API key is provided.
54
53
  sig do
@@ -74,161 +73,59 @@ module ContextDev
74
73
  sig { params(partial: T::Boolean).void }
75
74
  attr_writer :partial
76
75
 
77
- # Status of the response, e.g., 'ok'
78
- sig { returns(T.nilable(String)) }
79
- attr_reader :status
80
-
81
- sig { params(status: String).void }
82
- attr_writer :status
83
-
84
76
  sig do
85
77
  params(
78
+ brand: ContextDev::Models::BrandRetrieveResponse::Brand::OrHash,
86
79
  cache_metadata:
87
80
  ContextDev::Models::BrandRetrieveResponse::CacheMetadata::OrHash,
88
- request_id: String,
89
- brand: ContextDev::Models::BrandRetrieveResponse::Brand::OrHash,
90
81
  code: Integer,
82
+ request_id: String,
83
+ status: String,
91
84
  key_metadata:
92
85
  ContextDev::Models::BrandRetrieveResponse::KeyMetadata::OrHash,
93
- partial: T::Boolean,
94
- status: String
86
+ partial: T::Boolean
95
87
  ).returns(T.attached_class)
96
88
  end
97
89
  def self.new(
90
+ # Detailed brand information
91
+ brand:,
98
92
  # Cache outcome for this response. Composite responses are hits only when every
99
93
  # cache-controlled fetch contributing to the output was a hit; age_ms is the
100
94
  # oldest contributing hit.
101
95
  cache_metadata:,
96
+ # HTTP status code
97
+ code:,
102
98
  # Unique id of this API call, also sent in the X-Request-Id response header. Quote
103
99
  # it when contacting support about a failed request.
104
100
  request_id:,
105
- # Detailed brand information
106
- brand: nil,
107
- # HTTP status code
108
- code: nil,
101
+ # Status of the response, e.g., 'ok'
102
+ status:,
109
103
  # Credit usage, included whenever a valid API key is provided.
110
104
  key_metadata: nil,
111
105
  # True when the timeout ended processing and this response contains the usable
112
106
  # data completed so far. Unfinished fields are omitted.
113
- partial: nil,
114
- # Status of the response, e.g., 'ok'
115
- status: nil
107
+ partial: nil
116
108
  )
117
109
  end
118
110
 
119
111
  sig do
120
112
  override.returns(
121
113
  {
114
+ brand: ContextDev::Models::BrandRetrieveResponse::Brand,
122
115
  cache_metadata:
123
116
  ContextDev::Models::BrandRetrieveResponse::CacheMetadata,
124
- request_id: String,
125
- brand: ContextDev::Models::BrandRetrieveResponse::Brand,
126
117
  code: Integer,
118
+ request_id: String,
119
+ status: String,
127
120
  key_metadata:
128
121
  ContextDev::Models::BrandRetrieveResponse::KeyMetadata,
129
- partial: T::Boolean,
130
- status: String
122
+ partial: T::Boolean
131
123
  }
132
124
  )
133
125
  end
134
126
  def to_hash
135
127
  end
136
128
 
137
- class CacheMetadata < ContextDev::Internal::Type::BaseModel
138
- OrHash =
139
- T.type_alias do
140
- T.any(
141
- ContextDev::Models::BrandRetrieveResponse::CacheMetadata,
142
- ContextDev::Internal::AnyHash
143
- )
144
- end
145
-
146
- # Age of the cached data in milliseconds. Zero for miss and zdr responses.
147
- sig { returns(Integer) }
148
- attr_accessor :age_ms
149
-
150
- # Whether the response was served from cache, required fresh work, or honored
151
- # zero-data-retention cache bypass.
152
- sig do
153
- returns(
154
- ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
155
- )
156
- end
157
- attr_accessor :status
158
-
159
- # Cache outcome for this response. Composite responses are hits only when every
160
- # cache-controlled fetch contributing to the output was a hit; age_ms is the
161
- # oldest contributing hit.
162
- sig do
163
- params(
164
- age_ms: Integer,
165
- status:
166
- ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::OrSymbol
167
- ).returns(T.attached_class)
168
- end
169
- def self.new(
170
- # Age of the cached data in milliseconds. Zero for miss and zdr responses.
171
- age_ms:,
172
- # Whether the response was served from cache, required fresh work, or honored
173
- # zero-data-retention cache bypass.
174
- status:
175
- )
176
- end
177
-
178
- sig do
179
- override.returns(
180
- {
181
- age_ms: Integer,
182
- status:
183
- ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
184
- }
185
- )
186
- end
187
- def to_hash
188
- end
189
-
190
- # Whether the response was served from cache, required fresh work, or honored
191
- # zero-data-retention cache bypass.
192
- module Status
193
- extend ContextDev::Internal::Type::Enum
194
-
195
- TaggedSymbol =
196
- T.type_alias do
197
- T.all(
198
- Symbol,
199
- ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status
200
- )
201
- end
202
- OrSymbol = T.type_alias { T.any(Symbol, String) }
203
-
204
- HIT =
205
- T.let(
206
- :hit,
207
- ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
208
- )
209
- MISS =
210
- T.let(
211
- :miss,
212
- ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
213
- )
214
- ZDR =
215
- T.let(
216
- :zdr,
217
- ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
218
- )
219
-
220
- sig do
221
- override.returns(
222
- T::Array[
223
- ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
224
- ]
225
- )
226
- end
227
- def self.values
228
- end
229
- end
230
- end
231
-
232
129
  class Brand < ContextDev::Internal::Type::BaseModel
233
130
  OrHash =
234
131
  T.type_alias do
@@ -3815,6 +3712,101 @@ module ContextDev
3815
3712
  end
3816
3713
  end
3817
3714
 
3715
+ class CacheMetadata < ContextDev::Internal::Type::BaseModel
3716
+ OrHash =
3717
+ T.type_alias do
3718
+ T.any(
3719
+ ContextDev::Models::BrandRetrieveResponse::CacheMetadata,
3720
+ ContextDev::Internal::AnyHash
3721
+ )
3722
+ end
3723
+
3724
+ # Age of the cached data in milliseconds. Zero for miss and zdr responses.
3725
+ sig { returns(Integer) }
3726
+ attr_accessor :age_ms
3727
+
3728
+ # Whether the response was served from cache, required fresh work, or honored
3729
+ # zero-data-retention cache bypass.
3730
+ sig do
3731
+ returns(
3732
+ ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
3733
+ )
3734
+ end
3735
+ attr_accessor :status
3736
+
3737
+ # Cache outcome for this response. Composite responses are hits only when every
3738
+ # cache-controlled fetch contributing to the output was a hit; age_ms is the
3739
+ # oldest contributing hit.
3740
+ sig do
3741
+ params(
3742
+ age_ms: Integer,
3743
+ status:
3744
+ ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::OrSymbol
3745
+ ).returns(T.attached_class)
3746
+ end
3747
+ def self.new(
3748
+ # Age of the cached data in milliseconds. Zero for miss and zdr responses.
3749
+ age_ms:,
3750
+ # Whether the response was served from cache, required fresh work, or honored
3751
+ # zero-data-retention cache bypass.
3752
+ status:
3753
+ )
3754
+ end
3755
+
3756
+ sig do
3757
+ override.returns(
3758
+ {
3759
+ age_ms: Integer,
3760
+ status:
3761
+ ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
3762
+ }
3763
+ )
3764
+ end
3765
+ def to_hash
3766
+ end
3767
+
3768
+ # Whether the response was served from cache, required fresh work, or honored
3769
+ # zero-data-retention cache bypass.
3770
+ module Status
3771
+ extend ContextDev::Internal::Type::Enum
3772
+
3773
+ TaggedSymbol =
3774
+ T.type_alias do
3775
+ T.all(
3776
+ Symbol,
3777
+ ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status
3778
+ )
3779
+ end
3780
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3781
+
3782
+ HIT =
3783
+ T.let(
3784
+ :hit,
3785
+ ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
3786
+ )
3787
+ MISS =
3788
+ T.let(
3789
+ :miss,
3790
+ ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
3791
+ )
3792
+ ZDR =
3793
+ T.let(
3794
+ :zdr,
3795
+ ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
3796
+ )
3797
+
3798
+ sig do
3799
+ override.returns(
3800
+ T::Array[
3801
+ ContextDev::Models::BrandRetrieveResponse::CacheMetadata::Status::TaggedSymbol
3802
+ ]
3803
+ )
3804
+ end
3805
+ def self.values
3806
+ end
3807
+ end
3808
+ end
3809
+
3818
3810
  class KeyMetadata < ContextDev::Internal::Type::BaseModel
3819
3811
  OrHash =
3820
3812
  T.type_alias do
@@ -11,6 +11,20 @@ module ContextDev
11
11
  )
12
12
  end
13
13
 
14
+ # Simplified brand information
15
+ sig do
16
+ returns(ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand)
17
+ end
18
+ attr_reader :brand
19
+
20
+ sig do
21
+ params(
22
+ brand:
23
+ ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::OrHash
24
+ ).void
25
+ end
26
+ attr_writer :brand
27
+
14
28
  # Cache outcome for this response. Composite responses are hits only when every
15
29
  # cache-controlled fetch contributing to the output was a hit; age_ms is the
16
30
  # oldest contributing hit.
@@ -29,33 +43,18 @@ module ContextDev
29
43
  end
30
44
  attr_writer :cache_metadata
31
45
 
46
+ # HTTP status code of the response
47
+ sig { returns(Integer) }
48
+ attr_accessor :code
49
+
32
50
  # Unique id of this API call, also sent in the X-Request-Id response header. Quote
33
51
  # it when contacting support about a failed request.
34
52
  sig { returns(String) }
35
53
  attr_accessor :request_id
36
54
 
37
- # Simplified brand information
38
- sig do
39
- returns(
40
- T.nilable(ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand)
41
- )
42
- end
43
- attr_reader :brand
44
-
45
- sig do
46
- params(
47
- brand:
48
- ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::OrHash
49
- ).void
50
- end
51
- attr_writer :brand
52
-
53
- # HTTP status code of the response
54
- sig { returns(T.nilable(Integer)) }
55
- attr_reader :code
56
-
57
- sig { params(code: Integer).void }
58
- attr_writer :code
55
+ # Status of the response, e.g., 'ok'
56
+ sig { returns(String) }
57
+ attr_accessor :status
59
58
 
60
59
  # Credit usage, included whenever a valid API key is provided.
61
60
  sig do
@@ -83,162 +82,60 @@ module ContextDev
83
82
  sig { params(partial: T::Boolean).void }
84
83
  attr_writer :partial
85
84
 
86
- # Status of the response, e.g., 'ok'
87
- sig { returns(T.nilable(String)) }
88
- attr_reader :status
89
-
90
- sig { params(status: String).void }
91
- attr_writer :status
92
-
93
85
  sig do
94
86
  params(
95
- cache_metadata:
96
- ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::OrHash,
97
- request_id: String,
98
87
  brand:
99
88
  ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::OrHash,
89
+ cache_metadata:
90
+ ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::OrHash,
100
91
  code: Integer,
92
+ request_id: String,
93
+ status: String,
101
94
  key_metadata:
102
95
  ContextDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata::OrHash,
103
- partial: T::Boolean,
104
- status: String
96
+ partial: T::Boolean
105
97
  ).returns(T.attached_class)
106
98
  end
107
99
  def self.new(
100
+ # Simplified brand information
101
+ brand:,
108
102
  # Cache outcome for this response. Composite responses are hits only when every
109
103
  # cache-controlled fetch contributing to the output was a hit; age_ms is the
110
104
  # oldest contributing hit.
111
105
  cache_metadata:,
106
+ # HTTP status code of the response
107
+ code:,
112
108
  # Unique id of this API call, also sent in the X-Request-Id response header. Quote
113
109
  # it when contacting support about a failed request.
114
110
  request_id:,
115
- # Simplified brand information
116
- brand: nil,
117
- # HTTP status code of the response
118
- code: nil,
111
+ # Status of the response, e.g., 'ok'
112
+ status:,
119
113
  # Credit usage, included whenever a valid API key is provided.
120
114
  key_metadata: nil,
121
115
  # True when the timeout ended processing and only completed brand data is
122
116
  # returned.
123
- partial: nil,
124
- # Status of the response, e.g., 'ok'
125
- status: nil
117
+ partial: nil
126
118
  )
127
119
  end
128
120
 
129
121
  sig do
130
122
  override.returns(
131
123
  {
124
+ brand: ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand,
132
125
  cache_metadata:
133
126
  ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata,
134
- request_id: String,
135
- brand: ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand,
136
127
  code: Integer,
128
+ request_id: String,
129
+ status: String,
137
130
  key_metadata:
138
131
  ContextDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata,
139
- partial: T::Boolean,
140
- status: String
132
+ partial: T::Boolean
141
133
  }
142
134
  )
143
135
  end
144
136
  def to_hash
145
137
  end
146
138
 
147
- class CacheMetadata < ContextDev::Internal::Type::BaseModel
148
- OrHash =
149
- T.type_alias do
150
- T.any(
151
- ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata,
152
- ContextDev::Internal::AnyHash
153
- )
154
- end
155
-
156
- # Age of the cached data in milliseconds. Zero for miss and zdr responses.
157
- sig { returns(Integer) }
158
- attr_accessor :age_ms
159
-
160
- # Whether the response was served from cache, required fresh work, or honored
161
- # zero-data-retention cache bypass.
162
- sig do
163
- returns(
164
- ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
165
- )
166
- end
167
- attr_accessor :status
168
-
169
- # Cache outcome for this response. Composite responses are hits only when every
170
- # cache-controlled fetch contributing to the output was a hit; age_ms is the
171
- # oldest contributing hit.
172
- sig do
173
- params(
174
- age_ms: Integer,
175
- status:
176
- ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::OrSymbol
177
- ).returns(T.attached_class)
178
- end
179
- def self.new(
180
- # Age of the cached data in milliseconds. Zero for miss and zdr responses.
181
- age_ms:,
182
- # Whether the response was served from cache, required fresh work, or honored
183
- # zero-data-retention cache bypass.
184
- status:
185
- )
186
- end
187
-
188
- sig do
189
- override.returns(
190
- {
191
- age_ms: Integer,
192
- status:
193
- ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
194
- }
195
- )
196
- end
197
- def to_hash
198
- end
199
-
200
- # Whether the response was served from cache, required fresh work, or honored
201
- # zero-data-retention cache bypass.
202
- module Status
203
- extend ContextDev::Internal::Type::Enum
204
-
205
- TaggedSymbol =
206
- T.type_alias do
207
- T.all(
208
- Symbol,
209
- ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status
210
- )
211
- end
212
- OrSymbol = T.type_alias { T.any(Symbol, String) }
213
-
214
- HIT =
215
- T.let(
216
- :hit,
217
- ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
218
- )
219
- MISS =
220
- T.let(
221
- :miss,
222
- ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
223
- )
224
- ZDR =
225
- T.let(
226
- :zdr,
227
- ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
228
- )
229
-
230
- sig do
231
- override.returns(
232
- T::Array[
233
- ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
234
- ]
235
- )
236
- end
237
- def self.values
238
- end
239
- end
240
- end
241
-
242
139
  class Brand < ContextDev::Internal::Type::BaseModel
243
140
  OrHash =
244
141
  T.type_alias do
@@ -1004,6 +901,101 @@ module ContextDev
1004
901
  end
1005
902
  end
1006
903
 
904
+ class CacheMetadata < ContextDev::Internal::Type::BaseModel
905
+ OrHash =
906
+ T.type_alias do
907
+ T.any(
908
+ ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata,
909
+ ContextDev::Internal::AnyHash
910
+ )
911
+ end
912
+
913
+ # Age of the cached data in milliseconds. Zero for miss and zdr responses.
914
+ sig { returns(Integer) }
915
+ attr_accessor :age_ms
916
+
917
+ # Whether the response was served from cache, required fresh work, or honored
918
+ # zero-data-retention cache bypass.
919
+ sig do
920
+ returns(
921
+ ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
922
+ )
923
+ end
924
+ attr_accessor :status
925
+
926
+ # Cache outcome for this response. Composite responses are hits only when every
927
+ # cache-controlled fetch contributing to the output was a hit; age_ms is the
928
+ # oldest contributing hit.
929
+ sig do
930
+ params(
931
+ age_ms: Integer,
932
+ status:
933
+ ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::OrSymbol
934
+ ).returns(T.attached_class)
935
+ end
936
+ def self.new(
937
+ # Age of the cached data in milliseconds. Zero for miss and zdr responses.
938
+ age_ms:,
939
+ # Whether the response was served from cache, required fresh work, or honored
940
+ # zero-data-retention cache bypass.
941
+ status:
942
+ )
943
+ end
944
+
945
+ sig do
946
+ override.returns(
947
+ {
948
+ age_ms: Integer,
949
+ status:
950
+ ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
951
+ }
952
+ )
953
+ end
954
+ def to_hash
955
+ end
956
+
957
+ # Whether the response was served from cache, required fresh work, or honored
958
+ # zero-data-retention cache bypass.
959
+ module Status
960
+ extend ContextDev::Internal::Type::Enum
961
+
962
+ TaggedSymbol =
963
+ T.type_alias do
964
+ T.all(
965
+ Symbol,
966
+ ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status
967
+ )
968
+ end
969
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
970
+
971
+ HIT =
972
+ T.let(
973
+ :hit,
974
+ ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
975
+ )
976
+ MISS =
977
+ T.let(
978
+ :miss,
979
+ ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
980
+ )
981
+ ZDR =
982
+ T.let(
983
+ :zdr,
984
+ ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
985
+ )
986
+
987
+ sig do
988
+ override.returns(
989
+ T::Array[
990
+ ContextDev::Models::BrandRetrieveSimplifiedResponse::CacheMetadata::Status::TaggedSymbol
991
+ ]
992
+ )
993
+ end
994
+ def self.values
995
+ end
996
+ end
997
+ end
998
+
1007
999
  class KeyMetadata < ContextDev::Internal::Type::BaseModel
1008
1000
  OrHash =
1009
1001
  T.type_alias do
@@ -213,7 +213,8 @@ module ContextDev
213
213
  )
214
214
  end
215
215
 
216
- # Snippet excerpt from the page.
216
+ # Snippet excerpt from the page. Empty string when the search provider does not
217
+ # supply a snippet.
217
218
  sig { returns(String) }
218
219
  attr_accessor :description
219
220
 
@@ -257,7 +258,8 @@ module ContextDev
257
258
  ).returns(T.attached_class)
258
259
  end
259
260
  def self.new(
260
- # Snippet excerpt from the page.
261
+ # Snippet excerpt from the page. Empty string when the search provider does not
262
+ # supply a snippet.
261
263
  description:,
262
264
  # Markdown scrape status and content for this result.
263
265
  markdown:,