UNPKG

@rockcarver/frodo-lib

Version:

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

107 lines 4.49 kB
import { State } from '../shared/State'; import { AmConfigEntityInterface, PagedResult } from './ApiTypes'; export interface AmConfigEntitiesInterface { applicationTypes: AmConfigEntityInterface; authenticationChains: AmConfigEntityInterface; authenticationModules: AmConfigEntityInterface; authenticationTreesConfiguration: AmConfigEntityInterface; conditionTypes: AmConfigEntityInterface; decisionCombiners: AmConfigEntityInterface; secrets: AmConfigEntityInterface; serverInformation: AmConfigEntityInterface; serverVersion: AmConfigEntityInterface; subjectAttributes: AmConfigEntityInterface; subjectTypes: AmConfigEntityInterface; webhookService: AmConfigEntityInterface; wsEntity: AmConfigEntityInterface; } export type ConfigSkeleton = { global: AmConfigEntitiesInterface; realm: Record<string, AmConfigEntitiesInterface>; }; /** * Contains information about how to get a config entity. */ export type EntityInfo = { realm?: EntitySubInfo; global?: EntitySubInfo; deployments?: string[]; queryFilter?: string; action?: string; readonly?: boolean; }; /** * Contains realm or global specific information about how to get a config entity. Settings like deployments, queryFilter, and action will override the values contained in the parent EntityInfo object if they are provided. */ export type EntitySubInfo = { path: string; version: string; protocol?: string; ifMatch?: string; importWithId?: boolean; deployments?: string[]; queryFilter?: string; action?: string; }; export type ConfigEntitySkeleton = PagedResult<AmConfigEntityInterface> | AmConfigEntityInterface | undefined; /** * Gets a single am config entity at the given realm and path * @param {string} path path to the entity * @param {string} version the api resource version * @param {string} protocol the api protocol version * @param {string} realm realm that the entity is in (or leave undefined to get global entity) * @param {string} queryFilter the query filter * @param {string} action the action * @returns {Promise<ConfigEntitySkeleton>} the config entity data */ export declare function getConfigEntity({ state, path, version, protocol, realm, queryFilter, action, }: { state: State; path: string; version: string; protocol?: string; realm?: string; queryFilter?: string; action?: string; }): Promise<ConfigEntitySkeleton>; /** * 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. * @returns {Promise<ConfigSkeleton>} a promise that resolves to a config object containing global and realm config entities */ export declare function getConfigEntities({ includeReadOnly, onlyRealm, onlyGlobal, state, }: { includeReadOnly: boolean; onlyRealm: boolean; onlyGlobal: boolean; state: State; }): Promise<ConfigSkeleton>; /** * Puts a single am config entity at the given realm and path * @param {ConfigEntitySkeleton} entityData config entity object. If it's not provided, no import is performed. * @param {string} path path to the entity * @param {string} version the api resource version * @param {string} protocol the api protocol version * @param {string} ifMatch the if match condition * @param {string} realm realm that the entity is in (or leave undefined to get global entity) * @returns {Promise<ConfigEntitySkeleton>} the config entity object */ export declare function putConfigEntity({ state, entityData, path, version, protocol, ifMatch, realm, }: { state: State; entityData?: ConfigEntitySkeleton; path: string; version: string; protocol?: string; ifMatch?: string; realm?: string; }): Promise<ConfigEntitySkeleton>; /** * Put all other AM config entities * @param {ConfigSkeleton} config the config object containing global and realm config entities * @returns {Promise<ConfigSkeleton>} a promise that resolves to a config object containing global and realm config entities */ export declare function putConfigEntities({ config, state, }: { config: ConfigSkeleton; state: State; }): Promise<ConfigSkeleton>; //# sourceMappingURL=AmConfigApi.d.ts.map