purecloud-platform-client-v2 209.0.0 → 211.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +52 -3
  2. package/dist/node/purecloud-platform-client-v2.js +773 -155
  3. package/dist/web-amd/purecloud-platform-client-v2.js +773 -156
  4. package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
  5. package/dist/web-cjs/bundle.js +295 -181
  6. package/dist/web-cjs/purecloud-platform-client-v2.js +6697 -534
  7. package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
  8. package/index.d.ts +937 -702
  9. package/package.json +1 -1
  10. package/src/purecloud-platform-client-v2/AbstractHttpClient.js +26 -0
  11. package/src/purecloud-platform-client-v2/ApiClient.js +136 -57
  12. package/src/purecloud-platform-client-v2/DefaultHttpClient.js +48 -0
  13. package/src/purecloud-platform-client-v2/HttpRequestOptions.js +65 -0
  14. package/src/purecloud-platform-client-v2/api/AgentAssistantsApi.js +1 -1
  15. package/src/purecloud-platform-client-v2/api/AgentCopilotApi.js +1 -1
  16. package/src/purecloud-platform-client-v2/api/AgentUIApi.js +1 -1
  17. package/src/purecloud-platform-client-v2/api/AlertingApi.js +1 -1
  18. package/src/purecloud-platform-client-v2/api/AnalyticsApi.js +1 -1
  19. package/src/purecloud-platform-client-v2/api/ArchitectApi.js +1 -1
  20. package/src/purecloud-platform-client-v2/api/AuditApi.js +1 -1
  21. package/src/purecloud-platform-client-v2/api/AuthorizationApi.js +1 -1
  22. package/src/purecloud-platform-client-v2/api/BillingApi.js +1 -1
  23. package/src/purecloud-platform-client-v2/api/CarrierServicesApi.js +1 -1
  24. package/src/purecloud-platform-client-v2/api/ChatApi.js +1 -1
  25. package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
  26. package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +1 -1
  27. package/src/purecloud-platform-client-v2/api/ConversationsApi.js +1 -1
  28. package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
  29. package/src/purecloud-platform-client-v2/api/DataPrivacyApi.js +175 -0
  30. package/src/purecloud-platform-client-v2/api/DownloadsApi.js +1 -1
  31. package/src/purecloud-platform-client-v2/api/EmailsApi.js +1 -1
  32. package/src/purecloud-platform-client-v2/api/EmployeeEngagementApi.js +1 -1
  33. package/src/purecloud-platform-client-v2/api/EventsApi.js +1 -1
  34. package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +240 -1
  35. package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
  36. package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
  37. package/src/purecloud-platform-client-v2/api/GamificationApi.js +1 -1
  38. package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
  39. package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
  40. package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
  41. package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
  42. package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
  43. package/src/purecloud-platform-client-v2/api/InfrastructureAsCodeApi.js +1 -1
  44. package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +1 -1
  45. package/src/purecloud-platform-client-v2/api/JourneyApi.js +9 -9
  46. package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +1 -1
  47. package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -1
  48. package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
  49. package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
  50. package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
  51. package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
  52. package/src/purecloud-platform-client-v2/api/LogCaptureApi.js +1 -1
  53. package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
  54. package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
  55. package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
  56. package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
  57. package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
  58. package/src/purecloud-platform-client-v2/api/OperationalEventsApi.js +1 -1
  59. package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
  60. package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +1 -1
  61. package/src/purecloud-platform-client-v2/api/OutboundApi.js +1 -1
  62. package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
  63. package/src/purecloud-platform-client-v2/api/ProcessAutomationApi.js +1 -1
  64. package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
  65. package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
  66. package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
  67. package/src/purecloud-platform-client-v2/api/RoutingApi.js +1 -1
  68. package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
  69. package/src/purecloud-platform-client-v2/api/ScreenRecordingApi.js +1 -1
  70. package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
  71. package/src/purecloud-platform-client-v2/api/SearchApi.js +1 -1
  72. package/src/purecloud-platform-client-v2/api/SettingsApi.js +1 -1
  73. package/src/purecloud-platform-client-v2/api/SocialMediaApi.js +1 -1
  74. package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +1 -1
  75. package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
  76. package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
  77. package/src/purecloud-platform-client-v2/api/TaskManagementApi.js +1 -1
  78. package/src/purecloud-platform-client-v2/api/TeamsApi.js +1 -1
  79. package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
  80. package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +1 -1
  81. package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
  82. package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
  83. package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
  84. package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
  85. package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
  86. package/src/purecloud-platform-client-v2/api/UsersApi.js +1 -1
  87. package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
  88. package/src/purecloud-platform-client-v2/api/VoicemailApi.js +1 -1
  89. package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
  90. package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
  91. package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
  92. package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
  93. package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +5 -13
  94. package/src/purecloud-platform-client-v2/configuration.js +2 -0
  95. package/src/purecloud-platform-client-v2/index.js +7 -1
@@ -1,4 +1,4 @@
1
- 'use strict';function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _toArray(r){return _arrayWithHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableRest();}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _wrapAsyncGenerator(e){return function(){return new AsyncGenerator(e.apply(this,arguments));};}function AsyncGenerator(e){var r,t;function resume(r,t){try{var n=e[r](t),o=n.value,u=o instanceof _OverloadYield;Promise.resolve(u?o.v:o).then(function(t){if(u){var i="return"===r?"return":"next";if(!o.k||t.done)return resume(i,t);t=e[i](t).value;}settle(n.done?"return":"normal",t);},function(e){resume("throw",e);});}catch(e){settle("throw",e);}}function settle(e,n){switch(e){case"return":r.resolve({value:n,done:!0});break;case"throw":r.reject(n);break;default:r.resolve({value:n,done:!1});}(r=r.next)?resume(r.key,r.arg):t=null;}this._invoke=function(e,n){return new Promise(function(o,u){var i={key:e,arg:n,resolve:o,reject:u,next:null};t?t=t.next=i:(r=t=i,resume(e,n));});},"function"!=typeof e["return"]&&(this["return"]=void 0);}AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this;},AsyncGenerator.prototype.next=function(e){return this._invoke("next",e);},AsyncGenerator.prototype["throw"]=function(e){return this._invoke("throw",e);},AsyncGenerator.prototype["return"]=function(e){return this._invoke("return",e);};function _awaitAsyncGenerator(e){return new _OverloadYield(e,0);}function _asyncGeneratorDelegate(t){var e={},n=!1;function pump(e,r){return n=!0,r=new Promise(function(n){n(t[e](r));}),{done:!1,value:new _OverloadYield(r,1)};}return e["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this;},e.next=function(t){return n?(n=!1,t):pump("next",t);},"function"==typeof t["throw"]&&(e["throw"]=function(t){if(n)throw n=!1,t;return pump("throw",t);}),"function"==typeof t["return"]&&(e["return"]=function(t){return n?(n=!1,t):pump("return",t);}),e;}function _OverloadYield(e,d){this.v=e,this.k=d;}function _asyncIterator(r){var n,t,o,e=2;for("undefined"!=typeof Symbol&&(t=Symbol.asyncIterator,o=Symbol.iterator);e--;){if(t&&null!=(n=r[t]))return n.call(r);if(o&&null!=(n=r[o]))return new AsyncFromSyncIterator(n.call(r));t="@@asyncIterator",o="@@iterator";}throw new TypeError("Object is not async iterable");}function AsyncFromSyncIterator(r){function AsyncFromSyncIteratorContinuation(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var n=r.done;return Promise.resolve(r.value).then(function(r){return{value:r,done:n};});}return AsyncFromSyncIterator=function AsyncFromSyncIterator(r){this.s=r,this.n=r.next;},AsyncFromSyncIterator.prototype={s:null,n:null,next:function next(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments));},"return":function _return(r){var n=this.s["return"];return void 0===n?Promise.resolve({value:r,done:!0}):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments));},"throw":function _throw(r){var n=this.s["return"];return void 0===n?Promise.reject(r):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments));}},new AsyncFromSyncIterator(r);}var qs=require('qs');function _interopDefaultLegacy(e){return e&&_typeof(e)==='object'&&'default'in e?e:{'default':e};}var qs__default=/*#__PURE__*/_interopDefaultLegacy(qs);var PureCloudRegionHosts={us_east_1:'mypurecloud.com',eu_west_1:'mypurecloud.ie',ap_southeast_2:'mypurecloud.com.au',ap_northeast_1:'mypurecloud.jp',eu_central_1:'mypurecloud.de',us_west_2:'usw2.pure.cloud',ca_central_1:'cac1.pure.cloud',ap_northeast_2:'apne2.pure.cloud',eu_west_2:'euw2.pure.cloud',ap_south_1:'aps1.pure.cloud',us_east_2:'use2.us-gov-pure.cloud',sa_east_1:'sae1.pure.cloud',me_central_1:'mec1.pure.cloud',ap_northeast_3:'apne3.pure.cloud',eu_central_2:'euc2.pure.cloud'};var global$1=typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=='undefined'?Uint8Array:Array;var inited=false;function init(){inited=true;var code='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i;}revLookup['-'.charCodeAt(0)]=62;revLookup['_'.charCodeAt(0)]=63;}function toByteArray(b64){if(!inited){init();}var i,j,l,tmp,placeHolders,arr;var len=b64.length;if(len%4>0){throw new Error('Invalid string. Length must be a multiple of 4');}// the number of equal signs (place holders)
1
+ 'use strict';function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _toArray(r){return _arrayWithHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableRest();}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _wrapAsyncGenerator(e){return function(){return new AsyncGenerator(e.apply(this,arguments));};}function AsyncGenerator(e){var r,t;function resume(r,t){try{var n=e[r](t),o=n.value,u=o instanceof _OverloadYield;Promise.resolve(u?o.v:o).then(function(t){if(u){var i="return"===r?"return":"next";if(!o.k||t.done)return resume(i,t);t=e[i](t).value;}settle(n.done?"return":"normal",t);},function(e){resume("throw",e);});}catch(e){settle("throw",e);}}function settle(e,n){switch(e){case"return":r.resolve({value:n,done:!0});break;case"throw":r.reject(n);break;default:r.resolve({value:n,done:!1});}(r=r.next)?resume(r.key,r.arg):t=null;}this._invoke=function(e,n){return new Promise(function(o,u){var i={key:e,arg:n,resolve:o,reject:u,next:null};t?t=t.next=i:(r=t=i,resume(e,n));});},"function"!=typeof e["return"]&&(this["return"]=void 0);}AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this;},AsyncGenerator.prototype.next=function(e){return this._invoke("next",e);},AsyncGenerator.prototype["throw"]=function(e){return this._invoke("throw",e);},AsyncGenerator.prototype["return"]=function(e){return this._invoke("return",e);};function _awaitAsyncGenerator(e){return new _OverloadYield(e,0);}function _asyncGeneratorDelegate(t){var e={},n=!1;function pump(e,r){return n=!0,r=new Promise(function(n){n(t[e](r));}),{done:!1,value:new _OverloadYield(r,1)};}return e["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this;},e.next=function(t){return n?(n=!1,t):pump("next",t);},"function"==typeof t["throw"]&&(e["throw"]=function(t){if(n)throw n=!1,t;return pump("throw",t);}),"function"==typeof t["return"]&&(e["return"]=function(t){return n?(n=!1,t):pump("return",t);}),e;}function _OverloadYield(e,d){this.v=e,this.k=d;}function _asyncIterator(r){var n,t,o,e=2;for("undefined"!=typeof Symbol&&(t=Symbol.asyncIterator,o=Symbol.iterator);e--;){if(t&&null!=(n=r[t]))return n.call(r);if(o&&null!=(n=r[o]))return new AsyncFromSyncIterator(n.call(r));t="@@asyncIterator",o="@@iterator";}throw new TypeError("Object is not async iterable");}function AsyncFromSyncIterator(r){function AsyncFromSyncIteratorContinuation(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var n=r.done;return Promise.resolve(r.value).then(function(r){return{value:r,done:n};});}return AsyncFromSyncIterator=function AsyncFromSyncIterator(r){this.s=r,this.n=r.next;},AsyncFromSyncIterator.prototype={s:null,n:null,next:function next(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments));},"return":function _return(r){var n=this.s["return"];return void 0===n?Promise.resolve({value:r,done:!0}):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments));},"throw":function _throw(r){var n=this.s["return"];return void 0===n?Promise.reject(r):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments));}},new AsyncFromSyncIterator(r);}var https=require('https');var qs=require('qs');function _interopDefaultLegacy(e){return e&&_typeof(e)==='object'&&'default'in e?e:{'default':e};}var https__default=/*#__PURE__*/_interopDefaultLegacy(https);var qs__default=/*#__PURE__*/_interopDefaultLegacy(qs);var PureCloudRegionHosts={us_east_1:'mypurecloud.com',eu_west_1:'mypurecloud.ie',ap_southeast_2:'mypurecloud.com.au',ap_northeast_1:'mypurecloud.jp',eu_central_1:'mypurecloud.de',us_west_2:'usw2.pure.cloud',ca_central_1:'cac1.pure.cloud',ap_northeast_2:'apne2.pure.cloud',eu_west_2:'euw2.pure.cloud',ap_south_1:'aps1.pure.cloud',us_east_2:'use2.us-gov-pure.cloud',sa_east_1:'sae1.pure.cloud',me_central_1:'mec1.pure.cloud',ap_northeast_3:'apne3.pure.cloud',eu_central_2:'euc2.pure.cloud'};var global$1=typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=='undefined'?Uint8Array:Array;var inited=false;function init(){inited=true;var code='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i;}revLookup['-'.charCodeAt(0)]=62;revLookup['_'.charCodeAt(0)]=63;}function toByteArray(b64){if(!inited){init();}var i,j,l,tmp,placeHolders,arr;var len=b64.length;if(len%4>0){throw new Error('Invalid string. Length must be a multiple of 4');}// the number of equal signs (place holders)
2
2
  // if there are two placeholders, than the two characters before it
3
3
  // represent one byte
4
4
  // if there is only one, then the three characters before it represent 2 bytes
@@ -152,7 +152,28 @@ byteArray.push(str.charCodeAt(i)&0xFF);}return byteArray;}function utf16leToByte
152
152
  // The _isBuffer check is for Safari 5-7 support, because it's missing
153
153
  // Object.prototype.constructor. Remove this eventually
154
154
  function isBuffer$1(obj){return obj!=null&&(!!obj._isBuffer||isFastBuffer(obj)||isSlowBuffer(obj));}function isFastBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==='function'&&obj.constructor.isBuffer(obj);}// For Node v0.10 support. Remove this eventually.
155
- function isSlowBuffer(obj){return typeof obj.readFloatLE==='function'&&typeof obj.slice==='function'&&isFastBuffer(obj.slice(0,0));}// shim for using process in browser
155
+ function isSlowBuffer(obj){return typeof obj.readFloatLE==='function'&&typeof obj.slice==='function'&&isFastBuffer(obj.slice(0,0));}var logLevelEnum={level:{LNone:'none',LError:'error',LDebug:'debug',LTrace:'trace'}};var logFormatEnum={formats:{JSON:'json',TEXT:'text'}};var Logger=/*#__PURE__*/function(){function Logger(){_classCallCheck(this,Logger);this.log_level=logLevelEnum.level.LNone;this.log_format=logFormatEnum.formats.TEXT;this.log_to_console=true;this.log_file_path;this.log_response_body=false;this.log_request_body=false;this.setLogger();}return _createClass(Logger,[{key:"logLevelEnum",get:function get(){return logLevelEnum;}},{key:"logFormatEnum",get:function get(){return logFormatEnum;}},{key:"setLogger",value:function setLogger(){}},{key:"log",value:function log(level,statusCode,method,url,requestHeaders,responseHeaders,requestBody,responseBody){var content=this.formatLog(level,statusCode,method,url,requestHeaders,responseHeaders,requestBody,responseBody);if(typeof window!=='undefined'){var shouldLog=this.calculateLogLevel(level);if(shouldLog>0&&this.log_to_console===true){if(this.log_format===this.logFormatEnum.formats.JSON){console.log(content);}else{console.log("".concat(level.toUpperCase(),": ").concat(content));}}}else{if(this.logger.transports.length>0)this.logger.log(level,content);}}},{key:"calculateLogLevel",value:function calculateLogLevel(level){switch(this.log_level){case this.logLevelEnum.level.LError:if(level!==this.logLevelEnum.level.LError){return-1;}return 1;case this.logLevelEnum.level.LDebug:if(level===this.logLevelEnum.level.LTrace){return-1;}return 1;case this.logLevelEnum.level.LTrace:return 1;default:return-1;}}},{key:"formatLog",value:function formatLog(level,statusCode,method,url,requestHeaders,responseHeaders,requestBody,responseBody){var result;var localRequestHeaders=requestHeaders?JSON.parse(JSON.stringify(requestHeaders)):null;var localResponseHeaders=responseHeaders?JSON.parse(JSON.stringify(responseHeaders)):null;var localRequestBody=requestBody?JSON.parse(JSON.stringify(requestBody)):null;var localResponseBody=responseBody?JSON.parse(JSON.stringify(responseBody)):null;if(requestHeaders)localRequestHeaders['Authorization']='[REDACTED]';if(!this.log_request_body)localRequestBody=undefined;if(!this.log_response_body)localResponseBody=undefined;if(this.log_format&&this.log_format===logFormatEnum.formats.JSON){result={level:level,date:new Date().toISOString(),method:method,url:decodeURIComponent(url),correlationId:localResponseHeaders?localResponseHeaders['inin-correlation-id']?localResponseHeaders['inin-correlation-id']:'':'',statusCode:statusCode};if(localRequestHeaders)result.requestHeaders=localRequestHeaders;if(localResponseHeaders)result.responseHeaders=localResponseHeaders;if(localRequestBody)result.requestBody=localRequestBody;if(localResponseBody)result.responseBody=localResponseBody;}else{result="".concat(new Date().toISOString(),"\n=== REQUEST === \n").concat(this.formatValue('URL',decodeURIComponent(url))).concat(this.formatValue('Method',method)).concat(this.formatValue('Headers',this.formatHeaderString(localRequestHeaders))).concat(this.formatValue('Body',localRequestBody?JSON.stringify(localRequestBody,null,2):''),"\n=== RESPONSE ===\n").concat(this.formatValue('Status',statusCode)).concat(this.formatValue('Headers',this.formatHeaderString(localResponseHeaders))).concat(this.formatValue('CorrelationId',localResponseHeaders?localResponseHeaders['inin-correlation-id']?localResponseHeaders['inin-correlation-id']:'':'')).concat(this.formatValue('Body',localResponseBody?JSON.stringify(localResponseBody,null,2):''));}return result;}},{key:"formatHeaderString",value:function formatHeaderString(headers){var headerString='';if(!headers)return headerString;for(var _i=0,_Object$entries=Object.entries(headers);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),key=_Object$entries$_i[0],value=_Object$entries$_i[1];headerString+="\n\t".concat(key,": ").concat(value);}return headerString;}},{key:"formatValue",value:function formatValue(key,value){if(!value||value===''||value==='{}')return'';return"".concat(key,": ").concat(value,"\n");}},{key:"getLogLevel",value:function getLogLevel(level){switch(level){case'error':return logLevelEnum.level.LError;case'debug':return logLevelEnum.level.LDebug;case'trace':return logLevelEnum.level.LTrace;default:return logLevelEnum.level.LNone;}}},{key:"getLogFormat",value:function getLogFormat(format){switch(format){case'json':return logFormatEnum.formats.JSON;default:return logFormatEnum.formats.TEXT;}}}]);}();var Configuration=/*#__PURE__*/function(){function Configuration(){_classCallCheck(this,Configuration);if(!Configuration.instance){Configuration.instance=this;}if(typeof window!=='undefined'){this.configPath='';}else{var os=require('os');var path=require('path');this.configPath=path.join(os.homedir(),'.genesyscloudjavascript','config');}this.refresh_access_token=true;this.refresh_token_wait_max=10;this.live_reload_config=true;this.host;this.environment;this.basePath;this.authUrl;this.config;this.gateway=undefined;this.logger=new Logger();this.setEnvironment();this.liveLoadConfig();}return _createClass(Configuration,[{key:"instance",get:/**
156
+ * Singleton getter
157
+ */function get(){return Configuration.instance;}/**
158
+ * Singleton setter
159
+ */,set:function set(value){Configuration.instance=value;}},{key:"liveLoadConfig",value:function liveLoadConfig(){// If in browser, don't read config file, use default values
160
+ this.configPath='';}},{key:"setConfigPath",value:function setConfigPath(path){if(path&&path!==this.configPath){this.configPath=path;this.liveLoadConfig();}}},{key:"updateConfigFromFile",value:function updateConfigFromFile(){}},{key:"updateConfigValues",value:function updateConfigValues(){this.logger.log_level=this.logger.getLogLevel(this.getConfigString('logging','log_level'));this.logger.log_format=this.logger.getLogFormat(this.getConfigString('logging','log_format'));this.logger.log_to_console=this.getConfigBoolean('logging','log_to_console')!==undefined?this.getConfigBoolean('logging','log_to_console'):this.logger.log_to_console;this.logger.log_file_path=this.getConfigString('logging','log_file_path')!==undefined?this.getConfigString('logging','log_file_path'):this.logger.log_file_path;this.logger.log_response_body=this.getConfigBoolean('logging','log_response_body')!==undefined?this.getConfigBoolean('logging','log_response_body'):this.logger.log_response_body;this.logger.log_request_body=this.getConfigBoolean('logging','log_request_body')!==undefined?this.getConfigBoolean('logging','log_request_body'):this.logger.log_request_body;this.refresh_access_token=this.getConfigBoolean('reauthentication','refresh_access_token')!==undefined?this.getConfigBoolean('reauthentication','refresh_access_token'):this.refresh_access_token;this.refresh_token_wait_max=this.getConfigInt('reauthentication','refresh_token_wait_max')!==undefined?this.getConfigInt('reauthentication','refresh_token_wait_max'):this.refresh_token_wait_max;this.live_reload_config=this.getConfigBoolean('general','live_reload_config')!==undefined?this.getConfigBoolean('general','live_reload_config'):this.live_reload_config;this.host=this.getConfigString('general','host')!==undefined?this.getConfigString('general','host'):this.host;if(this.getConfigString('gateway','host')!==undefined){var gateway={host:this.getConfigString('gateway','host')};if(this.getConfigString('gateway','protocol')!==undefined)gateway.protocol=this.getConfigString('gateway','protocol');if(this.getConfigInt('gateway','port')!==undefined)gateway.port=this.getConfigInt('gateway','port');if(this.getConfigString('gateway','path_params_login')!==undefined)gateway.path_params_login=this.getConfigString('gateway','path_params_login');if(this.getConfigString('gateway','path_params_api')!==undefined)gateway.path_params_api=this.getConfigString('gateway','path_params_api');if(this.getConfigString('gateway','username')!==undefined)gateway.username=this.getConfigString('gateway','username');if(this.getConfigString('gateway','password')!==undefined)gateway.password=this.getConfigString('gateway','password');this.setGateway(gateway);}else{this.setGateway();}this.setEnvironment();// Update logging configs
161
+ this.logger.setLogger();}/**
162
+ * @description Sets the gateway used by the session
163
+ * @param {object} gateway - Gateway Configuration interface
164
+ * @param {string} gateway.host - The address of the gateway.
165
+ * @param {string} gateway.protocol - (optional) The protocol to use. It will default to "https" if the parameter is not defined or empty.
166
+ * @param {number} gateway.port - (optional) The port to target. This parameter can be defined if a non default port is used and needs to be specified in the url (value must be greater or equal to 0).
167
+ * @param {string} gateway.path_params_login - (optional) An arbitrary string to be appended to the gateway url path for Login requests.
168
+ * @param {string} gateway.path_params_api - (optional) An arbitrary string to be appended to the gateway url path for API requests.
169
+ * @param {string} gateway.username - (optional) Not used at this stage (for a possible future use).
170
+ * @param {string} gateway.password - (optional) Not used at this stage (for a possible future use).
171
+ */},{key:"setGateway",value:function setGateway(gateway){if(gateway){this.gateway={host:''};if(gateway.protocol)this.gateway.protocol=gateway.protocol;else this.gateway.protocol='https';if(gateway.host)this.gateway.host=gateway.host;else this.gateway.host='';if(gateway.port&&gateway.port>-1)this.gateway.port=gateway.port;else this.gateway.port=-1;if(gateway.path_params_login){this.gateway.path_params_login=gateway.path_params_login;// Strip trailing slash
172
+ this.gateway.path_params_login=this.gateway.path_params_login.replace(/\/+$/,'');}else this.gateway.path_params_login='';if(gateway.path_params_api){this.gateway.path_params_api=gateway.path_params_api;// Strip trailing slash
173
+ this.gateway.path_params_api=this.gateway.path_params_api.replace(/\/+$/,'');}else this.gateway.path_params_api='';if(gateway.username)this.gateway.username=gateway.username;if(gateway.password)this.gateway.password=gateway.password;}else{this.gateway=undefined;}}},{key:"setEnvironment",value:function setEnvironment(env){// Default value
174
+ if(env)this.environment=env;else this.environment=this.host?this.host:'mypurecloud.com';// Strip trailing slash
175
+ this.environment=this.environment.replace(/\/+$/,'');// Strip protocol and subdomain
176
+ if(this.environment.startsWith('https://'))this.environment=this.environment.substring(8);if(this.environment.startsWith('http://'))this.environment=this.environment.substring(7);if(this.environment.startsWith('api.'))this.environment=this.environment.substring(4);this.basePath="https://api.".concat(this.environment);this.authUrl="https://login.".concat(this.environment);}},{key:"getConfUrl",value:function getConfUrl(pathType,regionUrl){if(!this.gateway)return regionUrl;if(!this.gateway.host)return regionUrl;var url=this.gateway.protocol+'://'+this.gateway.host;if(this.gateway.port>-1)url=url+':'+this.gateway.port.toString();if(pathType==='login'){if(this.gateway.path_params_login){if(this.gateway.path_params_login.startsWith('/'))url=url+this.gateway.path_params_login;else url=url+'/'+this.gateway.path_params_login;}}else{if(this.gateway.path_params_api){if(this.gateway.path_params_api.startsWith('/'))url=url+this.gateway.path_params_api;else url=url+'/'+this.gateway.path_params_api;}}return url;}},{key:"getConfigString",value:function getConfigString(section,key){if(this.config._sections[section])return this.config._sections[section][key];}},{key:"getConfigBoolean",value:function getConfigBoolean(section,key){if(this.config._sections[section]&&this.config._sections[section][key]!==undefined){if(typeof this.config._sections[section][key]==='string'){return this.config._sections[section][key]==='true';}else return this.config._sections[section][key];}}},{key:"getConfigInt",value:function getConfigInt(section,key){if(this.config._sections[section]&&this.config._sections[section][key]){if(typeof this.config._sections[section][key]==='string'){return parseInt(this.config._sections[section][key]);}else return this.config._sections[section][key];}}}]);}();// shim for using process in browser
156
177
  // based off https://github.com/defunctzombie/node-process/blob/master/browser.js
157
178
  function defaultSetTimout(){throw new Error('setTimeout has not been defined');}function defaultClearTimeout(){throw new Error('clearTimeout has not been defined');}var cachedSetTimeout=defaultSetTimout;var cachedClearTimeout=defaultClearTimeout;if(typeof global$1.setTimeout==='function'){cachedSetTimeout=setTimeout;}if(typeof global$1.clearTimeout==='function'){cachedClearTimeout=clearTimeout;}function runTimeout(fun){if(cachedSetTimeout===setTimeout){//normal enviroments in sane situations
158
179
  return setTimeout(fun,0);}// if setTimeout wasn't available but was latter defined
@@ -854,30 +875,14 @@ axios.Cancel=axios.CanceledError;// Expose all/spread
854
875
  axios.all=function all(promises){return Promise.all(promises);};axios.spread=spread;// Expose isAxiosError
855
876
  axios.isAxiosError=isAxiosError;// Expose mergeConfig
856
877
  axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=function(thing){return formDataToJSON(utils$1.isHTMLForm(thing)?new FormData(thing):thing);};axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios["default"]=axios;// this module should only have a default export
857
- var axios$1=axios;var logLevelEnum={level:{LNone:'none',LError:'error',LDebug:'debug',LTrace:'trace'}};var logFormatEnum={formats:{JSON:'json',TEXT:'text'}};var Logger=/*#__PURE__*/function(){function Logger(){_classCallCheck(this,Logger);this.log_level=logLevelEnum.level.LNone;this.log_format=logFormatEnum.formats.TEXT;this.log_to_console=true;this.log_file_path;this.log_response_body=false;this.log_request_body=false;this.setLogger();}return _createClass(Logger,[{key:"logLevelEnum",get:function get(){return logLevelEnum;}},{key:"logFormatEnum",get:function get(){return logFormatEnum;}},{key:"setLogger",value:function setLogger(){}},{key:"log",value:function log(level,statusCode,method,url,requestHeaders,responseHeaders,requestBody,responseBody){var content=this.formatLog(level,statusCode,method,url,requestHeaders,responseHeaders,requestBody,responseBody);if(typeof window!=='undefined'){var shouldLog=this.calculateLogLevel(level);if(shouldLog>0&&this.log_to_console===true){if(this.log_format===this.logFormatEnum.formats.JSON){console.log(content);}else{console.log("".concat(level.toUpperCase(),": ").concat(content));}}}else{if(this.logger.transports.length>0)this.logger.log(level,content);}}},{key:"calculateLogLevel",value:function calculateLogLevel(level){switch(this.log_level){case this.logLevelEnum.level.LError:if(level!==this.logLevelEnum.level.LError){return-1;}return 1;case this.logLevelEnum.level.LDebug:if(level===this.logLevelEnum.level.LTrace){return-1;}return 1;case this.logLevelEnum.level.LTrace:return 1;default:return-1;}}},{key:"formatLog",value:function formatLog(level,statusCode,method,url,requestHeaders,responseHeaders,requestBody,responseBody){var result;var localRequestHeaders=requestHeaders?JSON.parse(JSON.stringify(requestHeaders)):null;var localResponseHeaders=responseHeaders?JSON.parse(JSON.stringify(responseHeaders)):null;var localRequestBody=requestBody?JSON.parse(JSON.stringify(requestBody)):null;var localResponseBody=responseBody?JSON.parse(JSON.stringify(responseBody)):null;if(requestHeaders)localRequestHeaders['Authorization']='[REDACTED]';if(!this.log_request_body)localRequestBody=undefined;if(!this.log_response_body)localResponseBody=undefined;if(this.log_format&&this.log_format===logFormatEnum.formats.JSON){result={level:level,date:new Date().toISOString(),method:method,url:decodeURIComponent(url),correlationId:localResponseHeaders?localResponseHeaders['inin-correlation-id']?localResponseHeaders['inin-correlation-id']:'':'',statusCode:statusCode};if(localRequestHeaders)result.requestHeaders=localRequestHeaders;if(localResponseHeaders)result.responseHeaders=localResponseHeaders;if(localRequestBody)result.requestBody=localRequestBody;if(localResponseBody)result.responseBody=localResponseBody;}else{result="".concat(new Date().toISOString(),"\n=== REQUEST === \n").concat(this.formatValue('URL',decodeURIComponent(url))).concat(this.formatValue('Method',method)).concat(this.formatValue('Headers',this.formatHeaderString(localRequestHeaders))).concat(this.formatValue('Body',localRequestBody?JSON.stringify(localRequestBody,null,2):''),"\n=== RESPONSE ===\n").concat(this.formatValue('Status',statusCode)).concat(this.formatValue('Headers',this.formatHeaderString(localResponseHeaders))).concat(this.formatValue('CorrelationId',localResponseHeaders?localResponseHeaders['inin-correlation-id']?localResponseHeaders['inin-correlation-id']:'':'')).concat(this.formatValue('Body',localResponseBody?JSON.stringify(localResponseBody,null,2):''));}return result;}},{key:"formatHeaderString",value:function formatHeaderString(headers){var headerString='';if(!headers)return headerString;for(var _i=0,_Object$entries=Object.entries(headers);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),key=_Object$entries$_i[0],value=_Object$entries$_i[1];headerString+="\n\t".concat(key,": ").concat(value);}return headerString;}},{key:"formatValue",value:function formatValue(key,value){if(!value||value===''||value==='{}')return'';return"".concat(key,": ").concat(value,"\n");}},{key:"getLogLevel",value:function getLogLevel(level){switch(level){case'error':return logLevelEnum.level.LError;case'debug':return logLevelEnum.level.LDebug;case'trace':return logLevelEnum.level.LTrace;default:return logLevelEnum.level.LNone;}}},{key:"getLogFormat",value:function getLogFormat(format){switch(format){case'json':return logFormatEnum.formats.JSON;default:return logFormatEnum.formats.TEXT;}}}]);}();var Configuration=/*#__PURE__*/function(){function Configuration(){_classCallCheck(this,Configuration);if(!Configuration.instance){Configuration.instance=this;}if(typeof window!=='undefined'){this.configPath='';}else{var os=require('os');var path=require('path');this.configPath=path.join(os.homedir(),'.genesyscloudjavascript','config');}this.refresh_access_token=true;this.refresh_token_wait_max=10;this.live_reload_config=true;this.host;this.environment;this.basePath;this.authUrl;this.config;this.gateway=undefined;this.logger=new Logger();this.setEnvironment();this.liveLoadConfig();}return _createClass(Configuration,[{key:"instance",get:/**
858
- * Singleton getter
859
- */function get(){return Configuration.instance;}/**
860
- * Singleton setter
861
- */,set:function set(value){Configuration.instance=value;}},{key:"liveLoadConfig",value:function liveLoadConfig(){// If in browser, don't read config file, use default values
862
- this.configPath='';}},{key:"setConfigPath",value:function setConfigPath(path){if(path&&path!==this.configPath){this.configPath=path;this.liveLoadConfig();}}},{key:"updateConfigFromFile",value:function updateConfigFromFile(){}},{key:"updateConfigValues",value:function updateConfigValues(){this.logger.log_level=this.logger.getLogLevel(this.getConfigString('logging','log_level'));this.logger.log_format=this.logger.getLogFormat(this.getConfigString('logging','log_format'));this.logger.log_to_console=this.getConfigBoolean('logging','log_to_console')!==undefined?this.getConfigBoolean('logging','log_to_console'):this.logger.log_to_console;this.logger.log_file_path=this.getConfigString('logging','log_file_path')!==undefined?this.getConfigString('logging','log_file_path'):this.logger.log_file_path;this.logger.log_response_body=this.getConfigBoolean('logging','log_response_body')!==undefined?this.getConfigBoolean('logging','log_response_body'):this.logger.log_response_body;this.logger.log_request_body=this.getConfigBoolean('logging','log_request_body')!==undefined?this.getConfigBoolean('logging','log_request_body'):this.logger.log_request_body;this.refresh_access_token=this.getConfigBoolean('reauthentication','refresh_access_token')!==undefined?this.getConfigBoolean('reauthentication','refresh_access_token'):this.refresh_access_token;this.refresh_token_wait_max=this.getConfigInt('reauthentication','refresh_token_wait_max')!==undefined?this.getConfigInt('reauthentication','refresh_token_wait_max'):this.refresh_token_wait_max;this.live_reload_config=this.getConfigBoolean('general','live_reload_config')!==undefined?this.getConfigBoolean('general','live_reload_config'):this.live_reload_config;this.host=this.getConfigString('general','host')!==undefined?this.getConfigString('general','host'):this.host;if(this.getConfigString('gateway','host')!==undefined){var gateway={host:this.getConfigString('gateway','host')};if(this.getConfigString('gateway','protocol')!==undefined)gateway.protocol=this.getConfigString('gateway','protocol');if(this.getConfigInt('gateway','port')!==undefined)gateway.port=this.getConfigInt('gateway','port');if(this.getConfigString('gateway','path_params_login')!==undefined)gateway.path_params_login=this.getConfigString('gateway','path_params_login');if(this.getConfigString('gateway','path_params_api')!==undefined)gateway.path_params_api=this.getConfigString('gateway','path_params_api');if(this.getConfigString('gateway','username')!==undefined)gateway.username=this.getConfigString('gateway','username');if(this.getConfigString('gateway','password')!==undefined)gateway.password=this.getConfigString('gateway','password');this.setGateway(gateway);}else{this.setGateway();}this.setEnvironment();// Update logging configs
863
- this.logger.setLogger();}/**
864
- * @description Sets the gateway used by the session
865
- * @param {object} gateway - Gateway Configuration interface
866
- * @param {string} gateway.host - The address of the gateway.
867
- * @param {string} gateway.protocol - (optional) The protocol to use. It will default to "https" if the parameter is not defined or empty.
868
- * @param {number} gateway.port - (optional) The port to target. This parameter can be defined if a non default port is used and needs to be specified in the url (value must be greater or equal to 0).
869
- * @param {string} gateway.path_params_login - (optional) An arbitrary string to be appended to the gateway url path for Login requests.
870
- * @param {string} gateway.path_params_api - (optional) An arbitrary string to be appended to the gateway url path for API requests.
871
- * @param {string} gateway.username - (optional) Not used at this stage (for a possible future use).
872
- * @param {string} gateway.password - (optional) Not used at this stage (for a possible future use).
873
- */},{key:"setGateway",value:function setGateway(gateway){if(gateway){this.gateway={host:''};if(gateway.protocol)this.gateway.protocol=gateway.protocol;else this.gateway.protocol='https';if(gateway.host)this.gateway.host=gateway.host;else this.gateway.host='';if(gateway.port&&gateway.port>-1)this.gateway.port=gateway.port;else this.gateway.port=-1;if(gateway.path_params_login){this.gateway.path_params_login=gateway.path_params_login;// Strip trailing slash
874
- this.gateway.path_params_login=this.gateway.path_params_login.replace(/\/+$/,'');}else this.gateway.path_params_login='';if(gateway.path_params_api){this.gateway.path_params_api=gateway.path_params_api;// Strip trailing slash
875
- this.gateway.path_params_api=this.gateway.path_params_api.replace(/\/+$/,'');}else this.gateway.path_params_api='';if(gateway.username)this.gateway.username=gateway.username;if(gateway.password)this.gateway.password=gateway.password;}else{this.gateway=undefined;}}},{key:"setEnvironment",value:function setEnvironment(env){// Default value
876
- if(env)this.environment=env;else this.environment=this.host?this.host:'mypurecloud.com';// Strip trailing slash
877
- this.environment=this.environment.replace(/\/+$/,'');// Strip protocol and subdomain
878
- if(this.environment.startsWith('https://'))this.environment=this.environment.substring(8);if(this.environment.startsWith('http://'))this.environment=this.environment.substring(7);if(this.environment.startsWith('api.'))this.environment=this.environment.substring(4);this.basePath="https://api.".concat(this.environment);this.authUrl="https://login.".concat(this.environment);}},{key:"getConfUrl",value:function getConfUrl(pathType,regionUrl){if(!this.gateway)return regionUrl;if(!this.gateway.host)return regionUrl;var url=this.gateway.protocol+'://'+this.gateway.host;if(this.gateway.port>-1)url=url+':'+this.gateway.port.toString();if(pathType==='login'){if(this.gateway.path_params_login){if(this.gateway.path_params_login.startsWith('/'))url=url+this.gateway.path_params_login;else url=url+'/'+this.gateway.path_params_login;}}else{if(this.gateway.path_params_api){if(this.gateway.path_params_api.startsWith('/'))url=url+this.gateway.path_params_api;else url=url+'/'+this.gateway.path_params_api;}}return url;}},{key:"getConfigString",value:function getConfigString(section,key){if(this.config._sections[section])return this.config._sections[section][key];}},{key:"getConfigBoolean",value:function getConfigBoolean(section,key){if(this.config._sections[section]&&this.config._sections[section][key]!==undefined){if(typeof this.config._sections[section][key]==='string'){return this.config._sections[section][key]==='true';}else return this.config._sections[section][key];}}},{key:"getConfigInt",value:function getConfigInt(section,key){if(this.config._sections[section]&&this.config._sections[section][key]){if(typeof this.config._sections[section][key]==='string'){return parseInt(this.config._sections[section][key]);}else return this.config._sections[section][key];}}}]);}();/**
878
+ var axios$1=axios;var AbstractHttpClient=/*#__PURE__*/function(){function AbstractHttpClient(){_classCallCheck(this,AbstractHttpClient);this.timeout=16000;}return _createClass(AbstractHttpClient,[{key:"setTimeout",value:function setTimeout(timeout){if(timeout===null||timeout===undefined||typeof timeout!=='number'){throw new Error("The 'timeout' property must be a number");}this.timeout=timeout;}},{key:"setHttpsAgent",value:function setHttpsAgent(httpsAgent){if(httpsAgent&&_typeof(httpsAgent)!=='object'){throw new Error("The 'httpsAgent' property must be an object");}this.httpsAgent=httpsAgent;}},{key:"request",value:function request(httpRequestOptions){throw new Error("method must be implemented");}}]);}();var HttpRequestOptions=/*#__PURE__*/function(){function HttpRequestOptions(url,method,headers,params,data,timeout){_classCallCheck(this,HttpRequestOptions);this.setUrl(url);this.setMethod(method);if(headers){this.setHeaders(headers);}if(params){this.setParams(params);}if(data){this.setData(data);}if(timeout!==null&&timeout!==undefined)this.setTimeout(timeout);else this.timeout=16000;}// Mandatory fields with validation
879
+ return _createClass(HttpRequestOptions,[{key:"setUrl",value:function setUrl(url){if(!url)throw new Error("The 'url' property is required");this.url=url;}},{key:"setMethod",value:function setMethod(method){var validMethods=['GET','POST','PUT','DELETE','PATCH','OPTIONS','HEAD'];if(!method||!validMethods.includes(method.toUpperCase())){throw new Error("The 'method' property is invalid or missing");}this.method=method.toUpperCase();}},{key:"setData",value:function setData(data){if(data===undefined||data===null){throw new Error("The 'data' property is required");}this.data=data;}// Optional fields
880
+ },{key:"setParams",value:function setParams(params){if(params&&_typeof(params)!=='object'){throw new Error("The 'params' property must be an object");}this.params=params;}// Optional fields
881
+ },{key:"setHeaders",value:function setHeaders(headers){if(headers&&_typeof(headers)!=='object'){throw new Error("The 'headers' property must be an object");}this.headers=headers;}},{key:"setTimeout",value:function setTimeout(timeout){if(timeout===undefined||timeout===null||typeof timeout!=='number'){throw new Error("The 'timeout' property must be a number");}this.timeout=timeout;}}]);}();// Default client is Axios
882
+ var DefaultHttpClient=/*#__PURE__*/function(_AbstractHttpClient){function DefaultHttpClient(timeout,httpsAgent){var _this2;_classCallCheck(this,DefaultHttpClient);_this2=_callSuper(this,DefaultHttpClient);if(timeout!==null&&timeout!==undefined)_this2.setTimeout(timeout);else _this2.timeout=16000;if(httpsAgent!==null&&httpsAgent!==undefined)_this2.setHttpsAgent(httpsAgent);else _this2.httpsAgent;_this2._axiosInstance=axios$1.create({});return _this2;}_inherits(DefaultHttpClient,_AbstractHttpClient);return _createClass(DefaultHttpClient,[{key:"request",value:function request(httpRequestOptions){if(!(httpRequestOptions instanceof HttpRequestOptions)){throw new Error("httpRequestOptions must be instance of HttpRequestOptions ");}var config=this.toAxiosConfig(httpRequestOptions);return this._axiosInstance.request(config);}// Method to generate Axios-compatible config
883
+ },{key:"toAxiosConfig",value:function toAxiosConfig(httpRequestOptions){if(!httpRequestOptions.url||!httpRequestOptions.method){throw new Error("Mandatory fields 'url' and 'method' must be set before making a request");}var config={url:httpRequestOptions.url,method:httpRequestOptions.method};if(httpRequestOptions.params)config.params=httpRequestOptions.params;if(httpRequestOptions.headers)config.headers=httpRequestOptions.headers;if(httpRequestOptions.data)config.data=httpRequestOptions.data;if(this.timeout!=null&&this.timeout!=undefined)config.timeout=this.timeout;if(this.httpsAgent)config.httpsAgent=this.httpsAgent;return config;}}]);}(AbstractHttpClient);/**
879
884
  * @module purecloud-platform-client-v2/ApiClient
880
- * @version 209.0.0
885
+ * @version 211.0.0
881
886
  */var ApiClient=/*#__PURE__*/function(){/**
882
887
  * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
883
888
  * application to use this class directly - the *Api and model classes provide the public API for the service. The
@@ -920,7 +925,7 @@ if(this.environment.startsWith('https://'))this.environment=this.environment.sub
920
925
  * @type {Number}
921
926
  * @default 60000
922
927
  */this.timeout=16000;this.authData={};this.settingsPrefix='purecloud';// Transparently request a new access token when it expires (Code Authorization only)
923
- this.refreshInProgress=false;this.config=new Configuration();if(typeof window!=='undefined')window.ApiClient=this;}/**
928
+ this.refreshInProgress=false;this.httpClient;this.proxyAgent;this.config=new Configuration();if(typeof window!=='undefined')window.ApiClient=this;}/**
924
929
  * @description If set to `true`, the response object will contain additional information about the HTTP response. When `false` (default) only the body object will be returned.
925
930
  * @param {boolean} returnExtended - `true` to return extended responses
926
931
  */return _createClass(ApiClient,[{key:"instance",get:/**
@@ -946,6 +951,21 @@ var tempState=this.authData.state;this.authData=localStorage.getItem("".concat(t
946
951
  * @description Sets the environment used by the session
947
952
  * @param {string} environment - (Optional, default "mypurecloud.com") Environment the session use, e.g. mypurecloud.ie, mypurecloud.com.au, etc.
948
953
  */},{key:"setEnvironment",value:function setEnvironment(environment){this.config.setEnvironment(environment);}/**
954
+ * @description Sets the dynamic HttpClient used by the client
955
+ * @param {object} httpClient - HttpClient to be injected
956
+ */},{key:"setHttpClient",value:function setHttpClient(httpClient){if(!(httpClient instanceof AbstractHttpClient)){throw new Error("httpclient must be an instance of AbstractHttpClient. See DefaultltHttpClient for a prototype");}this.httpClient=httpClient;}/**
957
+ * @description Gets the HttpClient used by the client
958
+ */},{key:"getHttpClient",value:function getHttpClient(){if(this.httpClient){return this.httpClient;}else{this.httpClient=new DefaultHttpClient(this.timeout,this.proxyAgent);return this.httpClient;}}/**
959
+ * @description Sets the certificate paths if MTLS authentication is needed
960
+ * @param {string} certPath - path for certs
961
+ * @param {string} keyPath - path for key
962
+ * @param {string} caPath - path for public certs
963
+ */},{key:"setMTLSCertificates",value:function setMTLSCertificates(certPath,keyPath,caPath){{throw new Error("Custom Agent Paths/ File System Access are not supported on Browser. Use setMTLSContents instead");}}/**
964
+ * @description Sets the certificate content if MTLS authentication is needed
965
+ * @param {string} certContent - content for certs
966
+ * @param {string} keyContent - content for key
967
+ * @param {string} caContent - content for public certs
968
+ */},{key:"setMTLSContents",value:function setMTLSContents(certContent,keyContent,caContent){var agentOptions={};if(certContent){agentOptions.cert=certContent;}if(keyContent){agentOptions.key=keyContent;}if(caContent){agentOptions.ca=caContent;}agentOptions.rejectUnauthorized=true;this.proxyAgent=new https__default["default"].Agent(agentOptions);var httpClient=this.getHttpClient();httpClient.setHttpsAgent(this.proxyAgent);}/**
949
969
  * @description Sets the gateway used by the session
950
970
  * @param {object} gateway - Gateway Configuration interface
951
971
  * @param {string} gateway.host - The address of the gateway.
@@ -963,43 +983,43 @@ var tempState=this.authData.state;this.authData=localStorage.getItem("".concat(t
963
983
  * @param {string} opts.state - (optional) An arbitrary string to be passed back with the login response. Used for client apps to associate login responses with a request.
964
984
  * @param {string} opts.org - (optional) The organization name that would normally used when specifying an organization name when logging in. This is only used when a provider is also specified.
965
985
  * @param {string} opts.provider - (optional) Authentication provider to log in with e.g. okta, adfs, salesforce, onelogin. This is only used when an org is also specified.
966
- */},{key:"loginImplicitGrant",value:function loginImplicitGrant(clientId,redirectUri,opts){var _this2=this;// Check for auth token in hash
986
+ */},{key:"loginImplicitGrant",value:function loginImplicitGrant(clientId,redirectUri,opts){var _this3=this;// Check for auth token in hash
967
987
  var hash=this._setValuesFromUrlHash();this.clientId=clientId;this.redirectUri=redirectUri;if(!opts)opts={};return new Promise(function(resolve,reject){// Abort if org and provider are not set together
968
988
  if(opts.org&&!opts.provider){reject(new Error('opts.provider must be set if opts.org is set'));}else if(opts.provider&&!opts.org){reject(new Error('opts.org must be set if opts.provider is set'));}// Abort on auth error
969
- if(hash&&hash.error){hash.accessToken=undefined;_this2._saveSettings(hash);return reject(new Error("[".concat(hash.error,"] ").concat(hash.error_description)));}// Test token and proceed with login
970
- _this2._testTokenAccess().then(function(){if(!_this2.authData.state&&opts.state)_this2.authData.state=opts.state;resolve(_this2.authData);})["catch"](function(error){var query={client_id:encodeURIComponent(_this2.clientId),redirect_uri:encodeURIComponent(_this2.redirectUri),response_type:'token'};if(opts.state)query.state=encodeURIComponent(opts.state);if(opts.org)query.org=encodeURIComponent(opts.org);if(opts.provider)query.provider=encodeURIComponent(opts.provider);var url=_this2._buildAuthUrl('oauth/authorize',query);window.location.replace(url);});});}/**
989
+ if(hash&&hash.error){hash.accessToken=undefined;_this3._saveSettings(hash);return reject(new Error("[".concat(hash.error,"] ").concat(hash.error_description)));}// Test token and proceed with login
990
+ _this3._testTokenAccess().then(function(){if(!_this3.authData.state&&opts.state)_this3.authData.state=opts.state;resolve(_this3.authData);})["catch"](function(error){var query={client_id:encodeURIComponent(_this3.clientId),redirect_uri:encodeURIComponent(_this3.redirectUri),response_type:'token'};if(opts.state)query.state=encodeURIComponent(opts.state);if(opts.org)query.org=encodeURIComponent(opts.org);if(opts.provider)query.provider=encodeURIComponent(opts.provider);var url=_this3._buildAuthUrl('oauth/authorize',query);window.location.replace(url);});});}/**
971
991
  * @description Initiates the client credentials login flow. Only available in node apps.
972
992
  * @param {string} clientId - The client ID of an OAuth Implicit Grant client
973
993
  * @param {string} clientSecret - The client secret of an OAuth Implicit Grant client
974
- */},{key:"loginClientCredentialsGrant",value:function loginClientCredentialsGrant(clientId,clientSecret){var _this3=this;this.clientId=clientId;var authHeader=Buffer.from("".concat(clientId,":").concat(clientSecret)).toString('base64');var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));return new Promise(function(resolve,reject){// Block browsers from using client credentials
975
- if(typeof window!=='undefined'){reject(new Error('The client credentials grant is not supported in a browser.'));return;}var headers={'Authorization':"Basic ".concat(authHeader)};axios$1({method:"POST",url:"".concat(loginBasePath,"/oauth/token"),headers:headers,data:'grant_type=client_credentials',httpsAgent:_this3.proxyAgent}).then(function(response){// Logging
976
- _this3.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),headers,response.headers,{grant_type:'client_credentials'},undefined);_this3.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),headers,undefined,{grant_type:'client_credentials'},undefined);// Save access token
977
- _this3.setAccessToken(response.data['access_token']);// Set expiry time
978
- _this3.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this3.authData.tokenExpiryTimeString=new Date(_this3.authData.tokenExpiryTime).toUTCString();// Return auth data
979
- resolve(_this3.authData);})["catch"](function(error){// Log error
980
- if(error.response){_this3.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),headers,error.response.headers,{grant_type:'client_credentials'},error.response.data);}reject(error);});});}/**
994
+ */},{key:"loginClientCredentialsGrant",value:function loginClientCredentialsGrant(clientId,clientSecret){var _this4=this;this.clientId=clientId;var authHeader=Buffer.from("".concat(clientId,":").concat(clientSecret)).toString('base64');var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));return new Promise(function(resolve,reject){// Block browsers from using client credentials
995
+ if(typeof window!=='undefined'){reject(new Error('The client credentials grant is not supported in a browser.'));return;}var headers={'Authorization':"Basic ".concat(authHeader)};var requestOptions=new HttpRequestOptions("".concat(loginBasePath,"/oauth/token"),"POST",headers,null,'grant_type=client_credentials',_this4.timeout);var httpClient=_this4.getHttpClient();httpClient.request(requestOptions).then(function(response){// Logging
996
+ _this4.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),headers,response.headers,{grant_type:'client_credentials'},undefined);_this4.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),headers,undefined,{grant_type:'client_credentials'},undefined);// Save access token
997
+ _this4.setAccessToken(response.data['access_token']);// Set expiry time
998
+ _this4.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this4.authData.tokenExpiryTimeString=new Date(_this4.authData.tokenExpiryTime).toUTCString();// Return auth data
999
+ resolve(_this4.authData);})["catch"](function(error){// Log error
1000
+ if(error.response){_this4.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),headers,error.response.headers,{grant_type:'client_credentials'},error.response.data);}reject(error);});});}/**
981
1001
  * @description Initiates the Saml2Bearerflow. Only available in node apps.
982
1002
  * @param {string} clientId - The client ID of an OAuth Implicit Grant client
983
1003
  * @param {string} clientSecret - The client secret of an OAuth Implicit Grant client
984
1004
  * @param {string} orgName - The orgName of an OAuth Implicit Grant client
985
1005
  * @param {string} assertion - The saml2bearer assertion
986
- */},{key:"loginSaml2BearerGrant",value:function loginSaml2BearerGrant(clientId,clientSecret,orgName,assertion){var _this4=this;this.clientId=clientId;var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('The saml2bearer grant is not supported in a browser.'));return;}var encodedData=Buffer.from(clientId+':'+clientSecret).toString('base64');var request=_this4._formAuthRequest(encodedData,{grant_type:'urn:ietf:params:oauth:grant-type:saml2-bearer',orgName:orgName,assertion:assertion});request.proxy=_this4.proxy;var bodyParam={grant_type:'urn:ietf:params:oauth:grant-type:saml2-bearer',orgName:orgName,assertion:assertion};// Handle response
1006
+ */},{key:"loginSaml2BearerGrant",value:function loginSaml2BearerGrant(clientId,clientSecret,orgName,assertion){var _this5=this;this.clientId=clientId;var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('The saml2bearer grant is not supported in a browser.'));return;}var encodedData=Buffer.from(clientId+':'+clientSecret).toString('base64');var request=_this5._formAuthRequest(encodedData,{grant_type:'urn:ietf:params:oauth:grant-type:saml2-bearer',orgName:orgName,assertion:assertion});request.proxy=_this5.proxy;var bodyParam={grant_type:'urn:ietf:params:oauth:grant-type:saml2-bearer',orgName:orgName,assertion:assertion};// Handle response
987
1007
  request.then(function(response){// Logging
988
- _this4.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,response.headers,bodyParam,undefined);_this4.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,undefined,bodyParam,undefined);// Get access token from response
989
- var access_token=response.data.access_token;_this4.setAccessToken(access_token);_this4.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this4.authData.tokenExpiryTimeString=new Date(_this4.authData.tokenExpiryTime).toUTCString();// Return auth data
990
- resolve(_this4.authData);})["catch"](function(error){// Log error
991
- if(error.response){_this4.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,error.response.headers,bodyParam,error.response.data);}reject(error);});});}/**
1008
+ _this5.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,response.headers,bodyParam,undefined);_this5.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,undefined,bodyParam,undefined);// Get access token from response
1009
+ var access_token=response.data.access_token;_this5.setAccessToken(access_token);_this5.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this5.authData.tokenExpiryTimeString=new Date(_this5.authData.tokenExpiryTime).toUTCString();// Return auth data
1010
+ resolve(_this5.authData);})["catch"](function(error){// Log error
1011
+ if(error.response){_this5.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,error.response.headers,bodyParam,error.response.data);}reject(error);});});}/**
992
1012
  * @description Completes the PKCE Code Authorization.
993
1013
  * @param {string} clientId - The client ID of an OAuth Code Authorization Grant client
994
1014
  * @param {string} codeVerifier - code verifier used to generate the code challenge
995
1015
  * @param {string} authCode - Authorization code
996
1016
  * @param {string} redirectUri - Authorized redirect URI for your Code Authorization client
997
- */},{key:"authorizePKCEGrant",value:function authorizePKCEGrant(clientId,codeVerifier,authCode,redirectUri){var _this5=this;this.clientId=clientId;var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));return new Promise(function(resolve,reject){var request=axios$1({method:"POST",url:"".concat(loginBasePath,"/oauth/token"),headers:{'Content-Type':'application/x-www-form-urlencoded'},data:qs__default["default"].stringify({grant_type:'authorization_code',code:authCode,code_verifier:codeVerifier,client_id:clientId,redirect_uri:redirectUri})});request.proxy=_this5.proxy;var bodyParam={grant_type:'authorization_code',code:authCode,code_verifier:codeVerifier,client_id:clientId,redirect_uri:redirectUri};// Handle response
998
- request.then(function(response){// Logging
999
- _this5.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,response.headers,bodyParam,undefined);_this5.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,undefined,bodyParam,undefined);// Get access token from response
1000
- var access_token=response.data.access_token;_this5.setAccessToken(access_token);_this5.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this5.authData.tokenExpiryTimeString=new Date(_this5.authData.tokenExpiryTime).toUTCString();// Return auth data
1001
- resolve(_this5.authData);})["catch"](function(error){// Log error
1002
- if(error.response){_this5.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,error.response.headers,bodyParam,error.response.data);}reject(error);});});}/**
1017
+ */},{key:"authorizePKCEGrant",value:function authorizePKCEGrant(clientId,codeVerifier,authCode,redirectUri){var _this6=this;this.clientId=clientId;var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));return new Promise(function(resolve,reject){var headers={'Content-Type':'application/x-www-form-urlencoded'};var data=qs__default["default"].stringify({grant_type:'authorization_code',code:authCode,code_verifier:codeVerifier,client_id:clientId,redirect_uri:redirectUri});var requestOptions=new HttpRequestOptions("".concat(loginBasePath,"/oauth/token"),"POST",headers,null,data,_this6.timeout);var httpClient=_this6.getHttpClient();var bodyParam={grant_type:'authorization_code',code:authCode,code_verifier:codeVerifier,client_id:clientId,redirect_uri:redirectUri};// Handle response
1018
+ httpClient.request(requestOptions).then(function(response){// Logging
1019
+ _this6.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),requestOptions.headers,response.headers,bodyParam,undefined);_this6.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),requestOptions.headers,undefined,bodyParam,undefined);// Get access token from response
1020
+ var access_token=response.data.access_token;_this6.setAccessToken(access_token);_this6.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this6.authData.tokenExpiryTimeString=new Date(_this6.authData.tokenExpiryTime).toUTCString();// Return auth data
1021
+ resolve(_this6.authData);})["catch"](function(error){// Log error
1022
+ if(error.response){_this6.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),requestOptions.headers,error.response.headers,bodyParam,error.response.data);}reject(error);});});}/**
1003
1023
  * @description Generate a random string used as PKCE Code Verifier - length = 43 to 128.
1004
1024
  * @param {number} nChar - code length
1005
1025
  */},{key:"generatePKCECodeVerifier",value:function generatePKCECodeVerifier(nChar){if(nChar<43||nChar>128){throw new Error("PKCE Code Verifier (length) must be between 43 and 128 characters");}// Check for window
@@ -1018,23 +1038,23 @@ return reject(new Error("Code Challenge Error ".concat(error)));});});}}/**
1018
1038
  * @param {string} opts.org - (optional) The organization name that would normally used when specifying an organization name when logging in. This is only used when a provider is also specified.
1019
1039
  * @param {string} opts.provider - (optional) Authentication provider to log in with e.g. okta, adfs, salesforce, onelogin. This is only used when an org is also specified.
1020
1040
  * @param {string} codeVerifier - (optional) code verifier used to generate the code challenge
1021
- */},{key:"loginPKCEGrant",value:function loginPKCEGrant(clientId,redirectUri,opts,codeVerifier){var _this6=this;// Need Local Storage or non null codeVerifier as parameter
1041
+ */},{key:"loginPKCEGrant",value:function loginPKCEGrant(clientId,redirectUri,opts,codeVerifier){var _this7=this;// Need Local Storage or non null codeVerifier as parameter
1022
1042
  if(!this.hasLocalStorage&&!codeVerifier){throw new Error("loginPKCEGrant requires Local Storage or codeVerifier as input parameter");}// Check for auth code in query
1023
1043
  var query=this._setValuesFromUrlQuery();this.clientId=clientId;this.redirectUri=redirectUri;this.codeVerifier=codeVerifier;if(!opts)opts={};return new Promise(function(resolve,reject){// Abort if org and provider are not set together
1024
1044
  if(opts.org&&!opts.provider){reject(new Error('opts.provider must be set if opts.org is set'));}else if(opts.provider&&!opts.org){reject(new Error('opts.org must be set if opts.provider is set'));}// Abort on auth error
1025
1045
  if(query&&query.error){// remove codeVerifier from session storage
1026
- if(_this6.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}// reset access token if any was stored
1027
- _this6._saveSettings({accessToken:undefined});return reject(new Error("[".concat(query.error,"] ").concat(query.error_description)));}// Get token on auth code
1028
- if(query&&query.code){if(!_this6.codeVerifier){// load codeVerifier from session storage
1029
- if(_this6.hasLocalStorage){_this6.codeVerifier=sessionStorage.getItem("genesys_cloud_sdk_pkce_code_verifier");}}_this6.authorizePKCEGrant(_this6.clientId,_this6.codeVerifier,query.code,_this6.redirectUri).then(function(){// Do authenticated things
1030
- _this6._testTokenAccess().then(function(){if(!_this6.authData.state&&query.state)_this6.authData.state=query.state;// remove codeVerifier from session storage
1031
- if(_this6.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}resolve(_this6.authData);})["catch"](function(error){// Handle failure response
1032
- _this6._saveSettings({accessToken:undefined});// remove codeVerifier from session storage
1033
- if(_this6.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}return reject(new Error("[".concat(error.name,"] ").concat(error.msg)));});})["catch"](function(error){// Handle failure response
1034
- _this6._saveSettings({accessToken:undefined});// remove codeVerifier from session storage
1035
- if(_this6.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}return reject(new Error("[".concat(error.name,"] ").concat(error.msg)));});}else{// Test token (if previously stored) and proceed with login
1036
- _this6._testTokenAccess().then(function(){if(!_this6.authData.state&&opts.state)_this6.authData.state=opts.state;resolve(_this6.authData);})["catch"](function(error){if(!_this6.codeVerifier){_this6.codeVerifier=_this6.generatePKCECodeVerifier(128);// save codeVerifier in session storage
1037
- if(_this6.hasLocalStorage){sessionStorage.setItem("genesys_cloud_sdk_pkce_code_verifier",_this6.codeVerifier);}}_this6.computePKCECodeChallenge(_this6.codeVerifier).then(function(codeChallenge){var tokenQuery={client_id:encodeURIComponent(_this6.clientId),redirect_uri:encodeURIComponent(_this6.redirectUri),code_challenge:encodeURIComponent(codeChallenge),response_type:'code',code_challenge_method:'S256'};if(opts.state)tokenQuery.state=encodeURIComponent(opts.state);if(opts.org)tokenQuery.org=encodeURIComponent(opts.org);if(opts.provider)tokenQuery.provider=encodeURIComponent(opts.provider);var url=_this6._buildAuthUrl('oauth/authorize',tokenQuery);window.location.replace(url);})["catch"](function(err){return reject(new Error("[".concat(err.name,"]")));});});}});}/**
1046
+ if(_this7.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}// reset access token if any was stored
1047
+ _this7._saveSettings({accessToken:undefined});return reject(new Error("[".concat(query.error,"] ").concat(query.error_description)));}// Get token on auth code
1048
+ if(query&&query.code){if(!_this7.codeVerifier){// load codeVerifier from session storage
1049
+ if(_this7.hasLocalStorage){_this7.codeVerifier=sessionStorage.getItem("genesys_cloud_sdk_pkce_code_verifier");}}_this7.authorizePKCEGrant(_this7.clientId,_this7.codeVerifier,query.code,_this7.redirectUri).then(function(){// Do authenticated things
1050
+ _this7._testTokenAccess().then(function(){if(!_this7.authData.state&&query.state)_this7.authData.state=query.state;// remove codeVerifier from session storage
1051
+ if(_this7.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}resolve(_this7.authData);})["catch"](function(error){// Handle failure response
1052
+ _this7._saveSettings({accessToken:undefined});// remove codeVerifier from session storage
1053
+ if(_this7.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}return reject(new Error("[".concat(error.name,"] ").concat(error.msg)));});})["catch"](function(error){// Handle failure response
1054
+ _this7._saveSettings({accessToken:undefined});// remove codeVerifier from session storage
1055
+ if(_this7.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}return reject(new Error("[".concat(error.name,"] ").concat(error.msg)));});}else{// Test token (if previously stored) and proceed with login
1056
+ _this7._testTokenAccess().then(function(){if(!_this7.authData.state&&opts.state)_this7.authData.state=opts.state;resolve(_this7.authData);})["catch"](function(error){if(!_this7.codeVerifier){_this7.codeVerifier=_this7.generatePKCECodeVerifier(128);// save codeVerifier in session storage
1057
+ if(_this7.hasLocalStorage){sessionStorage.setItem("genesys_cloud_sdk_pkce_code_verifier",_this7.codeVerifier);}}_this7.computePKCECodeChallenge(_this7.codeVerifier).then(function(codeChallenge){var tokenQuery={client_id:encodeURIComponent(_this7.clientId),redirect_uri:encodeURIComponent(_this7.redirectUri),code_challenge:encodeURIComponent(codeChallenge),response_type:'code',code_challenge_method:'S256'};if(opts.state)tokenQuery.state=encodeURIComponent(opts.state);if(opts.org)tokenQuery.org=encodeURIComponent(opts.org);if(opts.provider)tokenQuery.provider=encodeURIComponent(opts.provider);var url=_this7._buildAuthUrl('oauth/authorize',tokenQuery);window.location.replace(url);})["catch"](function(err){return reject(new Error("[".concat(err.name,"]")));});});}});}/**
1038
1058
  * @description Parses the URL Query, grabs the code, and clears the query param. If no code is found, no action is taken.
1039
1059
  */},{key:"_setValuesFromUrlQuery",value:function _setValuesFromUrlQuery(){// Check for window
1040
1060
  if(!(typeof window!=='undefined'&&window.location.search))return;// Process query string
@@ -1051,42 +1071,42 @@ document.body.scrollTop=scrollV;document.body.scrollLeft=scrollH;}return query;}
1051
1071
  * @param {string} clientSecret - The client secret of an OAuth Code Authorization Grant client
1052
1072
  * @param {string} authCode - Authorization code
1053
1073
  * @param {string} redirectUri - Authorized redirect URI for your Code Authorization client
1054
- */},{key:"loginCodeAuthorizationGrant",value:function loginCodeAuthorizationGrant(clientId,clientSecret,authCode,redirectUri){var _this7=this;this.clientId=clientId;this.clientSecret=clientSecret;return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('The Code Authorization grant is not supported in a browser.'));return;}var encodedData=Buffer.from(clientId+':'+clientSecret).toString('base64');var request=_this7._formAuthRequest(encodedData,{grant_type:'authorization_code',code:authCode,redirect_uri:redirectUri});request.proxy=_this7.proxy;var bodyParam={grant_type:'authorization_code',code:authCode,redirect_uri:redirectUri};// Handle response
1055
- _this7._handleCodeAuthorizationResponse(request,bodyParam,resolve,reject);});}/**
1074
+ */},{key:"loginCodeAuthorizationGrant",value:function loginCodeAuthorizationGrant(clientId,clientSecret,authCode,redirectUri){var _this8=this;this.clientId=clientId;this.clientSecret=clientSecret;return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('The Code Authorization grant is not supported in a browser.'));return;}var encodedData=Buffer.from(clientId+':'+clientSecret).toString('base64');var request=_this8._formAuthRequest(encodedData,{grant_type:'authorization_code',code:authCode,redirect_uri:redirectUri});request.proxy=_this8.proxy;var bodyParam={grant_type:'authorization_code',code:authCode,redirect_uri:redirectUri};// Handle response
1075
+ _this8._handleCodeAuthorizationResponse(request,bodyParam,resolve,reject);});}/**
1056
1076
  * @description Requests a new access token for Code Authorization. Only available in node apps.
1057
1077
  * @param {string} clientId - The client ID of an OAuth Code Authorization Grant client
1058
1078
  * @param {string} clientSecret - The client secret of an OAuth Code Authorization Grant client
1059
1079
  * @param {string} authCode - Authorization code
1060
1080
  * @param {string} redirectUri - Authorized redirect URI for your Code Authorization client
1061
- */},{key:"refreshCodeAuthorizationGrant",value:function refreshCodeAuthorizationGrant(clientId,clientSecret,refreshToken){var _this8=this;return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('The Code Authorization grant is not supported in a browser.'));return;}var encodedData=Buffer.from(clientId+':'+clientSecret).toString('base64');var request=_this8._formAuthRequest(encodedData,{grant_type:'refresh_token',refresh_token:refreshToken});request.proxy=_this8.proxy;var bodyParam={grant_type:'refresh_token',refresh_token:refreshToken};// Handle response
1062
- _this8._handleCodeAuthorizationResponse(request,bodyParam,resolve,reject);});}/**
1081
+ */},{key:"refreshCodeAuthorizationGrant",value:function refreshCodeAuthorizationGrant(clientId,clientSecret,refreshToken){var _this9=this;return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('The Code Authorization grant is not supported in a browser.'));return;}var encodedData=Buffer.from(clientId+':'+clientSecret).toString('base64');var request=_this9._formAuthRequest(encodedData,{grant_type:'refresh_token',refresh_token:refreshToken});request.proxy=_this9.proxy;var bodyParam={grant_type:'refresh_token',refresh_token:refreshToken};// Handle response
1082
+ _this9._handleCodeAuthorizationResponse(request,bodyParam,resolve,reject);});}/**
1063
1083
  * @description Handles the response for code auth requests
1064
1084
  * @param {object} request - Authorization request object
1065
1085
  * @param {object} bodyParam - Input body data for authorization request
1066
1086
  * @param {function} resolve - Promise resolve callback
1067
1087
  * @param {function} reject - Promise reject callback
1068
- */},{key:"_handleCodeAuthorizationResponse",value:function _handleCodeAuthorizationResponse(request,bodyParam,resolve,reject){var _this9=this;var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));request.then(function(response){// Logging
1069
- _this9.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,response.headers,bodyParam,undefined);_this9.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,undefined,bodyParam,undefined);// Get access token from response
1070
- var access_token=response.data.access_token;var refresh_token=response.data.refresh_token;_this9.setAccessToken(access_token);_this9.authData.refreshToken=refresh_token;_this9.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this9.authData.tokenExpiryTimeString=new Date(_this9.authData.tokenExpiryTime).toUTCString();// Return auth data
1071
- resolve(_this9.authData);})["catch"](function(error){// Log error
1072
- if(error.response){_this9.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,error.response.headers,bodyParam,error.response.data);}reject(error);});}/**
1088
+ */},{key:"_handleCodeAuthorizationResponse",value:function _handleCodeAuthorizationResponse(request,bodyParam,resolve,reject){var _this10=this;var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));request.then(function(response){// Logging
1089
+ _this10.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,response.headers,bodyParam,undefined);_this10.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,undefined,bodyParam,undefined);// Get access token from response
1090
+ var access_token=response.data.access_token;var refresh_token=response.data.refresh_token;_this10.setAccessToken(access_token);_this10.authData.refreshToken=refresh_token;_this10.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this10.authData.tokenExpiryTimeString=new Date(_this10.authData.tokenExpiryTime).toUTCString();// Return auth data
1091
+ resolve(_this10.authData);})["catch"](function(error){// Log error
1092
+ if(error.response){_this10.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,error.response.headers,bodyParam,error.response.data);}reject(error);});}/**
1073
1093
  * @description Utility function to create the request for auth requests
1074
1094
  * @param {string} encodedData - Base64 encoded client and clientSecret pair
1075
1095
  * @param {object} data - data to url form encode
1076
- */},{key:"_formAuthRequest",value:function _formAuthRequest(encodedData,data){var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));var request=axios$1({method:"POST",url:"".concat(loginBasePath,"/oauth/token"),headers:{'Authorization':'Basic '+encodedData,'Content-Type':'application/x-www-form-urlencoded'},data:qs__default["default"].stringify(data)});return request;}/**
1096
+ */},{key:"_formAuthRequest",value:function _formAuthRequest(encodedData,data){var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));var headers={'Authorization':'Basic '+encodedData,'Content-Type':'application/x-www-form-urlencoded'};var requestOptions=new HttpRequestOptions(loginBasePath,"POST",headers,null,qs__default["default"].stringify(data),this.timeout);var httpClient=this.getHttpClient();return httpClient.request(requestOptions);}/**
1077
1097
  * @description Handles an expired access token. Only available in node apps.
1078
1098
  * @param {string} statusCode - The status code of a request
1079
- */},{key:"_handleExpiredAccessToken",value:function _handleExpiredAccessToken(){var _this10=this;return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('This method is not supported in a browser.'));return;}if(!_this10.refreshInProgress){_this10.refreshInProgress=true;_this10.refreshCodeAuthorizationGrant(_this10.clientId,_this10.clientSecret,_this10.authData.refreshToken).then(function(){_this10.refreshInProgress=false;resolve();})["catch"](function(err){// Handle failure response
1080
- _this10.refreshInProgress=false;reject(err);});}else{// Wait refresh_token_wait_max seconds for other thread to complete refresh
1081
- _this10._sleep(_this10.config.refresh_token_wait_max).then(function(){if(_this10.refreshInProgress)reject(new Error("Token refresh took longer than ".concat(_this10.config.refresh_token_wait_max," seconds")));else resolve();});}});}/**
1099
+ */},{key:"_handleExpiredAccessToken",value:function _handleExpiredAccessToken(){var _this11=this;return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('This method is not supported in a browser.'));return;}if(!_this11.refreshInProgress){_this11.refreshInProgress=true;_this11.refreshCodeAuthorizationGrant(_this11.clientId,_this11.clientSecret,_this11.authData.refreshToken).then(function(){_this11.refreshInProgress=false;resolve();})["catch"](function(err){// Handle failure response
1100
+ _this11.refreshInProgress=false;reject(err);});}else{// Wait refresh_token_wait_max seconds for other thread to complete refresh
1101
+ _this11._sleep(_this11.config.refresh_token_wait_max).then(function(){if(_this11.refreshInProgress)reject(new Error("Token refresh took longer than ".concat(_this11.config.refresh_token_wait_max," seconds")));else resolve();});}});}/**
1082
1102
  * @description Sleeps for a defined length
1083
1103
  * @param {int} millis - Length to sleep in milliseconds
1084
1104
  */},{key:"_sleep",value:function _sleep(millis){return new Promise(function(resolve){return setTimeout(resolve,millis);});}/**
1085
1105
  * @description Loads token from storage, if enabled, and checks to ensure it works.
1086
- */},{key:"_testTokenAccess",value:function _testTokenAccess(){var _this11=this;return new Promise(function(resolve,reject){// Load from storage
1087
- _this11._loadSettings();// Check if there is a token to test
1088
- if(!_this11.authentications['PureCloud OAuth'].accessToken){reject(new Error('Token is not set'));return;}// Test token
1089
- _this11.callApi('/api/v2/tokens/me','GET',null,null,null,null,null,['PureCloud OAuth'],['application/json'],['application/json']).then(function(){resolve();})["catch"](function(error){_this11._saveSettings({accessToken:undefined});reject(error);});});}/**
1106
+ */},{key:"_testTokenAccess",value:function _testTokenAccess(){var _this12=this;return new Promise(function(resolve,reject){// Load from storage
1107
+ _this12._loadSettings();// Check if there is a token to test
1108
+ if(!_this12.authentications['PureCloud OAuth'].accessToken){reject(new Error('Token is not set'));return;}// Test token
1109
+ _this12.callApi('/api/v2/tokens/me','GET',null,null,null,null,null,['PureCloud OAuth'],['application/json'],['application/json']).then(function(){resolve();})["catch"](function(error){_this12._saveSettings({accessToken:undefined});reject(error);});});}/**
1090
1110
  * @description Parses the URL hash, grabs the access token, and clears the hash. If no access token is found, no action is taken.
1091
1111
  */},{key:"_setValuesFromUrlHash",value:function _setValuesFromUrlHash(){// Check for window
1092
1112
  if(!(typeof window!=='undefined'&&window.location.hash))return;// Process hash string into object
@@ -1131,7 +1151,7 @@ this.setAccessToken(this.authentications['PureCloud OAuth'].accessToken);}/**
1131
1151
  * @param {String} path The path to append to the base URL.
1132
1152
  * @param {Object} pathParams The parameter values to append.
1133
1153
  * @returns {String} The encoded path with parameter values substituted.
1134
- */},{key:"buildUrl",value:function buildUrl(path,pathParams){var _this12=this;if(!path.match(/^\//)){path="/".concat(path);}var url=this.config.getConfUrl('api',this.config.basePath)+path;url=url.replace(/\{([\w-]+)\}/g,function(fullMatch,key){var value;if(pathParams.hasOwnProperty(key)){value=_this12.paramToString(pathParams[key]);}else{value=fullMatch;}return encodeURIComponent(value);});return url;}/**
1154
+ */},{key:"buildUrl",value:function buildUrl(path,pathParams){var _this13=this;if(!path.match(/^\//)){path="/".concat(path);}var url=this.config.getConfUrl('api',this.config.basePath)+path;url=url.replace(/\{([\w-]+)\}/g,function(fullMatch,key){var value;if(pathParams.hasOwnProperty(key)){value=_this13.paramToString(pathParams[key]);}else{value=fullMatch;}return encodeURIComponent(value);});return url;}/**
1135
1155
  * Checks whether the given content type represents JSON.<br>
1136
1156
  * JSON content type examples:<br>
1137
1157
  * <ul>
@@ -1172,10 +1192,10 @@ return param.map(this.paramToString);default:throw new Error("Unknown collection
1172
1192
  * Applies authentication headers to the request.
1173
1193
  * @param {Object} request The axios request config object.
1174
1194
  * @param {Array.<String>} authNames An array of authentication method names.
1175
- */},{key:"applyAuthToRequest",value:function applyAuthToRequest(request,authNames){var _this13=this;authNames.forEach(function(authName){var auth=_this13.authentications[authName];switch(auth.type){case'basic':if(auth.username||auth.password){request.auth={username:auth.username||'',password:auth.password||''};}break;case'apiKey':if(auth.apiKey){var data={};if(auth.apiKeyPrefix){data[auth.name]="".concat(auth.apiKeyPrefix," ").concat(auth.apiKey);}else{data[auth.name]=auth.apiKey;}if(auth['in']==='header'){request.headers=_this13.addHeaders(request.headers,data);}else{request.params=_this13.serialize(data);}}break;case'oauth2':if(auth.accessToken){request.headers=_this13.addHeaders(request.headers,{'Authorization':"Bearer ".concat(auth.accessToken)});}break;default:throw new Error("Unknown authentication type: ".concat(auth.type));}});}/**
1176
- * @description Sets the proxy agent axios will use for requests
1195
+ */},{key:"applyAuthToRequest",value:function applyAuthToRequest(request,authNames){var _this14=this;authNames.forEach(function(authName){var auth=_this14.authentications[authName];switch(auth.type){case'basic':if(auth.username||auth.password){request.auth={username:auth.username||'',password:auth.password||''};}break;case'apiKey':if(auth.apiKey){var data={};if(auth.apiKeyPrefix){data[auth.name]="".concat(auth.apiKeyPrefix," ").concat(auth.apiKey);}else{data[auth.name]=auth.apiKey;}if(auth['in']==='header'){request.headers=_this14.addHeaders(request.headers,data);}else{request.setParams(_this14.serialize(data));}}break;case'oauth2':if(auth.accessToken){request.headers=_this14.addHeaders(request.headers,{'Authorization':"Bearer ".concat(auth.accessToken)});}break;default:throw new Error("Unknown authentication type: ".concat(auth.type));}});}/**
1196
+ * @description Sets the proxy agent axios will use for requests
1177
1197
  * @param {any} agent - The proxy agent
1178
- */},{key:"setProxyAgent",value:function setProxyAgent(agent){this.proxyAgent=agent;}/**
1198
+ */},{key:"setProxyAgent",value:function setProxyAgent(agent){this.proxyAgent=agent;var httpClient=this.getHttpClient();httpClient.setHttpsAgent(this.proxyAgent);}/**
1179
1199
  * Invokes the REST service using the supplied settings and parameters.
1180
1200
  * @param {String} path The base URL to invoke.
1181
1201
  * @param {String} httpMethod The HTTP method to use.
@@ -1189,17 +1209,17 @@ return param.map(this.paramToString);default:throw new Error("Unknown collection
1189
1209
  * @param {Array.<String>} accepts An array of acceptable response MIME types.types or the
1190
1210
  * constructor for a complex type.
1191
1211
  * @returns {Promise} A Promise object.
1192
- */},{key:"callApi",value:function callApi(path,httpMethod,pathParams,queryParams,headerParams,formParams,bodyParam,authNames,contentTypes,accepts){var _this14=this;return new Promise(function(resolve,reject){sendRequest(_this14);function sendRequest(that){var url=that.buildUrl(path,pathParams);var request={method:httpMethod,url:url,httpsAgent:that.proxyAgent,timeout:that.timeout,params:that.serialize(queryParams)};// apply authentications
1212
+ */},{key:"callApi",value:function callApi(path,httpMethod,pathParams,queryParams,headerParams,formParams,bodyParam,authNames,contentTypes,accepts){var _this15=this;return new Promise(function(resolve,reject){sendRequest(_this15);function sendRequest(that){var url=that.buildUrl(path,pathParams);var request=new HttpRequestOptions(url,httpMethod,null,that.serialize(queryParams),null,that.timeout);// apply authentications
1193
1213
  that.applyAuthToRequest(request,authNames);// set header parameters
1194
- var defaultHeaders=that.defaultHeaders;var normalizedHeaderParams=that.normalizeParams(headerParams);request.headers=that.addHeaders(request.headers,defaultHeaders,normalizedHeaderParams);var contentType=that.jsonPreferredMime(contentTypes);if(contentType){request.headers['Content-Type']=contentType;}else if(!request.headers['Content-Type']){request.headers['Content-Type']='application/json';}if(contentType==='application/x-www-form-urlencoded'){request.data=that.normalizeParams(formParams);}else if(contentType=='multipart/form-data'){var _formParams=that.normalizeParams(formParams);for(var key in _formParams){if(_formParams.hasOwnProperty(key)){// Looks like axios handles files and forms the same way
1195
- var formData=new FormData();formData.set(key,_formParams[key]);request.data=formData;}}}else if(bodyParam){request.data=bodyParam;}var accept=that.jsonPreferredMime(accepts);if(accept){request.headers['Accept']=accept;}axios$1.request(request).then(function(response){// Build response object
1214
+ var defaultHeaders=that.defaultHeaders;var normalizedHeaderParams=that.normalizeParams(headerParams);request.headers=that.addHeaders(request.headers,defaultHeaders,normalizedHeaderParams);var contentType=that.jsonPreferredMime(contentTypes);if(contentType){request.headers['Content-Type']=contentType;}else if(!request.headers['Content-Type']){request.headers['Content-Type']='application/json';}if(contentType==='application/x-www-form-urlencoded'){request.setData(that.normalizeParams(formParams));}else if(contentType=='multipart/form-data'){var _formParams=that.normalizeParams(formParams);for(var key in _formParams){if(_formParams.hasOwnProperty(key)){// Looks like axios handles files and forms the same way
1215
+ var formData=new FormData();formData.set(key,_formParams[key]);request.setData(formData);}}}else if(bodyParam){request.setData(bodyParam);}var accept=that.jsonPreferredMime(accepts);if(accept){request.headers['Accept']=accept;}var httpClient=that.getHttpClient();httpClient.request(request).then(function(response){// Build response object
1196
1216
  var data=that.returnExtended===true?{status:response.status,statusText:response.statusText,headers:response.headers,body:response.data,text:response.text,error:null}:response.data?response.data:response.text;// Debug logging
1197
1217
  that.config.logger.log('trace',response.status,httpMethod,url,request.headers,response.headers,bodyParam,undefined);that.config.logger.log('debug',response.status,httpMethod,url,request.headers,undefined,bodyParam,undefined);// Resolve promise
1198
- resolve(data);})["catch"](function(error){var data=error;if(error.response&&error.response.status==401&&that.config.refresh_access_token&&that.authData.refreshToken!==""){that._handleExpiredAccessToken().then(function(){sendRequest(that);})["catch"](function(err){reject(err);});}else if(error.response){// Log error
1218
+ resolve(data);})["catch"](function(error){var data=error;if(error.response&&error.response.status==401&&that.config.refresh_access_token&&that.authData.refreshToken&&that.authData.refreshToken!==""){that._handleExpiredAccessToken().then(function(){sendRequest(that);})["catch"](function(err){reject(err);});}else if(error.response){// Log error
1199
1219
  that.config.logger.log('error',error.response.status,httpMethod,url,request.headers,error.response.headers,bodyParam,error.response.data);data=that.returnExtended===true?{status:error.response.status,statusText:error.response.statusText,headers:error.response.headers,body:error.response.data,text:error.response.text,error:error}:error.response.data?error.response.data:error.response.text;}reject(data);});}});}}]);}();var AgentAssistantsApi=/*#__PURE__*/function(){/**
1200
1220
  * AgentAssistants service.
1201
1221
  * @module purecloud-platform-client-v2/api/AgentAssistantsApi
1202
- * @version 209.0.0
1222
+ * @version 211.0.0
1203
1223
  *//**
1204
1224
  * Constructs a new AgentAssistantsApi.
1205
1225
  * @alias module:purecloud-platform-client-v2/api/AgentAssistantsApi
@@ -1300,7 +1320,7 @@ if(queueId===undefined||queueId===null){throw'Missing the required parameter "qu
1300
1320
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAssistantQueue';}return this.apiClient.callApi('/api/v2/assistants/{assistantId}/queues/{queueId}','PUT',{'assistantId':assistantId,'queueId':queueId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AgentCopilotApi=/*#__PURE__*/function(){/**
1301
1321
  * AgentCopilot service.
1302
1322
  * @module purecloud-platform-client-v2/api/AgentCopilotApi
1303
- * @version 209.0.0
1323
+ * @version 211.0.0
1304
1324
  *//**
1305
1325
  * Constructs a new AgentCopilotApi.
1306
1326
  * @alias module:purecloud-platform-client-v2/api/AgentCopilotApi
@@ -1322,7 +1342,7 @@ if(assistantId===undefined||assistantId===null){throw'Missing the required param
1322
1342
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAssistantCopilot';}return this.apiClient.callApi('/api/v2/assistants/{assistantId}/copilot','PUT',{'assistantId':assistantId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AgentUIApi=/*#__PURE__*/function(){/**
1323
1343
  * AgentUI service.
1324
1344
  * @module purecloud-platform-client-v2/api/AgentUIApi
1325
- * @version 209.0.0
1345
+ * @version 211.0.0
1326
1346
  *//**
1327
1347
  * Constructs a new AgentUIApi.
1328
1348
  * @alias module:purecloud-platform-client-v2/api/AgentUIApi
@@ -1356,7 +1376,7 @@ if(agentId===undefined||agentId===null){throw'Missing the required parameter "ag
1356
1376
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUsersAgentuiAgentsAutoanswerAgentIdSettings';}return this.apiClient.callApi('/api/v2/users/agentui/agents/autoanswer/{agentId}/settings','PUT',{'agentId':agentId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AlertingApi=/*#__PURE__*/function(){/**
1357
1377
  * Alerting service.
1358
1378
  * @module purecloud-platform-client-v2/api/AlertingApi
1359
- * @version 209.0.0
1379
+ * @version 211.0.0
1360
1380
  *//**
1361
1381
  * Constructs a new AlertingApi.
1362
1382
  * @alias module:purecloud-platform-client-v2/api/AlertingApi
@@ -1513,7 +1533,7 @@ if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "rule
1513
1533
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAlertingRule';}return this.apiClient.callApi('/api/v2/alerting/rules/{ruleId}','PUT',{'ruleId':ruleId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AnalyticsApi=/*#__PURE__*/function(){/**
1514
1534
  * Analytics service.
1515
1535
  * @module purecloud-platform-client-v2/api/AnalyticsApi
1516
- * @version 209.0.0
1536
+ * @version 211.0.0
1517
1537
  *//**
1518
1538
  * Constructs a new AnalyticsApi.
1519
1539
  * @alias module:purecloud-platform-client-v2/api/AnalyticsApi
@@ -2135,7 +2155,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
2135
2155
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAnalyticsDataretentionSettings';}return this.apiClient.callApi('/api/v2/analytics/dataretention/settings','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ArchitectApi=/*#__PURE__*/function(){/**
2136
2156
  * Architect service.
2137
2157
  * @module purecloud-platform-client-v2/api/ArchitectApi
2138
- * @version 209.0.0
2158
+ * @version 211.0.0
2139
2159
  *//**
2140
2160
  * Constructs a new ArchitectApi.
2141
2161
  * @alias module:purecloud-platform-client-v2/api/ArchitectApi
@@ -3227,7 +3247,7 @@ if(milestoneId===undefined||milestoneId===null){throw'Missing the required param
3227
3247
  if(flowOutcomeId===undefined||flowOutcomeId===null){throw'Missing the required parameter "flowOutcomeId" when calling putFlowsOutcome';}return this.apiClient.callApi('/api/v2/flows/outcomes/{flowOutcomeId}','PUT',{'flowOutcomeId':flowOutcomeId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AuditApi=/*#__PURE__*/function(){/**
3228
3248
  * Audit service.
3229
3249
  * @module purecloud-platform-client-v2/api/AuditApi
3230
- * @version 209.0.0
3250
+ * @version 211.0.0
3231
3251
  *//**
3232
3252
  * Constructs a new AuditApi.
3233
3253
  * @alias module:purecloud-platform-client-v2/api/AuditApi
@@ -3277,7 +3297,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
3277
3297
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAuditsQueryRealtimeRelated';}return this.apiClient.callApi('/api/v2/audits/query/realtime/related','POST',{},{'expand':this.apiClient.buildCollectionParam(opts['expand'],'multi')},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AuthorizationApi=/*#__PURE__*/function(){/**
3278
3298
  * Authorization service.
3279
3299
  * @module purecloud-platform-client-v2/api/AuthorizationApi
3280
- * @version 209.0.0
3300
+ * @version 211.0.0
3281
3301
  *//**
3282
3302
  * Constructs a new AuthorizationApi.
3283
3303
  * @alias module:purecloud-platform-client-v2/api/AuthorizationApi
@@ -3600,7 +3620,7 @@ if(subjectId===undefined||subjectId===null){throw'Missing the required parameter
3600
3620
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUserRoles';}return this.apiClient.callApi('/api/v2/users/{subjectId}/roles','PUT',{'subjectId':subjectId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var BillingApi=/*#__PURE__*/function(){/**
3601
3621
  * Billing service.
3602
3622
  * @module purecloud-platform-client-v2/api/BillingApi
3603
- * @version 209.0.0
3623
+ * @version 211.0.0
3604
3624
  *//**
3605
3625
  * Constructs a new BillingApi.
3606
3626
  * @alias module:purecloud-platform-client-v2/api/BillingApi
@@ -3624,7 +3644,7 @@ if(endDate===undefined||endDate===null){throw'Missing the required parameter "en
3624
3644
  if(trustorOrgId===undefined||trustorOrgId===null){throw'Missing the required parameter "trustorOrgId" when calling getBillingTrusteebillingoverviewTrustorOrgId';}return this.apiClient.callApi('/api/v2/billing/trusteebillingoverview/{trustorOrgId}','GET',{'trustorOrgId':trustorOrgId},{'billingPeriodIndex':opts['billingPeriodIndex']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var CarrierServicesApi=/*#__PURE__*/function(){/**
3625
3645
  * CarrierServices service.
3626
3646
  * @module purecloud-platform-client-v2/api/CarrierServicesApi
3627
- * @version 209.0.0
3647
+ * @version 211.0.0
3628
3648
  *//**
3629
3649
  * Constructs a new CarrierServicesApi.
3630
3650
  * @alias module:purecloud-platform-client-v2/api/CarrierServicesApi
@@ -3644,7 +3664,7 @@ if(phoneNumber===undefined||phoneNumber===null){throw'Missing the required param
3644
3664
  */},{key:"postCarrierservicesIntegrationsEmergencylocationsMe",value:function postCarrierservicesIntegrationsEmergencylocationsMe(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/carrierservices/integrations/emergencylocations/me','POST',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ChatApi=/*#__PURE__*/function(){/**
3645
3665
  * Chat service.
3646
3666
  * @module purecloud-platform-client-v2/api/ChatApi
3647
- * @version 209.0.0
3667
+ * @version 211.0.0
3648
3668
  *//**
3649
3669
  * Constructs a new ChatApi.
3650
3670
  * @alias module:purecloud-platform-client-v2/api/ChatApi
@@ -3869,7 +3889,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
3869
3889
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putChatsSettings';}return this.apiClient.callApi('/api/v2/chats/settings','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var CoachingApi=/*#__PURE__*/function(){/**
3870
3890
  * Coaching service.
3871
3891
  * @module purecloud-platform-client-v2/api/CoachingApi
3872
- * @version 209.0.0
3892
+ * @version 211.0.0
3873
3893
  *//**
3874
3894
  * Constructs a new CoachingApi.
3875
3895
  * @alias module:purecloud-platform-client-v2/api/CoachingApi
@@ -4022,7 +4042,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
4022
4042
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postCoachingScheduleslotsQuery';}return this.apiClient.callApi('/api/v2/coaching/scheduleslots/query','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ContentManagementApi=/*#__PURE__*/function(){/**
4023
4043
  * ContentManagement service.
4024
4044
  * @module purecloud-platform-client-v2/api/ContentManagementApi
4025
- * @version 209.0.0
4045
+ * @version 211.0.0
4026
4046
  *//**
4027
4047
  * Constructs a new ContentManagementApi.
4028
4048
  * @alias module:purecloud-platform-client-v2/api/ContentManagementApi
@@ -4304,7 +4324,7 @@ if(tagId===undefined||tagId===null){throw'Missing the required parameter "tagId"
4304
4324
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putContentmanagementWorkspaceTagvalue';}return this.apiClient.callApi('/api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues/{tagId}','PUT',{'workspaceId':workspaceId,'tagId':tagId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ConversationsApi=/*#__PURE__*/function(){/**
4305
4325
  * Conversations service.
4306
4326
  * @module purecloud-platform-client-v2/api/ConversationsApi
4307
- * @version 209.0.0
4327
+ * @version 211.0.0
4308
4328
  *//**
4309
4329
  * Constructs a new ConversationsApi.
4310
4330
  * @alias module:purecloud-platform-client-v2/api/ConversationsApi
@@ -6032,7 +6052,7 @@ if(conversationId===undefined||conversationId===null){throw'Missing the required
6032
6052
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putConversationsVideoRecordingstate';}return this.apiClient.callApi('/api/v2/conversations/videos/{conversationId}/recordingstate','PUT',{'conversationId':conversationId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var DataExtensionsApi=/*#__PURE__*/function(){/**
6033
6053
  * DataExtensions service.
6034
6054
  * @module purecloud-platform-client-v2/api/DataExtensionsApi
6035
- * @version 209.0.0
6055
+ * @version 211.0.0
6036
6056
  *//**
6037
6057
  * Constructs a new DataExtensionsApi.
6038
6058
  * @alias module:purecloud-platform-client-v2/api/DataExtensionsApi
@@ -6050,10 +6070,50 @@ if(coretypeName===undefined||coretypeName===null){throw'Missing the required par
6050
6070
  */},{key:"getDataextensionsCoretypes",value:function getDataextensionsCoretypes(){return this.apiClient.callApi('/api/v2/dataextensions/coretypes','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6051
6071
  * Get quantitative limits on schemas
6052
6072
  *
6053
- */},{key:"getDataextensionsLimits",value:function getDataextensionsLimits(){return this.apiClient.callApi('/api/v2/dataextensions/limits','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var DownloadsApi=/*#__PURE__*/function(){/**
6073
+ */},{key:"getDataextensionsLimits",value:function getDataextensionsLimits(){return this.apiClient.callApi('/api/v2/dataextensions/limits','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var DataPrivacyApi=/*#__PURE__*/function(){/**
6074
+ * DataPrivacy service.
6075
+ * @module purecloud-platform-client-v2/api/DataPrivacyApi
6076
+ * @version 211.0.0
6077
+ *//**
6078
+ * Constructs a new DataPrivacyApi.
6079
+ * @alias module:purecloud-platform-client-v2/api/DataPrivacyApi
6080
+ * @class
6081
+ * @param {module:purecloud-platform-client-v2/ApiClient} apiClient Optional API client implementation to use,
6082
+ * default to {@link module:purecloud-platform-client-v2/ApiClient#instance} if unspecified.
6083
+ */function DataPrivacyApi(apiClient){_classCallCheck(this,DataPrivacyApi);this.apiClient=apiClient||ApiClient.instance;}/**
6084
+ * Delete a masking rule.
6085
+ *
6086
+ * @param {String} ruleId ruleId
6087
+ */return _createClass(DataPrivacyApi,[{key:"deleteDataprivacyMaskingrule",value:function deleteDataprivacyMaskingrule(ruleId){// verify the required parameter 'ruleId' is set
6088
+ if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "ruleId" when calling deleteDataprivacyMaskingrule';}return this.apiClient.callApi('/api/v2/dataprivacy/maskingrules/{ruleId}','DELETE',{'ruleId':ruleId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6089
+ * Fetch details about a masking rule.
6090
+ *
6091
+ * @param {String} ruleId ruleId
6092
+ */},{key:"getDataprivacyMaskingrule",value:function getDataprivacyMaskingrule(ruleId){// verify the required parameter 'ruleId' is set
6093
+ if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "ruleId" when calling getDataprivacyMaskingrule';}return this.apiClient.callApi('/api/v2/dataprivacy/maskingrules/{ruleId}','GET',{'ruleId':ruleId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6094
+ * Retrieve the list of masking rules.
6095
+ *
6096
+ */},{key:"getDataprivacyMaskingrules",value:function getDataprivacyMaskingrules(){return this.apiClient.callApi('/api/v2/dataprivacy/maskingrules','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6097
+ * Update information about a masking rule.
6098
+ *
6099
+ * @param {String} ruleId ruleId
6100
+ * @param {Object} opts Optional parameters
6101
+ * @param {Object} opts.body
6102
+ */},{key:"patchDataprivacyMaskingrule",value:function patchDataprivacyMaskingrule(ruleId,opts){opts=opts||{};// verify the required parameter 'ruleId' is set
6103
+ if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "ruleId" when calling patchDataprivacyMaskingrule';}return this.apiClient.callApi('/api/v2/dataprivacy/maskingrules/{ruleId}','PATCH',{'ruleId':ruleId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}/**
6104
+ * Create a new masking rule resource.
6105
+ *
6106
+ * @param {Object} body Details for creating masking rule resource
6107
+ */},{key:"postDataprivacyMaskingrules",value:function postDataprivacyMaskingrules(body){// verify the required parameter 'body' is set
6108
+ if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postDataprivacyMaskingrules';}return this.apiClient.callApi('/api/v2/dataprivacy/maskingrules','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6109
+ * Validate masking before creating.
6110
+ *
6111
+ * @param {Object} body Text to be masked
6112
+ */},{key:"postDataprivacyMaskingrulesValidate",value:function postDataprivacyMaskingrulesValidate(body){// verify the required parameter 'body' is set
6113
+ if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postDataprivacyMaskingrulesValidate';}return this.apiClient.callApi('/api/v2/dataprivacy/maskingrules/validate','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var DownloadsApi=/*#__PURE__*/function(){/**
6054
6114
  * Downloads service.
6055
6115
  * @module purecloud-platform-client-v2/api/DownloadsApi
6056
- * @version 209.0.0
6116
+ * @version 211.0.0
6057
6117
  *//**
6058
6118
  * Constructs a new DownloadsApi.
6059
6119
  * @alias module:purecloud-platform-client-v2/api/DownloadsApi
@@ -6072,7 +6132,7 @@ if(coretypeName===undefined||coretypeName===null){throw'Missing the required par
6072
6132
  if(downloadId===undefined||downloadId===null){throw'Missing the required parameter "downloadId" when calling getDownload';}return this.apiClient.callApi('/api/v2/downloads/{downloadId}','GET',{'downloadId':downloadId},{'contentDisposition':opts['contentDisposition'],'issueRedirect':opts['issueRedirect'],'redirectToAuth':opts['redirectToAuth']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var EmailsApi=/*#__PURE__*/function(){/**
6073
6133
  * Emails service.
6074
6134
  * @module purecloud-platform-client-v2/api/EmailsApi
6075
- * @version 209.0.0
6135
+ * @version 211.0.0
6076
6136
  *//**
6077
6137
  * Constructs a new EmailsApi.
6078
6138
  * @alias module:purecloud-platform-client-v2/api/EmailsApi
@@ -6090,7 +6150,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
6090
6150
  */},{key:"patchEmailsSettings",value:function patchEmailsSettings(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/emails/settings','PATCH',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var EmployeeEngagementApi=/*#__PURE__*/function(){/**
6091
6151
  * EmployeeEngagement service.
6092
6152
  * @module purecloud-platform-client-v2/api/EmployeeEngagementApi
6093
- * @version 209.0.0
6153
+ * @version 211.0.0
6094
6154
  *//**
6095
6155
  * Constructs a new EmployeeEngagementApi.
6096
6156
  * @alias module:purecloud-platform-client-v2/api/EmployeeEngagementApi
@@ -6128,7 +6188,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
6128
6188
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postEmployeeengagementRecognitions';}return this.apiClient.callApi('/api/v2/employeeengagement/recognitions','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var EventsApi=/*#__PURE__*/function(){/**
6129
6189
  * Events service.
6130
6190
  * @module purecloud-platform-client-v2/api/EventsApi
6131
- * @version 209.0.0
6191
+ * @version 211.0.0
6132
6192
  *//**
6133
6193
  * Constructs a new EventsApi.
6134
6194
  * @alias module:purecloud-platform-client-v2/api/EventsApi
@@ -6153,7 +6213,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
6153
6213
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postEventsUsersRoutingstatus';}return this.apiClient.callApi('/api/v2/events/users/routingstatus','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ExternalContactsApi=/*#__PURE__*/function(){/**
6154
6214
  * ExternalContacts service.
6155
6215
  * @module purecloud-platform-client-v2/api/ExternalContactsApi
6156
- * @version 209.0.0
6216
+ * @version 211.0.0
6157
6217
  *//**
6158
6218
  * Constructs a new ExternalContactsApi.
6159
6219
  * @alias module:purecloud-platform-client-v2/api/ExternalContactsApi
@@ -6188,6 +6248,11 @@ if(externalSourceId===undefined||externalSourceId===null){throw'Missing the requ
6188
6248
  * @param {String} settingsId Settings id
6189
6249
  */},{key:"deleteExternalcontactsImportCsvSetting",value:function deleteExternalcontactsImportCsvSetting(settingsId){// verify the required parameter 'settingsId' is set
6190
6250
  if(settingsId===undefined||settingsId===null){throw'Missing the required parameter "settingsId" when calling deleteExternalcontactsImportCsvSetting';}return this.apiClient.callApi('/api/v2/externalcontacts/import/csv/settings/{settingsId}','DELETE',{'settingsId':settingsId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6251
+ * Delete Settings
6252
+ *
6253
+ * @param {String} settingsId Settings id
6254
+ */},{key:"deleteExternalcontactsImportSetting",value:function deleteExternalcontactsImportSetting(settingsId){// verify the required parameter 'settingsId' is set
6255
+ if(settingsId===undefined||settingsId===null){throw'Missing the required parameter "settingsId" when calling deleteExternalcontactsImportSetting';}return this.apiClient.callApi('/api/v2/externalcontacts/import/settings/{settingsId}','DELETE',{'settingsId':settingsId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6191
6256
  * Delete an external organization
6192
6257
  *
6193
6258
  * @param {String} externalOrganizationId External Organization ID
@@ -6321,6 +6386,32 @@ if(uploadId===undefined||uploadId===null){throw'Missing the required parameter "
6321
6386
  * @param {String} uploadId Upload id
6322
6387
  */},{key:"getExternalcontactsImportCsvUploadPreview",value:function getExternalcontactsImportCsvUploadPreview(uploadId){// verify the required parameter 'uploadId' is set
6323
6388
  if(uploadId===undefined||uploadId===null){throw'Missing the required parameter "uploadId" when calling getExternalcontactsImportCsvUploadPreview';}return this.apiClient.callApi('/api/v2/externalcontacts/import/csv/uploads/{uploadId}/preview','GET',{'uploadId':uploadId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6389
+ * Get job based on id
6390
+ *
6391
+ * @param {String} jobId Job id
6392
+ */},{key:"getExternalcontactsImportJob",value:function getExternalcontactsImportJob(jobId){// verify the required parameter 'jobId' is set
6393
+ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId" when calling getExternalcontactsImportJob';}return this.apiClient.callApi('/api/v2/externalcontacts/import/jobs/{jobId}','GET',{'jobId':jobId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6394
+ * List jobs for organization
6395
+ *
6396
+ * @param {Object} opts Optional parameters
6397
+ * @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
6398
+ * @param {String} opts.pageSize Number of entities to return. Maximum of 100. (default to 25)
6399
+ * @param {Object} opts.sortOrder Direction of sorting. (default to Ascending)
6400
+ * @param {Object} opts.jobStatus Search term to filter by jobStatus
6401
+ */},{key:"getExternalcontactsImportJobs",value:function getExternalcontactsImportJobs(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/externalcontacts/import/jobs','GET',{},{'after':opts['after'],'pageSize':opts['pageSize'],'sortOrder':opts['sortOrder'],'jobStatus':opts['jobStatus']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6402
+ * Get setting based on id
6403
+ *
6404
+ * @param {String} settingsId Settings id
6405
+ */},{key:"getExternalcontactsImportSetting",value:function getExternalcontactsImportSetting(settingsId){// verify the required parameter 'settingsId' is set
6406
+ if(settingsId===undefined||settingsId===null){throw'Missing the required parameter "settingsId" when calling getExternalcontactsImportSetting';}return this.apiClient.callApi('/api/v2/externalcontacts/import/settings/{settingsId}','GET',{'settingsId':settingsId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6407
+ * List settings for organization
6408
+ *
6409
+ * @param {Object} opts Optional parameters
6410
+ * @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
6411
+ * @param {String} opts.pageSize Number of entities to return. Maximum of 100. (default to 25)
6412
+ * @param {Object} opts.sortOrder Direction of sorting. (default to Ascending)
6413
+ * @param {String} opts.name Search term to filter by settings name
6414
+ */},{key:"getExternalcontactsImportSettings",value:function getExternalcontactsImportSettings(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/externalcontacts/import/settings','GET',{},{'after':opts['after'],'pageSize':opts['pageSize'],'sortOrder':opts['sortOrder'],'name':opts['name']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6324
6415
  * Fetch an external organization
6325
6416
  *
6326
6417
  * @param {String} externalOrganizationId External Organization ID
@@ -6579,6 +6670,16 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
6579
6670
  * @param {Object} body UploadRequest
6580
6671
  */},{key:"postExternalcontactsImportCsvUploads",value:function postExternalcontactsImportCsvUploads(body){// verify the required parameter 'body' is set
6581
6672
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postExternalcontactsImportCsvUploads';}return this.apiClient.callApi('/api/v2/externalcontacts/import/csv/uploads','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6673
+ * Create a new job
6674
+ *
6675
+ * @param {Object} body Job
6676
+ */},{key:"postExternalcontactsImportJobs",value:function postExternalcontactsImportJobs(body){// verify the required parameter 'body' is set
6677
+ if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postExternalcontactsImportJobs';}return this.apiClient.callApi('/api/v2/externalcontacts/import/jobs','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6678
+ * Create a new settings
6679
+ *
6680
+ * @param {Object} body Setting
6681
+ */},{key:"postExternalcontactsImportSettings",value:function postExternalcontactsImportSettings(body){// verify the required parameter 'body' is set
6682
+ if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postExternalcontactsImportSettings';}return this.apiClient.callApi('/api/v2/externalcontacts/import/settings','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6582
6683
  * Merge two contacts into a new contact record
6583
6684
  * Two curated contacts cannot be merged. Refer to the Contact Merging article on the Developer Center for details
6584
6685
  * @param {Object} body MergeRequest
@@ -6650,6 +6751,20 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
6650
6751
  */},{key:"putExternalcontactsImportCsvSetting",value:function putExternalcontactsImportCsvSetting(settingsId,body){// verify the required parameter 'settingsId' is set
6651
6752
  if(settingsId===undefined||settingsId===null){throw'Missing the required parameter "settingsId" when calling putExternalcontactsImportCsvSetting';}// verify the required parameter 'body' is set
6652
6753
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putExternalcontactsImportCsvSetting';}return this.apiClient.callApi('/api/v2/externalcontacts/import/csv/settings/{settingsId}','PUT',{'settingsId':settingsId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6754
+ * Update Job's workflow status
6755
+ *
6756
+ * @param {String} jobId Job id
6757
+ * @param {Object} body Status of the Job's workflow
6758
+ */},{key:"putExternalcontactsImportJob",value:function putExternalcontactsImportJob(jobId,body){// verify the required parameter 'jobId' is set
6759
+ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId" when calling putExternalcontactsImportJob';}// verify the required parameter 'body' is set
6760
+ if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putExternalcontactsImportJob';}return this.apiClient.callApi('/api/v2/externalcontacts/import/jobs/{jobId}','PUT',{'jobId':jobId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6761
+ * Update settings
6762
+ *
6763
+ * @param {String} settingsId Settings id
6764
+ * @param {Object} body Setting
6765
+ */},{key:"putExternalcontactsImportSetting",value:function putExternalcontactsImportSetting(settingsId,body){// verify the required parameter 'settingsId' is set
6766
+ if(settingsId===undefined||settingsId===null){throw'Missing the required parameter "settingsId" when calling putExternalcontactsImportSetting';}// verify the required parameter 'body' is set
6767
+ if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putExternalcontactsImportSetting';}return this.apiClient.callApi('/api/v2/externalcontacts/import/settings/{settingsId}','PUT',{'settingsId':settingsId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
6653
6768
  * Update an external organization
6654
6769
  *
6655
6770
  * @param {String} externalOrganizationId External Organization ID
@@ -6689,7 +6804,7 @@ if(relationshipId===undefined||relationshipId===null){throw'Missing the required
6689
6804
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putExternalcontactsRelationship';}return this.apiClient.callApi('/api/v2/externalcontacts/relationships/{relationshipId}','PUT',{'relationshipId':relationshipId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var FaxApi=/*#__PURE__*/function(){/**
6690
6805
  * Fax service.
6691
6806
  * @module purecloud-platform-client-v2/api/FaxApi
6692
- * @version 209.0.0
6807
+ * @version 211.0.0
6693
6808
  *//**
6694
6809
  * Constructs a new FaxApi.
6695
6810
  * @alias module:purecloud-platform-client-v2/api/FaxApi
@@ -6738,7 +6853,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
6738
6853
  */},{key:"putFaxSettings",value:function putFaxSettings(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/fax/settings','PUT',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var FlowsApi=/*#__PURE__*/function(){/**
6739
6854
  * Flows service.
6740
6855
  * @module purecloud-platform-client-v2/api/FlowsApi
6741
- * @version 209.0.0
6856
+ * @version 211.0.0
6742
6857
  *//**
6743
6858
  * Constructs a new FlowsApi.
6744
6859
  * @alias module:purecloud-platform-client-v2/api/FlowsApi
@@ -6786,7 +6901,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
6786
6901
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAnalyticsFlowsObservationsQuery';}return this.apiClient.callApi('/api/v2/analytics/flows/observations/query','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var GamificationApi=/*#__PURE__*/function(){/**
6787
6902
  * Gamification service.
6788
6903
  * @module purecloud-platform-client-v2/api/GamificationApi
6789
- * @version 209.0.0
6904
+ * @version 211.0.0
6790
6905
  *//**
6791
6906
  * Constructs a new GamificationApi.
6792
6907
  * @alias module:purecloud-platform-client-v2/api/GamificationApi
@@ -7326,7 +7441,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
7326
7441
  if(status===undefined||status===null){throw'Missing the required parameter "status" when calling putGamificationStatus';}return this.apiClient.callApi('/api/v2/gamification/status','PUT',{},{},{},{},status,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var GeneralDataProtectionRegulationApi=/*#__PURE__*/function(){/**
7327
7442
  * GeneralDataProtectionRegulation service.
7328
7443
  * @module purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
7329
- * @version 209.0.0
7444
+ * @version 211.0.0
7330
7445
  *//**
7331
7446
  * Constructs a new GeneralDataProtectionRegulationApi.
7332
7447
  * @alias module:purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
@@ -7361,7 +7476,7 @@ if(searchValue===undefined||searchValue===null){throw'Missing the required param
7361
7476
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postGdprRequests';}return this.apiClient.callApi('/api/v2/gdpr/requests','POST',{},{'deleteConfirmed':opts['deleteConfirmed']},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var GeolocationApi=/*#__PURE__*/function(){/**
7362
7477
  * Geolocation service.
7363
7478
  * @module purecloud-platform-client-v2/api/GeolocationApi
7364
- * @version 209.0.0
7479
+ * @version 211.0.0
7365
7480
  *//**
7366
7481
  * Constructs a new GeolocationApi.
7367
7482
  * @alias module:purecloud-platform-client-v2/api/GeolocationApi
@@ -7395,7 +7510,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
7395
7510
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling patchUserGeolocation';}return this.apiClient.callApi('/api/v2/users/{userId}/geolocations/{clientId}','PATCH',{'userId':userId,'clientId':clientId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var GreetingsApi=/*#__PURE__*/function(){/**
7396
7511
  * Greetings service.
7397
7512
  * @module purecloud-platform-client-v2/api/GreetingsApi
7398
- * @version 209.0.0
7513
+ * @version 211.0.0
7399
7514
  *//**
7400
7515
  * Constructs a new GreetingsApi.
7401
7516
  * @alias module:purecloud-platform-client-v2/api/GreetingsApi
@@ -7502,7 +7617,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
7502
7617
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUserGreetingsDefaults';}return this.apiClient.callApi('/api/v2/users/{userId}/greetings/defaults','PUT',{'userId':userId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var GroupsApi=/*#__PURE__*/function(){/**
7503
7618
  * Groups service.
7504
7619
  * @module purecloud-platform-client-v2/api/GroupsApi
7505
- * @version 209.0.0
7620
+ * @version 211.0.0
7506
7621
  *//**
7507
7622
  * Constructs a new GroupsApi.
7508
7623
  * @alias module:purecloud-platform-client-v2/api/GroupsApi
@@ -7635,7 +7750,7 @@ if(groupId===undefined||groupId===null){throw'Missing the required parameter "gr
7635
7750
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putGroupDynamicsettings';}return this.apiClient.callApi('/api/v2/groups/{groupId}/dynamicsettings','PUT',{'groupId':groupId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var IdentityProviderApi=/*#__PURE__*/function(){/**
7636
7751
  * IdentityProvider service.
7637
7752
  * @module purecloud-platform-client-v2/api/IdentityProviderApi
7638
- * @version 209.0.0
7753
+ * @version 211.0.0
7639
7754
  *//**
7640
7755
  * Constructs a new IdentityProviderApi.
7641
7756
  * @alias module:purecloud-platform-client-v2/api/IdentityProviderApi
@@ -7791,7 +7906,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
7791
7906
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putIdentityprovidersSalesforce';}return this.apiClient.callApi('/api/v2/identityproviders/salesforce','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var InfrastructureAsCodeApi=/*#__PURE__*/function(){/**
7792
7907
  * InfrastructureAsCode service.
7793
7908
  * @module purecloud-platform-client-v2/api/InfrastructureAsCodeApi
7794
- * @version 209.0.0
7909
+ * @version 211.0.0
7795
7910
  *//**
7796
7911
  * Constructs a new InfrastructureAsCodeApi.
7797
7912
  * @alias module:purecloud-platform-client-v2/api/InfrastructureAsCodeApi
@@ -7845,7 +7960,7 @@ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId"
7845
7960
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postInfrastructureascodeJobs';}return this.apiClient.callApi('/api/v2/infrastructureascode/jobs','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var IntegrationsApi=/*#__PURE__*/function(){/**
7846
7961
  * Integrations service.
7847
7962
  * @module purecloud-platform-client-v2/api/IntegrationsApi
7848
- * @version 209.0.0
7963
+ * @version 211.0.0
7849
7964
  *//**
7850
7965
  * Constructs a new IntegrationsApi.
7851
7966
  * @alias module:purecloud-platform-client-v2/api/IntegrationsApi
@@ -8480,7 +8595,7 @@ if(ucIntegrationId===undefined||ucIntegrationId===null){throw'Missing the requir
8480
8595
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putIntegrationsUnifiedcommunicationThirdpartypresences';}return this.apiClient.callApi('/api/v2/integrations/unifiedcommunications/{ucIntegrationId}/thirdpartypresences','PUT',{'ucIntegrationId':ucIntegrationId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var JourneyApi=/*#__PURE__*/function(){/**
8481
8596
  * Journey service.
8482
8597
  * @module purecloud-platform-client-v2/api/JourneyApi
8483
- * @version 209.0.0
8598
+ * @version 211.0.0
8484
8599
  *//**
8485
8600
  * Constructs a new JourneyApi.
8486
8601
  * @alias module:purecloud-platform-client-v2/api/JourneyApi
@@ -8521,7 +8636,7 @@ if(segmentId===undefined||segmentId===null){throw'Missing the required parameter
8521
8636
  */},{key:"deleteJourneyView",value:function deleteJourneyView(viewId){// verify the required parameter 'viewId' is set
8522
8637
  if(viewId===undefined||viewId===null){throw'Missing the required parameter "viewId" when calling deleteJourneyView';}return this.apiClient.callApi('/api/v2/journey/views/{viewId}','DELETE',{'viewId':viewId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
8523
8638
  * Delete the Schedule of a JourneyView
8524
- * used for long descriptions
8639
+ *
8525
8640
  * @param {String} viewId Journey View Id
8526
8641
  */},{key:"deleteJourneyViewSchedules",value:function deleteJourneyViewSchedules(viewId){// verify the required parameter 'viewId' is set
8527
8642
  if(viewId===undefined||viewId===null){throw'Missing the required parameter "viewId" when calling deleteJourneyViewSchedules';}return this.apiClient.callApi('/api/v2/journey/views/{viewId}/schedules','DELETE',{'viewId':viewId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
@@ -8691,7 +8806,7 @@ if(sessionId===undefined||sessionId===null){throw'Missing the required parameter
8691
8806
  */},{key:"getJourneyView",value:function getJourneyView(viewId){// verify the required parameter 'viewId' is set
8692
8807
  if(viewId===undefined||viewId===null){throw'Missing the required parameter "viewId" when calling getJourneyView';}return this.apiClient.callApi('/api/v2/journey/views/{viewId}','GET',{'viewId':viewId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
8693
8808
  * Get the Schedule for a JourneyView
8694
- * used for long descriptions
8809
+ *
8695
8810
  * @param {String} viewId Journey View Id
8696
8811
  */},{key:"getJourneyViewSchedules",value:function getJourneyViewSchedules(viewId){// verify the required parameter 'viewId' is set
8697
8812
  if(viewId===undefined||viewId===null){throw'Missing the required parameter "viewId" when calling getJourneyViewSchedules';}return this.apiClient.callApi('/api/v2/journey/views/{viewId}/schedules','GET',{'viewId':viewId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
@@ -8723,7 +8838,7 @@ if(journeyViewVersion===undefined||journeyViewVersion===null){throw'Missing the
8723
8838
  if(chartId===undefined||chartId===null){throw'Missing the required parameter "chartId" when calling getJourneyViewVersionChartVersion';}// verify the required parameter 'chartVersion' is set
8724
8839
  if(chartVersion===undefined||chartVersion===null){throw'Missing the required parameter "chartVersion" when calling getJourneyViewVersionChartVersion';}return this.apiClient.callApi('/api/v2/journey/views/{viewId}/versions/{journeyViewVersion}/charts/{chartId}/versions/{chartVersion}','GET',{'viewId':viewId,'journeyViewVersion':journeyViewVersion,'chartId':chartId,'chartVersion':chartVersion},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
8725
8840
  * Get the job for a journey view version.
8726
- * used for long descriptions
8841
+ *
8727
8842
  * @param {String} viewId Journey View Id
8728
8843
  * @param {String} journeyVersionId Journey View Version
8729
8844
  * @param {String} jobId JobId
@@ -8732,7 +8847,7 @@ if(viewId===undefined||viewId===null){throw'Missing the required parameter "view
8732
8847
  if(journeyVersionId===undefined||journeyVersionId===null){throw'Missing the required parameter "journeyVersionId" when calling getJourneyViewVersionJob';}// verify the required parameter 'jobId' is set
8733
8848
  if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId" when calling getJourneyViewVersionJob';}return this.apiClient.callApi('/api/v2/journey/views/{viewId}/versions/{journeyVersionId}/jobs/{jobId}','GET',{'viewId':viewId,'journeyVersionId':journeyVersionId,'jobId':jobId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
8734
8849
  * Get the result of a job for a journey view version.
8735
- * used for long descriptions
8850
+ *
8736
8851
  * @param {String} viewId JourneyViewResult id
8737
8852
  * @param {String} journeyViewVersion Journey View Version
8738
8853
  * @param {String} jobId Id of the executing job
@@ -8752,7 +8867,7 @@ if(journeyVersionId===undefined||journeyVersionId===null){throw'Missing the requ
8752
8867
  if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId" when calling getJourneyViewVersionJobResultsChart';}// verify the required parameter 'chartId' is set
8753
8868
  if(chartId===undefined||chartId===null){throw'Missing the required parameter "chartId" when calling getJourneyViewVersionJobResultsChart';}return this.apiClient.callApi('/api/v2/journey/views/{viewId}/versions/{journeyVersionId}/jobs/{jobId}/results/charts/{chartId}','GET',{'viewId':viewId,'journeyVersionId':journeyVersionId,'jobId':jobId,'chartId':chartId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
8754
8869
  * Get the latest job of a journey view version.
8755
- * used for long descriptions
8870
+ *
8756
8871
  * @param {String} viewId Journey View Id
8757
8872
  * @param {String} journeyVersionId Journey View Version
8758
8873
  */},{key:"getJourneyViewVersionJobsLatest",value:function getJourneyViewVersionJobsLatest(viewId,journeyVersionId){// verify the required parameter 'viewId' is set
@@ -8825,7 +8940,7 @@ if(outcomeId===undefined||outcomeId===null){throw'Missing the required parameter
8825
8940
  */},{key:"patchJourneySegment",value:function patchJourneySegment(segmentId,opts){opts=opts||{};// verify the required parameter 'segmentId' is set
8826
8941
  if(segmentId===undefined||segmentId===null){throw'Missing the required parameter "segmentId" when calling patchJourneySegment';}return this.apiClient.callApi('/api/v2/journey/segments/{segmentId}','PATCH',{'segmentId':segmentId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}/**
8827
8942
  * Update the job for a journey view version. Only the status can be changed and only to Cancelled
8828
- * used for long descriptions
8943
+ *
8829
8944
  * @param {String} viewId Journey View Id
8830
8945
  * @param {String} journeyVersionId Journey View Version
8831
8946
  * @param {String} jobId JobId
@@ -8916,7 +9031,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
8916
9031
  if(viewId===undefined||viewId===null){throw'Missing the required parameter "viewId" when calling postJourneyViewSchedules';}// verify the required parameter 'body' is set
8917
9032
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postJourneyViewSchedules';}return this.apiClient.callApi('/api/v2/journey/views/{viewId}/schedules','POST',{'viewId':viewId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
8918
9033
  * Submit a job request for a journey view version.
8919
- * used for long descriptions
9034
+ *
8920
9035
  * @param {String} viewId Journey View Id
8921
9036
  * @param {String} journeyVersionId Journey View Version
8922
9037
  */},{key:"postJourneyViewVersionJobs",value:function postJourneyViewVersionJobs(viewId,journeyVersionId){// verify the required parameter 'viewId' is set
@@ -8940,7 +9055,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
8940
9055
  * @param {Array.<Object>} opts.body
8941
9056
  */},{key:"postJourneyViewsEncodingsValidate",value:function postJourneyViewsEncodingsValidate(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/journey/views/encodings/validate','POST',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}/**
8942
9057
  * Update the Schedule for a JourneyView
8943
- * used for long descriptions
9058
+ *
8944
9059
  * @param {String} viewId Journey View Id
8945
9060
  * @param {Object} body journeyViewSchedule
8946
9061
  */},{key:"putJourneyViewSchedules",value:function putJourneyViewSchedules(viewId,body){// verify the required parameter 'viewId' is set
@@ -8957,7 +9072,7 @@ if(versionId===undefined||versionId===null){throw'Missing the required parameter
8957
9072
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putJourneyViewVersion';}return this.apiClient.callApi('/api/v2/journey/views/{viewId}/versions/{versionId}','PUT',{'viewId':viewId,'versionId':versionId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var KnowledgeApi=/*#__PURE__*/function(){/**
8958
9073
  * Knowledge service.
8959
9074
  * @module purecloud-platform-client-v2/api/KnowledgeApi
8960
- * @version 209.0.0
9075
+ * @version 211.0.0
8961
9076
  *//**
8962
9077
  * Constructs a new KnowledgeApi.
8963
9078
  * @alias module:purecloud-platform-client-v2/api/KnowledgeApi
@@ -10027,7 +10142,7 @@ if(sourceId===undefined||sourceId===null){throw'Missing the required parameter "
10027
10142
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putKnowledgeKnowledgebaseSourcesServicenowSourceId';}return this.apiClient.callApi('/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/sources/servicenow/{sourceId}','PUT',{'knowledgeBaseId':knowledgeBaseId,'sourceId':sourceId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LanguageUnderstandingApi=/*#__PURE__*/function(){/**
10028
10143
  * LanguageUnderstanding service.
10029
10144
  * @module purecloud-platform-client-v2/api/LanguageUnderstandingApi
10030
- * @version 209.0.0
10145
+ * @version 211.0.0
10031
10146
  *//**
10032
10147
  * Constructs a new LanguageUnderstandingApi.
10033
10148
  * @alias module:purecloud-platform-client-v2/api/LanguageUnderstandingApi
@@ -10287,7 +10402,7 @@ if(domainVersionId===undefined||domainVersionId===null){throw'Missing the requir
10287
10402
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putLanguageunderstandingDomainVersion';}return this.apiClient.callApi('/api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}','PUT',{'domainId':domainId,'domainVersionId':domainVersionId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LanguagesApi=/*#__PURE__*/function(){/**
10288
10403
  * Languages service.
10289
10404
  * @module purecloud-platform-client-v2/api/LanguagesApi
10290
- * @version 209.0.0
10405
+ * @version 211.0.0
10291
10406
  *//**
10292
10407
  * Constructs a new LanguagesApi.
10293
10408
  * @alias module:purecloud-platform-client-v2/api/LanguagesApi
@@ -10342,7 +10457,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
10342
10457
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postLanguages';}return this.apiClient.callApi('/api/v2/languages','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LearningApi=/*#__PURE__*/function(){/**
10343
10458
  * Learning service.
10344
10459
  * @module purecloud-platform-client-v2/api/LearningApi
10345
- * @version 209.0.0
10460
+ * @version 211.0.0
10346
10461
  *//**
10347
10462
  * Constructs a new LearningApi.
10348
10463
  * @alias module:purecloud-platform-client-v2/api/LearningApi
@@ -10613,7 +10728,7 @@ if(moduleId===undefined||moduleId===null){throw'Missing the required parameter "
10613
10728
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putLearningModuleRule';}return this.apiClient.callApi('/api/v2/learning/modules/{moduleId}/rule','PUT',{'moduleId':moduleId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LicenseApi=/*#__PURE__*/function(){/**
10614
10729
  * License service.
10615
10730
  * @module purecloud-platform-client-v2/api/LicenseApi
10616
- * @version 209.0.0
10731
+ * @version 211.0.0
10617
10732
  *//**
10618
10733
  * Constructs a new LicenseApi.
10619
10734
  * @alias module:purecloud-platform-client-v2/api/LicenseApi
@@ -10667,7 +10782,7 @@ if(featureName===undefined||featureName===null){throw'Missing the required param
10667
10782
  */},{key:"postLicenseUsers",value:function postLicenseUsers(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/license/users','POST',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LocationsApi=/*#__PURE__*/function(){/**
10668
10783
  * Locations service.
10669
10784
  * @module purecloud-platform-client-v2/api/LocationsApi
10670
- * @version 209.0.0
10785
+ * @version 211.0.0
10671
10786
  *//**
10672
10787
  * Constructs a new LocationsApi.
10673
10788
  * @alias module:purecloud-platform-client-v2/api/LocationsApi
@@ -10726,7 +10841,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
10726
10841
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postLocationsSearch';}return this.apiClient.callApi('/api/v2/locations/search','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LogCaptureApi=/*#__PURE__*/function(){/**
10727
10842
  * LogCapture service.
10728
10843
  * @module purecloud-platform-client-v2/api/LogCaptureApi
10729
- * @version 209.0.0
10844
+ * @version 211.0.0
10730
10845
  *//**
10731
10846
  * Constructs a new LogCaptureApi.
10732
10847
  * @alias module:purecloud-platform-client-v2/api/LogCaptureApi
@@ -10776,7 +10891,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
10776
10891
  if(userId===undefined||userId===null){throw'Missing the required parameter "userId" when calling postDiagnosticsLogcaptureBrowserUser';}return this.apiClient.callApi('/api/v2/diagnostics/logcapture/browser/users/{userId}','POST',{'userId':userId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var MessagingApi=/*#__PURE__*/function(){/**
10777
10892
  * Messaging service.
10778
10893
  * @module purecloud-platform-client-v2/api/MessagingApi
10779
- * @version 209.0.0
10894
+ * @version 211.0.0
10780
10895
  *//**
10781
10896
  * Constructs a new MessagingApi.
10782
10897
  * @alias module:purecloud-platform-client-v2/api/MessagingApi
@@ -10866,7 +10981,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
10866
10981
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putMessagingSettingsDefault';}return this.apiClient.callApi('/api/v2/messaging/settings/default','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var MobileDevicesApi=/*#__PURE__*/function(){/**
10867
10982
  * MobileDevices service.
10868
10983
  * @module purecloud-platform-client-v2/api/MobileDevicesApi
10869
- * @version 209.0.0
10984
+ * @version 211.0.0
10870
10985
  *//**
10871
10986
  * Constructs a new MobileDevicesApi.
10872
10987
  * @alias module:purecloud-platform-client-v2/api/MobileDevicesApi
@@ -10905,7 +11020,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
10905
11020
  if(deviceId===undefined||deviceId===null){throw'Missing the required parameter "deviceId" when calling putMobiledevice';}return this.apiClient.callApi('/api/v2/mobiledevices/{deviceId}','PUT',{'deviceId':deviceId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var NotificationsApi=/*#__PURE__*/function(){/**
10906
11021
  * Notifications service.
10907
11022
  * @module purecloud-platform-client-v2/api/NotificationsApi
10908
- * @version 209.0.0
11023
+ * @version 211.0.0
10909
11024
  *//**
10910
11025
  * Constructs a new NotificationsApi.
10911
11026
  * @alias module:purecloud-platform-client-v2/api/NotificationsApi
@@ -10962,7 +11077,7 @@ if(channelId===undefined||channelId===null){throw'Missing the required parameter
10962
11077
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putNotificationsChannelSubscriptions';}return this.apiClient.callApi('/api/v2/notifications/channels/{channelId}/subscriptions','PUT',{'channelId':channelId},{'ignoreErrors':opts['ignoreErrors']},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var OAuthApi=/*#__PURE__*/function(){/**
10963
11078
  * OAuth service.
10964
11079
  * @module purecloud-platform-client-v2/api/OAuthApi
10965
- * @version 209.0.0
11080
+ * @version 211.0.0
10966
11081
  *//**
10967
11082
  * Constructs a new OAuthApi.
10968
11083
  * @alias module:purecloud-platform-client-v2/api/OAuthApi
@@ -11047,7 +11162,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
11047
11162
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putOauthClient';}return this.apiClient.callApi('/api/v2/oauth/clients/{clientId}','PUT',{'clientId':clientId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ObjectsApi=/*#__PURE__*/function(){/**
11048
11163
  * Objects service.
11049
11164
  * @module purecloud-platform-client-v2/api/ObjectsApi
11050
- * @version 209.0.0
11165
+ * @version 211.0.0
11051
11166
  *//**
11052
11167
  * Constructs a new ObjectsApi.
11053
11168
  * @alias module:purecloud-platform-client-v2/api/ObjectsApi
@@ -11118,7 +11233,7 @@ if(divisionId===undefined||divisionId===null){throw'Missing the required paramet
11118
11233
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAuthorizationDivision';}return this.apiClient.callApi('/api/v2/authorization/divisions/{divisionId}','PUT',{'divisionId':divisionId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var OperationalEventsApi=/*#__PURE__*/function(){/**
11119
11234
  * OperationalEvents service.
11120
11235
  * @module purecloud-platform-client-v2/api/OperationalEventsApi
11121
- * @version 209.0.0
11236
+ * @version 211.0.0
11122
11237
  *//**
11123
11238
  * Constructs a new OperationalEventsApi.
11124
11239
  * @alias module:purecloud-platform-client-v2/api/OperationalEventsApi
@@ -11149,7 +11264,7 @@ if(eventDefinitionId===undefined||eventDefinitionId===null){throw'Missing the re
11149
11264
  */},{key:"postUsageEventsQuery",value:function postUsageEventsQuery(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/usage/events/query','POST',{},{'before':opts['before'],'after':opts['after'],'pageSize':opts['pageSize']},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var OrganizationApi=/*#__PURE__*/function(){/**
11150
11265
  * Organization service.
11151
11266
  * @module purecloud-platform-client-v2/api/OrganizationApi
11152
- * @version 209.0.0
11267
+ * @version 211.0.0
11153
11268
  *//**
11154
11269
  * Constructs a new OrganizationApi.
11155
11270
  * @alias module:purecloud-platform-client-v2/api/OrganizationApi
@@ -11274,7 +11389,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
11274
11389
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putOrganizationsWhitelist';}return this.apiClient.callApi('/api/v2/organizations/whitelist','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var OrganizationAuthorizationApi=/*#__PURE__*/function(){/**
11275
11390
  * OrganizationAuthorization service.
11276
11391
  * @module purecloud-platform-client-v2/api/OrganizationAuthorizationApi
11277
- * @version 209.0.0
11392
+ * @version 211.0.0
11278
11393
  *//**
11279
11394
  * Constructs a new OrganizationAuthorizationApi.
11280
11395
  * @alias module:purecloud-platform-client-v2/api/OrganizationAuthorizationApi
@@ -11608,7 +11723,7 @@ if(trustorOrgId===undefined||trustorOrgId===null){throw'Missing the required par
11608
11723
  if(trusteeUserId===undefined||trusteeUserId===null){throw'Missing the required parameter "trusteeUserId" when calling putOrgauthorizationTrustorUser';}return this.apiClient.callApi('/api/v2/orgauthorization/trustors/{trustorOrgId}/users/{trusteeUserId}','PUT',{'trustorOrgId':trustorOrgId,'trusteeUserId':trusteeUserId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var OutboundApi=/*#__PURE__*/function(){/**
11609
11724
  * Outbound service.
11610
11725
  * @module purecloud-platform-client-v2/api/OutboundApi
11611
- * @version 209.0.0
11726
+ * @version 211.0.0
11612
11727
  *//**
11613
11728
  * Constructs a new OutboundApi.
11614
11729
  * @alias module:purecloud-platform-client-v2/api/OutboundApi
@@ -12715,7 +12830,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
12715
12830
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putOutboundWrapupcodemappings';}return this.apiClient.callApi('/api/v2/outbound/wrapupcodemappings','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var PresenceApi=/*#__PURE__*/function(){/**
12716
12831
  * Presence service.
12717
12832
  * @module purecloud-platform-client-v2/api/PresenceApi
12718
- * @version 209.0.0
12833
+ * @version 211.0.0
12719
12834
  *//**
12720
12835
  * Constructs a new PresenceApi.
12721
12836
  * @alias module:purecloud-platform-client-v2/api/PresenceApi
@@ -12888,7 +13003,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
12888
13003
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUsersPresencesBulk';}return this.apiClient.callApi('/api/v2/users/presences/bulk','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ProcessAutomationApi=/*#__PURE__*/function(){/**
12889
13004
  * ProcessAutomation service.
12890
13005
  * @module purecloud-platform-client-v2/api/ProcessAutomationApi
12891
- * @version 209.0.0
13006
+ * @version 211.0.0
12892
13007
  *//**
12893
13008
  * Constructs a new ProcessAutomationApi.
12894
13009
  * @alias module:purecloud-platform-client-v2/api/ProcessAutomationApi
@@ -12951,7 +13066,7 @@ if(triggerId===undefined||triggerId===null){throw'Missing the required parameter
12951
13066
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putProcessautomationTrigger';}return this.apiClient.callApi('/api/v2/processautomation/triggers/{triggerId}','PUT',{'triggerId':triggerId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var QualityApi=/*#__PURE__*/function(){/**
12952
13067
  * Quality service.
12953
13068
  * @module purecloud-platform-client-v2/api/QualityApi
12954
- * @version 209.0.0
13069
+ * @version 211.0.0
12955
13070
  *//**
12956
13071
  * Constructs a new QualityApi.
12957
13072
  * @alias module:purecloud-platform-client-v2/api/QualityApi
@@ -13430,7 +13545,7 @@ if(customerSurveyUrl===undefined||customerSurveyUrl===null){throw'Missing the re
13430
13545
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putQualitySurveysScorable';}return this.apiClient.callApi('/api/v2/quality/surveys/scorable','PUT',{},{'customerSurveyUrl':customerSurveyUrl},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var RecordingApi=/*#__PURE__*/function(){/**
13431
13546
  * Recording service.
13432
13547
  * @module purecloud-platform-client-v2/api/RecordingApi
13433
- * @version 209.0.0
13548
+ * @version 211.0.0
13434
13549
  *//**
13435
13550
  * Constructs a new RecordingApi.
13436
13551
  * @alias module:purecloud-platform-client-v2/api/RecordingApi
@@ -13842,7 +13957,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
13842
13957
  */},{key:"putRecordingsDeletionprotection",value:function putRecordingsDeletionprotection(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/recordings/deletionprotection','PUT',{},{'protect':opts['protect']},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ResponseManagementApi=/*#__PURE__*/function(){/**
13843
13958
  * ResponseManagement service.
13844
13959
  * @module purecloud-platform-client-v2/api/ResponseManagementApi
13845
- * @version 209.0.0
13960
+ * @version 211.0.0
13846
13961
  *//**
13847
13962
  * Constructs a new ResponseManagementApi.
13848
13963
  * @alias module:purecloud-platform-client-v2/api/ResponseManagementApi
@@ -13963,7 +14078,7 @@ if(responseAssetId===undefined||responseAssetId===null){throw'Missing the requir
13963
14078
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putResponsemanagementResponseasset';}return this.apiClient.callApi('/api/v2/responsemanagement/responseassets/{responseAssetId}','PUT',{'responseAssetId':responseAssetId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var RoutingApi=/*#__PURE__*/function(){/**
13964
14079
  * Routing service.
13965
14080
  * @module purecloud-platform-client-v2/api/RoutingApi
13966
- * @version 209.0.0
14081
+ * @version 211.0.0
13967
14082
  *//**
13968
14083
  * Constructs a new RoutingApi.
13969
14084
  * @alias module:purecloud-platform-client-v2/api/RoutingApi
@@ -14969,7 +15084,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
14969
15084
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUserRoutingskillsBulk';}return this.apiClient.callApi('/api/v2/users/{userId}/routingskills/bulk','PUT',{'userId':userId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SCIMApi=/*#__PURE__*/function(){/**
14970
15085
  * SCIM service.
14971
15086
  * @module purecloud-platform-client-v2/api/SCIMApi
14972
- * @version 209.0.0
15087
+ * @version 211.0.0
14973
15088
  *//**
14974
15089
  * Constructs a new SCIMApi.
14975
15090
  * @alias module:purecloud-platform-client-v2/api/SCIMApi
@@ -15194,7 +15309,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
15194
15309
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putScimV2User';}return this.apiClient.callApi('/api/v2/scim/v2/users/{userId}','PUT',{'userId':userId},{},{'If-Match':opts['ifMatch']},{},body,['PureCloud OAuth'],['application/scim+json','application/json'],['application/scim+json','application/json']);}}]);}();var ScreenRecordingApi=/*#__PURE__*/function(){/**
15195
15310
  * ScreenRecording service.
15196
15311
  * @module purecloud-platform-client-v2/api/ScreenRecordingApi
15197
- * @version 209.0.0
15312
+ * @version 211.0.0
15198
15313
  *//**
15199
15314
  * Constructs a new ScreenRecordingApi.
15200
15315
  * @alias module:purecloud-platform-client-v2/api/ScreenRecordingApi
@@ -15209,7 +15324,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
15209
15324
  */return _createClass(ScreenRecordingApi,[{key:"postScreenrecordingToken",value:function postScreenrecordingToken(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/screenrecording/token','POST',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ScriptsApi=/*#__PURE__*/function(){/**
15210
15325
  * Scripts service.
15211
15326
  * @module purecloud-platform-client-v2/api/ScriptsApi
15212
- * @version 209.0.0
15327
+ * @version 211.0.0
15213
15328
  *//**
15214
15329
  * Constructs a new ScriptsApi.
15215
15330
  * @alias module:purecloud-platform-client-v2/api/ScriptsApi
@@ -15345,7 +15460,7 @@ if(scriptId===undefined||scriptId===null){throw'Missing the required parameter "
15345
15460
  */},{key:"postScriptsPublished",value:function postScriptsPublished(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/scripts/published','POST',{},{'scriptDataVersion':opts['scriptDataVersion']},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SearchApi=/*#__PURE__*/function(){/**
15346
15461
  * Search service.
15347
15462
  * @module purecloud-platform-client-v2/api/SearchApi
15348
- * @version 209.0.0
15463
+ * @version 211.0.0
15349
15464
  *//**
15350
15465
  * Constructs a new SearchApi.
15351
15466
  * @alias module:purecloud-platform-client-v2/api/SearchApi
@@ -15517,7 +15632,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
15517
15632
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postVoicemailSearch';}return this.apiClient.callApi('/api/v2/voicemail/search','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SettingsApi=/*#__PURE__*/function(){/**
15518
15633
  * Settings service.
15519
15634
  * @module purecloud-platform-client-v2/api/SettingsApi
15520
- * @version 209.0.0
15635
+ * @version 211.0.0
15521
15636
  *//**
15522
15637
  * Constructs a new SettingsApi.
15523
15638
  * @alias module:purecloud-platform-client-v2/api/SettingsApi
@@ -15567,7 +15682,7 @@ if(agentId===undefined||agentId===null){throw'Missing the required parameter "ag
15567
15682
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUsersAgentuiAgentsAutoanswerAgentIdSettings';}return this.apiClient.callApi('/api/v2/users/agentui/agents/autoanswer/{agentId}/settings','PUT',{'agentId':agentId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SocialMediaApi=/*#__PURE__*/function(){/**
15568
15683
  * SocialMedia service.
15569
15684
  * @module purecloud-platform-client-v2/api/SocialMediaApi
15570
- * @version 209.0.0
15685
+ * @version 211.0.0
15571
15686
  *//**
15572
15687
  * Constructs a new SocialMediaApi.
15573
15688
  * @alias module:purecloud-platform-client-v2/api/SocialMediaApi
@@ -15832,7 +15947,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
15832
15947
  if(twitterIngestionRuleId===undefined||twitterIngestionRuleId===null){throw'Missing the required parameter "twitterIngestionRuleId" when calling putSocialmediaTopicDataingestionrulesTwitterTwitterIngestionRuleId';}return this.apiClient.callApi('/api/v2/socialmedia/topics/{topicId}/dataingestionrules/twitter/{twitterIngestionRuleId}','PUT',{'topicId':topicId,'twitterIngestionRuleId':twitterIngestionRuleId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SpeechTextAnalyticsApi=/*#__PURE__*/function(){/**
15833
15948
  * SpeechTextAnalytics service.
15834
15949
  * @module purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
15835
- * @version 209.0.0
15950
+ * @version 211.0.0
15836
15951
  *//**
15837
15952
  * Constructs a new SpeechTextAnalyticsApi.
15838
15953
  * @alias module:purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
@@ -16131,7 +16246,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
16131
16246
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putSpeechandtextanalyticsTopic';}return this.apiClient.callApi('/api/v2/speechandtextanalytics/topics/{topicId}','PUT',{'topicId':topicId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var StationsApi=/*#__PURE__*/function(){/**
16132
16247
  * Stations service.
16133
16248
  * @module purecloud-platform-client-v2/api/StationsApi
16134
- * @version 209.0.0
16249
+ * @version 211.0.0
16135
16250
  *//**
16136
16251
  * Constructs a new StationsApi.
16137
16252
  * @alias module:purecloud-platform-client-v2/api/StationsApi
@@ -16163,7 +16278,7 @@ if(stationId===undefined||stationId===null){throw'Missing the required parameter
16163
16278
  */},{key:"getStations",value:function getStations(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/stations','GET',{},{'pageSize':opts['pageSize'],'pageNumber':opts['pageNumber'],'sortBy':opts['sortBy'],'name':opts['name'],'userSelectable':opts['userSelectable'],'webRtcUserId':opts['webRtcUserId'],'id':opts['id'],'lineAppearanceId':opts['lineAppearanceId']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SuggestApi=/*#__PURE__*/function(){/**
16164
16279
  * Suggest service.
16165
16280
  * @module purecloud-platform-client-v2/api/SuggestApi
16166
- * @version 209.0.0
16281
+ * @version 211.0.0
16167
16282
  *//**
16168
16283
  * Constructs a new SuggestApi.
16169
16284
  * @alias module:purecloud-platform-client-v2/api/SuggestApi
@@ -16203,7 +16318,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
16203
16318
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postSearchSuggest';}return this.apiClient.callApi('/api/v2/search/suggest','POST',{},{'profile':opts['profile']},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TaskManagementApi=/*#__PURE__*/function(){/**
16204
16319
  * TaskManagement service.
16205
16320
  * @module purecloud-platform-client-v2/api/TaskManagementApi
16206
- * @version 209.0.0
16321
+ * @version 211.0.0
16207
16322
  *//**
16208
16323
  * Constructs a new TaskManagementApi.
16209
16324
  * @alias module:purecloud-platform-client-v2/api/TaskManagementApi
@@ -16609,7 +16724,7 @@ if(schemaId===undefined||schemaId===null){throw'Missing the required parameter "
16609
16724
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putTaskmanagementWorkitemsSchema';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/schemas/{schemaId}','PUT',{'schemaId':schemaId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TeamsApi=/*#__PURE__*/function(){/**
16610
16725
  * Teams service.
16611
16726
  * @module purecloud-platform-client-v2/api/TeamsApi
16612
- * @version 209.0.0
16727
+ * @version 211.0.0
16613
16728
  *//**
16614
16729
  * Constructs a new TeamsApi.
16615
16730
  * @alias module:purecloud-platform-client-v2/api/TeamsApi
@@ -16689,7 +16804,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
16689
16804
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postTeamsSearch';}return this.apiClient.callApi('/api/v2/teams/search','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TelephonyApi=/*#__PURE__*/function(){/**
16690
16805
  * Telephony service.
16691
16806
  * @module purecloud-platform-client-v2/api/TelephonyApi
16692
- * @version 209.0.0
16807
+ * @version 211.0.0
16693
16808
  *//**
16694
16809
  * Constructs a new TelephonyApi.
16695
16810
  * @alias module:purecloud-platform-client-v2/api/TelephonyApi
@@ -16736,7 +16851,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
16736
16851
  if(sIPSearchPublicRequest===undefined||sIPSearchPublicRequest===null){throw'Missing the required parameter "sIPSearchPublicRequest" when calling postTelephonySiptracesDownload';}return this.apiClient.callApi('/api/v2/telephony/siptraces/download','POST',{},{},{},{},sIPSearchPublicRequest,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TelephonyProvidersEdgeApi=/*#__PURE__*/function(){/**
16737
16852
  * TelephonyProvidersEdge service.
16738
16853
  * @module purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
16739
- * @version 209.0.0
16854
+ * @version 211.0.0
16740
16855
  *//**
16741
16856
  * Constructs a new TelephonyProvidersEdgeApi.
16742
16857
  * @alias module:purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
@@ -17571,7 +17686,7 @@ if(trunkBaseSettingsId===undefined||trunkBaseSettingsId===null){throw'Missing th
17571
17686
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putTelephonyProvidersEdgesTrunkbasesetting';}return this.apiClient.callApi('/api/v2/telephony/providers/edges/trunkbasesettings/{trunkBaseSettingsId}','PUT',{'trunkBaseSettingsId':trunkBaseSettingsId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TextbotsApi=/*#__PURE__*/function(){/**
17572
17687
  * Textbots service.
17573
17688
  * @module purecloud-platform-client-v2/api/TextbotsApi
17574
- * @version 209.0.0
17689
+ * @version 211.0.0
17575
17690
  *//**
17576
17691
  * Constructs a new TextbotsApi.
17577
17692
  * @alias module:purecloud-platform-client-v2/api/TextbotsApi
@@ -17606,7 +17721,7 @@ if(launchRequest===undefined||launchRequest===null){throw'Missing the required p
17606
17721
  if(postTextRequest===undefined||postTextRequest===null){throw'Missing the required parameter "postTextRequest" when calling postTextbotsBotsExecute';}return this.apiClient.callApi('/api/v2/textbots/bots/execute','POST',{},{},{},{},postTextRequest,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TokensApi=/*#__PURE__*/function(){/**
17607
17722
  * Tokens service.
17608
17723
  * @module purecloud-platform-client-v2/api/TokensApi
17609
- * @version 209.0.0
17724
+ * @version 211.0.0
17610
17725
  *//**
17611
17726
  * Constructs a new TokensApi.
17612
17727
  * @alias module:purecloud-platform-client-v2/api/TokensApi
@@ -17640,7 +17755,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
17640
17755
  */},{key:"putTokensTimeout",value:function putTokensTimeout(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/tokens/timeout','PUT',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var UploadsApi=/*#__PURE__*/function(){/**
17641
17756
  * Uploads service.
17642
17757
  * @module purecloud-platform-client-v2/api/UploadsApi
17643
- * @version 209.0.0
17758
+ * @version 211.0.0
17644
17759
  *//**
17645
17760
  * Constructs a new UploadsApi.
17646
17761
  * @alias module:purecloud-platform-client-v2/api/UploadsApi
@@ -17706,7 +17821,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
17706
17821
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postUploadsWorkforcemanagementHistoricaldataCsv';}return this.apiClient.callApi('/api/v2/uploads/workforcemanagement/historicaldata/csv','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var UsageApi=/*#__PURE__*/function(){/**
17707
17822
  * Usage service.
17708
17823
  * @module purecloud-platform-client-v2/api/UsageApi
17709
- * @version 209.0.0
17824
+ * @version 211.0.0
17710
17825
  *//**
17711
17826
  * Constructs a new UsageApi.
17712
17827
  * @alias module:purecloud-platform-client-v2/api/UsageApi
@@ -17760,7 +17875,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
17760
17875
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postUsageSimplesearch';}return this.apiClient.callApi('/api/v2/usage/simplesearch','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var UserRecordingsApi=/*#__PURE__*/function(){/**
17761
17876
  * UserRecordings service.
17762
17877
  * @module purecloud-platform-client-v2/api/UserRecordingsApi
17763
- * @version 209.0.0
17878
+ * @version 211.0.0
17764
17879
  *//**
17765
17880
  * Constructs a new UserRecordingsApi.
17766
17881
  * @alias module:purecloud-platform-client-v2/api/UserRecordingsApi
@@ -17817,7 +17932,7 @@ if(recordingId===undefined||recordingId===null){throw'Missing the required param
17817
17932
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUserrecording';}return this.apiClient.callApi('/api/v2/userrecordings/{recordingId}','PUT',{'recordingId':recordingId},{'expand':this.apiClient.buildCollectionParam(opts['expand'],'multi')},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var UsersApi=/*#__PURE__*/function(){/**
17818
17933
  * Users service.
17819
17934
  * @module purecloud-platform-client-v2/api/UsersApi
17820
- * @version 209.0.0
17935
+ * @version 211.0.0
17821
17936
  *//**
17822
17937
  * Constructs a new UsersApi.
17823
17938
  * @alias module:purecloud-platform-client-v2/api/UsersApi
@@ -18514,7 +18629,7 @@ if(verifierId===undefined||verifierId===null){throw'Missing the required paramet
18514
18629
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUserVerifier';}return this.apiClient.callApi('/api/v2/users/{userId}/verifiers/{verifierId}','PUT',{'userId':userId,'verifierId':verifierId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var UtilitiesApi=/*#__PURE__*/function(){/**
18515
18630
  * Utilities service.
18516
18631
  * @module purecloud-platform-client-v2/api/UtilitiesApi
18517
- * @version 209.0.0
18632
+ * @version 211.0.0
18518
18633
  *//**
18519
18634
  * Constructs a new UtilitiesApi.
18520
18635
  * @alias module:purecloud-platform-client-v2/api/UtilitiesApi
@@ -18541,7 +18656,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
18541
18656
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postCertificateDetails';}return this.apiClient.callApi('/api/v2/certificate/details','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var VoicemailApi=/*#__PURE__*/function(){/**
18542
18657
  * Voicemail service.
18543
18658
  * @module purecloud-platform-client-v2/api/VoicemailApi
18544
- * @version 209.0.0
18659
+ * @version 211.0.0
18545
18660
  *//**
18546
18661
  * Constructs a new VoicemailApi.
18547
18662
  * @alias module:purecloud-platform-client-v2/api/VoicemailApi
@@ -18703,7 +18818,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
18703
18818
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putVoicemailUserpolicy';}return this.apiClient.callApi('/api/v2/voicemail/userpolicies/{userId}','PUT',{'userId':userId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var WebChatApi=/*#__PURE__*/function(){/**
18704
18819
  * WebChat service.
18705
18820
  * @module purecloud-platform-client-v2/api/WebChatApi
18706
- * @version 209.0.0
18821
+ * @version 211.0.0
18707
18822
  *//**
18708
18823
  * Constructs a new WebChatApi.
18709
18824
  * @alias module:purecloud-platform-client-v2/api/WebChatApi
@@ -18838,7 +18953,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
18838
18953
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putWebchatSettings';}return this.apiClient.callApi('/api/v2/webchat/settings','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var WebDeploymentsApi=/*#__PURE__*/function(){/**
18839
18954
  * WebDeployments service.
18840
18955
  * @module purecloud-platform-client-v2/api/WebDeploymentsApi
18841
- * @version 209.0.0
18956
+ * @version 211.0.0
18842
18957
  *//**
18843
18958
  * Constructs a new WebDeploymentsApi.
18844
18959
  * @alias module:purecloud-platform-client-v2/api/WebDeploymentsApi
@@ -18959,7 +19074,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
18959
19074
  if(deployment===undefined||deployment===null){throw'Missing the required parameter "deployment" when calling putWebdeploymentsDeployment';}return this.apiClient.callApi('/api/v2/webdeployments/deployments/{deploymentId}','PUT',{'deploymentId':deploymentId},{},{},{},deployment,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var WebMessagingApi=/*#__PURE__*/function(){/**
18960
19075
  * WebMessaging service.
18961
19076
  * @module purecloud-platform-client-v2/api/WebMessagingApi
18962
- * @version 209.0.0
19077
+ * @version 211.0.0
18963
19078
  *//**
18964
19079
  * Constructs a new WebMessagingApi.
18965
19080
  * @alias module:purecloud-platform-client-v2/api/WebMessagingApi
@@ -18975,7 +19090,7 @@ if(deployment===undefined||deployment===null){throw'Missing the required paramet
18975
19090
  */return _createClass(WebMessagingApi,[{key:"getWebmessagingMessages",value:function getWebmessagingMessages(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/webmessaging/messages','GET',{},{'pageSize':opts['pageSize'],'pageNumber':opts['pageNumber']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var WidgetsApi=/*#__PURE__*/function(){/**
18976
19091
  * Widgets service.
18977
19092
  * @module purecloud-platform-client-v2/api/WidgetsApi
18978
- * @version 209.0.0
19093
+ * @version 211.0.0
18979
19094
  *//**
18980
19095
  * Constructs a new WidgetsApi.
18981
19096
  * @alias module:purecloud-platform-client-v2/api/WidgetsApi
@@ -19010,7 +19125,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
19010
19125
  if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putWidgetsDeployment';}return this.apiClient.callApi('/api/v2/widgets/deployments/{deploymentId}','PUT',{'deploymentId':deploymentId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var WorkforceManagementApi=/*#__PURE__*/function(){/**
19011
19126
  * WorkforceManagement service.
19012
19127
  * @module purecloud-platform-client-v2/api/WorkforceManagementApi
19013
- * @version 209.0.0
19128
+ * @version 211.0.0
19014
19129
  *//**
19015
19130
  * Constructs a new WorkforceManagementApi.
19016
19131
  * @alias module:purecloud-platform-client-v2/api/WorkforceManagementApi
@@ -19697,11 +19812,9 @@ if(timeOffRequestId===undefined||timeOffRequestId===null){throw'Missing the requ
19697
19812
  *
19698
19813
  * @param {String} managementUnitId The ID of the management unit, or 'mine' for the management unit of the logged-in user.
19699
19814
  * @param {String} userId The userId to whom the Time Off Request applies.
19700
- * @param {Object} opts Optional parameters
19701
- * @param {Boolean} opts.recentlyReviewed Limit results to requests that have been reviewed within the preceding 30 days (default to false)
19702
- */},{key:"getWorkforcemanagementManagementunitUserTimeoffrequests",value:function getWorkforcemanagementManagementunitUserTimeoffrequests(managementUnitId,userId,opts){opts=opts||{};// verify the required parameter 'managementUnitId' is set
19815
+ */},{key:"getWorkforcemanagementManagementunitUserTimeoffrequests",value:function getWorkforcemanagementManagementunitUserTimeoffrequests(managementUnitId,userId){// verify the required parameter 'managementUnitId' is set
19703
19816
  if(managementUnitId===undefined||managementUnitId===null){throw'Missing the required parameter "managementUnitId" when calling getWorkforcemanagementManagementunitUserTimeoffrequests';}// verify the required parameter 'userId' is set
19704
- if(userId===undefined||userId===null){throw'Missing the required parameter "userId" when calling getWorkforcemanagementManagementunitUserTimeoffrequests';}return this.apiClient.callApi('/api/v2/workforcemanagement/managementunits/{managementUnitId}/users/{userId}/timeoffrequests','GET',{'managementUnitId':managementUnitId,'userId':userId},{'recentlyReviewed':opts['recentlyReviewed']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
19817
+ if(userId===undefined||userId===null){throw'Missing the required parameter "userId" when calling getWorkforcemanagementManagementunitUserTimeoffrequests';}return this.apiClient.callApi('/api/v2/workforcemanagement/managementunits/{managementUnitId}/users/{userId}/timeoffrequests','GET',{'managementUnitId':managementUnitId,'userId':userId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
19705
19818
  * Get users in the management unit
19706
19819
  *
19707
19820
  * @param {String} managementUnitId The ID of the management unit, or 'mine' for the management unit of the logged-in user.
@@ -19820,9 +19933,7 @@ if(timeOffRequestId===undefined||timeOffRequestId===null){throw'Missing the requ
19820
19933
  if(timeOffRequestId===undefined||timeOffRequestId===null){throw'Missing the required parameter "timeOffRequestId" when calling getWorkforcemanagementTimeoffrequestWaitlistpositions';}return this.apiClient.callApi('/api/v2/workforcemanagement/timeoffrequests/{timeOffRequestId}/waitlistpositions','GET',{'timeOffRequestId':timeOffRequestId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
19821
19934
  * Get a list of time off requests for the current user
19822
19935
  *
19823
- * @param {Object} opts Optional parameters
19824
- * @param {Boolean} opts.recentlyReviewed Limit results to requests that have been reviewed within the preceding 30 days (default to false)
19825
- */},{key:"getWorkforcemanagementTimeoffrequests",value:function getWorkforcemanagementTimeoffrequests(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/workforcemanagement/timeoffrequests','GET',{},{'recentlyReviewed':opts['recentlyReviewed']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
19936
+ */},{key:"getWorkforcemanagementTimeoffrequests",value:function getWorkforcemanagementTimeoffrequests(){return this.apiClient.callApi('/api/v2/workforcemanagement/timeoffrequests','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
19826
19937
  * Get work plan bid ranks for a user
19827
19938
  *
19828
19939
  * @param {String} userId The userId to whom the work plan bid ranks apply.
@@ -20791,7 +20902,7 @@ if(timeOffLimitId===undefined||timeOffLimitId===null){throw'Missing the required
20791
20902
  * </pre>
20792
20903
  * </p>
20793
20904
  * @module purecloud-platform-client-v2/index
20794
- * @version 209.0.0
20905
+ * @version 211.0.0
20795
20906
  */var platformClient=/*#__PURE__*/_createClass(function platformClient(){_classCallCheck(this,platformClient);/**
20796
20907
  * The ApiClient constructor.
20797
20908
  * @property {module:purecloud-platform-client-v2/ApiClient}
@@ -20844,6 +20955,9 @@ if(timeOffLimitId===undefined||timeOffLimitId===null){throw'Missing the required
20844
20955
  * The DataExtensionsApi service constructor.
20845
20956
  * @property {module:purecloud-platform-client-v2/api/DataExtensionsApi}
20846
20957
  */this.DataExtensionsApi=DataExtensionsApi;/**
20958
+ * The DataPrivacyApi service constructor.
20959
+ * @property {module:purecloud-platform-client-v2/api/DataPrivacyApi}
20960
+ */this.DataPrivacyApi=DataPrivacyApi;/**
20847
20961
  * The DownloadsApi service constructor.
20848
20962
  * @property {module:purecloud-platform-client-v2/api/DownloadsApi}
20849
20963
  */this.DownloadsApi=DownloadsApi;/**