Skip to content

Commit

Permalink
Remove no longer needed types
Browse files Browse the repository at this point in the history
  • Loading branch information
jennypavlova committed Aug 20, 2024
1 parent 30cf479 commit 6093b35
Showing 1 changed file with 0 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,38 +245,6 @@ export const ESBasicMetricAggRT = rt.record(
])
);

export const ESPercentileAggRT = rt.type({
percentiles: rt.type({
field: rt.string,
percents: rt.array(rt.number),
}),
});

export const ESCaridnalityAggRT = rt.type({
cardinality: rt.partial({
field: rt.string,
}),
});

export const ESBucketScriptAggRT = rt.type({
bucket_script: rt.intersection([
rt.type({
buckets_path: rt.record(rt.string, rt.string),
script: rt.type({
source: rt.string,
lang: rt.keyof({ painless: null, expression: null }),
}),
}),
rt.partial({ gap_policy: rt.keyof({ skip: null, insert_zeros: null }) }),
]),
});

export const ESCumulativeSumAggRT = rt.type({
cumulative_sum: rt.type({
buckets_path: rt.string,
}),
});

export const ESDerivativeAggRT = rt.type({
derivative: rt.type({
buckets_path: rt.string,
Expand All @@ -291,33 +259,6 @@ export const ESSumBucketAggRT = rt.type({
}),
});

export const ESTopMetricsAggRT = rt.type({
top_metrics: rt.intersection([
rt.type({
metrics: rt.union([rt.array(rt.type({ field: rt.string })), rt.type({ field: rt.string })]),
}),
rt.partial({
size: rt.number,
sort: rt.record(rt.string, rt.union([rt.literal('desc'), rt.literal('asc')])),
}),
]),
});

export const ESMaxPeriodFilterExistsAggRT = rt.type({
filter: rt.type({
exists: rt.type({
field: rt.string,
}),
}),
aggs: rt.type({
period: rt.type({
max: rt.type({
field: rt.string,
}),
}),
}),
});

export type MetricsUIAggregation = Record<string, estypes.AggregationsAggregate>;

export const ESTermsWithAggregationRT = rt.type({
Expand Down

0 comments on commit 6093b35

Please sign in to comment.