purecloud-platform-client-v2 211.1.0 → 212.1.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.
- package/README.md +18 -4
- package/dist/node/purecloud-platform-client-v2.js +1049 -239
- package/dist/web-amd/purecloud-platform-client-v2.js +1050 -239
- package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
- package/dist/web-cjs/bundle.js +471 -277
- package/dist/web-cjs/purecloud-platform-client-v2.js +662 -6356
- package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
- package/index.d.ts +843 -236
- package/package.json +1 -1
- package/src/purecloud-platform-client-v2/ApiClient.js +21 -18
- package/src/purecloud-platform-client-v2/api/AgentAssistantsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AgentCopilotApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AgentUIApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AlertingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AnalyticsApi.js +212 -1
- package/src/purecloud-platform-client-v2/api/ArchitectApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AuditApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/BillingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CarrierServicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ConversationsApi.js +7 -3
- package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DataPrivacyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DownloadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EmailsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EmployeeEngagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EventsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +3 -2
- package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GamificationApi.js +57 -1
- package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/InfrastructureAsCodeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/JourneyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -2
- package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LogCaptureApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OperationalEventsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OutboundApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ProcessAutomationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RoutingApi.js +2 -2
- package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScreenRecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SearchApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SettingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SocialMediaApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TaskManagementApi.js +443 -1
- package/src/purecloud-platform-client-v2/api/TeamsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsersApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/VoicemailApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +94 -1
- package/src/purecloud-platform-client-v2/index.js +8 -3
package/dist/web-cjs/bundle.js
CHANGED
|
@@ -1,179 +1,4 @@
|
|
|
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
|
-
// if there are two placeholders, than the two characters before it
|
|
3
|
-
// represent one byte
|
|
4
|
-
// if there is only one, then the three characters before it represent 2 bytes
|
|
5
|
-
// this is just a cheap hack to not do indexOf twice
|
|
6
|
-
placeHolders=b64[len-2]==='='?2:b64[len-1]==='='?1:0;// base64 is 4/3 + up to two characters of the original data
|
|
7
|
-
arr=new Arr(len*3/4-placeHolders);// if there are placeholders, only get up to the last complete 4 chars
|
|
8
|
-
l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i<l;i+=4,j+=3){tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)];arr[L++]=tmp>>16&0xFF;arr[L++]=tmp>>8&0xFF;arr[L++]=tmp&0xFF;}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&0xFF;}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&0xFF;arr[L++]=tmp&0xFF;}return arr;}function tripletToBase64(num){return lookup[num>>18&0x3F]+lookup[num>>12&0x3F]+lookup[num>>6&0x3F]+lookup[num&0x3F];}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;i<end;i+=3){tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2];output.push(tripletToBase64(tmp));}return output.join('');}function fromByteArray(uint8){if(!inited){init();}var tmp;var len=uint8.length;var extraBytes=len%3;// if we have 1 byte left, pad 2 bytes
|
|
9
|
-
var output='';var parts=[];var maxChunkLength=16383;// must be multiple of 3
|
|
10
|
-
// go through the array every three bytes, we'll deal with trailing stuff later
|
|
11
|
-
for(var i=0,len2=len-extraBytes;i<len2;i+=maxChunkLength){parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength));}// pad the end with zeros, but make sure to not forget the extra bytes
|
|
12
|
-
if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&0x3F];output+='==';}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&0x3F];output+=lookup[tmp<<2&0x3F];output+='=';}parts.push(output);return parts.join('');}function read(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias;}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity;}else{m=m+Math.pow(2,mLen);e=e-eBias;}return(s?-1:1)*m*Math.pow(2,e-mLen);}function write(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax;}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2;}if(e+eBias>=1){value+=rt/c;}else{value+=rt*Math.pow(2,1-eBias);}if(value*c>=2){e++;c/=2;}if(e+eBias>=eMax){m=0;e=eMax;}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias;}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0;}}for(;mLen>=8;buffer[offset+i]=m&0xff,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&0xff,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128;}var toString$1={}.toString;var isArray$1=Array.isArray||function(arr){return toString$1.call(arr)=='[object Array]';};var INSPECT_MAX_BYTES=50;/**
|
|
13
|
-
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
|
14
|
-
* === true Use Uint8Array implementation (fastest)
|
|
15
|
-
* === false Use Object implementation (most compatible, even IE6)
|
|
16
|
-
*
|
|
17
|
-
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
|
|
18
|
-
* Opera 11.6+, iOS 4.2+.
|
|
19
|
-
*
|
|
20
|
-
* Due to various browser bugs, sometimes the Object implementation will be used even
|
|
21
|
-
* when the browser supports typed arrays.
|
|
22
|
-
*
|
|
23
|
-
* Note:
|
|
24
|
-
*
|
|
25
|
-
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
|
|
26
|
-
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
|
|
27
|
-
*
|
|
28
|
-
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
|
|
29
|
-
*
|
|
30
|
-
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
|
|
31
|
-
* incorrect length in some situations.
|
|
32
|
-
|
|
33
|
-
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
|
|
34
|
-
* get the Object implementation, which is slower but behaves correctly.
|
|
35
|
-
*/Buffer.TYPED_ARRAY_SUPPORT=global$1.TYPED_ARRAY_SUPPORT!==undefined?global$1.TYPED_ARRAY_SUPPORT:true;/*
|
|
36
|
-
* Export kMaxLength after typed array support is determined.
|
|
37
|
-
*/kMaxLength();function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?0x7fffffff:0x3fffffff;}function createBuffer(that,length){if(kMaxLength()<length){throw new RangeError('Invalid typed array length');}if(Buffer.TYPED_ARRAY_SUPPORT){// Return an augmented `Uint8Array` instance, for best performance
|
|
38
|
-
that=new Uint8Array(length);that.__proto__=Buffer.prototype;}else{// Fallback: Return an object instance of the Buffer class
|
|
39
|
-
if(that===null){that=new Buffer(length);}that.length=length;}return that;}/**
|
|
40
|
-
* The Buffer constructor returns instances of `Uint8Array` that have their
|
|
41
|
-
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
|
|
42
|
-
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
|
|
43
|
-
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
|
|
44
|
-
* returns a single octet.
|
|
45
|
-
*
|
|
46
|
-
* The `Uint8Array` prototype remains unmodified.
|
|
47
|
-
*/function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.
|
|
48
|
-
if(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}Buffer.poolSize=8192;// not used by this implementation
|
|
49
|
-
// TODO: Legacy, not needed anymore. Remove in next major version.
|
|
50
|
-
Buffer._augment=function(arr){arr.__proto__=Buffer.prototype;return arr;};function from(that,value,encodingOrOffset,length){if(typeof value==='number'){throw new TypeError('"value" argument must not be a number');}if(typeof ArrayBuffer!=='undefined'&&value instanceof ArrayBuffer){return fromArrayBuffer(that,value,encodingOrOffset,length);}if(typeof value==='string'){return fromString(that,value,encodingOrOffset);}return fromObject(that,value);}/**
|
|
51
|
-
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
|
|
52
|
-
* if value is a number.
|
|
53
|
-
* Buffer.from(str[, encoding])
|
|
54
|
-
* Buffer.from(array)
|
|
55
|
-
* Buffer.from(buffer)
|
|
56
|
-
* Buffer.from(arrayBuffer[, byteOffset[, length]])
|
|
57
|
-
**/Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length);};if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;if(typeof Symbol!=='undefined'&&Symbol.species&&Buffer[Symbol.species]===Buffer);}function assertSize(size){if(typeof size!=='number'){throw new TypeError('"size" argument must be a number');}else if(size<0){throw new RangeError('"size" argument must not be negative');}}function alloc(that,size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(that,size);}if(fill!==undefined){// Only pay attention to encoding if it's a string. This
|
|
58
|
-
// prevents accidentally sending in a number that would
|
|
59
|
-
// be interpretted as a start offset.
|
|
60
|
-
return typeof encoding==='string'?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill);}return createBuffer(that,size);}/**
|
|
61
|
-
* Creates a new filled Buffer instance.
|
|
62
|
-
* alloc(size[, fill[, encoding]])
|
|
63
|
-
**/Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding);};function allocUnsafe(that,size){assertSize(size);that=createBuffer(that,size<0?0:checked(size)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i<size;++i){that[i]=0;}}return that;}/**
|
|
64
|
-
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
|
|
65
|
-
* */Buffer.allocUnsafe=function(size){return allocUnsafe(null,size);};/**
|
|
66
|
-
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
|
|
67
|
-
*/Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size);};function fromString(that,string,encoding){if(typeof encoding!=='string'||encoding===''){encoding='utf8';}if(!Buffer.isEncoding(encoding)){throw new TypeError('"encoding" must be a valid string encoding');}var length=byteLength(string,encoding)|0;that=createBuffer(that,length);var actual=that.write(string,encoding);if(actual!==length){// Writing a hex string, for example, that contains invalid characters will
|
|
68
|
-
// cause everything after the first invalid character to be ignored. (e.g.
|
|
69
|
-
// 'abxxcd' will be treated as 'ab')
|
|
70
|
-
that=that.slice(0,actual);}return that;}function fromArrayLike(that,array){var length=array.length<0?0:checked(array.length)|0;that=createBuffer(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255;}return that;}function fromArrayBuffer(that,array,byteOffset,length){array.byteLength;// this throws if `array` is not a valid ArrayBuffer
|
|
71
|
-
if(byteOffset<0||array.byteLength<byteOffset){throw new RangeError('\'offset\' is out of bounds');}if(array.byteLength<byteOffset+(length||0)){throw new RangeError('\'length\' is out of bounds');}if(byteOffset===undefined&&length===undefined){array=new Uint8Array(array);}else if(length===undefined){array=new Uint8Array(array,byteOffset);}else{array=new Uint8Array(array,byteOffset,length);}if(Buffer.TYPED_ARRAY_SUPPORT){// Return an augmented `Uint8Array` instance, for best performance
|
|
72
|
-
that=array;that.__proto__=Buffer.prototype;}else{// Fallback: Return an object instance of the Buffer class
|
|
73
|
-
that=fromArrayLike(that,array);}return that;}function fromObject(that,obj){if(internalIsBuffer(obj)){var len=checked(obj.length)|0;that=createBuffer(that,len);if(that.length===0){return that;}obj.copy(that,0,0,len);return that;}if(obj){if(typeof ArrayBuffer!=='undefined'&&obj.buffer instanceof ArrayBuffer||'length'in obj){if(typeof obj.length!=='number'||isnan(obj.length)){return createBuffer(that,0);}return fromArrayLike(that,obj);}if(obj.type==='Buffer'&&isArray$1(obj.data)){return fromArrayLike(that,obj.data);}}throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');}function checked(length){// Note: cannot use `length < kMaxLength()` here because that fails when
|
|
74
|
-
// length is NaN (which is otherwise coerced to zero.)
|
|
75
|
-
if(length>=kMaxLength()){throw new RangeError('Attempt to allocate Buffer larger than maximum '+'size: 0x'+kMaxLength().toString(16)+' bytes');}return length|0;}Buffer.isBuffer=isBuffer$1;function internalIsBuffer(b){return!!(b!=null&&b._isBuffer);}Buffer.compare=function compare(a,b){if(!internalIsBuffer(a)||!internalIsBuffer(b)){throw new TypeError('Arguments must be Buffers');}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i<len;++i){if(a[i]!==b[i]){x=a[i];y=b[i];break;}}if(x<y)return-1;if(y<x)return 1;return 0;};Buffer.isEncoding=function isEncoding(encoding){switch(String(encoding).toLowerCase()){case'hex':case'utf8':case'utf-8':case'ascii':case'latin1':case'binary':case'base64':case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return true;default:return false;}};Buffer.concat=function concat(list,length){if(!isArray$1(list)){throw new TypeError('"list" argument must be an Array of Buffers');}if(list.length===0){return Buffer.alloc(0);}var i;if(length===undefined){length=0;for(i=0;i<list.length;++i){length+=list[i].length;}}var buffer=Buffer.allocUnsafe(length);var pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!internalIsBuffer(buf)){throw new TypeError('"list" argument must be an Array of Buffers');}buf.copy(buffer,pos);pos+=buf.length;}return buffer;};function byteLength(string,encoding){if(internalIsBuffer(string)){return string.length;}if(typeof ArrayBuffer!=='undefined'&&typeof ArrayBuffer.isView==='function'&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer)){return string.byteLength;}if(typeof string!=='string'){string=''+string;}var len=string.length;if(len===0)return 0;// Use a for loop to avoid recursion
|
|
76
|
-
var loweredCase=false;for(;;){switch(encoding){case'ascii':case'latin1':case'binary':return len;case'utf8':case'utf-8':case undefined:return utf8ToBytes(string).length;case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return len*2;case'hex':return len>>>1;case'base64':return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;// assume utf8
|
|
77
|
-
encoding=(''+encoding).toLowerCase();loweredCase=true;}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
|
|
78
|
-
// property of a typed array.
|
|
79
|
-
// This behaves neither like String nor Uint8Array in that we set start/end
|
|
80
|
-
// to their upper/lower bounds if the value passed is out of range.
|
|
81
|
-
// undefined is handled specially as per ECMA-262 6th Edition,
|
|
82
|
-
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
|
|
83
|
-
if(start===undefined||start<0){start=0;}// Return early if start > this.length. Done here to prevent potential uint32
|
|
84
|
-
// coercion fail below.
|
|
85
|
-
if(start>this.length){return'';}if(end===undefined||end>this.length){end=this.length;}if(end<=0){return'';}// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
|
|
86
|
-
end>>>=0;start>>>=0;if(end<=start){return'';}if(!encoding)encoding='utf8';while(true){switch(encoding){case'hex':return hexSlice(this,start,end);case'utf8':case'utf-8':return utf8Slice(this,start,end);case'ascii':return asciiSlice(this,start,end);case'latin1':case'binary':return latin1Slice(this,start,end);case'base64':return base64Slice(this,start,end);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError('Unknown encoding: '+encoding);encoding=(encoding+'').toLowerCase();loweredCase=true;}}}// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
|
|
87
|
-
// Buffer instances.
|
|
88
|
-
Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i;}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError('Buffer size must be a multiple of 16-bits');}for(var i=0;i<len;i+=2){swap(this,i,i+1);}return this;};Buffer.prototype.swap32=function swap32(){var len=this.length;if(len%4!==0){throw new RangeError('Buffer size must be a multiple of 32-bits');}for(var i=0;i<len;i+=4){swap(this,i,i+3);swap(this,i+1,i+2);}return this;};Buffer.prototype.swap64=function swap64(){var len=this.length;if(len%8!==0){throw new RangeError('Buffer size must be a multiple of 64-bits');}for(var i=0;i<len;i+=8){swap(this,i,i+7);swap(this,i+1,i+6);swap(this,i+2,i+5);swap(this,i+3,i+4);}return this;};Buffer.prototype.toString=function toString(){var length=this.length|0;if(length===0)return'';if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments);};Buffer.prototype.equals=function equals(b){if(!internalIsBuffer(b))throw new TypeError('Argument must be a Buffer');if(this===b)return true;return Buffer.compare(this,b)===0;};Buffer.prototype.inspect=function inspect(){var str='';var max=INSPECT_MAX_BYTES;if(this.length>0){str=this.toString('hex',0,max).match(/.{2}/g).join(' ');if(this.length>max)str+=' ... ';}return'<Buffer '+str+'>';};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!internalIsBuffer(target)){throw new TypeError('Argument must be a Buffer');}if(start===undefined){start=0;}if(end===undefined){end=target?target.length:0;}if(thisStart===undefined){thisStart=0;}if(thisEnd===undefined){thisEnd=this.length;}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError('out of range index');}if(thisStart>=thisEnd&&start>=end){return 0;}if(thisStart>=thisEnd){return-1;}if(start>=end){return 1;}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i<len;++i){if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i];y=targetCopy[i];break;}}if(x<y)return-1;if(y<x)return 1;return 0;};// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
|
|
89
|
-
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
|
|
90
|
-
//
|
|
91
|
-
// Arguments:
|
|
92
|
-
// - buffer - a Buffer to search
|
|
93
|
-
// - val - a string, Buffer, or number
|
|
94
|
-
// - byteOffset - an index into `buffer`; will be clamped to an int32
|
|
95
|
-
// - encoding - an optional encoding, relevant is val is a string
|
|
96
|
-
// - dir - true for indexOf, false for lastIndexOf
|
|
97
|
-
function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){// Empty buffer means no match
|
|
98
|
-
if(buffer.length===0)return-1;// Normalize byteOffset
|
|
99
|
-
if(typeof byteOffset==='string'){encoding=byteOffset;byteOffset=0;}else if(byteOffset>0x7fffffff){byteOffset=0x7fffffff;}else if(byteOffset<-0x80000000){byteOffset=-0x80000000;}byteOffset=+byteOffset;// Coerce to Number.
|
|
100
|
-
if(isNaN(byteOffset)){// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
|
|
101
|
-
byteOffset=dir?0:buffer.length-1;}// Normalize byteOffset: negative offsets start from the end of the buffer
|
|
102
|
-
if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1;}else if(byteOffset<0){if(dir)byteOffset=0;else return-1;}// Normalize val
|
|
103
|
-
if(typeof val==='string'){val=Buffer.from(val,encoding);}// Finally, search either indexOf (if dir is true) or lastIndexOf
|
|
104
|
-
if(internalIsBuffer(val)){// Special case: looking for empty string/buffer always fails
|
|
105
|
-
if(val.length===0){return-1;}return arrayIndexOf(buffer,val,byteOffset,encoding,dir);}else if(typeof val==='number'){val=val&0xFF;// Search for a byte value [0-255]
|
|
106
|
-
if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==='function'){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset);}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset);}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir);}throw new TypeError('val must be string, number or Buffer');}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==='ucs2'||encoding==='ucs-2'||encoding==='utf16le'||encoding==='utf-16le'){if(arr.length<2||val.length<2){return-1;}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2;}}function read(buf,i){if(indexSize===1){return buf[i];}else{return buf.readUInt16BE(i*indexSize);}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++){if(read(arr,i)===read(val,foundIndex===-1?0:i-foundIndex)){if(foundIndex===-1)foundIndex=i;if(i-foundIndex+1===valLength)return foundIndex*indexSize;}else{if(foundIndex!==-1)i-=i-foundIndex;foundIndex=-1;}}}else{if(byteOffset+valLength>arrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;j<valLength;j++){if(read(arr,i+j)!==read(val,j)){found=false;break;}}if(found)return i;}}return-1;}Buffer.prototype.includes=function includes(val,byteOffset,encoding){return this.indexOf(val,byteOffset,encoding)!==-1;};Buffer.prototype.indexOf=function indexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,true);};Buffer.prototype.lastIndexOf=function lastIndexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,false);};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;if(!length){length=remaining;}else{length=Number(length);if(length>remaining){length=remaining;}}// must be an even number of digits
|
|
107
|
-
var strLen=string.length;if(strLen%2!==0)throw new TypeError('Invalid hex string');if(length>strLen/2){length=strLen/2;}for(var i=0;i<length;++i){var parsed=parseInt(string.substr(i*2,2),16);if(isNaN(parsed))return i;buf[offset+i]=parsed;}return i;}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length);}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length);}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length);}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length);}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length);}Buffer.prototype.write=function write(string,offset,length,encoding){// Buffer#write(string)
|
|
108
|
-
if(offset===undefined){encoding='utf8';length=this.length;offset=0;// Buffer#write(string, encoding)
|
|
109
|
-
}else if(length===undefined&&typeof offset==='string'){encoding=offset;length=this.length;offset=0;// Buffer#write(string, offset[, length][, encoding])
|
|
110
|
-
}else if(isFinite(offset)){offset=offset|0;if(isFinite(length)){length=length|0;if(encoding===undefined)encoding='utf8';}else{encoding=length;length=undefined;}// legacy write(string, encoding, offset, length) - remove in v0.13
|
|
111
|
-
}else{throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');}var remaining=this.length-offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError('Attempt to write outside buffer bounds');}if(!encoding)encoding='utf8';var loweredCase=false;for(;;){switch(encoding){case'hex':return hexWrite(this,string,offset,length);case'utf8':case'utf-8':return utf8Write(this,string,offset,length);case'ascii':return asciiWrite(this,string,offset,length);case'latin1':case'binary':return latin1Write(this,string,offset,length);case'base64':// Warning: maxLength not taken into account in base64Write
|
|
112
|
-
return base64Write(this,string,offset,length);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError('Unknown encoding: '+encoding);encoding=(''+encoding).toLowerCase();loweredCase=true;}}};Buffer.prototype.toJSON=function toJSON(){return{type:'Buffer',data:Array.prototype.slice.call(this._arr||this,0)};};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return fromByteArray(buf);}else{return fromByteArray(buf.slice(start,end));}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i<end){var firstByte=buf[i];var codePoint=null;var bytesPerSequence=firstByte>0xEF?4:firstByte>0xDF?3:firstByte>0xBF?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<0x80){codePoint=firstByte;}break;case 2:secondByte=buf[i+1];if((secondByte&0xC0)===0x80){tempCodePoint=(firstByte&0x1F)<<0x6|secondByte&0x3F;if(tempCodePoint>0x7F){codePoint=tempCodePoint;}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&0xC0)===0x80&&(thirdByte&0xC0)===0x80){tempCodePoint=(firstByte&0xF)<<0xC|(secondByte&0x3F)<<0x6|thirdByte&0x3F;if(tempCodePoint>0x7FF&&(tempCodePoint<0xD800||tempCodePoint>0xDFFF)){codePoint=tempCodePoint;}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&0xC0)===0x80&&(thirdByte&0xC0)===0x80&&(fourthByte&0xC0)===0x80){tempCodePoint=(firstByte&0xF)<<0x12|(secondByte&0x3F)<<0xC|(thirdByte&0x3F)<<0x6|fourthByte&0x3F;if(tempCodePoint>0xFFFF&&tempCodePoint<0x110000){codePoint=tempCodePoint;}}}}if(codePoint===null){// we did not generate a valid codePoint so insert a
|
|
113
|
-
// replacement char (U+FFFD) and advance only 1 byte
|
|
114
|
-
codePoint=0xFFFD;bytesPerSequence=1;}else if(codePoint>0xFFFF){// encode to utf16 (surrogate pair dance)
|
|
115
|
-
codePoint-=0x10000;res.push(codePoint>>>10&0x3FF|0xD800);codePoint=0xDC00|codePoint&0x3FF;}res.push(codePoint);i+=bytesPerSequence;}return decodeCodePointsArray(res);}// Based on http://stackoverflow.com/a/22747272/680742, the browser with
|
|
116
|
-
// the lowest limit is Chrome, with 0x10000 args.
|
|
117
|
-
// We go 1 magnitude less, for safety
|
|
118
|
-
var MAX_ARGUMENTS_LENGTH=0x1000;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints);// avoid extra slice()
|
|
119
|
-
}// Decode in chunks to avoid "call stack size exceeded".
|
|
120
|
-
var res='';var i=0;while(i<len){res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));}return res;}function asciiSlice(buf,start,end){var ret='';end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i]&0x7F);}return ret;}function latin1Slice(buf,start,end){var ret='';end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i]);}return ret;}function hexSlice(buf,start,end){var len=buf.length;if(!start||start<0)start=0;if(!end||end<0||end>len)end=len;var out='';for(var i=start;i<end;++i){out+=toHex(buf[i]);}return out;}function utf16leSlice(buf,start,end){var bytes=buf.slice(start,end);var res='';for(var i=0;i<bytes.length;i+=2){res+=String.fromCharCode(bytes[i]+bytes[i+1]*256);}return res;}Buffer.prototype.slice=function slice(start,end){var len=this.length;start=~~start;end=end===undefined?len:~~end;if(start<0){start+=len;if(start<0)start=0;}else if(start>len){start=len;}if(end<0){end+=len;if(end<0)end=0;}else if(end>len){end=len;}if(end<start)end=start;var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT){newBuf=this.subarray(start,end);newBuf.__proto__=Buffer.prototype;}else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,undefined);for(var i=0;i<sliceLen;++i){newBuf[i]=this[i+start];}}return newBuf;};/*
|
|
121
|
-
* Need to make sure that buffer isn't trying to write out of bounds.
|
|
122
|
-
*/function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError('offset is not uint');if(offset+ext>length)throw new RangeError('Trying to access beyond buffer length');}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=0x100)){val+=this[offset+i]*mul;}return val;};Buffer.prototype.readUIntBE=function readUIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert){checkOffset(offset,byteLength,this.length);}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=0x100)){val+=this[offset+--byteLength]*mul;}return val;};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset];};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8;};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1];};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*0x1000000;};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*0x1000000+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3]);};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=0x100)){val+=this[offset+i]*mul;}mul*=0x80;if(val>=mul)val-=Math.pow(2,8*byteLength);return val;};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=0x100)){val+=this[offset+--i]*mul;}mul*=0x80;if(val>=mul)val-=Math.pow(2,8*byteLength);return val;};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&0x80))return this[offset];return(0xff-this[offset]+1)*-1;};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&0x8000?val|0xFFFF0000:val;};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&0x8000?val|0xFFFF0000:val;};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24;};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3];};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return read(this,offset,true,23,4);};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return read(this,offset,false,23,4);};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return read(this,offset,true,52,8);};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return read(this,offset,false,52,8);};function checkInt(buf,value,offset,ext,max,min){if(!internalIsBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError('Index out of range');}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0);}var mul=1;var i=0;this[offset]=value&0xFF;while(++i<byteLength&&(mul*=0x100)){this[offset+i]=value/mul&0xFF;}return offset+byteLength;};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0);}var i=byteLength-1;var mul=1;this[offset+i]=value&0xFF;while(--i>=0&&(mul*=0x100)){this[offset+i]=value/mul&0xFF;}return offset+byteLength;};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,0xff,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&0xff;return offset+1;};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=0xffff+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i<j;++i){buf[offset+i]=(value&0xff<<8*(littleEndian?i:1-i))>>>(littleEndian?i:1-i)*8;}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,0xffff,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&0xff;this[offset+1]=value>>>8;}else{objectWriteUInt16(this,value,offset,true);}return offset+2;};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,0xffff,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&0xff;}else{objectWriteUInt16(this,value,offset,false);}return offset+2;};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=0xffffffff+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i<j;++i){buf[offset+i]=value>>>(littleEndian?i:3-i)*8&0xff;}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,0xffffffff,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&0xff;}else{objectWriteUInt32(this,value,offset,true);}return offset+4;};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,0xffffffff,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&0xff;}else{objectWriteUInt32(this,value,offset,false);}return offset+4;};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit);}var i=0;var mul=1;var sub=0;this[offset]=value&0xFF;while(++i<byteLength&&(mul*=0x100)){if(value<0&&sub===0&&this[offset+i-1]!==0){sub=1;}this[offset+i]=(value/mul>>0)-sub&0xFF;}return offset+byteLength;};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit);}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&0xFF;while(--i>=0&&(mul*=0x100)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1;}this[offset+i]=(value/mul>>0)-sub&0xFF;}return offset+byteLength;};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,0x7f,-0x80);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=0xff+value+1;this[offset]=value&0xff;return offset+1;};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,0x7fff,-0x8000);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&0xff;this[offset+1]=value>>>8;}else{objectWriteUInt16(this,value,offset,true);}return offset+2;};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,0x7fff,-0x8000);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&0xff;}else{objectWriteUInt16(this,value,offset,false);}return offset+2;};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,0x7fffffff,-0x80000000);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&0xff;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24;}else{objectWriteUInt32(this,value,offset,true);}return offset+4;};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,0x7fffffff,-0x80000000);if(value<0)value=0xffffffff+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&0xff;}else{objectWriteUInt32(this,value,offset,false);}return offset+4;};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError('Index out of range');if(offset<0)throw new RangeError('Index out of range');}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4);}write(buf,value,offset,littleEndian,23,4);return offset+4;}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert);};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert);};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8);}write(buf,value,offset,littleEndian,52,8);return offset+8;}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert);};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert);};// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
|
123
|
-
Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end<start)end=start;// Copy 0 bytes; we're done
|
|
124
|
-
if(end===start)return 0;if(target.length===0||this.length===0)return 0;// Fatal error conditions
|
|
125
|
-
if(targetStart<0){throw new RangeError('targetStart out of bounds');}if(start<0||start>=this.length)throw new RangeError('sourceStart out of bounds');if(end<0)throw new RangeError('sourceEnd out of bounds');// Are we oob?
|
|
126
|
-
if(end>this.length)end=this.length;if(target.length-targetStart<end-start){end=target.length-targetStart+start;}var len=end-start;var i;if(this===target&&start<targetStart&&targetStart<end){// descending copy from end
|
|
127
|
-
for(i=len-1;i>=0;--i){target[i+targetStart]=this[i+start];}}else if(len<1000||!Buffer.TYPED_ARRAY_SUPPORT){// ascending copy from start
|
|
128
|
-
for(i=0;i<len;++i){target[i+targetStart]=this[i+start];}}else{Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart);}return len;};// Usage:
|
|
129
|
-
// buffer.fill(number[, offset[, end]])
|
|
130
|
-
// buffer.fill(buffer[, offset[, end]])
|
|
131
|
-
// buffer.fill(string[, offset[, end]][, encoding])
|
|
132
|
-
Buffer.prototype.fill=function fill(val,start,end,encoding){// Handle string cases:
|
|
133
|
-
if(typeof val==='string'){if(typeof start==='string'){encoding=start;start=0;end=this.length;}else if(typeof end==='string'){encoding=end;end=this.length;}if(val.length===1){var code=val.charCodeAt(0);if(code<256){val=code;}}if(encoding!==undefined&&typeof encoding!=='string'){throw new TypeError('encoding must be a string');}if(typeof encoding==='string'&&!Buffer.isEncoding(encoding)){throw new TypeError('Unknown encoding: '+encoding);}}else if(typeof val==='number'){val=val&255;}// Invalid ranges are not set to a default, so can range check early.
|
|
134
|
-
if(start<0||this.length<start||this.length<end){throw new RangeError('Out of range index');}if(end<=start){return this;}start=start>>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==='number'){for(i=start;i<end;++i){this[i]=val;}}else{var bytes=internalIsBuffer(val)?val:utf8ToBytes(new Buffer(val,encoding).toString());var len=bytes.length;for(i=0;i<end-start;++i){this[i+start]=bytes[i%len];}}return this;};// HELPER FUNCTIONS
|
|
135
|
-
// ================
|
|
136
|
-
var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;function base64clean(str){// Node strips out invalid characters like \n and \t from the string, base64-js does not
|
|
137
|
-
str=stringtrim(str).replace(INVALID_BASE64_RE,'');// Node converts strings with length < 2 to ''
|
|
138
|
-
if(str.length<2)return'';// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
|
|
139
|
-
while(str.length%4!==0){str=str+'=';}return str;}function stringtrim(str){if(str.trim)return str.trim();return str.replace(/^\s+|\s+$/g,'');}function toHex(n){if(n<16)return'0'+n.toString(16);return n.toString(16);}function utf8ToBytes(string,units){units=units||Infinity;var codePoint;var length=string.length;var leadSurrogate=null;var bytes=[];for(var i=0;i<length;++i){codePoint=string.charCodeAt(i);// is surrogate component
|
|
140
|
-
if(codePoint>0xD7FF&&codePoint<0xE000){// last char was a lead
|
|
141
|
-
if(!leadSurrogate){// no lead yet
|
|
142
|
-
if(codePoint>0xDBFF){// unexpected trail
|
|
143
|
-
if((units-=3)>-1)bytes.push(0xEF,0xBF,0xBD);continue;}else if(i+1===length){// unpaired lead
|
|
144
|
-
if((units-=3)>-1)bytes.push(0xEF,0xBF,0xBD);continue;}// valid lead
|
|
145
|
-
leadSurrogate=codePoint;continue;}// 2 leads in a row
|
|
146
|
-
if(codePoint<0xDC00){if((units-=3)>-1)bytes.push(0xEF,0xBF,0xBD);leadSurrogate=codePoint;continue;}// valid surrogate pair
|
|
147
|
-
codePoint=(leadSurrogate-0xD800<<10|codePoint-0xDC00)+0x10000;}else if(leadSurrogate){// valid bmp char, but last char was a lead
|
|
148
|
-
if((units-=3)>-1)bytes.push(0xEF,0xBF,0xBD);}leadSurrogate=null;// encode utf8
|
|
149
|
-
if(codePoint<0x80){if((units-=1)<0)break;bytes.push(codePoint);}else if(codePoint<0x800){if((units-=2)<0)break;bytes.push(codePoint>>0x6|0xC0,codePoint&0x3F|0x80);}else if(codePoint<0x10000){if((units-=3)<0)break;bytes.push(codePoint>>0xC|0xE0,codePoint>>0x6&0x3F|0x80,codePoint&0x3F|0x80);}else if(codePoint<0x110000){if((units-=4)<0)break;bytes.push(codePoint>>0x12|0xF0,codePoint>>0xC&0x3F|0x80,codePoint>>0x6&0x3F|0x80,codePoint&0x3F|0x80);}else{throw new Error('Invalid code point');}}return bytes;}function asciiToBytes(str){var byteArray=[];for(var i=0;i<str.length;++i){// Node's code seems to be doing this and not & 0x7F..
|
|
150
|
-
byteArray.push(str.charCodeAt(i)&0xFF);}return byteArray;}function utf16leToBytes(str,units){var c,hi,lo;var byteArray=[];for(var i=0;i<str.length;++i){if((units-=2)<0)break;c=str.charCodeAt(i);hi=c>>8;lo=c%256;byteArray.push(lo);byteArray.push(hi);}return byteArray;}function base64ToBytes(str){return toByteArray(base64clean(str));}function blitBuffer(src,dst,offset,length){for(var i=0;i<length;++i){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i];}return i;}function isnan(val){return val!==val;// eslint-disable-line no-self-compare
|
|
151
|
-
}// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence
|
|
152
|
-
// The _isBuffer check is for Safari 5-7 support, because it's missing
|
|
153
|
-
// Object.prototype.constructor. Remove this eventually
|
|
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));}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
|
|
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 _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:{};// shim for using process in browser
|
|
177
2
|
// based off https://github.com/defunctzombie/node-process/blob/master/browser.js
|
|
178
3
|
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
|
|
179
4
|
return setTimeout(fun,0);}// if setTimeout wasn't available but was latter defined
|
|
@@ -192,13 +17,13 @@ var versions={};var release={};var config={};function noop$1(){}var on=noop$1;va
|
|
|
192
17
|
var performance=global$1.performance||{};var performanceNow=performance.now||performance.mozNow||performance.msNow||performance.oNow||performance.webkitNow||function(){return new Date().getTime();};// generate timestamp or delta
|
|
193
18
|
// see http://nodejs.org/api/process.html#process_process_hrtime
|
|
194
19
|
function hrtime(previousTimestamp){var clocktime=performanceNow.call(performance)*1e-3;var seconds=Math.floor(clocktime);var nanoseconds=Math.floor(clocktime%1*1e9);if(previousTimestamp){seconds=seconds-previousTimestamp[0];nanoseconds=nanoseconds-previousTimestamp[1];if(nanoseconds<0){seconds--;nanoseconds+=1e9;}}return[seconds,nanoseconds];}var startTime=new Date();function uptime(){var currentTime=new Date();var dif=currentTime-startTime;return dif/1000;}var process={nextTick:nextTick,title:title,browser:browser,env:env,argv:argv,version:version,versions:versions,on:on,addListener:addListener,once:once,off:off,removeListener:removeListener,removeAllListeners:removeAllListeners,emit:emit,binding:binding,cwd:cwd,chdir:chdir,umask:umask,hrtime:hrtime,platform:platform$2,release:release,config:config,uptime:uptime};function bind(fn,thisArg){return function wrap(){return fn.apply(thisArg,arguments);};}// utils is a library of generic helper functions non-specific to axios
|
|
195
|
-
var toString=Object.prototype.toString;var getPrototypeOf=Object.getPrototypeOf;var kindOf=function(cache){return function(thing){var str=toString.call(thing);return cache[str]||(cache[str]=str.slice(8,-1).toLowerCase());};}(Object.create(null));var kindOfTest=function kindOfTest(type){type=type.toLowerCase();return function(thing){return kindOf(thing)===type;};};var typeOfTest=function typeOfTest(type){return function(thing){return _typeof(thing)===type;};};/**
|
|
20
|
+
var toString$1=Object.prototype.toString;var getPrototypeOf=Object.getPrototypeOf;var kindOf=function(cache){return function(thing){var str=toString$1.call(thing);return cache[str]||(cache[str]=str.slice(8,-1).toLowerCase());};}(Object.create(null));var kindOfTest=function kindOfTest(type){type=type.toLowerCase();return function(thing){return kindOf(thing)===type;};};var typeOfTest=function typeOfTest(type){return function(thing){return _typeof(thing)===type;};};/**
|
|
196
21
|
* Determine if a value is an Array
|
|
197
22
|
*
|
|
198
23
|
* @param {Object} val The value to test
|
|
199
24
|
*
|
|
200
25
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
201
|
-
*/var isArray=Array.isArray;/**
|
|
26
|
+
*/var isArray$1=Array.isArray;/**
|
|
202
27
|
* Determine if a value is undefined
|
|
203
28
|
*
|
|
204
29
|
* @param {*} val The value to test
|
|
@@ -210,7 +35,7 @@ var toString=Object.prototype.toString;var getPrototypeOf=Object.getPrototypeOf;
|
|
|
210
35
|
* @param {*} val The value to test
|
|
211
36
|
*
|
|
212
37
|
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
213
|
-
*/function isBuffer(val){return val!==null&&!isUndefined(val)&&val.constructor!==null&&!isUndefined(val.constructor)&&isFunction(val.constructor.isBuffer)&&val.constructor.isBuffer(val);}/**
|
|
38
|
+
*/function isBuffer$1(val){return val!==null&&!isUndefined(val)&&val.constructor!==null&&!isUndefined(val.constructor)&&isFunction(val.constructor.isBuffer)&&val.constructor.isBuffer(val);}/**
|
|
214
39
|
* Determine if a value is an ArrayBuffer
|
|
215
40
|
*
|
|
216
41
|
* @param {*} val The value to test
|
|
@@ -321,7 +146,7 @@ kind==='object'&&isFunction(thing.toString)&&thing.toString()==='[object FormDat
|
|
|
321
146
|
* @returns {any}
|
|
322
147
|
*/function forEach(obj,fn){var _ref3=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},_ref3$allOwnKeys=_ref3.allOwnKeys,allOwnKeys=_ref3$allOwnKeys===void 0?false:_ref3$allOwnKeys;// Don't bother if no value provided
|
|
323
148
|
if(obj===null||typeof obj==='undefined'){return;}var i;var l;// Force an array if not already something iterable
|
|
324
|
-
if(_typeof(obj)!=='object'){/*eslint no-param-reassign:0*/obj=[obj];}if(isArray(obj)){// Iterate over array values
|
|
149
|
+
if(_typeof(obj)!=='object'){/*eslint no-param-reassign:0*/obj=[obj];}if(isArray$1(obj)){// Iterate over array values
|
|
325
150
|
for(i=0,l=obj.length;i<l;i++){fn.call(null,obj[i],i,obj);}}else{// Iterate over object keys
|
|
326
151
|
var keys=allOwnKeys?Object.getOwnPropertyNames(obj):Object.keys(obj);var len=keys.length;var key;for(i=0;i<len;i++){key=keys[i];fn.call(null,obj[key],key,obj);}}}function findKey(obj,key){key=key.toLowerCase();var keys=Object.keys(obj);var i=keys.length;var _key;while(i-->0){_key=keys[i];if(key===_key.toLowerCase()){return _key;}}return null;}var _global=function(){/*eslint no-undef:0*/if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=='undefined'?window:global$1;}();var isContextDefined=function isContextDefined(context){return!isUndefined(context)&&context!==_global;};/**
|
|
327
152
|
* Accepts varargs expecting each argument to be an object, then
|
|
@@ -340,7 +165,7 @@ var keys=allOwnKeys?Object.getOwnPropertyNames(obj):Object.keys(obj);var len=key
|
|
|
340
165
|
* @param {Object} obj1 Object to merge
|
|
341
166
|
*
|
|
342
167
|
* @returns {Object} Result of all merge properties
|
|
343
|
-
*/function merge(/* obj1, obj2, obj3, ... */){var _ref4=isContextDefined(this)&&this||{},caseless=_ref4.caseless;var result={};var assignValue=function assignValue(val,key){var targetKey=caseless&&findKey(result,key)||key;if(isPlainObject(result[targetKey])&&isPlainObject(val)){result[targetKey]=merge(result[targetKey],val);}else if(isPlainObject(val)){result[targetKey]=merge({},val);}else if(isArray(val)){result[targetKey]=val.slice();}else{result[targetKey]=val;}};for(var i=0,l=arguments.length;i<l;i++){arguments[i]&&forEach(arguments[i],assignValue);}return result;}/**
|
|
168
|
+
*/function merge(/* obj1, obj2, obj3, ... */){var _ref4=isContextDefined(this)&&this||{},caseless=_ref4.caseless;var result={};var assignValue=function assignValue(val,key){var targetKey=caseless&&findKey(result,key)||key;if(isPlainObject(result[targetKey])&&isPlainObject(val)){result[targetKey]=merge(result[targetKey],val);}else if(isPlainObject(val)){result[targetKey]=merge({},val);}else if(isArray$1(val)){result[targetKey]=val.slice();}else{result[targetKey]=val;}};for(var i=0,l=arguments.length;i<l;i++){arguments[i]&&forEach(arguments[i],assignValue);}return result;}/**
|
|
344
169
|
* Extends object a by mutably adding to it the properties of object b.
|
|
345
170
|
*
|
|
346
171
|
* @param {Object} a The object to be extended
|
|
@@ -386,7 +211,7 @@ if(sourceObj==null)return destObj;do{props=Object.getOwnPropertyNames(sourceObj)
|
|
|
386
211
|
* @param {*} [thing]
|
|
387
212
|
*
|
|
388
213
|
* @returns {?Array}
|
|
389
|
-
*/var toArray=function toArray(thing){if(!thing)return null;if(isArray(thing))return thing;var i=thing.length;if(!isNumber(i))return null;var arr=new Array(i);while(i-->0){arr[i]=thing[i];}return arr;};/**
|
|
214
|
+
*/var toArray=function toArray(thing){if(!thing)return null;if(isArray$1(thing))return thing;var i=thing.length;if(!isNumber(i))return null;var arr=new Array(i);while(i-->0){arr[i]=thing[i];}return arr;};/**
|
|
390
215
|
* Checking if the Uint8Array exists and if it does, it returns a function that checks if the
|
|
391
216
|
* thing passed in is an instance of Uint8Array
|
|
392
217
|
*
|
|
@@ -419,17 +244,171 @@ return function(thing){return TypedArray&&thing instanceof TypedArray;};}(typeof
|
|
|
419
244
|
* Makes all methods read-only
|
|
420
245
|
* @param {Object} obj
|
|
421
246
|
*/var freezeMethods=function freezeMethods(obj){reduceDescriptors(obj,function(descriptor,name){// skip restricted props in strict mode
|
|
422
|
-
if(isFunction(obj)&&['arguments','caller','callee'].indexOf(name)!==-1){return false;}var value=obj[name];if(!isFunction(value))return;descriptor.enumerable=false;if('writable'in descriptor){descriptor.writable=false;return;}if(!descriptor.set){descriptor.set=function(){throw Error('Can not rewrite read-only method \''+name+'\'');};}});};var toObjectSet=function toObjectSet(arrayOrString,delimiter){var obj={};var define=function define(arr){arr.forEach(function(value){obj[value]=true;});};isArray(arrayOrString)?define(arrayOrString):define(String(arrayOrString).split(delimiter));return obj;};var noop=function noop(){};var toFiniteNumber=function toFiniteNumber(value,defaultValue){return value!=null&&Number.isFinite(value=+value)?value:defaultValue;};var ALPHA='abcdefghijklmnopqrstuvwxyz';var DIGIT='0123456789';var ALPHABET={DIGIT:DIGIT,ALPHA:ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT};var generateString=function generateString(){var size=arguments.length>0&&arguments[0]!==undefined?arguments[0]:16;var alphabet=arguments.length>1&&arguments[1]!==undefined?arguments[1]:ALPHABET.ALPHA_DIGIT;var str='';var length=alphabet.length;while(size--){str+=alphabet[Math.random()*length|0];}return str;};/**
|
|
247
|
+
if(isFunction(obj)&&['arguments','caller','callee'].indexOf(name)!==-1){return false;}var value=obj[name];if(!isFunction(value))return;descriptor.enumerable=false;if('writable'in descriptor){descriptor.writable=false;return;}if(!descriptor.set){descriptor.set=function(){throw Error('Can not rewrite read-only method \''+name+'\'');};}});};var toObjectSet=function toObjectSet(arrayOrString,delimiter){var obj={};var define=function define(arr){arr.forEach(function(value){obj[value]=true;});};isArray$1(arrayOrString)?define(arrayOrString):define(String(arrayOrString).split(delimiter));return obj;};var noop=function noop(){};var toFiniteNumber=function toFiniteNumber(value,defaultValue){return value!=null&&Number.isFinite(value=+value)?value:defaultValue;};var ALPHA='abcdefghijklmnopqrstuvwxyz';var DIGIT='0123456789';var ALPHABET={DIGIT:DIGIT,ALPHA:ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT};var generateString=function generateString(){var size=arguments.length>0&&arguments[0]!==undefined?arguments[0]:16;var alphabet=arguments.length>1&&arguments[1]!==undefined?arguments[1]:ALPHABET.ALPHA_DIGIT;var str='';var length=alphabet.length;while(size--){str+=alphabet[Math.random()*length|0];}return str;};/**
|
|
423
248
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
424
249
|
*
|
|
425
250
|
* @param {unknown} thing - The thing to check.
|
|
426
251
|
*
|
|
427
252
|
* @returns {boolean}
|
|
428
|
-
*/function isSpecCompliantForm(thing){return!!(thing&&isFunction(thing.append)&&thing[Symbol.toStringTag]==='FormData'&&thing[Symbol.iterator]);}var toJSONObject=function toJSONObject(obj){var stack=new Array(10);var _visit=function visit(source,i){if(isObject(source)){if(stack.indexOf(source)>=0){return;}if(!('toJSON'in source)){stack[i]=source;var target=isArray(source)?[]:{};forEach(source,function(value,key){var reducedValue=_visit(value,i+1);!isUndefined(reducedValue)&&(target[key]=reducedValue);});stack[i]=undefined;return target;}}return source;};return _visit(obj,0);};var isAsyncFn=kindOfTest('AsyncFunction');var isThenable=function isThenable(thing){return thing&&(isObject(thing)||isFunction(thing))&&isFunction(thing.then)&&isFunction(thing["catch"]);};// original code
|
|
253
|
+
*/function isSpecCompliantForm(thing){return!!(thing&&isFunction(thing.append)&&thing[Symbol.toStringTag]==='FormData'&&thing[Symbol.iterator]);}var toJSONObject=function toJSONObject(obj){var stack=new Array(10);var _visit=function visit(source,i){if(isObject(source)){if(stack.indexOf(source)>=0){return;}if(!('toJSON'in source)){stack[i]=source;var target=isArray$1(source)?[]:{};forEach(source,function(value,key){var reducedValue=_visit(value,i+1);!isUndefined(reducedValue)&&(target[key]=reducedValue);});stack[i]=undefined;return target;}}return source;};return _visit(obj,0);};var isAsyncFn=kindOfTest('AsyncFunction');var isThenable=function isThenable(thing){return thing&&(isObject(thing)||isFunction(thing))&&isFunction(thing.then)&&isFunction(thing["catch"]);};// original code
|
|
429
254
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
430
255
|
var _setImmediate=function(setImmediateSupported,postMessageSupported){if(setImmediateSupported){return setImmediate;}return postMessageSupported?function(token,callbacks){_global.addEventListener("message",function(_ref7){var source=_ref7.source,data=_ref7.data;if(source===_global&&data===token){callbacks.length&&callbacks.shift()();}},false);return function(cb){callbacks.push(cb);_global.postMessage(token,"*");};}("axios@".concat(Math.random()),[]):function(cb){return setTimeout(cb);};}(typeof setImmediate==='function',isFunction(_global.postMessage));var asap=typeof queueMicrotask!=='undefined'?queueMicrotask.bind(_global):typeof process!=='undefined'&&nextTick||_setImmediate;// *********************
|
|
431
|
-
var utils$1={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isReadableStream:isReadableStream,isRequest:isRequest,isResponse:isResponse,isHeaders:isHeaders,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,// an alias to avoid ESLint no-prototype-builtins detection
|
|
432
|
-
reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,ALPHABET:ALPHABET,generateString:generateString,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable,setImmediate:_setImmediate,asap:asap}
|
|
256
|
+
var utils$1={isArray:isArray$1,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer$1,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isReadableStream:isReadableStream,isRequest:isRequest,isResponse:isResponse,isHeaders:isHeaders,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,// an alias to avoid ESLint no-prototype-builtins detection
|
|
257
|
+
reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,ALPHABET:ALPHABET,generateString:generateString,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable,setImmediate:_setImmediate,asap:asap};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)
|
|
258
|
+
// if there are two placeholders, than the two characters before it
|
|
259
|
+
// represent one byte
|
|
260
|
+
// if there is only one, then the three characters before it represent 2 bytes
|
|
261
|
+
// this is just a cheap hack to not do indexOf twice
|
|
262
|
+
placeHolders=b64[len-2]==='='?2:b64[len-1]==='='?1:0;// base64 is 4/3 + up to two characters of the original data
|
|
263
|
+
arr=new Arr(len*3/4-placeHolders);// if there are placeholders, only get up to the last complete 4 chars
|
|
264
|
+
l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i<l;i+=4,j+=3){tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)];arr[L++]=tmp>>16&0xFF;arr[L++]=tmp>>8&0xFF;arr[L++]=tmp&0xFF;}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&0xFF;}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&0xFF;arr[L++]=tmp&0xFF;}return arr;}function tripletToBase64(num){return lookup[num>>18&0x3F]+lookup[num>>12&0x3F]+lookup[num>>6&0x3F]+lookup[num&0x3F];}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;i<end;i+=3){tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2];output.push(tripletToBase64(tmp));}return output.join('');}function fromByteArray(uint8){if(!inited){init();}var tmp;var len=uint8.length;var extraBytes=len%3;// if we have 1 byte left, pad 2 bytes
|
|
265
|
+
var output='';var parts=[];var maxChunkLength=16383;// must be multiple of 3
|
|
266
|
+
// go through the array every three bytes, we'll deal with trailing stuff later
|
|
267
|
+
for(var i=0,len2=len-extraBytes;i<len2;i+=maxChunkLength){parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength));}// pad the end with zeros, but make sure to not forget the extra bytes
|
|
268
|
+
if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&0x3F];output+='==';}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&0x3F];output+=lookup[tmp<<2&0x3F];output+='=';}parts.push(output);return parts.join('');}function read(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias;}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity;}else{m=m+Math.pow(2,mLen);e=e-eBias;}return(s?-1:1)*m*Math.pow(2,e-mLen);}function write(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax;}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2;}if(e+eBias>=1){value+=rt/c;}else{value+=rt*Math.pow(2,1-eBias);}if(value*c>=2){e++;c/=2;}if(e+eBias>=eMax){m=0;e=eMax;}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias;}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0;}}for(;mLen>=8;buffer[offset+i]=m&0xff,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&0xff,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128;}var toString={}.toString;var isArray=Array.isArray||function(arr){return toString.call(arr)=='[object Array]';};var INSPECT_MAX_BYTES=50;/**
|
|
269
|
+
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
|
270
|
+
* === true Use Uint8Array implementation (fastest)
|
|
271
|
+
* === false Use Object implementation (most compatible, even IE6)
|
|
272
|
+
*
|
|
273
|
+
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
|
|
274
|
+
* Opera 11.6+, iOS 4.2+.
|
|
275
|
+
*
|
|
276
|
+
* Due to various browser bugs, sometimes the Object implementation will be used even
|
|
277
|
+
* when the browser supports typed arrays.
|
|
278
|
+
*
|
|
279
|
+
* Note:
|
|
280
|
+
*
|
|
281
|
+
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
|
|
282
|
+
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
|
|
283
|
+
*
|
|
284
|
+
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
|
|
285
|
+
*
|
|
286
|
+
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
|
|
287
|
+
* incorrect length in some situations.
|
|
288
|
+
|
|
289
|
+
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
|
|
290
|
+
* get the Object implementation, which is slower but behaves correctly.
|
|
291
|
+
*/Buffer.TYPED_ARRAY_SUPPORT=global$1.TYPED_ARRAY_SUPPORT!==undefined?global$1.TYPED_ARRAY_SUPPORT:true;/*
|
|
292
|
+
* Export kMaxLength after typed array support is determined.
|
|
293
|
+
*/kMaxLength();function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?0x7fffffff:0x3fffffff;}function createBuffer(that,length){if(kMaxLength()<length){throw new RangeError('Invalid typed array length');}if(Buffer.TYPED_ARRAY_SUPPORT){// Return an augmented `Uint8Array` instance, for best performance
|
|
294
|
+
that=new Uint8Array(length);that.__proto__=Buffer.prototype;}else{// Fallback: Return an object instance of the Buffer class
|
|
295
|
+
if(that===null){that=new Buffer(length);}that.length=length;}return that;}/**
|
|
296
|
+
* The Buffer constructor returns instances of `Uint8Array` that have their
|
|
297
|
+
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
|
|
298
|
+
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
|
|
299
|
+
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
|
|
300
|
+
* returns a single octet.
|
|
301
|
+
*
|
|
302
|
+
* The `Uint8Array` prototype remains unmodified.
|
|
303
|
+
*/function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.
|
|
304
|
+
if(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}Buffer.poolSize=8192;// not used by this implementation
|
|
305
|
+
// TODO: Legacy, not needed anymore. Remove in next major version.
|
|
306
|
+
Buffer._augment=function(arr){arr.__proto__=Buffer.prototype;return arr;};function from(that,value,encodingOrOffset,length){if(typeof value==='number'){throw new TypeError('"value" argument must not be a number');}if(typeof ArrayBuffer!=='undefined'&&value instanceof ArrayBuffer){return fromArrayBuffer(that,value,encodingOrOffset,length);}if(typeof value==='string'){return fromString(that,value,encodingOrOffset);}return fromObject(that,value);}/**
|
|
307
|
+
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
|
|
308
|
+
* if value is a number.
|
|
309
|
+
* Buffer.from(str[, encoding])
|
|
310
|
+
* Buffer.from(array)
|
|
311
|
+
* Buffer.from(buffer)
|
|
312
|
+
* Buffer.from(arrayBuffer[, byteOffset[, length]])
|
|
313
|
+
**/Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length);};if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;if(typeof Symbol!=='undefined'&&Symbol.species&&Buffer[Symbol.species]===Buffer);}function assertSize(size){if(typeof size!=='number'){throw new TypeError('"size" argument must be a number');}else if(size<0){throw new RangeError('"size" argument must not be negative');}}function alloc(that,size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(that,size);}if(fill!==undefined){// Only pay attention to encoding if it's a string. This
|
|
314
|
+
// prevents accidentally sending in a number that would
|
|
315
|
+
// be interpretted as a start offset.
|
|
316
|
+
return typeof encoding==='string'?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill);}return createBuffer(that,size);}/**
|
|
317
|
+
* Creates a new filled Buffer instance.
|
|
318
|
+
* alloc(size[, fill[, encoding]])
|
|
319
|
+
**/Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding);};function allocUnsafe(that,size){assertSize(size);that=createBuffer(that,size<0?0:checked(size)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i<size;++i){that[i]=0;}}return that;}/**
|
|
320
|
+
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
|
|
321
|
+
* */Buffer.allocUnsafe=function(size){return allocUnsafe(null,size);};/**
|
|
322
|
+
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
|
|
323
|
+
*/Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size);};function fromString(that,string,encoding){if(typeof encoding!=='string'||encoding===''){encoding='utf8';}if(!Buffer.isEncoding(encoding)){throw new TypeError('"encoding" must be a valid string encoding');}var length=byteLength(string,encoding)|0;that=createBuffer(that,length);var actual=that.write(string,encoding);if(actual!==length){// Writing a hex string, for example, that contains invalid characters will
|
|
324
|
+
// cause everything after the first invalid character to be ignored. (e.g.
|
|
325
|
+
// 'abxxcd' will be treated as 'ab')
|
|
326
|
+
that=that.slice(0,actual);}return that;}function fromArrayLike(that,array){var length=array.length<0?0:checked(array.length)|0;that=createBuffer(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255;}return that;}function fromArrayBuffer(that,array,byteOffset,length){array.byteLength;// this throws if `array` is not a valid ArrayBuffer
|
|
327
|
+
if(byteOffset<0||array.byteLength<byteOffset){throw new RangeError('\'offset\' is out of bounds');}if(array.byteLength<byteOffset+(length||0)){throw new RangeError('\'length\' is out of bounds');}if(byteOffset===undefined&&length===undefined){array=new Uint8Array(array);}else if(length===undefined){array=new Uint8Array(array,byteOffset);}else{array=new Uint8Array(array,byteOffset,length);}if(Buffer.TYPED_ARRAY_SUPPORT){// Return an augmented `Uint8Array` instance, for best performance
|
|
328
|
+
that=array;that.__proto__=Buffer.prototype;}else{// Fallback: Return an object instance of the Buffer class
|
|
329
|
+
that=fromArrayLike(that,array);}return that;}function fromObject(that,obj){if(internalIsBuffer(obj)){var len=checked(obj.length)|0;that=createBuffer(that,len);if(that.length===0){return that;}obj.copy(that,0,0,len);return that;}if(obj){if(typeof ArrayBuffer!=='undefined'&&obj.buffer instanceof ArrayBuffer||'length'in obj){if(typeof obj.length!=='number'||isnan(obj.length)){return createBuffer(that,0);}return fromArrayLike(that,obj);}if(obj.type==='Buffer'&&isArray(obj.data)){return fromArrayLike(that,obj.data);}}throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');}function checked(length){// Note: cannot use `length < kMaxLength()` here because that fails when
|
|
330
|
+
// length is NaN (which is otherwise coerced to zero.)
|
|
331
|
+
if(length>=kMaxLength()){throw new RangeError('Attempt to allocate Buffer larger than maximum '+'size: 0x'+kMaxLength().toString(16)+' bytes');}return length|0;}Buffer.isBuffer=isBuffer;function internalIsBuffer(b){return!!(b!=null&&b._isBuffer);}Buffer.compare=function compare(a,b){if(!internalIsBuffer(a)||!internalIsBuffer(b)){throw new TypeError('Arguments must be Buffers');}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i<len;++i){if(a[i]!==b[i]){x=a[i];y=b[i];break;}}if(x<y)return-1;if(y<x)return 1;return 0;};Buffer.isEncoding=function isEncoding(encoding){switch(String(encoding).toLowerCase()){case'hex':case'utf8':case'utf-8':case'ascii':case'latin1':case'binary':case'base64':case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return true;default:return false;}};Buffer.concat=function concat(list,length){if(!isArray(list)){throw new TypeError('"list" argument must be an Array of Buffers');}if(list.length===0){return Buffer.alloc(0);}var i;if(length===undefined){length=0;for(i=0;i<list.length;++i){length+=list[i].length;}}var buffer=Buffer.allocUnsafe(length);var pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!internalIsBuffer(buf)){throw new TypeError('"list" argument must be an Array of Buffers');}buf.copy(buffer,pos);pos+=buf.length;}return buffer;};function byteLength(string,encoding){if(internalIsBuffer(string)){return string.length;}if(typeof ArrayBuffer!=='undefined'&&typeof ArrayBuffer.isView==='function'&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer)){return string.byteLength;}if(typeof string!=='string'){string=''+string;}var len=string.length;if(len===0)return 0;// Use a for loop to avoid recursion
|
|
332
|
+
var loweredCase=false;for(;;){switch(encoding){case'ascii':case'latin1':case'binary':return len;case'utf8':case'utf-8':case undefined:return utf8ToBytes(string).length;case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return len*2;case'hex':return len>>>1;case'base64':return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;// assume utf8
|
|
333
|
+
encoding=(''+encoding).toLowerCase();loweredCase=true;}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
|
|
334
|
+
// property of a typed array.
|
|
335
|
+
// This behaves neither like String nor Uint8Array in that we set start/end
|
|
336
|
+
// to their upper/lower bounds if the value passed is out of range.
|
|
337
|
+
// undefined is handled specially as per ECMA-262 6th Edition,
|
|
338
|
+
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
|
|
339
|
+
if(start===undefined||start<0){start=0;}// Return early if start > this.length. Done here to prevent potential uint32
|
|
340
|
+
// coercion fail below.
|
|
341
|
+
if(start>this.length){return'';}if(end===undefined||end>this.length){end=this.length;}if(end<=0){return'';}// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
|
|
342
|
+
end>>>=0;start>>>=0;if(end<=start){return'';}if(!encoding)encoding='utf8';while(true){switch(encoding){case'hex':return hexSlice(this,start,end);case'utf8':case'utf-8':return utf8Slice(this,start,end);case'ascii':return asciiSlice(this,start,end);case'latin1':case'binary':return latin1Slice(this,start,end);case'base64':return base64Slice(this,start,end);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError('Unknown encoding: '+encoding);encoding=(encoding+'').toLowerCase();loweredCase=true;}}}// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
|
|
343
|
+
// Buffer instances.
|
|
344
|
+
Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i;}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError('Buffer size must be a multiple of 16-bits');}for(var i=0;i<len;i+=2){swap(this,i,i+1);}return this;};Buffer.prototype.swap32=function swap32(){var len=this.length;if(len%4!==0){throw new RangeError('Buffer size must be a multiple of 32-bits');}for(var i=0;i<len;i+=4){swap(this,i,i+3);swap(this,i+1,i+2);}return this;};Buffer.prototype.swap64=function swap64(){var len=this.length;if(len%8!==0){throw new RangeError('Buffer size must be a multiple of 64-bits');}for(var i=0;i<len;i+=8){swap(this,i,i+7);swap(this,i+1,i+6);swap(this,i+2,i+5);swap(this,i+3,i+4);}return this;};Buffer.prototype.toString=function toString(){var length=this.length|0;if(length===0)return'';if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments);};Buffer.prototype.equals=function equals(b){if(!internalIsBuffer(b))throw new TypeError('Argument must be a Buffer');if(this===b)return true;return Buffer.compare(this,b)===0;};Buffer.prototype.inspect=function inspect(){var str='';var max=INSPECT_MAX_BYTES;if(this.length>0){str=this.toString('hex',0,max).match(/.{2}/g).join(' ');if(this.length>max)str+=' ... ';}return'<Buffer '+str+'>';};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!internalIsBuffer(target)){throw new TypeError('Argument must be a Buffer');}if(start===undefined){start=0;}if(end===undefined){end=target?target.length:0;}if(thisStart===undefined){thisStart=0;}if(thisEnd===undefined){thisEnd=this.length;}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError('out of range index');}if(thisStart>=thisEnd&&start>=end){return 0;}if(thisStart>=thisEnd){return-1;}if(start>=end){return 1;}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i<len;++i){if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i];y=targetCopy[i];break;}}if(x<y)return-1;if(y<x)return 1;return 0;};// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
|
|
345
|
+
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
|
|
346
|
+
//
|
|
347
|
+
// Arguments:
|
|
348
|
+
// - buffer - a Buffer to search
|
|
349
|
+
// - val - a string, Buffer, or number
|
|
350
|
+
// - byteOffset - an index into `buffer`; will be clamped to an int32
|
|
351
|
+
// - encoding - an optional encoding, relevant is val is a string
|
|
352
|
+
// - dir - true for indexOf, false for lastIndexOf
|
|
353
|
+
function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){// Empty buffer means no match
|
|
354
|
+
if(buffer.length===0)return-1;// Normalize byteOffset
|
|
355
|
+
if(typeof byteOffset==='string'){encoding=byteOffset;byteOffset=0;}else if(byteOffset>0x7fffffff){byteOffset=0x7fffffff;}else if(byteOffset<-0x80000000){byteOffset=-0x80000000;}byteOffset=+byteOffset;// Coerce to Number.
|
|
356
|
+
if(isNaN(byteOffset)){// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
|
|
357
|
+
byteOffset=dir?0:buffer.length-1;}// Normalize byteOffset: negative offsets start from the end of the buffer
|
|
358
|
+
if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1;}else if(byteOffset<0){if(dir)byteOffset=0;else return-1;}// Normalize val
|
|
359
|
+
if(typeof val==='string'){val=Buffer.from(val,encoding);}// Finally, search either indexOf (if dir is true) or lastIndexOf
|
|
360
|
+
if(internalIsBuffer(val)){// Special case: looking for empty string/buffer always fails
|
|
361
|
+
if(val.length===0){return-1;}return arrayIndexOf(buffer,val,byteOffset,encoding,dir);}else if(typeof val==='number'){val=val&0xFF;// Search for a byte value [0-255]
|
|
362
|
+
if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==='function'){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset);}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset);}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir);}throw new TypeError('val must be string, number or Buffer');}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==='ucs2'||encoding==='ucs-2'||encoding==='utf16le'||encoding==='utf-16le'){if(arr.length<2||val.length<2){return-1;}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2;}}function read(buf,i){if(indexSize===1){return buf[i];}else{return buf.readUInt16BE(i*indexSize);}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++){if(read(arr,i)===read(val,foundIndex===-1?0:i-foundIndex)){if(foundIndex===-1)foundIndex=i;if(i-foundIndex+1===valLength)return foundIndex*indexSize;}else{if(foundIndex!==-1)i-=i-foundIndex;foundIndex=-1;}}}else{if(byteOffset+valLength>arrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;j<valLength;j++){if(read(arr,i+j)!==read(val,j)){found=false;break;}}if(found)return i;}}return-1;}Buffer.prototype.includes=function includes(val,byteOffset,encoding){return this.indexOf(val,byteOffset,encoding)!==-1;};Buffer.prototype.indexOf=function indexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,true);};Buffer.prototype.lastIndexOf=function lastIndexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,false);};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;if(!length){length=remaining;}else{length=Number(length);if(length>remaining){length=remaining;}}// must be an even number of digits
|
|
363
|
+
var strLen=string.length;if(strLen%2!==0)throw new TypeError('Invalid hex string');if(length>strLen/2){length=strLen/2;}for(var i=0;i<length;++i){var parsed=parseInt(string.substr(i*2,2),16);if(isNaN(parsed))return i;buf[offset+i]=parsed;}return i;}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length);}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length);}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length);}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length);}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length);}Buffer.prototype.write=function write(string,offset,length,encoding){// Buffer#write(string)
|
|
364
|
+
if(offset===undefined){encoding='utf8';length=this.length;offset=0;// Buffer#write(string, encoding)
|
|
365
|
+
}else if(length===undefined&&typeof offset==='string'){encoding=offset;length=this.length;offset=0;// Buffer#write(string, offset[, length][, encoding])
|
|
366
|
+
}else if(isFinite(offset)){offset=offset|0;if(isFinite(length)){length=length|0;if(encoding===undefined)encoding='utf8';}else{encoding=length;length=undefined;}// legacy write(string, encoding, offset, length) - remove in v0.13
|
|
367
|
+
}else{throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');}var remaining=this.length-offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError('Attempt to write outside buffer bounds');}if(!encoding)encoding='utf8';var loweredCase=false;for(;;){switch(encoding){case'hex':return hexWrite(this,string,offset,length);case'utf8':case'utf-8':return utf8Write(this,string,offset,length);case'ascii':return asciiWrite(this,string,offset,length);case'latin1':case'binary':return latin1Write(this,string,offset,length);case'base64':// Warning: maxLength not taken into account in base64Write
|
|
368
|
+
return base64Write(this,string,offset,length);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError('Unknown encoding: '+encoding);encoding=(''+encoding).toLowerCase();loweredCase=true;}}};Buffer.prototype.toJSON=function toJSON(){return{type:'Buffer',data:Array.prototype.slice.call(this._arr||this,0)};};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return fromByteArray(buf);}else{return fromByteArray(buf.slice(start,end));}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i<end){var firstByte=buf[i];var codePoint=null;var bytesPerSequence=firstByte>0xEF?4:firstByte>0xDF?3:firstByte>0xBF?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<0x80){codePoint=firstByte;}break;case 2:secondByte=buf[i+1];if((secondByte&0xC0)===0x80){tempCodePoint=(firstByte&0x1F)<<0x6|secondByte&0x3F;if(tempCodePoint>0x7F){codePoint=tempCodePoint;}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&0xC0)===0x80&&(thirdByte&0xC0)===0x80){tempCodePoint=(firstByte&0xF)<<0xC|(secondByte&0x3F)<<0x6|thirdByte&0x3F;if(tempCodePoint>0x7FF&&(tempCodePoint<0xD800||tempCodePoint>0xDFFF)){codePoint=tempCodePoint;}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&0xC0)===0x80&&(thirdByte&0xC0)===0x80&&(fourthByte&0xC0)===0x80){tempCodePoint=(firstByte&0xF)<<0x12|(secondByte&0x3F)<<0xC|(thirdByte&0x3F)<<0x6|fourthByte&0x3F;if(tempCodePoint>0xFFFF&&tempCodePoint<0x110000){codePoint=tempCodePoint;}}}}if(codePoint===null){// we did not generate a valid codePoint so insert a
|
|
369
|
+
// replacement char (U+FFFD) and advance only 1 byte
|
|
370
|
+
codePoint=0xFFFD;bytesPerSequence=1;}else if(codePoint>0xFFFF){// encode to utf16 (surrogate pair dance)
|
|
371
|
+
codePoint-=0x10000;res.push(codePoint>>>10&0x3FF|0xD800);codePoint=0xDC00|codePoint&0x3FF;}res.push(codePoint);i+=bytesPerSequence;}return decodeCodePointsArray(res);}// Based on http://stackoverflow.com/a/22747272/680742, the browser with
|
|
372
|
+
// the lowest limit is Chrome, with 0x10000 args.
|
|
373
|
+
// We go 1 magnitude less, for safety
|
|
374
|
+
var MAX_ARGUMENTS_LENGTH=0x1000;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints);// avoid extra slice()
|
|
375
|
+
}// Decode in chunks to avoid "call stack size exceeded".
|
|
376
|
+
var res='';var i=0;while(i<len){res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));}return res;}function asciiSlice(buf,start,end){var ret='';end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i]&0x7F);}return ret;}function latin1Slice(buf,start,end){var ret='';end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i]);}return ret;}function hexSlice(buf,start,end){var len=buf.length;if(!start||start<0)start=0;if(!end||end<0||end>len)end=len;var out='';for(var i=start;i<end;++i){out+=toHex(buf[i]);}return out;}function utf16leSlice(buf,start,end){var bytes=buf.slice(start,end);var res='';for(var i=0;i<bytes.length;i+=2){res+=String.fromCharCode(bytes[i]+bytes[i+1]*256);}return res;}Buffer.prototype.slice=function slice(start,end){var len=this.length;start=~~start;end=end===undefined?len:~~end;if(start<0){start+=len;if(start<0)start=0;}else if(start>len){start=len;}if(end<0){end+=len;if(end<0)end=0;}else if(end>len){end=len;}if(end<start)end=start;var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT){newBuf=this.subarray(start,end);newBuf.__proto__=Buffer.prototype;}else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,undefined);for(var i=0;i<sliceLen;++i){newBuf[i]=this[i+start];}}return newBuf;};/*
|
|
377
|
+
* Need to make sure that buffer isn't trying to write out of bounds.
|
|
378
|
+
*/function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError('offset is not uint');if(offset+ext>length)throw new RangeError('Trying to access beyond buffer length');}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=0x100)){val+=this[offset+i]*mul;}return val;};Buffer.prototype.readUIntBE=function readUIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert){checkOffset(offset,byteLength,this.length);}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=0x100)){val+=this[offset+--byteLength]*mul;}return val;};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset];};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8;};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1];};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*0x1000000;};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*0x1000000+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3]);};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=0x100)){val+=this[offset+i]*mul;}mul*=0x80;if(val>=mul)val-=Math.pow(2,8*byteLength);return val;};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=0x100)){val+=this[offset+--i]*mul;}mul*=0x80;if(val>=mul)val-=Math.pow(2,8*byteLength);return val;};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&0x80))return this[offset];return(0xff-this[offset]+1)*-1;};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&0x8000?val|0xFFFF0000:val;};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&0x8000?val|0xFFFF0000:val;};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24;};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3];};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return read(this,offset,true,23,4);};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return read(this,offset,false,23,4);};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return read(this,offset,true,52,8);};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return read(this,offset,false,52,8);};function checkInt(buf,value,offset,ext,max,min){if(!internalIsBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError('Index out of range');}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0);}var mul=1;var i=0;this[offset]=value&0xFF;while(++i<byteLength&&(mul*=0x100)){this[offset+i]=value/mul&0xFF;}return offset+byteLength;};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0);}var i=byteLength-1;var mul=1;this[offset+i]=value&0xFF;while(--i>=0&&(mul*=0x100)){this[offset+i]=value/mul&0xFF;}return offset+byteLength;};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,0xff,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&0xff;return offset+1;};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=0xffff+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i<j;++i){buf[offset+i]=(value&0xff<<8*(littleEndian?i:1-i))>>>(littleEndian?i:1-i)*8;}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,0xffff,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&0xff;this[offset+1]=value>>>8;}else{objectWriteUInt16(this,value,offset,true);}return offset+2;};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,0xffff,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&0xff;}else{objectWriteUInt16(this,value,offset,false);}return offset+2;};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=0xffffffff+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i<j;++i){buf[offset+i]=value>>>(littleEndian?i:3-i)*8&0xff;}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,0xffffffff,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&0xff;}else{objectWriteUInt32(this,value,offset,true);}return offset+4;};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,0xffffffff,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&0xff;}else{objectWriteUInt32(this,value,offset,false);}return offset+4;};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit);}var i=0;var mul=1;var sub=0;this[offset]=value&0xFF;while(++i<byteLength&&(mul*=0x100)){if(value<0&&sub===0&&this[offset+i-1]!==0){sub=1;}this[offset+i]=(value/mul>>0)-sub&0xFF;}return offset+byteLength;};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit);}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&0xFF;while(--i>=0&&(mul*=0x100)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1;}this[offset+i]=(value/mul>>0)-sub&0xFF;}return offset+byteLength;};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,0x7f,-0x80);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=0xff+value+1;this[offset]=value&0xff;return offset+1;};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,0x7fff,-0x8000);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&0xff;this[offset+1]=value>>>8;}else{objectWriteUInt16(this,value,offset,true);}return offset+2;};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,0x7fff,-0x8000);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&0xff;}else{objectWriteUInt16(this,value,offset,false);}return offset+2;};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,0x7fffffff,-0x80000000);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&0xff;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24;}else{objectWriteUInt32(this,value,offset,true);}return offset+4;};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,0x7fffffff,-0x80000000);if(value<0)value=0xffffffff+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&0xff;}else{objectWriteUInt32(this,value,offset,false);}return offset+4;};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError('Index out of range');if(offset<0)throw new RangeError('Index out of range');}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4);}write(buf,value,offset,littleEndian,23,4);return offset+4;}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert);};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert);};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8);}write(buf,value,offset,littleEndian,52,8);return offset+8;}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert);};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert);};// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
|
379
|
+
Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end<start)end=start;// Copy 0 bytes; we're done
|
|
380
|
+
if(end===start)return 0;if(target.length===0||this.length===0)return 0;// Fatal error conditions
|
|
381
|
+
if(targetStart<0){throw new RangeError('targetStart out of bounds');}if(start<0||start>=this.length)throw new RangeError('sourceStart out of bounds');if(end<0)throw new RangeError('sourceEnd out of bounds');// Are we oob?
|
|
382
|
+
if(end>this.length)end=this.length;if(target.length-targetStart<end-start){end=target.length-targetStart+start;}var len=end-start;var i;if(this===target&&start<targetStart&&targetStart<end){// descending copy from end
|
|
383
|
+
for(i=len-1;i>=0;--i){target[i+targetStart]=this[i+start];}}else if(len<1000||!Buffer.TYPED_ARRAY_SUPPORT){// ascending copy from start
|
|
384
|
+
for(i=0;i<len;++i){target[i+targetStart]=this[i+start];}}else{Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart);}return len;};// Usage:
|
|
385
|
+
// buffer.fill(number[, offset[, end]])
|
|
386
|
+
// buffer.fill(buffer[, offset[, end]])
|
|
387
|
+
// buffer.fill(string[, offset[, end]][, encoding])
|
|
388
|
+
Buffer.prototype.fill=function fill(val,start,end,encoding){// Handle string cases:
|
|
389
|
+
if(typeof val==='string'){if(typeof start==='string'){encoding=start;start=0;end=this.length;}else if(typeof end==='string'){encoding=end;end=this.length;}if(val.length===1){var code=val.charCodeAt(0);if(code<256){val=code;}}if(encoding!==undefined&&typeof encoding!=='string'){throw new TypeError('encoding must be a string');}if(typeof encoding==='string'&&!Buffer.isEncoding(encoding)){throw new TypeError('Unknown encoding: '+encoding);}}else if(typeof val==='number'){val=val&255;}// Invalid ranges are not set to a default, so can range check early.
|
|
390
|
+
if(start<0||this.length<start||this.length<end){throw new RangeError('Out of range index');}if(end<=start){return this;}start=start>>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==='number'){for(i=start;i<end;++i){this[i]=val;}}else{var bytes=internalIsBuffer(val)?val:utf8ToBytes(new Buffer(val,encoding).toString());var len=bytes.length;for(i=0;i<end-start;++i){this[i+start]=bytes[i%len];}}return this;};// HELPER FUNCTIONS
|
|
391
|
+
// ================
|
|
392
|
+
var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;function base64clean(str){// Node strips out invalid characters like \n and \t from the string, base64-js does not
|
|
393
|
+
str=stringtrim(str).replace(INVALID_BASE64_RE,'');// Node converts strings with length < 2 to ''
|
|
394
|
+
if(str.length<2)return'';// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
|
|
395
|
+
while(str.length%4!==0){str=str+'=';}return str;}function stringtrim(str){if(str.trim)return str.trim();return str.replace(/^\s+|\s+$/g,'');}function toHex(n){if(n<16)return'0'+n.toString(16);return n.toString(16);}function utf8ToBytes(string,units){units=units||Infinity;var codePoint;var length=string.length;var leadSurrogate=null;var bytes=[];for(var i=0;i<length;++i){codePoint=string.charCodeAt(i);// is surrogate component
|
|
396
|
+
if(codePoint>0xD7FF&&codePoint<0xE000){// last char was a lead
|
|
397
|
+
if(!leadSurrogate){// no lead yet
|
|
398
|
+
if(codePoint>0xDBFF){// unexpected trail
|
|
399
|
+
if((units-=3)>-1)bytes.push(0xEF,0xBF,0xBD);continue;}else if(i+1===length){// unpaired lead
|
|
400
|
+
if((units-=3)>-1)bytes.push(0xEF,0xBF,0xBD);continue;}// valid lead
|
|
401
|
+
leadSurrogate=codePoint;continue;}// 2 leads in a row
|
|
402
|
+
if(codePoint<0xDC00){if((units-=3)>-1)bytes.push(0xEF,0xBF,0xBD);leadSurrogate=codePoint;continue;}// valid surrogate pair
|
|
403
|
+
codePoint=(leadSurrogate-0xD800<<10|codePoint-0xDC00)+0x10000;}else if(leadSurrogate){// valid bmp char, but last char was a lead
|
|
404
|
+
if((units-=3)>-1)bytes.push(0xEF,0xBF,0xBD);}leadSurrogate=null;// encode utf8
|
|
405
|
+
if(codePoint<0x80){if((units-=1)<0)break;bytes.push(codePoint);}else if(codePoint<0x800){if((units-=2)<0)break;bytes.push(codePoint>>0x6|0xC0,codePoint&0x3F|0x80);}else if(codePoint<0x10000){if((units-=3)<0)break;bytes.push(codePoint>>0xC|0xE0,codePoint>>0x6&0x3F|0x80,codePoint&0x3F|0x80);}else if(codePoint<0x110000){if((units-=4)<0)break;bytes.push(codePoint>>0x12|0xF0,codePoint>>0xC&0x3F|0x80,codePoint>>0x6&0x3F|0x80,codePoint&0x3F|0x80);}else{throw new Error('Invalid code point');}}return bytes;}function asciiToBytes(str){var byteArray=[];for(var i=0;i<str.length;++i){// Node's code seems to be doing this and not & 0x7F..
|
|
406
|
+
byteArray.push(str.charCodeAt(i)&0xFF);}return byteArray;}function utf16leToBytes(str,units){var c,hi,lo;var byteArray=[];for(var i=0;i<str.length;++i){if((units-=2)<0)break;c=str.charCodeAt(i);hi=c>>8;lo=c%256;byteArray.push(lo);byteArray.push(hi);}return byteArray;}function base64ToBytes(str){return toByteArray(base64clean(str));}function blitBuffer(src,dst,offset,length){for(var i=0;i<length;++i){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i];}return i;}function isnan(val){return val!==val;// eslint-disable-line no-self-compare
|
|
407
|
+
}// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence
|
|
408
|
+
// The _isBuffer check is for Safari 5-7 support, because it's missing
|
|
409
|
+
// Object.prototype.constructor. Remove this eventually
|
|
410
|
+
function isBuffer(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.
|
|
411
|
+
function isSlowBuffer(obj){return typeof obj.readFloatLE==='function'&&typeof obj.slice==='function'&&isFastBuffer(obj.slice(0,0));}/**
|
|
433
412
|
* Create an Error with the specified message, config, error code, request and response.
|
|
434
413
|
*
|
|
435
414
|
* @param {string} message The error message.
|
|
@@ -880,9 +859,30 @@ return _createClass(HttpRequestOptions,[{key:"setUrl",value:function setUrl(url)
|
|
|
880
859
|
},{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
860
|
},{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
861
|
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)
|
|
862
|
+
},{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);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:/**
|
|
863
|
+
* Singleton getter
|
|
864
|
+
*/function get(){return Configuration.instance;}/**
|
|
865
|
+
* Singleton setter
|
|
866
|
+
*/,set:function set(value){Configuration.instance=value;}},{key:"liveLoadConfig",value:function liveLoadConfig(){// If in browser, don't read config file, use default values
|
|
867
|
+
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
|
|
868
|
+
this.logger.setLogger();}/**
|
|
869
|
+
* @description Sets the gateway used by the session
|
|
870
|
+
* @param {object} gateway - Gateway Configuration interface
|
|
871
|
+
* @param {string} gateway.host - The address of the gateway.
|
|
872
|
+
* @param {string} gateway.protocol - (optional) The protocol to use. It will default to "https" if the parameter is not defined or empty.
|
|
873
|
+
* @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).
|
|
874
|
+
* @param {string} gateway.path_params_login - (optional) An arbitrary string to be appended to the gateway url path for Login requests.
|
|
875
|
+
* @param {string} gateway.path_params_api - (optional) An arbitrary string to be appended to the gateway url path for API requests.
|
|
876
|
+
* @param {string} gateway.username - (optional) Not used at this stage (for a possible future use).
|
|
877
|
+
* @param {string} gateway.password - (optional) Not used at this stage (for a possible future use).
|
|
878
|
+
*/},{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
|
|
879
|
+
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
|
|
880
|
+
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
|
|
881
|
+
if(env)this.environment=env;else this.environment=this.host?this.host:'mypurecloud.com';// Strip trailing slash
|
|
882
|
+
this.environment=this.environment.replace(/\/+$/,'');// Strip protocol and subdomain
|
|
883
|
+
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];}}}]);}();/**
|
|
884
884
|
* @module purecloud-platform-client-v2/ApiClient
|
|
885
|
-
* @version
|
|
885
|
+
* @version 212.1.0
|
|
886
886
|
*/var ApiClient=/*#__PURE__*/function(){/**
|
|
887
887
|
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
|
|
888
888
|
* application to use this class directly - the *Api and model classes provide the public API for the service. The
|
|
@@ -960,12 +960,12 @@ var tempState=this.authData.state;this.authData=localStorage.getItem("".concat(t
|
|
|
960
960
|
* @param {string} certPath - path for certs
|
|
961
961
|
* @param {string} keyPath - path for key
|
|
962
962
|
* @param {string} caPath - path for public certs
|
|
963
|
-
*/},{key:"setMTLSCertificates",value:function setMTLSCertificates(certPath,keyPath,caPath){{throw new Error("
|
|
963
|
+
*/},{key:"setMTLSCertificates",value:function setMTLSCertificates(certPath,keyPath,caPath){{throw new Error("MTLS authentication is managed by the Browser itself. MTLS certificates cannot be set via code on Browser.");}}/**
|
|
964
964
|
* @description Sets the certificate content if MTLS authentication is needed
|
|
965
965
|
* @param {string} certContent - content for certs
|
|
966
966
|
* @param {string} keyContent - content for key
|
|
967
967
|
* @param {string} caContent - content for public certs
|
|
968
|
-
*/},{key:"setMTLSContents",value:function setMTLSContents(certContent,keyContent,caContent){
|
|
968
|
+
*/},{key:"setMTLSContents",value:function setMTLSContents(certContent,keyContent,caContent){{throw new Error("MTLS authentication is managed by the Browser itself. MTLS certificates cannot be set via code on Browser.");}}/**
|
|
969
969
|
* @description Sets the gateway used by the session
|
|
970
970
|
* @param {object} gateway - Gateway Configuration interface
|
|
971
971
|
* @param {string} gateway.host - The address of the gateway.
|
|
@@ -1219,7 +1219,7 @@ resolve(data);})["catch"](function(error){var data=error;if(error.response&&erro
|
|
|
1219
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(){/**
|
|
1220
1220
|
* AgentAssistants service.
|
|
1221
1221
|
* @module purecloud-platform-client-v2/api/AgentAssistantsApi
|
|
1222
|
-
* @version
|
|
1222
|
+
* @version 212.1.0
|
|
1223
1223
|
*//**
|
|
1224
1224
|
* Constructs a new AgentAssistantsApi.
|
|
1225
1225
|
* @alias module:purecloud-platform-client-v2/api/AgentAssistantsApi
|
|
@@ -1320,7 +1320,7 @@ if(queueId===undefined||queueId===null){throw'Missing the required parameter "qu
|
|
|
1320
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(){/**
|
|
1321
1321
|
* AgentCopilot service.
|
|
1322
1322
|
* @module purecloud-platform-client-v2/api/AgentCopilotApi
|
|
1323
|
-
* @version
|
|
1323
|
+
* @version 212.1.0
|
|
1324
1324
|
*//**
|
|
1325
1325
|
* Constructs a new AgentCopilotApi.
|
|
1326
1326
|
* @alias module:purecloud-platform-client-v2/api/AgentCopilotApi
|
|
@@ -1342,7 +1342,7 @@ if(assistantId===undefined||assistantId===null){throw'Missing the required param
|
|
|
1342
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(){/**
|
|
1343
1343
|
* AgentUI service.
|
|
1344
1344
|
* @module purecloud-platform-client-v2/api/AgentUIApi
|
|
1345
|
-
* @version
|
|
1345
|
+
* @version 212.1.0
|
|
1346
1346
|
*//**
|
|
1347
1347
|
* Constructs a new AgentUIApi.
|
|
1348
1348
|
* @alias module:purecloud-platform-client-v2/api/AgentUIApi
|
|
@@ -1376,7 +1376,7 @@ if(agentId===undefined||agentId===null){throw'Missing the required parameter "ag
|
|
|
1376
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(){/**
|
|
1377
1377
|
* Alerting service.
|
|
1378
1378
|
* @module purecloud-platform-client-v2/api/AlertingApi
|
|
1379
|
-
* @version
|
|
1379
|
+
* @version 212.1.0
|
|
1380
1380
|
*//**
|
|
1381
1381
|
* Constructs a new AlertingApi.
|
|
1382
1382
|
* @alias module:purecloud-platform-client-v2/api/AlertingApi
|
|
@@ -1533,7 +1533,7 @@ if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "rule
|
|
|
1533
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(){/**
|
|
1534
1534
|
* Analytics service.
|
|
1535
1535
|
* @module purecloud-platform-client-v2/api/AnalyticsApi
|
|
1536
|
-
* @version
|
|
1536
|
+
* @version 212.1.0
|
|
1537
1537
|
*//**
|
|
1538
1538
|
* Constructs a new AnalyticsApi.
|
|
1539
1539
|
* @alias module:purecloud-platform-client-v2/api/AnalyticsApi
|
|
@@ -1565,6 +1565,12 @@ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId"
|
|
|
1565
1565
|
* getAnalyticsActionsAggregatesJobResults is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
1566
1566
|
*/},{key:"getAnalyticsActionsAggregatesJobResults",value:function getAnalyticsActionsAggregatesJobResults(jobId,opts){opts=opts||{};// verify the required parameter 'jobId' is set
|
|
1567
1567
|
if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId" when calling getAnalyticsActionsAggregatesJobResults';}return this.apiClient.callApi('/api/v2/analytics/actions/aggregates/jobs/{jobId}/results','GET',{'jobId':jobId},{'cursor':opts['cursor']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1568
|
+
* Get an agent and their active sessions by user ID
|
|
1569
|
+
*
|
|
1570
|
+
* @param {String} userId userId
|
|
1571
|
+
* getAnalyticsAgentStatus is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
1572
|
+
*/},{key:"getAnalyticsAgentStatus",value:function getAnalyticsAgentStatus(userId){// verify the required parameter 'userId' is set
|
|
1573
|
+
if(userId===undefined||userId===null){throw'Missing the required parameter "userId" when calling getAnalyticsAgentStatus';}return this.apiClient.callApi('/api/v2/analytics/agents/{userId}/status','GET',{'userId':userId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1568
1574
|
* Get status for async query for agent copilot aggregates
|
|
1569
1575
|
*
|
|
1570
1576
|
* @param {String} jobId jobId
|
|
@@ -1810,6 +1816,20 @@ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId"
|
|
|
1810
1816
|
* getAnalyticsResolutionsAggregatesJobResults is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
1811
1817
|
*/},{key:"getAnalyticsResolutionsAggregatesJobResults",value:function getAnalyticsResolutionsAggregatesJobResults(jobId,opts){opts=opts||{};// verify the required parameter 'jobId' is set
|
|
1812
1818
|
if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId" when calling getAnalyticsResolutionsAggregatesJobResults';}return this.apiClient.callApi('/api/v2/analytics/resolutions/aggregates/jobs/{jobId}/results','GET',{'jobId':jobId},{'cursor':opts['cursor']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1819
|
+
* Get status for async query for summary aggregates
|
|
1820
|
+
*
|
|
1821
|
+
* @param {String} jobId jobId
|
|
1822
|
+
* getAnalyticsSummariesAggregatesJob is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
1823
|
+
*/},{key:"getAnalyticsSummariesAggregatesJob",value:function getAnalyticsSummariesAggregatesJob(jobId){// verify the required parameter 'jobId' is set
|
|
1824
|
+
if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId" when calling getAnalyticsSummariesAggregatesJob';}return this.apiClient.callApi('/api/v2/analytics/summaries/aggregates/jobs/{jobId}','GET',{'jobId':jobId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1825
|
+
* Fetch a page of results for an async aggregates query
|
|
1826
|
+
*
|
|
1827
|
+
* @param {String} jobId jobId
|
|
1828
|
+
* @param {Object} opts Optional parameters
|
|
1829
|
+
* @param {String} opts.cursor Cursor token to retrieve next page
|
|
1830
|
+
* getAnalyticsSummariesAggregatesJobResults is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
1831
|
+
*/},{key:"getAnalyticsSummariesAggregatesJobResults",value:function getAnalyticsSummariesAggregatesJobResults(jobId,opts){opts=opts||{};// verify the required parameter 'jobId' is set
|
|
1832
|
+
if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId" when calling getAnalyticsSummariesAggregatesJobResults';}return this.apiClient.callApi('/api/v2/analytics/summaries/aggregates/jobs/{jobId}/results','GET',{'jobId':jobId},{'cursor':opts['cursor']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1813
1833
|
* Get status for async query for survey aggregates
|
|
1814
1834
|
*
|
|
1815
1835
|
* @param {String} jobId jobId
|
|
@@ -1909,6 +1929,18 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
1909
1929
|
* @param {Object} body query
|
|
1910
1930
|
*/},{key:"postAnalyticsAgentcopilotsAggregatesQuery",value:function postAnalyticsAgentcopilotsAggregatesQuery(body){// verify the required parameter 'body' is set
|
|
1911
1931
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAnalyticsAgentcopilotsAggregatesQuery';}return this.apiClient.callApi('/api/v2/analytics/agentcopilots/aggregates/query','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1932
|
+
* Count agents by segment type
|
|
1933
|
+
*
|
|
1934
|
+
* @param {Object} body query
|
|
1935
|
+
* postAnalyticsAgentsStatusCounts is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
1936
|
+
*/},{key:"postAnalyticsAgentsStatusCounts",value:function postAnalyticsAgentsStatusCounts(body){// verify the required parameter 'body' is set
|
|
1937
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAnalyticsAgentsStatusCounts';}return this.apiClient.callApi('/api/v2/analytics/agents/status/counts','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1938
|
+
* Retrieve the top 50 agents matching the query filters
|
|
1939
|
+
*
|
|
1940
|
+
* @param {Object} body query
|
|
1941
|
+
* postAnalyticsAgentsStatusQuery is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
1942
|
+
*/},{key:"postAnalyticsAgentsStatusQuery",value:function postAnalyticsAgentsStatusQuery(body){// verify the required parameter 'body' is set
|
|
1943
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAnalyticsAgentsStatusQuery';}return this.apiClient.callApi('/api/v2/analytics/agents/status/query','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1912
1944
|
* Query for bot aggregates asynchronously
|
|
1913
1945
|
*
|
|
1914
1946
|
* @param {Object} body query
|
|
@@ -2065,6 +2097,11 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
2065
2097
|
* postAnalyticsResolutionsAggregatesJobs is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
2066
2098
|
*/},{key:"postAnalyticsResolutionsAggregatesJobs",value:function postAnalyticsResolutionsAggregatesJobs(body){// verify the required parameter 'body' is set
|
|
2067
2099
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAnalyticsResolutionsAggregatesJobs';}return this.apiClient.callApi('/api/v2/analytics/resolutions/aggregates/jobs','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
2100
|
+
* Query for resolution aggregates
|
|
2101
|
+
*
|
|
2102
|
+
* @param {Object} body query
|
|
2103
|
+
*/},{key:"postAnalyticsResolutionsAggregatesQuery",value:function postAnalyticsResolutionsAggregatesQuery(body){// verify the required parameter 'body' is set
|
|
2104
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAnalyticsResolutionsAggregatesQuery';}return this.apiClient.callApi('/api/v2/analytics/resolutions/aggregates/query','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
2068
2105
|
* Query for user activity observations
|
|
2069
2106
|
*
|
|
2070
2107
|
* @param {Object} body query
|
|
@@ -2073,6 +2110,18 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
2073
2110
|
* @param {Number} opts.pageNumber The desired page number
|
|
2074
2111
|
*/},{key:"postAnalyticsRoutingActivityQuery",value:function postAnalyticsRoutingActivityQuery(body,opts){opts=opts||{};// verify the required parameter 'body' is set
|
|
2075
2112
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAnalyticsRoutingActivityQuery';}return this.apiClient.callApi('/api/v2/analytics/routing/activity/query','POST',{},{'pageSize':opts['pageSize'],'pageNumber':opts['pageNumber']},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
2113
|
+
* Query for summary aggregates asynchronously
|
|
2114
|
+
*
|
|
2115
|
+
* @param {Object} body query
|
|
2116
|
+
* postAnalyticsSummariesAggregatesJobs is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
2117
|
+
*/},{key:"postAnalyticsSummariesAggregatesJobs",value:function postAnalyticsSummariesAggregatesJobs(body){// verify the required parameter 'body' is set
|
|
2118
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAnalyticsSummariesAggregatesJobs';}return this.apiClient.callApi('/api/v2/analytics/summaries/aggregates/jobs','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
2119
|
+
* Query for summary aggregates
|
|
2120
|
+
*
|
|
2121
|
+
* @param {Object} body query
|
|
2122
|
+
* postAnalyticsSummariesAggregatesQuery is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
2123
|
+
*/},{key:"postAnalyticsSummariesAggregatesQuery",value:function postAnalyticsSummariesAggregatesQuery(body){// verify the required parameter 'body' is set
|
|
2124
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAnalyticsSummariesAggregatesQuery';}return this.apiClient.callApi('/api/v2/analytics/summaries/aggregates/query','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
2076
2125
|
* Query for survey aggregates asynchronously
|
|
2077
2126
|
*
|
|
2078
2127
|
* @param {Object} body query
|
|
@@ -2155,7 +2204,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
2155
2204
|
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(){/**
|
|
2156
2205
|
* Architect service.
|
|
2157
2206
|
* @module purecloud-platform-client-v2/api/ArchitectApi
|
|
2158
|
-
* @version
|
|
2207
|
+
* @version 212.1.0
|
|
2159
2208
|
*//**
|
|
2160
2209
|
* Constructs a new ArchitectApi.
|
|
2161
2210
|
* @alias module:purecloud-platform-client-v2/api/ArchitectApi
|
|
@@ -3247,7 +3296,7 @@ if(milestoneId===undefined||milestoneId===null){throw'Missing the required param
|
|
|
3247
3296
|
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(){/**
|
|
3248
3297
|
* Audit service.
|
|
3249
3298
|
* @module purecloud-platform-client-v2/api/AuditApi
|
|
3250
|
-
* @version
|
|
3299
|
+
* @version 212.1.0
|
|
3251
3300
|
*//**
|
|
3252
3301
|
* Constructs a new AuditApi.
|
|
3253
3302
|
* @alias module:purecloud-platform-client-v2/api/AuditApi
|
|
@@ -3297,7 +3346,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
3297
3346
|
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(){/**
|
|
3298
3347
|
* Authorization service.
|
|
3299
3348
|
* @module purecloud-platform-client-v2/api/AuthorizationApi
|
|
3300
|
-
* @version
|
|
3349
|
+
* @version 212.1.0
|
|
3301
3350
|
*//**
|
|
3302
3351
|
* Constructs a new AuthorizationApi.
|
|
3303
3352
|
* @alias module:purecloud-platform-client-v2/api/AuthorizationApi
|
|
@@ -3620,7 +3669,7 @@ if(subjectId===undefined||subjectId===null){throw'Missing the required parameter
|
|
|
3620
3669
|
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(){/**
|
|
3621
3670
|
* Billing service.
|
|
3622
3671
|
* @module purecloud-platform-client-v2/api/BillingApi
|
|
3623
|
-
* @version
|
|
3672
|
+
* @version 212.1.0
|
|
3624
3673
|
*//**
|
|
3625
3674
|
* Constructs a new BillingApi.
|
|
3626
3675
|
* @alias module:purecloud-platform-client-v2/api/BillingApi
|
|
@@ -3644,7 +3693,7 @@ if(endDate===undefined||endDate===null){throw'Missing the required parameter "en
|
|
|
3644
3693
|
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(){/**
|
|
3645
3694
|
* CarrierServices service.
|
|
3646
3695
|
* @module purecloud-platform-client-v2/api/CarrierServicesApi
|
|
3647
|
-
* @version
|
|
3696
|
+
* @version 212.1.0
|
|
3648
3697
|
*//**
|
|
3649
3698
|
* Constructs a new CarrierServicesApi.
|
|
3650
3699
|
* @alias module:purecloud-platform-client-v2/api/CarrierServicesApi
|
|
@@ -3664,7 +3713,7 @@ if(phoneNumber===undefined||phoneNumber===null){throw'Missing the required param
|
|
|
3664
3713
|
*/},{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(){/**
|
|
3665
3714
|
* Chat service.
|
|
3666
3715
|
* @module purecloud-platform-client-v2/api/ChatApi
|
|
3667
|
-
* @version
|
|
3716
|
+
* @version 212.1.0
|
|
3668
3717
|
*//**
|
|
3669
3718
|
* Constructs a new ChatApi.
|
|
3670
3719
|
* @alias module:purecloud-platform-client-v2/api/ChatApi
|
|
@@ -3889,7 +3938,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
3889
3938
|
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(){/**
|
|
3890
3939
|
* Coaching service.
|
|
3891
3940
|
* @module purecloud-platform-client-v2/api/CoachingApi
|
|
3892
|
-
* @version
|
|
3941
|
+
* @version 212.1.0
|
|
3893
3942
|
*//**
|
|
3894
3943
|
* Constructs a new CoachingApi.
|
|
3895
3944
|
* @alias module:purecloud-platform-client-v2/api/CoachingApi
|
|
@@ -4042,7 +4091,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
4042
4091
|
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(){/**
|
|
4043
4092
|
* ContentManagement service.
|
|
4044
4093
|
* @module purecloud-platform-client-v2/api/ContentManagementApi
|
|
4045
|
-
* @version
|
|
4094
|
+
* @version 212.1.0
|
|
4046
4095
|
*//**
|
|
4047
4096
|
* Constructs a new ContentManagementApi.
|
|
4048
4097
|
* @alias module:purecloud-platform-client-v2/api/ContentManagementApi
|
|
@@ -4324,7 +4373,7 @@ if(tagId===undefined||tagId===null){throw'Missing the required parameter "tagId"
|
|
|
4324
4373
|
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(){/**
|
|
4325
4374
|
* Conversations service.
|
|
4326
4375
|
* @module purecloud-platform-client-v2/api/ConversationsApi
|
|
4327
|
-
* @version
|
|
4376
|
+
* @version 212.1.0
|
|
4328
4377
|
*//**
|
|
4329
4378
|
* Constructs a new ConversationsApi.
|
|
4330
4379
|
* @alias module:purecloud-platform-client-v2/api/ConversationsApi
|
|
@@ -5836,8 +5885,10 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
5836
5885
|
* Send an agentless outbound message
|
|
5837
5886
|
* Send an agentless (api participant) outbound message using a client credential grant. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. If there is already a connected conversation between the fromAddress and toAddress specified, the useExistingActiveConversation param can be used to barge in to the ongoing conversation.
|
|
5838
5887
|
* @param {Object} body Create agentless outbound messaging request
|
|
5839
|
-
|
|
5840
|
-
|
|
5888
|
+
* @param {Object} opts Optional parameters
|
|
5889
|
+
* @param {Boolean} opts.useNormalizedMessage If true, response removes deprecated fields (textBody, messagingTemplate) (default to false)
|
|
5890
|
+
*/},{key:"postConversationsMessagesAgentless",value:function postConversationsMessagesAgentless(body,opts){opts=opts||{};// verify the required parameter 'body' is set
|
|
5891
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postConversationsMessagesAgentless';}return this.apiClient.callApi('/api/v2/conversations/messages/agentless','POST',{},{'useNormalizedMessage':opts['useNormalizedMessage']},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
5841
5892
|
* Send an inbound Open Message
|
|
5842
5893
|
* [This API is deprecated. Instead, use 1. POST /api/v2/conversations/messages/{integrationId}/inbound/open/event, if you want to send an inbound Open Event Message 2. POST /api/v2/conversations/messages/{integrationId}/inbound/open/message, if you want to send an inbound Open Message 3. POST /api/v2/conversations/messages/{integrationId}/inbound/open/receipt, to send an inbound Open Receipt Message] In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. This will either generate a new Conversation, or be a part of an existing conversation. See https://developer.genesys.cloud/api/digital/openmessaging/ for example usage.
|
|
5843
5894
|
* @param {Object} body NormalizedMessage
|
|
@@ -6052,7 +6103,7 @@ if(conversationId===undefined||conversationId===null){throw'Missing the required
|
|
|
6052
6103
|
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(){/**
|
|
6053
6104
|
* DataExtensions service.
|
|
6054
6105
|
* @module purecloud-platform-client-v2/api/DataExtensionsApi
|
|
6055
|
-
* @version
|
|
6106
|
+
* @version 212.1.0
|
|
6056
6107
|
*//**
|
|
6057
6108
|
* Constructs a new DataExtensionsApi.
|
|
6058
6109
|
* @alias module:purecloud-platform-client-v2/api/DataExtensionsApi
|
|
@@ -6073,7 +6124,7 @@ if(coretypeName===undefined||coretypeName===null){throw'Missing the required par
|
|
|
6073
6124
|
*/},{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
6125
|
* DataPrivacy service.
|
|
6075
6126
|
* @module purecloud-platform-client-v2/api/DataPrivacyApi
|
|
6076
|
-
* @version
|
|
6127
|
+
* @version 212.1.0
|
|
6077
6128
|
*//**
|
|
6078
6129
|
* Constructs a new DataPrivacyApi.
|
|
6079
6130
|
* @alias module:purecloud-platform-client-v2/api/DataPrivacyApi
|
|
@@ -6113,7 +6164,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6113
6164
|
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(){/**
|
|
6114
6165
|
* Downloads service.
|
|
6115
6166
|
* @module purecloud-platform-client-v2/api/DownloadsApi
|
|
6116
|
-
* @version
|
|
6167
|
+
* @version 212.1.0
|
|
6117
6168
|
*//**
|
|
6118
6169
|
* Constructs a new DownloadsApi.
|
|
6119
6170
|
* @alias module:purecloud-platform-client-v2/api/DownloadsApi
|
|
@@ -6132,7 +6183,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6132
6183
|
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(){/**
|
|
6133
6184
|
* Emails service.
|
|
6134
6185
|
* @module purecloud-platform-client-v2/api/EmailsApi
|
|
6135
|
-
* @version
|
|
6186
|
+
* @version 212.1.0
|
|
6136
6187
|
*//**
|
|
6137
6188
|
* Constructs a new EmailsApi.
|
|
6138
6189
|
* @alias module:purecloud-platform-client-v2/api/EmailsApi
|
|
@@ -6150,7 +6201,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
|
|
|
6150
6201
|
*/},{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(){/**
|
|
6151
6202
|
* EmployeeEngagement service.
|
|
6152
6203
|
* @module purecloud-platform-client-v2/api/EmployeeEngagementApi
|
|
6153
|
-
* @version
|
|
6204
|
+
* @version 212.1.0
|
|
6154
6205
|
*//**
|
|
6155
6206
|
* Constructs a new EmployeeEngagementApi.
|
|
6156
6207
|
* @alias module:purecloud-platform-client-v2/api/EmployeeEngagementApi
|
|
@@ -6188,7 +6239,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6188
6239
|
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(){/**
|
|
6189
6240
|
* Events service.
|
|
6190
6241
|
* @module purecloud-platform-client-v2/api/EventsApi
|
|
6191
|
-
* @version
|
|
6242
|
+
* @version 212.1.0
|
|
6192
6243
|
*//**
|
|
6193
6244
|
* Constructs a new EventsApi.
|
|
6194
6245
|
* @alias module:purecloud-platform-client-v2/api/EventsApi
|
|
@@ -6213,7 +6264,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6213
6264
|
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(){/**
|
|
6214
6265
|
* ExternalContacts service.
|
|
6215
6266
|
* @module purecloud-platform-client-v2/api/ExternalContactsApi
|
|
6216
|
-
* @version
|
|
6267
|
+
* @version 212.1.0
|
|
6217
6268
|
*//**
|
|
6218
6269
|
* Constructs a new ExternalContactsApi.
|
|
6219
6270
|
* @alias module:purecloud-platform-client-v2/api/ExternalContactsApi
|
|
@@ -6649,10 +6700,11 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6649
6700
|
*/},{key:"postExternalcontactsExternalsources",value:function postExternalcontactsExternalsources(body){// verify the required parameter 'body' is set
|
|
6650
6701
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postExternalcontactsExternalsources';}return this.apiClient.callApi('/api/v2/externalcontacts/externalsources','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
6651
6702
|
* Fetch a contact using an identifier type and value.
|
|
6652
|
-
* Phone number identifier values must be provided with the country code and a leading + symbol. Example: "+1 704 298 4733"
|
|
6703
|
+
* NOTE: Deprecated. Please use /api/v2/externalcontacts/identifierlookup/contacts as an alternative endpoint instead. Phone number identifier values must be provided with the country code and a leading + symbol. Example: "+1 704 298 4733"
|
|
6653
6704
|
* @param {Object} identifier
|
|
6654
6705
|
* @param {Object} opts Optional parameters
|
|
6655
6706
|
* @param {Array.<String>} opts.expand which field, if any, to expand
|
|
6707
|
+
* @deprecated
|
|
6656
6708
|
*/},{key:"postExternalcontactsIdentifierlookup",value:function postExternalcontactsIdentifierlookup(identifier,opts){opts=opts||{};// verify the required parameter 'identifier' is set
|
|
6657
6709
|
if(identifier===undefined||identifier===null){throw'Missing the required parameter "identifier" when calling postExternalcontactsIdentifierlookup';}return this.apiClient.callApi('/api/v2/externalcontacts/identifierlookup','POST',{},{'expand':this.apiClient.buildCollectionParam(opts['expand'],'multi')},{},{},identifier,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
6658
6710
|
* Create CSV import job
|
|
@@ -6804,7 +6856,7 @@ if(relationshipId===undefined||relationshipId===null){throw'Missing the required
|
|
|
6804
6856
|
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(){/**
|
|
6805
6857
|
* Fax service.
|
|
6806
6858
|
* @module purecloud-platform-client-v2/api/FaxApi
|
|
6807
|
-
* @version
|
|
6859
|
+
* @version 212.1.0
|
|
6808
6860
|
*//**
|
|
6809
6861
|
* Constructs a new FaxApi.
|
|
6810
6862
|
* @alias module:purecloud-platform-client-v2/api/FaxApi
|
|
@@ -6853,7 +6905,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6853
6905
|
*/},{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(){/**
|
|
6854
6906
|
* Flows service.
|
|
6855
6907
|
* @module purecloud-platform-client-v2/api/FlowsApi
|
|
6856
|
-
* @version
|
|
6908
|
+
* @version 212.1.0
|
|
6857
6909
|
*//**
|
|
6858
6910
|
* Constructs a new FlowsApi.
|
|
6859
6911
|
* @alias module:purecloud-platform-client-v2/api/FlowsApi
|
|
@@ -6901,7 +6953,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6901
6953
|
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(){/**
|
|
6902
6954
|
* Gamification service.
|
|
6903
6955
|
* @module purecloud-platform-client-v2/api/GamificationApi
|
|
6904
|
-
* @version
|
|
6956
|
+
* @version 212.1.0
|
|
6905
6957
|
*//**
|
|
6906
6958
|
* Constructs a new GamificationApi.
|
|
6907
6959
|
* @alias module:purecloud-platform-client-v2/api/GamificationApi
|
|
@@ -7003,6 +7055,25 @@ if(filterType===undefined||filterType===null){throw'Missing the required paramet
|
|
|
7003
7055
|
if(filterId===undefined||filterId===null){throw'Missing the required parameter "filterId" when calling getGamificationInsightsMembers';}// verify the required parameter 'granularity' is set
|
|
7004
7056
|
if(granularity===undefined||granularity===null){throw'Missing the required parameter "granularity" when calling getGamificationInsightsMembers';}// verify the required parameter 'startWorkday' is set
|
|
7005
7057
|
if(startWorkday===undefined||startWorkday===null){throw'Missing the required parameter "startWorkday" when calling getGamificationInsightsMembers';}return this.apiClient.callApi('/api/v2/gamification/insights/members','GET',{},{'filterType':filterType,'filterId':filterId,'granularity':granularity,'startWorkday':startWorkday},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
7058
|
+
* Get insights rankings
|
|
7059
|
+
*
|
|
7060
|
+
* @param {Object} filterType Filter type for the query request.
|
|
7061
|
+
* @param {String} filterId ID for the filter type.
|
|
7062
|
+
* @param {Object} granularity Granularity
|
|
7063
|
+
* @param {String} comparativePeriodStartWorkday The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
7064
|
+
* @param {String} primaryPeriodStartWorkday The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
7065
|
+
* @param {Object} sortKey Sort key
|
|
7066
|
+
* @param {Object} opts Optional parameters
|
|
7067
|
+
* @param {String} opts.sortMetricId Sort Metric Id
|
|
7068
|
+
* @param {Number} opts.sectionSize The number of top and bottom users to return before ties
|
|
7069
|
+
* @param {String} opts.userIds A list of up to 100 comma-separated user Ids
|
|
7070
|
+
*/},{key:"getGamificationInsightsRankings",value:function getGamificationInsightsRankings(filterType,filterId,granularity,comparativePeriodStartWorkday,primaryPeriodStartWorkday,sortKey,opts){opts=opts||{};// verify the required parameter 'filterType' is set
|
|
7071
|
+
if(filterType===undefined||filterType===null){throw'Missing the required parameter "filterType" when calling getGamificationInsightsRankings';}// verify the required parameter 'filterId' is set
|
|
7072
|
+
if(filterId===undefined||filterId===null){throw'Missing the required parameter "filterId" when calling getGamificationInsightsRankings';}// verify the required parameter 'granularity' is set
|
|
7073
|
+
if(granularity===undefined||granularity===null){throw'Missing the required parameter "granularity" when calling getGamificationInsightsRankings';}// verify the required parameter 'comparativePeriodStartWorkday' is set
|
|
7074
|
+
if(comparativePeriodStartWorkday===undefined||comparativePeriodStartWorkday===null){throw'Missing the required parameter "comparativePeriodStartWorkday" when calling getGamificationInsightsRankings';}// verify the required parameter 'primaryPeriodStartWorkday' is set
|
|
7075
|
+
if(primaryPeriodStartWorkday===undefined||primaryPeriodStartWorkday===null){throw'Missing the required parameter "primaryPeriodStartWorkday" when calling getGamificationInsightsRankings';}// verify the required parameter 'sortKey' is set
|
|
7076
|
+
if(sortKey===undefined||sortKey===null){throw'Missing the required parameter "sortKey" when calling getGamificationInsightsRankings';}return this.apiClient.callApi('/api/v2/gamification/insights/rankings','GET',{},{'filterType':filterType,'filterId':filterId,'granularity':granularity,'comparativePeriodStartWorkday':comparativePeriodStartWorkday,'primaryPeriodStartWorkday':primaryPeriodStartWorkday,'sortKey':sortKey,'sortMetricId':opts['sortMetricId'],'sectionSize':opts['sectionSize'],'userIds':opts['userIds']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
7006
7077
|
* Get insights user trend for the current user
|
|
7007
7078
|
*
|
|
7008
7079
|
* @param {Object} filterType Filter type for the query request.
|
|
@@ -7441,7 +7512,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
7441
7512
|
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(){/**
|
|
7442
7513
|
* GeneralDataProtectionRegulation service.
|
|
7443
7514
|
* @module purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
7444
|
-
* @version
|
|
7515
|
+
* @version 212.1.0
|
|
7445
7516
|
*//**
|
|
7446
7517
|
* Constructs a new GeneralDataProtectionRegulationApi.
|
|
7447
7518
|
* @alias module:purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
@@ -7476,7 +7547,7 @@ if(searchValue===undefined||searchValue===null){throw'Missing the required param
|
|
|
7476
7547
|
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(){/**
|
|
7477
7548
|
* Geolocation service.
|
|
7478
7549
|
* @module purecloud-platform-client-v2/api/GeolocationApi
|
|
7479
|
-
* @version
|
|
7550
|
+
* @version 212.1.0
|
|
7480
7551
|
*//**
|
|
7481
7552
|
* Constructs a new GeolocationApi.
|
|
7482
7553
|
* @alias module:purecloud-platform-client-v2/api/GeolocationApi
|
|
@@ -7510,7 +7581,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
|
|
|
7510
7581
|
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(){/**
|
|
7511
7582
|
* Greetings service.
|
|
7512
7583
|
* @module purecloud-platform-client-v2/api/GreetingsApi
|
|
7513
|
-
* @version
|
|
7584
|
+
* @version 212.1.0
|
|
7514
7585
|
*//**
|
|
7515
7586
|
* Constructs a new GreetingsApi.
|
|
7516
7587
|
* @alias module:purecloud-platform-client-v2/api/GreetingsApi
|
|
@@ -7617,7 +7688,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
7617
7688
|
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(){/**
|
|
7618
7689
|
* Groups service.
|
|
7619
7690
|
* @module purecloud-platform-client-v2/api/GroupsApi
|
|
7620
|
-
* @version
|
|
7691
|
+
* @version 212.1.0
|
|
7621
7692
|
*//**
|
|
7622
7693
|
* Constructs a new GroupsApi.
|
|
7623
7694
|
* @alias module:purecloud-platform-client-v2/api/GroupsApi
|
|
@@ -7750,7 +7821,7 @@ if(groupId===undefined||groupId===null){throw'Missing the required parameter "gr
|
|
|
7750
7821
|
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(){/**
|
|
7751
7822
|
* IdentityProvider service.
|
|
7752
7823
|
* @module purecloud-platform-client-v2/api/IdentityProviderApi
|
|
7753
|
-
* @version
|
|
7824
|
+
* @version 212.1.0
|
|
7754
7825
|
*//**
|
|
7755
7826
|
* Constructs a new IdentityProviderApi.
|
|
7756
7827
|
* @alias module:purecloud-platform-client-v2/api/IdentityProviderApi
|
|
@@ -7906,7 +7977,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
7906
7977
|
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(){/**
|
|
7907
7978
|
* InfrastructureAsCode service.
|
|
7908
7979
|
* @module purecloud-platform-client-v2/api/InfrastructureAsCodeApi
|
|
7909
|
-
* @version
|
|
7980
|
+
* @version 212.1.0
|
|
7910
7981
|
*//**
|
|
7911
7982
|
* Constructs a new InfrastructureAsCodeApi.
|
|
7912
7983
|
* @alias module:purecloud-platform-client-v2/api/InfrastructureAsCodeApi
|
|
@@ -7960,7 +8031,7 @@ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId"
|
|
|
7960
8031
|
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(){/**
|
|
7961
8032
|
* Integrations service.
|
|
7962
8033
|
* @module purecloud-platform-client-v2/api/IntegrationsApi
|
|
7963
|
-
* @version
|
|
8034
|
+
* @version 212.1.0
|
|
7964
8035
|
*//**
|
|
7965
8036
|
* Constructs a new IntegrationsApi.
|
|
7966
8037
|
* @alias module:purecloud-platform-client-v2/api/IntegrationsApi
|
|
@@ -8595,7 +8666,7 @@ if(ucIntegrationId===undefined||ucIntegrationId===null){throw'Missing the requir
|
|
|
8595
8666
|
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(){/**
|
|
8596
8667
|
* Journey service.
|
|
8597
8668
|
* @module purecloud-platform-client-v2/api/JourneyApi
|
|
8598
|
-
* @version
|
|
8669
|
+
* @version 212.1.0
|
|
8599
8670
|
*//**
|
|
8600
8671
|
* Constructs a new JourneyApi.
|
|
8601
8672
|
* @alias module:purecloud-platform-client-v2/api/JourneyApi
|
|
@@ -9072,7 +9143,7 @@ if(versionId===undefined||versionId===null){throw'Missing the required parameter
|
|
|
9072
9143
|
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(){/**
|
|
9073
9144
|
* Knowledge service.
|
|
9074
9145
|
* @module purecloud-platform-client-v2/api/KnowledgeApi
|
|
9075
|
-
* @version
|
|
9146
|
+
* @version 212.1.0
|
|
9076
9147
|
*//**
|
|
9077
9148
|
* Constructs a new KnowledgeApi.
|
|
9078
9149
|
* @alias module:purecloud-platform-client-v2/api/KnowledgeApi
|
|
@@ -10142,7 +10213,7 @@ if(sourceId===undefined||sourceId===null){throw'Missing the required parameter "
|
|
|
10142
10213
|
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(){/**
|
|
10143
10214
|
* LanguageUnderstanding service.
|
|
10144
10215
|
* @module purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
10145
|
-
* @version
|
|
10216
|
+
* @version 212.1.0
|
|
10146
10217
|
*//**
|
|
10147
10218
|
* Constructs a new LanguageUnderstandingApi.
|
|
10148
10219
|
* @alias module:purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
@@ -10310,7 +10381,6 @@ if(minerId===undefined||minerId===null){throw'Missing the required parameter "mi
|
|
|
10310
10381
|
*/},{key:"getLanguageunderstandingMiners",value:function getLanguageunderstandingMiners(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/languageunderstanding/miners','GET',{},{'minerType':opts['minerType']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
10311
10382
|
* Get Organization Configuration
|
|
10312
10383
|
*
|
|
10313
|
-
* getLanguageunderstandingSettings is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
10314
10384
|
*/},{key:"getLanguageunderstandingSettings",value:function getLanguageunderstandingSettings(){return this.apiClient.callApi('/api/v2/languageunderstanding/settings','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
10315
10385
|
* Update an NLU Domain.
|
|
10316
10386
|
*
|
|
@@ -10402,7 +10472,7 @@ if(domainVersionId===undefined||domainVersionId===null){throw'Missing the requir
|
|
|
10402
10472
|
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(){/**
|
|
10403
10473
|
* Languages service.
|
|
10404
10474
|
* @module purecloud-platform-client-v2/api/LanguagesApi
|
|
10405
|
-
* @version
|
|
10475
|
+
* @version 212.1.0
|
|
10406
10476
|
*//**
|
|
10407
10477
|
* Constructs a new LanguagesApi.
|
|
10408
10478
|
* @alias module:purecloud-platform-client-v2/api/LanguagesApi
|
|
@@ -10457,7 +10527,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
10457
10527
|
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(){/**
|
|
10458
10528
|
* Learning service.
|
|
10459
10529
|
* @module purecloud-platform-client-v2/api/LearningApi
|
|
10460
|
-
* @version
|
|
10530
|
+
* @version 212.1.0
|
|
10461
10531
|
*//**
|
|
10462
10532
|
* Constructs a new LearningApi.
|
|
10463
10533
|
* @alias module:purecloud-platform-client-v2/api/LearningApi
|
|
@@ -10728,7 +10798,7 @@ if(moduleId===undefined||moduleId===null){throw'Missing the required parameter "
|
|
|
10728
10798
|
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(){/**
|
|
10729
10799
|
* License service.
|
|
10730
10800
|
* @module purecloud-platform-client-v2/api/LicenseApi
|
|
10731
|
-
* @version
|
|
10801
|
+
* @version 212.1.0
|
|
10732
10802
|
*//**
|
|
10733
10803
|
* Constructs a new LicenseApi.
|
|
10734
10804
|
* @alias module:purecloud-platform-client-v2/api/LicenseApi
|
|
@@ -10782,7 +10852,7 @@ if(featureName===undefined||featureName===null){throw'Missing the required param
|
|
|
10782
10852
|
*/},{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(){/**
|
|
10783
10853
|
* Locations service.
|
|
10784
10854
|
* @module purecloud-platform-client-v2/api/LocationsApi
|
|
10785
|
-
* @version
|
|
10855
|
+
* @version 212.1.0
|
|
10786
10856
|
*//**
|
|
10787
10857
|
* Constructs a new LocationsApi.
|
|
10788
10858
|
* @alias module:purecloud-platform-client-v2/api/LocationsApi
|
|
@@ -10841,7 +10911,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
10841
10911
|
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(){/**
|
|
10842
10912
|
* LogCapture service.
|
|
10843
10913
|
* @module purecloud-platform-client-v2/api/LogCaptureApi
|
|
10844
|
-
* @version
|
|
10914
|
+
* @version 212.1.0
|
|
10845
10915
|
*//**
|
|
10846
10916
|
* Constructs a new LogCaptureApi.
|
|
10847
10917
|
* @alias module:purecloud-platform-client-v2/api/LogCaptureApi
|
|
@@ -10891,7 +10961,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
10891
10961
|
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(){/**
|
|
10892
10962
|
* Messaging service.
|
|
10893
10963
|
* @module purecloud-platform-client-v2/api/MessagingApi
|
|
10894
|
-
* @version
|
|
10964
|
+
* @version 212.1.0
|
|
10895
10965
|
*//**
|
|
10896
10966
|
* Constructs a new MessagingApi.
|
|
10897
10967
|
* @alias module:purecloud-platform-client-v2/api/MessagingApi
|
|
@@ -10981,7 +11051,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
10981
11051
|
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(){/**
|
|
10982
11052
|
* MobileDevices service.
|
|
10983
11053
|
* @module purecloud-platform-client-v2/api/MobileDevicesApi
|
|
10984
|
-
* @version
|
|
11054
|
+
* @version 212.1.0
|
|
10985
11055
|
*//**
|
|
10986
11056
|
* Constructs a new MobileDevicesApi.
|
|
10987
11057
|
* @alias module:purecloud-platform-client-v2/api/MobileDevicesApi
|
|
@@ -11020,7 +11090,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11020
11090
|
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(){/**
|
|
11021
11091
|
* Notifications service.
|
|
11022
11092
|
* @module purecloud-platform-client-v2/api/NotificationsApi
|
|
11023
|
-
* @version
|
|
11093
|
+
* @version 212.1.0
|
|
11024
11094
|
*//**
|
|
11025
11095
|
* Constructs a new NotificationsApi.
|
|
11026
11096
|
* @alias module:purecloud-platform-client-v2/api/NotificationsApi
|
|
@@ -11077,7 +11147,7 @@ if(channelId===undefined||channelId===null){throw'Missing the required parameter
|
|
|
11077
11147
|
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(){/**
|
|
11078
11148
|
* OAuth service.
|
|
11079
11149
|
* @module purecloud-platform-client-v2/api/OAuthApi
|
|
11080
|
-
* @version
|
|
11150
|
+
* @version 212.1.0
|
|
11081
11151
|
*//**
|
|
11082
11152
|
* Constructs a new OAuthApi.
|
|
11083
11153
|
* @alias module:purecloud-platform-client-v2/api/OAuthApi
|
|
@@ -11162,7 +11232,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
|
|
|
11162
11232
|
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(){/**
|
|
11163
11233
|
* Objects service.
|
|
11164
11234
|
* @module purecloud-platform-client-v2/api/ObjectsApi
|
|
11165
|
-
* @version
|
|
11235
|
+
* @version 212.1.0
|
|
11166
11236
|
*//**
|
|
11167
11237
|
* Constructs a new ObjectsApi.
|
|
11168
11238
|
* @alias module:purecloud-platform-client-v2/api/ObjectsApi
|
|
@@ -11233,7 +11303,7 @@ if(divisionId===undefined||divisionId===null){throw'Missing the required paramet
|
|
|
11233
11303
|
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(){/**
|
|
11234
11304
|
* OperationalEvents service.
|
|
11235
11305
|
* @module purecloud-platform-client-v2/api/OperationalEventsApi
|
|
11236
|
-
* @version
|
|
11306
|
+
* @version 212.1.0
|
|
11237
11307
|
*//**
|
|
11238
11308
|
* Constructs a new OperationalEventsApi.
|
|
11239
11309
|
* @alias module:purecloud-platform-client-v2/api/OperationalEventsApi
|
|
@@ -11264,7 +11334,7 @@ if(eventDefinitionId===undefined||eventDefinitionId===null){throw'Missing the re
|
|
|
11264
11334
|
*/},{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(){/**
|
|
11265
11335
|
* Organization service.
|
|
11266
11336
|
* @module purecloud-platform-client-v2/api/OrganizationApi
|
|
11267
|
-
* @version
|
|
11337
|
+
* @version 212.1.0
|
|
11268
11338
|
*//**
|
|
11269
11339
|
* Constructs a new OrganizationApi.
|
|
11270
11340
|
* @alias module:purecloud-platform-client-v2/api/OrganizationApi
|
|
@@ -11389,7 +11459,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11389
11459
|
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(){/**
|
|
11390
11460
|
* OrganizationAuthorization service.
|
|
11391
11461
|
* @module purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
11392
|
-
* @version
|
|
11462
|
+
* @version 212.1.0
|
|
11393
11463
|
*//**
|
|
11394
11464
|
* Constructs a new OrganizationAuthorizationApi.
|
|
11395
11465
|
* @alias module:purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
@@ -11723,7 +11793,7 @@ if(trustorOrgId===undefined||trustorOrgId===null){throw'Missing the required par
|
|
|
11723
11793
|
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(){/**
|
|
11724
11794
|
* Outbound service.
|
|
11725
11795
|
* @module purecloud-platform-client-v2/api/OutboundApi
|
|
11726
|
-
* @version
|
|
11796
|
+
* @version 212.1.0
|
|
11727
11797
|
*//**
|
|
11728
11798
|
* Constructs a new OutboundApi.
|
|
11729
11799
|
* @alias module:purecloud-platform-client-v2/api/OutboundApi
|
|
@@ -12830,7 +12900,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
12830
12900
|
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(){/**
|
|
12831
12901
|
* Presence service.
|
|
12832
12902
|
* @module purecloud-platform-client-v2/api/PresenceApi
|
|
12833
|
-
* @version
|
|
12903
|
+
* @version 212.1.0
|
|
12834
12904
|
*//**
|
|
12835
12905
|
* Constructs a new PresenceApi.
|
|
12836
12906
|
* @alias module:purecloud-platform-client-v2/api/PresenceApi
|
|
@@ -13003,7 +13073,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
13003
13073
|
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(){/**
|
|
13004
13074
|
* ProcessAutomation service.
|
|
13005
13075
|
* @module purecloud-platform-client-v2/api/ProcessAutomationApi
|
|
13006
|
-
* @version
|
|
13076
|
+
* @version 212.1.0
|
|
13007
13077
|
*//**
|
|
13008
13078
|
* Constructs a new ProcessAutomationApi.
|
|
13009
13079
|
* @alias module:purecloud-platform-client-v2/api/ProcessAutomationApi
|
|
@@ -13066,7 +13136,7 @@ if(triggerId===undefined||triggerId===null){throw'Missing the required parameter
|
|
|
13066
13136
|
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(){/**
|
|
13067
13137
|
* Quality service.
|
|
13068
13138
|
* @module purecloud-platform-client-v2/api/QualityApi
|
|
13069
|
-
* @version
|
|
13139
|
+
* @version 212.1.0
|
|
13070
13140
|
*//**
|
|
13071
13141
|
* Constructs a new QualityApi.
|
|
13072
13142
|
* @alias module:purecloud-platform-client-v2/api/QualityApi
|
|
@@ -13545,7 +13615,7 @@ if(customerSurveyUrl===undefined||customerSurveyUrl===null){throw'Missing the re
|
|
|
13545
13615
|
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(){/**
|
|
13546
13616
|
* Recording service.
|
|
13547
13617
|
* @module purecloud-platform-client-v2/api/RecordingApi
|
|
13548
|
-
* @version
|
|
13618
|
+
* @version 212.1.0
|
|
13549
13619
|
*//**
|
|
13550
13620
|
* Constructs a new RecordingApi.
|
|
13551
13621
|
* @alias module:purecloud-platform-client-v2/api/RecordingApi
|
|
@@ -13957,7 +14027,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
13957
14027
|
*/},{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(){/**
|
|
13958
14028
|
* ResponseManagement service.
|
|
13959
14029
|
* @module purecloud-platform-client-v2/api/ResponseManagementApi
|
|
13960
|
-
* @version
|
|
14030
|
+
* @version 212.1.0
|
|
13961
14031
|
*//**
|
|
13962
14032
|
* Constructs a new ResponseManagementApi.
|
|
13963
14033
|
* @alias module:purecloud-platform-client-v2/api/ResponseManagementApi
|
|
@@ -14078,7 +14148,7 @@ if(responseAssetId===undefined||responseAssetId===null){throw'Missing the requir
|
|
|
14078
14148
|
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(){/**
|
|
14079
14149
|
* Routing service.
|
|
14080
14150
|
* @module purecloud-platform-client-v2/api/RoutingApi
|
|
14081
|
-
* @version
|
|
14151
|
+
* @version 212.1.0
|
|
14082
14152
|
*//**
|
|
14083
14153
|
* Constructs a new RoutingApi.
|
|
14084
14154
|
* @alias module:purecloud-platform-client-v2/api/RoutingApi
|
|
@@ -14739,7 +14809,7 @@ if(predictorId===undefined||predictorId===null){throw'Missing the required param
|
|
|
14739
14809
|
if(queueId===undefined||queueId===null){throw'Missing the required parameter "queueId" when calling patchRoutingQueueMember';}// verify the required parameter 'memberId' is set
|
|
14740
14810
|
if(memberId===undefined||memberId===null){throw'Missing the required parameter "memberId" when calling patchRoutingQueueMember';}// verify the required parameter 'body' is set
|
|
14741
14811
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling patchRoutingQueueMember';}return this.apiClient.callApi('/api/v2/routing/queues/{queueId}/members/{memberId}','PATCH',{'queueId':queueId,'memberId':memberId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
14742
|
-
* Join or unjoin a set of users for a queue
|
|
14812
|
+
* Join or unjoin a set of up to 100 users for a queue
|
|
14743
14813
|
*
|
|
14744
14814
|
* @param {String} queueId Queue ID
|
|
14745
14815
|
* @param {Array.<Object>} body Queue Members
|
|
@@ -15084,7 +15154,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
15084
15154
|
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(){/**
|
|
15085
15155
|
* SCIM service.
|
|
15086
15156
|
* @module purecloud-platform-client-v2/api/SCIMApi
|
|
15087
|
-
* @version
|
|
15157
|
+
* @version 212.1.0
|
|
15088
15158
|
*//**
|
|
15089
15159
|
* Constructs a new SCIMApi.
|
|
15090
15160
|
* @alias module:purecloud-platform-client-v2/api/SCIMApi
|
|
@@ -15309,7 +15379,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
15309
15379
|
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(){/**
|
|
15310
15380
|
* ScreenRecording service.
|
|
15311
15381
|
* @module purecloud-platform-client-v2/api/ScreenRecordingApi
|
|
15312
|
-
* @version
|
|
15382
|
+
* @version 212.1.0
|
|
15313
15383
|
*//**
|
|
15314
15384
|
* Constructs a new ScreenRecordingApi.
|
|
15315
15385
|
* @alias module:purecloud-platform-client-v2/api/ScreenRecordingApi
|
|
@@ -15324,7 +15394,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
15324
15394
|
*/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(){/**
|
|
15325
15395
|
* Scripts service.
|
|
15326
15396
|
* @module purecloud-platform-client-v2/api/ScriptsApi
|
|
15327
|
-
* @version
|
|
15397
|
+
* @version 212.1.0
|
|
15328
15398
|
*//**
|
|
15329
15399
|
* Constructs a new ScriptsApi.
|
|
15330
15400
|
* @alias module:purecloud-platform-client-v2/api/ScriptsApi
|
|
@@ -15460,7 +15530,7 @@ if(scriptId===undefined||scriptId===null){throw'Missing the required parameter "
|
|
|
15460
15530
|
*/},{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(){/**
|
|
15461
15531
|
* Search service.
|
|
15462
15532
|
* @module purecloud-platform-client-v2/api/SearchApi
|
|
15463
|
-
* @version
|
|
15533
|
+
* @version 212.1.0
|
|
15464
15534
|
*//**
|
|
15465
15535
|
* Constructs a new SearchApi.
|
|
15466
15536
|
* @alias module:purecloud-platform-client-v2/api/SearchApi
|
|
@@ -15632,7 +15702,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
15632
15702
|
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(){/**
|
|
15633
15703
|
* Settings service.
|
|
15634
15704
|
* @module purecloud-platform-client-v2/api/SettingsApi
|
|
15635
|
-
* @version
|
|
15705
|
+
* @version 212.1.0
|
|
15636
15706
|
*//**
|
|
15637
15707
|
* Constructs a new SettingsApi.
|
|
15638
15708
|
* @alias module:purecloud-platform-client-v2/api/SettingsApi
|
|
@@ -15682,7 +15752,7 @@ if(agentId===undefined||agentId===null){throw'Missing the required parameter "ag
|
|
|
15682
15752
|
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(){/**
|
|
15683
15753
|
* SocialMedia service.
|
|
15684
15754
|
* @module purecloud-platform-client-v2/api/SocialMediaApi
|
|
15685
|
-
* @version
|
|
15755
|
+
* @version 212.1.0
|
|
15686
15756
|
*//**
|
|
15687
15757
|
* Constructs a new SocialMediaApi.
|
|
15688
15758
|
* @alias module:purecloud-platform-client-v2/api/SocialMediaApi
|
|
@@ -15947,7 +16017,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
15947
16017
|
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(){/**
|
|
15948
16018
|
* SpeechTextAnalytics service.
|
|
15949
16019
|
* @module purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
15950
|
-
* @version
|
|
16020
|
+
* @version 212.1.0
|
|
15951
16021
|
*//**
|
|
15952
16022
|
* Constructs a new SpeechTextAnalyticsApi.
|
|
15953
16023
|
* @alias module:purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
@@ -16246,7 +16316,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
16246
16316
|
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(){/**
|
|
16247
16317
|
* Stations service.
|
|
16248
16318
|
* @module purecloud-platform-client-v2/api/StationsApi
|
|
16249
|
-
* @version
|
|
16319
|
+
* @version 212.1.0
|
|
16250
16320
|
*//**
|
|
16251
16321
|
* Constructs a new StationsApi.
|
|
16252
16322
|
* @alias module:purecloud-platform-client-v2/api/StationsApi
|
|
@@ -16278,7 +16348,7 @@ if(stationId===undefined||stationId===null){throw'Missing the required parameter
|
|
|
16278
16348
|
*/},{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(){/**
|
|
16279
16349
|
* Suggest service.
|
|
16280
16350
|
* @module purecloud-platform-client-v2/api/SuggestApi
|
|
16281
|
-
* @version
|
|
16351
|
+
* @version 212.1.0
|
|
16282
16352
|
*//**
|
|
16283
16353
|
* Constructs a new SuggestApi.
|
|
16284
16354
|
* @alias module:purecloud-platform-client-v2/api/SuggestApi
|
|
@@ -16318,7 +16388,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16318
16388
|
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(){/**
|
|
16319
16389
|
* TaskManagement service.
|
|
16320
16390
|
* @module purecloud-platform-client-v2/api/TaskManagementApi
|
|
16321
|
-
* @version
|
|
16391
|
+
* @version 212.1.0
|
|
16322
16392
|
*//**
|
|
16323
16393
|
* Constructs a new TaskManagementApi.
|
|
16324
16394
|
* @alias module:purecloud-platform-client-v2/api/TaskManagementApi
|
|
@@ -16336,6 +16406,16 @@ if(workbinId===undefined||workbinId===null){throw'Missing the required parameter
|
|
|
16336
16406
|
* @param {String} workitemId Workitem ID
|
|
16337
16407
|
*/},{key:"deleteTaskmanagementWorkitem",value:function deleteTaskmanagementWorkitem(workitemId){// verify the required parameter 'workitemId' is set
|
|
16338
16408
|
if(workitemId===undefined||workitemId===null){throw'Missing the required parameter "workitemId" when calling deleteTaskmanagementWorkitem';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/{workitemId}','DELETE',{'workitemId':workitemId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16409
|
+
* Delete a bulk add job
|
|
16410
|
+
*
|
|
16411
|
+
* @param {String} bulkJobId Bulk job id
|
|
16412
|
+
*/},{key:"deleteTaskmanagementWorkitemsBulkAddJob",value:function deleteTaskmanagementWorkitemsBulkAddJob(bulkJobId){// verify the required parameter 'bulkJobId' is set
|
|
16413
|
+
if(bulkJobId===undefined||bulkJobId===null){throw'Missing the required parameter "bulkJobId" when calling deleteTaskmanagementWorkitemsBulkAddJob';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/bulk/add/jobs/{bulkJobId}','DELETE',{'bulkJobId':bulkJobId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16414
|
+
* Delete a Bulk job
|
|
16415
|
+
*
|
|
16416
|
+
* @param {String} bulkJobId Bulk job id
|
|
16417
|
+
*/},{key:"deleteTaskmanagementWorkitemsBulkTerminateJob",value:function deleteTaskmanagementWorkitemsBulkTerminateJob(bulkJobId){// verify the required parameter 'bulkJobId' is set
|
|
16418
|
+
if(bulkJobId===undefined||bulkJobId===null){throw'Missing the required parameter "bulkJobId" when calling deleteTaskmanagementWorkitemsBulkTerminateJob';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/bulk/terminate/jobs/{bulkJobId}','DELETE',{'bulkJobId':bulkJobId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16339
16419
|
* Delete a schema
|
|
16340
16420
|
*
|
|
16341
16421
|
* @param {String} schemaId Schema ID
|
|
@@ -16346,6 +16426,13 @@ if(schemaId===undefined||schemaId===null){throw'Missing the required parameter "
|
|
|
16346
16426
|
* @param {String} worktypeId Worktype id
|
|
16347
16427
|
*/},{key:"deleteTaskmanagementWorktype",value:function deleteTaskmanagementWorktype(worktypeId){// verify the required parameter 'worktypeId' is set
|
|
16348
16428
|
if(worktypeId===undefined||worktypeId===null){throw'Missing the required parameter "worktypeId" when calling deleteTaskmanagementWorktype';}return this.apiClient.callApi('/api/v2/taskmanagement/worktypes/{worktypeId}','DELETE',{'worktypeId':worktypeId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16429
|
+
* Delete a date based rule
|
|
16430
|
+
*
|
|
16431
|
+
* @param {String} worktypeId Worktype id
|
|
16432
|
+
* @param {String} ruleId ruleId
|
|
16433
|
+
*/},{key:"deleteTaskmanagementWorktypeFlowsDatebasedRule",value:function deleteTaskmanagementWorktypeFlowsDatebasedRule(worktypeId,ruleId){// verify the required parameter 'worktypeId' is set
|
|
16434
|
+
if(worktypeId===undefined||worktypeId===null){throw'Missing the required parameter "worktypeId" when calling deleteTaskmanagementWorktypeFlowsDatebasedRule';}// verify the required parameter 'ruleId' is set
|
|
16435
|
+
if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "ruleId" when calling deleteTaskmanagementWorktypeFlowsDatebasedRule';}return this.apiClient.callApi('/api/v2/taskmanagement/worktypes/{worktypeId}/flows/datebased/rules/{ruleId}','DELETE',{'worktypeId':worktypeId,'ruleId':ruleId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16349
16436
|
* Delete a rule
|
|
16350
16437
|
*
|
|
16351
16438
|
* @param {String} worktypeId Worktype id
|
|
@@ -16457,6 +16544,34 @@ if(workitemId===undefined||workitemId===null){throw'Missing the required paramet
|
|
|
16457
16544
|
* @param {Object} opts.sortOrder Ascending or descending sort order (default to descending)
|
|
16458
16545
|
*/},{key:"getTaskmanagementWorkitemWrapups",value:function getTaskmanagementWorkitemWrapups(workitemId,opts){opts=opts||{};// verify the required parameter 'workitemId' is set
|
|
16459
16546
|
if(workitemId===undefined||workitemId===null){throw'Missing the required parameter "workitemId" when calling getTaskmanagementWorkitemWrapups';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/{workitemId}/wrapups','GET',{'workitemId':workitemId},{'expands':opts['expands'],'after':opts['after'],'pageSize':opts['pageSize'],'sortOrder':opts['sortOrder']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16547
|
+
* Get the bulk add job associated with the job id.
|
|
16548
|
+
*
|
|
16549
|
+
* @param {String} bulkJobId Bulk job id
|
|
16550
|
+
*/},{key:"getTaskmanagementWorkitemsBulkAddJob",value:function getTaskmanagementWorkitemsBulkAddJob(bulkJobId){// verify the required parameter 'bulkJobId' is set
|
|
16551
|
+
if(bulkJobId===undefined||bulkJobId===null){throw'Missing the required parameter "bulkJobId" when calling getTaskmanagementWorkitemsBulkAddJob';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/bulk/add/jobs/{bulkJobId}','GET',{'bulkJobId':bulkJobId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16552
|
+
* Get bulk add job results.
|
|
16553
|
+
*
|
|
16554
|
+
* @param {String} bulkJobId Bulk job id
|
|
16555
|
+
*/},{key:"getTaskmanagementWorkitemsBulkAddJobResults",value:function getTaskmanagementWorkitemsBulkAddJobResults(bulkJobId){// verify the required parameter 'bulkJobId' is set
|
|
16556
|
+
if(bulkJobId===undefined||bulkJobId===null){throw'Missing the required parameter "bulkJobId" when calling getTaskmanagementWorkitemsBulkAddJobResults';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/bulk/add/jobs/{bulkJobId}/results','GET',{'bulkJobId':bulkJobId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16557
|
+
* Get bulk jobs created by the currently logged in user.
|
|
16558
|
+
*
|
|
16559
|
+
* @param {Object} opts Optional parameters
|
|
16560
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
16561
|
+
* @param {Number} opts.pageSize Limit the number of entities to return. It is not guaranteed that the requested number of entities will be filled in a single request. If an `after` key is returned as part of the response it is possible that more entities that match the filter criteria exist. Maximum of 200. (default to 25)
|
|
16562
|
+
* @param {Object} opts.sortOrder Ascending or descending sort order (default to descending)
|
|
16563
|
+
* @param {Object} opts.action The bulk job action.
|
|
16564
|
+
*/},{key:"getTaskmanagementWorkitemsBulkJobsUsersMe",value:function getTaskmanagementWorkitemsBulkJobsUsersMe(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/taskmanagement/workitems/bulk/jobs/users/me','GET',{},{'after':opts['after'],'pageSize':opts['pageSize'],'sortOrder':opts['sortOrder'],'action':opts['action']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16565
|
+
* Get the bulk job associated with the job id.
|
|
16566
|
+
*
|
|
16567
|
+
* @param {String} bulkJobId Bulk job id
|
|
16568
|
+
*/},{key:"getTaskmanagementWorkitemsBulkTerminateJob",value:function getTaskmanagementWorkitemsBulkTerminateJob(bulkJobId){// verify the required parameter 'bulkJobId' is set
|
|
16569
|
+
if(bulkJobId===undefined||bulkJobId===null){throw'Missing the required parameter "bulkJobId" when calling getTaskmanagementWorkitemsBulkTerminateJob';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/bulk/terminate/jobs/{bulkJobId}','GET',{'bulkJobId':bulkJobId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16570
|
+
* Get bulk terminate job results.
|
|
16571
|
+
*
|
|
16572
|
+
* @param {String} bulkJobId Bulk job id
|
|
16573
|
+
*/},{key:"getTaskmanagementWorkitemsBulkTerminateJobResults",value:function getTaskmanagementWorkitemsBulkTerminateJobResults(bulkJobId){// verify the required parameter 'bulkJobId' is set
|
|
16574
|
+
if(bulkJobId===undefined||bulkJobId===null){throw'Missing the required parameter "bulkJobId" when calling getTaskmanagementWorkitemsBulkTerminateJobResults';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/bulk/terminate/jobs/{bulkJobId}/results','GET',{'bulkJobId':bulkJobId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16460
16575
|
* Get the workitem query job associated with the job id.
|
|
16461
16576
|
*
|
|
16462
16577
|
* @param {String} jobId jobId
|
|
@@ -16494,6 +16609,21 @@ if(schemaId===undefined||schemaId===null){throw'Missing the required parameter "
|
|
|
16494
16609
|
* @param {Array.<String>} opts.expands Which fields, if any, to expand.
|
|
16495
16610
|
*/},{key:"getTaskmanagementWorktype",value:function getTaskmanagementWorktype(worktypeId,opts){opts=opts||{};// verify the required parameter 'worktypeId' is set
|
|
16496
16611
|
if(worktypeId===undefined||worktypeId===null){throw'Missing the required parameter "worktypeId" when calling getTaskmanagementWorktype';}return this.apiClient.callApi('/api/v2/taskmanagement/worktypes/{worktypeId}','GET',{'worktypeId':worktypeId},{'expands':this.apiClient.buildCollectionParam(opts['expands'],'multi')},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16612
|
+
* Get a date based rule
|
|
16613
|
+
*
|
|
16614
|
+
* @param {String} worktypeId Worktype id
|
|
16615
|
+
* @param {String} ruleId ruleId
|
|
16616
|
+
*/},{key:"getTaskmanagementWorktypeFlowsDatebasedRule",value:function getTaskmanagementWorktypeFlowsDatebasedRule(worktypeId,ruleId){// verify the required parameter 'worktypeId' is set
|
|
16617
|
+
if(worktypeId===undefined||worktypeId===null){throw'Missing the required parameter "worktypeId" when calling getTaskmanagementWorktypeFlowsDatebasedRule';}// verify the required parameter 'ruleId' is set
|
|
16618
|
+
if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "ruleId" when calling getTaskmanagementWorktypeFlowsDatebasedRule';}return this.apiClient.callApi('/api/v2/taskmanagement/worktypes/{worktypeId}/flows/datebased/rules/{ruleId}','GET',{'worktypeId':worktypeId,'ruleId':ruleId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16619
|
+
* Get all date based rules for a worktype
|
|
16620
|
+
*
|
|
16621
|
+
* @param {String} worktypeId Worktype id
|
|
16622
|
+
* @param {Object} opts Optional parameters
|
|
16623
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
16624
|
+
* @param {Number} opts.pageSize Limit the number of entities to return. It is not guaranteed that the requested number of entities will be filled in a single request. If an `after` key is returned as part of the response it is possible that more entities that match the filter criteria exist. Maximum of 200. (default to 25)
|
|
16625
|
+
*/},{key:"getTaskmanagementWorktypeFlowsDatebasedRules",value:function getTaskmanagementWorktypeFlowsDatebasedRules(worktypeId,opts){opts=opts||{};// verify the required parameter 'worktypeId' is set
|
|
16626
|
+
if(worktypeId===undefined||worktypeId===null){throw'Missing the required parameter "worktypeId" when calling getTaskmanagementWorktypeFlowsDatebasedRules';}return this.apiClient.callApi('/api/v2/taskmanagement/worktypes/{worktypeId}/flows/datebased/rules','GET',{'worktypeId':worktypeId},{'after':opts['after'],'pageSize':opts['pageSize']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16497
16627
|
* Get an attribute change rule
|
|
16498
16628
|
*
|
|
16499
16629
|
* @param {String} worktypeId Worktype id
|
|
@@ -16602,6 +16732,20 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16602
16732
|
*/},{key:"patchTaskmanagementWorkitemUsersMeWrapups",value:function patchTaskmanagementWorkitemUsersMeWrapups(workitemId,body){// verify the required parameter 'workitemId' is set
|
|
16603
16733
|
if(workitemId===undefined||workitemId===null){throw'Missing the required parameter "workitemId" when calling patchTaskmanagementWorkitemUsersMeWrapups';}// verify the required parameter 'body' is set
|
|
16604
16734
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling patchTaskmanagementWorkitemUsersMeWrapups';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/{workitemId}/users/me/wrapups','PATCH',{'workitemId':workitemId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16735
|
+
* Update workitem bulk add job.
|
|
16736
|
+
*
|
|
16737
|
+
* @param {String} bulkJobId Bulk job id
|
|
16738
|
+
* @param {Object} body Bulk add job update request
|
|
16739
|
+
*/},{key:"patchTaskmanagementWorkitemsBulkAddJob",value:function patchTaskmanagementWorkitemsBulkAddJob(bulkJobId,body){// verify the required parameter 'bulkJobId' is set
|
|
16740
|
+
if(bulkJobId===undefined||bulkJobId===null){throw'Missing the required parameter "bulkJobId" when calling patchTaskmanagementWorkitemsBulkAddJob';}// verify the required parameter 'body' is set
|
|
16741
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling patchTaskmanagementWorkitemsBulkAddJob';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/bulk/add/jobs/{bulkJobId}','PATCH',{'bulkJobId':bulkJobId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16742
|
+
* Update workitem bulk terminate job.
|
|
16743
|
+
*
|
|
16744
|
+
* @param {String} bulkJobId Bulk job id
|
|
16745
|
+
* @param {Object} body Bulk job update request
|
|
16746
|
+
*/},{key:"patchTaskmanagementWorkitemsBulkTerminateJob",value:function patchTaskmanagementWorkitemsBulkTerminateJob(bulkJobId,body){// verify the required parameter 'bulkJobId' is set
|
|
16747
|
+
if(bulkJobId===undefined||bulkJobId===null){throw'Missing the required parameter "bulkJobId" when calling patchTaskmanagementWorkitemsBulkTerminateJob';}// verify the required parameter 'body' is set
|
|
16748
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling patchTaskmanagementWorkitemsBulkTerminateJob';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/bulk/terminate/jobs/{bulkJobId}','PATCH',{'bulkJobId':bulkJobId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16605
16749
|
* Update the attributes of a worktype
|
|
16606
16750
|
*
|
|
16607
16751
|
* @param {String} worktypeId Worktype id
|
|
@@ -16609,6 +16753,15 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16609
16753
|
*/},{key:"patchTaskmanagementWorktype",value:function patchTaskmanagementWorktype(worktypeId,body){// verify the required parameter 'worktypeId' is set
|
|
16610
16754
|
if(worktypeId===undefined||worktypeId===null){throw'Missing the required parameter "worktypeId" when calling patchTaskmanagementWorktype';}// verify the required parameter 'body' is set
|
|
16611
16755
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling patchTaskmanagementWorktype';}return this.apiClient.callApi('/api/v2/taskmanagement/worktypes/{worktypeId}','PATCH',{'worktypeId':worktypeId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16756
|
+
* Update the attributes of a date based rule
|
|
16757
|
+
*
|
|
16758
|
+
* @param {String} worktypeId Worktype id
|
|
16759
|
+
* @param {String} ruleId ruleId
|
|
16760
|
+
* @param {Object} body Rule
|
|
16761
|
+
*/},{key:"patchTaskmanagementWorktypeFlowsDatebasedRule",value:function patchTaskmanagementWorktypeFlowsDatebasedRule(worktypeId,ruleId,body){// verify the required parameter 'worktypeId' is set
|
|
16762
|
+
if(worktypeId===undefined||worktypeId===null){throw'Missing the required parameter "worktypeId" when calling patchTaskmanagementWorktypeFlowsDatebasedRule';}// verify the required parameter 'ruleId' is set
|
|
16763
|
+
if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "ruleId" when calling patchTaskmanagementWorktypeFlowsDatebasedRule';}// verify the required parameter 'body' is set
|
|
16764
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling patchTaskmanagementWorktypeFlowsDatebasedRule';}return this.apiClient.callApi('/api/v2/taskmanagement/worktypes/{worktypeId}/flows/datebased/rules/{ruleId}','PATCH',{'worktypeId':worktypeId,'ruleId':ruleId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16612
16765
|
* Update the attributes of a rule
|
|
16613
16766
|
*
|
|
16614
16767
|
* @param {String} worktypeId Worktype id
|
|
@@ -16668,6 +16821,16 @@ if(workitemId===undefined||workitemId===null){throw'Missing the required paramet
|
|
|
16668
16821
|
* @param {Object} body Workitem
|
|
16669
16822
|
*/},{key:"postTaskmanagementWorkitems",value:function postTaskmanagementWorkitems(body){// verify the required parameter 'body' is set
|
|
16670
16823
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postTaskmanagementWorkitems';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16824
|
+
* Create a workitem bulk add job.
|
|
16825
|
+
*
|
|
16826
|
+
* @param {Object} body Bulk job definition.
|
|
16827
|
+
*/},{key:"postTaskmanagementWorkitemsBulkAddJobs",value:function postTaskmanagementWorkitemsBulkAddJobs(body){// verify the required parameter 'body' is set
|
|
16828
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postTaskmanagementWorkitemsBulkAddJobs';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/bulk/add/jobs','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16829
|
+
* Create a workitem bulk terminate job.
|
|
16830
|
+
*
|
|
16831
|
+
* @param {Object} body Bulk job definition.
|
|
16832
|
+
*/},{key:"postTaskmanagementWorkitemsBulkTerminateJobs",value:function postTaskmanagementWorkitemsBulkTerminateJobs(body){// verify the required parameter 'body' is set
|
|
16833
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postTaskmanagementWorkitemsBulkTerminateJobs';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/bulk/terminate/jobs','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16671
16834
|
* Query for workitems
|
|
16672
16835
|
* This query requires at least one EQ filter on the workbinId, assigneeId or typeId attributes.
|
|
16673
16836
|
* @param {Object} body WorkitemQueryPostRequest
|
|
@@ -16684,6 +16847,13 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16684
16847
|
* @param {Object} body Schema
|
|
16685
16848
|
*/},{key:"postTaskmanagementWorkitemsSchemas",value:function postTaskmanagementWorkitemsSchemas(body){// verify the required parameter 'body' is set
|
|
16686
16849
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postTaskmanagementWorkitemsSchemas';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/schemas','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16850
|
+
* Add a date based rule to a worktype
|
|
16851
|
+
*
|
|
16852
|
+
* @param {String} worktypeId Worktype id
|
|
16853
|
+
* @param {Object} body Rule
|
|
16854
|
+
*/},{key:"postTaskmanagementWorktypeFlowsDatebasedRules",value:function postTaskmanagementWorktypeFlowsDatebasedRules(worktypeId,body){// verify the required parameter 'worktypeId' is set
|
|
16855
|
+
if(worktypeId===undefined||worktypeId===null){throw'Missing the required parameter "worktypeId" when calling postTaskmanagementWorktypeFlowsDatebasedRules';}// verify the required parameter 'body' is set
|
|
16856
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postTaskmanagementWorktypeFlowsDatebasedRules';}return this.apiClient.callApi('/api/v2/taskmanagement/worktypes/{worktypeId}/flows/datebased/rules','POST',{'worktypeId':worktypeId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16687
16857
|
* Add an attribute-change rule to a worktype
|
|
16688
16858
|
*
|
|
16689
16859
|
* @param {String} worktypeId Worktype id
|
|
@@ -16724,7 +16894,7 @@ if(schemaId===undefined||schemaId===null){throw'Missing the required parameter "
|
|
|
16724
16894
|
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(){/**
|
|
16725
16895
|
* Teams service.
|
|
16726
16896
|
* @module purecloud-platform-client-v2/api/TeamsApi
|
|
16727
|
-
* @version
|
|
16897
|
+
* @version 212.1.0
|
|
16728
16898
|
*//**
|
|
16729
16899
|
* Constructs a new TeamsApi.
|
|
16730
16900
|
* @alias module:purecloud-platform-client-v2/api/TeamsApi
|
|
@@ -16804,7 +16974,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16804
16974
|
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(){/**
|
|
16805
16975
|
* Telephony service.
|
|
16806
16976
|
* @module purecloud-platform-client-v2/api/TelephonyApi
|
|
16807
|
-
* @version
|
|
16977
|
+
* @version 212.1.0
|
|
16808
16978
|
*//**
|
|
16809
16979
|
* Constructs a new TelephonyApi.
|
|
16810
16980
|
* @alias module:purecloud-platform-client-v2/api/TelephonyApi
|
|
@@ -16851,7 +17021,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
|
|
|
16851
17021
|
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(){/**
|
|
16852
17022
|
* TelephonyProvidersEdge service.
|
|
16853
17023
|
* @module purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
16854
|
-
* @version
|
|
17024
|
+
* @version 212.1.0
|
|
16855
17025
|
*//**
|
|
16856
17026
|
* Constructs a new TelephonyProvidersEdgeApi.
|
|
16857
17027
|
* @alias module:purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
@@ -17686,7 +17856,7 @@ if(trunkBaseSettingsId===undefined||trunkBaseSettingsId===null){throw'Missing th
|
|
|
17686
17856
|
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(){/**
|
|
17687
17857
|
* Textbots service.
|
|
17688
17858
|
* @module purecloud-platform-client-v2/api/TextbotsApi
|
|
17689
|
-
* @version
|
|
17859
|
+
* @version 212.1.0
|
|
17690
17860
|
*//**
|
|
17691
17861
|
* Constructs a new TextbotsApi.
|
|
17692
17862
|
* @alias module:purecloud-platform-client-v2/api/TextbotsApi
|
|
@@ -17721,7 +17891,7 @@ if(launchRequest===undefined||launchRequest===null){throw'Missing the required p
|
|
|
17721
17891
|
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(){/**
|
|
17722
17892
|
* Tokens service.
|
|
17723
17893
|
* @module purecloud-platform-client-v2/api/TokensApi
|
|
17724
|
-
* @version
|
|
17894
|
+
* @version 212.1.0
|
|
17725
17895
|
*//**
|
|
17726
17896
|
* Constructs a new TokensApi.
|
|
17727
17897
|
* @alias module:purecloud-platform-client-v2/api/TokensApi
|
|
@@ -17755,7 +17925,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
17755
17925
|
*/},{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(){/**
|
|
17756
17926
|
* Uploads service.
|
|
17757
17927
|
* @module purecloud-platform-client-v2/api/UploadsApi
|
|
17758
|
-
* @version
|
|
17928
|
+
* @version 212.1.0
|
|
17759
17929
|
*//**
|
|
17760
17930
|
* Constructs a new UploadsApi.
|
|
17761
17931
|
* @alias module:purecloud-platform-client-v2/api/UploadsApi
|
|
@@ -17821,7 +17991,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
17821
17991
|
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(){/**
|
|
17822
17992
|
* Usage service.
|
|
17823
17993
|
* @module purecloud-platform-client-v2/api/UsageApi
|
|
17824
|
-
* @version
|
|
17994
|
+
* @version 212.1.0
|
|
17825
17995
|
*//**
|
|
17826
17996
|
* Constructs a new UsageApi.
|
|
17827
17997
|
* @alias module:purecloud-platform-client-v2/api/UsageApi
|
|
@@ -17875,7 +18045,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
17875
18045
|
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(){/**
|
|
17876
18046
|
* UserRecordings service.
|
|
17877
18047
|
* @module purecloud-platform-client-v2/api/UserRecordingsApi
|
|
17878
|
-
* @version
|
|
18048
|
+
* @version 212.1.0
|
|
17879
18049
|
*//**
|
|
17880
18050
|
* Constructs a new UserRecordingsApi.
|
|
17881
18051
|
* @alias module:purecloud-platform-client-v2/api/UserRecordingsApi
|
|
@@ -17932,7 +18102,7 @@ if(recordingId===undefined||recordingId===null){throw'Missing the required param
|
|
|
17932
18102
|
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(){/**
|
|
17933
18103
|
* Users service.
|
|
17934
18104
|
* @module purecloud-platform-client-v2/api/UsersApi
|
|
17935
|
-
* @version
|
|
18105
|
+
* @version 212.1.0
|
|
17936
18106
|
*//**
|
|
17937
18107
|
* Constructs a new UsersApi.
|
|
17938
18108
|
* @alias module:purecloud-platform-client-v2/api/UsersApi
|
|
@@ -18629,7 +18799,7 @@ if(verifierId===undefined||verifierId===null){throw'Missing the required paramet
|
|
|
18629
18799
|
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(){/**
|
|
18630
18800
|
* Utilities service.
|
|
18631
18801
|
* @module purecloud-platform-client-v2/api/UtilitiesApi
|
|
18632
|
-
* @version
|
|
18802
|
+
* @version 212.1.0
|
|
18633
18803
|
*//**
|
|
18634
18804
|
* Constructs a new UtilitiesApi.
|
|
18635
18805
|
* @alias module:purecloud-platform-client-v2/api/UtilitiesApi
|
|
@@ -18656,7 +18826,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18656
18826
|
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(){/**
|
|
18657
18827
|
* Voicemail service.
|
|
18658
18828
|
* @module purecloud-platform-client-v2/api/VoicemailApi
|
|
18659
|
-
* @version
|
|
18829
|
+
* @version 212.1.0
|
|
18660
18830
|
*//**
|
|
18661
18831
|
* Constructs a new VoicemailApi.
|
|
18662
18832
|
* @alias module:purecloud-platform-client-v2/api/VoicemailApi
|
|
@@ -18818,7 +18988,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
18818
18988
|
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(){/**
|
|
18819
18989
|
* WebChat service.
|
|
18820
18990
|
* @module purecloud-platform-client-v2/api/WebChatApi
|
|
18821
|
-
* @version
|
|
18991
|
+
* @version 212.1.0
|
|
18822
18992
|
*//**
|
|
18823
18993
|
* Constructs a new WebChatApi.
|
|
18824
18994
|
* @alias module:purecloud-platform-client-v2/api/WebChatApi
|
|
@@ -18953,7 +19123,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18953
19123
|
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(){/**
|
|
18954
19124
|
* WebDeployments service.
|
|
18955
19125
|
* @module purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
18956
|
-
* @version
|
|
19126
|
+
* @version 212.1.0
|
|
18957
19127
|
*//**
|
|
18958
19128
|
* Constructs a new WebDeploymentsApi.
|
|
18959
19129
|
* @alias module:purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
@@ -19074,7 +19244,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
|
|
|
19074
19244
|
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(){/**
|
|
19075
19245
|
* WebMessaging service.
|
|
19076
19246
|
* @module purecloud-platform-client-v2/api/WebMessagingApi
|
|
19077
|
-
* @version
|
|
19247
|
+
* @version 212.1.0
|
|
19078
19248
|
*//**
|
|
19079
19249
|
* Constructs a new WebMessagingApi.
|
|
19080
19250
|
* @alias module:purecloud-platform-client-v2/api/WebMessagingApi
|
|
@@ -19090,7 +19260,7 @@ if(deployment===undefined||deployment===null){throw'Missing the required paramet
|
|
|
19090
19260
|
*/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(){/**
|
|
19091
19261
|
* Widgets service.
|
|
19092
19262
|
* @module purecloud-platform-client-v2/api/WidgetsApi
|
|
19093
|
-
* @version
|
|
19263
|
+
* @version 212.1.0
|
|
19094
19264
|
*//**
|
|
19095
19265
|
* Constructs a new WidgetsApi.
|
|
19096
19266
|
* @alias module:purecloud-platform-client-v2/api/WidgetsApi
|
|
@@ -19125,7 +19295,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
|
|
|
19125
19295
|
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(){/**
|
|
19126
19296
|
* WorkforceManagement service.
|
|
19127
19297
|
* @module purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
19128
|
-
* @version
|
|
19298
|
+
* @version 212.1.0
|
|
19129
19299
|
*//**
|
|
19130
19300
|
* Constructs a new WorkforceManagementApi.
|
|
19131
19301
|
* @alias module:purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
@@ -19405,6 +19575,30 @@ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId"
|
|
|
19405
19575
|
*/},{key:"getWorkforcemanagementBusinessunitIntradayPlanninggroups",value:function getWorkforcemanagementBusinessunitIntradayPlanninggroups(businessUnitId,_date){// verify the required parameter 'businessUnitId' is set
|
|
19406
19576
|
if(businessUnitId===undefined||businessUnitId===null){throw'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitIntradayPlanninggroups';}// verify the required parameter '_date' is set
|
|
19407
19577
|
if(_date===undefined||_date===null){throw'Missing the required parameter "_date" when calling getWorkforcemanagementBusinessunitIntradayPlanninggroups';}return this.apiClient.callApi('/api/v2/workforcemanagement/businessunits/{businessUnitId}/intraday/planninggroups','GET',{'businessUnitId':businessUnitId},{'date':_date},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
19578
|
+
* Get the latest session for the business unit ID
|
|
19579
|
+
*
|
|
19580
|
+
* @param {String} businessUnitId
|
|
19581
|
+
* getWorkforcemanagementBusinessunitMainforecastContinuousforecastSession is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
19582
|
+
*/},{key:"getWorkforcemanagementBusinessunitMainforecastContinuousforecastSession",value:function getWorkforcemanagementBusinessunitMainforecastContinuousforecastSession(businessUnitId){// verify the required parameter 'businessUnitId' is set
|
|
19583
|
+
if(businessUnitId===undefined||businessUnitId===null){throw'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSession';}return this.apiClient.callApi('/api/v2/workforcemanagement/businessunits/{businessUnitId}/mainforecast/continuousforecast/session','GET',{'businessUnitId':businessUnitId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
19584
|
+
* Get the session details for the session ID
|
|
19585
|
+
*
|
|
19586
|
+
* @param {String} businessUnitId
|
|
19587
|
+
* @param {String} sessionId
|
|
19588
|
+
* getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionId is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
19589
|
+
*/},{key:"getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionId",value:function getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionId(businessUnitId,sessionId){// verify the required parameter 'businessUnitId' is set
|
|
19590
|
+
if(businessUnitId===undefined||businessUnitId===null){throw'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionId';}// verify the required parameter 'sessionId' is set
|
|
19591
|
+
if(sessionId===undefined||sessionId===null){throw'Missing the required parameter "sessionId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionId';}return this.apiClient.callApi('/api/v2/workforcemanagement/businessunits/{businessUnitId}/mainforecast/continuousforecast/session/{sessionId}','GET',{'businessUnitId':businessUnitId,'sessionId':sessionId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
19592
|
+
* Get the snapshot details for the snapshot ID
|
|
19593
|
+
*
|
|
19594
|
+
* @param {String} businessUnitId
|
|
19595
|
+
* @param {String} sessionId
|
|
19596
|
+
* @param {String} snapshotId
|
|
19597
|
+
* getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionIdSnapshotSnapshotId is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
19598
|
+
*/},{key:"getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionIdSnapshotSnapshotId",value:function getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionIdSnapshotSnapshotId(businessUnitId,sessionId,snapshotId){// verify the required parameter 'businessUnitId' is set
|
|
19599
|
+
if(businessUnitId===undefined||businessUnitId===null){throw'Missing the required parameter "businessUnitId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionIdSnapshotSnapshotId';}// verify the required parameter 'sessionId' is set
|
|
19600
|
+
if(sessionId===undefined||sessionId===null){throw'Missing the required parameter "sessionId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionIdSnapshotSnapshotId';}// verify the required parameter 'snapshotId' is set
|
|
19601
|
+
if(snapshotId===undefined||snapshotId===null){throw'Missing the required parameter "snapshotId" when calling getWorkforcemanagementBusinessunitMainforecastContinuousforecastSessionSessionIdSnapshotSnapshotId';}return this.apiClient.callApi('/api/v2/workforcemanagement/businessunits/{businessUnitId}/mainforecast/continuousforecast/session/{sessionId}/snapshot/{snapshotId}','GET',{'businessUnitId':businessUnitId,'sessionId':sessionId,'snapshotId':snapshotId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
19408
19602
|
* Get all authorized management units in the business unit
|
|
19409
19603
|
*
|
|
19410
19604
|
* @param {String} businessUnitId The ID of the business unit, or 'mine' for the business unit of the logged-in user.
|
|
@@ -20902,7 +21096,7 @@ if(timeOffLimitId===undefined||timeOffLimitId===null){throw'Missing the required
|
|
|
20902
21096
|
* </pre>
|
|
20903
21097
|
* </p>
|
|
20904
21098
|
* @module purecloud-platform-client-v2/index
|
|
20905
|
-
* @version
|
|
21099
|
+
* @version 212.1.0
|
|
20906
21100
|
*/var platformClient=/*#__PURE__*/_createClass(function platformClient(){_classCallCheck(this,platformClient);/**
|
|
20907
21101
|
* The ApiClient constructor.
|
|
20908
21102
|
* @property {module:purecloud-platform-client-v2/ApiClient}
|
|
@@ -21152,5 +21346,5 @@ if(timeOffLimitId===undefined||timeOffLimitId===null){throw'Missing the required
|
|
|
21152
21346
|
*/this.WorkforceManagementApi=WorkforceManagementApi;/**
|
|
21153
21347
|
* The PureCloudRegionsHost Object.
|
|
21154
21348
|
* @property {module:purecloud-platform-client-v2/MyPureCloudRegionHost}
|
|
21155
|
-
*/this.PureCloudRegionHosts=PureCloudRegionHosts;});//export default platformClient;
|
|
21349
|
+
*/this.PureCloudRegionHosts=PureCloudRegionHosts;this.AbstractHttpClient=AbstractHttpClient;this.DefaultHttpClient=DefaultHttpClient;this.HttpRequestOptions=HttpRequestOptions;});//export default platformClient;
|
|
21156
21350
|
var index=new platformClient();module.exports=index;
|