spot-sdk-ts
Version:
TypeScript bindings based on protobufs (proto3) provided by Boston Dynamics
30 lines • 1.45 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.LicenseServiceClientImpl = exports.protobufPackage = void 0;
/* eslint-disable */
const license_1 = require("./license");
const minimal_1 = __importDefault(require("protobufjs/minimal"));
exports.protobufPackage = "bosdyn.api";
class LicenseServiceClientImpl {
rpc;
constructor(rpc) {
this.rpc = rpc;
this.GetLicenseInfo = this.GetLicenseInfo.bind(this);
this.GetFeatureEnabled = this.GetFeatureEnabled.bind(this);
}
GetLicenseInfo(request) {
const data = license_1.GetLicenseInfoRequest.encode(request).finish();
const promise = this.rpc.request("bosdyn.api.LicenseService", "GetLicenseInfo", data);
return promise.then((data) => license_1.GetLicenseInfoResponse.decode(new minimal_1.default.Reader(data)));
}
GetFeatureEnabled(request) {
const data = license_1.GetFeatureEnabledRequest.encode(request).finish();
const promise = this.rpc.request("bosdyn.api.LicenseService", "GetFeatureEnabled", data);
return promise.then((data) => license_1.GetFeatureEnabledResponse.decode(new minimal_1.default.Reader(data)));
}
}
exports.LicenseServiceClientImpl = LicenseServiceClientImpl;
//# sourceMappingURL=license_service.js.map