|  | 
| 20 | 20 | import { CompositeAggregateKey } from '@_types/aggregations/bucket' | 
| 21 | 21 | import { AggregateName, Field, FieldValue, Metadata } from '@_types/common' | 
| 22 | 22 | import { | 
|  | 23 | +  CartesianPoint, | 
| 23 | 24 |   GeoBounds, | 
| 24 | 25 |   GeoHash, | 
| 25 | 26 |   GeoHexCell, | 
| 26 | 27 |   GeoLine, | 
| 27 | 28 |   GeoLocation, | 
| 28 |  | -  GeoTile | 
|  | 29 | +  GeoTile, | 
|  | 30 | +  TopLeftBottomRightGeoBounds | 
| 29 | 31 | } from '@_types/Geo' | 
| 30 | 32 | import { double, integer, long } from '@_types/Numeric' | 
| 31 | 33 | import { DurationLarge, EpochTime, UnitMillis } from '@_types/Time' | 
| @@ -59,11 +61,14 @@ export type Aggregate = | 
| 59 | 61 |   | SimpleValueAggregate | 
| 60 | 62 |   | DerivativeAggregate | 
| 61 | 63 |   | BucketMetricValueAggregate | 
|  | 64 | +  | ChangePointAggregate | 
| 62 | 65 |   // Multi value | 
| 63 | 66 |   | StatsAggregate | 
| 64 | 67 |   | StatsBucketAggregate | 
| 65 | 68 |   | ExtendedStatsAggregate | 
| 66 | 69 |   | ExtendedStatsBucketAggregate | 
|  | 70 | +  | CartesianBoundsAggregate | 
|  | 71 | +  | CartesianCentroidAggregate | 
| 67 | 72 |   // Geo | 
| 68 | 73 |   | GeoBoundsAggregate | 
| 69 | 74 |   | GeoCentroidAggregate | 
| @@ -322,6 +327,17 @@ export class ExtendedStatsAggregate extends StatsAggregate { | 
| 322 | 327 | /** @variant name=extended_stats_bucket */ | 
| 323 | 328 | export class ExtendedStatsBucketAggregate extends ExtendedStatsAggregate {} | 
| 324 | 329 | 
 | 
|  | 330 | +/** @variant name=cartesian_bounds */ | 
|  | 331 | +export class CartesianBoundsAggregate extends AggregateBase { | 
|  | 332 | +  bounds?: TopLeftBottomRightGeoBounds | 
|  | 333 | +} | 
|  | 334 | + | 
|  | 335 | +/** @variant name=cartesian_centroid */ | 
|  | 336 | +export class CartesianCentroidAggregate extends AggregateBase { | 
|  | 337 | +  count: long | 
|  | 338 | +  location?: CartesianPoint | 
|  | 339 | +} | 
|  | 340 | + | 
| 325 | 341 | //----- Geo | 
| 326 | 342 | 
 | 
| 327 | 343 | /** | 
| @@ -369,6 +385,68 @@ export class MultiBucketBase | 
| 369 | 385 |   doc_count: long | 
| 370 | 386 | } | 
| 371 | 387 | 
 | 
|  | 388 | +/** @variant name=change_point */ | 
|  | 389 | +export class ChangePointAggregate extends MultiBucketAggregateBase<ChangePointBucket> { | 
|  | 390 | +  type: ChangeType | 
|  | 391 | +  bucket?: ChangePointBucket | 
|  | 392 | +} | 
|  | 393 | + | 
|  | 394 | +export class ChangePointBucket extends MultiBucketBase { | 
|  | 395 | +  key: FieldValue | 
|  | 396 | +} | 
|  | 397 | + | 
|  | 398 | +/** | 
|  | 399 | + * @variants typed_keys_quirk | 
|  | 400 | + */ | 
|  | 401 | +export type ChangeType = | 
|  | 402 | +  | Dip | 
|  | 403 | +  | DistributionChange | 
|  | 404 | +  | Indeterminable | 
|  | 405 | +  | NonStationary | 
|  | 406 | +  | Spike | 
|  | 407 | +  | Stationary | 
|  | 408 | +  | StepChange | 
|  | 409 | +  | TrendChange | 
|  | 410 | + | 
|  | 411 | +export class AbstractChangePoint { | 
|  | 412 | +  p_value: double | 
|  | 413 | +  change_point: integer | 
|  | 414 | +} | 
|  | 415 | + | 
|  | 416 | +/** @variant name=dip */ | 
|  | 417 | +export class Dip extends AbstractChangePoint {} | 
|  | 418 | + | 
|  | 419 | +/** @variant name=distribution_change */ | 
|  | 420 | +export class DistributionChange extends AbstractChangePoint {} | 
|  | 421 | + | 
|  | 422 | +/** @variant name=spike */ | 
|  | 423 | +export class Spike extends AbstractChangePoint {} | 
|  | 424 | + | 
|  | 425 | +/** @variant name=step_change */ | 
|  | 426 | +export class StepChange extends AbstractChangePoint {} | 
|  | 427 | + | 
|  | 428 | +/** @variant name=indeterminable */ | 
|  | 429 | +export class Indeterminable { | 
|  | 430 | +  reason: string | 
|  | 431 | +} | 
|  | 432 | + | 
|  | 433 | +/** @variant name=non_stationary */ | 
|  | 434 | +export class NonStationary { | 
|  | 435 | +  p_value: double | 
|  | 436 | +  r_value: double | 
|  | 437 | +  trend: string | 
|  | 438 | +} | 
|  | 439 | + | 
|  | 440 | +/** @variant name=stationary */ | 
|  | 441 | +export class Stationary {} | 
|  | 442 | + | 
|  | 443 | +/** @variant name=trend_change */ | 
|  | 444 | +export class TrendChange { | 
|  | 445 | +  p_value: double | 
|  | 446 | +  r_value: double | 
|  | 447 | +  change_point: integer | 
|  | 448 | +} | 
|  | 449 | + | 
| 372 | 450 | /** | 
| 373 | 451 |  * @variant name=histogram | 
| 374 | 452 |  * @ext_doc_id search-aggregations-bucket-histogram-aggregation | 
|  | 
0 commit comments