import { IdObjectSkeletonInterface } from '../api/ApiTypes'; import { State } from '../shared/State'; import { JwkRsa } from './JoseOps'; export type ConnectionProfile = { /** * Get connection profiles file name * @returns {string} connection profiles file name */ getConnectionProfilesPath(): string; /** * Find connection profiles * @param {ConnectionsFileInterface} connectionProfiles connection profile object * @param {string} host host url or unique substring * @returns {SecureConnectionProfileInterface[]} Array of connection profiles */ findConnectionProfiles(connectionProfiles: ConnectionsFileInterface, host: string): SecureConnectionProfileInterface[]; /** * Initialize connection profiles * * This method is called from app.ts and runs before any of the message handlers are registered. * Therefore none of the Console message functions will produce any output. */ initConnectionProfiles(): Promise; /** * Get connection profile by host * @param {String} host host tenant host url or unique substring * @returns {Object} connection profile or null */ getConnectionProfileByHost(host: string): Promise; /** * Get connection profile * @returns {Object} connection profile or null */ getConnectionProfile(): Promise; /** * Load a connection profile into library state * @param {string} host AM host URL or unique substring * @returns {Promise} A promise resolving to true if successful */ loadConnectionProfileByHost(host: string): Promise; /** * Load a connection profile into library state * @returns {Promise} A promise resolving to true if successful */ loadConnectionProfile(): Promise; /** * Save connection profile * @param {string} host host url for new profiles or unique substring for existing profiles * @returns {Promise} true if the operation succeeded, false otherwise */ saveConnectionProfile(host: string): Promise; /** * Delete connection profile * @param {string} host host tenant host url or unique substring */ deleteConnectionProfile(host: string): void; /** * Create a new service account using auto-generated parameters * @returns {Promise} A promise resolving to a service account object */ addNewServiceAccount(): Promise; }; declare const _default: (state: State) => ConnectionProfile; export default _default; export interface SecureConnectionProfileInterface { tenant: string; idmHost?: string; allowInsecureConnection?: boolean; deploymentType?: string; username?: string | null; encodedPassword?: string | null; logApiKey?: string | null; encodedLogApiSecret?: string | null; authenticationService?: string | null; authenticationHeaderOverrides?: Record; adminClientId?: string | null; adminClientRedirectUri?: string | null; svcacctId?: string | null; encodedSvcacctJwk?: string | null; svcacctName?: string | null; svcacctScope?: string | null; } export interface ConnectionProfileInterface { tenant: string; idmHost?: string; allowInsecureConnection?: boolean; deploymentType?: string; username?: string | null; password?: string | null; logApiKey?: string | null; logApiSecret?: string | null; authenticationService?: string | null; authenticationHeaderOverrides?: Record; adminClientId?: string | null; adminClientRedirectUri?: string | null; svcacctId?: string | null; svcacctJwk?: JwkRsa; svcacctName?: string | null; svcacctScope?: string | null; } export interface ConnectionsFileInterface { [key: string]: SecureConnectionProfileInterface; } /** * Get connection profiles file name * @param {State} state library state * @returns {String} connection profiles file name */ export declare function getConnectionProfilesPath({ state }: { state: State; }): string; /** * Initialize connection profiles * * This method is called from app.ts and runs before any of the message handlers are registered. * Therefore none of the Console message functions will produce any output. * @param {State} state library state */ export declare function initConnectionProfiles({ state }: { state: State; }): Promise; /** * Get connection profile by host * @param {string} host host tenant host url or unique substring * @param {State} state library state * @returns {Promise} connection profile */ export declare function getConnectionProfileByHost({ host, state, }: { host: string; state: State; }): Promise; /** * Get connection profile * @param {Object} params Params object * @param {State} params.state State object * @returns {Promise} A promise resolving to a connection profile or null */ export declare function getConnectionProfile({ state, }: { state: State; }): Promise; /** * Load a connection profile into library state * @param {Object} params Params object * @param {string} params.host AM host URL or unique substring * @param {State} params.state State object * @returns {Promise} A promise resolving to true if successful */ export declare function loadConnectionProfileByHost({ host, state, }: { host: string; state: State; }): Promise; /** * Load a connection profile into library state * @param {Object} params Params object * @param {State} params.state State object * @returns {Promise} A promise resolving to true if successful */ export declare function loadConnectionProfile({ state, }: { state: State; }): Promise; /** * Save connection profile * @param {string} host host url for new profiles or unique substring for existing profiles * @returns {Promise} true if the operation succeeded, false otherwise */ export declare function saveConnectionProfile({ host, state, }: { host: string; state: State; }): Promise; /** * Delete connection profile * @param {String} host host tenant host url or unique substring */ export declare function deleteConnectionProfile({ host, state, }: { host: string; state: State; }): void; /** * Create a new service account using auto-generated parameters * @returns {Promise} A promise resolving to a service account object */ export declare function addNewServiceAccount({ state, }: { state: State; }): Promise; //# sourceMappingURL=ConnectionProfileOps.d.ts.map