@microsoft/sp-http-msgraph 1.23.2 → 1.24.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 +132 -142
- package/dist/chunk.sp-http-msgraphclient_none_c219d50ed0c3718eb04c.js +2 -0
- package/dist/chunk.sp-http-msgraphclientv3_none_f69d5240fbc396e22113.js +2 -0
- package/dist/sp-http-msgraph_default_b1a01d6b4cff75fbeb8b.js +2 -0
- package/dist/sp-http-msgraph_en-us_c25b4ebcf02eb1bfeda7.js +2 -0
- package/dist/sp-http-msgraph_qps-ploc_e3ac749f677a1d25e5d1.js +2 -0
- package/dist/sp-http-msgraph_qps-ploca_1b3894e46de77590c544.js +2 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/KillSwitches.js +16 -0
- package/lib-commonjs/MSGraphAuthenticationProvider.js +39 -33
- package/lib-commonjs/MSGraphClient.js +71 -82
- package/lib-commonjs/MSGraphClientFactory.js +73 -79
- package/lib-commonjs/MSGraphClientV3.js +135 -156
- package/lib-commonjs/common/Killswitches.js +26 -16
- package/lib-commonjs/index.js +23 -12
- package/lib-dts/KillSwitches.d.ts +2 -0
- package/lib-esm/KillSwitches.js +6 -0
- package/lib-esm/MSGraphAuthenticationProvider.js +49 -0
- package/lib-esm/MSGraphClient.js +97 -0
- package/lib-esm/MSGraphClientFactory.js +94 -0
- package/lib-esm/MSGraphClientV3.js +190 -0
- package/{lib → lib-esm}/common/Killswitches.js +5 -10
- package/{lib → lib-esm}/index.js +3 -3
- package/package.json +39 -8
- package/dist/chunk.sp-http-msgraphclient_none_99a41fce9bf3925a21e2.js +0 -2
- package/dist/chunk.sp-http-msgraphclientv3_none_c34e76d04711b268a3cd.js +0 -2
- package/dist/sp-http-msgraph_default_6e69c31eaaed44b5aab3.js +0 -1
- package/dist/sp-http-msgraph_en-us_26c6c90f8da57ad234d5.js +0 -1
- package/dist/sp-http-msgraph_qps-ploc_db5eb720e90b9545bca7.js +0 -1
- package/dist/sp-http-msgraph_qps-ploca_cb2655427d0c64681f92.js +0 -1
- package/lib/MSGraphAuthenticationProvider.d.ts.map +0 -1
- package/lib/MSGraphAuthenticationProvider.js +0 -50
- package/lib/MSGraphClient.d.ts.map +0 -1
- package/lib/MSGraphClient.js +0 -104
- package/lib/MSGraphClientFactory.d.ts.map +0 -1
- package/lib/MSGraphClientFactory.js +0 -106
- package/lib/MSGraphClientV3.d.ts.map +0 -1
- package/lib/MSGraphClientV3.js +0 -206
- package/lib/common/Killswitches.d.ts.map +0 -1
- package/lib/index.d.ts.map +0 -1
- /package/{lib → lib-dts}/MSGraphAuthenticationProvider.d.ts +0 -0
- /package/{lib → lib-dts}/MSGraphClient.d.ts +0 -0
- /package/{lib → lib-dts}/MSGraphClientFactory.d.ts +0 -0
- /package/{lib → lib-dts}/MSGraphClientV3.d.ts +0 -0
- /package/{lib → lib-dts}/SPHttpMsGraphStrings.resx.d.ts +0 -0
- /package/{lib → lib-dts}/common/Killswitches.d.ts +0 -0
- /package/{lib → lib-dts}/index.d.ts +0 -0
- /package/{lib → lib-esm}/SPHttpMsGraphStrings.resx.json +0 -0
- /package/{lib → lib-esm}/sp-http-msgraph.manifest.json +0 -0
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { ServiceKey, _SPKillSwitch } from '@microsoft/sp-core-library';
|
|
2
|
-
import { _QosMonitor } from '@microsoft/sp-diagnostics';
|
|
3
|
-
import MSGraphClient from './MSGraphClient';
|
|
4
|
-
/**
|
|
5
|
-
* Returns a preinitialized version of the MSGraphClient.
|
|
6
|
-
* For more information: {@link https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-msgraph}
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
var MSGraphClientFactory = /** @class */ (function () {
|
|
11
|
-
/**
|
|
12
|
-
* @param serviceScope - Provides services for the MSGraphClient to consume.
|
|
13
|
-
*
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
function MSGraphClientFactory(serviceScope) {
|
|
17
|
-
this._serviceScope = serviceScope;
|
|
18
|
-
}
|
|
19
|
-
MSGraphClientFactory.prototype.getClient = function (version, options) {
|
|
20
|
-
var _this = this;
|
|
21
|
-
if (!version || version === '1') {
|
|
22
|
-
// returns a v1 version of MSGraphClient
|
|
23
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
24
|
-
if (!MSGraphClient._instance) {
|
|
25
|
-
return import(
|
|
26
|
-
/* webpackChunkName: 'sp-http-msgraphclient' */ '@microsoft/microsoft-graph-clientv1/lib/graph-js-sdk-web').then(function () {
|
|
27
|
-
return new MSGraphClient(_this._serviceScope);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
return Promise.resolve(new MSGraphClient(this._serviceScope));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
else if (version === '3' &&
|
|
35
|
-
!_SPKillSwitch.isActivated('24401914-15d6-4c3c-aeea-4aace46d5586' /* '01/06/2022', 'use new MSGraphVersion' */)) {
|
|
36
|
-
var qosMonitor_1 = new _QosMonitor('MSGraphClientFactory.GetClientV3');
|
|
37
|
-
// returns a v3 version of MSGraphClient
|
|
38
|
-
// Should only import once no matter how many times it is called
|
|
39
|
-
return import(/* webpackChunkName: 'sp-http-msgraphclientv3' */ './MSGraphClientV3')
|
|
40
|
-
.then(function (msGraphClientV3) {
|
|
41
|
-
// We create a new object every time rather than referencing an existing object in case the service scope changes
|
|
42
|
-
qosMonitor_1.writeSuccess({ version: 3, options: !!options });
|
|
43
|
-
return new msGraphClientV3.default(_this._serviceScope, options, undefined);
|
|
44
|
-
})
|
|
45
|
-
.catch(function (error) {
|
|
46
|
-
qosMonitor_1.writeUnexpectedFailure('ImportMSGraphV3ChunkFailed', error);
|
|
47
|
-
throw error;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
var errorMessage = 'Not yet implemented.';
|
|
52
|
-
throw Error(errorMessage);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Returns an instance of the MSGraphClient that communicates with the current tenant's configurable Service Pricipal.
|
|
57
|
-
* Allows to specify custom middleware options.
|
|
58
|
-
*
|
|
59
|
-
* @param version - The version of the Graph API to use. 3.
|
|
60
|
-
* @param options - Client options for the Graph API.
|
|
61
|
-
*/
|
|
62
|
-
MSGraphClientFactory.prototype.getClientWithMiddleware = function (version, options) {
|
|
63
|
-
var _this = this;
|
|
64
|
-
var qosMonitor = new _QosMonitor('MSGraphClientFactory.GetClientV3WithMiddleware');
|
|
65
|
-
// returns a v3 version of MSGraphClient
|
|
66
|
-
// Should only import once no matter how many times it is called
|
|
67
|
-
return import(/* webpackChunkName: 'sp-http-msgraphclientv3' */ './MSGraphClientV3')
|
|
68
|
-
.then(function (msGraphClientV3) {
|
|
69
|
-
// We create a new object every time rather than referencing an existing object in case the service scope changes
|
|
70
|
-
qosMonitor.writeSuccess({ version: 3 });
|
|
71
|
-
return new msGraphClientV3.default(_this._serviceScope, undefined, options);
|
|
72
|
-
})
|
|
73
|
-
.catch(function (error) {
|
|
74
|
-
qosMonitor.writeUnexpectedFailure('ImportMSGraphV3ChunkFailed', error);
|
|
75
|
-
throw error;
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Returns a v3 version of MSGraphClient with the 1P App Principal
|
|
80
|
-
*
|
|
81
|
-
* @internal
|
|
82
|
-
*
|
|
83
|
-
*/
|
|
84
|
-
MSGraphClientFactory.prototype.getClientInternal = function (version, options) {
|
|
85
|
-
var _this = this;
|
|
86
|
-
var qosMonitor = new _QosMonitor('MSGraphClientFactory.GetInternalClientV3');
|
|
87
|
-
// Should only import once no matter how many times it is called
|
|
88
|
-
return import(/* webpackChunkName: 'sp-http-msgraphclientv3' */ './MSGraphClientV3')
|
|
89
|
-
.then(function (msGraphClientV3) {
|
|
90
|
-
// We create a new object every time rather than referencing an existing object in case the service scope changes
|
|
91
|
-
qosMonitor.writeSuccess({ version: 3, options: !!options });
|
|
92
|
-
return new msGraphClientV3.default(_this._serviceScope, options, undefined, true);
|
|
93
|
-
})
|
|
94
|
-
.catch(function (error) {
|
|
95
|
-
qosMonitor.writeUnexpectedFailure('ImportMSGraphV3ChunkFailed', error);
|
|
96
|
-
throw error;
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* The service key for MSGraphClientFactory.
|
|
101
|
-
*/
|
|
102
|
-
MSGraphClientFactory.serviceKey = ServiceKey.create('sp-http:MSGraphClientFactory', MSGraphClientFactory);
|
|
103
|
-
return MSGraphClientFactory;
|
|
104
|
-
}());
|
|
105
|
-
export default MSGraphClientFactory;
|
|
106
|
-
//# sourceMappingURL=MSGraphClientFactory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MSGraphClientV3.d.ts","sourceRoot":"","sources":["../src/MSGraphClientV3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,YAAY,EAAY,MAAM,4BAA4B,CAAC;AAE9F,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,OAAO,EACP,MAAM,EAEP,MAAM,mCAAmC,CAAC;AAqB3C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAS;IACjC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAS;IACzC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAS;IAErC,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,0BAA0B,CAA2C;IAC7E,OAAO,CAAC,mBAAmB,CAAoC;IAE/D;;;;OAIG;gBAED,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5B,aAAa,EAAE,aAAa,GAAG,SAAS,EACxC,cAAc,CAAC,EAAE,OAAO;IA0C1B;;;;;;;;;;;;;;;OAeG;IACI,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY;IAiBtC;;OAEG;IACH,IAAW,MAAM,IAAI,MAAM,CAK1B;IAED,OAAO,CAAC,0BAA0B;IAqBlC,OAAO,CAAC,wCAAwC;IAmBhD,OAAO,CAAC,kCAAkC;IAoB1C,OAAO,CAAC,qBAAqB;CAyE9B"}
|
package/lib/MSGraphClientV3.js
DELETED
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import { _ClientManifestData, Validate } from '@microsoft/sp-core-library';
|
|
3
|
-
import { _QosMonitor } from '@microsoft/sp-diagnostics';
|
|
4
|
-
import { Client as _InternalGraphClient, AuthenticationHandler, MiddlewareFactory } from '@msinternal/ms-graph-v3-bundle';
|
|
5
|
-
import { _GraphHttpClientContext, _AadTokenProviders, _SPRequestRateMonitor } from '@microsoft/sp-http-base';
|
|
6
|
-
import { isCustomHostsKSActivated, isPassSdkVersionKSActivated, isRequestRateMonitorKSActivated } from './common/Killswitches';
|
|
7
|
-
import { MSGraphAuthenticationProvider } from './MSGraphAuthenticationProvider';
|
|
8
|
-
/**
|
|
9
|
-
* MSGraphClient is used to perform REST calls against Microsoft Graph.
|
|
10
|
-
*
|
|
11
|
-
* @remarks The Microsoft Graph JavaScript client library is a lightweight wrapper around the
|
|
12
|
-
* Microsoft Graph API. This class allows developers to start making REST calls to MSGraph without
|
|
13
|
-
* needing to initialize the the MSGraph client library. If a custom configuration is desired,
|
|
14
|
-
* the MSGraphClient api function needs to be provided with that custom configuration for
|
|
15
|
-
* every request.
|
|
16
|
-
*
|
|
17
|
-
* For more information: {@link https://github.com/microsoftgraph/msgraph-sdk-javascript}
|
|
18
|
-
*
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
var MSGraphClientV3 = /** @class */ (function () {
|
|
22
|
-
/**
|
|
23
|
-
* @param serviceScope - Provides services for the MSGraphClient to consume.
|
|
24
|
-
*
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
function MSGraphClientV3(serviceScope, options, clientOptions, internalClient) {
|
|
28
|
-
var _this = this;
|
|
29
|
-
this._isInternal = false;
|
|
30
|
-
serviceScope.whenFinished(function () {
|
|
31
|
-
if (!MSGraphClientV3._graphBaseUrl) {
|
|
32
|
-
MSGraphClientV3._graphBaseUrl = serviceScope
|
|
33
|
-
.consume(_GraphHttpClientContext.serviceKey)
|
|
34
|
-
.getGraphEndpointUrl();
|
|
35
|
-
}
|
|
36
|
-
if (!isPassSdkVersionKSActivated()) {
|
|
37
|
-
var clientManifestData = serviceScope.consume(_ClientManifestData.serviceKey);
|
|
38
|
-
_this._consumerComponentManifest = clientManifestData.manifest;
|
|
39
|
-
}
|
|
40
|
-
if (!isRequestRateMonitorKSActivated()) {
|
|
41
|
-
_this._requestRateMonitor = serviceScope.consume(_SPRequestRateMonitor.serviceKey);
|
|
42
|
-
}
|
|
43
|
-
if (internalClient) {
|
|
44
|
-
_this._isInternal = true;
|
|
45
|
-
if (!MSGraphClientV3._internalInstance) {
|
|
46
|
-
MSGraphClientV3._internalInstance = _this._createInternalGraphClientInstance(_AadTokenProviders.configurable, options);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
else if (!MSGraphClientV3._instance) {
|
|
50
|
-
if (clientOptions !== undefined) {
|
|
51
|
-
MSGraphClientV3._instance = _this._createGraphClientInstanceWithMiddleware(_AadTokenProviders.configurable, clientOptions);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
MSGraphClientV3._instance = _this._createGraphClientInstance(_AadTokenProviders.configurable, options);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* All calls to Microsoft Graph are chained together starting with the api function.
|
|
61
|
-
*
|
|
62
|
-
* @remarks Path supports the following formats:
|
|
63
|
-
* * me
|
|
64
|
-
* * /me
|
|
65
|
-
* * https://graph.microsoft.com/v1.0/me
|
|
66
|
-
* * https://graph.microsoft.com/beta/me
|
|
67
|
-
* * me/events?$filter=startswith(subject, 'ship')
|
|
68
|
-
*
|
|
69
|
-
* The authProvider and baseUrl option should not be used, as they have already been
|
|
70
|
-
* provided by the framework. See the official documentation here:
|
|
71
|
-
* https://github.com/microsoftgraph/msgraph-sdk-javascript
|
|
72
|
-
*
|
|
73
|
-
* @param path - The path for the request to MSGraph.
|
|
74
|
-
*/
|
|
75
|
-
MSGraphClientV3.prototype.api = function (path) {
|
|
76
|
-
Validate.isNonemptyString(path, 'path');
|
|
77
|
-
if (!isRequestRateMonitorKSActivated() && this._requestRateMonitor && this._consumerComponentManifest) {
|
|
78
|
-
var _a = this._consumerComponentManifest, componentType = _a.componentType, alias = _a.alias, id = _a.id;
|
|
79
|
-
if (componentType === 'WebPart' || componentType === 'AdaptiveCardExtension') {
|
|
80
|
-
var trackingUrl = path.startsWith('http')
|
|
81
|
-
? path
|
|
82
|
-
: new URL(path.replace(/^\//, ''), MSGraphClientV3._graphBaseUrl).href;
|
|
83
|
-
this._requestRateMonitor.trackRequest(trackingUrl, "".concat(componentType, ".").concat(alias, ".").concat(id));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (this._isInternal) {
|
|
87
|
-
return MSGraphClientV3._internalInstance.api(path);
|
|
88
|
-
}
|
|
89
|
-
return MSGraphClientV3._instance.api(path);
|
|
90
|
-
};
|
|
91
|
-
Object.defineProperty(MSGraphClientV3.prototype, "client", {
|
|
92
|
-
/**
|
|
93
|
-
* Gets the instance of the instantiated Client object from Microsoft Graph SDK.
|
|
94
|
-
*/
|
|
95
|
-
get: function () {
|
|
96
|
-
if (this._isInternal) {
|
|
97
|
-
return MSGraphClientV3._internalInstance;
|
|
98
|
-
}
|
|
99
|
-
return MSGraphClientV3._instance;
|
|
100
|
-
},
|
|
101
|
-
enumerable: false,
|
|
102
|
-
configurable: true
|
|
103
|
-
});
|
|
104
|
-
MSGraphClientV3.prototype._createGraphClientInstance = function (tokenProvider, options) {
|
|
105
|
-
var qosMonitor = new _QosMonitor('MSGraphClientV3.CreateGraphClientInstance');
|
|
106
|
-
var graphClient;
|
|
107
|
-
try {
|
|
108
|
-
graphClient = this._createClientInstance(__assign(__assign({}, options), { authProvider: undefined }), tokenProvider, false);
|
|
109
|
-
}
|
|
110
|
-
catch (e) {
|
|
111
|
-
qosMonitor.writeUnexpectedFailure(e.message, e);
|
|
112
|
-
throw e;
|
|
113
|
-
}
|
|
114
|
-
return graphClient;
|
|
115
|
-
};
|
|
116
|
-
MSGraphClientV3.prototype._createGraphClientInstanceWithMiddleware = function (tokenProvider, options) {
|
|
117
|
-
var qosMonitor = new _QosMonitor('MSGraphClientV3.CreateGraphClientInstanceWithMiddleware');
|
|
118
|
-
var graphClient;
|
|
119
|
-
try {
|
|
120
|
-
graphClient = this._createClientInstance(options, tokenProvider, false);
|
|
121
|
-
qosMonitor.writeSuccess();
|
|
122
|
-
return graphClient;
|
|
123
|
-
}
|
|
124
|
-
catch (e) {
|
|
125
|
-
qosMonitor.writeUnexpectedFailure(e.message, e);
|
|
126
|
-
throw e;
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
MSGraphClientV3.prototype._createInternalGraphClientInstance = function (tokenProvider, options) {
|
|
130
|
-
var qosMonitor = new _QosMonitor('MSGraphClientV3.CreateInternalGraphClientInstance');
|
|
131
|
-
var graphClient;
|
|
132
|
-
try {
|
|
133
|
-
graphClient = this._createClientInstance(__assign(__assign({}, options), { authProvider: undefined }), tokenProvider, true);
|
|
134
|
-
}
|
|
135
|
-
catch (e) {
|
|
136
|
-
qosMonitor.writeUnexpectedFailure(e.message, e);
|
|
137
|
-
throw e;
|
|
138
|
-
}
|
|
139
|
-
return graphClient;
|
|
140
|
-
};
|
|
141
|
-
MSGraphClientV3.prototype._createClientInstance = function (options, tokenProvider, isInternal) {
|
|
142
|
-
var clientOptions = options || {};
|
|
143
|
-
clientOptions.baseUrl = MSGraphClientV3._graphBaseUrl;
|
|
144
|
-
var middlewareChain;
|
|
145
|
-
if (!clientOptions.middleware) {
|
|
146
|
-
// creating default chain
|
|
147
|
-
middlewareChain = MiddlewareFactory.getDefaultMiddlewareChain(new MSGraphAuthenticationProvider(tokenProvider, MSGraphClientV3._graphBaseUrl, isInternal));
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
// a developer has provided middleware(s)
|
|
151
|
-
var authMiddleware = new AuthenticationHandler(new MSGraphAuthenticationProvider(tokenProvider, MSGraphClientV3._graphBaseUrl, isInternal));
|
|
152
|
-
middlewareChain = [authMiddleware];
|
|
153
|
-
if (Array.isArray(clientOptions.middleware)) {
|
|
154
|
-
middlewareChain.push.apply(middlewareChain, clientOptions.middleware);
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
middlewareChain.push(clientOptions.middleware);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
if (!isPassSdkVersionKSActivated() && this._consumerComponentManifest) {
|
|
161
|
-
if (!clientOptions.fetchOptions) {
|
|
162
|
-
clientOptions.fetchOptions = {};
|
|
163
|
-
}
|
|
164
|
-
if (!clientOptions.fetchOptions.headers) {
|
|
165
|
-
clientOptions.fetchOptions.headers = {};
|
|
166
|
-
}
|
|
167
|
-
var sdkVersionValue = "SPFx/".concat(this._consumerComponentManifest.alias, "/").concat(this._consumerComponentManifest.id, "/Is3PRequest:").concat(this._consumerComponentManifest.isInternal ? '0' : '1');
|
|
168
|
-
var headers = clientOptions.fetchOptions.headers;
|
|
169
|
-
if (Array.isArray(headers)) {
|
|
170
|
-
var sdkVersionHeaderIndex = headers.findIndex(function (header) { return header[0] === 'SdkVersion'; });
|
|
171
|
-
if (sdkVersionHeaderIndex === -1) {
|
|
172
|
-
headers.push(['SdkVersion', sdkVersionValue]);
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
headers[sdkVersionHeaderIndex][1] += ", ".concat(sdkVersionValue);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
else if (headers instanceof Headers) {
|
|
179
|
-
headers.has('SdkVersion')
|
|
180
|
-
? headers.set('SdkVersion', "".concat(headers.get('SdkVersion'), ", ").concat(sdkVersionValue))
|
|
181
|
-
: headers.set('SdkVersion', sdkVersionValue);
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
headers.SdkVersion = headers.SdkVersions
|
|
185
|
-
? "".concat(headers.SdkVersion, ", ").concat(sdkVersionValue)
|
|
186
|
-
: sdkVersionValue;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
// we can add more middleware to the end of the chain here
|
|
190
|
-
clientOptions.middleware = middlewareChain;
|
|
191
|
-
if (!isCustomHostsKSActivated()) {
|
|
192
|
-
try {
|
|
193
|
-
var url = new URL(MSGraphClientV3._graphBaseUrl);
|
|
194
|
-
clientOptions.customHosts = new Set([url.host]);
|
|
195
|
-
}
|
|
196
|
-
catch (e) {
|
|
197
|
-
var qosMonitor = new _QosMonitor('MSGraphClientV3.CustomHostsAdditionsFailed');
|
|
198
|
-
qosMonitor.writeUnexpectedFailure(e.message, e);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
return _InternalGraphClient.initWithMiddleware(clientOptions);
|
|
202
|
-
};
|
|
203
|
-
return MSGraphClientV3;
|
|
204
|
-
}());
|
|
205
|
-
export default MSGraphClientV3;
|
|
206
|
-
//# sourceMappingURL=MSGraphClientV3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Killswitches.d.ts","sourceRoot":"","sources":["../../src/common/Killswitches.ts"],"names":[],"mappings":"AAEA,wBAAgB,2BAA2B,IAAI,OAAO,CAKrD;AAED,wBAAgB,wBAAwB,IAAI,OAAO,CAKlD;AAED,wBAAgB,+BAA+B,IAAI,OAAO,CAKzD"}
|
package/lib/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,KAAK,aAAa,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/F,YAAY,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|