@looker/extension-sdk
Version:
33 lines (32 loc) • 1.56 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SdkConnection = void 0;
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
class SdkConnection {
constructor(hostConnection, apiVersion) {
this.hostConnection = hostConnection;
this.apiVersion = apiVersion;
}
request(httpMethod, path, body, params, _authenticator, options) {
var _this = this;
return _asyncToGenerator(function* () {
return _this.hostConnection.invokeCoreSdk(httpMethod, path, params, body, undefined, options, _this.apiVersion);
})();
}
rawRequest(httpMethod, path, body, params, _authenticator, _options) {
var _this2 = this;
return _asyncToGenerator(function* () {
return _this2.hostConnection.invokeCoreSdkRaw(httpMethod, path, params, body, _this2.apiVersion);
})();
}
stream(_callback, _method, _path, _queryParams, _body, _authenticator, _options) {
return _asyncToGenerator(function* () {
return Promise.reject(new Error('Not implemented'));
})();
}
}
exports.SdkConnection = SdkConnection;
//# sourceMappingURL=sdk_connection.js.map