@microsoft/sp-http-msgraph 1.17.4 → 1.18.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aec2bbfd-a968-4d5b-a279-12e570f378e6.manifest.json +69 -69
- package/dist/chunk.sp-http-msgraphclientv3_none_37eaff18c46b7ce9db23.js +1 -0
- package/dist/{chunk.vendors~sp-http-msgraphclient_none_cb6836c426084a659a25.js → chunk.vendors~sp-http-msgraphclient_none_6dc19ebbb8e88005be55.js} +1 -1
- package/dist/index-internal-beta.d.ts +3 -0
- package/dist/index-internal-public.d.ts +3 -0
- package/dist/index-internal.d.ts +3 -0
- package/dist/sp-http-msgraph_default_2105fa50f3deaaa74a06.js +1 -0
- package/dist/sp-http-msgraph_en-us_2105fa50f3deaaa74a06.js +1 -0
- package/dist/sp-http-msgraph_qps-ploc_2105fa50f3deaaa74a06.js +1 -0
- package/dist/sp-http-msgraph_qps-ploca_2105fa50f3deaaa74a06.js +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/MSGraphAuthenticationProvider.js +53 -0
- package/lib-commonjs/MSGraphClient.js +1 -1
- package/lib-commonjs/MSGraphClientFactory.js +3 -3
- package/lib-commonjs/MSGraphClientV3.js +136 -42
- package/lib-commonjs/common/Killswitches.js +29 -0
- package/package.json +10 -11
- package/dist/chunk.sp-http-msgraphclientv3_none_9194d8291da1e40a3800.js +0 -1
- package/dist/sp-http-msgraph_default_e370bbeacd07d817eeb6.js +0 -1
- package/dist/sp-http-msgraph_en-us_e370bbeacd07d817eeb6.js +0 -1
- package/dist/sp-http-msgraph_qps-ploc_e370bbeacd07d817eeb6.js +0 -1
- package/dist/sp-http-msgraph_qps-ploca_e370bbeacd07d817eeb6.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("aec2bbfd-a968-4d5b-a279-12e570f378e6_1.18.0",["tslib","@microsoft/sp-http-base","@microsoft/sp-loader","@microsoft/sp-core-library","@microsoft/sp-diagnostics"],function(n,a,i,r,o){return function(e){function t(t){for(var n,i,r=t[0],o=t[1],s=0,c=[];s<r.length;s++)i=r[s],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&c.push(a[i][0]),a[i]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);for(d&&d(t);c.length;)c.shift()()}var n={},a={0:0};function i(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.e=function(t){for(var n=[],o=function(e){return{1:[{i:"32b9363b-09ff-4959-929a-cab2663fb223",v:"3.0.2",m:"obDv"}]}[e]||[]}(t),s=0;s<o.length;s++)e[o[s].m]||function(t){n.push(r.SPComponentLoader.loadComponentById(t.i,t.v).then(function(n){e[t.m]=function(e){e.exports=n}}))}(o[s]);var c=a[t];if(0!==c)if(c)n.push(c[2]);else{var d=new Promise(function(e,n){c=a[t]=[e,n]});n.push(c[2]=d);var l,u=document.createElement("script");u.charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.src=function(e){return i.p+"chunk."+({1:"sp-http-msgraphclientv3",2:"vendors~sp-http-msgraphclient"}[e]||e)+"_"+"none"+"_"+{1:"37eaff18c46b7ce9db23",2:"6dc19ebbb8e88005be55"}[e]+".js"}(t),0!==u.src.indexOf(window.location.origin+"/")&&(u.crossOrigin="anonymous");var f=new Error;l=function(e){u.onerror=u.onload=null,clearTimeout(p);var n=a[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src;f.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",f.name="ChunkLoadError",f.type=i,f.request=r,n[1](f)}a[t]=void 0}};var p=setTimeout(function(){l({type:"timeout",target:u})},12e4);u.onerror=u.onload=l,document.head.appendChild(u)}return Promise.all(n)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var r=i("I6O9");i.oe=function(e){throw console.error(e),e};var o=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_18_0=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_18_0||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var c=0;c<o.length;c++)t(o[c]);var d=s;return function(){var e,t=document.getElementsByTagName("script"),n="undefined"!=typeof spScriptNamePattern?spScriptNamePattern:/sp\-http\-msgraph_en-us_2105fa50f3deaaa74a06\.js/i;if(t&&t.length)for(var a=0;a<t.length;a++)if(t[a]){var r=t[a].getAttribute("src");if(r&&r.match(n)){e=r.substring(0,r.lastIndexOf("/")+1);break}}if(!e)for(var o in window.__setWebpackPublicPathLoaderSrcRegistry__)if(o&&o.match(n)){e=o.substring(0,o.lastIndexOf("/")+1);break}i.p=e}(),i(i.s="mwqp")}({"17wl":function(e,t){e.exports=n},"2SXB":function(e,t){e.exports=a},"9vkt":function(e){e.exports=JSON.parse('{"e":"Sorry, we couldn\\u0027t make a connection to Microsoft Graph."}')},I6O9:function(e,t){e.exports=i},UWqr:function(e,t){e.exports=r},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"MSGraphClient",function(){return c}),n.d(t,"MSGraphClientFactory",function(){return l});var a=n("17wl"),i=n("UWqr"),r=n("ut3N"),o=n("2SXB"),s=n("9vkt"),c=function(){function e(t){var n=this;t.whenFinished(function(){e._graphBaseUrl=t.consume(o._GraphHttpClientContext.serviceKey).getGraphEndpointUrl(),e._instance||(e._instance=n._createGraphClientInstance(o._AadTokenProviders.configurable))})}return e.prototype.api=function(t,n){return i.Validate.isNonemptyString(t,"path"),e._instance.config=Object(a.__assign)(Object(a.__assign)({},e._originalConfig),n||{}),e._instance.api(t)},e.prototype._createGraphClientInstance=function(t){var n,a=this;if(!e._window.MicrosoftGraph||!e._window.MicrosoftGraph.Client)throw new Error(s.e);n=e._window.MicrosoftGraph.Client,e._window.MicrosoftGraph=void 0;var i=n.init({authProvider:function(e){a._getOAuthToken(t).then(function(t){e(void 0,t)}).catch(function(t){e(t,"")})},baseUrl:e._graphBaseUrl});return e._originalConfig=i.config,i},e.prototype._getOAuthToken=function(t){var n=new r._QosMonitor("MSGraphClient.FetchGraphToken");return t.getToken(e._graphBaseUrl).then(function(e){return n.writeSuccess(),e}).catch(function(e){throw n.writeUnexpectedFailure(e.message,e),e})},e._window=window,e}();function d(){return i._SPKillSwitch.isActivated("416713e6-ce26-48f7-9e12-28fe39f77b1e")}var l=function(){function e(e){this._serviceScope=e}return e.prototype.getClient=function(e,t){var a=this;if(e&&"1"!==e){if("3"!==e||i._SPKillSwitch.isActivated("24401914-15d6-4c3c-aeea-4aace46d5586"))throw Error("Not yet implemented.");var o=new r._QosMonitor("MSGraphClientFactory.GetClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return o.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0)}).catch(function(e){throw d()||o.writeUnexpectedFailure("ImportMSGraphV3ChunkFailed",e),e})}return c._instance?Promise.resolve(new c(this._serviceScope)):n.e(2).then(n.t.bind(null,"9EC8",7)).then(function(){return new c(a._serviceScope)})},e.prototype.getClientWithMiddleware=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetClientV3WithMiddleware");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3}),new e.default(a._serviceScope,void 0,t)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3ChunkFailed",e),e})},e.prototype.getClientInternal=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetInternalClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0,!0)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3ChunkFailed",e),e})},e.serviceKey=i.ServiceKey.create("sp-http:MSGraphClientFactory",e),e}()},ut3N:function(e,t){e.exports=o}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("aec2bbfd-a968-4d5b-a279-12e570f378e6_1.18.0",["tslib","@microsoft/sp-http-base","@microsoft/sp-loader","@microsoft/sp-core-library","@microsoft/sp-diagnostics"],function(n,a,i,r,o){return function(e){function t(t){for(var n,i,r=t[0],o=t[1],s=0,c=[];s<r.length;s++)i=r[s],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&c.push(a[i][0]),a[i]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);for(d&&d(t);c.length;)c.shift()()}var n={},a={0:0};function i(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.e=function(t){for(var n=[],o=function(e){return{1:[{i:"32b9363b-09ff-4959-929a-cab2663fb223",v:"3.0.2",m:"obDv"}]}[e]||[]}(t),s=0;s<o.length;s++)e[o[s].m]||function(t){n.push(r.SPComponentLoader.loadComponentById(t.i,t.v).then(function(n){e[t.m]=function(e){e.exports=n}}))}(o[s]);var c=a[t];if(0!==c)if(c)n.push(c[2]);else{var d=new Promise(function(e,n){c=a[t]=[e,n]});n.push(c[2]=d);var l,u=document.createElement("script");u.charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.src=function(e){return i.p+"chunk."+({1:"sp-http-msgraphclientv3",2:"vendors~sp-http-msgraphclient"}[e]||e)+"_"+"none"+"_"+{1:"37eaff18c46b7ce9db23",2:"6dc19ebbb8e88005be55"}[e]+".js"}(t),0!==u.src.indexOf(window.location.origin+"/")&&(u.crossOrigin="anonymous");var f=new Error;l=function(e){u.onerror=u.onload=null,clearTimeout(p);var n=a[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src;f.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",f.name="ChunkLoadError",f.type=i,f.request=r,n[1](f)}a[t]=void 0}};var p=setTimeout(function(){l({type:"timeout",target:u})},12e4);u.onerror=u.onload=l,document.head.appendChild(u)}return Promise.all(n)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var r=i("I6O9");i.oe=function(e){throw console.error(e),e};var o=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_18_0=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_18_0||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var c=0;c<o.length;c++)t(o[c]);var d=s;return function(){var e,t=document.getElementsByTagName("script"),n="undefined"!=typeof spScriptNamePattern?spScriptNamePattern:/sp\-http\-msgraph_qps-ploc_2105fa50f3deaaa74a06\.js/i;if(t&&t.length)for(var a=0;a<t.length;a++)if(t[a]){var r=t[a].getAttribute("src");if(r&&r.match(n)){e=r.substring(0,r.lastIndexOf("/")+1);break}}if(!e)for(var o in window.__setWebpackPublicPathLoaderSrcRegistry__)if(o&&o.match(n)){e=o.substring(0,o.lastIndexOf("/")+1);break}i.p=e}(),i(i.s="mwqp")}({"17wl":function(e,t){e.exports=n},"2SXB":function(e,t){e.exports=a},"9vkt":function(e){e.exports=JSON.parse('{"e":"[!!--##Śōŕŕŷ, ŵē ćōũĺďń\\u0027ţ màķē à ćōńńēćţĩōń ţō Mĩćŕōśōƒţ Ĝŕàƥĥ.##--!!]"}')},I6O9:function(e,t){e.exports=i},UWqr:function(e,t){e.exports=r},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"MSGraphClient",function(){return c}),n.d(t,"MSGraphClientFactory",function(){return l});var a=n("17wl"),i=n("UWqr"),r=n("ut3N"),o=n("2SXB"),s=n("9vkt"),c=function(){function e(t){var n=this;t.whenFinished(function(){e._graphBaseUrl=t.consume(o._GraphHttpClientContext.serviceKey).getGraphEndpointUrl(),e._instance||(e._instance=n._createGraphClientInstance(o._AadTokenProviders.configurable))})}return e.prototype.api=function(t,n){return i.Validate.isNonemptyString(t,"path"),e._instance.config=Object(a.__assign)(Object(a.__assign)({},e._originalConfig),n||{}),e._instance.api(t)},e.prototype._createGraphClientInstance=function(t){var n,a=this;if(!e._window.MicrosoftGraph||!e._window.MicrosoftGraph.Client)throw new Error(s.e);n=e._window.MicrosoftGraph.Client,e._window.MicrosoftGraph=void 0;var i=n.init({authProvider:function(e){a._getOAuthToken(t).then(function(t){e(void 0,t)}).catch(function(t){e(t,"")})},baseUrl:e._graphBaseUrl});return e._originalConfig=i.config,i},e.prototype._getOAuthToken=function(t){var n=new r._QosMonitor("MSGraphClient.FetchGraphToken");return t.getToken(e._graphBaseUrl).then(function(e){return n.writeSuccess(),e}).catch(function(e){throw n.writeUnexpectedFailure(e.message,e),e})},e._window=window,e}();function d(){return i._SPKillSwitch.isActivated("416713e6-ce26-48f7-9e12-28fe39f77b1e")}var l=function(){function e(e){this._serviceScope=e}return e.prototype.getClient=function(e,t){var a=this;if(e&&"1"!==e){if("3"!==e||i._SPKillSwitch.isActivated("24401914-15d6-4c3c-aeea-4aace46d5586"))throw Error("Not yet implemented.");var o=new r._QosMonitor("MSGraphClientFactory.GetClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return o.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0)}).catch(function(e){throw d()||o.writeUnexpectedFailure("ImportMSGraphV3ChunkFailed",e),e})}return c._instance?Promise.resolve(new c(this._serviceScope)):n.e(2).then(n.t.bind(null,"9EC8",7)).then(function(){return new c(a._serviceScope)})},e.prototype.getClientWithMiddleware=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetClientV3WithMiddleware");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3}),new e.default(a._serviceScope,void 0,t)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3ChunkFailed",e),e})},e.prototype.getClientInternal=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetInternalClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0,!0)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3ChunkFailed",e),e})},e.serviceKey=i.ServiceKey.create("sp-http:MSGraphClientFactory",e),e}()},ut3N:function(e,t){e.exports=o}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("aec2bbfd-a968-4d5b-a279-12e570f378e6_1.18.0",["tslib","@microsoft/sp-http-base","@microsoft/sp-loader","@microsoft/sp-core-library","@microsoft/sp-diagnostics"],function(n,a,i,r,o){return function(e){function t(t){for(var n,i,r=t[0],o=t[1],s=0,c=[];s<r.length;s++)i=r[s],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&c.push(a[i][0]),a[i]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);for(d&&d(t);c.length;)c.shift()()}var n={},a={0:0};function i(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.e=function(t){for(var n=[],o=function(e){return{1:[{i:"32b9363b-09ff-4959-929a-cab2663fb223",v:"3.0.2",m:"obDv"}]}[e]||[]}(t),s=0;s<o.length;s++)e[o[s].m]||function(t){n.push(r.SPComponentLoader.loadComponentById(t.i,t.v).then(function(n){e[t.m]=function(e){e.exports=n}}))}(o[s]);var c=a[t];if(0!==c)if(c)n.push(c[2]);else{var d=new Promise(function(e,n){c=a[t]=[e,n]});n.push(c[2]=d);var l,u=document.createElement("script");u.charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.src=function(e){return i.p+"chunk."+({1:"sp-http-msgraphclientv3",2:"vendors~sp-http-msgraphclient"}[e]||e)+"_"+"none"+"_"+{1:"37eaff18c46b7ce9db23",2:"6dc19ebbb8e88005be55"}[e]+".js"}(t),0!==u.src.indexOf(window.location.origin+"/")&&(u.crossOrigin="anonymous");var f=new Error;l=function(e){u.onerror=u.onload=null,clearTimeout(p);var n=a[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src;f.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",f.name="ChunkLoadError",f.type=i,f.request=r,n[1](f)}a[t]=void 0}};var p=setTimeout(function(){l({type:"timeout",target:u})},12e4);u.onerror=u.onload=l,document.head.appendChild(u)}return Promise.all(n)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var r=i("I6O9");i.oe=function(e){throw console.error(e),e};var o=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_18_0=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_18_0||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var c=0;c<o.length;c++)t(o[c]);var d=s;return function(){var e,t=document.getElementsByTagName("script"),n="undefined"!=typeof spScriptNamePattern?spScriptNamePattern:/sp\-http\-msgraph_qps-ploca_2105fa50f3deaaa74a06\.js/i;if(t&&t.length)for(var a=0;a<t.length;a++)if(t[a]){var r=t[a].getAttribute("src");if(r&&r.match(n)){e=r.substring(0,r.lastIndexOf("/")+1);break}}if(!e)for(var o in window.__setWebpackPublicPathLoaderSrcRegistry__)if(o&&o.match(n)){e=o.substring(0,o.lastIndexOf("/")+1);break}i.p=e}(),i(i.s="mwqp")}({"17wl":function(e,t){e.exports=n},"2SXB":function(e,t){e.exports=a},"9vkt":function(e){e.exports=JSON.parse('{"e":"Śōŕŕŷ, ŵē ćōũĺďń\\u0027ţ màķē à ćōńńēćţĩōń ţō Mĩćŕōśōƒţ Ĝŕàƥĥ."}')},I6O9:function(e,t){e.exports=i},UWqr:function(e,t){e.exports=r},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"MSGraphClient",function(){return c}),n.d(t,"MSGraphClientFactory",function(){return l});var a=n("17wl"),i=n("UWqr"),r=n("ut3N"),o=n("2SXB"),s=n("9vkt"),c=function(){function e(t){var n=this;t.whenFinished(function(){e._graphBaseUrl=t.consume(o._GraphHttpClientContext.serviceKey).getGraphEndpointUrl(),e._instance||(e._instance=n._createGraphClientInstance(o._AadTokenProviders.configurable))})}return e.prototype.api=function(t,n){return i.Validate.isNonemptyString(t,"path"),e._instance.config=Object(a.__assign)(Object(a.__assign)({},e._originalConfig),n||{}),e._instance.api(t)},e.prototype._createGraphClientInstance=function(t){var n,a=this;if(!e._window.MicrosoftGraph||!e._window.MicrosoftGraph.Client)throw new Error(s.e);n=e._window.MicrosoftGraph.Client,e._window.MicrosoftGraph=void 0;var i=n.init({authProvider:function(e){a._getOAuthToken(t).then(function(t){e(void 0,t)}).catch(function(t){e(t,"")})},baseUrl:e._graphBaseUrl});return e._originalConfig=i.config,i},e.prototype._getOAuthToken=function(t){var n=new r._QosMonitor("MSGraphClient.FetchGraphToken");return t.getToken(e._graphBaseUrl).then(function(e){return n.writeSuccess(),e}).catch(function(e){throw n.writeUnexpectedFailure(e.message,e),e})},e._window=window,e}();function d(){return i._SPKillSwitch.isActivated("416713e6-ce26-48f7-9e12-28fe39f77b1e")}var l=function(){function e(e){this._serviceScope=e}return e.prototype.getClient=function(e,t){var a=this;if(e&&"1"!==e){if("3"!==e||i._SPKillSwitch.isActivated("24401914-15d6-4c3c-aeea-4aace46d5586"))throw Error("Not yet implemented.");var o=new r._QosMonitor("MSGraphClientFactory.GetClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return o.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0)}).catch(function(e){throw d()||o.writeUnexpectedFailure("ImportMSGraphV3ChunkFailed",e),e})}return c._instance?Promise.resolve(new c(this._serviceScope)):n.e(2).then(n.t.bind(null,"9EC8",7)).then(function(){return new c(a._serviceScope)})},e.prototype.getClientWithMiddleware=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetClientV3WithMiddleware");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3}),new e.default(a._serviceScope,void 0,t)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3ChunkFailed",e),e})},e.prototype.getClientInternal=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetInternalClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0,!0)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3ChunkFailed",e),e})},e.serviceKey=i.ServiceKey.create("sp-http:MSGraphClientFactory",e),e}()},ut3N:function(e,t){e.exports=o}})});
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MSGraphAuthenticationProvider = void 0;
|
|
4
|
+
var sp_diagnostics_1 = require("@microsoft/sp-diagnostics");
|
|
5
|
+
var sp_http_base_1 = require("@microsoft/sp-http-base");
|
|
6
|
+
var MSGraphAuthenticationProvider = /** @class */ (function () {
|
|
7
|
+
function MSGraphAuthenticationProvider(tokenProvider, graphBaseUrl, isInternal) {
|
|
8
|
+
this._tokenProvider = tokenProvider;
|
|
9
|
+
this._graphBaseUrl = graphBaseUrl;
|
|
10
|
+
this._isInternal = isInternal;
|
|
11
|
+
}
|
|
12
|
+
MSGraphAuthenticationProvider.prototype.getAccessToken = function () {
|
|
13
|
+
//
|
|
14
|
+
// theoretically, we could check if ('_getTokenInternal' in this._tokenProvider).
|
|
15
|
+
// But it could potentially lead to issues if someone adds this method to IAadTokenProvider interface.
|
|
16
|
+
//
|
|
17
|
+
if (this._isInternal) {
|
|
18
|
+
return this._getInternalToken(this._tokenProvider);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return this._getOAuthToken(this._tokenProvider);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
MSGraphAuthenticationProvider.prototype._getOAuthToken = function (tokenProvider) {
|
|
25
|
+
var qosMonitor = new sp_diagnostics_1._QosMonitor('MSGraphClient.FetchGraphToken');
|
|
26
|
+
return tokenProvider
|
|
27
|
+
.getToken(this._graphBaseUrl)
|
|
28
|
+
.then(function (response) {
|
|
29
|
+
qosMonitor.writeSuccess();
|
|
30
|
+
return response;
|
|
31
|
+
})
|
|
32
|
+
.catch(function (error) {
|
|
33
|
+
qosMonitor.writeUnexpectedFailure(error.message, error);
|
|
34
|
+
throw error;
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
MSGraphAuthenticationProvider.prototype._getInternalToken = function (tokenProvider) {
|
|
38
|
+
var qosMonitor = new sp_diagnostics_1._QosMonitor('MSGraphClient.FetchInternalGraphToken');
|
|
39
|
+
return tokenProvider
|
|
40
|
+
._getTokenInternal(this._graphBaseUrl, sp_http_base_1._AadTokenProviders.preAuthorizedConfiguration)
|
|
41
|
+
.then(function (response) {
|
|
42
|
+
qosMonitor.writeSuccess();
|
|
43
|
+
return response;
|
|
44
|
+
})
|
|
45
|
+
.catch(function (error) {
|
|
46
|
+
qosMonitor.writeUnexpectedFailure(error.message, error);
|
|
47
|
+
throw error;
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
return MSGraphAuthenticationProvider;
|
|
51
|
+
}());
|
|
52
|
+
exports.MSGraphAuthenticationProvider = MSGraphAuthenticationProvider;
|
|
53
|
+
//# sourceMappingURL=MSGraphAuthenticationProvider.js.map
|
|
@@ -95,7 +95,7 @@ var MSGraphClient = /** @class */ (function () {
|
|
|
95
95
|
return response;
|
|
96
96
|
})
|
|
97
97
|
.catch(function (error) {
|
|
98
|
-
qosMonitor.writeUnexpectedFailure(
|
|
98
|
+
qosMonitor.writeUnexpectedFailure(error.message, error);
|
|
99
99
|
throw error;
|
|
100
100
|
});
|
|
101
101
|
};
|
|
@@ -49,7 +49,7 @@ var MSGraphClientFactory = /** @class */ (function () {
|
|
|
49
49
|
})
|
|
50
50
|
.catch(function (error) {
|
|
51
51
|
if (!isWriteQoSUnexpectedFailureKSActivated()) {
|
|
52
|
-
qosMonitor_1.writeUnexpectedFailure('
|
|
52
|
+
qosMonitor_1.writeUnexpectedFailure('ImportMSGraphV3ChunkFailed', error);
|
|
53
53
|
}
|
|
54
54
|
throw error;
|
|
55
55
|
});
|
|
@@ -78,7 +78,7 @@ var MSGraphClientFactory = /** @class */ (function () {
|
|
|
78
78
|
})
|
|
79
79
|
.catch(function (error) {
|
|
80
80
|
if (!isWriteQoSUnexpectedFailureKSActivated()) {
|
|
81
|
-
qosMonitor.writeUnexpectedFailure('
|
|
81
|
+
qosMonitor.writeUnexpectedFailure('ImportMSGraphV3ChunkFailed', error);
|
|
82
82
|
}
|
|
83
83
|
throw error;
|
|
84
84
|
});
|
|
@@ -100,7 +100,7 @@ var MSGraphClientFactory = /** @class */ (function () {
|
|
|
100
100
|
})
|
|
101
101
|
.catch(function (error) {
|
|
102
102
|
if (!isWriteQoSUnexpectedFailureKSActivated()) {
|
|
103
|
-
qosMonitor.writeUnexpectedFailure('
|
|
103
|
+
qosMonitor.writeUnexpectedFailure('ImportMSGraphV3ChunkFailed', error);
|
|
104
104
|
}
|
|
105
105
|
throw error;
|
|
106
106
|
});
|
|
@@ -5,6 +5,8 @@ var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
|
5
5
|
var sp_diagnostics_1 = require("@microsoft/sp-diagnostics");
|
|
6
6
|
var ms_graph_v3_bundle_1 = require("@ms/ms-graph-v3-bundle");
|
|
7
7
|
var sp_http_base_1 = require("@microsoft/sp-http-base");
|
|
8
|
+
var Killswitches_1 = require("./common/Killswitches");
|
|
9
|
+
var MSGraphAuthenticationProvider_1 = require("./MSGraphAuthenticationProvider");
|
|
8
10
|
/**
|
|
9
11
|
* MSGraphClient is used to perform REST calls against Microsoft Graph.
|
|
10
12
|
*
|
|
@@ -26,17 +28,50 @@ var MSGraphClientV3 = /** @class */ (function () {
|
|
|
26
28
|
*/
|
|
27
29
|
function MSGraphClientV3(serviceScope, options, clientOptions, internalClient) {
|
|
28
30
|
var _this = this;
|
|
31
|
+
this._isInternal = false;
|
|
29
32
|
serviceScope.whenFinished(function () {
|
|
30
|
-
MSGraphClientV3._graphBaseUrl
|
|
31
|
-
.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
if (!MSGraphClientV3._graphBaseUrl) {
|
|
34
|
+
MSGraphClientV3._graphBaseUrl = serviceScope
|
|
35
|
+
.consume(sp_http_base_1._GraphHttpClientContext.serviceKey)
|
|
36
|
+
.getGraphEndpointUrl();
|
|
37
|
+
}
|
|
38
|
+
//
|
|
39
|
+
// TODO: when graduating the isUseSeparateInternalInstanceKSActivated it should become:
|
|
40
|
+
// if (internalClient) {
|
|
41
|
+
// if (!MSGraphClientV3._internalInstance) {
|
|
42
|
+
// MSGraphClientV3._internalInstance = this._createInternalGraphClientInstance(
|
|
43
|
+
// _AadTokenProviders.configurable as AadTokenProvider,
|
|
44
|
+
// options
|
|
45
|
+
// );
|
|
46
|
+
// }
|
|
47
|
+
// }
|
|
48
|
+
// else if (!MSGraphClientV3._instance) {
|
|
49
|
+
// if (clientOptions !== undefined) {
|
|
50
|
+
// MSGraphClientV3._instance = this._createGraphClientInstanceWithMiddleware(
|
|
51
|
+
// _AadTokenProviders.configurable,
|
|
52
|
+
// clientOptions
|
|
53
|
+
// );
|
|
54
|
+
// } else {
|
|
55
|
+
// MSGraphClientV3._instance = this._createGraphClientInstance(
|
|
56
|
+
// _AadTokenProviders.configurable,
|
|
57
|
+
// options
|
|
58
|
+
// );
|
|
59
|
+
// }
|
|
60
|
+
// }
|
|
61
|
+
//
|
|
62
|
+
if (internalClient) {
|
|
63
|
+
_this._isInternal = true;
|
|
64
|
+
if (!(0, Killswitches_1.isUseSeparateInternalInstanceKSActivated)() && !MSGraphClientV3._internalInstance) {
|
|
65
|
+
MSGraphClientV3._internalInstance = _this._createInternalGraphClientInstance(sp_http_base_1._AadTokenProviders.configurable, options);
|
|
36
66
|
}
|
|
37
|
-
else if (
|
|
67
|
+
else if ((0, Killswitches_1.isUseSeparateInternalInstanceKSActivated)() && !MSGraphClientV3._instance) {
|
|
38
68
|
MSGraphClientV3._instance = _this._createInternalGraphClientInstance(sp_http_base_1._AadTokenProviders.configurable, options);
|
|
39
69
|
}
|
|
70
|
+
}
|
|
71
|
+
else if (!MSGraphClientV3._instance) {
|
|
72
|
+
if (clientOptions !== undefined) {
|
|
73
|
+
MSGraphClientV3._instance = _this._createGraphClientInstanceWithMiddleware(sp_http_base_1._AadTokenProviders.configurable, clientOptions);
|
|
74
|
+
}
|
|
40
75
|
else {
|
|
41
76
|
MSGraphClientV3._instance = _this._createGraphClientInstance(sp_http_base_1._AadTokenProviders.configurable, options);
|
|
42
77
|
}
|
|
@@ -61,6 +96,9 @@ var MSGraphClientV3 = /** @class */ (function () {
|
|
|
61
96
|
*/
|
|
62
97
|
MSGraphClientV3.prototype.api = function (path) {
|
|
63
98
|
sp_core_library_1.Validate.isNonemptyString(path, 'path');
|
|
99
|
+
if (!(0, Killswitches_1.isUseSeparateInternalInstanceKSActivated)() && this._isInternal) {
|
|
100
|
+
return MSGraphClientV3._internalInstance.api(path);
|
|
101
|
+
}
|
|
64
102
|
return MSGraphClientV3._instance.api(path);
|
|
65
103
|
};
|
|
66
104
|
Object.defineProperty(MSGraphClientV3.prototype, "client", {
|
|
@@ -68,6 +106,9 @@ var MSGraphClientV3 = /** @class */ (function () {
|
|
|
68
106
|
* Gets the instance of the instantiated Client object from Microsoft Graph SDK.
|
|
69
107
|
*/
|
|
70
108
|
get: function () {
|
|
109
|
+
if (!(0, Killswitches_1.isUseSeparateInternalInstanceKSActivated)() && this._isInternal) {
|
|
110
|
+
return MSGraphClientV3._internalInstance;
|
|
111
|
+
}
|
|
71
112
|
return MSGraphClientV3._instance;
|
|
72
113
|
},
|
|
73
114
|
enumerable: false,
|
|
@@ -76,57 +117,110 @@ var MSGraphClientV3 = /** @class */ (function () {
|
|
|
76
117
|
MSGraphClientV3.prototype._createGraphClientInstance = function (tokenProvider, options) {
|
|
77
118
|
var _this = this;
|
|
78
119
|
var qosMonitor = new sp_diagnostics_1._QosMonitor('MSGraphClientV3.CreateGraphClientInstance');
|
|
79
|
-
var graphClient
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
120
|
+
var graphClient;
|
|
121
|
+
if ((0, Killswitches_1.isUseAuthProviderClassInDefaultInitKSActivated)()) {
|
|
122
|
+
graphClient = ms_graph_v3_bundle_1.Client.init(tslib_1.__assign({ authProvider: function (done) {
|
|
123
|
+
_this._getOAuthToken(tokenProvider)
|
|
124
|
+
.then(function (token) {
|
|
125
|
+
done(undefined /** error object */, token);
|
|
126
|
+
qosMonitor.writeSuccess();
|
|
127
|
+
})
|
|
128
|
+
.catch(function (e) {
|
|
129
|
+
// The functions will return a rejected promise if it fails to get an OAuth2Token.
|
|
130
|
+
done(e, '');
|
|
131
|
+
qosMonitor.writeExpectedFailure(e.message);
|
|
132
|
+
});
|
|
133
|
+
}, baseUrl: MSGraphClientV3._graphBaseUrl }, options // with this, the user can override the baseUrl and authProvider too
|
|
134
|
+
));
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
try {
|
|
138
|
+
graphClient = this._createClientInstance(tslib_1.__assign(tslib_1.__assign({}, options), { authProvider: undefined }), tokenProvider, false);
|
|
139
|
+
}
|
|
140
|
+
catch (e) {
|
|
141
|
+
qosMonitor.writeUnexpectedFailure(e.message, e);
|
|
142
|
+
throw e;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
92
145
|
return graphClient;
|
|
93
146
|
};
|
|
94
147
|
MSGraphClientV3.prototype._createGraphClientInstanceWithMiddleware = function (tokenProvider, options) {
|
|
95
148
|
var _this = this;
|
|
96
149
|
var qosMonitor = new sp_diagnostics_1._QosMonitor('MSGraphClientV3.CreateGraphClientInstanceWithMiddleware');
|
|
150
|
+
var graphClient;
|
|
97
151
|
try {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
152
|
+
if ((0, Killswitches_1.isUseAuthProviderAsMiddlewareKSActivated)()) {
|
|
153
|
+
graphClient = ms_graph_v3_bundle_1.Client.initWithMiddleware(tslib_1.__assign({ authProvider: {
|
|
154
|
+
getAccessToken: function (authenticationProviderOptions) {
|
|
155
|
+
return _this._getOAuthToken(tokenProvider);
|
|
156
|
+
}
|
|
157
|
+
}, baseUrl: MSGraphClientV3._graphBaseUrl }, options // with this, the user can override the baseUrl and authProvider too
|
|
158
|
+
));
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
graphClient = this._createClientInstance(options, tokenProvider, false);
|
|
162
|
+
}
|
|
104
163
|
qosMonitor.writeSuccess();
|
|
105
164
|
return graphClient;
|
|
106
165
|
}
|
|
107
166
|
catch (e) {
|
|
108
|
-
qosMonitor.writeUnexpectedFailure(
|
|
167
|
+
qosMonitor.writeUnexpectedFailure(e.message, e);
|
|
109
168
|
throw e;
|
|
110
169
|
}
|
|
111
170
|
};
|
|
112
171
|
MSGraphClientV3.prototype._createInternalGraphClientInstance = function (tokenProvider, options) {
|
|
113
172
|
var _this = this;
|
|
114
173
|
var qosMonitor = new sp_diagnostics_1._QosMonitor('MSGraphClientV3.CreateInternalGraphClientInstance');
|
|
115
|
-
var graphClient
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
174
|
+
var graphClient;
|
|
175
|
+
if ((0, Killswitches_1.isUseAuthProviderClassInDefaultInitKSActivated)()) {
|
|
176
|
+
graphClient = ms_graph_v3_bundle_1.Client.init(tslib_1.__assign({ authProvider: function (done) {
|
|
177
|
+
_this._getInternalToken(tokenProvider)
|
|
178
|
+
.then(function (token) {
|
|
179
|
+
done(undefined /** error object */, token);
|
|
180
|
+
qosMonitor.writeSuccess();
|
|
181
|
+
})
|
|
182
|
+
.catch(function (e) {
|
|
183
|
+
// The functions will return a rejected promise if it fails to get an OAuth2Token.
|
|
184
|
+
done(e, '');
|
|
185
|
+
qosMonitor.writeExpectedFailure(e.message);
|
|
186
|
+
});
|
|
187
|
+
}, baseUrl: MSGraphClientV3._graphBaseUrl }, options // with this, the user can override the baseUrl and authProvider too
|
|
188
|
+
));
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
try {
|
|
192
|
+
graphClient = this._createClientInstance(tslib_1.__assign(tslib_1.__assign({}, options), { authProvider: undefined }), tokenProvider, true);
|
|
193
|
+
}
|
|
194
|
+
catch (e) {
|
|
195
|
+
qosMonitor.writeUnexpectedFailure(e.message, e);
|
|
196
|
+
throw e;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
128
199
|
return graphClient;
|
|
129
200
|
};
|
|
201
|
+
MSGraphClientV3.prototype._createClientInstance = function (options, tokenProvider, isInternal) {
|
|
202
|
+
var clientOptions = options || {};
|
|
203
|
+
clientOptions.baseUrl = MSGraphClientV3._graphBaseUrl;
|
|
204
|
+
var middlewareChain;
|
|
205
|
+
if (!clientOptions.middleware) {
|
|
206
|
+
// creating default chain
|
|
207
|
+
middlewareChain = ms_graph_v3_bundle_1.MiddlewareFactory.getDefaultMiddlewareChain(new MSGraphAuthenticationProvider_1.MSGraphAuthenticationProvider(tokenProvider, MSGraphClientV3._graphBaseUrl, isInternal));
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
// a developer has provided middleware(s)
|
|
211
|
+
var authMiddleware = new ms_graph_v3_bundle_1.AuthenticationHandler(new MSGraphAuthenticationProvider_1.MSGraphAuthenticationProvider(tokenProvider, MSGraphClientV3._graphBaseUrl, isInternal));
|
|
212
|
+
middlewareChain = [authMiddleware];
|
|
213
|
+
if (Array.isArray(clientOptions.middleware)) {
|
|
214
|
+
middlewareChain.push.apply(middlewareChain, clientOptions.middleware);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
middlewareChain.push(clientOptions.middleware);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
// we can add more middleware to the end of the chain here
|
|
221
|
+
clientOptions.middleware = middlewareChain;
|
|
222
|
+
return ms_graph_v3_bundle_1.Client.initWithMiddleware(clientOptions);
|
|
223
|
+
};
|
|
130
224
|
MSGraphClientV3.prototype._getOAuthToken = function (tokenProvider) {
|
|
131
225
|
var qosMonitor = new sp_diagnostics_1._QosMonitor('MSGraphClient.FetchGraphToken');
|
|
132
226
|
return tokenProvider
|
|
@@ -136,7 +230,7 @@ var MSGraphClientV3 = /** @class */ (function () {
|
|
|
136
230
|
return response;
|
|
137
231
|
})
|
|
138
232
|
.catch(function (error) {
|
|
139
|
-
qosMonitor.writeUnexpectedFailure(
|
|
233
|
+
qosMonitor.writeUnexpectedFailure(error.message, error);
|
|
140
234
|
throw error;
|
|
141
235
|
});
|
|
142
236
|
};
|
|
@@ -149,7 +243,7 @@ var MSGraphClientV3 = /** @class */ (function () {
|
|
|
149
243
|
return response;
|
|
150
244
|
})
|
|
151
245
|
.catch(function (error) {
|
|
152
|
-
qosMonitor.writeUnexpectedFailure(
|
|
246
|
+
qosMonitor.writeUnexpectedFailure(error.message, error);
|
|
153
247
|
throw error;
|
|
154
248
|
});
|
|
155
249
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isUseSeparateInternalInstanceKSActivated = exports.isUseAuthProviderClassInDefaultInitKSActivated = exports.isUseAuthProviderAsMiddlewareKSActivated = void 0;
|
|
4
|
+
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
5
|
+
/**
|
|
6
|
+
* KS to use auth provider as middleware
|
|
7
|
+
*/
|
|
8
|
+
function isUseAuthProviderAsMiddlewareKSActivated() {
|
|
9
|
+
return sp_core_library_1._SPKillSwitch.isActivated('fc060cb5-65ce-406c-88e4-c05007eb611f'
|
|
10
|
+
/* '04/10/2023', 'Use Auth Provider as Middleware'*/
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
exports.isUseAuthProviderAsMiddlewareKSActivated = isUseAuthProviderAsMiddlewareKSActivated;
|
|
14
|
+
/**
|
|
15
|
+
* KS to use auth provider middleware in default init
|
|
16
|
+
*/
|
|
17
|
+
function isUseAuthProviderClassInDefaultInitKSActivated() {
|
|
18
|
+
return sp_core_library_1._SPKillSwitch.isActivated('df724ea6-3681-4d8b-989f-85bede997509'
|
|
19
|
+
/* '04/10/2023', 'Use Auth Provider Middleware in default init'*/
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
exports.isUseAuthProviderClassInDefaultInitKSActivated = isUseAuthProviderClassInDefaultInitKSActivated;
|
|
23
|
+
function isUseSeparateInternalInstanceKSActivated() {
|
|
24
|
+
return sp_core_library_1._SPKillSwitch.isActivated('c4f7a9ac-2822-43fd-ba58-b01454ba8bed'
|
|
25
|
+
/* '04/10/2023', 'Use separate internal instance'*/
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
exports.isUseSeparateInternalInstanceKSActivated = isUseSeparateInternalInstanceKSActivated;
|
|
29
|
+
//# sourceMappingURL=Killswitches.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/sp-http-msgraph",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0-beta.2",
|
|
4
4
|
"description": "Microsoft Graph communication layer for the SharePoint Framework",
|
|
5
5
|
"license": "https://aka.ms/spfx/license",
|
|
6
6
|
"homepage": "http://aka.ms/spfx",
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@microsoft/microsoft-graph-clientv1": "npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
|
|
15
15
|
"tslib": "2.3.1",
|
|
16
|
-
"@microsoft/sp-core-library": "1.
|
|
17
|
-
"@microsoft/sp-http-base": "1.
|
|
18
|
-
"@microsoft/sp-diagnostics": "1.
|
|
19
|
-
"@microsoft/sp-loader": "1.
|
|
16
|
+
"@microsoft/sp-core-library": "1.18.0-beta.2",
|
|
17
|
+
"@microsoft/sp-http-base": "1.18.0-beta.2",
|
|
18
|
+
"@microsoft/sp-diagnostics": "1.18.0-beta.2",
|
|
19
|
+
"@microsoft/sp-loader": "1.18.0-beta.2"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@microsoft/microsoft-graph-client": "3.0.2",
|
|
23
|
-
"@rushstack/heft": "0.
|
|
23
|
+
"@rushstack/heft": "0.56.0",
|
|
24
24
|
"eslint": "8.7.0",
|
|
25
|
-
"@ms/spfx-internal-web-build-rig": "0.1.0",
|
|
25
|
+
"@ms/spfx-internal-web-build-next-rig": "0.1.0",
|
|
26
26
|
"@ms/ms-graph-v3-bundle": "3.0.2"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -32,10 +32,9 @@
|
|
|
32
32
|
"build": "heft build --clean",
|
|
33
33
|
"clean": "heft clean",
|
|
34
34
|
"deploy": "heft dev-deploy",
|
|
35
|
-
"start": "heft
|
|
36
|
-
"build
|
|
37
|
-
"_phase:build": "heft build --
|
|
38
|
-
"_phase:build-incremental": "heft build --lite",
|
|
35
|
+
"start": "heft build-watch --serve",
|
|
36
|
+
"_phase:build": "heft run --only build -- --clean",
|
|
37
|
+
"_phase:build-incremental": "heft run --only build --",
|
|
39
38
|
"_phase:depscan": "heft depscan"
|
|
40
39
|
}
|
|
41
40
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_17_4=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_17_4||[]).push([[1],{"l/HE":function(e,t,n){"use strict";n.r(t);var a=n("17wl"),i=n("UWqr"),r=n("ut3N"),o=n("obDv"),s=n("2SXB"),c=function(){function e(t,n,a,i){var r=this;t.whenFinished(function(){e._graphBaseUrl=t.consume(s._GraphHttpClientContext.serviceKey).getGraphEndpointUrl(),e._instance||(e._instance=void 0!==a?r._createGraphClientInstanceWithMiddleware(s._AadTokenProviders.configurable,a):i?r._createInternalGraphClientInstance(s._AadTokenProviders.configurable,n):r._createGraphClientInstance(s._AadTokenProviders.configurable,n))})}return e.prototype.api=function(t){return i.Validate.isNonemptyString(t,"path"),e._instance.api(t)},Object.defineProperty(e.prototype,"client",{get:function(){return e._instance},enumerable:!1,configurable:!0}),e.prototype._createGraphClientInstance=function(t,n){var i=this,s=new r._QosMonitor("MSGraphClientV3.CreateGraphClientInstance");return o.Client.init(Object(a.__assign)({authProvider:function(e){i._getOAuthToken(t).then(function(t){e(void 0,t),s.writeSuccess()}).catch(function(t){e(t,""),s.writeExpectedFailure(t.message)})},baseUrl:e._graphBaseUrl},n))},e.prototype._createGraphClientInstanceWithMiddleware=function(t,n){var i=this,s=new r._QosMonitor("MSGraphClientV3.CreateGraphClientInstanceWithMiddleware");try{var c=o.Client.initWithMiddleware(Object(a.__assign)({authProvider:{getAccessToken:function(e){return i._getOAuthToken(t)}},baseUrl:e._graphBaseUrl},n));return s.writeSuccess(),c}catch(e){throw s.writeUnexpectedFailure("CreateGraphClientInstanceWithMiddleware",e),e}},e.prototype._createInternalGraphClientInstance=function(t,n){var i=this,s=new r._QosMonitor("MSGraphClientV3.CreateInternalGraphClientInstance");return o.Client.init(Object(a.__assign)({authProvider:function(e){i._getInternalToken(t).then(function(t){e(void 0,t),s.writeSuccess()}).catch(function(t){e(t,""),s.writeExpectedFailure(t.message)})},baseUrl:e._graphBaseUrl},n))},e.prototype._getOAuthToken=function(t){var n=new r._QosMonitor("MSGraphClient.FetchGraphToken");return t.getToken(e._graphBaseUrl).then(function(e){return n.writeSuccess(),e}).catch(function(e){throw n.writeUnexpectedFailure("FetchGraphToken",e),e})},e.prototype._getInternalToken=function(t){var n=new r._QosMonitor("MSGraphClient.FetchInternalGraphToken");return t._getTokenInternal(e._graphBaseUrl,s._AadTokenProviders.preAuthorizedConfiguration).then(function(e){return n.writeSuccess(),e}).catch(function(e){throw n.writeUnexpectedFailure("FetchInternalGraphToken",e),e})},e}();t.default=c}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define("aec2bbfd-a968-4d5b-a279-12e570f378e6_1.17.4",["tslib","@microsoft/sp-http-base","@microsoft/sp-loader","@microsoft/sp-core-library","@microsoft/sp-diagnostics"],function(n,a,i,r,o){return function(e){function t(t){for(var n,i,r=t[0],o=t[1],s=0,c=[];s<r.length;s++)i=r[s],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&c.push(a[i][0]),a[i]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);for(d&&d(t);c.length;)c.shift()()}var n={},a={0:0};function i(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.e=function(t){for(var n=[],o=function(e){return{1:[{i:"32b9363b-09ff-4959-929a-cab2663fb223",v:"3.0.2",m:"obDv"}]}[e]||[]}(t),s=0;s<o.length;s++)e[o[s].m]||function(t){n.push(r.SPComponentLoader.loadComponentById(t.i,t.v).then(function(n){e[t.m]=function(e){e.exports=n}}))}(o[s]);var c=a[t];if(0!==c)if(c)n.push(c[2]);else{var d=new Promise(function(e,n){c=a[t]=[e,n]});n.push(c[2]=d);var l,u=document.createElement("script");u.charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.src=function(e){return i.p+"chunk."+({1:"sp-http-msgraphclientv3",2:"vendors~sp-http-msgraphclient"}[e]||e)+"_"+"none"+"_"+{1:"9194d8291da1e40a3800",2:"cb6836c426084a659a25"}[e]+".js"}(t),0!==u.src.indexOf(window.location.origin+"/")&&(u.crossOrigin="anonymous");var f=new Error;l=function(e){u.onerror=u.onload=null,clearTimeout(p);var n=a[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src;f.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",f.name="ChunkLoadError",f.type=i,f.request=r,n[1](f)}a[t]=void 0}};var p=setTimeout(function(){l({type:"timeout",target:u})},12e4);u.onerror=u.onload=l,document.head.appendChild(u)}return Promise.all(n)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var r=i("I6O9");i.oe=function(e){throw console.error(e),e};var o=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_17_4=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_17_4||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var c=0;c<o.length;c++)t(o[c]);var d=s;return function(){var e,t=document.getElementsByTagName("script"),n="undefined"!=typeof spScriptNamePattern?spScriptNamePattern:/sp-http-msgraph_default_e370bbeacd07d817eeb6\.js/i;if(t&&t.length)for(var a=0;a<t.length;a++)if(t[a]){var r=t[a].getAttribute("src");if(r&&r.match(n)){e=r.substring(0,r.lastIndexOf("/")+1);break}}if(!e)for(var o in window.__setWebpackPublicPathLoaderSrcRegistry__)if(o&&o.match(n)){e=o.substring(0,o.lastIndexOf("/")+1);break}i.p=e}(),i(i.s="mwqp")}({"17wl":function(e,t){e.exports=n},"2SXB":function(e,t){e.exports=a},"9vkt":function(e){e.exports=JSON.parse('{"e":"graphClientInitializationError"}')},I6O9:function(e,t){e.exports=i},UWqr:function(e,t){e.exports=r},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"MSGraphClient",function(){return c}),n.d(t,"MSGraphClientFactory",function(){return l});var a=n("17wl"),i=n("UWqr"),r=n("ut3N"),o=n("2SXB"),s=n("9vkt"),c=function(){function e(t){var n=this;t.whenFinished(function(){e._graphBaseUrl=t.consume(o._GraphHttpClientContext.serviceKey).getGraphEndpointUrl(),e._instance||(e._instance=n._createGraphClientInstance(o._AadTokenProviders.configurable))})}return e.prototype.api=function(t,n){return i.Validate.isNonemptyString(t,"path"),e._instance.config=Object(a.__assign)(Object(a.__assign)({},e._originalConfig),n||{}),e._instance.api(t)},e.prototype._createGraphClientInstance=function(t){var n,a=this;if(!e._window.MicrosoftGraph||!e._window.MicrosoftGraph.Client)throw new Error(s.e);n=e._window.MicrosoftGraph.Client,e._window.MicrosoftGraph=void 0;var i=n.init({authProvider:function(e){a._getOAuthToken(t).then(function(t){e(void 0,t)}).catch(function(t){e(t,"")})},baseUrl:e._graphBaseUrl});return e._originalConfig=i.config,i},e.prototype._getOAuthToken=function(t){var n=new r._QosMonitor("MSGraphClient.FetchGraphToken");return t.getToken(e._graphBaseUrl).then(function(e){return n.writeSuccess(),e}).catch(function(e){throw n.writeUnexpectedFailure("FetchGraphToken",e),e})},e._window=window,e}();function d(){return i._SPKillSwitch.isActivated("416713e6-ce26-48f7-9e12-28fe39f77b1e")}var l=function(){function e(e){this._serviceScope=e}return e.prototype.getClient=function(e,t){var a=this;if(e&&"1"!==e){if("3"!==e||i._SPKillSwitch.isActivated("24401914-15d6-4c3c-aeea-4aace46d5586"))throw Error("Not yet implemented.");var o=new r._QosMonitor("MSGraphClientFactory.GetClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return o.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0)}).catch(function(e){throw d()||o.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})}return c._instance?Promise.resolve(new c(this._serviceScope)):n.e(2).then(n.t.bind(null,"9EC8",7)).then(function(){return new c(a._serviceScope)})},e.prototype.getClientWithMiddleware=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetClientV3WithMiddleware");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3}),new e.default(a._serviceScope,void 0,t)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})},e.prototype.getClientInternal=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetInternalClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0,!0)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})},e.serviceKey=i.ServiceKey.create("sp-http:MSGraphClientFactory",e),e}()},ut3N:function(e,t){e.exports=o}})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define("aec2bbfd-a968-4d5b-a279-12e570f378e6_1.17.4",["tslib","@microsoft/sp-http-base","@microsoft/sp-loader","@microsoft/sp-core-library","@microsoft/sp-diagnostics"],function(n,a,i,r,o){return function(e){function t(t){for(var n,i,r=t[0],o=t[1],s=0,c=[];s<r.length;s++)i=r[s],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&c.push(a[i][0]),a[i]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);for(d&&d(t);c.length;)c.shift()()}var n={},a={0:0};function i(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.e=function(t){for(var n=[],o=function(e){return{1:[{i:"32b9363b-09ff-4959-929a-cab2663fb223",v:"3.0.2",m:"obDv"}]}[e]||[]}(t),s=0;s<o.length;s++)e[o[s].m]||function(t){n.push(r.SPComponentLoader.loadComponentById(t.i,t.v).then(function(n){e[t.m]=function(e){e.exports=n}}))}(o[s]);var c=a[t];if(0!==c)if(c)n.push(c[2]);else{var d=new Promise(function(e,n){c=a[t]=[e,n]});n.push(c[2]=d);var l,u=document.createElement("script");u.charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.src=function(e){return i.p+"chunk."+({1:"sp-http-msgraphclientv3",2:"vendors~sp-http-msgraphclient"}[e]||e)+"_"+"none"+"_"+{1:"9194d8291da1e40a3800",2:"cb6836c426084a659a25"}[e]+".js"}(t),0!==u.src.indexOf(window.location.origin+"/")&&(u.crossOrigin="anonymous");var f=new Error;l=function(e){u.onerror=u.onload=null,clearTimeout(p);var n=a[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src;f.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",f.name="ChunkLoadError",f.type=i,f.request=r,n[1](f)}a[t]=void 0}};var p=setTimeout(function(){l({type:"timeout",target:u})},12e4);u.onerror=u.onload=l,document.head.appendChild(u)}return Promise.all(n)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var r=i("I6O9");i.oe=function(e){throw console.error(e),e};var o=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_17_4=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_17_4||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var c=0;c<o.length;c++)t(o[c]);var d=s;return function(){var e,t=document.getElementsByTagName("script"),n="undefined"!=typeof spScriptNamePattern?spScriptNamePattern:/sp-http-msgraph_en-us_e370bbeacd07d817eeb6\.js/i;if(t&&t.length)for(var a=0;a<t.length;a++)if(t[a]){var r=t[a].getAttribute("src");if(r&&r.match(n)){e=r.substring(0,r.lastIndexOf("/")+1);break}}if(!e)for(var o in window.__setWebpackPublicPathLoaderSrcRegistry__)if(o&&o.match(n)){e=o.substring(0,o.lastIndexOf("/")+1);break}i.p=e}(),i(i.s="mwqp")}({"17wl":function(e,t){e.exports=n},"2SXB":function(e,t){e.exports=a},"9vkt":function(e){e.exports=JSON.parse('{"e":"Sorry, we couldn\\u0027t make a connection to Microsoft Graph."}')},I6O9:function(e,t){e.exports=i},UWqr:function(e,t){e.exports=r},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"MSGraphClient",function(){return c}),n.d(t,"MSGraphClientFactory",function(){return l});var a=n("17wl"),i=n("UWqr"),r=n("ut3N"),o=n("2SXB"),s=n("9vkt"),c=function(){function e(t){var n=this;t.whenFinished(function(){e._graphBaseUrl=t.consume(o._GraphHttpClientContext.serviceKey).getGraphEndpointUrl(),e._instance||(e._instance=n._createGraphClientInstance(o._AadTokenProviders.configurable))})}return e.prototype.api=function(t,n){return i.Validate.isNonemptyString(t,"path"),e._instance.config=Object(a.__assign)(Object(a.__assign)({},e._originalConfig),n||{}),e._instance.api(t)},e.prototype._createGraphClientInstance=function(t){var n,a=this;if(!e._window.MicrosoftGraph||!e._window.MicrosoftGraph.Client)throw new Error(s.e);n=e._window.MicrosoftGraph.Client,e._window.MicrosoftGraph=void 0;var i=n.init({authProvider:function(e){a._getOAuthToken(t).then(function(t){e(void 0,t)}).catch(function(t){e(t,"")})},baseUrl:e._graphBaseUrl});return e._originalConfig=i.config,i},e.prototype._getOAuthToken=function(t){var n=new r._QosMonitor("MSGraphClient.FetchGraphToken");return t.getToken(e._graphBaseUrl).then(function(e){return n.writeSuccess(),e}).catch(function(e){throw n.writeUnexpectedFailure("FetchGraphToken",e),e})},e._window=window,e}();function d(){return i._SPKillSwitch.isActivated("416713e6-ce26-48f7-9e12-28fe39f77b1e")}var l=function(){function e(e){this._serviceScope=e}return e.prototype.getClient=function(e,t){var a=this;if(e&&"1"!==e){if("3"!==e||i._SPKillSwitch.isActivated("24401914-15d6-4c3c-aeea-4aace46d5586"))throw Error("Not yet implemented.");var o=new r._QosMonitor("MSGraphClientFactory.GetClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return o.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0)}).catch(function(e){throw d()||o.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})}return c._instance?Promise.resolve(new c(this._serviceScope)):n.e(2).then(n.t.bind(null,"9EC8",7)).then(function(){return new c(a._serviceScope)})},e.prototype.getClientWithMiddleware=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetClientV3WithMiddleware");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3}),new e.default(a._serviceScope,void 0,t)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})},e.prototype.getClientInternal=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetInternalClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0,!0)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})},e.serviceKey=i.ServiceKey.create("sp-http:MSGraphClientFactory",e),e}()},ut3N:function(e,t){e.exports=o}})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define("aec2bbfd-a968-4d5b-a279-12e570f378e6_1.17.4",["tslib","@microsoft/sp-http-base","@microsoft/sp-loader","@microsoft/sp-core-library","@microsoft/sp-diagnostics"],function(n,a,i,r,o){return function(e){function t(t){for(var n,i,r=t[0],o=t[1],s=0,c=[];s<r.length;s++)i=r[s],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&c.push(a[i][0]),a[i]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);for(d&&d(t);c.length;)c.shift()()}var n={},a={0:0};function i(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.e=function(t){for(var n=[],o=function(e){return{1:[{i:"32b9363b-09ff-4959-929a-cab2663fb223",v:"3.0.2",m:"obDv"}]}[e]||[]}(t),s=0;s<o.length;s++)e[o[s].m]||function(t){n.push(r.SPComponentLoader.loadComponentById(t.i,t.v).then(function(n){e[t.m]=function(e){e.exports=n}}))}(o[s]);var c=a[t];if(0!==c)if(c)n.push(c[2]);else{var d=new Promise(function(e,n){c=a[t]=[e,n]});n.push(c[2]=d);var l,u=document.createElement("script");u.charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.src=function(e){return i.p+"chunk."+({1:"sp-http-msgraphclientv3",2:"vendors~sp-http-msgraphclient"}[e]||e)+"_"+"none"+"_"+{1:"9194d8291da1e40a3800",2:"cb6836c426084a659a25"}[e]+".js"}(t),0!==u.src.indexOf(window.location.origin+"/")&&(u.crossOrigin="anonymous");var f=new Error;l=function(e){u.onerror=u.onload=null,clearTimeout(p);var n=a[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src;f.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",f.name="ChunkLoadError",f.type=i,f.request=r,n[1](f)}a[t]=void 0}};var p=setTimeout(function(){l({type:"timeout",target:u})},12e4);u.onerror=u.onload=l,document.head.appendChild(u)}return Promise.all(n)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var r=i("I6O9");i.oe=function(e){throw console.error(e),e};var o=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_17_4=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_17_4||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var c=0;c<o.length;c++)t(o[c]);var d=s;return function(){var e,t=document.getElementsByTagName("script"),n="undefined"!=typeof spScriptNamePattern?spScriptNamePattern:/sp-http-msgraph_qps-ploc_e370bbeacd07d817eeb6\.js/i;if(t&&t.length)for(var a=0;a<t.length;a++)if(t[a]){var r=t[a].getAttribute("src");if(r&&r.match(n)){e=r.substring(0,r.lastIndexOf("/")+1);break}}if(!e)for(var o in window.__setWebpackPublicPathLoaderSrcRegistry__)if(o&&o.match(n)){e=o.substring(0,o.lastIndexOf("/")+1);break}i.p=e}(),i(i.s="mwqp")}({"17wl":function(e,t){e.exports=n},"2SXB":function(e,t){e.exports=a},"9vkt":function(e){e.exports=JSON.parse('{"e":"[!!--##Śōŕŕŷ, ŵē ćōũĺďń\\u0027ţ màķē à ćōńńēćţĩōń ţō Mĩćŕōśōƒţ Ĝŕàƥĥ.##--!!]"}')},I6O9:function(e,t){e.exports=i},UWqr:function(e,t){e.exports=r},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"MSGraphClient",function(){return c}),n.d(t,"MSGraphClientFactory",function(){return l});var a=n("17wl"),i=n("UWqr"),r=n("ut3N"),o=n("2SXB"),s=n("9vkt"),c=function(){function e(t){var n=this;t.whenFinished(function(){e._graphBaseUrl=t.consume(o._GraphHttpClientContext.serviceKey).getGraphEndpointUrl(),e._instance||(e._instance=n._createGraphClientInstance(o._AadTokenProviders.configurable))})}return e.prototype.api=function(t,n){return i.Validate.isNonemptyString(t,"path"),e._instance.config=Object(a.__assign)(Object(a.__assign)({},e._originalConfig),n||{}),e._instance.api(t)},e.prototype._createGraphClientInstance=function(t){var n,a=this;if(!e._window.MicrosoftGraph||!e._window.MicrosoftGraph.Client)throw new Error(s.e);n=e._window.MicrosoftGraph.Client,e._window.MicrosoftGraph=void 0;var i=n.init({authProvider:function(e){a._getOAuthToken(t).then(function(t){e(void 0,t)}).catch(function(t){e(t,"")})},baseUrl:e._graphBaseUrl});return e._originalConfig=i.config,i},e.prototype._getOAuthToken=function(t){var n=new r._QosMonitor("MSGraphClient.FetchGraphToken");return t.getToken(e._graphBaseUrl).then(function(e){return n.writeSuccess(),e}).catch(function(e){throw n.writeUnexpectedFailure("FetchGraphToken",e),e})},e._window=window,e}();function d(){return i._SPKillSwitch.isActivated("416713e6-ce26-48f7-9e12-28fe39f77b1e")}var l=function(){function e(e){this._serviceScope=e}return e.prototype.getClient=function(e,t){var a=this;if(e&&"1"!==e){if("3"!==e||i._SPKillSwitch.isActivated("24401914-15d6-4c3c-aeea-4aace46d5586"))throw Error("Not yet implemented.");var o=new r._QosMonitor("MSGraphClientFactory.GetClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return o.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0)}).catch(function(e){throw d()||o.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})}return c._instance?Promise.resolve(new c(this._serviceScope)):n.e(2).then(n.t.bind(null,"9EC8",7)).then(function(){return new c(a._serviceScope)})},e.prototype.getClientWithMiddleware=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetClientV3WithMiddleware");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3}),new e.default(a._serviceScope,void 0,t)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})},e.prototype.getClientInternal=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetInternalClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0,!0)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})},e.serviceKey=i.ServiceKey.create("sp-http:MSGraphClientFactory",e),e}()},ut3N:function(e,t){e.exports=o}})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define("aec2bbfd-a968-4d5b-a279-12e570f378e6_1.17.4",["tslib","@microsoft/sp-http-base","@microsoft/sp-loader","@microsoft/sp-core-library","@microsoft/sp-diagnostics"],function(n,a,i,r,o){return function(e){function t(t){for(var n,i,r=t[0],o=t[1],s=0,c=[];s<r.length;s++)i=r[s],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&c.push(a[i][0]),a[i]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);for(d&&d(t);c.length;)c.shift()()}var n={},a={0:0};function i(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.e=function(t){for(var n=[],o=function(e){return{1:[{i:"32b9363b-09ff-4959-929a-cab2663fb223",v:"3.0.2",m:"obDv"}]}[e]||[]}(t),s=0;s<o.length;s++)e[o[s].m]||function(t){n.push(r.SPComponentLoader.loadComponentById(t.i,t.v).then(function(n){e[t.m]=function(e){e.exports=n}}))}(o[s]);var c=a[t];if(0!==c)if(c)n.push(c[2]);else{var d=new Promise(function(e,n){c=a[t]=[e,n]});n.push(c[2]=d);var l,u=document.createElement("script");u.charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.src=function(e){return i.p+"chunk."+({1:"sp-http-msgraphclientv3",2:"vendors~sp-http-msgraphclient"}[e]||e)+"_"+"none"+"_"+{1:"9194d8291da1e40a3800",2:"cb6836c426084a659a25"}[e]+".js"}(t),0!==u.src.indexOf(window.location.origin+"/")&&(u.crossOrigin="anonymous");var f=new Error;l=function(e){u.onerror=u.onload=null,clearTimeout(p);var n=a[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src;f.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",f.name="ChunkLoadError",f.type=i,f.request=r,n[1](f)}a[t]=void 0}};var p=setTimeout(function(){l({type:"timeout",target:u})},12e4);u.onerror=u.onload=l,document.head.appendChild(u)}return Promise.all(n)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var r=i("I6O9");i.oe=function(e){throw console.error(e),e};var o=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_17_4=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_17_4||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var c=0;c<o.length;c++)t(o[c]);var d=s;return function(){var e,t=document.getElementsByTagName("script"),n="undefined"!=typeof spScriptNamePattern?spScriptNamePattern:/sp-http-msgraph_qps-ploca_e370bbeacd07d817eeb6\.js/i;if(t&&t.length)for(var a=0;a<t.length;a++)if(t[a]){var r=t[a].getAttribute("src");if(r&&r.match(n)){e=r.substring(0,r.lastIndexOf("/")+1);break}}if(!e)for(var o in window.__setWebpackPublicPathLoaderSrcRegistry__)if(o&&o.match(n)){e=o.substring(0,o.lastIndexOf("/")+1);break}i.p=e}(),i(i.s="mwqp")}({"17wl":function(e,t){e.exports=n},"2SXB":function(e,t){e.exports=a},"9vkt":function(e){e.exports=JSON.parse('{"e":"Śōŕŕŷ, ŵē ćōũĺďń\\u0027ţ màķē à ćōńńēćţĩōń ţō Mĩćŕōśōƒţ Ĝŕàƥĥ."}')},I6O9:function(e,t){e.exports=i},UWqr:function(e,t){e.exports=r},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"MSGraphClient",function(){return c}),n.d(t,"MSGraphClientFactory",function(){return l});var a=n("17wl"),i=n("UWqr"),r=n("ut3N"),o=n("2SXB"),s=n("9vkt"),c=function(){function e(t){var n=this;t.whenFinished(function(){e._graphBaseUrl=t.consume(o._GraphHttpClientContext.serviceKey).getGraphEndpointUrl(),e._instance||(e._instance=n._createGraphClientInstance(o._AadTokenProviders.configurable))})}return e.prototype.api=function(t,n){return i.Validate.isNonemptyString(t,"path"),e._instance.config=Object(a.__assign)(Object(a.__assign)({},e._originalConfig),n||{}),e._instance.api(t)},e.prototype._createGraphClientInstance=function(t){var n,a=this;if(!e._window.MicrosoftGraph||!e._window.MicrosoftGraph.Client)throw new Error(s.e);n=e._window.MicrosoftGraph.Client,e._window.MicrosoftGraph=void 0;var i=n.init({authProvider:function(e){a._getOAuthToken(t).then(function(t){e(void 0,t)}).catch(function(t){e(t,"")})},baseUrl:e._graphBaseUrl});return e._originalConfig=i.config,i},e.prototype._getOAuthToken=function(t){var n=new r._QosMonitor("MSGraphClient.FetchGraphToken");return t.getToken(e._graphBaseUrl).then(function(e){return n.writeSuccess(),e}).catch(function(e){throw n.writeUnexpectedFailure("FetchGraphToken",e),e})},e._window=window,e}();function d(){return i._SPKillSwitch.isActivated("416713e6-ce26-48f7-9e12-28fe39f77b1e")}var l=function(){function e(e){this._serviceScope=e}return e.prototype.getClient=function(e,t){var a=this;if(e&&"1"!==e){if("3"!==e||i._SPKillSwitch.isActivated("24401914-15d6-4c3c-aeea-4aace46d5586"))throw Error("Not yet implemented.");var o=new r._QosMonitor("MSGraphClientFactory.GetClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return o.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0)}).catch(function(e){throw d()||o.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})}return c._instance?Promise.resolve(new c(this._serviceScope)):n.e(2).then(n.t.bind(null,"9EC8",7)).then(function(){return new c(a._serviceScope)})},e.prototype.getClientWithMiddleware=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetClientV3WithMiddleware");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3}),new e.default(a._serviceScope,void 0,t)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})},e.prototype.getClientInternal=function(e,t){var a=this,i=new r._QosMonitor("MSGraphClientFactory.GetInternalClientV3");return n.e(1).then(n.bind(null,"l/HE")).then(function(e){return i.writeSuccess({version:3,options:!!t}),new e.default(a._serviceScope,t,void 0,!0)}).catch(function(e){throw d()||i.writeUnexpectedFailure("ImportMSGraphV3Chunk",e),e})},e.serviceKey=i.ServiceKey.create("sp-http:MSGraphClientFactory",e),e}()},ut3N:function(e,t){e.exports=o}})});
|