import { BatchResponseContent, Client } from "@microsoft/microsoft-graph-client"; import { Signal } from "@uuip/unified-ui-platform-sdk"; import { Service } from "../../../index"; import { MicrosoftServiceEvents } from "../../constant"; import { MicrosoftAuthCodeHandler } from "./microsoft-oauth-handler"; export declare class MicrosoftService extends MicrosoftAuthCodeHandler { private readonly accessToken; activeUserId: string | null; private readonly scope; private clientId; private tenantId; private msftPresenceServiceUrl; private readonly jabberService; private readonly http; graphClient: Client | null; onMessage: Service.Microsoft.EventInstance; private readonly onMessageSend; tokenResponse: Service.Microsoft.Token | undefined; private readonly hostUrl; constructor(accessToken: string); getHostUrlUpdate: () => string; initialize(clientId: string, tenantId: string): Promise; loginPopup(): Promise; logoutPopup(): Promise; private ssoSilent; isTokenValid(accessTokenExpiryTime?: string): boolean; private getTokenFromCache; private renewAccessTokenSilently; private acquireTokenSilent; /** * * @param value - JWT Token * @returns null */ private setActiveUserId; /** * Set the microsoft Signed-In user informations to the session storage. */ private setUserInfo; /** * Remove the microsoft Signed-In user informations to the session storage. */ private removeUserInfo; /** * Set the microsoft token to the session storage and OAuth Class. * While setting the token, expiry time will be calculated and stored in the session storage. */ setToken(tokenResponse: Service.Microsoft.SetToken): Promise; /** * Return the token stored in the OAuth Instance. */ getToken(): undefined | Service.Microsoft.Token; executeApiToFetchExchangeToken(tenantId: string, code: string): Promise; fetchExchangeToken(payload: { tenantId: string; code: string; }, allowRetry: boolean): Promise; initiateMicrosoftLogin(): Promise; private handleSilentError; private handleSsoError; private getLoginRedirectURL; getLogoutRedirectURL(): string; executeApiToFetchRenewToken(tenantId: string, refreshToken: string): Promise; /** * * @param allowRetry - if true, retry the request after 200 ms * @returns */ renewAccessToken(payload: { tenantId: string; refreshToken: string; }, allowRetry: boolean): Promise; private readonly authProviderCallback; initializeGraphClient(): Promise; graphRequestHandler(payload: { endPoint: string; isBetaVersion?: boolean; method: "GET" | "POST"; count?: number; skipToken?: string; requestData?: any; customHeaders?: { [key: string]: string; }; selectParameters?: Array; filter?: string; orderby?: string; }): Promise; fetchUsers(payload: { count?: number; searchQuery?: string; skipToken?: string; }): Promise; batchRequest(batchRequests: any): Promise; fetchUserPresence(payload: any): Promise; msLogout(): Promise; private readonly fetchMicrosoftPressenceAPIURL; presenceAPI(): Promise<{}>; getEventInstance: () => Service.Microsoft.EventInstance; } declare module "../../../index" { namespace Service.Microsoft { type LoginRequest = { clientId?: string; scope: string; redirectUri: string; nonce?: string; state?: string; prompt?: string; }; type ExchangeTokenResponse = { access_token: string; refresh_token: string; id_token: string; expires_in: string; scope: string; token_type: string; }; type SetToken = Service.Microsoft.ExchangeTokenResponse & { accessTokenExpiryTime?: string; }; type Token = Service.Microsoft.ExchangeTokenResponse & { accessTokenExpiryTime: string; }; type EventMessage = { eventType: MicrosoftServiceEvents; payload?: any; }; type EventInstance = Signal.WithData; type U2CResponse = { services: Service[]; format: string; }; type Service = { serviceName: string; logicalNames: string[]; serviceUrls: ServiceURL[]; internalServiceUrls: any[]; ttl: number; id: string; }; type ServiceURL = { baseUrl: string; priority: number; }; } } //# sourceMappingURL=microsoft-authentication.d.ts.map