"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;
|