UNPKG

graphql-compose-elasticsearch

Version:
30 lines 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getDateHistogramITC = void 0; const utils_1 = require("../../../utils"); const Script_1 = require("../../Commons/Script"); const Date_1 = require("../../Commons/Date"); const FieldNames_1 = require("../../Commons/FieldNames"); function getDateHistogramITC(opts) { const name = (0, utils_1.getTypeName)('AggsDateHistogram', opts); const description = (0, utils_1.desc)(` A multi-bucket aggregation similar to the histogram except it can only be applied on date values. [Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-datehistogram-aggregation.html) `); return opts.getOrCreateITC(name, () => ({ name, description, fields: { field: (0, FieldNames_1.getDateFields)(opts), interval: (0, Date_1.getDateIntervalFC)(opts), time_zone: (0, Date_1.getDateTimeZoneFC)(opts), offset: (0, Date_1.getDateIntervalFC)(opts), format: (0, Date_1.getDateFormatFC)(opts), missing: 'String', script: () => (0, Script_1.getCommonsScriptITC)(opts), }, })); } exports.getDateHistogramITC = getDateHistogramITC; //# sourceMappingURL=DateHistogram.js.map