contensis-core-api
Version:
A dependency library used by contensis-delivery-api and contensis-management-api
30 lines • 1.03 kB
JavaScript
var ZenqlQuery = /** @class */ (function () {
function ZenqlQuery(zenql) {
this.zenql = '';
this.pageIndex = 0;
this.pageSize = 20;
this.fieldLinkDepths = {};
this.fields = [];
this.aggregations = {};
this.zenql = zenql;
}
ZenqlQuery.prototype.toJSON = function () {
var result = {};
result.pageIndex = this.pageIndex;
result.pageSize = this.pageSize;
result.zenql = this.zenql;
if (this.fields && this.fields.length > 0) {
result.fields = this.fields;
}
if (this.fieldLinkDepths && Object.keys(this.fieldLinkDepths).length > 0) {
result.fieldLinkDepths = this.fieldLinkDepths;
}
if (this.aggregations && Object.keys(this.aggregations).length > 0) {
result.aggregations = this.aggregations;
}
return result;
};
return ZenqlQuery;
}());
export { ZenqlQuery };
//# sourceMappingURL=ZenqlQuery.js.map