UserProfileAPI.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. 2020
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. define([], function () {
  9. /**
  10. * @interface UserProfileAPI
  11. * @classdesc API class that defines the user profile information that is accessible in a dashboard.
  12. * @example dashboard.getFeature('UserProfile')
  13. * @example appFactory.getFeature('UserProfile')
  14. */
  15. var UserProfileAPI = function () {
  16. function UserProfileAPI() {
  17. _classCallCheck(this, UserProfileAPI);
  18. }
  19. /**
  20. * @param {string} capabilityName - Name of the capabilities:
  21. * <ul>
  22. * <li>canAuthorDashboard</li>
  23. * <li>canUseInteractiveDashboard</li>
  24. * </ul>
  25. *
  26. * @returns {boolean} Returns 'true' if the capability is known and enabled; false otherwise.
  27. * @example
  28. * if (userProfile.hasCapability('canAuthorDashboard') === true) {
  29. * //do something
  30. * } else {
  31. * // do something else
  32. * }
  33. */
  34. UserProfileAPI.prototype.hasCapability = function hasCapability() {};
  35. /**
  36. * @returns {string} user content locale. Defaults to 'en'
  37. */
  38. UserProfileAPI.prototype.getContentLocale = function getContentLocale() {};
  39. /*
  40. * @async
  41. * @return Promise<Object> - Promise resolved with a JSON object that contains all available content locales
  42. * @example
  43. * {
  44. en: 'English',
  45. fr: 'French',
  46. af: 'Afrikaans',
  47. de: 'German',
  48. zh: 'Chinese'
  49. * }
  50. */
  51. UserProfileAPI.prototype.getAvailableContentLocales = function getAvailableContentLocales() {};
  52. /**
  53. * @returns {Object} The user's account information including {defaultName, userName}
  54. */
  55. UserProfileAPI.prototype.getUserAccount = function getUserAccount() {};
  56. /**
  57. * @returns {String} - A list of valid domains, separated by coma, null or empty string means all domains are supported
  58. * @example
  59. * 'localhost,www.ibm.com,www.domainport.com:80, .onelevel.com ,*.alllevels.com,.mixed.com:80'
  60. */
  61. UserProfileAPI.prototype.getValidDomainList = function getValidDomainList() {};
  62. return UserProfileAPI;
  63. }();
  64. return UserProfileAPI;
  65. });
  66. //# sourceMappingURL=UserProfileAPI.js.map