@types/office-js-preview 1.0.492 → 1.0.493

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.
@@ -8,7 +8,7 @@ This package contains type definitions for office-js-preview (https://github.com
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 06 Aug 2024 18:38:34 GMT
11
+ * Last updated: Tue, 06 Aug 2024 21:07:20 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -3508,7 +3508,7 @@ declare namespace Office {
3508
3508
  value: T;
3509
3509
  }
3510
3510
  /**
3511
- * The Office Auth namespace, `Office.auth`, provides a method that allows the Office client application to obtain an access token to the add-in's web application.
3511
+ * The Office Auth namespace, `Office.auth`, provides methods for the Office client application to obtain access tokens to the add-in's web application.
3512
3512
  * Indirectly, this also enables the add-in to access the signed-in user's Microsoft Graph data without requiring the user to sign in a second time.
3513
3513
  */
3514
3514
  interface Auth {
@@ -3594,6 +3594,18 @@ declare namespace Office {
3594
3594
  * @returns Promise to the access token.
3595
3595
  */
3596
3596
  getAccessToken(options?: AuthOptions): Promise<string>;
3597
+ /**
3598
+ * Get the necessary information about the current user. The add-in passes this to MSAL.js to get an access token for the current session.
3599
+ *
3600
+ * @remarks
3601
+ *
3602
+ * **Hosts**: Excel, OneNote, Outlook, PowerPoint, Word
3603
+ *
3604
+ * **Requirement set**: NestedAppAuth 1.1
3605
+ *
3606
+ * @returns Promise to the AuthContext object.
3607
+ */
3608
+ getAuthContext(): Promise<AuthContext>;
3597
3609
  }
3598
3610
  /**
3599
3611
  * 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.
@@ -3654,6 +3666,35 @@ declare namespace Office {
3654
3666
  */
3655
3667
  forMSGraphAccess?: boolean;
3656
3668
  }
3669
+ /**
3670
+ * Represents the user information which can be passed to msal.js.
3671
+ */
3672
+ interface AuthContext {
3673
+ /**
3674
+ * The unique ID of the account.
3675
+ */
3676
+ userObjectId: string;
3677
+ /**
3678
+ * The full tenant or organizational ID that this account belongs to.
3679
+ */
3680
+ tenantId: string;
3681
+ /**
3682
+ * The user's internet-style login name, based on the Internet standard RFC. Also known as UPN.
3683
+ */
3684
+ userPrincipalName: string;
3685
+ /**
3686
+ * The identity type by its identity provider (IdP) for this account. "aad" represents an organization account and "msa" represents a {@link https://support.microsoft.com/account-billing/4a7c48e9-ff5a-e9c6-5a5c-1a57d66c3bfa | Microsoft personal account}.
3687
+ */
3688
+ authorityType: "aad" | "msa" | "other";
3689
+ /**
3690
+ * The URL that indicates a directory that MSAL can request tokens from.
3691
+ */
3692
+ authorityBaseUrl: string;
3693
+ /**
3694
+ * An optional claim that provides a hint about the user account attempting to sign in.
3695
+ */
3696
+ loginHint: string;
3697
+ }
3657
3698
  /**
3658
3699
  * Represents a modal notification dialog that can appear when the user attempts to close a document. The document won't close until the user responds.
3659
3700
  * The notification dialog will allow the user to confirm the request to close the document or cancel the request to close the document.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.492",
3
+ "version": "1.0.493",
4
4
  "description": "TypeScript definitions for office-js-preview",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "8f7259c5c83e3aade6f58bf2eedc83e22a9d59a42739f5cd89e6d20680dcc9a0",
48
+ "typesPublisherContentHash": "4191dd40aebad27509c7f37fda2a5e0e9ec22c57918a6783e5afd810e1dd4d8b",
49
49
  "typeScriptVersion": "4.8",
50
50
  "nonNpm": true
51
51
  }