🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@types/office-runtime

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/office-runtime - npm Package Compare versions

Comparing version
1.0.14
to
1.0.15
+50
-48
office-runtime/index.d.ts

@@ -167,51 +167,55 @@ // Type definitions for non-npm package office-runtime 1.0

* Contains authorization related APIs.
* @beta
*/
const auth: Auth;
/**
* Provides options for the user experience when Office obtains an access token to the add-in from AAD v. 2.0 with the getAccessToken method.
* @beta
*/
interface AuthOptions {
/**
* Allows Office to get an access token silectly or through interactive consent, if one is required.
* If set to false, Office will silently try to get an access token. If it fails to do so, Office will return a descriptive error.
* If set to true, Office will show an interactive consent UI after it fails to silently get an access token.
* The prompt will only allow consent to the AAD profile scope, not to any Microsoft Graph scopes.
* Provides options for the user experience when Office obtains an access token to the add-in from AAD v. 2.0 with the `getAccessToken` method.
*/
allowConsentPrompt?: boolean;
/**
* Allows Office to get an access token silently provided consent is present or show interactive UI to sign in the user.
* If set to false, office will silently try to get an access token. If it fails to do so, Office will return a descriptive error.
* If set to true, Office will show an interactive sign-in UI after it fails to silently get an access token.
*/
allowSignInPrompt?: boolean;
/**
* Deprecated
* Prompts the user to add their Office account (or to switch to it, if it is already added).
*/
forceAddAccount?: boolean;
/**
* Causes Office to prompt the user to provide the additional factor when the tenancy being targeted by Microsoft Graph requires multifactor
* authentication. The string value identifies the type of additional factor that is required. In most cases, you won't know at development
* time whether the user's tenant requires an additional factor or what the string should be. So this option would be used in a "second try"
* call of getAccessToken after Microsoft Graph has sent an error requesting the additional factor and containing the string that should
* be used with the authChallenge option.
*/
authChallenge?: string;
/**
* A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback.
*/
asyncContext?: any;
/**
* Causes Office to return descriptive error when the add-in wants to access MS Graph and the user/admin has not granted consent to MS Graph scopes.
* Office only supports consent to graph scopes when the add-in has been deployed by a tenant admin. This information will not be available during development.
* Setting this option to true will allow Office to inform your add-in beforehand if MS graph access will fail by returning back a descriptive error.
*/
forMSGraphAccess?: boolean;
interface AuthOptions {
/**
* Allows Office to get an access token silently or through interactive consent, if one is required. Default value is `false`.
* If set to `false`, Office will silently try to get an access token. If it fails to do so, Office will return a descriptive error.
* If set to `true`, Office will show an interactive consent UI after it fails to silently get an access token.
* The prompt will only allow consent to the AAD profile scope, not to any Microsoft Graph scopes.
*/
allowConsentPrompt?: boolean;
/**
* Allows Office to get an access token silently provided consent is present or show interactive UI to sign in the user. Default value is `false`.
* If set to `false`, Office will silently try to get an access token. If it fails to do so, Office will return a descriptive error.
* If set to `true`, Office will show an interactive sign-in UI after it fails to silently get an access token.
*/
allowSignInPrompt?: boolean;
/**
* Prompts the user to add their Office account (or to switch to it, if it is already added). Default value is `false`.
*
* @deprecated Use `allowSignInPrompt` instead.
*/
forceAddAccount?: boolean;
/**
* Causes Office to display the add-in consent experience. Useful if the add-in's Azure permissions have changed or if the user's consent has
* been revoked. Default value is `false`.
*
* @deprecated Use `allowConsentPrompt` instead.
*/
forceConsent?: boolean;
/**
* Causes Office to prompt the user to provide the additional factor when the tenancy being targeted by Microsoft Graph requires multifactor
* authentication. The string value identifies the type of additional factor that is required. In most cases, you won't know at development
* time whether the user's tenant requires an additional factor or what the string should be. So this option would be used in a "second try"
* call of `getAccessToken` after Microsoft Graph has sent an error requesting the additional factor and containing the string that should
* be used with the `authChallenge` option.
*/
authChallenge?: string;
/**
* A user-defined item of any type that is returned, unchanged, in the `asyncContext` property of the `AsyncResult` object that is passed to a callback.
*/
asyncContext?: any;
/**
* Causes Office to return a descriptive error when the add-in wants to access Microsoft Graph and the user/admin has not granted consent to Graph scopes. Default value is `false`.
* Office only supports consent to Graph scopes when the add-in has been deployed by a tenant admin. This information will not be available during development.
* Setting this option to `true` will cause Office to inform your add-in beforehand (by returning a descriptive error) if Graph access will fail.
*/
forMSGraphAccess?: boolean;
}
/**
* Interface that contains authorization related APIs.
* @beta
*/

@@ -221,3 +225,3 @@ interface Auth {

* Calls the Azure Active Directory V 2.0 endpoint to get an access token to your add-in's web application. Enables add-ins to identify users.
* Server side code can use this token to access Microsoft Graph for the add-in's web application by using the
* Server-side code can use this token to access Microsoft Graph for the add-in's web application by using the
* {@link https://docs.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of | "on behalf of" OAuth flow}.

@@ -227,11 +231,9 @@ * This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign-in with Organizational

*
* Important: In Outlook, this API is not supported if the add-in is loaded in an Outlook.com or Gmail mailbox.
* **Important**: In Outlook, this API is not supported if the add-in is loaded in an Outlook.com or Gmail mailbox.
*
* @remarks
*
* **Hosts**: Excel, PowerPoint, Word
* **Hosts**: Excel, Outlook, PowerPoint, Word
*
* @beta
*
* @param options - Optional. Accepts an AuthOptions object to define sign-on behaviors.
* @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors.
* returns: Promise to the access token.

@@ -238,0 +240,0 @@ */

{
"name": "@types/office-runtime",
"version": "1.0.14",
"version": "1.0.15",
"description": "TypeScript definitions for office-runtime",

@@ -47,4 +47,4 @@ "license": "MIT",

"dependencies": {},
"typesPublisherContentHash": "a4ea82f603fc47287827208ec611943d8a8c78029a9d2d299e6e9cf739a74016",
"typeScriptVersion": "2.8"
"typesPublisherContentHash": "b039295a2409b72e7a02ef05b06ed982f8b401623df5f7291409b2d89e31427d",
"typeScriptVersion": "3.0"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Mon, 13 Apr 2020 18:09:04 GMT
* Last updated: Wed, 12 Aug 2020 19:11:25 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: `OfficeRuntime`