var index_1 = require("./instructions/index");
require("./cache/index");
require("./entrust/install");
var request = function (data) {
    return new Promise(function (resolve, reject) {
        var requestContext = index_1.Instructions.createRequestContext({
            requestData: data,
            reject: reject,
            resolve: resolve,
            status: 0
        });
        if (index_1.default.trigger(requestContext)) {
            uni[data.filePath ? 'uploadFile' : 'request'](requestContext.requestData);
        }
        else {
            requestContext = null;
        }
    });
};

export default request;