///
import { FeatureInterface } from '../api/cloud/FeatureApi';
import { UserSessionMetaType } from '../ops/AuthenticateOps';
import { JwkRsa } from '../ops/JoseOps';
import { AccessTokenMetaType } from '../ops/OAuth2OidcOps';
import { ProgressIndicatorStatusType, ProgressIndicatorType } from '../utils/Console';
export type State = {
/**
* Get a clone of the full state as an object
* @returns a clone of the state
*/
getState(): StateInterface;
/**
* Set the AM host base URL
* @param host Access Management base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just specify a unique substring.
*/
setHost(host: string): void;
/**
* Get the AM host base URL
* @returns the AM host base URL
*/
getHost(): string;
/**
* Set the IDM host base URL
* @param host Identity Management base URL, e.g.: https://cdk.iam.example.com/openidm. To use a connection profile, just specify a unique substring.
*/
setIdmHost(host: string): void;
/**
* Get the IDM host base URL
* @returns the IDM host base URL
*/
getIdmHost(): string;
setUsername(username: string): void;
getUsername(): string;
setPassword(password: string): void;
getPassword(): string;
setRealm(realm: string): void;
getRealm(): string;
setUseRealmPrefixOnManagedObjects(useRealmPrefixOnManagedObjects: boolean): void;
getUseRealmPrefixOnManagedObjects(): boolean;
setDeploymentType(type: string): void;
getDeploymentType(): string;
setAdminClientId(type: string): void;
getAdminClientId(): string;
setAdminClientRedirectUri(type: string): void;
getAdminClientRedirectUri(): string;
setAllowInsecureConnection(allowInsecureConnection: boolean): void;
getAllowInsecureConnection(): boolean;
setCookieName(name: string): void;
getCookieName(): string;
setUserSessionTokenMeta(value: UserSessionMetaType): void;
getCookieValue(): string;
getUserSessionTokenMeta(): UserSessionMetaType;
setFeatures(features: FeatureInterface[]): void;
getFeatures(): FeatureInterface[];
setAuthenticationHeaderOverrides(overrides: Record): void;
getAuthenticationHeaderOverrides(): Record;
setAuthenticationService(service: string): void;
getAuthenticationService(): string;
setServiceAccountId(uuid: string): void;
getServiceAccountId(): string;
setServiceAccountJwk(jwk: JwkRsa): void;
getServiceAccountJwk(): JwkRsa;
setServiceAccountScope(scope: string): void;
getServiceAccountScope(): string;
setUseBearerTokenForAmApis(useBearerTokenForAmApis: boolean): void;
getUseBearerTokenForAmApis(): boolean;
setBearerTokenMeta(token: AccessTokenMetaType): void;
getBearerToken(): string;
getBearerTokenMeta(): AccessTokenMetaType;
setLogApiKey(key: string): void;
getLogApiKey(): string;
setLogApiSecret(secret: string): void;
getLogApiSecret(): string;
setAmVersion(version: string): void;
getAmVersion(): string;
setFrodoVersion(version: string): void;
getFrodoVersion(): string;
setConnectionProfilesPath(path: string): void;
getConnectionProfilesPath(): string;
setUseTokenCache(useTokenCache: boolean): void;
getUseTokenCache(): boolean;
setTokenCachePath(path: string): void;
getTokenCachePath(): string;
setMasterKeyPath(path: string): void;
getMasterKeyPath(): string;
setOutputFile(file: string): void;
getOutputFile(): string;
setDirectory(directory: string): void;
getDirectory(): string;
setAutoRefreshTimer(timer: NodeJS.Timeout): void;
getAutoRefreshTimer(): NodeJS.Timeout;
setCurlirizeHandler(handler: (message: string) => void): void;
getCurlirizeHandler(): (message: string) => void;
setCurlirize(curlirize: boolean): void;
getCurlirize(): boolean;
setCreateProgressHandler(handler: (type: ProgressIndicatorType, total?: number, message?: string) => string): void;
getCreateProgressHandler(): (type: ProgressIndicatorType, total?: number, message?: string) => string;
setUpdateProgressHandler(handler: (id: string, message: string) => void): void;
getUpdateProgressHandler(): (id: string, message: string) => void;
setStopProgressHandler(handler: (id: string, message: string, status?: ProgressIndicatorStatusType) => void): void;
getStopProgressHandler(): (id: string, message: string, status?: ProgressIndicatorStatusType) => void;
setPrintHandler(handler: (message: string | object, type?: string, newline?: boolean) => void): void;
getPrintHandler(): (message: string | object, type?: string, newline?: boolean) => void;
setErrorHandler(handler: (error: Error, message?: string) => void): void;
getErrorHandler(): (error: Error, message?: string) => void;
setVerboseHandler(handler: (message: string | object) => void): void;
getVerboseHandler(): (message: string | object) => void;
setVerbose(verbose: boolean): void;
getVerbose(): boolean;
setDebugHandler(handler: (message: string | object) => void): void;
getDebugHandler(): (message: string | object) => void;
setDebug(debug: boolean): void;
getDebug(): boolean;
/**
* Reset the state to default values
*/
reset(): void;
/**
* @deprecated since v0.17.0 use `setHost(host: string)` instead
*/
setTenant(tenant: string): void;
/**
* @deprecated since v0.17.0 use `getHost` instead
*/
getTenant(): string;
};
declare const _default: (initialState: StateInterface) => State;
export default _default;
export interface StateInterface {
host?: string;
idmHost?: string;
username?: string;
password?: string;
realm?: string;
useRealmPrefixOnManagedObjects?: boolean;
deploymentType?: string;
adminClientId?: string;
adminClientRedirectUri?: string;
allowInsecureConnection?: boolean;
authenticationHeaderOverrides?: Record;
authenticationService?: string;
cookieName?: string;
userSessionToken?: UserSessionMetaType;
features?: FeatureInterface[];
serviceAccountId?: string;
serviceAccountJwk?: JwkRsa;
serviceAccountScope?: string;
useBearerTokenForAmApis?: boolean;
bearerToken?: AccessTokenMetaType;
logApiKey?: string;
logApiSecret?: string;
amVersion?: string;
frodoVersion?: string;
connectionProfilesPath?: string;
useTokenCache?: boolean;
tokenCachePath?: string;
masterKeyPath?: string;
outputFile?: string;
directory?: string;
autoRefreshTimer?: NodeJS.Timeout;
printHandler?: (message: string | object, type?: string, newline?: boolean) => void;
errorHandler?: (error: Error, message: string) => void;
verboseHandler?: (message: string | object) => void;
verbose?: boolean;
debugHandler?: (message: string | object) => void;
debug?: boolean;
curlirizeHandler?: (message: string) => void;
curlirize?: boolean;
createProgressHandler?: (type: ProgressIndicatorType, total?: number, message?: string) => string;
updateProgressHandler?: (id: string, message: string) => void;
stopProgressHandler?: (id: string, message: string, status?: string) => void;
}
export declare const getVerbose: () => boolean;
export declare const getDebug: () => boolean;
//# sourceMappingURL=State.d.ts.map