SavedPromptsAPI.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. 2018, 2019
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * @class SavedPromptsAPI
  10. * @hideconstructor
  11. * @classdesc implementation of the SavedPromptsAPI interface
  12. */
  13. define([], function () {
  14. /** Class representing a SavedPrompts API */
  15. var SavedPromptsAPI = function () {
  16. function SavedPromptsAPI() {
  17. _classCallCheck(this, SavedPromptsAPI);
  18. }
  19. /**
  20. * @function SavedPromptsAPI#save
  21. * @description Add or update a prompt spec saved to widget.
  22. * @public
  23. *
  24. * @param {PromptValueSpec} promptValueSpec - promptValue specification object
  25. */
  26. SavedPromptsAPI.prototype.save = function save() /* promptValueSpec */{};
  27. /**
  28. * @function SavedPromptsAPI#reset
  29. * @description Clean saved prompt cache and reset to new promptValueSpecs.
  30. * @public
  31. *
  32. * @param {Object} promptValueSpecs - Object with the keys corresponding to the prompt names and values with {@link PromptValueSpec}
  33. * @example
  34. * {
  35. * 'multiPrompt': {
  36. * 'name': 'multiPrompt',
  37. * 'capabilities': {
  38. * 'unboundedRange': false,
  39. * 'multivalued': true,
  40. * 'boundRange': false,
  41. * 'optional': false,
  42. * 'discreteValue': true
  43. * },
  44. * 'dataType': 'xsdString',
  45. * 'values': [{
  46. * 'value': '[source].[Product line]->[Golf Equipment]',
  47. * 'label': 'Golf Equipment'
  48. * }, {
  49. * 'value': '[source].[Product line]->[Mountaineering Equipment]',
  50. * 'label': 'Mountaineering Equipment'
  51. * }],
  52. * 'modelFilterItem': '[source].[Product line]'
  53. * },
  54. * 'valueRangePrompt': {
  55. * 'name': 'valueRangePrompt',
  56. * 'capabilities': {
  57. * 'unboundedRange': true,
  58. * 'multivalued': true,
  59. * 'boundRange': false,
  60. * 'optional': false,
  61. * 'discreteValue': false
  62. * },
  63. * 'dataType': 'xsdInt',
  64. * 'values': [{
  65. * 'value': 7643,
  66. * 'label': 7643
  67. * }, {
  68. * 'value': 18294,
  69. * 'label': 18294
  70. * }],
  71. * 'modelFilterItem': '[Sales and marketing data].[QUANTITY]'
  72. * }
  73. *
  74. */
  75. SavedPromptsAPI.prototype.reset = function reset() /* promptValueSpecs */{};
  76. /**
  77. * @function SavedPromptsAPI#getPromptSpec
  78. * @description Get a saved prompt spec
  79. * @public
  80. *
  81. * @param {String} promptName Name of the prompt definition
  82. */
  83. SavedPromptsAPI.prototype.getPromptSpec = function getPromptSpec() {};
  84. /**
  85. * @function SavedPromptsAPI#getPromptSpecList
  86. * @description Get a list of promptValueSpec of the widget.
  87. * @public
  88. *
  89. * @returns {PromptValueSpec[]} an array of PromptValueSpec of the widget.
  90. */
  91. SavedPromptsAPI.prototype.getPromptSpecList = function getPromptSpecList() {};
  92. return SavedPromptsAPI;
  93. }();
  94. return SavedPromptsAPI;
  95. });
  96. //# sourceMappingURL=SavedPromptsAPI.js.map