all files / lib/ metadata.js

100% Statements 53/53
100% Branches 6/6
100% Functions 11/11
100% Lines 53/53
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69  10× 10×       24×     21× 21× 21× 21× 21× 21×         33× 33× 33×            
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ServiceClass = (function () {
    function ServiceClass(targetClass) {
        this.targetClass = targetClass;
        this.methods = new Map();
    }
    ServiceClass.prototype.addProperty = function (key, paramType, paramName, propertyType) {
        if (!this.hasProperties()) {
            this.properties = new Map();
        }
        this.properties.set(key, { type: paramType, name: paramName, propertyType: propertyType });
    };
    ServiceClass.prototype.hasProperties = function () {
        return (this.properties && this.properties.size > 0);
    };
    return ServiceClass;
}());
exports.ServiceClass = ServiceClass;
var ServiceMethod = (function () {
    function ServiceMethod() {
        this.parameters = new Array();
        this.mustParseCookies = false;
        this.files = new Array();
        this.mustParseBody = false;
        this.mustParseForms = false;
        this.acceptMultiTypedParam = false;
    }
    return ServiceMethod;
}());
exports.ServiceMethod = ServiceMethod;
var FileParam = (function () {
    function FileParam(name, singleFile) {
        this.name = name;
        this.singleFile = singleFile;
    }
    return FileParam;
}());
exports.FileParam = FileParam;
var MethodParam = (function () {
    function MethodParam(name, type, paramType) {
        this.name = name;
        this.type = type;
        this.paramType = paramType;
    }
    return MethodParam;
}());
exports.MethodParam = MethodParam;
var ParamType;
(function (ParamType) {
    ParamType[ParamType["path"] = 0] = "path";
    ParamType[ParamType["query"] = 1] = "query";
    ParamType[ParamType["header"] = 2] = "header";
    ParamType[ParamType["cookie"] = 3] = "cookie";
    ParamType[ParamType["form"] = 4] = "form";
    ParamType[ParamType["body"] = 5] = "body";
    ParamType[ParamType["param"] = 6] = "param";
    ParamType[ParamType["file"] = 7] = "file";
    ParamType[ParamType["files"] = 8] = "files";
    ParamType[ParamType["context"] = 9] = "context";
    ParamType[ParamType["context_request"] = 10] = "context_request";
    ParamType[ParamType["context_response"] = 11] = "context_response";
    ParamType[ParamType["context_next"] = 12] = "context_next";
    ParamType[ParamType["context_accept"] = 13] = "context_accept";
    ParamType[ParamType["context_accept_language"] = 14] = "context_accept_language";
})(ParamType = exports.ParamType || (exports.ParamType = {}));
 
//# sourceMappingURL=metadata.js.map