all files / lib/ metadata.js

100% Statements 41/41
83.33% Branches 5/6
100% Functions 5/5
100% Lines 40/40
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              13×       11× 11× 11× 11× 11× 11×             30× 30× 30× 30×        
"use strict";
class ServiceClass {
    constructor(targetClass) {
        this.targetClass = targetClass;
        this.methods = new Map();
    }
    addProperty(key, paramType) {
        Eif (!this.hasProperties()) {
            this.properties = new Map();
        }
        this.properties.set(key, paramType);
    }
    hasProperties() {
        return (this.properties && this.properties.size > 0);
    }
}
exports.ServiceClass = ServiceClass;
class ServiceMethod {
    constructor() {
        this.parameters = new Array();
        this.mustParseCookies = false;
        this.files = new Array();
        this.mustParseBody = false;
        this.mustParseForms = false;
    }
}
exports.ServiceMethod = ServiceMethod;
class FileParam {
    constructor(name, singleFile) {
        this.name = name;
        this.singleFile = singleFile;
    }
}
exports.FileParam = FileParam;
class MethodParam {
    constructor(name, type, paramType) {
        this.name = name;
        this.type = type;
        this.paramType = paramType;
    }
}
exports.MethodParam = MethodParam;
(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["file"] = 6] = "file";
    ParamType[ParamType["files"] = 7] = "files";
    ParamType[ParamType["context"] = 8] = "context";
    ParamType[ParamType["context_request"] = 9] = "context_request";
    ParamType[ParamType["context_response"] = 10] = "context_response";
    ParamType[ParamType["context_next"] = 11] = "context_next";
    ParamType[ParamType["context_accept"] = 12] = "context_accept";
    ParamType[ParamType["context_accept_language"] = 13] = "context_accept_language";
})(exports.ParamType || (exports.ParamType = {}));
var ParamType = exports.ParamType;