Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/ms-rest-js

Package Overview
Dependencies
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/ms-rest-js - npm Package Compare versions

Comparing version 2.6.0 to 2.6.1

2

dist/msRest.browser.min.js

@@ -5,3 +5,3 @@ /** @license ms-rest-js

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).msRest={})}(this,(function(e){"use strict";function t(e){return e.toLowerCase()}function r(e){return!(!e||"object"!=typeof e)&&("function"==typeof e.rawHeaders&&"function"==typeof e.clone&&"function"==typeof e.get&&"function"==typeof e.set&&"function"==typeof e.contains&&"function"==typeof e.remove&&"function"==typeof e.headersArray&&"function"==typeof e.headerValues&&"function"==typeof e.headerNames&&"function"==typeof e.toJson)}var n,o=function(){function e(e){if(this._headersMap={},e)for(var t in e)this.set(t,e[t])}return e.prototype.set=function(e,r){this._headersMap[t(e)]={name:e,value:r.toString()}},e.prototype.get=function(e){var r=this._headersMap[t(e)];return r?r.value:void 0},e.prototype.contains=function(e){return!!this._headersMap[t(e)]},e.prototype.remove=function(e){var r=this.contains(e);return delete this._headersMap[t(e)],r},e.prototype.rawHeaders=function(){var e={};for(var t in this._headersMap){var r=this._headersMap[t];e[r.name.toLowerCase()]=r.value}return e},e.prototype.headersArray=function(){var e=[];for(var t in this._headersMap)e.push(this._headersMap[t]);return e},e.prototype.headerNames=function(){for(var e=[],t=this.headersArray(),r=0;r<t.length;++r)e.push(t[r].name);return e},e.prototype.headerValues=function(){for(var e=[],t=this.headersArray(),r=0;r<t.length;++r)e.push(t[r].value);return e},e.prototype.toJson=function(){return this.rawHeaders()},e.prototype.toString=function(){return JSON.stringify(this.toJson())},e.prototype.clone=function(){return new e(this.rawHeaders())},e}();function i(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function a(e){for(var t=atob(e),r=new Uint8Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}var s=new Uint8Array(16);function u(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(s)}var l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function c(e){return"string"==typeof e&&l.test(e)}for(var f=[],p=0;p<256;++p)f.push((p+256).toString(16).substr(1));function h(e,t,r){var n=(e=e||{}).random||(e.rng||u)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(f[e[t+0]]+f[e[t+1]]+f[e[t+2]]+f[e[t+3]]+"-"+f[e[t+4]]+f[e[t+5]]+"-"+f[e[t+6]]+f[e[t+7]]+"-"+f[e[t+8]]+f[e[t+9]]+"-"+f[e[t+10]]+f[e[t+11]]+f[e[t+12]]+f[e[t+13]]+f[e[t+14]]+f[e[t+15]]).toLowerCase();if(!c(r))throw TypeError("Stringified UUID is invalid");return r}(n)}var d={msRestVersion:"2.6.0",HTTP:"http:",HTTPS:"https:",HTTP_PROXY:"HTTP_PROXY",HTTPS_PROXY:"HTTPS_PROXY",NO_PROXY:"NO_PROXY",ALL_PROXY:"ALL_PROXY",HttpConstants:{HttpVerbs:{PUT:"PUT",GET:"GET",DELETE:"DELETE",POST:"POST",MERGE:"MERGE",HEAD:"HEAD",PATCH:"PATCH"},StatusCodes:{TooManyRequests:429}},HeaderConstants:{AUTHORIZATION:"authorization",AUTHORIZATION_SCHEME:"Bearer",RETRY_AFTER:"Retry-After",USER_AGENT:"User-Agent"}},y="undefined"!=typeof process&&!!process.version&&!!process.versions&&!!process.versions.node;function m(e){var t={};return t.body=e.bodyAsText,t.headers=e.headers,t.status=e.status,t}function v(e){var t=e.clone();return t.headers&&t.headers.remove("authorization"),t}function g(e){return new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","ig").test(e)}function b(){return h()}function w(e,t){return new Promise((function(r){return setTimeout((function(){return r(t)}),e)}))}var E=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function R(e){return E.test(e)}function T(e,t,r){return e&&t?e.split(t).join(r||""):e}var _=function(){function e(e,t){void 0===e&&(e={}),this.modelMappers=e,this.isXML=t}return e.prototype.validateConstraints=function(e,t,r){var n=function(e,n){throw new Error('"'+r+'" with value "'+t+'" should satisfy the constraint "'+e+'": '+n+".")};if(e.constraints&&null!=t){var o=e.constraints,i=o.ExclusiveMaximum,a=o.ExclusiveMinimum,s=o.InclusiveMaximum,u=o.InclusiveMinimum,l=o.MaxItems,c=o.MaxLength,f=o.MinItems,p=o.MinLength,h=o.MultipleOf,d=o.Pattern,y=o.UniqueItems;if(null!=i&&t>=i&&n("ExclusiveMaximum",i),null!=a&&t<=a&&n("ExclusiveMinimum",a),null!=s&&t>s&&n("InclusiveMaximum",s),null!=u&&t<u&&n("InclusiveMinimum",u),null!=l&&t.length>l&&n("MaxItems",l),null!=c&&t.length>c&&n("MaxLength",c),null!=f&&t.length<f&&n("MinItems",f),null!=p&&t.length<p&&n("MinLength",p),null!=h&&t%h!=0&&n("MultipleOf",h),d){var m="string"==typeof d?new RegExp(d):d;"string"==typeof t&&null!==t.match(m)||n("Pattern",d)}y&&t.some((function(e,t,r){return r.indexOf(e)!==t}))&&n("UniqueItems",y)}},e.prototype.serialize=function(e,t,r){var n={},o=e.type.name;r||(r=e.serializedName),null!==o.match(/^Sequence$/gi)&&(n=[]),e.isConstant&&(t=e.defaultValue);var a=e.required,s=e.nullable;if(a&&s&&void 0===t)throw new Error(r+" cannot be undefined.");if(a&&!s&&null==t)throw new Error(r+" cannot be null or undefined.");if(!a&&!1===s&&null===t)throw new Error(r+" cannot be null.");if(null==t)n=t;else if(this.validateConstraints(e,t,r),null!==o.match(/^any$/gi))n=t;else if(null!==o.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/gi))n=function(e,t,r){if(null!=r)if(null!==e.match(/^Number$/gi)){if("number"!=typeof r)throw new Error(t+" with value "+r+" must be of type number.")}else if(null!==e.match(/^String$/gi)){if("string"!=typeof r.valueOf())throw new Error(t+' with value "'+r+'" must be of type string.')}else if(null!==e.match(/^Uuid$/gi)){if("string"!=typeof r.valueOf()||!g(r))throw new Error(t+' with value "'+r+'" must be of type string and a valid uuid.')}else if(null!==e.match(/^Boolean$/gi)){if("boolean"!=typeof r)throw new Error(t+" with value "+r+" must be of type boolean.")}else if(null!==e.match(/^Stream$/gi)){var n=typeof r;if(!("string"===n||"function"===n||r instanceof ArrayBuffer||ArrayBuffer.isView(r)||"function"==typeof Blob&&r instanceof Blob))throw new Error(t+" must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.")}return r}(o,r,t);else if(null!==o.match(/^Enum$/gi)){n=function(e,t,r){if(!t)throw new Error("Please provide a set of allowedValues to validate "+e+" as an Enum Type.");if(!t.some((function(e){return"string"==typeof e.valueOf()?e.toLowerCase()===r.toLowerCase():e===r})))throw new Error(r+" is not a valid value for "+e+". The valid values are: "+JSON.stringify(t)+".");return r}(r,e.type.allowedValues,t)}else null!==o.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/gi)?n=function(e,t,r){if(null!=t)if(null!==e.match(/^Date$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in ISO8601 format.");t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in ISO8601 format.");t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in RFC-1123 format.");t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.");t=function(e){if(!e)return;"string"==typeof e.valueOf()&&(e=new Date(e));return Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/gi)){if(!R(t))throw new Error(r+' must be a string in ISO 8601 format. Instead was "'+t+'".');t=t}return t}(o,t,r):null!==o.match(/^ByteArray$/gi)?n=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(e+" must be of type Uint8Array.");t=i(t)}return t}(r,t):null!==o.match(/^Base64Url$/gi)?n=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(e+" must be of type Uint8Array.");t=function(e){if(!e)return;if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e,t){var r=e.length;for(;r-1>=0&&e[r-1]===t;)--r;return e.substr(0,r)}(i(e),"=").replace(/\+/g,"-").replace(/\//g,"_")}(t)}return t}(r,t):null!==o.match(/^Sequence$/gi)?n=function(e,t,r,n){if(!Array.isArray(r))throw new Error(n+" must be of type Array.");var o=t.type.element;if(!o||"object"!=typeof o)throw new Error('element" metadata for an Array must be defined in the mapper and it must of type "object" in '+n+".");for(var i=[],a=0;a<r.length;a++)i[a]=e.serialize(o,r[a],n);return i}(this,e,t,r):null!==o.match(/^Dictionary$/gi)?n=function(e,t,r,n){if("object"!=typeof r)throw new Error(n+" must be of type object.");var o=t.type.value;if(!o||"object"!=typeof o)throw new Error('"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in '+n+".");for(var i={},a=0,s=Object.keys(r);a<s.length;a++){var u=s[a];i[u]=e.serialize(o,r[u],n+"."+u)}return i}(this,e,t,r):null!==o.match(/^Composite$/gi)&&(n=function(e,t,r,n){var o;x(e,t)&&(t=A(e,t,r,"clientName"));if(null!=r){for(var i={},a=S(e,t,n),s=0,u=Object.keys(a);s<u.length;s++){var l=u[s],c=a[l];if(!c.readOnly){var f=void 0,p=i;if(e.isXML)f=c.xmlIsWrapped?c.xmlName:c.xmlElementName||c.xmlName;else{var h=P(c.serializedName);f=h.pop();for(var d=0,y=h;d<y.length;d++){var m=y[d];null==p[m]&&null!=r[l]&&(p[m]={}),p=p[m]}}if(null!=p){var v=""!==c.serializedName?n+"."+c.serializedName:n,g=r[l],b=x(e,t);b&&b.clientName===l&&null==g&&(g=t.serializedName);var w=e.serialize(c,g,v);void 0!==w&&null!=f&&(c.xmlIsAttribute?(p.$=p.$||{},p.$[f]=w):c.xmlIsWrapped?p[f]=((o={})[c.xmlElementName]=w,o):p[f]=w)}}}var E=t.type.additionalProperties;if(E){var R=Object.keys(a),T=function(t){R.every((function(e){return e!==t}))&&(i[t]=e.serialize(E,r[t],n+'["'+t+'"]'))};for(var _ in r)T(_)}return i}return r}(this,e,t,r));return n},e.prototype.deserialize=function(e,t,r){if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;var n,o=e.type.name;return r||(r=e.serializedName),null!==o.match(/^Composite$/gi)?n=function(e,t,r,n){x(e,t)&&(t=A(e,t,r,"serializedName"));for(var o=S(e,t,n),i={},a=[],s=0,u=Object.keys(o);s<u.length;s++){var l=u[s],c=o[l],f=P(o[l].serializedName);a.push(f[0]);var p=c.serializedName,h=c.xmlName,d=c.xmlElementName,y=n;""!==p&&void 0!==p&&(y=n+"."+p);var m=c.headerCollectionPrefix;if(m){for(var v={},g=0,b=Object.keys(r);g<b.length;g++){var w=b[g];w.startsWith(m)&&(v[w.substring(m.length)]=e.deserialize(c.type.value,r[w],y)),a.push(w)}i[l]=v}else if(e.isXML)if(c.xmlIsAttribute&&r.$)i[l]=e.deserialize(c,r.$[h],y);else{var E=r[d||h||p];if(c.xmlIsWrapped)void 0===(E=(E=r[h])&&E[d])&&(E=[]);i[l]=e.deserialize(c,E,y)}else{for(var R=void 0,T=r,_=0,N=f;_<N.length;_++){var q=N[_];if(!T)break;T=T[q]}R=T;var C=t.type.polymorphicDiscriminator;C&&l===C.clientName&&null==R&&(R=t.serializedName);var D=void 0;if(Array.isArray(r[l])&&""===o[l].serializedName){R=r[l];for(var U=e.deserialize(c,R,y),I=0,H=Object.entries(i);I<H.length;I++){var M=H[I],L=M[0],k=M[1];U.hasOwnProperty(L)||(U[L]=k)}i=U}else void 0===R&&void 0===c.defaultValue||(D=e.deserialize(c,R,y),i[l]=D)}}var j=t.type.additionalProperties;if(j){var z=function(e){for(var t in o){if(P(o[t].serializedName)[0]===e)return!1}return!0};for(var B in r)z(B)&&(i[B]=e.deserialize(j,r[B],n+'["'+B+'"]'))}else if(r)for(var F=0,Q=Object.keys(r);F<Q.length;F++){l=Q[F];void 0!==i[l]||a.includes(l)||O(l)||(i[l]=r[l])}return i}(this,e,t,r):(this.isXML&&null!=t.$&&null!=t._&&(t=t._),null!==o.match(/^Number$/gi)?(n=parseFloat(t),isNaN(n)&&(n=t)):null!==o.match(/^Boolean$/gi)?n="true"===t||"false"!==t&&t:null!==o.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/gi)?n=t:null!==o.match(/^(Date|DateTime|DateTimeRfc1123)$/gi)?n=new Date(t):null!==o.match(/^UnixTime$/gi)?n=function(e){if(!e)return;return new Date(1e3*e)}(t):null!==o.match(/^ByteArray$/gi)?n=a(t):null!==o.match(/^Base64Url$/gi)?n=function(e){if(!e)return;if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return a(e=e.replace(/\-/g,"+").replace(/\_/g,"/"))}(t):null!==o.match(/^Sequence$/gi)?n=function(e,t,r,n){var o=t.type.element;if(!o||"object"!=typeof o)throw new Error('element" metadata for an Array must be defined in the mapper and it must of type "object" in '+n);if(r){Array.isArray(r)||(r=[r]);for(var i=[],a=0;a<r.length;a++)i[a]=e.deserialize(o,r[a],n+"["+a+"]");return i}return r}(this,e,t,r):null!==o.match(/^Dictionary$/gi)&&(n=function(e,t,r,n){var o=t.type.value;if(!o||"object"!=typeof o)throw new Error('"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in '+n);if(r){for(var i={},a=0,s=Object.keys(r);a<s.length;a++){var u=s[a];i[u]=e.deserialize(o,r[u],n)}return i}return r}(this,e,t,r))),e.isConstant&&(n=e.defaultValue),n},e}();function P(e){var t=[],r="";if(e)for(var n=0,o=e.split(".");n<o.length;n++){var i=o[n];"\\"===i.charAt(i.length-1)?r+=i.substr(0,i.length-1)+".":(r+=i,t.push(r),r="")}return t}function S(e,t,r){var n=t.type.modelProperties;if(!n){var o=t.type.className;if(!o)throw new Error('Class name for model "'+r+'" is not provided in the mapper "'+JSON.stringify(t,void 0,2)+'".');var i=e.modelMappers[o];if(!i)throw new Error('mapper() cannot be null or undefined for model "'+o+'".');if(!(n=i.type.modelProperties))throw new Error('modelProperties cannot be null or undefined in the mapper "'+JSON.stringify(i)+'" of type "'+o+'" for object "'+r+'".')}return n}function O(e){return["$","_"].includes(e)}function A(e,t,r,n){var o=x(e,t);if(o){var i=o[n];if(null!=i){var a=r[i];if(null!=a){var s=t.type.uberParent||t.type.className,u=a===s?a:s+"."+a,l=e.modelMappers.discriminators[u];l&&(t=l)}}}return t}function x(e,t){return t.type.polymorphicDiscriminator||N(e,t.type.uberParent)||N(e,t.type.className)}function N(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}var q=function(e){for(var t={},r=0,n=e;r<n.length;r++){var o=n[r];t[o]=o}return t}(["Base64Url","Boolean","ByteArray","Composite","Date","DateTime","DateTimeRfc1123","Dictionary","Enum","Number","Object","Sequence","String","Stream","TimeSpan","UnixTime"]);var C=function(){function e(e,t,n,i,a,s,u,l,c,f,p,h,d,y,m){this.streamResponseBody=s,this.url=e||"",this.method=t||"GET",this.headers=r(a)?a:new o(a),this.body=n,this.query=i,this.formData=void 0,this.withCredentials=u||!1,this.abortSignal=l,this.timeout=c||0,this.onUploadProgress=f,this.onDownloadProgress=p,this.proxySettings=h,this.keepAlive=d,this.agentSettings=y,this.redirectLimit=m}return e.prototype.validateRequestProperties=function(){if(!this.method)throw new Error("WebResource.method is required.");if(!this.url)throw new Error("WebResource.url is required.")},e.prototype.prepare=function(e){if(!e)throw new Error("options object is required");if(null==e.method||"string"!=typeof e.method.valueOf())throw new Error("options.method must be a string.");if(e.url&&e.pathTemplate)throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.");if(!(null!=e.pathTemplate&&"string"==typeof e.pathTemplate.valueOf()||null!=e.url&&"string"==typeof e.url.valueOf()))throw new Error("Please provide exactly one of options.pathTemplate or options.url.");if(e.url){if("string"!=typeof e.url)throw new Error('options.url must be of type "string".');this.url=e.url}if(e.method){var t=["GET","PUT","HEAD","DELETE","OPTIONS","POST","PATCH","TRACE"];if(-1===t.indexOf(e.method.toUpperCase()))throw new Error('The provided method "'+e.method+'" is invalid. Supported HTTP methods are: '+JSON.stringify(t))}if(this.method=e.method.toUpperCase(),e.pathTemplate){var r=e.pathTemplate,n=e.pathParameters;if("string"!=typeof r)throw new Error('options.pathTemplate must be of type "string".');e.baseUrl||(e.baseUrl="https://management.azure.com");var o=e.baseUrl,i=o+(o.endsWith("/")?"":"/")+(r.startsWith("/")?r.slice(1):r),a=i.match(/({\w*\s*\w*})/gi);if(a&&a.length){if(!n)throw new Error("pathTemplate: "+r+" has been provided. Hence, options.pathParameters must also be provided.");a.forEach((function(e){var t=e.slice(1,-1),o=n[t];if(null==o||"string"!=typeof o&&"object"!=typeof o)throw new Error("pathTemplate: "+r+" contains the path parameter "+t+" however, it is not present in "+n+" - "+JSON.stringify(n,void 0,2)+'.The value of the path parameter can either be a "string" of the form { '+t+': "some sample value" } or it can be an "object" of the form { "'+t+'": { value: "some sample value", skipUrlEncoding: true } }.');if("string"==typeof o.valueOf()&&(i=i.replace(e,encodeURIComponent(o))),"object"==typeof o.valueOf()){if(!o.value)throw new Error("options.pathParameters["+t+'] is of type "object" but it does not contain a "value" property.');i=o.skipUrlEncoding?i.replace(e,o.value):i.replace(e,encodeURIComponent(o.value))}}))}this.url=i}if(e.queryParameters){var s=e.queryParameters;if("object"!=typeof s)throw new Error('options.queryParameters must be of type object. It should be a JSON object of "query-parameter-name" as the key and the "query-parameter-value" as the value. The "query-parameter-value" may be fo type "string" or an "object" of the form { value: "query-parameter-value", skipUrlEncoding: true }.');this.url&&-1===this.url.indexOf("?")&&(this.url+="?");var u=[];for(var l in this.query={},s){var c=s[l];if(c)if("string"==typeof c)u.push(l+"="+encodeURIComponent(c)),this.query[l]=encodeURIComponent(c);else if("object"==typeof c){if(!c.value)throw new Error("options.queryParameters["+l+'] is of type "object" but it does not contain a "value" property.');c.skipUrlEncoding?(u.push(l+"="+c.value),this.query[l]=c.value):(u.push(l+"="+encodeURIComponent(c.value)),this.query[l]=encodeURIComponent(c.value))}}this.url+=u.join("&")}if(e.headers)for(var f=e.headers,p=0,h=Object.keys(e.headers);p<h.length;p++){var d=h[p];this.headers.set(d,f[d])}return this.headers.get("accept-language")||this.headers.set("accept-language","en-US"),this.headers.get("x-ms-client-request-id")||e.disableClientRequestId||this.headers.set("x-ms-client-request-id",b()),this.headers.get("Content-Type")||this.headers.set("Content-Type","application/json; charset=utf-8"),this.body=e.body,null!=e.body&&(e.bodyIsStream?(this.headers.get("Transfer-Encoding")||this.headers.set("Transfer-Encoding","chunked"),"application/octet-stream"!==this.headers.get("Content-Type")&&this.headers.set("Content-Type","application/octet-stream")):(e.serializationMapper&&(this.body=new _(e.mappers).serialize(e.serializationMapper,e.body,"requestBody")),e.disableJsonStringifyOnBody||(this.body=JSON.stringify(e.body)))),this.abortSignal=e.abortSignal,this.onDownloadProgress=e.onDownloadProgress,this.onUploadProgress=e.onUploadProgress,this.redirectLimit=e.redirectLimit,this.streamResponseBody=e.streamResponseBody,this},e.prototype.clone=function(){var t=new e(this.url,this.method,this.body,this.query,this.headers&&this.headers.clone(),this.streamResponseBody,this.withCredentials,this.abortSignal,this.timeout,this.onUploadProgress,this.onDownloadProgress,this.proxySettings,this.keepAlive,this.agentSettings,this.redirectLimit);return this.formData&&(t.formData=this.formData),this.operationSpec&&(t.operationSpec=this.operationSpec),this.shouldDeserialize&&(t.shouldDeserialize=this.shouldDeserialize),this.operationResponseGetter&&(t.operationResponseGetter=this.operationResponseGetter),t},e}(),D=function(e,t){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).msRest={})}(this,(function(e){"use strict";function t(e){return e.toLowerCase()}function r(e){return!(!e||"object"!=typeof e)&&("function"==typeof e.rawHeaders&&"function"==typeof e.clone&&"function"==typeof e.get&&"function"==typeof e.set&&"function"==typeof e.contains&&"function"==typeof e.remove&&"function"==typeof e.headersArray&&"function"==typeof e.headerValues&&"function"==typeof e.headerNames&&"function"==typeof e.toJson)}var n,o=function(){function e(e){if(this._headersMap={},e)for(var t in e)this.set(t,e[t])}return e.prototype.set=function(e,r){this._headersMap[t(e)]={name:e,value:r.toString()}},e.prototype.get=function(e){var r=this._headersMap[t(e)];return r?r.value:void 0},e.prototype.contains=function(e){return!!this._headersMap[t(e)]},e.prototype.remove=function(e){var r=this.contains(e);return delete this._headersMap[t(e)],r},e.prototype.rawHeaders=function(){var e={};for(var t in this._headersMap){var r=this._headersMap[t];e[r.name.toLowerCase()]=r.value}return e},e.prototype.headersArray=function(){var e=[];for(var t in this._headersMap)e.push(this._headersMap[t]);return e},e.prototype.headerNames=function(){for(var e=[],t=this.headersArray(),r=0;r<t.length;++r)e.push(t[r].name);return e},e.prototype.headerValues=function(){for(var e=[],t=this.headersArray(),r=0;r<t.length;++r)e.push(t[r].value);return e},e.prototype.toJson=function(){return this.rawHeaders()},e.prototype.toString=function(){return JSON.stringify(this.toJson())},e.prototype.clone=function(){return new e(this.rawHeaders())},e}();function i(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function a(e){for(var t=atob(e),r=new Uint8Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}var s=new Uint8Array(16);function u(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(s)}var l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function c(e){return"string"==typeof e&&l.test(e)}for(var f=[],p=0;p<256;++p)f.push((p+256).toString(16).substr(1));function h(e,t,r){var n=(e=e||{}).random||(e.rng||u)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(f[e[t+0]]+f[e[t+1]]+f[e[t+2]]+f[e[t+3]]+"-"+f[e[t+4]]+f[e[t+5]]+"-"+f[e[t+6]]+f[e[t+7]]+"-"+f[e[t+8]]+f[e[t+9]]+"-"+f[e[t+10]]+f[e[t+11]]+f[e[t+12]]+f[e[t+13]]+f[e[t+14]]+f[e[t+15]]).toLowerCase();if(!c(r))throw TypeError("Stringified UUID is invalid");return r}(n)}var d={msRestVersion:"2.6.1",HTTP:"http:",HTTPS:"https:",HTTP_PROXY:"HTTP_PROXY",HTTPS_PROXY:"HTTPS_PROXY",NO_PROXY:"NO_PROXY",ALL_PROXY:"ALL_PROXY",HttpConstants:{HttpVerbs:{PUT:"PUT",GET:"GET",DELETE:"DELETE",POST:"POST",MERGE:"MERGE",HEAD:"HEAD",PATCH:"PATCH"},StatusCodes:{TooManyRequests:429}},HeaderConstants:{AUTHORIZATION:"authorization",AUTHORIZATION_SCHEME:"Bearer",RETRY_AFTER:"Retry-After",USER_AGENT:"User-Agent"}},y="undefined"!=typeof process&&!!process.version&&!!process.versions&&!!process.versions.node;function m(e){var t={};return t.body=e.bodyAsText,t.headers=e.headers,t.status=e.status,t}function v(e){var t=e.clone();return t.headers&&t.headers.remove("authorization"),t}function g(e){return new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","ig").test(e)}function b(){return h()}function w(e,t){return new Promise((function(r){return setTimeout((function(){return r(t)}),e)}))}var E=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function R(e){return E.test(e)}function T(e,t,r){return e&&t?e.split(t).join(r||""):e}var _=function(){function e(e,t){void 0===e&&(e={}),this.modelMappers=e,this.isXML=t}return e.prototype.validateConstraints=function(e,t,r){var n=function(e,n){throw new Error('"'+r+'" with value "'+t+'" should satisfy the constraint "'+e+'": '+n+".")};if(e.constraints&&null!=t){var o=e.constraints,i=o.ExclusiveMaximum,a=o.ExclusiveMinimum,s=o.InclusiveMaximum,u=o.InclusiveMinimum,l=o.MaxItems,c=o.MaxLength,f=o.MinItems,p=o.MinLength,h=o.MultipleOf,d=o.Pattern,y=o.UniqueItems;if(null!=i&&t>=i&&n("ExclusiveMaximum",i),null!=a&&t<=a&&n("ExclusiveMinimum",a),null!=s&&t>s&&n("InclusiveMaximum",s),null!=u&&t<u&&n("InclusiveMinimum",u),null!=l&&t.length>l&&n("MaxItems",l),null!=c&&t.length>c&&n("MaxLength",c),null!=f&&t.length<f&&n("MinItems",f),null!=p&&t.length<p&&n("MinLength",p),null!=h&&t%h!=0&&n("MultipleOf",h),d){var m="string"==typeof d?new RegExp(d):d;"string"==typeof t&&null!==t.match(m)||n("Pattern",d)}y&&t.some((function(e,t,r){return r.indexOf(e)!==t}))&&n("UniqueItems",y)}},e.prototype.serialize=function(e,t,r){var n={},o=e.type.name;r||(r=e.serializedName),null!==o.match(/^Sequence$/gi)&&(n=[]),e.isConstant&&(t=e.defaultValue);var a=e.required,s=e.nullable;if(a&&s&&void 0===t)throw new Error(r+" cannot be undefined.");if(a&&!s&&null==t)throw new Error(r+" cannot be null or undefined.");if(!a&&!1===s&&null===t)throw new Error(r+" cannot be null.");if(null==t)n=t;else if(this.validateConstraints(e,t,r),null!==o.match(/^any$/gi))n=t;else if(null!==o.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/gi))n=function(e,t,r){if(null!=r)if(null!==e.match(/^Number$/gi)){if("number"!=typeof r)throw new Error(t+" with value "+r+" must be of type number.")}else if(null!==e.match(/^String$/gi)){if("string"!=typeof r.valueOf())throw new Error(t+' with value "'+r+'" must be of type string.')}else if(null!==e.match(/^Uuid$/gi)){if("string"!=typeof r.valueOf()||!g(r))throw new Error(t+' with value "'+r+'" must be of type string and a valid uuid.')}else if(null!==e.match(/^Boolean$/gi)){if("boolean"!=typeof r)throw new Error(t+" with value "+r+" must be of type boolean.")}else if(null!==e.match(/^Stream$/gi)){var n=typeof r;if(!("string"===n||"function"===n||r instanceof ArrayBuffer||ArrayBuffer.isView(r)||"function"==typeof Blob&&r instanceof Blob))throw new Error(t+" must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.")}return r}(o,r,t);else if(null!==o.match(/^Enum$/gi)){n=function(e,t,r){if(!t)throw new Error("Please provide a set of allowedValues to validate "+e+" as an Enum Type.");if(!t.some((function(e){return"string"==typeof e.valueOf()?e.toLowerCase()===r.toLowerCase():e===r})))throw new Error(r+" is not a valid value for "+e+". The valid values are: "+JSON.stringify(t)+".");return r}(r,e.type.allowedValues,t)}else null!==o.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/gi)?n=function(e,t,r){if(null!=t)if(null!==e.match(/^Date$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in ISO8601 format.");t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in ISO8601 format.");t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in RFC-1123 format.");t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.");t=function(e){if(!e)return;"string"==typeof e.valueOf()&&(e=new Date(e));return Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/gi)){if(!R(t))throw new Error(r+' must be a string in ISO 8601 format. Instead was "'+t+'".');t=t}return t}(o,t,r):null!==o.match(/^ByteArray$/gi)?n=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(e+" must be of type Uint8Array.");t=i(t)}return t}(r,t):null!==o.match(/^Base64Url$/gi)?n=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(e+" must be of type Uint8Array.");t=function(e){if(!e)return;if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e,t){var r=e.length;for(;r-1>=0&&e[r-1]===t;)--r;return e.substr(0,r)}(i(e),"=").replace(/\+/g,"-").replace(/\//g,"_")}(t)}return t}(r,t):null!==o.match(/^Sequence$/gi)?n=function(e,t,r,n){if(!Array.isArray(r))throw new Error(n+" must be of type Array.");var o=t.type.element;if(!o||"object"!=typeof o)throw new Error('element" metadata for an Array must be defined in the mapper and it must of type "object" in '+n+".");for(var i=[],a=0;a<r.length;a++)i[a]=e.serialize(o,r[a],n);return i}(this,e,t,r):null!==o.match(/^Dictionary$/gi)?n=function(e,t,r,n){if("object"!=typeof r)throw new Error(n+" must be of type object.");var o=t.type.value;if(!o||"object"!=typeof o)throw new Error('"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in '+n+".");for(var i={},a=0,s=Object.keys(r);a<s.length;a++){var u=s[a];i[u]=e.serialize(o,r[u],n+"."+u)}return i}(this,e,t,r):null!==o.match(/^Composite$/gi)&&(n=function(e,t,r,n){var o;x(e,t)&&(t=A(e,t,r,"clientName"));if(null!=r){for(var i={},a=S(e,t,n),s=0,u=Object.keys(a);s<u.length;s++){var l=u[s],c=a[l];if(!c.readOnly){var f=void 0,p=i;if(e.isXML)f=c.xmlIsWrapped?c.xmlName:c.xmlElementName||c.xmlName;else{var h=P(c.serializedName);f=h.pop();for(var d=0,y=h;d<y.length;d++){var m=y[d];null==p[m]&&null!=r[l]&&(p[m]={}),p=p[m]}}if(null!=p){var v=""!==c.serializedName?n+"."+c.serializedName:n,g=r[l],b=x(e,t);b&&b.clientName===l&&null==g&&(g=t.serializedName);var w=e.serialize(c,g,v);void 0!==w&&null!=f&&(c.xmlIsAttribute?(p.$=p.$||{},p.$[f]=w):c.xmlIsWrapped?p[f]=((o={})[c.xmlElementName]=w,o):p[f]=w)}}}var E=t.type.additionalProperties;if(E){var R=Object.keys(a),T=function(t){R.every((function(e){return e!==t}))&&(i[t]=e.serialize(E,r[t],n+'["'+t+'"]'))};for(var _ in r)T(_)}return i}return r}(this,e,t,r));return n},e.prototype.deserialize=function(e,t,r){if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;var n,o=e.type.name;return r||(r=e.serializedName),null!==o.match(/^Composite$/gi)?n=function(e,t,r,n){x(e,t)&&(t=A(e,t,r,"serializedName"));for(var o=S(e,t,n),i={},a=[],s=0,u=Object.keys(o);s<u.length;s++){var l=u[s],c=o[l],f=P(o[l].serializedName);a.push(f[0]);var p=c.serializedName,h=c.xmlName,d=c.xmlElementName,y=n;""!==p&&void 0!==p&&(y=n+"."+p);var m=c.headerCollectionPrefix;if(m){for(var v={},g=0,b=Object.keys(r);g<b.length;g++){var w=b[g];w.startsWith(m)&&(v[w.substring(m.length)]=e.deserialize(c.type.value,r[w],y)),a.push(w)}i[l]=v}else if(e.isXML)if(c.xmlIsAttribute&&r.$)i[l]=e.deserialize(c,r.$[h],y);else{var E=r[d||h||p];if(c.xmlIsWrapped)void 0===(E=(E=r[h])&&E[d])&&(E=[]);i[l]=e.deserialize(c,E,y)}else{for(var R=void 0,T=r,_=0,N=f;_<N.length;_++){var q=N[_];if(!T)break;T=T[q]}R=T;var C=t.type.polymorphicDiscriminator;C&&l===C.clientName&&null==R&&(R=t.serializedName);var D=void 0;if(Array.isArray(r[l])&&""===o[l].serializedName){R=r[l];for(var U=e.deserialize(c,R,y),I=0,H=Object.entries(i);I<H.length;I++){var M=H[I],L=M[0],k=M[1];U.hasOwnProperty(L)||(U[L]=k)}i=U}else void 0===R&&void 0===c.defaultValue||(D=e.deserialize(c,R,y),i[l]=D)}}var j=t.type.additionalProperties;if(j){var z=function(e){for(var t in o){if(P(o[t].serializedName)[0]===e)return!1}return!0};for(var B in r)z(B)&&(i[B]=e.deserialize(j,r[B],n+'["'+B+'"]'))}else if(r)for(var F=0,Q=Object.keys(r);F<Q.length;F++){l=Q[F];void 0!==i[l]||a.includes(l)||O(l)||(i[l]=r[l])}return i}(this,e,t,r):(this.isXML&&null!=t.$&&null!=t._&&(t=t._),null!==o.match(/^Number$/gi)?(n=parseFloat(t),isNaN(n)&&(n=t)):null!==o.match(/^Boolean$/gi)?n="true"===t||"false"!==t&&t:null!==o.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/gi)?n=t:null!==o.match(/^(Date|DateTime|DateTimeRfc1123)$/gi)?n=new Date(t):null!==o.match(/^UnixTime$/gi)?n=function(e){if(!e)return;return new Date(1e3*e)}(t):null!==o.match(/^ByteArray$/gi)?n=a(t):null!==o.match(/^Base64Url$/gi)?n=function(e){if(!e)return;if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return a(e=e.replace(/\-/g,"+").replace(/\_/g,"/"))}(t):null!==o.match(/^Sequence$/gi)?n=function(e,t,r,n){var o=t.type.element;if(!o||"object"!=typeof o)throw new Error('element" metadata for an Array must be defined in the mapper and it must of type "object" in '+n);if(r){Array.isArray(r)||(r=[r]);for(var i=[],a=0;a<r.length;a++)i[a]=e.deserialize(o,r[a],n+"["+a+"]");return i}return r}(this,e,t,r):null!==o.match(/^Dictionary$/gi)&&(n=function(e,t,r,n){var o=t.type.value;if(!o||"object"!=typeof o)throw new Error('"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in '+n);if(r){for(var i={},a=0,s=Object.keys(r);a<s.length;a++){var u=s[a];i[u]=e.deserialize(o,r[u],n)}return i}return r}(this,e,t,r))),e.isConstant&&(n=e.defaultValue),n},e}();function P(e){var t=[],r="";if(e)for(var n=0,o=e.split(".");n<o.length;n++){var i=o[n];"\\"===i.charAt(i.length-1)?r+=i.substr(0,i.length-1)+".":(r+=i,t.push(r),r="")}return t}function S(e,t,r){var n=t.type.modelProperties;if(!n){var o=t.type.className;if(!o)throw new Error('Class name for model "'+r+'" is not provided in the mapper "'+JSON.stringify(t,void 0,2)+'".');var i=e.modelMappers[o];if(!i)throw new Error('mapper() cannot be null or undefined for model "'+o+'".');if(!(n=i.type.modelProperties))throw new Error('modelProperties cannot be null or undefined in the mapper "'+JSON.stringify(i)+'" of type "'+o+'" for object "'+r+'".')}return n}function O(e){return["$","_"].includes(e)}function A(e,t,r,n){var o=x(e,t);if(o){var i=o[n];if(null!=i){var a=r[i];if(null!=a){var s=t.type.uberParent||t.type.className,u=a===s?a:s+"."+a,l=e.modelMappers.discriminators[u];l&&(t=l)}}}return t}function x(e,t){return t.type.polymorphicDiscriminator||N(e,t.type.uberParent)||N(e,t.type.className)}function N(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}var q=function(e){for(var t={},r=0,n=e;r<n.length;r++){var o=n[r];t[o]=o}return t}(["Base64Url","Boolean","ByteArray","Composite","Date","DateTime","DateTimeRfc1123","Dictionary","Enum","Number","Object","Sequence","String","Stream","TimeSpan","UnixTime"]);var C=function(){function e(e,t,n,i,a,s,u,l,c,f,p,h,d,y,m){this.streamResponseBody=s,this.url=e||"",this.method=t||"GET",this.headers=r(a)?a:new o(a),this.body=n,this.query=i,this.formData=void 0,this.withCredentials=u||!1,this.abortSignal=l,this.timeout=c||0,this.onUploadProgress=f,this.onDownloadProgress=p,this.proxySettings=h,this.keepAlive=d,this.agentSettings=y,this.redirectLimit=m}return e.prototype.validateRequestProperties=function(){if(!this.method)throw new Error("WebResource.method is required.");if(!this.url)throw new Error("WebResource.url is required.")},e.prototype.prepare=function(e){if(!e)throw new Error("options object is required");if(null==e.method||"string"!=typeof e.method.valueOf())throw new Error("options.method must be a string.");if(e.url&&e.pathTemplate)throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.");if(!(null!=e.pathTemplate&&"string"==typeof e.pathTemplate.valueOf()||null!=e.url&&"string"==typeof e.url.valueOf()))throw new Error("Please provide exactly one of options.pathTemplate or options.url.");if(e.url){if("string"!=typeof e.url)throw new Error('options.url must be of type "string".');this.url=e.url}if(e.method){var t=["GET","PUT","HEAD","DELETE","OPTIONS","POST","PATCH","TRACE"];if(-1===t.indexOf(e.method.toUpperCase()))throw new Error('The provided method "'+e.method+'" is invalid. Supported HTTP methods are: '+JSON.stringify(t))}if(this.method=e.method.toUpperCase(),e.pathTemplate){var r=e.pathTemplate,n=e.pathParameters;if("string"!=typeof r)throw new Error('options.pathTemplate must be of type "string".');e.baseUrl||(e.baseUrl="https://management.azure.com");var o=e.baseUrl,i=o+(o.endsWith("/")?"":"/")+(r.startsWith("/")?r.slice(1):r),a=i.match(/({\w*\s*\w*})/gi);if(a&&a.length){if(!n)throw new Error("pathTemplate: "+r+" has been provided. Hence, options.pathParameters must also be provided.");a.forEach((function(e){var t=e.slice(1,-1),o=n[t];if(null==o||"string"!=typeof o&&"object"!=typeof o)throw new Error("pathTemplate: "+r+" contains the path parameter "+t+" however, it is not present in "+n+" - "+JSON.stringify(n,void 0,2)+'.The value of the path parameter can either be a "string" of the form { '+t+': "some sample value" } or it can be an "object" of the form { "'+t+'": { value: "some sample value", skipUrlEncoding: true } }.');if("string"==typeof o.valueOf()&&(i=i.replace(e,encodeURIComponent(o))),"object"==typeof o.valueOf()){if(!o.value)throw new Error("options.pathParameters["+t+'] is of type "object" but it does not contain a "value" property.');i=o.skipUrlEncoding?i.replace(e,o.value):i.replace(e,encodeURIComponent(o.value))}}))}this.url=i}if(e.queryParameters){var s=e.queryParameters;if("object"!=typeof s)throw new Error('options.queryParameters must be of type object. It should be a JSON object of "query-parameter-name" as the key and the "query-parameter-value" as the value. The "query-parameter-value" may be fo type "string" or an "object" of the form { value: "query-parameter-value", skipUrlEncoding: true }.');this.url&&-1===this.url.indexOf("?")&&(this.url+="?");var u=[];for(var l in this.query={},s){var c=s[l];if(c)if("string"==typeof c)u.push(l+"="+encodeURIComponent(c)),this.query[l]=encodeURIComponent(c);else if("object"==typeof c){if(!c.value)throw new Error("options.queryParameters["+l+'] is of type "object" but it does not contain a "value" property.');c.skipUrlEncoding?(u.push(l+"="+c.value),this.query[l]=c.value):(u.push(l+"="+encodeURIComponent(c.value)),this.query[l]=encodeURIComponent(c.value))}}this.url+=u.join("&")}if(e.headers)for(var f=e.headers,p=0,h=Object.keys(e.headers);p<h.length;p++){var d=h[p];this.headers.set(d,f[d])}return this.headers.get("accept-language")||this.headers.set("accept-language","en-US"),this.headers.get("x-ms-client-request-id")||e.disableClientRequestId||this.headers.set("x-ms-client-request-id",b()),this.headers.get("Content-Type")||this.headers.set("Content-Type","application/json; charset=utf-8"),this.body=e.body,null!=e.body&&(e.bodyIsStream?(this.headers.get("Transfer-Encoding")||this.headers.set("Transfer-Encoding","chunked"),"application/octet-stream"!==this.headers.get("Content-Type")&&this.headers.set("Content-Type","application/octet-stream")):(e.serializationMapper&&(this.body=new _(e.mappers).serialize(e.serializationMapper,e.body,"requestBody")),e.disableJsonStringifyOnBody||(this.body=JSON.stringify(e.body)))),this.abortSignal=e.abortSignal,this.onDownloadProgress=e.onDownloadProgress,this.onUploadProgress=e.onUploadProgress,this.redirectLimit=e.redirectLimit,this.streamResponseBody=e.streamResponseBody,this},e.prototype.clone=function(){var t=new e(this.url,this.method,this.body,this.query,this.headers&&this.headers.clone(),this.streamResponseBody,this.withCredentials,this.abortSignal,this.timeout,this.onUploadProgress,this.onDownloadProgress,this.proxySettings,this.keepAlive,this.agentSettings,this.redirectLimit);return this.formData&&(t.formData=this.formData),this.operationSpec&&(t.operationSpec=this.operationSpec),this.shouldDeserialize&&(t.shouldDeserialize=this.shouldDeserialize),this.operationResponseGetter&&(t.operationResponseGetter=this.operationResponseGetter),t},e}(),D=function(e,t){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};
/*! *****************************************************************************

@@ -8,0 +8,0 @@ Copyright (c) Microsoft Corporation.

/// <reference path="../../dom-shim.d.ts" />
export { WebResource, WebResourceLike, HttpRequestBody, RequestPrepareOptions, HttpMethods, ParameterValue, RequestOptionsBase, TransferProgressEvent, AbortSignalLike, } from "./webResource";
export { DefaultHttpClient } from "./defaultHttpClient";
export { CommonRequestInfo, CommonRequestInit, CommonResponse } from "./fetchHttpClient";
export { HttpClient } from "./httpClient";
export { HttpHeaders, HttpHeadersLike } from "./httpHeaders";
export { HttpHeader, HttpHeaders, HttpHeadersLike, RawHttpHeaders } from "./httpHeaders";
export { HttpOperationResponse, HttpResponse, RestResponse } from "./httpOperationResponse";

@@ -11,6 +12,6 @@ export { HttpPipelineLogger } from "./httpPipelineLogger";

export { OperationArguments } from "./operationArguments";
export { OperationParameter, OperationQueryParameter, OperationURLParameter, } from "./operationParameter";
export { OperationParameter, OperationQueryParameter, OperationURLParameter, ParameterPath, } from "./operationParameter";
export { OperationResponse } from "./operationResponse";
export { OperationSpec } from "./operationSpec";
export { ServiceClient, ServiceClientOptions, flattenResponse } from "./serviceClient";
export { AgentSettings, ProxySettings, ServiceClient, ServiceClientOptions, flattenResponse, } from "./serviceClient";
export { QueryCollectionFormat } from "./queryCollectionFormat";

@@ -26,6 +27,6 @@ export { Constants } from "./util/constants";

export { getDefaultProxySettings, proxyPolicy } from "./policies/proxyPolicy";
export { redirectPolicy } from "./policies/redirectPolicy";
export { RedirectOptions, redirectPolicy } from "./policies/redirectPolicy";
export { signingPolicy } from "./policies/signingPolicy";
export { userAgentPolicy, getDefaultUserAgentValue } from "./policies/userAgentPolicy";
export { deserializationPolicy, deserializeResponseBody } from "./policies/deserializationPolicy";
export { TelemetryInfo, userAgentPolicy, getDefaultUserAgentValue, } from "./policies/userAgentPolicy";
export { DeserializationContentTypes, deserializationPolicy, deserializeResponseBody, } from "./policies/deserializationPolicy";
export { MapperType, SimpleMapperType, CompositeMapperType, DictionaryMapperType, SequenceMapperType, EnumMapperType, Mapper, BaseMapper, CompositeMapper, SequenceMapper, DictionaryMapper, EnumMapper, MapperConstraints, PolymorphicDiscriminator, Serializer, UrlParameterValue, serializeObject, } from "./serializer";

@@ -35,2 +36,3 @@ export { stripRequest, stripResponse, delay, executePromisesSequentially, generateUuid, encodeUri, ServiceCallback, promiseToCallback, promiseToServiceCallback, isValidUuid, applyMixins, isNode, isDuration, } from "./util/utils";

export { TokenCredentials } from "./credentials/tokenCredentials";
export { TokenResponse } from "./credentials/tokenResponse";
export { BasicAuthenticationCredentials } from "./credentials/basicAuthenticationCredentials";

@@ -37,0 +39,0 @@ export { ApiKeyCredentials, ApiKeyCredentialOptions } from "./credentials/apiKeyCredentials";

@@ -9,3 +9,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

export { RestError } from "./restError";
export { ServiceClient, flattenResponse } from "./serviceClient";
export { ServiceClient, flattenResponse, } from "./serviceClient";
export { QueryCollectionFormat } from "./queryCollectionFormat";

@@ -23,4 +23,4 @@ export { Constants } from "./util/constants";

export { signingPolicy } from "./policies/signingPolicy";
export { userAgentPolicy, getDefaultUserAgentValue } from "./policies/userAgentPolicy";
export { deserializationPolicy, deserializeResponseBody } from "./policies/deserializationPolicy";
export { userAgentPolicy, getDefaultUserAgentValue, } from "./policies/userAgentPolicy";
export { deserializationPolicy, deserializeResponseBody, } from "./policies/deserializationPolicy";
export { MapperType, Serializer, serializeObject, } from "./serializer";

@@ -27,0 +27,0 @@ export { stripRequest, stripResponse, delay, executePromisesSequentially, generateUuid, encodeUri, promiseToCallback, promiseToServiceCallback, isValidUuid, applyMixins, isNode, isDuration, } from "./util/utils";

@@ -9,3 +9,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

*/
msRestVersion: "2.6.0",
msRestVersion: "2.6.1",
/**

@@ -12,0 +12,0 @@ * Specifies HTTP.

@@ -18,4 +18,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

export { DefaultHttpClient } from "./defaultHttpClient";
export { CommonRequestInfo, CommonRequestInit, CommonResponse } from "./fetchHttpClient";
export { HttpClient } from "./httpClient";
export { HttpHeaders, HttpHeadersLike } from "./httpHeaders";
export { HttpHeader, HttpHeaders, HttpHeadersLike, RawHttpHeaders } from "./httpHeaders";
export { HttpOperationResponse, HttpResponse, RestResponse } from "./httpOperationResponse";

@@ -30,6 +31,13 @@ export { HttpPipelineLogger } from "./httpPipelineLogger";

OperationURLParameter,
ParameterPath,
} from "./operationParameter";
export { OperationResponse } from "./operationResponse";
export { OperationSpec } from "./operationSpec";
export { ServiceClient, ServiceClientOptions, flattenResponse } from "./serviceClient";
export {
AgentSettings,
ProxySettings,
ServiceClient,
ServiceClientOptions,
flattenResponse,
} from "./serviceClient";
export { QueryCollectionFormat } from "./queryCollectionFormat";

@@ -51,7 +59,15 @@ export { Constants } from "./util/constants";

export { getDefaultProxySettings, proxyPolicy } from "./policies/proxyPolicy";
export { redirectPolicy } from "./policies/redirectPolicy";
export { RedirectOptions, redirectPolicy } from "./policies/redirectPolicy";
export { signingPolicy } from "./policies/signingPolicy";
export { userAgentPolicy, getDefaultUserAgentValue } from "./policies/userAgentPolicy";
export { deserializationPolicy, deserializeResponseBody } from "./policies/deserializationPolicy";
export {
TelemetryInfo,
userAgentPolicy,
getDefaultUserAgentValue,
} from "./policies/userAgentPolicy";
export {
DeserializationContentTypes,
deserializationPolicy,
deserializeResponseBody,
} from "./policies/deserializationPolicy";
export {
MapperType,

@@ -94,2 +110,3 @@ SimpleMapperType,

export { TokenCredentials } from "./credentials/tokenCredentials";
export { TokenResponse } from "./credentials/tokenResponse";
export { BasicAuthenticationCredentials } from "./credentials/basicAuthenticationCredentials";

@@ -96,0 +113,0 @@ export { ApiKeyCredentials, ApiKeyCredentialOptions } from "./credentials/apiKeyCredentials";

@@ -10,3 +10,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

*/
msRestVersion: "2.6.0",
msRestVersion: "2.6.1",

@@ -13,0 +13,0 @@ /**

@@ -8,3 +8,3 @@ {

},
"version": "2.6.0",
"version": "2.6.1",
"description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest",

@@ -58,3 +58,3 @@ "tags": [

"form-data": "^2.5.0",
"node-fetch": "^2.6.0",
"node-fetch": "^2.6.7",
"tough-cookie": "^3.0.1",

@@ -68,2 +68,3 @@ "tslib": "^1.10.0",

"@azure/logger-js": "^1.1.0",
"@microsoft/api-extractor": "^7.18.11",
"@ts-common/azure-js-dev-tools": "^19.4.0",

@@ -83,3 +84,3 @@ "@types/chai": "^4.1.7",

"@types/tunnel": "0.0.1",
"@types/uuid": "^3.4.5",
"@types/uuid": "^8.3.2",
"@types/webpack": "^4.4.34",

@@ -89,3 +90,3 @@ "@types/webpack-dev-middleware": "^2.0.3",

"abortcontroller-polyfill": "^1.3.0",
"chai": "^4.2.0",
"chai": "4.3.4",
"cross-env": "^7.0.3",

@@ -145,3 +146,3 @@ "express": "^4.17.1",

"build:scripts": "tsc -p ./.scripts/",
"build:lib": "run-s build:tsc build:rollup build:minify-browser",
"build:lib": "run-s build:tsc build:rollup build:minify-browser extract-api",
"build:tsc": "tsc -p tsconfig.es.json",

@@ -151,3 +152,4 @@ "build:rollup": "rollup -c rollup.config.ts",

"build:test-browser": "webpack --config webpack.testconfig.ts",
"format": "prettier --write \"./**/*.ts\"",
"extract-api": "api-extractor run --local",
"format": "prettier --write \"./**/*.ts\" *.json",
"test": "run-p test:tslint test:unit test:karma",

@@ -154,0 +156,0 @@ "test:tslint": "tslint -p .",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc