Skip to content

Commit

Permalink
DocCount interface
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Sep 22, 2021
1 parent 3d6ecd0 commit 5558025
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions x-pack/plugins/reporting/server/usage/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,49 +15,47 @@ export interface SizePercentiles {
'99.0': number | null;
}

interface DocCount {
doc_count: number;
}

interface SizeStats {
sizes?: { values: SizePercentiles };
}

export interface KeyCountBucket extends SizeStats {
export interface KeyCountBucket extends DocCount, SizeStats {
key: string;
doc_count: number;
isDeprecated?: {
doc_count: number;
};
isDeprecated?: DocCount;
}

export interface AggregationBuckets {
buckets: KeyCountBucket[];
}

export interface StatusByAppBucket {
export interface StatusByAppBucket extends DocCount {
key: string;
doc_count: number;
jobTypes: {
buckets: Array<{
doc_count: number;
key: string;
appNames: AggregationBuckets;
}>;
buckets: Array<
{
key: string;
appNames: AggregationBuckets;
} & DocCount
>;
};
}

export interface AggregationResultBuckets extends SizeStats {
export interface AggregationResultBuckets extends DocCount, SizeStats {
jobTypes?: AggregationBuckets;
layoutTypes: {
doc_count: number;
pdf?: AggregationBuckets;
};
} & DocCount;
objectTypes: {
doc_count: number;
pdf?: AggregationBuckets;
};
} & DocCount;
statusTypes: AggregationBuckets;
statusByApp: {
buckets: StatusByAppBucket[];
};
doc_count: number;
}

export interface SearchResponse {
Expand Down

0 comments on commit 5558025

Please sign in to comment.