enonic-types
Advanced tools
Comparing version 0.0.22 to 0.0.23
@@ -82,59 +82,82 @@ import { Component } from "./portal"; | ||
readonly sort?: string; | ||
readonly aggregations?: Aggregations; | ||
readonly aggregations?: { | ||
readonly [key: string]: Aggregation; | ||
}; | ||
readonly contentTypes?: ReadonlyArray<string>; | ||
readonly highlight?: Highlight; | ||
} | ||
export interface Aggregations { | ||
[name: string]: { | ||
terms?: { | ||
field: string; | ||
order: string; | ||
size: number; | ||
declare type Aggregation = TermsAggregation | StatsAggregation | RangeAggregation | GeoDistanceAggregation | DateRangeAggregation; | ||
interface TermsAggregation { | ||
terms: { | ||
field: string; | ||
order: string; | ||
size: number; | ||
}; | ||
aggregations?: { | ||
[subaggregation: string]: Aggregation; | ||
}; | ||
} | ||
interface StatsAggregation { | ||
stats: { | ||
field: string; | ||
order: string; | ||
size: number; | ||
}; | ||
aggregations?: { | ||
[subaggregation: string]: Aggregation; | ||
}; | ||
} | ||
interface RangeAggregation { | ||
range: { | ||
field: string; | ||
ranges?: Array<{ | ||
from?: number; | ||
to?: number; | ||
}>; | ||
range?: { | ||
from: number; | ||
to: number; | ||
}; | ||
stats?: { | ||
field: string; | ||
order: string; | ||
size: number; | ||
}; | ||
}; | ||
aggregations?: { | ||
[subaggregation: string]: Aggregation; | ||
}; | ||
} | ||
interface GeoDistanceAggregation { | ||
geoDistance: { | ||
field: string; | ||
ranges?: Array<{ | ||
from?: number; | ||
to?: number; | ||
}>; | ||
range?: { | ||
field: string; | ||
ranges?: Array<{ | ||
from?: number; | ||
to?: number; | ||
}>; | ||
range?: { | ||
from: number; | ||
to: number; | ||
}; | ||
from: number; | ||
to: number; | ||
}; | ||
geoDistance?: { | ||
field: string; | ||
ranges?: Array<{ | ||
from?: number; | ||
to?: number; | ||
}>; | ||
range?: { | ||
from: number; | ||
to: number; | ||
}; | ||
unit: string; | ||
origin: { | ||
lat: string; | ||
lon: string; | ||
}; | ||
unit: string; | ||
origin: { | ||
lat: string; | ||
lon: string; | ||
}; | ||
dateRange?: { | ||
field: string; | ||
format: string; | ||
ranges?: Array<{ | ||
from?: string; | ||
to?: string; | ||
}>; | ||
range?: { | ||
from: string; | ||
to: string; | ||
}; | ||
}; | ||
aggregations?: { | ||
[subaggregation: string]: Aggregation; | ||
}; | ||
} | ||
interface DateRangeAggregation { | ||
dateRange: { | ||
field: string; | ||
format: string; | ||
ranges?: Array<{ | ||
from?: string; | ||
to?: string; | ||
}>; | ||
range?: { | ||
from: string; | ||
to: string; | ||
}; | ||
aggregations: Aggregations; | ||
}; | ||
aggregations?: { | ||
[subaggregation: string]: Aggregation; | ||
}; | ||
} | ||
@@ -307,1 +330,2 @@ export interface Highlight { | ||
} | ||
export {}; |
{ | ||
"name": "enonic-types", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"description": "TypeScript types for Enonic XP", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
37783
1065