import { AuthTokenResponse, ServiceCollection, ServiceCollectionRequest } from '../models'; import { GuardService } from './guard'; /** * This service enables you to handle one authentication token per practice */ export declare class ApisPracticeManager { private serviceCollReq; private getAuthTokenCbk; private useLocalStorage; private practiceInstances; /** * The constructor * @param serviceCollReq the services to initialize. Only filled urls will get corresponding service to be initialized. * It will be used each time a new practices needs a `ServiceCollection` * @param getAuthTokenCbk the callback function used to get a new JWT token * @param useLocalStorage (default: false) if true store tokens into local storage (only for browsers) */ constructor(serviceCollReq: ServiceCollectionRequest, getAuthTokenCbk: (guard: GuardService, practiceUuid?: string) => Promise, useLocalStorage?: boolean); /** * This function is used to get a `ServiceCollection` associated to a practice. If missing, it will initialize a new `ServiceCollection`. * @param practiceUuid the uuid of the practice * @returns a promise holding a `ServiceCollection` */ get(practiceUuid?: string): Promise; /** * Uses the refresh intance to fetch a new auth token for the given practice * @param practiceUuid the uuid of the practice or key of a specific instance * @returns a new authentication token */ authTokenFunc(practiceUuidOrInstanceName?: string): Promise; }