@dasch-swiss/dsp-js
Version:
JavaScript library that handles API requests to Knora
51 lines • 2.35 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { Endpoint } from "../endpoint";
import { GroupsEndpointAdmin } from "./groups/groups-endpoint-admin";
import { ListsEndpointAdmin } from "./lists/lists-endpoint-admin";
import { PermissionsEndpointAdmin } from "./permissions/permissions-endpoint-admin";
import { ProjectsEndpointAdmin } from "./projects/projects-endpoint-admin";
import { UsersEndpointAdmin } from "./users/users-endpoint-admin";
/**
* A client API for administering Knora.
* @deprecated Use open API docs instead
* @category Endpoint Admin
*/
var AdminEndpoint = /** @class */ (function (_super) {
__extends(AdminEndpoint, _super);
/**
* Constructor.
* Sets up all endpoints for this endpoint.
*
* @param knoraApiConfig
* @param path
*/
function AdminEndpoint(knoraApiConfig, path) {
var _this = _super.call(this, knoraApiConfig, path) || this;
_this.knoraApiConfig = knoraApiConfig;
_this.path = path;
// Instantiate the endpoints
_this.usersEndpoint = new UsersEndpointAdmin(knoraApiConfig, path + "/users");
_this.groupsEndpoint = new GroupsEndpointAdmin(knoraApiConfig, path + "/groups");
_this.projectsEndpoint = new ProjectsEndpointAdmin(knoraApiConfig, path + "/projects");
_this.permissionsEndpoint = new PermissionsEndpointAdmin(knoraApiConfig, path + "/permissions");
_this.listsEndpoint = new ListsEndpointAdmin(knoraApiConfig, path + "/lists");
return _this;
}
return AdminEndpoint;
}(Endpoint));
export { AdminEndpoint };
//# sourceMappingURL=admin-endpoint.js.map