UNPKG

@rockcarver/frodo-lib

Version:

A library to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.

96 lines 5.63 kB
import { ConfigEntitySkeleton, ConfigSkeleton } from '../api/AmConfigApi'; import { AmConfigEntityInterface } from '../api/ApiTypes'; import { State } from '../shared/State'; import { ExportMetaData, ResultCallback } from './OpsTypes'; export type AmConfig = { /** * Create an empty config entity export template * @returns {Promise<ConfigEntityExportInterface>} an empty config entity export template */ createConfigEntityExportTemplate(realms?: string[]): Promise<ConfigEntityExportInterface>; /** * Export all other AM config entities * @param {boolean} includeReadOnly Include read only config in the export * @param {boolean} onlyRealm Export config only from the active realm. If onlyGlobal is also active, then it will also export the global config. * @param {boolean} onlyGlobal Export global config only. If onlyRealm is also active, then it will also export the active realm config. * @param {ResultCallback} resultCallback Optional callback to process individual results * @returns {Promise<ConfigEntityExportInterface>} promise resolving to a ConfigEntityExportInterface object */ exportAmConfigEntities(includeReadOnly: boolean, onlyRealm: boolean, onlyGlobal: boolean, resultCallback?: ResultCallback<AmConfigEntityInterface>): Promise<ConfigEntityExportInterface>; /** * Import all other AM config entities * @param {ConfigEntityExportInterface} importData The config import data * @param {ResultCallback} resultCallback Optional callback to process individual results * @returns {Promise<ConfigSkeleton | null>} a promise that resolves to a config object containing global and realm config entities, or null if no import was performed */ importAmConfigEntities(importData: ConfigEntityExportInterface, resultCallback?: ResultCallback<AmConfigEntityInterface>): Promise<ConfigSkeleton | null>; }; declare const _default: (state: State) => AmConfig; export default _default; export interface ConfigEntityExportInterface { meta?: ExportMetaData; global: Record<string, Record<string, AmConfigEntityInterface>>; realm: Record<string, Record<string, Record<string, AmConfigEntityInterface>>>; } /** * Create an empty config export template * @param {string[]} realms the list of realm names * @returns {Promise<ConfigEntityExportInterface>} an empty config entity export template */ export declare function createConfigEntityExportTemplate({ state, realms, }: { state: State; realms?: string[]; }): Promise<ConfigEntityExportInterface>; /** * Get all other AM config entities * @param {boolean} includeReadOnly Include read only config in the export * @param {boolean} onlyRealm Get config only from the active realm. If onlyGlobal is also active, then it will also get the global config. * @param {boolean} onlyGlobal Get global config only. If onlyRealm is also active, then it will also get the active realm config. * @param {ResultCallback} resultCallback Optional callback to process individual results * @returns {Promise<ConfigSkeleton>} a promise that resolves to a config object containing global and realm config entities */ export declare function getConfigEntities({ includeReadOnly, onlyRealm, onlyGlobal, resultCallback, state, }: { includeReadOnly: boolean; onlyRealm: boolean; onlyGlobal: boolean; resultCallback: ResultCallback<ConfigEntitySkeleton>; state: State; }): Promise<ConfigSkeleton>; /** * Put all other AM config entities * @param {ConfigSkeleton} config the config object containing global and realm config entities * @param {ResultCallback} resultCallback Optional callback to process individual results * @returns {Promise<ConfigSkeleton>} a promise that resolves to a config object containing global and realm config entities */ export declare function putConfigEntities({ config, resultCallback, state, }: { config: ConfigSkeleton; resultCallback: ResultCallback<ConfigEntitySkeleton>; state: State; }): Promise<ConfigSkeleton>; /** * Export all other AM config entities * @param {boolean} includeReadOnly Include read only config in the export * @param {boolean} onlyRealm Export config only from the active realm. If onlyGlobal is also active, then it will also export the global config. * @param {boolean} onlyGlobal Export global config only. If onlyRealm is also active, then it will also export the active realm config. * @param {ResultCallback} resultCallback Optional callback to process individual results * @returns {Promise<ConfigEntityExportInterface>} promise resolving to a ConfigEntityExportInterface object */ export declare function exportAmConfigEntities({ includeReadOnly, onlyRealm, onlyGlobal, resultCallback, state, }: { includeReadOnly: boolean; onlyRealm: boolean; onlyGlobal: boolean; resultCallback?: ResultCallback<AmConfigEntityInterface>; state: State; }): Promise<ConfigEntityExportInterface>; /** * Import all other AM config entities * @param {ConfigEntityExportInterface} importData The config import data * @param {ResultCallback} resultCallback Optional callback to process individual results * @returns {Promise<ConfigSkeleton | null>} a promise that resolves to a config object containing global and realm config entities, or null if no import was performed */ export declare function importAmConfigEntities({ importData, resultCallback, state, }: { importData: ConfigEntityExportInterface; resultCallback?: ResultCallback<AmConfigEntityInterface>; state: State; }): Promise<ConfigSkeleton | null>; //# sourceMappingURL=AmConfigOps.d.ts.map