@azure/msal-common 14.0.0-alpha.1 → 14.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +62 -62
  3. package/dist/account/AccountInfo.d.ts +31 -31
  4. package/dist/account/AuthToken.d.ts +20 -20
  5. package/dist/account/AuthToken.js +48 -48
  6. package/dist/account/CcsCredential.d.ts +9 -8
  7. package/dist/account/CcsCredential.d.ts.map +1 -1
  8. package/dist/account/CcsCredential.js +9 -10
  9. package/dist/account/CcsCredential.js.map +1 -1
  10. package/dist/account/ClientCredentials.d.ts +14 -14
  11. package/dist/account/ClientInfo.d.ts +19 -19
  12. package/dist/account/ClientInfo.js +37 -37
  13. package/dist/account/DecodedAuthToken.d.ts +8 -8
  14. package/dist/account/TokenClaims.d.ts +65 -65
  15. package/dist/authority/Authority.d.ts +228 -215
  16. package/dist/authority/Authority.d.ts.map +1 -1
  17. package/dist/authority/Authority.js +716 -682
  18. package/dist/authority/Authority.js.map +1 -1
  19. package/dist/authority/AuthorityFactory.d.ts +30 -30
  20. package/dist/authority/AuthorityFactory.js +47 -47
  21. package/dist/authority/AuthorityMetadata.d.ts +622 -622
  22. package/dist/authority/AuthorityMetadata.js +876 -876
  23. package/dist/authority/AuthorityOptions.d.ts +19 -18
  24. package/dist/authority/AuthorityOptions.d.ts.map +1 -1
  25. package/dist/authority/AuthorityOptions.js +19 -20
  26. package/dist/authority/AuthorityOptions.js.map +1 -1
  27. package/dist/authority/AuthorityType.d.ts +10 -9
  28. package/dist/authority/AuthorityType.d.ts.map +1 -1
  29. package/dist/authority/AuthorityType.js +14 -15
  30. package/dist/authority/AuthorityType.js.map +1 -1
  31. package/dist/authority/AzureRegion.d.ts +1 -1
  32. package/dist/authority/AzureRegionConfiguration.d.ts +5 -5
  33. package/dist/authority/CloudDiscoveryMetadata.d.ts +5 -5
  34. package/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +13 -13
  35. package/dist/authority/CloudInstanceDiscoveryErrorResponse.js +8 -8
  36. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +9 -9
  37. package/dist/authority/CloudInstanceDiscoveryResponse.js +8 -8
  38. package/dist/authority/ImdsOptions.d.ts +5 -5
  39. package/dist/authority/OpenIdConfigResponse.d.ts +11 -11
  40. package/dist/authority/OpenIdConfigResponse.js +10 -10
  41. package/dist/authority/ProtocolMode.d.ts +8 -7
  42. package/dist/authority/ProtocolMode.d.ts.map +1 -1
  43. package/dist/authority/ProtocolMode.js +12 -13
  44. package/dist/authority/ProtocolMode.js.map +1 -1
  45. package/dist/authority/RegionDiscovery.d.ts +30 -30
  46. package/dist/authority/RegionDiscovery.js +108 -108
  47. package/dist/authority/RegionDiscoveryMetadata.d.ts +6 -6
  48. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +15 -15
  49. package/dist/cache/CacheManager.d.ts +443 -443
  50. package/dist/cache/CacheManager.js +1011 -1011
  51. package/dist/cache/entities/AccessTokenEntity.d.ts +56 -56
  52. package/dist/cache/entities/AccessTokenEntity.js +111 -111
  53. package/dist/cache/entities/AccountEntity.d.ts +99 -99
  54. package/dist/cache/entities/AccountEntity.js +248 -248
  55. package/dist/cache/entities/AppMetadataEntity.d.ts +39 -39
  56. package/dist/cache/entities/AppMetadataEntity.js +66 -66
  57. package/dist/cache/entities/AuthorityMetadataEntity.d.ts +47 -47
  58. package/dist/cache/entities/AuthorityMetadataEntity.js +77 -77
  59. package/dist/cache/entities/CacheRecord.d.ts +13 -13
  60. package/dist/cache/entities/CacheRecord.js +13 -13
  61. package/dist/cache/entities/CredentialEntity.d.ts +88 -88
  62. package/dist/cache/entities/CredentialEntity.js +136 -136
  63. package/dist/cache/entities/IdTokenEntity.d.ts +34 -34
  64. package/dist/cache/entities/IdTokenEntity.js +56 -56
  65. package/dist/cache/entities/RefreshTokenEntity.d.ts +36 -36
  66. package/dist/cache/entities/RefreshTokenEntity.js +59 -59
  67. package/dist/cache/entities/ServerTelemetryEntity.d.ts +12 -12
  68. package/dist/cache/entities/ServerTelemetryEntity.js +27 -27
  69. package/dist/cache/entities/ThrottlingEntity.d.ts +13 -13
  70. package/dist/cache/entities/ThrottlingEntity.js +23 -23
  71. package/dist/cache/interface/ICacheManager.d.ts +165 -165
  72. package/dist/cache/interface/ICachePlugin.d.ts +5 -5
  73. package/dist/cache/interface/ISerializableTokenCache.d.ts +4 -4
  74. package/dist/cache/persistence/TokenCacheContext.d.ts +23 -23
  75. package/dist/cache/persistence/TokenCacheContext.js +25 -25
  76. package/dist/cache/utils/CacheTypes.d.ts +62 -62
  77. package/dist/client/AuthorizationCodeClient.d.ts +71 -71
  78. package/dist/client/AuthorizationCodeClient.js +433 -433
  79. package/dist/client/BaseClient.d.ts +50 -50
  80. package/dist/client/BaseClient.js +92 -92
  81. package/dist/client/RefreshTokenClient.d.ts +34 -34
  82. package/dist/client/RefreshTokenClient.js +239 -239
  83. package/dist/client/SilentFlowClient.d.ts +24 -24
  84. package/dist/client/SilentFlowClient.js +94 -94
  85. package/dist/config/AppTokenProvider.d.ts +38 -38
  86. package/dist/config/ClientConfiguration.d.ts +133 -133
  87. package/dist/config/ClientConfiguration.js +88 -88
  88. package/dist/crypto/ICrypto.d.ts +62 -62
  89. package/dist/crypto/ICrypto.js +42 -42
  90. package/dist/crypto/IGuidGenerator.d.ts +4 -4
  91. package/dist/crypto/JoseHeader.d.ts +21 -21
  92. package/dist/crypto/JoseHeader.js +36 -36
  93. package/dist/crypto/PopTokenGenerator.d.ts +58 -57
  94. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
  95. package/dist/crypto/PopTokenGenerator.js +82 -83
  96. package/dist/crypto/PopTokenGenerator.js.map +1 -1
  97. package/dist/crypto/SignedHttpRequest.d.ts +11 -11
  98. package/dist/error/AuthError.d.ts +47 -47
  99. package/dist/error/AuthError.js +51 -51
  100. package/dist/error/ClientAuthError.d.ts +412 -412
  101. package/dist/error/ClientAuthError.js +519 -519
  102. package/dist/error/ClientConfigurationError.d.ts +206 -198
  103. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  104. package/dist/error/ClientConfigurationError.js +259 -249
  105. package/dist/error/ClientConfigurationError.js.map +1 -1
  106. package/dist/error/InteractionRequiredAuthError.d.ts +59 -59
  107. package/dist/error/InteractionRequiredAuthError.js +78 -78
  108. package/dist/error/JoseHeaderError.d.ts +28 -28
  109. package/dist/error/JoseHeaderError.js +39 -39
  110. package/dist/error/ServerError.d.ts +7 -7
  111. package/dist/error/ServerError.js +14 -14
  112. package/dist/index.cjs.js +8826 -8813
  113. package/dist/index.cjs.js.map +1 -1
  114. package/dist/index.d.ts +93 -93
  115. package/dist/index.js +1 -1
  116. package/dist/logger/Logger.d.ts +95 -95
  117. package/dist/logger/Logger.js +197 -197
  118. package/dist/network/INetworkModule.d.ts +29 -29
  119. package/dist/network/INetworkModule.js +14 -14
  120. package/dist/network/NetworkManager.d.ts +32 -32
  121. package/dist/network/NetworkManager.js +33 -33
  122. package/dist/network/RequestThumbprint.d.ts +16 -16
  123. package/dist/network/ThrottlingUtils.d.ts +41 -41
  124. package/dist/network/ThrottlingUtils.js +94 -94
  125. package/dist/packageMetadata.d.ts +2 -2
  126. package/dist/packageMetadata.d.ts.map +1 -1
  127. package/dist/packageMetadata.js +4 -4
  128. package/dist/request/AuthenticationHeaderParser.d.ts +19 -19
  129. package/dist/request/AuthenticationHeaderParser.js +55 -55
  130. package/dist/request/BaseAuthRequest.d.ts +37 -37
  131. package/dist/request/CommonAuthorizationCodeRequest.d.ts +27 -27
  132. package/dist/request/CommonAuthorizationUrlRequest.d.ts +50 -50
  133. package/dist/request/CommonClientCredentialRequest.d.ts +17 -17
  134. package/dist/request/CommonDeviceCodeRequest.d.ts +21 -21
  135. package/dist/request/CommonEndSessionRequest.d.ts +21 -21
  136. package/dist/request/CommonOnBehalfOfRequest.d.ts +13 -13
  137. package/dist/request/CommonRefreshTokenRequest.d.ts +19 -19
  138. package/dist/request/CommonSilentFlowRequest.d.ts +18 -18
  139. package/dist/request/CommonUsernamePasswordRequest.d.ts +17 -17
  140. package/dist/request/NativeRequest.d.ts +19 -19
  141. package/dist/request/NativeSignOutRequest.d.ts +5 -5
  142. package/dist/request/RequestParameterBuilder.d.ts +216 -216
  143. package/dist/request/RequestParameterBuilder.js +374 -374
  144. package/dist/request/RequestValidator.d.ts +33 -33
  145. package/dist/request/RequestValidator.js +82 -83
  146. package/dist/request/RequestValidator.js.map +1 -1
  147. package/dist/request/ScopeSet.d.ts +88 -88
  148. package/dist/request/ScopeSet.js +197 -197
  149. package/dist/response/AuthenticationResult.d.ts +39 -39
  150. package/dist/response/AuthorizationCodePayload.d.ts +13 -13
  151. package/dist/response/DeviceCodeResponse.d.ts +25 -25
  152. package/dist/response/ExternalTokenResponse.d.ts +15 -15
  153. package/dist/response/IMDSBadResponse.d.ts +4 -4
  154. package/dist/response/ResponseHandler.d.ts +72 -72
  155. package/dist/response/ResponseHandler.js +300 -300
  156. package/dist/response/ServerAuthorizationCodeResponse.d.ts +25 -25
  157. package/dist/response/ServerAuthorizationTokenResponse.d.ts +44 -44
  158. package/dist/telemetry/performance/IPerformanceClient.d.ts +42 -42
  159. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +5 -5
  160. package/dist/telemetry/performance/PerformanceClient.d.ts +189 -189
  161. package/dist/telemetry/performance/PerformanceClient.js +406 -406
  162. package/dist/telemetry/performance/PerformanceEvent.d.ts +441 -439
  163. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  164. package/dist/telemetry/performance/PerformanceEvent.js +225 -227
  165. package/dist/telemetry/performance/PerformanceEvent.js.map +1 -1
  166. package/dist/telemetry/performance/StubPerformanceClient.d.ts +15 -19
  167. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
  168. package/dist/telemetry/performance/StubPerformanceClient.js +22 -36
  169. package/dist/telemetry/performance/StubPerformanceClient.js.map +1 -1
  170. package/dist/telemetry/server/ServerTelemetryManager.d.ts +65 -65
  171. package/dist/telemetry/server/ServerTelemetryManager.js +196 -196
  172. package/dist/telemetry/server/ServerTelemetryRequest.d.ts +8 -8
  173. package/dist/url/IUri.d.ts +12 -12
  174. package/dist/url/UrlString.d.ts +70 -70
  175. package/dist/url/UrlString.js +242 -242
  176. package/dist/utils/Constants.d.ts +345 -331
  177. package/dist/utils/Constants.d.ts.map +1 -1
  178. package/dist/utils/Constants.js +353 -373
  179. package/dist/utils/Constants.js.map +1 -1
  180. package/dist/utils/MsalTypes.d.ts +6 -6
  181. package/dist/utils/ProtocolUtils.d.ts +42 -42
  182. package/dist/utils/ProtocolUtils.js +71 -71
  183. package/dist/utils/StringUtils.d.ts +53 -53
  184. package/dist/utils/StringUtils.js +124 -124
  185. package/dist/utils/TimeUtils.d.ts +27 -27
  186. package/dist/utils/TimeUtils.js +45 -45
  187. package/package.json +86 -79
@@ -1,440 +1,442 @@
1
- /**
2
- * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient.
3
- *
4
- * @export
5
- * @enum {number}
6
- */
7
- export declare enum PerformanceEvents {
8
- /**
9
- * acquireTokenByCode API (msal-browser and msal-node).
10
- * Used to acquire tokens by trading an authorization code against the token endpoint.
11
- */
12
- AcquireTokenByCode = "acquireTokenByCode",
13
- /**
14
- * acquireTokenByRefreshToken API (msal-browser and msal-node).
15
- * Used to renew an access token using a refresh token against the token endpoint.
16
- */
17
- AcquireTokenByRefreshToken = "acquireTokenByRefreshToken",
18
- /**
19
- * acquireTokenSilent API (msal-browser and msal-node).
20
- * Used to silently acquire a new access token (from the cache or the network).
21
- */
22
- AcquireTokenSilent = "acquireTokenSilent",
23
- /**
24
- * acquireTokenSilentAsync (msal-browser).
25
- * Internal API for acquireTokenSilent.
26
- */
27
- AcquireTokenSilentAsync = "acquireTokenSilentAsync",
28
- /**
29
- * acquireTokenPopup (msal-browser).
30
- * Used to acquire a new access token interactively through pop ups
31
- */
32
- AcquireTokenPopup = "acquireTokenPopup",
33
- /**
34
- * getPublicKeyThumbprint API in CryptoOpts class (msal-browser).
35
- * Used to generate a public/private keypair and generate a public key thumbprint for pop requests.
36
- */
37
- CryptoOptsGetPublicKeyThumbprint = "cryptoOptsGetPublicKeyThumbprint",
38
- /**
39
- * signJwt API in CryptoOpts class (msal-browser).
40
- * Used to signed a pop token.
41
- */
42
- CryptoOptsSignJwt = "cryptoOptsSignJwt",
43
- /**
44
- * acquireToken API in the SilentCacheClient class (msal-browser).
45
- * Used to read access tokens from the cache.
46
- */
47
- SilentCacheClientAcquireToken = "silentCacheClientAcquireToken",
48
- /**
49
- * acquireToken API in the SilentIframeClient class (msal-browser).
50
- * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe.
51
- */
52
- SilentIframeClientAcquireToken = "silentIframeClientAcquireToken",
53
- /**
54
- * acquireToken API in SilentRereshClient (msal-browser).
55
- * Used to acquire a new set of tokens from the token endpoint using a refresh token.
56
- */
57
- SilentRefreshClientAcquireToken = "silentRefreshClientAcquireToken",
58
- /**
59
- * ssoSilent API (msal-browser).
60
- * Used to silently acquire an authorization code and set of tokens using a hidden iframe.
61
- */
62
- SsoSilent = "ssoSilent",
63
- /**
64
- * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser).
65
- * Used to load authority metadata for a request.
66
- */
67
- StandardInteractionClientGetDiscoveredAuthority = "standardInteractionClientGetDiscoveredAuthority",
68
- /**
69
- * acquireToken APIs in msal-browser.
70
- * Used to make an /authorize endpoint call with native brokering enabled.
71
- */
72
- FetchAccountIdWithNativeBroker = "fetchAccountIdWithNativeBroker",
73
- /**
74
- * acquireToken API in NativeInteractionClient class (msal-browser).
75
- * Used to acquire a token from Native component when native brokering is enabled.
76
- */
77
- NativeInteractionClientAcquireToken = "nativeInteractionClientAcquireToken",
78
- /**
79
- * Time spent creating default headers for requests to token endpoint
80
- */
81
- BaseClientCreateTokenRequestHeaders = "baseClientCreateTokenRequestHeaders",
82
- /**
83
- * Used to measure the time taken for completing embedded-broker handshake (PW-Broker).
84
- */
85
- BrokerHandhshake = "brokerHandshake",
86
- /**
87
- * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) .
88
- */
89
- AcquireTokenByRefreshTokenInBroker = "acquireTokenByRefreshTokenInBroker",
90
- /**
91
- * Time taken for token acquisition by broker
92
- */
93
- AcquireTokenByBroker = "acquireTokenByBroker",
94
- /**
95
- * Time spent on the network for refresh token acquisition
96
- */
97
- RefreshTokenClientExecuteTokenRequest = "refreshTokenClientExecuteTokenRequest",
98
- /**
99
- * Time taken for acquiring refresh token , records RT size
100
- */
101
- RefreshTokenClientAcquireToken = "refreshTokenClientAcquireToken",
102
- /**
103
- * Time taken for acquiring cached refresh token
104
- */
105
- RefreshTokenClientAcquireTokenWithCachedRefreshToken = "refreshTokenClientAcquireTokenWithCachedRefreshToken",
106
- /**
107
- * acquireTokenByRefreshToken API in RefreshTokenClient (msal-common).
108
- */
109
- RefreshTokenClientAcquireTokenByRefreshToken = "refreshTokenClientAcquireTokenByRefreshToken",
110
- /**
111
- * Helper function to create token request body in RefreshTokenClient (msal-common).
112
- */
113
- RefreshTokenClientCreateTokenRequestBody = "refreshTokenClientCreateTokenRequestBody",
114
- /**
115
- * acquireTokenFromCache (msal-browser).
116
- * Internal API for acquiring token from cache
117
- */
118
- AcquireTokenFromCache = "acquireTokenFromCache",
119
- /**
120
- * acquireTokenBySilentIframe (msal-browser).
121
- * Internal API for acquiring token by silent Iframe
122
- */
123
- AcquireTokenBySilentIframe = "acquireTokenBySilentIframe",
124
- /**
125
- * Internal API for initializing base request in BaseInteractionClient (msal-browser)
126
- */
127
- InitializeBaseRequest = "initializeBaseRequest",
128
- /**
129
- * Internal API for initializing silent request in SilentCacheClient (msal-browser)
130
- */
131
- InitializeSilentRequest = "initializeSilentRequest",
132
- InitializeClientApplication = "initializeClientApplication",
133
- /**
134
- * Helper function in SilentIframeClient class (msal-browser).
135
- */
136
- SilentIframeClientTokenHelper = "silentIframeClientTokenHelper",
137
- /**
138
- * SilentHandler
139
- */
140
- SilentHandlerInitiateAuthRequest = "silentHandlerInitiateAuthRequest",
141
- SilentHandlerMonitorIframeForHash = "silentHandlerMonitorIframeForHash",
142
- SilentHandlerLoadFrame = "silentHandlerLoadFrame",
143
- /**
144
- * Helper functions in StandardInteractionClient class (msal-browser)
145
- */
146
- StandardInteractionClientCreateAuthCodeClient = "standardInteractionClientCreateAuthCodeClient",
147
- StandardInteractionClientGetClientConfiguration = "standardInteractionClientGetClientConfiguration",
148
- StandardInteractionClientInitializeAuthorizationRequest = "standardInteractionClientInitializeAuthorizationRequest",
149
- StandardInteractionClientInitializeAuthorizationCodeRequest = "standardInteractionClientInitializeAuthorizationCodeRequest",
150
- /**
151
- * getAuthCodeUrl API (msal-browser and msal-node).
152
- */
153
- GetAuthCodeUrl = "getAuthCodeUrl",
154
- /**
155
- * Functions from InteractionHandler (msal-browser)
156
- */
157
- HandleCodeResponseFromServer = "handleCodeResponseFromServer",
158
- HandleCodeResponseFromHash = "handleCodeResponseFromHash",
159
- UpdateTokenEndpointAuthority = "updateTokenEndpointAuthority",
160
- /**
161
- * APIs in Authorization Code Client (msal-common)
162
- */
163
- AuthClientAcquireToken = "authClientAcquireToken",
164
- AuthClientExecuteTokenRequest = "authClientExecuteTokenRequest",
165
- AuthClientCreateTokenRequestBody = "authClientCreateTokenRequestBody",
166
- AuthClientCreateQueryString = "authClientCreateQueryString",
167
- /**
168
- * Generate functions in PopTokenGenerator (msal-common)
169
- */
170
- PopTokenGenerateCnf = "popTokenGenerateCnf",
171
- PopTokenGenerateKid = "popTokenGenerateKid",
172
- /**
173
- * handleServerTokenResponse API in ResponseHandler (msal-common)
174
- */
175
- HandleServerTokenResponse = "handleServerTokenResponse",
176
- /**
177
- * Authority functions
178
- */
179
- AuthorityFactoryCreateDiscoveredInstance = "authorityFactoryCreateDiscoveredInstance",
180
- AuthorityResolveEndpointsAsync = "authorityResolveEndpointsAsync",
181
- AuthorityGetCloudDiscoveryMetadataFromNetwork = "authorityGetCloudDiscoveryMetadataFromNetwork",
182
- AuthorityUpdateCloudDiscoveryMetadata = "authorityUpdateCloudDiscoveryMetadata",
183
- AuthorityGetEndpointMetadataFromNetwork = "authorityGetEndpointMetadataFromNetwork",
184
- AuthorityUpdateEndpointMetadata = "authorityUpdateEndpointMetadata",
185
- AuthorityUpdateMetadataWithRegionalInformation = "authorityUpdateMetadataWithRegionalInformation",
186
- /**
187
- * Region Discovery functions
188
- */
189
- RegionDiscoveryDetectRegion = "regionDiscoveryDetectRegion",
190
- RegionDiscoveryGetRegionFromIMDS = "regionDiscoveryGetRegionFromIMDS",
191
- RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion",
192
- AcquireTokenByCodeAsync = "acquireTokenByCodeAsync",
193
- GetEndpointMetadataFromNetwork = "getEndpointMetadataFromNetwork",
194
- GetCloudDiscoveryMetadataFromNetworkMeasurement = "getCloudDiscoveryMetadataFromNetworkMeasurement",
195
- HandleRedirectPromiseMeasurement = "handleRedirectPromiseMeasurement",
196
- UpdateCloudDiscoveryMetadataMeasurement = "updateCloudDiscoveryMetadataMeasurement",
197
- UsernamePasswordClientAcquireToken = "usernamePasswordClientAcquireToken",
198
- NativeMessageHandlerHandshake = "nativeMessageHandlerHandshake"
199
- }
200
- /**
201
- * State of the performance event.
202
- *
203
- * @export
204
- * @enum {number}
205
- */
206
- export declare enum PerformanceEventStatus {
207
- NotStarted = 0,
208
- InProgress = 1,
209
- Completed = 2
210
- }
211
- /**
212
- * Fields whose value will not change throughout a request
213
- */
214
- export type StaticFields = {
215
- /**
216
- * The Silent Token Cache Lookup Policy
217
- *
218
- * @type {?(number | undefined)}
219
- */
220
- cacheLookupPolicy?: number | undefined;
221
- /**
222
- * Size of the id token
223
- *
224
- * @type {number}
225
- */
226
- idTokenSize?: number;
227
- /**
228
- *
229
- * Size of the access token
230
- *
231
- * @type {number}
232
- */
233
- accessTokenSize?: number;
234
- /**
235
- *
236
- * Size of the refresh token
237
- *
238
- * @type {number}
239
- */
240
- refreshTokenSize?: number | undefined;
241
- /**
242
- * Application name as specified by the app.
243
- *
244
- * @type {?string}
245
- */
246
- appName?: string;
247
- /**
248
- * Application version as specified by the app.
249
- *
250
- * @type {?string}
251
- */
252
- appVersion?: string;
253
- /**
254
- * The following are fields that may be emitted in native broker scenarios
255
- */
256
- extensionId?: string;
257
- extensionVersion?: string;
258
- matsBrokerVersion?: string;
259
- matsAccountJoinOnStart?: string;
260
- matsAccountJoinOnEnd?: string;
261
- matsDeviceJoin?: string;
262
- matsPromptBehavior?: string;
263
- matsApiErrorCode?: number;
264
- matsUiVisible?: boolean;
265
- matsSilentCode?: number;
266
- matsSilentBiSubCode?: number;
267
- matsSilentMessage?: string;
268
- matsSilentStatus?: number;
269
- matsHttpStatus?: number;
270
- matsHttpEventCount?: number;
271
- httpVerToken?: string;
272
- httpVerAuthority?: string;
273
- /**
274
- * Native broker fields
275
- */
276
- allowNativeBroker?: boolean;
277
- extensionInstalled?: boolean;
278
- extensionHandshakeTimeoutMs?: number;
279
- extensionHandshakeTimedOut?: boolean;
280
- };
281
- /**
282
- * Fields whose value may change throughout a request
283
- */
284
- export type Counters = {
285
- visibilityChangeCount?: number;
286
- incompleteSubsCount?: number;
287
- /**
288
- * Amount of times queued in the JS event queue.
289
- *
290
- * @type {?number}
291
- */
292
- queuedCount?: number;
293
- /**
294
- * Amount of manually completed queue events.
295
- *
296
- * @type {?number}
297
- */
298
- queuedManuallyCompletedCount?: number;
299
- };
300
- export type SubMeasurement = {
301
- name: PerformanceEvents;
302
- startTimeMs: number;
303
- };
304
- /**
305
- * Performance measurement taken by the library, including metadata about the request and application.
306
- *
307
- * @export
308
- * @typedef {PerformanceEvent}
309
- */
310
- export type PerformanceEvent = StaticFields & Counters & {
311
- /**
312
- * Unique id for the event
313
- *
314
- * @type {string}
315
- */
316
- eventId: string;
317
- /**
318
- * State of the perforance measure.
319
- *
320
- * @type {PerformanceEventStatus}
321
- */
322
- status: PerformanceEventStatus;
323
- /**
324
- * Login authority used for the request
325
- *
326
- * @type {string}
327
- */
328
- authority: string;
329
- /**
330
- * Client id for the application
331
- *
332
- * @type {string}
333
- */
334
- clientId: string;
335
- /**
336
- * Correlation ID used for the request
337
- *
338
- * @type {string}
339
- */
340
- correlationId: string;
341
- /**
342
- * End-to-end duration in milliseconds.
343
- * @date 3/22/2022 - 3:40:05 PM
344
- *
345
- * @type {number}
346
- */
347
- durationMs?: number;
348
- /**
349
- * Visibility of the page when the event completed.
350
- * Read from: https://developer.mozilla.org/docs/Web/API/Page_Visibility_API
351
- *
352
- * @type {?(string | null)}
353
- */
354
- endPageVisibility?: string | null;
355
- /**
356
- * Whether the result was retrieved from the cache.
357
- *
358
- * @type {(boolean | null)}
359
- */
360
- fromCache?: boolean | null;
361
- /**
362
- * Event name (usually in the form of classNameFunctionName)
363
- *
364
- * @type {PerformanceEvents}
365
- */
366
- name: PerformanceEvents;
367
- /**
368
- * Visibility of the page when the event completed.
369
- * Read from: https://developer.mozilla.org/docs/Web/API/Page_Visibility_API
370
- *
371
- * @type {?(string | null)}
372
- */
373
- startPageVisibility?: string | null;
374
- /**
375
- * Unix millisecond timestamp when the event was initiated.
376
- *
377
- * @type {number}
378
- */
379
- startTimeMs: number;
380
- /**
381
- * Whether or the operation completed successfully.
382
- *
383
- * @type {(boolean | null)}
384
- */
385
- success?: boolean | null;
386
- /**
387
- * Add specific error code in case of failure
388
- *
389
- * @type {string}
390
- */
391
- errorCode?: string;
392
- /**
393
- * Add specific sub error code in case of failure
394
- *
395
- * @type {string}
396
- */
397
- subErrorCode?: string;
398
- /**
399
- * Name of the library used for the operation.
400
- *
401
- * @type {string}
402
- */
403
- libraryName: string;
404
- /**
405
- * Version of the library used for the operation.
406
- *
407
- * @type {string}
408
- */
409
- libraryVersion: string;
410
- /**
411
- * Whether the response is from a native component (e.g., WAM)
412
- *
413
- * @type {?boolean}
414
- */
415
- isNativeBroker?: boolean;
416
- /**
417
- * Request ID returned from the response
418
- *
419
- * @type {?string}
420
- */
421
- requestId?: string;
422
- /**
423
- * Cache lookup policy
424
- *
425
- * @type {?number}
426
- */
427
- cacheLookupPolicy?: number | undefined;
428
- /**
429
- * Amount of time spent in the JS queue in milliseconds.
430
- *
431
- * @type {?number}
432
- */
433
- queuedTimeMs?: number;
434
- /**
435
- * Sub-measurements for internal use. To be deleted before flushing.
436
- */
437
- incompleteSubMeasurements?: Map<string, SubMeasurement>;
438
- };
439
- export declare const IntFields: ReadonlySet<string>;
1
+ /**
2
+ * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient.
3
+ *
4
+ * @export
5
+ * @enum {number}
6
+ */
7
+ export declare const PerformanceEvents: {
8
+ /**
9
+ * acquireTokenByCode API (msal-browser and msal-node).
10
+ * Used to acquire tokens by trading an authorization code against the token endpoint.
11
+ */
12
+ readonly AcquireTokenByCode: "acquireTokenByCode";
13
+ /**
14
+ * acquireTokenByRefreshToken API (msal-browser and msal-node).
15
+ * Used to renew an access token using a refresh token against the token endpoint.
16
+ */
17
+ readonly AcquireTokenByRefreshToken: "acquireTokenByRefreshToken";
18
+ /**
19
+ * acquireTokenSilent API (msal-browser and msal-node).
20
+ * Used to silently acquire a new access token (from the cache or the network).
21
+ */
22
+ readonly AcquireTokenSilent: "acquireTokenSilent";
23
+ /**
24
+ * acquireTokenSilentAsync (msal-browser).
25
+ * Internal API for acquireTokenSilent.
26
+ */
27
+ readonly AcquireTokenSilentAsync: "acquireTokenSilentAsync";
28
+ /**
29
+ * acquireTokenPopup (msal-browser).
30
+ * Used to acquire a new access token interactively through pop ups
31
+ */
32
+ readonly AcquireTokenPopup: "acquireTokenPopup";
33
+ /**
34
+ * getPublicKeyThumbprint API in CryptoOpts class (msal-browser).
35
+ * Used to generate a public/private keypair and generate a public key thumbprint for pop requests.
36
+ */
37
+ readonly CryptoOptsGetPublicKeyThumbprint: "cryptoOptsGetPublicKeyThumbprint";
38
+ /**
39
+ * signJwt API in CryptoOpts class (msal-browser).
40
+ * Used to signed a pop token.
41
+ */
42
+ readonly CryptoOptsSignJwt: "cryptoOptsSignJwt";
43
+ /**
44
+ * acquireToken API in the SilentCacheClient class (msal-browser).
45
+ * Used to read access tokens from the cache.
46
+ */
47
+ readonly SilentCacheClientAcquireToken: "silentCacheClientAcquireToken";
48
+ /**
49
+ * acquireToken API in the SilentIframeClient class (msal-browser).
50
+ * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe.
51
+ */
52
+ readonly SilentIframeClientAcquireToken: "silentIframeClientAcquireToken";
53
+ /**
54
+ * acquireToken API in SilentRereshClient (msal-browser).
55
+ * Used to acquire a new set of tokens from the token endpoint using a refresh token.
56
+ */
57
+ readonly SilentRefreshClientAcquireToken: "silentRefreshClientAcquireToken";
58
+ /**
59
+ * ssoSilent API (msal-browser).
60
+ * Used to silently acquire an authorization code and set of tokens using a hidden iframe.
61
+ */
62
+ readonly SsoSilent: "ssoSilent";
63
+ /**
64
+ * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser).
65
+ * Used to load authority metadata for a request.
66
+ */
67
+ readonly StandardInteractionClientGetDiscoveredAuthority: "standardInteractionClientGetDiscoveredAuthority";
68
+ /**
69
+ * acquireToken APIs in msal-browser.
70
+ * Used to make an /authorize endpoint call with native brokering enabled.
71
+ */
72
+ readonly FetchAccountIdWithNativeBroker: "fetchAccountIdWithNativeBroker";
73
+ /**
74
+ * acquireToken API in NativeInteractionClient class (msal-browser).
75
+ * Used to acquire a token from Native component when native brokering is enabled.
76
+ */
77
+ readonly NativeInteractionClientAcquireToken: "nativeInteractionClientAcquireToken";
78
+ /**
79
+ * Time spent creating default headers for requests to token endpoint
80
+ */
81
+ readonly BaseClientCreateTokenRequestHeaders: "baseClientCreateTokenRequestHeaders";
82
+ /**
83
+ * Used to measure the time taken for completing embedded-broker handshake (PW-Broker).
84
+ */
85
+ readonly BrokerHandhshake: "brokerHandshake";
86
+ /**
87
+ * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) .
88
+ */
89
+ readonly AcquireTokenByRefreshTokenInBroker: "acquireTokenByRefreshTokenInBroker";
90
+ /**
91
+ * Time taken for token acquisition by broker
92
+ */
93
+ readonly AcquireTokenByBroker: "acquireTokenByBroker";
94
+ /**
95
+ * Time spent on the network for refresh token acquisition
96
+ */
97
+ readonly RefreshTokenClientExecuteTokenRequest: "refreshTokenClientExecuteTokenRequest";
98
+ /**
99
+ * Time taken for acquiring refresh token , records RT size
100
+ */
101
+ readonly RefreshTokenClientAcquireToken: "refreshTokenClientAcquireToken";
102
+ /**
103
+ * Time taken for acquiring cached refresh token
104
+ */
105
+ readonly RefreshTokenClientAcquireTokenWithCachedRefreshToken: "refreshTokenClientAcquireTokenWithCachedRefreshToken";
106
+ /**
107
+ * acquireTokenByRefreshToken API in RefreshTokenClient (msal-common).
108
+ */
109
+ readonly RefreshTokenClientAcquireTokenByRefreshToken: "refreshTokenClientAcquireTokenByRefreshToken";
110
+ /**
111
+ * Helper function to create token request body in RefreshTokenClient (msal-common).
112
+ */
113
+ readonly RefreshTokenClientCreateTokenRequestBody: "refreshTokenClientCreateTokenRequestBody";
114
+ /**
115
+ * acquireTokenFromCache (msal-browser).
116
+ * Internal API for acquiring token from cache
117
+ */
118
+ readonly AcquireTokenFromCache: "acquireTokenFromCache";
119
+ /**
120
+ * acquireTokenBySilentIframe (msal-browser).
121
+ * Internal API for acquiring token by silent Iframe
122
+ */
123
+ readonly AcquireTokenBySilentIframe: "acquireTokenBySilentIframe";
124
+ /**
125
+ * Internal API for initializing base request in BaseInteractionClient (msal-browser)
126
+ */
127
+ readonly InitializeBaseRequest: "initializeBaseRequest";
128
+ /**
129
+ * Internal API for initializing silent request in SilentCacheClient (msal-browser)
130
+ */
131
+ readonly InitializeSilentRequest: "initializeSilentRequest";
132
+ readonly InitializeClientApplication: "initializeClientApplication";
133
+ /**
134
+ * Helper function in SilentIframeClient class (msal-browser).
135
+ */
136
+ readonly SilentIframeClientTokenHelper: "silentIframeClientTokenHelper";
137
+ /**
138
+ * SilentHandler
139
+ */
140
+ readonly SilentHandlerInitiateAuthRequest: "silentHandlerInitiateAuthRequest";
141
+ readonly SilentHandlerMonitorIframeForHash: "silentHandlerMonitorIframeForHash";
142
+ readonly SilentHandlerLoadFrame: "silentHandlerLoadFrame";
143
+ /**
144
+ * Helper functions in StandardInteractionClient class (msal-browser)
145
+ */
146
+ readonly StandardInteractionClientCreateAuthCodeClient: "standardInteractionClientCreateAuthCodeClient";
147
+ readonly StandardInteractionClientGetClientConfiguration: "standardInteractionClientGetClientConfiguration";
148
+ readonly StandardInteractionClientInitializeAuthorizationRequest: "standardInteractionClientInitializeAuthorizationRequest";
149
+ readonly StandardInteractionClientInitializeAuthorizationCodeRequest: "standardInteractionClientInitializeAuthorizationCodeRequest";
150
+ /**
151
+ * getAuthCodeUrl API (msal-browser and msal-node).
152
+ */
153
+ readonly GetAuthCodeUrl: "getAuthCodeUrl";
154
+ /**
155
+ * Functions from InteractionHandler (msal-browser)
156
+ */
157
+ readonly HandleCodeResponseFromServer: "handleCodeResponseFromServer";
158
+ readonly HandleCodeResponseFromHash: "handleCodeResponseFromHash";
159
+ readonly UpdateTokenEndpointAuthority: "updateTokenEndpointAuthority";
160
+ /**
161
+ * APIs in Authorization Code Client (msal-common)
162
+ */
163
+ readonly AuthClientAcquireToken: "authClientAcquireToken";
164
+ readonly AuthClientExecuteTokenRequest: "authClientExecuteTokenRequest";
165
+ readonly AuthClientCreateTokenRequestBody: "authClientCreateTokenRequestBody";
166
+ readonly AuthClientCreateQueryString: "authClientCreateQueryString";
167
+ /**
168
+ * Generate functions in PopTokenGenerator (msal-common)
169
+ */
170
+ readonly PopTokenGenerateCnf: "popTokenGenerateCnf";
171
+ readonly PopTokenGenerateKid: "popTokenGenerateKid";
172
+ /**
173
+ * handleServerTokenResponse API in ResponseHandler (msal-common)
174
+ */
175
+ readonly HandleServerTokenResponse: "handleServerTokenResponse";
176
+ /**
177
+ * Authority functions
178
+ */
179
+ readonly AuthorityFactoryCreateDiscoveredInstance: "authorityFactoryCreateDiscoveredInstance";
180
+ readonly AuthorityResolveEndpointsAsync: "authorityResolveEndpointsAsync";
181
+ readonly AuthorityGetCloudDiscoveryMetadataFromNetwork: "authorityGetCloudDiscoveryMetadataFromNetwork";
182
+ readonly AuthorityUpdateCloudDiscoveryMetadata: "authorityUpdateCloudDiscoveryMetadata";
183
+ readonly AuthorityGetEndpointMetadataFromNetwork: "authorityGetEndpointMetadataFromNetwork";
184
+ readonly AuthorityUpdateEndpointMetadata: "authorityUpdateEndpointMetadata";
185
+ readonly AuthorityUpdateMetadataWithRegionalInformation: "authorityUpdateMetadataWithRegionalInformation";
186
+ /**
187
+ * Region Discovery functions
188
+ */
189
+ readonly RegionDiscoveryDetectRegion: "regionDiscoveryDetectRegion";
190
+ readonly RegionDiscoveryGetRegionFromIMDS: "regionDiscoveryGetRegionFromIMDS";
191
+ readonly RegionDiscoveryGetCurrentVersion: "regionDiscoveryGetCurrentVersion";
192
+ readonly AcquireTokenByCodeAsync: "acquireTokenByCodeAsync";
193
+ readonly GetEndpointMetadataFromNetwork: "getEndpointMetadataFromNetwork";
194
+ readonly GetCloudDiscoveryMetadataFromNetworkMeasurement: "getCloudDiscoveryMetadataFromNetworkMeasurement";
195
+ readonly HandleRedirectPromiseMeasurement: "handleRedirectPromiseMeasurement";
196
+ readonly UpdateCloudDiscoveryMetadataMeasurement: "updateCloudDiscoveryMetadataMeasurement";
197
+ readonly UsernamePasswordClientAcquireToken: "usernamePasswordClientAcquireToken";
198
+ readonly NativeMessageHandlerHandshake: "nativeMessageHandlerHandshake";
199
+ };
200
+ export type PerformanceEvents = typeof PerformanceEvents[keyof typeof PerformanceEvents];
201
+ /**
202
+ * State of the performance event.
203
+ *
204
+ * @export
205
+ * @enum {number}
206
+ */
207
+ export declare const PerformanceEventStatus: {
208
+ readonly NotStarted: 0;
209
+ readonly InProgress: 1;
210
+ readonly Completed: 2;
211
+ };
212
+ export type PerformanceEventStatus = typeof PerformanceEventStatus[keyof typeof PerformanceEventStatus];
213
+ /**
214
+ * Fields whose value will not change throughout a request
215
+ */
216
+ export type StaticFields = {
217
+ /**
218
+ * The Silent Token Cache Lookup Policy
219
+ *
220
+ * @type {?(number | undefined)}
221
+ */
222
+ cacheLookupPolicy?: number | undefined;
223
+ /**
224
+ * Size of the id token
225
+ *
226
+ * @type {number}
227
+ */
228
+ idTokenSize?: number;
229
+ /**
230
+ *
231
+ * Size of the access token
232
+ *
233
+ * @type {number}
234
+ */
235
+ accessTokenSize?: number;
236
+ /**
237
+ *
238
+ * Size of the refresh token
239
+ *
240
+ * @type {number}
241
+ */
242
+ refreshTokenSize?: number | undefined;
243
+ /**
244
+ * Application name as specified by the app.
245
+ *
246
+ * @type {?string}
247
+ */
248
+ appName?: string;
249
+ /**
250
+ * Application version as specified by the app.
251
+ *
252
+ * @type {?string}
253
+ */
254
+ appVersion?: string;
255
+ /**
256
+ * The following are fields that may be emitted in native broker scenarios
257
+ */
258
+ extensionId?: string;
259
+ extensionVersion?: string;
260
+ matsBrokerVersion?: string;
261
+ matsAccountJoinOnStart?: string;
262
+ matsAccountJoinOnEnd?: string;
263
+ matsDeviceJoin?: string;
264
+ matsPromptBehavior?: string;
265
+ matsApiErrorCode?: number;
266
+ matsUiVisible?: boolean;
267
+ matsSilentCode?: number;
268
+ matsSilentBiSubCode?: number;
269
+ matsSilentMessage?: string;
270
+ matsSilentStatus?: number;
271
+ matsHttpStatus?: number;
272
+ matsHttpEventCount?: number;
273
+ httpVerToken?: string;
274
+ httpVerAuthority?: string;
275
+ /**
276
+ * Native broker fields
277
+ */
278
+ allowNativeBroker?: boolean;
279
+ extensionInstalled?: boolean;
280
+ extensionHandshakeTimeoutMs?: number;
281
+ extensionHandshakeTimedOut?: boolean;
282
+ };
283
+ /**
284
+ * Fields whose value may change throughout a request
285
+ */
286
+ export type Counters = {
287
+ visibilityChangeCount?: number;
288
+ incompleteSubsCount?: number;
289
+ /**
290
+ * Amount of times queued in the JS event queue.
291
+ *
292
+ * @type {?number}
293
+ */
294
+ queuedCount?: number;
295
+ /**
296
+ * Amount of manually completed queue events.
297
+ *
298
+ * @type {?number}
299
+ */
300
+ queuedManuallyCompletedCount?: number;
301
+ };
302
+ export type SubMeasurement = {
303
+ name: PerformanceEvents;
304
+ startTimeMs: number;
305
+ };
306
+ /**
307
+ * Performance measurement taken by the library, including metadata about the request and application.
308
+ *
309
+ * @export
310
+ * @typedef {PerformanceEvent}
311
+ */
312
+ export type PerformanceEvent = StaticFields & Counters & {
313
+ /**
314
+ * Unique id for the event
315
+ *
316
+ * @type {string}
317
+ */
318
+ eventId: string;
319
+ /**
320
+ * State of the perforance measure.
321
+ *
322
+ * @type {PerformanceEventStatus}
323
+ */
324
+ status: PerformanceEventStatus;
325
+ /**
326
+ * Login authority used for the request
327
+ *
328
+ * @type {string}
329
+ */
330
+ authority: string;
331
+ /**
332
+ * Client id for the application
333
+ *
334
+ * @type {string}
335
+ */
336
+ clientId: string;
337
+ /**
338
+ * Correlation ID used for the request
339
+ *
340
+ * @type {string}
341
+ */
342
+ correlationId: string;
343
+ /**
344
+ * End-to-end duration in milliseconds.
345
+ * @date 3/22/2022 - 3:40:05 PM
346
+ *
347
+ * @type {number}
348
+ */
349
+ durationMs?: number;
350
+ /**
351
+ * Visibility of the page when the event completed.
352
+ * Read from: https://developer.mozilla.org/docs/Web/API/Page_Visibility_API
353
+ *
354
+ * @type {?(string | null)}
355
+ */
356
+ endPageVisibility?: string | null;
357
+ /**
358
+ * Whether the result was retrieved from the cache.
359
+ *
360
+ * @type {(boolean | null)}
361
+ */
362
+ fromCache?: boolean | null;
363
+ /**
364
+ * Event name (usually in the form of classNameFunctionName)
365
+ *
366
+ * @type {PerformanceEvents}
367
+ */
368
+ name: PerformanceEvents;
369
+ /**
370
+ * Visibility of the page when the event completed.
371
+ * Read from: https://developer.mozilla.org/docs/Web/API/Page_Visibility_API
372
+ *
373
+ * @type {?(string | null)}
374
+ */
375
+ startPageVisibility?: string | null;
376
+ /**
377
+ * Unix millisecond timestamp when the event was initiated.
378
+ *
379
+ * @type {number}
380
+ */
381
+ startTimeMs: number;
382
+ /**
383
+ * Whether or the operation completed successfully.
384
+ *
385
+ * @type {(boolean | null)}
386
+ */
387
+ success?: boolean | null;
388
+ /**
389
+ * Add specific error code in case of failure
390
+ *
391
+ * @type {string}
392
+ */
393
+ errorCode?: string;
394
+ /**
395
+ * Add specific sub error code in case of failure
396
+ *
397
+ * @type {string}
398
+ */
399
+ subErrorCode?: string;
400
+ /**
401
+ * Name of the library used for the operation.
402
+ *
403
+ * @type {string}
404
+ */
405
+ libraryName: string;
406
+ /**
407
+ * Version of the library used for the operation.
408
+ *
409
+ * @type {string}
410
+ */
411
+ libraryVersion: string;
412
+ /**
413
+ * Whether the response is from a native component (e.g., WAM)
414
+ *
415
+ * @type {?boolean}
416
+ */
417
+ isNativeBroker?: boolean;
418
+ /**
419
+ * Request ID returned from the response
420
+ *
421
+ * @type {?string}
422
+ */
423
+ requestId?: string;
424
+ /**
425
+ * Cache lookup policy
426
+ *
427
+ * @type {?number}
428
+ */
429
+ cacheLookupPolicy?: number | undefined;
430
+ /**
431
+ * Amount of time spent in the JS queue in milliseconds.
432
+ *
433
+ * @type {?number}
434
+ */
435
+ queuedTimeMs?: number;
436
+ /**
437
+ * Sub-measurements for internal use. To be deleted before flushing.
438
+ */
439
+ incompleteSubMeasurements?: Map<string, SubMeasurement>;
440
+ };
441
+ export declare const IntFields: ReadonlySet<string>;
440
442
  //# sourceMappingURL=PerformanceEvent.d.ts.map