projects.js 1.1 KB

123456789101112131415161718192021222324252627282930
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Projects = void 0;
  4. const project_1 = require("../models/project");
  5. const base_collection_1 = require("./base_collection");
  6. class Projects extends base_collection_1.BaseCollection {
  7. static rootElementName = "projects";
  8. static prefixURI = "projects/{:id}";
  9. static elementClass = project_1.Project;
  10. list(request_params = {}) {
  11. return this.doList(request_params);
  12. }
  13. create(project_params) {
  14. return this.doCreate(project_params);
  15. }
  16. get(project_id) {
  17. return this.doGet(project_id);
  18. }
  19. update(project_id, project_params) {
  20. return this.doUpdate(project_id, project_params, {}, this.populateObjectFromJson);
  21. }
  22. delete(project_id) {
  23. return this.doDelete(project_id);
  24. }
  25. empty(project_id) {
  26. return this.createPromise("PUT", { project_id: project_id }, this.returnBareJSON, this.handleReject, null, "projects/{!:project_id}/empty");
  27. }
  28. }
  29. exports.Projects = Projects;
  30. //# sourceMappingURL=projects.js.map