diff --git a/README.md b/README.md index 7b2d3de0..945f7bf4 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ For direct use in a browser script: ```{"language":"html"} - + diff --git a/build/README.md b/build/README.md index 7b2d3de0..945f7bf4 100644 --- a/build/README.md +++ b/build/README.md @@ -28,7 +28,7 @@ For direct use in a browser script: ```{"language":"html"} - + diff --git a/build/dist/node/purecloud-guest-chat-client.js b/build/dist/node/purecloud-guest-chat-client.js index d80a6802..c5832a23 100644 --- a/build/dist/node/purecloud-guest-chat-client.js +++ b/build/dist/node/purecloud-guest-chat-client.js @@ -14,7 +14,7 @@ var PureCloudRegionHosts = { /** * @module purecloud-guest-chat-client/ApiClient - * @version 5.0.2 + * @version 5.1.0 */ class ApiClient { /** @@ -541,7 +541,7 @@ class ApiClient { // set header parameters request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - //request.set({ 'purecloud-sdk': '5.0.2' }); + //request.set({ 'purecloud-sdk': '5.1.0' }); // set request timeout request.timeout(this.timeout); @@ -666,7 +666,7 @@ class WebChatApi { /** * WebChat service. * @module purecloud-guest-chat-client/api/WebChatApi - * @version 5.0.2 + * @version 5.1.0 */ /** @@ -1045,7 +1045,7 @@ class WebChatApi { * *

* @module purecloud-guest-chat-client/index - * @version 5.0.2 + * @version 5.1.0 */ class platformClient { constructor() { diff --git a/build/dist/web-amd/purecloud-guest-chat-client.js b/build/dist/web-amd/purecloud-guest-chat-client.js index 7036de85..5c0a41f7 100644 --- a/build/dist/web-amd/purecloud-guest-chat-client.js +++ b/build/dist/web-amd/purecloud-guest-chat-client.js @@ -12,7 +12,7 @@ define(['superagent'], function (superagent) { 'use strict'; /** * @module purecloud-guest-chat-client/ApiClient - * @version 5.0.2 + * @version 5.1.0 */ class ApiClient { /** @@ -539,7 +539,7 @@ define(['superagent'], function (superagent) { 'use strict'; // set header parameters request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - //request.set({ 'purecloud-sdk': '5.0.2' }); + //request.set({ 'purecloud-sdk': '5.1.0' }); // set request timeout request.timeout(this.timeout); @@ -664,7 +664,7 @@ define(['superagent'], function (superagent) { 'use strict'; /** * WebChat service. * @module purecloud-guest-chat-client/api/WebChatApi - * @version 5.0.2 + * @version 5.1.0 */ /** @@ -1043,7 +1043,7 @@ define(['superagent'], function (superagent) { 'use strict'; * *

* @module purecloud-guest-chat-client/index - * @version 5.0.2 + * @version 5.1.0 */ class platformClient { constructor() { diff --git a/build/dist/web-cjs/bundle.js b/build/dist/web-cjs/bundle.js index d5acc1e5..3bedec3e 100644 --- a/build/dist/web-cjs/bundle.js +++ b/build/dist/web-cjs/bundle.js @@ -1979,7 +1979,7 @@ function isSlowBuffer (obj) { /** * @module purecloud-guest-chat-client/ApiClient - * @version 5.0.2 + * @version 5.1.0 */ class ApiClient { /** @@ -2506,7 +2506,7 @@ class ApiClient { // set header parameters request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - //request.set({ 'purecloud-sdk': '5.0.2' }); + //request.set({ 'purecloud-sdk': '5.1.0' }); // set request timeout request.timeout(this.timeout); @@ -2631,7 +2631,7 @@ class WebChatApi { /** * WebChat service. * @module purecloud-guest-chat-client/api/WebChatApi - * @version 5.0.2 + * @version 5.1.0 */ /** @@ -3010,7 +3010,7 @@ class WebChatApi { * *

* @module purecloud-guest-chat-client/index - * @version 5.0.2 + * @version 5.1.0 */ class platformClient { constructor() { diff --git a/build/dist/web-cjs/purecloud-guest-chat-client.js b/build/dist/web-cjs/purecloud-guest-chat-client.js index e767853b..9c05a258 100644 --- a/build/dist/web-cjs/purecloud-guest-chat-client.js +++ b/build/dist/web-cjs/purecloud-guest-chat-client.js @@ -68,7 +68,8 @@ function toByteArray (b64) { ? validLen - 4 : validLen - for (var i = 0; i < len; i += 4) { + var i + for (i = 0; i < len; i += 4) { tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | @@ -167,6 +168,10 @@ function fromByteArray (uint8) { var base64 = require('base64-js') var ieee754 = require('ieee754') +var customInspectSymbol = + (typeof Symbol === 'function' && typeof Symbol.for === 'function') + ? Symbol.for('nodejs.util.inspect.custom') + : null exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer @@ -203,7 +208,9 @@ function typedArraySupport () { // Can typed array instances can be augmented? try { var arr = new Uint8Array(1) - arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + var proto = { foo: function () { return 42 } } + Object.setPrototypeOf(proto, Uint8Array.prototype) + Object.setPrototypeOf(arr, proto) return arr.foo() === 42 } catch (e) { return false @@ -232,7 +239,7 @@ function createBuffer (length) { } // Return an augmented `Uint8Array` instance var buf = new Uint8Array(length) - buf.__proto__ = Buffer.prototype + Object.setPrototypeOf(buf, Buffer.prototype) return buf } @@ -282,7 +289,7 @@ function from (value, encodingOrOffset, length) { } if (value == null) { - throw TypeError( + throw new TypeError( 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + (typeof value) ) @@ -334,8 +341,8 @@ Buffer.from = function (value, encodingOrOffset, length) { // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: // https://github.com/feross/buffer/pull/148 -Buffer.prototype.__proto__ = Uint8Array.prototype -Buffer.__proto__ = Uint8Array +Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype) +Object.setPrototypeOf(Buffer, Uint8Array) function assertSize (size) { if (typeof size !== 'number') { @@ -439,7 +446,8 @@ function fromArrayBuffer (array, byteOffset, length) { } // Return an augmented `Uint8Array` instance - buf.__proto__ = Buffer.prototype + Object.setPrototypeOf(buf, Buffer.prototype) + return buf } @@ -761,6 +769,9 @@ Buffer.prototype.inspect = function inspect () { if (this.length > max) str += ' ... ' return '' } +if (customInspectSymbol) { + Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect +} Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { if (isInstance(target, Uint8Array)) { @@ -886,7 +897,7 @@ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) } } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) } throw new TypeError('val must be string, number or Buffer') @@ -1252,7 +1263,8 @@ Buffer.prototype.slice = function slice (start, end) { var newBuf = this.subarray(start, end) // Return an augmented `Uint8Array` instance - newBuf.__proto__ = Buffer.prototype + Object.setPrototypeOf(newBuf, Buffer.prototype) + return newBuf } @@ -1741,6 +1753,8 @@ Buffer.prototype.fill = function fill (val, start, end, encoding) { } } else if (typeof val === 'number') { val = val & 255 + } else if (typeof val === 'boolean') { + val = Number(val) } // Invalid ranges are not set to a default, so can range check early. @@ -6048,7 +6062,7 @@ function isSlowBuffer (obj) { /** * @module purecloud-guest-chat-client/ApiClient - * @version 5.0.2 + * @version 5.1.0 */ class ApiClient { /** @@ -6575,7 +6589,7 @@ class ApiClient { // set header parameters request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - //request.set({ 'purecloud-sdk': '5.0.2' }); + //request.set({ 'purecloud-sdk': '5.1.0' }); // set request timeout request.timeout(this.timeout); @@ -6700,7 +6714,7 @@ class WebChatApi { /** * WebChat service. * @module purecloud-guest-chat-client/api/WebChatApi - * @version 5.0.2 + * @version 5.1.0 */ /** @@ -7079,7 +7093,7 @@ class WebChatApi { * *

* @module purecloud-guest-chat-client/index - * @version 5.0.2 + * @version 5.1.0 */ class platformClient { constructor() { diff --git a/build/dist/web-cjs/purecloud-guest-chat-client.min.js b/build/dist/web-cjs/purecloud-guest-chat-client.min.js index 21f89b7a..b19f3d1e 100644 --- a/build/dist/web-cjs/purecloud-guest-chat-client.min.js +++ b/build/dist/web-cjs/purecloud-guest-chat-client.min.js @@ -1 +1 @@ -require=function(){return function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var f=r[s]={exports:{}};e[s][0].call(f.exports,function(t){return i(e[s][1][t]||t)},f,f.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s0?n-4:n,c=0;c>16&255,a[u++]=e>>8&255,a[u++]=255&e;2===s&&(e=i[t.charCodeAt(c)]<<2|i[t.charCodeAt(c+1)]>>4,a[u++]=255&e);1===s&&(e=i[t.charCodeAt(c)]<<10|i[t.charCodeAt(c+1)]<<4|i[t.charCodeAt(c+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e);return a},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var i,o,s=[],a=e;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],3:[function(t,e,r){(function(e){"use strict";var n=t("base64-js"),i=t("ieee754");r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return r.__proto__=e.prototype,r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return a(t,e,r)}function a(t,r,n){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|l(t,r),i=s(n),o=i.write(t,r);o!==n&&(i=i.slice(0,o));return i}(t,r);if(ArrayBuffer.isView(t))return f(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(j(t,ArrayBuffer)||t&&j(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function l(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||j(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return k(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(o)return i?-1:k(t).length;r=(""+r).toLowerCase(),o=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,r,n,i,o){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),G(n=+n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=e.from(r,i)),e.isBuffer(r))return 0===r.length?-1:g(t,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):g(t,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:h>223?3:h>191?2:1;if(i+c<=r)switch(c){case 1:h<128&&(f=h);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&h)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&h)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&h)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,c=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=c}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),""},e.prototype.compare=function(t,r,n,i,o){if(j(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,a=n-r,u=Math.min(s,a),h=this.slice(i,o),f=t.slice(r,n),c=0;c>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return m(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return v(this,t,e,r);case"base64":return b(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function P(t,r,n,i,o,s){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||rt.length)throw new RangeError("Index out of range")}function M(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,0,r,8),i.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;t=~~t,r=void 0===r?n:~~r,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),r<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,e>>>=0,r||x(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||x(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||x(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||x(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||x(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},e.prototype.readInt8=function(t,e){return t>>>=0,e||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||x(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||x(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||x(t,4,this.length),i.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||x(t,4,this.length),i.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||x(t,8,this.length),i.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||x(t,8,this.length),i.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||P(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n)||P(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},e.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,i){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r=0;--s)t[s+r]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,i),r);return o},e.prototype.fill=function(t,r,n,i){if("string"==typeof t){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!e.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var o=t.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(t=o)}}else"number"==typeof t&&(t&=255);if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=r;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function D(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function j(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function G(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":2,buffer:3,ieee754:4}],4:[function(t,e,r){r.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,f=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+t[e+c],c+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=h}return(p?-1:1)*s*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var s,a,u,h=8*o-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=f?(a=0,s=f):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,h-=8);t[r+p-d]|=128*g}},{}],5:[function(t,e,r){function n(t){if(t)return function(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}(t)}void 0!==e&&(e.exports=n),n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},n.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4==r){var n;try{n=e.status}catch(t){n=0}if(!n){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var n=function(e,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{e.onprogress=n.bind(null,"download"),e.upload&&(e.upload.onprogress=n.bind(null,"upload"))}catch(t){}try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){var i=this._header["content-type"],o=this._serializer||f.serialize[i?i.split(";")[0]:""];!o&&g(i)&&(o=f.serialize["application/json"]),o&&(r=o(r))}for(var s in this.header)null!=this.header[s]&&this.header.hasOwnProperty(s)&&e.setRequestHeader(s,this.header[s]);return this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0!==r?r:null),this},f.agent=function(){return new u},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(t){u.prototype[t.toLowerCase()]=function(e,r){var n=new f.Request(t,e);return this._setDefaults(n),r&&n.end(r),n}}),u.prototype.del=u.prototype.delete,f.get=function(t,e,r){var n=f("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},f.head=function(t,e,r){var n=f("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},f.options=function(t,e,r){var n=f("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},f.del=w,f.delete=w,f.patch=function(t,e,r){var n=f("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},f.post=function(t,e,r){var n=f("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},f.put=function(t,e,r){var n=f("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}},{"./agent-base":6,"./is-object":8,"./request-base":9,"./response-base":10,"component-emitter":5}],8:[function(t,e,r){"use strict";e.exports=function(t){return null!==t&&"object"==typeof t}},{}],9:[function(t,e,r){"use strict";var n=t("./is-object");function i(t){if(t)return function(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}(t)}e.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},i.prototype.parse=function(t){return this._parser=t,this},i.prototype.responseType=function(t){return this._responseType=t,this},i.prototype.serialize=function(t){return this._serializer=t,this},i.prototype.timeout=function(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this;for(var e in t)switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;default:console.warn("Unknown timeout option",e)}return this},i.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var o=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!=e.status)return!0;if(t){if(t.code&&~o.indexOf(t.code))return!0;if(t.timeout&&"ECONNABORTED"==t.code)return!0;if(t.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(t,e){if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(t,e){r.end(function(r,n){r?e(r):t(n)})})}return this._fullfilledPromise.then(t,e)},i.prototype.catch=function(t){return this.then(void 0,t)},i.prototype.use=function(t){return t(this),this},i.prototype.ok=function(t){if("function"!=typeof t)throw Error("Callback required");return this._okCallback=t,this},i.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},i.prototype.get=function(t){return this._header[t.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(t,e){if(n(t)){for(var r in t)this.set(r,t[r]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},i.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},i.prototype.field=function(t,e){if(null===t||void 0===t)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),n(t)){for(var r in t)this.field(r,t[r]);return this}if(Array.isArray(e)){for(var i in e)this.field(t,e[i]);return this}if(null===e||void 0===e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=""+e),this._getFormData().append(t,e),this},i.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},i.prototype._auth=function(t,e,r,n){switch(r.type){case"basic":this.set("Authorization","Basic "+n(t+":"+e));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer "+t)}return this},i.prototype.withCredentials=function(t){return void 0==t&&(t=!0),this._withCredentials=t,this},i.prototype.redirects=function(t){return this._maxRedirects=t,this},i.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw TypeError("Invalid argument");return this._maxResponseSize=t,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(t){var e=n(t),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(e&&n(this._data))for(var i in t)this._data[i]=t[i];else"string"==typeof t?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"==r?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(r||this.type("json"),this)},i.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},i.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var r=this.url.substring(e+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,e)+"?"+r.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(t,e,r){if(!this._aborted){var n=new Error(t+e+"ms exceeded");n.timeout=e,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.abort(),this.callback(n)}},i.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},{"./is-object":8}],10:[function(t,e,r){"use strict";var n=t("./utils");function i(t){if(t)return function(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}(t)}e.exports=i,i.prototype.get=function(t){return this.header[t.toLowerCase()]},i.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=n.type(e);var r=n.params(e);for(var i in r)this[i]=r[i];this.links={};try{t.link&&(this.links=n.parseLinks(t.link))}catch(t){}},i.prototype._setStatusProperties=function(t){var e=t/100|0;this.status=this.statusCode=t,this.statusType=e,this.info=1==e,this.ok=2==e,this.redirect=3==e,this.clientError=4==e,this.serverError=5==e,this.error=(4==e||5==e)&&this.toError(),this.created=201==t,this.accepted=202==t,this.noContent=204==t,this.badRequest=400==t,this.unauthorized=401==t,this.notAcceptable=406==t,this.forbidden=403==t,this.notFound=404==t,this.unprocessableEntity=422==t}},{"./utils":11}],11:[function(t,e,r){"use strict";r.type=function(t){return t.split(/ *; */).shift()},r.params=function(t){return t.split(/ *; */).reduce(function(t,e){var r=e.split(/ *= */),n=r.shift(),i=r.shift();return n&&i&&(t[n]=i),t},{})},r.parseLinks=function(t){return t.split(/ *, */).reduce(function(t,e){var r=e.split(/ *; */),n=r[0].slice(1,-1);return t[r[1].split(/ *= */)[1].slice(1,-1)]=n,t},{})},r.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},{}],platformClient:[function(t,e,r){(function(r,n){"use strict";var i,o=(i=t("superagent"))&&"object"==typeof i&&"default"in i?i.default:i,s={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"},a=void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},u=[],h=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,c=!1;function l(){c=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e>18&63]+u[i>>12&63]+u[i>>6&63]+u[63&i]);return o.join("")}function d(t){var e;c||l();for(var r=t.length,n=r%3,i="",o=[],s=0,a=r-n;sa?a:s+16383));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),o.push(i),o.join("")}function g(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,f=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+t[e+c],c+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=h}return(p?-1:1)*s*Math.pow(2,o-n)}function y(t,e,r,n,i,o){var s,a,u,h=8*o-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=f?(a=0,s=f):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,h-=8);t[r+p-d]|=128*g}var m={}.toString,w=Array.isArray||function(t){return"[object Array]"==m.call(t)};function v(){return n.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(t,e){if(v()=v())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+v().toString(16)+" bytes");return 0|t}function R(t){return!(null==t||!t._isBuffer)}function I(t,e){if(R(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return tt(t).length;default:if(n)return Z(t).length;e=(""+e).toLowerCase(),n=!0}}function S(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function x(t,e,r,i,o){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=n.from(e,i)),R(e))return 0===e.length?-1:P(t,e,r,i,o);if("number"==typeof e)return e&=255,n.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):P(t,[e],r,i,o);throw new TypeError("val must be string, number or Buffer")}function P(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function q(t,e,r){return 0===e&&r===t.length?d(t):d(t.slice(e,r))}function D(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:h>223?3:h>191?2:1;if(i+c<=r)switch(c){case 1:h<128&&(f=h);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&h)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&h)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&h)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,c=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=c}return function(t){var e=t.length;if(e<=j)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,r);case"utf8":case"utf-8":return D(this,e,r);case"ascii":return G(this,e,r);case"latin1":case"binary":return W(this,e,r);case"base64":return q(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},n.prototype.equals=function(t){if(!R(t))throw new TypeError("Argument must be a Buffer");return this===t||0===n.compare(this,t)},n.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),""},n.prototype.compare=function(t,e,r,n,i){if(!R(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,a=Math.min(o,s),u=this.slice(n,i),h=t.slice(e,r),f=0;fi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return M(this,t,e,r);case"utf8":case"utf-8":return B(this,t,e,r);case"ascii":return U(this,t,e,r);case"latin1":case"binary":return O(this,t,e,r);case"base64":return L(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var j=4096;function G(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function $(t,e,r,n,i,o){if(!R(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function J(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function H(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function F(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function K(t,e,r,n,i){return i||F(t,0,r,4),y(t,e,r,n,23,4),r+4}function X(t,e,r,n,i){return i||F(t,0,r,8),y(t,e,r,n,52,8),r+8}n.prototype.slice=function(t,e){var r,i=this.length;if(t=~~t,e=void 0===e?i:~~e,t<0?(t+=i)<0&&(t=0):t>i&&(t=i),e<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(i*=256);)n+=this[t+--e]*i;return n},n.prototype.readUInt8=function(t,e){return e||z(t,1,this.length),this[t]},n.prototype.readUInt16LE=function(t,e){return e||z(t,2,this.length),this[t]|this[t+1]<<8},n.prototype.readUInt16BE=function(t,e){return e||z(t,2,this.length),this[t]<<8|this[t+1]},n.prototype.readUInt32LE=function(t,e){return e||z(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},n.prototype.readUInt32BE=function(t,e){return e||z(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},n.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||z(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},n.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||z(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},n.prototype.readInt8=function(t,e){return e||z(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,e){e||z(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(t,e){e||z(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(t,e){return e||z(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},n.prototype.readInt32BE=function(t,e){return e||z(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},n.prototype.readFloatLE=function(t,e){return e||z(t,4,this.length),g(this,t,!0,23,4)},n.prototype.readFloatBE=function(t,e){return e||z(t,4,this.length),g(this,t,!1,23,4)},n.prototype.readDoubleLE=function(t,e){return e||z(t,8,this.length),g(this,t,!0,52,8)},n.prototype.readDoubleBE=function(t,e){return e||z(t,8,this.length),g(this,t,!1,52,8)},n.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||$(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},n.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,1,255,0),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},n.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):J(this,t,e,!0),e+2},n.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):J(this,t,e,!1),e+2},n.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):H(this,t,e,!0),e+4},n.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):H(this,t,e,!1),e+4},n.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);$(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},n.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);$(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},n.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,1,127,-128),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},n.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):J(this,t,e,!0),e+2},n.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):J(this,t,e,!1),e+2},n.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):H(this,t,e,!0),e+4},n.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):H(this,t,e,!1),e+4},n.prototype.writeFloatLE=function(t,e,r){return K(this,t,e,!0,r)},n.prototype.writeFloatBE=function(t,e,r){return K(this,t,e,!1,r)},n.prototype.writeDoubleLE=function(t,e,r){return X(this,t,e,!0,r)},n.prototype.writeDoubleBE=function(t,e,r){return X(this,t,e,!1,r)},n.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else if(s<1e3||!n.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function tt(t){return function(t){var e,r,n,i,o,s;c||l();var a=t.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[a-2]?2:"="===t[a-1]?1:0,s=new f(3*a/4-o),n=o>0?a-4:a;var u=0;for(e=0,r=0;e>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=h[t.charCodeAt(e)]<<2|h[t.charCodeAt(e+1)]>>4,s[u++]=255&i):1===o&&(i=h[t.charCodeAt(e)]<<10|h[t.charCodeAt(e+1)]<<4|h[t.charCodeAt(e+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(Q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function et(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function rt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}class nt{get instance(){return nt.instance}set instance(t){nt.instance=t}constructor(){nt.instance||(nt.instance=this),this.CollectionFormatEnum={CSV:",",SSV:" ",TSV:"\t",PIPES:"|",MULTI:"multi"};try{localStorage.setItem("purecloud_local_storage_test","purecloud_local_storage_test"),localStorage.removeItem("purecloud_local_storage_test"),this.hasLocalStorage=!0}catch(t){this.hasLocalStorage=!1}this.setEnvironment("https://api.mypurecloud.com"),this.authentications={"PureCloud OAuth":{type:"oauth2"},"Guest Chat JWT":{type:"apiKey",in:"header",name:"Authorization",apiKeyPrefix:"Bearer"}},this.defaultHeaders={},this.timeout=16e3,this.authData={},this.settingsPrefix="purecloud",this.superagent=o,"undefined"!=typeof window&&(window.ApiClient=this)}setDebugLog(t,e){this.debugLog=t,this.debugLogMaxLines=e&&e>0?e:void 0}setReturnExtendedResponses(t){this.returnExtended=t}setPersistSettings(t,e){this.persistSettings=t,this.settingsPrefix=e?e.replace(/\W+/g,"_"):"purecloud",this._debugTrace(`this.settingsPrefix=${this.settingsPrefix}`)}_saveSettings(t){try{if(t.apiKey&&(this.authData.apiKey=t.apiKey,this.authentications["Guest Chat JWT"].apiKey=t.apiKey),t.state&&(this.authData.state=t.state),t.tokenExpiryTime&&(this.authData.tokenExpiryTime=t.tokenExpiryTime,this.authData.tokenExpiryTimeString=t.tokenExpiryTimeString),!0!==this.persistSettings)return;if(!this.hasLocalStorage)return void this._debugTrace("Warning: Cannot access local storage. Settings will not be saved.");let e=JSON.parse(JSON.stringify(this.authData));delete e.state,localStorage.setItem(`${this.settingsPrefix}_auth_data`,JSON.stringify(e)),this._debugTrace("Auth data saved to local storage")}catch(t){console.error(t)}}_loadSettings(){if(!0!==this.persistSettings)return;if(!this.hasLocalStorage)return void this._debugTrace("Warning: Cannot access local storage. Settings will not be loaded.");const t=this.authData.state;this.authData=localStorage.getItem(`${this.settingsPrefix}_auth_data`),this.authData?this.authData=JSON.parse(this.authData):this.authData={},this.authData.apiKey&&this.setJwt(this.authData.apiKey),this.authData.state=t}setEnvironment(t){t||(t="mypurecloud.com"),(t=t.replace(/\/+$/,"")).startsWith("https://")&&(t=t.substring(8)),t.startsWith("http://")&&(t=t.substring(7)),t.startsWith("api.")&&(t=t.substring(4)),this.environment=t,this.basePath=`https://api.${t}`,this.authUrl=`https://login.${t}`}_testTokenAccess(){return new Promise((t,e)=>{this._loadSettings(),this.authentications["Guest Chat JWT"].apiKey?this.callApi("/api/v2/authorization/permissions","GET",null,null,null,null,null,["Guest Chat JWT"],["application/json"],["application/json"]).then(()=>{t()}).catch(t=>{this._saveSettings({apiKey:void 0}),e(t)}):e(new Error("Token is not set"))})}setJwt(t){this._saveSettings({apiKey:t})}setStorageKey(t){this.storageKey=t,this.setJwt(this.authentications["Guest Chat JWT"].apiKey)}_buildAuthUrl(t,e){return e||(e={}),Object.keys(e).reduce((t,r)=>e[r]?`${t}&${r}=${e[r]}`:t,`${this.authUrl}/${t}?`)}paramToString(t){return t?t instanceof Date?t.toJSON():t.toString():""}buildUrl(t,e){t.match(/^\//)||(t=`/${t}`);var r=this.basePath+t;return r=r.replace(/\{([\w-]+)\}/g,(t,r)=>{var n;return n=e.hasOwnProperty(r)?this.paramToString(e[r]):t,encodeURIComponent(n)})}isJsonMime(t){return Boolean(t&&t.match(/^application\/json(;.*)?$/i))}jsonPreferredMime(t){for(var e=0;e{var r=this.authentications[e];switch(r.type){case"basic":(r.username||r.password)&&t.auth(r.username||"",r.password||"");break;case"apiKey":if(r.apiKey){var n={};r.apiKeyPrefix?n[r.name]=`${r.apiKeyPrefix} ${r.apiKey}`:n[r.name]=r.apiKey,"header"===r.in?t.set(n):t.query(n)}break;case"oauth2":r.accessToken&&t.set({Authorization:`Bearer ${r.accessToken}`});break;default:throw new Error(`Unknown authentication type: ${r.type}`)}})}callApi(t,e,r,n,i,s,a,u,h,f){var c=this.buildUrl(t,r),l=o(e,c);if(this.proxy&&l.proxy&&l.proxy(this.proxy),this.debugLog){var p=`[REQUEST] ${e} ${c}`;r&&Object.keys(r).count>0&&r[Object.keys(r)[0]]&&(p+=`\nPath Params: ${JSON.stringify(r)}`),n&&Object.keys(n).count>0&&n[Object.keys(n)[0]]&&(p+=`\nQuery Params: ${JSON.stringify(n)}`),a&&(p+=`\nnBody: ${JSON.stringify(a)}`),this._debugTrace(p)}this.applyAuthToRequest(l,u),l.query(this.normalizeParams(n)),l.set(this.defaultHeaders).set(this.normalizeParams(i)),l.timeout(this.timeout);var d=this.jsonPreferredMime(h);if(d?l.type(d):l.header["Content-Type"]||l.type("application/json"),"application/x-www-form-urlencoded"===d)l.send(this.normalizeParams(s));else if("multipart/form-data"==d){var g=this.normalizeParams(s);for(var y in g)g.hasOwnProperty(y)&&(this.isFileParam(g[y])?l.attach(y,g[y]):l.field(y,g[y]))}else a&&l.send(a);var m=this.jsonPreferredMime(f);return m&&l.accept(m),new Promise((t,r)=>{l.end((n,i)=>{if(!n||i){var o=!0===this.returnExtended||n?{status:i.status,statusText:i.statusText,headers:i.headers,body:i.body,text:i.text,error:n}:i.body?i.body:i.text;if(this.debugLog){var s=`[RESPONSE] ${i.status}: ${e} ${c}`;i.headers&&(s+=`\ninin-correlation-id: ${i.headers["inin-correlation-id"]}`),i.body&&(s+=`\nBody: ${JSON.stringify(i.body,null,2)}`),this._debugTrace(s),n&&this._debugTrace(n)}n?r(o):t(o)}else r({status:0,statusText:"error",headers:[],body:{},text:"error",error:n})})})}parseDate(t){return new Date(t.replace(/T/i," "))}_debugTrace(t){if(this.debugLog){if("string"==typeof t){var e="",r=t.split("\n");if(this.debugLogMaxLines&&r.length>this.debugLogMaxLines){for(var n=0;n0?s-4:s;for(r=0;r>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[f++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var i,o,s=[],a=e;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],3:[function(t,e,r){(function(e){"use strict";var n=t("base64-js"),i=t("ieee754"),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;var s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,e.prototype),r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return u(t,e,r)}function u(t,r,n){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|p(t,r),i=a(n),o=i.write(t,r);o!==n&&(i=i.slice(0,o));return i}(t,r);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(G(t,ArrayBuffer)||t&&G(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function p(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||G(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(o)return i?-1:j(t).length;r=(""+r).toLowerCase(),o=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,r,n,i,o){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),W(n=+n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=e.from(r,i)),e.isBuffer(r))return 0===r.length?-1:g(t,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):g(t,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:h>223?3:h>191?2:1;if(i+c<=r)switch(c){case 1:h<128&&(f=h);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&h)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&h)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&h)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,c=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=c}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),""},o&&(e.prototype[o]=e.prototype.inspect),e.prototype.compare=function(t,r,n,i,o){if(G(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,a=n-r,u=Math.min(s,a),h=this.slice(i,o),f=t.slice(r,n),c=0;c>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return b(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function M(t,r,n,i,o,s){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||rt.length)throw new RangeError("Index out of range")}function B(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,o){return e=+e,r>>>=0,o||B(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function O(t,e,r,n,o){return e=+e,r>>>=0,o||B(t,0,r,8),i.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;t=~~t,r=void 0===r?n:~~r,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),r<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,e>>>=0,r||x(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||x(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||x(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||x(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||x(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},e.prototype.readInt8=function(t,e){return t>>>=0,e||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||x(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||x(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||x(t,4,this.length),i.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||x(t,4,this.length),i.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||x(t,8,this.length),i.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||x(t,8,this.length),i.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},e.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return O(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return O(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,i){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r=0;--s)t[s+r]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,i),r);return o},e.prototype.fill=function(t,r,n,i){if("string"==typeof t){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!e.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var o=t.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=r;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function D(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function G(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function W(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":2,buffer:3,ieee754:4}],4:[function(t,e,r){r.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,f=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+t[e+c],c+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=h}return(p?-1:1)*s*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var s,a,u,h=8*o-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=f?(a=0,s=f):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,h-=8);t[r+p-d]|=128*y}},{}],5:[function(t,e,r){function n(t){if(t)return function(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}(t)}void 0!==e&&(e.exports=n),n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},n.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4==r){var n;try{n=e.status}catch(t){n=0}if(!n){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var n=function(e,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{e.onprogress=n.bind(null,"download"),e.upload&&(e.upload.onprogress=n.bind(null,"upload"))}catch(t){}try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){var i=this._header["content-type"],o=this._serializer||f.serialize[i?i.split(";")[0]:""];!o&&y(i)&&(o=f.serialize["application/json"]),o&&(r=o(r))}for(var s in this.header)null!=this.header[s]&&this.header.hasOwnProperty(s)&&e.setRequestHeader(s,this.header[s]);return this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0!==r?r:null),this},f.agent=function(){return new u},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(t){u.prototype[t.toLowerCase()]=function(e,r){var n=new f.Request(t,e);return this._setDefaults(n),r&&n.end(r),n}}),u.prototype.del=u.prototype.delete,f.get=function(t,e,r){var n=f("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},f.head=function(t,e,r){var n=f("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},f.options=function(t,e,r){var n=f("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},f.del=w,f.delete=w,f.patch=function(t,e,r){var n=f("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},f.post=function(t,e,r){var n=f("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},f.put=function(t,e,r){var n=f("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}},{"./agent-base":6,"./is-object":8,"./request-base":9,"./response-base":10,"component-emitter":5}],8:[function(t,e,r){"use strict";e.exports=function(t){return null!==t&&"object"==typeof t}},{}],9:[function(t,e,r){"use strict";var n=t("./is-object");function i(t){if(t)return function(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}(t)}e.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},i.prototype.parse=function(t){return this._parser=t,this},i.prototype.responseType=function(t){return this._responseType=t,this},i.prototype.serialize=function(t){return this._serializer=t,this},i.prototype.timeout=function(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this;for(var e in t)switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;default:console.warn("Unknown timeout option",e)}return this},i.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var o=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!=e.status)return!0;if(t){if(t.code&&~o.indexOf(t.code))return!0;if(t.timeout&&"ECONNABORTED"==t.code)return!0;if(t.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(t,e){if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(t,e){r.end(function(r,n){r?e(r):t(n)})})}return this._fullfilledPromise.then(t,e)},i.prototype.catch=function(t){return this.then(void 0,t)},i.prototype.use=function(t){return t(this),this},i.prototype.ok=function(t){if("function"!=typeof t)throw Error("Callback required");return this._okCallback=t,this},i.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},i.prototype.get=function(t){return this._header[t.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(t,e){if(n(t)){for(var r in t)this.set(r,t[r]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},i.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},i.prototype.field=function(t,e){if(null===t||void 0===t)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),n(t)){for(var r in t)this.field(r,t[r]);return this}if(Array.isArray(e)){for(var i in e)this.field(t,e[i]);return this}if(null===e||void 0===e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=""+e),this._getFormData().append(t,e),this},i.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},i.prototype._auth=function(t,e,r,n){switch(r.type){case"basic":this.set("Authorization","Basic "+n(t+":"+e));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer "+t)}return this},i.prototype.withCredentials=function(t){return void 0==t&&(t=!0),this._withCredentials=t,this},i.prototype.redirects=function(t){return this._maxRedirects=t,this},i.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw TypeError("Invalid argument");return this._maxResponseSize=t,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(t){var e=n(t),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(e&&n(this._data))for(var i in t)this._data[i]=t[i];else"string"==typeof t?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"==r?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(r||this.type("json"),this)},i.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},i.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var r=this.url.substring(e+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,e)+"?"+r.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(t,e,r){if(!this._aborted){var n=new Error(t+e+"ms exceeded");n.timeout=e,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.abort(),this.callback(n)}},i.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},{"./is-object":8}],10:[function(t,e,r){"use strict";var n=t("./utils");function i(t){if(t)return function(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}(t)}e.exports=i,i.prototype.get=function(t){return this.header[t.toLowerCase()]},i.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=n.type(e);var r=n.params(e);for(var i in r)this[i]=r[i];this.links={};try{t.link&&(this.links=n.parseLinks(t.link))}catch(t){}},i.prototype._setStatusProperties=function(t){var e=t/100|0;this.status=this.statusCode=t,this.statusType=e,this.info=1==e,this.ok=2==e,this.redirect=3==e,this.clientError=4==e,this.serverError=5==e,this.error=(4==e||5==e)&&this.toError(),this.created=201==t,this.accepted=202==t,this.noContent=204==t,this.badRequest=400==t,this.unauthorized=401==t,this.notAcceptable=406==t,this.forbidden=403==t,this.notFound=404==t,this.unprocessableEntity=422==t}},{"./utils":11}],11:[function(t,e,r){"use strict";r.type=function(t){return t.split(/ *; */).shift()},r.params=function(t){return t.split(/ *; */).reduce(function(t,e){var r=e.split(/ *= */),n=r.shift(),i=r.shift();return n&&i&&(t[n]=i),t},{})},r.parseLinks=function(t){return t.split(/ *, */).reduce(function(t,e){var r=e.split(/ *; */),n=r[0].slice(1,-1);return t[r[1].split(/ *= */)[1].slice(1,-1)]=n,t},{})},r.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},{}],platformClient:[function(t,e,r){(function(r,n){"use strict";var i,o=(i=t("superagent"))&&"object"==typeof i&&"default"in i?i.default:i,s={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"},a=void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},u=[],h=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,c=!1;function l(){c=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e>18&63]+u[i>>12&63]+u[i>>6&63]+u[63&i]);return o.join("")}function d(t){var e;c||l();for(var r=t.length,n=r%3,i="",o=[],s=0,a=r-n;sa?a:s+16383));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),o.push(i),o.join("")}function y(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,f=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+t[e+c],c+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=h}return(p?-1:1)*s*Math.pow(2,o-n)}function g(t,e,r,n,i,o){var s,a,u,h=8*o-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=f?(a=0,s=f):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,h-=8);t[r+p-d]|=128*y}var m={}.toString,w=Array.isArray||function(t){return"[object Array]"==m.call(t)};function v(){return n.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(t,e){if(v()=v())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+v().toString(16)+" bytes");return 0|t}function R(t){return!(null==t||!t._isBuffer)}function S(t,e){if(R(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return tt(t).length;default:if(n)return Z(t).length;e=(""+e).toLowerCase(),n=!0}}function P(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function I(t,e,r,i,o){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=n.from(e,i)),R(e))return 0===e.length?-1:x(t,e,r,i,o);if("number"==typeof e)return e&=255,n.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):x(t,[e],r,i,o);throw new TypeError("val must be string, number or Buffer")}function x(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function j(t,e,r){return 0===e&&r===t.length?d(t):d(t.slice(e,r))}function q(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:h>223?3:h>191?2:1;if(i+c<=r)switch(c){case 1:h<128&&(f=h);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&h)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&h)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&h)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,c=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=c}return function(t){var e=t.length;if(e<=D)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,r);case"utf8":case"utf-8":return q(this,e,r);case"ascii":return G(this,e,r);case"latin1":case"binary":return W(this,e,r);case"base64":return j(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},n.prototype.equals=function(t){if(!R(t))throw new TypeError("Argument must be a Buffer");return this===t||0===n.compare(this,t)},n.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),""},n.prototype.compare=function(t,e,r,n,i){if(!R(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,a=Math.min(o,s),u=this.slice(n,i),h=t.slice(e,r),f=0;fi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return M(this,t,e,r);case"utf8":case"utf-8":return B(this,t,e,r);case"ascii":return U(this,t,e,r);case"latin1":case"binary":return O(this,t,e,r);case"base64":return L(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function G(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function $(t,e,r,n,i,o){if(!R(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function J(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function H(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function F(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function K(t,e,r,n,i){return i||F(t,0,r,4),g(t,e,r,n,23,4),r+4}function X(t,e,r,n,i){return i||F(t,0,r,8),g(t,e,r,n,52,8),r+8}n.prototype.slice=function(t,e){var r,i=this.length;if(t=~~t,e=void 0===e?i:~~e,t<0?(t+=i)<0&&(t=0):t>i&&(t=i),e<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(i*=256);)n+=this[t+--e]*i;return n},n.prototype.readUInt8=function(t,e){return e||z(t,1,this.length),this[t]},n.prototype.readUInt16LE=function(t,e){return e||z(t,2,this.length),this[t]|this[t+1]<<8},n.prototype.readUInt16BE=function(t,e){return e||z(t,2,this.length),this[t]<<8|this[t+1]},n.prototype.readUInt32LE=function(t,e){return e||z(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},n.prototype.readUInt32BE=function(t,e){return e||z(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},n.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||z(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},n.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||z(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},n.prototype.readInt8=function(t,e){return e||z(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,e){e||z(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(t,e){e||z(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(t,e){return e||z(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},n.prototype.readInt32BE=function(t,e){return e||z(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},n.prototype.readFloatLE=function(t,e){return e||z(t,4,this.length),y(this,t,!0,23,4)},n.prototype.readFloatBE=function(t,e){return e||z(t,4,this.length),y(this,t,!1,23,4)},n.prototype.readDoubleLE=function(t,e){return e||z(t,8,this.length),y(this,t,!0,52,8)},n.prototype.readDoubleBE=function(t,e){return e||z(t,8,this.length),y(this,t,!1,52,8)},n.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||$(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},n.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,1,255,0),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},n.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):J(this,t,e,!0),e+2},n.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):J(this,t,e,!1),e+2},n.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):H(this,t,e,!0),e+4},n.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):H(this,t,e,!1),e+4},n.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);$(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},n.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);$(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},n.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,1,127,-128),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},n.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):J(this,t,e,!0),e+2},n.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):J(this,t,e,!1),e+2},n.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):H(this,t,e,!0),e+4},n.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||$(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):H(this,t,e,!1),e+4},n.prototype.writeFloatLE=function(t,e,r){return K(this,t,e,!0,r)},n.prototype.writeFloatBE=function(t,e,r){return K(this,t,e,!1,r)},n.prototype.writeDoubleLE=function(t,e,r){return X(this,t,e,!0,r)},n.prototype.writeDoubleBE=function(t,e,r){return X(this,t,e,!1,r)},n.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else if(s<1e3||!n.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function tt(t){return function(t){var e,r,n,i,o,s;c||l();var a=t.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[a-2]?2:"="===t[a-1]?1:0,s=new f(3*a/4-o),n=o>0?a-4:a;var u=0;for(e=0,r=0;e>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=h[t.charCodeAt(e)]<<2|h[t.charCodeAt(e+1)]>>4,s[u++]=255&i):1===o&&(i=h[t.charCodeAt(e)]<<10|h[t.charCodeAt(e+1)]<<4|h[t.charCodeAt(e+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(Q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function et(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function rt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}class nt{get instance(){return nt.instance}set instance(t){nt.instance=t}constructor(){nt.instance||(nt.instance=this),this.CollectionFormatEnum={CSV:",",SSV:" ",TSV:"\t",PIPES:"|",MULTI:"multi"};try{localStorage.setItem("purecloud_local_storage_test","purecloud_local_storage_test"),localStorage.removeItem("purecloud_local_storage_test"),this.hasLocalStorage=!0}catch(t){this.hasLocalStorage=!1}this.setEnvironment("https://api.mypurecloud.com"),this.authentications={"PureCloud OAuth":{type:"oauth2"},"Guest Chat JWT":{type:"apiKey",in:"header",name:"Authorization",apiKeyPrefix:"Bearer"}},this.defaultHeaders={},this.timeout=16e3,this.authData={},this.settingsPrefix="purecloud",this.superagent=o,"undefined"!=typeof window&&(window.ApiClient=this)}setDebugLog(t,e){this.debugLog=t,this.debugLogMaxLines=e&&e>0?e:void 0}setReturnExtendedResponses(t){this.returnExtended=t}setPersistSettings(t,e){this.persistSettings=t,this.settingsPrefix=e?e.replace(/\W+/g,"_"):"purecloud",this._debugTrace(`this.settingsPrefix=${this.settingsPrefix}`)}_saveSettings(t){try{if(t.apiKey&&(this.authData.apiKey=t.apiKey,this.authentications["Guest Chat JWT"].apiKey=t.apiKey),t.state&&(this.authData.state=t.state),t.tokenExpiryTime&&(this.authData.tokenExpiryTime=t.tokenExpiryTime,this.authData.tokenExpiryTimeString=t.tokenExpiryTimeString),!0!==this.persistSettings)return;if(!this.hasLocalStorage)return void this._debugTrace("Warning: Cannot access local storage. Settings will not be saved.");let e=JSON.parse(JSON.stringify(this.authData));delete e.state,localStorage.setItem(`${this.settingsPrefix}_auth_data`,JSON.stringify(e)),this._debugTrace("Auth data saved to local storage")}catch(t){console.error(t)}}_loadSettings(){if(!0!==this.persistSettings)return;if(!this.hasLocalStorage)return void this._debugTrace("Warning: Cannot access local storage. Settings will not be loaded.");const t=this.authData.state;this.authData=localStorage.getItem(`${this.settingsPrefix}_auth_data`),this.authData?this.authData=JSON.parse(this.authData):this.authData={},this.authData.apiKey&&this.setJwt(this.authData.apiKey),this.authData.state=t}setEnvironment(t){t||(t="mypurecloud.com"),(t=t.replace(/\/+$/,"")).startsWith("https://")&&(t=t.substring(8)),t.startsWith("http://")&&(t=t.substring(7)),t.startsWith("api.")&&(t=t.substring(4)),this.environment=t,this.basePath=`https://api.${t}`,this.authUrl=`https://login.${t}`}_testTokenAccess(){return new Promise((t,e)=>{this._loadSettings(),this.authentications["Guest Chat JWT"].apiKey?this.callApi("/api/v2/authorization/permissions","GET",null,null,null,null,null,["Guest Chat JWT"],["application/json"],["application/json"]).then(()=>{t()}).catch(t=>{this._saveSettings({apiKey:void 0}),e(t)}):e(new Error("Token is not set"))})}setJwt(t){this._saveSettings({apiKey:t})}setStorageKey(t){this.storageKey=t,this.setJwt(this.authentications["Guest Chat JWT"].apiKey)}_buildAuthUrl(t,e){return e||(e={}),Object.keys(e).reduce((t,r)=>e[r]?`${t}&${r}=${e[r]}`:t,`${this.authUrl}/${t}?`)}paramToString(t){return t?t instanceof Date?t.toJSON():t.toString():""}buildUrl(t,e){t.match(/^\//)||(t=`/${t}`);var r=this.basePath+t;return r=r.replace(/\{([\w-]+)\}/g,(t,r)=>{var n;return n=e.hasOwnProperty(r)?this.paramToString(e[r]):t,encodeURIComponent(n)})}isJsonMime(t){return Boolean(t&&t.match(/^application\/json(;.*)?$/i))}jsonPreferredMime(t){for(var e=0;e{var r=this.authentications[e];switch(r.type){case"basic":(r.username||r.password)&&t.auth(r.username||"",r.password||"");break;case"apiKey":if(r.apiKey){var n={};r.apiKeyPrefix?n[r.name]=`${r.apiKeyPrefix} ${r.apiKey}`:n[r.name]=r.apiKey,"header"===r.in?t.set(n):t.query(n)}break;case"oauth2":r.accessToken&&t.set({Authorization:`Bearer ${r.accessToken}`});break;default:throw new Error(`Unknown authentication type: ${r.type}`)}})}callApi(t,e,r,n,i,s,a,u,h,f){var c=this.buildUrl(t,r),l=o(e,c);if(this.proxy&&l.proxy&&l.proxy(this.proxy),this.debugLog){var p=`[REQUEST] ${e} ${c}`;r&&Object.keys(r).count>0&&r[Object.keys(r)[0]]&&(p+=`\nPath Params: ${JSON.stringify(r)}`),n&&Object.keys(n).count>0&&n[Object.keys(n)[0]]&&(p+=`\nQuery Params: ${JSON.stringify(n)}`),a&&(p+=`\nnBody: ${JSON.stringify(a)}`),this._debugTrace(p)}this.applyAuthToRequest(l,u),l.query(this.normalizeParams(n)),l.set(this.defaultHeaders).set(this.normalizeParams(i)),l.timeout(this.timeout);var d=this.jsonPreferredMime(h);if(d?l.type(d):l.header["Content-Type"]||l.type("application/json"),"application/x-www-form-urlencoded"===d)l.send(this.normalizeParams(s));else if("multipart/form-data"==d){var y=this.normalizeParams(s);for(var g in y)y.hasOwnProperty(g)&&(this.isFileParam(y[g])?l.attach(g,y[g]):l.field(g,y[g]))}else a&&l.send(a);var m=this.jsonPreferredMime(f);return m&&l.accept(m),new Promise((t,r)=>{l.end((n,i)=>{if(!n||i){var o=!0===this.returnExtended||n?{status:i.status,statusText:i.statusText,headers:i.headers,body:i.body,text:i.text,error:n}:i.body?i.body:i.text;if(this.debugLog){var s=`[RESPONSE] ${i.status}: ${e} ${c}`;i.headers&&(s+=`\ninin-correlation-id: ${i.headers["inin-correlation-id"]}`),i.body&&(s+=`\nBody: ${JSON.stringify(i.body,null,2)}`),this._debugTrace(s),n&&this._debugTrace(n)}n?r(o):t(o)}else r({status:0,statusText:"error",headers:[],body:{},text:"error",error:n})})})}parseDate(t){return new Date(t.replace(/T/i," "))}_debugTrace(t){if(this.debugLog){if("string"==typeof t){var e="",r=t.split("\n");if(this.debugLogMaxLines&&r.length>this.debugLogMaxLines){for(var n=0;n - + diff --git a/build/index.d.ts b/build/index.d.ts index 257c2b50..5e01fe66 100644 --- a/build/index.d.ts +++ b/build/index.d.ts @@ -177,9 +177,9 @@ declare namespace Models { "total"?: number; "firstUri"?: string; "selfUri"?: string; + "lastUri"?: string; "previousUri"?: string; "nextUri"?: string; - "lastUri"?: string; "pageCount"?: number; } diff --git a/build/node_modules/is-callable/package.json b/build/node_modules/is-callable/package.json index 254dcd2d..25188b07 100644 --- a/build/node_modules/is-callable/package.json +++ b/build/node_modules/is-callable/package.json @@ -6,6 +6,7 @@ ] ], "_from": "is-callable@>=1.1.4 <2.0.0", + "_hasShrinkwrap": false, "_id": "is-callable@1.1.4", "_inCache": true, "_installable": true, diff --git a/build/node_modules/qs/.editorconfig b/build/node_modules/qs/.editorconfig index a4893ddf..b442a9f9 100644 --- a/build/node_modules/qs/.editorconfig +++ b/build/node_modules/qs/.editorconfig @@ -12,6 +12,9 @@ max_line_length = 160 [test/*] max_line_length = off +[LICENSE.md] +indent_size = off + [*.md] max_line_length = off diff --git a/build/node_modules/qs/.github/FUNDING.yml b/build/node_modules/qs/.github/FUNDING.yml new file mode 100644 index 00000000..0355f4f5 --- /dev/null +++ b/build/node_modules/qs/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/qs +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/build/node_modules/qs/CHANGELOG.md b/build/node_modules/qs/CHANGELOG.md index 50505c46..f25205ba 100644 --- a/build/node_modules/qs/CHANGELOG.md +++ b/build/node_modules/qs/CHANGELOG.md @@ -1,3 +1,17 @@ +## **6.8.0** +- [New] add `depth=false` to preserve the original key; [Fix] `depth=0` should preserve the original key (#326) +- [New] [Fix] stringify symbols and bigints +- [Fix] ensure node 0.12 can stringify Symbols +- [Fix] fix for an impossible situation: when the formatter is called with a non-string value +- [Refactor] `formats`: tiny bit of cleanup. +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `safe-publish-latest`, `iconv-lite`, `tape` +- [Tests] add tests for `depth=0` and `depth=false` behavior, both current and intuitive/intended (#326) +- [Tests] use `eclint` instead of `editorconfig-tools` +- [docs] readme: add security note +- [meta] add github sponsorship +- [meta] add FUNDING.yml +- [meta] Clean up license text so it’s properly detected as BSD-3-Clause + ## **6.7.0** - [New] `stringify`/`parse`: add `comma` as an `arrayFormat` option (#276, #219) - [Fix] correctly parse nested arrays (#212) diff --git a/build/node_modules/qs/LICENSE b/build/node_modules/qs/LICENSE deleted file mode 100644 index d4569487..00000000 --- a/build/node_modules/qs/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2014 Nathan LaFreniere and other contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors diff --git a/build/node_modules/qs/LICENSE.md b/build/node_modules/qs/LICENSE.md new file mode 100644 index 00000000..fecf6b69 --- /dev/null +++ b/build/node_modules/qs/LICENSE.md @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build/node_modules/qs/README.md b/build/node_modules/qs/README.md index 8590cfd3..cb47d60a 100644 --- a/build/node_modules/qs/README.md +++ b/build/node_modules/qs/README.md @@ -553,6 +553,10 @@ assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c'); assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c'); ``` +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + [1]: https://npmjs.org/package/qs [2]: http://versionbadg.es/ljharb/qs.svg [3]: https://api.travis-ci.org/ljharb/qs.svg diff --git a/build/node_modules/qs/dist/qs.js b/build/node_modules/qs/dist/qs.js index 17f4e600..08335520 100644 --- a/build/node_modules/qs/dist/qs.js +++ b/build/node_modules/qs/dist/qs.js @@ -4,21 +4,29 @@ var replace = String.prototype.replace; var percentTwenties = /%20/g; -module.exports = { - 'default': 'RFC3986', - formatters: { - RFC1738: function (value) { - return replace.call(value, percentTwenties, '+'); - }, - RFC3986: function (value) { - return value; - } - }, +var util = require('./utils'); + +var Format = { RFC1738: 'RFC1738', RFC3986: 'RFC3986' }; -},{}],2:[function(require,module,exports){ +module.exports = util.assign( + { + 'default': Format.RFC3986, + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+'); + }, + RFC3986: function (value) { + return String(value); + } + } + }, + Format +); + +},{"./utils":5}],2:[function(require,module,exports){ 'use strict'; var stringify = require('./stringify'); @@ -181,7 +189,7 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) { // Get the parent - var segment = brackets.exec(key); + var segment = options.depth > 0 && brackets.exec(key); var parent = segment ? key.slice(0, segment.index) : key; // Stash the parent if it exists @@ -201,7 +209,7 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) { // Loop through children appending to the array until we hit depth var i = 0; - while ((segment = child.exec(key)) !== null && i < options.depth) { + while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { @@ -243,7 +251,8 @@ var normalizeParseOptions = function normalizeParseOptions(opts) { comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, - depth: typeof opts.depth === 'number' ? opts.depth : defaults.depth, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens + depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, ignoreQueryPrefix: opts.ignoreQueryPrefix === true, interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, @@ -303,6 +312,7 @@ var pushToArray = function (arr, valueOrArray) { var toISO = Date.prototype.toISOString; +var defaultFormat = formats['default']; var defaults = { addQueryPrefix: false, allowDots: false, @@ -312,7 +322,8 @@ var defaults = { encode: true, encoder: utils.encode, encodeValuesOnly: false, - formatter: formats.formatters[formats['default']], + format: defaultFormat, + formatter: formats.formatters[defaultFormat], // deprecated indices: false, serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching @@ -322,6 +333,14 @@ var defaults = { strictNullHandling: false }; +var isNonNullishPrimitive = function isNonNullishPrimitive(v) { // eslint-disable-line func-name-matching + return typeof v === 'string' + || typeof v === 'number' + || typeof v === 'boolean' + || typeof v === 'symbol' + || typeof v === 'bigint'; // eslint-disable-line valid-typeof +}; + var stringify = function stringify( // eslint-disable-line func-name-matching object, prefix, @@ -354,7 +373,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching obj = ''; } - if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { + if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset); return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset))]; @@ -675,7 +694,12 @@ var encode = function encode(str, defaultEncoder, charset) { return str; } - var string = typeof str === 'string' ? str : String(str); + var string = str; + if (typeof str === 'symbol') { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== 'string') { + string = String(str); + } if (charset === 'iso-8859-1') { return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { diff --git a/build/node_modules/qs/lib/formats.js b/build/node_modules/qs/lib/formats.js index df459975..a4ecca78 100644 --- a/build/node_modules/qs/lib/formats.js +++ b/build/node_modules/qs/lib/formats.js @@ -3,16 +3,24 @@ var replace = String.prototype.replace; var percentTwenties = /%20/g; -module.exports = { - 'default': 'RFC3986', - formatters: { - RFC1738: function (value) { - return replace.call(value, percentTwenties, '+'); - }, - RFC3986: function (value) { - return value; - } - }, +var util = require('./utils'); + +var Format = { RFC1738: 'RFC1738', RFC3986: 'RFC3986' }; + +module.exports = util.assign( + { + 'default': Format.RFC3986, + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+'); + }, + RFC3986: function (value) { + return String(value); + } + } + }, + Format +); diff --git a/build/node_modules/qs/lib/parse.js b/build/node_modules/qs/lib/parse.js index d81628b5..057adc85 100644 --- a/build/node_modules/qs/lib/parse.js +++ b/build/node_modules/qs/lib/parse.js @@ -147,7 +147,7 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) { // Get the parent - var segment = brackets.exec(key); + var segment = options.depth > 0 && brackets.exec(key); var parent = segment ? key.slice(0, segment.index) : key; // Stash the parent if it exists @@ -167,7 +167,7 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) { // Loop through children appending to the array until we hit depth var i = 0; - while ((segment = child.exec(key)) !== null && i < options.depth) { + while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { @@ -209,7 +209,8 @@ var normalizeParseOptions = function normalizeParseOptions(opts) { comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, - depth: typeof opts.depth === 'number' ? opts.depth : defaults.depth, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens + depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, ignoreQueryPrefix: opts.ignoreQueryPrefix === true, interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, diff --git a/build/node_modules/qs/lib/stringify.js b/build/node_modules/qs/lib/stringify.js index 7455049c..b2e5f06e 100644 --- a/build/node_modules/qs/lib/stringify.js +++ b/build/node_modules/qs/lib/stringify.js @@ -25,6 +25,7 @@ var pushToArray = function (arr, valueOrArray) { var toISO = Date.prototype.toISOString; +var defaultFormat = formats['default']; var defaults = { addQueryPrefix: false, allowDots: false, @@ -34,7 +35,8 @@ var defaults = { encode: true, encoder: utils.encode, encodeValuesOnly: false, - formatter: formats.formatters[formats['default']], + format: defaultFormat, + formatter: formats.formatters[defaultFormat], // deprecated indices: false, serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching @@ -44,6 +46,14 @@ var defaults = { strictNullHandling: false }; +var isNonNullishPrimitive = function isNonNullishPrimitive(v) { // eslint-disable-line func-name-matching + return typeof v === 'string' + || typeof v === 'number' + || typeof v === 'boolean' + || typeof v === 'symbol' + || typeof v === 'bigint'; // eslint-disable-line valid-typeof +}; + var stringify = function stringify( // eslint-disable-line func-name-matching object, prefix, @@ -76,7 +86,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching obj = ''; } - if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { + if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset); return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset))]; diff --git a/build/node_modules/qs/lib/utils.js b/build/node_modules/qs/lib/utils.js index 1b219cdd..f3260633 100644 --- a/build/node_modules/qs/lib/utils.js +++ b/build/node_modules/qs/lib/utils.js @@ -126,7 +126,12 @@ var encode = function encode(str, defaultEncoder, charset) { return str; } - var string = typeof str === 'string' ? str : String(str); + var string = str; + if (typeof str === 'symbol') { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== 'string') { + string = String(str); + } if (charset === 'iso-8859-1') { return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { diff --git a/build/node_modules/qs/package.json b/build/node_modules/qs/package.json index caf4eebd..585cb2e5 100644 --- a/build/node_modules/qs/package.json +++ b/build/node_modules/qs/package.json @@ -7,20 +7,20 @@ ], "_from": "qs@>=6.5.1 <7.0.0", "_hasShrinkwrap": false, - "_id": "qs@6.7.0", + "_id": "qs@6.8.0", "_inCache": true, "_installable": true, "_location": "/qs", - "_nodeVersion": "11.12.0", + "_nodeVersion": "12.8.1", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", - "tmp": "tmp/qs_6.7.0_1553287731018_0.8639544724083812" + "tmp": "tmp/qs_6.8.0_1566009935569_0.19894011235292686" }, "_npmUser": { "email": "ljharb@gmail.com", "name": "ljharb" }, - "_npmVersion": "6.7.0", + "_npmVersion": "6.10.2", "_phantomChildren": {}, "_requested": { "name": "qs", @@ -33,8 +33,8 @@ "_requiredBy": [ "/superagent" ], - "_resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "_shasum": "41dc1a015e3d581f1621776be31afb2876a9b1bc", + "_resolved": "https://registry.npmjs.org/qs/-/qs-6.8.0.tgz", + "_shasum": "87b763f0d37ca54200334cd57bb2ef8f68a1d081", "_shrinkwrap": null, "_spec": "qs@^6.5.1", "_where": "/var/build/workspace/build-platform-sdks/platform-client-sdk-common/output/purecloudjavascript-guest/build/node_modules/superagent", @@ -51,34 +51,35 @@ "dependencies": {}, "description": "A querystring parser that supports nesting and arrays, with a depth limit", "devDependencies": { - "@ljharb/eslint-config": "^13.1.1", - "browserify": "^16.2.3", + "@ljharb/eslint-config": "^14.0.2", + "browserify": "^16.5.0", "covert": "^1.1.1", - "editorconfig-tools": "^0.1.1", - "eslint": "^5.15.3", + "eclint": "^2.8.1", + "eslint": "^6.1.0", "evalmd": "^0.0.17", "for-each": "^0.3.3", + "has-symbols": "^1.0.0", "iconv-lite": "^0.4.24", "mkdirp": "^0.5.1", "object-inspect": "^1.6.0", "qs-iconv": "^1.0.4", - "safe-publish-latest": "^1.1.2", + "safe-publish-latest": "^1.1.3", "safer-buffer": "^2.1.2", - "tape": "^4.10.1" + "tape": "^4.11.0" }, "directories": {}, "dist": { - "fileCount": 18, - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclUozCRA9TVsSAnZWagAAoroP/0PHjSUPNl7JIbIdKciJ\nBCTXasz49hv66gp1crSOmRPut07b3ao8gfYA4asdVauyJUteb9LtFqDOcvz9\n/VXV7XU63SnJIF2tsWV5sRvLgX4NgQzViijUH5XuE62potDawIa6M2i4zJTh\nWO5OSmizv/ODNCkoNw0tNiriB9sqQ1hXzcWg55geAWy4COB5E0+OvWKV9j/x\neAHQVUKBJTfNb+SsN8YqtDK9Dp+rGy0VCKn606FWu/l79sK4JvMYdpDpRliE\nX546lMOEzYZDDH+2Yq7n365PKV2pDzomRSoJnPWDimz6AbKDy0MIKpXQVmhi\n52MjXPgHhCntt2ETQToj6yA9Suy4DQ1nxtZtDdudMxr+4hqJShBhgMGTqpX6\nMS9wBP5CisDzpzHglcH5gRvDF4HLJU52/AXk2hECQsfVPTQx4R6gl/c0jCRQ\nIo7bBcFPaAsYQUjfo7PiOpMUZX5T1STBXAS7rN3tf02OBpnWD38xNu9t/6hI\n5HiurnlTVCUxajdGSitX0JZKDTI7bskIoiXTDMQxT3ppo1aptzP+9ZGiUZjz\nJRVD6LAC1PFC0cFXvlo0ZNbh0DxgiIHOCMpveS/8uh4KdZaWjnbhoMRTRgi+\novatKeu2pqLJqtZkh+016+dRR8QYDsFVDgRPc3qBOmMsR1CZ2E54euLpoFzf\nRfi3\r\n=ivNL\r\n-----END PGP SIGNATURE-----\r\n", - "shasum": "41dc1a015e3d581f1621776be31afb2876a9b1bc", - "tarball": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "unpackedSize": 142918 + "fileCount": 19, + "integrity": "sha512-tPSkj8y92PfZVbinY1n84i1Qdx75lZjMQYx9WZhnkofyxzw2r7Ho39G3/aEvSUdebxpnnM4LZJCtvE/Aq3+s9w==", + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdV2pQCRA9TVsSAnZWagAAvyQQAJDQK8zkD7AjVqr8BYy6\nc/fXvt1TxD4m+5T4vUMuGisTN4nEW86ugHrvuG7sfLCTCySQyNo6xdHVz6ea\nDLzH9PUCWM8R1OWmyXQ5kyyJItqVG9kkeTUer9s09hqEtWz5vuCGS9rq0J8F\nc8gjynqBpAS9UkoyMvP22fV+e/L2VXYXx7nndWpkm59DQsohreHsNDWr3F9A\nwAqmW7eVG57Ls66ukfvoWXPRA8jIVpRuysf6s8RpSOxrZiYUTmyWmOZHWTHk\nWi16XxTvEWwr0wvPhozMK4tOA95iMh2kneo5gPckFBpEKqHwKJJAfoq8jbcg\nH+/kxik3KKblHgO9wWpeSfZHyZFKjZec+W50FcNQfcfUd3UNU3ONRGZKRz5D\nqwB8La11JkMYGOAQYEOuOtCNRlCdfhqMlcBTVjsPx9yck+/afjTy5CUch5R4\nkuTdPEheAU2xldRz6QSYASY+w5i1zQXex6bF+JzA5zwtaYVtWlwIz8HraSZt\nMaOkNLw9rw/mlz2VwfEwoZJOoCzF+ceUUxrWo+vILmGbn0dXjQH/6P/w9KID\nCTNj0Y8Lg7XVjcxVWGhvmwpco+uCRl3bgzH9VwRgrK9WztIGnbyBrJ4FM2+d\nC7Dh+rXqi06LUAIU9+vwtiwRkB7KH2HpOW0WRnPUUXihHZFeITsMTANmlMGd\nRdqb\r\n=cmSp\r\n-----END PGP SIGNATURE-----\r\n", + "shasum": "87b763f0d37ca54200334cd57bb2ef8f68a1d081", + "tarball": "https://registry.npmjs.org/qs/-/qs-6.8.0.tgz", + "unpackedSize": 148758 }, "engines": { "node": ">=0.6" }, - "gitHead": "125e103b61f2bef245970f5a2a8dceffe5aab59a", + "gitHead": "57657fffc89c4dafb830ee78ec79892a17653eed", "homepage": "https://github.com/ljharb/qs", "keywords": [ "querystring", @@ -115,12 +116,12 @@ "coverage": "covert test", "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js", "lint": "eslint lib/*.js test/*.js", - "postlint": "editorconfig-tools check * lib/* test/*", + "postlint": "eclint check * lib/* test/*", "prepublish": "safe-publish-latest && npm run dist", "pretest": "npm run --silent readme && npm run --silent lint", "readme": "evalmd README.md", "test": "npm run --silent coverage", "tests-only": "node test" }, - "version": "6.7.0" + "version": "6.8.0" } diff --git a/build/node_modules/qs/test/.eslintrc b/build/node_modules/qs/test/.eslintrc index 9ebbb921..f76d573c 100644 --- a/build/node_modules/qs/test/.eslintrc +++ b/build/node_modules/qs/test/.eslintrc @@ -1,17 +1,17 @@ { "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "consistent-return": 2, + "array-bracket-newline": 0, + "array-element-newline": 0, + "consistent-return": 2, "function-paren-newline": 0, "max-lines": 0, "max-lines-per-function": 0, "max-nested-callbacks": [2, 3], "max-statements": 0, - "no-buffer-constructor": 0, + "no-buffer-constructor": 0, "no-extend-native": 0, "no-magic-numbers": 0, - "object-curly-newline": 0, + "object-curly-newline": 0, "sort-keys": 0 } } diff --git a/build/node_modules/qs/test/parse.js b/build/node_modules/qs/test/parse.js index 89677899..397b867d 100644 --- a/build/node_modules/qs/test/parse.js +++ b/build/node_modules/qs/test/parse.js @@ -52,6 +52,18 @@ test('parse()', function (t) { st.end(); }); + t.test('uses original key when depth = 0', function (st) { + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: 0 }), { 'a[0]': 'b', 'a[1]': 'c' }); + st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: 0 }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); + st.end(); + }); + + t.test('uses original key when depth = false', function (st) { + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: false }), { 'a[0]': 'b', 'a[1]': 'c' }); + st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: false }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); + st.end(); + }); + t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); t.test('parses an explicit array', function (st) { @@ -617,6 +629,7 @@ test('parse()', function (t) { }); t.test('prefers an iso-8859-1 charset specified by the utf8 sentinel to a default charset of utf-8', function (st) { + // eslint-disable-next-line quote-props st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'utf-8' }), { 'ø': 'ø' }); st.end(); }); @@ -637,6 +650,7 @@ test('parse()', function (t) { }); t.test('uses the utf8 sentinel to switch to iso-8859-1 when no default charset is given', function (st) { + // eslint-disable-next-line quote-props st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true }), { 'ø': 'ø' }); st.end(); }); diff --git a/build/node_modules/qs/test/stringify.js b/build/node_modules/qs/test/stringify.js index 53041c2e..053fe1f2 100644 --- a/build/node_modules/qs/test/stringify.js +++ b/build/node_modules/qs/test/stringify.js @@ -5,6 +5,8 @@ var qs = require('../'); var utils = require('../lib/utils'); var iconv = require('iconv-lite'); var SaferBuffer = require('safer-buffer').Buffer; +var hasSymbols = require('has-symbols'); +var hasBigInt = typeof BigInt === 'function'; test('stringify()', function (t) { t.test('stringifies a querystring object', function (st) { @@ -28,6 +30,39 @@ test('stringify()', function (t) { st.end(); }); + t.test('stringifies symbols', { skip: !hasSymbols() }, function (st) { + st.equal(qs.stringify(Symbol.iterator), ''); + st.equal(qs.stringify([Symbol.iterator]), '0=Symbol%28Symbol.iterator%29'); + st.equal(qs.stringify({ a: Symbol.iterator }), 'a=Symbol%28Symbol.iterator%29'); + st.equal( + qs.stringify({ a: [Symbol.iterator] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), + 'a[]=Symbol%28Symbol.iterator%29' + ); + st.end(); + }); + + t.test('stringifies bigints', { skip: !hasBigInt }, function (st) { + var three = BigInt(3); // eslint-disable-line new-cap + var encodeWithN = function (value, defaultEncoder, charset) { + var result = defaultEncoder(value, defaultEncoder, charset); + return typeof value === 'bigint' ? result + 'n' : result; // eslint-disable-line valid-typeof + }; + st.equal(qs.stringify(three), ''); + st.equal(qs.stringify([three]), '0=3'); + st.equal(qs.stringify([three], { encoder: encodeWithN }), '0=3n'); + st.equal(qs.stringify({ a: three }), 'a=3'); + st.equal(qs.stringify({ a: three }, { encoder: encodeWithN }), 'a=3n'); + st.equal( + qs.stringify({ a: [three] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), + 'a[]=3' + ); + st.equal( + qs.stringify({ a: [three] }, { encodeValuesOnly: true, encoder: encodeWithN, arrayFormat: 'brackets' }), + 'a[]=3n' + ); + st.end(); + }); + t.test('adds query prefix', function (st) { st.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b'); st.end(); @@ -520,6 +555,12 @@ test('stringify()', function (t) { return String.fromCharCode(buffer.readUInt8(0) + 97); } }), 'a=b'); + + st.equal(qs.stringify({ a: SaferBuffer.from('a b') }, { + encoder: function (buffer) { + return buffer; + } + }), 'a=a b'); st.end(); }); @@ -560,17 +601,20 @@ test('stringify()', function (t) { t.test('RFC 1738 spaces serialization', function (st) { st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c'); st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC1738 }), 'a+b=a+b'); st.end(); }); t.test('RFC 3986 spaces serialization', function (st) { st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c'); st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC3986 }), 'a%20b=a%20b'); st.end(); }); t.test('Backward compatibility to RFC 3986', function (st) { st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }), 'a%20b=a%20b'); st.end(); }); diff --git a/build/node_modules/resolve/.eslintrc b/build/node_modules/resolve/.eslintrc index 8b5748ab..a22863c8 100644 --- a/build/node_modules/resolve/.eslintrc +++ b/build/node_modules/resolve/.eslintrc @@ -27,5 +27,13 @@ "object-curly-newline": 0, "operator-linebreak": [2, "before"], "sort-keys": 0, - } + }, + "overrides": [ + { + "files": "test/resolver/nested_symlinks/mylib/*.js", + "rules": { + "no-throw-literal": 0, + }, + }, + ], } diff --git a/build/node_modules/resolve/.travis.yml b/build/node_modules/resolve/.travis.yml index 2033171e..c3ab9abe 100644 --- a/build/node_modules/resolve/.travis.yml +++ b/build/node_modules/resolve/.travis.yml @@ -2,11 +2,11 @@ language: node_js os: - linux node_js: - - "12.2" + - "12.7" - "11.15" - - "10.15" + - "10.16" - "9.11" - - "8.15" + - "8.16" - "7.10" - "6.17" - "5.12" @@ -38,6 +38,16 @@ matrix: env: PRETEST=true - node_js: "lts/*" env: POSTTEST=true + - node_js: "12.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "12.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "12.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "12.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "12.2" + env: TEST=true ALLOW_FAILURE=true - node_js: "12.1" env: TEST=true ALLOW_FAILURE=true - node_js: "12.0" @@ -72,6 +82,8 @@ matrix: env: TEST=true ALLOW_FAILURE=true - node_js: "11.0" env: TEST=true ALLOW_FAILURE=true + - node_js: "10.15" + env: TEST=true ALLOW_FAILURE=true - node_js: "10.14" env: TEST=true ALLOW_FAILURE=true - node_js: "10.13" @@ -124,6 +136,8 @@ matrix: env: TEST=true ALLOW_FAILURE=true - node_js: "9.0" env: TEST=true ALLOW_FAILURE=true + - node_js: "8.15" + env: TEST=true ALLOW_FAILURE=true - node_js: "8.14" env: TEST=true ALLOW_FAILURE=true - node_js: "8.13" diff --git a/build/node_modules/resolve/CHANGELOG.md b/build/node_modules/resolve/CHANGELOG.md deleted file mode 100644 index 09c0f325..00000000 --- a/build/node_modules/resolve/CHANGELOG.md +++ /dev/null @@ -1,753 +0,0 @@ -### Changelog - -All notable changes to this project will be documented in this file. Dates are displayed in UTC. - -#### [Unreleased](https://github.com/browserify/resolve/compare/v1.11.0...HEAD) - -#### [v1.11.0](https://github.com/browserify/resolve/compare/v1.10.1...v1.11.0) - 15 May 2019 -- [New] Add `isDirectory`; use to speed up `node_modules` lookups (#192, #191, #190) -- [Tests] up to `node` `v12.2`, `v11.15`, `v6.17` - -#### [v1.10.1](https://github.com/browserify/resolve/compare/v1.10.0...v1.10.1) - 23 April 2019 -- [Fix] `core`: 6 `v8/` core modules and 3 `node-inspect/` core modules no longer exist in node 12 ([`b54d33a`][]) -- [Dev Deps] update `eslint`, `object-keys`, `tape` ([`16e3897`][]) - -[`b54d33a`]: https://github.com/browserify/resolve/commit/b54d33a -[`16e3897`]: https://github.com/browserify/resolve/commit/16e3897 - -#### [v1.10.0](https://github.com/browserify/resolve/compare/v1.9.0...v1.10.0) - 21 January 2019 - -- [Fix] `sync`/`async`: when package.json `main` is not a string, throw an error ([`#178`][]) -- [Fix] TypeError: Path must be a string. Received undefined ([`ce163e3`][]) -- [Tests] up to `v11.6`, `v10.15`, `v8.15`, `v6.16` ([`083e78c`][]) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` ([`29a4994`][]) -- v1.10.0 (([`d098e92`][]) -- [New] `core`: add `worker_threads` in v11.7+ ([`3296106`][]) -- [Tests] add an additional test ([`2c67936`][]) - -[`ce163e3`]: https://github.com/browserify/resolve/commit/ce163e34451581ff11aea33f67a48889682c99d2 -[`083e78c`]: https://github.com/browserify/resolve/commit/083e78c1ae5c1708b7d41c9ad7c608caffeddcbf -[`29a4994`]: https://github.com/browserify/resolve/commit/29a499418d54b5befe9deef1bc7c38a9174cfbd8 -[`d098e92`]: https://github.com/browserify/resolve/commit/d098e92a7c5d7919d18ccd4d7a284ea97d11e586 -[`3296106`]: https://github.com/browserify/resolve/commit/3296106c519fc9f0866ebfd5ca6d57de22fdc505 -[`2c67936`]: https://github.com/browserify/resolve/commit/2c679363e852f7a0d570593527ea7038f0cd2c19 - -#### [v1.9.0](https://github.com/browserify/resolve/compare/v1.8.1...v1.9.0) - 17 December 2018 - -- [Fix] `sync`/`async`: fix `preserveSymlinks` option ([`#177`][]) -- [Fix] `sync`/`async`: when package.json `main` is not a string, throw an error ([`#178`][]) -- [Refactor] `node-modules-paths`: Change `paths` function option to receive a thunk for node modules resolution paths (([`d652f01`][]) -- [Tests] up to `node` `v11.4`, `v10.14`, `v8.14`, `v6.15` (([`2b4f3a8`][]) -- [New] `async`/`sync`/`node-modules-paths`: Adds support for “paths” being a function (([`7112873`][]) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-keys`, `safe-publish-latest`, `tape` (([`5542700`][]) -- [New] Implements a "normalize-options" pseudo-hook (([`f3961df`][]) -- [Tests] better failure messages (([`f839d20`][]) -- v1.9.0 (([`254bb40`][]) -- [Deps] update `path-parse` (([`1018c0e`][]) - -[`d652f01`]: https://github.com/browserify/resolve/commit/d652f018b2561f4863ffcd0f3ecdb0dfe65ee223 -[`2b4f3a8`]: https://github.com/browserify/resolve/commit/2b4f3a898a3943e45cdff539b542c4ebee2b608a -[`7112873`]: https://github.com/browserify/resolve/commit/711287339aad544788a4b8b5335221cea645572c -[`5542700`]: https://github.com/browserify/resolve/commit/554270035e1997ae34865500c629888249baa304 -[`f3961df`]: https://github.com/browserify/resolve/commit/f3961dfcb7b2993d935c255e65309e7028a88b8d -[`f839d20`]: https://github.com/browserify/resolve/commit/f839d20ab16ef814214d80183452d02379cbbf15 -[`254bb40`]: https://github.com/browserify/resolve/commit/254bb4029df2f8d20a33043dfabd8e5cabfa37df -[`1018c0e`]: https://github.com/browserify/resolve/commit/1018c0e49851bfb62176d8adbc94125ae85cd158 - -#### [v1.8.1](https://github.com/browserify/resolve/compare/v1.8.0...v1.8.1) - 17 June 2018 - -- [Docs] clean up readme code (([`f5394d8`][]) -- [Fix] resolution when `filename` option is passed (([`9c370c9`][]) -- [Tests] up to `node` `v10.4` (([`3a64219`][]) -- [Tests] improve output of symlink tests that fail on Mac (([`6f771b2`][]) -- v1.8.1 (([`b5fc91b`][]) - -[`f5394d8`]: https://github.com/browserify/resolve/commit/f5394d801350ff32be08dfc5ca37bcb677b4c08b -[`9c370c9`]: https://github.com/browserify/resolve/commit/9c370c9848eaecb36fb8e0b004930e2dd49e1e71 -[`3a64219`]: https://github.com/browserify/resolve/commit/3a64219a7385d5d51f3d4ff7b3de0ce749d6cf09 -[`6f771b2`]: https://github.com/browserify/resolve/commit/6f771b215b4f40b0ba0009ef564bde85212e79eb -[`b5fc91b`]: https://github.com/browserify/resolve/commit/b5fc91bf59e6da3aafedc8a8ae4ce53907c06069 - -#### [v1.8.0](https://github.com/browserify/resolve/compare/v1.7.1...v1.8.0) - 15 June 2018 - -- [New] include filename in error message ([`#162`][]) -- [Tests] up to `node` `v10.1`, `v9.11`, `v8.11`, `v6.14`, `4.9` (([`ad16af2`][]) -- Fix eslint problems and update count of tests (([`def5931`][]) -- [New] add fs/promises to the list of core modules (([`756419a`][]) -- v1.8.0 (([`dcba6d0`][]) -- [New] core: add `trace_events`, `v8/tools/arguments` (([`bae0338`][]) -- [Fix] core: `_tls_legacy` is removed in node 10 (([`4225ac5`][]) - -[`#162`]: https://github.com/browserify/resolve/pull/162 -[`ad16af2`]: https://github.com/browserify/resolve/commit/ad16af2f4f6eb1dc964f5b119f6d94bd64b2607a -[`def5931`]: https://github.com/browserify/resolve/commit/def59317704d787adcddc9695b923e65c6bf5232 -[`756419a`]: https://github.com/browserify/resolve/commit/756419a94432fd753a62f5a58b797776efb543f9 -[`dcba6d0`]: https://github.com/browserify/resolve/commit/dcba6d077708ef93085270526bb8f982b66fc16d -[`bae0338`]: https://github.com/browserify/resolve/commit/bae033824c82153ccb4f32abdd0e70ca677968bc -[`4225ac5`]: https://github.com/browserify/resolve/commit/4225ac5f4b90d26db664ed32f5b08416fea69b86 - -#### [v1.7.1](https://github.com/browserify/resolve/compare/v1.7.0...v1.7.1) - 12 April 2018 - -- [Fix] revert proper but unintended breaking change in sync packageFilter ([`#157`][]) -- v1.7.1 (([`579e2b1`][]) - -[`579e2b1`]: https://github.com/browserify/resolve/commit/579e2b161a7cbb79284b335cc3b605287da27610 - -#### [v1.7.0](https://github.com/browserify/resolve/compare/v1.6.0...v1.7.0) - 7 April 2018 - -- [Fix] Make loadAsFileSync() work the same as async loadAsFile() ([`#146`][]) -- [Tests] add more pathfilter tests (([`c3621a3`][]) -- [Tests] add some tests for browser field (([`13fb572`][]) -- [Refactor] cache default isFile functions at module level (([`fa6e6f5`][]) -- [Docs] fix default “isFile” implementations (([`0f29c93`][]) -- [Tests] add some tests for a non-directory basedir (([`0c18e40`][]) -- [Refactor] use "basedir" instead of "y", because meaningful variable names (([`876b0b0`][]) -- [Docs] fix options formatting (([`23df5f5`][]) -- Minor cleanup (([`c449d48`][]) -- [Fix] support `opts.package` in non-relative lookups (([`c8a2052`][]) -- v1.7.0 (([`bdf1210`][]) -- [Tests] work around npm SSL issue (([`04cb0bb`][]) -- [Tests] add node 8 and 9 to appveyor (([`7cbd17a`][]) -- [Tests] work around npm SSL issue (([`4b10996`][]) - -[`#146`]: https://github.com/browserify/resolve/pull/146 -[`c3621a3`]: https://github.com/browserify/resolve/commit/c3621a35675b275b2b241dd367459ed7afe1c22a -[`13fb572`]: https://github.com/browserify/resolve/commit/13fb572337623622d06450696af6c15b68be26c3 -[`fa6e6f5`]: https://github.com/browserify/resolve/commit/fa6e6f5a2d34377f6973701733177a280adf0511 -[`0f29c93`]: https://github.com/browserify/resolve/commit/0f29c93f0c74fc4e52ec6ed6678ce0fec6347e2d -[`0c18e40`]: https://github.com/browserify/resolve/commit/0c18e40e4929ba2c9426a77079c153c43e50a025 -[`876b0b0`]: https://github.com/browserify/resolve/commit/876b0b08da9fe44d81681d0c815900485536be9e -[`23df5f5`]: https://github.com/browserify/resolve/commit/23df5f526823e27e33b01333016b7f58b4f63b6f -[`c449d48`]: https://github.com/browserify/resolve/commit/c449d4809cf8461a3d54e458780902b95119a969 -[`c8a2052`]: https://github.com/browserify/resolve/commit/c8a20524c7d08671c22903e70b952575b0502f7b -[`bdf1210`]: https://github.com/browserify/resolve/commit/bdf1210d96f3e06c00fad051917950eb5238ab05 -[`04cb0bb`]: https://github.com/browserify/resolve/commit/04cb0bb94628e560bfa4163e73637d3803591714 -[`7cbd17a`]: https://github.com/browserify/resolve/commit/7cbd17ae270f9ec24ef05779c3a5e9da3e75c598 -[`4b10996`]: https://github.com/browserify/resolve/commit/4b1099668477e28117c34f9db3509ff096a49190 - -#### [v1.6.0](https://github.com/browserify/resolve/compare/v1.5.0...v1.6.0) - 20 March 2018 - -- [New] add `async_hooks` core module, added in node 8 ([`#144`][]) -- [New] add many missing core modules. (([`88c0778`][]) -- Made loadAsFileSync() work the same as async loadAsFile(). (([`dc23387`][]) -- [Tests] up to `v9.8`, `v8.10`, `v6.13` (([`315d729`][]) -- [Tests] up to `node` `v9.3`, `v8.8`, `v6.12`; pin included builds to LTS (([`5091aa2`][]) -- [Tests] add a failing test (([`90b1192`][]) -- [Dev Deps] update `eslint`, `tape` (([`2acf953`][]) -- [Tests] restore node 0.6 (([`2764758`][]) -- v1.6.0 (([`1de53b2`][]) -- [Dev Deps] update `eslint` (([`699a54e`][]) -- [Dev Deps] update `eslint` (([`2674fad`][]) - -[`88c0778`]: https://github.com/browserify/resolve/commit/88c0778be359caaeb4ca74b24a7b5f7903bc39e8 -[`dc23387`]: https://github.com/browserify/resolve/commit/dc23387adb93f497d67def7ee99fae48e5958fb3 -[`315d729`]: https://github.com/browserify/resolve/commit/315d729afe7074ffae5d6ca6509a73d747985d45 -[`5091aa2`]: https://github.com/browserify/resolve/commit/5091aa2c076b67ff762937401e81da66ef7988ca -[`90b1192`]: https://github.com/browserify/resolve/commit/90b11921181c2783209e9aa31f1e20d98c11ed17 -[`2acf953`]: https://github.com/browserify/resolve/commit/2acf953ce2a94b38528372b5f8848ac95a2aabe5 -[`2764758`]: https://github.com/browserify/resolve/commit/2764758aae576aef98f41af5d46f76ada3523012 -[`1de53b2`]: https://github.com/browserify/resolve/commit/1de53b227990cfcb07e59fdf49d34b2a8373ba4c -[`699a54e`]: https://github.com/browserify/resolve/commit/699a54e91222dc8b3e1f0af8e9859c734d99d50a -[`2674fad`]: https://github.com/browserify/resolve/commit/2674fadcfcf2b253fdcf5e9d8564fd2b23b0b57c - -#### [v1.5.0](https://github.com/browserify/resolve/compare/v1.4.0...v1.5.0) - 24 October 2017 - -- [New] node v8.8+ supports `http2` ([`#139`][]) -- [Fix] fix broken core tests; change core.json to be an object instead of an array; fix results (([`b826f30`][]) -- [Tests] up to `v8.4`; node 0.6 is failing due to travis-ci changes; allow it to fail for now. (([`e9d3a24`][]) -- [Tests] up to `node` `8.7`; use `nvm install-latest-npm` so new npm doesn’t break old node (([`d0de222`][]) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` (([`76f28a3`][]) -- [Tests] on `node` `v8.8` (([`e0c5d51`][]) -- [Docs] update repo URL (([`3412f98`][]) -- [New] add `perf_hooks`, added in node v8.5 (([`e66117d`][]) -- v1.5.0 (([`19cbd5e`][]) -- [Dev Deps] update `eslint` (([`5bfb072`][]) - -[`b826f30`]: https://github.com/browserify/resolve/commit/b826f3007dc8903b95e39984f93c68bb5e4c85b9 -[`e9d3a24`]: https://github.com/browserify/resolve/commit/e9d3a24ae0a4d8e3eefc6431c918c23f7c8fc6d3 -[`d0de222`]: https://github.com/browserify/resolve/commit/d0de222e4b55b67224ddec0421ee66ce8cb5ee8d -[`76f28a3`]: https://github.com/browserify/resolve/commit/76f28a3d275a63b0511449d28900ab5749f27fa5 -[`e0c5d51`]: https://github.com/browserify/resolve/commit/e0c5d518abfaadc4107ca8f3f8c30caf46490444 -[`3412f98`]: https://github.com/browserify/resolve/commit/3412f984a03a345b9a5ef1f0642a0308d676a2c2 -[`e66117d`]: https://github.com/browserify/resolve/commit/e66117df49d9f967b46fde633770307c9d5a7066 -[`19cbd5e`]: https://github.com/browserify/resolve/commit/19cbd5e0b67c78176e771a1a6fa3a6ffd478e3ac -[`5bfb072`]: https://github.com/browserify/resolve/commit/5bfb072f152c77c8247f4c06c1efa9246bbdddb0 - -#### [v1.4.0](https://github.com/browserify/resolve/compare/v1.3.3...v1.4.0) - 26 July 2017 - -- [New]: add `preserveSymlinks` option ([`#130`][]) -- [Fix] `sync`: fix when package.json main = ‘.’ or main = ‘./‘ ([`#125`][]) -- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`; npm 4.6+ breaks on node < 4 (([`41a3604`][]) -- [Tests] fix 0.6 and linting (([`703517b`][]) -- Only apps should have lockfiles (([`11fb3d8`][]) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` (([`bc2f7bf`][]) -- v1.4.0 (([`744f816`][]) - -[`41a3604`]: https://github.com/browserify/resolve/commit/41a3604f6408dbe9693febf895251db924c87a8f -[`703517b`]: https://github.com/browserify/resolve/commit/703517b78e7e0f8093a79c0a7a413a708ac82d06 -[`11fb3d8`]: https://github.com/browserify/resolve/commit/11fb3d85bb107a24476bd8d764ba25b3c60c184a -[`bc2f7bf`]: https://github.com/browserify/resolve/commit/bc2f7bf29d172fa54d66cf909fb47a858f7765aa -[`744f816`]: https://github.com/browserify/resolve/commit/744f8162464a104aca60777e5f615418dab3b774 - -#### [v1.3.3](https://github.com/browserify/resolve/compare/v1.3.2...v1.3.3) - 20 April 2017 - -- [Fix] error code MODULE_NOT_FOUND instead of ENOTDIR ([`#121`][]) -- [Tests] [eslint] add `npm run lint` (([`3677928`][]) -- [Tests] up to `node` `v7.7`, `v6.10`, `v4.8`; comment out OSX builds since they block linux builds. (([`1d3883c`][]) -- [Fix] correctly resolve dir paths when file with the same name exists (([`a983d38`][]) -- [Tests] up to `node` `v7.9` (([`0da055c`][]) -- [Tests] improve failure scenarios. (([`1de578f`][]) -- [Fix] `sync`: ensure that the path is a string, explicitly. (([`b7ba83d`][]) -- v1.3.3 (([`f009822`][]) -- [Dev Deps] update `eslint` (([`452fdf9`][]) -- [Tests] node 0.6 can’t support an npm that understands scoped packages (([`26369cf`][]) - -[`3677928`]: https://github.com/browserify/resolve/commit/36779282881ec4abce32b2c9b7f7b10bcd09d953 -[`1d3883c`]: https://github.com/browserify/resolve/commit/1d3883c40d55242d7dfeafa43fa782dc6f4ab4a6 -[`a983d38`]: https://github.com/browserify/resolve/commit/a983d38c47ea26e57e0824f22929985ecb24faca -[`0da055c`]: https://github.com/browserify/resolve/commit/0da055cc75bebd7e0044cd4184e7c5386a7bd7de -[`1de578f`]: https://github.com/browserify/resolve/commit/1de578f2879f83ba94789041420fd3d3b929127e -[`b7ba83d`]: https://github.com/browserify/resolve/commit/b7ba83d43519c3c77af823ef1badd7f452d8b8e3 -[`f009822`]: https://github.com/browserify/resolve/commit/f0098226a4fd0dedc85b5f1e8ca8aac6a7ca7a60 -[`452fdf9`]: https://github.com/browserify/resolve/commit/452fdf981330f96d7fef88805b24e40ea24a89e1 -[`26369cf`]: https://github.com/browserify/resolve/commit/26369cfe6ce4eae7404f3c003c88618f098d6814 - -#### [v1.3.2](https://github.com/browserify/resolve/compare/v1.2.1...v1.3.2) - 26 February 2017 - -- v1.3.2 (([`781da84`][]) -- Fix prepublish script. (([`1aa1d9d`][]) - -[`781da84`]: https://github.com/browserify/resolve/commit/781da847169b8ba43f65ed3d9dbc1283d5bde74c -[`1aa1d9d`]: https://github.com/browserify/resolve/commit/1aa1d9d9adc60691431efbde8d915c143cd54916 - -#### [v1.3.1](https://github.com/browserify/resolve/compare/v1.3.0...v1.3.1) - 24 February 2017 - -- Revert "[New] add searched extensions to error messages" (([`68a081d`][]) -- v1.3.1 (([`05a5ab9`][]) - -[`68a081d`]: https://github.com/browserify/resolve/commit/68a081d1c7ff6e0fb58aeff4b6ac06aada7812c4 -[`05a5ab9`]: https://github.com/browserify/resolve/commit/05a5ab961b5720bdcf1a641c093a4789af700506 - -#### [v1.3.0](https://github.com/browserify/resolve/compare/v1.2.0...v1.3.0) - 24 February 2017 - -- v1.3.0 (([`c6966fd`][]) - -[`c6966fd`]: https://github.com/browserify/resolve/commit/c6966fd37d985aca1191711f9993bffb7ba43e96 - -#### [v1.2.1](https://github.com/browserify/resolve/compare/v1.3.1...v1.2.1) - 26 February 2017 - -- [Fix] for browserify compat, do not assume `process.versions.node` exists. ([`#120`][]) -- [Fix] for browserify compat, do not assume `process.versions.node` exists. ([`#120`][]) -- v1.2.1 (([`a73e111`][]) - -[`a73e111`]: https://github.com/browserify/resolve/commit/a73e1114ddfe9d29cc8f1874d6b704d9ae8bb220 - -#### [v1.2.0](https://github.com/browserify/resolve/compare/v1.1.7...v1.2.0) - 13 December 2016 - -- [Fix] `resolve.sync` should re-throw non `ENOENT errors. ([`#79`][]) -- [New] add missing core modules, and determine them dynamically by node version. ([`#100`][][`#110`][][`#111`][][`#112`][]) -- [Tests] test on every minor version of node. ([`#109`][][`#75`][][`#74`][][`#70`][]) -- code style: tabs → spaces (([`0ab33b2`][]) -- [Dev Deps] add `safe-publish-latest` (([`83c25dd`][]) -- [Fix] Create error outside process.nextTick (([`3fa5f02`][]) -- v1.2.0 (([`8e4a465`][]) -- readme: update API docs link for require.resolve() (([`7e98547`][]) -- [Dev Deps] update `tape` (([`764f3a2`][]) -- gitignore node_modules (([`3e8a8da`][]) - -[`0ab33b2`]: https://github.com/browserify/resolve/commit/0ab33b29b814e030021ff2df391e60a1c52dcc46 -[`83c25dd`]: https://github.com/browserify/resolve/commit/83c25dde8aa5a663bc3863d946fdc62fab5fd080 -[`3fa5f02`]: https://github.com/browserify/resolve/commit/3fa5f02f2ace0683fbd42196619c4e2bbd9eef60 -[`8e4a465`]: https://github.com/browserify/resolve/commit/8e4a4659f4120c145e2f12bb01cf4ddad61730b3 -[`7e98547`]: https://github.com/browserify/resolve/commit/7e98547319f1dada4f26d7a24f3b92a08f85c56b -[`764f3a2`]: https://github.com/browserify/resolve/commit/764f3a231c26c370c4e6b94f0bb10166c20551b7 -[`3e8a8da`]: https://github.com/browserify/resolve/commit/3e8a8da3c9d545e00e15f5bed24623eb134b2221 - -#### [v1.1.7](https://github.com/browserify/resolve/compare/v1.1.6...v1.1.7) - 24 January 2016 - -- (typo) Change againt to against ([`#83`][]) -- Fix node_modules paths on Windows (([`35b2b64`][]) -- 1.1.7 (([`bb37f0d`][]) -- (typo) Change againt to against (([`7b6843c`][]) - -[`#83`]: https://github.com/browserify/resolve/pull/83 -[`35b2b64`]: https://github.com/browserify/resolve/commit/35b2b642d91e9b81e7cc26b6fd19912e18901d55 -[`bb37f0d`]: https://github.com/browserify/resolve/commit/bb37f0d4400e4d7835375be4bd3ad1264bac3689 -[`7b6843c`]: https://github.com/browserify/resolve/commit/7b6843c0757b84e65b9af7e46a9392cbadd4a380 - -#### [v1.1.6](https://github.com/browserify/resolve/compare/v1.1.5...v1.1.6) - 15 March 2015 - -- Use path.dirname to walk up looking for a package.json ([`#76`][]) -- add back pkg assertions to pick up the root package (([`4c25e45`][]) -- 1.1.6 (([`38d451c`][]) - -[`4c25e45`]: https://github.com/browserify/resolve/commit/4c25e45625fea7980463fc107fc843aab7e0d993 -[`38d451c`]: https://github.com/browserify/resolve/commit/38d451c0ecd9267277a7683970432d37f001441e - -#### [v1.1.5](https://github.com/browserify/resolve/compare/v1.1.4...v1.1.5) - 21 February 2015 - -- another test, not quite the failing case (([`612cac2`][]) -- 1.1.5 (([`a225602`][]) -- fix for the failing case (([`503c746`][]) - -[`612cac2`]: https://github.com/browserify/resolve/commit/612cac2beac41fb13b7b12a9dfdb4207391260c1 -[`a225602`]: https://github.com/browserify/resolve/commit/a225602be4ca80f75292a6a17c78ff3b27eb0bf3 -[`503c746`]: https://github.com/browserify/resolve/commit/503c746a6e64d50f2c9b18b4476ffcfed49947f2 - -#### [v1.1.4](https://github.com/browserify/resolve/compare/v1.1.3...v1.1.4) - 20 February 2015 - -- finally seems to fully handle browser field from outside foo/bar resolution (([`5b737d5`][]) -- flatter nodeModules function (([`5ebb39a`][]) -- 1.1.4 (([`7496374`][]) - -[`5b737d5`]: https://github.com/browserify/resolve/commit/5b737d58b38ce891ef3f06d600d0562dbbc8539c -[`5ebb39a`]: https://github.com/browserify/resolve/commit/5ebb39a19b62c052ff6201600c3d2fffb3f5fdcb -[`7496374`]: https://github.com/browserify/resolve/commit/7496374878a8482f6bc26bca474595cfb81ecdd2 - -#### [v1.1.3](https://github.com/browserify/resolve/compare/v1.1.2...v1.1.3) - 17 February 2015 - -- re-implemented pathfilter feature nearly passes the test (([`60ff554`][]) -- another precedence test (([`98d22e0`][]) -- move pathfilter test to its own file (([`90826f5`][]) -- path logic fix that seems to handle all the cases across this package and browserify (([`70146a5`][]) -- tape everywhere (([`47bbfcd`][]) -- move pathfilter files into their own dir (([`7f0a3f1`][]) -- failing precedence test (([`73e958e`][]) -- nearly nearly working (([`e7bffbf`][]) -- packageFilter should have been giving the pkgfile as an argument, fixed (([`70b71e7`][]) -- this fixes the directory precedence problem (([`caca9f9`][]) -- disable faulty basedir test except on windows for now (([`3be4b79`][]) -- passes pathfilter test (([`644f814`][]) -- fix node_path test, was clearly wrong for some reason (([`9aa36e7`][]) - -[`60ff554`]: https://github.com/browserify/resolve/commit/60ff5545ec3cd15367c89c08cf3f139fa9c23796 -[`98d22e0`]: https://github.com/browserify/resolve/commit/98d22e0e21dd57fe1ab8d9573c1f63903c2b7321 -[`90826f5`]: https://github.com/browserify/resolve/commit/90826f575fe37cb3852de17e764b62e3754484b2 -[`70146a5`]: https://github.com/browserify/resolve/commit/70146a5ebc4d96438383ada02785d4e722c6f5d9 -[`47bbfcd`]: https://github.com/browserify/resolve/commit/47bbfcd9d9c8a68ce97fa37e0563930cee67093d -[`7f0a3f1`]: https://github.com/browserify/resolve/commit/7f0a3f1545f4b53f1bdd099b67561f9516693325 -[`73e958e`]: https://github.com/browserify/resolve/commit/73e958e905eed000787f0596f81c212ca2cdb3b3 -[`e7bffbf`]: https://github.com/browserify/resolve/commit/e7bffbf1b39b6239732c0e7fb01eeb9dad605d15 -[`70b71e7`]: https://github.com/browserify/resolve/commit/70b71e7980b3235018a0f5ac0bd52b8393548beb -[`caca9f9`]: https://github.com/browserify/resolve/commit/caca9f9c3576c85d8972d25012ea5d12aeaa50f4 -[`3be4b79`]: https://github.com/browserify/resolve/commit/3be4b796f1a9aadfb293b36c0c7f781ca9169f09 -[`644f814`]: https://github.com/browserify/resolve/commit/644f81478c892874f9829aa6cca36ca72474db00 -[`9aa36e7`]: https://github.com/browserify/resolve/commit/9aa36e77eca50e177498984fdef5d564903d3964 - -#### [v1.1.2](https://github.com/browserify/resolve/compare/v1.1.0...v1.1.2) - 16 February 2015 - -- Adding pathFilter docs ([`#67`][]) -- adding pathFilter docs (([`44480ff`][]) -- 1.1.2 (([`d5f6ad0`][]) - -[`#67`]: https://github.com/browserify/resolve/pull/67 -[`44480ff`]: https://github.com/browserify/resolve/commit/44480ff041f791f32b80d212302180be210901a1 -[`d5f6ad0`]: https://github.com/browserify/resolve/commit/d5f6ad02eae9b504e5edfdfaf2857600847c9bcf - -#### [v1.1.0](https://github.com/browserify/resolve/compare/v1.0.0...v1.1.0) - 27 January 2015 - -- Update docs re: input and cb args. ([`#65`][]) -- Update main README--change word order for clarity ([`#55`][]) -- attempts to find package.json data for deep references https://github.com/substack/node-resolve/issues/62 (([`caff2ba`][]) -- formatting (([`b8d09e3`][]) -- Add failing test for parent filename in error msg. (([`96d38c6`][]) -- split before computing the pivot to prevent abcnode_modulesxyz from matching (([`10380e1`][]) -- Utilize opts.filename when available to ID parent. (([`f6edcd9`][]) -- Update docs re: input and cb args. (([`38b5c41`][]) -- Update main README--change word order for clarity (([`55fd2dc`][]) -- 1.1.0 (([`65e1789`][]) - -[`#65`]: https://github.com/browserify/resolve/pull/65 -[`#55`]: https://github.com/browserify/resolve/pull/55 -[`caff2ba`]: https://github.com/browserify/resolve/commit/caff2ba60dc5d85eaded388dc6025afd05ba183b -[`b8d09e3`]: https://github.com/browserify/resolve/commit/b8d09e3a2d679f6b61515d49eca3f6d8d0d2ac7f -[`96d38c6`]: https://github.com/browserify/resolve/commit/96d38c6aaa575d12781c28b34243b4939359a335 -[`10380e1`]: https://github.com/browserify/resolve/commit/10380e16d3cf03f25941c3f1545ef73ed11bc1e1 -[`f6edcd9`]: https://github.com/browserify/resolve/commit/f6edcd95ad5d27bfbdee0fa51951aa3d45d77cba -[`38b5c41`]: https://github.com/browserify/resolve/commit/38b5c41091e4addc0c17bc9b4a2388fdef8cf3c9 -[`55fd2dc`]: https://github.com/browserify/resolve/commit/55fd2dcb400f81faafecd1b3a147e38747fc08f8 -[`65e1789`]: https://github.com/browserify/resolve/commit/65e1789c3612c1b04ad5002d1131d82e8b6262e5 - -### [v1.0.0](https://github.com/browserify/resolve/compare/v0.7.4...v1.0.0) - 11 August 2014 - -- reformat package.json (([`695bbc1`][]) -- 1.0.0 (([`d0c465c`][]) - -[`695bbc1`]: https://github.com/browserify/resolve/commit/695bbc1d9eeb35339b4a01e141c6f6e1dff3a6e3 -[`d0c465c`]: https://github.com/browserify/resolve/commit/d0c465c88e85f05113a7fbef7b976c77ecdce965 - -#### [v0.7.4](https://github.com/browserify/resolve/compare/v0.7.3...v0.7.4) - 25 July 2014 - -- merged (([`5cae82f`][]) -- 0.7.4 (([`4ad6619`][]) - -[`5cae82f`]: https://github.com/browserify/resolve/commit/5cae82fb22cb64d5b72f703c787dc0fd418ed412 -[`4ad6619`]: https://github.com/browserify/resolve/commit/4ad661931ebdd07c3df34bc897c24255705adbff - -#### [v0.7.3](https://github.com/browserify/resolve/compare/v0.7.2...v0.7.3) - 25 July 2014 - -- cb(err) for non-string args (([`965c70b`][]) -- 0.7.3 (([`f620099`][]) - -[`965c70b`]: https://github.com/browserify/resolve/commit/965c70b27ff796fc0ac3dba186d95b61d82446df -[`f620099`]: https://github.com/browserify/resolve/commit/f6200998628490aec1c3008bb4e8bf099ab4920f - -#### [v0.7.2](https://github.com/browserify/resolve/compare/v0.7.1...v0.7.2) - 25 July 2014 - -- failing dotdot test (([`3ee0f0e`][]) -- fixes for dotdot tests (([`a67f230`][]) -- failing sync dotdot test (([`55515e7`][]) -- 0.7.2 (([`eae92dd`][]) - -[`3ee0f0e`]: https://github.com/browserify/resolve/commit/3ee0f0eb97971d246a4a3f183374f60938f1ca8a -[`a67f230`]: https://github.com/browserify/resolve/commit/a67f230133050568ca14a04c0d36aaf6bf14fa89 -[`55515e7`]: https://github.com/browserify/resolve/commit/55515e7f816571fb9d71fdd6d0f012185b2eeefb -[`eae92dd`]: https://github.com/browserify/resolve/commit/eae92dd55fa92543c32c4eaff72dce2d78dd3b99 - -#### [v0.7.1](https://github.com/browserify/resolve/compare/v0.7.0...v0.7.1) - 9 June 2014 - -- [Fix] `node-modules-paths`: `opts` should be optional, and `opts.paths` should not be concatenated when omitted. ([`#96`][]) -- [Refactor] consistent spacing and quotes; run some basic linting manually. (([`f63faaf`][]) -- [Tests] use `path.join` more often to normalize paths across OS’s. (([`8280c53`][]) -- [Tests] use `path` methods to make tests pass on both linux and Windows. (([`af9a885`][]) -- [Tests] make matrix more efficient (([`7f0ce87`][]) -- [Tests] fix indentation, manual linting. (([`6984dcb`][]) -- [Tests] [Refactor] refactor `node-modules-paths` and add tests. (([`58b99a3`][]) -- [Tests] add `appveyor` (([`caffe35`][]) -- [new] Add err.code = 'MODULE_NOT_FOUND' (([`c622aef`][]) -- [New] add searched extensions to error messages (([`1260d9d`][]) -- node-modules-paths: absolutize the `start` path (([`9d6b7af`][]) -- [Refactor] `async`: remove unnecessary slashes, since `path.join` adds them. (([`dd50615`][]) -- [Tests] ensure node_path test is independent of the `tap` module’s “main” (([`ddca9ed`][]) -- 0.7.1 (([`ae0beb7`][]) - -[`f63faaf`]: https://github.com/browserify/resolve/commit/f63faaf9df5dbd8da388c674de0b14e3286e5e91 -[`8280c53`]: https://github.com/browserify/resolve/commit/8280c53eae6b612f586e133052ed2b2a56ae6649 -[`af9a885`]: https://github.com/browserify/resolve/commit/af9a8858a618ab64dd4bb311ef1be37822ade2b7 -[`7f0ce87`]: https://github.com/browserify/resolve/commit/7f0ce871b6d2b5cb2082b04cd72ddd4055cb7a05 -[`6984dcb`]: https://github.com/browserify/resolve/commit/6984dcb1407fec6af46f744ad2c63f502645bdd6 -[`58b99a3`]: https://github.com/browserify/resolve/commit/58b99a36f882d7ee65df725224f204abd27379db -[`caffe35`]: https://github.com/browserify/resolve/commit/caffe358566bb3c2f9b4cbd8c0f910debfb6df3b -[`c622aef`]: https://github.com/browserify/resolve/commit/c622aefeb286e479d536601e30bb828e69f86ec3 -[`1260d9d`]: https://github.com/browserify/resolve/commit/1260d9d1e2f55efb514540db9aa1b3d679f9db10 -[`9d6b7af`]: https://github.com/browserify/resolve/commit/9d6b7af28c054676d6ea8a5037353ed750ea13bb -[`dd50615`]: https://github.com/browserify/resolve/commit/dd506158089f7d071d2a9f61cd4385365d177219 -[`ddca9ed`]: https://github.com/browserify/resolve/commit/ddca9ed7e1d980d5ec561450875cb09463effd5a -[`ae0beb7`]: https://github.com/browserify/resolve/commit/ae0beb7e8efe4a3c38f570931115d70f883b4f22 - -#### [v0.7.0](https://github.com/browserify/resolve/compare/v0.6.3...v0.7.0) - 17 May 2014 - -- array opts.moduleDirectory tests (([`0f6d088`][]) -- opts.moduleDirectory string tests (([`a15ffd6`][]) -- Support more than one directory in opts.moduleDirectory. (([`4183463`][]) -- formatting (([`b89f089`][]) -- 0.7.0 (([`c686141`][]) -- Remove variable leftover from 325584a685 (([`12fa78c`][]) - -[`0f6d088`]: https://github.com/browserify/resolve/commit/0f6d08801db6bc2044df8767226421172a2d9461 -[`a15ffd6`]: https://github.com/browserify/resolve/commit/a15ffd6c20772831c41146189c117ab0a0650e0b -[`4183463`]: https://github.com/browserify/resolve/commit/41834633e84d76d86297968ba34c375f26fe4f08 -[`b89f089`]: https://github.com/browserify/resolve/commit/b89f08902e8551e07d66e81a3dc33840e24266c5 -[`c686141`]: https://github.com/browserify/resolve/commit/c686141e0947ccfe96d4d045d06e46edf9cdb97f -[`12fa78c`]: https://github.com/browserify/resolve/commit/12fa78ce43c4363e1c9600b635d18cd295c6949f - -#### [v0.6.3](https://github.com/browserify/resolve/compare/v0.6.2...v0.6.3) - 16 April 2014 - -- Fixed the case when main is specified as "." or "./" causing the resolve to infinite loop as documented at https://github.com/substack/node-browserify/issues/732. (([`b11f273`][]) -- 0.6.3 (([`0a7d684`][]) - -[`b11f273`]: https://github.com/browserify/resolve/commit/b11f2739ad8c9730e1076271eff54850755e2ee1 -[`0a7d684`]: https://github.com/browserify/resolve/commit/0a7d684045bee083bea0fd80ae1dc0fa317bea7f - -#### [v0.6.2](https://github.com/browserify/resolve/compare/v0.6.1...v0.6.2) - 21 March 2014 - -- passing tests for paths (([`4f56bb6`][]) -- faulty basedir does not always produce error properly in windows, because when the dirs are sliced down the final path has improper prefix, causing it to load relative to cwd (([`110168a`][]) -- 0.6.2 (([`2c74b4e`][]) - -[`4f56bb6`]: https://github.com/browserify/resolve/commit/4f56bb67fa45d35adfa6a0022cc77afbf8117234 -[`110168a`]: https://github.com/browserify/resolve/commit/110168adae1dfbedcb9a12086cacf0ce68cc67f6 -[`2c74b4e`]: https://github.com/browserify/resolve/commit/2c74b4e507659489eec132b679395e50900d1b55 - -#### [v0.6.1](https://github.com/browserify/resolve/compare/v0.6.0...v0.6.1) - 27 November 2013 - -- merged the context error patches (([`8408e6e`][]) -- 0.6.1 (([`591e359`][]) - -[`8408e6e`]: https://github.com/browserify/resolve/commit/8408e6e8902b4bec8c859d606f53366e42058378 -[`591e359`]: https://github.com/browserify/resolve/commit/591e359faf5e2eb9c7f5cc86c9ac389c43d961e8 - -#### [v0.6.0](https://github.com/browserify/resolve/compare/v0.5.1...v0.6.0) - 26 November 2013 - -- fixes #25: resolve modules with the same name as node stdlib modules ([`#25`][]) -- 0.6.0 (([`0d09991`][]) - -[`0d09991`]: https://github.com/browserify/resolve/commit/0d099913f641e59d192b37703a4eff0b76317c62 - -#### [v0.5.1](https://github.com/browserify/resolve/compare/v0.5.0...v0.5.1) - 22 September 2013 - -- Separate duplicated nodeModulesPaths function (([`325584a`][]) -- Fix prefix for windows azure (([`b5ba043`][]) -- 0.5.1 (([`281b336`][]) - -[`325584a`]: https://github.com/browserify/resolve/commit/325584a685db8f42aae3d4876ffbe64069233601 -[`b5ba043`]: https://github.com/browserify/resolve/commit/b5ba0430b012d93367a4f87c304f1d4c8c22941c -[`281b336`]: https://github.com/browserify/resolve/commit/281b336a6a9f50a54fc6817b7a1f736985f0248b - -#### [v0.5.0](https://github.com/browserify/resolve/compare/v0.4.3...v0.5.0) - 2 September 2013 - -- opts.modules => opts.moduleDirectory, documented (([`c46593d`][]) -- modules folder name is configurable (([`d65a422`][]) -- 0.5.0 (([`b1e04d7`][]) - -[`c46593d`]: https://github.com/browserify/resolve/commit/c46593de74b256196d7ea12c85422698652cff10 -[`d65a422`]: https://github.com/browserify/resolve/commit/d65a42238101ea284ddafb788debdad0e5a59504 -[`b1e04d7`]: https://github.com/browserify/resolve/commit/b1e04d7098e469823e3c3a895a604c9e93d7ade1 - -#### [v0.4.3](https://github.com/browserify/resolve/compare/v0.4.2...v0.4.3) - 7 August 2013 - -- Fix default basedir calculation (([`cd7169b`][]) -- use getCaller() in both async and sync versions (([`20f8945`][]) -- 0.4.3 (([`ee5423e`][]) - -[`cd7169b`]: https://github.com/browserify/resolve/commit/cd7169b204b9f474b6a924adf47564f33a469f07 -[`20f8945`]: https://github.com/browserify/resolve/commit/20f89456f7fc1d8e51b95ec1ab38b1ac154d9fc4 -[`ee5423e`]: https://github.com/browserify/resolve/commit/ee5423e66f50bdae6ef60e12525c9851fc95ac9d - -#### [v0.4.2](https://github.com/browserify/resolve/compare/v0.4.1...v0.4.2) - 3 August 2013 - -- Failing test case for pkg.main pointing to a directory. (([`b57a75a`][]) -- 0.4.2 (([`6173c36`][]) -- Fix for failing test case where pkg.main points to directory. (([`8c4078c`][]) - -[`b57a75a`]: https://github.com/browserify/resolve/commit/b57a75aefc394ead20d54ed107741f1f7151b90f -[`6173c36`]: https://github.com/browserify/resolve/commit/6173c363fd698653ae8504e630d82e45135a039a -[`8c4078c`]: https://github.com/browserify/resolve/commit/8c4078c9dd45c6a92f1f409d70aaccc95be3bfc6 - -#### [v0.4.1](https://github.com/browserify/resolve/compare/v0.4.0...v0.4.1) - 30 July 2013 - -- adding tests to reproduce the problem (([`ad3a477`][]) -- 0.4.1 (([`2dcc3cb`][]) -- async resolve now falls back to 'index.js' if main field in package.json is incorrect (([`62a5726`][]) - -[`ad3a477`]: https://github.com/browserify/resolve/commit/ad3a4772ddd7187ff38cb56e00635b37a491e1fa -[`2dcc3cb`]: https://github.com/browserify/resolve/commit/2dcc3cb1d350220811998718217a7647d4e25e8c -[`62a5726`]: https://github.com/browserify/resolve/commit/62a572635f21bf1c28360ea5c2238be62736429b - -#### [v0.4.0](https://github.com/browserify/resolve/compare/v0.3.1...v0.4.0) - 9 June 2013 - -- Implement async support for returning package a module was resolved from. (([`b7b2806`][]) -- 0.4.0 (([`eed74a4`][]) -- Document package option. (([`7f84028`][]) - -[`b7b2806`]: https://github.com/browserify/resolve/commit/b7b28069acb7c749a2053dbb0c8d606515954694 -[`eed74a4`]: https://github.com/browserify/resolve/commit/eed74a41f001c0d75eb3284f86fafd0185c244fa -[`7f84028`]: https://github.com/browserify/resolve/commit/7f8402881b725938cfaf1d4835ec2fb6cee4862d - -#### [v0.3.1](https://github.com/browserify/resolve/compare/v0.3.0...v0.3.1) - 29 March 2013 - -- use isFIFO() instead to more narrowly target <() usage (([`790cdf5`][]) -- check !isDirectory() instead of isFile() so that <(echo "beep") inline bash fds work (([`c396065`][]) - -[`790cdf5`]: https://github.com/browserify/resolve/commit/790cdf5ab7c92bb146e8ace05ba0b26c5f51ffb3 -[`c396065`]: https://github.com/browserify/resolve/commit/c3960650f1a1417e52238011e08a6da2b0d9fee4 - -#### [v0.3.0](https://github.com/browserify/resolve/compare/v0.2.8...v0.3.0) - 19 February 2013 - -- failing translated async test with parameterized readFile on account of 3-arg form (([`7033bbb`][]) -- factor out .sync into lib/sync.js (([`ba7038a`][]) -- updated the docs for async (([`34a958e`][]) -- first async test passes (([`e427ca8`][]) -- sync parity with async tests (([`d1191a9`][]) -- stub out async (([`f4b02e3`][]) -- factor out core into lib/ (([`a800954`][]) -- synchronous example (([`3534992`][]) -- adapted async test (([`c9111d2`][]) -- 0.3.0 (([`71d6159`][]) -- async example (([`e1a9809`][]) -- fix for async parameterized readFile (([`2d4e80e`][]) -- drop 0.4, add 0.8 in travis (([`8a1ba59`][]) - -[`7033bbb`]: https://github.com/browserify/resolve/commit/7033bbb6e21ecfd13476ca8de247580aa2f97e7c -[`ba7038a`]: https://github.com/browserify/resolve/commit/ba7038a56d78212329b64287dfaf895b1a85cf2c -[`34a958e`]: https://github.com/browserify/resolve/commit/34a958e84b7fc4cdccd7b71f9a116027a6f3a123 -[`e427ca8`]: https://github.com/browserify/resolve/commit/e427ca85b7e3b1d01b05f94783b76516b8594a03 -[`d1191a9`]: https://github.com/browserify/resolve/commit/d1191a9958581a040f4f18b3aecdd50714bffc7a -[`f4b02e3`]: https://github.com/browserify/resolve/commit/f4b02e3bbf0c3b09f83cfb2b22b12b0f55afdf92 -[`a800954`]: https://github.com/browserify/resolve/commit/a80095482ef2d16425e6e12759c9735d89f7f50b -[`3534992`]: https://github.com/browserify/resolve/commit/3534992946294811d20aaf9857ee453078cbe828 -[`c9111d2`]: https://github.com/browserify/resolve/commit/c9111d293ab35fb611d9c65ea2f88ae8cf853f8e -[`71d6159`]: https://github.com/browserify/resolve/commit/71d615968c8e34ac6f22e1c86d204e091f00b9bc -[`e1a9809`]: https://github.com/browserify/resolve/commit/e1a98093094cded0a251ef36f4f2eb0adb280acb -[`2d4e80e`]: https://github.com/browserify/resolve/commit/2d4e80e139d01176bf70132bc80caed946cd6682 -[`8a1ba59`]: https://github.com/browserify/resolve/commit/8a1ba593ab924995a45099e164cc7b769c44e9a0 - -#### [v0.2.8](https://github.com/browserify/resolve/compare/v0.2.7...v0.2.8) - 18 February 2013 - -- add the domain module to .core (([`2979cde`][]) - -[`2979cde`]: https://github.com/browserify/resolve/commit/2979cdea615fe724de62d88cb221c1d1824d0f10 - -#### [v0.2.7](https://github.com/browserify/resolve/compare/v0.2.6...v0.2.7) - 18 February 2013 - -- 0.2.7 (([`c6ec6b7`][]) -- Merge branch 'node-resolve' of git://github.com/rektide/node-module-resolver into rektide-node-resolve (([`66571ba`][]) - -[`c6ec6b7`]: https://github.com/browserify/resolve/commit/c6ec6b76b24440504f49923cceecc27efacf75c8 -[`66571ba`]: https://github.com/browserify/resolve/commit/66571ba721391b66c386b954fd25d8efcedc3257 - -#### [v0.2.6](https://github.com/browserify/resolve/compare/v0.2.5...v0.2.6) - 18 February 2013 - -- 0.2.6 (([`f0051f6`][]) -- Merge branch 'master' of git://github.com/dodo/node-resolve into dodo-master (([`5d35fc5`][]) - -[`f0051f6`]: https://github.com/browserify/resolve/commit/f0051f65a81be3ff3498d6ccfa9cd63277266a8b -[`5d35fc5`]: https://github.com/browserify/resolve/commit/5d35fc50de9b6020c7a95a52b3d9356ba93b4a3e - -#### [v0.2.5](https://github.com/browserify/resolve/compare/v0.2.4...v0.2.5) - 18 February 2013 - -- 0.2.5 (([`3046b21`][]) -- Merge branch 'master' of git://github.com/dominictarr/node-resolve into dominictarr-master (([`aec025a`][]) - -[`3046b21`]: https://github.com/browserify/resolve/commit/3046b21be2ad8df0044c11b3d4bc41ba0fd45ff3 -[`aec025a`]: https://github.com/browserify/resolve/commit/aec025a19ed5611fb7bc561962db7ccb08877404 - -#### [v0.2.4](https://github.com/browserify/resolve/compare/v0.2.3...v0.2.4) - 18 February 2013 - -- resolve '../baz' correct (([`46fe923`][]) -- 0.2.4 (([`89e0569`][]) - -[`46fe923`]: https://github.com/browserify/resolve/commit/46fe923c20feeceac783e67cfa84d07222bc17fa -[`89e0569`]: https://github.com/browserify/resolve/commit/89e056970e8afe0a546921722876f74959b423c7 - -#### [v0.2.3](https://github.com/browserify/resolve/compare/v0.2.2...v0.2.3) - 12 August 2012 - -- license file (([`a964396`][]) -- existsSync (([`d1c1012`][]) -- pass dir to packageFilter (([`3bea5b6`][]) -- pkg.main may be a directory (([`3521c2f`][]) -- Prioritize parent tree in nodeModulesPathsSync before fallback options.paths/ NODE_PATH equivalent, in accordance with http://nodejs.org/docs/latest/api/all.html#all_loading_from_the_global_folders (([`27fa227`][]) - -[`a964396`]: https://github.com/browserify/resolve/commit/a9643965438eb4fcb068a5876b317f516199879a -[`d1c1012`]: https://github.com/browserify/resolve/commit/d1c1012f14c50212ea49a9a1255c902f5ad6cb37 -[`3bea5b6`]: https://github.com/browserify/resolve/commit/3bea5b6475b39e7f4974d29c6fa1e8eb8b1589af -[`3521c2f`]: https://github.com/browserify/resolve/commit/3521c2f2b93234e5a50dc47598554a76589d6d8c -[`27fa227`]: https://github.com/browserify/resolve/commit/27fa22707e87738ddde61cb4ad90508cfe0d7755 - -#### [v0.2.2](https://github.com/browserify/resolve/compare/v0.2.1...v0.2.2) - 30 April 2012 - -- fix indentation (([`98fc4a5`][]) -- Updated to work with windows, tested on Windows 7 64-bit and OS X 10.6 (([`a6646cc`][]) -- bump for windows fixes (([`d67d595`][]) - -[`98fc4a5`]: https://github.com/browserify/resolve/commit/98fc4a50b68456d497a862b9c4e4e0a79570c770 -[`a6646cc`]: https://github.com/browserify/resolve/commit/a6646ccceb1a6c411d5b9dfdc97106c80d8a0a09 -[`d67d595`]: https://github.com/browserify/resolve/commit/d67d5959e1be31eb67d5b62e7050bff318572373 - -#### [v0.2.1](https://github.com/browserify/resolve/compare/v0.2.0...v0.2.1) - 12 April 2012 - -- now using tap (([`b625169`][]) -- using travis (([`30cc7b3`][]) -- split on multiple slashes (([`ebeafab`][]) -- fix splitting of paths to support windows as well (([`5e7e24b`][]) - -[`b625169`]: https://github.com/browserify/resolve/commit/b62516922eaaafe533806cd385017109ea057baa -[`30cc7b3`]: https://github.com/browserify/resolve/commit/30cc7b3af9299a0e08f34c314015a1395ef16ea3 -[`ebeafab`]: https://github.com/browserify/resolve/commit/ebeafab4a43c6ac4df7a8a7ee578629f81b7b9e7 -[`5e7e24b`]: https://github.com/browserify/resolve/commit/5e7e24bf11c48f14385886d7dd3661f786cc109b - -#### [v0.2.0](https://github.com/browserify/resolve/compare/v0.1.3...v0.2.0) - 25 February 2012 - -- updated the core list for 0.6.11 (([`12d4c16`][]) - -[`12d4c16`]: https://github.com/browserify/resolve/commit/12d4c164ef99bd35c13b0f566feaa70bc3560082 - -#### [v0.1.3](https://github.com/browserify/resolve/compare/v0.1.2...v0.1.3) - 14 December 2011 - -- bump (([`2dffd07`][]) -- Added readline to core modules (([`4ab55a2`][]) - -[`2dffd07`]: https://github.com/browserify/resolve/commit/2dffd072ce65b4aae4974e934ca5b58ec741f598 -[`4ab55a2`]: https://github.com/browserify/resolve/commit/4ab55a2d4eb95be2399fe94fd5d33879271b5a9f - -#### [v0.1.2](https://github.com/browserify/resolve/compare/v0.1.1...v0.1.2) - 31 October 2011 - -- Add opts.paths to list of node_modules directories (([`7bb6ef4`][]) -- bump (([`5e3fcc6`][]) - -[`7bb6ef4`]: https://github.com/browserify/resolve/commit/7bb6ef4a1805523169f30b6ea38776796a714c3a -[`5e3fcc6`]: https://github.com/browserify/resolve/commit/5e3fcc63cfec322779be5435820d3236e6d13dba - -#### [v0.1.1](https://github.com/browserify/resolve/compare/v0.1.0...v0.1.1) - 18 October 2011 - -- bump for windows paths (([`3fb86d0`][]) -- Added support for Windows-style paths. (([`638951e`][]) - -[`3fb86d0`]: https://github.com/browserify/resolve/commit/3fb86d07c77b09a7d6fa6d2a8b89432a070a6aa0 -[`638951e`]: https://github.com/browserify/resolve/commit/638951ed92fa4435d9752df30c3bcb9eb49573cd - -#### [v0.1.0](https://github.com/browserify/resolve/compare/v0.0.4...v0.1.0) - 3 October 2011 - -- passing mock test (([`030f0d3`][]) -- passing mock test with package.json (([`d2b19c8`][]) -- isFile and readFileSync as parameters (([`d30c22d`][]) -- doc updates and a minor bump for custom isFile and readFileSync params (([`b0af4c3`][]) - -[`030f0d3`]: https://github.com/browserify/resolve/commit/030f0d391e02558574bc673077fb1b4057f8358d -[`d2b19c8`]: https://github.com/browserify/resolve/commit/d2b19c893b7f8c63154c5b5ff2c419ffdc8baa0c -[`d30c22d`]: https://github.com/browserify/resolve/commit/d30c22d1e13b000016f2592d6d6f3489a2d29988 -[`b0af4c3`]: https://github.com/browserify/resolve/commit/b0af4c3ac1a51acf9995cb4e078bf5619f257952 - -#### [v0.0.4](https://github.com/browserify/resolve/compare/v0.0.3...v0.0.4) - 21 June 2011 - -- bump for packageFilter and a note in the docs (([`9fbb632`][]) -- new packageFilter option (([`c92c883`][]) - -[`9fbb632`]: https://github.com/browserify/resolve/commit/9fbb632a5c0c38641ed7c10399306a56651e0789 -[`c92c883`]: https://github.com/browserify/resolve/commit/c92c883bed3e50dd8ed9a2e1d4b9fefc9f3ced64 - -#### [v0.0.3](https://github.com/browserify/resolve/compare/v0.0.2...v0.0.3) - 20 June 2011 - -- custom extensions now work (([`502b6e9`][]) -- failing test for extensions (([`ce56f56`][]) -- bump and a note in the docs for extensions (([`2ad8287`][]) -- passing normalize test (([`055c7ce`][]) - -[`502b6e9`]: https://github.com/browserify/resolve/commit/502b6e9c8b9f258e5c943954467016e9c048fa0f -[`ce56f56`]: https://github.com/browserify/resolve/commit/ce56f56b4e1a5c1df495a7bf061fb0242103b4d8 -[`2ad8287`]: https://github.com/browserify/resolve/commit/2ad8287bc8b34929c2074a739410d08955ccdea7 -[`055c7ce`]: https://github.com/browserify/resolve/commit/055c7cea391ff0ce9cd8c585e8244f553b62f6e7 - -#### [v0.0.2](https://github.com/browserify/resolve/compare/v0.0.1...v0.0.2) - 19 June 2011 - -- failing biz test for going up and down the path directory (([`cf4f5a5`][]) -- don't stop on the first node_modules since that's going away in node anyhow, all tests pass again (([`9049abf`][]) - -[`cf4f5a5`]: https://github.com/browserify/resolve/commit/cf4f5a58d092124c517c55dd180559f5a444eb06 -[`9049abf`]: https://github.com/browserify/resolve/commit/9049abfb60cac49bb547b8ca02cc2617d406ff1a - -#### v0.0.1 - -- implementation seems to work but no tests yet (([`5218f01`][]) -- a package.json all up in this (([`4084043`][]) -- new resolve.{core,isCore} with tests and documentation, bump to 0.0.1 (([`a9ef081`][]) -- failing foo test (([`463b108`][]) -- readme before any code (([`7885443`][]) -- opts.path => opts.basedir, more descriptive I think (([`78010b1`][]) -- failing bar test (([`c40c5c1`][]) -- passing baz test to check package.json resolution (([`410635e`][]) -- a path.resolve() fixed the relative loads (([`dfef4b6`][]) -- passing the bar test after taking out the dirname() around y (([`eda2247`][]) -- trailing comma in the package.json (([`2032753`][]) - -[`5218f01`]: https://github.com/browserify/resolve/commit/5218f0106e78edce4cfb905d0ea4492ed3fd38af -[`4084043`]: https://github.com/browserify/resolve/commit/40840435a621120db78126c1792df7fdd0570703 -[`a9ef081`]: https://github.com/browserify/resolve/commit/a9ef081a4897e9882bf6bc6b31457c53b8d0fc0d -[`463b108`]: https://github.com/browserify/resolve/commit/463b108dd6e750196cba150348bd68397522c908 -[`7885443`]: https://github.com/browserify/resolve/commit/7885443d8a3dba7223b1bfca2d62cafc08a46436 -[`78010b1`]: https://github.com/browserify/resolve/commit/78010b1f91251447d1e74c6ac9cd0baebc6ddf60 -[`c40c5c1`]: https://github.com/browserify/resolve/commit/c40c5c14038acbe8bec91cf979d12382c2e6ddfe -[`410635e`]: https://github.com/browserify/resolve/commit/410635ef6226c030f74c4475e73724a01a102896 -[`dfef4b6`]: https://github.com/browserify/resolve/commit/dfef4b6185d02259c119a10c8a938e1ab148b140 -[`eda2247`]: https://github.com/browserify/resolve/commit/eda22479bd47c5d0b2e8a88851d9ffabbea2329c -[`2032753`]: https://github.com/browserify/resolve/commit/20327532053284676a269ec2441a87f16456fbf3 diff --git a/build/node_modules/resolve/LICENSE b/build/node_modules/resolve/LICENSE index ee27ba4b..ff4fce28 100644 --- a/build/node_modules/resolve/LICENSE +++ b/build/node_modules/resolve/LICENSE @@ -1,18 +1,21 @@ -This software is released under the MIT license: +MIT License -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +Copyright (c) 2012 James Halliday + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/build/node_modules/resolve/appveyor.yml b/build/node_modules/resolve/appveyor.yml index cc73cc18..729e8ea0 100644 --- a/build/node_modules/resolve/appveyor.yml +++ b/build/node_modules/resolve/appveyor.yml @@ -4,6 +4,9 @@ build: off environment: matrix: + - nodejs_version: "12" + - nodejs_version: "11" + - nodejs_version: "10" - nodejs_version: "9" - nodejs_version: "8" - nodejs_version: "7" @@ -29,6 +32,9 @@ platform: # Install scripts. (runs after repo cloning) install: + # Fix symlinks in working copy (see https://github.com/appveyor/ci/issues/650#issuecomment-186592582) / https://github.com/charleskorn/batect/commit/d08986802ec43086902958c4ee7e57ff3e71dbef + - git config core.symlinks true + - git reset --hard # Get the latest stable version of Node.js or io.js - ps: Install-Product node $env:nodejs_version $env:platform - IF %nodejs_version% EQU 0.6 npm config set strict-ssl false && npm -g install npm@1.3 diff --git a/build/node_modules/resolve/changelog.hbs b/build/node_modules/resolve/changelog.hbs deleted file mode 100644 index addd7816..00000000 --- a/build/node_modules/resolve/changelog.hbs +++ /dev/null @@ -1,36 +0,0 @@ -### Changelog - -All notable changes to this project will be documented in this file. Dates are displayed in UTC. -{{#each releases}} - - {{#if href}} - ###{{#unless major}}#{{/unless}} [{{title}}]({{href}}){{#if tag}} - {{niceDate}}{{/if}} - {{else}} - #### {{title}} - {{/if}} - - {{#if summary}} - Summary: - {{summary}} - {{/if}} - - {{#each fixes}} - - {{{commit.subject}}} ({{#each fixes}}{{#if href}}[`#{{id}}`][]{{/if}}{{/each}}) - {{/each}} - {{#each merges}} - - {{{message}}}{{#if href}} ([`#{{id}}`][]){{/if}} - {{/each}} - {{#each commits}} - - {{#if breaking}}**Breaking change:** {{/if}}{{{subject}}}{{#if href}} (([`{{shorthash}}`][]){{/if}} - {{/each}} - - {{#each fixes}} -{{#if href}}[`#{{id}}`]: {{href}}{{/if}} - {{/each}} - {{#each merges}} -{{#if href}}[`#{{id}}`]: {{href}}{{/if}} - {{/each}} - {{#each commits}} -{{#if href}}[`{{shorthash}}`]: {{href}}{{/if}} - {{/each}} -{{/each}} diff --git a/build/node_modules/resolve/lib/async.js b/build/node_modules/resolve/lib/async.js index 8ab32a73..004b2798 100644 --- a/build/node_modules/resolve/lib/async.js +++ b/build/node_modules/resolve/lib/async.js @@ -25,6 +25,17 @@ var defaultIsDir = function isDirectory(dir, cb) { }); }; +var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts, cb) { + if (opts && opts.preserveSymlinks === false) { + fs.realpath(x, function (realPathErr, realPath) { + if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr); + else cb(null, realPathErr ? x : realPath); + }); + } else { + cb(null, x); + } +}; + module.exports = function resolve(x, options, callback) { var cb = callback; var opts = options; @@ -54,14 +65,14 @@ module.exports = function resolve(x, options, callback) { // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory var absoluteStart = path.resolve(basedir); - if (opts.preserveSymlinks === false) { - fs.realpath(absoluteStart, function (realPathErr, realStart) { - if (realPathErr && realPathErr.code !== 'ENOENT') cb(err); - else init(realPathErr ? absoluteStart : realStart); - }); - } else { - init(absoluteStart); - } + maybeUnwrapSymlink( + absoluteStart, + opts, + function (err, realStart) { + if (err) cb(err); + else init(realStart); + } + ); var res; function init(basedir) { @@ -74,8 +85,15 @@ module.exports = function resolve(x, options, callback) { } else loadNodeModules(x, basedir, function (err, n, pkg) { if (err) cb(err); else if (core[x]) return cb(null, x); - else if (n) cb(null, n, pkg); - else { + else if (n) { + return maybeUnwrapSymlink(n, opts, function (err, realN) { + if (err) { + cb(err); + } else { + cb(null, realN, pkg); + } + }); + } else { var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); moduleError.code = 'MODULE_NOT_FOUND'; cb(moduleError); @@ -88,8 +106,15 @@ module.exports = function resolve(x, options, callback) { else if (m) cb(null, m, pkg); else loadAsDirectory(res, function (err, d, pkg) { if (err) cb(err); - else if (d) cb(null, d, pkg); - else { + else if (d) { + maybeUnwrapSymlink(d, opts, function (err, realD) { + if (err) { + cb(err); + } else { + cb(null, realD, pkg); + } + }); + } else { var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); moduleError.code = 'MODULE_NOT_FOUND'; cb(moduleError); diff --git a/build/node_modules/resolve/lib/core.json b/build/node_modules/resolve/lib/core.json index f8b70b98..12a6ac7e 100644 --- a/build/node_modules/resolve/lib/core.json +++ b/build/node_modules/resolve/lib/core.json @@ -8,6 +8,7 @@ "console": true, "constants": true, "crypto": true, + "_debug_agent": ">= 1 && < 8", "_debugger": "< 8", "dgram": true, "dns": true, diff --git a/build/node_modules/resolve/lib/sync.js b/build/node_modules/resolve/lib/sync.js index 7c315861..e8d83de5 100644 --- a/build/node_modules/resolve/lib/sync.js +++ b/build/node_modules/resolve/lib/sync.js @@ -25,6 +25,19 @@ var defaultIsDir = function isDirectory(dir) { return stat.isDirectory(); }; +var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts) { + if (opts && opts.preserveSymlinks === false) { + try { + return fs.realpathSync(x); + } catch (realPathErr) { + if (realPathErr.code !== 'ENOENT') { + throw realPathErr; + } + } + } + return x; +}; + module.exports = function (x, options) { if (typeof x !== 'string') { throw new TypeError('Path must be a string.'); @@ -42,28 +55,18 @@ module.exports = function (x, options) { opts.paths = opts.paths || []; // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory - var absoluteStart = path.resolve(basedir); - - if (opts.preserveSymlinks === false) { - try { - absoluteStart = fs.realpathSync(absoluteStart); - } catch (realPathErr) { - if (realPathErr.code !== 'ENOENT') { - throw realPathErr; - } - } - } + var absoluteStart = maybeUnwrapSymlink(path.resolve(basedir), opts); if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { var res = path.resolve(absoluteStart, x); if (x === '..' || x.slice(-1) === '/') res += '/'; var m = loadAsFileSync(res) || loadAsDirectorySync(res); - if (m) return m; + if (m) return maybeUnwrapSymlink(m, opts); } else if (core[x]) { return x; } else { var n = loadNodeModulesSync(x, absoluteStart); - if (n) return n; + if (n) return maybeUnwrapSymlink(n, opts); } if (core[x]) return x; diff --git a/build/node_modules/resolve/package.json b/build/node_modules/resolve/package.json index c2a69aa6..f9fa1fd7 100644 --- a/build/node_modules/resolve/package.json +++ b/build/node_modules/resolve/package.json @@ -7,20 +7,20 @@ ], "_from": "resolve@>=1.10.0 <2.0.0", "_hasShrinkwrap": false, - "_id": "resolve@1.11.1", + "_id": "resolve@1.12.0", "_inCache": true, "_installable": true, "_location": "/resolve", - "_nodeVersion": "12.3.1", + "_nodeVersion": "12.7.0", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", - "tmp": "tmp/resolve_1.11.1_1559588786109_0.9881098789520049" + "tmp": "tmp/resolve_1.12.0_1564641416976_0.7240442719092743" }, "_npmUser": { "email": "ljharb@gmail.com", "name": "ljharb" }, - "_npmVersion": "6.9.0", + "_npmVersion": "6.10.0", "_phantomChildren": {}, "_requested": { "name": "resolve", @@ -34,8 +34,8 @@ "/rollup-plugin-commonjs", "/rollup-plugin-node-resolve" ], - "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "_shasum": "ea10d8110376982fef578df8fc30b9ac30a07a3e", + "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "_shasum": "3fc644a35c84a48554609ff26ec52b66fa577df6", "_shrinkwrap": null, "_spec": "resolve@^1.10.0", "_where": "/var/build/workspace/build-platform-sdks/platform-client-sdk-common/output/purecloudjavascript-guest/build/node_modules/rollup-plugin-commonjs", @@ -57,18 +57,18 @@ "object-keys": "^1.1.1", "safe-publish-latest": "^1.1.2", "tap": "0.4.13", - "tape": "^4.10.1" + "tape": "^4.11.0" }, "directories": {}, "dist": { - "fileCount": 88, - "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9W+yCRA9TVsSAnZWagAAAnoP/3ljhkyB1pqgkVpT+3z8\nDjM5zmU/Iy3IXo28jJGas8WSL5cVrlIsdAw+uWxbj3LzBhz3v8VwAPLHcMfo\nuaW6Q6hRdKRhhzRkFl1Ip2nG9x5JQQDBOVKUF4RJ9CRh/DxxTjPQYsexO0jm\nxTJveQCHUG7ZtPq69hR/gTXQsUWTxxwOgaODCnoUKHGa5hKXoeVQgqETxM0r\nPzr0qbMe32zNxpjbhzlmDN+dCWaWD9th+IpdjQHevRZK+K7MpLO7KyXegRoW\n3pqdYtxbJZaDSk8m7EmYzzNecdcBmATsJXRqjip2fQvpd5tOiUAN39F3D7I5\nOaXipbR6x8oLu0yYQzQmtEeAH+l58Wig3JF0j00/9PTkBDEWpASiJ9jWMqbC\n+eESL7W9GhCjGCmG3sfdyPCJRKdOalLwrks8vNuuHh0ER594uqxmm5aJONeo\ndHa0leuuFd777oU1mUptcRY8T5U2oSCHvezeIbDAJ4L3DBCziPTB6t09Devs\nmo2GHQTspSHbfeGQBi2Awo1ZaDRisvOpL6ZQYB7xAx1EfdmsNjUWu3fGR99l\nuR8KELYRRQk16ZZxmkxoJ4Am5ocaOh18q/oBxo1p02mUUy7mW3kH86KC8uNy\n+V8Yr6PXW/81JUz0uV3bKrHqC7UiL6dByOGzLRNDzfBkblIgJere8mg2VAgY\nVSBr\r\n=Nz4z\r\n-----END PGP SIGNATURE-----\r\n", - "shasum": "ea10d8110376982fef578df8fc30b9ac30a07a3e", - "tarball": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "unpackedSize": 141483 + "fileCount": 90, + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQoiJCRA9TVsSAnZWagAA0W0P/RI6csd4N1j8nVSjjZ0r\n2gWQ2cnMv6qJBHoTb3gzfb+XIDwcFeQ9RStQfnmJuL91eYXJVxT36DC8iwdY\nH26bWA0apNvVMv8q+Ni73n2kijOMLatov+wXhyIE3wmIxY/BruM8k43CL6IP\nbBfnrkWXnq+/8yZS35H1elflee9WBnDgnmK0UsULI2ClbnreAHISbZ6c8Qpt\nSsaqIX2MJUAAFm0X4GH32wRbKdkZGMDYXYJCuynbVcRm/s0cbLL+CrhkgfXX\nGxQfjSaUGzwEoyjnfXwH6d14FvI6vo5NYJdV1JOEf8LOV4r+RLsGRe3A3Xzm\nVfldkUr2CSdBzPW+7tuaGwQ8/kN9AydfCuCg8ZQqeS1NTaGuG261XJqsDfqj\nsQ4fwqcm5ORBODVTTBRDyBRm6WSy/g+CvyQxE/AVfQeh260nkFULaUy3RMGX\nV91OxnBz950T7zJd4nxfVdqHPOlIpqE8UrebhGfJM2hS9QGgGx7F5NQAjF6l\nPhmkr8rGJvauJ2vXKs/R7YiTddAFjGtaectgtEQladvYUTlwoANeAfJMkVX7\nNe2dqL6+bcCIQ3GtAxeQ8vO53U4EQZiANm1LRE9mW4rcedrVQg44w287fkoN\ncPdGkLUALJO9iQsbRFZ58Kl88jUiRnLwnpLWSn2FXJvrH/j+eH7tNOaGjRm1\nZSoy\r\n=+qCR\r\n-----END PGP SIGNATURE-----\r\n", + "shasum": "3fc644a35c84a48554609ff26ec52b66fa577df6", + "tarball": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "unpackedSize": 99502 }, - "gitHead": "b234492f27a2437b1b281edd432b4d97163db95c", + "gitHead": "2c61679ed9d10524ba1bcec46cf5488755c39cf8", "homepage": "https://github.com/browserify/resolve#readme", "keywords": [ "resolve", @@ -256,9 +256,10 @@ "posttest": "npm run test:multirepo", "prepublish": "safe-publish-latest", "pretest": "npm run lint", + "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", "test": "npm run --silent tests-only", "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test", "tests-only": "tape test/*.js" }, - "version": "1.11.1" + "version": "1.12.0" } diff --git a/build/node_modules/resolve/reaf b/build/node_modules/resolve/reaf deleted file mode 100644 index e69de29b..00000000 diff --git a/build/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js b/build/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js new file mode 100644 index 00000000..9b4846a8 --- /dev/null +++ b/build/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js @@ -0,0 +1,26 @@ +var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); +var b; +var c; + +var test = function test() { + console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); + console.log(b, ': preserveSymlinks true'); + console.log(c, ': preserveSymlinks false'); + + if (a !== b && a !== c) { + throw 'async: no match'; + } + console.log('async: success! a matched either b or c\n'); +}; + +require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) { + if (err) { throw err; } + b = result.replace(process.cwd(), '$CWD'); + if (b && c) { test(); } +}); +require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) { + if (err) { throw err; } + c = result.replace(process.cwd(), '$CWD'); + if (b && c) { test(); } +}); + diff --git a/build/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/build/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json new file mode 100644 index 00000000..acfe9e95 --- /dev/null +++ b/build/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json @@ -0,0 +1,15 @@ +{ + "name": "mylib", + "version": "0.0.0", + "description": "", + "private": true, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "buffer": "*" + } +} diff --git a/build/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js b/build/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js new file mode 100644 index 00000000..3283efc2 --- /dev/null +++ b/build/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js @@ -0,0 +1,12 @@ +var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); +var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD'); +var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD'); + +console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); +console.log(b, ': preserveSymlinks true'); +console.log(c, ': preserveSymlinks false'); + +if (a !== b && a !== c) { + throw 'sync: no match'; +} +console.log('sync: success! a matched either b or c\n'); diff --git a/build/node_modules/resolve/test/resolver/symlinked/package/bar.js b/build/node_modules/resolve/test/resolver/symlinked/package/bar.js new file mode 100644 index 00000000..cb1c2c01 --- /dev/null +++ b/build/node_modules/resolve/test/resolver/symlinked/package/bar.js @@ -0,0 +1 @@ +module.exports = 'bar'; diff --git a/build/node_modules/resolve/test/resolver/symlinked/package/package.json b/build/node_modules/resolve/test/resolver/symlinked/package/package.json new file mode 100644 index 00000000..8e1b5859 --- /dev/null +++ b/build/node_modules/resolve/test/resolver/symlinked/package/package.json @@ -0,0 +1,3 @@ +{ + "main": "bar.js" +} \ No newline at end of file diff --git a/build/node_modules/resolve/test/symlinks.js b/build/node_modules/resolve/test/symlinks.js index ea95a1e1..9b5a2548 100644 --- a/build/node_modules/resolve/test/symlinks.js +++ b/build/node_modules/resolve/test/symlinks.js @@ -4,15 +4,25 @@ var test = require('tape'); var resolve = require('../'); var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink'); +var packageDir = path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'package'); try { fs.unlinkSync(symlinkDir); } catch (err) {} +try { + fs.unlinkSync(packageDir); +} catch (err) {} try { fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir'); } catch (err) { // if fails then it is probably on Windows and lets try to create a junction fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction'); } +try { + fs.symlinkSync('../../package', packageDir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, '..', '..', 'package') + '\\', packageDir, 'junction'); +} test('symlink', function (t) { t.plan(2); @@ -54,3 +64,21 @@ test('sync symlink when preserveSymlinks = true', function (t) { }, /Cannot find module 'foo'/); t.end(); }); + +test('sync symlink from node_modules to other dir when preserveSymlinks = false', function (t) { + var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); + var fn = resolve.sync('package', { basedir: basedir, preserveSymlinks: false }); + + t.equal(fn, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); + t.end(); +}); + +test('async symlink from node_modules to other dir when preserveSymlinks = false', function (t) { + t.plan(2); + var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); + resolve('package', { basedir: basedir, preserveSymlinks: false }, function (err, result) { + t.notOk(err, 'no error'); + t.equal(result, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); + t.end(); + }); +}); diff --git a/build/package.json b/build/package.json index 0d4e8795..c8d77597 100644 --- a/build/package.json +++ b/build/package.json @@ -1,6 +1,6 @@ { "name": "purecloud-guest-chat-client", - "version": "5.0.2", + "version": "5.1.0", "description": "A JavaScript library to interface with the PureCloud Platform API", "license": "MIT", "main": "dist/node/purecloud-guest-chat-client.js", diff --git a/build/src/purecloud-guest-chat-client/ApiClient.js b/build/src/purecloud-guest-chat-client/ApiClient.js index 510158be..6f5cb20a 100644 --- a/build/src/purecloud-guest-chat-client/ApiClient.js +++ b/build/src/purecloud-guest-chat-client/ApiClient.js @@ -2,7 +2,7 @@ import superagent from 'superagent'; /** * @module purecloud-guest-chat-client/ApiClient - * @version 5.0.2 + * @version 5.1.0 */ class ApiClient { /** @@ -529,7 +529,7 @@ class ApiClient { // set header parameters request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - //request.set({ 'purecloud-sdk': '5.0.2' }); + //request.set({ 'purecloud-sdk': '5.1.0' }); // set request timeout request.timeout(this.timeout); diff --git a/build/src/purecloud-guest-chat-client/api/WebChatApi.js b/build/src/purecloud-guest-chat-client/api/WebChatApi.js index b77abf41..221bee59 100644 --- a/build/src/purecloud-guest-chat-client/api/WebChatApi.js +++ b/build/src/purecloud-guest-chat-client/api/WebChatApi.js @@ -5,7 +5,7 @@ class WebChatApi { /** * WebChat service. * @module purecloud-guest-chat-client/api/WebChatApi - * @version 5.0.2 + * @version 5.1.0 */ /** diff --git a/build/src/purecloud-guest-chat-client/index.js b/build/src/purecloud-guest-chat-client/index.js index 002c48e8..c4a787f3 100644 --- a/build/src/purecloud-guest-chat-client/index.js +++ b/build/src/purecloud-guest-chat-client/index.js @@ -32,7 +32,7 @@ import WebChatApi from './api/WebChatApi.js'; * *

* @module purecloud-guest-chat-client/index - * @version 5.0.2 + * @version 5.1.0 */ class platformClient { constructor() { diff --git a/releaseNotes.md b/releaseNotes.md index ae5b1daf..5f25b48f 100644 --- a/releaseNotes.md +++ b/releaseNotes.md @@ -1,14 +1,54 @@ -Platform API version: 3320 +Platform API version: 3408 -# SDK Changes +# Major Changes (0 changes) -* Removing preview notice from docs -# Major Changes (0 changes) +# Minor Changes (11 changes) + +**GET /api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}** (1 change) + +* Response 413 was added + +**PATCH /api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}** (1 change) + +* Response 413 was added + +**GET /api/v2/webchat/guest/conversations/{conversationId}/members** (1 change) + +* Response 413 was added + +**GET /api/v2/webchat/guest/conversations/{conversationId}/messages** (1 change) + +* Response 413 was added + +**POST /api/v2/webchat/guest/conversations** (1 change) + +* Response 413 was added + +**GET /api/v2/webchat/guest/conversations/{conversationId}/mediarequests** (1 change) + +* Response 413 was added + +**POST /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/typing** (1 change) + +* Response 413 was added + +**GET /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}** (1 change) + +* Response 413 was added + +**DELETE /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}** (1 change) + +* Response 413 was added + +**POST /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/messages** (1 change) + +* Response 413 was added +**GET /api/v2/webchat/guest/conversations/{conversationId}/messages/{messageId}** (1 change) -# Minor Changes (0 changes) +* Response 413 was added # Point Changes (0 changes) diff --git a/swagger.json b/swagger.json index 2d1ed1d4..da9c64e2 100644 --- a/swagger.json +++ b/swagger.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"description":"With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.","version":"v2","title":"PureCloud Platform API","termsOfService":"https://help.mypurecloud.com/articles/terms-and-conditions/","contact":{"name":"PureCloud Developer Evangelists","url":"https://developer.mypurecloud.com","email":"DeveloperEvangelists@genesys.com"},"license":{"name":"UNLICENSED","url":"https://help.mypurecloud.com/articles/terms-and-conditions/"}},"host":"api.mypurecloud.com","tags":[{"name":"Alerting","description":"Rules and alerts","externalDocs":{"description":"Alerting Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/alerting/index.html"}},{"name":"Analytics","description":"Analytics querying and reporting.","externalDocs":{"description":"Analytics Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/analytics/index.html"}},{"name":"Architect","description":"Flows, Prompts, IVR schedules, Dependency Tracking","externalDocs":{"description":"Architect Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/architect/index.html"}},{"name":"Audit","description":"","externalDocs":{"description":"Audit Documentation","url":""}},{"name":"Authorization","description":"Roles and permissions","externalDocs":{"description":"Authorization Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/authorization/index.html"}},{"name":"Badges","description":"Badges stats"},{"name":"Billing","description":"","externalDocs":{"description":"billing Documentation","url":"https://developer.mypurecloud.com/billing"}},{"name":"Bridge","description":""},{"name":"Callbacks","description":""},{"name":"Calls","description":""},{"name":"Carrier Services","description":""},{"name":"Chats","description":""},{"name":"Cobrowse","description":""},{"name":"Compliance","description":""},{"name":"Configuration","description":"","externalDocs":{"description":"Configuration Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/configuration/index.html"}},{"name":"Content Management","description":"","externalDocs":{"description":"Content Management Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/contentmanagement/index.html"}},{"name":"Conversations","description":"","externalDocs":{"description":"Conversations Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/conversations/index.html"}},{"name":"Data Extensions","description":"Data extensions","externalDocs":{"description":"Data Extensions","url":"https://developer.mypurecloud.com"}},{"name":"Dialog Engine","description":"Dialog Engine","externalDocs":{"description":"Dialog Engine documentation","url":"https://developer.mypurecloud.com/api/rest/v2/dialog/index.html"}},{"name":"Directory Proxy","description":"Search, Suggest, and people"},{"name":"Docs","description":"Swagger documentation definitions","externalDocs":{"description":"docs","url":"https://developer.mypurecloud.com"}},{"name":"Downloads","description":"Download file","externalDocs":{"description":"Downloads Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/downloads/index.html"}},{"name":"Emails","description":""},{"name":"External Contacts","description":"External Organizations, contacts, notes and relationships","externalDocs":{"description":"External Contacts","url":"https://developer.mypurecloud.com/api/rest/v2/externalcontacts/index.html"}},{"name":"Fax","description":"","externalDocs":{"description":"Fax Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/fax/index.html"}},{"name":"Flows","description":"IVR Flows","externalDocs":{"description":"Flow Aggregates Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/analytics/flow_aggregate.html"}},{"name":"General Data Protection Regulation","description":"Working with General Data Protection Regulation (GDPR) requests"},{"name":"Geolocation","description":"","externalDocs":{"description":"Geolocation Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/geolocation/index.html"}},{"name":"Greetings","description":"","externalDocs":{"description":"Greetings Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/greetings/index.html"}},{"name":"Groups","description":"Groups, members","externalDocs":{"description":"Groups Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/groups/index.html"}},{"name":"Identity Provider","description":"Identity providers","externalDocs":{"description":"Identity Providers Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/identityproviders/index.html"}},{"name":"Integrations","description":"","externalDocs":{"description":"Integrations Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/integrations/index.html"}},{"name":"Journey","description":"Predictive Engagement, Customer Journey","externalDocs":{"description":"Journey documentation","url":"https://developer.mypurecloud.com/api/rest/v1/journey/index.html"}},{"name":"Languages","description":"Available languages","externalDocs":{"description":"Languages Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/languages/index.html"}},{"name":"Language Understanding","description":"Language Understanding","externalDocs":{"description":"Language Understanding documentation","url":"https://developer.mypurecloud.com/api/rest/v2/languageunderstanding/index.html"}},{"name":"Licensing","description":""},{"name":"License","description":"Per-user platform license assignments"},{"name":"Locations","description":"Physical locations","externalDocs":{"description":"Locations Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/locations/index.html"}},{"name":"Marketplace","description":"Marketplace listing management"},{"name":"Meeting","description":"","externalDocs":{"description":"Meeting Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/meetings/index.html"}},{"name":"Messaging","description":"Messaging","externalDocs":{"description":"Messaging Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/messaging/index.html"}},{"name":"Mobile Devices","description":"Devices","externalDocs":{"description":"Devices Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/devices/index.html"}},{"name":"Notifications","description":"Channels, subscriptions, topics","externalDocs":{"description":"Notifications Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/notifications/index.html"}},{"name":"OAuth","description":"OAuth clients, providers","externalDocs":{"description":"OAuth Documentation","url":""}},{"name":"Objects","description":"Access-controlled objects in the platform","externalDocs":{"description":"authorization docs","url":"https://developer.mypurecloud.com/authorization"}},{"name":"Organization","description":"Organization"},{"name":"Organization Authorization","description":"Organization Authorization"},{"name":"Outbound","description":"","externalDocs":{"description":"Outbound Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/outbound/index.html"}},{"name":"Presence","description":"User and organization presences","externalDocs":{"description":"Presence Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/presence/index.html"}},{"name":"Process Automation","description":"Work items, flows"},{"name":"Quality","description":"Evaluations, calibrations","externalDocs":{"description":"Quality Management Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/quality/index.html"}},{"name":"Recording","description":"Recordings, policies, annotations, orphans","externalDocs":{"description":"Recording Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/recording/index.html"}},{"name":"Response Management","description":"Responses, library, query","externalDocs":{"description":"Response Management Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/responsemanagement/index.html"}},{"name":"Routing","description":"Queues, wrapup codes, skills, email & sms config","externalDocs":{"description":"Routing Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/routing/index.html"}},{"name":"SCIM","description":"System for Cross-domain Identity Management","externalDocs":{"description":"System for Cross-domain Identity Management: Definitions, Overview, Concepts, and Requirements","url":"https://developer.mypurecloud.com/api/rest/v2/scim/scim-overview.html"}},{"name":"Scripts","description":"Agent-facing scripts for interactions","externalDocs":{"description":"Scripts Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/scripts/index.html"}},{"name":"Search","description":"Search aggregate, users, groups","externalDocs":{"description":"Search Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/search/index.html"}},{"name":"SignedData","description":"Package data in signed JWTs"},{"name":"Socialize","description":"Gets, sets and updates entity data for the Socialize service"},{"name":"Stations","description":"Stations","externalDocs":{"description":"Stations Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/stations/index.html"}},{"name":"Suggest","description":"Search suggest user, group, locations"},{"name":"Telephony","description":"Telephony providers and configuration","externalDocs":{"description":"Telephony Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/telephonyprovidersedge/index.html"}},{"name":"Telephony Providers Edge","description":"Edge phones, trunks, lines.","externalDocs":{"description":"telephony provider edge","url":"https://developer.mypurecloud.com/api/rest/v2/telephonyprovidersedge/index.html"}},{"name":"Tokens","description":"Authentication Tokens","externalDocs":{"description":"Tokens Documentation","url":""}},{"name":"User Recordings","description":"Summary, media","externalDocs":{"description":"User Recordings Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/userrecordings/index.html"}},{"name":"Users","description":"Me, routing, roles","externalDocs":{"description":"Users Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/users/index.html"}},{"name":"Utilities","description":"","externalDocs":{"description":"Utilities Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/utilities/index.html"}},{"name":"Videos","description":""},{"name":"Virtual Reality","description":"Virtual Reality scenes and assets"},{"name":"Voicemail","description":"Mailbox, messages, policy","externalDocs":{"description":"Voicemail Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/voicemail/index.html"}},{"name":"WebChat","description":"WebChat deployments"},{"name":"Widgets","description":"Widget deployments"},{"name":"Usage","description":"View organizational level usage data"},{"name":"Workforce Management","description":"Adherence, Schedules, Forecasts, Intraday Monitoring, Time Off Requests, Configuration","externalDocs":{"description":"Workforce Management Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/workforcemanagement/index.html"}}],"schemes":["https"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/api/v2/webchat/guest/conversations":{"post":{"tags":["WebChat"],"summary":"Create an ACD chat conversation from an external customer.","description":"This endpoint will create a new ACD Chat conversation under the specified Chat Deployment.\n The conversation will begin with a guest member in it (with a role=CUSTOMER) according to the customer information that is supplied. If the guest member is authenticated, the 'memberAuthToken' field should include his JWT as generated by the 'POST /api/v2/signeddata' resource; if the guest member is anonymous (and the Deployment permits it) this field can be omitted.\n The returned data includes the IDs of the conversation created, along with a newly-create JWT token that you can supply to all future endpoints as authentication to perform operations against that conversation. After successfully creating a conversation, you should connect a websocket to the event stream named in the 'eventStreamUri' field of the response; the conversation is not routed until the event stream is attached.","operationId":"postWebchatGuestConversations","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"CreateConversationRequest","required":true,"schema":{"$ref":"#/definitions/CreateWebChatConversationRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/CreateWebChatConversationResponse"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"chat.deployment.disabled":"The web chat deployment is currently disabled.","chat.deployment.bad.auth":"The customer member authentication has failed.","chat.error.invalid.queue":"The specified queue is not valid.","bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","chat.error.createconversationrequest.routingtarget":"The routing target is not valid.","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s","chat.deployment.require.auth":"The deployment requires the customer member to be authenticated."}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"credentials.expired":"The supplied credentials are expired and cannot be used.","authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"x-purecloud-method-name":"postWebchatGuestConversations"}},"/api/v2/webchat/guest/conversations/{conversationId}/mediarequests":{"get":{"tags":["WebChat"],"summary":"Get all media requests to the guest in the conversation","description":"","operationId":"getWebchatGuestConversationMediarequests","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatGuestMediaRequestEntityList"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMediarequests"}},"/api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}":{"get":{"tags":["WebChat"],"summary":"Get a media request in the conversation","description":"","operationId":"getWebchatGuestConversationMediarequest","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"mediaRequestId","in":"path","description":"mediaRequestId","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatGuestMediaRequest"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMediarequest"},"patch":{"tags":["WebChat"],"summary":"Update a media request in the conversation, setting the state to ACCEPTED/DECLINED/ERRORED","description":"","operationId":"patchWebchatGuestConversationMediarequest","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"mediaRequestId","in":"path","description":"mediaRequestId","required":true,"type":"string"},{"in":"body","name":"body","description":"Request","required":true,"schema":{"$ref":"#/definitions/WebChatGuestMediaRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatGuestMediaRequest"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","chat.error.conversation.state":"The conversation is in a state which does not permit this action.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"patchWebchatGuestConversationMediarequest"}},"/api/v2/webchat/guest/conversations/{conversationId}/messages":{"get":{"tags":["WebChat"],"summary":"Get the messages of a chat conversation.","description":"","operationId":"getWebchatGuestConversationMessages","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"after","in":"query","description":"If available, get the messages chronologically after the id of this message","required":false,"type":"string"},{"name":"before","in":"query","description":"If available, get the messages chronologically before the id of this message","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"Sort order","required":false,"type":"string","default":"ascending","enum":["ascending","descending"]},{"name":"maxResults","in":"query","description":"Limit the returned number of messages, up to a maximum of 100","required":false,"type":"integer","default":100,"format":"int32"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatMessageEntityList"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMessages"}},"/api/v2/webchat/guest/conversations/{conversationId}/messages/{messageId}":{"get":{"tags":["WebChat"],"summary":"Get a web chat conversation message","description":"","operationId":"getWebchatGuestConversationMessage","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"messageId","in":"path","description":"messageId","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatMessage"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMessage"}},"/api/v2/webchat/guest/conversations/{conversationId}/members":{"get":{"tags":["WebChat"],"summary":"Get the members of a chat conversation.","description":"","operationId":"getWebchatGuestConversationMembers","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"pageSize","in":"query","description":"The number of entries to return per page, or omitted for the default.","required":false,"type":"integer","default":25,"format":"int32"},{"name":"pageNumber","in":"query","description":"The page number to return, or omitted for the first page.","required":false,"type":"integer","default":1,"format":"int32"},{"name":"excludeDisconnectedMembers","in":"query","description":"If true, the results will not contain members who have a DISCONNECTED state.","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatMemberInfoEntityList"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMembers"}},"/api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}":{"get":{"tags":["WebChat"],"summary":"Get a web chat conversation member","description":"","operationId":"getWebchatGuestConversationMember","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"memberId","in":"path","description":"memberId","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatMemberInfo"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMember"},"delete":{"tags":["WebChat"],"summary":"Remove a member from a chat conversation","description":"","operationId":"deleteWebchatGuestConversationMember","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"memberId","in":"path","description":"memberId","required":true,"type":"string"}],"responses":{"204":{"description":"Operation was successful."},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","chat.error.conversation.state":"The conversation is in a state which does not permit this action.","chat.error.member.state":"The conversation member is in a state which does not permit this action."}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"deleteWebchatGuestConversationMember"}},"/api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/typing":{"post":{"tags":["WebChat"],"summary":"Send a typing-indicator in a chat conversation.","description":"","operationId":"postWebchatGuestConversationMemberTyping","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"memberId","in":"path","description":"memberId","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatTyping"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","chat.error.conversation.state":"The conversation is in a state which does not permit this action.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","chat.error.member.state":"The conversation member is in a state which does not permit this action.","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"postWebchatGuestConversationMemberTyping"}},"/api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/messages":{"post":{"tags":["WebChat"],"summary":"Send a message in a chat conversation.","description":"","operationId":"postWebchatGuestConversationMemberMessages","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"memberId","in":"path","description":"memberId","required":true,"type":"string"},{"in":"body","name":"body","description":"Message","required":true,"schema":{"$ref":"#/definitions/CreateWebChatMessageRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatMessage"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","chat.error.conversation.state":"The conversation is in a state which does not permit this action.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","chat.error.member.state":"The conversation member is in a state which does not permit this action.","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"postWebchatGuestConversationMemberMessages"}}},"securityDefinitions":{"PureCloud OAuth":{"type":"oauth2","authorizationUrl":"https://login.mypurecloud.com/authorize","flow":"implicit","scopes":{"all":"All the scopes"}},"Guest Chat JWT":{"type":"apiKey","name":"Authorization","in":"header"}},"definitions":{"CreateWebChatConversationRequest":{"type":"object","required":["deploymentId","memberInfo","organizationId","routingTarget"],"properties":{"organizationId":{"type":"string","description":"The organization identifier."},"deploymentId":{"type":"string","description":"The web chat Deployment ID which contains the appropriate settings for this chat conversation."},"routingTarget":{"description":"The routing information to use for the new chat conversation.","$ref":"#/definitions/WebChatRoutingTarget"},"memberInfo":{"description":"The guest member info to use for the new chat conversation.","$ref":"#/definitions/GuestMemberInfo"},"memberAuthToken":{"type":"string","description":"If the guest member is an authenticated member (ie, not anonymous) his JWT is provided here. The token will have been previously generated with the \"POST /api/v2/signeddata\" resource."},"journeyContext":{"description":"A subset of the Journey System's data relevant to this conversation/session request (for external linkage and internal usage/context).","$ref":"#/definitions/JourneyContext"}}},"WebChatRoutingTarget":{"type":"object","required":["targetAddress","targetType"],"properties":{"targetType":{"type":"string","description":"The target type of the routing target, such as 'QUEUE'.","enum":["QUEUE"]},"targetAddress":{"type":"string","description":"The target of the route, in the format appropriate given the 'targetType'."},"skills":{"type":"array","description":"The list of skill names to use for routing.","items":{"type":"string"}},"language":{"type":"string","description":"The language name to use for routing."},"priority":{"type":"integer","format":"int64","description":"The priority to assign to the conversation for routing."}}},"GuestMemberInfo":{"type":"object","required":["displayName"],"properties":{"displayName":{"type":"string","description":"The display name to use for the guest member in the conversation."},"avatarImageUrl":{"type":"string","format":"uri","description":"The URL to the avatar image to use for the guest member in the conversation, if any."},"customFields":{"type":"object","description":"Any custom fields of information, in key-value format, to attach to the guest member in the conversation.","additionalProperties":{"type":"string"}}}},"JourneyContext":{"type":"object","required":["customer"],"properties":{"customer":{"description":"A subset of the Journey System's customer data at a point-in-time (for external linkage and internal usage/context)","$ref":"#/definitions/JourneyCustomer"},"customerSession":{"description":"A subset of the Journey System's tracked customer session data at a point-in-time (for external linkage and internal usage/context)","$ref":"#/definitions/JourneyCustomerSession"},"triggeringAction":{"description":"A subset of the Journey System's action data relevant to a part of a conversation (for external linkage and internal usage/context)","$ref":"#/definitions/JourneyAction"}}},"JourneyCustomer":{"type":"object","required":["id","idType"],"properties":{"id":{"type":"string","description":"An ID of a customer within the Journey System at a point-in-time. Note that a customer entity can have multiple customerIds based on the stitching process. Depending on the context within the PureCloud conversation, this may or may not be mutable."},"idType":{"type":"string","description":"The type of the customerId within the Journey System (e.g. cookie)."}}},"JourneyCustomerSession":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string","description":"An ID of a Customer/User's session within the Journey System at a point-in-time"},"type":{"type":"string","description":"The type of the Customer/User's session within the Journey System (e.g. web, app)"}}},"JourneyAction":{"type":"object","required":["actionMap","id"],"properties":{"id":{"type":"string","description":"The ID of an action from the Journey System (an action is spawned from an actionMap)"},"actionMap":{"description":"Details about the action map from the Journey System which triggered this action","$ref":"#/definitions/JourneyActionMap"}}},"JourneyActionMap":{"type":"object","required":["id","version"],"properties":{"id":{"type":"string","description":"The ID of the actionMap in the Journey System which triggered this action"},"version":{"type":"integer","format":"int32","description":"The version number of the actionMap in the Journey System at the time this action was triggered"}}},"CreateWebChatConversationResponse":{"type":"object","properties":{"id":{"type":"string","description":"Chat Conversation identifier"},"jwt":{"type":"string","description":"The JWT that you can use to identify subsequent calls on this conversation"},"eventStreamUri":{"type":"string","format":"uri","description":"The URI which provides the conversation event stream."},"member":{"description":"Chat Member","$ref":"#/definitions/WebChatMemberInfo"}}},"WebChatMemberInfo":{"type":"object","required":["role"],"properties":{"id":{"type":"string","description":"The communicationId of this member."},"displayName":{"type":"string","description":"The display name of the member."},"avatarImageUrl":{"type":"string","format":"uri","description":"The url to the avatar image of the member."},"role":{"type":"string","description":"The role of the member, one of [agent, customer, acd, workflow]","enum":["AGENT","CUSTOMER","WORKFLOW","ACD"]},"joinDate":{"type":"string","format":"date-time","description":"The time the member joined the conversation. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ"},"leaveDate":{"type":"string","format":"date-time","description":"The time the member left the conversation, or null if the member is still active in the conversation. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ"},"authenticatedGuest":{"type":"boolean","description":"If true, the guest member is an authenticated guest."},"customFields":{"type":"object","description":"Any custom fields of information pertaining to this member.","additionalProperties":{"type":"string"}},"state":{"type":"string","description":"The connection state of this member.","enum":["CONNECTED","DISCONNECTED","ALERTING"]}}},"ErrorBody":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"code":{"type":"string"},"entityId":{"type":"string"},"entityName":{"type":"string"},"message":{"type":"string"},"messageWithParams":{"type":"string"},"messageParams":{"type":"object","additionalProperties":{"type":"string"}},"contextId":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/definitions/Detail"}},"errors":{"type":"array","items":{"$ref":"#/definitions/ErrorBody"}}}},"Detail":{"type":"object","properties":{"errorCode":{"type":"string"},"fieldName":{"type":"string"},"entityId":{"type":"string"},"entityName":{"type":"string"}}},"WebChatGuestMediaRequestEntityList":{"type":"object","properties":{"entities":{"type":"array","items":{"$ref":"#/definitions/WebChatGuestMediaRequest"}}}},"WebChatGuestMediaRequest":{"type":"object","required":["state","types"],"properties":{"id":{"type":"string","description":"The globally unique identifier for the object.","readOnly":true},"name":{"type":"string"},"types":{"type":"array","description":"The types of media being requested.","items":{"type":"string","enum":["COBROWSE","SCREENSHARE"]}},"state":{"type":"string","description":"The state of the media request, one of PENDING|ACCEPTED|DECLINED|TIMEDOUT|CANCELLED|ERRORED.","enum":["PENDING","ACCEPTED","DECLINED","TIMEDOUT","CANCELLED","ERRORED"]},"communicationId":{"type":"string","description":"The ID of the new media communication, if applicable."},"securityKey":{"type":"string","description":"The security information related to a media request."},"selfUri":{"type":"string","format":"uri","description":"The URI for this object","readOnly":true}},"description":"Object representing the guest model of a media request of a chat conversation."},"WebChatMessageEntityList":{"type":"object","properties":{"pageSize":{"type":"integer","format":"int32"},"entities":{"type":"array","items":{"$ref":"#/definitions/WebChatMessage"}},"previousPage":{"type":"string"},"next":{"type":"string"},"selfUri":{"type":"string","format":"uri"}}},"WebChatMessage":{"type":"object","required":["body","bodyType","conversation","sender","timestamp"],"properties":{"id":{"type":"string","description":"The globally unique identifier for the object.","readOnly":true},"name":{"type":"string"},"conversation":{"description":"The identifier of the conversation","$ref":"#/definitions/WebChatConversation"},"sender":{"description":"The member who sent the message","$ref":"#/definitions/WebChatMemberInfo"},"body":{"type":"string","description":"The message body."},"bodyType":{"type":"string","description":"The purpose of the message within the conversation, such as a standard text entry versus a greeting.","enum":["standard","notice","member-join","member-leave","media-request"]},"timestamp":{"type":"string","format":"date-time","description":"The timestamp of the message, in ISO-8601 format"},"selfUri":{"type":"string","format":"uri","description":"The URI for this object","readOnly":true}}},"WebChatConversation":{"type":"object","properties":{"id":{"type":"string","description":"The globally unique identifier for the object.","readOnly":true},"name":{"type":"string"},"member":{"description":"Chat Member","$ref":"#/definitions/WebChatMemberInfo"},"selfUri":{"type":"string","format":"uri","description":"The URI for this object","readOnly":true}}},"WebChatMemberInfoEntityList":{"type":"object","properties":{"entities":{"type":"array","items":{"$ref":"#/definitions/WebChatMemberInfo"}},"pageSize":{"type":"integer","format":"int32"},"pageNumber":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"},"firstUri":{"type":"string","format":"uri"},"selfUri":{"type":"string","format":"uri"},"previousUri":{"type":"string","format":"uri"},"nextUri":{"type":"string","format":"uri"},"lastUri":{"type":"string","format":"uri"},"pageCount":{"type":"integer","format":"int32"}}},"WebChatTyping":{"type":"object","required":["conversation","id","sender","timestamp"],"properties":{"id":{"type":"string","description":"The event identifier of this typing indicator event (useful to guard against event re-delivery"},"conversation":{"description":"The identifier of the conversation","$ref":"#/definitions/WebChatConversation"},"sender":{"description":"The member who sent the message","$ref":"#/definitions/WebChatMemberInfo"},"timestamp":{"type":"string","format":"date-time","description":"The timestamp of the message, in ISO-8601 format"}}},"CreateWebChatMessageRequest":{"type":"object","required":["body"],"properties":{"body":{"type":"string","description":"The message body. Note that message bodies are limited to 4,000 characters."},"bodyType":{"type":"string","description":"The purpose of the message within the conversation, such as a standard text entry versus a greeting.","enum":["standard","notice","member-join","member-leave","media-request"]}}}},"responses":{"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"}}},"externalDocs":{"description":"PureCloud API Documentation","url":"https://developer.mypurecloud.com"}} \ No newline at end of file +{"swagger":"2.0","info":{"description":"With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.","version":"v2","title":"PureCloud Platform API","termsOfService":"https://help.mypurecloud.com/articles/terms-and-conditions/","contact":{"name":"PureCloud Developer Evangelists","url":"https://developer.mypurecloud.com","email":"DeveloperEvangelists@genesys.com"},"license":{"name":"UNLICENSED","url":"https://help.mypurecloud.com/articles/terms-and-conditions/"}},"host":"api.mypurecloud.com","tags":[{"name":"Alerting","description":"Rules and alerts","externalDocs":{"description":"Alerting Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/alerting/index.html"}},{"name":"Analytics","description":"Analytics querying and reporting.","externalDocs":{"description":"Analytics Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/analytics/index.html"}},{"name":"Architect","description":"Flows, Prompts, IVR schedules, Dependency Tracking","externalDocs":{"description":"Architect Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/architect/index.html"}},{"name":"Audit","description":"","externalDocs":{"description":"Audit Documentation","url":""}},{"name":"Authorization","description":"Roles and permissions","externalDocs":{"description":"Authorization Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/authorization/index.html"}},{"name":"Badges","description":"Badges stats"},{"name":"Billing","description":"","externalDocs":{"description":"billing Documentation","url":"https://developer.mypurecloud.com/billing"}},{"name":"Bridge","description":""},{"name":"Callbacks","description":""},{"name":"Calls","description":""},{"name":"Carrier Services","description":""},{"name":"Chats","description":""},{"name":"Cobrowse","description":""},{"name":"Compliance","description":""},{"name":"Configuration","description":"","externalDocs":{"description":"Configuration Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/configuration/index.html"}},{"name":"Content Management","description":"","externalDocs":{"description":"Content Management Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/contentmanagement/index.html"}},{"name":"Conversations","description":"","externalDocs":{"description":"Conversations Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/conversations/index.html"}},{"name":"Data Extensions","description":"Data extensions","externalDocs":{"description":"Data Extensions","url":"https://developer.mypurecloud.com"}},{"name":"Dialog Engine","description":"Dialog Engine","externalDocs":{"description":"Dialog Engine documentation","url":"https://developer.mypurecloud.com/api/rest/v2/dialog/index.html"}},{"name":"Directory Proxy","description":"Search, Suggest, and people"},{"name":"Docs","description":"Swagger documentation definitions","externalDocs":{"description":"docs","url":"https://developer.mypurecloud.com"}},{"name":"Downloads","description":"Download file","externalDocs":{"description":"Downloads Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/downloads/index.html"}},{"name":"Emails","description":""},{"name":"External Contacts","description":"External Organizations, contacts, notes and relationships","externalDocs":{"description":"External Contacts","url":"https://developer.mypurecloud.com/api/rest/v2/externalcontacts/index.html"}},{"name":"Fax","description":"","externalDocs":{"description":"Fax Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/fax/index.html"}},{"name":"Flows","description":"IVR Flows","externalDocs":{"description":"Flow Aggregates Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/analytics/flow_aggregate.html"}},{"name":"General Data Protection Regulation","description":"Working with General Data Protection Regulation (GDPR) requests"},{"name":"Geolocation","description":"","externalDocs":{"description":"Geolocation Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/geolocation/index.html"}},{"name":"Greetings","description":"","externalDocs":{"description":"Greetings Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/greetings/index.html"}},{"name":"Groups","description":"Groups, members","externalDocs":{"description":"Groups Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/groups/index.html"}},{"name":"Identity Provider","description":"Identity providers","externalDocs":{"description":"Identity Providers Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/identityproviders/index.html"}},{"name":"Integrations","description":"","externalDocs":{"description":"Integrations Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/integrations/index.html"}},{"name":"Journey","description":"Predictive Engagement, Customer Journey","externalDocs":{"description":"Journey documentation","url":"https://developer.mypurecloud.com/api/rest/v1/journey/index.html"}},{"name":"Languages","description":"Available languages","externalDocs":{"description":"Languages Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/languages/index.html"}},{"name":"Language Understanding","description":"Language Understanding","externalDocs":{"description":"Language Understanding documentation","url":"https://developer.mypurecloud.com/api/rest/v2/languageunderstanding/index.html"}},{"name":"Licensing","description":""},{"name":"License","description":"Per-user platform license assignments"},{"name":"Locations","description":"Physical locations","externalDocs":{"description":"Locations Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/locations/index.html"}},{"name":"Marketplace","description":"Marketplace listing management"},{"name":"Meeting","description":"","externalDocs":{"description":"Meeting Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/meetings/index.html"}},{"name":"Messaging","description":"Messaging","externalDocs":{"description":"Messaging Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/messaging/index.html"}},{"name":"Mobile Devices","description":"Devices","externalDocs":{"description":"Devices Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/devices/index.html"}},{"name":"Notifications","description":"Channels, subscriptions, topics","externalDocs":{"description":"Notifications Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/notifications/index.html"}},{"name":"OAuth","description":"OAuth clients, providers","externalDocs":{"description":"OAuth Documentation","url":""}},{"name":"Objects","description":"Access-controlled objects in the platform","externalDocs":{"description":"authorization docs","url":"https://developer.mypurecloud.com/authorization"}},{"name":"Organization","description":"Organization"},{"name":"Organization Authorization","description":"Organization Authorization"},{"name":"Outbound","description":"","externalDocs":{"description":"Outbound Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/outbound/index.html"}},{"name":"Presence","description":"User and organization presences","externalDocs":{"description":"Presence Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/presence/index.html"}},{"name":"Process Automation","description":"Work items, flows"},{"name":"Quality","description":"Evaluations, calibrations","externalDocs":{"description":"Quality Management Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/quality/index.html"}},{"name":"Recording","description":"Recordings, policies, annotations, orphans","externalDocs":{"description":"Recording Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/recording/index.html"}},{"name":"Response Management","description":"Responses, library, query","externalDocs":{"description":"Response Management Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/responsemanagement/index.html"}},{"name":"Routing","description":"Queues, wrapup codes, skills, email & sms config","externalDocs":{"description":"Routing Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/routing/index.html"}},{"name":"SCIM","description":"System for Cross-domain Identity Management","externalDocs":{"description":"System for Cross-domain Identity Management: Definitions, Overview, Concepts, and Requirements","url":"https://developer.mypurecloud.com/api/rest/v2/scim/scim-overview.html"}},{"name":"Scripts","description":"Agent-facing scripts for interactions","externalDocs":{"description":"Scripts Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/scripts/index.html"}},{"name":"Search","description":"Search aggregate, users, groups","externalDocs":{"description":"Search Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/search/index.html"}},{"name":"SignedData","description":"Package data in signed JWTs"},{"name":"Socialize","description":"Gets, sets and updates entity data for the Socialize service"},{"name":"Speech & Text Analytics","description":""},{"name":"Stations","description":"Stations","externalDocs":{"description":"Stations Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/stations/index.html"}},{"name":"Suggest","description":"Search suggest user, group, locations"},{"name":"Telephony","description":"Telephony providers and configuration","externalDocs":{"description":"Telephony Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/telephonyprovidersedge/index.html"}},{"name":"Telephony Providers Edge","description":"Edge phones, trunks, lines.","externalDocs":{"description":"telephony provider edge","url":"https://developer.mypurecloud.com/api/rest/v2/telephonyprovidersedge/index.html"}},{"name":"Tokens","description":"Authentication Tokens","externalDocs":{"description":"Tokens Documentation","url":""}},{"name":"User Recordings","description":"Summary, media","externalDocs":{"description":"User Recordings Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/userrecordings/index.html"}},{"name":"Users","description":"Me, routing, roles","externalDocs":{"description":"Users Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/users/index.html"}},{"name":"Utilities","description":"","externalDocs":{"description":"Utilities Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/utilities/index.html"}},{"name":"Videos","description":""},{"name":"Virtual Reality","description":"Virtual Reality scenes and assets"},{"name":"Voicemail","description":"Mailbox, messages, policy","externalDocs":{"description":"Voicemail Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/voicemail/index.html"}},{"name":"WebChat","description":"WebChat deployments"},{"name":"Widgets","description":"Widget deployments"},{"name":"Usage","description":"View organizational level usage data"},{"name":"Workforce Management","description":"Adherence, Schedules, Forecasts, Intraday Monitoring, Time Off Requests, Configuration","externalDocs":{"description":"Workforce Management Documentation","url":"https://developer.mypurecloud.com/api/rest/v2/workforcemanagement/index.html"}}],"schemes":["https"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}":{"get":{"tags":["WebChat"],"summary":"Get a media request in the conversation","description":"","operationId":"getWebchatGuestConversationMediarequest","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"mediaRequestId","in":"path","description":"mediaRequestId","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatGuestMediaRequest"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"request.entity.too.large":"The request is over the size limit. Content-Length: %s"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMediarequest"},"patch":{"tags":["WebChat"],"summary":"Update a media request in the conversation, setting the state to ACCEPTED/DECLINED/ERRORED","description":"","operationId":"patchWebchatGuestConversationMediarequest","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"mediaRequestId","in":"path","description":"mediaRequestId","required":true,"type":"string"},{"in":"body","name":"body","description":"Request","required":true,"schema":{"$ref":"#/definitions/WebChatGuestMediaRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatGuestMediaRequest"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","chat.error.conversation.state":"The conversation is in a state which does not permit this action.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"request.entity.too.large":"The request is over the size limit. Content-Length: %s"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"patchWebchatGuestConversationMediarequest"}},"/api/v2/webchat/guest/conversations/{conversationId}/members":{"get":{"tags":["WebChat"],"summary":"Get the members of a chat conversation.","description":"","operationId":"getWebchatGuestConversationMembers","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"pageSize","in":"query","description":"The number of entries to return per page, or omitted for the default.","required":false,"type":"integer","default":25,"format":"int32"},{"name":"pageNumber","in":"query","description":"The page number to return, or omitted for the first page.","required":false,"type":"integer","default":1,"format":"int32"},{"name":"excludeDisconnectedMembers","in":"query","description":"If true, the results will not contain members who have a DISCONNECTED state.","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatMemberInfoEntityList"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"request.entity.too.large":"The request is over the size limit. Content-Length: %s"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMembers"}},"/api/v2/webchat/guest/conversations/{conversationId}/messages":{"get":{"tags":["WebChat"],"summary":"Get the messages of a chat conversation.","description":"","operationId":"getWebchatGuestConversationMessages","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"after","in":"query","description":"If available, get the messages chronologically after the id of this message","required":false,"type":"string"},{"name":"before","in":"query","description":"If available, get the messages chronologically before the id of this message","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"Sort order","required":false,"type":"string","default":"ascending","enum":["ascending","descending"]},{"name":"maxResults","in":"query","description":"Limit the returned number of messages, up to a maximum of 100","required":false,"type":"integer","default":100,"format":"int32"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatMessageEntityList"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"request.entity.too.large":"The request is over the size limit. Content-Length: %s"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMessages"}},"/api/v2/webchat/guest/conversations":{"post":{"tags":["WebChat"],"summary":"Create an ACD chat conversation from an external customer.","description":"This endpoint will create a new ACD Chat conversation under the specified Chat Deployment.\n The conversation will begin with a guest member in it (with a role=CUSTOMER) according to the customer information that is supplied. If the guest member is authenticated, the 'memberAuthToken' field should include his JWT as generated by the 'POST /api/v2/signeddata' resource; if the guest member is anonymous (and the Deployment permits it) this field can be omitted.\n The returned data includes the IDs of the conversation created, along with a newly-create JWT token that you can supply to all future endpoints as authentication to perform operations against that conversation. After successfully creating a conversation, you should connect a websocket to the event stream named in the 'eventStreamUri' field of the response; the conversation is not routed until the event stream is attached.","operationId":"postWebchatGuestConversations","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"CreateConversationRequest","required":true,"schema":{"$ref":"#/definitions/CreateWebChatConversationRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/CreateWebChatConversationResponse"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"chat.deployment.disabled":"The web chat deployment is currently disabled.","chat.deployment.bad.auth":"The customer member authentication has failed.","chat.error.invalid.queue":"The specified queue is not valid.","bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","chat.error.createconversationrequest.routingtarget":"The routing target is not valid.","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s","chat.deployment.require.auth":"The deployment requires the customer member to be authenticated."}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"credentials.expired":"The supplied credentials are expired and cannot be used.","authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"request.entity.too.large":"The request is over the size limit. Content-Length: %s"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"x-purecloud-method-name":"postWebchatGuestConversations"}},"/api/v2/webchat/guest/conversations/{conversationId}/mediarequests":{"get":{"tags":["WebChat"],"summary":"Get all media requests to the guest in the conversation","description":"","operationId":"getWebchatGuestConversationMediarequests","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatGuestMediaRequestEntityList"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"request.entity.too.large":"The request is over the size limit. Content-Length: %s"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMediarequests"}},"/api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/typing":{"post":{"tags":["WebChat"],"summary":"Send a typing-indicator in a chat conversation.","description":"","operationId":"postWebchatGuestConversationMemberTyping","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"memberId","in":"path","description":"memberId","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatTyping"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","chat.error.conversation.state":"The conversation is in a state which does not permit this action.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","chat.error.member.state":"The conversation member is in a state which does not permit this action.","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"request.entity.too.large":"The request is over the size limit. Content-Length: %s"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"postWebchatGuestConversationMemberTyping"}},"/api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}":{"get":{"tags":["WebChat"],"summary":"Get a web chat conversation member","description":"","operationId":"getWebchatGuestConversationMember","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"memberId","in":"path","description":"memberId","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatMemberInfo"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"request.entity.too.large":"The request is over the size limit. Content-Length: %s"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMember"},"delete":{"tags":["WebChat"],"summary":"Remove a member from a chat conversation","description":"","operationId":"deleteWebchatGuestConversationMember","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"memberId","in":"path","description":"memberId","required":true,"type":"string"}],"responses":{"204":{"description":"Operation was successful."},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","chat.error.conversation.state":"The conversation is in a state which does not permit this action.","chat.error.member.state":"The conversation member is in a state which does not permit this action."}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"request.entity.too.large":"The request is over the size limit. Content-Length: %s"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"deleteWebchatGuestConversationMember"}},"/api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/messages":{"post":{"tags":["WebChat"],"summary":"Send a message in a chat conversation.","description":"","operationId":"postWebchatGuestConversationMemberMessages","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"memberId","in":"path","description":"memberId","required":true,"type":"string"},{"in":"body","name":"body","description":"Message","required":true,"schema":{"$ref":"#/definitions/CreateWebChatMessageRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatMessage"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","chat.error.conversation.state":"The conversation is in a state which does not permit this action.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","chat.error.member.state":"The conversation member is in a state which does not permit this action.","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"request.entity.too.large":"The request is over the size limit. Content-Length: %s"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"postWebchatGuestConversationMemberMessages"}},"/api/v2/webchat/guest/conversations/{conversationId}/messages/{messageId}":{"get":{"tags":["WebChat"],"summary":"Get a web chat conversation message","description":"","operationId":"getWebchatGuestConversationMessage","produces":["application/json"],"parameters":[{"name":"conversationId","in":"path","description":"conversationId","required":true,"type":"string"},{"name":"messageId","in":"path","description":"messageId","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/WebChatMessage"}},"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"bad.request":"The request could not be understood by the server due to malformed syntax.","invalid.date":"Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ","invalid.value":"Value [%s] is not valid for field type [%s]. Allowable values are: %s"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.required":"No authentication bearer token specified in authorization header.","bad.credentials":"Invalid login credentials."}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"missing.permissions":"Unable to perform the requested action. You are missing the following permission(s): %s","not.authorized":"You are not authorized to perform the requested action.","missing.any.permissions":"Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"not.found":"The requested resource was not found."}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"request.entity.too.large":"The request is over the size limit. Content-Length: %s"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"unsupported.media.type":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"too.many.requests":"Rate limit exceeded the maximum [%s] requests within [%s] seconds"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"internal.server.error":"The server encountered an unexpected condition which prevented it from fulfilling the request."}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"service.unavailable":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"},"x-inin-error-codes":{"authentication.request.timeout":"Authentication request timeout.","request.timeout":"The request timed out."}}},"security":[{"Guest Chat JWT":[]}],"x-purecloud-method-name":"getWebchatGuestConversationMessage"}}},"securityDefinitions":{"PureCloud OAuth":{"type":"oauth2","authorizationUrl":"https://login.mypurecloud.com/authorize","flow":"implicit","scopes":{"all":"All the scopes"}},"Guest Chat JWT":{"type":"apiKey","name":"Authorization","in":"header"}},"definitions":{"WebChatGuestMediaRequest":{"type":"object","required":["state","types"],"properties":{"id":{"type":"string","description":"The globally unique identifier for the object.","readOnly":true},"name":{"type":"string"},"types":{"type":"array","description":"The types of media being requested.","items":{"type":"string","enum":["COBROWSE","SCREENSHARE"]}},"state":{"type":"string","description":"The state of the media request, one of PENDING|ACCEPTED|DECLINED|TIMEDOUT|CANCELLED|ERRORED.","enum":["PENDING","ACCEPTED","DECLINED","TIMEDOUT","CANCELLED","ERRORED"]},"communicationId":{"type":"string","description":"The ID of the new media communication, if applicable."},"securityKey":{"type":"string","description":"The security information related to a media request."},"selfUri":{"type":"string","format":"uri","description":"The URI for this object","readOnly":true}},"description":"Object representing the guest model of a media request of a chat conversation."},"ErrorBody":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"code":{"type":"string"},"entityId":{"type":"string"},"entityName":{"type":"string"},"message":{"type":"string"},"messageWithParams":{"type":"string"},"messageParams":{"type":"object","additionalProperties":{"type":"string"}},"contextId":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/definitions/Detail"}},"errors":{"type":"array","items":{"$ref":"#/definitions/ErrorBody"}}}},"Detail":{"type":"object","properties":{"errorCode":{"type":"string"},"fieldName":{"type":"string"},"entityId":{"type":"string"},"entityName":{"type":"string"}}},"WebChatMemberInfoEntityList":{"type":"object","properties":{"entities":{"type":"array","items":{"$ref":"#/definitions/WebChatMemberInfo"}},"pageSize":{"type":"integer","format":"int32"},"pageNumber":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"},"firstUri":{"type":"string","format":"uri"},"selfUri":{"type":"string","format":"uri"},"lastUri":{"type":"string","format":"uri"},"previousUri":{"type":"string","format":"uri"},"nextUri":{"type":"string","format":"uri"},"pageCount":{"type":"integer","format":"int32"}}},"WebChatMemberInfo":{"type":"object","required":["role"],"properties":{"id":{"type":"string","description":"The communicationId of this member."},"displayName":{"type":"string","description":"The display name of the member."},"avatarImageUrl":{"type":"string","format":"uri","description":"The url to the avatar image of the member."},"role":{"type":"string","description":"The role of the member, one of [agent, customer, acd, workflow]","enum":["AGENT","CUSTOMER","WORKFLOW","ACD"]},"joinDate":{"type":"string","format":"date-time","description":"The time the member joined the conversation. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ"},"leaveDate":{"type":"string","format":"date-time","description":"The time the member left the conversation, or null if the member is still active in the conversation. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ"},"authenticatedGuest":{"type":"boolean","description":"If true, the guest member is an authenticated guest."},"customFields":{"type":"object","description":"Any custom fields of information pertaining to this member.","additionalProperties":{"type":"string"}},"state":{"type":"string","description":"The connection state of this member.","enum":["CONNECTED","DISCONNECTED","ALERTING"]}}},"WebChatMessageEntityList":{"type":"object","properties":{"pageSize":{"type":"integer","format":"int32"},"entities":{"type":"array","items":{"$ref":"#/definitions/WebChatMessage"}},"previousPage":{"type":"string"},"next":{"type":"string"},"selfUri":{"type":"string","format":"uri"}}},"WebChatMessage":{"type":"object","required":["body","bodyType","conversation","sender","timestamp"],"properties":{"id":{"type":"string","description":"The globally unique identifier for the object.","readOnly":true},"name":{"type":"string"},"conversation":{"description":"The identifier of the conversation","$ref":"#/definitions/WebChatConversation"},"sender":{"description":"The member who sent the message","$ref":"#/definitions/WebChatMemberInfo"},"body":{"type":"string","description":"The message body."},"bodyType":{"type":"string","description":"The purpose of the message within the conversation, such as a standard text entry versus a greeting.","enum":["standard","notice","member-join","member-leave","media-request"]},"timestamp":{"type":"string","format":"date-time","description":"The timestamp of the message, in ISO-8601 format"},"selfUri":{"type":"string","format":"uri","description":"The URI for this object","readOnly":true}}},"WebChatConversation":{"type":"object","properties":{"id":{"type":"string","description":"The globally unique identifier for the object.","readOnly":true},"name":{"type":"string"},"member":{"description":"Chat Member","$ref":"#/definitions/WebChatMemberInfo"},"selfUri":{"type":"string","format":"uri","description":"The URI for this object","readOnly":true}}},"CreateWebChatConversationRequest":{"type":"object","required":["deploymentId","memberInfo","organizationId","routingTarget"],"properties":{"organizationId":{"type":"string","description":"The organization identifier."},"deploymentId":{"type":"string","description":"The web chat Deployment ID which contains the appropriate settings for this chat conversation."},"routingTarget":{"description":"The routing information to use for the new chat conversation.","$ref":"#/definitions/WebChatRoutingTarget"},"memberInfo":{"description":"The guest member info to use for the new chat conversation.","$ref":"#/definitions/GuestMemberInfo"},"memberAuthToken":{"type":"string","description":"If the guest member is an authenticated member (ie, not anonymous) his JWT is provided here. The token will have been previously generated with the \"POST /api/v2/signeddata\" resource."},"journeyContext":{"description":"A subset of the Journey System's data relevant to this conversation/session request (for external linkage and internal usage/context).","$ref":"#/definitions/JourneyContext"}}},"WebChatRoutingTarget":{"type":"object","required":["targetAddress","targetType"],"properties":{"targetType":{"type":"string","description":"The target type of the routing target, such as 'QUEUE'.","enum":["QUEUE"]},"targetAddress":{"type":"string","description":"The target of the route, in the format appropriate given the 'targetType'."},"skills":{"type":"array","description":"The list of skill names to use for routing.","items":{"type":"string"}},"language":{"type":"string","description":"The language name to use for routing."},"priority":{"type":"integer","format":"int64","description":"The priority to assign to the conversation for routing."}}},"GuestMemberInfo":{"type":"object","required":["displayName"],"properties":{"displayName":{"type":"string","description":"The display name to use for the guest member in the conversation."},"avatarImageUrl":{"type":"string","format":"uri","description":"The URL to the avatar image to use for the guest member in the conversation, if any."},"customFields":{"type":"object","description":"Any custom fields of information, in key-value format, to attach to the guest member in the conversation.","additionalProperties":{"type":"string"}}}},"JourneyContext":{"type":"object","required":["customer"],"properties":{"customer":{"description":"A subset of the Journey System's customer data at a point-in-time (for external linkage and internal usage/context)","$ref":"#/definitions/JourneyCustomer"},"customerSession":{"description":"A subset of the Journey System's tracked customer session data at a point-in-time (for external linkage and internal usage/context)","$ref":"#/definitions/JourneyCustomerSession"},"triggeringAction":{"description":"A subset of the Journey System's action data relevant to a part of a conversation (for external linkage and internal usage/context)","$ref":"#/definitions/JourneyAction"}}},"JourneyCustomer":{"type":"object","required":["id","idType"],"properties":{"id":{"type":"string","description":"An ID of a customer within the Journey System at a point-in-time. Note that a customer entity can have multiple customerIds based on the stitching process. Depending on the context within the PureCloud conversation, this may or may not be mutable."},"idType":{"type":"string","description":"The type of the customerId within the Journey System (e.g. cookie)."}}},"JourneyCustomerSession":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string","description":"An ID of a Customer/User's session within the Journey System at a point-in-time"},"type":{"type":"string","description":"The type of the Customer/User's session within the Journey System (e.g. web, app)"}}},"JourneyAction":{"type":"object","required":["actionMap","id"],"properties":{"id":{"type":"string","description":"The ID of an action from the Journey System (an action is spawned from an actionMap)"},"actionMap":{"description":"Details about the action map from the Journey System which triggered this action","$ref":"#/definitions/JourneyActionMap"}}},"JourneyActionMap":{"type":"object","required":["id","version"],"properties":{"id":{"type":"string","description":"The ID of the actionMap in the Journey System which triggered this action"},"version":{"type":"integer","format":"int32","description":"The version number of the actionMap in the Journey System at the time this action was triggered"}}},"CreateWebChatConversationResponse":{"type":"object","properties":{"id":{"type":"string","description":"Chat Conversation identifier"},"jwt":{"type":"string","description":"The JWT that you can use to identify subsequent calls on this conversation"},"eventStreamUri":{"type":"string","format":"uri","description":"The URI which provides the conversation event stream."},"member":{"description":"Chat Member","$ref":"#/definitions/WebChatMemberInfo"}}},"WebChatGuestMediaRequestEntityList":{"type":"object","properties":{"entities":{"type":"array","items":{"$ref":"#/definitions/WebChatGuestMediaRequest"}}}},"WebChatTyping":{"type":"object","required":["conversation","id","sender","timestamp"],"properties":{"id":{"type":"string","description":"The event identifier of this typing indicator event (useful to guard against event re-delivery"},"conversation":{"description":"The identifier of the conversation","$ref":"#/definitions/WebChatConversation"},"sender":{"description":"The member who sent the message","$ref":"#/definitions/WebChatMemberInfo"},"timestamp":{"type":"string","format":"date-time","description":"The timestamp of the message, in ISO-8601 format"}}},"CreateWebChatMessageRequest":{"type":"object","required":["body"],"properties":{"body":{"type":"string","description":"The message body. Note that message bodies are limited to 4,000 characters."},"bodyType":{"type":"string","description":"The purpose of the message within the conversation, such as a standard text entry versus a greeting.","enum":["standard","notice","member-join","member-leave","media-request"]}}}},"responses":{"400":{"description":"The request could not be understood by the server due to malformed syntax.","schema":{"$ref":"#/definitions/ErrorBody"}},"401":{"description":"No authentication bearer token specified in authorization header.","schema":{"$ref":"#/definitions/ErrorBody"}},"403":{"description":"You are not authorized to perform the requested action.","schema":{"$ref":"#/definitions/ErrorBody"}},"404":{"description":"The requested resource was not found.","schema":{"$ref":"#/definitions/ErrorBody"}},"413":{"description":"The request is over the size limit. Content-Length: %s","schema":{"$ref":"#/definitions/ErrorBody"}},"415":{"description":"Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.","schema":{"$ref":"#/definitions/ErrorBody"}},"429":{"description":"Rate limit exceeded the maximum [%s] requests within [%s] seconds","schema":{"$ref":"#/definitions/ErrorBody"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/ErrorBody"}},"503":{"description":"Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).","schema":{"$ref":"#/definitions/ErrorBody"}},"504":{"description":"The request timed out.","schema":{"$ref":"#/definitions/ErrorBody"}}},"externalDocs":{"description":"PureCloud API Documentation","url":"https://developer.mypurecloud.com"}} \ No newline at end of file diff --git a/version.json b/version.json index 68f61621..bf4f038b 100644 --- a/version.json +++ b/version.json @@ -1,9 +1,9 @@ { "major": 5, - "minor": 0, - "point": 2, + "minor": 1, + "point": 0, "prerelease": "", "apiVersion": 0, - "display": "5.0.2", - "displayFull": "5.0.2" + "display": "5.1.0", + "displayFull": "5.1.0" } \ No newline at end of file