"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RequestStore = void 0;
const tslib_1 = require("tslib");
const json_1 = require("@stoplight/json");
const yaml_1 = require("@stoplight/yaml");
const lodash_1 = require("lodash");
const mobx_1 = require("mobx");
const typeis = tslib_1.__importStar(require("type-is"));
const urijs_1 = tslib_1.__importDefault(require("urijs"));
const getContentType_1 = require("../../utils/getContentType");
const params_1 = require("../../utils/params");
const url_1 = require("../../utils/url");
const HTTPSnippet = require('httpsnippet');
const DEFAULT_EMPTY_JSON = '{\n  \n}';
const DEFAULT_EMPTY_GQL = 'query {\n  \n}';
let RequestStore = (() => {
    var _a;
    class RequestStore {
        constructor() {
            this._templatedPath = '';
            this._method = 'get';
            this._contentType = 'none';
            this._body = DEFAULT_EMPTY_JSON;
            this.graphqlQuery = DEFAULT_EMPTY_GQL;
            this.graphqlVariables = DEFAULT_EMPTY_JSON;
            this._formDataParams = [];
            this._urlEncodedParams = [];
            this._headerParams = [];
            this._queryParams = [];
            this._pathParams = [];
            this._publicServers = [];
            this._timeout = 10000;
            this._validate = false;
            this._publicBaseUrl = '';
            this._shouldMock = false;
            this.setQueryParamsFromString = (queryString) => {
                this.queryParams = url_1.extractQueryParams(queryString, this.queryParams);
            };
        }
        get publicServers() {
            return this._publicServers;
        }
        set publicServers(value) {
            this._publicServers = value;
        }
        get publicBaseUrl() {
            return this._publicBaseUrl;
        }
        set publicBaseUrl(value) {
            this._publicBaseUrl = value;
        }
        get mockBaseUrl() {
            return this._mockBaseUrl;
        }
        set mockBaseUrl(value) {
            this._mockBaseUrl = value;
        }
        get shouldMock() {
            return this._shouldMock;
        }
        set shouldMock(value) {
            this._shouldMock = value;
        }
        get isContentTypeJson() {
            var _a;
            return (((_a = this.activeContentTypeHeader) === null || _a === void 0 ? void 0 : _a.value) &&
                typeis.is(this.activeContentTypeHeader.value, ['application/json', 'application/*+json']));
        }
        toPartialHttpRequest() {
            const url = new urijs_1.default(this.url);
            let bodyParams;
            if (this.contentType === 'raw') {
                bodyParams = (this.isContentTypeJson && json_1.safeParse(this.body)) || this.body;
            }
            else if (this.contentType === 'form-data' || this.contentType === 'binary') {
                bodyParams = params_1.getNameValuePairs(this.formDataParams, { enabled: true });
            }
            else if (this.contentType === 'x-www-form-urlencoded') {
                bodyParams = params_1.getNameValuePairs(this.urlEncodedParams, { enabled: true });
            }
            else if (this.contentType === 'graphql') {
                bodyParams = {
                    query: json_1.safeParse(this.graphqlQuery) || this.graphqlQuery,
                    variables: json_1.safeParse(this.graphqlVariables) || this.graphqlVariables,
                };
            }
            return {
                method: this.method,
                url: `${url.origin()}${url.path()}`,
                query: this.queryParams.length > 0 ? params_1.getNameValuePairs(this.queryParams, { enabled: true }) : undefined,
                headers: this.headerParams.length > 0 ? params_1.getNameValuePairs(this.headerParams, { enabled: true }) : undefined,
                body: !lodash_1.isEmpty(bodyParams) ? bodyParams : undefined,
            };
        }
        toAxios() {
            let data;
            if (this.contentType === 'raw') {
                data = (this.isContentTypeJson && json_1.safeParse(this.body)) || this.body;
            }
            else if (this.contentType === 'graphql') {
                data = {
                    query: this.graphqlQuery,
                    variables: this.graphqlVariables,
                };
            }
            else if (this.contentType === 'form-data' || this.contentType === 'binary') {
                data = new FormData();
                for (const param of params_1.getEnabledParams(this.formDataParams)) {
                    data.append(param.name, param.value || '');
                }
            }
            else if (this.contentType === 'x-www-form-urlencoded') {
                data = new URLSearchParams();
                for (const param of params_1.getEnabledParams(this.urlEncodedParams)) {
                    data.append(param.name, param.value || '');
                }
            }
            const url = new urijs_1.default(this.url);
            return Object.assign(Object.assign({ method: this.method, url: `${url.origin()}${url.path()}`, headers: params_1.getNameValuePairs(this.headerParams, { enabled: true }), params: params_1.getNameValuePairs(this.queryParams, { enabled: true }) }, (this.hasAuth && { auth: this.auth })), { data });
        }
        toPrism() {
            const request = this.toPartialHttpRequest();
            const headers = lodash_1.mapKeys(params_1.getNameValuePairs(this.headerParams, { enabled: true }), (_v, k) => k.toLowerCase());
            if (this.hasAuth && this.auth) {
                const encodedAuth = Buffer.from(`${this.auth.username}:${this.auth.password}`).toString('base64');
                if (headers.hasOwnProperty('Authorization')) {
                    delete headers.Authorization;
                }
                lodash_1.set(headers, 'authorization', `Basic ${encodedAuth}`);
            }
            const body = (this.isContentTypeJson && json_1.safeParse(this.body)) || this.body;
            return {
                url: {
                    baseUrl: this.baseUrl,
                    path: this.templatedPath,
                    query: request.query,
                },
                method: this.method,
                body,
                headers,
            };
        }
        toHAR() {
            let postData;
            if (this.contentType === 'x-www-form-urlencoded') {
                postData = {
                    mimeType: 'application/x-www-form-urlencoded',
                    params: params_1.getEnabledParams(this.urlEncodedParams).map(p => lodash_1.pick(p, 'name', 'value')),
                };
            }
            else if (this.contentType === 'form-data') {
                postData = {
                    mimeType: 'application/x-www-form-urlencoded',
                    params: params_1.getEnabledParams(this.formDataParams).map(p => lodash_1.pick(p, 'name', 'value')),
                };
            }
            else if (this.contentType === 'raw') {
                postData = {
                    mimeType: 'application/json',
                    text: json_1.safeStringify(json_1.safeParse(this.body), undefined, 0),
                };
            }
            else if (this.contentType === 'graphql') {
                postData = {
                    mimeType: 'application/json',
                    text: json_1.safeStringify({
                        query: json_1.safeParse(this.graphqlQuery) || this.graphqlQuery,
                        variables: json_1.safeParse(this.graphqlVariables) || this.graphqlVariables,
                    }, undefined, 0),
                };
            }
            else if (this.contentType === 'binary') {
                postData = {
                    mimeType: 'multipart/form-data',
                    params: params_1.getEnabledParams(this.formDataParams).map(p => ({
                        name: p.name,
                        fileName: p.name,
                        value: p.value,
                        contentType: p.type,
                    })),
                };
            }
            return {
                method: this.method.toUpperCase(),
                url: this.url,
                headers: params_1.getEnabledParams(this.headerParams).map(p => lodash_1.pick(p, 'name', 'value')),
                postData,
            };
        }
        generateCode(language, library) {
            if (language === 'markdown') {
                let markdown;
                if (library === 'yaml') {
                    markdown =
                        '```yaml http\n' + `${yaml_1.safeStringify(this.toPartialHttpRequest(), { indent: 2, noRefs: true })}` + '\n```';
                }
                else {
                    markdown = '```json http\n' + `${json_1.safeStringify(this.toPartialHttpRequest(), undefined, 2)}` + '\n```';
                }
                return markdown;
            }
            else if (language === 'har') {
                const har = json_1.safeStringify(this.toHAR(), undefined, 2);
                return har;
            }
            try {
                const snippet = new HTTPSnippet(this.toHAR(), {});
                return snippet.convert(language, library);
            }
            catch (err) {
                console.error(err);
                return null;
            }
        }
        get baseUrl() {
            return (this.shouldMock && this.mockBaseUrl) || this.publicBaseUrl;
        }
        get method() {
            return this._method || 'get';
        }
        set method(method) {
            this._method = method;
        }
        get mockServer() {
            if (this.mockBaseUrl) {
                return {
                    url: this.mockBaseUrl,
                    name: 'Prism mock instance',
                };
            }
            return undefined;
        }
        get servers() {
            if (this.shouldMock && this.mockServer) {
                return [this.mockServer];
            }
            return this.publicServers || [];
        }
        get templatedPath() {
            return this._templatedPath || '';
        }
        set templatedPath(path) {
            this._templatedPath = path;
            this._pathParams = url_1.getParamsFromPath(this._templatedPath, this._pathParams);
        }
        get uri() {
            const uri = new urijs_1.default({
                path: url_1.replaceParamsInPath(this.templatedPath, this.pathParams) || '/',
            });
            uri.search({});
            const query = params_1.getNameValuePairs(this.queryParams, { enabled: true });
            for (const key in query) {
                if (!query.hasOwnProperty(key))
                    continue;
                uri.addSearch(key, query[key]);
            }
            return uri.toString();
        }
        get url() {
            try {
                const baseUri = new urijs_1.default(this.baseUrl);
                const uri = new urijs_1.default(this.uri);
                const path = urijs_1.default.joinPaths(baseUri, uri.path()).path();
                const finalUrl = new urijs_1.default({
                    protocol: baseUri.protocol(),
                    hostname: baseUri.hostname(),
                    port: baseUri.port(),
                    path: path.startsWith('/') ? path.slice(1) : path,
                    query: uri.query(),
                });
                return finalUrl.protocol() ? finalUrl.toString() : `/${finalUrl.toString()}`;
            }
            catch (e) {
                if (e.name === 'URIError') {
                    console.warn('Malformed uri while setting path for url.', e);
                }
                return '/';
            }
        }
        set url(url) {
            const parsed = new urijs_1.default(url);
            const origin = parsed.origin();
            if (origin)
                this.publicBaseUrl = origin;
            this.templatedPath = parsed.path();
            this.setQueryParamsFromString(parsed.search());
        }
        get queryParams() {
            return this._queryParams || [];
        }
        set queryParams(params) {
            this._queryParams = params;
        }
        set query(query) {
            this.queryParams = params_1.getParamArray(query);
        }
        get pathParams() {
            return this._pathParams || [];
        }
        set pathParams(params) {
            const cleanParams = params.map(p => (Object.assign(Object.assign({}, p), { name: p.name && p.name.replace(/[#?]/g, '') })));
            this._pathParams = cleanParams;
            this._templatedPath = url_1.addParamsToPath(this._templatedPath, cleanParams);
        }
        get headerParams() {
            return this._headerParams || [];
        }
        set headerParams(headers) {
            this._headerParams = headers;
        }
        set headers(headers) {
            this.headerParams = params_1.getParamArray(headers);
            this.contentType = getContentType_1.getContentType(params_1.getParamValue(headers, 'content-type'));
        }
        get activeContentTypeHeader() {
            return this.headerParams.find(p => p.name.toLowerCase() === 'content-type' && p.isEnabled);
        }
        disableAllContentTypeHeaders() {
            const headers = this.headerParams.filter(p => p.name.toLowerCase() === 'content-type' && p.isEnabled);
            for (const header of headers) {
                this.setParam('header', this.headerParams.indexOf(header), 'isEnabled', false);
            }
        }
        get contentType() {
            return this._contentType;
        }
        set contentType(contentType) {
            this._contentType = contentType;
        }
        get body() {
            return this._body || '';
        }
        set body(body) {
            this._body = json_1.safeStringify(body, undefined, 2);
            if (this.contentType === 'form-data' || this.contentType === 'binary') {
                this.formDataParams = params_1.getParamArray(body);
            }
            else if (this.contentType === 'x-www-form-urlencoded') {
                this.urlEncodedParams = params_1.getParamArray(body);
            }
            else if (this.contentType === 'graphql') {
                this.graphqlQuery = this.body;
            }
            else if (this.contentType === 'none') {
                this.contentType = 'raw';
            }
        }
        get formDataParams() {
            return this._formDataParams || [];
        }
        set formDataParams(formDataParams) {
            this._formDataParams = formDataParams;
        }
        get urlEncodedParams() {
            return this._urlEncodedParams || [];
        }
        set urlEncodedParams(urlEncodedParams) {
            this._urlEncodedParams = urlEncodedParams;
        }
        get bodyCount() {
            if (this.contentType === 'raw' && this.body)
                return 1;
            if (this.contentType === 'graphql' && this.graphqlQuery)
                return 1;
            if (this.contentType === 'binary' && this.formDataParams.length)
                return 1;
            if (this.contentType === 'form-data')
                return this.formDataParams.length;
            if (this.contentType === 'x-www-form-urlencoded')
                return this.urlEncodedParams.length;
            return 0;
        }
        get auth() {
            return this._auth;
        }
        set auth(auth) {
            this._auth = auth;
        }
        get hasAuth() {
            return !!this._auth && (this._auth.username !== '' || this._auth.password !== '');
        }
        get timeout() {
            return this._timeout;
        }
        set timeout(timeout) {
            this._timeout = timeout;
        }
        get validate() {
            return this._validate;
        }
        set validate(validate) {
            this._validate = validate;
        }
        get isValid() {
            if (this._validate) {
                let valid = true;
                ['query', 'path', 'header'].forEach(type => {
                    const parameters = this[`${type}Params`];
                    if (parameters.some(param => !!param.required && !param.value)) {
                        valid = false;
                    }
                });
                return valid && (!this._auth || (this._auth.username !== '' && this._auth.password !== ''));
            }
            else {
                return true;
            }
        }
        setParam(type, _indexOrName, prop, value) {
            const params = this[`${type}Params`];
            let indexOrName = _indexOrName;
            if (typeof indexOrName === 'string') {
                indexOrName = params.findIndex(p => p.name === indexOrName);
            }
            const paramsCopy = [...params];
            if (paramsCopy[indexOrName]) {
                paramsCopy[indexOrName] = Object.assign(Object.assign({}, paramsCopy[indexOrName]), { [prop]: value });
                this[`${type}Params`] = paramsCopy;
            }
        }
        addParam(type, key = '', value = '', isEnabled = true) {
            const params = this[`${type}Params`];
            const paramsCopy = [...params];
            paramsCopy.push({
                name: key,
                value,
                isEnabled,
            });
            this[`${type}Params`] = paramsCopy;
        }
        removeParam(type, _indexOrName) {
            const params = this[`${type}Params`];
            let indexOrName = _indexOrName;
            if (typeof indexOrName === 'string') {
                indexOrName = params.findIndex(p => p.name === indexOrName);
            }
            const paramsCopy = [...params];
            if (paramsCopy[indexOrName]) {
                paramsCopy.splice(indexOrName, 1);
                this[`${type}Params`] = paramsCopy;
            }
        }
    }
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Object)
    ], RequestStore.prototype, "_templatedPath", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", String)
    ], RequestStore.prototype, "_method", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", String)
    ], RequestStore.prototype, "_contentType", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Object)
    ], RequestStore.prototype, "_body", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Object)
    ], RequestStore.prototype, "graphqlQuery", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Object)
    ], RequestStore.prototype, "graphqlVariables", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Array)
    ], RequestStore.prototype, "_formDataParams", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Array)
    ], RequestStore.prototype, "_urlEncodedParams", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Array)
    ], RequestStore.prototype, "_headerParams", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Array)
    ], RequestStore.prototype, "_queryParams", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Array)
    ], RequestStore.prototype, "_pathParams", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Array)
    ], RequestStore.prototype, "_publicServers", void 0);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], RequestStore.prototype, "publicServers", null);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Object)
    ], RequestStore.prototype, "_auth", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Object)
    ], RequestStore.prototype, "_timeout", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Object)
    ], RequestStore.prototype, "_validate", void 0);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Object)
    ], RequestStore.prototype, "_publicBaseUrl", void 0);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], RequestStore.prototype, "publicBaseUrl", null);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", String)
    ], RequestStore.prototype, "_mockBaseUrl", void 0);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], RequestStore.prototype, "mockBaseUrl", null);
    tslib_1.__decorate([
        mobx_1.observable,
        tslib_1.__metadata("design:type", Object)
    ], RequestStore.prototype, "_shouldMock", void 0);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], RequestStore.prototype, "shouldMock", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [])
    ], RequestStore.prototype, "isContentTypeJson", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [])
    ], RequestStore.prototype, "baseUrl", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], RequestStore.prototype, "method", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [])
    ], RequestStore.prototype, "mockServer", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [])
    ], RequestStore.prototype, "servers", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], RequestStore.prototype, "templatedPath", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [])
    ], RequestStore.prototype, "uri", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], RequestStore.prototype, "url", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], RequestStore.prototype, "queryParams", null);
    tslib_1.__decorate([
        mobx_1.action,
        tslib_1.__metadata("design:type", Object)
    ], RequestStore.prototype, "setQueryParamsFromString", void 0);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], RequestStore.prototype, "pathParams", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], RequestStore.prototype, "headerParams", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [])
    ], RequestStore.prototype, "activeContentTypeHeader", null);
    tslib_1.__decorate([
        mobx_1.action,
        tslib_1.__metadata("design:type", Function),
        tslib_1.__metadata("design:paramtypes", []),
        tslib_1.__metadata("design:returntype", void 0)
    ], RequestStore.prototype, "disableAllContentTypeHeaders", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], RequestStore.prototype, "contentType", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], RequestStore.prototype, "body", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], RequestStore.prototype, "formDataParams", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], RequestStore.prototype, "urlEncodedParams", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [])
    ], RequestStore.prototype, "bodyCount", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], RequestStore.prototype, "auth", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [])
    ], RequestStore.prototype, "hasAuth", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], RequestStore.prototype, "timeout", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], RequestStore.prototype, "validate", null);
    tslib_1.__decorate([
        mobx_1.computed,
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [])
    ], RequestStore.prototype, "isValid", null);
    tslib_1.__decorate([
        mobx_1.action,
        tslib_1.__metadata("design:type", Function),
        tslib_1.__metadata("design:paramtypes", [String, Object, typeof (_a = typeof T !== "undefined" && T) === "function" ? _a : Object, Object]),
        tslib_1.__metadata("design:returntype", void 0)
    ], RequestStore.prototype, "setParam", null);
    tslib_1.__decorate([
        mobx_1.action,
        tslib_1.__metadata("design:type", Function),
        tslib_1.__metadata("design:paramtypes", [String, String, Object, Boolean]),
        tslib_1.__metadata("design:returntype", void 0)
    ], RequestStore.prototype, "addParam", null);
    tslib_1.__decorate([
        mobx_1.action,
        tslib_1.__metadata("design:type", Function),
        tslib_1.__metadata("design:paramtypes", [String, Object]),
        tslib_1.__metadata("design:returntype", void 0)
    ], RequestStore.prototype, "removeParam", null);
    return RequestStore;
})();
exports.RequestStore = RequestStore;
//# sourceMappingURL=request.js.map