@intuitionrobotics/permissions
Version:
55 lines • 2.35 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiCaller_PermissionsGroup = exports.PermissionsGroupModule_Class = void 0;
const frontend_1 = require("@intuitionrobotics/db-api-generator/frontend");
const frontend_2 = require("@intuitionrobotics/thunderstorm/frontend");
const dispatch_onPermissionsGroupsLoaded = new frontend_2.ThunderDispatcher("__onPermissionsGroupsLoaded");
class PermissionsGroupModule_Class extends frontend_1.BaseDB_ApiGeneratorCaller {
constructor() {
super({ key: "group", relativeUrl: "/v1/permissions/assign/group" }, "PermissionsGroupModule");
this.groups = [];
}
init() {
super.init();
}
onEntryCreated(response) {
return __awaiter(this, void 0, void 0, function* () {
this.query();
});
}
onEntryDeleted(response) {
return __awaiter(this, void 0, void 0, function* () {
this.query();
});
}
onEntryUpdated(response) {
return __awaiter(this, void 0, void 0, function* () {
this.query();
});
}
onGotUnique(response) {
return __awaiter(this, void 0, void 0, function* () {
});
}
onQueryReturned(response) {
return __awaiter(this, void 0, void 0, function* () {
this.groups = response;
dispatch_onPermissionsGroupsLoaded.dispatchUI();
});
}
getGroups() {
return this.groups;
}
}
exports.PermissionsGroupModule_Class = PermissionsGroupModule_Class;
exports.ApiCaller_PermissionsGroup = new PermissionsGroupModule_Class();
//# sourceMappingURL=ApiCaller_PermissionsGroup.js.map