"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, {
    createMongoPrinterRules: function() {
        return createMongoPrinterRules;
    },
    createPrinterRules: function() {
        return createPrinterRules;
    },
    updatePrinterDisabledReasonRule: function() {
        return updatePrinterDisabledReasonRule;
    },
    updatePrinterEnabledRule: function() {
        return updatePrinterEnabledRule;
    }
});
const _serviceconstants = require("../../constants/service.constants");
const _printerapiinterface = require("../printer-api.interface");
const createMongoPrinterRules = {
    _id: "not",
    printerURL: "required|httpurl",
    printerType: `required|integer|in:${_printerapiinterface.OctoprintType},${_printerapiinterface.MoonrakerType}`,
    apiKey: `requiredIf:printerType,${_printerapiinterface.OctoprintType}|length:${_serviceconstants.apiKeyLengthMaxDefault},${_serviceconstants.apiKeyLengthMinDefault}|alphaDash`,
    enabled: "boolean",
    name: "string"
};
const createPrinterRules = {
    printerURL: "required|httpurl",
    printerType: `required|integer|in:${_printerapiinterface.OctoprintType},${_printerapiinterface.MoonrakerType}`,
    apiKey: `requiredIf:printerType,${_printerapiinterface.OctoprintType}|length:${_serviceconstants.apiKeyLengthMaxDefault},${_serviceconstants.apiKeyLengthMinDefault}|alphaDash`,
    enabled: "boolean",
    name: "required|string"
};
const updatePrinterEnabledRule = {
    enabled: "required|boolean"
};
const updatePrinterDisabledReasonRule = {
    disabledReason: "required|nullable|string",
    enabled: "boolean"
};

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