@@ -12,6 +12,10 @@ export * from './browse';
1212export * from './tracker' ;
1313export * from './event-dispatcher' ;
1414
15+ type RequireAtLeastOne < T , Keys extends keyof T = keyof T > =
16+ Pick < T , Exclude < keyof T , Keys > > &
17+ { [ K in Keys ] -?: Required < Pick < T , K > > & Partial < Pick < T , Exclude < Keys , K > > > } [ Keys ] ;
18+
1519export interface NetworkParameters extends Record < string , any > {
1620 timeout ?: number ;
1721}
@@ -227,11 +231,11 @@ export interface VariationsMapRange {
227231
228232export type FilterNode = VariationsMapSingleFilter | VariationsMapRange ;
229233
230- export interface FilterBy {
234+ export type FilterBy = RequireAtLeastOne < {
231235 and ?: Array < FilterNode | FilterBy > ;
232236 or ?: Array < FilterNode | FilterBy > ;
233237 not ?: FilterNode | FilterBy ;
234- }
238+ } > ;
235239
236240export interface Item extends Record < string , any > {
237241 value : string ;
@@ -241,7 +245,7 @@ export interface Item extends Record<string, any> {
241245 data ?: ItemData ;
242246 strategy ?: { id : string } ;
243247 variations ?: { data ?: ItemData , value : string } [ ]
244- variationsMap ?: VariationsMapResponse ;
248+ variations_map ?: VariationsMapResponse ;
245249}
246250
247251export interface ItemData extends Record < string , any > {
@@ -279,7 +283,6 @@ export interface VariationsMapValueCount extends VariationsMapBaseValue {
279283
280284export interface VariationsMapStandardValue extends VariationsMapBaseValue {
281285 aggregation : Exclude < Aggregation , 'value_count' > ;
282- field : string ;
283286}
284287
285288export interface VariationsMap {
0 commit comments