"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MetricArguments = exports.TimeRange = exports.Grouping = exports.ResultType = exports.Op = exports.OrderBy = exports.FilterType = exports.GroupBy = exports.MetricType = void 0;
const jackson_js_1 = require("jackson-js");
var MetricType;
(function (MetricType) {
    MetricType["FINANCIALS"] = "FINANCIALS";
    MetricType["ORDER_AVG_PROFIT"] = "ORDER-AVG-PROFIT";
    MetricType["ORDER_STATUS"] = "ORDER-STATUS";
})(MetricType = exports.MetricType || (exports.MetricType = {}));
var GroupBy;
(function (GroupBy) {
    // sku field
    GroupBy["SKU"] = "SKU";
    // product_id field
    GroupBy["PRODUCT_ID"] = "PRODUCT_ID";
    // product_parent_id field
    GroupBy["PRODUCT_PARENT_ID"] = "PRODUCT_PARENT_ID";
    // brand field
    GroupBy["BRAND"] = "BRAND";
    // country field
    GroupBy["COUNTRY"] = "COUNTRY";
    // element in the product_tags jsonb field
    GroupBy["PRODUCT_TAG"] = "PRODUCT_TAG";
    // marketplace field
    GroupBy["MARKETPLACE"] = "MARKETPLACE";
    // value of the element with key "status" in attributes jsonb field
    GroupBy["STATUS"] = "STATUS";
    // financial_event_type field
    GroupBy["FINANCIAL_EVENT_TYPE"] = "FINANCIAL_EVENT_TYPE";
    // aggregated financial_event_type field
    GroupBy["AGGR_FINANCIAL_EVENT_TYPE"] = "AGGR_FINANCIAL_EVENT_TYPE";
})(GroupBy = exports.GroupBy || (exports.GroupBy = {}));
var FilterType;
(function (FilterType) {
    // sku field
    FilterType["SKU"] = "SKU";
    // product_id field
    FilterType["PRODUCT_ID"] = "PRODUCT_ID";
    // product_parent_id field
    FilterType["PRODUCT_PARENT_ID"] = "PRODUCT_PARENT_ID";
    // brand field
    FilterType["BRAND"] = "BRAND";
    // marketplace field
    FilterType["MARKETPLACE"] = "MARKETPLACE";
    // value of the element with key "status" in attributes jsonb field
    FilterType["STATUS"] = "STATUS";
    // country field
    FilterType["COUNTRY"] = "COUNTRY";
    // element in the product_tags jsonb field
    FilterType["PRODUCT_TAG"] = "PRODUCT_TAG";
})(FilterType = exports.FilterType || (exports.FilterType = {}));
var OrderBy;
(function (OrderBy) {
    // sku field
    OrderBy["SKU"] = "SKU";
    // product_id field
    OrderBy["PRODUCT_ID"] = "PRODUCT_ID";
    // product_parent_id field
    OrderBy["PRODUCT_PARENT_ID"] = "PRODUCT_PARENT_ID";
    // brand field
    OrderBy["BRAND"] = "BRAND";
    // country field
    OrderBy["COUNTRY"] = "COUNTRY";
    // element in the product_tags jsonb field
    OrderBy["PRODUCT_TAG"] = "PRODUCT_TAG";
    // marketplace field
    OrderBy["MARKETPLACE"] = "MARKETPLACE";
    // value of the element with key "status" in attributes jsonb field
    OrderBy["STATUS"] = "STATUS";
    // financial_event_type field
    OrderBy["FINANCIAL_EVENT_TYPE"] = "FINANCIAL_EVENT_TYPE";
    // aggregated financial_event_type field
    OrderBy["AGGR_FINANCIAL_EVENT_TYPE"] = "AGGR_FINANCIAL_EVENT_TYPE";
    // computed amount field
    OrderBy["AMOUNT"] = "AMOUNT";
    // time frame
    OrderBy["TIME"] = "TIME";
})(OrderBy = exports.OrderBy || (exports.OrderBy = {}));
var OrderDirection;
(function (OrderDirection) {
    OrderDirection["ASC"] = "ASC";
    OrderDirection["DESC"] = "DESC";
})(OrderDirection || (OrderDirection = {}));
var Op;
(function (Op) {
    Op["SUM"] = "SUM";
    Op["AVG"] = "AVG";
})(Op = exports.Op || (exports.Op = {}));
var ResultType;
(function (ResultType) {
    ResultType["POINTS"] = "POINTS";
    ResultType["SERIES"] = "SERIES";
})(ResultType = exports.ResultType || (exports.ResultType = {}));
var Grouping;
(function (Grouping) {
    Grouping["BY"] = "BY";
    Grouping["ROLLUP"] = "ROLLUP";
    Grouping["SETS"] = "SETS";
})(Grouping = exports.Grouping || (exports.Grouping = {}));
class TimeRange {
}
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Date] })
], TimeRange.prototype, "from", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Date] })
], TimeRange.prototype, "to", void 0);
exports.TimeRange = TimeRange;
class MetricArguments {
}
__decorate([
    (0, jackson_js_1.JsonProperty)()
], MetricArguments.prototype, "type", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], MetricArguments.prototype, "result", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], MetricArguments.prototype, "op", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], MetricArguments.prototype, "grouping", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], MetricArguments.prototype, "currency", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Object] })
], MetricArguments.prototype, "filters", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [TimeRange] })
], MetricArguments.prototype, "timeRange", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Array, [String]] })
], MetricArguments.prototype, "groupBy", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Array, [String]] })
], MetricArguments.prototype, "orderBy", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], MetricArguments.prototype, "orderDirection", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], MetricArguments.prototype, "limit", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], MetricArguments.prototype, "retrospective", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], MetricArguments.prototype, "timeWindow", void 0);
exports.MetricArguments = MetricArguments;
//# sourceMappingURL=metric_profitability.js.map