SmartsExecutionAPI.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. 'use strict';
  2. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  3. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  4. /**
  5. * Licensed Materials - Property of IBM
  6. * IBM Business Analytics (C) Copyright IBM Corp. 2019
  7. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  8. */
  9. /**
  10. * @class SmartsExecutionAPI
  11. * @hideconstructor
  12. * @classdesc
  13. */
  14. define([], function () {
  15. var SmartsExecutionAPI = function () {
  16. function SmartsExecutionAPI() {
  17. _classCallCheck(this, SmartsExecutionAPI);
  18. }
  19. /**
  20. * @function SmartsExecutionAPI#execute
  21. * @description Execute a smarts query
  22. * @returns {Promise} resolves when the execution results are ready
  23. */
  24. SmartsExecutionAPI.prototype.execute = function execute() {};
  25. /**
  26. * @function SmartsExecutionAPI#getNonAnnotatableReasons
  27. *
  28. * @description Provides reasons why smart annotations can't be applied on a layer. If
  29. * a layer parameter isn't provided, all layers within the visualization
  30. * are checked.
  31. *
  32. * @typedef {Object} NonAnnotatableReasons
  33. * @property {boolean} allLayers True indicates all layers are non-anotatable.
  34. * @property {Object[]} descriptions Objects describing reasons per layer.
  35. *
  36. * @param {string} layer Name of layer to provide non-annotatable reasons.
  37. *
  38. * @returns {NonAnnotatableReasons} Non-annotatable reasons of a visualization.
  39. */
  40. /**
  41. * @returns {Promise}
  42. */
  43. SmartsExecutionAPI.prototype.getNonAnnotatableReasons = function getNonAnnotatableReasons() {};
  44. _createClass(SmartsExecutionAPI, null, [{
  45. key: 'TARGETS',
  46. // Enum for the execution targets
  47. get: function get() {
  48. return {
  49. SUGGESTIONS: 'suggestions',
  50. EXECUTIONS: 'executions'
  51. };
  52. }
  53. }]);
  54. return SmartsExecutionAPI;
  55. }();
  56. return SmartsExecutionAPI;
  57. });
  58. //# sourceMappingURL=SmartsExecutionAPI.js.map