UNPKG

sardines-core

Version:
60 lines (59 loc) 2.64 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Http = void 0; var Http; (function (Http) { var Protocol; (function (Protocol) { Protocol["HTTP"] = "http"; Protocol["HTTPS"] = "https"; Protocol["HTTP2"] = "http2"; Protocol["HTTP3"] = "http3"; })(Protocol = Http.Protocol || (Http.Protocol = {})); var ServiceInputParamPosition; (function (ServiceInputParamPosition) { ServiceInputParamPosition["body"] = "body"; ServiceInputParamPosition["ctx"] = "ctx"; ServiceInputParamPosition["session"] = "session"; ServiceInputParamPosition["files"] = "files"; ServiceInputParamPosition["header"] = "header"; ServiceInputParamPosition["query"] = "query"; ServiceInputParamPosition["cookies"] = "cookies"; })(ServiceInputParamPosition = Http.ServiceInputParamPosition || (Http.ServiceInputParamPosition = {})); var ServiceInputParamType; (function (ServiceInputParamType) { ServiceInputParamType["object"] = "object"; ServiceInputParamType["string"] = "string"; ServiceInputParamType["number"] = "number"; ServiceInputParamType["boolean"] = "boolean"; })(ServiceInputParamType = Http.ServiceInputParamType || (Http.ServiceInputParamType = {})); var Method; (function (Method) { Method["GET"] = "get"; Method["PUT"] = "put"; Method["POST"] = "post"; Method["HEADER"] = "header"; Method["OPTIONS"] = "options"; Method["DEL"] = "del"; Method["DELETE"] = "delete"; })(Method = Http.Method || (Http.Method = {})); var ServiceResponseType; (function (ServiceResponseType) { ServiceResponseType["static"] = "static"; ServiceResponseType["file"] = "file"; ServiceResponseType["html"] = "html"; ServiceResponseType["render"] = "render"; ServiceResponseType["handler"] = "handler"; ServiceResponseType["json"] = "json"; ServiceResponseType["text"] = "text"; ServiceResponseType["string"] = "string"; ServiceResponseType["number"] = "number"; ServiceResponseType["boolean"] = "boolean"; })(ServiceResponseType = Http.ServiceResponseType || (Http.ServiceResponseType = {})); var Transform; (function (Transform) { Transform.parseServicePath = function (service) { return ("/" + service.application + "/" + service.module + "/" + service.name).replace(/\/\//g, '/'); }; })(Transform = Http.Transform || (Http.Transform = {})); })(Http = exports.Http || (exports.Http = {}));