/**
 * iCure Data Stack API Documentation
 * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */
import { XHR } from './XHR';
import { AuthenticationResponse } from '../model/AuthenticationResponse';
import { LoginCredentials } from '../model/LoginCredentials';
import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider';
export declare enum OAuthThirdParty {
    GOOGLE = "google",
    MICROSOFT = "microsoft",
    APPLE = "apple",
    LINKEDIN = "linkedin",
    GITHUB = "github"
}
export declare enum DigitalIdProvider {
    BE_FAS = "be.fas"
}
export declare class IccAuthApi {
    host: string;
    headers: Array<XHR.Header>;
    authenticationProvider: AuthenticationProvider;
    fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
    constructor(host: string, headers: any, authenticationProvider?: AuthenticationProvider, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
    setHeaders(h: Array<XHR.Header>): void;
    handleError(e: XHR.XHRError): never;
    /**
     * Check login using groupId/userId and password
     * @summary check
     * @param body
     */
    check(body?: LoginCredentials): Promise<AuthenticationResponse>;
    /**
     * Login using username and password
     * @summary login
     * @param body
     * @param groupId the group id where to login to.
     * @param duration the duration of the returned JWT authentication token, in seconds.
     */
    login(body?: LoginCredentials, groupId?: string, duration?: number): Promise<AuthenticationResponse>;
    /**
     * Login using third party OAuth provider token
     * @summary login
     * @param thirdParty The third party OAuth service used to authenticate the user
     * @param token The token returned by the third party OAuth service
     * @param groupId the group id where to login to.
     */
    loginWithThirdPartyToken(thirdParty: string, token: string, groupId?: string): Promise<AuthenticationResponse>;
    /**
     * Lite only
     * /auth/
     */
    loginWithCloudToken(issuer: string, cloudJwt: string): Promise<AuthenticationResponse>;
    /**
     * Logout
     * @summary logout
     */
    logout(): Promise<AuthenticationResponse>;
    /**
     * Logout
     * @summary logout
     */
    logoutPost(): Promise<AuthenticationResponse>;
    /**
     * Get token for subsequent operation
     * @summary token
     * @param method
     * @param path
     */
    token(method: string, path: string): Promise<string>;
    /**
     * Gets a new authentication and refresh JWT for a different group
     */
    switchGroup(refreshJWT: string, groupId: string): Promise<AuthenticationResponse>;
    /**
     * Gets a new authentication JWT using the refresh JWT
     * @summary refresh
     */
    refreshAuthenticationJWT(refreshJWT: string): Promise<AuthenticationResponse>;
    /**
     * Switch groups using the refresh JWT
     * @summary switch groups
     */
    switchGroupUsingRefreshJWT(groupId: string): Promise<AuthenticationResponse>;
    /**
     * Invalidates a refresh JWT
     * @summary invalidate
     */
    invalidateRefreshJWT(refreshJWT: string): Promise<AuthenticationResponse>;
}
