import type { ClientOptions, Options } from '@microsoft/microsoft-graph-client'; import { ServiceKey, type ServiceScope } from '@microsoft/sp-core-library'; import MSGraphClient from './MSGraphClient'; import type MSGraphClientV3 from './MSGraphClientV3'; /** * Returns a preinitialized version of the MSGraphClient. * For more information: {@link https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-msgraph} * * @public */ export default class MSGraphClientFactory { /** * The service key for MSGraphClientFactory. */ static readonly serviceKey: ServiceKey; private _serviceScope; /** * @param serviceScope - Provides services for the MSGraphClient to consume. * * @internal */ constructor(serviceScope: ServiceScope); /** * Returns an instance of the MSGraphClient that communicates with the current tenant's configurable * Service Principal. Returns version 1 by default. * * @internal * * @remarks * This method is deprecated marked as internal for backward compatibility */ getClient(): Promise; /** * Returns an instance of version 3 the MSGraphClient V3 that communicates with the current tenant's configurable * Service Principal. * */ getClient(version: '3'): Promise; /** * Returns an instance of the MSGraphClient that communicates with the current tenant's configurable Service Pricipal. * Allows to specify custom middleware options. * * @param version - The version of the Graph API to use. 3. * @param options - Client options for the Graph API. */ getClientWithMiddleware(version: '3', options: ClientOptions): Promise; /** * Returns a v3 version of MSGraphClient with the 1P App Principal * * @internal * */ getClientInternal(version: '3', options?: Options): Promise; } //# sourceMappingURL=MSGraphClientFactory.d.ts.map