"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: all[name]
    });
}
_export(exports, {
    createOctoPrintBackupRules: function() {
        return createOctoPrintBackupRules;
    },
    feedRateRules: function() {
        return feedRateRules;
    },
    flowRateRules: function() {
        return flowRateRules;
    },
    getOctoPrintBackupRules: function() {
        return getOctoPrintBackupRules;
    },
    testPrinterApiRules: function() {
        return testPrinterApiRules;
    },
    updatePrinterConnectionSettingRules: function() {
        return updatePrinterConnectionSettingRules;
    },
    updatePrinterDisabledReasonRules: function() {
        return updatePrinterDisabledReasonRules;
    },
    updatePrinterEnabledRule: function() {
        return updatePrinterEnabledRule;
    }
});
const _serviceconstants = require("../../constants/service.constants");
const _printerapiinterface = require("../../services/printer-api.interface");
const flowRateRules = {
    flowRate: "required|between:75,125|integer"
};
const feedRateRules = {
    feedRate: "required|between:10,200|integer"
};
const testPrinterApiRules = {
    printerType: `required|integer|in:${_printerapiinterface.OctoprintType},${_printerapiinterface.MoonrakerType}`,
    apiKey: `requiredIf:printerType,${_printerapiinterface.OctoprintType}|length:${_serviceconstants.apiKeyLengthMaxDefault},${_serviceconstants.apiKeyLengthMinDefault}|alphaDash`,
    printerURL: "required|httpurl"
};
const updatePrinterDisabledReasonRules = {
    disabledReason: "string"
};
const updatePrinterEnabledRule = {
    enabled: "required|boolean"
};
const updatePrinterConnectionSettingRules = {
    printerType: `required|integer|in:${_printerapiinterface.OctoprintType},${_printerapiinterface.MoonrakerType}`,
    printerURL: "required|httpurl",
    apiKey: `requiredIf:printerType,${_printerapiinterface.OctoprintType}|length:${_serviceconstants.apiKeyLengthMaxDefault},${_serviceconstants.apiKeyLengthMinDefault}|alphaDash`
};
const createOctoPrintBackupRules = {
    exclude: "array",
    "exclude.*": "string"
};
const getOctoPrintBackupRules = {
    fileName: "required|string"
};

//# sourceMappingURL=printer-controller.validation.js.map