PromptsAPI.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 Business Analytics (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. * @class PromptsAPI
  10. * @hideconstructor
  11. * @classdesc API class to handle prompt fault.
  12. */
  13. define([], function () {
  14. var PromptsAPI = function () {
  15. function PromptsAPI() {
  16. _classCallCheck(this, PromptsAPI);
  17. }
  18. /**
  19. * @function PromptsAPI#isPromptFault
  20. * @description Check whether a failed response is prompt fault.
  21. * @public
  22. * @param {object} errorResponse The failed query response.
  23. *
  24. * @return true if the response status is prompt fault.
  25. */
  26. PromptsAPI.prototype.isPromptFault = function isPromptFault() {};
  27. /**
  28. * @function PromptsAPI#getPromptSpecList
  29. * @description get prompt spec list from prompt fault.
  30. * @public
  31. *
  32. * @param {object} errorResponse The failed query response.
  33. * @return {object[]} An array of prompt spec.
  34. */
  35. PromptsAPI.prototype.getPromptSpecList = function getPromptSpecList() {};
  36. /**
  37. * @function PromptsAPI#openPromptView
  38. * @description Open prompt dialog and rerun original query with picked values from the dialog.
  39. * @public
  40. * @async
  41. *
  42. * @param {object[]} specList An array of prompt spec.
  43. * @param {VisualizationAPI} [visualization] The {@link VisualizationAPI} object
  44. * @return {Promise<Object[]>} Returns a promise that will be resolved to an array of {@link PromptValueSpec} object
  45. */
  46. PromptsAPI.prototype.openPromptView = function openPromptView() {};
  47. return PromptsAPI;
  48. }();
  49. return PromptsAPI;
  50. });
  51. //# sourceMappingURL=PromptsAPI.js.map