VisDefinitionAPISpec.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. 'use strict';
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. /**
  4. * Licensed Materials - Property of IBM
  5. * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2019
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * API specification of VisDefinitionAPI
  10. *
  11. * @class VisDefinitionAPISpec
  12. * @hideconstructor
  13. * @classdesc
  14. */
  15. define([], function () {
  16. var APISpec = function () {
  17. function APISpec() {
  18. _classCallCheck(this, APISpec);
  19. }
  20. APISpec.prototype.getAPISpec = function getAPISpec() {
  21. if (!this.apiSpec) {
  22. this.apiSpec = {
  23. name: 'visDefinition API',
  24. events: {
  25. propagationInfo: {
  26. info: {
  27. id: this.getId(),
  28. type: this.getType()
  29. },
  30. callStack: {
  31. name: 'getByType',
  32. params: [this.getType()]
  33. }
  34. },
  35. actions: {
  36. refresh: {
  37. type: 'refresh',
  38. getEventName: function getEventName() {
  39. return 'definition';
  40. },
  41. getUndoActions: function getUndoActions() {
  42. return [{ name: 'refresh' }];
  43. }
  44. }
  45. }
  46. }
  47. };
  48. }
  49. return this.apiSpec;
  50. };
  51. return APISpec;
  52. }();
  53. return APISpec;
  54. });
  55. //# sourceMappingURL=VisDefinitionAPISpec.js.map