import { ConfigStatusResponseCode, IdentityProvider, IdentityServiceConfig, TokenResponse } from '@axinom/mosaic-id-utils';
import { IdentityProviderInfo } from '../types';
export type IdServiceConfiguration = ({
    status: ConfigStatusResponseCode.SUCCESS;
    providers: IdentityProviderInfo[];
} | {
    status: ConfigStatusResponseCode.TENANT_NOT_ACTIVE | ConfigStatusResponseCode.ENVIRONMENT_NOT_ACTIVE | ConfigStatusResponseCode.IDP_MISCONFIGURATION | ConfigStatusResponseCode.ERROR;
}) & {
    tenantId: string;
    environmentId: string;
};
export interface WellKnownUrls {
    axAuthManagementGraphQlEndpoint: string;
}
export interface InitiateSignUpRequest {
    firstName: string;
    lastName: string;
    email: string;
    password: string;
}
export interface IdentityServiceClient {
    getConfiguration: () => Promise<IdServiceConfiguration>;
    getWellKnownUrls: () => Promise<WellKnownUrls>;
    getToken: () => Promise<TokenResponse>;
    logoutUser: () => Promise<boolean>;
    getIdpAuthUrl: (idpId: IdentityProvider, originUrl: string) => string;
    addTokenChangedHandler: (callback: TokenChangedCallback) => void;
    removeTokenChangedHandler: (callback: TokenChangedCallback) => void;
    initiateSignUp: (initiateSignUpRequest: InitiateSignUpRequest, axAuthManagementBaseUrl: string) => Promise<{
        isSuccess: boolean;
        errorMessage?: string;
    }>;
    completeUserSignUp: (signUpOtp: string, axAuthManagementBaseUrl: string) => Promise<{
        isSuccess: boolean;
        errorMessage?: string;
    }>;
    initiatePasswordReset: (email: string, axAuthManagementBaseUrl: string) => Promise<{
        isSuccess: boolean;
        errorMessage?: string;
    }>;
    completePasswordReset: (resetOtp: string, newPassword: string, axAuthManagementBaseUrl: string) => Promise<{
        isSuccess: boolean;
        errorMessage?: string;
    }>;
}
export type TokenChangedCallback = (token: TokenResponse | null) => void;
/**
 * Creates a configuration service client. For performance reasons there should only be a single client instance created by an application
 * @param config The configuration values for the identity service that should be used.
 */
export declare const createIdentityServiceClient: (config: IdentityServiceConfig) => IdentityServiceClient;
//# sourceMappingURL=IdentityServiceClient.d.ts.map